Files
2024-10-25 14:16:28 +02:00

2 lines
68 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2sensbitfedex&&e.fn.select2sensbitfedex.amd)var t=e.fn.select2sensbitfedex.amd;t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,o;!function(t){function s(e,t){return _.call(e,t)}function r(e,t){var n,o,s,r,i,l,a,c,d,u,p,f=t&&t.split("/"),g=y.map,h=g&&g["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"), i=e.length-1, y.nodeIdCompat&&w.test(e[i])&&(e[i]=e[i].replace(w,"")), e=f.slice(0,f.length-1).concat(e), d=0;d<e.length;d+=1)if(p=e[d], "."===p)e.splice(d,1), d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;d>0&&(e.splice(d-1,2), d-=2)};e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((f||h)&&g){for(n=e.split("/"), d=n.length;d>0;d-=1){if(o=n.slice(0,d).join("/"), f)for(u=f.length;u>0;u-=1)if(s=g[f.slice(0,u).join("/")], s&&(s=s[o])){r=s, l=d;break};if(r)break;!a&&h&&h[o]&&(a=h[o], c=d)}!r&&a&&(r=a, l=c), r&&(n.splice(0,l,r), e=n.join("/"))}return e}function i(e,n){return function(){var o=$.call(arguments,0);return"string"!=typeof o[0]&&1===o.length&&o.push(null), f.apply(t,o.concat([e,n]))}}function l(e){return function(t){return r(t,e)}}function a(e){return function(t){m[e]=t}}function c(e){if(s(b,e)){var n=b[e];delete b[e], x[e]=!0, p.apply(t,n)}if(!s(m,e)&&!s(x,e))throw new Error("No "+e);return m[e]}function d(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n), e=e.substring(n+1,e.length)), [t,e]}function u(e){return function(){return y&&y.config&&y.config[e]||{}}}var p,f,g,h,m={},b={},y={},x={},_=Object.prototype.hasOwnProperty,$=[].slice,w=/\.js$/;g=function(e,t){var n,o=d(e),s=o[0];return e=o[1], s&&(s=r(s,t), n=c(s)), s?e=n&&n.normalize?n.normalize(e,l(t)):r(e,t):(e=r(e,t), o=d(e), s=o[0], e=o[1], s&&(n=c(s))), {f:s?s+"!"+e:e,n:e,pr:s,p:n}}, h={require:function(e){return i(e)},exports:function(e){var t=m[e];return"undefined"!=typeof t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:u(e)}}}, p=function(e,n,o,r){var l,d,u,p,f,y,_=[],$=typeof o;if(r=r||e, "undefined"===$||"function"===$){for(n=!n.length&&o.length?["require","exports","module"]:n, f=0;f<n.length;f+=1)if(p=g(n[f],r), d=p.f, "require"===d)_[f]=h.require(e);else if("exports"===d)_[f]=h.exports(e), y=!0;else if("module"===d)l=_[f]=h.module(e);else if(s(m,d)||s(b,d)||s(x,d))_[f]=c(d);else{if(!p.p)throw new Error(e+" missing "+d);p.p.load(p.n,i(r,!0),a(d),{}), _[f]=m[d]};u=o?o.apply(m[e],_):void 0, e&&(l&&l.exports!==t&&l.exports!==m[e]?m[e]=l.exports:u===t&&y||(m[e]=u))}else e&&(m[e]=o)}, e=n=f=function(e,n,o,s,r){if("string"==typeof e)return h[e]?h[e](n):c(g(e,n).f);if(!e.splice){if(y=e, y.deps&&f(y.deps,y.callback), !n)return;n.splice?(e=n, n=o, o=null):e=t}return n=n||function(){}, "function"==typeof o&&(o=s, s=r), s?p(t,e,n,o):setTimeout(function(){p(t,e,n,o)},4), f}, f.config=function(e){return f(e)}, e._defined=m, o=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t, t=[]), s(m,e)||s(b,e)||(b[e]=[e,t,n])}, o.amd={jQuery:!0}}(), t.requirejs=e, t.require=n, t.define=o}}(), t.define("almond",function(){}), t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), t}), t.define("select2sensbitfedex/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var o in t){var s=t[o];"function"==typeof s&&"constructor"!==o&&n.push(o)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var o={}.hasOwnProperty;for(var s in t)o.call(t,s)&&(e[s]=t[s]);return n.prototype=t.prototype, e.prototype=new n, e.__super__=t.prototype, e}, n.Decorate=function(e,n){function o(){var t=Array.prototype.unshift,o=n.prototype.constructor.length,s=e.prototype.constructor;o>0&&(t.call(arguments,e.prototype.constructor), s=n.prototype.constructor), s.apply(this,arguments)}function s(){this.constructor=o}var r=t(n),i=t(e);n.displayName=e.displayName, o.prototype=new s;for(var l=0;l<i.length;l++){var a=i[l];o.prototype[a]=e.prototype[a]}for(var c=(function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var s=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t), s.apply(this,arguments)}}),d=0;d<r.length;d++){var u=r[d];o.prototype[u]=c(u)}return o};var o=function(){this.listeners={}};return o.prototype.on=function(e,t){this.listeners=this.listeners||{}, e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]}, o.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{}, null==n&&(n=[]), 0===n.length&&n.push({}), n[0]._type=e, e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)), "*" in this.listeners&&this.invoke(this.listeners["*"],arguments)}, o.prototype.invoke=function(e,t){for(var n=0,o=e.length;o>n;n++)e[n].apply(this,t)}, n.Observable=o, n.generateChars=function(e){for(var t="",n=0;e>n;n++){var o=Math.floor(36*Math.random());t+=o.toString(36)}return t}, n.bind=function(e,t){return function(){e.apply(t,arguments)}}, n._convertData=function(e){for(var t in e){var n=t.split("-"),o=e;if(1!==n.length){for(var s=0;s<n.length;s++){var r=n[s];r=r.substring(0,1).toLowerCase()+r.substring(1), r in o||(o[r]={}), s==n.length-1&&(o[r]=e[t]), o=o[r]}delete e[t]}}return e}, n.hasScroll=function(t,n){var o=e(n),s=n.style.overflowX,r=n.style.overflowY;return s!==r||"hidden"!==r&&"visible"!==r?"scroll"===s||"scroll"===r?!0:o.innerHeight()<n.scrollHeight||o.innerWidth()<n.scrollWidth:!1}, n.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}, n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var o=e();e.map(n,function(e){o=o.add(e)}), n=o}t.append(n)}, n}), t.define("select2sensbitfedex/results",["jquery","./utils"],function(e,t){function n(e,t,o){this.$element=e, this.data=o, this.options=t, n.__super__.constructor.call(this)}return t.Extend(n,t.Observable), n.prototype.render=function(){var t=e('<ul class="select2sensbitfedex-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"), this.$results=t, t}, n.prototype.clear=function(){this.$results.empty()}, n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(), this.hideLoading();var o=e('<li role="treeitem" aria-live="assertive" class="select2sensbitfedex-results__option"></li>'),s=this.options.get("translations").get(t.message);o.append(n(s(t.args))), o[0].className+=" select2sensbitfedex-results__message", this.$results.append(o)}, n.prototype.hideMessages=function(){this.$results.find(".select2sensbitfedex-results__message").remove()}, n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var o=e.results[n],s=this.option(o);t.push(s)}this.$results.append(t)}, n.prototype.position=function(e,t){var n=t.find(".select2sensbitfedex-results");n.append(e)}, n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)}, n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2sensbitfedex-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"), this.ensureHighlightVisible()}, n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var o=e.map(n,function(e){return e.id.toString()}),s=t.$results.find(".select2sensbitfedex-results__option[aria-selected]");s.each(function(){var t=e(this),n=e.data(this,"data"),s=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(s,o)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})}, n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},o=this.option(n);o.className+=" loading-results", this.$results.prepend(o)}, n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()}, n.prototype.option=function(t){var n=document.createElement("li");n.className="select2sensbitfedex-results__option";var o={role:"treeitem","aria-selected":"false"};t.disabled&&(delete o["aria-selected"], o["aria-disabled"]="true"), null==t.id&&delete o["aria-selected"], null!=t._resultId&&(n.id=t._resultId), t.title&&(n.title=t.title), t.children&&(o.role="group", o["aria-label"]=t.text, delete o["aria-selected"]);for(var s in o){var r=o[s];n.setAttribute(s,r)}if(t.children){var i=e(n),l=document.createElement("strong");l.className="select2sensbitfedex-results__group";e(l);this.template(t,l);for(var a=[],c=0;c<t.children.length;c++){var d=t.children[c],u=this.option(d);a.push(u)}var p=e("<ul></ul>",{"class":"select2sensbitfedex-results__options select2sensbitfedex-results__options--nested"});p.append(a), i.append(l), i.append(p)}else this.template(t,n);return e.data(n,"data",t), n}, n.prototype.bind=function(t,n){var o=this,s=t.id+"-results";this.$results.attr("id",s), t.on("results:all",function(e){o.clear(), o.append(e.data), t.isOpen()&&(o.setClasses(), o.highlightFirstItem())}), t.on("results:append",function(e){o.append(e.data), t.isOpen()&&o.setClasses()}), t.on("query",function(e){o.hideMessages(), o.showLoading(e)}), t.on("select",function(){t.isOpen()&&(o.setClasses(), o.highlightFirstItem())}), t.on("unselect",function(){t.isOpen()&&(o.setClasses(), o.highlightFirstItem())}), t.on("open",function(){o.$results.attr("aria-expanded","true"), o.$results.attr("aria-hidden","false"), o.setClasses(), o.ensureHighlightVisible()}), t.on("close",function(){o.$results.attr("aria-expanded","false"), o.$results.attr("aria-hidden","true"), o.$results.removeAttr("aria-activedescendant")}), t.on("results:toggle",function(){var e=o.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}), t.on("results:select",function(){var e=o.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?o.trigger("close",{}):o.trigger("select",{data:t})}}), t.on("results:previous",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var s=n-1;0===e.length&&(s=0);var r=t.eq(s);r.trigger("mouseenter");var i=o.$results.offset().top,l=r.offset().top,a=o.$results.scrollTop()+(l-i);0===s?o.$results.scrollTop(0):0>l-i&&o.$results.scrollTop(a)}}), t.on("results:next",function(){var e=o.getHighlightedResults(),t=o.$results.find("[aria-selected]"),n=t.index(e),s=n+1;if(!(s>=t.length)){var r=t.eq(s);r.trigger("mouseenter");var i=o.$results.offset().top+o.$results.outerHeight(!1),l=r.offset().top+r.outerHeight(!1),a=o.$results.scrollTop()+l-i;0===s?o.$results.scrollTop(0):l>i&&o.$results.scrollTop(a)}}), t.on("results:focus",function(e){e.element.addClass("select2sensbitfedex-results__option--highlighted")}), t.on("results:message",function(e){o.displayMessage(e)}), e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=o.$results.scrollTop(),n=o.$results.get(0).scrollHeight-t+e.deltaY,s=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=o.$results.height();s?(o.$results.scrollTop(0), e.preventDefault(), e.stopPropagation()):r&&(o.$results.scrollTop(o.$results.get(0).scrollHeight-o.$results.height()), e.preventDefault(), e.stopPropagation())}), this.$results.on("mouseup",".select2sensbitfedex-results__option[aria-selected]",function(t){var n=e(this),s=n.data("data");return"true"===n.attr("aria-selected")?void(o.options.get("multiple")?o.trigger("unselect",{originalEvent:t,data:s}):o.trigger("close",{})):void o.trigger("select",{originalEvent:t,data:s})}), this.$results.on("mouseenter",".select2sensbitfedex-results__option[aria-selected]",function(t){var n=e(this).data("data");o.getHighlightedResults().removeClass("select2sensbitfedex-results__option--highlighted"), o.trigger("results:focus",{data:n,element:e(this)})})}, n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2sensbitfedex-results__option--highlighted");return e}, n.prototype.destroy=function(){this.$results.remove()}, n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),o=this.$results.offset().top,s=e.offset().top,r=this.$results.scrollTop()+(s-o),i=s-o;r-=2*e.outerHeight(!1), 2>=n?this.$results.scrollTop(0):(i>this.$results.outerHeight()||0>i)&&this.$results.scrollTop(r)}}, n.prototype.template=function(t,n){var o=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),r=o(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=s(r):e(n).append(r)}, n}), t.define("select2sensbitfedex/keys",[],function(){var e={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};return e}), t.define("select2sensbitfedex/selection/base",["jquery","../utils","../keys"],function(e,t,n){function o(e,t){this.$element=e, this.options=t, o.__super__.constructor.call(this)}return t.Extend(o,t.Observable), o.prototype.render=function(){var t=e('<span class="select2sensbitfedex-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0, null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")), t.attr("title",this.$element.attr("title")), t.attr("tabindex",this._tabindex), this.$selection=t, t}, o.prototype.bind=function(e,t){var o=this,s=(e.id+"-container", e.id+"-results");this.container=e, this.$selection.on("focus",function(e){o.trigger("focus",e)}), this.$selection.on("blur",function(e){o._handleBlur(e)}), this.$selection.on("keydown",function(e){o.trigger("keypress",e), e.which===n.SPACE&&e.preventDefault()}), e.on("results:focus",function(e){o.$selection.attr("aria-activedescendant",e.data._resultId)}), e.on("selection:update",function(e){o.update(e.data)}), e.on("open",function(){o.$selection.attr("aria-expanded","true"), o.$selection.attr("aria-owns",s), o._attachCloseHandler(e)}), e.on("close",function(){o.$selection.attr("aria-expanded","false"), o.$selection.removeAttr("aria-activedescendant"), o.$selection.removeAttr("aria-owns"), o.$selection.focus(), o._detachCloseHandler(e)}), e.on("enable",function(){o.$selection.attr("tabindex",o._tabindex)}), e.on("disable",function(){o.$selection.attr("tabindex","-1")})}, o.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)}, o.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2sensbitfedex."+t.id,function(t){var n=e(t.target),o=n.closest(".select2sensbitfedex"),s=e(".select2sensbitfedex.select2sensbitfedex-container--open");s.each(function(){var t=e(this);if(this!=o[0]){var n=t.data("element");n.select2sensbitfedex("close")}})})}, o.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2sensbitfedex."+t.id)}, o.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)}, o.prototype.destroy=function(){this._detachCloseHandler(this.container)}, o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")}, o}), t.define("select2sensbitfedex/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,o){function s(){s.__super__.constructor.apply(this,arguments)}return n.Extend(s,t), s.prototype.render=function(){var e=s.__super__.render.call(this);return e.addClass("select2sensbitfedex-selection--single"), e.html('<span class="select2sensbitfedex-selection__rendered"></span><span class="select2sensbitfedex-selection__arrow" role="presentation"><b role="presentation"></b></span>'), e}, s.prototype.bind=function(e,t){var n=this;s.__super__.bind.apply(this,arguments);var o=e.id+"-container";this.$selection.find(".select2sensbitfedex-selection__rendered").attr("id",o), this.$selection.attr("aria-labelledby",o), this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}), this.$selection.on("focus",function(e){}), this.$selection.on("blur",function(e){}), e.on("focus",function(t){e.isOpen()||n.$selection.focus()}), e.on("selection:update",function(e){n.update(e.data)})}, s.prototype.clear=function(){this.$selection.find(".select2sensbitfedex-selection__rendered").empty()}, s.prototype.display=function(e,t){var n=this.options.get("templateSelection"),o=this.options.get("escapeMarkup");return o(n(e,t))}, s.prototype.selectionContainer=function(){return e("<span></span>")}, s.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2sensbitfedex-selection__rendered"),o=this.display(t,n);n.empty().append(o), n.prop("title",t.title||t.text)}, s}), t.define("select2sensbitfedex/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function o(e,t){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t), o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2sensbitfedex-selection--multiple"), e.html('<ul class="select2sensbitfedex-selection__rendered"></ul>'), e}, o.prototype.bind=function(t,n){var s=this;o.__super__.bind.apply(this,arguments), this.$selection.on("click",function(e){s.trigger("toggle",{originalEvent:e})}), this.$selection.on("click",".select2sensbitfedex-selection__choice__remove",function(t){if(!s.options.get("disabled")){var n=e(this),o=n.parent(),r=o.data("data");s.trigger("unselect",{originalEvent:t,data:r})}})}, o.prototype.clear=function(){this.$selection.find(".select2sensbitfedex-selection__rendered").empty()}, o.prototype.display=function(e,t){var n=this.options.get("templateSelection"),o=this.options.get("escapeMarkup");return o(n(e,t))}, o.prototype.selectionContainer=function(){var t=e('<li class="select2sensbitfedex-selection__choice"><span class="select2sensbitfedex-selection__choice__remove" role="presentation">&times;</span></li>');return t}, o.prototype.update=function(e){if(this.clear(), 0!==e.length){for(var t=[],o=0;o<e.length;o++){var s=e[o],r=this.selectionContainer(),i=this.display(s,r);r.append(i), r.prop("title",s.title||s.text), r.data("data",s), t.push(r)}var l=this.$selection.find(".select2sensbitfedex-selection__rendered");n.appendMany(l,t)}}, o}), t.define("select2sensbitfedex/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")), e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}), t}, t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)), n.addClass("select2sensbitfedex-selection__placeholder").removeClass("select2sensbitfedex-selection__choice"), n}, t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id,o=t.length>1;if(o||n)return e.call(this,t);this.clear();var s=this.createPlaceholder(this.placeholder);this.$selection.find(".select2sensbitfedex-selection__rendered").append(s)}, t}), t.define("select2sensbitfedex/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var o=this;e.call(this,t,n), 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",".select2sensbitfedex-selection__clear",function(e){o._handleClear(e)}), t.on("keypress",function(e){o._handleKeyboardClear(e,t)})}, n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2sensbitfedex-selection__clear");if(0!==n.length){t.stopPropagation();for(var o=n.data("data"),s=0;s<o.length;s++){var r={data:o[s]};if(this.trigger("unselect",r), r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"), this.trigger("toggle",{})}}}, n.prototype._handleKeyboardClear=function(e,n,o){o.isOpen()||(n.which==t.DELETE||n.which==t.BACKSPACE)&&this._handleClear(n)}, n.prototype.update=function(t,n){if(t.call(this,n), !(this.$selection.find(".select2sensbitfedex-selection__placeholder").length>0||0===n.length)){var o=e('<span class="select2sensbitfedex-selection__clear">&times;</span>');o.data("data",n), this.$selection.find(".select2sensbitfedex-selection__rendered").prepend(o)}}, n}), t.define("select2sensbitfedex/selection/search",["jquery","../utils","../keys"],function(e,t,n){function o(e,t,n){e.call(this,t,n)}return o.prototype.render=function(t){var n=e('<li class="select2sensbitfedex-search select2sensbitfedex-search--inline"><input class="select2sensbitfedex-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n, this.$search=n.find("input");var o=t.call(this);return this._transferTabIndex(), o}, o.prototype.bind=function(e,t,o){var s=this;e.call(this,t,o), t.on("open",function(){s.$search.trigger("focus")}), t.on("close",function(){s.$search.val(""), s.$search.removeAttr("aria-activedescendant"), s.$search.trigger("focus")}), t.on("enable",function(){s.$search.prop("disabled",!1), s._transferTabIndex()}), t.on("disable",function(){s.$search.prop("disabled",!0)}), t.on("focus",function(e){s.$search.trigger("focus")}), t.on("results:focus",function(e){s.$search.attr("aria-activedescendant",e.id)}), this.$selection.on("focusin",".select2sensbitfedex-search--inline",function(e){s.trigger("focus",e)}), this.$selection.on("focusout",".select2sensbitfedex-search--inline",function(e){s._handleBlur(e)}), this.$selection.on("keydown",".select2sensbitfedex-search--inline",function(e){e.stopPropagation(), s.trigger("keypress",e), s._keyUpPrevented=e.isDefaultPrevented();var t=e.which;if(t===n.BACKSPACE&&""===s.$search.val()){var o=s.$searchContainer.prev(".select2sensbitfedex-selection__choice");if(o.length>0){var r=o.data("data");s.searchRemoveChoice(r), e.preventDefault()}}});var r=document.documentMode,i=r&&11>=r;this.$selection.on("input.searchcheck",".select2sensbitfedex-search--inline",function(e){return i?void s.$selection.off("input.search input.searchcheck"):void s.$selection.off("keyup.search")}), this.$selection.on("keyup.search input.search",".select2sensbitfedex-search--inline",function(e){if(i&&"input"===e.type)return void s.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&s.handleSearch(e)})}, o.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")), this.$selection.attr("tabindex","-1")}, o.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)}, o.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""), e.call(this,t), this.$selection.find(".select2sensbitfedex-selection__rendered").append(this.$searchContainer), this.resizeSearch(), n&&this.$search.focus()}, o.prototype.handleSearch=function(){if(this.resizeSearch(), !this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1}, o.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}), this.$search.val(t.text), this.handleSearch()}, o.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2sensbitfedex-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)}, o}), t.define("select2sensbitfedex/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,o){var s=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],i=["opening","closing","selecting","unselecting"];t.call(this,n,o), n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var o=e.Event("select2sensbitfedex:"+t,{params:n});s.$element.trigger(o), -1!==e.inArray(t,i)&&(n.prevented=o.isDefaultPrevented())}})}, t}), t.define("select2sensbitfedex/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict}, n.prototype.get=function(e){return this.dict[e]}, n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)}, n._cache={}, n.loadPath=function(e){if(!(e in n._cache)){var o=t(e);n._cache[e]=o}return new n(n._cache[e])}, n}), t.define("select2sensbitfedex/diacritics",[],function(){var e={"Ⓐ":"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","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"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","Ⓘ":"I","":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"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","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","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","Ƣ":"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","Ꝡ":"VY","Ⓦ":"W","":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"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","ⓐ":"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","ↄ":"c","ⓓ":"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","ⓖ":"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","ƕ":"hv","ⓘ":"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","ⓛ":"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","ⓝ":"n","":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"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","ẛ":"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","ⓥ":"v","":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}), t.define("select2sensbitfedex/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable), t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")}, t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")}, t.prototype.bind=function(e,t){}, t.prototype.destroy=function(){}, t.prototype.generateResultId=function(t,n){var o=t.id+"-result-";return o+=e.generateChars(4), o+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)}, t}), t.define("select2sensbitfedex/data/select",["./base","../utils","jquery"],function(e,t,n){function o(e,t){this.$element=e, this.options=t, o.__super__.constructor.call(this)}return t.Extend(o,e), o.prototype.current=function(e){var t=[],o=this;this.$element.find(":selected").each(function(){var e=n(this),s=o.item(e);t.push(s)}), e(t)}, o.prototype.select=function(e){var t=this;if(e.selected=!0, n(e.element).is("option"))return e.element.selected=!0, void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(o){var s=[];e=[e], e.push.apply(e,o);for(var r=0;r<e.length;r++){var i=e[r].id;-1===n.inArray(i,s)&&s.push(i)}t.$element.val(s), t.$element.trigger("change")});else{var o=e.id;this.$element.val(o), this.$element.trigger("change")}}, o.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1, n(e.element).is("option")?(e.element.selected=!1, void this.$element.trigger("change")):void this.current(function(o){for(var s=[],r=0;r<o.length;r++){var i=o[r].id;i!==e.id&&-1===n.inArray(i,s)&&s.push(i)}t.$element.val(s), t.$element.trigger("change")})}, o.prototype.bind=function(e,t){var n=this;this.container=e, e.on("select",function(e){n.select(e.data)}), e.on("unselect",function(e){n.unselect(e.data)})}, o.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})}, o.prototype.query=function(e,t){var o=[],s=this,r=this.$element.children();r.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=s.item(t),i=s.matches(e,r);null!==i&&o.push(i)}}), t({results:o})}, o.prototype.addOptions=function(e){t.appendMany(this.$element,e)}, o.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"), t.label=e.text):(t=document.createElement("option"), void 0!==t.textContent?t.textContent=e.text:t.innerText=e.text), e.id&&(t.value=e.id), e.disabled&&(t.disabled=!0), e.selected&&(t.selected=!0), e.title&&(t.title=e.title);var o=n(t),s=this._normalizeItem(e);return s.element=t, n.data(t,"data",s), o}, o.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"), null!=t)return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),s=[],r=0;r<o.length;r++){var i=n(o[r]),l=this.item(i);s.push(l)}t.children=s}return t=this._normalizeItem(t), t.element=e[0], n.data(e[0],"data",t), t}, o.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}), e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()), null!=e.text&&(e.text=e.text.toString()), null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)), n.extend({},t,e)}, o.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)}, o}), t.define("select2sensbitfedex/data/array",["./select","../utils","jquery"],function(e,t,n){function o(e,t){var n=t.get("data")||[];o.__super__.constructor.call(this,e,t), this.addOptions(this.convertToOptions(n))}return t.Extend(o,e), o.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e), this.addOptions(t)), o.__super__.select.call(this,e)}, o.prototype.convertToOptions=function(e){function o(e){return function(){return n(this).val()==e.id}}for(var s=this,r=this.$element.find("option"),i=r.map(function(){return s.item(n(this)).id}).get(),l=[],a=0;a<e.length;a++){var c=this._normalizeItem(e[a]);if(n.inArray(c.id,i)>=0){var d=r.filter(o(c)),u=this.item(d),p=n.extend(!0,{},c,u),f=this.option(p);d.replaceWith(f)}else{var g=this.option(c);if(c.children){var h=this.convertToOptions(c.children);t.appendMany(g,h)}l.push(g)}}return l}, o}), t.define("select2sensbitfedex/data/ajax",["./array","../utils","jquery"],function(e,t,n){function o(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")), null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults), o.__super__.constructor.call(this,e,t)}return t.Extend(o,e), o.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,o){var s=n.ajax(e);return s.then(t), s.fail(o), s}};return n.extend({},t,e,!0)}, o.prototype.processResults=function(e){return e}, o.prototype.query=function(e,t){function o(){var o=r.transport(r,function(o){var r=s.processResults(o,e);s.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), t(r)},function(){o.status&&"0"===o.status||s.trigger("results:message",{message:"errorLoading"})});s._request=o}var s=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(), this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)), "function"==typeof r.data&&(r.data=r.data.call(this.$element,e)), this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout), this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()}, o}), t.define("select2sensbitfedex/data/tags",["jquery"],function(e){function t(t,n,o){var s=o.get("tags"),r=o.get("createTag");void 0!==r&&(this.createTag=r);var i=o.get("insertTag");if(void 0!==i&&(this.insertTag=i), t.call(this,n,o), e.isArray(s))for(var l=0;l<s.length;l++){var a=s[l],c=this._normalizeItem(a),d=this.option(c);this.$element.append(d)}}return t.prototype.query=function(e,t,n){function o(e,r){for(var i=e.results,l=0;l<i.length;l++){var a=i[l],c=null!=a.children&&!o({results:a.children},!0),d=a.text===t.term;if(d||c)return r?!1:(e.data=i, void n(e))}if(r)return!0;var u=s.createTag(t);if(null!=u){var p=s.option(u);p.attr("data-select2sensbitfedex-tag",!0), s.addOptions([p]), s.insertTag(i,u)}e.results=i, n(e)}var s=this;return this._removeOldTags(), null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,o)}, t.prototype.createTag=function(t,n){var o=e.trim(n.term);return""===o?null:{id:o,text:o}}, t.prototype.insertTag=function(e,t,n){t.unshift(n)}, t.prototype._removeOldTags=function(t){var n=(this._lastTag, this.$element.find("option[data-select2sensbitfedex-tag]"));n.each(function(){this.selected||e(this).remove()})}, t}), t.define("select2sensbitfedex/data/tokenizer",["jquery"],function(e){function t(e,t,n){var o=n.get("tokenizer");void 0!==o&&(this.tokenizer=o), e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n), this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2sensbitfedex-search__field")}, t.prototype.query=function(t,n,o){function s(t){var n=i._normalizeItem(t),o=i.$element.find("option").filter(function(){return e(this).val()===n.id});if(!o.length){var s=i.option(n);s.attr("data-select2sensbitfedex-tag",!0), i._removeOldTags(), i.addOptions([s])}r(n)}function r(e){i.trigger("select",{data:e})}var i=this;n.term=n.term||"";var l=this.tokenizer(n,this.options,s);l.term!==n.term&&(this.$search.length&&(this.$search.val(l.term), this.$search.focus()), n.term=l.term), t.call(this,n,o)}, t.prototype.tokenizer=function(t,n,o,s){for(var r=o.get("tokenSeparators")||[],i=n.term,l=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};l<i.length;){var c=i[l];if(-1!==e.inArray(c,r)){var d=i.substr(0,l),u=e.extend({},n,{term:d}),p=a(u);null!=p?(s(p), i=i.substr(l+1)||"", l=0):l++}else l++}return{term:i}}, t}), t.define("select2sensbitfedex/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"), e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"", t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)}, e}), t.define("select2sensbitfedex/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"), e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"", this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)}, e}), t.define("select2sensbitfedex/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"), e.call(this,t,n)}return e.prototype.query=function(e,t,n){var o=this;this.current(function(s){var r=null!=s?s.length:0;return o.maximumSelectionLength>0&&r>=o.maximumSelectionLength?void o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):void e.call(o,t,n)})}, e}), t.define("select2sensbitfedex/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e, this.options=t, n.__super__.constructor.call(this)}return t.Extend(n,t.Observable), n.prototype.render=function(){var t=e('<span class="select2sensbitfedex-dropdown"><span class="select2sensbitfedex-results"></span></span>');return t.attr("dir",this.options.get("dir")), this.$dropdown=t, t}, n.prototype.bind=function(){}, n.prototype.position=function(e,t){}, n.prototype.destroy=function(){this.$dropdown.remove()}, n}), t.define("select2sensbitfedex/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),o=e('<span class="select2sensbitfedex-search select2sensbitfedex-search--dropdown"><input class="select2sensbitfedex-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=o, this.$search=o.find("input"), n.prepend(o), n}, n.prototype.bind=function(t,n,o){var s=this;t.call(this,n,o), this.$search.on("keydown",function(e){s.trigger("keypress",e), s._keyUpPrevented=e.isDefaultPrevented()}), this.$search.on("input",function(t){e(this).off("keyup")}), this.$search.on("keyup input",function(e){s.handleSearch(e)}), n.on("open",function(){s.$search.attr("tabindex",0), s.$search.focus(), window.setTimeout(function(){s.$search.focus()},0)}), n.on("close",function(){s.$search.attr("tabindex",-1), s.$search.val("")}), n.on("focus",function(){n.isOpen()&&s.$search.focus()}), n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=s.showSearch(e);t?s.$searchContainer.removeClass("select2sensbitfedex-search--hide"):s.$searchContainer.addClass("select2sensbitfedex-search--hide")}})}, n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1}, n.prototype.showSearch=function(e,t){return!0}, n}), t.define("select2sensbitfedex/dropdown/hidePlaceholder",[],function(){function e(e,t,n,o){this.placeholder=this.normalizePlaceholder(n.get("placeholder")), e.call(this,t,n,o)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results), e.call(this,t)}, e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}), t}, e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),o=t.length-1;o>=0;o--){var s=t[o];this.placeholder.id===s.id&&n.splice(o,1)}return n}, e}), t.define("select2sensbitfedex/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,o){this.lastParams={}, e.call(this,t,n,o), this.$loadingMore=this.createLoadingMore(), this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(), this.loading=!1, e.call(this,t), this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)}, t.prototype.bind=function(t,n,o){var s=this;t.call(this,n,o), n.on("query",function(e){s.lastParams=e, s.loading=!0}), n.on("query:append",function(e){s.lastParams=e, s.loading=!0}), this.$results.on("scroll",function(){var t=e.contains(document.documentElement,s.$loadingMore[0]);if(!s.loading&&t){var n=s.$results.offset().top+s.$results.outerHeight(!1),o=s.$loadingMore.offset().top+s.$loadingMore.outerHeight(!1);n+50>=o&&s.loadMore()}})}, t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++, this.trigger("query:append",t)}, t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more}, t.prototype.createLoadingMore=function(){var t=e('<li class="select2sensbitfedex-results__option select2sensbitfedex-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)), t}, t}), t.define("select2sensbitfedex/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,o){this.$dropdownParent=o.get("dropdownParent")||e(document.body), t.call(this,n,o)}return n.prototype.bind=function(e,t,n){var o=this,s=!1;e.call(this,t,n), t.on("open",function(){o._showDropdown(), o._attachPositioningHandler(t), s||(s=!0, t.on("results:all",function(){o._positionDropdown(), o._resizeDropdown()}), t.on("results:append",function(){o._positionDropdown(), o._resizeDropdown()}))}), t.on("close",function(){o._hideDropdown(), o._detachPositioningHandler(t)}), this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})}, n.prototype.destroy=function(e){e.call(this), this.$dropdownContainer.remove()}, n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")), t.removeClass("select2sensbitfedex"), t.addClass("select2sensbitfedex-container--open"), t.css({position:"absolute",top:-999999}), this.$container=n}, n.prototype.render=function(t){var n=e("<span></span>"),o=t.call(this);return n.append(o), this.$dropdownContainer=n, n}, n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()}, n.prototype._attachPositioningHandler=function(n,o){var s=this,r="scroll.select2sensbitfedex."+o.id,i="resize.select2sensbitfedex."+o.id,l="orientationchange.select2sensbitfedex."+o.id,a=this.$container.parents().filter(t.hasScroll);a.each(function(){e(this).data("select2sensbitfedex-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}), a.on(r,function(t){var n=e(this).data("select2sensbitfedex-scroll-position");e(this).scrollTop(n.y)}), e(window).on(r+" "+i+" "+l,function(e){s._positionDropdown(), s._resizeDropdown()})}, n.prototype._detachPositioningHandler=function(n,o){var s="scroll.select2sensbitfedex."+o.id,r="resize.select2sensbitfedex."+o.id,i="orientationchange.select2sensbitfedex."+o.id,l=this.$container.parents().filter(t.hasScroll);l.off(s), e(window).off(s+" "+r+" "+i)}, n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2sensbitfedex-dropdown--above"),o=this.$dropdown.hasClass("select2sensbitfedex-dropdown--below"),s=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var i={height:this.$container.outerHeight(!1)};i.top=r.top, i.bottom=r.top+i.height;var l={height:this.$dropdown.outerHeight(!1)},a={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=a.top<r.top-l.height,d=a.bottom>r.bottom+l.height,u={left:r.left,top:i.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();u.top-=f.top, u.left-=f.left, n||o||(s="below"), d||!c||n?!c&&d&&n&&(s="below"):s="above", ("above"==s||n&&"below"!==s)&&(u.top=i.top-f.top-l.height), null!=s&&(this.$dropdown.removeClass("select2sensbitfedex-dropdown--below select2sensbitfedex-dropdown--above").addClass("select2sensbitfedex-dropdown--"+s), this.$container.removeClass("select2sensbitfedex-container--below select2sensbitfedex-container--above").addClass("select2sensbitfedex-container--"+s)), this.$dropdownContainer.css(u)}, n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width, e.position="relative", e.width="auto"), this.$dropdown.css(e)}, n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown()}, n}), t.define("select2sensbitfedex/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,o=0;o<t.length;o++){var s=t[o];s.children?n+=e(s.children):n++}return n}function t(e,t,n,o){this.minimumResultsForSearch=n.get("minimumResultsForSearch"), this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0), e.call(this,t,n,o)}return t.prototype.showSearch=function(t,n){return e(n.data.results)<this.minimumResultsForSearch?!1:t.call(this,n)}, t}), t.define("select2sensbitfedex/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var o=this;e.call(this,t,n), t.on("close",function(e){o._handleSelectOnClose(e)})}, e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var o=this.getHighlightedResults();if(!(o.length<1)){var s=o.data("data");null!=s.element&&s.element.selected||null==s.element&&s.selected||this.trigger("select",{data:s})}}, e}), t.define("select2sensbitfedex/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var o=this;e.call(this,t,n), t.on("select",function(e){o._selectTriggered(e)}), t.on("unselect",function(e){o._selectTriggered(e)})}, e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})}, e}), t.define("select2sensbitfedex/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"), n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"), t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}), t.define("select2sensbitfedex/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,o,s,r,i,l,a,c,d,u,p,f,g,h,m,b,y,x,_,$,w,v,A,O,C,E,S){function D(){this.reset()}D.prototype.apply=function(u){if(u=e.extend(!0,{},this.defaults,u), null==u.dataAdapter){if(null!=u.ajax?u.dataAdapter=g:null!=u.data?u.dataAdapter=f:u.dataAdapter=p, u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,b)), u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)), u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,x)), u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,h)), (null!=u.tokenSeparators||null!=u.tokenizer)&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)), null!=u.query){var S=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,S)}if(null!=u.initSelection){var D=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,D)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n, null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,v)), null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,w)), u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,C))), null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=_;else{var T=c.Decorate(_,$);u.dropdownAdapter=T}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,O)), u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,E)), null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var q=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,q)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,A)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=s:u.selectionAdapter=o, null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)), u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,i)), u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,l)), null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var k=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,k)}u.selectionAdapter=c.Decorate(u.selectionAdapter,a)}if("string"==typeof u.language)if(u.language.indexOf("-")>0){var L=u.language.split("-"),j=L[0];u.language=[u.language,j]}else u.language=[u.language];if(e.isArray(u.language)){var P=new d;u.language.push("en");for(var I=u.language,U=0;U<I.length;U++){var z=I[U],R={};try{R=d.loadPath(z)}catch(e){try{z=this.defaults.amdLanguageBase+z, R=d.loadPath(z)}catch(e){u.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+z+'" could not be automatically loaded. A fallback will be used instead.');continue}};P.extend(R)}u.translations=P}else{var H=d.loadPath(this.defaults.amdLanguageBase+"en"),M=new d(u.language);M.extend(H), u.translations=M}return u}, D.prototype.reset=function(){function t(e){function t(e){return u[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(o,s){if(""===e.trim(o.term))return s;if(s.children&&s.children.length>0){for(var r=e.extend(!0,{},s),i=s.children.length-1;i>=0;i--){var l=s.children[i],a=n(o,l);null==a&&r.children.splice(i,1)}return r.children.length>0?r:n(o,r)}var c=t(s.text).toUpperCase(),d=t(o.term).toUpperCase();return c.indexOf(d)>-1?s:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:S,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}}, D.prototype.set=function(t,n){var o=e.camelCase(t),s={};s[o]=n;var r=c._convertData(s);e.extend(this.defaults,r)};var T=new D;return T}), t.define("select2sensbitfedex/options",["require","jquery","./defaults","./utils"],function(e,t,n,o){function s(t,s){if(this.options=t, null!=s&&this.fromElement(s), this.options=n.apply(this.options), s&&s.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=o.Decorate(this.options.dataAdapter,r)}}return s.prototype.fromElement=function(e){var n=["select2sensbitfedex"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")), null==this.options.disabled&&(this.options.disabled=e.prop("disabled")), null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))), null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"), e.prop("disabled",this.options.disabled), e.prop("multiple",this.options.multiple), e.data("select2sensbitfedexTags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2sensbitfedex-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), e.data("data",e.data("select2sensbitfedexTags")), e.data("tags",!0)), e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."), e.attr("ajax--url",e.data("ajaxUrl")), e.data("ajax--url",e.data("ajaxUrl")));var s={};s=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},s);r=o._convertData(r);for(var i in r)t.inArray(i,n)>-1||(t.isPlainObject(this.options[i])?t.extend(this.options[i],r[i]):this.options[i]=r[i]);return this}, s.prototype.get=function(e){return this.options[e]}, s.prototype.set=function(e,t){this.options[e]=t}, s}), t.define("select2sensbitfedex/core",["jquery","./options","./utils","./keys"],function(e,t,n,o){var s=function(e,n){null!=e.data("select2sensbitfedex")&&e.data("select2sensbitfedex").destroy(), this.$element=e, this.id=this._generateId(e), n=n||{}, this.options=new t(n,e), s.__super__.constructor.call(this);var o=e.attr("tabindex")||0;e.data("old-tabindex",o), e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options), this.$selection=this.selection.render(), this.selection.position(this.$selection,i);var a=this.options.get("dropdownAdapter");this.dropdown=new a(e,this.options), this.$dropdown=this.dropdown.render(), this.dropdown.position(this.$dropdown,i);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter), this.$results=this.results.render(), this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(e){d.trigger("selection:update",{data:e})}), e.addClass("select2sensbitfedex-hidden-accessible"), e.attr("aria-hidden","true"), this._syncAttributes(), e.data("select2sensbitfedex",this)};return n.Extend(s,n.Observable), s.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4), t=t.replace(/(:|\.|\[|\]|,)/g,""), t="select2sensbitfedex-"+t}, s.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)}, s.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var o=this._resolveWidth(e,"style");return null!=o?o:this._resolveWidth(e,"element")}if("element"==t){var s=e.outerWidth(!1);return 0>=s?"auto":s+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var i=r.split(";"),l=0,a=i.length;a>l;l+=1){var c=i[l].replace(/\s/g,""),d=c.match(n);if(null!==d&&d.length>=1)return d[1]}return null}return t}, s.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)}, s.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2sensbitfedex",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}), this.$element.on("focus.select2sensbitfedex",function(e){t.trigger("focus",e)}), this._syncA=n.bind(this._syncAttributes,this), this._syncS=n.bind(this._syncSubtree,this), this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var o=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=o?(this._observer=new o(function(n){e.each(n,t._syncA), e.each(n,t._syncS)}), this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1), this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1), this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))}, s.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})}, s.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}), this.selection.on("focus",function(e){t.focus(e)}), this.selection.on("*",function(o,s){-1===e.inArray(o,n)&&t.trigger(o,s)})}, s.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})}, s.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})}, s.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2sensbitfedex-container--open")}), this.on("close",function(){e.$container.removeClass("select2sensbitfedex-container--open")}), this.on("enable",function(){e.$container.removeClass("select2sensbitfedex-container--disabled")}), this.on("disable",function(){e.$container.addClass("select2sensbitfedex-container--disabled")}), this.on("blur",function(){e.$container.removeClass("select2sensbitfedex-container--focus")}), this.on("query",function(t){e.isOpen()||e.trigger("open",{}), this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}), this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}), this.on("keypress",function(t){var n=t.which;e.isOpen()?n===o.ESC||n===o.TAB||n===o.UP&&t.altKey?(e.close(), t.preventDefault()):n===o.ENTER?(e.trigger("results:select",{}), t.preventDefault()):n===o.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}), t.preventDefault()):n===o.UP?(e.trigger("results:previous",{}), t.preventDefault()):n===o.DOWN&&(e.trigger("results:next",{}), t.preventDefault()):(n===o.ENTER||n===o.SPACE||n===o.DOWN&&t.altKey)&&(e.open(), t.preventDefault())})}, s.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",{})}, s.prototype._syncSubtree=function(e,t){var n=!1,o=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var s=0;s<t.addedNodes.length;s++){var r=t.addedNodes[s];r.selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){o.trigger("selection:update",{data:e})})}}, s.prototype.trigger=function(e,t){var n=s.__super__.trigger,o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}), e in o){var r=o[e],i={prevented:!1,name:e,args:t};if(n.call(this,r,i), i.prevented)return void(t.prevented=!0)}n.call(this,e,t)}, s.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())}, s.prototype.open=function(){this.isOpen()||this.trigger("query",{})}, s.prototype.close=function(){this.isOpen()&&this.trigger("close",{})}, s.prototype.isOpen=function(){return this.$container.hasClass("select2sensbitfedex-container--open")}, s.prototype.hasFocus=function(){return this.$container.hasClass("select2sensbitfedex-container--focus")}, s.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2sensbitfedex-container--focus"), this.trigger("focus",{}))}, s.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2sensbitfedex("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'), (null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)}, s.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2sensbitfedex("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}), e}, s.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2sensbitfedex("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})), this.$element.val(n).trigger("change")}, s.prototype.destroy=function(){this.$container.remove(), this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA), null!=this._observer?(this._observer.disconnect(), this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1), this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1), this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)), this._syncA=null, this._syncS=null, this.$element.off(".select2sensbitfedex"), this.$element.attr("tabindex",this.$element.data("old-tabindex")), this.$element.removeClass("select2sensbitfedex-hidden-accessible"), this.$element.attr("aria-hidden","false"), this.$element.removeData("select2sensbitfedex"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter=null, this.selection=null, this.dropdown=null, this.results=null}, s.prototype.render=function(){var t=e('<span class="select2sensbitfedex select2sensbitfedex-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")), this.$container=t, this.$container.addClass("select2sensbitfedex-container--"+this.options.get("theme")), t.data("element",this.$element), t}, s}), t.define("jquery-mousewheel",["jquery"],function(e){return e}), t.define("jquery.select2sensbitfedex",["jquery","jquery-mousewheel","./select2sensbitfedex/core","./select2sensbitfedex/defaults"],function(e,t,n,o){if(null==e.fn.select2sensbitfedex){var s=["open","close","destroy"];e.fn.select2sensbitfedex=function(t){if(t=t||{}, "object"==typeof t)return this.each(function(){var o=e.extend(!0,{},t);new n(e(this),o)}), this;if("string"==typeof t){var o,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2sensbitfedex");null==n&&window.console&&console.error&&console.error("The select2sensbitfedex('"+t+"') method was called on an element that is not using Select2."), o=n[t].apply(n,r)}), e.inArray(t,s)>-1?this:o}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2sensbitfedex.defaults&&(e.fn.select2sensbitfedex.defaults=o), n}), {define:t.define,require:t.require}}(),n=t.require("jquery.select2sensbitfedex");return e.fn.select2sensbitfedex.amd=t, n}),!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2sensbitfedex&&jQuery.fn.select2sensbitfedex.amd)var e=jQuery.fn.select2sensbitfedex.amd;return e.define("select2sensbitfedex/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(e,t){if(e===1)return t[0];if(e>1&&e<=4)return t[1];if(e>=5)return t[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var o=t.input.length-t.maximum;return"Usuń "+o+" "+n(o,e)},inputTooShort:function(t){var o=t.minimum-t.input.length;return"Wprowadź miasto, ulicę lub nazwę punktu odbioru FEDEX. Min. "+o+" "+n(o,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}), {define:e.define,require:e.require}}()