25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
69 KiB

  1. var ye=(b,S)=>()=>(S||b((S={exports:{}}).exports,S),S.exports);var _e=ye((xe,N)=>{/*! Select2 4.0.7 | https://github.com/select2/select2/blob/master/LICENSE.md */(function(b){typeof define=="function"&&define.amd?define(["jquery"],b):typeof N=="object"&&N.exports?N.exports=function(S,q){return q===void 0&&(q=typeof window<"u"?require("jquery"):require("jquery")(S)),b(q),q}:b(jQuery)})(function(b){var S=function(){if(b&&b.fn&&b.fn.select2&&b.fn.select2.amd)var h=b.fn.select2.amd;var B,W,X,O,R,L,F,j,y,T,E,U,ee,te,K;function C(o,a){return ee.call(o,a)}function M(o,a){var s,n,t,e,r,i,l,c,u,p,f,g=a&&a.split("/"),m=E.map,v=m&&m["*"]||{};if(o){for(r=(o=o.split("/")).length-1,E.nodeIdCompat&&K.test(o[r])&&(o[r]=o[r].replace(K,"")),o[0].charAt(0)==="."&&g&&(o=g.slice(0,g.length-1).concat(o)),u=0;u<o.length;u++)if((f=o[u])===".")o.splice(u,1),u-=1;else if(f===".."){if(u===0||u===1&&o[2]===".."||o[u-1]==="..")continue;0<u&&(o.splice(u-1,2),u-=2)}o=o.join("/")}if((g||v)&&m){for(u=(s=o.split("/")).length;0<u;u-=1){if(n=s.slice(0,u).join("/"),g){for(p=g.length;0<p;p-=1)if(t=(t=m[g.slice(0,p).join("/")])&&t[n]){e=t,i=u;break}}if(e)break;!l&&v&&v[n]&&(l=v[n],c=u)}!e&&l&&(e=l,i=c),e&&(s.splice(0,i,e),o=s.join("/"))}return o}function ne(o,a){return function(){var s=te.call(arguments,0);return typeof s[0]!="string"&&s.length===1&&s.push(null),L.apply(O,s.concat([o,a]))}}function ae(o){return function(a){y[o]=a}}function z(o){if(C(T,o)){var a=T[o];delete T[o],U[o]=!0,R.apply(O,a)}if(!C(y,o)&&!C(U,o))throw new Error("No "+o);return y[o]}function Y(o){var a,s=o?o.indexOf("!"):-1;return-1<s&&(a=o.substring(0,s),o=o.substring(s+1,o.length)),[a,o]}function re(o){return o?Y(o):[]}return h&&h.requirejs||(h?W=h:h={},y={},T={},E={},U={},ee=Object.prototype.hasOwnProperty,te=[].slice,K=/\.js$/,F=function(o,a){var s,n=Y(o),t=n[0],e=a[1];return o=n[1],t&&(s=z(t=M(t,e))),t?o=s&&s.normalize?s.normalize(o,function(r){return function(i){return M(i,r)}}(e)):M(o,e):(t=(n=Y(o=M(o,e)))[0],o=n[1],t&&(s=z(t))),{f:t?t+"!"+o:o,n:o,pr:t,p:s}},j={require:function(o){return ne(o)},exports:function(o){var a=y[o];return a!==void 0?a:y[o]={}},module:function(o){return{id:o,uri:"",exports:y[o],config:function(a){return function(){return E&&E.config&&E.config[a]||{}}}(o)}}},R=function(o,a,s,n){var t,e,r,i,l,c,u,p=[],f=typeof s;if(c=re(n=n||o),f=="undefined"||f=="function"){for(a=!a.length&&s.length?["require","exports","module"]:a,l=0;l<a.length;l+=1)if((e=(i=F(a[l],c)).f)==="require")p[l]=j.require(o);else if(e==="exports")p[l]=j.exports(o),u=!0;else if(e==="module")t=p[l]=j.module(o);else if(C(y,e)||C(T,e)||C(U,e))p[l]=z(e);else{if(!i.p)throw new Error(o+" missing "+e);i.p.load(i.n,ne(n,!0),ae(e),{}),p[l]=y[e]}r=s?s.apply(y[o],p):void 0,o&&(t&&t.exports!==O&&t.exports!==y[o]?y[o]=t.exports:r===O&&u||(y[o]=r))}else o&&(y[o]=s)},B=W=L=function(o,a,s,n,t){if(typeof o=="string")return j[o]?j[o](a):z(F(o,re(a)).f);if(!o.splice){if((E=o).deps&&L(E.deps,E.callback),!a)return;a.splice?(o=a,a=s,s=null):o=O}return a=a||function(){},typeof s=="function"&&(s=n,n=t),n?R(O,o,a,s):setTimeout(function(){R(O,o,a,s)},4),L},L.config=function(o){return L(o)},B._defined=y,(X=function(o,a,s){if(typeof o!="string")throw new Error("See almond README: incorrect module build, no module name");a.splice||(s=a,a=[]),C(y,o)||C(T,o)||(T[o]=[o,a,s])}).amd={jQuery:!0},h.requirejs=B,h.require=W,h.define=X),h.define("almond",function(){}),h.define("jquery",[],function(){var o=b||$;return o==null&&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."),o}),h.define("select2/utils",["jquery"],function(o){var a={};function s(e){var r=e.prototype,i=[];for(var l in r)typeof r[l]=="function"&&l!=="constructor"&&i.push(l);return i}a.Extend=function(e,r){var i={}.hasOwnProperty;function l(){this.constructor=e}for(var c in r)i.call(r,c)&&(e[c]=r[c]);return l.prototype=r.prototype,e.prototype=new l,e.__super__=r.prototype,e},a.Decorate=function(e,r){var i=s(r),l=s(e);function c(){var v=Array.prototype.unshift,_=r.prototype.constructor.length,D=e.prototype.constructor;0<_&&(v.call(arguments,e.prototype.constructor),D=r.prototype.constructor),D.apply(this,arguments)}r.displayName=e.displayName,c.prototype=new function(){this.constructor=c};for(var u=0;u<l.length;u++){var p=l[u];c.prototype[p]=e.prototype[p]}function f(v){var _=function(){};v in c.prototype&&(_=c.prototype[v]);var D=r.prototype[v];return function(){return Array.prototype.unshift.call(arguments,_),D.apply(this,arguments)}}for(var g=0;g<i.length;g++){var m=i[g];c.prototype[m]=f(m)}return c};function n(){this.listeners={}}n.prototype.on=function(e,r){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(r):this.listeners[e]=[r]},n.prototype.trigger=function(e){var r=Array.prototype.slice,i=r.call(arguments,1);this.listeners=this.listeners||{},i==null&&(i=[]),i.length===0&&i.push({}),(i[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],r.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(e,r){for(var i=0,l=e.length;i<l;i++)e[i].apply(this,r)},a.Observable=n,a.generateChars=function(e){for(var r="",i=0;i<e;i++)r+=Math.floor(36*Math.random()).toString(36);return r},a.bind=function(e,r){return function(){e.apply(r,arguments)}},a._convertData=function(e){for(var r in e){var i=r.split("-"),l=e;if(i.length!==1){for(var c=0;c<i.length;c++){var u=i[c];(u=u.substring(0,1).toLowerCase()+u.substring(1))in l||(l[u]={}),c==i.length-1&&(l[u]=e[r]),l=l[u]}delete e[r]}}return e},a.hasScroll=function(e,r){var i=o(r),l=r.style.overflowX,c=r.style.overflowY;return(l!==c||c!=="hidden"&&c!=="visible")&&(l==="scroll"||c==="scroll"||i.innerHeight()<r.scrollHeight||i.innerWidth()<r.scrollWidth)},a.escapeMarkup=function(e){var r={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return typeof e!="string"?e:String(e).replace(/[&<>"'\/\\]/g,function(i){return r[i]})},a.appendMany=function(e,r){if(o.fn.jquery.substr(0,3)==="1.7"){var i=o();o.map(r,function(l){i=i.add(l)}),r=i}e.append(r)},a.__cache={};var t=0;return a.GetUniqueElementId=function(e){var r=e.getAttribute("data-select2-id");return r==null&&(e.id?(r=e.id,e.setAttribute("data-select2-id",r)):(e.setAttribute("data-select2-id",++t),r=t.toString())),r},a.StoreData=function(e,r,i){var l=a.GetUniqueElementId(e);a.__cache[l]||(a.__cache[l]={}),a.__cache[l][r]=i},a.GetData=function(e,r){var i=a.GetUniqueElementId(e);return r?a.__cache[i]&&a.__cache[i][r]!=null?a.__cache[i][r]:o(e).data(r):a.__cache[i]},a.RemoveData=function(e){var r=a.GetUniqueElementId(e);a.__cache[r]!=null&&delete a.__cache[r]},a}),h.define("select2/results",["jquery","./utils"],function(o,a){function s(n,t,e){this.$element=n,this.data=e,this.options=t,s.__super__.constructor.call(this)}return a.Extend(s,a.Observable),s.prototype.render=function(){var n=o('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&n.attr("aria-multiselectable","true"),this.$results=n},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(n){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var e=o('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(n.message);e.append(t(r(n.args))),e[0].className+=" select2-results__message",this.$results.append(e)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(n){this.hideLoading();var t=[];if(n.results!=null&&n.results.length!==0){n.results=this.sort(n.results);for(var e=0;e<n.results.length;e++){var r=n.results[e],i=this.option(r);t.push(i)}this.$results.append(t)}else this.$results.children().length===0&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(n,t){t.find(".select2-results").append(n)},s.prototype.sort=function(n){return this.options.get("sorter")(n)},s.prototype.highlightFirstItem=function(){var n=this.$results.find(".select2-results__option[aria-selected]"),t=n.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):n.first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var n=this;this.data.current(function(t){var e=o.map(t,function(r){return r.id.toString()});n.$results.find(".select2-results__option[aria-selected]").each(function(){var r=o(this),i=a.GetData(this,"data"),l=""+i.id;i.element!=null&&i.element.selected||i.element==null&&-1<o.inArray(l,e)?r.attr("aria-selected","true"):r.attr("aria-selected","false")})})},s.prototype.showLoading=function(n){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(n)},e=this.option(t);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(n){var t=document.createElement("li");t.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};for(var r in n.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),n.id==null&&delete e["aria-selected"],n._resultId!=null&&(t.id=n._resultId),n.title&&(t.title=n.title),n.children&&(e.role="group",e["aria-label"]=n.text,delete e["aria-selected"]),e){var i=e[r];t.setAttribute(r,i)}if(n.children){var l=o(t),c=document.createElement("strong");c.className="select2-results__group",o(c),this.template(n,c);for(var u=[],p=0;p<n.children.length;p++){var f=n.children[p],g=this.option(f);u.push(g)}var m=o("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});m.append(u),l.append(c),l.append(m)}else this.template(n,t);return a.StoreData(t,"data",n),t},s.prototype.bind=function(n,t){var e=this,r=n.id+"-results";this.$results.attr("id",r),n.on("results:all",function(i){e.clear(),e.append(i.data),n.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),n.on("results:append",function(i){e.append(i.data),n.isOpen()&&e.setClasses()}),n.on("query",function(i){e.hideMessages(),e.showLoading(i)}),n.on("select",function(){n.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),n.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),n.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var i=e.getHighlightedResults();i.length!==0&&i.trigger("mouseup")}),n.on("results:select",function(){var i=e.getHighlightedResults();if(i.length!==0){var l=a.GetData(i[0],"data");i.attr("aria-selected")=="true"?e.trigger("close",{}):e.trigger("select",{data:l})}}),n.on("results:previous",function(){var i=e.getHighlightedResults(),l=e.$results.find("[aria-selected]"),c=l.index(i);if(!(c<=0)){var u=c-1;i.length===0&&(u=0);var p=l.eq(u);p.trigger("mouseenter");var f=e.$results.offset().top,g=p.offset().top,m=e.$results.scrollTop()+(g-f);u===0?e.$results.scrollTop(0):g-f<0&&e.$results.scrollTop(m)}}),n.on("results:next",function(){var i=e.getHighlightedResults(),l=e.$results.find("[aria-selected]"),c=l.index(i)+1;if(!(c>=l.length)){var u=l.eq(c);u.trigger("mouseenter");var p=e.$results.offset().top+e.$results.outerHeight(!1),f=u.offset().top+u.outerHeight(!1),g=e.$results.scrollTop()+f-p;c===0?e.$results.scrollTop(0):p<f&&e.$results.scrollTop(g)}}),n.on("results:focus",function(i){i.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(i){e.displayMessage(i)}),o.fn.mousewheel&&this.$results.on("mousewheel",function(i){var l=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-l+i.deltaY,u=0<i.deltaY&&l-i.deltaY<=0,p=i.deltaY<0&&c<=e.$results.height();u?(e.$results.scrollTop(0),i.preventDefault(),i.stopPropagation()):p&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),i.preventDefault(),i.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(i){var l=o(this),c=a.GetData(this,"data");l.attr("aria-selected")!=="true"?e.trigger("select",{originalEvent:i,data:c}):e.options.get("multiple")?e.trigger("unselect",{originalEvent:i,data:c}):e.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(i){var l=a.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:l,element:o(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var n=this.getHighlightedResults();if(n.length!==0){var t=this.$results.find("[aria-selected]").index(n),e=this.$results.offset().top,r=n.offset().top,i=this.$results.scrollTop()+(r-e),l=r-e;i-=2*n.outerHeight(!1),t<=2?this.$results.scrollTop(0):(l>this.$results.outerHeight()||l<0)&&this.$results.scrollTop(i)}},s.prototype.template=function(n,t){var e=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=e(n,t);i==null?t.style.display="none":typeof i=="string"?t.innerHTML=r(i):o(t).append(i)},s}),h.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}}),h.define("select2/selection/base",["jquery","../utils","../keys"],function(o,a,s){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return a.Extend(n,a.Observable),n.prototype.render=function(){var t=o('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,a.GetData(this.$element[0],"old-tabindex")!=null?this._tabindex=a.GetData(this.$element[0],"old-tabindex"):this.$element.attr("tabindex")!=null&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t},n.prototype.bind=function(t,e){var r=this,i=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(l){r.trigger("focus",l)}),this.$selection.on("blur",function(l){r._handleBlur(l)}),this.$selection.on("keydown",function(l){r.trigger("keypress",l),l.which===s.SPACE&&l.preventDefault()}),t.on("results:focus",function(l){r.$selection.attr("aria-activedescendant",l.data._resultId)}),t.on("selection:update",function(l){r.update(l.data)}),t.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",i),r._attachCloseHandler(t)}),t.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),window.setTimeout(function(){r.$selection.focus()},0),r._detachCloseHandler(t)}),t.on("enable",function(){r.$selection.attr("tabindex",r._tabindex)}),t.on("disable",function(){r.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||o.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},n.prototype._attachCloseHandler=function(t){o(document.body).on("mousedown.select2."+t.id,function(e){var r=o(e.target).closest(".select2");o(".select2.select2-container--open").each(function(){o(this),this!=r[0]&&a.GetData(this,"element").select2("close")})})},n.prototype._detachCloseHandler=function(t){o(document.body).off("mousedown.select2."+t.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n}),h.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(o,a,s,n){function t(){t.__super__.constructor.apply(this,arguments)}return s.Extend(t,a),t.prototype.render=function(){var e=t.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},t.prototype.bind=function(e,r){var i=this;t.__super__.bind.apply(this,arguments);var l=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",l).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",l),this.$selection.on("mousedown",function(c){c.which===1&&i.trigger("toggle",{originalEvent:c})}),this.$selection.on("focus",function(c){}),this.$selection.on("blur",function(c){}),e.on("focus",function(c){e.isOpen()||i.$selection.focus()})},t.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},t.prototype.display=function(e,r){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(e,r))},t.prototype.selectionContainer=function(){return o("<span></span>")},t.prototype.update=function(e){if(e.length!==0){var r=e[0],i=this.$selection.find(".select2-selection__rendered"),l=this.display(r,i);i.empty().append(l),i.attr("title",r.title||r.text)}else this.clear()},t}),h.define("select2/selection/multiple",["jquery","./base","../utils"],function(o,a,s){function n(t,e){n.__super__.constructor.apply(this,arguments)}return s.Extend(n,a),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(t,e){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(i){r.trigger("toggle",{originalEvent:i})}),this.$selection.on("click",".select2-selection__choice__remove",function(i){if(!r.options.get("disabled")){var l=o(this).parent(),c=s.GetData(l[0],"data");r.trigger("unselect",{originalEvent:i,data:c})}})},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var r=this.options.get("templateSelection");return this.options.get("escapeMarkup")(r(t,e))},n.prototype.selectionContainer=function(){return o('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(t){if(this.clear(),t.length!==0){for(var e=[],r=0;r<t.length;r++){var i=t[r],l=this.selectionContainer(),c=this.display(i,l);l.append(c),l.attr("title",i.title||i.text),s.StoreData(l[0],"data",i),e.push(l)}var u=this.$selection.find(".select2-selection__rendered");s.appendMany(u,e)}},n}),h.define("select2/selection/placeholder",["../utils"],function(o){function a(s,n,t){this.placeholder=this.normalizePlaceholder(t.get("placeholder")),s.call(this,n,t)}return a.prototype.normalizePlaceholder=function(s,n){return typeof n=="string"&&(n={id:"",text:n}),n},a.prototype.createPlaceholder=function(s,n){var t=this.selectionContainer();return t.html(this.display(n)),t.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),t},a.prototype.update=function(s,n){var t=n.length==1&&n[0].id!=this.placeholder.id;if(1<n.length||t)return s.call(this,n);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},a}),h.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(o,a,s){function n(){}return n.prototype.bind=function(t,e,r){var i=this;t.call(this,e,r),this.placeholder==null&&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(l){i._handleClear(l)}),e.on("keypress",function(l){i._handleKeyboardClear(l,e)})},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var r=this.$selection.find(".select2-selection__clear");if(r.length!==0){e.stopPropagation();var i=s.GetData(r[0],"data"),l=this.$element.val();this.$element.val(this.placeholder.id);var c={data:i};if(this.trigger("clear",c),c.prevented)this.$element.val(l);else{for(var u=0;u<i.length;u++)if(c={data:i[u]},this.trigger("unselect",c),c.prevented)return void this.$element.val(l);this.$element.trigger("change"),this.trigger("toggle",{})}}}},n.prototype._handleKeyboardClear=function(t,e,r){r.isOpen()||e.which!=a.DELETE&&e.which!=a.BACKSPACE||this._handleClear(e)},n.prototype.update=function(t,e){if(t.call(this,e),!(0<this.$selection.find(".select2-selection__placeholder").length||e.length===0)){var r=this.options.get("translations").get("removeAllItems"),i=o('<span class="select2-selection__clear" title="'+r()+'">&times;</span>');s.StoreData(i[0],"data",e),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),h.define("select2/selection/search",["jquery","../utils","../keys"],function(o,a,s){function n(t,e,r){t.call(this,e,r)}return n.prototype.render=function(t){var e=o('<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=e,this.$search=e.find("input");var r=t.call(this);return this._transferTabIndex(),r},n.prototype.bind=function(t,e,r){var i=this;t.call(this,e,r),e.on("open",function(){i.$search.trigger("focus")}),e.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),e.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),e.on("disable",function(){i.$search.prop("disabled",!0)}),e.on("focus",function(u){i.$search.trigger("focus")}),e.on("results:focus",function(u){i.$search.attr("aria-activedescendant",u.id)}),this.$selection.on("focusin",".select2-search--inline",function(u){i.trigger("focus",u)}),this.$selection.on("focusout",".select2-search--inline",function(u){i._handleBlur(u)}),this.$selection.on("keydown",".select2-search--inline",function(u){if(u.stopPropagation(),i.trigger("keypress",u),i._keyUpPrevented=u.isDefaultPrevented(),u.which===s.BACKSPACE&&i.$search.val()===""){var p=i.$searchContainer.prev(".select2-selection__choice");if(0<p.length){var f=a.GetData(p[0],"data");i.searchRemoveChoice(f),u.preventDefault()}}});var l=document.documentMode,c=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(u){c?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(u){if(c&&u.type==="input")i.$selection.off("input.search input.searchcheck");else{var p=u.which;p!=s.SHIFT&&p!=s.CTRL&&p!=s.ALT&&p!=s.TAB&&i.handleSearch(u)}})},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var r=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),r&&(this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus())},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";this.$search.attr("placeholder")!==""?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},n}),h.define("select2/selection/eventRelay",["jquery"],function(o){function a(){}return a.prototype.bind=function(s,n,t){var e=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],i=["opening","closing","selecting","unselecting","clearing"];s.call(this,n,t),n.on("*",function(l,c){if(o.inArray(l,r)!==-1){c=c||{};var u=o.Event("select2:"+l,{params:c});e.$element.trigger(u),o.inArray(l,i)!==-1&&(c.prevented=u.isDefaultPrevented())}})},a}),h.define("select2/translation",["jquery","require"],function(o,a){function s(n){this.dict=n||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(n){return this.dict[n]},s.prototype.extend=function(n){this.dict=o.extend({},n.all(),this.dict)},s._cache={},s.loadPath=function(n){if(!(n in s._cache)){var t=a(n);s._cache[n]=t}return new s(s._cache[n])},s}),h.define("select2/diacritics",[],function(){return{"â’¶":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A",Ẫ:"A","Ẩ":"A",Ã:"A","Ä€":"A","Ä‚":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A",Çž:"A","Ả":"A","Ã…":"A",Ǻ:"A","Ǎ":"A","È€":"A","È‚":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ä„":"A",Ⱥ:"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV",Ꜻ:"AV","Ꜽ":"AY","â’·":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B",Ƀ:"B","Æ‚":"B","Ɓ":"B","â’¸":"C","ï¼£":"C","Ć":"C","Ĉ":"C",ÄŠ:"C",ÄŒ:"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","â’¹":"D","D":"D","Ḋ":"D",ÄŽ:"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Æ‹":"D",ÆŠ:"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","Ç„":"DZ","Dz":"Dz","Ç…":"Dz","â’º":"E","ï¼¥":"E","È":"E","É":"E",Ê:"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ä’":"E","Ḕ":"E","Ḗ":"E","Ä”":"E","Ä–":"E","Ë":"E",Ẻ:"E",Äš:"E","È„":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E",ÆŽ:"E","â’»":"F","F":"F","Ḟ":"F","Æ‘":"F","Ꝼ":"F","â’¼":"G","G":"G","Ç´":"G",Äœ:"G","Ḡ":"G",Äž:"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ“":"G","êž ":"G","Ᵹ":"G","Ꝿ":"G","â’½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H",Èž:"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","Ɥ":"H","â’¾":"I","I":"I",ÃŒ:"I","Í":"I",ÃŽ:"I","Ĩ":"I",Ī:"I","Ĭ":"I","Ä°":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I",ÈŠ:"I","Ị":"I","Ä®":"I","Ḭ":"I","Æ—":"I","â’¿":"J","J":"J","Ä´":"J","Ɉ":"J","â“€":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","â±¢":"L","â± ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","â“‚":"M","ï¼­":"M","Ḿ":"M","á¹€":"M","Ṃ":"M","â±®":"M",Æœ:"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N",Ń:"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Å…":"N","Ṋ":"N","Ṉ":"N","È ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N",ÇŠ:"NJ","Ç‹":"Nj","â“„":"O","O":"O","Ã’":"O","Ó":"O","Ô":"O","á»’":"O","Ố":"O","á»–":"O","á»”":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O",ÅŒ:"O","Ṑ":"O","á¹’":"O",ÅŽ:"O","È®":"O","È°":"O","Ö":"O",Ȫ:"O","Ỏ":"O","Ő":"O","Ç‘":"O",ÈŒ:"O",ÈŽ:"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O",Ǫ:"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O",ÆŸ:"O","Ꝋ":"O","Ꝍ":"O","Å’":"OE","Æ¢":"OI","Ꝏ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q",ÉŠ:"Q","Ⓡ":"R","ï¼²":"R","Å”":"R","Ṙ":"R","Ř":"R","Ȑ":"R","È’":"R","Ṛ":"R","Ṝ":"R","Å–":"R","Ṟ":"R",ÉŒ:"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","êž‚":"R","Ⓢ":"S","ï¼³":"S",ẞ:"S",Åš:"S","Ṥ":"S",Åœ:"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S",Åž:"S","â±¾":"S","Ꞩ":"S","êž„":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T",Èš:"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","â“Š":"U","ï¼µ":"U","Ù":"U",Ú:"U","Û":"U","Ũ":"U","Ṹ":"U",Ū:"U","Ṻ":"U","Ŭ":"U",Ãœ:"U","Ç›":"U","Ç—":"U","Ç•":"U","Ç™":"U","Ủ":"U","Å®":"U","Å°":"U","Ç“":"U","È”":"U","È–":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","É„":"U","â“‹":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","É…":"V","ê ":"VY","â“Œ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","Ⓧ":"X","X":"X",Ẋ:"X",Ẍ:"X","â“Ž":"Y","ï¼¹":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y",Ẏ:"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y",ÉŽ:"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z",Ƶ:"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a",ẚ:"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a",ă:"a","ằ":"a","ắ":"a",ẵ:"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a",ÇŸ:"a","ả":"a","Ã¥":"a","Ç»":"a",ÇŽ:"a","ȁ":"a",ȃ:"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","Ä…":"a","â±¥":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae",ꜵ:"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","â“‘":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","Æ€":"b",ƃ:"b","É“":"b","â“’":"c","c":"c","ć":"c","ĉ":"c","Ä‹":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","â““":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","Ä‘":"d",ÆŒ:"d","É–":"d","É—":"d","ꝺ":"d","dz":"dz","dž":"dz","â“”":"e","ï½…":"e","è":"e","é":"e",ê:"e","ề":"e","ế":"e","á»…":"e","ể":"e","ẽ":"e","Ä“":"e","ḕ":"e","ḗ":"e","Ä•":"e","Ä—":"e","ë":"e","ẻ":"e","Ä›":"e","È…":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","ḝ":"e","Ä™":"e","ḙ":"e","ḛ":"e","ɇ":"e","É›":"e","ǝ":"e","â“•":"f","f":"f","ḟ":"f","Æ’":"f","ꝼ":"f","â“–":"g","g":"g",ǵ:"g","ĝ":"g","ḡ":"g",ÄŸ:"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","êž¡":"g","áµ¹":"g","ꝿ":"g","â“—":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h",ÈŸ:"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","Æ•":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","È‹":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","â“™":"j","j":"j",ĵ:"j","Ç°":"j","ɉ":"j","â“š":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ™":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","â“›":"l","l":"l","Å€":"l",ĺ:"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å‚":"l",Æš:"l","É«":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","â“œ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","Å„":"n","ñ":"n","á¹…":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n",Æž:"n","ɲ":"n","ʼn":"n","êž‘":"n","ꞥ":"n",ÇŒ:"nj","â“ž":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","á»—":"o","ổ":"o",õ:"o","ṍ":"o","È­":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","ỏ":"o","Å‘":"o","Ç’":"o","ȍ":"o","ȏ":"o","Æ¡":"o","ờ":"o","á»›":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","á»™":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","É”":"o","ꝋ":"o","ꝍ":"o",ɵ:"o","Å“":"oe","Æ£":"oi","È£":"ou","ꝏ":"oo","â“Ÿ":"p","p":"p","ṕ":"p","á¹—":"p","Æ¥":"p","áµ½":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","â“ ":"q","q":"q","É‹":"q","ꝗ":"q","ꝙ":"q","â“¡":"r","ï½’":"r","Å•":"r","á¹™":"r","Å™":"r","È‘":"r","È“":"r","á¹›":"r","ṝ":"r","Å—":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r",ꞃ:"r","â“¢":"s","s":"s",ß:"s","Å›":"s","á¹¥":"s","ŝ":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","È™":"s",ÅŸ:"s","È¿":"s","êž©":"s","êž…":"s","ẛ":"s","â“£":"t","ï½”":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","È›":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u",ú:"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u",Çœ:"u","ǘ":"u","Ç–":"u",Çš:"u","ủ":"u","ů":"u","ű":"u","Ç”":"u","È•":"u","È—":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","â“¥":"v","ï½–":"v","á¹½":"v","ṿ":"v","Ê‹":"v","ꝟ":"v",ÊŒ:"v","ꝡ":"vy","ⓦ":"w","ï½—":"w","ẁ":"w",ẃ:"w",ŵ:"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ï½™":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","ɏ":"y","ỿ":"y","â“©":"z","z":"z",ź:"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","É€":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η",Ί:"Ι",Ϊ:"Ι",ÎŒ:"Ο",ÎŽ:"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι",ÏŠ:"ι","ΐ":"ι",ÏŒ:"ο","ύ":"Ï…","Ï‹":"Ï…","ΰ":"Ï…",ÏŽ:"ω","Ï‚":"σ","’":"'"}}),h.define("select2/data/base",["../utils"],function(o){function a(s,n){a.__super__.constructor.call(this)}return o.Extend(a,o.Observable),a.prototype.current=function(s){throw new Error("The `current` method must be defined in child classes.")},a.prototype.query=function(s,n){throw new Error("The `query` method must be defined in child classes.")},a.prototype.bind=function(s,n){},a.prototype.destroy=function(){},a.prototype.generateResultId=function(s,n){var t=s.id+"-result-";return t+=o.generateChars(4),n.id!=null?t+="-"+n.id.toString():t+="-"+o.generateChars(4),t},a}),h.define("select2/data/select",["./base","../utils","jquery"],function(o,a,s){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return a.Extend(n,o),n.prototype.current=function(t){var e=[],r=this;this.$element.find(":selected").each(function(){var i=s(this),l=r.item(i);e.push(l)}),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,s(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var l=[];(t=[t]).push.apply(t,i);for(var c=0;c<t.length;c++){var u=t[c].id;s.inArray(u,l)===-1&&l.push(u)}e.$element.val(l),e.$element.trigger("change")});else{var r=t.id;this.$element.val(r),this.$element.trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,s(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("change");this.current(function(r){for(var i=[],l=0;l<r.length;l++){var c=r[l].id;c!==t.id&&s.inArray(c,i)===-1&&i.push(c)}e.$element.val(i),e.$element.trigger("change")})}},n.prototype.bind=function(t,e){var r=this;(this.container=t).on("select",function(i){r.select(i.data)}),t.on("unselect",function(i){r.unselect(i.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var r=[],i=this;this.$element.children().each(function(){var l=s(this);if(l.is("option")||l.is("optgroup")){var c=i.item(l),u=i.matches(t,c);u!==null&&r.push(u)}}),e({results:r})},n.prototype.addOptions=function(t){a.appendMany(this.$element,t)},n.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:(e=document.createElement("option")).textContent!==void 0?e.textContent=t.text:e.innerText=t.text,t.id!==void 0&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var r=s(e),i=this._normalizeItem(t);return i.element=e,a.StoreData(e,"data",i),r},n.prototype.item=function(t){var e={};if((e=a.GetData(t[0],"data"))!=null)return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var r=t.children("option"),i=[],l=0;l<r.length;l++){var c=s(r[l]),u=this.item(c);i.push(u)}e.children=i}return(e=this._normalizeItem(e)).element=t[0],a.StoreData(t[0],"data",e),e},n.prototype._normalizeItem=function(t){return t!==Object(t)&&(t={id:t,text:t}),(t=s.extend({},{text:""},t)).id!=null&&(t.id=t.id.toString()),t.text!=null&&(t.text=t.text.toString()),t._resultId==null&&t.id&&this.container!=null&&(t._resultId=this.generateResultId(this.container,t)),s.extend({},{selected:!1,disabled:!1},t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n}),h.define("select2/data/array",["./select","../utils","jquery"],function(o,a,s){function n(t,e){var r=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(r))}return a.Extend(n,o),n.prototype.select=function(t){var e=this.$element.find("option").filter(function(r,i){return i.value==t.id.toString()});e.length===0&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){var e=this,r=this.$element.find("option"),i=r.map(function(){return e.item(s(this)).id}).get(),l=[];function c(Z){return function(){return s(this).val()==Z.id}}for(var u=0;u<t.length;u++){var p=this._normalizeItem(t[u]);if(0<=s.inArray(p.id,i)){var f=r.filter(c(p)),g=this.item(f),m=s.extend(!0,{},p,g),v=this.option(m);f.replaceWith(v)}else{var _=this.option(p);if(p.children){var D=this.convertToOptions(p.children);a.appendMany(_,D)}l.push(_)}}return l},n}),h.define("select2/data/ajax",["./array","../utils","jquery"],function(o,a,s){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),this.ajaxOptions.processResults!=null&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return a.Extend(n,o),n.prototype._applyDefaults=function(t){var e={data:function(r){return s.extend({},r,{q:r.term})},transport:function(r,i,l){var c=s.ajax(r);return c.then(i),c.fail(l),c}};return s.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var r=this;this._request!=null&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=s.extend({type:"GET"},this.ajaxOptions);function l(){var c=i.transport(i,function(u){var p=r.processResults(u,t);r.options.get("debug")&&window.console&&console.error&&(p&&p.results&&s.isArray(p.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(p)},function(){"status"in c&&(c.status===0||c.status==="0")||r.trigger("results:message",{message:"errorLoading"})});r._request=c}typeof i.url=="function"&&(i.url=i.url.call(this.$element,t)),typeof i.data=="function"&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&t.term!=null?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(l,this.ajaxOptions.delay)):l()},n}),h.define("select2/data/tags",["jquery"],function(o){function a(s,n,t){var e=t.get("tags"),r=t.get("createTag");r!==void 0&&(this.createTag=r);var i=t.get("insertTag");if(i!==void 0&&(this.insertTag=i),s.call(this,n,t),o.isArray(e))for(var l=0;l<e.length;l++){var c=e[l],u=this._normalizeItem(c),p=this.option(u);this.$element.append(p)}}return a.prototype.query=function(s,n,t){var e=this;this._removeOldTags(),n.term!=null&&n.page==null?s.call(this,n,function r(i,l){for(var c=i.results,u=0;u<c.length;u++){var p=c[u],f=p.children!=null&&!r({results:p.children},!0);if((p.text||"").toUpperCase()===(n.term||"").toUpperCase()||f)return!l&&(i.data=c,void t(i))}if(l)return!0;var g=e.createTag(n);if(g!=null){var m=e.option(g);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(c,g)}i.results=c,t(i)}):s.call(this,n,t)},a.prototype.createTag=function(s,n){var t=o.trim(n.term);return t===""?null:{id:t,text:t}},a.prototype.insertTag=function(s,n,t){n.unshift(t)},a.prototype._removeOldTags=function(s){this._lastTag,this.$element.find("option[data-select2-tag]").each(function(){this.selected||o(this).remove()})},a}),h.define("select2/data/tokenizer",["jquery"],function(o){function a(s,n,t){var e=t.get("tokenizer");e!==void 0&&(this.tokenizer=e),s.call(this,n,t)}return a.prototype.bind=function(s,n,t){s.call(this,n,t),this.$search=n.dropdown.$search||n.selection.$search||t.find(".select2-search__field")},a.prototype.query=function(s,n,t){var e=this;n.term=n.term||"";var r=this.tokenizer(n,this.options,function(i){var l=e._normalizeItem(i);if(!e.$element.find("option").filter(function(){return o(this).val()===l.id}).length){var c=e.option(l);c.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([c])}(function(u){e.trigger("select",{data:u})})(l)});r.term!==n.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),n.term=r.term),s.call(this,n,t)},a.prototype.tokenizer=function(s,n,t,e){for(var r=t.get("tokenSeparators")||[],i=n.term,l=0,c=this.createTag||function(g){return{id:g.term,text:g.term}};l<i.length;){var u=i[l];if(o.inArray(u,r)!==-1){var p=i.substr(0,l),f=c(o.extend({},n,{term:p}));f!=null?(e(f),i=i.substr(l+1)||"",l=0):l++}else l++}return{term:i}},a}),h.define("select2/data/minimumInputLength",[],function(){function o(a,s,n){this.minimumInputLength=n.get("minimumInputLength"),a.call(this,s,n)}return o.prototype.query=function(a,s,n){s.term=s.term||"",s.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:s.term,params:s}}):a.call(this,s,n)},o}),h.define("select2/data/maximumInputLength",[],function(){function o(a,s,n){this.maximumInputLength=n.get("maximumInputLength"),a.call(this,s,n)}return o.prototype.query=function(a,s,n){s.term=s.term||"",0<this.maximumInputLength&&s.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:s.term,params:s}}):a.call(this,s,n)},o}),h.define("select2/data/maximumSelectionLength",[],function(){function o(a,s,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),a.call(this,s,n)}return o.prototype.query=function(a,s,n){var t=this;this.current(function(e){var r=e!=null?e.length:0;0<t.maximumSelectionLength&&r>=t.maximumSelectionLength?t.trigger("results:message",{message:"maximumSelected",args:{maximum:t.maximumSelectionLength}}):a.call(t,s,n)})},o}),h.define("select2/dropdown",["jquery","./utils"],function(o,a){function s(n,t){this.$element=n,this.options=t,s.__super__.constructor.call(this)}return a.Extend(s,a.Observable),s.prototype.render=function(){var n=o('<span class="select2-dropdown"><span class="select2-results"></span></span>');return n.attr("dir",this.options.get("dir")),this.$dropdown=n},s.prototype.bind=function(){},s.prototype.position=function(n,t){},s.prototype.destroy=function(){this.$dropdown.remove()},s}),h.define("select2/dropdown/search",["jquery","../utils"],function(o,a){function s(){}return s.prototype.render=function(n){var t=n.call(this),e=o('<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>');return this.$searchContainer=e,this.$search=e.find("input"),t.prepend(e),t},s.prototype.bind=function(n,t,e){var r=this;n.call(this,t,e),this.$search.on("keydown",function(i){r.trigger("keypress",i),r._keyUpPrevented=i.isDefaultPrevented()}),this.$search.on("input",function(i){o(this).off("keyup")}),this.$search.on("keyup input",function(i){r.handleSearch(i)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val(""),r.$search.blur()}),t.on("focus",function(){t.isOpen()||r.$search.focus()}),t.on("results:all",function(i){i.query.term!=null&&i.query.term!==""||(r.showSearch(i)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},s.prototype.handleSearch=function(n){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},s.prototype.showSearch=function(n,t){return!0},s}),h.define("select2/dropdown/hidePlaceholder",[],function(){function o(a,s,n,t){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),a.call(this,s,n,t)}return o.prototype.append=function(a,s){s.results=this.removePlaceholder(s.results),a.call(this,s)},o.prototype.normalizePlaceholder=function(a,s){return typeof s=="string"&&(s={id:"",text:s}),s},o.prototype.removePlaceholder=function(a,s){for(var n=s.slice(0),t=s.length-1;0<=t;t--){var e=s[t];this.placeholder.id===e.id&&n.splice(t,1)}return n},o}),h.define("select2/dropdown/infiniteScroll",["jquery"],function(o){function a(s,n,t,e){this.lastParams={},s.call(this,n,t,e),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return a.prototype.append=function(s,n){this.$loadingMore.remove(),this.loading=!1,s.call(this,n),this.showLoadingMore(n)&&this.$results.append(this.$loadingMore)},a.prototype.bind=function(s,n,t){var e=this;s.call(this,n,t),n.on("query",function(r){e.lastParams=r,e.loading=!0}),n.on("query:append",function(r){e.lastParams=r,e.loading=!0}),this.$results.on("scroll",function(){var r=o.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&r){var i=e.$results.offset().top+e.$results.outerHeight(!1);e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)<=i+50&&e.loadMore()}})},a.prototype.loadMore=function(){this.loading=!0;var s=o.extend({},{page:1},this.lastParams);s.page++,this.trigger("query:append",s)},a.prototype.showLoadingMore=function(s,n){return n.pagination&&n.pagination.more},a.prototype.createLoadingMore=function(){var s=o('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return s.html(n(this.lastParams)),s},a}),h.define("select2/dropdown/attachBody",["jquery","../utils"],function(o,a){function s(n,t,e){this.$dropdownParent=e.get("dropdownParent")||o(document.body),n.call(this,t,e)}return s.prototype.bind=function(n,t,e){var r=this,i=!1;n.call(this,t,e),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(l){l.stopPropagation()})},s.prototype.destroy=function(n){n.call(this),this.$dropdownContainer.remove()},s.prototype.position=function(n,t,e){t.attr("class",e.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=e},s.prototype.render=function(n){var t=o("<span></span>"),e=n.call(this);return t.append(e),this.$dropdownContainer=t},s.prototype._hideDropdown=function(n){this.$dropdownContainer.detach()},s.prototype._attachPositioningHandler=function(n,t){var e=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,l="orientationchange.select2."+t.id,c=this.$container.parents().filter(a.hasScroll);c.each(function(){a.StoreData(this,"select2-scroll-position",{x:o(this).scrollLeft(),y:o(this).scrollTop()})}),c.on(r,function(u){var p=a.GetData(this,"select2-scroll-position");o(this).scrollTop(p.y)}),o(window).on(r+" "+i+" "+l,function(u){e._positionDropdown(),e._resizeDropdown()})},s.prototype._detachPositioningHandler=function(n,t){var e="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(e),o(window).off(e+" "+r+" "+i)},s.prototype._positionDropdown=function(){var n=o(window),t=this.$dropdown.hasClass("select2-dropdown--above"),e=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var l={height:this.$container.outerHeight(!1)};l.top=i.top,l.bottom=i.top+l.height;var c=this.$dropdown.outerHeight(!1),u=n.scrollTop(),p=n.scrollTop()+n.height(),f=u<i.top-c,g=p>i.bottom+c,m={left:i.left,top:l.bottom},v=this.$dropdownParent;v.css("position")==="static"&&(v=v.offsetParent());var _=v.offset();m.top-=_.top,m.left-=_.left,t||e||(r="below"),g||!f||t?!f&&g&&t&&(r="below"):r="above",(r=="above"||t&&r!=="below")&&(m.top=l.top-_.top-c),r!=null&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(m)},s.prototype._resizeDropdown=function(){var n={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(n.minWidth=n.width,n.position="relative",n.width="auto"),this.$dropdown.css(n)},s.prototype._showDropdown=function(n){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},s}),h.define("select2/dropdown/minimumResultsForSearch",[],function(){function o(a,s,n,t){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,s,n,t)}return o.prototype.showSearch=function(a,s){return!(function n(t){for(var e=0,r=0;r<t.length;r++){var i=t[r];i.children?e+=n(i.children):e++}return e}(s.data.results)<this.minimumResultsForSearch)&&a.call(this,s)},o}),h.define("select2/dropdown/selectOnClose",["../utils"],function(o){function a(){}return a.prototype.bind=function(s,n,t){var e=this;s.call(this,n,t),n.on("close",function(r){e._handleSelectOnClose(r)})},a.prototype._handleSelectOnClose=function(s,n){if(n&&n.originalSelect2Event!=null){var t=n.originalSelect2Event;if(t._type==="select"||t._type==="unselect")return}var e=this.getHighlightedResults();if(!(e.length<1)){var r=o.GetData(e[0],"data");r.element!=null&&r.element.selected||r.element==null&&r.selected||this.trigger("select",{data:r})}},a}),h.define("select2/dropdown/closeOnSelect",[],function(){function o(){}return o.prototype.bind=function(a,s,n){var t=this;a.call(this,s,n),s.on("select",function(e){t._selectTriggered(e)}),s.on("unselect",function(e){t._selectTriggered(e)})},o.prototype._selectTriggered=function(a,s){var n=s.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:s})},o}),h.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(o){var a=o.input.length-o.maximum,s="Please delete "+a+" character";return a!=1&&(s+="s"),s},inputTooShort:function(o){return"Please enter "+(o.minimum-o.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(o){var a="You can only select "+o.maximum+" item";return o.maximum!=1&&(a+="s"),a},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),h.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(o,a,s,n,t,e,r,i,l,c,u,p,f,g,m,v,_,D,Z,le,ie,ce,ue,de,pe,he,fe,ge,me){function H(){this.reset()}return H.prototype.apply=function(d){if((d=o.extend(!0,{},this.defaults,d)).dataAdapter==null){if(d.ajax!=null?d.dataAdapter=m:d.data!=null?d.dataAdapter=g:d.dataAdapter=f,0<d.minimumInputLength&&(d.dataAdapter=c.Decorate(d.dataAdapter,D)),0<d.maximumInputLength&&(d.dataAdapter=c.Decorate(d.dataAdapter,Z)),0<d.maximumSelectionLength&&(d.dataAdapter=c.Decorate(d.dataAdapter,le)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.tokenSeparators==null&&d.tokenizer==null||(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.query!=null){var w=a(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,w)}if(d.initSelection!=null){var x=a(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,x)}}if(d.resultsAdapter==null&&(d.resultsAdapter=s,d.ajax!=null&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,de)),d.placeholder!=null&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,ue)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,fe))),d.dropdownAdapter==null){if(d.multiple)d.dropdownAdapter=ie;else{var A=c.Decorate(ie,ce);d.dropdownAdapter=A}if(d.minimumResultsForSearch!==0&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,he)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,ge)),d.dropdownCssClass!=null||d.dropdownCss!=null||d.adaptDropdownCssClass!=null){var I=a(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,I)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,pe)}if(d.selectionAdapter==null){if(d.multiple?d.selectionAdapter=t:d.selectionAdapter=n,d.placeholder!=null&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,e)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,i)),d.containerCssClass!=null||d.containerCss!=null||d.adaptContainerCssClass!=null){var P=a(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,P)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if(typeof d.language=="string")if(0<d.language.indexOf("-")){var V=d.language.split("-")[0];d.language=[d.language,V]}else d.language=[d.language];if(o.isArray(d.language)){var G=new u;d.language.push("en");for(var se=d.language,Q=0;Q<se.length;Q++){var k=se[Q],J={};try{J=u.loadPath(k)}catch{try{k=this.defaults.amdLanguageBase+k,J=u.loadPath(k)}catch{d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+k+'" could not be automatically loaded. A fallback will be used instead.');continue}}G.extend(J)}d.translations=G}else{var ve=u.loadPath(this.defaults.amdLanguageBase+"en"),oe=new u(d.language);oe.extend(ve),d.translations=oe}return d},H.prototype.reset=function(){function d(w){return w.replace(/[^\u0000-\u007E]/g,function(x){return p[x]||x})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:me,matcher:function w(x,A){if(o.trim(x.term)==="")return A;if(A.children&&0<A.children.length){for(var I=o.extend(!0,{},A),P=A.children.length-1;0<=P;P--)w(x,A.children[P])==null&&I.children.splice(P,1);return 0<I.children.length?I:w(x,I)}var V=d(A.text).toUpperCase(),G=d(x.term).toUpperCase();return-1<V.indexOf(G)?A:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(w){return w},templateResult:function(w){return w.text},templateSelection:function(w){return w.text},theme:"default",width:"resolve"}},H.prototype.set=function(d,w){var x={};x[o.camelCase(d)]=w;var A=c._convertData(x);o.extend(!0,this.defaults,A)},new H}),h.define("select2/options",["require","jquery","./defaults","./utils"],function(o,a,s,n){function t(e,r){if(this.options=e,r!=null&&this.fromElement(r),this.options=s.apply(this.options),r&&r.is("input")){var i=o(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,i)}}return t.prototype.fromElement=function(e){var r=["select2"];this.options.multiple==null&&(this.options.multiple=e.prop("multiple")),this.options.disabled==null&&(this.options.disabled=e.prop("disabled")),this.options.language==null&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),this.options.dir==null&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),n.GetData(e[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.'),n.StoreData(e[0],"data",n.GetData(e[0],"select2Tags")),n.StoreData(e[0],"tags",!0)),n.GetData(e[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."),e.attr("ajax--url",n.GetData(e[0],"ajaxUrl")),n.StoreData(e[0],"ajax-Url",n.GetData(e[0],"ajaxUrl")));var i={};function l(_,D){return D.toUpperCase()}for(var c=0;c<e[0].attributes.length;c++){var u=e[0].attributes[c].name,p="data-";if(u.substr(0,p.length)==p){var f=u.substring(p.length),g=n.GetData(e[0],f);i[f.replace(/-([a-z])/g,l)]=g}}a.fn.jquery&&a.fn.jquery.substr(0,2)=="1."&&e[0].dataset&&(i=a.extend(!0,{},e[0].dataset,i));var m=a.extend(!0,{},n.GetData(e[0]),i);for(var v in m=n._convertData(m))-1<a.inArray(v,r)||(a.isPlainObject(this.options[v])?a.extend(this.options[v],m[v]):this.options[v]=m[v]);return this},t.prototype.get=function(e){return this.options[e]},t.prototype.set=function(e,r){this.options[e]=r},t}),h.define("select2/core",["jquery","./options","./utils","./keys"],function(o,a,s,n){var t=function(e,r){s.GetData(e[0],"select2")!=null&&s.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),r=r||{},this.options=new a(r,e),t.__super__.constructor.call(this);var i=e.attr("tabindex")||0;s.StoreData(e[0],"old-tabindex",i),e.attr("tabindex","-1");var l=this.options.get("dataAdapter");this.dataAdapter=new l(e,this.options);var c=this.render();this._placeContainer(c);var u=this.options.get("selectionAdapter");this.selection=new u(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,c);var p=this.options.get("dropdownAdapter");this.dropdown=new p(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,c);var f=this.options.get("resultsAdapter");this.results=new f(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var g=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(m){g.trigger("selection:update",{data:m})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),s.StoreData(e[0],"select2",this),e.data("select2",this)};return s.Extend(t,s.Observable),t.prototype._generateId=function(e){return"select2-"+(e.attr("id")!=null?e.attr("id"):e.attr("name")!=null?e.attr("name")+"-"+s.generateChars(2):s.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},t.prototype._placeContainer=function(e){e.insertAfter(this.$element);var r=this._resolveWidth(this.$element,this.options.get("width"));r!=null&&e.css("width",r)},t.prototype._resolveWidth=function(e,r){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(r=="resolve"){var l=this._resolveWidth(e,"style");return l??this._resolveWidth(e,"element")}if(r=="element"){var c=e.outerWidth(!1);return c<=0?"auto":c+"px"}if(r!="style")return r;var u=e.attr("style");if(typeof u!="string")return null;for(var p=u.split(";"),f=0,g=p.length;f<g;f+=1){var m=p[f].replace(/\s/g,"").match(i);if(m!==null&&1<=m.length)return m[1]}return null},t.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)},t.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(i){e.trigger("selection:update",{data:i})})}),this.$element.on("focus.select2",function(i){e.trigger("focus",i)}),this._syncA=s.bind(this._syncAttributes,this),this._syncS=s.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;r!=null?(this._observer=new r(function(i){o.each(i,e._syncA),o.each(i,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},t.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(r,i){e.trigger(r,i)})},t.prototype._registerSelectionEvents=function(){var e=this,r=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(i){e.focus(i)}),this.selection.on("*",function(i,l){o.inArray(i,r)===-1&&e.trigger(i,l)})},t.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(r,i){e.trigger(r,i)})},t.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(r,i){e.trigger(r,i)})},t.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(r){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(r,function(i){e.trigger("results:all",{data:i,query:r})})}),this.on("query:append",function(r){this.dataAdapter.query(r,function(i){e.trigger("results:append",{data:i,query:r})})}),this.on("keypress",function(r){var i=r.which;e.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&r.altKey?(e.close(),r.preventDefault()):i===n.ENTER?(e.trigger("results:select",{}),r.preventDefault()):i===n.SPACE&&r.ctrlKey?(e.trigger("results:toggle",{}),r.preventDefault()):i===n.UP?(e.trigger("results:previous",{}),r.preventDefault()):i===n.DOWN&&(e.trigger("results:next",{}),r.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&r.altKey)&&(e.open(),r.preventDefault())})},t.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",{})},t.prototype._syncSubtree=function(e,r){var i=!1,l=this;if(!e||!e.target||e.target.nodeName==="OPTION"||e.target.nodeName==="OPTGROUP"){if(r)if(r.addedNodes&&0<r.addedNodes.length)for(var c=0;c<r.addedNodes.length;c++)r.addedNodes[c].selected&&(i=!0);else r.removedNodes&&0<r.removedNodes.length&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(u){l.trigger("selection:update",{data:u})})}},t.prototype.trigger=function(e,r){var i=t.__super__.trigger,l={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(r===void 0&&(r={}),e in l){var c=l[e],u={prevented:!1,name:e,args:r};if(i.call(this,c,u),u.prevented)return void(r.prevented=!0)}i.call(this,e,r)},t.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},t.prototype.open=function(){this.isOpen()||this.trigger("query",{})},t.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},t.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},t.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},t.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},t.prototype.enable=function(e){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.'),e!=null&&e.length!==0||(e=[!0]);var r=!e[0];this.$element.prop("disabled",r)},t.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 e=[];return this.dataAdapter.current(function(r){e=r}),e},t.prototype.val=function(e){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.'),e==null||e.length===0)return this.$element.val();var r=e[0];o.isArray(r)&&(r=o.map(r,function(i){return i.toString()})),this.$element.val(r).trigger("change")},t.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),this._observer!=null?(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",s.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),s.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},t.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),s.StoreData(e[0],"element",this.$element),e},t}),h.define("jquery-mousewheel",["jquery"],function(o){return o}),h.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(o,a,s,n,t){if(o.fn.select2==null){var e=["open","close","destroy"];o.fn.select2=function(r){if(typeof(r=r||{})=="object")return this.each(function(){var c=o.extend(!0,{},r);new s(o(this),c)}),this;if(typeof r!="string")throw new Error("Invalid arguments for Select2: "+r);var i,l=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=t.GetData(this,"select2");c==null&&window.console&&console.error&&console.error("The select2('"+r+"') method was called on an element that is not using Select2."),i=c[r].apply(c,l)}),-1<o.inArray(r,e)?this:i}}return o.fn.select2.defaults==null&&(o.fn.select2.defaults=n),s}),{define:h.define,require:h.require}}(),q=S.require("jquery.select2");return b.fn.select2.amd=S,q})});export default _e();