/*! * bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select) * * copyright 2012-2018 snapappointments, llc * licensed under mit (https://github.com/snapappointments/bootstrap-select/blob/master/license) */ !function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jquery)}(this,function(e){!function(f){"use strict";var e,c,t,i=document.createelement("_");if(i.classlist.toggle("c3",!1),i.classlist.contains("c3")){var s=domtokenlist.prototype.toggle;domtokenlist.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:s.call(this,e)}}function e(e){var t,i=[],s=e&&e.options;if(e.multiple)for(var n=0,o=s.length;n]+>/g,"")),s&&(a=m(a)),a=a.touppercase(),o="contains"===i?0<=a.indexof(t):a.startswith(t)))break}return o}function z(e){return parseint(e,10)||0}f.fn.triggernative=function(e){var t,i=this[0];i.dispatchevent?(o?t=new event(e,{bubbles:!0}):(t=document.createevent("event")).initevent(e,!0,!1),i.dispatchevent(t)):i.fireevent?((t=document.createeventobject()).eventtype=e,i.fireevent("on"+e,t)):this.trigger(e)};var l={"\xc0":"a","\xc1":"a","\xc2":"a","\xc3":"a","\xc4":"a","\xc5":"a","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"c","\xe7":"c","\xd0":"d","\xf0":"d","\xc8":"e","\xc9":"e","\xca":"e","\xcb":"e","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"i","\xcd":"i","\xce":"i","\xcf":"i","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"n","\xf1":"n","\xd2":"o","\xd3":"o","\xd4":"o","\xd5":"o","\xd6":"o","\xd8":"o","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"u","\xda":"u","\xdb":"u","\xdc":"u","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"y","\xfd":"y","\xff":"y","\xc6":"ae","\xe6":"ae","\xde":"th","\xfe":"th","\xdf":"ss","\u0100":"a","\u0102":"a","\u0104":"a","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"c","\u0108":"c","\u010a":"c","\u010c":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"d","\u0110":"d","\u010f":"d","\u0111":"d","\u0112":"e","\u0114":"e","\u0116":"e","\u0118":"e","\u011a":"e","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"g","\u011e":"g","\u0120":"g","\u0122":"g","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"h","\u0126":"h","\u0125":"h","\u0127":"h","\u0128":"i","\u012a":"i","\u012c":"i","\u012e":"i","\u0130":"i","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"j","\u0135":"j","\u0136":"k","\u0137":"k","\u0138":"k","\u0139":"l","\u013b":"l","\u013d":"l","\u013f":"l","\u0141":"l","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"n","\u0145":"n","\u0147":"n","\u014a":"n","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"o","\u014e":"o","\u0150":"o","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"r","\u0156":"r","\u0158":"r","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"s","\u015c":"s","\u015e":"s","\u0160":"s","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"t","\u0164":"t","\u0166":"t","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"u","\u016a":"u","\u016c":"u","\u016e":"u","\u0170":"u","\u0172":"u","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"w","\u0175":"w","\u0176":"y","\u0177":"y","\u0178":"y","\u0179":"z","\u017b":"z","\u017d":"z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"ij","\u0133":"ij","\u0152":"oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=regexp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function d(e){return l[e]}function m(e){return(e=e.tostring())&&e.replace(r,d).replace(a,"")}var h=function(t){var i=function(e){return t[e]},e="(?:"+object.keys(t).join("|")+")",s=regexp(e),n=regexp(e,"g");return function(e){return e=null==e?"":""+e,s.test(e)?e.replace(n,i):e}},g=h({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),f=h({"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"}),s={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},c=27,o=13,t=32,d=9,h=38,a=40,_={success:!1,major:"3"};try{_.full=(f.fn.dropdown.constructor.version||"").split(" ")[0].split("."),_.major=_.full[0],_.success=!0}catch(e){console.warn("there was an issue retrieving bootstrap's version. ensure bootstrap is being loaded before bootstrap-select and there is no namespace collision. if loading bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.constructor.bootstrapversion.",e)}var p=0,l=".bs.select",q={disabled:"disabled",divider:"divider",show:"open",dropup:"dropup",menu:"dropdown-menu",menuright:"dropdown-menu-right",menuleft:"dropdown-menu-left",buttonclass:"btn-default",popoverheader:"popover-title"},n={menu:"."+q.menu};"4"===_.major&&(q.divider="dropdown-divider",q.show="show",q.buttonclass="btn-light",q.popoverheader="popover-header");var p=new regexp(h+"|"+a),r=new regexp("^"+d+"$|"+c),u=(new regexp(o+"|"+t),function(e,t){var i=this;n.usedefault||(f.valhooks.select.set=n._set,n.usedefault=!0),this.$element=f(e),this.$newelement=null,this.$button=null,this.$menu=null,this.options=t,this.selectpicker={main:{map:{newindex:{},originalindex:{}}},current:{map:{}},search:{map:{}},view:{},keydown:{keyhistory:"",resetkeyhistory:{start:function(){return settimeout(function(){i.selectpicker.keydown.keyhistory=""},800)}}}},null===this.options.title&&(this.options.title=this.$element.attr("title"));var s=this.options.windowpadding;"number"==typeof s&&(this.options.windowpadding=[s,s,s,s]),this.val=u.prototype.val,this.render=u.prototype.render,this.refresh=u.prototype.refresh,this.setstyle=u.prototype.setstyle,this.selectall=u.prototype.selectall,this.deselectall=u.prototype.deselectall,this.destroy=u.prototype.destroy,this.remove=u.prototype.remove,this.show=u.prototype.show,this.hide=u.prototype.hide,this.init()});function v(e){var o,l=arguments,r=e;if([].shift.apply(l),!_.success){try{_.full=(f.fn.dropdown.constructor.version||"").split(" ")[0].split(".")}catch(e){_.full=u.bootstrapversion.split(" ")[0].split(".")}_.major=_.full[0],_.success=!0,"4"===_.major&&(q.divider="dropdown-divider",q.show="show",q.buttonclass="btn-light",u.defaults.style=q.buttonclass="btn-light",q.popoverheader="popover-header")}var t=this.each(function(){var e=f(this);if(e.is("select")){var t=e.data("selectpicker"),i="object"==typeof r&&r;if(t){if(i)for(var s in i)i.hasownproperty(s)&&(t.options[s]=i[s])}else{var n=f.extend({},u.defaults,f.fn.selectpicker.defaults||{},e.data(),i);n.template=f.extend({},u.defaults.template,f.fn.selectpicker.defaults?f.fn.selectpicker.defaults.template:{},e.data().template,i.template),e.data("selectpicker",t=new u(this,n))}"string"==typeof r&&(o=t[r]instanceof function?t[r].apply(t,l):t.options[r])}});return void 0!==o?o:t}u.version="1.13.3",u.bootstrapversion=_.major,u.defaults={noneselectedtext:"nothing selected",noneresultstext:"no results matched {0}",countselectedtext:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxoptionstext:function(e,t){return[1==e?"limit reached ({n} item max)":"limit reached ({n} items max)",1==t?"group limit reached ({n} item max)":"group limit reached ({n} items max)"]},selectalltext:"select all",deselectalltext:"deselect all",donebutton:!1,donebuttontext:"close",multipleseparator:", ",stylebase:"btn",style:q.buttonclass,size:"auto",title:null,selectedtextformat:"values",width:!1,container:!1,hidedisabled:!1,showsubtext:!1,showicon:!0,showcontent:!0,dropupauto:!0,header:!1,livesearch:!1,livesearchplaceholder:null,livesearchnormalize:!1,livesearchstyle:"contains",actionsbox:!1,iconbase:"glyphicon",tickicon:"glyphicon-ok",showtick:!1,template:{caret:''},maxoptions:!1,mobile:!1,selectontab:!1,dropdownalignright:!1,windowpadding:0,virtualscroll:600,display:!1},"4"===_.major&&(u.defaults.style="btn-light",u.defaults.iconbase="",u.defaults.tickicon="bs-ok-default"),u.prototype={constructor:u,init:function(){var i=this,e=this.$element.attr("id");this.selectid=p++,this.$element.addclass("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newelement=this.createdropdown(),this.createli(),this.$element.after(this.$newelement).prependto(this.$newelement),this.$button=this.$newelement.children("button"),this.$menu=this.$newelement.children(n.menu),this.$menuinner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeclass("bs-select-hidden"),!0===this.options.dropdownalignright&&this.$menu.addclass(q.menuright),void 0!==e&&this.$button.attr("data-id",e),this.checkdisabled(),this.clicklistener(),this.options.livesearch&&this.livesearchlistener(),this.render(),this.setstyle(),this.setwidth(),this.options.container?this.selectposition():this.$element.on("hide"+l,function(){if(i.isvirtual()){var e=i.$menuinner[0],t=e.firstchild.clonenode(!1);e.replacechild(t,e.firstchild),e.scrolltop=0}}),this.$menu.data("this",this),this.$newelement.data("this",this),this.options.mobile&&this.mobile(),this.$newelement.on({"hide.bs.dropdown":function(e){i.$menuinner.attr("aria-expanded",!1),i.$element.trigger("hide"+l,e)},"hidden.bs.dropdown":function(e){i.$element.trigger("hidden"+l,e)},"show.bs.dropdown":function(e){i.$menuinner.attr("aria-expanded",!0),i.$element.trigger("show"+l,e)},"shown.bs.dropdown":function(e){i.$element.trigger("shown"+l,e)}}),i.$element[0].hasattribute("required")&&this.$element.on("invalid",function(){i.$button.addclass("bs-invalid"),i.$element.on("shown"+l+".invalid",function(){i.$element.val(i.$element.val()).off("shown"+l+".invalid")}).on("rendered"+l,function(){this.validity.valid&&i.$button.removeclass("bs-invalid"),i.$element.off("rendered"+l)}),i.$button.on("blur"+l,function(){i.$element.focus().blur(),i.$button.off("blur"+l)})}),settimeout(function(){i.$element.trigger("loaded"+l)})},createdropdown:function(){var e,t=this.multiple||this.options.showtick?" show-tick":"",i=this.autofocus?" autofocus":"",s="",n="",o="",l="";return this.options.header&&(s='
'+this.options.header+"
"),this.options.livesearch&&(n=''),this.multiple&&this.options.actionsbox&&(o='
"),this.multiple&&this.options.donebutton&&(l='
"),e='",f(e)},setpositiondata:function(){this.selectpicker.view.canhighlight=[];for(var e=0;e=this.options.virtualscroll||!0===this.options.virtualscroll},createview:function(c,e){e=e||0;var o=this;this.selectpicker.current=c?this.selectpicker.search:this.selectpicker.main;var z,t,d=[];function i(e,t){var i,s,n,o,l,r,a,c,d,h=o.selectpicker.current.elements.length,p=[],u=void 0,f=!0,m=o.isvirtual();o.selectpicker.view.scrolltop=e,!0===m&&o.sizeinfo.hasscrollbar&&o.$menu[0].offsetwidth>o.sizeinfo.totalmenuwidth&&(o.sizeinfo.menuwidth=o.$menu[0].offsetwidth,o.sizeinfo.totalmenuwidth=o.sizeinfo.menuwidth+o.sizeinfo.scrollbarwidth,o.$menu.css("min-width",o.sizeinfo.menuwidth)),i=math.ceil(o.sizeinfo.menuinnerheight/o.sizeinfo.liheight*1.5),s=math.round(h/i)||1;for(var v=0;vh-1?0:o.selectpicker.current.data[h-1].position-o.selectpicker.current.data[o.selectpicker.view.position1-1].position,i.firstchild.style.margintop=b+"px",i.firstchild.style.marginbottom=w+"px"),i.firstchild.appendchild(x)}if(o.prevactiveindex=o.activeindex,o.options.livesearch){if(c&&t){var e,y=0;o.selectpicker.view.canhighlight[y]||(y=1+o.selectpicker.view.canhighlight.slice(1).indexof(!0)),e=o.selectpicker.view.visibleelements[y],o.selectpicker.view.currentactive&&(o.selectpicker.view.currentactive.classlist.remove("active"),o.selectpicker.view.currentactive.firstchild&&o.selectpicker.view.currentactive.firstchild.classlist.remove("active")),e&&(e.classlist.add("active"),e.firstchild&&e.firstchild.classlist.add("active")),o.activeindex=o.selectpicker.current.map.originalindex[y]}}else o.$menuinner.focus()}this.setpositiondata(),i(e,!0),this.$menuinner.off("scroll.createview").on("scroll.createview",function(e,t){o.noscroll||i(this.scrolltop,t),o.noscroll=!1}),f(window).off("resize"+l+"."+this.selectid+".createview").on("resize"+l+"."+this.selectid+".createview",function(){o.$newelement.hasclass(q.show)&&i(o.$menuinner[0].scrolltop)})},createli:function(){var z,t=this,d=[],h=0,a=0,l=[],n=0,p=0,r=-1;this.selectpicker.view.titleoption||(this.selectpicker.view.titleoption=document.createelement("option"));var e,w={span:document.createelement("span"),subtext:document.createelement("small"),a:document.createelement("a"),li:document.createelement("li"),whitespace:document.createtextnode("\xa0")},b=document.createdocumentfragment();(t.options.showtick||t.multiple)&&((e=w.span.clonenode(!1)).classname=t.options.iconbase+" "+t.options.tickicon+" check-mark",w.a.appendchild(e)),w.a.setattribute("role","option"),w.subtext.classname="text-muted",w.text=w.span.clonenode(!1),w.text.classname="text";var m=function(e,t,i){var s=w.li.clonenode(!1);return e&&(1===e.nodetype||11===e.nodetype?s.appendchild(e):s.innerhtml=e),void 0!==t&&""!==t&&(s.classname=t),null!=i&&s.classlist.add("optgroup-"+i),s},u=function(e,t,i){var s=w.a.clonenode(!0);return e&&(11===e.nodetype?s.appendchild(e):s.insertadjacenthtml("beforeend",e)),void 0!==t&""!==t&&(s.classname=t),"4"===_.major&&s.classlist.add("dropdown-item"),i&&s.setattribute("style",i),s},v=function(e){var t,i,s=w.text.clonenode(!1);if(e.optioncontent)s.innerhtml=e.optioncontent;else{if(s.textcontent=e.text,e.optionicon){var n=w.whitespace.clonenode(!1);(i=w.span.clonenode(!1)).classname=t.options.iconbase+" "+e.optionicon,b.appendchild(i),b.appendchild(n)}e.optionsubtext&&((t=w.subtext.clonenode(!1)).innerhtml=e.optionsubtext,s.appendchild(t))}return b.appendchild(s),b};if(this.options.title&&!this.multiple){r--;var t=this.$element[0],i=!1,s=!this.selectpicker.view.titleoption.parentnode;if(s)this.selectpicker.view.titleoption.classname="bs-title-option",this.selectpicker.view.titleoption.value="",i=void 0===f(t.options[t.selectedindex]).attr("selected")&&void 0===this.$element.data("selected");(s||0!==this.selectpicker.view.titleoption.index)&&t.insertbefore(this.selectpicker.view.titleoption,t.firstchild),i&&(t.selectedindex=0)}var j=this.$element.find("option");j.each(function(e){var t=f(this);if(r++,!t.hasclass("bs-title-option")){var i,s,n=t.data(),o=this.classname||"",l=g(this.style.csstext),r=n.content,a=this.textcontent,c=n.tokens,d=n.subtext,h=n.icon,p=t.parent(),u=p[0],f="optgroup"===u.tagname,m=f&&u.disabled,v=this.disabled||m,g=this.previouselementsibling&&"optgroup"===this.previouselementsibling.tagname,b=p.data();if(!0===n.hidden||t.options.hidedisabled&&(v&&!f||m)){i=n.prevhiddenindex,t.next().data("prevhiddenindex",void 0!==i?i:e),r--,g||void 0!==i&&(y=j[i].previouselementsibling)&&"optgroup"===y.tagname&&!y.disabled&&(g=!0),g&&"divider"!==l[l.length-1].type&&(r++,d.push(m(!1,q.divider,n+"div")),l.push({type:"divider",optid:n}))}else{if(f&&!0!==n.divider){if(t.options.hidedisabled&&v){if(void 0===b.alloptionsdisabled){var w=p.children();p.data("alloptionsdisabled",w.filter(":disabled").length===w.length)}if(p.data("alloptionsdisabled"))return void r--}var i=" "+u.classname||"";if(!this.previouselementsibling){n+=1;var x=u.label,k=g(x),$=b.subtext,s=b.icon;0!==e&&0 li")},render:function(){var e=this,t=this.$element.find("option"),i=[],s=[];this.toggleplaceholder(),this.tabindex();for(var n=0,o=this.selectpicker.main.elements.length;n ':"";r=e.options.showsubtext&&c.subtext&&!e.multiple?' '+c.subtext+"":"",a=l.title?l.title:c.content&&e.options.showcontent?c.content.tostring():d+l.innerhtml.trim()+r,s.push(a)}}var h=this.multiple?s.join(this.options.multipleseparator):s[0];if(50");if(1p[1]||1===p.length&&2<=i.length){var u=this.selectpicker.view.availableoptionscount;h=("function"==typeof this.options.countselectedtext?this.options.countselectedtext(i.length,u):this.options.countselectedtext).replace("{0}",i.length.tostring()).replace("{1}",u.tostring())}}null==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedtextformat&&(h=this.options.title),h||(h=void 0!==this.options.title?this.options.title:this.options.noneselectedtext),this.$button[0].title=f(h.replace(/<[^>]*>?/g,"").trim()),this.$button.find(".filter-option-inner-inner")[0].innerhtml=h,this.$element.trigger("rendered"+l)},setstyle:function(e,t){this.$element.attr("class")&&this.$newelement.addclass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=e||this.options.style;"add"==t?this.$button.addclass(i):"remove"==t?this.$button.removeclass(i):(this.$button.removeclass(this.options.style),this.$button.addclass(i))},liheight:function(e){if(e||!1!==this.options.size&&!this.sizeinfo){this.sizeinfo||(this.sizeinfo={});var t=document.createelement("div"),i=document.createelement("div"),s=document.createelement("div"),n=document.createelement("ul"),o=document.createelement("li"),l=document.createelement("li"),r=document.createelement("li"),a=document.createelement("a"),c=document.createelement("span"),d=this.options.header&&0this.sizeinfo.menuextras.vert&&r+this.sizeinfo.menuextras.vert+50>this.sizeinfo.selectoffsetbot)),"auto"===this.options.size)n=3this.options.size){for(var g=0;gthis.sizeinfo.selectoffsetright&&this.sizeinfo.selectoffsetrightthis.sizeinfo.menuinnerheight&&(this.sizeinfo.hasscrollbar=!0,this.sizeinfo.totalmenuwidth=this.sizeinfo.menuwidth+this.sizeinfo.scrollbarwidth,this.$menu.css("min-width",this.sizeinfo.totalmenuwidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setsize:function(e){if(this.liheight(e),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t,i=this,s=f(window),n=0;this.setmenusize(),"auto"===this.options.size?(this.$searchbox.off("input.setmenusize propertychange.setmenusize").on("input.setmenusize propertychange.setmenusize",function(){return i.setmenusize()}),s.off("resize"+l+"."+this.selectid+".setmenusize scroll"+l+"."+this.selectid+".setmenusize").on("resize"+l+"."+this.selectid+".setmenusize scroll"+l+"."+this.selectid+".setmenusize",function(){return i.setmenusize()})):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&(this.$searchbox.off("input.setmenusize propertychange.setmenusize"),s.off("resize"+l+"."+this.selectid+".setmenusize scroll"+l+"."+this.selectid+".setmenusize")),e?n=this.$menuinner[0].scrolltop:i.multiple||"number"==typeof(t=i.selectpicker.main.map.newindex[i.$element[0].selectedindex])&&!1!==i.options.size&&(n=(n=i.sizeinfo.liheight*t)-i.sizeinfo.menuinnerheight/2+i.sizeinfo.liheight/2),i.createview(!1,n)}},setwidth:function(){var i=this;"auto"===this.options.width?requestanimationframe(function(){i.$menu.css("min-width","0"),i.liheight(),i.setmenusize();var e=i.$newelement.clone().appendto("body"),t=e.css("width","auto").children("button").outerwidth();e.remove(),i.sizeinfo.selectwidth=math.max(i.sizeinfo.totalmenuwidth,t),i.$newelement.css("width",i.sizeinfo.selectwidth+"px")}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newelement.css("width","").addclass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newelement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newelement.css("width","")),this.$newelement.hasclass("fit-width")&&"fit"!==this.options.width&&this.$newelement.removeclass("fit-width")},selectposition:function(){this.$bscontainer=f('
');var s,n,o,l=this,r=f(this.options.container),e=function(e){var t={},i=l.options.display||!!f.fn.dropdown.constructor.default&&f.fn.dropdown.constructor.default.display;l.$bscontainer.addclass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleclass(q.dropup,e.hasclass(q.dropup)),s=e.offset(),r.is("body")?n={top:0,left:0}:((n=r.offset()).top+=parseint(r.css("bordertopwidth"))-r.scrolltop(),n.left+=parseint(r.css("borderleftwidth"))-r.scrollleft()),o=e.hasclass(q.dropup)?0:e[0].offsetheight,(_.major<4||"static"===i)&&(t.top=s.top-n.top+o,t.left=s.left-n.left),t.width=e[0].offsetwidth,l.$bscontainer.css(t)};this.$button.on("click.bs.dropdown.data-api",function(){l.isdisabled()||(e(l.$newelement),l.$bscontainer.appendto(l.options.container).toggleclass(q.show,!l.$button.hasclass(q.show)).append(l.$menu))}),f(window).off("resize"+l+"."+this.selectid+" scroll"+l+"."+this.selectid).on("resize"+l+"."+this.selectid+" scroll"+l+"."+this.selectid,function(){l.$newelement.hasclass(q.show)&&e(l.$newelement)}),this.$element.on("hide"+l,function(){l.$menu.data("height",l.$menu.height()),l.$bscontainer.detach()})},setoptionstatus:function(){var e=this,t=this.$element.find("option");if(e.noscroll=!1,e.selectpicker.view.visibleelements&&e.selectpicker.view.visibleelements.length)for(var i=0;i
');i[2]&&(x=x.replace("{var}",i[2][1"+x+"")),r=!1,s.$element.trigger("maxreached"+l)),f&&v&&($.append(f("
"+k+"
")),r=!1,s.$element.trigger("maxreachedgrp"+l)),settimeout(function(){s.setselected(n,!1)},10),$.delay(750).fadeout(300,function(){f(this).remove()})}}}else a.prop("selected",!1),c.prop("selected",!0),s.setselected(n,!0);!s.multiple||s.multiple&&1===s.options.maxoptions?s.$button.focus():s.options.livesearch&&s.$searchbox.focus(),r&&(o!=e(s.$element[0])&&s.multiple||l!=s.$element.prop("selectedindex")&&!s.multiple)&&(y=[n,c.prop("selected"),o],s.$element.triggernative("change"))}}),this.$menu.on("click","li."+q.disabled+" a, ."+q.popoverheader+", ."+q.popoverheader+" :not(.close)",function(e){e.currenttarget==this&&(e.preventdefault(),e.stoppropagation(),s.options.livesearch&&!f(e.target).hasclass("close")?s.$searchbox.focus():s.$button.focus())}),this.$menuinner.on("click",".divider, .dropdown-header",function(e){e.preventdefault(),e.stoppropagation(),s.options.livesearch?s.$searchbox.focus():s.$button.focus()}),this.$menu.on("click","."+q.popoverheader+" .close",function(){s.$button.click()}),this.$searchbox.on("click",function(e){e.stoppropagation()}),this.$menu.on("click",".actions-btn",function(e){s.options.livesearch?s.$searchbox.focus():s.$button.focus(),e.preventdefault(),e.stoppropagation(),f(this).hasclass("bs-select-all")?s.selectall():s.deselectall()}),this.$element.on({change:function(){s.render(),s.$element.trigger("changed"+l,y),y=null},focus:function(){s.options.mobile||s.$button.focus()}})},livesearchlistener:function(){var u=this,f=document.createelement("li");this.$button.on("click.bs.dropdown.data-api",function(){u.$searchbox.val()&&u.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stoppropagation()}),this.$searchbox.on("input propertychange",function(){var e=u.$searchbox.val();if(u.selectpicker.search.map.newindex={},u.selectpicker.search.map.originalindex={},u.selectpicker.search.elements=[],u.selectpicker.search.data=[],e){var t=[],i=e.touppercase(),s={},n=[],o=u._searchstyle(),l=u.options.livesearchnormalize;l&&(i=m(i)),u._$lisselected=u.$menuinner.find(".selected");for(var r=0;r=a.selectpicker.view.canhighlight.length&&(t=0),a.selectpicker.view.canhighlight[t+m]||(t=t+1+a.selectpicker.view.canhighlight.slice(t+m+1).indexof(!0))),e.preventdefault();var v=m+t;e.which===h?0===m&&t===c.length-1?(a.$menuinner[0].scrolltop=a.$menuinner[0].scrollheight,v=a.selectpicker.current.elements.length-1):d=(o=(n=a.selectpicker.current.data[v]).position-n.height)u+a.sizeinfo.menuinnerheight),(s=a.selectpicker.current.elements[g]).classlist.add("active"),s.firstchild&&s.firstchild.classlist.add("active"),a.activeindex=w[k],s.firstchild.focus(),d&&(a.$menuinner[0].scrolltop=o),l.focus()}}i&&(e.which===t&&!a.selectpicker.keydown.keyhistory||e.which===o||e.which===d&&a.options.selectontab)&&(e.which!==t&&e.preventdefault(),a.options.livesearch&&e.which===t||(a.$menuinner.find(".active a").trigger("click",!0),l.focus(),a.options.livesearch||(e.preventdefault(),f(document).data("spaceselect",!0))))},mobile:function(){this.$element.addclass("mobile-device")},refresh:function(){var e=f.extend({},this.options,this.$element.data());this.options=e,this.selectpicker.main.map.newindex={},this.selectpicker.main.map.originalindex={},this.createli(),this.checkdisabled(),this.render(),this.setstyle(),this.setwidth(),this.setsize(!0),this.$element.trigger("refreshed"+l)},hide:function(){this.$newelement.hide()},show:function(){this.$newelement.show()},remove:function(){this.$newelement.remove(),this.$element.remove()},destroy:function(){this.$newelement.before(this.$element).remove(),this.$bscontainer?this.$bscontainer.remove():this.$menu.remove(),this.$element.off(l).removedata("selectpicker").removeclass("bs-select-hidden selectpicker"),f(window).off(l+"."+this.selectid)}};var g=f.fn.selectpicker;f.fn.selectpicker=v,f.fn.selectpicker.constructor=u,f.fn.selectpicker.noconflict=function(){return f.fn.selectpicker=g,this},f(document).off("keydown.bs.dropdown.data-api").on("keydown"+l,'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',u.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stoppropagation()}),f(window).on("load"+l+".data-api",function(){f(".selectpicker").each(function(){var e=f(this);v.call(e,e.data())})})}(e)}); //# sourcemappingurl=bootstrap-select.js.map