175 lines
80 KiB
JavaScript
175 lines
80 KiB
JavaScript
/*
|
|
almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
|
Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
|
Select2 4.0.6-rc.1
|
|
https://select2.github.io
|
|
|
|
With a fix by Elementor team at line 4329
|
|
|
|
Released under the MIT license
|
|
https://github.com/select2/select2/blob/master/LICENSE.md
|
|
jQuery Mousewheel 3.1.13
|
|
|
|
Copyright jQuery Foundation and other contributors
|
|
Released under the MIT license
|
|
http://jquery.org/license
|
|
*/
|
|
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(u,z,w){u instanceof String&&(u=String(u));for(var q=u.length,g=0;g<q;g++){var k=u[g];if(z.call(w,k,g,u))return{i:g,v:k}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
|
|
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(u,z,w){if(u==Array.prototype||u==Object.prototype)return u;u[z]=w.value;return u};$jscomp.getGlobal=function(u){u=["object"==typeof globalThis&&globalThis,u,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var z=0;z<u.length;++z){var w=u[z];if(w&&w.Math==Math)return w}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(u,z){var w=$jscomp.propertyToPolyfillSymbol[z];if(null==w)return u[z];w=u[w];return void 0!==w?w:u[z]};
|
|
$jscomp.polyfill=function(u,z,w,q){z&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(u,z,w,q):$jscomp.polyfillUnisolated(u,z,w,q))};$jscomp.polyfillUnisolated=function(u,z,w,q){w=$jscomp.global;u=u.split(".");for(q=0;q<u.length-1;q++){var g=u[q];if(!(g in w))return;w=w[g]}u=u[u.length-1];q=w[u];z=z(q);z!=q&&null!=z&&$jscomp.defineProperty(w,u,{configurable:!0,writable:!0,value:z})};
|
|
$jscomp.polyfillIsolated=function(u,z,w,q){var g=u.split(".");u=1===g.length;q=g[0];q=!u&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var k=0;k<g.length-1;k++){var e=g[k];if(!(e in q))return;q=q[e]}g=g[g.length-1];w=$jscomp.IS_SYMBOL_NATIVE&&"es6"===w?q[g]:null;z=z(w);null!=z&&(u?$jscomp.defineProperty($jscomp.polyfills,g,{configurable:!0,writable:!0,value:z}):z!==w&&(void 0===$jscomp.propertyToPolyfillSymbol[g]&&(w=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[g]=$jscomp.IS_SYMBOL_NATIVE?
|
|
$jscomp.global.Symbol(g):$jscomp.POLYFILL_PREFIX+w+"$"+g),$jscomp.defineProperty(q,$jscomp.propertyToPolyfillSymbol[g],{configurable:!0,writable:!0,value:z})))};$jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(z,w){return $jscomp.findInternal(this,z,w).v}},"es6","es3");
|
|
(function(u){"function"===typeof define&&define.amd?define(["jquery"],u):"object"===typeof module&&module.exports?module.exports=function(z,w){void 0===w&&(w="undefined"!==typeof window?require("jquery"):require("jquery")(z));u(w);return w}:u(jQuery)})(function(u){var z=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var q=u.fn.select2.amd;(function(){if(!q||!q.requirejs){q?k=q:q={};var g,k,e;(function(c){function b(n,t){var v,E;t=t&&t.split("/");var G=A.map,K=G&&G["*"]||{};if(n){n=n.split("/");
|
|
var x=n.length-1;A.nodeIdCompat&&H.test(n[x])&&(n[x]=n[x].replace(H,""));"."===n[0].charAt(0)&&t&&(x=t.slice(0,t.length-1),n=x.concat(n));for(x=0;x<n.length;x++){var I=n[x];"."===I?(n.splice(x,1),--x):".."===I&&0!==x&&(1!==x||".."!==n[2])&&".."!==n[x-1]&&0<x&&(n.splice(x-1,2),x-=2)}n=n.join("/")}if((t||K)&&G){I=n.split("/");for(x=I.length;0<x;--x){var m=I.slice(0,x).join("/");if(t)for(E=t.length;0<E;--E)if(v=G[t.slice(0,E).join("/")])if(v=v[m]){var C=v;var D=x;break}if(C)break;if(!F&&K&&K[m]){var F=
|
|
K[m];var J=x}}!C&&F&&(C=F,D=J);C&&(I.splice(0,D,C),n=I.join("/"))}return n}function a(n,t){return function(){var v=L.call(arguments,0);"string"!==typeof v[0]&&1===v.length&&v.push(null);return r.apply(c,v.concat([n,t]))}}function d(n){return function(t){return b(t,n)}}function f(n){return function(t){y[n]=t}}function h(n){if(M.call(B,n)){var t=B[n];delete B[n];N[n]=!0;Q.apply(c,t)}if(!M.call(y,n)&&!M.call(N,n))throw Error("No "+n);return y[n]}function l(n){var t=n?n.indexOf("!"):-1;if(-1<t){var v=
|
|
n.substring(0,t);n=n.substring(t+1,n.length)}return[v,n]}function p(n){return function(){return A&&A.config&&A.config[n]||{}}}var r,y={},B={},A={},N={},M=Object.prototype.hasOwnProperty,L=[].slice,H=/\.js$/;var R=function(n,t){n=l(n);var v=n[0];t=t[1];n=n[1];if(v){v=b(v,t);var E=h(v)}v?n=E&&E.normalize?E.normalize(n,d(t)):b(n,t):(n=b(n,t),n=l(n),v=n[0],n=n[1],v&&(E=h(v)));return{f:v?v+"!"+n:n,n:n,pr:v,p:E}};var O={require:function(n){return a(n)},exports:function(n){var t=y[n];return"undefined"!==
|
|
typeof t?t:y[n]={}},module:function(n){return{id:n,uri:"",exports:y[n],config:p(n)}}};var Q=function(n,t,v,E){var G,K=[];var x=typeof v;var I=(E=E||n)?l(E):[];if("undefined"===x||"function"===x){t=!t.length&&v.length?["require","exports","module"]:t;for(G=0;G<t.length;G+=1){var m=R(t[G],I);x=m.f;if("require"===x)K[G]=O.require(n);else if("exports"===x){K[G]=O.exports(n);var C=!0}else if("module"===x)var D=K[G]=O.module(n);else if(M.call(y,x)||M.call(B,x)||M.call(N,x))K[G]=h(x);else if(m.p)m.p.load(m.n,
|
|
a(E,!0),f(x),{}),K[G]=y[x];else throw Error(n+" missing "+x);}t=v?v.apply(y[n],K):void 0;n&&(D&&D.exports!==c&&D.exports!==y[n]?y[n]=D.exports:t===c&&C||(y[n]=t))}else n&&(y[n]=v)};g=k=r=function(n,t,v,E,G){if("string"===typeof n)return O[n]?O[n](t):h(R(n,t?l(t):[]).f);if(!n.splice){A=n;A.deps&&r(A.deps,A.callback);if(!t)return;t.splice?(n=t,t=v,v=null):n=c}t=t||function(){};"function"===typeof v&&(v=E,E=G);E?Q(c,n,t,v):setTimeout(function(){Q(c,n,t,v)},4);return r};r.config=function(n){return r(n)};
|
|
g._defined=y;e=function(n,t,v){if("string"!==typeof n)throw Error("See almond README: incorrect module build, no module name");t.splice||(v=t,t=[]);M.call(y,n)||M.call(B,n)||(B[n]=[n,t,v])};e.amd={jQuery:!0}})();q.requirejs=g;q.require=k;q.define=e}})();q.define("almond",function(){});q.define("jquery",[],function(){var g=u||$;null==g&&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.");
|
|
return g});q.define("select2/utils",["jquery"],function(g){function k(a){a=a.prototype;var d=[],f;for(f in a)"function"===typeof a[f]&&"constructor"!==f&&d.push(f);return d}var e={Extend:function(a,d){function f(){this.constructor=a}var h={}.hasOwnProperty,l;for(l in d)h.call(d,l)&&(a[l]=d[l]);f.prototype=d.prototype;a.prototype=new f;a.__super__=d.prototype;return a},Decorate:function(a,d){function f(){var y=Array.prototype.unshift,B=a.prototype.constructor;0<d.prototype.constructor.length&&(y.call(arguments,
|
|
a.prototype.constructor),B=d.prototype.constructor);B.apply(this,arguments)}var h=k(d),l=k(a);d.displayName=a.displayName;f.prototype=new function(){this.constructor=f};for(var p=0;p<l.length;p++){var r=l[p];f.prototype[r]=a.prototype[r]}l=function(y){var B=function(){};y in f.prototype&&(B=f.prototype[y]);var A=d.prototype[y];return function(){Array.prototype.unshift.call(arguments,B);return A.apply(this,arguments)}};for(p=0;p<h.length;p++)r=h[p],f.prototype[r]=l(r);return f}},c=function(){this.listeners=
|
|
{}};c.prototype.on=function(a,d){this.listeners=this.listeners||{};a in this.listeners?this.listeners[a].push(d):this.listeners[a]=[d]};c.prototype.trigger=function(a){var d=Array.prototype.slice,f=d.call(arguments,1);this.listeners=this.listeners||{};null==f&&(f=[]);0===f.length&&f.push({});f[0]._type=a;a in this.listeners&&this.invoke(this.listeners[a],d.call(arguments,1));"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)};c.prototype.invoke=function(a,d){for(var f=0,h=a.length;f<
|
|
h;f++)a[f].apply(this,d)};e.Observable=c;e.generateChars=function(a){for(var d="",f=0;f<a;f++)d+=Math.floor(36*Math.random()).toString(36);return d};e.bind=function(a,d){return function(){a.apply(d,arguments)}};e._convertData=function(a){for(var d in a){var f=d.split("-"),h=a;if(1!==f.length){for(var l=0;l<f.length;l++){var p=f[l];p=p.substring(0,1).toLowerCase()+p.substring(1);p in h||(h[p]={});l==f.length-1&&(h[p]=a[d]);h=h[p]}delete a[d]}}return a};e.hasScroll=function(a,d){a=g(d);var f=d.style.overflowX,
|
|
h=d.style.overflowY;return f!==h||"hidden"!==h&&"visible"!==h?"scroll"===f||"scroll"===h?!0:a.innerHeight()<d.scrollHeight||a.innerWidth()<d.scrollWidth:!1};e.escapeMarkup=function(a){var d={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!==typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(f){return d[f]})};e.appendMany=function(a,d){if("1.7"===g.fn.jquery.substr(0,3)){var f=g();g.map(d,function(h){f=f.add(h)});d=f}a.append(d)};e.__cache={};var b=
|
|
0;e.GetUniqueElementId=function(a){var d=a.getAttribute("data-select2-id");null==d&&(a.id?(d=a.id,a.setAttribute("data-select2-id",d)):(a.setAttribute("data-select2-id",++b),d=b.toString()));return d};e.StoreData=function(a,d,f){a=e.GetUniqueElementId(a);e.__cache[a]||(e.__cache[a]={});e.__cache[a][d]=f};e.GetData=function(a,d){var f=e.GetUniqueElementId(a);return d?e.__cache[f]?null!=e.__cache[f][d]?e.__cache[f][d]:g(a).data(d):g(a).data(d):e.__cache[f]};e.RemoveData=function(a){a=e.GetUniqueElementId(a);
|
|
null!=e.__cache[a]&&delete e.__cache[a]};return e});q.define("select2/results",["jquery","./utils"],function(g,k){function e(c,b,a){this.$element=c;this.data=a;this.options=b;e.__super__.constructor.call(this)}k.Extend(e,k.Observable);e.prototype.render=function(){var c=g('<ul class="select2-results__options" role="tree"></ul>');this.options.get("multiple")&&c.attr("aria-multiselectable","true");return this.$results=c};e.prototype.clear=function(){this.$results.empty()};e.prototype.displayMessage=
|
|
function(c){var b=this.options.get("escapeMarkup");this.clear();this.hideLoading();var a=g('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),d=this.options.get("translations").get(c.message);a.append(b(d(c.args)));a[0].className+=" select2-results__message";this.$results.append(a)};e.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};e.prototype.append=function(c){this.hideLoading();var b=[];if(null==c.results||0===c.results.length)0===
|
|
this.$results.children().length&&this.trigger("results:message",{message:"noResults"});else{c.results=this.sort(c.results);for(var a=0;a<c.results.length;a++){var d=this.option(c.results[a]);b.push(d)}this.$results.append(b)}};e.prototype.position=function(c,b){b.find(".select2-results").append(c)};e.prototype.sort=function(c){return this.options.get("sorter")(c)};e.prototype.highlightFirstItem=function(){var c=this.$results.find(".select2-results__option[aria-selected]"),b=c.filter("[aria-selected=true]");
|
|
0<b.length?b.first().trigger("mouseenter"):c.first().trigger("mouseenter");this.ensureHighlightVisible()};e.prototype.setClasses=function(){var c=this;this.data.current(function(b){var a=g.map(b,function(d){return d.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var d=g(this),f=k.GetData(this,"data"),h=""+f.id;null!=f.element&&f.element.selected||null==f.element&&-1<g.inArray(h,a)?d.attr("aria-selected","true"):d.attr("aria-selected","false")})})};e.prototype.showLoading=
|
|
function(c){this.hideLoading();c={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(c)};c=this.option(c);c.className+=" loading-results";this.$results.prepend(c)};e.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};e.prototype.option=function(c){var b=document.createElement("li");b.className="select2-results__option";var a={role:"treeitem","aria-selected":"false"};c.disabled&&(delete a["aria-selected"],a["aria-disabled"]="true");null==c.id&&
|
|
delete a["aria-selected"];null!=c._resultId&&(b.id=c._resultId);c.title&&(b.title=c.title);c.children&&(a.role="group",a["aria-label"]=c.text,delete a["aria-selected"]);for(var d in a)b.setAttribute(d,a[d]);if(c.children){a=g(b);d=document.createElement("strong");d.className="select2-results__group";g(d);this.template(c,d);for(var f=[],h=0;h<c.children.length;h++){var l=this.option(c.children[h]);f.push(l)}h=g("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});h.append(f);
|
|
a.append(d);a.append(h)}else this.template(c,b);k.StoreData(b,"data",c);return b};e.prototype.bind=function(c,b){var a=this;this.$results.attr("id",c.id+"-results");c.on("results:all",function(d){a.clear();a.append(d.data);c.isOpen()&&(a.setClasses(),a.highlightFirstItem())});c.on("results:append",function(d){a.append(d.data);c.isOpen()&&a.setClasses()});c.on("query",function(d){a.hideMessages();a.showLoading(d)});c.on("select",function(){c.isOpen()&&(a.setClasses(),a.highlightFirstItem())});c.on("unselect",
|
|
function(){c.isOpen()&&(a.setClasses(),a.highlightFirstItem())});c.on("open",function(){a.$results.attr("aria-expanded","true");a.$results.attr("aria-hidden","false");a.setClasses();a.ensureHighlightVisible()});c.on("close",function(){a.$results.attr("aria-expanded","false");a.$results.attr("aria-hidden","true");a.$results.removeAttr("aria-activedescendant")});c.on("results:toggle",function(){var d=a.getHighlightedResults();0!==d.length&&d.trigger("mouseup")});c.on("results:select",function(){var d=
|
|
a.getHighlightedResults();if(0!==d.length){var f=k.GetData(d[0],"data");"true"==d.attr("aria-selected")?a.trigger("close",{}):a.trigger("select",{data:f})}});c.on("results:previous",function(){var d=a.getHighlightedResults(),f=a.$results.find("[aria-selected]"),h=f.index(d);if(!(0>=h)){--h;0===d.length&&(h=0);f=f.eq(h);f.trigger("mouseenter");d=a.$results.offset().top;f=f.offset().top;var l=a.$results.scrollTop()+(f-d);0===h?a.$results.scrollTop(0):0>f-d&&a.$results.scrollTop(l)}});c.on("results:next",
|
|
function(){var d=a.getHighlightedResults(),f=a.$results.find("[aria-selected]");d=f.index(d)+1;if(!(d>=f.length)){var h=f.eq(d);h.trigger("mouseenter");f=a.$results.offset().top+a.$results.outerHeight(!1);h=h.offset().top+h.outerHeight(!1);var l=a.$results.scrollTop()+h-f;0===d?a.$results.scrollTop(0):h>f&&a.$results.scrollTop(l)}});c.on("results:focus",function(d){d.element.addClass("select2-results__option--highlighted")});c.on("results:message",function(d){a.displayMessage(d)});if(g.fn.mousewheel)this.$results.on("mousewheel",
|
|
function(d){var f=a.$results.scrollTop(),h=a.$results.get(0).scrollHeight-f+d.deltaY;f=0<d.deltaY&&0>=f-d.deltaY;h=0>d.deltaY&&h<=a.$results.height();f?(a.$results.scrollTop(0),d.preventDefault(),d.stopPropagation()):h&&(a.$results.scrollTop(a.$results.get(0).scrollHeight-a.$results.height()),d.preventDefault(),d.stopPropagation())});this.$results.on("mouseup",".select2-results__option[aria-selected]",function(d){var f=g(this),h=k.GetData(this,"data");"true"===f.attr("aria-selected")?a.options.get("multiple")?
|
|
a.trigger("unselect",{originalEvent:d,data:h}):a.trigger("close",{}):a.trigger("select",{originalEvent:d,data:h})});this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(d){d=k.GetData(this,"data");a.getHighlightedResults().removeClass("select2-results__option--highlighted");a.trigger("results:focus",{data:d,element:g(this)})})};e.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")};e.prototype.destroy=function(){this.$results.remove()};
|
|
e.prototype.ensureHighlightVisible=function(){var c=this.getHighlightedResults();if(0!==c.length){var b=this.$results.find("[aria-selected]").index(c),a=this.$results.offset().top,d=c.offset().top,f=this.$results.scrollTop()+(d-a);a=d-a;f-=2*c.outerHeight(!1);2>=b?this.$results.scrollTop(0):(a>this.$results.outerHeight()||0>a)&&this.$results.scrollTop(f)}};e.prototype.template=function(c,b){var a=this.options.get("templateResult"),d=this.options.get("escapeMarkup");c=a(c,b);null==c?b.style.display=
|
|
"none":"string"===typeof c?b.innerHTML=d(c):g(b).append(c)};return e});q.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}});q.define("select2/selection/base",["jquery","../utils","../keys"],function(g,k,e){function c(b,a){this.$element=b;this.options=a;c.__super__.constructor.call(this)}k.Extend(c,k.Observable);c.prototype.render=function(){var b=g('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');
|
|
this._tabindex=0;null!=k.GetData(this.$element[0],"old-tabindex")?this._tabindex=k.GetData(this.$element[0],"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);return this.$selection=b};c.prototype.bind=function(b,a){var d=this,f=b.id+"-results";this.container=b;this.$selection.on("focus",function(h){d.trigger("focus",h)});this.$selection.on("blur",function(h){d._handleBlur(h)});
|
|
this.$selection.on("keydown",function(h){d.trigger("keypress",h);h.which===e.SPACE&&h.preventDefault()});b.on("results:focus",function(h){d.$selection.attr("aria-activedescendant",h.data._resultId)});b.on("selection:update",function(h){d.update(h.data)});b.on("open",function(){d.$selection.attr("aria-expanded","true");d.$selection.attr("aria-owns",f);d._attachCloseHandler(b)});b.on("close",function(){d.$selection.attr("aria-expanded","false");d.$selection.removeAttr("aria-activedescendant");d.$selection.removeAttr("aria-owns");
|
|
d.$selection.focus();window.setTimeout(function(){d.$selection.focus()},0);d._detachCloseHandler(b)});b.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)});b.on("disable",function(){d.$selection.attr("tabindex","-1")})};c.prototype._handleBlur=function(b){var a=this;window.setTimeout(function(){document.activeElement==a.$selection[0]||g.contains(a.$selection[0],document.activeElement)||a.trigger("blur",b)},1)};c.prototype._attachCloseHandler=function(b){g(document.body).on("mousedown.select2."+
|
|
b.id,function(a){var d=g(a.target).closest(".select2");g(".select2.select2-container--open").each(function(){g(this);this!=d[0]&&k.GetData(this,"element").select2("close")})})};c.prototype._detachCloseHandler=function(b){g(document.body).off("mousedown.select2."+b.id)};c.prototype.position=function(b,a){a.find(".selection").append(b)};c.prototype.destroy=function(){this._detachCloseHandler(this.container)};c.prototype.update=function(b){throw Error("The `update` method must be defined in child classes.");
|
|
};return c});q.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(g,k,e,c){function b(){b.__super__.constructor.apply(this,arguments)}e.Extend(b,k);b.prototype.render=function(){var a=b.__super__.render.call(this);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>');return a};b.prototype.bind=function(a,d){var f=this;b.__super__.bind.apply(this,
|
|
arguments);var h=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",h).attr("role","textbox").attr("aria-readonly","true");this.$selection.attr("aria-labelledby",h);this.$selection.on("mousedown",function(l){1===l.which&&f.trigger("toggle",{originalEvent:l})});this.$selection.on("focus",function(l){});this.$selection.on("blur",function(l){});a.on("focus",function(l){a.isOpen()||f.$selection.focus()})};b.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");
|
|
a.empty();a.removeAttr("title")};b.prototype.display=function(a,d){var f=this.options.get("templateSelection");return this.options.get("escapeMarkup")(f(a,d))};b.prototype.selectionContainer=function(){return g("<span></span>")};b.prototype.update=function(a){if(0===a.length)this.clear();else{a=a[0];var d=this.$selection.find(".select2-selection__rendered"),f=this.display(a,d);d.empty().append(f);d.attr("title",a.title||a.text)}};return b});q.define("select2/selection/multiple",["jquery","./base",
|
|
"../utils"],function(g,k,e){function c(b,a){c.__super__.constructor.apply(this,arguments)}e.Extend(c,k);c.prototype.render=function(){var b=c.__super__.render.call(this);b.addClass("select2-selection--multiple");b.html('<ul class="select2-selection__rendered"></ul>');return b};c.prototype.bind=function(b,a){var d=this;c.__super__.bind.apply(this,arguments);this.$selection.on("click",function(f){d.trigger("toggle",{originalEvent:f})});this.$selection.on("click",".select2-selection__choice__remove",
|
|
function(f){if(!d.options.get("disabled")){var h=g(this).parent();h=e.GetData(h[0],"data");d.trigger("unselect",{originalEvent:f,data:h})}})};c.prototype.clear=function(){var b=this.$selection.find(".select2-selection__rendered");b.empty();b.removeAttr("title")};c.prototype.display=function(b,a){var d=this.options.get("templateSelection");return this.options.get("escapeMarkup")(d(b,a))};c.prototype.selectionContainer=function(){return g('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')};
|
|
c.prototype.update=function(b){this.clear();if(0!==b.length){for(var a=[],d=0;d<b.length;d++){var f=b[d],h=this.selectionContainer(),l=this.display(f,h);h.append(l);h.attr("title",f.title||f.text);e.StoreData(h[0],"data",f);a.push(h)}b=this.$selection.find(".select2-selection__rendered");e.appendMany(b,a)}};return c});q.define("select2/selection/placeholder",["../utils"],function(g){function k(e,c,b){this.placeholder=this.normalizePlaceholder(b.get("placeholder"));e.call(this,c,b)}k.prototype.normalizePlaceholder=
|
|
function(e,c){"string"===typeof c&&(c={id:"",text:c});return c};k.prototype.createPlaceholder=function(e,c){e=this.selectionContainer();e.html(this.display(c));e.addClass("select2-selection__placeholder").removeClass("select2-selection__choice");return e};k.prototype.update=function(e,c){var b=1==c.length&&c[0].id!=this.placeholder.id;if(1<c.length||b)return e.call(this,c);this.clear();e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)};return k});
|
|
q.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(g,k,e){function c(){}c.prototype.bind=function(b,a,d){var f=this;b.call(this,a,d);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(h){f._handleClear(h)});a.on("keypress",function(h){f._handleKeyboardClear(h,a)})};
|
|
c.prototype._handleClear=function(b,a){if(!this.options.get("disabled")&&(b=this.$selection.find(".select2-selection__clear"),0!==b.length)){a.stopPropagation();a=e.GetData(b[0],"data");b=this.$element.val();this.$element.val(this.placeholder.id);var d={data:a};this.trigger("clear",d);if(d.prevented)this.$element.val(b);else{for(var f=0;f<a.length;f++)if(d={data:a[f]},this.trigger("unselect",d),d.prevented){this.$element.val(b);return}this.$element.trigger("change");this.trigger("toggle",{})}}};c.prototype._handleKeyboardClear=
|
|
function(b,a,d){d.isOpen()||a.which!=k.DELETE&&a.which!=k.BACKSPACE||this._handleClear(a)};c.prototype.update=function(b,a){b.call(this,a);0<this.$selection.find(".select2-selection__placeholder").length||0===a.length||(b=g('<span class="select2-selection__clear">×</span>'),e.StoreData(b[0],"data",a),this.$selection.find(".select2-selection__rendered").prepend(b))};return c});q.define("select2/selection/search",["jquery","../utils","../keys"],function(g,k,e){function c(b,a,d){b.call(this,a,
|
|
d)}c.prototype.render=function(b){var a=g('<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="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=a;this.$search=a.find("input");b=b.call(this);this._transferTabIndex();return b};c.prototype.bind=function(b,a,d){var f=this;b.call(this,a,d);a.on("open",function(){f.$search.trigger("focus")});
|
|
a.on("close",function(){f.$search.val("");f.$search.removeAttr("aria-activedescendant");f.$search.trigger("focus")});a.on("enable",function(){f.$search.prop("disabled",!1);f._transferTabIndex()});a.on("disable",function(){f.$search.prop("disabled",!0)});a.on("focus",function(l){f.$search.trigger("focus")});a.on("results:focus",function(l){f.$search.attr("aria-activedescendant",l.id)});this.$selection.on("focusin",".select2-search--inline",function(l){f.trigger("focus",l)});this.$selection.on("focusout",
|
|
".select2-search--inline",function(l){f._handleBlur(l)});this.$selection.on("keydown",".select2-search--inline",function(l){l.stopPropagation();f.trigger("keypress",l);f._keyUpPrevented=l.isDefaultPrevented();if(l.which===e.BACKSPACE&&""===f.$search.val()){var p=f.$searchContainer.prev(".select2-selection__choice");0<p.length&&(p=k.GetData(p[0],"data"),f.searchRemoveChoice(p),l.preventDefault())}});var h=(b=document.documentMode)&&11>=b;this.$selection.on("input.searchcheck",".select2-search--inline",
|
|
function(l){h?f.$selection.off("input.search input.searchcheck"):f.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(l){if(h&&"input"===l.type)f.$selection.off("input.search input.searchcheck");else{var p=l.which;p!=e.SHIFT&&p!=e.CTRL&&p!=e.ALT&&p!=e.TAB&&f.handleSearch(l)}})};c.prototype._transferTabIndex=function(b){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")};c.prototype.createPlaceholder=
|
|
function(b,a){this.$search.attr("placeholder",a.text)};c.prototype.update=function(b,a){var d=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");b.call(this,a);this.$selection.find(".select2-selection__rendered").append(this.$searchContainer);this.resizeSearch();d&&(this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus())};c.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",
|
|
{term:b})}this._keyUpPrevented=!1};c.prototype.searchRemoveChoice=function(b,a){this.trigger("unselect",{data:a});this.$search.val(a.text);this.handleSearch()};c.prototype.resizeSearch=function(){this.$search.css("width","25px");var b=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em";this.$search.css("width",b)};return c});q.define("select2/selection/eventRelay",["jquery"],function(g){function k(){}k.prototype.bind=
|
|
function(e,c,b){var a=this,d="open opening close closing select selecting unselect unselecting clear clearing".split(" "),f=["opening","closing","selecting","unselecting","clearing"];e.call(this,c,b);c.on("*",function(h,l){if(-1!==g.inArray(h,d)){l=l||{};var p=g.Event("select2:"+h,{params:l});a.$element.trigger(p);-1!==g.inArray(h,f)&&(l.prevented=p.isDefaultPrevented())}})};return k});q.define("select2/translation",["jquery","require"],function(g,k){function e(c){this.dict=c||{}}e.prototype.all=
|
|
function(){return this.dict};e.prototype.get=function(c){return this.dict[c]};e.prototype.extend=function(c){this.dict=g.extend({},c.all(),this.dict)};e._cache={};e.loadPath=function(c){if(!(c in e._cache)){var b=k(c);e._cache[c]=b}return new e(e._cache[c])};return e});q.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\u00c0":"A","\u00c1":"A","\u00c2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\u00c3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A",
|
|
"\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\u00c4":"A","\u01de":"A","\u1ea2":"A","\u00c5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\u00c6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C",
|
|
"\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u00c7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\u00c8":"E","\u00c9":"E","\u00ca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E",
|
|
"\u0114":"E","\u0116":"E","\u00cb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H",
|
|
"\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\u00cc":"I","\u00cd":"I","\u00ce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\u00cf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K",
|
|
"\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\u00d1":"N","\u1e44":"N","\u0147":"N",
|
|
"\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\u00d2":"O","\u00d3":"O","\u00d4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\u00d5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\u00d6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O",
|
|
"\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\u00d8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R",
|
|
"\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U",
|
|
"\uff35":"U","\u00d9":"U","\u00da":"U","\u00db":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\u00dc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V",
|
|
"\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\u00dd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z",
|
|
"\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\u00e0":"a","\u00e1":"a","\u00e2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\u00e3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\u00e4":"a","\u01df":"a","\u1ea3":"a","\u00e5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\u00e6":"ae","\u01fd":"ae",
|
|
"\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u00e7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d",
|
|
"\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\u00e8":"e","\u00e9":"e","\u00ea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\u00eb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g",
|
|
"\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\u00ec":"i","\u00ed":"i","\u00ee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\u00ef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i",
|
|
"\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l",
|
|
"\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\u00f1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\u00f2":"o","\u00f3":"o","\u00f4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\u00f5":"o",
|
|
"\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\u00f6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\u00f8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p",
|
|
"\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\u00df":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s",
|
|
"\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\u00f9":"u","\u00fa":"u","\u00fb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\u00fc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u",
|
|
"\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y",
|
|
"\u00fd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\u00ff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1",
|
|
"\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"}});q.define("select2/data/base",["../utils"],function(g){function k(e,c){k.__super__.constructor.call(this)}g.Extend(k,g.Observable);k.prototype.current=function(e){throw Error("The `current` method must be defined in child classes.");};k.prototype.query=function(e,c){throw Error("The `query` method must be defined in child classes.");
|
|
};k.prototype.bind=function(e,c){};k.prototype.destroy=function(){};k.prototype.generateResultId=function(e,c){e=e.id+"-result-";e+=g.generateChars(4);return e=null!=c.id?e+("-"+c.id.toString()):e+("-"+g.generateChars(4))};return k});q.define("select2/data/select",["./base","../utils","jquery"],function(g,k,e){function c(b,a){this.$element=b;this.options=a;c.__super__.constructor.call(this)}k.Extend(c,g);c.prototype.current=function(b){var a=[],d=this;this.$element.find(":selected").each(function(){var f=
|
|
e(this);f=d.item(f);a.push(f)});b(a)};c.prototype.select=function(b){var a=this;b.selected=!0;e(b.element).is("option")?(b.element.selected=!0,this.$element.trigger("change")):this.$element.prop("multiple")?this.current(function(d){var f=[];b=[b];b.push.apply(b,d);for(d=0;d<b.length;d++){var h=b[d].id;-1===e.inArray(h,f)&&f.push(h)}a.$element.val(f);a.$element.trigger("change")}):(this.$element.val(b.id),this.$element.trigger("change"))};c.prototype.unselect=function(b){var a=this;this.$element.prop("multiple")&&
|
|
(b.selected=!1,e(b.element).is("option")?(b.element.selected=!1,this.$element.trigger("change")):this.current(function(d){for(var f=[],h=0;h<d.length;h++){var l=d[h].id;l!==b.id&&-1===e.inArray(l,f)&&f.push(l)}a.$element.val(f);a.$element.trigger("change")}))};c.prototype.bind=function(b,a){var d=this;this.container=b;b.on("select",function(f){d.select(f.data)});b.on("unselect",function(f){d.unselect(f.data)})};c.prototype.destroy=function(){this.$element.find("*").each(function(){k.RemoveData(this)})};
|
|
c.prototype.query=function(b,a){var d=[],f=this;this.$element.children().each(function(){var h=e(this);if(h.is("option")||h.is("optgroup"))h=f.item(h),h=f.matches(b,h),null!==h&&d.push(h)});a({results:d})};c.prototype.addOptions=function(b){k.appendMany(this.$element,b)};c.prototype.option=function(b){if(b.children){var a=document.createElement("optgroup");a.label=b.text}else a=document.createElement("option"),void 0!==a.textContent?a.textContent=b.text:a.innerText=b.text;void 0!==b.id&&(a.value=
|
|
b.id);b.disabled&&(a.disabled=!0);b.selected&&(a.selected=!0);b.title&&(a.title=b.title);var d=e(a);b=this._normalizeItem(b);b.element=a;k.StoreData(a,"data",b);return d};c.prototype.item=function(b){var a=k.GetData(b[0],"data");if(null!=a)return a;if(b.is("option"))a={id:b.val(),text:b.text(),disabled:b.prop("disabled"),selected:b.prop("selected"),title:b.prop("title")};else if(b.is("optgroup")){a={text:b.prop("label"),children:[],title:b.prop("title")};for(var d=b.children("option"),f=[],h=0;h<
|
|
d.length;h++){var l=e(d[h]);l=this.item(l);f.push(l)}a.children=f}a=this._normalizeItem(a);a.element=b[0];k.StoreData(b[0],"data",a);return a};c.prototype._normalizeItem=function(b){b!==Object(b)&&(b={id:b,text:b});b=e.extend({},{text:""},b);null!=b.id&&(b.id=b.id.toString());null!=b.text&&(b.text=b.text.toString());null==b._resultId&&b.id&&null!=this.container&&(b._resultId=this.generateResultId(this.container,b));return e.extend({},{selected:!1,disabled:!1},b)};c.prototype.matches=function(b,a){return this.options.get("matcher")(b,
|
|
a)};return c});q.define("select2/data/array",["./select","../utils","jquery"],function(g,k,e){function c(b,a){var d=a.get("data")||[];c.__super__.constructor.call(this,b,a);this.addOptions(this.convertToOptions(d))}k.Extend(c,g);c.prototype.select=function(b){var a=this.$element.find("option").filter(function(d,f){return f.value==b.id.toString()});0===a.length&&(a=this.option(b),this.addOptions(a));c.__super__.select.call(this,b)};c.prototype.convertToOptions=function(b){function a(A){return function(){return e(this).val()==
|
|
A.id}}for(var d=this,f=this.$element.find("option"),h=f.map(function(){return d.item(e(this)).id}).get(),l=[],p=0;p<b.length;p++){var r=this._normalizeItem(b[p]);if(0<=e.inArray(r.id,h)){var y=f.filter(a(r)),B=this.item(y);r=e.extend(!0,{},r,B);r=this.option(r);y.replaceWith(r)}else y=this.option(r),r.children&&(r=this.convertToOptions(r.children),k.appendMany(y,r)),l.push(y)}return l};return c});q.define("select2/data/ajax",["./array","../utils","jquery"],function(g,k,e){function c(b,a){this.ajaxOptions=
|
|
this._applyDefaults(a.get("ajax"));null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults);c.__super__.constructor.call(this,b,a)}k.Extend(c,g);c.prototype._applyDefaults=function(b){return e.extend({},{data:function(a){return e.extend({},a,{q:a.term})},transport:function(a,d,f){a=e.ajax(a);a.then(d);a.fail(f);return a}},b,!0)};c.prototype.processResults=function(b){return b};c.prototype.query=function(b,a){function d(){var l=h.transport(h,function(p){p=f.processResults(p,
|
|
b);f.options.get("debug")&&window.console&&console.error&&(p&&p.results&&e.isArray(p.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response."));a(p)},function(){"status"in l&&(0===l.status||"0"===l.status)||f.trigger("results:message",{message:"errorLoading"})});f._request=l}var f=this;null!=this._request&&(e.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var h=e.extend({type:"GET"},this.ajaxOptions);"function"===
|
|
typeof h.url&&(h.url=h.url.call(this.$element,b));"function"===typeof h.data&&(h.data=h.data.call(this.$element,b));this.ajaxOptions.delay&&null!=b.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()};return c});q.define("select2/data/tags",["jquery"],function(g){function k(e,c,b){var a=b.get("tags"),d=b.get("createTag");void 0!==d&&(this.createTag=d);d=b.get("insertTag");void 0!==d&&(this.insertTag=d);e.call(this,c,
|
|
b);if(g.isArray(a))for(e=0;e<a.length;e++)c=this._normalizeItem(a[e]),c=this.option(c),this.$element.append(c)}k.prototype.query=function(e,c,b){function a(f,h){for(var l=f.results,p=0;p<l.length;p++){var r=l[p],y=null!=r.children&&!a({results:r.children},!0);r=(r.text||"").toUpperCase();var B=(c.term||"").toUpperCase();if(r===B||y){if(h)return!1;f.data=l;b(f);return}}if(h)return!0;h=d.createTag(c);null!=h&&(p=d.option(h),p.attr("data-select2-tag",!0),d.addOptions([p]),d.insertTag(l,h));f.results=
|
|
l;b(f)}var d=this;this._removeOldTags();null==c.term||null!=c.page?e.call(this,c,b):e.call(this,c,a)};k.prototype.createTag=function(e,c){e=g.trim(c.term);return""===e?null:{id:e,text:e}};k.prototype.insertTag=function(e,c,b){c.unshift(b)};k.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||g(this).remove()})};return k});q.define("select2/data/tokenizer",["jquery"],function(g){function k(e,c,b){var a=b.get("tokenizer");void 0!==a&&(this.tokenizer=
|
|
a);e.call(this,c,b)}k.prototype.bind=function(e,c,b){e.call(this,c,b);this.$search=c.dropdown.$search||c.selection.$search||b.find(".select2-search__field")};k.prototype.query=function(e,c,b){var a=this;c.term=c.term||"";var d=this.tokenizer(c,this.options,function(f){var h=a._normalizeItem(f);a.$element.find("option").filter(function(){return g(this).val()===h.id}).length||(f=a.option(h),f.attr("data-select2-tag",!0),a._removeOldTags(),a.addOptions([f]));a.trigger("select",{data:h})});d.term!==c.term&&
|
|
(this.$search.length&&(this.$search.val(d.term),this.$search.focus()),c.term=d.term);e.call(this,c,b)};k.prototype.tokenizer=function(e,c,b,a){e=b.get("tokenSeparators")||[];b=c.term;for(var d=0,f=this.createTag||function(l){return{id:l.term,text:l.term}};d<b.length;)if(-1===g.inArray(b[d],e))d++;else{var h=b.substr(0,d);h=g.extend({},c,{term:h});h=f(h);null==h?d++:(a(h),b=b.substr(d+1)||"",d=0)}return{term:b}};return k});q.define("select2/data/minimumInputLength",[],function(){function g(k,e,c){this.minimumInputLength=
|
|
c.get("minimumInputLength");k.call(this,e,c)}g.prototype.query=function(k,e,c){e.term=e.term||"";e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):k.call(this,e,c)};return g});q.define("select2/data/maximumInputLength",[],function(){function g(k,e,c){this.maximumInputLength=c.get("maximumInputLength");k.call(this,e,c)}g.prototype.query=function(k,e,c){e.term=e.term||"";0<this.maximumInputLength&&
|
|
e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):k.call(this,e,c)};return g});q.define("select2/data/maximumSelectionLength",[],function(){function g(k,e,c){this.maximumSelectionLength=c.get("maximumSelectionLength");k.call(this,e,c)}g.prototype.query=function(k,e,c){var b=this;this.current(function(a){a=null!=a?a.length:0;0<b.maximumSelectionLength&&a>=b.maximumSelectionLength?b.trigger("results:message",
|
|
{message:"maximumSelected",args:{maximum:b.maximumSelectionLength}}):k.call(b,e,c)})};return g});q.define("select2/dropdown",["jquery","./utils"],function(g,k){function e(c,b){this.$element=c;this.options=b;e.__super__.constructor.call(this)}k.Extend(e,k.Observable);e.prototype.render=function(){var c=g('<span class="select2-dropdown"><span class="select2-results"></span></span>');c.attr("dir",this.options.get("dir"));return this.$dropdown=c};e.prototype.bind=function(){};e.prototype.position=function(c,
|
|
b){};e.prototype.destroy=function(){this.$dropdown.remove()};return e});q.define("select2/dropdown/search",["jquery","../utils"],function(g,k){function e(){}e.prototype.render=function(c){c=c.call(this);var b=g('<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="textbox" /></span>');this.$searchContainer=b;this.$search=b.find("input");c.prepend(b);
|
|
return c};e.prototype.bind=function(c,b,a){var d=this;c.call(this,b,a);this.$search.on("keydown",function(f){d.trigger("keypress",f);d._keyUpPrevented=f.isDefaultPrevented()});this.$search.on("input",function(f){g(this).off("keyup")});this.$search.on("keyup input",function(f){d.handleSearch(f)});b.on("open",function(){d.$search.attr("tabindex",0);d.$search.focus();window.setTimeout(function(){d.$search.focus()},0)});b.on("close",function(){d.$search.attr("tabindex",-1);d.$search.val("");d.$search.blur()});
|
|
b.on("focus",function(){b.isOpen()||d.$search.focus()});b.on("results:all",function(f){if(null==f.query.term||""===f.query.term)d.showSearch(f)?d.$searchContainer.removeClass("select2-search--hide"):d.$searchContainer.addClass("select2-search--hide")})};e.prototype.handleSearch=function(c){this._keyUpPrevented||(c=this.$search.val(),this.trigger("query",{term:c}));this._keyUpPrevented=!1};e.prototype.showSearch=function(c,b){return!0};return e});q.define("select2/dropdown/hidePlaceholder",[],function(){function g(k,
|
|
e,c,b){this.placeholder=this.normalizePlaceholder(c.get("placeholder"));k.call(this,e,c,b)}g.prototype.append=function(k,e){e.results=this.removePlaceholder(e.results);k.call(this,e)};g.prototype.normalizePlaceholder=function(k,e){"string"===typeof e&&(e={id:"",text:e});return e};g.prototype.removePlaceholder=function(k,e){k=e.slice(0);for(var c=e.length-1;0<=c;c--)this.placeholder.id===e[c].id&&k.splice(c,1);return k};return g});q.define("select2/dropdown/infiniteScroll",["jquery"],function(g){function k(e,
|
|
c,b,a){this.lastParams={};e.call(this,c,b,a);this.$loadingMore=this.createLoadingMore();this.loading=!1}k.prototype.append=function(e,c){this.$loadingMore.remove();this.loading=!1;e.call(this,c);this.showLoadingMore(c)&&this.$results.append(this.$loadingMore)};k.prototype.bind=function(e,c,b){var a=this;e.call(this,c,b);c.on("query",function(d){a.lastParams=d;a.loading=!0});c.on("query:append",function(d){a.lastParams=d;a.loading=!0});this.$results.on("scroll",function(){var d=g.contains(document.documentElement,
|
|
a.$loadingMore[0]);if(!a.loading&&d){d=a.$results.offset().top+a.$results.outerHeight(!1);var f=a.$loadingMore.offset().top+a.$loadingMore.outerHeight(!1);d+50>=f&&a.loadMore()}})};k.prototype.loadMore=function(){this.loading=!0;var e=g.extend({},{page:1},this.lastParams);e.page++;this.trigger("query:append",e)};k.prototype.showLoadingMore=function(e,c){return c.pagination&&c.pagination.more};k.prototype.createLoadingMore=function(){var e=g('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),
|
|
c=this.options.get("translations").get("loadingMore");e.html(c(this.lastParams));return e};return k});q.define("select2/dropdown/attachBody",["jquery","../utils"],function(g,k){function e(c,b,a){this.$dropdownParent=a.get("dropdownParent")||g(document.body);c.call(this,b,a)}e.prototype.bind=function(c,b,a){var d=this,f=!1;c.call(this,b,a);b.on("open",function(){d._showDropdown();d._attachPositioningHandler(b);f||(f=!0,b.on("results:all",function(){d._positionDropdown();d._resizeDropdown()}),b.on("results:append",
|
|
function(){d._positionDropdown();d._resizeDropdown()}))});b.on("close",function(){d._hideDropdown();d._detachPositioningHandler(b)});this.$dropdownContainer.on("mousedown",function(h){h.stopPropagation()})};e.prototype.destroy=function(c){c.call(this);this.$dropdownContainer.remove()};e.prototype.position=function(c,b,a){b.attr("class",a.attr("class"));b.removeClass("select2");b.addClass("select2-container--open");b.css({position:"absolute",top:-999999});this.$container=a};e.prototype.render=function(c){var b=
|
|
g("<span></span>");c=c.call(this);b.append(c);return this.$dropdownContainer=b};e.prototype._hideDropdown=function(c){this.$dropdownContainer.detach()};e.prototype._attachPositioningHandler=function(c,b){var a=this;c="scroll.select2."+b.id;var d="resize.select2."+b.id;b="orientationchange.select2."+b.id;var f=this.$container.parents().filter(k.hasScroll);f.each(function(){k.StoreData(this,"select2-scroll-position",{x:g(this).scrollLeft(),y:g(this).scrollTop()})});f.on(c,function(h){a._positionDropdown()});
|
|
g(window).on(c+" "+d+" "+b,function(h){a._positionDropdown();a._resizeDropdown()})};e.prototype._detachPositioningHandler=function(c,b){c="scroll.select2."+b.id;var a="resize.select2."+b.id;b="orientationchange.select2."+b.id;this.$container.parents().filter(k.hasScroll).off(c);g(window).off(c+" "+a+" "+b)};e.prototype._positionDropdown=function(){var c=g(window),b=this.$dropdown.hasClass("select2-dropdown--above"),a=this.$dropdown.hasClass("select2-dropdown--below"),d=null,f=this.$container.offset();
|
|
f.bottom=f.top+this.$container.outerHeight(!1);var h=this.$container.outerHeight(!1);var l=f.top;var p=f.top+h;h=this.$dropdown.outerHeight(!1);var r=c.scrollTop(),y=c.scrollTop()+c.height();c=r<f.top-h;r=y>f.bottom+h;f={left:f.left,top:p};p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());p=p.offset();f.top-=p.top;f.left-=p.left;b||a||(d="below");r||!c||b?!c&&r&&b&&(d="below"):d="above";if("above"==d||b&&"below"!==d)f.top=l-p.top-h;null!=d&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+
|
|
d),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+d));this.$dropdownContainer.css(f)};e.prototype._resizeDropdown=function(){var c={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(c.minWidth=c.width,c.position="relative",c.width="auto");this.$dropdown.css(c)};e.prototype._showDropdown=function(c){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};
|
|
return e});q.define("select2/dropdown/minimumResultsForSearch",[],function(){function g(e){for(var c=0,b=0;b<e.length;b++){var a=e[b];a.children?c+=g(a.children):c++}return c}function k(e,c,b,a){this.minimumResultsForSearch=b.get("minimumResultsForSearch");0>this.minimumResultsForSearch&&(this.minimumResultsForSearch=Infinity);e.call(this,c,b,a)}k.prototype.showSearch=function(e,c){return g(c.data.results)<this.minimumResultsForSearch?!1:e.call(this,c)};return k});q.define("select2/dropdown/selectOnClose",
|
|
["../utils"],function(g){function k(){}k.prototype.bind=function(e,c,b){var a=this;e.call(this,c,b);c.on("close",function(d){a._handleSelectOnClose(d)})};k.prototype._handleSelectOnClose=function(e,c){if(c&&null!=c.originalSelect2Event&&(e=c.originalSelect2Event,"select"===e._type||"unselect"===e._type))return;e=this.getHighlightedResults();1>e.length||(e=g.GetData(e[0],"data"),null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e}))};return k});q.define("select2/dropdown/closeOnSelect",
|
|
[],function(){function g(){}g.prototype.bind=function(k,e,c){var b=this;k.call(this,e,c);e.on("select",function(a){b._selectTriggered(a)});e.on("unselect",function(a){b._selectTriggered(a)})};g.prototype._selectTriggered=function(k,e){(k=e.originalEvent)&&k.ctrlKey||this.trigger("close",{originalEvent:k,originalSelect2Event:e})};return g});q.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(g){g=g.input.length-g.maximum;
|
|
var k="Please delete "+g+" character";1!=g&&(k+="s");return k},inputTooShort:function(g){return"Please enter "+(g.minimum-g.input.length)+" or more characters"},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(g){var k="You can only select "+g.maximum+" item";1!=g.maximum&&(k+="s");return k},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"}}});q.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".split(" "),
|
|
function(g,k,e,c,b,a,d,f,h,l,p,r,y,B,A,N,M,L,H,R,O,Q,n,t,v,E,G,K,x){function I(){this.reset()}I.prototype.apply=function(m){m=g.extend(!0,{},this.defaults,m);if(null==m.dataAdapter){m.dataAdapter=null!=m.ajax?A:null!=m.data?B:y;0<m.minimumInputLength&&(m.dataAdapter=l.Decorate(m.dataAdapter,L));0<m.maximumInputLength&&(m.dataAdapter=l.Decorate(m.dataAdapter,H));0<m.maximumSelectionLength&&(m.dataAdapter=l.Decorate(m.dataAdapter,R));m.tags&&(m.dataAdapter=l.Decorate(m.dataAdapter,N));if(null!=m.tokenSeparators||
|
|
null!=m.tokenizer)m.dataAdapter=l.Decorate(m.dataAdapter,M);if(null!=m.query){var C=k(m.amdBase+"compat/query");m.dataAdapter=l.Decorate(m.dataAdapter,C)}null!=m.initSelection&&(C=k(m.amdBase+"compat/initSelection"),m.dataAdapter=l.Decorate(m.dataAdapter,C))}null==m.resultsAdapter&&(m.resultsAdapter=e,null!=m.ajax&&(m.resultsAdapter=l.Decorate(m.resultsAdapter,t)),null!=m.placeholder&&(m.resultsAdapter=l.Decorate(m.resultsAdapter,n)),m.selectOnClose&&(m.resultsAdapter=l.Decorate(m.resultsAdapter,
|
|
G)));if(null==m.dropdownAdapter){m.multiple?m.dropdownAdapter=O:(C=l.Decorate(O,Q),m.dropdownAdapter=C);0!==m.minimumResultsForSearch&&(m.dropdownAdapter=l.Decorate(m.dropdownAdapter,E));m.closeOnSelect&&(m.dropdownAdapter=l.Decorate(m.dropdownAdapter,K));if(null!=m.dropdownCssClass||null!=m.dropdownCss||null!=m.adaptDropdownCssClass)C=k(m.amdBase+"compat/dropdownCss"),m.dropdownAdapter=l.Decorate(m.dropdownAdapter,C);m.dropdownAdapter=l.Decorate(m.dropdownAdapter,v)}if(null==m.selectionAdapter){m.selectionAdapter=
|
|
m.multiple?b:c;null!=m.placeholder&&(m.selectionAdapter=l.Decorate(m.selectionAdapter,a));m.allowClear&&(m.selectionAdapter=l.Decorate(m.selectionAdapter,d));m.multiple&&(m.selectionAdapter=l.Decorate(m.selectionAdapter,f));if(null!=m.containerCssClass||null!=m.containerCss||null!=m.adaptContainerCssClass)C=k(m.amdBase+"compat/containerCss"),m.selectionAdapter=l.Decorate(m.selectionAdapter,C);m.selectionAdapter=l.Decorate(m.selectionAdapter,h)}"string"===typeof m.language&&(0<m.language.indexOf("-")?
|
|
(C=m.language.split("-")[0],m.language=[m.language,C]):m.language=[m.language]);if(g.isArray(m.language)){C=new p;m.language.push("en");for(var D=m.language,F=0;F<D.length;F++){var J=D[F],P={};try{P=p.loadPath(J)}catch(S){try{J=this.defaults.amdLanguageBase+J,P=p.loadPath(J)}catch(T){m.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+J+'" could not be automatically loaded. A fallback will be used instead.');continue}}C.extend(P)}m.translations=C}else C=p.loadPath(this.defaults.amdLanguageBase+
|
|
"en"),D=new p(m.language),D.extend(C),m.translations=D;return m};I.prototype.reset=function(){function m(D){return D.replace(/[^\u0000-\u007E]/g,function(F){return r[F]||F})}function C(D,F){if(""===g.trim(D.term))return F;if(F.children&&0<F.children.length){for(var J=g.extend(!0,{},F),P=F.children.length-1;0<=P;P--)null==C(D,F.children[P])&&J.children.splice(P,1);return 0<J.children.length?J:C(D,J)}J=m(F.text).toUpperCase();D=m(D.term).toUpperCase();return-1<J.indexOf(D)?F:null}this.defaults={amdBase:"./",
|
|
amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:l.escapeMarkup,language:x,matcher:C,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(D){return D},templateResult:function(D){return D.text},templateSelection:function(D){return D.text},theme:"default",width:"resolve"}};I.prototype.set=function(m,C){m=g.camelCase(m);var D={};D[m]=C;C=l._convertData(D);g.extend(!0,this.defaults,C)};return new I});
|
|
q.define("select2/options",["require","jquery","./defaults","./utils"],function(g,k,e,c){function b(a,d){this.options=a;null!=d&&this.fromElement(d);this.options=e.apply(this.options);d&&d.is("input")&&(a=g(this.get("amdBase")+"compat/inputData"),this.options.dataAdapter=c.Decorate(this.options.dataAdapter,a))}b.prototype.fromElement=function(a){var d=["select2"];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);c.GetData(a[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.'),c.StoreData(a[0],"data",c.GetData(a[0],"select2Tags")),c.StoreData(a[0],"tags",!0));c.GetData(a[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."),
|
|
a.attr("ajax--url",c.GetData(a[0],"ajaxUrl")),c.StoreData(a[0],"ajax-Url",c.GetData(a[0],"ajaxUrl")));a=k.fn.jquery&&"1."==k.fn.jquery.substr(0,2)&&a[0].dataset?k.extend(!0,{},a[0].dataset,c.GetData(a[0])):c.GetData(a[0]);a=k.extend(!0,{},a);a=c._convertData(a);for(var f in a)-1<k.inArray(f,d)||(k.isPlainObject(this.options[f])?k.extend(this.options[f],a[f]):this.options[f]=a[f]);return this};b.prototype.get=function(a){return this.options[a]};b.prototype.set=function(a,d){this.options[a]=d};return b});
|
|
q.define("select2/core",["jquery","./options","./utils","./keys"],function(g,k,e,c){var b=function(a,d){null!=e.GetData(a[0],"select2")&&e.GetData(a[0],"select2").destroy();this.$element=a;this.id=this._generateId(a);d=d||{};this.options=new k(d,a);b.__super__.constructor.call(this);d=a.attr("tabindex")||0;e.StoreData(a[0],"old-tabindex",d);a.attr("tabindex","-1");this.dataAdapter=new (this.options.get("dataAdapter"))(a,this.options);d=this.render();this._placeContainer(d);this.selection=new (this.options.get("selectionAdapter"))(a,
|
|
this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,d);this.dropdown=new (this.options.get("dropdownAdapter"))(a,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,d);this.results=new (this.options.get("resultsAdapter"))(a,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var f=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();
|
|
this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(h){f.trigger("selection:update",{data:h})});a.addClass("select2-hidden-accessible");a.attr("aria-hidden","true");this._syncAttributes();e.StoreData(a[0],"select2",this);a.data("select2",this)};e.Extend(b,e.Observable);b.prototype._generateId=function(a){a=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+e.generateChars(2):e.generateChars(4);
|
|
a=a.replace(/(:|\.|\[|\]|,)/g,"");return"select2-"+a};b.prototype._placeContainer=function(a){a.insertAfter(this.$element);var d=this._resolveWidth(this.$element,this.options.get("width"));null!=d&&a.css("width",d)};b.prototype._resolveWidth=function(a,d){var f=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==d)return f=this._resolveWidth(a,"style"),null!=f?f:this._resolveWidth(a,"element");if("element"==d)return f=a.outerWidth(!1),0>=f?"auto":f+"px";if("style"==d){a=
|
|
a.attr("style");if("string"!==typeof a)return null;a=a.split(";");d=0;for(var h=a.length;d<h;d+=1){var l=a[d].replace(/\s/g,"").match(f);if(null!==l&&1<=l.length)return l[1]}return null}return d};b.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)};b.prototype._registerDomEvents=function(){var a=this;this.$element.on("change.select2",function(){a.dataAdapter.current(function(f){a.trigger("selection:update",
|
|
{data:f})})});this.$element.on("focus.select2",function(f){a.trigger("focus",f)});this._syncA=e.bind(this._syncAttributes,this);this._syncS=e.bind(this._syncSubtree,this);this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(f){g.each(f,a._syncA);g.each(f,a._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,
|
|
subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",a._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",a._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",a._syncS,!1))};b.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(d,f){a.trigger(d,f)})};b.prototype._registerSelectionEvents=function(){var a=this,d=["toggle","focus"];this.selection.on("toggle",function(){a.toggleDropdown()});this.selection.on("focus",
|
|
function(f){a.focus(f)});this.selection.on("*",function(f,h){-1===g.inArray(f,d)&&a.trigger(f,h)})};b.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(d,f){a.trigger(d,f)})};b.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(d,f){a.trigger(d,f)})};b.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")});this.on("close",function(){a.$container.removeClass("select2-container--open")});
|
|
this.on("enable",function(){a.$container.removeClass("select2-container--disabled")});this.on("disable",function(){a.$container.addClass("select2-container--disabled")});this.on("blur",function(){a.$container.removeClass("select2-container--focus")});this.on("query",function(d){a.isOpen()||a.trigger("open",{});this.dataAdapter.query(d,function(f){a.trigger("results:all",{data:f,query:d})})});this.on("query:append",function(d){this.dataAdapter.query(d,function(f){a.trigger("results:append",{data:f,
|
|
query:d})})});this.on("keypress",function(d){var f=d.which;if(a.isOpen())f===c.ESC||f===c.TAB||f===c.UP&&d.altKey?(a.close(),d.preventDefault()):f===c.ENTER?(a.trigger("results:select",{}),d.preventDefault()):f===c.SPACE&&d.ctrlKey?(a.trigger("results:toggle",{}),d.preventDefault()):f===c.UP?(a.trigger("results:previous",{}),d.preventDefault()):f===c.DOWN&&(a.trigger("results:next",{}),d.preventDefault());else{if(f===c.ENTER||f===c.SPACE||(f===c.DOWN||f===c.UP)&&d.altKey)a.open(),d.preventDefault();
|
|
f===c.DOWN&&(void 0!=this.$element.find("option:selected").next().val()&&(this.$element.val(this.$element.find("option:selected").next().val()),this.$element.trigger("change")),d.preventDefault());f===c.UP&&(void 0!=this.$element.find("option:selected").prev().val()&&(this.$element.val(this.$element.find("option:selected").prev().val()),this.$element.trigger("change")),d.preventDefault())}})};b.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",{})};b.prototype._syncSubtree=function(a,d){var f=!1,h=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(d)if(d.addedNodes&&0<d.addedNodes.length)for(a=0;a<d.addedNodes.length;a++)d.addedNodes[a].selected&&(f=!0);else d.removedNodes&&0<d.removedNodes.length&&(f=!0);else f=!0;f&&this.dataAdapter.current(function(l){h.trigger("selection:update",{data:l})})}};b.prototype.trigger=function(a,
|
|
d){var f=b.__super__.trigger,h={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};void 0===d&&(d={});if(a in h){var l={prevented:!1,name:a,args:d};f.call(this,h[a],l);if(l.prevented){d.prevented=!0;return}}f.call(this,a,d)};b.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())};b.prototype.open=function(){this.isOpen()||this.trigger("query",{})};b.prototype.close=function(){this.isOpen()&&this.trigger("close",
|
|
{})};b.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")};b.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")};b.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))};b.prototype.enable=function(a){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.');
|
|
if(null==a||0===a.length)a=[!0];this.$element.prop("disabled",!a[0])};b.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 a=[];this.dataAdapter.current(function(d){a=d});return a};b.prototype.val=function(a){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.');
|
|
if(null==a||0===a.length)return this.$element.val();a=a[0];g.isArray(a)&&(a=g.map(a,function(d){return d.toString()}));this.$element.val(a).trigger("change")};b.prototype.destroy=function(){this.$container.remove();this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA);null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",
|
|
this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1));this._syncS=this._syncA=null;this.$element.off(".select2");this.$element.attr("tabindex",e.GetData(this.$element[0],"old-tabindex"));this.$element.removeClass("select2-hidden-accessible");this.$element.attr("aria-hidden","false");e.RemoveData(this.$element[0]);this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.results=this.dropdown=
|
|
this.selection=this.dataAdapter=null};b.prototype.render=function(){var a=g('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');a.attr("dir",this.options.get("dir"));this.$container=a;this.$container.addClass("select2-container--"+this.options.get("theme"));e.StoreData(a[0],"element",this.$element);return a};return b});q.define("select2/compat/utils",["jquery"],function(g){return{syncCssClasses:function(k,e,c){var b,
|
|
a=[],d;(b=g.trim(k.attr("class")))&&g((""+b).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&a.push(this)});(b=g.trim(e.attr("class")))&&g((""+b).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(d=c(this),null!=d&&a.push(d))});k.attr("class",a.join(" "))}}});q.define("select2/compat/containerCss",["jquery","./utils"],function(g,k){function e(b){return null}function c(){}c.prototype.render=function(b){b=b.call(this);var a=this.options.get("containerCssClass")||"";g.isFunction(a)&&
|
|
(a=a(this.$element));var d=this.options.get("adaptContainerCssClass");d=d||e;if(-1!==a.indexOf(":all:")){a=a.replace(":all:","");var f=d;d=function(l){var p=f(l);return null!=p?p+" "+l:l}}var h=this.options.get("containerCss")||{};g.isFunction(h)&&(h=h(this.$element));k.syncCssClasses(b,this.$element,d);b.css(h);b.addClass(a);return b};return c});q.define("select2/compat/dropdownCss",["jquery","./utils"],function(g,k){function e(b){return null}function c(){}c.prototype.render=function(b){b=b.call(this);
|
|
var a=this.options.get("dropdownCssClass")||"";g.isFunction(a)&&(a=a(this.$element));var d=this.options.get("adaptDropdownCssClass");d=d||e;if(-1!==a.indexOf(":all:")){a=a.replace(":all:","");var f=d;d=function(l){var p=f(l);return null!=p?p+" "+l:l}}var h=this.options.get("dropdownCss")||{};g.isFunction(h)&&(h=h(this.$element));k.syncCssClasses(b,this.$element,d);b.css(h);b.addClass(a);return b};return c});q.define("select2/compat/initSelection",["jquery"],function(g){function k(e,c,b){b.get("debug")&&
|
|
window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2");this.initSelection=b.get("initSelection");this._isInitialized=!1;e.call(this,c,b)}k.prototype.current=function(e,c){var b=this;this._isInitialized?
|
|
e.call(this,c):this.initSelection.call(null,this.$element,function(a){b._isInitialized=!0;g.isArray(a)||(a=[a]);c(a)})};return k});q.define("select2/compat/inputData",["jquery","../utils"],function(g,k){function e(c,b,a){this._currentData=[];this._valueSeparator=a.get("valueSeparator")||",";"hidden"===b.prop("type")&&a.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead.");
|
|
c.call(this,b,a)}e.prototype.current=function(c,b){function a(f,h){var l=[];f.selected||-1!==g.inArray(f.id,h)?(f.selected=!0,l.push(f)):f.selected=!1;f.children&&l.push.apply(l,a(f.children,h));return l}c=[];for(var d=0;d<this._currentData.length;d++)c.push.apply(c,a(this._currentData[d],this.$element.val().split(this._valueSeparator)));b(c)};e.prototype.select=function(c,b){this.options.get("multiple")?(c=this.$element.val(),c+=this._valueSeparator+b.id,this.$element.val(c)):(this.current(function(a){g.map(a,
|
|
function(d){d.selected=!1})}),this.$element.val(b.id));this.$element.trigger("change")};e.prototype.unselect=function(c,b){var a=this;b.selected=!1;this.current(function(d){for(var f=[],h=0;h<d.length;h++){var l=d[h];b.id!=l.id&&f.push(l.id)}a.$element.val(f.join(a._valueSeparator));a.$element.trigger("change")})};e.prototype.query=function(c,b,a){c=[];for(var d=0;d<this._currentData.length;d++){var f=this.matches(b,this._currentData[d]);null!==f&&c.push(f)}a({results:c})};e.prototype.addOptions=
|
|
function(c,b){c=g.map(b,function(a){return k.GetData(a[0],"data")});this._currentData.push.apply(this._currentData,c)};return e});q.define("select2/compat/matcher",["jquery"],function(g){return function(k){return function(e,c){var b=g.extend(!0,{},c);if(null==e.term||""===g.trim(e.term))return b;if(c.children){for(var a=c.children.length-1;0<=a;a--){var d=c.children[a];k(e.term,d.text,d)||b.children.splice(a,1)}if(0<b.children.length)return b}return k(e.term,c.text,c)?b:null}}});q.define("select2/compat/query",
|
|
[],function(){function g(k,e,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2.");k.call(this,e,c)}g.prototype.query=function(k,e,c){e.callback=c;this.options.get("query").call(null,e)};return g});q.define("select2/dropdown/attachContainer",[],function(){function g(k,e,c){k.call(this,e,c)}g.prototype.position=
|
|
function(k,e,c){c.find(".dropdown-wrapper").append(e);e.addClass("select2-dropdown--below");c.addClass("select2-container--below")};return g});q.define("select2/dropdown/stopPropagation",[],function(){function g(){}g.prototype.bind=function(k,e,c){k.call(this,e,c);this.$dropdown.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(b){b.stopPropagation()})};return g});q.define("select2/selection/stopPropagation",
|
|
[],function(){function g(){}g.prototype.bind=function(k,e,c){k.call(this,e,c);this.$selection.on("blur change click dblclick focus focusin focusout input keydown keyup keypress mousedown mouseenter mouseleave mousemove mouseover mouseup search touchend touchstart",function(b){b.stopPropagation()})};return g});(function(g){"function"===typeof q.define&&q.define.amd?q.define("jquery-mousewheel",["jquery"],g):"object"===typeof exports?module.exports=g:g(u)})(function(g){function k(p){var r=p||window.event,
|
|
y=a.call(arguments,1),B=0,A=0,N=0,M=0;p=g.event.fix(r);p.type="mousewheel";"detail"in r&&(A=-1*r.detail);"wheelDelta"in r&&(A=r.wheelDelta);"wheelDeltaY"in r&&(A=r.wheelDeltaY);"wheelDeltaX"in r&&(B=-1*r.wheelDeltaX);"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(B=-1*A,A=0);var L=0===A?B:A;"deltaY"in r&&(L=A=-1*r.deltaY);"deltaX"in r&&(B=r.deltaX,0===A&&(L=-1*B));if(0!==A||0!==B){if(1===r.deltaMode){var H=g.data(this,"mousewheel-line-height");L*=H;A*=H;B*=H}else 2===r.deltaMode&&(H=g.data(this,"mousewheel-page-height"),
|
|
L*=H,A*=H,B*=H);H=Math.max(Math.abs(A),Math.abs(B));if(!f||H<f)f=H,l.settings.adjustOldDeltas&&"mousewheel"===r.type&&0===H%120&&(f/=40);l.settings.adjustOldDeltas&&"mousewheel"===r.type&&0===H%120&&(L/=40,B/=40,A/=40);L=Math[1<=L?"floor":"ceil"](L/f);B=Math[1<=B?"floor":"ceil"](B/f);A=Math[1<=A?"floor":"ceil"](A/f);l.settings.normalizeOffset&&this.getBoundingClientRect&&(r=this.getBoundingClientRect(),N=p.clientX-r.left,M=p.clientY-r.top);p.deltaX=B;p.deltaY=A;p.deltaFactor=f;p.offsetX=N;p.offsetY=
|
|
M;p.deltaMode=0;y.unshift(p,L,B,A);d&&clearTimeout(d);d=setTimeout(e,200);return(g.event.dispatch||g.event.handle).apply(this,y)}}function e(){f=null}var c=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],b="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],a=Array.prototype.slice,d,f;if(g.event.fixHooks)for(var h=c.length;h;)g.event.fixHooks[c[--h]]=g.event.mouseHooks;var l=g.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var p=
|
|
b.length;p;)this.addEventListener(b[--p],k,!1);else this.onmousewheel=k;g.data(this,"mousewheel-line-height",l.getLineHeight(this));g.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var p=b.length;p;)this.removeEventListener(b[--p],k,!1);else this.onmousewheel=null;g.removeData(this,"mousewheel-line-height");g.removeData(this,"mousewheel-page-height")},getLineHeight:function(p){p=g(p);var r=p["offsetParent"in g.fn?"offsetParent":"parent"]();
|
|
r.length||(r=g("body"));return parseInt(r.css("fontSize"),10)||parseInt(p.css("fontSize"),10)||16},getPageHeight:function(p){return g(p).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};g.fn.extend({mousewheel:function(p){return p?this.bind("mousewheel",p):this.trigger("mousewheel")},unmousewheel:function(p){return this.unbind("mousewheel",p)}})});q.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(g,k,e,c,b){if(null==
|
|
g.fn.select2){var a=["open","close","destroy"];g.fn.select2=function(d){d=d||{};if("object"===typeof d)return this.each(function(){var l=g.extend(!0,{},d);new e(g(this),l)}),this;if("string"===typeof d){var f,h=Array.prototype.slice.call(arguments,1);this.each(function(){var l=b.GetData(this,"select2");null==l&&window.console&&console.error&&console.error("The select2('"+d+"') method was called on an element that is not using Select2.");f=l[d].apply(l,h)});return-1<g.inArray(d,a)?this:f}throw Error("Invalid arguments for Select2: "+
|
|
d);}}null==g.fn.select2.defaults&&(g.fn.select2.defaults=c);return e});return{define:q.define,require:q.require}}(),w=z.require("jquery.select2");u.fn.select2.amd=z;return w});
|