(function(n){"use strict";n.event.special.destroyed||(n.event.special.destroyed={remove:function(n){n.handler&&n.handler()}});n.fn.extend({maxlength:function(t,i){function f(n){var i=n.val(),r;return i=t.twoCharLinebreak?i.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n"):i.replace(new RegExp("\r?\n","g"),"\n"),r=0,t.utf8?a(i):i.length}function l(n,i){var r=n.val(),u=0;t.twoCharLinebreak&&(r=r.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n"),r.substr(r.length-1)==="\n"&&r.length%2==1&&(u=1));n.val(r.substr(0,i-u))}function a(n){for(var i,t=0,r=0;r<n.length;r++)i=n.charCodeAt(r),i<128?t++:t=i>127&&i<2048?t+2:t+3;return t}function v(n,i,r){var u=!0;return!t.alwaysShow&&r-f(n)>i&&(u=!1),u}function e(n,t){return t-f(n)}function o(n){n.css({display:"block"})}function y(n){n.css({display:"none"})}function s(n,i){var r="";return t.message?r=t.message.replace("%charsTyped%",i).replace("%charsRemaining%",n-i).replace("%charsTotal%",n):(t.preText&&(r+=t.preText),r+=t.showCharsTyped?i:n-i,t.showMaxLength&&(r+=t.separator+n),t.postText&&(r+=t.postText)),r}function h(n,i,r,u){u.html(s(r,r-n));n>0?v(i,t.threshold,r)?o(u.removeClass(t.limitReachedClass).addClass(t.warningClass)):y(u):o(u.removeClass(t.warningClass).addClass(t.limitReachedClass));t.allowOverMax&&(n<0?i.addClass("overmax"):i.removeClass("overmax"))}function p(t){var i=t[0];return n.extend({},typeof i.getBoundingClientRect=="function"?i.getBoundingClientRect():{width:i.offsetWidth,height:i.offsetHeight},t.offset())}function r(n,i){var r=p(n),e=n.outerWidth(),f=i.outerWidth(),o=i.width(),u=i.height();t.appendToParent&&(r.top-=n.parent().offset().top,r.left-=n.parent().offset().left);switch(t.placement){case"bottom":i.css({top:r.top+r.height,left:r.left+r.width/2-o/2});break;case"top":i.css({top:r.top-u,left:r.left+r.width/2-o/2});break;case"left":i.css({top:r.top+r.height/2-u/2,left:r.left-o});break;case"right":i.css({top:r.top+r.height/2-u/2,left:r.left+r.width});break;case"bottom-right":i.css({top:r.top+r.height,left:r.left+r.width});break;case"top-right":i.css({top:r.top-u,left:r.left+e});break;case"top-left":i.css({top:r.top-u,left:r.left-f});break;case"bottom-left":i.css({top:r.top+n.outerHeight(),left:r.left-f});break;case"centered-right":i.css({top:r.top+u/2,left:r.left+e-f-3});break;case"bottom-right-inside":i.css({top:r.top+r.height,left:r.left+r.width-f});break;case"top-right-inside":i.css({top:r.top-u,left:r.left+e-f});break;case"top-left-inside":i.css({top:r.top-u,left:r.left});break;case"bottom-left-inside":i.css({top:r.top+n.outerHeight(),left:r.left})}}function u(n){var i="maxlength";return t.allowOverMax&&(i="data-bs-mxl"),n.attr(i)||n.attr("size")}var c=n("body");return n.isFunction(t)&&!i&&(i=t,t={}),t=n.extend({showOnReady:!1,alwaysShow:!1,threshold:10,warningClass:"label label-success",limitReachedClass:"label label-important label-danger",separator:" / ",preText:"",postText:"",showMaxLength:!0,placement:"bottom",showCharsTyped:!0,validate:!1,utf8:!1,appendToParent:!1,twoCharLinebreak:!0,allowOverMax:!1},t),this.each(function(){function a(){var a=s(o,"0"),l;o=u(i);f||(f=n('<span class="bootstrap-maxlength"><\/span>').css({display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:1099}).html(a));i.is("textarea")&&(i.data("maxlenghtsizex",i.outerWidth()),i.data("maxlenghtsizey",i.outerHeight()),i.mouseup(function(){(i.outerWidth()!==i.data("maxlenghtsizex")||i.outerHeight()!==i.data("maxlenghtsizey"))&&r(i,f);i.data("maxlenghtsizex",i.outerWidth());i.data("maxlenghtsizey",i.outerHeight())}));t.appendToParent?(i.parent().append(f),i.parent().css("position","relative")):c.append(f);l=e(i,u(i));h(l,i,o,f);r(i,f)}var i=n(this),o,f;n(window).resize(function(){f&&r(i,f)});t.allowOverMax&&(n(this).attr("data-bs-mxl",n(this).attr("maxlength")),n(this).removeAttr("maxlength"));t.showOnReady?i.ready(function(){a()}):i.focus(function(){a()});i.on("destroyed",function(){f&&f.remove()});i.on("blur",function(){f&&!t.showOnReady&&f.remove()});i.on("input",function(){var n=u(i),s=e(i,n),c=!0;return t.validate&&s<0?(l(i,n),c=!1):h(s,i,o,f),(t.placement==="bottom-right-inside"||t.placement==="top-right-inside")&&r(i,f),c})})}})})(jQuery),function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return typeof n=="undefined"},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,getUniqueId:function(){var n=0;return function(){return n++}}(),templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o,s;return o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},noop:function(){}}}(),l="0.10.5",a=function(){"use strict";function n(n){return n=t.toStr(n),n?n.split(/\s+/):[]}function i(n){return n=t.toStr(n),n?n.split(/\W+/):[]}function r(n){return function(){var i=[].slice.call(arguments,0);return function(r){var u=[];return t.each(i,function(i){u=u.concat(n(t.toStr(r[i])))}),u}}}return{nonword:i,whitespace:n,obj:{nonword:r(i),whitespace:r(n)}}}(),o=function(){"use strict";function i(i){this.maxSize=t.isNumber(i)?i:100;this.reset();this.maxSize<=0&&(this.set=this.get=n.noop)}function r(){this.head=this.tail=null}function u(n,t){this.key=n;this.val=t;this.prev=this.next=null}return t.mixin(i.prototype,{set:function(n,t){var r=this.list.tail,i;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]);(i=this.hash[n])?(i.val=t,this.list.moveToFront(i)):(i=new u(n,t),this.list.add(i),this.hash[n]=i,this.size++)},get:function(n){var t=this.hash[n];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0;this.hash={};this.list=new r}}),t.mixin(r.prototype,{add:function(n){this.head&&(n.next=this.head,this.head.prev=n);this.head=n;this.tail=this.tail||n},remove:function(n){n.prev?n.prev.next=n.next:this.head=n.next;n.next?n.next.prev=n.prev:this.tail=n.prev},moveToFront:function(n){this.remove(n);this.add(n)}}),i}(),v=function(){"use strict";function r(n){this.prefix=["__",n,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function u(){return(new Date).getTime()}function f(n){return JSON.stringify(t.isUndefined(n)?null:n)}function e(n){return JSON.parse(n)}var n,i;try{n=window.localStorage;n.setItem("~~~","!");n.removeItem("~~~")}catch(o){n=null}return i=n&&window.JSON?{_prefix:function(n){return this.prefix+n},_ttlKey:function(n){return this._prefix(n)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),e(n.getItem(this._prefix(t)))},set:function(i,r,e){return t.isNumber(e)?n.setItem(this._ttlKey(i),f(u()+e)):n.removeItem(this._ttlKey(i)),n.setItem(this._prefix(i),f(r))},remove:function(t){return n.removeItem(this._ttlKey(t)),n.removeItem(this._prefix(t)),this},clear:function(){for(var r,i=[],u=n.length,t=0;t<u;t++)(r=n.key(t)).match(this.keyMatcher)&&i.push(r.replace(this.keyMatcher,""));for(t=i.length;t--;)this.remove(i[t]);return this},isExpired:function(i){var r=e(n.getItem(this._ttlKey(i)));return t.isNumber(r)&&u()>r?!0:!1}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(r.prototype,i),r}(),s=function(){"use strict";function i(t){t=t||{};this.cancelled=!1;this.lastUrl=null;this._send=t.transport?s(t.transport):n.ajax;this._get=t.rateLimiter?t.rateLimiter(this._get):this._get;this._cache=t.cache===!1?new o(0):e}function s(i){return function(r,u){function e(n){t.defer(function(){f.resolve(n)})}function o(n){t.defer(function(){f.reject(n)})}var f=n.Deferred();return i(r,u,e,o),f}}var r=0,u={},f=6,e=new o(10);return i.setMaxPendingRequests=function(n){f=n},i.resetCache=function(){e.reset()},t.mixin(i.prototype,{_get:function(n,t,i){function s(t){i&&i(null,t);e._cache.set(n,t)}function h(){i&&i(!0)}function c(){r--;delete u[n];e.onDeckRequestArgs&&(e._get.apply(e,e.onDeckRequestArgs),e.onDeckRequestArgs=null)}var e=this,o;this.cancelled||n!==this.lastUrl||((o=u[n])?o.done(s).fail(h):r<f?(r++,u[n]=this._send(n,t).done(s).fail(h).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(n,i,r){var u;return t.isFunction(i)&&(r=i,i={}),this.cancelled=!1,this.lastUrl=n,(u=this._cache.get(n))?t.defer(function(){r&&r(null,u)}):this._get(n,i,r),!!u},cancel:function(){this.cancelled=!0}}),i}(),y=function(){"use strict";function i(t){t=t||{};t.datumTokenizer&&t.queryTokenizer||n.error("datumTokenizer and queryTokenizer are both required");this.datumTokenizer=t.datumTokenizer;this.queryTokenizer=t.queryTokenizer;this.reset()}function r(n){return n=t.filter(n,function(n){return!!n}),t.map(n,function(n){return n.toLowerCase()})}function u(){return{ids:[],children:{}}}function f(n){for(var i={},r=[],t=0,u=n.length;t<u;t++)i[n[t]]||(i[n[t]]=!0,r.push(n[t]));return r}function e(n,t){function o(n,t){return n-t}var i=0,r=0,u=[],f,e;for(n=n.sort(o),t=t.sort(o),f=n.length,e=t.length;i<f&&r<e;)n[i]<t[r]?i++:n[i]>t[r]?r++:(u.push(n[i]),i++,r++);return u}return t.mixin(i.prototype,{bootstrap:function(n){this.datums=n.datums;this.trie=n.trie},add:function(n){var i=this;n=t.isArray(n)?n:[n];t.each(n,function(n){var f,e;f=i.datums.push(n)-1;e=r(i.datumTokenizer(n));t.each(e,function(n){for(var r,t=i.trie,e=n.split("");r=e.shift();)t=t.children[r]||(t.children[r]=u()),t.ids.push(f)})})},get:function(n){var u=this,o,i;return o=r(this.queryTokenizer(n)),t.each(o,function(n){var t,r,o,f;if(i&&i.length===0)return!1;for(t=u.trie,r=n.split("");t&&(o=r.shift());)t=t.children[o];if(t&&r.length===0)f=t.ids.slice(0),i=i?e(i,f):f;else return i=[],!1}),i?t.map(f(i),function(n){return u.datums[n]}):[]},reset:function(){this.datums=[];this.trie=u()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),f=function(){"use strict";function i(n){return n.local||null}function r(i){var r,u;return u={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.thumbprint=l+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",r.url||n.error("prefetch requires url to be set")),r}function u(i){function f(n){return function(i){return t.debounce(i,n)}}function e(n){return function(i){return t.throttle(i,n)}}var r,u;return u={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(r=i.remote||null)&&(r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.rateLimiter=/^throttle$/i.test(r.rateLimitBy)?e(r.rateLimitWait):f(r.rateLimitWait),r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",delete r.rateLimitBy,delete r.rateLimitWait,r.url||n.error("remote requires url to be set")),r}return{local:i,prefetch:r,remote:u}}();(function(i){"use strict";function u(t){t&&(t.local||t.prefetch||t.remote)||n.error("one of local, prefetch, or remote is required");this.limit=t.limit||5;this.sorter=o(t.sorter);this.dupDetector=t.dupDetector||h;this.local=f.local(t);this.prefetch=f.prefetch(t);this.remote=f.remote(t);this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null;this.index=new y({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer});this.storage=this.cacheKey?new v(this.cacheKey):null}function o(n){function i(t){return t.sort(n)}function r(n){return n}return t.isFunction(n)?i:r}function h(){return!1}var e,r;return e=i.Bloodhound,r={data:"data",protocol:"protocol",thumbprint:"thumbprint"},i.Bloodhound=u,u.noConflict=function(){return i.Bloodhound=e,u},u.tokenizers=a,t.mixin(u.prototype,{_loadPrefetch:function(t){function f(n){i.clear();i.add(t.filter?t.filter(n):n);i._saveToStorage(i.index.serialize(),t.thumbprint,t.ttl)}var i=this,u,r;return(u=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(u),r=n.Deferred().resolve()):r=n.ajax(t.url,t.ajax).done(f),r},_getFromRemote:function(n,t){function f(n,r){n?t([]):t(i.remote.filter?i.remote.filter(r):r)}var i=this,r,u;if(this.transport)return n=n||"",u=encodeURIComponent(n),r=this.remote.replace?this.remote.replace(this.remote.url,n):this.remote.url.replace(this.remote.wildcard,u),this.transport.get(r,this.remote.ajax,f)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(n,t,i){this.storage&&(this.storage.set(r.data,n,i),this.storage.set(r.protocol,location.protocol,i),this.storage.set(r.thumbprint,t,i))},_readFromStorage:function(n){var t={},i;return this.storage&&(t.data=this.storage.get(r.data),t.protocol=this.storage.get(r.protocol),t.thumbprint=this.storage.get(r.thumbprint)),i=t.thumbprint!==n||t.protocol!==location.protocol,t.data&&!i?t.data:null},_initialize:function(){function f(){u.add(t.isFunction(i)?i():i)}var u=this,i=this.local,r;return r=this.prefetch?this._loadPrefetch(this.prefetch):n.Deferred().resolve(),i&&r.done(f),this.transport=this.remote?new s(this.remote):null,this.initPromise=r.promise()},initialize:function(n){return!this.initPromise||n?this._initialize():this.initPromise},add:function(n){this.index.add(n)},get:function(n,i){function e(n){var f=r.slice(0);t.each(n,function(n){var i;return i=t.some(f,function(t){return u.dupDetector(n,t)}),i||f.push(n),f.length<u.limit});i&&i(u.sorter(f))}var u=this,r=[],f=!1;r=this.index.get(n);r=this.sorter(r).slice(0,this.limit);r.length<this.limit?f=this._getFromRemote(n,e):this._cancelLastRemoteRequest();f||(r.length>0||!this.transport)&&i&&i(r)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&s.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}}),u})(this);var r=function(){return{wrapper:'<span class="twitter-typeahead"><\/span>',dropdown:'<span class="tt-dropdown-menu"><\/span>',dataset:'<div class="tt-dataset-%CLASS%"><\/div>',suggestions:'<span class="tt-suggestions"><\/span>',suggestion:'<div class="tt-suggestion"><\/div>'}}(),i=function(){"use strict";var n={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(n.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(n.input,{marginTop:"-1px"}),n}(),h=function(){"use strict";function i(t){t&&t.el||n.error("EventBus initialized without el");this.$el=n(t.el)}var r="typeahead:";return t.mixin(i.prototype,{trigger:function(n){var t=[].slice.call(arguments,1);this.$el.trigger(r+n,t)}}),i}(),e=function(){"use strict";function t(t,i,r,u){var f;if(!r)return this;for(i=i.split(n),r=u?h(r,u):r,this._callbacks=this._callbacks||{};f=i.shift();)this._callbacks[f]=this._callbacks[f]||{sync:[],async:[]},this._callbacks[f][t].push(r);return this}function u(n,i,r){return t.call(this,"async",n,i,r)}function f(n,i,r){return t.call(this,"sync",n,i,r)}function e(t){var i;if(!this._callbacks)return this;for(t=t.split(n);i=t.shift();)delete this._callbacks[i];return this}function o(t){var u,f,e,o,s;if(!this._callbacks)return this;for(t=t.split(n),e=[].slice.call(arguments,1);(u=t.shift())&&(f=this._callbacks[u]);)o=i(f.sync,this,[u].concat(e)),s=i(f.async,this,[u].concat(e)),o()&&r(s);return this}function i(n,t,i){function r(){for(var r,u=0,f=n.length;!r&&u<f;u+=1)r=n[u].apply(t,i)===!1;return!r}return r}function s(){return window.setImmediate?function(n){setImmediate(function(){n()})}:function(n){setTimeout(function(){n()},0)}}function h(n,t){return n.bind?n.bind(t):function(){n.apply(t,[].slice.call(arguments,0))}}var n=/\s+/,r=s();return{onSync:f,onAsync:u,off:e,trigger:o}}(),p=function(n){"use strict";function r(n,i,r){for(var u=[],f,e=0,o=n.length;e<o;e++)u.push(t.escapeRegExChars(n[e]));return f=r?"\\b("+u.join("|")+")\\b":"("+u.join("|")+")",i?new RegExp(f):new RegExp(f,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(u){function o(t){var i,r,e;return(i=f.exec(t.data))&&(e=n.createElement(u.tagName),u.className&&(e.className=u.className),r=t.splitText(i.index),r.splitText(i[0].length),e.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(e,r)),!!i}function e(n,t){for(var i,r=0;r<n.childNodes.length;r++)i=n.childNodes[r],i.nodeType===3?r+=t(i)?1:0:e(i,t)}var f;(u=t.mixin({},i,u),u.node&&u.pattern)&&(u.pattern=t.isArray(u.pattern)?u.pattern:[u.pattern],f=r(u.pattern,u.caseSensitive,u.wordsOnly),e(u.node,o))}}(window.document),c=function(){"use strict";function i(i){var u=this,e,o,s,h;if(i=i||{},i.input||n.error("input is missing"),e=t.bind(this._onBlur,this),o=t.bind(this._onFocus,this),s=t.bind(this._onKeydown,this),h=t.bind(this._onInput,this),this.$hint=n(i.hint),this.$input=n(i.input).on("blur.tt",e).on("focus.tt",o).on("keydown.tt",s),this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop),t.isMsie())this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(n){r[n.which||n.keyCode]||t.defer(t.bind(u._onInput,u,n))});else this.$input.on("input.tt",h);this.query=this.$input.val();this.$overflowHelper=f(this.$input)}function f(t){return n('<pre aria-hidden="true"><\/pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(n,t){return i.normalizeQuery(n)===i.normalizeQuery(t)}function u(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}var r;return r={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(n){return(n||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,e,{_onBlur:function(){this.resetInputValue();this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(n){var t=r[n.which||n.keyCode];this._managePreventDefault(t,n);t&&this._shouldTrigger(t,n)&&this.trigger(t+"Keyed",n)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(n,t){var i,r,f;switch(n){case"tab":r=this.getHint();f=this.getInputValue();i=r&&r!==f&&!u(t);break;case"up":case"down":i=!u(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(n,t){var i;switch(n){case"tab":i=!u(t);break;default:i=!0}return i},_checkInputValue:function(){var n,t,i;n=this.getInputValue();t=o(n,this.query);i=t?this.query.length!==n.length:!1;this.query=n;t?i&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(n){this.query=n},getInputValue:function(){return this.$input.val()},setInputValue:function(n,t){this.$input.val(n);t?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(n){this.$hint.val(n)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var n,t,i,r;n=this.getInputValue();t=this.getHint();i=n!==t&&t.indexOf(n)===0;r=n!==""&&i&&!this.hasOverflow();r||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var n=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=n},isCursorAtEnd:function(){var n,i,r;return(n=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i))?i===n:document.selection?(r=document.selection.createRange(),r.moveStart("character",-n),n===r.text.length):!0},destroy:function(){this.$hint.off(".tt");this.$input.off(".tt");this.$hint=this.$input=this.$overflowHelper=null}}),i}(),u=function(){"use strict";function u(i){i=i||{};i.templates=i.templates||{};i.source||n.error("missing source");i.name&&!l(i.name)&&n.error("invalid dataset name: "+i.name);this.query=null;this.highlight=!!i.highlight;this.name=i.name||t.getUniqueId();this.source=i.source;this.displayFn=h(i.display||i.displayKey);this.templates=c(i.templates,this.displayFn);this.$el=n(r.dataset.replace("%CLASS%",this.name))}function h(n){function i(t){return t[n]}return n=n||"value",t.isFunction(n)?n:i}function c(n,i){function r(n){return"<p>"+i(n)+"<\/p>"}return{empty:n.empty&&t.templatify(n.empty),header:n.header&&t.templatify(n.header),footer:n.footer&&t.templatify(n.footer),suggestion:n.suggestion||r}}function l(n){return/^[_a-zA-Z0-9-]+$/.test(n)}var f="ttDataset",o="ttValue",s="ttDatum";return u.extractDatasetName=function(t){return n(t).data(f)},u.extractValue=function(t){return n(t).data(o)},u.extractDatum=function(t){return n(t).data(s)},t.mixin(u.prototype,e,{_render:function(u,e){function v(){return h.templates.empty({query:u,isEmpty:!0})}function y(){function a(t){var u;return u=n(r.suggestion).append(h.templates.suggestion(t)).data(f,h.name).data(o,h.displayFn(t)).data(s,t),u.children().each(function(){n(this).css(i.suggestionChild)}),u}var c,l;return c=n(r.suggestions).css(i.suggestions),l=t.map(e,a),c.append.apply(c,l),h.highlight&&p({className:"tt-highlight",node:c[0],pattern:u}),c}function l(){return h.templates.header({query:u,isEmpty:!c})}function a(){return h.templates.footer({query:u,isEmpty:!c})}if(this.$el){var h=this,c;this.$el.empty();c=e&&e.length;!c&&this.templates.empty?this.$el.html(v()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null):c&&this.$el.html(y()).prepend(h.templates.header?l():null).append(h.templates.footer?a():null);this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(n){function i(i){t.canceled||n!==t.query||t._render(n,i)}var t=this;this.query=n;this.canceled=!1;this.source(n,i)},cancel:function(){this.canceled=!0},clear:function(){this.cancel();this.$el.empty();this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),u}(),w=function(){"use strict";function r(i){var r=this,u,e,o;i=i||{};i.menu||n.error("menu is required");this.isOpen=!1;this.isEmpty=!0;this.datasets=t.map(i.datasets,f);u=t.bind(this._onSuggestionClick,this);e=t.bind(this._onSuggestionMouseEnter,this);o=t.bind(this._onSuggestionMouseLeave,this);this.$menu=n(i.menu).on("click.tt",".tt-suggestion",u).on("mouseenter.tt",".tt-suggestion",e).on("mouseleave.tt",".tt-suggestion",o);t.each(this.datasets,function(n){r.$menu.append(n.getRoot());n.onSync("rendered",r._onRendered,r)})}function f(n){return new u(n)}return t.mixin(r.prototype,e,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",n(t.currentTarget))},_onSuggestionMouseEnter:function(t){this._removeCursor();this._setCursor(n(t.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function n(n){return n.isEmpty()}this.isEmpty=t.every(this.datasets,n);this.isEmpty?this._hide():this.isOpen&&this._show();this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(n,t){n.first().addClass("tt-cursor");t||this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(n){var i,r,t,u;if(this.isOpen){if(r=this._getCursor(),i=this._getSuggestions(),this._removeCursor(),t=i.index(r)+n,t=(t+1)%(i.length+1)-1,t===-1){this.trigger("cursorRemoved");return}t<-1&&(t=i.length-1);this._setCursor(u=i.eq(t));this._ensureVisible(u)}},_ensureVisible:function(n){var t,i,r,u;t=n.position().top;i=t+n.outerHeight(!0);r=this.$menu.scrollTop();u=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10);t<0?this.$menu.scrollTop(r+t):u<i&&this.$menu.scrollTop(r+(i-u))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,this.isEmpty||this._show(),this.trigger("opened"))},setLanguageDirection:function(n){this.$menu.css(n==="ltr"?i.ltr:i.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(n){var t=null;return n.length&&(t={raw:u.extractDatum(n),value:u.extractValue(n),datasetName:u.extractDatasetName(n)}),t},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(n){function i(t){t.update(n)}t.each(this.datasets,i)},empty:function(){function n(n){n.clear()}t.each(this.datasets,n);this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function n(n){n.destroy()}this.$menu.off(".tt");this.$menu=null;t.each(this.datasets,n)}}),r}(),b=function(){"use strict";function f(i){var r,u,f;i=i||{};i.input||n.error("missing input");this.isActivated=!1;this.autoselect=!!i.autoselect;this.minLength=t.isNumber(i.minLength)?i.minLength:1;this.$node=e(i.input,i.withHint);r=this.$node.find(".tt-dropdown-menu");u=this.$node.find(".tt-input");f=this.$node.find(".tt-hint");u.on("blur.tt",function(n){var i,f,e;i=document.activeElement;f=r.is(i);e=r.has(i).length>0;t.isMsie()&&(f||e)&&(n.preventDefault(),n.stopImmediatePropagation(),t.defer(function(){u.focus()}))});r.on("mousedown.tt",function(n){n.preventDefault()});this.eventBus=i.eventBus||new h({el:u});this.dropdown=new w({menu:r,datasets:i.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this);this.input=new c({input:u,hint:f}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this);this._setLanguageDirection()}function e(t,f){var e,h,c,s;e=n(t);h=n(r.wrapper).css(i.wrapper);c=n(r.dropdown).css(i.dropdown);s=e.clone().css(i.hint).css(o(e));s.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1});e.data(u,{dir:e.attr("dir"),autocomplete:e.attr("autocomplete"),spellcheck:e.attr("spellcheck"),style:e.attr("style")});e.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(f?i.input:i.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(l){}return e.wrap(h).parent().prepend(f?s:null).append(c)}function o(n){return{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")}}function s(n){var i=n.find(".tt-input");t.each(i.data(u),function(n,r){t.isUndefined(n)?i.removeAttr(r):i.attr(r,n)});i.detach().removeData(u).removeClass("tt-input").insertAfter(n);n.remove()}var u="ttAttrs";return t.mixin(f.prototype,{_onSuggestionClicked:function(n,t){var i;(i=this.dropdown.getDatumForSuggestion(t))&&this._select(i)},_onCursorMoved:function(){var n=this.dropdown.getDatumForCursor();this.input.setInputValue(n.value,!0);this.eventBus.trigger("cursorchanged",n.raw,n.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue();this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint();this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint();this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0;this.dropdown.open()},_onBlurred:function(){this.isActivated=!1;this.dropdown.empty();this.dropdown.close()},_onEnterKeyed:function(n,t){var i,r;i=this.dropdown.getDatumForCursor();r=this.dropdown.getDatumForTopSuggestion();i?(this._select(i),t.preventDefault()):this.autoselect&&r&&(this._select(r),t.preventDefault())},_onTabKeyed:function(n,t){var i;(i=this.dropdown.getDatumForCursor())?(this._select(i),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close();this.input.resetInputValue()},_onUpKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorUp();this.dropdown.open()},_onDownKeyed:function(){var n=this.input.getQuery();this.dropdown.isEmpty&&n.length>=this.minLength?this.dropdown.update(n):this.dropdown.moveCursorDown();this.dropdown.open()},_onLeftKeyed:function(){this.dir==="rtl"&&this._autocomplete()},_onRightKeyed:function(){this.dir==="ltr"&&this._autocomplete()},_onQueryChanged:function(n,t){this.input.clearHintIfInvalid();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty();this.dropdown.open();this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint();this.dropdown.open()},_setLanguageDirection:function(){var n;this.dir!==(n=this.input.getLanguageDirection())&&(this.dir=n,this.$node.css("direction",n),this.dropdown.setLanguageDirection(n))},_updateHint:function(){var n,i,u,f,e,r;n=this.dropdown.getDatumForTopSuggestion();n&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(i=this.input.getInputValue(),u=c.normalizeQuery(i),f=t.escapeRegExChars(u),e=new RegExp("^(?:"+f+")(.+$)","i"),r=e.exec(n.value),r?this.input.setHint(i+r[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(n){var i,r,u,t;i=this.input.getHint();r=this.input.getQuery();u=n||this.input.isCursorAtEnd();i&&r!==i&&u&&(t=this.dropdown.getDatumForTopSuggestion(),t&&this.input.setInputValue(t.value),this.eventBus.trigger("autocompleted",t.raw,t.datasetName))},_select:function(n){this.input.setQuery(n.value);this.input.setInputValue(n.value,!0);this._setLanguageDirection();this.eventBus.trigger("selected",n.raw,n.datasetName);this.dropdown.close();t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(n){n=t.toStr(n);this.isActivated?this.input.setInputValue(n):(this.input.setQuery(n),this.input.setInputValue(n,!0));this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy();this.dropdown.destroy();s(this.$node);this.$node=null}}),f}();(function(){"use strict";var u,i,r;u=n.fn.typeahead;i="ttTypeahead";r={initialize:function(r,u){function f(){var f=n(this),o,e;t.each(u,function(n){n.highlight=!!r.highlight});e=new b({input:f,eventBus:o=new h({el:f}),withHint:t.isUndefined(r.hint)?!0:!!r.hint,minLength:r.minLength,autoselect:r.autoselect,datasets:u});f.data(i,e)}return u=t.isArray(u)?u:[].slice.call(arguments,1),r=r||{},this.each(f)},open:function(){function t(){var r=n(this),t;(t=r.data(i))&&t.open()}return this.each(t)},close:function(){function t(){var r=n(this),t;(t=r.data(i))&&t.close()}return this.each(t)},val:function(t){function r(){var u=n(this),r;(r=u.data(i))&&r.setVal(t)}function u(n){var t,r;return(t=n.data(i))&&(r=t.getVal()),r}return arguments.length?this.each(r):u(this.first())},destroy:function(){function t(){var t=n(this),r;(r=t.data(i))&&(r.destroy(),t.removeData(i))}return this.each(t)}};n.fn.typeahead=function(t){var u;return r[t]&&t!=="initialize"?(u=this.filter(function(){return!!n(this).data(i)}),r[t].apply(u,[].slice.call(arguments,1))):r.initialize.apply(this,arguments)};n.fn.typeahead.noConflict=function(){return n.fn.typeahead=u,this}})()}(window.jQuery),function(){var n=[].slice;(function(t,i){"use strict";var r;return r=function(){function n(n,i){i==null&&(i={});this.$element=t(n);this.options=t.extend({},t.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class"),radioAllOff:this.$element.data("radio-all-off")},i);this.$wrapper=t("<div>",{"class":function(n){return function(){var t;return t=[""+n.options.baseClass].concat(n._getClasses(n.options.wrapperClass)),t.push(n.options.state?""+n.options.baseClass+"-on":""+n.options.baseClass+"-off"),n.options.size!=null&&t.push(""+n.options.baseClass+"-"+n.options.size),n.options.animate&&t.push(""+n.options.baseClass+"-animate"),n.options.disabled&&t.push(""+n.options.baseClass+"-disabled"),n.options.readonly&&t.push(""+n.options.baseClass+"-readonly"),n.options.indeterminate&&t.push(""+n.options.baseClass+"-indeterminate"),n.$element.attr("id")&&t.push(""+n.options.baseClass+"-id-"+n.$element.attr("id")),t.join(" ")}}(this)()});this.$container=t("<div>",{"class":""+this.options.baseClass+"-container"});this.$on=t("<span>",{html:this.options.onText,"class":""+this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor});this.$off=t("<span>",{html:this.options.offText,"class":""+this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor});this.$label=t("<label>",{html:this.options.labelText,"class":""+this.options.baseClass+"-label"});this.options.indeterminate&&this.$element.prop("indeterminate",!0);this.$element.on("init.bootstrapSwitch",function(t){return function(){return t.options.onInit.apply(n,arguments)}}(this));this.$element.on("switchChange.bootstrapSwitch",function(t){return function(){return t.options.onSwitchChange.apply(n,arguments)}}(this));this.$container=this.$element.wrap(this.$container).parent();this.$wrapper=this.$container.wrap(this.$wrapper).parent();this.$element.before(this.$on).before(this.$label).before(this.$off).trigger("init.bootstrapSwitch");this._elementHandlers();this._handleHandlers();this._labelHandlers();this._formHandler()}return n.prototype._constructor=n,n.prototype.state=function(n,t){return typeof n=="undefined"?this.options.state:this.options.disabled||this.options.readonly||this.options.indeterminate?this.$element:this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(n=!!n,this.$element.prop("checked",n).trigger("change.bootstrapSwitch",t),this.$element)},n.prototype.toggleState=function(n){return this.options.disabled||this.options.readonly||this.options.indeterminate?this.$element:this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",n)},n.prototype.size=function(n){return typeof n=="undefined"?this.options.size:(this.options.size!=null&&this.$wrapper.removeClass(""+this.options.baseClass+"-"+this.options.size),n&&this.$wrapper.addClass(""+this.options.baseClass+"-"+n),this.options.size=n,this.$element)},n.prototype.animate=function(n){return typeof n=="undefined"?this.options.animate:(n=!!n,this.$wrapper[n?"addClass":"removeClass"](""+this.options.baseClass+"-animate"),this.options.animate=n,this.$element)},n.prototype.disabled=function(n){return typeof n=="undefined"?this.options.disabled:(n=!!n,this.$wrapper[n?"addClass":"removeClass"](""+this.options.baseClass+"-disabled"),this.$element.prop("disabled",n),this.options.disabled=n,this.$element)},n.prototype.toggleDisabled=function(){return this.$element.prop("disabled",!this.options.disabled),this.$wrapper.toggleClass(""+this.options.baseClass+"-disabled"),this.options.disabled=!this.options.disabled,this.$element},n.prototype.readonly=function(n){return typeof n=="undefined"?this.options.readonly:(n=!!n,this.$wrapper[n?"addClass":"removeClass"](""+this.options.baseClass+"-readonly"),this.$element.prop("readonly",n),this.options.readonly=n,this.$element)},n.prototype.toggleReadonly=function(){return this.$element.prop("readonly",!this.options.readonly),this.$wrapper.toggleClass(""+this.options.baseClass+"-readonly"),this.options.readonly=!this.options.readonly,this.$element},n.prototype.indeterminate=function(n){return typeof n=="undefined"?this.options.indeterminate:(n=!!n,this.$wrapper[n?"addClass":"removeClass"](""+this.options.baseClass+"-indeterminate"),this.$element.prop("indeterminate",n),this.options.indeterminate=n,this.$element)},n.prototype.toggleIndeterminate=function(){return this.$element.prop("indeterminate",!this.options.indeterminate),this.$wrapper.toggleClass(""+this.options.baseClass+"-indeterminate"),this.options.indeterminate=!this.options.indeterminate,this.$element},n.prototype.onColor=function(n){var t;return(t=this.options.onColor,typeof n=="undefined")?t:(t!=null&&this.$on.removeClass(""+this.options.baseClass+"-"+t),this.$on.addClass(""+this.options.baseClass+"-"+n),this.options.onColor=n,this.$element)},n.prototype.offColor=function(n){var t;return(t=this.options.offColor,typeof n=="undefined")?t:(t!=null&&this.$off.removeClass(""+this.options.baseClass+"-"+t),this.$off.addClass(""+this.options.baseClass+"-"+n),this.options.offColor=n,this.$element)},n.prototype.onText=function(n){return typeof n=="undefined"?this.options.onText:(this.$on.html(n),this.options.onText=n,this.$element)},n.prototype.offText=function(n){return typeof n=="undefined"?this.options.offText:(this.$off.html(n),this.options.offText=n,this.$element)},n.prototype.labelText=function(n){return typeof n=="undefined"?this.options.labelText:(this.$label.html(n),this.options.labelText=n,this.$element)},n.prototype.baseClass=function(){return this.options.baseClass},n.prototype.wrapperClass=function(n){return typeof n=="undefined"?this.options.wrapperClass:(n||(n=t.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(n).join(" ")),this.options.wrapperClass=n,this.$element)},n.prototype.radioAllOff=function(n){return typeof n=="undefined"?this.options.radioAllOff:(this.options.radioAllOff=n,this.$element)},n.prototype.onInit=function(n){return typeof n=="undefined"?this.options.onInit:(n||(n=t.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=n,this.$element)},n.prototype.onSwitchChange=function(n){return typeof n=="undefined"?this.options.onSwitchChange:(n||(n=t.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=n,this.$element)},n.prototype.destroy=function(){var n;return n=this.$element.closest("form"),n.length&&n.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},n.prototype._elementHandlers=function(){return this.$element.on({"change.bootstrapSwitch":function(n){return function(i,r){var u;if(i.preventDefault(),i.stopImmediatePropagation(),u=n.$element.is(":checked"),u!==n.options.state)return n.options.state=u,n.$wrapper.removeClass(u?""+n.options.baseClass+"-off":""+n.options.baseClass+"-on").addClass(u?""+n.options.baseClass+"-on":""+n.options.baseClass+"-off"),r?void 0:(n.$element.is(":radio")&&t("[name='"+n.$element.attr("name")+"']").not(n.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),n.$element.trigger("switchChange.bootstrapSwitch",[u]))}}(this),"focus.bootstrapSwitch":function(n){return function(t){return t.preventDefault(),n.$wrapper.addClass(""+n.options.baseClass+"-focused")}}(this),"blur.bootstrapSwitch":function(n){return function(t){return t.preventDefault(),n.$wrapper.removeClass(""+n.options.baseClass+"-focused")}}(this),"keydown.bootstrapSwitch":function(n){return function(t){if(t.which&&!n.options.disabled&&!n.options.readonly&&!n.options.indeterminate)switch(t.which){case 37:return t.preventDefault(),t.stopImmediatePropagation(),n.state(!1);case 39:return t.preventDefault(),t.stopImmediatePropagation(),n.state(!0)}}}(this)})},n.prototype._handleHandlers=function(){this.$on.on("click.bootstrapSwitch",function(n){return function(){return n.state(!1),n.$element.trigger("focus.bootstrapSwitch")}}(this));return this.$off.on("click.bootstrapSwitch",function(n){return function(){return n.state(!0),n.$element.trigger("focus.bootstrapSwitch")}}(this))},n.prototype._labelHandlers=function(){return this.$label.on({"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(n){return function(t){var u,f,i,r;if(n.isLabelDragging)return t.preventDefault(),n.isLabelDragged=!0,f=t.pageX||t.originalEvent.touches[0].pageX,i=(f-n.$wrapper.offset().left)/n.$wrapper.width()*100,u=25,r=75,n.options.animate&&n.$wrapper.removeClass(""+n.options.baseClass+"-animate"),i<u?i=u:i>r&&(i=r),n.$container.css("margin-left",""+(i-r)+"%"),n.$element.trigger("focus.bootstrapSwitch")}}(this),"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(n){return function(t){if(!n.isLabelDragging&&!n.options.disabled&&!n.options.readonly&&!n.options.indeterminate)return t.preventDefault(),n.isLabelDragging=!0,n.$element.trigger("focus.bootstrapSwitch")}}(this),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(n){return function(t){if(n.isLabelDragging)return t.preventDefault(),n.isLabelDragged?(n.isLabelDragged=!1,n.state(parseInt(n.$container.css("margin-left"),10)>-(n.$container.width()/6)),n.options.animate&&n.$wrapper.addClass(""+n.options.baseClass+"-animate"),n.$container.css("margin-left","")):n.state(!n.options.state),n.isLabelDragging=!1}}(this),"mouseleave.bootstrapSwitch":function(n){return function(){return n.$label.trigger("mouseup.bootstrapSwitch")}}(this)})},n.prototype._formHandler=function(){var n;if(n=this.$element.closest("form"),!n.data("bootstrap-switch"))return n.on("reset.bootstrapSwitch",function(){return i.setTimeout(function(){return n.find("input").filter(function(){return t(this).data("bootstrap-switch")}).each(function(){return t(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},n.prototype._getClasses=function(n){var u,r,i,f;if(!t.isArray(n))return[""+this.options.baseClass+"-"+n];for(r=[],i=0,f=n.length;i<f;i++)u=n[i],r.push(""+this.options.baseClass+"-"+u);return r},n}(),t.fn.bootstrapSwitch=function(){var f,i,u;return i=arguments[0],f=2<=arguments.length?n.call(arguments,1):[],u=this,this.each(function(){var e,n;return e=t(this),n=e.data("bootstrap-switch"),n||e.data("bootstrap-switch",n=new r(this,i)),typeof i=="string"?u=n[i].apply(n,f):void 0}),u},t.fn.bootstrapSwitch.Constructor=r,t.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp;",baseClass:"bootstrap-switch",wrapperClass:"wrapper",radioAllOff:!1,onInit:function(){},onSwitchChange:function(){}}})(window.jQuery,window)}.call(this),function(n){function d(n,u,f){var l=n[0],e=/er/.test(f)?s:/bl/.test(f)?r:t,h=f==nt?{checked:l[t],disabled:l[r],indeterminate:n.attr(s)=="true"||n.attr(w)=="false"}:l[e],y;if(/^(ch|di|in)/.test(f)&&!h)v(n,e);else if(/^(un|en|de)/.test(f)&&h)c(n,e);else if(f==nt)for(y in h)h[y]?v(n,y,!0):c(n,y,!0);else u&&f!="toggle"||(u||n[a]("ifClicked"),h?l[i]!==o&&c(n,e):v(n,e))}function v(l,a,v){var p=l[0],b=l.parent(),nt=a==t,tt=a==s,et=a==r,ut=tt?w:nt?it:"enabled",ot=f(l,ut+y(p[i])),st=f(l,a+y(p[i])),rt,d;p[a]!==!0&&(!v&&a==t&&p[i]==o&&p.name&&(rt=l.closest("form"),d='input[name="'+p.name+'"]',d=rt.length?rt.find(d):n(d),d.each(function(){this!==p&&n(this).data(u)&&c(n(this),a)})),tt?(p[a]=!0,p[t]&&c(l,t,"force")):(v||(p[a]=!0),nt&&p[s]&&c(l,s,!1)),ft(l,nt,a,v));p[r]&&!!f(l,k,!0)&&b.find("."+g).css(k,"default");b[e](st||f(l,a)||"");!b.attr("role")||tt||b.attr("aria-"+(et?r:t),"true");b[h](ot||f(l,ut)||"")}function c(n,u,o){var c=n[0],l=n.parent(),p=u==t,a=u==s,b=u==r,v=a?w:p?it:"enabled",d=f(n,v+y(c[i])),nt=f(n,u+y(c[i]));c[u]!==!1&&((a||!o||o=="force")&&(c[u]=!1),ft(n,p,v,o));c[r]||!f(n,k,!0)||l.find("."+g).css(k,"pointer");l[h](nt||f(n,u)||"");!l.attr("role")||a||l.attr("aria-"+(b?r:t),"false");l[e](d||f(n,v)||"")}function ut(t,i){t.data(u)&&(t.parent().html(t.attr("style",t.data(u).s||"")),i&&t[a](i),t.off(".i").unwrap(),n(b+'[for="'+t[0].id+'"]').add(t.closest(b)).off(".i"))}function f(n,t,i){if(n.data(u))return n.data(u).o[t+(i?"":"Class")]}function y(n){return n.charAt(0).toUpperCase()+n.slice(1)}function ft(n,t,i,r){r||(t&&n[a]("ifToggled"),n[a]("ifChanged")[a]("if"+y(i)))}var u="iCheck",g=u+"-helper",p="checkbox",o="radio",t="checked",it="un"+t,r="disabled",w="determinate",s="in"+w,nt="update",i="type",l="click",rt="touchbegin.i touchend.i",e="addClass",h="removeClass",a="trigger",b="label",k="cursor",tt=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);n.fn[u]=function(f,y){var et='input[type="'+p+'"], input[type="'+o+'"]',k=n(),ht=function(t){t.each(function(){var t=n(this);k=t.is(et)?k.add(t):k.add(t.find(et))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(f))return f=f.toLowerCase(),ht(this),k.each(function(){var t=n(this);f=="destroy"?ut(t,"ifDestroyed"):d(t,!0,f);n.isFunction(y)&&y()});if(typeof f!="object"&&f)return this;var w=n.extend({checkedClass:t,disabledClass:r,indeterminateClass:s,labelHover:!0},f),ot=w.handle,ft=w.hoverClass||"hover",at=w.focusClass||"focus",ct=w.activeClass||"active",lt=!!w.labelHover,st=w.labelHoverClass||"hover",it=(""+w.increaseArea).replace("%","")|0;return(ot==p||ot==o)&&(et='input[type="'+ot+'"]'),it<-50&&(it=-50),ht(this),k.each(function(){var s=n(this);ut(s);var y=this,et=y.id,ot=-it+"%",ht=100+it*2+"%",vt={position:"absolute",top:ot,left:ot,display:"block",width:ht,height:ht,margin:0,padding:0,background:"#fff",border:0,opacity:0},bt=tt?{position:"absolute",visibility:"hidden"}:it?vt:{position:"absolute",opacity:0},kt=y[i]==p?w.checkboxClass||"i"+p:w.radioClass||"i"+o,k=n(b+'[for="'+et+'"]').add(s.closest(b)),yt=!!w.aria,pt=u+"-"+Math.random().toString(36).substr(2,6),f='<div class="'+kt+'" '+(yt?'role="'+y[i]+'" ':""),wt;if(yt&&k.each(function(){f+='aria-labelledby="';this.id?f+=this.id:(this.id=pt,f+=pt);f+='"'}),f=s.wrap(f+"/>")[a]("ifCreated").parent().append(w.insert),wt=n('<ins class="'+g+'"/>').css(vt).appendTo(f),s.data(u,{o:w,s:s.attr("style")}).css(bt),!w.inheritClass||f[e](y.className||""),!!w.inheritID&&et&&f.attr("id",u+"-"+et),f.css("position")=="static"&&f.css("position","relative"),d(s,!0,nt),k.length)k.on(l+".i mouseover.i mouseout.i "+rt,function(t){var u=t[i],o=n(this);if(!y[r]){if(u==l){if(n(t.target).is("a"))return;d(s,!1,!0)}else lt&&(/ut|nd/.test(u)?(f[h](ft),o[h](st)):(f[e](ft),o[e](st)));if(tt)t.stopPropagation();else return!1}});s.on(l+".i focus.i blur.i keyup.i keydown.i keypress.i",function(n){var r=n[i],u=n.keyCode;if(r==l)return!1;if(r=="keydown"&&u==32)return y[i]==o&&y[t]||(y[t]?c(s,t):v(s,t)),!1;r=="keyup"&&y[i]==o?y[t]||v(s,t):/us|ur/.test(r)&&f[r=="blur"?h:e](at)});wt.on(l+" mousedown mouseup mouseover mouseout "+rt,function(n){var t=n[i],u=/wn|up/.test(t)?ct:ft;if(!y[r])if(t==l?d(s,!1,!0):(/wn|er|in/.test(t)?f[e](u):f[h](u+" "+ct),k.length&&lt&&u==ft&&k[/ut|nd/.test(t)?h:e](st)),tt)n.stopPropagation();else return!1})})}}(window.jQuery||window.Zepto),function(n){typeof n.fn.each2=="undefined"&&n.extend(n.fn,{each2:function(t){for(var i=n([0]),r=-1,u=this.length;++r<u&&(i.context=i[0]=this[r])&&t.call(i[0],r,i)!==!1;);return this}})}(jQuery),function(n,t){"use strict";function nt(t){var i=n(document.createTextNode(""));t.before(i);i.before(t);i.remove()}function c(n){function t(n){return lt[n]||n}return n.replace(/[^\u0000-\u007E]/g,t)}function e(n,t){for(var i=0,r=t.length;i<r;i=i+1)if(f(n,t[i]))return i;return-1}function at(){var t=n(ct),i;return t.appendTo("body"),i={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight},t.remove(),i}function f(n,i){return n===i?!0:n===t||i===t?!1:n===null||i===null?!1:n.constructor===String?n+""==i+"":i.constructor===String?i+""==n+"":!1}function w(t,i){var u,r,f;if(t===null||t.length<1)return[];for(u=t.split(i),r=0,f=u.length;r<f;r=r+1)u[r]=n.trim(u[r]);return u}function tt(n){return n.outerWidth(!1)-n.width()}function it(i){var r="keyup-change-value";i.on("keydown",function(){n.data(i,r)===t&&n.data(i,r,i.val())});i.on("keyup",function(){var u=n.data(i,r);u!==t&&i.val()!==u&&(n.removeData(i,r),i.trigger("keyup-change"))})}function vt(i){i.on("mousemove",function(i){var r=v;(r===t||r.x!==i.pageX||r.y!==i.pageY)&&n(i.target).trigger("mousemove-filtered",i)})}function rt(n,i,r){r=r||t;var u;return function(){var t=arguments;window.clearTimeout(u);u=window.setTimeout(function(){i.apply(r,t)},n)}}function yt(n,t){var i=rt(n,function(n){t.trigger("scroll-debounced",n)});t.on("scroll",function(n){e(n.target,t.get())>=0&&i(n)})}function pt(n){n[0]!==document.activeElement&&window.setTimeout(function(){var t=n[0],r=n.val().length,i,u;n.focus();u=t.offsetWidth>0||t.offsetHeight>0;u&&t===document.activeElement&&(t.setSelectionRange?t.setSelectionRange(r,r):t.createTextRange&&(i=t.createTextRange(),i.collapse(!1),i.select()))},0)}function wt(t){var i,r,u;return t=n(t)[0],i=0,r=0,"selectionStart"in t?(i=t.selectionStart,r=t.selectionEnd-i):"selection"in document&&(t.focus(),u=document.selection.createRange(),r=document.selection.createRange().text.length,u.moveStart("character",-t.value.length),i=u.text.length-r),{offset:i,length:r}}function r(n){n.preventDefault();n.stopPropagation()}function bt(n){n.preventDefault();n.stopImmediatePropagation()}function kt(t){if(!s){var i=t[0].currentStyle||window.getComputedStyle(t[0],null);s=n(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"});s.attr("class","select2-sizer");n("body").append(s)}return s.text(t.val()),s.width()}function a(t,i,r){var u,f=[],e;u=n.trim(t.attr("class"));u&&(u=""+u,n(u.split(/\s+/)).each2(function(){this.indexOf("select2-")===0&&f.push(this)}));u=n.trim(i.attr("class"));u&&(u=""+u,n(u.split(/\s+/)).each2(function(){this.indexOf("select2-")!==0&&(e=r(this),e&&f.push(e))}));t.attr("class",f.join(" "))}function ut(n,t,i,r){var u=c(n.toUpperCase()).indexOf(c(t.toUpperCase())),f=t.length;if(u<0){i.push(r(n));return}i.push(r(n.substring(0,u)));i.push("<span class='select2-match'>");i.push(r(n.substring(u,u+f)));i.push("<\/span>");i.push(r(n.substring(u+f,n.length)))}function ft(n){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(n).replace(/[&<>"'\/\\]/g,function(n){return t[n]})}function et(i){var f,r=null,e=i.quietMillis||100,o=i.url,u=this;return function(s){window.clearTimeout(f);f=window.setTimeout(function(){var e=i.data,f=o,c=i.transport||n.fn.select2.ajaxDefaults.transport,l={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||t,dataType:i.dataType||"json"},h=n.extend({},n.fn.select2.ajaxDefaults.params,l);e=e?e.call(u,s.term,s.page,s.context):null;f=typeof f=="function"?f.call(u,s.term,s.page,s.context):f;r&&typeof r.abort=="function"&&r.abort();i.params&&(n.isFunction(i.params)?n.extend(h,i.params.call(u)):n.extend(h,i.params));n.extend(h,{url:f,dataType:i.dataType,data:e,success:function(n){var t=i.results(n,s.page,s);s.callback(t)},error:function(n,t,i){var r={hasError:!0,jqXHR:n,textStatus:t,errorThrown:i};s.callback(r)}});r=c.call(u,h)},e)}}function ot(t){var i=t,e,u,r=function(n){return""+n.text},f;return n.isArray(i)&&(u=i,i={results:u}),n.isFunction(i)===!1&&(u=i,i=function(){return u}),f=i(),f.text&&(r=f.text,n.isFunction(r)||(e=f.text,r=function(n){return n[e]})),function(t){var u=t.term,e={results:[]},f;if(u===""){t.callback(i());return}f=function(i,e){var o,s;if(i=i[0],i.children){o={};for(s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);o.children=[];n(i.children).each2(function(n,t){f(t,o.children)});(o.children.length||t.matcher(u,r(o),i))&&e.push(o)}else t.matcher(u,r(i),i)&&e.push(i)};n(i().results).each2(function(n,t){f(t,e.results)});t.callback(e)}}function st(i){var r=n.isFunction(i);return function(u){var f=u.term,e={results:[]},o=r?i(u):i;n.isArray(o)&&(n(o).each(function(){var n=this.text!==t,i=n?this.text:this;(f===""||u.matcher(f,i))&&e.results.push(n?this:{id:this,text:this})}),u.callback(e))}}function o(t,i){if(n.isFunction(t))return!0;if(!t)return!1;if(typeof t=="string")return!0;throw new Error(i+" must be a string, function, or falsy value");}function u(t,i){if(n.isFunction(t)){var r=Array.prototype.slice.call(arguments,2);return t.apply(i,r)}return t}function ht(t){var i=0;return n.each(t,function(n,t){t.children?i+=ht(t.children):i++}),i}function dt(n,i,r,u){var a=n,c=!1,e,s,o,h,l;if(!u.createSearchChoice||!u.tokenSeparators||u.tokenSeparators.length<1)return t;for(;;){for(s=-1,o=0,h=u.tokenSeparators.length;o<h;o++)if(l=u.tokenSeparators[o],s=n.indexOf(l),s>=0)break;if(s<0)break;if(e=n.substring(0,s),n=n.substring(s+l.length),e.length>0&&(e=u.createSearchChoice.call(this,e,i),e!==t&&e!==null&&u.id(e)!==t&&u.id(e)!==null)){for(c=!1,o=0,h=i.length;o<h;o++)if(f(u.id(e),u.id(i[o]))){c=!0;break}c||r(e)}}if(a!==n)return n}function b(){var t=this;n.each(arguments,function(n,i){t[i].remove();t[i]=null})}function k(t,i){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=n.extend(r.prototype,i),r}if(window.Select2===t){var l,d,g,h,s,v={x:0,y:0},y,p,i={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(n){n=n.which?n.which:n;switch(n){case i.LEFT:case i.RIGHT:case i.UP:case i.DOWN:return!0}return!1},isControl:function(n){var t=n.which;switch(t){case i.SHIFT:case i.CTRL:case i.ALT:return!0}return n.metaKey?!0:!1},isFunctionKey:function(n){return n=n.which?n.which:n,n>=112&&n<=123}},ct="<div class='select2-measure-scrollbar'><\/div>",lt={"Ⓐ":"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","ǲ":"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","Ⓖ":"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","Ⓜ":"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","Ƣ":"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","ⓔ":"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","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"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","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};y=n(document);h=function(){var n=1;return function(){return n++}}();l=k(Object,{bind:function(n){var t=this;return function(){n.apply(t,arguments)}},init:function(i){var f,e,o=".select2-results",s,c;this.opts=i=this.prepareOpts(i);this.id=i.id;i.element.data("select2")!==t&&i.element.data("select2")!==null&&i.element.data("select2").destroy();this.container=this.createContainer();this.liveRegion=n("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body);this.containerId="s2id_"+(i.element.attr("id")||"autogen"+h());this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);this.container.attr("title",i.element.attr("title"));this.body=n("body");a(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.attr("style",i.element.attr("style"));this.container.css(u(i.containerCss,this.opts.element));this.container.addClass(u(i.containerCssClass,this.opts.element));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",r);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");a(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(u(i.dropdownCssClass,this.opts.element));this.dropdown.data("select2",this);this.dropdown.on("click",r);this.results=f=this.container.find(o);this.search=e=this.container.find("input.select2-input");this.queryCount=0;this.resultsPage=0;this.context=null;this.initContainer();this.container.on("click",r);vt(this.results);this.dropdown.on("mousemove-filtered",o,this.bind(this.highlightUnderEvent));this.dropdown.on("touchstart touchmove touchend",o,this.bind(function(n){this._touchEvent=!0;this.highlightUnderEvent(n)}));this.dropdown.on("touchmove",o,this.bind(this.touchMoved));this.dropdown.on("touchstart touchend",o,this.bind(this.clearTouchMoved));this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())}));yt(80,this.results);this.dropdown.on("scroll-debounced",o,this.bind(this.loadMoreIfNeeded));n(this.container).on("change",".select2-input",function(n){n.stopPropagation()});n(this.dropdown).on("change",".select2-input",function(n){n.stopPropagation()});n.fn.mousewheel&&f.mousewheel(function(n,t,i,u){var e=f.scrollTop();u>0&&e-u<=0?(f.scrollTop(0),r(n)):u<0&&f.get(0).scrollHeight-f.scrollTop()+u<=f.height()&&(f.scrollTop(f.get(0).scrollHeight-f.height()),r(n))});it(e);e.on("keyup-change input paste",this.bind(this.updateResults));e.on("focus",function(){e.addClass("select2-focused")});e.on("blur",function(){e.removeClass("select2-focused")});this.dropdown.on("mouseup",o,this.bind(function(t){n(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))}));this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(n){n.stopPropagation()});this.nextSearchTerm=t;n.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource());i.maximumInputLength!==null&&this.search.attr("maxlength",i.maximumInputLength);s=i.element.prop("disabled");s===t&&(s=!1);this.enable(!s);c=i.element.prop("readonly");c===t&&(c=!1);this.readonly(c);p=p||at();this.autofocus=i.element.prop("autofocus");i.element.prop("autofocus",!1);this.autofocus&&this.focus();this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var n=this.opts.element,i=n.data("select2"),r=this;this.close();n.length&&n[0].detachEvent&&n.each(function(){this.detachEvent("onpropertychange",r._sync)});this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null);this._sync=null;i!==t&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),n.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?n.attr({tabindex:this.elementTabIndex}):n.removeAttr("tabindex"),n.show());b.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(n){return n.is("option")?{id:n.prop("value"),text:n.text(),element:n.get(),css:n.attr("class"),disabled:n.prop("disabled"),locked:f(n.attr("locked"),"locked")||f(n.data("locked"),!0)}:n.is("optgroup")?{text:n.attr("label"),children:[],element:n.get(),css:n.attr("class")}:void 0},prepareOpts:function(i){var e,o,s,r,u=this;if(e=i.element,e.get(0).tagName.toLowerCase()==="select"&&(this.select=o=i.element),o&&n.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.");}),i=n.extend({},{populateResults:function(r,f,e){var o,s=this.opts.id,c=this.liveRegion;o=function(r,f,l){var p,nt,v,tt,b,k,a,y,w,d,g;for(r=i.sortResults(r,f,e),g=[],p=0,nt=r.length;p<nt;p=p+1)v=r[p],b=v.disabled===!0,tt=!b&&s(v)!==t,k=v.children&&v.children.length>0,a=n("<li><\/li>"),a.addClass("select2-results-dept-"+l),a.addClass("select2-result"),a.addClass(tt?"select2-result-selectable":"select2-result-unselectable"),b&&a.addClass("select2-disabled"),k&&a.addClass("select2-result-with-children"),a.addClass(u.opts.formatResultCssClass(v)),a.attr("role","presentation"),y=n(document.createElement("div")),y.addClass("select2-result-label"),y.attr("id","select2-result-label-"+h()),y.attr("role","option"),d=i.formatResult(v,y,e,u.opts.escapeMarkup),d!==t&&(y.html(d),a.append(y)),k&&(w=n("<ul><\/ul>"),w.addClass("select2-result-sub"),o(v.children,w,l+1),a.append(w)),a.data("select2-data",v),g.push(a[0]);f.append(g);c.text(i.formatMatches(r.length))};o(f,r,0)}},n.fn.select2.defaults,i),typeof i.id!="function"&&(s=i.id,i.id=function(n){return n[s]}),n.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(o?(i.query=this.bind(function(n){var o={results:[],more:!1},s=n.term,i,r,f;f=function(t,i){var r;t.is("option")?n.matcher(s,t.text(),t)&&i.push(u.optionToData(t)):t.is("optgroup")&&(r=u.optionToData(t),t.children().each2(function(n,t){f(t,r.children)}),r.children.length>0&&i.push(r))};i=e.children();this.getPlaceholder()!==t&&i.length>0&&(r=this.getPlaceholderOption(),r&&(i=i.not(r)));i.each2(function(n,t){f(t,o.results)});n.callback(o)}),i.id=function(n){return n.id}):"query"in i||("ajax"in i?(r=i.element.data("ajax-url"),r&&r.length>0&&(i.ajax.url=r),i.query=et.call(i.element,i.ajax)):"data"in i?i.query=ot(i.data):"tags"in i&&(i.query=st(i.tags),i.createSearchChoice===t&&(i.createSearchChoice=function(t){return{id:n.trim(t),text:n.trim(t)}}),i.initSelection===t&&(i.initSelection=function(t,r){var u=[];n(w(t.val(),i.separator)).each(function(){var r={id:this,text:this},t=i.tags;n.isFunction(t)&&(t=t());n(t).each(function(){if(f(this.id,r.id))return r=this,!1});u.push(r)});r(u)}))),typeof i.query!="function")throw"query function not defined for Select2 "+i.element.attr("id");if(i.createSearchChoicePosition==="top")i.createSearchChoicePosition=function(n,t){n.unshift(t)};else if(i.createSearchChoicePosition==="bottom")i.createSearchChoicePosition=function(n,t){n.push(t)};else if(typeof i.createSearchChoicePosition!="function")throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return i},monitorSource:function(){var i=this.opts.element,r,f=this;i.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()}));this._sync=this.bind(function(){var r=i.prop("disabled"),n;r===t&&(r=!1);this.enable(!r);n=i.prop("readonly");n===t&&(n=!1);this.readonly(n);a(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.addClass(u(this.opts.containerCssClass,this.opts.element));a(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(u(this.opts.dropdownCssClass,this.opts.element))});i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",f._sync)});r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;r!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new r(function(t){n.each(t,f._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var i=n.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(t){t=t||{};t=n.extend({},t,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",!0);this.opts.element.trigger(t);this.opts.element.data("select2-change-triggered",!1);this.opts.element.click();this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var n=this._enabled&&!this._readonly,t=!n;return n===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=n,!0)},enable:function(n){(n===t&&(n=!0),this._enabled!==n)&&(this._enabled=n,this.opts.element.prop("disabled",!n),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(n){(n===t&&(n=!1),this._readonly!==n)&&(this._readonly=n,this.opts.element.prop("readonly",n),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var t=this.dropdown,r=this.container.offset(),v=this.container.outerHeight(!1),s=this.container.outerWidth(!1),h=t.outerHeight(!1),e=n(window),d=e.width(),g=e.height(),l=e.scrollLeft()+d,nt=e.scrollTop()+g,a=r.top+v,o=r.left,tt=a+h<=nt,it=r.top-h>=e.scrollTop(),i=t.outerWidth(!1),y=o+i<=l,rt=t.hasClass("select2-drop-above"),w,c,b,f,k;rt?(c=!0,!it&&tt&&(b=!0,c=!1)):(c=!1,!tt&&it&&(b=!0,c=!0));b&&(t.hide(),r=this.container.offset(),v=this.container.outerHeight(!1),s=this.container.outerWidth(!1),h=t.outerHeight(!1),l=e.scrollLeft()+d,nt=e.scrollTop()+g,a=r.top+v,o=r.left,i=t.outerWidth(!1),y=o+i<=l,t.show(),this.focusSearch());this.opts.dropdownAutoWidth?(k=n(".select2-results",t)[0],t.addClass("select2-drop-auto-width"),t.css("width",""),i=t.outerWidth(!1)+(k.scrollHeight===k.clientHeight?0:p.width),i>s?s=i:i=s,h=t.outerHeight(!1),y=o+i<=l):this.container.removeClass("select2-drop-auto-width");this.body.css("position")!=="static"&&(w=this.body.offset(),a-=w.top,o-=w.left);y||(o=r.left+this.container.outerWidth(!1)-i);f={left:o,width:s};c?(f.top=r.top-h,f.bottom="auto",this.container.addClass("select2-drop-above"),t.addClass("select2-drop-above")):(f.top=a,f.bottom="auto",this.container.removeClass("select2-drop-above"),t.removeClass("select2-drop-above"));f=n.extend(f,u(this.opts.dropdownCss,this.opts.element));t.css(f)},shouldOpen:function(){var t;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(t=n.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){if(!this.shouldOpen())return!1;this.opening();y.on("mousemove.select2Event",function(n){v.x=n.pageX;v.y=n.pageY});return!0},opening:function(){var i=this.containerEventName,u="scroll."+i,f="resize."+i,e="orientationchange."+i,t,r;if(this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=n("#select2-drop-mask"),t.length==0){t=n(document.createElement("div"));t.attr("id","select2-drop-mask").attr("class","select2-drop-mask");t.hide();t.appendTo(this.body);t.on("mousedown touchstart click",function(i){nt(t);var u=n("#select2-drop"),r;u.length>0&&(r=u.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),i.preventDefault(),i.stopPropagation())})}this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t);n("#select2-drop").removeAttr("id");this.dropdown.attr("id","select2-drop");t.show();this.positionDropdown();this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");r=this;this.container.parents().add(window).each(function(){n(this).on(f+" "+u+" "+e,function(){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,i="scroll."+t,r="resize."+t,u="orientationchange."+t;this.container.parents().add(window).each(function(){n(this).off(i).off(r).off(u)});this.clearDropdownAlignmentPreference();n("#select2-drop-mask").hide();this.dropdown.removeAttr("id");this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();y.off("mousemove.select2Event");this.clearSearch();this.search.removeClass("select2-active");this.opts.element.trigger(n.Event("select2-close"))}},externalSearch:function(n){this.open();this.search.val(n);this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return u(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t=this.results,e,i,r,u,o,s,f,h;if(i=this.highlight(),!(i<0)){if(i==0){t.scrollTop(0);return}e=this.findHighlightableChoices().find(".select2-result-label");r=n(e[i]);h=(r.offset()||{}).top||0;u=h+r.outerHeight(!0);i===e.length-1&&(f=t.find("li.select2-more-results"),f.length>0&&(u=f.offset().top+f.outerHeight(!0)));o=t.offset().top+t.outerHeight(!0);u>o&&t.scrollTop(t.scrollTop()+(u-o));s=h-t.offset().top;s<0&&r.css("display")!="none"&&t.scrollTop(t.scrollTop()+s)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var u=this.findHighlightableChoices(),i=this.highlight(),r;i>-1&&i<u.length;)if(i+=t,r=n(u[i]),r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(i);break}},highlight:function(t){var i=this.findHighlightableChoices(),r,u;if(arguments.length===0)return e(i.filter(".select2-highlighted")[0],i.get());t>=i.length&&(t=i.length-1);t<0&&(t=0);this.removeHighlight();r=n(i[t]);r.addClass("select2-highlighted");this.search.attr("aria-activedescendant",r.find(".select2-result-label").attr("id"));this.ensureHighlightVisible();this.liveRegion.text(r.text());u=r.data("select2-data");u&&this.opts.element.trigger({type:"select2-highlight",val:this.id(u),choice:u})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var i=n(t.target).closest(".select2-result-selectable"),r;i.length>0&&!i.is(".select2-highlighted")?(r=this.findHighlightableChoices(),this.highlight(r.index(i))):i.length==0&&this.removeHighlight()},loadMoreIfNeeded:function(){var t=this.results,i=t.find("li.select2-more-results"),f,r=this.resultsPage+1,n=this,e=this.search.val(),o=this.context;i.length!==0&&(f=i.offset().top-t.offset().top-t.height(),f<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:e,page:r,context:o,matcher:this.opts.matcher,callback:this.bind(function(f){n.opened()&&(n.opts.populateResults.call(this,t,f.results,{term:e,page:r,context:o}),n.postprocessResults(f,!1,!1),f.more===!0?(i.detach().appendTo(t).text(u(n.opts.formatLoadMore,n.opts.element,r+1)),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):i.remove(),n.positionDropdown(),n.resultsPage=r,n.context=f.context,this.opts.element.trigger({type:"select2-loaded",items:f}))})})))},tokenize:function(){},updateResults:function(i){function b(){e.removeClass("select2-active");s.positionDropdown();c.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?s.liveRegion.text(c.text()):s.liveRegion.text(s.opts.formatMatches(c.find(".select2-result-selectable").length))}function h(n){c.html(n);b()}var e=this.search,c=this.results,r=this.opts,v,s=this,l,y=e.val(),p=n.data(this.container,"select2-last-term"),w,a;if((i===!0||!p||!f(y,p))&&(n.data(this.container,"select2-last-term",y),i===!0||this.showSearchInput!==!1&&this.opened())){if(w=++this.queryCount,a=this.getMaximumSelectionSize(),a>=1&&(v=this.data(),n.isArray(v)&&v.length>=a&&o(r.formatSelectionTooBig,"formatSelectionTooBig"))){h("<li class='select2-selection-limit'>"+u(r.formatSelectionTooBig,r.element,a)+"<\/li>");return}if(e.val().length<r.minimumInputLength){o(r.formatInputTooShort,"formatInputTooShort")?h("<li class='select2-no-results'>"+u(r.formatInputTooShort,r.element,e.val(),r.minimumInputLength)+"<\/li>"):h("");i&&this.showSearch&&this.showSearch(!0);return}if(r.maximumInputLength&&e.val().length>r.maximumInputLength){o(r.formatInputTooLong,"formatInputTooLong")?h("<li class='select2-no-results'>"+u(r.formatInputTooLong,r.element,e.val(),r.maximumInputLength)+"<\/li>"):h("");return}r.formatSearching&&this.findHighlightableChoices().length===0&&h("<li class='select2-searching'>"+u(r.formatSearching,r.element)+"<\/li>");e.addClass("select2-active");this.removeHighlight();l=this.tokenize();l!=t&&l!=null&&e.val(l);this.resultsPage=1;r.query({element:r.element,term:e.val(),page:this.resultsPage,context:null,matcher:r.matcher,callback:this.bind(function(l){var a;if(w==this.queryCount){if(!this.opened()){this.search.removeClass("select2-active");return}if(l.hasError!==t&&o(r.formatAjaxError,"formatAjaxError")){h("<li class='select2-ajax-error'>"+u(r.formatAjaxError,r.element,l.jqXHR,l.textStatus,l.errorThrown)+"<\/li>");return}if(this.context=l.context===t?null:l.context,this.opts.createSearchChoice&&e.val()!==""&&(a=this.opts.createSearchChoice.call(s,e.val(),l.results),a!==t&&a!==null&&s.id(a)!==t&&s.id(a)!==null&&n(l.results).filter(function(){return f(s.id(this),s.id(a))}).length===0&&this.opts.createSearchChoicePosition(l.results,a)),l.results.length===0&&o(r.formatNoMatches,"formatNoMatches")){h("<li class='select2-no-results'>"+u(r.formatNoMatches,r.element,e.val())+"<\/li>");return}c.empty();s.opts.populateResults.call(this,c,l.results,{term:e.val(),page:this.resultsPage,context:null});l.more===!0&&o(r.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+r.escapeMarkup(u(r.formatLoadMore,r.element,this.resultsPage))+"<\/li>"),window.setTimeout(function(){s.loadMoreIfNeeded()},10));this.postprocessResults(l,i);b();this.opts.element.trigger({type:"select2-loaded",items:l})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0});this.close();this.container.removeClass("select2-container-active");this.search[0]===document.activeElement&&this.search.blur();this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){pt(this.search)},selectHighlighted:function(n){if(this._touchMoved){this.clearTouchMoved();return}var i=this.highlight(),r=this.results.find(".select2-highlighted"),t=r.closest(".select2-result").data("select2-data");if(t){this.highlight(i);this.onSelect(t,n)}else n&&n.noFocus&&this.close()},getPlaceholder:function(){var n;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((n=this.getPlaceholderOption())!==t?n.text():t)},getPlaceholderOption:function(){if(this.select){var i=this.select.children("option").first();if(this.opts.placeholderOption!==t)return this.opts.placeholderOption==="first"&&i||typeof this.opts.placeholderOption=="function"&&this.opts.placeholderOption(this.select);if(n.trim(i.text())===""&&i.val()==="")return i}},initContainerWidth:function(){function r(){var i,f,u,r,e,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){if(i=this.opts.element.attr("style"),i!==t)for(f=i.split(";"),r=0,e=f.length;r<e;r=r+1)if(o=f[r].replace(/\s/g,""),u=o.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),u!==null&&u.length>=1)return u[1];return this.opts.width==="resolve"?(i=this.opts.element.css("width"),i.indexOf("%")>0)?i:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px":null}return n.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=r.call(this);i!==null&&this.container.css("width",i)}});d=k(l,{createContainer:function(){return n(document.createElement("div")).attr({"class":"select2-container"}).html("<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>   <span class='select2-chosen'>&#160;<\/span><abbr class='select2-search-choice-close'><\/abbr>   <span class='select2-arrow' role='presentation'><b role='presentation'><\/b><\/span><\/a><label for='' class='select2-offscreen'><\/label><input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' /><div class='select2-drop select2-display-none'>   <div class='select2-search'>       <label for='' class='select2-offscreen'><\/label>       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'       aria-autocomplete='list' />   <\/div>   <ul class='select2-results' role='listbox'>   <\/ul><\/div>")},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,r,u;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0);this.parent.opening.apply(this,arguments);this.showSearchInput!==!1&&this.search.val(this.focusser.val());this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(r=i.createTextRange(),r.collapse(!1),r.select()):i.setSelectionRange&&(u=this.search.val().length,i.setSelectionRange(u,u)));this.search.val()===""&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select());this.focusser.prop("disabled",!0).val("");this.updateResults(!0);this.opts.element.trigger(n.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.prop("disabled",!1);this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){n("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments);b.call(this,"selection","focusser")},initContainer:function(){var t,e=this.container,s=this.dropdown,u=h(),f,o;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0);this.selection=t=e.find(".select2-choice");this.focusser=e.find(".select2-focusser");t.find(".select2-chosen").attr("id","select2-chosen-"+u);this.focusser.attr("aria-labelledby","select2-chosen-"+u);this.results.attr("id","select2-results-"+u);this.search.attr("aria-owns","select2-results-"+u);this.focusser.attr("id","s2id_autogen"+u);f=n("label[for='"+this.opts.element.attr("id")+"']");this.focusser.prev().text(f.text()).attr("for",this.focusser.attr("id"));o=this.opts.element.attr("title");this.opts.element.attr("title",o||f.text());this.focusser.attr("tabindex",this.elementTabIndex);this.search.attr("id",this.focusser.attr("id")+"_search");this.search.prev().text(n("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id"));this.search.on("keydown",this.bind(function(n){if(this.isInterfaceEnabled()&&229!=n.keyCode){if(n.which===i.PAGE_UP||n.which===i.PAGE_DOWN){r(n);return}switch(n.which){case i.UP:case i.DOWN:this.moveHighlight(n.which===i.UP?-1:1);r(n);return;case i.ENTER:this.selectHighlighted();r(n);return;case i.TAB:this.selectHighlighted({noFocus:!0});return;case i.ESC:this.cancel(n);r(n);return}}}));this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)}));this.focusser.on("keydown",this.bind(function(n){if(this.isInterfaceEnabled()&&n.which!==i.TAB&&!i.isControl(n)&&!i.isFunctionKey(n)&&n.which!==i.ESC){if(this.opts.openOnEnter===!1&&n.which===i.ENTER){r(n);return}if(n.which==i.DOWN||n.which==i.UP||n.which==i.ENTER&&this.opts.openOnEnter){if(n.altKey||n.ctrlKey||n.shiftKey||n.metaKey)return;this.open();r(n);return}if(n.which==i.DELETE||n.which==i.BACKSPACE){this.opts.allowClear&&this.clear();r(n);return}}}));it(this.focusser);this.focusser.on("keyup-change input",this.bind(function(n){if(this.opts.minimumResultsForSearch>=0){if(n.stopPropagation(),this.opened())return;this.open()}}));t.on("mousedown touchstart","abbr",this.bind(function(n){this.isInterfaceEnabled()&&(this.clear(),bt(n),this.close(),this.selection.focus())}));t.on("mousedown touchstart",this.bind(function(i){nt(t);this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.opened()?this.close():this.isInterfaceEnabled()&&this.open();r(i)}));s.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()}));t.on("focus",this.bind(function(n){r(n)}));this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(n.Event("select2-blur")))}));this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.container.addClass("select2-container-active")}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.setPlaceholder()},clear:function(t){var i=this.selection.data("select2-data"),r,u;if(i){if(r=n.Event("select2-clearing"),this.opts.element.trigger(r),r.isDefaultPrevented())return;u=this.getPlaceholderOption();this.opts.element.val(u?u.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();t!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){var n;this.isPlaceholderOptionSelected()?(this.updateSelection(null),this.close(),this.setPlaceholder()):(n=this,this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&i!==null&&(n.updateSelection(i),n.close(),n.setPlaceholder(),n.nextSearchTerm=n.opts.nextSearchTerm(i,n.search.val()))}))},isPlaceholderOptionSelected:function(){var n;return this.getPlaceholder()===t?!1:(n=this.getPlaceholderOption())!==t&&n.prop("selected")||this.opts.element.val()===""||this.opts.element.val()===t||this.opts.element.val()===null},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(n,t){var r=n.find("option").filter(function(){return this.selected&&!this.disabled});t(i.optionToData(r))}:"data"in t&&(t.initSelection=t.initSelection||function(i,r){var e=i.val(),u=null;t.query({matcher:function(n,i,r){var o=f(e,t.id(r));return o&&(u=r),o},callback:n.isFunction(r)?function(){r(u)}:n.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var n=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&n!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(n));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear")}},postprocessResults:function(n,t,i){var r=0,e=this,u;this.findHighlightableChoices().each2(function(n,t){if(f(e.id(t.data("select2-data")),e.opts.element.val()))return r=n,!1});i!==!1&&(t===!0&&r>=0?this.highlight(r):this.highlight(0));t===!0&&(u=this.opts.minimumResultsForSearch,u>=0&&this.showSearch(ht(n.results)>=u))},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),n(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(n,t){if(this.triggerSelect(n)){var i=this.opts.element.val(),r=this.data();this.opts.element.val(this.id(n));this.updateSelection(n);this.opts.element.trigger({type:"select2-selected",val:this.id(n),choice:n});this.nextSearchTerm=this.opts.nextSearchTerm(n,this.search.val());this.close();t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus();f(i,this.id(n))||this.triggerChange({added:n,removed:r})}},updateSelection:function(n){var i=this.selection.find(".select2-chosen"),r,u;this.selection.data("select2-data",n);i.empty();n!==null&&(r=this.opts.formatSelection(n,i,this.opts.escapeMarkup));r!==t&&i.append(r);u=this.opts.formatSelectionCssClass(n,i);u!==t&&i.addClass(u);this.selection.removeClass("select2-default");this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var i,r=!1,u=null,n=this,f=this.data();if(arguments.length===0)return this.opts.element.val();if(i=arguments[0],arguments.length>1&&(r=arguments[1]),this.select)this.select.val(i).find("option").filter(function(){return this.selected}).each2(function(t,i){return u=n.optionToData(i),!1}),this.updateSelection(u),this.setPlaceholder(),r&&this.triggerChange({added:u,removed:f});else{if(!i&&i!==0){this.clear(r);return}if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(i);this.opts.initSelection(this.opts.element,function(t){n.opts.element.val(t?n.id(t):"");n.updateSelection(t);n.setPlaceholder();r&&n.triggerChange({added:t,removed:f})})}},clearSearch:function(){this.search.val("");this.focusser.val("")},data:function(n){var i,r=!1;if(arguments.length===0)return i=this.selection.data("select2-data"),i==t&&(i=null),i;arguments.length>1&&(r=arguments[1]);n?(i=this.data(),this.opts.element.val(n?this.id(n):""),this.updateSelection(n),r&&this.triggerChange({added:n,removed:i})):this.clear(r)}});g=k(l,{createContainer:function(){return n(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html("<ul class='select2-choices'>  <li class='select2-search-field'>    <label for='' class='select2-offscreen'><\/label>    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>  <\/li><\/ul><div class='select2-drop select2-drop-multi select2-display-none'>   <ul class='select2-results'>   <\/ul><\/div>")},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(n,t){var r=[];n.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(n,t){r.push(i.optionToData(t))});t(r)}:"data"in t&&(t.initSelection=t.initSelection||function(i,r){var e=w(i.val(),t.separator),u=[];t.query({matcher:function(i,r,o){var s=n.grep(e,function(n){return f(n,t.id(o))}).length;return s&&u.push(o),s},callback:n.isFunction(r)?function(){for(var h,n,o,s=[],i=0;i<e.length;i++)for(h=e[i],n=0;n<u.length;n++)if(o=u[n],f(h,t.id(o))){s.push(o);u.splice(n,1);break}r(s)}:n.noop})}),t},selectChoice:function(n){var t=this.container.find(".select2-search-choice-focus");t.length&&n&&n[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),n&&n.length&&(this.close(),n.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",n)))},destroy:function(){n("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments);b.call(this,"searchContainer","selection")},initContainer:function(){var t=".select2-choices",u,f;this.searchContainer=this.container.find(".select2-search-field");this.selection=u=this.container.find(t);f=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){f.search[0].focus();f.selectChoice(n(this))});this.search.attr("id","s2id_autogen"+h());this.search.prev().text(n("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id"));this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&this.search.val().length==0||this.isInterfaceEnabled()&&(this.opened()||this.open())}));this.search.attr("tabindex",this.elementTabIndex);this.keydowns=0;this.search.on("keydown",this.bind(function(n){var t;if(this.isInterfaceEnabled()){++this.keydowns;var f=u.find(".select2-search-choice-focus"),o=f.prev(".select2-search-choice:not(.select2-locked)"),e=f.next(".select2-search-choice:not(.select2-locked)"),s=wt(this.search);if(f.length&&(n.which==i.LEFT||n.which==i.RIGHT||n.which==i.BACKSPACE||n.which==i.DELETE||n.which==i.ENTER)){t=f;n.which==i.LEFT&&o.length?t=o:n.which==i.RIGHT?t=e.length?e:null:n.which===i.BACKSPACE?this.unselect(f.first())&&(this.search.width(10),t=o.length?o:e):n.which==i.DELETE?this.unselect(f.first())&&(this.search.width(10),t=e.length?e:null):n.which==i.ENTER&&(t=null);this.selectChoice(t);r(n);t&&t.length||this.open();return}if((n.which!==i.BACKSPACE||this.keydowns!=1)&&n.which!=i.LEFT||s.offset!=0||s.length)this.selectChoice(null);else{this.selectChoice(u.find(".select2-search-choice:not(.select2-locked)").last());r(n);return}if(this.opened())switch(n.which){case i.UP:case i.DOWN:this.moveHighlight(n.which===i.UP?-1:1);r(n);return;case i.ENTER:this.selectHighlighted();r(n);return;case i.TAB:this.selectHighlighted({noFocus:!0});this.close();return;case i.ESC:this.cancel(n);r(n);return}if(n.which!==i.TAB&&!i.isControl(n)&&!i.isFunctionKey(n)&&n.which!==i.BACKSPACE&&n.which!==i.ESC){if(n.which===i.ENTER){if(this.opts.openOnEnter===!1)return;if(n.altKey||n.ctrlKey||n.shiftKey||n.metaKey)return}this.open();(n.which===i.PAGE_UP||n.which===i.PAGE_DOWN)&&r(n);n.which===i.ENTER&&r(n)}}}));this.search.on("keyup",this.bind(function(){this.keydowns=0;this.resizeSearch()}));this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.selectChoice(null);this.opened()||this.clearSearch();t.stopImmediatePropagation();this.opts.element.trigger(n.Event("select2-blur"))}));this.container.on("click",t,this.bind(function(t){this.isInterfaceEnabled()&&(n(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))}));this.container.on("focus",t,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){var n;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());(this.select||this.opts.element.val()!=="")&&(n=this,this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&i!==null&&(n.updateSelection(i),n.close(),n.clearSearch())}))},clearSearch:function(){var n=this.getPlaceholder(),i=this.getMaxSearchWidth();n!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(n).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.search.val()===""&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select());this.updateResults(!0);this.opts.shouldFocusInput(this)&&this.search.focus();this.opts.element.trigger(n.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var r=[],u=[],i=this;n(t).each(function(){e(i.id(this),r)<0&&(r.push(i.id(this)),u.push(this))});t=u;this.selection.find(".select2-search-choice").remove();n(t).each(function(){i.addSelectedChoice(this)});i.postprocessResults()},tokenize:function(){var n=this.search.val();n=this.opts.tokenizer.call(this,n,this.data(),this.bind(this.onSelect),this.opts);n!=null&&n!=t&&(this.search.val(n),n.length>0&&this.open())},onSelect:function(n,i){this.triggerSelect(n)&&n.text!==""&&(this.addSelectedChoice(n),this.opts.element.trigger({type:"selected",val:this.id(n),choice:n}),this.nextSearchTerm=this.opts.nextSearchTerm(n,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(n,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:n}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(i){var o=!i.locked,h=n("<li class='select2-search-choice'>    <div><\/div>    <a href='#' class='select2-search-choice-close' tabindex='-1'><\/a><\/li>"),c=n("<li class='select2-search-choice select2-locked'><div><\/div><\/li>"),u=o?h:c,l=this.id(i),s=this.getVal(),f,e;if(f=this.opts.formatSelection(i,u.find("div"),this.opts.escapeMarkup),f!=t&&u.find("div").replaceWith("<div>"+f+"<\/div>"),e=this.opts.formatSelectionCssClass(i,u.find("div")),e!=t&&u.addClass(e),o)u.find(".select2-search-choice-close").on("mousedown",r).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(n(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),r(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))}));u.data("select2-data",i);u.insertBefore(this.searchContainer);s.push(l);this.setVal(s)},unselect:function(t){var u=this.getVal(),i,f,r;if(t=t.closest(".select2-search-choice"),t.length===0)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(i=t.data("select2-data"),i){if(r=n.Event("select2-removing"),r.val=this.id(i),r.choice=i,this.opts.element.trigger(r),r.isDefaultPrevented())return!1;while((f=e(this.id(i),u))>=0)u.splice(f,1),this.setVal(u),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(n,t,i){var s=this.getVal(),f=this.results.find(".select2-result"),h=this.results.find(".select2-result-with-children"),r=this;f.each2(function(n,t){var i=r.id(t.data("select2-data"));e(i,s)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))});h.each2(function(n,t){t.is(".select2-result-selectable")||t.find(".select2-result-selectable:not(.select2-selected)").length!==0||t.addClass("select2-selected")});this.highlight()==-1&&i!==!1&&r.highlight(0);!this.opts.createSearchChoice&&!f.filter(".select2-result:not(.select2-selected)").length>0&&(n&&(!n||n.more||this.results.find(".select2-no-results").length!==0)||o(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+u(r.opts.formatNoMatches,r.opts.element,r.search.val())+"<\/li>"))},getMaxSearchWidth:function(){return this.selection.width()-tt(this.search)},resizeSearch:function(){var i,u,t,f,n,r=tt(this.search);i=kt(this.search)+10;u=this.search.offset().left;t=this.selection.width();f=this.selection.offset().left;n=t-(u-f)-r;n<i&&(n=t-r);n<40&&(n=t-r);n<=0&&(n=i);this.search.width(Math.floor(n))},getVal:function(){var n;return this.select?(n=this.select.val(),n===null?[]:n):(n=this.opts.element.val(),w(n,this.opts.separator))},setVal:function(t){var i;this.select?this.select.val(t):(i=[],n(t).each(function(){e(this,i)<0&&i.push(this)}),this.opts.element.val(i.length===0?"":i.join(this.opts.separator)))},buildChangeDetails:function(n,t){for(var r,t=t.slice(0),n=n.slice(0),i=0;i<t.length;i++)for(r=0;r<n.length;r++)f(this.opts.id(t[i]),this.opts.id(n[r]))&&(t.splice(i,1),i>0&&i--,n.splice(r,1),r--);return{added:t,removed:n}},val:function(i,r){var f,u=this;if(arguments.length===0)return this.getVal();if(f=this.data(),f.length||(f=[]),!i&&i!==0){this.opts.element.val("");this.updateSelection([]);this.clearSearch();r&&this.triggerChange({added:this.data(),removed:f});return}if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange(this.buildChangeDetails(f,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var i=n.map(t,u.id);u.setVal(i);u.updateSelection(t);u.clearSearch();r&&u.triggerChange(u.buildChangeDetails(f,u.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var t=[],i=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){t.push(i.opts.id(n(this).data("select2-data")))});this.setVal(t);this.triggerChange()},data:function(t,i){var f=this,r,u;if(arguments.length===0)return this.selection.children(".select2-search-choice").map(function(){return n(this).data("select2-data")}).get();u=this.data();t||(t=[]);r=n.map(t,function(n){return f.opts.id(n)});this.setVal(r);this.updateSelection(t);this.clearSearch();i&&this.triggerChange(this.buildChangeDetails(u,this.data()))}});n.fn.select2=function(){var i=Array.prototype.slice.call(arguments,0),r,u,f,o,s,c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],a=["val","data"],h={search:"externalSearch"};return this.each(function(){if(i.length===0||typeof i[0]=="object")r=i.length===0?{}:n.extend({},i[0]),r.element=n(this),r.element.get(0).tagName.toLowerCase()==="select"?s=r.element.prop("multiple"):(s=r.multiple||!1,"tags"in r&&(r.multiple=s=!0)),u=s?new window.Select2["class"].multi:new window.Select2["class"].single,u.init(r);else if(typeof i[0]=="string"){if(e(i[0],c)<0)throw"Unknown method: "+i[0];if(o=t,u=n(this).data("select2"),u===t)return;if(f=i[0],f==="container"?o=u.container:f==="dropdown"?o=u.dropdown:(h[f]&&(f=h[f]),o=u[f].apply(u,i.slice(1))),e(i[0],l)>=0||e(i[0],a)>=0&&i.length==1)return!1}else throw"Invalid arguments to select2 plugin: "+i;}),o===t?this:o};n.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(n,t,i,r){var u=[];return ut(n.text,i.term,u,r),u.join("")},formatSelection:function(n,i,r){return n?r(n.text):t},sortResults:function(n){return n},formatResultCssClass:function(n){return n.css},formatSelectionCssClass:function(){return t},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(n){return n==t?null:n.id},matcher:function(n,t){return c(""+t).toUpperCase().indexOf(c(""+n).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:dt,escapeMarkup:ft,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(n){return n},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(n){var t="ontouchstart"in window||navigator.msMaxTouchPoints>0;return t?n.opts.minimumResultsForSearch<0?!1:!0:!0}};n.fn.select2.locales=[];n.fn.select2.locales.en={formatMatches:function(n){return n===1?"One result is available, press enter to select it.":n+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(n,t){var i=t-n.length;return"Please enter "+i+" or more character"+(i==1?"":"s")},formatInputTooLong:function(n,t){var i=n.length-t;return"Please delete "+i+" character"+(i==1?"":"s")},formatSelectionTooBig:function(n){return"You can only select "+n+" item"+(n==1?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"}};n.extend(n.fn.select2.defaults,n.fn.select2.locales.en);n.fn.select2.ajaxDefaults={transport:n.ajax,params:{type:"GET",cache:!1,dataType:"json"}};window.Select2={query:{ajax:et,local:ot,tags:st},util:{debounce:rt,markMatch:ut,escapeMarkup:ft,stripDiacritics:c},"class":{abstract:l,single:d,multi:g}}}}(jQuery)