{"version":3,"sources":["bootstrap.min.js","bootstrap-select.min.js","jquery.bootgrid.min.js","bootbox.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"../bootstrap-bundle.min.js","sourcesContent":["/*!\n * Bootstrap v3.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under the MIT license\n */\nif(\"undefined\"==typeof jQuery)throw new Error(\"Bootstrap's JavaScript requires jQuery\");!function(t){\"use strict\";var e=jQuery.fn.jquery.split(\" \")[0].split(\".\");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3this.$items.length-1||t<0))return this.sliding?this.$element.one(\"slid.bs.carousel\",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:\"\",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:\"\"})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:\"\",paddingRight:\"\"})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:\"hover focus\",title:\"\",delay:0,html:!1,container:!1,viewport:{selector:\"body\",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error(\"`selector` option must be specified when initializing \"+this.type+\" on the window.document object!\");for(var o=this.options.trigger.split(\" \"),n=o.length;n--;){var s=o[n];if(\"click\"==s)this.$element.on(\"click.\"+this.type,this.options.selector,g.proxy(this.toggle,this));else if(\"manual\"!=s){var a=\"hover\"==s?\"mouseenter\":\"focusin\",r=\"hover\"==s?\"mouseleave\":\"focusout\";this.$element.on(a+\".\"+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+\".\"+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&\"number\"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data(\"bs.\"+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e)),t instanceof g.Event&&(e.inState[\"focusin\"==t.type?\"focus\":\"hover\"]=!0),e.tip().hasClass(\"in\")||\"in\"==e.hoverState)e.hoverState=\"in\";else{if(clearTimeout(e.timeout),e.hoverState=\"in\",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){\"in\"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data(\"bs.\"+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e)),t instanceof g.Event&&(e.inState[\"focusout\"==t.type?\"focus\":\"hover\"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState=\"out\",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){\"out\"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr(\"id\",n),this.$element.attr(\"aria-describedby\",n),this.options.animation&&o.addClass(\"fade\");var s=\"function\"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\\s?auto?\\s?/i,r=a.test(s);r&&(s=s.replace(a,\"\")||\"top\"),o.detach().css({top:0,left:0,display:\"block\"}).addClass(s).data(\"bs.\"+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger(\"inserted.bs.\"+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s=\"bottom\"==s&&l.bottom+d>c.bottom?\"top\":\"top\"==s&&l.top-dc.width?\"left\":\"left\"==s&&l.left-ha.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr(\"data-original-title\")||(\"function\"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+\" `template` option must consist of exactly 1 top-level element!\");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data(\"bs.\"+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass(\"in\")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off(\".\"+t.type).removeData(\"bs.\"+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data(\"bs.tooltip\"),i=\"object\"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data(\"bs.tooltip\",e=new m(this,i)),\"string\"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){\"use strict\";var s=function(t,e){this.init(\"popover\",t,e)};if(!n.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");s.VERSION=\"3.4.1\",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'

'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),\"string\"===o&&(i=this.sanitizeHtml(i))),t.find(\".popover-title\").html(e),t.find(\".popover-content\").children().detach().end()[\"string\"===o?\"html\":\"append\"](i)}else t.find(\".popover-title\").text(e),t.find(\".popover-content\").children().detach().end().text(i);t.removeClass(\"fade top bottom left right in\"),t.find(\".popover-title\").html()||t.find(\".popover-title\").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr(\"data-content\")||(\"function\"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data(\"bs.popover\"),i=\"object\"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data(\"bs.popover\",e=new s(this,i)),\"string\"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){\"use strict\";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||\"\")+\" .nav li > a\",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on(\"scroll.bs.scrollspy\",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data(\"bs.scrollspy\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.scrollspy\",e=new n(this,i)),\"string\"==typeof o&&e[o]()})}n.VERSION=\"3.4.1\",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o=\"offset\",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o=\"position\",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data(\"target\")||t.attr(\"href\"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(\":visible\")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(n[t+1]===undefined||e .active\"),n=i&&r.support.transition&&(o.length&&o.hasClass(\"fade\")||!!e.find(\"> .fade\").length);function s(){o.removeClass(\"active\").find(\"> .dropdown-menu > .active\").removeClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!1),t.addClass(\"active\").find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),n?(t[0].offsetWidth,t.addClass(\"in\")):t.removeClass(\"fade\"),t.parent(\".dropdown-menu\").length&&t.closest(\"li.dropdown\").addClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),i&&i()}o.length&&n?o.one(\"bsTransitionEnd\",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass(\"in\")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),\"show\")};r(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"]',i).on(\"click.bs.tab.data-api\",'[data-toggle=\"pill\"]',i)}(jQuery),function(l){\"use strict\";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on(\"scroll.bs.affix.data-api\",l.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data(\"bs.affix\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.affix\",e=new h(this,i)),\"string\"==typeof o&&e[o]()})}h.VERSION=\"3.4.1\",h.RESET=\"affix affix-top affix-bottom\",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&\"top\"==this.affixed)return n1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return!(g+j>e)&&c.call(d,f,i)!=-1};b?b(String.prototype,\"includes\",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(a){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&\"[object RegExp]\"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j\":\">\",'\"':\""\",\"'\":\"'\",\"`\":\"`\"},h={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\",\"`\":\"`\"},i=function(a){var b=function(b){return a[b]},c=\"(?:\"+Object.keys(a).join(\"|\")+\")\",d=RegExp(c),e=RegExp(c,\"g\");return function(a){return a=null==a?\"\":\"\"+a,d.test(a)?a.replace(e,b):a}},j=i(g),k=i(h),l=function(b,c){d.useDefault||(a.valHooks.select.set=d._set,d.useDefault=!0),this.$element=a(b),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=c,null===this.options.title&&(this.options.title=this.$element.attr(\"title\"));var e=this.options.windowPadding;\"number\"==typeof e&&(this.options.windowPadding=[e,e,e,e]),this.val=l.prototype.val,this.render=l.prototype.render,this.refresh=l.prototype.refresh,this.setStyle=l.prototype.setStyle,this.selectAll=l.prototype.selectAll,this.deselectAll=l.prototype.deselectAll,this.destroy=l.prototype.destroy,this.remove=l.prototype.remove,this.show=l.prototype.show,this.hide=l.prototype.hide,this.init()};l.VERSION=\"1.12.4\",l.DEFAULTS={noneSelectedText:\"Nothing selected\",noneResultsText:\"No results matched {0}\",countSelectedText:function(a,b){return 1==a?\"{0} item selected\":\"{0} items selected\"},maxOptionsText:function(a,b){return[1==a?\"Limit reached ({n} item max)\":\"Limit reached ({n} items max)\",1==b?\"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:\"btn-default\",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},l.prototype={constructor:l,init:function(){var b=this,c=this.$element.attr(\"id\");this.$element.addClass(\"bs-select-hidden\"),this.liObj={},this.multiple=this.$element.prop(\"multiple\"),this.autofocus=this.$element.prop(\"autofocus\"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children(\"button\"),this.$menu=this.$newElement.children(\".dropdown-menu\"),this.$menuInner=this.$menu.children(\".inner\"),this.$searchbox=this.$menu.find(\"input\"),this.$element.removeClass(\"bs-select-hidden\"),this.options.dropdownAlignRight===!0&&this.$menu.addClass(\"dropdown-menu-right\"),\"undefined\"!=typeof c&&(this.$button.attr(\"data-id\",c),a('label[for=\"'+c+'\"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data(\"this\",this),this.$newElement.data(\"this\",this),this.options.mobile&&this.mobile(),this.$newElement.on({\"hide.bs.dropdown\":function(a){b.$menuInner.attr(\"aria-expanded\",!1),b.$element.trigger(\"hide.bs.select\",a)},\"hidden.bs.dropdown\":function(a){b.$element.trigger(\"hidden.bs.select\",a)},\"show.bs.dropdown\":function(a){b.$menuInner.attr(\"aria-expanded\",!0),b.$element.trigger(\"show.bs.select\",a)},\"shown.bs.dropdown\":function(a){b.$element.trigger(\"shown.bs.select\",a)}}),b.$element[0].hasAttribute(\"required\")&&this.$element.on(\"invalid\",function(){b.$button.addClass(\"bs-invalid\"),b.$element.on({\"focus.bs.select\":function(){b.$button.focus(),b.$element.off(\"focus.bs.select\")},\"shown.bs.select\":function(){b.$element.val(b.$element.val()).off(\"shown.bs.select\")},\"rendered.bs.select\":function(){this.validity.valid&&b.$button.removeClass(\"bs-invalid\"),b.$element.off(\"rendered.bs.select\")}}),b.$button.on(\"blur.bs.select\",function(){b.$element.focus().blur(),b.$button.off(\"blur.bs.select\")})}),setTimeout(function(){b.$element.trigger(\"loaded.bs.select\")})},createDropdown:function(){var b=this.multiple||this.options.showTick?\" show-tick\":\"\",c=this.$element.parent().hasClass(\"input-group\")?\" input-group-btn\":\"\",d=this.autofocus?\" autofocus\":\"\",e=this.options.header?'
'+this.options.header+\"
\":\"\",f=this.options.liveSearch?'
':\"\",g=this.multiple&&this.options.actionsBox?'
\":\"\",h=this.multiple&&this.options.doneButton?'
\":\"\",i='
'+e+f+g+'
    '+h+\"
    \";return a(i)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find(\"ul\")[0].innerHTML=b,a},reloadLi:function(){var a=this.createLi();this.$menuInner[0].innerHTML=a},createLi:function(){var c=this,d=[],e=0,f=document.createElement(\"option\"),g=-1,h=function(a,b,c,d){return\"\"+a+\"\"},i=function(d,e,f,g){return''+d+''};if(this.options.title&&!this.multiple&&(g--,!this.$element.find(\".bs-title-option\").length)){var k=this.$element[0];f.className=\"bs-title-option\",f.innerHTML=this.options.title,f.value=\"\",k.insertBefore(f,k.firstChild);var l=a(k.options[k.selectedIndex]);void 0===l.attr(\"selected\")&&void 0===this.$element.data(\"selected\")&&(f.selected=!0)}var m=this.$element.find(\"option\");return m.each(function(b){var f=a(this);if(g++,!f.hasClass(\"bs-title-option\")){var k,l=this.className||\"\",n=j(this.style.cssText),o=f.data(\"content\")?f.data(\"content\"):f.html(),p=f.data(\"tokens\")?f.data(\"tokens\"):null,q=\"undefined\"!=typeof f.data(\"subtext\")?''+f.data(\"subtext\")+\"\":\"\",r=\"undefined\"!=typeof f.data(\"icon\")?' ':\"\",s=f.parent(),t=\"OPTGROUP\"===s[0].tagName,u=t&&s[0].disabled,v=this.disabled||u;if(\"\"!==r&&v&&(r=\"\"+r+\"\"),c.options.hideDisabled&&(v&&!t||u))return k=f.data(\"prevHiddenIndex\"),f.next().data(\"prevHiddenIndex\",void 0!==k?k:b),void g--;if(f.data(\"content\")||(o=r+''+o+q+\"\"),t&&f.data(\"divider\")!==!0){if(c.options.hideDisabled&&v){if(void 0===s.data(\"allOptionsDisabled\")){var w=s.children();s.data(\"allOptionsDisabled\",w.filter(\":disabled\").length===w.length)}if(s.data(\"allOptionsDisabled\"))return void g--}var x=\" \"+s[0].className||\"\";if(0===f.index()){e+=1;var y=s[0].label,z=\"undefined\"!=typeof s.data(\"subtext\")?''+s.data(\"subtext\")+\"\":\"\",A=s.data(\"icon\")?' ':\"\";y=A+''+j(y)+z+\"\",0!==b&&d.length>0&&(g++,d.push(h(\"\",null,\"divider\",e+\"div\"))),g++,d.push(h(y,null,\"dropdown-header\"+x,e))}if(c.options.hideDisabled&&v)return void g--;d.push(h(i(o,\"opt \"+l+x,n,p),b,\"\",e))}else if(f.data(\"divider\")===!0)d.push(h(\"\",b,\"divider\"));else if(f.data(\"hidden\")===!0)k=f.data(\"prevHiddenIndex\"),f.next().data(\"prevHiddenIndex\",void 0!==k?k:b),d.push(h(i(o,l,n,p),b,\"hidden is-hidden\"));else{var B=this.previousElementSibling&&\"OPTGROUP\"===this.previousElementSibling.tagName;if(!B&&c.options.hideDisabled&&(k=f.data(\"prevHiddenIndex\"),void 0!==k)){var C=m.eq(k)[0].previousElementSibling;C&&\"OPTGROUP\"===C.tagName&&!C.disabled&&(B=!0)}B&&(g++,d.push(h(\"\",null,\"divider\",e+\"div\"))),d.push(h(i(o,l,n,p),b))}c.liObj[b]=g}}),this.multiple||0!==this.$element.find(\"option:selected\").length||this.options.title||this.$element.find(\"option\").eq(0).prop(\"selected\",!0).attr(\"selected\",\"selected\"),d.join(\"\")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find(\"li\")),this.$lis},render:function(b){var c,d=this,e=this.$element.find(\"option\");b!==!1&&e.each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||\"OPTGROUP\"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.togglePlaceholder(),this.tabIndex();var f=e.map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||\"OPTGROUP\"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data(\"icon\")&&d.options.showIcon?' ':\"\";return b=d.options.showSubtext&&c.data(\"subtext\")&&!d.multiple?' '+c.data(\"subtext\")+\"\":\"\",\"undefined\"!=typeof c.attr(\"title\")?c.attr(\"title\"):c.data(\"content\")&&d.options.showContent?c.data(\"content\").toString():e+c.html()+b}}).toArray(),g=this.multiple?f.join(this.options.multipleSeparator):f[0];if(this.multiple&&this.options.selectedTextFormat.indexOf(\"count\")>-1){var h=this.options.selectedTextFormat.split(\">\");if(h.length>1&&f.length>h[1]||1==h.length&&f.length>=2){c=this.options.hideDisabled?\", [disabled]\":\"\";var i=e.not('[data-divider=\"true\"], [data-hidden=\"true\"]'+c).length,j=\"function\"==typeof this.options.countSelectedText?this.options.countSelectedText(f.length,i):this.options.countSelectedText;g=j.replace(\"{0}\",f.length.toString()).replace(\"{1}\",i.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr(\"title\")),\"static\"==this.options.selectedTextFormat&&(g=this.options.title),g||(g=\"undefined\"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr(\"title\",k(a.trim(g.replace(/<[^>]*>?/g,\"\")))),this.$button.children(\".filter-option\").html(g),this.$element.trigger(\"rendered.bs.select\")},setStyle:function(a,b){this.$element.attr(\"class\")&&this.$newElement.addClass(this.$element.attr(\"class\").replace(/selectpicker|mobile-device|bs-select-hidden|validate\\[.*\\]/gi,\"\"));var c=a?a:this.options.style;\"add\"==b?this.$button.addClass(c):\"remove\"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement(\"div\"),d=document.createElement(\"div\"),e=document.createElement(\"ul\"),f=document.createElement(\"li\"),g=document.createElement(\"li\"),h=document.createElement(\"a\"),i=document.createElement(\"span\"),j=this.options.header&&this.$menu.find(\".popover-title\").length>0?this.$menu.find(\".popover-title\")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement(\"div\"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(\".bs-actionsbox\").length>0?this.$menu.find(\".bs-actionsbox\")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(\".bs-donebutton\").length>0?this.$menu.find(\".bs-donebutton\")[0].cloneNode(!0):null;if(i.className=\"text\",c.className=this.$menu[0].parentNode.className+\" open\",d.className=\"dropdown-menu open\",e.className=\"dropdown-menu inner\",f.className=\"divider\",i.appendChild(document.createTextNode(\"Inner text\")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement(\"input\");k.className=\"bs-searchbox\",n.className=\"form-control\",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u=\"function\"==typeof getComputedStyle&&getComputedStyle(d),v=u?null:a(d),w={vert:parseInt(u?u.paddingTop:v.css(\"paddingTop\"))+parseInt(u?u.paddingBottom:v.css(\"paddingBottom\"))+parseInt(u?u.borderTopWidth:v.css(\"borderTopWidth\"))+parseInt(u?u.borderBottomWidth:v.css(\"borderBottomWidth\")),horiz:parseInt(u?u.paddingLeft:v.css(\"paddingLeft\"))+parseInt(u?u.paddingRight:v.css(\"paddingRight\"))+parseInt(u?u.borderLeftWidth:v.css(\"borderLeftWidth\"))+parseInt(u?u.borderRightWidth:v.css(\"borderRightWidth\"))},x={vert:w.vert+parseInt(u?u.marginTop:v.css(\"marginTop\"))+parseInt(u?u.marginBottom:v.css(\"marginBottom\"))+2,horiz:w.horiz+parseInt(u?u.marginLeft:v.css(\"marginLeft\"))+parseInt(u?u.marginRight:v.css(\"marginRight\"))+2};document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css(\"padding-top\",0),this.options.size!==!1){var b,c,d,e,f,g,h,i,j=this,k=this.$menu,l=this.$menuInner,m=a(window),n=this.$newElement[0].offsetHeight,o=this.$newElement[0].offsetWidth,p=this.sizeInfo.liHeight,q=this.sizeInfo.headerHeight,r=this.sizeInfo.searchHeight,s=this.sizeInfo.actionsHeight,t=this.sizeInfo.doneButtonHeight,u=this.sizeInfo.dividerHeight,v=this.sizeInfo.menuPadding,w=this.sizeInfo.menuExtras,x=this.options.hideDisabled?\".disabled\":\"\",y=function(){var b,c=j.$newElement.offset(),d=a(j.options.container);j.options.container&&!d.is(\"body\")?(b=d.offset(),b.top+=parseInt(d.css(\"borderTopWidth\")),b.left+=parseInt(d.css(\"borderLeftWidth\"))):b={top:0,left:0};var e=j.options.windowPadding;f=c.top-b.top-m.scrollTop(),g=m.height()-f-n-b.top-e[2],h=c.left-b.left-m.scrollLeft(),i=m.width()-h-o-b.left-e[1],f-=e[0],h-=e[3]};if(y(),\"auto\"===this.options.size){var z=function(){var m,n=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},u=j.$menuInner[0].getElementsByTagName(\"li\"),x=Array.prototype.filter?Array.prototype.filter.call(u,n(\"hidden\",!1)):j.$lis.not(\".hidden\"),z=Array.prototype.filter?Array.prototype.filter.call(x,n(\"dropdown-header\",!0)):x.filter(\".dropdown-header\");y(),b=g-w.vert,c=i-w.horiz,j.options.container?(k.data(\"height\")||k.data(\"height\",k.height()),d=k.data(\"height\"),k.data(\"width\")||k.data(\"width\",k.width()),e=k.data(\"width\")):(d=k.height(),e=k.width()),j.options.dropupAuto&&j.$newElement.toggleClass(\"dropup\",f>g&&b-w.verti&&c-w.horiz3?3*p+w.vert-2:0,k.css({\"max-height\":b+\"px\",overflow:\"hidden\",\"min-height\":m+q+r+s+t+\"px\"}),l.css({\"max-height\":b-q-r-s-t-v.vert+\"px\",\"overflow-y\":\"auto\",\"min-height\":Math.max(m-v.vert,0)+\"px\"})};z(),this.$searchbox.off(\"input.getSize propertychange.getSize\").on(\"input.getSize propertychange.getSize\",z),m.off(\"resize.getSize scroll.getSize\").on(\"resize.getSize scroll.getSize\",z)}else if(this.options.size&&\"auto\"!=this.options.size&&this.$lis.not(x).length>this.options.size){var A=this.$lis.not(\".divider\").not(x).children().slice(0,this.options.size).last().parent().index(),B=this.$lis.slice(0,A+1).filter(\".divider\").length;b=p*this.options.size+B*u+v.vert,j.options.container?(k.data(\"height\")||k.data(\"height\",k.height()),d=k.data(\"height\")):d=k.height(),j.options.dropupAuto&&this.$newElement.toggleClass(\"dropup\",f>g&&b-w.vert');var b,c,d,e=this,f=a(this.options.container),g=function(a){e.$bsContainer.addClass(a.attr(\"class\").replace(/form-control|fit-width/gi,\"\")).toggleClass(\"dropup\",a.hasClass(\"dropup\")),b=a.offset(),f.is(\"body\")?c={top:0,left:0}:(c=f.offset(),c.top+=parseInt(f.css(\"borderTopWidth\"))-f.scrollTop(),c.left+=parseInt(f.css(\"borderLeftWidth\"))-f.scrollLeft()),d=a.hasClass(\"dropup\")?0:a[0].offsetHeight,e.$bsContainer.css({top:b.top-c.top+d,left:b.left-c.left,width:a[0].offsetWidth})};this.$button.on(\"click\",function(){var b=a(this);e.isDisabled()||(g(e.$newElement),e.$bsContainer.appendTo(e.options.container).toggleClass(\"open\",!b.hasClass(\"open\")).append(e.$menu))}),a(window).on(\"resize scroll\",function(){g(e.$newElement)}),this.$element.on(\"hide.bs.select\",function(){e.$menu.data(\"height\",e.$menu.height()),e.$bsContainer.detach()})},setSelected:function(a,b,c){c||(this.togglePlaceholder(),c=this.findLis().eq(this.liObj[a])),c.toggleClass(\"selected\",b).find(\"a\").attr(\"aria-selected\",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass(\"disabled\").children(\"a\").attr(\"href\",\"#\").attr(\"tabindex\",-1).attr(\"aria-disabled\",!0):c.removeClass(\"disabled\").children(\"a\").removeAttr(\"href\").attr(\"tabindex\",0).attr(\"aria-disabled\",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass(\"disabled\"),this.$button.addClass(\"disabled\").attr(\"tabindex\",-1).attr(\"aria-disabled\",!0)):(this.$button.hasClass(\"disabled\")&&(this.$newElement.removeClass(\"disabled\"),this.$button.removeClass(\"disabled\").attr(\"aria-disabled\",!1)),this.$button.attr(\"tabindex\")!=-1||this.$element.data(\"tabindex\")||this.$button.removeAttr(\"tabindex\")),this.$button.click(function(){return!a.isDisabled()})},togglePlaceholder:function(){var a=this.$element.val();this.$button.toggleClass(\"bs-placeholder\",null===a||\"\"===a||a.constructor===Array&&0===a.length)},tabIndex:function(){this.$element.data(\"tabindex\")!==this.$element.attr(\"tabindex\")&&this.$element.attr(\"tabindex\")!==-98&&\"-98\"!==this.$element.attr(\"tabindex\")&&(this.$element.data(\"tabindex\",this.$element.attr(\"tabindex\")),this.$button.attr(\"tabindex\",this.$element.data(\"tabindex\"))),this.$element.attr(\"tabindex\",-98)},clickListener:function(){var b=this,c=a(document);c.data(\"spaceSelect\",!1),this.$button.on(\"keyup\",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data(\"spaceSelect\")&&(a.preventDefault(),c.data(\"spaceSelect\",!1))}),this.$button.on(\"click\",function(){b.setSize()}),this.$element.on(\"shown.bs.select\",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if(\"number\"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(\".selected a\").focus()}),this.$menuInner.on(\"click\",\"li a\",function(c){var d=a(this),f=d.parent().data(\"originalIndex\"),g=b.$element.val(),h=b.$element.prop(\"selectedIndex\"),i=!0;if(b.multiple&&1!==b.options.maxOptions&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass(\"disabled\")){var j=b.$element.find(\"option\"),k=j.eq(f),l=k.prop(\"selected\"),m=k.parent(\"optgroup\"),n=b.options.maxOptions,o=m.data(\"maxOptions\")||!1;if(b.multiple){if(k.prop(\"selected\",!l),b.setSelected(f,!l),d.blur(),n!==!1||o!==!1){var p=n');t[2]&&(u=u.replace(\"{var}\",t[2][n>1?0:1]),v=v.replace(\"{var}\",t[2][o>1?0:1])),k.prop(\"selected\",!1),b.$menu.append(w),n&&p&&(w.append(a(\"
    \"+u+\"
    \")),i=!1,b.$element.trigger(\"maxReached.bs.select\")),o&&q&&(w.append(a(\"
    \"+v+\"
    \")),i=!1,b.$element.trigger(\"maxReachedGrp.bs.select\")),setTimeout(function(){b.setSelected(f,!1)},10),w.delay(750).fadeOut(300,function(){a(this).remove()})}}}else j.prop(\"selected\",!1),k.prop(\"selected\",!0),b.$menuInner.find(\".selected\").removeClass(\"selected\").find(\"a\").attr(\"aria-selected\",!1),b.setSelected(f,!0);!b.multiple||b.multiple&&1===b.options.maxOptions?b.$button.focus():b.options.liveSearch&&b.$searchbox.focus(),i&&(g!=b.$element.val()&&b.multiple||h!=b.$element.prop(\"selectedIndex\")&&!b.multiple)&&(e=[f,k.prop(\"selected\"),l],b.$element.triggerNative(\"change\"))}}),this.$menu.on(\"click\",\"li.disabled a, .popover-title, .popover-title :not(.close)\",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass(\"close\")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on(\"click\",\".divider, .dropdown-header\",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on(\"click\",\".popover-title .close\",function(){b.$button.click()}),this.$searchbox.on(\"click\",function(a){a.stopPropagation()}),this.$menu.on(\"click\",\".actions-btn\",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass(\"bs-select-all\")?b.selectAll():b.deselectAll()}),this.$element.change(function(){b.render(!1),b.$element.trigger(\"changed.bs.select\",e),e=null})},liveSearchListener:function(){var c=this,d=a('
  • ');this.$button.on(\"click.dropdown.data-api\",function(){c.$menuInner.find(\".active\").removeClass(\"active\"),c.$searchbox.val()&&(c.$searchbox.val(\"\"),c.$lis.not(\".is-hidden\").removeClass(\"hidden\"),d.parent().length&&d.remove()),c.multiple||c.$menuInner.find(\".selected\").addClass(\"active\"),setTimeout(function(){c.$searchbox.focus()},10)}),this.$searchbox.on(\"click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api\",function(a){a.stopPropagation()}),this.$searchbox.on(\"input propertychange\",function(){if(c.$lis.not(\".is-hidden\").removeClass(\"hidden\"),c.$lis.filter(\".active\").removeClass(\"active\"),d.remove(),c.$searchbox.val()){var e,f=c.$lis.not(\".is-hidden, .divider, .dropdown-header\");if(e=c.options.liveSearchNormalize?f.not(\":a\"+c._searchStyle()+'(\"'+b(c.$searchbox.val())+'\")'):f.not(\":\"+c._searchStyle()+'(\"'+c.$searchbox.val()+'\")'),e.length===f.length)d.html(c.options.noneResultsText.replace(\"{0}\",'\"'+j(c.$searchbox.val())+'\"')),c.$menuInner.append(d),c.$lis.addClass(\"hidden\");else{e.addClass(\"hidden\");var g,h=c.$lis.not(\".hidden\");h.each(function(b){var c=a(this);c.hasClass(\"divider\")?void 0===g?c.addClass(\"hidden\"):(g&&g.addClass(\"hidden\"),g=c):c.hasClass(\"dropdown-header\")&&h.eq(b+1).data(\"optgroup\")!==c.data(\"optgroup\")?c.addClass(\"hidden\"):g=null}),g&&g.addClass(\"hidden\"),f.not(\".hidden\").first().addClass(\"active\"),c.$menuInner.scrollTop(0)}}})},_searchStyle:function(){var a={begins:\"ibegins\",startsWith:\"ibegins\"};return a[this.options.liveSearchStyle]||\"icontains\"},val:function(a){return\"undefined\"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){if(this.multiple){\"undefined\"==typeof b&&(b=!0),this.findLis();var c=this.$element.find(\"option\"),d=this.$lis.not(\".divider, .dropdown-header, .disabled, .hidden\"),e=d.length,f=[];if(b){if(d.filter(\".selected\").length===d.length)return}else if(0===d.filter(\".selected\").length)return;d.toggleClass(\"selected\",b);for(var g=0;g=48&&b.keyCode<=57||b.keyCode>=96&&b.keyCode<=105||b.keyCode>=65&&b.keyCode<=90))return i.options.container?i.$button.trigger(\"click\"):(i.setSize(),i.$menu.parent().addClass(\"open\"),f=!0),void i.$searchbox.focus();if(i.options.liveSearch&&/(^9$|27)/.test(b.keyCode.toString(10))&&f&&(b.preventDefault(),b.stopPropagation(),i.$menuInner.click(),i.$button.focus()),/(38|40)/.test(b.keyCode.toString(10))){if(c=i.$lis.filter(j),!c.length)return;d=i.options.liveSearch?c.index(c.filter(\".active\")):c.index(c.find(\"a\").filter(\":focus\").parent()),e=i.$menuInner.data(\"prevIndex\"),38==b.keyCode?(!i.options.liveSearch&&d!=e||d==-1||d--,d<0&&(d+=c.length)):40==b.keyCode&&((i.options.liveSearch||d==e)&&d++,d%=c.length),i.$menuInner.data(\"prevIndex\",d),i.options.liveSearch?(b.preventDefault(),g.hasClass(\"dropdown-toggle\")||(c.removeClass(\"active\").eq(d).addClass(\"active\").children(\"a\").focus(),g.focus())):c.eq(d).children(\"a\").focus()}else if(!g.is(\"input\")){var l,m,n=[];c=i.$lis.filter(j),c.each(function(c){a.trim(a(this).children(\"a\").text().toLowerCase()).substring(0,1)==k[b.keyCode]&&n.push(c)}),l=a(document).data(\"keycount\"),l++,a(document).data(\"keycount\",l),m=a.trim(a(\":focus\").text().toLowerCase()).substring(0,1),m!=k[b.keyCode]?(l=1,a(document).data(\"keycount\",l)):l>=n.length&&(a(document).data(\"keycount\",0),l>n.length&&(l=1)),c.eq(n[l-1]).children(\"a\").focus()}if((/(13|32)/.test(b.keyCode.toString(10))||/(^9$)/.test(b.keyCode.toString(10))&&i.options.selectOnTab)&&f){if(/(32)/.test(b.keyCode.toString(10))||b.preventDefault(),i.options.liveSearch)/(32)/.test(b.keyCode.toString(10))||(i.$menuInner.find(\".active a\").click(),g.focus());else{var o=a(\":focus\");o.click(),o.focus(),b.preventDefault(),a(document).data(\"spaceSelect\",!0)}a(document).data(\"keycount\",0)}(/(^9$|27)/.test(b.keyCode.toString(10))&&f&&(i.multiple||i.options.liveSearch)||/(27)/.test(b.keyCode.toString(10))&&!f)&&(i.$menu.parent().removeClass(\"open\"),i.options.container&&i.$newElement.removeClass(\"open\"),i.$button.focus())},mobile:function(){this.$element.addClass(\"mobile-device\")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),\nthis.setWidth(),this.$lis&&this.$searchbox.trigger(\"propertychange\"),this.$element.trigger(\"refreshed.bs.select\")},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(\".bs.select\").removeData(\"selectpicker\").removeClass(\"bs-select-hidden selectpicker\")}};var m=a.fn.selectpicker;a.fn.selectpicker=c,a.fn.selectpicker.Constructor=l,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=m,this},a(document).data(\"keycount\",0).on(\"keydown.bs.select\",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=\"listbox\"], .bs-searchbox input',l.prototype.keydown).on(\"focusin.modal\",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=\"listbox\"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on(\"load.bs.select.data-api\",function(){a(\".selectpicker\").each(function(){var b=a(this);c.call(b,b.data())})})}(a)});\n//# sourceMappingURL=bootstrap-select.js.map","/*! \n * jQuery Bootgrid v1.3.1 - 09/11/2015\n * Copyright (c) 2014-2015 Rafael Staib (http://www.jquery-bootgrid.com)\n * Licensed under MIT http://www.opensource.org/licenses/MIT\n */\n!function(a,b,c){\"use strict\";function d(a){function b(b){return c.identifier&&b[c.identifier]===a[c.identifier]}var c=this;return this.rows.contains(b)?!1:(this.rows.push(a),!0)}function e(b){var c=this.footer?this.footer.find(b):a(),d=this.header?this.header.find(b):a();return a.merge(c,d)}function f(b){return b?a.extend({},this.cachedParams,{ctx:b}):this.cachedParams}function g(){var b={current:this.current,rowCount:this.rowCount,sort:this.sortDictionary,searchPhrase:this.searchPhrase},c=this.options.post;return c=a.isFunction(c)?c():c,this.options.requestHandler(a.extend(!0,b,c))}function h(b){return\".\"+a.trim(b).replace(/\\s+/gm,\".\")}function i(){var b=this.options.url;return a.isFunction(b)?b():b}function j(){this.element.trigger(\"initialize\"+H),m.call(this),this.selection=this.options.selection&&null!=this.identifier,o.call(this),q.call(this),C.call(this),A.call(this),r.call(this),n.call(this),this.element.trigger(\"initialized\"+H)}function k(a){this.options.highlightRows}function l(a){return a.visible}function m(){var b=this,c=this.element.find(\"thead > tr\").first(),d=!1;c.children().each(function(){var c=a(this),e=c.data(),f={id:e.columnId,identifier:null==b.identifier&&e.identifier||!1,converter:b.options.converters[e.converter||e.type]||b.options.converters.string,text:c.text(),align:e.align||\"left\",headerAlign:e.headerAlign||\"left\",cssClass:e.cssClass||\"\",headerCssClass:e.headerCssClass||\"\",formatter:b.options.formatters[e.formatter]||null,order:d||\"asc\"!==e.order&&\"desc\"!==e.order?null:e.order,searchable:!(e.searchable===!1),sortable:!(e.sortable===!1),visible:!(e.visible===!1),visibleInSelection:!(e.visibleInSelection===!1),width:a.isNumeric(e.width)?e.width+\"px\":\"string\"==typeof e.width?e.width:null};b.columns.push(f),null!=f.order&&(b.sortDictionary[f.id]=f.order),f.identifier&&(b.identifier=f.id,b.converter=f.converter),b.options.multiSort||null===f.order||(d=!0)})}function n(){function c(a){for(var b,c=new RegExp(e.searchPhrase,e.options.caseSensitive?\"g\":\"gi\"),d=0;d-1)return!0;return!1}function d(a,b){e.currentRows=a,p.call(e,b),e.options.keepSelection||(e.selectedRows=[]),y.call(e,a),t.call(e),v.call(e),e.element._bgBusyAria(!1).trigger(\"loaded\"+H)}var e=this;if(this.element._bgBusyAria(!0).trigger(\"load\"+H),F.call(this),this.options.ajax){var f=g.call(this),h=i.call(this);if(null==h||\"string\"!=typeof h||0===h.length)throw new Error(\"Url setting must be a none empty string or a function that returns one.\");this.xqr&&this.xqr.abort();var j={url:h,data:f,success:function(b){e.xqr=null,\"string\"==typeof b&&(b=a.parseJSON(b)),b=e.options.responseHandler(b),e.current=b.current,d(b.rows,b.total)},error:function(a,b,c){e.xqr=null,\"abort\"!==b&&(u.call(e),e.element._bgBusyAria(!1).trigger(\"loaded\"+H))}};j=a.extend(this.options.ajaxSettings,j),this.xqr=a.ajax(j)}else{var k=this.searchPhrase.length>0?this.rows.where(c):this.rows,l=k.length;-1!==this.rowCount&&(k=k.page(this.current,this.rowCount)),b.setTimeout(function(){d(k,l)},10)}}function o(){if(!this.options.ajax){var b=this,c=this.element.find(\"tbody > tr\");c.each(function(){var c=a(this),e=c.children(\"td\"),f={};a.each(b.columns,function(a,b){f[b.id]=b.converter.from(e.eq(a).text())}),d.call(b,f)}),p.call(this,this.rows.length),G.call(this)}}function p(a){this.total=a,this.totalPages=-1===this.rowCount?1:Math.ceil(this.total/this.rowCount)}function q(){var b=this.options.templates,c=this.element.parent().hasClass(this.options.css.responsiveTable)?this.element.parent():this.element;this.element.addClass(this.options.css.table),0===this.element.children(\"tbody\").length&&this.element.append(b.body),1&this.options.navigation&&(this.header=a(b.header.resolve(f.call(this,{id:this.element._bgId()+\"-header\"}))),c.before(this.header)),2&this.options.navigation&&(this.footer=a(b.footer.resolve(f.call(this,{id:this.element._bgId()+\"-footer\"}))),c.after(this.footer))}function r(){if(0!==this.options.navigation){var b=this.options.css,c=h(b.actions),d=e.call(this,c);if(d.length>0){var g=this,i=this.options.templates,j=a(i.actions.resolve(f.call(this)));if(this.options.ajax){var k=i.icon.resolve(f.call(this,{iconCss:b.iconRefresh})),l=a(i.actionButton.resolve(f.call(this,{content:k,text:this.options.labels.refresh}))).on(\"click\"+H,function(a){a.stopPropagation(),g.current=1,n.call(g)});j.append(l)}x.call(this,j),s.call(this,j),E.call(this,d,j)}}}function s(b){if(this.options.columnSelection&&this.columns.length>1){var c=this,d=this.options.css,e=this.options.templates,g=e.icon.resolve(f.call(this,{iconCss:d.iconColumns})),i=a(e.actionDropDown.resolve(f.call(this,{content:g}))),j=h(d.dropDownItem),k=h(d.dropDownItemCheckbox),m=h(d.dropDownMenuItems);a.each(this.columns,function(b,g){if(g.visibleInSelection){var o=a(e.actionDropDownCheckboxItem.resolve(f.call(c,{name:g.id,label:g.text,checked:g.visible}))).on(\"click\"+H,j,function(b){b.stopPropagation();var d=a(this),e=d.find(k);if(!e.prop(\"disabled\")){g.visible=e.prop(\"checked\");var f=c.columns.where(l).length>1;d.parents(m).find(j+\":has(\"+k+\":checked)\")._bgEnableAria(f).find(k)._bgEnableField(f),c.element.find(\"tbody\").empty(),C.call(c),n.call(c)}});i.find(h(d.dropDownMenuItems)).append(o)}}),b.append(i)}}function t(){if(0!==this.options.navigation){var b=h(this.options.css.infos),c=e.call(this,b);if(c.length>0){var d=this.current*this.rowCount,g=a(this.options.templates.infos.resolve(f.call(this,{end:0===this.total||-1===d||d>this.total?this.total:d,start:0===this.total?0:d-this.rowCount+1,total:this.total})));E.call(this,c,g)}}}function u(){var a=this.element.children(\"tbody\").first(),b=this.options.templates,c=this.columns.where(l).length;this.selection&&(c+=1),a.html(b.noResults.resolve(f.call(this,{columns:c})))}function v(){if(0!==this.options.navigation){var b=h(this.options.css.pagination),c=e.call(this,b)._bgShowAria(-1!==this.rowCount);if(-1!==this.rowCount&&c.length>0){var d=this.options.templates,g=this.current,i=this.totalPages,j=a(d.pagination.resolve(f.call(this))),k=i-g,l=-1*(this.options.padding-g),m=k>=this.options.padding?Math.max(l,1):Math.max(l-this.options.padding+k,1),n=2*this.options.padding+1,o=i>=n?n:i;w.call(this,j,\"first\",\"«\",\"first\")._bgEnableAria(g>1),w.call(this,j,\"prev\",\"<\",\"prev\")._bgEnableAria(g>1);for(var p=0;o>p;p++){var q=p+m;w.call(this,j,q,q,\"page-\"+q)._bgEnableAria()._bgSelectAria(q===g)}0===o&&w.call(this,j,1,1,\"page-1\")._bgEnableAria(!1)._bgSelectAria(),w.call(this,j,\"next\",\">\",\"next\")._bgEnableAria(i>g),w.call(this,j,\"last\",\"»\",\"last\")._bgEnableAria(i>g),E.call(this,c,j)}}}function w(b,c,d,e){var g=this,i=this.options.templates,j=this.options.css,k=f.call(this,{css:e,text:d,page:c}),l=a(i.paginationItem.resolve(k)).on(\"click\"+H,h(j.paginationButton),function(b){b.stopPropagation(),b.preventDefault();var c=a(this),d=c.parent();if(!d.hasClass(\"active\")&&!d.hasClass(\"disabled\")){var e={first:1,prev:g.current-1,next:g.current+1,last:g.totalPages},f=c.data(\"page\");g.current=e[f]||f,n.call(g)}c.trigger(\"blur\")});return b.append(l),l}function x(b){function c(a){return-1===a?d.options.labels.all:a}var d=this,e=this.options.rowCount;if(a.isArray(e)){var g=this.options.css,i=this.options.templates,j=a(i.actionDropDown.resolve(f.call(this,{content:c(this.rowCount)}))),k=h(g.dropDownMenu),l=h(g.dropDownMenuText),m=h(g.dropDownMenuItems),o=h(g.dropDownItemButton);a.each(e,function(b,e){var g=a(i.actionDropDownItem.resolve(f.call(d,{text:c(e),action:e})))._bgSelectAria(e===d.rowCount).on(\"click\"+H,o,function(b){b.preventDefault();var e=a(this),f=e.data(\"action\");f!==d.rowCount&&(d.current=1,d.rowCount=f,e.parents(m).children().each(function(){var b=a(this),c=b.find(o).data(\"action\");b._bgSelectAria(c===f)}),e.parents(k).find(l).text(c(f)),n.call(d))});j.find(m).append(g)}),b.append(j)}}function y(b){if(b.length>0){var c=this,d=this.options.css,e=this.options.templates,g=this.element.children(\"tbody\").first(),i=!0,j=\"\";a.each(b,function(b,g){var h=\"\",k=' data-row-id=\"'+(null==c.identifier?b:g[c.identifier])+'\"',l=\"\";if(c.selection){var m=-1!==a.inArray(g[c.identifier],c.selectedRows),n=e.select.resolve(f.call(c,{type:\"checkbox\",value:g[c.identifier],checked:m}));h+=e.cell.resolve(f.call(c,{content:n,css:d.selectCell})),i=i&&m,m&&(l+=d.selected,k+=' aria-selected=\"true\"')}var o=null!=g.status&&c.options.statusMapping[g.status];o&&(l+=o),a.each(c.columns,function(b,i){if(i.visible){var j=a.isFunction(i.formatter)?i.formatter.call(c,i,g):i.converter.to(g[i.id]),k=i.cssClass.length>0?\" \"+i.cssClass:\"\";h+=e.cell.resolve(f.call(c,{content:null==j||\"\"===j?\" \":j,css:(\"right\"===i.align?d.right:\"center\"===i.align?d.center:d.left)+k,style:null==i.width?\"\":\"width:\"+i.width+\";\"}))}}),l.length>0&&(k+=' class=\"'+l+'\"'),j+=e.row.resolve(f.call(c,{attr:k,cells:h}))}),c.element.find(\"thead \"+h(c.options.css.selectBox)).prop(\"checked\",i),g.html(j),z.call(this,g)}else u.call(this)}function z(b){var c=this,d=h(this.options.css.selectBox);this.selection&&b.off(\"click\"+H,d).on(\"click\"+H,d,function(b){b.stopPropagation();var d=a(this),e=c.converter.from(d.val());d.prop(\"checked\")?c.select([e]):c.deselect([e])}),b.off(\"click\"+H,\"> tr\").on(\"click\"+H,\"> tr\",function(b){b.stopPropagation();var d=a(this),e=null==c.identifier?d.data(\"row-id\"):c.converter.from(d.data(\"row-id\")+\"\"),f=null==c.identifier?c.currentRows[e]:c.currentRows.first(function(a){return a[c.identifier]===e});c.selection&&c.options.rowSelect&&(d.hasClass(c.options.css.selected)?c.deselect([e]):c.select([e])),c.element.trigger(\"click\"+H,[c.columns,f])})}function A(){if(0!==this.options.navigation){var c=this.options.css,d=h(c.search),g=e.call(this,d);if(g.length>0){var i=this,j=this.options.templates,k=null,l=\"\",m=h(c.searchField),n=a(j.search.resolve(f.call(this))),o=n.is(m)?n:n.find(m);o.on(\"keyup\"+H,function(c){c.stopPropagation();var d=a(this).val();(l!==d||13===c.which&&\"\"!==d)&&(l=d,(13===c.which||0===d.length||d.length>=i.options.searchSettings.characters)&&(b.clearTimeout(k),k=b.setTimeout(function(){B.call(i,d)},i.options.searchSettings.delay)))}),E.call(this,g,n)}}}function B(a){this.searchPhrase!==a&&(this.current=1,this.searchPhrase=a,n.call(this))}function C(){var b=this,c=this.element.find(\"thead > tr\"),d=this.options.css,e=this.options.templates,g=\"\",i=this.options.sorting;if(this.selection){var j=this.options.multiSelect?e.select.resolve(f.call(b,{type:\"checkbox\",value:\"all\"})):\"\";g+=e.rawHeaderCell.resolve(f.call(b,{content:j,css:d.selectCell}))}if(a.each(this.columns,function(a,c){if(c.visible){var h=b.sortDictionary[c.id],j=i&&h&&\"asc\"===h?d.iconUp:i&&h&&\"desc\"===h?d.iconDown:\"\",k=e.icon.resolve(f.call(b,{iconCss:j})),l=c.headerAlign,m=c.headerCssClass.length>0?\" \"+c.headerCssClass:\"\";g+=e.headerCell.resolve(f.call(b,{column:c,icon:k,sortable:i&&c.sortable&&d.sortable||\"\",css:(\"right\"===l?d.right:\"center\"===l?d.center:d.left)+m,style:null==c.width?\"\":\"width:\"+c.width+\";\"}))}}),c.html(g),i){var k=h(d.sortable);c.off(\"click\"+H,k).on(\"click\"+H,k,function(c){c.preventDefault(),D.call(b,a(this)),G.call(b),n.call(b)})}if(this.selection&&this.options.multiSelect){var l=h(d.selectBox);c.off(\"click\"+H,l).on(\"click\"+H,l,function(c){c.stopPropagation(),a(this).prop(\"checked\")?b.select():b.deselect()})}}function D(a){var b=this.options.css,c=h(b.icon),d=a.data(\"column-id\")||a.parents(\"th\").first().data(\"column-id\"),e=this.sortDictionary[d],f=a.find(c);if(this.options.multiSort||(a.parents(\"tr\").first().find(c).removeClass(b.iconDown+\" \"+b.iconUp),this.sortDictionary={}),e&&\"asc\"===e)this.sortDictionary[d]=\"desc\",f.removeClass(b.iconUp).addClass(b.iconDown);else if(e&&\"desc\"===e)if(this.options.multiSort){var g={};for(var i in this.sortDictionary)i!==d&&(g[i]=this.sortDictionary[i]);this.sortDictionary=g,f.removeClass(b.iconDown)}else this.sortDictionary[d]=\"asc\",f.removeClass(b.iconDown).addClass(b.iconUp);else this.sortDictionary[d]=\"asc\",f.addClass(b.iconUp)}function E(b,c){b.each(function(b,d){a(d).before(c.clone(!0)).remove()})}function F(){var a=this;b.setTimeout(function(){if(\"true\"===a.element._bgAria(\"busy\")){var b=a.options.templates,c=a.element.children(\"thead\").first(),d=a.element.children(\"tbody\").first(),e=d.find(\"tr > td\").first(),g=a.element.height()-c.height()-(e.height()+20),h=a.columns.where(l).length;a.selection&&(h+=1),d.html(b.loading.resolve(f.call(a,{columns:h}))),-1!==a.rowCount&&g>0&&d.find(\"tr > td\").css(\"padding\",\"20px 0 \"+g+\"px\")}},250)}function G(){function a(c,d,e){function f(a){return\"asc\"===h.order?a:-1*a}e=e||0;var g=e+1,h=b[e];return c[h.id]>d[h.id]?f(1):c[h.id]g?a(c,d,g):0}var b=[];if(!this.options.ajax){for(var c in this.sortDictionary)(this.options.multiSort||0===b.length)&&b.push({id:c,order:this.sortDictionary[c]});b.length>0&&this.rows.sort(a)}}var H=\".rs.jquery.bootgrid\",I=function(b,c){this.element=a(b),this.origin=this.element.clone(),this.options=a.extend(!0,{},I.defaults,this.element.data(),c);var d=this.options.rowCount=this.element.data().rowCount||c.rowCount||this.options.rowCount;this.columns=[],this.current=1,this.currentRows=[],this.identifier=null,this.selection=!1,this.converter=null,this.rowCount=a.isArray(d)?d[0]:d,this.rows=[],this.searchPhrase=\"\",this.selectedRows=[],this.sortDictionary={},this.total=0,this.totalPages=0,this.cachedParams={lbl:this.options.labels,css:this.options.css,ctx:{}},this.header=null,this.footer=null,this.xqr=null};if(I.defaults={navigation:3,padding:2,columnSelection:!0,rowCount:[10,25,50,-1],selection:!1,multiSelect:!1,rowSelect:!1,keepSelection:!1,highlightRows:!1,sorting:!0,multiSort:!1,searchSettings:{delay:250,characters:1},ajax:!1,ajaxSettings:{method:\"POST\"},post:{},url:\"\",caseSensitive:!0,requestHandler:function(a){return a},responseHandler:function(a){return a},converters:{numeric:{from:function(a){return+a},to:function(a){return a+\"\"}},string:{from:function(a){return a},to:function(a){return a}}},css:{actions:\"actions btn-group\",center:\"text-center\",columnHeaderAnchor:\"column-header-anchor\",columnHeaderText:\"text\",dropDownItem:\"dropdown-item\",dropDownItemButton:\"dropdown-item-button\",dropDownItemCheckbox:\"dropdown-item-checkbox\",dropDownMenu:\"dropdown btn-group\",dropDownMenuItems:\"dropdown-menu pull-right\",dropDownMenuText:\"dropdown-text\",footer:\"bootgrid-footer container-fluid\",header:\"bootgrid-header container-fluid\",icon:\"icon glyphicon\",iconColumns:\"glyphicon-th-list\",iconDown:\"glyphicon-chevron-down\",iconRefresh:\"glyphicon-refresh\",iconSearch:\"glyphicon-search\",iconUp:\"glyphicon-chevron-up\",infos:\"infos\",left:\"text-left\",pagination:\"pagination\",paginationButton:\"button\",responsiveTable:\"table-responsive\",right:\"text-right\",search:\"search form-group\",searchField:\"search-field form-control\",selectBox:\"select-box\",selectCell:\"select-cell\",selected:\"active\",sortable:\"sortable\",table:\"bootgrid-table table\"},formatters:{},labels:{all:\"All\",infos:\"Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries\",loading:\"Loading...\",noResults:\"No results found!\",refresh:\"Refresh\",search:\"Search\"},statusMapping:{0:\"success\",1:\"info\",2:\"warning\",3:\"danger\"},templates:{actionButton:'',actionDropDown:'
      ',actionDropDownItem:'
    • {{ctx.text}}
    • ',actionDropDownCheckboxItem:'
    • ',actions:'
      ',body:\"\",cell:'{{ctx.content}}',footer:'

      ',header:'

      ',headerCell:'{{ctx.column.text}}{{ctx.icon}}',icon:'',infos:'
      {{lbl.infos}}
      ',loading:'{{lbl.loading}}',noResults:'{{lbl.noResults}}',pagination:'
        ',paginationItem:'
      • {{ctx.text}}
      • ',rawHeaderCell:'{{ctx.content}}',row:\"{{ctx.cells}}\",search:'
        ',select:''}},I.prototype.append=function(a){if(this.options.ajax);else{for(var b=[],c=0;c0&&(this.options.multiSelect||1!==e.length);)if(c=b.pop(),-1===a.inArray(c,this.selectedRows))for(d=0;d0){var f=h(this.options.css.selectBox),g=this.selectedRows.length>=this.currentRows.length;for(d=0;!this.options.keepSelection&&g&&d tr \"+f+\":checked\").trigger(\"click\"+H),d=0;d tr[data-row-id=\"'+this.selectedRows[d]+'\"]').addClass(this.options.css.selected)._bgAria(\"selected\",\"true\").find(f).prop(\"checked\",!0);this.element.trigger(\"selected\"+H,[e])}}return this},I.prototype.deselect=function(b){if(this.selection){b=b||this.currentRows.propValues(this.identifier);for(var c,d,e,f=[];b.length>0;)if(c=b.pop(),e=a.inArray(c,this.selectedRows),-1!==e)for(d=0;d0){var g=h(this.options.css.selectBox);for(this.element.find(\"thead \"+g).prop(\"checked\",!1),d=0;d tr[data-row-id=\"'+f[d][this.identifier]+'\"]').removeClass(this.options.css.selected)._bgAria(\"selected\",\"false\").find(g).prop(\"checked\",!1);this.element.trigger(\"deselected\"+H,[f])}}return this},I.prototype.sort=function(b){var c=b?a.extend({},b):{};return c===this.sortDictionary?this:(this.sortDictionary=c,C.call(this),G.call(this),n.call(this),this)},I.prototype.getColumnSettings=function(){return a.merge([],this.columns)},I.prototype.getCurrentPage=function(){return this.current},I.prototype.getCurrentRows=function(){return a.merge([],this.currentRows)},I.prototype.getRowCount=function(){return this.rowCount},I.prototype.getSearchPhrase=function(){return this.searchPhrase},I.prototype.getSelectedRows=function(){return a.merge([],this.selectedRows)},I.prototype.getSortDictionary=function(){return a.extend({},this.sortDictionary)},I.prototype.getTotalPageCount=function(){return this.totalPages},I.prototype.getTotalRowCount=function(){return this.total},a.fn.extend({_bgAria:function(a,b){return b?this.attr(\"aria-\"+a,b):this.attr(\"aria-\"+a)},_bgBusyAria:function(a){return null==a||a?this._bgAria(\"busy\",\"true\"):this._bgAria(\"busy\",\"false\")},_bgRemoveAria:function(a){return this.removeAttr(\"aria-\"+a)},_bgEnableAria:function(a){return null==a||a?this.removeClass(\"disabled\")._bgAria(\"disabled\",\"false\"):this.addClass(\"disabled\")._bgAria(\"disabled\",\"true\")},_bgEnableField:function(a){return null==a||a?this.removeAttr(\"disabled\"):this.attr(\"disabled\",\"disable\")},_bgShowAria:function(a){return null==a||a?this.show()._bgAria(\"hidden\",\"false\"):this.hide()._bgAria(\"hidden\",\"true\")},_bgSelectAria:function(a){return null==a||a?this.addClass(\"active\")._bgAria(\"selected\",\"true\"):this.removeClass(\"active\")._bgAria(\"selected\",\"false\")},_bgId:function(a){return a?this.attr(\"id\",a):this.attr(\"id\")}}),!String.prototype.resolve){var J={checked:function(a){return\"boolean\"==typeof a?a?'checked=\"checked\"':\"\":a}};String.prototype.resolve=function(b,c){var d=this;return a.each(b,function(b,e){if(null!=e&&\"function\"!=typeof e)if(\"object\"==typeof e){var f=c?a.extend([],c):[];f.push(b),d=d.resolve(e,f)+\"\"}else{J&&J[b]&&\"function\"==typeof J[b]&&(e=J[b](e)),b=c?c.join(\".\")+\".\"+b:b;var g=new RegExp(\"\\\\{\\\\{\"+b+\"\\\\}\\\\}\",\"gm\");d=d.replace(g,e.replace?e.replace(/\\$/gi,\"$\"):e)}}),d}}Array.prototype.first||(Array.prototype.first=function(a){for(var b=0;bc?this.length>d?this.slice(c,d):this.slice(c):[]}),Array.prototype.where||(Array.prototype.where=function(a){for(var b=[],c=0;c\" +\n \"\" +\n \"\",\n header:\n \"\",\n footer:\n \"\",\n closeButton:\n \"\",\n form:\n \"
        \",\n inputs: {\n text:\n \"\",\n textarea:\n \"\",\n email:\n \"\",\n select:\n \"\",\n checkbox:\n \"
        \",\n date:\n \"\",\n time:\n \"\",\n number:\n \"\",\n password:\n \"\"\n }\n };\n\n var defaults = {\n // default language\n locale: \"en\",\n // show backdrop or not. Default to static so user has to interact with dialog\n backdrop: \"static\",\n // animate the modal in/out\n animate: true,\n // additional class string applied to the top level dialog\n className: null,\n // whether or not to include a close button\n closeButton: true,\n // show the dialog immediately by default\n show: true,\n // dialog container\n container: \"body\"\n };\n\n // our public object; augmented after our private API\n var exports = {};\n\n /**\n * @private\n */\n function _t(key) {\n var locale = locales[defaults.locale];\n return locale ? locale[key] : locales.en[key];\n }\n\n function processCallback(e, dialog, callback) {\n e.stopPropagation();\n e.preventDefault();\n\n // by default we assume a callback will get rid of the dialog,\n // although it is given the opportunity to override this\n\n // so, if the callback can be invoked and it *explicitly returns false*\n // then we'll set a flag to keep the dialog active...\n var preserveDialog = $.isFunction(callback) && callback.call(dialog, e) === false;\n\n // ... otherwise we'll bin it\n if (!preserveDialog) {\n dialog.modal(\"hide\");\n }\n }\n\n function getKeyLength(obj) {\n // @TODO defer to Object.keys(x).length if available?\n var k, t = 0;\n for (k in obj) {\n t ++;\n }\n return t;\n }\n\n function each(collection, iterator) {\n var index = 0;\n $.each(collection, function(key, value) {\n iterator(key, value, index++);\n });\n }\n\n function sanitize(options) {\n var buttons;\n var total;\n\n if (typeof options !== \"object\") {\n throw new Error(\"Please supply an object of options\");\n }\n\n if (!options.message) {\n throw new Error(\"Please specify a message\");\n }\n\n // make sure any supplied options take precedence over defaults\n options = $.extend({}, defaults, options);\n\n if (!options.buttons) {\n options.buttons = {};\n }\n\n buttons = options.buttons;\n\n total = getKeyLength(buttons);\n\n each(buttons, function(key, button, index) {\n\n if ($.isFunction(button)) {\n // short form, assume value is our callback. Since button\n // isn't an object it isn't a reference either so re-assign it\n button = buttons[key] = {\n callback: button\n };\n }\n\n // before any further checks make sure by now button is the correct type\n if ($.type(button) !== \"object\") {\n throw new Error(\"button with key \" + key + \" must be an object\");\n }\n\n if (!button.label) {\n // the lack of an explicit label means we'll assume the key is good enough\n button.label = key;\n }\n\n if (!button.className) {\n if (total <= 2 && index === total-1) {\n // always add a primary to the main option in a two-button dialog\n button.className = \"btn-primary\";\n } else {\n button.className = \"btn-default\";\n }\n }\n });\n\n return options;\n }\n\n /**\n * map a flexible set of arguments into a single returned object\n * if args.length is already one just return it, otherwise\n * use the properties argument to map the unnamed args to\n * object properties\n * so in the latter case:\n * mapArguments([\"foo\", $.noop], [\"message\", \"callback\"])\n * -> { message: \"foo\", callback: $.noop }\n */\n function mapArguments(args, properties) {\n var argn = args.length;\n var options = {};\n\n if (argn < 1 || argn > 2) {\n throw new Error(\"Invalid argument length\");\n }\n\n if (argn === 2 || typeof args[0] === \"string\") {\n options[properties[0]] = args[0];\n options[properties[1]] = args[1];\n } else {\n options = args[0];\n }\n\n return options;\n }\n\n /**\n * merge a set of default dialog options with user supplied arguments\n */\n function mergeArguments(defaults, args, properties) {\n return $.extend(\n // deep merge\n true,\n // ensure the target is an empty, unreferenced object\n {},\n // the base options object for this type of dialog (often just buttons)\n defaults,\n // args could be an object or array; if it's an array properties will\n // map it to a proper options object\n mapArguments(\n args,\n properties\n )\n );\n }\n\n /**\n * this entry-level method makes heavy use of composition to take a simple\n * range of inputs and return valid options suitable for passing to bootbox.dialog\n */\n function mergeDialogOptions(className, labels, properties, args) {\n // build up a base set of dialog properties\n var baseOptions = {\n className: \"bootbox-\" + className,\n buttons: createLabels.apply(null, labels)\n };\n\n // ensure the buttons properties generated, *after* merging\n // with user args are still valid against the supplied labels\n return validateButtons(\n // merge the generated base properties with user supplied arguments\n mergeArguments(\n baseOptions,\n args,\n // if args.length > 1, properties specify how each arg maps to an object key\n properties\n ),\n labels\n );\n }\n\n /**\n * from a given list of arguments return a suitable object of button labels\n * all this does is normalise the given labels and translate them where possible\n * e.g. \"ok\", \"confirm\" -> { ok: \"OK, cancel: \"Annuleren\" }\n */\n function createLabels() {\n var buttons = {};\n\n for (var i = 0, j = arguments.length; i < j; i++) {\n var argument = arguments[i];\n var key = argument.toLowerCase();\n var value = argument.toUpperCase();\n\n buttons[key] = {\n label: _t(value)\n };\n }\n\n return buttons;\n }\n\n function validateButtons(options, buttons) {\n var allowedButtons = {};\n each(buttons, function(key, value) {\n allowedButtons[value] = true;\n });\n\n each(options.buttons, function(key) {\n if (allowedButtons[key] === undefined) {\n throw new Error(\"button key \" + key + \" is not allowed (options are \" + buttons.join(\"\\n\") + \")\");\n }\n });\n\n return options;\n }\n\n exports.alert = function() {\n var options;\n\n options = mergeDialogOptions(\"alert\", [\"ok\"], [\"message\", \"callback\"], arguments);\n\n if (options.callback && !$.isFunction(options.callback)) {\n throw new Error(\"alert requires callback property to be a function when provided\");\n }\n\n /**\n * overrides\n */\n options.buttons.ok.callback = options.onEscape = function() {\n if ($.isFunction(options.callback)) {\n return options.callback.call(this);\n }\n return true;\n };\n\n return exports.dialog(options);\n };\n\n exports.confirm = function() {\n var options;\n\n options = mergeDialogOptions(\"confirm\", [\"cancel\", \"confirm\"], [\"message\", \"callback\"], arguments);\n\n /**\n * overrides; undo anything the user tried to set they shouldn't have\n */\n options.buttons.cancel.callback = options.onEscape = function() {\n return options.callback.call(this, false);\n };\n\n options.buttons.confirm.callback = function() {\n return options.callback.call(this, true);\n };\n\n // confirm specific validation\n if (!$.isFunction(options.callback)) {\n throw new Error(\"confirm requires a callback\");\n }\n\n return exports.dialog(options);\n };\n\n exports.prompt = function() {\n var options;\n var defaults;\n var dialog;\n var form;\n var input;\n var shouldShow;\n var inputOptions;\n\n // we have to create our form first otherwise\n // its value is undefined when gearing up our options\n // @TODO this could be solved by allowing message to\n // be a function instead...\n form = $(templates.form);\n\n // prompt defaults are more complex than others in that\n // users can override more defaults\n // @TODO I don't like that prompt has to do a lot of heavy\n // lifting which mergeDialogOptions can *almost* support already\n // just because of 'value' and 'inputType' - can we refactor?\n defaults = {\n className: \"bootbox-prompt\",\n buttons: createLabels(\"cancel\", \"confirm\"),\n value: \"\",\n inputType: \"text\"\n };\n\n options = validateButtons(\n mergeArguments(defaults, arguments, [\"title\", \"callback\"]),\n [\"cancel\", \"confirm\"]\n );\n\n // capture the user's show value; we always set this to false before\n // spawning the dialog to give us a chance to attach some handlers to\n // it, but we need to make sure we respect a preference not to show it\n shouldShow = (options.show === undefined) ? true : options.show;\n\n /**\n * overrides; undo anything the user tried to set they shouldn't have\n */\n options.message = form;\n\n options.buttons.cancel.callback = options.onEscape = function() {\n return options.callback.call(this, null);\n };\n\n options.buttons.confirm.callback = function() {\n var value;\n\n switch (options.inputType) {\n case \"text\":\n case \"textarea\":\n case \"email\":\n case \"select\":\n case \"date\":\n case \"time\":\n case \"number\":\n case \"password\":\n value = input.val();\n break;\n\n case \"checkbox\":\n var checkedItems = input.find(\"input:checked\");\n\n // we assume that checkboxes are always multiple,\n // hence we default to an empty array\n value = [];\n\n each(checkedItems, function(_, item) {\n value.push($(item).val());\n });\n break;\n }\n\n return options.callback.call(this, value);\n };\n\n options.show = false;\n\n // prompt specific validation\n if (!options.title) {\n throw new Error(\"prompt requires a title\");\n }\n\n if (!$.isFunction(options.callback)) {\n throw new Error(\"prompt requires a callback\");\n }\n\n if (!templates.inputs[options.inputType]) {\n throw new Error(\"invalid prompt type\");\n }\n\n // create the input based on the supplied type\n input = $(templates.inputs[options.inputType]);\n\n switch (options.inputType) {\n case \"text\":\n case \"textarea\":\n case \"email\":\n case \"date\":\n case \"time\":\n case \"number\":\n case \"password\":\n input.val(options.value);\n break;\n\n case \"select\":\n var groups = {};\n inputOptions = options.inputOptions || [];\n\n if (!$.isArray(inputOptions)) {\n throw new Error(\"Please pass an array of input options\");\n }\n\n if (!inputOptions.length) {\n throw new Error(\"prompt with select requires options\");\n }\n\n each(inputOptions, function(_, option) {\n\n // assume the element to attach to is the input...\n var elem = input;\n\n if (option.value === undefined || option.text === undefined) {\n throw new Error(\"given options in wrong format\");\n }\n\n // ... but override that element if this option sits in a group\n\n if (option.group) {\n // initialise group if necessary\n if (!groups[option.group]) {\n groups[option.group] = $(\"\").attr(\"label\", option.group);\n }\n\n elem = groups[option.group];\n }\n\n elem.append(\"\");\n });\n\n each(groups, function(_, group) {\n input.append(group);\n });\n\n // safe to set a select's value as per a normal input\n input.val(options.value);\n break;\n\n case \"checkbox\":\n var values = $.isArray(options.value) ? options.value : [options.value];\n inputOptions = options.inputOptions || [];\n\n if (!inputOptions.length) {\n throw new Error(\"prompt with checkbox requires options\");\n }\n\n if (!inputOptions[0].value || !inputOptions[0].text) {\n throw new Error(\"given options in wrong format\");\n }\n\n // checkboxes have to nest within a containing element, so\n // they break the rules a bit and we end up re-assigning\n // our 'input' element to this container instead\n input = $(\"
        \");\n\n each(inputOptions, function(_, option) {\n var checkbox = $(templates.inputs[options.inputType]);\n\n checkbox.find(\"input\").attr(\"value\", option.value);\n checkbox.find(\"label\").append(option.text);\n\n // we've ensured values is an array so we can always iterate over it\n each(values, function(_, value) {\n if (value === option.value) {\n checkbox.find(\"input\").prop(\"checked\", true);\n }\n });\n\n input.append(checkbox);\n });\n break;\n }\n\n // @TODO provide an attributes option instead\n // and simply map that as keys: vals\n if (options.placeholder) {\n input.attr(\"placeholder\", options.placeholder);\n }\n\n if (options.pattern) {\n input.attr(\"pattern\", options.pattern);\n }\n\n if (options.maxlength) {\n input.attr(\"maxlength\", options.maxlength);\n }\n\n // now place it in our form\n form.append(input);\n\n form.on(\"submit\", function(e) {\n e.preventDefault();\n // Fix for SammyJS (or similar JS routing library) hijacking the form post.\n e.stopPropagation();\n // @TODO can we actually click *the* button object instead?\n // e.g. buttons.confirm.click() or similar\n dialog.find(\".btn-primary\").click();\n });\n\n dialog = exports.dialog(options);\n\n // clear the existing handler focusing the submit button...\n dialog.off(\"shown.bs.modal\");\n\n // ...and replace it with one focusing our input, if possible\n dialog.on(\"shown.bs.modal\", function() {\n // need the closure here since input isn't\n // an object otherwise\n input.focus();\n });\n\n if (shouldShow === true) {\n dialog.modal(\"show\");\n }\n\n return dialog;\n };\n\n exports.dialog = function(options) {\n options = sanitize(options);\n\n var dialog = $(templates.dialog);\n var innerDialog = dialog.find(\".modal-dialog\");\n var body = dialog.find(\".modal-body\");\n var buttons = options.buttons;\n var buttonStr = \"\";\n var callbacks = {\n onEscape: options.onEscape\n };\n\n if ($.fn.modal === undefined) {\n throw new Error(\n \"$.fn.modal is not defined; please double check you have included \" +\n \"the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ \" +\n \"for more details.\"\n );\n }\n\n each(buttons, function(key, button) {\n\n // @TODO I don't like this string appending to itself; bit dirty. Needs reworking\n // can we just build up button elements instead? slower but neater. Then button\n // can just become a template too\n buttonStr += \"\";\n callbacks[key] = button.callback;\n });\n\n body.find(\".bootbox-body\").html(options.message);\n\n if (options.animate === true) {\n dialog.addClass(\"fade\");\n }\n\n if (options.className) {\n dialog.addClass(options.className);\n }\n\n if (options.size === \"large\") {\n innerDialog.addClass(\"modal-lg\");\n } else if (options.size === \"small\") {\n innerDialog.addClass(\"modal-sm\");\n }\n\n if (options.title) {\n body.before(templates.header);\n }\n\n if (options.closeButton) {\n var closeButton = $(templates.closeButton);\n\n if (options.title) {\n dialog.find(\".modal-header\").prepend(closeButton);\n } else {\n closeButton.css(\"margin-top\", \"-10px\").prependTo(body);\n }\n }\n\n if (options.title) {\n dialog.find(\".modal-title\").html(options.title);\n }\n\n if (buttonStr.length) {\n body.after(templates.footer);\n dialog.find(\".modal-footer\").html(buttonStr);\n }\n\n\n /**\n * Bootstrap event listeners; used handle extra\n * setup & teardown required after the underlying\n * modal has performed certain actions\n */\n\n dialog.on(\"hidden.bs.modal\", function(e) {\n // ensure we don't accidentally intercept hidden events triggered\n // by children of the current dialog. We shouldn't anymore now BS\n // namespaces its events; but still worth doing\n if (e.target === this) {\n dialog.remove();\n }\n });\n\n /*\n dialog.on(\"show.bs.modal\", function() {\n // sadly this doesn't work; show is called *just* before\n // the backdrop is added so we'd need a setTimeout hack or\n // otherwise... leaving in as would be nice\n if (options.backdrop) {\n dialog.next(\".modal-backdrop\").addClass(\"bootbox-backdrop\");\n }\n });\n */\n\n dialog.on(\"shown.bs.modal\", function() {\n dialog.find(\".btn-primary:first\").focus();\n });\n\n /**\n * Bootbox event listeners; experimental and may not last\n * just an attempt to decouple some behaviours from their\n * respective triggers\n */\n\n if (options.backdrop !== \"static\") {\n // A boolean true/false according to the Bootstrap docs\n // should show a dialog the user can dismiss by clicking on\n // the background.\n // We always only ever pass static/false to the actual\n // $.modal function because with `true` we can't trap\n // this event (the .modal-backdrop swallows it)\n // However, we still want to sort of respect true\n // and invoke the escape mechanism instead\n dialog.on(\"click.dismiss.bs.modal\", function(e) {\n // @NOTE: the target varies in >= 3.3.x releases since the modal backdrop\n // moved *inside* the outer dialog rather than *alongside* it\n if (dialog.children(\".modal-backdrop\").length) {\n e.currentTarget = dialog.children(\".modal-backdrop\").get(0);\n }\n\n if (e.target !== e.currentTarget) {\n return;\n }\n\n dialog.trigger(\"escape.close.bb\");\n });\n }\n\n dialog.on(\"escape.close.bb\", function(e) {\n if (callbacks.onEscape) {\n processCallback(e, dialog, callbacks.onEscape);\n }\n });\n\n /**\n * Standard jQuery event listeners; used to handle user\n * interaction with our dialog\n */\n\n dialog.on(\"click\", \".modal-footer button\", function(e) {\n var callbackKey = $(this).data(\"bb-handler\");\n\n processCallback(e, dialog, callbacks[callbackKey]);\n });\n\n dialog.on(\"click\", \".bootbox-close-button\", function(e) {\n // onEscape might be falsy but that's fine; the fact is\n // if the user has managed to click the close button we\n // have to close the dialog, callback or not\n processCallback(e, dialog, callbacks.onEscape);\n });\n\n dialog.on(\"keyup\", function(e) {\n if (e.which === 27) {\n dialog.trigger(\"escape.close.bb\");\n }\n });\n\n // the remainder of this method simply deals with adding our\n // dialogent to the DOM, augmenting it with Bootstrap's modal\n // functionality and then giving the resulting object back\n // to our caller\n\n $(options.container).append(dialog);\n\n dialog.modal({\n backdrop: options.backdrop ? \"static\": false,\n keyboard: false,\n show: false\n });\n\n if (options.show) {\n dialog.modal(\"show\");\n }\n\n // @TODO should we return the raw element here or should\n // we wrap it in an object on which we can expose some neater\n // methods, e.g. var d = bootbox.alert(); d.hide(); instead\n // of d.modal(\"hide\");\n\n /*\n function BBDialog(elem) {\n this.elem = elem;\n }\n\n BBDialog.prototype = {\n hide: function() {\n return this.elem.modal(\"hide\");\n },\n show: function() {\n return this.elem.modal(\"show\");\n }\n };\n */\n\n return dialog;\n\n };\n\n exports.setDefaults = function() {\n var values = {};\n\n if (arguments.length === 2) {\n // allow passing of single key/value...\n values[arguments[0]] = arguments[1];\n } else {\n // ... and as an object too\n values = arguments[0];\n }\n\n $.extend(defaults, values);\n };\n\n exports.hideAll = function() {\n $(\".bootbox\").modal(\"hide\");\n\n return exports;\n };\n\n\n /**\n * standard locales. Please add more according to ISO 639-1 standard. Multiple language variants are\n * unlikely to be required. If this gets too large it can be split out into separate JS files.\n */\n var locales = {\n bg_BG : {\n OK : \"Ок\",\n CANCEL : \"Отказ\",\n CONFIRM : \"Потвърждавам\"\n },\n br : {\n OK : \"OK\",\n CANCEL : \"Cancelar\",\n CONFIRM : \"Sim\"\n },\n cs : {\n OK : \"OK\",\n CANCEL : \"Zrušit\",\n CONFIRM : \"Potvrdit\"\n },\n da : {\n OK : \"OK\",\n CANCEL : \"Annuller\",\n CONFIRM : \"Accepter\"\n },\n de : {\n OK : \"OK\",\n CANCEL : \"Abbrechen\",\n CONFIRM : \"Akzeptieren\"\n },\n el : {\n OK : \"Εντάξει\",\n CANCEL : \"Ακύρωση\",\n CONFIRM : \"Επιβεβαίωση\"\n },\n en : {\n OK : \"OK\",\n CANCEL : \"Cancel\",\n CONFIRM : \"OK\"\n },\n es : {\n OK : \"OK\",\n CANCEL : \"Cancelar\",\n CONFIRM : \"Aceptar\"\n },\n et : {\n OK : \"OK\",\n CANCEL : \"Katkesta\",\n CONFIRM : \"OK\"\n },\n fa : {\n OK : \"قبول\",\n CANCEL : \"لغو\",\n CONFIRM : \"تایید\"\n },\n fi : {\n OK : \"OK\",\n CANCEL : \"Peruuta\",\n CONFIRM : \"OK\"\n },\n fr : {\n OK : \"OK\",\n CANCEL : \"Annuler\",\n CONFIRM : \"D'accord\"\n },\n he : {\n OK : \"אישור\",\n CANCEL : \"ביטול\",\n CONFIRM : \"אישור\"\n },\n hu : {\n OK : \"OK\",\n CANCEL : \"Mégsem\",\n CONFIRM : \"Megerősít\"\n },\n hr : {\n OK : \"OK\",\n CANCEL : \"Odustani\",\n CONFIRM : \"Potvrdi\"\n },\n id : {\n OK : \"OK\",\n CANCEL : \"Batal\",\n CONFIRM : \"OK\"\n },\n it : {\n OK : \"OK\",\n CANCEL : \"Annulla\",\n CONFIRM : \"Conferma\"\n },\n ja : {\n OK : \"OK\",\n CANCEL : \"キャンセル\",\n CONFIRM : \"確認\"\n },\n lt : {\n OK : \"Gerai\",\n CANCEL : \"Atšaukti\",\n CONFIRM : \"Patvirtinti\"\n },\n lv : {\n OK : \"Labi\",\n CANCEL : \"Atcelt\",\n CONFIRM : \"Apstiprināt\"\n },\n nl : {\n OK : \"OK\",\n CANCEL : \"Annuleren\",\n CONFIRM : \"Accepteren\"\n },\n no : {\n OK : \"OK\",\n CANCEL : \"Avbryt\",\n CONFIRM : \"OK\"\n },\n pl : {\n OK : \"OK\",\n CANCEL : \"Anuluj\",\n CONFIRM : \"Potwierdź\"\n },\n pt : {\n OK : \"OK\",\n CANCEL : \"Cancelar\",\n CONFIRM : \"Confirmar\"\n },\n ru : {\n OK : \"OK\",\n CANCEL : \"Отмена\",\n CONFIRM : \"Применить\"\n },\n sq : {\n OK : \"OK\",\n CANCEL : \"Anulo\",\n CONFIRM : \"Prano\"\n },\n sv : {\n OK : \"OK\",\n CANCEL : \"Avbryt\",\n CONFIRM : \"OK\"\n },\n th : {\n OK : \"ตกลง\",\n CANCEL : \"ยกเลิก\",\n CONFIRM : \"ยืนยัน\"\n },\n tr : {\n OK : \"Tamam\",\n CANCEL : \"İptal\",\n CONFIRM : \"Onayla\"\n },\n zh_CN : {\n OK : \"OK\",\n CANCEL : \"取消\",\n CONFIRM : \"确认\"\n },\n zh_TW : {\n OK : \"OK\",\n CANCEL : \"取消\",\n CONFIRM : \"確認\"\n }\n };\n\n exports.addLocale = function(name, values) {\n $.each([\"OK\", \"CANCEL\", \"CONFIRM\"], function(_, v) {\n if (!values[v]) {\n throw new Error(\"Please supply a translation for '\" + v + \"'\");\n }\n });\n\n locales[name] = {\n OK: values.OK,\n CANCEL: values.CANCEL,\n CONFIRM: values.CONFIRM\n };\n\n return exports;\n };\n\n exports.removeLocale = function(name) {\n delete locales[name];\n\n return exports;\n };\n\n exports.setLocale = function(name) {\n return exports.setDefaults(\"locale\", name);\n };\n\n exports.init = function(_$) {\n return init(_$ || $);\n };\n\n return exports;\n}));\n"]}