vendor: 46,511 bytes, lines 1-792
1/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ ! function(a) { 2 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery) 3}(function(a) { 4 var b = function() { 5 if (a && a.fn && a.fn.select2 && a.fn.select2.amd) var b = a.fn.select2.amd; 6 var b; 7 return function() { 8 if (!b || !b.requirejs) { 9 b ? c = b : b = {}; 10 var a, c, d; 11 ! function(b) { 12 function e(a, b) { 13 return u.call(a, b) 14 } 15 16 function f(a, b) { 17 var c, d, e, f, g, h, i, j, k, l, m, n = b && b.split("/"), 18 o = s.map, 19 p = o && o["*"] || {}; 20 if (a && "." === a.charAt(0)) 21 if (b) { 22 for (a = a.split("/"), g = a.length - 1, s.nodeIdCompat && w.test(a[g]) && (a[g] = a[g].replace(w, "")), a = n.slice(0, n.length - 1).concat(a), k = 0; k < a.length; k += 1) 23 if (m = a[k], "." === m) a.splice(k, 1), k -= 1; 24 else if (".." === m) { 25 if (1 === k && (".." === a[2] || ".." === a[0])) break; 26 k > 0 && (a.splice(k - 1, 2), k -= 2) 27 } 28 a = a.join("/") 29 } else 0 === a.indexOf("./") && (a = a.substring(2)); 30 if ((n || p) && o) { 31 for (c = a.split("/"), k = c.length; k > 0; k -= 1) { 32 if (d = c.slice(0, k).join("/"), n) 33 for (l = n.length; l > 0; l -= 1) 34 if (e = o[n.slice(0, l).join("/")], e && (e = e[d])) { 35 f = e, h = k; 36 break 37 } if (f) break; 38 !i && p && p[d] && (i = p[d], j = k) 39 }!f && i && (f = i, h = j), f && (c.splice(0, h, f), a = c.join("/")) 40 } 41 return a 42 } 43 44 function g(a, c) { 45 return function() { 46 var d = v.call(arguments, 0); 47 return "string" != typeof d[0] && 1 === d.length && d.push(null), n.apply(b, d.concat([a, c])) 48 } 49 } 50 51 function h(a) { 52 return function(b) { 53 return f(b, a) 54 } 55 } 56 57 function i(a) { 58 return function(b) { 59 q[a] = b 60 } 61 } 62 63 function j(a) { 64 if (e(r, a)) { 65 var c = r[a]; 66 delete r[a], t[a] = !0, m.apply(b, c) 67 } 68 if (!e(q, a) && !e(t, a)) throw new Error("No " + a); 69 return q[a] 70 } 71 72 function k(a) { 73 var b, c = a ? a.indexOf("!") : -1; 74 return c > -1 && (b = a.substring(0, c), a = a.substring(c + 1, a.length)), [b, a] 75 } 76 77 function l(a) { 78 return function() { 79 return s && s.config && s.config[a] || {} 80 } 81 } 82 var m, n, o, p, q = {}, 83 r = {}, 84 s = {}, 85 t = {}, 86 u = Object.prototype.hasOwnProperty, 87 v = [].slice, 88 w = /\.js$/; 89 o = function(a, b) { 90 var c, d = k(a), 91 e = d[0]; 92 return a = d[1], e && (e = f(e, b), c = j(e)), e ? a = c && c.normalize ? c.normalize(a, h(b)) : f(a, b) : (a = f(a, b), d = k(a), e = d[0], a = d[1], e && (c = j(e))), { 93 f: e ? e + "!" + a : a, 94 n: a, 95 pr: e, 96 p: c 97 } 98 }, p = { 99 require: function(a) { 100 return g(a) 101 }, 102 exports: function(a) { 103 var b = q[a]; 104 return "undefined" != typeof b ? b : q[a] = {} 105 }, 106 module: function(a) { 107 return { 108 id: a, 109 uri: "", 110 exports: q[a], 111 config: l(a) 112 } 113 } 114 }, m = function(a, c, d, f) { 115 var h, k, l, m, n, s, u = [], 116 v = typeof d; 117 if (f = f || a, "undefined" === v || "function" === v) { 118 for (c = !c.length && d.length ? ["require", "exports", "module"] : c, n = 0; n < c.length; n += 1) 119 if (m = o(c[n], f), k = m.f, "require" === k) u[n] = p.require(a); 120 else if ("exports" === k) u[n] = p.exports(a), s = !0; 121 else if ("module" === k) h = u[n] = p.module(a); 122 else if (e(q, k) || e(r, k) || e(t, k)) u[n] = j(k); 123 else { 124 if (!m.p) throw new Error(a + " missing " + k); 125 m.p.load(m.n, g(f, !0), i(k), {}), u[n] = q[k] 126 } 127 l = d ? d.apply(q[a], u) : void 0, a && (h && h.exports !== b && h.exports !== q[a] ? q[a] = h.exports : l === b && s || (q[a] = l)) 128 } else a && (q[a] = d) 129 }, a = c = n = function(a, c, d, e, f) { 130 if ("string" == typeof a) return p[a] ? p[a](c) : j(o(a, c).f); 131 if (!a.splice) { 132 if (s = a, s.deps && n(s.deps, s.callback), !c) return; 133 c.splice ? (a = c, c = d, d = null) : a = b 134 } 135 return c = c || function() {}, "function" == typeof d && (d = e, e = f), e ? m(b, a, c, d) : setTimeout(function() { 136 m(b, a, c, d) 137 }, 4), n 138 }, n.config = function(a) { 139 return n(a) 140 }, a._defined = q, d = function(a, b, c) { 141 if ("string" != typeof a) throw new Error("See almond README: incorrect module build, no module name"); 142 b.splice || (c = b, b = []), e(q, a) || e(r, a) || (r[a] = [a, b, c]) 143 }, d.amd = { 144 jQuery: !0 145 } 146 }(), b.requirejs = a, b.require = c, b.define = d 147 } 148 }(), b.define("almond", function() {}), b.define("jquery", [], function() { 149 var b = a || $; 150 return null == b && 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."), b 151 }), b.define("select2/utils", ["jquery"], function(a) { 152 function b(a) { 153 var b = a.prototype, 154 c = []; 155 for (var d in b) { 156 var e = b[d]; 157 "function" == typeof e && "constructor" !== d && c.push(d) 158 } 159 return c 160 } 161 var c = {}; 162 c.Extend = function(a, b) { 163 function c() { 164 this.constructor = a 165 } 166 var d = {}.hasOwnProperty; 167 for (var e in b) d.call(b, e) && (a[e] = b[e]); 168 return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a 169 }, c.Decorate = function(a, c) { 170 function d() { 171 var b = Array.prototype.unshift, 172 d = c.prototype.constructor.length, 173 e = a.prototype.constructor; 174 d > 0 && (b.call(arguments, a.prototype.constructor), e = c.prototype.constructor), e.apply(this, arguments) 175 } 176 177 function e() { 178 this.constructor = d 179 } 180 var f = b(c), 181 g = b(a); 182 c.displayName = a.displayName, d.prototype = new e; 183 for (var h = 0; h < g.length; h++) { 184 var i = g[h]; 185 d.prototype[i] = a.prototype[i] 186 } 187 for (var j = (function(a) { 188 var b = function() {}; 189 a in d.prototype && (b = d.prototype[a]); 190 var e = c.prototype[a]; 191 return function() { 192 var a = Array.prototype.unshift; 193 return a.call(arguments, b), e.apply(this, arguments) 194 } 195 }), k = 0; k < f.length; k++) { 196 var l = f[k]; 197 d.prototype[l] = j(l) 198 } 199 return d 200 }; 201 var d = function() { 202 this.listeners = {} 203 }; 204 return d.prototype.on = function(a, b) { 205 this.listeners = this.listeners || {}, a in this.listeners ? this.listeners[a].push(b) : this.listeners[a] = [b] 206 }, d.prototype.trigger = function(a) { 207 var b = Array.prototype.slice, 208 c = b.call(arguments, 1); 209 this.listeners = this.listeners || {}, null == c && (c = []), 0 === c.length && c.push({}), c[0]._type = a, a in this.listeners && this.invoke(this.listeners[a], b.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments) 210 }, d.prototype.invoke = function(a, b) { 211 for (var c = 0, d = a.length; d > c; c++) a[c].apply(this, b) 212 }, c.Observable = d, c.generateChars = function(a) { 213 for (var b = "", c = 0; a > c; c++) { 214 var d = Math.floor(36 * Math.random()); 215 b += d.toString(36) 216 } 217 return b 218 }, c.bind = function(a, b) { 219 return function() { 220 a.apply(b, arguments) 221 } 222 }, c._convertData = function(a) { 223 for (var b in a) { 224 var c = b.split("-"), 225 d = a; 226 if (1 !== c.length) { 227 for (var e = 0; e < c.length; e++) { 228 var f = c[e]; 229 f = f.substring(0, 1).toLowerCase() + f.substring(1), f in d || (d[f] = {}), e == c.length - 1 && (d[f] = a[b]), d = d[f] 230 } 231 delete a[b] 232 } 233 } 234 return a 235 }, c.hasScroll = function(b, c) { 236 var d = a(c), 237 e = c.style.overflowX, 238 f = c.style.overflowY; 239 return e !== f || "hidden" !== f && "visible" !== f ? "scroll" === e || "scroll" === f ? !0 : d.innerHeight() < c.scrollHeight || d.innerWidth() < c.scrollWidth : !1 240 }, c.escapeMarkup = function(a) { 241 var b = { 242 "\\": "\", 243 "&": "&", 244 "<": "<", 245 ">": ">", 246 '"': """, 247 "'": "'", 248 "/": "/" 249 }; 250 return "string" != typeof a ? a : String(a).replace(/[&<>"'\/\\]/g, function(a) { 251 return b[a] 252 }) 253 }, c.appendMany = function(b, c) { 254 if ("1.7" === a.fn.jquery.substr(0, 3)) { 255 var d = a(); 256 a.map(c, function(a) { 257 d = d.add(a) 258 }), c = d 259 } 260 b.append(c) 261 }, c 262 }), b.define("select2/results", ["jquery", "./utils"], function(a, b) { 263 function c(a, b, d) { 264 this.$element = a, this.data = d, this.options = b, c.__super__.constructor.call(this) 265 } 266 return b.Extend(c, b.Observable), c.prototype.render = function() { 267 var b = a('<ul class="select2-results__options" role="tree"></ul>'); 268 return this.options.get("multiple") && b.attr("aria-multiselectable", "true"), this.$results = b, b 269 }, c.prototype.clear = function() { 270 this.$results.empty() 271 }, c.prototype.displayMessage = function(b) { 272 var c = this.options.get("escapeMarkup"); 273 this.clear(), this.hideLoading(); 274 var d = a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'), 275 e = this.options.get("translations").get(b.message); 276 d.append(c(e(b.args))), d[0].className += " select2-results__message", this.$results.append(d) 277 }, c.prototype.hideMessages = function() { 278 this.$results.find(".select2-results__message").remove() 279 }, c.prototype.append = function(a) { 280 this.hideLoading(); 281 var b = []; 282 if (null == a.results || 0 === a.results.length) return void(0 === this.$results.children().length && this.trigger("results:message", { 283 message: "noResults" 284 })); 285 a.results = this.sort(a.results); 286 for (var c = 0; c < a.results.length; c++) { 287 var d = a.results[c], 288 e = this.option(d); 289 b.push(e) 290 } 291 this.$results.append(b) 292 }, c.prototype.position = function(a, b) { 293 var c = b.find(".select2-results"); 294 c.append(a) 295 }, c.prototype.sort = function(a) { 296 var b = this.options.get("sorter"); 297 return b(a) 298 }, c.prototype.highlightFirstItem = function() { 299 var a = this.$results.find(".select2-results__option[aria-selected]"), 300 b = a.filter("[aria-selected=true]"); 301 b.length > 0 ? b.first().trigger("mouseenter") : a.first().trigger("mouseenter"), this.ensureHighlightVisible() 302 }, c.prototype.setClasses = function() { 303 var b = this; 304 this.data.current(function(c) { 305 var d = a.map(c, function(a) { 306 return a.id.toString() 307 }), 308 e = b.$results.find(".select2-results__option[aria-selected]"); 309 e.each(function() { 310 var b = a(this), 311 c = a.data(this, "data"), 312 e = "" + c.id; 313 null != c.element && c.element.selected || null == c.element && a.inArray(e, d) > -1 ? b.attr("aria-selected", "true") : b.attr("aria-selected", "false") 314 }) 315 }) 316 }, c.prototype.showLoading = function(a) { 317 this.hideLoading(); 318 var b = this.options.get("translations").get("searching"), 319 c = { 320 disabled: !0, 321 loading: !0, 322 text: b(a) 323 }, 324 d = this.option(c); 325 d.className += " loading-results", this.$results.prepend(d) 326 }, c.prototype.hideLoading = function() { 327 this.$results.find(".loading-results").remove() 328 }, c.prototype.option = function(b) { 329 var c = document.createElement("li"); 330 c.className = "select2-results__option"; 331 var d = { 332 role: "treeitem", 333 "aria-selected": "false" 334 }; 335 b.disabled && (delete d["aria-selected"], d["aria-disabled"] = "true"), null == b.id && delete d["aria-selected"], null != b._resultId && (c.id = b._resultId), b.title && (c.title = b.title), b.children && (d.role = "group", d["aria-label"] = b.text, delete d["aria-selected"]); 336 for (var e in d) { 337 var f = d[e]; 338 c.setAttribute(e, f) 339 } 340 if (b.children) { 341 var g = a(c), 342 h = document.createElement("strong"); 343 h.className = "select2-results__group"; 344 a(h); 345 this.template(b, h); 346 for (var i = [], j = 0; j < b.children.length; j++) { 347 var k = b.children[j], 348 l = this.option(k); 349 i.push(l) 350 } 351 var m = a("<ul></ul>", { 352 "class": "select2-results__options select2-results__options--nested" 353 }); 354 m.append(i), g.append(h), g.append(m) 355 } else this.template(b, c); 356 return a.data(c, "data", b), c 357 }, c.prototype.bind = function(b, c) { 358 var d = this, 359 e = b.id + "-results"; 360 this.$results.attr("id", e), b.on("results:all", function(a) { 361 d.clear(), d.append(a.data), b.isOpen() && (d.setClasses(), d.highlightFirstItem()) 362 }), b.on("results:append", function(a) { 363 d.append(a.data), b.isOpen() && d.setClasses() 364 }), b.on("query", function(a) { 365 d.hideMessages(), d.showLoading(a) 366 }), b.on("select", function() { 367 b.isOpen() && (d.setClasses(), d.highlightFirstItem()) 368 }), b.on("unselect", function() { 369 b.isOpen() && (d.setClasses(), d.highlightFirstItem()) 370 }), b.on("open", function() { 371 d.$results.attr("aria-expanded", "true"), d.$results.attr("aria-hidden", "false"), d.setClasses(), d.ensureHighlightVisible() 372 }), b.on("close", function() { 373 d.$results.attr("aria-expanded", "false"), d.$results.attr("aria-hidden", "true"), d.$results.removeAttr("aria-activedescendant") 374 }), b.on("results:toggle", function() { 375 var a = d.getHighlightedResults(); 376 0 !== a.length && a.trigger("mouseup") 377 }), b.on("results:select", function() { 378 var a = d.getHighlightedResults(); 379 if (0 !== a.length) { 380 var b = a.data("data"); 381 "true" == a.attr("aria-selected") ? d.trigger("close", {}) : d.trigger("select", { 382 data: b 383 }) 384 } 385 }), b.on("results:previous", function() { 386 var a = d.getHighlightedResults(), 387 b = d.$results.find("[aria-selected]"), 388 c = b.index(a); 389 if (0 !== c) { 390 var e = c - 1; 391 0 === a.length && (e = 0); 392 var f = b.eq(e); 393 f.trigger("mouseenter"); 394 var g = d.$results.offset().top, 395 h = f.offset().top, 396 i = d.$results.scrollTop() + (h - g); 397 0 === e ? d.$results.scrollTop(0) : 0 > h - g && d.$results.scrollTop(i) 398 } 399 }), b.on("results:next", function() { 400 var a = d.getHighlightedResults(), 401 b = d.$results.find("[aria-selected]"), 402 c = b.index(a), 403 e = c + 1; 404 if (!(e >= b.length)) { 405 var f = b.eq(e); 406 f.trigger("mouseenter"); 407 var g = d.$results.offset().top + d.$results.outerHeight(!1), 408 h = f.offset().top + f.outerHeight(!1), 409 i = d.$results.scrollTop() + h - g; 410 0 === e ? d.$results.scrollTop(0) : h > g && d.$results.scrollTop(i) 411 } 412 }), b.on("results:focus", function(a) { 413 a.element.addClass("select2-results__option--highlighted") 414 }), b.on("results:message", function(a) { 415 d.displayMessage(a) 416 }), a.fn.mousewheel && this.$results.on("mousewheel", function(a) { 417 var b = d.$results.scrollTop(), 418 c = d.$results.get(0).scrollHeight - b + a.deltaY, 419 e = a.deltaY > 0 && b - a.deltaY <= 0, 420 f = a.deltaY < 0 && c <= d.$results.height(); 421 e ? (d.$results.scrollTop(0), a.preventDefault(), a.stopPropagation()) : f && (d.$results.scrollTop(d.$results.get(0).scrollHeight - d.$results.height()), a.preventDefault(), a.stopPropagation()) 422 }), this.$results.on("mouseup", ".select2-results__option[aria-selected]", function(b) { 423 var c = a(this), 424 e = c.data("data"); 425 return "true" === c.attr("aria-selected") ? void(d.options.get("multiple") ? d.trigger("unselect", { 426 originalEvent: b, 427 data: e 428 }) : d.trigger("close", {})) : void d.trigger("select", { 429 originalEvent: b, 430 data: e 431 }) 432 }), this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function(b) { 433 var c = a(this).data("data"); 434 d.getHighlightedResults().removeClass("select2-results__option--highlighted"), d.trigger("results:focus", { 435 data: c, 436 element: a(this) 437 }) 438 }) 439 }, c.prototype.getHighlightedResults = function() { 440 var a = this.$results.find(".select2-results__option--highlighted"); 441 return a 442 }, c.prototype.destroy = function() { 443 this.$results.remove() 444 }, c.prototype.ensureHighlightVisible = function() { 445 var a = this.getHighlightedResults(); 446 if (0 !== a.length) { 447 var b = this.$results.find("[aria-selected]"), 448 c = b.index(a), 449 d = this.$results.offset().top, 450 e = a.offset().top, 451 f = this.$results.scrollTop() + (e - d), 452 g = e - d; 453 f -= 2 * a.outerHeight(!1), 2 >= c ? this.$results.scrollTop(0) : (g > this.$results.outerHeight() || 0 > g) && this.$results.scrollTop(f) 454 } 455 }, c.prototype.template = function(b, c) { 456 var d = this.options.get("templateResult"), 457 e = this.options.get("escapeMarkup"), 458 f = d(b, c); 459 null == f ? c.style.display = "none" : "string" == typeof f ? c.innerHTML = e(f) : a(c).append(f) 460 }, c 461 }), b.define("select2/keys", [], function() { 462 var a = { 463 BACKSPACE: 8, 464 TAB: 9, 465 ENTER: 13, 466 SHIFT: 16, 467 CTRL: 17, 468 ALT: 18, 469 ESC: 27, 470 SPACE: 32, 471 PAGE_UP: 33, 472 PAGE_DOWN: 34, 473 END: 35, 474 HOME: 36, 475 LEFT: 37, 476 UP: 38, 477 RIGHT: 39, 478 DOWN: 40, 479 DELETE: 46 480 }; 481 return a 482 }), b.define("select2/selection/base", ["jquery", "../utils", "../keys"], function(a, b, c) { 483 function d(a, b) { 484 this.$element = a, this.options = b, d.__super__.constructor.call(this) 485 } 486 return b.Extend(d, b.Observable), d.prototype.render = function() { 487 var b = a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>'); 488 return this._tabindex = 0, null != this.$element.data("old-tabindex") ? this._tabindex = this.$element.data("old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), b.attr("title", this.$element.attr("title")), b.attr("tabindex", this._tabindex), this.$selection = b, b 489 }, d.prototype.bind = function(a, b) { 490 var d = this, 491 e = (a.id + "-container", a.id + "-results"); 492 this.container = a, this.$selection.on("focus", function(a) { 493 d.trigger("focus", a) 494 }), this.$selection.on("blur", function(a) { 495 d._handleBlur(a) 496 }), this.$selection.on("keydown", function(a) { 497 d.trigger("keypress", a), a.which === c.SPACE && a.preventDefault() 498 }), a.on("results:focus", function(a) { 499 d.$selection.attr("aria-activedescendant", a.data._resultId) 500 }), a.on("selection:update", function(a) { 501 d.update(a.data) 502 }), a.on("open", function() { 503 d.$selection.attr("aria-expanded", "true"), d.$selection.attr("aria-owns", e), d._attachCloseHandler(a) 504 }), a.on("close", function() { 505 d.$selection.attr("aria-expanded", "false"), d.$selection.removeAttr("aria-activedescendant"), d.$selection.removeAttr("aria-owns"), d.$selection.focus(), d._detachCloseHandler(a) 506 }), a.on("enable", function() { 507 d.$selection.attr("tabindex", d._tabindex) 508 }), a.on("disable", function() { 509 d.$selection.attr("tabindex", "-1") 510 }) 511 }, d.prototype._handleBlur = function(b) { 512 var c = this; 513 window.setTimeout(function() { 514 document.activeElement == c.$selection[0] || a.contains(c.$selection[0], document.activeElement) || c.trigger("blur", b) 515 }, 1) 516 }, d.prototype._attachCloseHandler = function(b) { 517 a(document.body).on("mousedown.select2." + b.id, function(b) { 518 var c = a(b.target), 519 d = c.closest(".select2"), 520 e = a(".select2.select2-container--open"); 521 e.each(function() { 522 var b = a(this); 523 if (this != d[0]) { 524 var c = b.data("element"); 525 c.select2("close") 526 } 527 }) 528 }) 529 }, d.prototype._detachCloseHandler = function(b) { 530 a(document.body).off("mousedown.select2." + b.id) 531 }, d.prototype.position = function(a, b) { 532 var c = b.find(".selection"); 533 c.append(a) 534 }, d.prototype.destroy = function() { 535 this._detachCloseHandler(this.container) 536 }, d.prototype.update = function(a) { 537 throw new Error("The `update` method must be defined in child classes.") 538 }, d 539 }), b.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function(a, b, c, d) { 540 function e() { 541 e.__super__.constructor.apply(this, arguments) 542 } 543 return c.Extend(e, b), e.prototype.render = function() { 544 var a = e.__super__.render.call(this); 545 return a.addClass("select2-selection--single"), a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'), a 546 }, e.prototype.bind = function(a, b) { 547 var c = this; 548 e.__super__.bind.apply(this, arguments); 549 var d = a.id + "-container"; 550 this.$selection.find(".select2-selection__rendered").attr("id", d), this.$selection.attr("aria-labelledby", d), this.$selection.on("mousedown", function(a) { 551 1 === a.which && c.trigger("toggle", { 552 originalEvent: a 553 }) 554 }), this.$selection.on("focus", function(a) {}), this.$selection.on("blur", function(a) {}), a.on("focus", function(b) { 555 a.isOpen() || c.$selection.focus() 556 }), a.on("selection:update", function(a) { 557 c.update(a.data) 558 }) 559 }, e.prototype.clear = function() { 560 this.$selection.find(".select2-selection__rendered").empty() 561 }, e.prototype.display = function(a, b) { 562 var c = this.options.get("templateSelection"), 563 d = this.options.get("escapeMarkup"); 564 return d(c(a, b)) 565 }, e.prototype.selectionContainer = function() { 566 return a("<span></span>") 567 }, e.prototype.update = function(a) { 568 if (0 === a.length) return void this.clear(); 569 var b = a[0], 570 c = this.$selection.find(".select2-selection__rendered"), 571 d = this.display(b, c); 572 c.empty().append(d), c.prop("title", b.title || b.text) 573 }, e 574 }), b.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function(a, b, c) { 575 function d(a, b) { 576 d.__super__.constructor.apply(this, arguments) 577 } 578 return c.Extend(d, b), d.prototype.render = function() { 579 var a = d.__super__.render.call(this); 580 return a.addClass("select2-selection--multiple"), a.html('<ul class="select2-selection__rendered"></ul>'), a 581 }, d.prototype.bind = function(b, c) { 582 var e = this; 583 d.__super__.bind.apply(this, arguments), this.$selection.on("click", function(a) { 584 e.trigger("toggle", { 585 originalEvent: a 586 }) 587 }), this.$selection.on("click", ".select2-selection__choice__remove", function(b) { 588 if (!e.options.get("disabled")) { 589 var c = a(this), 590 d = c.parent(), 591 f = d.data("data"); 592 e.trigger("unselect", { 593 originalEvent: b, 594 data: f 595 }) 596 } 597 }) 598 }, d.prototype.clear = function() { 599 this.$selection.find(".select2-selection__rendered").empty() 600 }, d.prototype.display = function(a, b) { 601 var c = this.options.get("templateSelection"), 602 d = this.options.get("escapeMarkup"); 603 return d(c(a, b)) 604 }, d.prototype.selectionContainer = function() { 605 var b = a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>'); 606 return b 607 }, d.prototype.update = function(a) { 608 if (this.clear(), 0 !== a.length) { 609 for (var b = [], d = 0; d < a.length; d++) { 610 var e = a[d], 611 f = this.selectionContainer(), 612 g = this.display(e, f); 613 f.append(g), f.prop("title", e.title || e.text), f.data("data", e), b.push(f) 614 } 615 var h = this.$selection.find(".select2-selection__rendered"); 616 c.appendMany(h, b) 617 } 618 }, d 619 }), b.define("select2/selection/placeholder", ["../utils"], function(a) { 620 function b(a, b, c) { 621 this.placeholder = this.normalizePlaceholder(c.get("placeholder")), a.call(this, b, c) 622 } 623 return b.prototype.normalizePlaceholder = function(a, b) { 624 return "string" == typeof b && (b = { 625 id: "", 626 text: b 627 }), b 628 }, b.prototype.createPlaceholder = function(a, b) { 629 var c = this.selectionContainer(); 630 return c.html(this.display(b)), c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), c 631 }, b.prototype.update = function(a, b) { 632 var c = 1 == b.length && b[0].id != this.placeholder.id, 633 d = b.length > 1; 634 if (d || c) return a.call(this, b); 635 this.clear(); 636 var e = this.createPlaceholder(this.placeholder); 637 this.$selection.find(".select2-selection__rendered").append(e) 638 }, b 639 }), b.define("select2/selection/allowClear", ["jquery", "../keys"], function(a, b) { 640 function c() {} 641 return c.prototype.bind = function(a, b, c) { 642 var d = this; 643 a.call(this, b, c), 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(a) { 644 d._handleClear(a) 645 }), b.on("keypress", function(a) { 646 d._handleKeyboardClear(a, b) 647 }) 648 }, c.prototype._handleClear = function(a, b) { 649 if (!this.options.get("disabled")) { 650 var c = this.$selection.find(".select2-selection__clear"); 651 if (0 !== c.length) { 652 b.stopPropagation(); 653 for (var d = c.data("data"), e = 0; e < d.length; e++) { 654 var f = { 655 data: d[e] 656 }; 657 if (this.trigger("unselect", f), f.prevented) return 658 } 659 this.$element.val(this.placeholder.id).trigger("change"), this.trigger("toggle", {}) 660 } 661 } 662 }, c.prototype._handleKeyboardClear = function(a, c, d) { 663 d.isOpen() || (c.which == b.DELETE || c.which == b.BACKSPACE) && this._handleClear(c) 664 }, c.prototype.update = function(b, c) { 665 if (b.call(this, c), !(this.$selection.find(".select2-selection__placeholder").length > 0 || 0 === c.length)) { 666 var d = a('<span class="select2-selection__clear">×</span>'); 667 d.data("data", c), this.$selection.find(".select2-selection__rendered").prepend(d) 668 } 669 }, c 670 }), b.define("select2/selection/search", ["jquery", "../utils", "../keys"], function(a, b, c) { 671 function d(a, b, c) { 672 a.call(this, b, c) 673 } 674 return d.prototype.render = function(b) { 675 var c = a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>'); 676 this.$searchContainer = c, this.$search = c.find("input"); 677 var d = b.call(this); 678 return this._transferTabIndex(), d 679 }, d.prototype.bind = function(a, b, d) { 680 var e = this; 681 a.call(this, b, d), b.on("open", function() { 682 e.$search.trigger("focus") 683 }), b.on("close", function() { 684 e.$search.val(""), e.$search.removeAttr("aria-activedescendant"), e.$search.trigger("focus") 685 }), b.on("enable", function() { 686 e.$search.prop("disabled", !1), e._transferTabIndex() 687 }), b.on("disable", function() { 688 e.$search.prop("disabled", !0) 689 }), b.on("focus", function(a) { 690 e.$search.trigger("focus") 691 }), b.on("results:focus", function(a) { 692 e.$search.attr("aria-activedescendant", a.id) 693 }), this.$selection.on("focusin", ".select2-search--inline", function(a) { 694 e.trigger("focus", a) 695 }), this.$selection.on("focusout", ".select2-search--inline", function(a) { 696 e._handleBlur(a) 697 }), this.$selection.on("keydown", ".select2-search--inline", function(a) { 698 a.stopPropagation(), e.trigger("keypress", a), e._keyUpPrevented = a.isDefaultPrevented(); 699 var b = a.which; 700 if (b === c.BACKSPACE && "" === e.$search.val()) { 701 var d = e.$searchContainer.prev(".select2-selection__choice"); 702 if (d.length > 0) { 703 var f = d.data("data"); 704 e.searchRemoveChoice(f), a.preventDefault() 705 } 706 } 707 }); 708 var f = document.documentMode, 709 g = f && 11 >= f; 710 this.$selection.on("input.searchcheck", ".select2-search--inline", function(a) { 711 return g ? void e.$selection.off("input.search input.searchcheck") : void e.$selection.off("keyup.search") 712 }), this.$selection.on("keyup.search input.search", ".select2-search--inline", function(a) { 713 if (g && "input" === a.type) return void e.$selection.off("input.search input.searchcheck"); 714 var b = a.which; 715 b != c.SHIFT && b != c.CTRL && b != c.ALT && b != c.TAB && e.handleSearch(a) 716 }) 717 }, d.prototype._transferTabIndex = function(a) { 718 this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1") 719 }, d.prototype.createPlaceholder = function(a, b) { 720 this.$search.attr("placeholder", b.text) 721 }, d.prototype.update = function(a, b) { 722 var c = this.$search[0] == document.activeElement; 723 this.$search.attr("placeholder", ""), a.call(this, b), this.$selection.find(".select2-selection__rendered").append(this.$searchContainer), this.resizeSearch(), c && this.$search.focus() 724 }, d.prototype.handleSearch = function() { 725 if (this.resizeSearch(), !this._keyUpPrevented) { 726 var a = this.$search.val(); 727 this.trigger("query", { 728 term: a 729 }) 730 } 731 this._keyUpPrevented = !1 732 }, d.prototype.searchRemoveChoice = function(a, b) { 733 this.trigger("unselect", { 734 data: b 735 }), this.$search.val(b.text), this.handleSearch() 736 }, d.prototype.resizeSearch = function() { 737 this.$search.css("width", "25px"); 738 var a = ""; 739 if ("" !== this.$search.attr("placeholder")) a = this.$selection.find(".select2-selection__rendered").innerWidth(); 740 else { 741 var b = this.$search.val().length + 1; 742 a = .75 * b + "em" 743 } 744 this.$search.css("width", a) 745 }, d 746 }), b.define("select2/selection/eventRelay", ["jquery"], function(a) { 747 function b() {} 748 return b.prototype.bind = function(b, c, d) { 749 var e = this, 750 f = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting"], 751 g = ["opening", "closing", "selecting", "unselecting"]; 752 b.call(this, c, d), c.on("*", function(b, c) { 753 if (-1 !== a.inArray(b, f)) { 754 c = c || {}; 755 var d = a.Event("select2:" + b, { 756 params: c 757 }); 758 e.$element.trigger(d), -1 !== a.inArray(b, g) && (c.prevented = d.isDefaultPrevented()) 759 } 760 }) 761 }, b 762 }), b.define("select2/translation", ["jquery", "require"], function(a, b) { 763 function c(a) { 764 this.dict = a || {} 765 } 766 return c.prototype.all = function() { 767 return this.dict 768 }, c.prototype.get = function(a) { 769 return this.dict[a] 770 }, c.prototype.extend = function(b) { 771 this.dict = a.extend({}, b.all(), this.dict) 772 }, c._cache = {}, c.loadPath = function(a) { 773 if (!(a in c._cache)) { 774 var d = b(a); 775 c._cache[a] = d 776 } 777 return new c(c._cache[a]) 778 }, c 779 }), b.define("select2/diacritics", [], function() { 780 var a = { 781 "â¶": "A", 782 "A": "A", 783 "Ã": "A", 784 "Ã": "A", 785 "Ã": "A", 786 "Ầ": "A", 787 "Ấ": "A", 788 "Ẫ": "A", 789 "Ẩ": "A", 790 "Ã": "A", 791 "Ä": "A", 792 "Ä": "A",
793 "Ằ": "A", 794 "Ắ": "A", 795 "Ẵ": "A", 796 "Ẳ": "A", 797 "Ȧ": "A", 798 "Ç ": "A", 799 "Ã": "A", 800 "Ç": "A", 801 "Ả": "A", 802 "à ": "A", 803 "Ǻ": "A", 804 "Ç": "A", 805 "È": "A", 806 "È": "A", 807 "Ạ": "A", 808 "Ậ": "A", 809 "Ặ": "A", 810 "á¸": "A", 811 "Ä": "A", 812 "Ⱥ": "A", 813 "Ɐ": "A", 814 "ê²": "AA", 815 "Ã": "AE", 816 "Ǽ": "AE", 817 "Ç¢": "AE", 818 "ê´": "AO", 819 "ê¶": "AU", 820 "ê¸": "AV", 821 "êº": "AV", 822 "ê¼": "AY", 823 "â·": "B", 824 "ï¼¢": "B", 825 "á¸": "B", 826 "á¸": "B", 827 "á¸": "B", 828 "É": "B", 829 "Æ": "B", 830 "Æ": "B", 831 "â¸": "C", 832 "ï¼£": "C", 833 "Ä": "C", 834 "Ä": "C", 835 "Ä": "C", 836 "Ä": "C", 837 "Ã": "C", 838 "á¸": "C", 839 "Æ": "C", 840 "È»": "C", 841 "ê¾": "C", 842 "â¹": "D", 843 "D": "D", 844 "á¸": "D", 845 "Ä": "D", 846 "á¸": "D", 847 "á¸": "D", 848 "á¸": "D", 849 "á¸": "D", 850 "Ä": "D", 851 "Æ": "D", 852 "Æ": "D", 853 "Æ": "D", 854 "ê¹": "D", 855 "DZ": "DZ", 856 "Ç": "DZ", 857 "Dz": "Dz", 858 "Ç ": "Dz", 859 "âº": "E", 860 "ï¼¥": "E", 861 "Ã": "E", 862 "Ã": "E", 863 "Ã": "E", 864 "á»": "E", 865 "Ế": "E", 866 "á»": "E", 867 "á»": "E", 868 "Ẽ": "E", 869 "Ä": "E", 870 "á¸": "E", 871 "á¸": "E", 872 "Ä": "E", 873 "Ä": "E", 874 "Ã": "E", 875 "Ẻ": "E", 876 "Ä": "E", 877 "È": "E", 878 "È": "E", 879 "Ẹ": "E", 880 "á»": "E", 881 "Ȩ": "E", 882 "á¸": "E", 883 "Ä": "E", 884 "á¸": "E", 885 "á¸": "E", 886 "Æ": "E", 887 "Æ": "E", 888 "â»": "F", 889 "F": "F", 890 "á¸": "F", 891 "Æ": "F", 892 "ê»": "F", 893 "â¼": "G", 894 "ï¼§": "G", 895 "Ç´": "G", 896 "Ä": "G", 897 "Ḡ": "G", 898 "Ä": "G", 899 "Ä ": "G", 900 "Ǧ": "G", 901 "Ä¢": "G", 902 "Ǥ": "G", 903 "Æ": "G", 904 "ê ": "G", 905 "ê½": "G", 906 "ê¾": "G", 907 "â½": "H", 908 "H": "H", 909 "Ĥ": "H", 910 "Ḣ": "H", 911 "Ḧ": "H", 912 "È": "H", 913 "Ḥ": "H", 914 "Ḩ": "H", 915 "Ḫ": "H", 916 "Ħ": "H", 917 "â±§": "H", 918 "â±µ": "H", 919 "ê": "H", 920 "â¾": "I", 921 "I": "I", 922 "Ã": "I", 923 "Ã": "I", 924 "Ã": "I", 925 "Ĩ": "I", 926 "Ī": "I", 927 "Ĭ": "I", 928 "İ": "I", 929 "Ã": "I", 930 "Ḯ": "I", 931 "á»": "I", 932 "Ç": "I", 933 "È": "I", 934 "È": "I", 935 "á»": "I", 936 "Ä®": "I", 937 "Ḭ": "I", 938 "Æ": "I", 939 "â¿": "J", 940 "J": "J", 941 "Ä´": "J", 942 "É": "J", 943 "â": "K", 944 "K": "K", 945 "Ḱ": "K", 946 "Ǩ": "K", 947 "Ḳ": "K", 948 "Ķ": "K", 949 "Ḵ": "K", 950 "Æ": "K", 951 "Ⱪ": "K", 952 "ê": "K", 953 "ê": "K", 954 "ê": "K", 955 "ê¢": "K", 956 "â": "L", 957 "L": "L", 958 "Ä¿": "L", 959 "Ĺ": "L", 960 "Ľ": "L", 961 "Ḷ": "L", 962 "Ḹ": "L", 963 "Ä»": "L", 964 "Ḽ": "L", 965 "Ḻ": "L", 966 "Å": "L", 967 "Ƚ": "L", 968 "â±¢": "L", 969 "â± ": "L", 970 "ê": "L", 971 "ê": "L", 972 "ê": "L", 973 "Ç": "LJ", 974 "Ç": "Lj", 975 "â": "M", 976 "ï¼": "M", 977 "Ḿ": "M", 978 "á¹": "M", 979 "á¹": "M", 980 "â±®": "M", 981 "Æ": "M", 982 "â": "N", 983 "ï¼®": "N", 984 "Ǹ": "N", 985 "Å": "N", 986 "Ã": "N", 987 "á¹": "N", 988 "Å": "N", 989 "á¹": "N", 990 "Å ": "N", 991 "á¹": "N", 992 "á¹": "N", 993 "È ": "N", 994 "Æ": "N", 995 "ê": "N", 996 "ê¤": "N", 997 "Ç": "NJ", 998 "Ç": "Nj", 999 "â": "O", 1000 "O": "O", 1001 "Ã": "O", 1002 "Ã": "O", 1003 "Ã": "O", 1004 "á»": "O", 1005 "á»": "O", 1006 "á»": "O", 1007 "á»": "O", 1008 "Ã": "O", 1009 "á¹": "O", 1010 "Ȭ": "O", 1011 "á¹": "O", 1012 "Å": "O", 1013 "á¹": "O", 1014 "á¹": "O", 1015 "Å": "O", 1016 "È®": "O", 1017 "Ȱ": "O", 1018 "Ã": "O", 1019 "Ȫ": "O", 1020 "á»": "O", 1021 "Å": "O", 1022 "Ç": "O", 1023 "È": "O", 1024 "È": "O", 1025 "Æ ": "O", 1026 "á»": "O", 1027 "á»": "O", 1028 "á» ": "O", 1029 "á»": "O", 1030 "Ợ": "O", 1031 "á»": "O", 1032 "á»": "O", 1033 "Ǫ": "O", 1034 "Ǭ": "O", 1035 "Ã": "O", 1036 "Ǿ": "O", 1037 "Æ": "O", 1038 "Æ": "O", 1039 "ê": "O", 1040 "ê": "O", 1041 "Æ¢": "OI", 1042 "ê": "OO", 1043 "È¢": "OU", 1044 "â ": "P", 1045 "ï¼°": "P", 1046 "á¹": "P", 1047 "á¹": "P", 1048 "Ƥ": "P", 1049 "â±£": "P", 1050 "ê": "P", 1051 "ê": "P", 1052 "ê": "P", 1053 "â": "Q", 1054 "ï¼±": "Q", 1055 "ê": "Q", 1056 "ê": "Q", 1057 "É": "Q", 1058 "â": "R", 1059 "ï¼²": "R", 1060 "Å": "R", 1061 "á¹": "R", 1062 "Å": "R", 1063 "È": "R", 1064 "È": "R", 1065 "á¹": "R", 1066 "á¹": "R", 1067 "Å": "R", 1068 "á¹": "R", 1069 "É": "R", 1070 "Ɽ": "R", 1071 "ê": "R", 1072 "ê¦": "R", 1073 "ê": "R", 1074 "â": "S", 1075 "ï¼³": "S", 1076 "áº": "S", 1077 "Å": "S", 1078 "Ṥ": "S", 1079 "Å": "S", 1080 "á¹ ": "S", 1081 "Å ": "S", 1082 "Ṧ": "S", 1083 "á¹¢": "S", 1084 "Ṩ": "S", 1085 "È": "S", 1086 "Å": "S", 1087 "â±¾": "S", 1088 "ê¨": "S", 1089 "ê": "S", 1090 "â": "T", 1091 "ï¼´": "T", 1092 "Ṫ": "T",
1093 "Ť": "T", 1094 "Ṭ": "T", 1095 "È": "T", 1096 "Å¢": "T", 1097 "á¹°": "T", 1098 "á¹®": "T", 1099 "Ŧ": "T", 1100 "Ƭ": "T", 1101 "Æ®": "T", 1102 "Ⱦ": "T", 1103 "ê": "T", 1104 "ê¨": "TZ", 1105 "â": "U", 1106 "ï¼µ": "U", 1107 "Ã": "U", 1108 "Ã": "U", 1109 "Ã": "U", 1110 "Ũ": "U", 1111 "Ṹ": "U", 1112 "Ū": "U", 1113 "Ṻ": "U", 1114 "Ŭ": "U", 1115 "Ã": "U", 1116 "Ç": "U", 1117 "Ç": "U", 1118 "Ç": "U", 1119 "Ç": "U", 1120 "Ủ": "U", 1121 "Å®": "U", 1122 "Ű": "U", 1123 "Ç": "U", 1124 "È": "U", 1125 "È": "U", 1126 "Ư": "U", 1127 "Ừ": "U", 1128 "Ứ": "U", 1129 "á»®": "U", 1130 "Ử": "U", 1131 "á»°": "U", 1132 "Ụ": "U", 1133 "á¹²": "U", 1134 "Ų": "U", 1135 "á¹¶": "U", 1136 "á¹´": "U", 1137 "É": "U", 1138 "â": "V", 1139 "ï¼¶": "V", 1140 "á¹¼": "V", 1141 "á¹¾": "V", 1142 "Ʋ": "V", 1143 "ê": "V", 1144 "É ": "V", 1145 "ê ": "VY", 1146 "â": "W", 1147 "ï¼·": "W", 1148 "áº": "W", 1149 "áº": "W", 1150 "Å´": "W", 1151 "áº": "W", 1152 "áº": "W", 1153 "áº": "W", 1154 "â±²": "W", 1155 "â": "X", 1156 "X": "X", 1157 "áº": "X", 1158 "áº": "X", 1159 "â": "Y", 1160 "ï¼¹": "Y", 1161 "Ỳ": "Y", 1162 "Ã": "Y", 1163 "Ŷ": "Y", 1164 "Ỹ": "Y", 1165 "Ȳ": "Y", 1166 "áº": "Y", 1167 "Ÿ": "Y", 1168 "á»¶": "Y", 1169 "á»´": "Y", 1170 "Ƴ": "Y", 1171 "É": "Y", 1172 "Ỿ": "Y", 1173 "â": "Z", 1174 "Z": "Z", 1175 "Ź": "Z", 1176 "áº": "Z", 1177 "Å»": "Z", 1178 "Ž": "Z", 1179 "áº": "Z", 1180 "áº": "Z", 1181 "Ƶ": "Z", 1182 "Ȥ": "Z", 1183 "Ɀ": "Z", 1184 "Ⱬ": "Z", 1185 "ê¢": "Z", 1186 "â": "a", 1187 "ï½": "a", 1188 "áº": "a", 1189 "à ": "a", 1190 "á": "a", 1191 "â": "a", 1192 "ầ": "a", 1193 "ấ": "a", 1194 "ẫ": "a", 1195 "ẩ": "a", 1196 "ã": "a", 1197 "Ä": "a", 1198 "Ä": "a", 1199 "ằ": "a", 1200 "ắ": "a", 1201 "ẵ": "a", 1202 "ẳ": "a", 1203 "ȧ": "a", 1204 "Ç¡": "a", 1205 "ä": "a", 1206 "Ç": "a", 1207 "ả": "a", 1208 "Ã¥": "a", 1209 "Ç»": "a", 1210 "Ç": "a", 1211 "È": "a", 1212 "È": "a", 1213 "ạ": "a", 1214 "áº": "a", 1215 "ặ": "a", 1216 "á¸": "a", 1217 "Ä ": "a", 1218 "â±¥": "a", 1219 "É": "a", 1220 "ê³": "aa", 1221 "æ": "ae", 1222 "ǽ": "ae", 1223 "Ç£": "ae", 1224 "êµ": "ao", 1225 "ê·": "au", 1226 "ê¹": "av", 1227 "ê»": "av", 1228 "ê½": "ay", 1229 "â": "b", 1230 "ï½": "b", 1231 "á¸": "b", 1232 "Ḡ": "b", 1233 "á¸": "b", 1234 "Æ": "b", 1235 "Æ": "b", 1236 "É": "b", 1237 "â": "c", 1238 "ï½": "c", 1239 "Ä": "c", 1240 "Ä": "c", 1241 "Ä": "c", 1242 "Ä": "c", 1243 "ç": "c", 1244 "á¸": "c", 1245 "Æ": "c", 1246 "ȼ": "c", 1247 "ê¿": "c", 1248 "â": "c", 1249 "â": "d", 1250 "ï½": "d", 1251 "á¸": "d", 1252 "Ä": "d", 1253 "á¸": "d", 1254 "á¸": "d", 1255 "á¸": "d", 1256 "á¸": "d", 1257 "Ä": "d", 1258 "Æ": "d", 1259 "É": "d", 1260 "É": "d", 1261 "êº": "d", 1262 "dz": "dz", 1263 "Ç": "dz", 1264 "â": "e", 1265 "ï½ ": "e", 1266 "è": "e", 1267 "é": "e", 1268 "ê": "e", 1269 "á»": "e", 1270 "ế": "e", 1271 "á» ": "e", 1272 "á»": "e", 1273 "ẽ": "e", 1274 "Ä": "e", 1275 "á¸": "e", 1276 "á¸": "e", 1277 "Ä": "e", 1278 "Ä": "e", 1279 "ë": "e", 1280 "ẻ": "e", 1281 "Ä": "e", 1282 "È ": "e", 1283 "È": "e", 1284 "ẹ": "e", 1285 "á»": "e", 1286 "È©": "e", 1287 "á¸": "e", 1288 "Ä": "e", 1289 "á¸": "e", 1290 "á¸": "e", 1291 "É": "e", 1292 "É": "e", 1293 "Ç": "e", 1294 "â": "f", 1295 "ï½": "f", 1296 "á¸": "f", 1297 "Æ": "f", 1298 "ê¼": "f", 1299 "â": "g", 1300 "ï½": "g", 1301 "ǵ": "g", 1302 "Ä": "g", 1303 "ḡ": "g", 1304 "Ä": "g", 1305 "Ä¡": "g", 1306 "ǧ": "g", 1307 "Ä£": "g", 1308 "Ç¥": "g", 1309 "É ": "g", 1310 "ê¡": "g", 1311 "áµ¹": "g", 1312 "ê¿": "g", 1313 "â": "h", 1314 "ï½": "h", 1315 "Ä¥": "h", 1316 "ḣ": "h", 1317 "ḧ": "h", 1318 "È": "h", 1319 "ḥ": "h", 1320 "ḩ": "h", 1321 "ḫ": "h", 1322 "áº": "h", 1323 "ħ": "h", 1324 "ⱨ": "h", 1325 "â±¶": "h", 1326 "É¥": "h", 1327 "Æ": "hv", 1328 "â": "i", 1329 "ï½": "i", 1330 "ì": "i", 1331 "Ã": "i", 1332 "î": "i", 1333 "Ä©": "i", 1334 "Ä«": "i", 1335 "Ä": "i", 1336 "ï": "i", 1337 "ḯ": "i", 1338 "á»": "i", 1339 "Ç": "i", 1340 "È": "i", 1341 "È": "i", 1342 "á»": "i", 1343 "į": "i", 1344 "á¸": "i", 1345 "ɨ": "i", 1346 "ı": "i", 1347 "â": "j", 1348 "ï½": "j", 1349 "ĵ": "j", 1350 "ǰ": "j", 1351 "É": "j", 1352 "â": "k", 1353 "ï½": "k", 1354 "ḱ": "k", 1355 "Ç©": "k", 1356 "ḳ": "k", 1357 "Ä·": "k", 1358 "ḵ": "k", 1359 "Æ": "k", 1360 "ⱪ": "k", 1361 "ê": "k", 1362 "ê": "k", 1363 "ê ": "k", 1364 "ê£": "k", 1365 "â": "l", 1366 "ï½": "l", 1367 "Å": "l", 1368 "ĺ": "l", 1369 "ľ": "l", 1370 "ḷ": "l", 1371 "ḹ": "l", 1372 "ļ": "l", 1373 "ḽ": "l", 1374 "ḻ": "l", 1375 "Å¿": "l", 1376 "Å": "l", 1377 "Æ": "l", 1378 "É«": "l", 1379 "ⱡ": "l", 1380 "ê": "l", 1381 "ê": "l", 1382 "ê": "l", 1383 "Ç": "lj", 1384 "â": "m", 1385 "ï½": "m", 1386 "ḿ": "m", 1387 "á¹": "m", 1388 "á¹": "m", 1389 "ɱ": "m", 1390 "ɯ": "m", 1391 "â": "n", 1392 "ï½": "n", 1393 "ǹ": "n", 1394 "Å": "n", 1395 "ñ": "n", 1396 "á¹ ": "n", 1397 "Å": "n", 1398 "á¹": "n", 1399 "Å": "n", 1400 "á¹": "n", 1401 "á¹": "n", 1402 "Æ": "n", 1403 "ɲ": "n", 1404 "Å": "n", 1405 "ê": "n", 1406 "ê¥": "n", 1407 "Ç": "nj", 1408 "â": "o", 1409 "ï½": "o", 1410 "ò": "o", 1411 "ó": "o", 1412 "ô": "o", 1413 "á»": "o", 1414 "á»": "o", 1415 "á»": "o", 1416 "á»": "o", 1417 "õ": "o", 1418 "á¹": "o", 1419 "È": "o", 1420 "á¹": "o", 1421 "Å": "o", 1422 "á¹": "o", 1423 "á¹": "o", 1424 "Å": "o", 1425 "ȯ": "o", 1426 "ȱ": "o", 1427 "ö": "o", 1428 "È«": "o", 1429 "á»": "o", 1430 "Å": "o", 1431 "Ç": "o", 1432 "È": "o", 1433 "È": "o", 1434 "Æ¡": "o", 1435 "á»": "o", 1436 "á»": "o", 1437 "ỡ": "o", 1438 "á»": "o", 1439 "ợ": "o", 1440 "á»": "o", 1441 "á»": "o", 1442 "Ç«": "o", 1443 "Ç": "o", 1444 "ø": "o", 1445 "Ç¿": "o", 1446 "É": "o", 1447 "ê": "o", 1448 "ê": "o", 1449 "ɵ": "o", 1450 "Æ£": "oi", 1451 "È£": "ou", 1452 "ê": "oo", 1453 "â": "p", 1454 "ï½": "p", 1455 "á¹": "p", 1456 "á¹": "p", 1457 "Æ¥": "p", 1458 "áµ½": "p", 1459 "ê": "p", 1460 "ê": "p", 1461 "ê": "p", 1462 "â ": "q", 1463 "ï½": "q", 1464 "É": "q", 1465 "ê": "q", 1466 "ê": "q", 1467 "â¡": "r", 1468 "ï½": "r", 1469 "Å": "r", 1470 "á¹": "r", 1471 "Å": "r", 1472 "È": "r", 1473 "È": "r", 1474 "á¹": "r", 1475 "á¹": "r", 1476 "Å": "r", 1477 "á¹": "r", 1478 "É": "r", 1479 "ɽ": "r", 1480 "ê": "r", 1481 "ê§": "r", 1482 "ê": "r",
1483 "â¢": "s", 1484 "ï½": "s", 1485 "Ã": "s", 1486 "Å": "s", 1487 "á¹¥": "s", 1488 "Å": "s", 1489 "ṡ": "s", 1490 "Å¡": "s", 1491 "á¹§": "s", 1492 "á¹£": "s", 1493 "ṩ": "s", 1494 "È": "s", 1495 "Å": "s", 1496 "È¿": "s", 1497 "ê©": "s", 1498 "ê ": "s", 1499 "áº": "s", 1500 "â£": "t", 1501 "ï½": "t", 1502 "ṫ": "t", 1503 "áº": "t", 1504 "Å¥": "t", 1505 "á¹": "t", 1506 "È": "t", 1507 "Å£": "t", 1508 "á¹±": "t", 1509 "ṯ": "t", 1510 "ŧ": "t", 1511 "Æ": "t", 1512 "Ê": "t", 1513 "ⱦ": "t", 1514 "ê": "t", 1515 "ê©": "tz", 1516 "â¤": "u", 1517 "ï½": "u", 1518 "ù": "u", 1519 "ú": "u", 1520 "û": "u", 1521 "Å©": "u", 1522 "á¹¹": "u", 1523 "Å«": "u", 1524 "á¹»": "u", 1525 "Å": "u", 1526 "ü": "u", 1527 "Ç": "u", 1528 "Ç": "u", 1529 "Ç": "u", 1530 "Ç": "u", 1531 "á»§": "u",
vendor: 63,385 bytes, lines 1532-2585
1532 "ů": "u", 1533 "ű": "u", 1534 "Ç": "u", 1535 "È": "u", 1536 "È": "u", 1537 "ư": "u", 1538 "ừ": "u", 1539 "ứ": "u", 1540 "ữ": "u", 1541 "á»": "u", 1542 "á»±": "u", 1543 "ụ": "u", 1544 "á¹³": "u", 1545 "ų": "u", 1546 "á¹·": "u", 1547 "á¹µ": "u", 1548 "Ê": "u", 1549 "â¥": "v", 1550 "ï½": "v", 1551 "á¹½": "v", 1552 "ṿ": "v", 1553 "Ê": "v", 1554 "ê": "v", 1555 "Ê": "v", 1556 "ê¡": "vy", 1557 "â¦": "w", 1558 "ï½": "w", 1559 "áº": "w", 1560 "áº": "w", 1561 "ŵ": "w", 1562 "áº": "w", 1563 "Ạ": "w", 1564 "áº": "w", 1565 "áº": "w", 1566 "â±³": "w", 1567 "â§": "x", 1568 "ï½": "x", 1569 "áº": "x", 1570 "áº": "x", 1571 "â¨": "y", 1572 "ï½": "y", 1573 "ỳ": "y", 1574 "ý": "y", 1575 "Å·": "y", 1576 "ỹ": "y", 1577 "ȳ": "y", 1578 "áº": "y", 1579 "ÿ": "y", 1580 "á»·": "y", 1581 "áº": "y", 1582 "ỵ": "y", 1583 "Æ´": "y", 1584 "É": "y", 1585 "ỿ": "y", 1586 "â©": "z", 1587 "ï½": "z", 1588 "ź": "z", 1589 "áº": "z", 1590 "ż": "z", 1591 "ž": "z", 1592 "áº": "z", 1593 "áº": "z", 1594 "ƶ": "z", 1595 "È¥": "z", 1596 "É": "z", 1597 "ⱬ": "z", 1598 "ê£": "z", 1599 "Î": "Î", 1600 "Î": "Î", 1601 "Î": "Î", 1602 "Î": "Î", 1603 "Ϊ": "Î", 1604 "Î": "Î", 1605 "Î": "Î¥", 1606 "Ϋ": "Î¥", 1607 "Î": "Ω", 1608 "ά": "α", 1609 "Î": "ε", 1610 "ή": "η", 1611 "ί": "ι", 1612 "Ï": "ι", 1613 "Î": "ι", 1614 "Ï": "ο", 1615 "Ï": "Ï ", 1616 "Ï": "Ï ", 1617 "ΰ": "Ï ", 1618 "Ï": "Ï", 1619 "Ï": "Ï" 1620 }; 1621 return a 1622 }), b.define("select2/data/base", ["../utils"], function(a) { 1623 function b(a, c) { 1624 b.__super__.constructor.call(this) 1625 } 1626 return a.Extend(b, a.Observable), b.prototype.current = function(a) { 1627 throw new Error("The `current` method must be defined in child classes.") 1628 }, b.prototype.query = function(a, b) { 1629 throw new Error("The `query` method must be defined in child classes.") 1630 }, b.prototype.bind = function(a, b) {}, b.prototype.destroy = function() {}, b.prototype.generateResultId = function(b, c) { 1631 var d = b.id + "-result-"; 1632 return d += a.generateChars(4), d += null != c.id ? "-" + c.id.toString() : "-" + a.generateChars(4) 1633 }, b 1634 }), b.define("select2/data/select", ["./base", "../utils", "jquery"], function(a, b, c) { 1635 function d(a, b) { 1636 this.$element = a, this.options = b, d.__super__.constructor.call(this) 1637 } 1638 return b.Extend(d, a), d.prototype.current = function(a) { 1639 var b = [], 1640 d = this; 1641 this.$element.find(":selected").each(function() { 1642 var a = c(this), 1643 e = d.item(a); 1644 b.push(e) 1645 }), a(b) 1646 }, d.prototype.select = function(a) { 1647 var b = this; 1648 if (a.selected = !0, c(a.element).is("option")) return a.element.selected = !0, void this.$element.trigger("change"); 1649 if (this.$element.prop("multiple")) this.current(function(d) { 1650 var e = []; 1651 a = [a], a.push.apply(a, d); 1652 for (var f = 0; f < a.length; f++) { 1653 var g = a[f].id; - 1 === c.inArray(g, e) && e.push(g) 1654 } 1655 b.$element.val(e), b.$element.trigger("change") 1656 }); 1657 else { 1658 var d = a.id; 1659 this.$element.val(d), this.$element.trigger("change") 1660 } 1661 }, d.prototype.unselect = function(a) { 1662 var b = this; 1663 if (this.$element.prop("multiple")) return a.selected = !1, c(a.element).is("option") ? (a.element.selected = !1, void this.$element.trigger("change")) : void this.current(function(d) { 1664 for (var e = [], f = 0; f < d.length; f++) { 1665 var g = d[f].id; 1666 g !== a.id && -1 === c.inArray(g, e) && e.push(g) 1667 } 1668 b.$element.val(e), b.$element.trigger("change") 1669 }) 1670 }, d.prototype.bind = function(a, b) { 1671 var c = this; 1672 this.container = a, a.on("select", function(a) { 1673 c.select(a.data) 1674 }), a.on("unselect", function(a) { 1675 c.unselect(a.data) 1676 }) 1677 }, d.prototype.destroy = function() { 1678 this.$element.find("*").each(function() { 1679 c.removeData(this, "data") 1680 }) 1681 }, d.prototype.query = function(a, b) { 1682 var d = [], 1683 e = this, 1684 f = this.$element.children(); 1685 f.each(function() { 1686 var b = c(this); 1687 if (b.is("option") || b.is("optgroup")) { 1688 var f = e.item(b), 1689 g = e.matches(a, f); 1690 null !== g && d.push(g) 1691 } 1692 }), b({ 1693 results: d 1694 }) 1695 }, d.prototype.addOptions = function(a) { 1696 b.appendMany(this.$element, a) 1697 }, d.prototype.option = function(a) { 1698 var b; 1699 a.children ? (b = document.createElement("optgroup"), b.label = a.text) : (b = document.createElement("option"), void 0 !== b.textContent ? b.textContent = a.text : b.innerText = a.text), a.id && (b.value = a.id), a.disabled && (b.disabled = !0), a.selected && (b.selected = !0), a.title && (b.title = a.title); 1700 var d = c(b), 1701 e = this._normalizeItem(a); 1702 return e.element = b, c.data(b, "data", e), d 1703 }, d.prototype.item = function(a) { 1704 var b = {}; 1705 if (b = c.data(a[0], "data"), null != b) return b; 1706 if (a.is("option")) b = { 1707 id: a.val(), 1708 text: a.text(), 1709 disabled: a.prop("disabled"), 1710 selected: a.prop("selected"), 1711 title: a.prop("title") 1712 }; 1713 else if (a.is("optgroup")) { 1714 b = { 1715 text: a.prop("label"), 1716 children: [], 1717 title: a.prop("title") 1718 }; 1719 for (var d = a.children("option"), e = [], f = 0; f < d.length; f++) { 1720 var g = c(d[f]), 1721 h = this.item(g); 1722 e.push(h) 1723 } 1724 b.children = e 1725 } 1726 return b = this._normalizeItem(b), b.element = a[0], c.data(a[0], "data", b), b 1727 }, d.prototype._normalizeItem = function(a) { 1728 c.isPlainObject(a) || (a = { 1729 id: a, 1730 text: a 1731 }), a = c.extend({}, { 1732 text: "" 1733 }, a); 1734 var b = { 1735 selected: !1, 1736 disabled: !1 1737 }; 1738 return null != a.id && (a.id = a.id.toString()), null != a.text && (a.text = a.text.toString()), null == a._resultId && a.id && null != this.container && (a._resultId = this.generateResultId(this.container, a)), c.extend({}, b, a) 1739 }, d.prototype.matches = function(a, b) { 1740 var c = this.options.get("matcher"); 1741 return c(a, b) 1742 }, d 1743 }), b.define("select2/data/array", ["./select", "../utils", "jquery"], function(a, b, c) { 1744 function d(a, b) { 1745 var c = b.get("data") || []; 1746 d.__super__.constructor.call(this, a, b), this.addOptions(this.convertToOptions(c)) 1747 } 1748 return b.Extend(d, a), d.prototype.select = function(a) { 1749 var b = this.$element.find("option").filter(function(b, c) { 1750 return c.value == a.id.toString() 1751 }); 1752 0 === b.length && (b = this.option(a), this.addOptions(b)), d.__super__.select.call(this, a) 1753 }, d.prototype.convertToOptions = function(a) { 1754 function d(a) { 1755 return function() { 1756 return c(this).val() == a.id 1757 } 1758 } 1759 for (var e = this, f = this.$element.find("option"), g = f.map(function() { 1760 return e.item(c(this)).id 1761 }).get(), h = [], i = 0; i < a.length; i++) { 1762 var j = this._normalizeItem(a[i]); 1763 if (c.inArray(j.id, g) >= 0) { 1764 var k = f.filter(d(j)), 1765 l = this.item(k), 1766 m = c.extend(!0, {}, j, l), 1767 n = this.option(m); 1768 k.replaceWith(n) 1769 } else { 1770 var o = this.option(j); 1771 if (j.children) { 1772 var p = this.convertToOptions(j.children); 1773 b.appendMany(o, p) 1774 } 1775 h.push(o) 1776 } 1777 } 1778 return h 1779 }, d 1780 }), b.define("select2/data/ajax", ["./array", "../utils", "jquery"], function(a, b, c) { 1781 function d(a, b) { 1782 this.ajaxOptions = this._applyDefaults(b.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), d.__super__.constructor.call(this, a, b) 1783 } 1784 return b.Extend(d, a), d.prototype._applyDefaults = function(a) { 1785 var b = { 1786 data: function(a) { 1787 return c.extend({}, a, { 1788 q: a.term 1789 }) 1790 }, 1791 transport: function(a, b, d) { 1792 var e = c.ajax(a); 1793 return e.then(b), e.fail(d), e 1794 } 1795 }; 1796 return c.extend({}, b, a, !0) 1797 }, d.prototype.processResults = function(a) { 1798 return a 1799 }, d.prototype.query = function(a, b) { 1800 function d() { 1801 var d = f.transport(f, function(d) { 1802 var f = e.processResults(d, a); 1803 e.options.get("debug") && window.console && console.error && (f && f.results && c.isArray(f.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), b(f) 1804 }, function() { 1805 d.status && "0" === d.status || e.trigger("results:message", { 1806 message: "errorLoading" 1807 }) 1808 }); 1809 e._request = d 1810 } 1811 var e = this; 1812 null != this._request && (c.isFunction(this._request.abort) && this._request.abort(), this._request = null); 1813 var f = c.extend({ 1814 type: "GET" 1815 }, this.ajaxOptions); 1816 "function" == typeof f.url && (f.url = f.url.call(this.$element, a)), "function" == typeof f.data && (f.data = f.data.call(this.$element, a)), this.ajaxOptions.delay && null != a.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(d, this.ajaxOptions.delay)) : d() 1817 }, d 1818 }), b.define("select2/data/tags", ["jquery"], function(a) { 1819 function b(b, c, d) { 1820 var e = d.get("tags"), 1821 f = d.get("createTag"); 1822 void 0 !== f && (this.createTag = f); 1823 var g = d.get("insertTag"); 1824 if (void 0 !== g && (this.insertTag = g), b.call(this, c, d), a.isArray(e)) 1825 for (var h = 0; h < e.length; h++) { 1826 var i = e[h], 1827 j = this._normalizeItem(i), 1828 k = this.option(j); 1829 this.$element.append(k) 1830 } 1831 } 1832 return b.prototype.query = function(a, b, c) { 1833 function d(a, f) { 1834 for (var g = a.results, h = 0; h < g.length; h++) { 1835 var i = g[h], 1836 j = null != i.children && !d({ 1837 results: i.children 1838 }, !0), 1839 k = i.text === b.term; 1840 if (k || j) return f ? !1 : (a.data = g, void c(a)) 1841 } 1842 if (f) return !0; 1843 var l = e.createTag(b); 1844 if (null != l) { 1845 var m = e.option(l); 1846 m.attr("data-select2-tag", !0), e.addOptions([m]), e.insertTag(g, l) 1847 } 1848 a.results = g, c(a) 1849 } 1850 var e = this; 1851 return this._removeOldTags(), null == b.term || null != b.page ? void a.call(this, b, c) : void a.call(this, b, d) 1852 }, b.prototype.createTag = function(b, c) { 1853 var d = a.trim(c.term); 1854 return "" === d ? null : { 1855 id: d, 1856 text: d 1857 } 1858 }, b.prototype.insertTag = function(a, b, c) { 1859 b.unshift(c) 1860 }, b.prototype._removeOldTags = function(b) { 1861 var c = (this._lastTag, this.$element.find("option[data-select2-tag]")); 1862 c.each(function() { 1863 this.selected || a(this).remove() 1864 }) 1865 }, b 1866 }), b.define("select2/data/tokenizer", ["jquery"], function(a) { 1867 function b(a, b, c) { 1868 var d = c.get("tokenizer"); 1869 void 0 !== d && (this.tokenizer = d), a.call(this, b, c) 1870 } 1871 return b.prototype.bind = function(a, b, c) { 1872 a.call(this, b, c), this.$search = b.dropdown.$search || b.selection.$search || c.find(".select2-search__field") 1873 }, b.prototype.query = function(b, c, d) { 1874 function e(b) { 1875 var c = g._normalizeItem(b), 1876 d = g.$element.find("option").filter(function() { 1877 return a(this).val() === c.id 1878 }); 1879 if (!d.length) { 1880 var e = g.option(c); 1881 e.attr("data-select2-tag", !0), g._removeOldTags(), g.addOptions([e]) 1882 } 1883 f(c) 1884 } 1885 1886 function f(a) { 1887 g.trigger("select", { 1888 data: a 1889 }) 1890 } 1891 var g = this; 1892 c.term = c.term || ""; 1893 var h = this.tokenizer(c, this.options, e); 1894 h.term !== c.term && (this.$search.length && (this.$search.val(h.term), this.$search.focus()), c.term = h.term), b.call(this, c, d) 1895 }, b.prototype.tokenizer = function(b, c, d, e) { 1896 for (var f = d.get("tokenSeparators") || [], g = c.term, h = 0, i = this.createTag || function(a) { 1897 return { 1898 id: a.term, 1899 text: a.term 1900 } 1901 }; h < g.length;) { 1902 var j = g[h]; 1903 if (-1 !== a.inArray(j, f)) { 1904 var k = g.substr(0, h), 1905 l = a.extend({}, c, { 1906 term: k 1907 }), 1908 m = i(l); 1909 null != m ? (e(m), g = g.substr(h + 1) || "", h = 0) : h++ 1910 } else h++ 1911 } 1912 return { 1913 term: g 1914 } 1915 }, b 1916 }), b.define("select2/data/minimumInputLength", [], function() { 1917 function a(a, b, c) { 1918 this.minimumInputLength = c.get("minimumInputLength"), a.call(this, b, c) 1919 } 1920 return a.prototype.query = function(a, b, c) { 1921 return b.term = b.term || "", b.term.length < this.minimumInputLength ? void this.trigger("results:message", { 1922 message: "inputTooShort", 1923 args: { 1924 minimum: this.minimumInputLength, 1925 input: b.term, 1926 params: b 1927 } 1928 }) : void a.call(this, b, c) 1929 }, a 1930 }), b.define("select2/data/maximumInputLength", [], function() { 1931 function a(a, b, c) { 1932 this.maximumInputLength = c.get("maximumInputLength"), a.call(this, b, c) 1933 } 1934 return a.prototype.query = function(a, b, c) { 1935 return b.term = b.term || "", this.maximumInputLength > 0 && b.term.length > this.maximumInputLength ? void this.trigger("results:message", { 1936 message: "inputTooLong", 1937 args: { 1938 maximum: this.maximumInputLength, 1939 input: b.term, 1940 params: b 1941 } 1942 }) : void a.call(this, b, c) 1943 }, a 1944 }), b.define("select2/data/maximumSelectionLength", [], function() { 1945 function a(a, b, c) { 1946 this.maximumSelectionLength = c.get("maximumSelectionLength"), a.call(this, b, c) 1947 } 1948 return a.prototype.query = function(a, b, c) { 1949 var d = this; 1950 this.current(function(e) { 1951 var f = null != e ? e.length : 0; 1952 return d.maximumSelectionLength > 0 && f >= d.maximumSelectionLength ? void d.trigger("results:message", { 1953 message: "maximumSelected", 1954 args: { 1955 maximum: d.maximumSelectionLength 1956 } 1957 }) : void a.call(d, b, c) 1958 }) 1959 }, a 1960 }), b.define("select2/dropdown", ["jquery", "./utils"], function(a, b) { 1961 function c(a, b) { 1962 this.$element = a, this.options = b, c.__super__.constructor.call(this) 1963 } 1964 return b.Extend(c, b.Observable), c.prototype.render = function() { 1965 var b = a('<span class="select2-dropdown"><span class="select2-results"></span></span>'); 1966 return b.attr("dir", this.options.get("dir")), this.$dropdown = b, b 1967 }, c.prototype.bind = function() {}, c.prototype.position = function(a, b) {}, c.prototype.destroy = function() { 1968 this.$dropdown.remove() 1969 }, c 1970 }), b.define("select2/dropdown/search", ["jquery", "../utils"], function(a, b) { 1971 function c() {} 1972 return c.prototype.render = function(b) { 1973 var c = b.call(this), 1974 d = a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>'); 1975 return this.$searchContainer = d, this.$search = d.find("input"), c.prepend(d), c 1976 }, c.prototype.bind = function(b, c, d) { 1977 var e = this; 1978 b.call(this, c, d), this.$search.on("keydown", function(a) { 1979 e.trigger("keypress", a), e._keyUpPrevented = a.isDefaultPrevented() 1980 }), this.$search.on("input", function(b) { 1981 a(this).off("keyup") 1982 }), this.$search.on("keyup input", function(a) { 1983 e.handleSearch(a) 1984 }), c.on("open", function() { 1985 e.$search.attr("tabindex", 0), e.$search.focus(), window.setTimeout(function() { 1986 e.$search.focus() 1987 }, 0) 1988 }), c.on("close", function() { 1989 e.$search.attr("tabindex", -1), e.$search.val("") 1990 }), c.on("focus", function() { 1991 c.isOpen() && e.$search.focus() 1992 }), c.on("results:all", function(a) { 1993 if (null == a.query.term || "" === a.query.term) { 1994 var b = e.showSearch(a); 1995 b ? e.$searchContainer.removeClass("select2-search--hide") : e.$searchContainer.addClass("select2-search--hide") 1996 } 1997 }) 1998 }, c.prototype.handleSearch = function(a) { 1999 if (!this._keyUpPrevented) { 2000 var b = this.$search.val(); 2001 this.trigger("query", { 2002 term: b 2003 }) 2004 } 2005 this._keyUpPrevented = !1 2006 }, c.prototype.showSearch = function(a, b) { 2007 return !0 2008 }, c 2009 }), b.define("select2/dropdown/hidePlaceholder", [], function() { 2010 function a(a, b, c, d) { 2011 this.placeholder = this.normalizePlaceholder(c.get("placeholder")), a.call(this, b, c, d) 2012 } 2013 return a.prototype.append = function(a, b) { 2014 b.results = this.removePlaceholder(b.results), a.call(this, b) 2015 }, a.prototype.normalizePlaceholder = function(a, b) { 2016 return "string" == typeof b && (b = { 2017 id: "", 2018 text: b 2019 }), b 2020 }, a.prototype.removePlaceholder = function(a, b) { 2021 for (var c = b.slice(0), d = b.length - 1; d >= 0; d--) { 2022 var e = b[d]; 2023 this.placeholder.id === e.id && c.splice(d, 1) 2024 } 2025 return c 2026 }, a 2027 }), b.define("select2/dropdown/infiniteScroll", ["jquery"], function(a) { 2028 function b(a, b, c, d) { 2029 this.lastParams = {}, a.call(this, b, c, d), this.$loadingMore = this.createLoadingMore(), this.loading = !1 2030 } 2031 return b.prototype.append = function(a, b) { 2032 this.$loadingMore.remove(), this.loading = !1, a.call(this, b), this.showLoadingMore(b) && this.$results.append(this.$loadingMore) 2033 }, b.prototype.bind = function(b, c, d) { 2034 var e = this; 2035 b.call(this, c, d), c.on("query", function(a) { 2036 e.lastParams = a, e.loading = !0 2037 }), c.on("query:append", function(a) { 2038 e.lastParams = a, e.loading = !0 2039 }), this.$results.on("scroll", function() { 2040 var b = a.contains(document.documentElement, e.$loadingMore[0]); 2041 if (!e.loading && b) { 2042 var c = e.$results.offset().top + e.$results.outerHeight(!1), 2043 d = e.$loadingMore.offset().top + e.$loadingMore.outerHeight(!1); 2044 c + 50 >= d && e.loadMore() 2045 } 2046 }) 2047 }, b.prototype.loadMore = function() { 2048 this.loading = !0; 2049 var b = a.extend({}, { 2050 page: 1 2051 }, this.lastParams); 2052 b.page++, this.trigger("query:append", b) 2053 }, b.prototype.showLoadingMore = function(a, b) { 2054 return b.pagination && b.pagination.more 2055 }, b.prototype.createLoadingMore = function() { 2056 var b = a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'), 2057 c = this.options.get("translations").get("loadingMore"); 2058 return b.html(c(this.lastParams)), b 2059 }, b 2060 }), b.define("select2/dropdown/attachBody", ["jquery", "../utils"], function(a, b) { 2061 function c(b, c, d) { 2062 this.$dropdownParent = d.get("dropdownParent") || a(document.body), b.call(this, c, d) 2063 } 2064 return c.prototype.bind = function(a, b, c) { 2065 var d = this, 2066 e = !1; 2067 a.call(this, b, c), b.on("open", function() { 2068 d._showDropdown(), d._attachPositioningHandler(b), e || (e = !0, b.on("results:all", function() { 2069 d._positionDropdown(), d._resizeDropdown() 2070 }), b.on("results:append", function() { 2071 d._positionDropdown(), d._resizeDropdown() 2072 })) 2073 }), b.on("close", function() { 2074 d._hideDropdown(), d._detachPositioningHandler(b) 2075 }), this.$dropdownContainer.on("mousedown", function(a) { 2076 a.stopPropagation() 2077 }) 2078 }, c.prototype.destroy = function(a) { 2079 a.call(this), this.$dropdownContainer.remove() 2080 }, c.prototype.position = function(a, b, c) { 2081 b.attr("class", c.attr("class")), b.removeClass("select2"), b.addClass("select2-container--open"), b.css({ 2082 position: "absolute", 2083 top: -999999 2084 }), this.$container = c 2085 }, c.prototype.render = function(b) { 2086 var c = a("<span></span>"), 2087 d = b.call(this); 2088 return c.append(d), this.$dropdownContainer = c, c 2089 }, c.prototype._hideDropdown = function(a) { 2090 this.$dropdownContainer.detach() 2091 }, c.prototype._attachPositioningHandler = function(c, d) { 2092 var e = this, 2093 f = "scroll.select2." + d.id, 2094 g = "resize.select2." + d.id, 2095 h = "orientationchange.select2." + d.id, 2096 i = this.$container.parents().filter(b.hasScroll); 2097 i.each(function() { 2098 a(this).data("select2-scroll-position", { 2099 x: a(this).scrollLeft(), 2100 y: a(this).scrollTop() 2101 }) 2102 }), i.on(f, function(b) { 2103 var c = a(this).data("select2-scroll-position"); 2104 a(this).scrollTop(c.y) 2105 }), a(window).on(f + " " + g + " " + h, function(a) { 2106 e._positionDropdown(), e._resizeDropdown() 2107 }) 2108 }, c.prototype._detachPositioningHandler = function(c, d) { 2109 var e = "scroll.select2." + d.id, 2110 f = "resize.select2." + d.id, 2111 g = "orientationchange.select2." + d.id, 2112 h = this.$container.parents().filter(b.hasScroll); 2113 h.off(e), a(window).off(e + " " + f + " " + g) 2114 }, c.prototype._positionDropdown = function() { 2115 var b = a(window), 2116 c = this.$dropdown.hasClass("select2-dropdown--above"), 2117 d = this.$dropdown.hasClass("select2-dropdown--below"), 2118 e = null, 2119 f = this.$container.offset(); 2120 f.bottom = f.top + this.$container.outerHeight(!1); 2121 var g = { 2122 height: this.$container.outerHeight(!1) 2123 }; 2124 g.top = f.top, g.bottom = f.top + g.height; 2125 var h = { 2126 height: this.$dropdown.outerHeight(!1) 2127 }, 2128 i = { 2129 top: b.scrollTop(), 2130 bottom: b.scrollTop() + b.height() 2131 }, 2132 j = i.top < f.top - h.height, 2133 k = i.bottom > f.bottom + h.height, 2134 l = { 2135 left: f.left, 2136 top: g.bottom 2137 }, 2138 m = this.$dropdownParent; 2139 "static" === m.css("position") && (m = m.offsetParent()); 2140 var n = m.offset(); 2141 l.top -= n.top, l.left -= n.left, c || d || (e = "below"), k || !j || c ? !j && k && c && (e = "below") : e = "above", ("above" == e || c && "below" !== e) && (l.top = g.top - n.top - h.height), null != e && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + e), this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + e)), this.$dropdownContainer.css(l) 2142 }, c.prototype._resizeDropdown = function() { 2143 var a = { 2144 width: this.$container.outerWidth(!1) + "px" 2145 }; 2146 this.options.get("dropdownAutoWidth") && (a.minWidth = a.width, a.position = "relative", a.width = "auto"), this.$dropdown.css(a) 2147 }, c.prototype._showDropdown = function(a) { 2148 this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown() 2149 }, c 2150 }), b.define("select2/dropdown/minimumResultsForSearch", [], function() { 2151 function a(b) { 2152 for (var c = 0, d = 0; d < b.length; d++) { 2153 var e = b[d]; 2154 e.children ? c += a(e.children) : c++ 2155 } 2156 return c 2157 } 2158 2159 function b(a, b, c, d) { 2160 this.minimumResultsForSearch = c.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), a.call(this, b, c, d) 2161 } 2162 return b.prototype.showSearch = function(b, c) { 2163 return a(c.data.results) < this.minimumResultsForSearch ? !1 : b.call(this, c) 2164 }, b 2165 }), b.define("select2/dropdown/selectOnClose", [], function() { 2166 function a() {} 2167 return a.prototype.bind = function(a, b, c) { 2168 var d = this; 2169 a.call(this, b, c), b.on("close", function(a) { 2170 d._handleSelectOnClose(a) 2171 }) 2172 }, a.prototype._handleSelectOnClose = function(a, b) { 2173 if (b && null != b.originalSelect2Event) { 2174 var c = b.originalSelect2Event; 2175 if ("select" === c._type || "unselect" === c._type) return 2176 } 2177 var d = this.getHighlightedResults(); 2178 if (!(d.length < 1)) { 2179 var e = d.data("data"); 2180 null != e.element && e.element.selected || null == e.element && e.selected || this.trigger("select", { 2181 data: e 2182 }) 2183 } 2184 }, a 2185 }), b.define("select2/dropdown/closeOnSelect", [], function() { 2186 function a() {} 2187 return a.prototype.bind = function(a, b, c) { 2188 var d = this; 2189 a.call(this, b, c), b.on("select", function(a) { 2190 d._selectTriggered(a) 2191 }), b.on("unselect", function(a) { 2192 d._selectTriggered(a) 2193 }) 2194 }, a.prototype._selectTriggered = function(a, b) { 2195 var c = b.originalEvent; 2196 c && c.ctrlKey || this.trigger("close", { 2197 originalEvent: c, 2198 originalSelect2Event: b 2199 }) 2200 }, a 2201 }), b.define("select2/i18n/en", [], function() { 2202 return { 2203 errorLoading: function() { 2204 return "The results could not be loaded." 2205 }, 2206 inputTooLong: function(a) { 2207 var b = a.input.length - a.maximum, 2208 c = "Please delete " + b + " character"; 2209 return 1 != b && (c += "s"), c 2210 }, 2211 inputTooShort: function(a) { 2212 var b = a.minimum - a.input.length, 2213 c = "Please enter " + b + " or more characters"; 2214 return c 2215 }, 2216 loadingMore: function() { 2217 return "Loading more resultsâ¦" 2218 }, 2219 maximumSelected: function(a) { 2220 var b = "You can only select " + a.maximum + " item"; 2221 return 1 != a.maximum && (b += "s"), b 2222 }, 2223 noResults: function() { 2224 return "No results found" 2225 }, 2226 searching: function() { 2227 return "Searchingâ¦" 2228 } 2229 } 2230 }), b.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(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C) { 2231 function D() { 2232 this.reset() 2233 } 2234 D.prototype.apply = function(l) { 2235 if (l = a.extend(!0, {}, this.defaults, l), null == l.dataAdapter) { 2236 if (null != l.ajax ? l.dataAdapter = o : null != l.data ? l.dataAdapter = n : l.dataAdapter = m, l.minimumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, r)), l.maximumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, s)), l.maximumSelectionLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, t)), l.tags && (l.dataAdapter = j.Decorate(l.dataAdapter, p)), (null != l.tokenSeparators || null != l.tokenizer) && (l.dataAdapter = j.Decorate(l.dataAdapter, q)), null != l.query) { 2237 var C = b(l.amdBase + "compat/query"); 2238 l.dataAdapter = j.Decorate(l.dataAdapter, C) 2239 } 2240 if (null != l.initSelection) { 2241 var D = b(l.amdBase + "compat/initSelection"); 2242 l.dataAdapter = j.Decorate(l.dataAdapter, D) 2243 } 2244 } 2245 if (null == l.resultsAdapter && (l.resultsAdapter = c, null != l.ajax && (l.resultsAdapter = j.Decorate(l.resultsAdapter, x)), null != l.placeholder && (l.resultsAdapter = j.Decorate(l.resultsAdapter, w)), l.selectOnClose && (l.resultsAdapter = j.Decorate(l.resultsAdapter, A))), null == l.dropdownAdapter) { 2246 if (l.multiple) l.dropdownAdapter = u; 2247 else { 2248 var E = j.Decorate(u, v); 2249 l.dropdownAdapter = E 2250 } 2251 if (0 !== l.minimumResultsForSearch && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, z)), l.closeOnSelect && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, B)), null != l.dropdownCssClass || null != l.dropdownCss || null != l.adaptDropdownCssClass) { 2252 var F = b(l.amdBase + "compat/dropdownCss"); 2253 l.dropdownAdapter = j.Decorate(l.dropdownAdapter, F) 2254 } 2255 l.dropdownAdapter = j.Decorate(l.dropdownAdapter, y) 2256 } 2257 if (null == l.selectionAdapter) { 2258 if (l.multiple ? l.selectionAdapter = e : l.selectionAdapter = d, null != l.placeholder && (l.selectionAdapter = j.Decorate(l.selectionAdapter, f)), l.allowClear && (l.selectionAdapter = j.Decorate(l.selectionAdapter, g)), l.multiple && (l.selectionAdapter = j.Decorate(l.selectionAdapter, h)), null != l.containerCssClass || null != l.containerCss || null != l.adaptContainerCssClass) { 2259 var G = b(l.amdBase + "compat/containerCss"); 2260 l.selectionAdapter = j.Decorate(l.selectionAdapter, G) 2261 } 2262 l.selectionAdapter = j.Decorate(l.selectionAdapter, i) 2263 } 2264 if ("string" == typeof l.language) 2265 if (l.language.indexOf("-") > 0) { 2266 var H = l.language.split("-"), 2267 I = H[0]; 2268 l.language = [l.language, I] 2269 } else l.language = [l.language]; 2270 if (a.isArray(l.language)) { 2271 var J = new k; 2272 l.language.push("en"); 2273 for (var K = l.language, L = 0; L < K.length; L++) { 2274 var M = K[L], 2275 N = {}; 2276 try { 2277 N = k.loadPath(M) 2278 } catch (O) { 2279 try { 2280 M = this.defaults.amdLanguageBase + M, N = k.loadPath(M) 2281 } catch (P) { 2282 l.debug && window.console && console.warn && console.warn('Select2: The language file for "' + M + '" could not be automatically loaded. A fallback will be used instead.'); 2283 continue 2284 } 2285 } 2286 J.extend(N) 2287 } 2288 l.translations = J 2289 } else { 2290 var Q = k.loadPath(this.defaults.amdLanguageBase + "en"), 2291 R = new k(l.language); 2292 R.extend(Q), l.translations = R 2293 } 2294 return l 2295 }, D.prototype.reset = function() { 2296 function b(a) { 2297 function b(a) { 2298 return l[a] || a 2299 } 2300 return a.replace(/[^\u0000-\u007E]/g, b) 2301 } 2302 2303 function c(d, e) { 2304 if ("" === a.trim(d.term)) return e; 2305 if (e.children && e.children.length > 0) { 2306 for (var f = a.extend(!0, {}, e), g = e.children.length - 1; g >= 0; g--) { 2307 var h = e.children[g], 2308 i = c(d, h); 2309 null == i && f.children.splice(g, 1) 2310 } 2311 return f.children.length > 0 ? f : c(d, f) 2312 } 2313 var j = b(e.text).toUpperCase(), 2314 k = b(d.term).toUpperCase(); 2315 return j.indexOf(k) > -1 ? e : null 2316 } 2317 this.defaults = { 2318 amdBase: "./", 2319 amdLanguageBase: "./i18n/", 2320 closeOnSelect: !0, 2321 debug: !1, 2322 dropdownAutoWidth: !1, 2323 escapeMarkup: j.escapeMarkup, 2324 language: C, 2325 matcher: c, 2326 minimumInputLength: 0, 2327 maximumInputLength: 0, 2328 maximumSelectionLength: 0, 2329 minimumResultsForSearch: 0, 2330 selectOnClose: !1, 2331 sorter: function(a) { 2332 return a 2333 }, 2334 templateResult: function(a) { 2335 return a.text 2336 }, 2337 templateSelection: function(a) { 2338 return a.text 2339 }, 2340 theme: "default", 2341 width: "resolve" 2342 } 2343 }, D.prototype.set = function(b, c) { 2344 var d = a.camelCase(b), 2345 e = {}; 2346 e[d] = c; 2347 var f = j._convertData(e); 2348 a.extend(this.defaults, f) 2349 }; 2350 var E = new D; 2351 return E 2352 }), b.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function(a, b, c, d) { 2353 function e(b, e) { 2354 if (this.options = b, null != e && this.fromElement(e), this.options = c.apply(this.options), e && e.is("input")) { 2355 var f = a(this.get("amdBase") + "compat/inputData"); 2356 this.options.dataAdapter = d.Decorate(this.options.dataAdapter, f) 2357 } 2358 } 2359 return e.prototype.fromElement = function(a) { 2360 var c = ["select2"]; 2361 null == this.options.multiple && (this.options.multiple = a.prop("multiple")), null == this.options.disabled && (this.options.disabled = a.prop("disabled")), null == this.options.language && (a.prop("lang") ? this.options.language = a.prop("lang").toLowerCase() : a.closest("[lang]").prop("lang") && (this.options.language = a.closest("[lang]").prop("lang"))), null == this.options.dir && (a.prop("dir") ? this.options.dir = a.prop("dir") : a.closest("[dir]").prop("dir") ? this.options.dir = a.closest("[dir]").prop("dir") : this.options.dir = "ltr"), a.prop("disabled", this.options.disabled), a.prop("multiple", this.options.multiple), a.data("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.'), a.data("data", a.data("select2Tags")), a.data("tags", !0)), a.data("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."), a.attr("ajax--url", a.data("ajaxUrl")), a.data("ajax--url", a.data("ajaxUrl"))); 2362 var e = {}; 2363 e = b.fn.jquery && "1." == b.fn.jquery.substr(0, 2) && a[0].dataset ? b.extend(!0, {}, a[0].dataset, a.data()) : a.data(); 2364 var f = b.extend(!0, {}, e); 2365 f = d._convertData(f); 2366 for (var g in f) b.inArray(g, c) > -1 || (b.isPlainObject(this.options[g]) ? b.extend(this.options[g], f[g]) : this.options[g] = f[g]); 2367 return this 2368 }, e.prototype.get = function(a) { 2369 return this.options[a] 2370 }, e.prototype.set = function(a, b) { 2371 this.options[a] = b 2372 }, e 2373 }), b.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function(a, b, c, d) { 2374 var e = function(a, c) { 2375 null != a.data("select2") && a.data("select2").destroy(), this.$element = a, this.id = this._generateId(a), c = c || {}, this.options = new b(c, a), e.__super__.constructor.call(this); 2376 var d = a.attr("tabindex") || 0; 2377 a.data("old-tabindex", d), a.attr("tabindex", "-1"); 2378 var f = this.options.get("dataAdapter"); 2379 this.dataAdapter = new f(a, this.options); 2380 var g = this.render(); 2381 this._placeContainer(g); 2382 var h = this.options.get("selectionAdapter"); 2383 this.selection = new h(a, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, g); 2384 var i = this.options.get("dropdownAdapter"); 2385 this.dropdown = new i(a, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, g); 2386 var j = this.options.get("resultsAdapter"); 2387 this.results = new j(a, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown); 2388 var k = this; 2389 this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(a) { 2390 k.trigger("selection:update", { 2391 data: a 2392 }) 2393 }), a.addClass("select2-hidden-accessible"), a.attr("aria-hidden", "true"), this._syncAttributes(), a.data("select2", this) 2394 }; 2395 return c.Extend(e, c.Observable), e.prototype._generateId = function(a) { 2396 var b = ""; 2397 return b = null != a.attr("id") ? a.attr("id") : null != a.attr("name") ? a.attr("name") + "-" + c.generateChars(2) : c.generateChars(4), b = b.replace(/(:|\.|\[|\]|,)/g, ""), b = "select2-" + b 2398 }, e.prototype._placeContainer = function(a) { 2399 a.insertAfter(this.$element); 2400 var b = this._resolveWidth(this.$element, this.options.get("width")); 2401 null != b && a.css("width", b) 2402 }, e.prototype._resolveWidth = function(a, b) { 2403 var c = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; 2404 if ("resolve" == b) { 2405 var d = this._resolveWidth(a, "style"); 2406 return null != d ? d : this._resolveWidth(a, "element") 2407 } 2408 if ("element" == b) { 2409 var e = a.outerWidth(!1); 2410 return 0 >= e ? "auto" : e + "px" 2411 } 2412 if ("style" == b) { 2413 var f = a.attr("style"); 2414 if ("string" != typeof f) return null; 2415 for (var g = f.split(";"), h = 0, i = g.length; i > h; h += 1) { 2416 var j = g[h].replace(/\s/g, ""), 2417 k = j.match(c); 2418 if (null !== k && k.length >= 1) return k[1] 2419 } 2420 return null 2421 } 2422 return b 2423 }, e.prototype._bindAdapters = function() { 2424 this.dataAdapter.bind(this, this.$container), this.selection.bind(this, this.$container), this.dropdown.bind(this, this.$container), this.results.bind(this, this.$container) 2425 }, e.prototype._registerDomEvents = function() { 2426 var b = this; 2427 this.$element.on("change.select2", function() { 2428 b.dataAdapter.current(function(a) { 2429 b.trigger("selection:update", { 2430 data: a 2431 }) 2432 }) 2433 }), this.$element.on("focus.select2", function(a) { 2434 b.trigger("focus", a) 2435 }), this._syncA = c.bind(this._syncAttributes, this), this._syncS = c.bind(this._syncSubtree, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA); 2436 var d = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 2437 null != d ? (this._observer = new d(function(c) { 2438 a.each(c, b._syncA), a.each(c, b._syncS) 2439 }), this._observer.observe(this.$element[0], { 2440 attributes: !0, 2441 childList: !0, 2442 subtree: !1 2443 })) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", b._syncA, !1), this.$element[0].addEventListener("DOMNodeInserted", b._syncS, !1), this.$element[0].addEventListener("DOMNodeRemoved", b._syncS, !1)) 2444 }, e.prototype._registerDataEvents = function() { 2445 var a = this; 2446 this.dataAdapter.on("*", function(b, c) { 2447 a.trigger(b, c) 2448 }) 2449 }, e.prototype._registerSelectionEvents = function() { 2450 var b = this, 2451 c = ["toggle", "focus"]; 2452 this.selection.on("toggle", function() { 2453 b.toggleDropdown() 2454 }), this.selection.on("focus", function(a) { 2455 b.focus(a) 2456 }), this.selection.on("*", function(d, e) { 2457 -1 === a.inArray(d, c) && b.trigger(d, e) 2458 }) 2459 }, e.prototype._registerDropdownEvents = function() { 2460 var a = this; 2461 this.dropdown.on("*", function(b, c) { 2462 a.trigger(b, c) 2463 }) 2464 }, e.prototype._registerResultsEvents = function() { 2465 var a = this; 2466 this.results.on("*", function(b, c) { 2467 a.trigger(b, c) 2468 }) 2469 }, e.prototype._registerEvents = function() { 2470 var a = this; 2471 this.on("open", function() { 2472 a.$container.addClass("select2-container--open") 2473 }), this.on("close", function() { 2474 a.$container.removeClass("select2-container--open") 2475 }), this.on("enable", function() { 2476 a.$container.removeClass("select2-container--disabled") 2477 }), this.on("disable", function() { 2478 a.$container.addClass("select2-container--disabled") 2479 }), this.on("blur", function() { 2480 a.$container.removeClass("select2-container--focus") 2481 }), this.on("query", function(b) { 2482 a.isOpen() || a.trigger("open", {}), this.dataAdapter.query(b, function(c) { 2483 a.trigger("results:all", { 2484 data: c, 2485 query: b 2486 }) 2487 }) 2488 }), this.on("query:append", function(b) { 2489 this.dataAdapter.query(b, function(c) { 2490 a.trigger("results:append", { 2491 data: c, 2492 query: b 2493 }) 2494 }) 2495 }), this.on("keypress", function(b) { 2496 var c = b.which; 2497 a.isOpen() ? c === d.ESC || c === d.TAB || c === d.UP && b.altKey ? (a.close(), b.preventDefault()) : c === d.ENTER ? (a.trigger("results:select", {}), b.preventDefault()) : c === d.SPACE && b.ctrlKey ? (a.trigger("results:toggle", {}), b.preventDefault()) : c === d.UP ? (a.trigger("results:previous", {}), b.preventDefault()) : c === d.DOWN && (a.trigger("results:next", {}), b.preventDefault()) : (c === d.ENTER || c === d.SPACE || c === d.DOWN && b.altKey) && (a.open(), b.preventDefault()) 2498 }) 2499 }, e.prototype._syncAttributes = function() { 2500 this.options.set("disabled", this.$element.prop("disabled")), this.options.get("disabled") ? (this.isOpen() && this.close(), this.trigger("disable", {})) : this.trigger("enable", {}) 2501 }, e.prototype._syncSubtree = function(a, b) { 2502 var c = !1, 2503 d = this; 2504 if (!a || !a.target || "OPTION" === a.target.nodeName || "OPTGROUP" === a.target.nodeName) { 2505 if (b) 2506 if (b.addedNodes && b.addedNodes.length > 0) 2507 for (var e = 0; e < b.addedNodes.length; e++) { 2508 var f = b.addedNodes[e]; 2509 f.selected && (c = !0) 2510 } else b.removedNodes && b.removedNodes.length > 0 && (c = !0); 2511 else c = !0; 2512 c && this.dataAdapter.current(function(a) { 2513 d.trigger("selection:update", { 2514 data: a 2515 }) 2516 }) 2517 } 2518 }, e.prototype.trigger = function(a, b) { 2519 var c = e.__super__.trigger, 2520 d = { 2521 open: "opening", 2522 close: "closing", 2523 select: "selecting", 2524 unselect: "unselecting" 2525 }; 2526 if (void 0 === b && (b = {}), a in d) { 2527 var f = d[a], 2528 g = { 2529 prevented: !1, 2530 name: a, 2531 args: b 2532 }; 2533 if (c.call(this, f, g), g.prevented) return void(b.prevented = !0) 2534 } 2535 c.call(this, a, b) 2536 }, e.prototype.toggleDropdown = function() { 2537 this.options.get("disabled") || (this.isOpen() ? this.close() : this.open()) 2538 }, e.prototype.open = function() { 2539 this.isOpen() || this.trigger("query", {}) 2540 }, e.prototype.close = function() { 2541 this.isOpen() && this.trigger("close", {}) 2542 }, e.prototype.isOpen = function() { 2543 return this.$container.hasClass("select2-container--open") 2544 }, e.prototype.hasFocus = function() { 2545 return this.$container.hasClass("select2-container--focus") 2546 }, e.prototype.focus = function(a) { 2547 this.hasFocus() || (this.$container.addClass("select2-container--focus"), this.trigger("focus", {})) 2548 }, e.prototype.enable = function(a) { 2549 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 == a || 0 === a.length) && (a = [!0]); 2550 var b = !a[0]; 2551 this.$element.prop("disabled", b) 2552 }, e.prototype.data = function() { 2553 this.options.get("debug") && arguments.length > 0 && 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()`.'); 2554 var a = []; 2555 return this.dataAdapter.current(function(b) { 2556 a = b 2557 }), a 2558 }, e.prototype.val = function(b) { 2559 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 == b || 0 === b.length) return this.$element.val(); 2560 var c = b[0]; 2561 a.isArray(c) && (c = a.map(c, function(a) { 2562 return a.toString() 2563 })), this.$element.val(c).trigger("change") 2564 }, e.prototype.destroy = function() { 2565 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(".select2"), this.$element.attr("tabindex", this.$element.data("old-tabindex")), this.$element.removeClass("select2-hidden-accessible"), this.$element.attr("aria-hidden", "false"), 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; 2566 }, e.prototype.render = function() { 2567 var b = a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>'); 2568 return b.attr("dir", this.options.get("dir")), this.$container = b, this.$container.addClass("select2-container--" + this.options.get("theme")), b.data("element", this.$element), b 2569 }, e 2570 }), b.define("jquery-mousewheel", ["jquery"], function(a) { 2571 return a 2572 }), b.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults"], function(a, b, c, d) { 2573 if (null == a.fn.select2) { 2574 var e = ["open", "close", "destroy"]; 2575 a.fn.select2 = function(b) { 2576 if (b = b || {}, "object" == typeof b) return this.each(function() { 2577 var d = a.extend(!0, {}, b); 2578 new c(a(this), d) 2579 }), this; 2580 if ("string" == typeof b) { 2581 var d, f = Array.prototype.slice.call(arguments, 1); 2582 return this.each(function() { 2583 var c = a(this).data("select2"); 2584 null == c && window.console && console.error && console.error("The select2('" + b + "') method was called on an element that is not using Select2."), d = c[b].apply(c, f) 2585 }), a.inArray(b, e) >
2585 -1 ? this : d 2586 } 2587 throw new Error("Invalid arguments for Select2: " + b) 2588 } 2589 } 2590 return null == a.fn.select2.defaults && (a.fn.select2.defaults = d), c 2591 }), { 2592 define: b.define, 2593 require: b.require 2594 } 2595 }(), 2596 c = b.require("jquery.select2"); 2597 return a.fn.select2.amd = b, c 2598});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.