@quartic/bokehjs
Version:
Interactive, novel data visualization
2 lines • 377 kB
JavaScript
!function(){var define=void 0;return function(e,t,i){if(null==Bokeh)throw new Error("Cannot find Bokeh. You have to load it prior to loading plugins.");for(var n in e)Bokeh.require.modules[n]=e[n];for(var o=0;o<i.length;o++){var r=Bokeh.require(i[0]);Bokeh.Models.register_models(r.models);for(var n in r)"models"!==n&&(Bokeh[n]=r[n])}}({"models/widgets/abstract_button":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("core/properties"),s=e("core/build_views"),a=e("./widget"),l=e("./button_template");i.AbstractButtonView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={click:"change_input"},t.prototype.template=l["default"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.icon_views={},this.listenTo(this.model,"change",this.render),this.render()},t.prototype.render=function(){var e,i,n,r,a,l,u;if(t.__super__.render.call(this),n=this.model.icon,null!=n){s.build_views(this.icon_views,[n]),a=this.icon_views;for(r in a)o.call(a,r)&&(u=a[r],null!=(l=u.el.parentNode)&&l.removeChild(u.el))}return this.$el.empty(),i=this.template(this.model.attributes),this.el.appendChild(i),e=this.$el.find("button"),null!=n&&(e.prepend(" "),e.prepend(this.icon_views[n.id].$el)),e.prop("disabled",this.model.disabled),this},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(a.WidgetView),i.AbstractButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="AbstractButton",t.prototype.default_view=i.AbstractButtonView,t.define({callback:[r.Instance],label:[r.String,"Button"],icon:[r.Instance],button_type:[r.String,"default"]}),t}(a.Widget)},{"./button_template":"models/widgets/button_template","./widget":"models/widgets/widget","core/build_views":void 0,"core/properties":void 0}],"models/widgets/abstract_icon":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./widget");i.AbstractIcon=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="AbstractIcon",t}(r.Widget)},{"./widget":"models/widgets/widget"}],"models/widgets/autocomplete_input":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e("jquery-ui/autocomplete");var r=e("./text_input"),s=e("core/properties");i.AutocompleteInputView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=this.$el.find("input"),e.autocomplete({source:this.model.completions}),e.autocomplete("widget").addClass("bk-autocomplete-input"),this._prefix_ui(),this},t}(r.TextInputView),i.AutocompleteInput=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="AutocompleteInput",t.prototype.default_view=i.AutocompleteInputView,t.define({completions:[s.Array,[]]}),t}(r.TextInput)},{"./text_input":"models/widgets/text_input","core/properties":void 0,"jquery-ui/autocomplete":"jquery-ui/autocomplete"}],"models/widgets/button":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("core/properties"),s=e("core/bokeh_events"),a=e("./abstract_button");i.ButtonView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.change_input=function(){return this.model.trigger_event(new s.ButtonClick({})),this.model.clicks=this.model.clicks+1,t.__super__.change_input.call(this)},t}(a.AbstractButtonView),i.Button=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Button",t.prototype.default_view=i.ButtonView,t.define({clicks:[r.Number,0]}),t}(a.AbstractButton),s.register_with_event(s.ButtonClick,i.Button)},{"./abstract_button":"models/widgets/abstract_button","core/bokeh_events":void 0,"core/properties":void 0}],"models/widgets/button_group_template":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("core/dom");i["default"]=function(){return n.createElement("div",{"class":"bk-bs-btn-group","data-bk-bs-toggle":"buttons"})}},{"core/dom":void 0}],"models/widgets/button_template":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("core/dom");i["default"]=function(e){return n.createElement("button",{type:"button","class":"bk-bs-btn bk-bs-btn-"+e.button_type},e.label)}},{"core/dom":void 0}],"models/widgets/cell_editors":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("jquery");e("jquery-ui/autocomplete"),e("jquery-ui/spinner");var s=e("core/properties"),a=e("core/bokeh_view"),l=e("../../model"),u=e("./jqueryable");i.CellEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),n(t.prototype,u.JQueryable),t.prototype.className="bk-cell-editor",t.prototype.input=null,t.prototype.emptyValue=null,t.prototype.defaultValue=null,t.prototype.initialize=function(e){return this.args=e,this.model=this.args.column.editor,t.__super__.initialize.call(this,e),this.render()},t.prototype.render=function(){return t.__super__.render.call(this),this.$el.appendTo(this.args.container),this.$input=r(this.input),this.$el.append(this.$input),this.renderEditor(),this.disableNavigation(),this._prefix_ui(),this},t.prototype.renderEditor=function(){},t.prototype.disableNavigation=function(){return this.$input.keydown(function(e){return function(e){var t;switch(t=function(){return e.stopImmediatePropagation()},e.keyCode){case r.ui.keyCode.LEFT:return t();case r.ui.keyCode.RIGHT:return t();case r.ui.keyCode.UP:return t();case r.ui.keyCode.DOWN:return t();case r.ui.keyCode.PAGE_UP:return t();case r.ui.keyCode.PAGE_DOWN:return t()}}}(this))},t.prototype.destroy=function(){return this.remove()},t.prototype.focus=function(){return this.$input.focus()},t.prototype.show=function(){},t.prototype.hide=function(){},t.prototype.position=function(){},t.prototype.getValue=function(){return this.$input.val()},t.prototype.setValue=function(e){return this.$input.val(e)},t.prototype.serializeValue=function(){return this.getValue()},t.prototype.isValueChanged=function(){return!(""===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},t.prototype.applyValue=function(e,t){return this.args.grid.getData().setField(e.index,this.args.column.field,t)},t.prototype.loadValue=function(e){var t;return t=e[this.args.column.field],this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)},t.prototype.validateValue=function(e){var t;return this.args.column.validator&&(t=this.args.column.validator(e),!t.valid)?t:{valid:!0,msg:null}},t.prototype.validate=function(){return this.validateValue(this.getValue())},t}(a.BokehView),i.CellEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="CellEditor",t.prototype.default_view=i.CellEditorView,t}(l.Model),i.StringEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.emptyValue="",t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){var e;return e=this.model.completions,0!==e.length&&(this.$input.autocomplete({source:e}),this.$input.autocomplete("widget").addClass("bk-cell-editor-completion")),this.$input.focus().select()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t}(i.CellEditorView),i.StringEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="StringEditor",t.prototype.default_view=i.StringEditorView,t.define({completions:[s.Array,[]]}),t}(i.CellEditor),i.TextEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TextEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="TextEditor",t.prototype.default_view=i.TextEditorView,t}(i.CellEditor),i.SelectEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input="<select />",t.prototype.renderEditor=function(){var e,t,i,n;for(n=this.model.options,e=0,t=n.length;e<t;e++)i=n[e],this.$input.append(r("<option>").attr({value:i}).text(i));return this.focus()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input.select()},t}(i.CellEditorView),i.SelectEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="SelectEditor",t.prototype.default_view=i.SelectEditorView,t.define({options:[s.Array,[]]}),t}(i.CellEditor),i.PercentEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.PercentEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="PercentEditor",t.prototype.default_view=i.PercentEditorView,t}(i.CellEditor),i.CheckboxEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type="checkbox" value="true" />',t.prototype.renderEditor=function(){return this.focus()},t.prototype.loadValue=function(e){return this.defaultValue=!!e[this.args.column.field],this.$input.prop("checked",this.defaultValue)},t.prototype.serializeValue=function(){return this.$input.prop("checked")},t}(i.CellEditorView),i.CheckboxEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="CheckboxEditor",t.prototype.default_view=i.CheckboxEditorView,t}(i.CellEditor),i.IntEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner("destroy"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid integer"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.IntEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="IntEditor",t.prototype.default_view=i.IntEditorView,t.define({step:[s.Number,1]}),t}(i.CellEditor),i.NumberEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner("destroy"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:"Please enter a valid number"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.NumberEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="NumberEditor",t.prototype.default_view=i.NumberEditorView,t.define({step:[s.Number,.01]}),t}(i.CellEditor),i.TimeEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TimeEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="TimeEditor",t.prototype.default_view=i.TimeEditorView,t}(i.CellEditor),i.DateEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.emptyValue=new Date,t.prototype.input='<input type="text" />',t.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:"button",buttonImageOnly:!0,beforeShow:function(e){return function(){return e.calendarOpen=!0}}(this),onClose:function(e){return function(){return e.calendarOpen=!1}}(this)}),this.$input.siblings(".bk-ui-datepicker-trigger").css({"vertical-align":"middle"}),this.$input.width(this.$input.width()-26),this.$input.focus().select()},t.prototype.destroy=function(){return r.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker("hide"),this.$input.datepicker("destroy"),t.__super__.destroy.call(this)},t.prototype.show=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).show(),t.__super__.show.call(this)},t.prototype.hide=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).hide(),t.__super__.hide.call(this)},t.prototype.position=function(e){return this.calendarOpen&&r.datepicker.dpDiv.css({top:e.top+30,left:e.left}),t.__super__.position.call(this)},t.prototype.getValue=function(){return this.$input.datepicker("getDate").getTime()},t.prototype.setValue=function(e){return this.$input.datepicker("setDate",new Date(e))},t}(i.CellEditorView),i.DateEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="DateEditor",t.prototype.default_view=i.DateEditorView,t}(i.CellEditor)},{"../../model":"model","./jqueryable":"models/widgets/jqueryable","core/bokeh_view":void 0,"core/properties":void 0,jquery:"jquery","jquery-ui/autocomplete":"jquery-ui/autocomplete","jquery-ui/spinner":"jquery-ui/spinner"}],"models/widgets/cell_formatters":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("jquery"),s=e("numbro"),a=e("core/properties"),l=e("core/util/object"),u=e("core/util/types"),c=e("../../model");i.CellFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.doFormat=function(e,t,i,n,o){return null===i?"":(i+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},t}(c.Model),i.StringFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="StringFormatter",t.define({font_style:[a.FontStyle,"normal"],text_align:[a.TextAlign,"left"],text_color:[a.Color]}),t.prototype.doFormat=function(e,i,n,o,s){var a,l,u,c;if(l=t.__super__.doFormat.call(this,e,i,n,o,s),a=this.font_style,u=this.text_align,c=this.text_color,null!=a||null!=u||null!=c){switch(l=r("<span>"+l+"</span>"),a){case"bold":l=l.css("font-weight","bold");break;case"italic":l=l.css("font-style","italic")}null!=u&&(l=l.css("text-align",u)),null!=c&&(l=l.css("color",c)),l=l.prop("outerHTML")}return l},t}(i.CellFormatter),i.NumberFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="NumberFormatter",t.define({format:[a.String,"0,0"],language:[a.String,"en"],rounding:[a.String,"round"]}),t.prototype.doFormat=function(e,i,n,o,r){var a,l,u;return a=this.format,l=this.language,u=function(){switch(this.rounding){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}}.call(this),n=s.format(n,a,l,u),t.__super__.doFormat.call(this,e,i,n,o,r)},t}(i.StringFormatter),i.BooleanFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="BooleanFormatter",t.define({icon:[a.String,"check"]}),t.prototype.doFormat=function(e,t,i,n,o){return i?r("<i>").addClass(this.icon).html():""},t}(i.CellFormatter),i.DateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="DateFormatter",t.define({format:[a.String,"yy M d"]}),t.prototype.getFormat=function(){var e,t;return e=this.format,t=function(){switch(e){case"ATOM":case"W3C":case"RFC-3339":case"ISO-8601":return"ISO-8601";case"COOKIE":return"COOKIE";case"RFC-850":return"RFC-850";case"RFC-1036":return"RFC-1036";case"RFC-1123":return"RFC-1123";case"RFC-2822":return"RFC-2822";case"RSS":case"RFC-822":return"RFC-822";case"TICKS":return"TICKS";case"TIMESTAMP":return"TIMESTAMP";default:return null}}(),null!=t?r.datepicker[t]:e},t.prototype.doFormat=function(e,i,n,o,s){var a;return n=u.isString(n)?parseInt(n,10):n,a=r.datepicker.formatDate(this.getFormat(),new Date(n)),t.__super__.doFormat.call(this,e,i,a,o,s)},t}(i.CellFormatter),i.HTMLTemplateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="HTMLTemplateFormatter",t.define({template:[a.String,"<%= value %>"]}),t.prototype.doFormat=function(e,t,i,n,o){var r,s;return s=this.template,null===i?"":(o=l.extend({},o,{value:i}),(r=_.template(s))(o))},t}(i.CellFormatter)},{"../../model":"model","core/properties":void 0,"core/util/object":void 0,"core/util/types":void 0,jquery:"jquery",numbro:"numbro"}],"models/widgets/checkbox_button_group":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},s=e("jquery");e("bootstrap/button");var a=e("./widget"),l=e("core/properties"),u=e("./button_group_template");i.CheckboxButtonGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={"change input":"change_input"},t.prototype.template=u["default"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d;for(t.__super__.render.call(this),this.$el.empty(),o=this.template(),this.el.appendChild(o),n=this.model.active,d=this.model.labels,a=l=0,c=d.length;l<c;a=++l)u=d[a],e=s('<input type="checkbox">').attr({value:""+a}),r.call(n,a)>=0&&e.prop("checked",!0),i=s('<label class="bk-bs-btn"></label>'),i.text(u).prepend(e),i.addClass("bk-bs-btn-"+this.model.button_type),r.call(n,a)>=0&&i.addClass("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(i);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find("input"),r=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&r.push(i);return r}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.WidgetView),i.CheckboxButtonGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="CheckboxButtonGroup",t.prototype.default_view=i.CheckboxButtonGroupView,t.define({active:[l.Array,[]],labels:[l.Array,[]],button_type:[l.String,"default"],callback:[l.Instance]}),t}(a.Widget)},{"./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button","core/properties":void 0,jquery:"jquery"}],"models/widgets/checkbox_group":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},s=e("jquery"),a=e("./widget"),l=e("core/properties");i.CheckboxGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={"change input":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d;for(t.__super__.render.call(this),this.$el.empty(),o=this.model.active,d=this.model.labels,a=l=0,c=d.length;l<c;a=++l)u=d[a],i=s('<input type="checkbox">').attr({value:""+a}),this.model.disabled&&i.prop("disabled",!0),r.call(o,a)>=0&&i.prop("checked",!0),n=s("<label></label>").text(u).prepend(i),this.model.inline?(n.addClass("bk-bs-checkbox-inline"),this.$el.append(n)):(e=s('<div class="bk-bs-checkbox"></div>').append(n),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find("input"),r=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&r.push(i);return r}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.WidgetView),i.CheckboxGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="CheckboxGroup",t.prototype.default_view=i.CheckboxGroupView,t.define({active:[l.Array,[]],labels:[l.Array,[]],inline:[l.Bool,!1],callback:[l.Instance]}),t}(a.Widget)},{"./widget":"models/widgets/widget","core/properties":void 0,jquery:"jquery"}],"models/widgets/data_table":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n,o=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){function i(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s={}.hasOwnProperty,a=e("jquery");e("jquery-ui/sortable");var l=e("slick_grid/slick.grid"),u=e("slick_grid/plugins/slick.rowselectionmodel"),c=e("slick_grid/plugins/slick.checkboxselectcolumn"),d=e("core/hittest"),h=e("core/properties"),p=e("core/util/string"),f=e("core/util/array"),m=e("./table_widget"),g=e("./widget");n=function(e,t){var i,n;return i=function(i){return function(){if(a.contains(document.documentElement,e))return clearInterval(n),t()}}(this),n=setInterval(i,50)},i.DataProvider=function(){function e(e){var t;this.source=e,this.data=this.source.data,this.fields=Object.keys(this.data),o.call(this.fields,"index")<0&&(this.data.index=function(){t=[];for(var e=0,i=this.getLength();0<=i?e<i:e>i;0<=i?e++:e--)t.push(e);return t}.apply(this),this.fields.push("index"))}return e.prototype.getLength=function(){return this.source.get_length()},e.prototype.getItem=function(e){var t,i,n,o,r;for(i={},r=this.fields,n=0,o=r.length;n<o;n++)t=r[n],i[t]=this.data[t][e];return i},e.prototype._setItem=function(e,t){var i,n;for(i in t)n=t[i],this.data[i][e]=n},e.prototype.setItem=function(e,t){return this._setItem(e,t),this.updateSource()},e.prototype.getField=function(e,t){var i;return i=this.data.index.indexOf(e),this.data[t][i]},e.prototype._setField=function(e,t,i){var n;n=this.data.index.indexOf(e),this.data[t][n]=i},e.prototype.setField=function(e,t,i){return this._setField(e,t,i),this.updateSource()},e.prototype.updateSource=function(){return this.source.trigger("change:data",this,this.source.attributes.data)},e.prototype.getItemMetadata=function(e){return null},e.prototype.getRecords=function(){var e;return function(){var t,i,n;for(n=[],e=t=0,i=this.getLength();0<=i?t<i:t>i;e=0<=i?++t:--t)n.push(this.getItem(e));return n}.call(this)},e.prototype.sort=function(e){var t,i,n,o,r,s,a;for(t=function(){var t,n,o;for(o=[],t=0,n=e.length;t<n;t++)i=e[t],o.push([i.sortCol.field,i.sortAsc?1:-1]);return o}(),0===t.length&&(t=[["index",1]]),a=this.getRecords(),a.sort(function(e,i){var n,o,r,s,a,l,u,c;for(o=0,r=t.length;o<r;o++)if(s=t[o],n=s[0],l=s[1],u=e[n],c=i[n],a=u===c?0:u>c?l:-l,0!==a)return a;return 0}),n=o=0,r=a.length;o<r;n=++o)s=a[n],this._setItem(n,s);return this.updateSource()},e}(),i.DataTableView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return r(t,e),t.prototype.className="bk-data-table",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),n(this.el,function(e){return function(){return e.render()}}(this)),this.listenTo(this.model,"change",function(e){return function(){return e.render()}}(this)),this.listenTo(this.model.source,"change:data",function(e){return function(){return e.updateGrid()}}(this)),this.listenTo(this.model.source,"stream",function(e){return function(){return e.updateGrid()}}(this)),this.listenTo(this.model.source,"patch",function(e){return function(){return e.updateGrid()}}(this)),this.listenTo(this.model.source,"change:selected",function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.data.constructor(this.model.source),this.grid.invalidate(),this.grid.render(),this.model.source.data=this.model.source.data,this.model.source.trigger("change")},t.prototype.updateSelection=function(){var e,t,i,n;if(n=this.model.source.selected,t=n["1d"].indices,this.grid.setSelectedRows(t),e=this.grid.getViewport(),this.model.scroll_to_selection&&!f.any(t,function(t){return e.top<=t&&t<=e.bottom}))return i=Math.max(0,Math.min.apply(null,t)-1),this.grid.scrollRowToTop(i)},t.prototype.newIndexColumn=function(){return{id:p.uniqueId(),name:"#",field:"index",width:40,behavior:"select",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:"bk-cell-index"}},t.prototype.render=function(){var e,t,n,o,r,s;return n=function(){var e,i,n,o;for(n=this.model.columns,o=[],e=0,i=n.length;e<i;e++)t=n[e],o.push(t.toColumn());return o}.call(this),"checkbox"===this.model.selectable&&(e=new c({cssClass:"bk-cell-select"}),n.unshift(e.getColumnDefinition())),this.model.row_headers&&null!=this.model.source.get_column("index")&&n.unshift(this.newIndexColumn()),s=this.model.width,o=this.model.height,r={enableCellNavigation:this.model.selectable!==!1,enableColumnReorder:!0,forceFitColumns:this.model.fit_columns,autoHeight:"auto"===o,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:!1},null!=s?this.el.style.width=this.model.width+"px":this.el.style.width=this.model.default_width+"px",null!=o&&"auto"!==o&&(this.el.style.height=this.model.height+"px"),this.data=new i.DataProvider(this.model.source),this.grid=new l(this.el,this.data,n,r),this.grid.onSort.subscribe(function(e){return function(t,i){return n=i.sortCols,e.data.sort(n),e.grid.invalidate(),e.grid.render()}}(this)),this.model.selectable!==!1&&(this.grid.setSelectionModel(new u({selectActiveRow:null==e})),null!=e&&this.grid.registerPlugin(e),this.grid.onSelectedRowsChanged.subscribe(function(e){return function(t,i){var n;return n=d.create_hit_test_result(),n["1d"].indices=i.rows,e.model.source.selected=n}}(this))),this._prefix_ui(),this},t}(g.WidgetView),i.DataTable=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return r(t,e),t.prototype.type="DataTable",t.prototype.default_view=i.DataTableView,t.define({columns:[h.Array,[]],fit_columns:[h.Bool,!0],sortable:[h.Bool,!0],editable:[h.Bool,!1],selectable:[h.Bool,!0],row_headers:[h.Bool,!0],scroll_to_selection:[h.Bool,!0]}),t.override({height:400}),t.internal({default_width:[h.Number,600]}),t}(m.TableWidget)},{"./table_widget":"models/widgets/table_widget","./widget":"models/widgets/widget","core/hittest":void 0,"core/properties":void 0,"core/util/array":void 0,"core/util/string":void 0,jquery:"jquery","jquery-ui/sortable":"jquery-ui/sortable","slick_grid/plugins/slick.checkboxselectcolumn":"slick_grid/plugins/slick.checkboxselectcolumn","slick_grid/plugins/slick.rowselectionmodel":"slick_grid/plugins/slick.rowselectionmodel","slick_grid/slick.grid":"slick_grid/slick.grid"}],"models/widgets/date_picker":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty,s=e("jquery");e("jquery-ui/datepicker");var a=e("core/properties"),l=e("./input_widget");i.DatePickerView=function(e){function t(){return this.onSelect=n(this.onSelect,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.label=s("<label>").text(this.model.title),this.input=s('<input type="text">'),this.datepicker=this.input.datepicker({defaultDate:new Date(this.model.value),minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input]),this._prefix_ui(),this},t.prototype.onSelect=function(e,t){var i,n;return i=new Date(e),this.model.value=i.toString(),null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(l.InputWidgetView),i.DatePicker=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type="DatePicker",t.prototype.default_view=i.DatePickerView,t.define({value:[a.Any,Date.now()],min_date:[a.Any],max_date:[a.Any]}),t}(l.InputWidget)},{"./input_widget":"models/widgets/input_widget","core/properties":void 0,jquery:"jquery","jquery-ui/datepicker":"jquery-ui/datepicker"}],"models/widgets/date_range_slider":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e("jqrangeslider/jQDateRangeSlider");var r=e("core/properties"),s=e("core/util/types"),a=e("./input_widget");i.DateRangeSliderView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",function(e){return function(){return e.render}}(this))},t.prototype.render=function(){var e,i,n,o,r,a,l,u,c;return t.__super__.render.call(this),this.$el.empty(),r=this.model.value,c=r[0],u=r[1],a=this.model.range,o=a[0],n=a[1],l=this.model.bounds,i=l[0],e=l[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(e)},range:{min:!!s.isObject(o)&&o,max:!!s.isObject(n)&&n},step:this.model.step||{},enabled:this.model.enabled,arrows:this.model.arrows,valueLabels:this.model.value_labels,wheelMode:this.model.wheel_mode}),this.$el.on("userValuesChanged",function(e){return function(t,i){var n;return e.model.value=[i.values.min,i.values.max],null!=(n=e.model.callback)?n.execute(e.model):void 0;
}}(this)),this},t}(a.InputWidgetView),i.DateRangeSlider=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="DateRangeSlider",t.prototype.default_view=i.DateRangeSliderView,t.define({value:[r.Any],range:[r.Any],bounds:[r.Any],step:[r.Any,{}],enabled:[r.Bool,!0],arrows:[r.Bool,!0],value_labels:[r.String,"show"],wheel_mode:[r.Any]}),t}(a.InputWidget)},{"./input_widget":"models/widgets/input_widget","core/properties":void 0,"core/util/types":void 0,"jqrangeslider/jQDateRangeSlider":"jqrangeslider/jQDateRangeSlider"}],"models/widgets/div":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./markup"),s=e("core/dom"),a=e("core/properties");i.DivView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.div(),this.model.render_as_text?e.textContent=this.model.text:e.innerHTML=this.model.text,this.$el.find(".bk-markup").append(e),this},t}(r.MarkupView),i.Div=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Div",t.prototype.default_view=i.DivView,t.define({render_as_text:[a.Bool,!1]}),t}(r.Markup)},{"./markup":"models/widgets/markup","core/dom":void 0,"core/properties":void 0}],"models/widgets/dropdown":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("jquery");e("bootstrap/dropdown");var s=e("core/properties"),a=e("./abstract_button"),l=e("./dropdown_template");i.DropdownView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=l["default"],t.prototype.render=function(){var e,i,n,o,s,a,l,u,c,d;for(t.__super__.render.call(this),s=[],u=this.model.menu,n=0,l=u.length;n<l;n++)o=u[n],i=null!=o?(a=o[0],d=o[1],o,e=r("<a data-value='"+d+"'>"+a+"</a>"),c=this,e.click(function(e){return c.set_value(r(this).data("value"))}),r("<li></li>").append(e)):r('<li class="bk-bs-divider"></li>'),s.push(i);return this.$el.find(".bk-bs-dropdown-menu").append(s),this.$el.find("button").val(this.model.default_value),this.$el.find("button").dropdown(),this},t.prototype.set_value=function(e){return this.model.value=e,this.$el.find("button").val(e)},t}(a.AbstractButtonView),i.Dropdown=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Dropdown",t.prototype.default_view=i.DropdownView,t.define({value:[s.String],default_value:[s.String],menu:[s.Array,[]]}),t.override({label:"Dropdown"}),t}(a.AbstractButton)},{"./abstract_button":"models/widgets/abstract_button","./dropdown_template":"models/widgets/dropdown_template","bootstrap/dropdown":"bootstrap/dropdown","core/properties":void 0,jquery:"jquery"}],"models/widgets/dropdown_template":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("core/dom");i["default"]=function(e){var t=["bk-bs-btn","bk-bs-btn-"+e.button_type,"bk-bs-dropdown-toggle","bk-bs-dropdown-btn"];return n.createElement("fragment",null,n.createElement("button",{type:"button","class":t,"data-bk-bs-toggle":"dropdown"},e.label," ",n.createElement("span",{"class":"bk-bs-caret"})),n.createElement("ul",{"class":"bk-bs-dropdown-menu"}))}},{"core/dom":void 0}],"models/widgets/index":[function(e,t,i){"use strict";function n(e){for(var t in e)i.hasOwnProperty(t)||(i[t]=e[t])}Object.defineProperty(i,"__esModule",{value:!0}),n(e("./cell_editors")),n(e("./cell_formatters"));var o=e("./abstract_button");i.AbstractButton=o.AbstractButton;var r=e("./abstract_icon");i.AbstractIcon=r.AbstractIcon;var s=e("./autocomplete_input");i.AutocompleteInput=s.AutocompleteInput;var a=e("./button");i.Button=a.Button;var l=e("./checkbox_button_group");i.CheckboxButtonGroup=l.CheckboxButtonGroup;var u=e("./checkbox_group");i.CheckboxGroup=u.CheckboxGroup;var c=e("./data_table");i.DataTable=c.DataTable;var d=e("./date_picker");i.DatePicker=d.DatePicker;var h=e("./date_range_slider");i.DateRangeSlider=h.DateRangeSlider;var p=e("./div");i.Div=p.Div;var f=e("./dropdown");i.Dropdown=f.Dropdown;var m=e("./input_widget");i.InputWidget=m.InputWidget;var g=e("./markup");i.Markup=g.Markup;var v=e("./multiselect");i.MultiSelect=v.MultiSelect;var y=e("./panel");i.Panel=y.Panel;var _=e("./paragraph");i.Paragraph=_.Paragraph;var b=e("./pretext");i.PreText=b.PreText;var w=e("./radio_button_group");i.RadioButtonGroup=w.RadioButtonGroup;var C=e("./radio_group");i.RadioGroup=C.RadioGroup;var k=e("./range_slider");i.RangeSlider=k.RangeSlider;var x=e("./selectbox");i.Select=x.Select;var D=e("./slider");i.Slider=D.Slider;var S=e("./table_column");i.TableColumn=S.TableColumn;var T=e("./table_widget");i.TableWidget=T.TableWidget;var E=e("./tabs");i.Tabs=E.Tabs;var M=e("./text_input");i.TextInput=M.TextInput;var P=e("./toggle");i.Toggle=P.Toggle;var R=e("./widget");i.Widget=R.Widget},{"./abstract_button":"models/widgets/abstract_button","./abstract_icon":"models/widgets/abstract_icon","./autocomplete_input":"models/widgets/autocomplete_input","./button":"models/widgets/button","./cell_editors":"models/widgets/cell_editors","./cell_formatters":"models/widgets/cell_formatters","./checkbox_button_group":"models/widgets/checkbox_button_group","./checkbox_group":"models/widgets/checkbox_group","./data_table":"models/widgets/data_table","./date_picker":"models/widgets/date_picker","./date_range_slider":"models/widgets/date_range_slider","./div":"models/widgets/div","./dropdown":"models/widgets/dropdown","./input_widget":"models/widgets/input_widget","./markup":"models/widgets/markup","./multiselect":"models/widgets/multiselect","./panel":"models/widgets/panel","./paragraph":"models/widgets/paragraph","./pretext":"models/widgets/pretext","./radio_button_group":"models/widgets/radio_button_group","./radio_group":"models/widgets/radio_group","./range_slider":"models/widgets/range_slider","./selectbox":"models/widgets/selectbox","./slider":"models/widgets/slider","./table_column":"models/widgets/table_column","./table_widget":"models/widgets/table_widget","./tabs":"models/widgets/tabs","./text_input":"models/widgets/text_input","./toggle":"models/widgets/toggle","./widget":"models/widgets/widget"}],"models/widgets/input_widget":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./widget"),s=e("core/properties");i.InputWidgetView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.find("input").prop("disabled",this.model.disabled)},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(r.WidgetView),i.InputWidget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="InputWidget",t.prototype.default_view=i.InputWidgetView,t.define({callback:[s.Instance],title:[s.String,""]}),t}(r.Widget)},{"./widget":"models/widgets/widget","core/properties":void 0}],"models/widgets/jqueryable":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n,o=e("jquery"),r=e("core/util/types");n=/^(\S+)\s*(.*)$/,i.JQueryable={_prefix_ui:function(){var e,t,i,n,o,r,s,a,l;for(a=this.el.querySelectorAll("*[class*='ui-']"),n=0,r=a.length;n<r;n++){for(i=a[n],e=[],l=i.classList,o=0,s=l.length;o<s;o++)t=l[o],e.push(0===t.indexOf("ui-")?"bk-"+t:t);i.className=e.join(" ")}return null},_setElement:function(e){return this.$el=e instanceof o?e:o(e),this.el=this.$el[0]},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},delegateEvents:function(e){var t,i,o;if(null==e&&(e=this.events),!e)return this;this.undelegateEvents();for(t in e)o=e[t],r.isFunction(o)||(o=this[o]),null!=o&&(i=t.match(n),this.delegate(i[1],i[2],o.bind(this)));return this},delegate:function(e,t,i){return this.$el.on(e+".delegateEvents"+this.id,t,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.id),this},undelegate:function(e,t,i){return this.$el.off(e+".delegateEvents"+this.id,t,i),this}}},{"core/util/types":void 0,jquery:"jquery"}],"models/widgets/main":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("./index");i.models=n},{"./index":"models/widgets/index"}],"models/widgets/markup":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("core/properties"),s=e("./widget"),a=e("./markup_template");i.MarkupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=a["default"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){if(t.__super__.render.call(this),this.$el.empty(),this.$el.html(this.template()),this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},t}(s.WidgetView),i.Markup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Markup",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e)},t.define({text:[r.String,""]}),t}(s.Widget)},{"./markup_template":"models/widgets/markup_template","./widget":"models/widgets/widget","core/properties":void 0}],"models/widgets/markup_template":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("core/dom");i["default"]=function(){return n.createElement("div",{"class":"bk-markup"})}},{"core/dom":void 0}],"models/widgets/multiselect":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty,s=e("core/properties"),a=e("./input_widget"),l=e("./multiselecttemplate");i.MultiSelectView=function(e){function t(){return this.render_selection=n(this.render_selection,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.template=l["default"],t.prototype.events={"change select":"change_input"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change:value",this.render_selection),this.listenTo(this.model,"change:options",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:title",this.render),this.listenTo(this.model,"change:size",this.render)},t.prototype.render=function(){var e;return t.__super__.render.call(this),this.$el.empty(),e=this.template(this.model.attributes),this.$el.html(e),this.render_selection(),this},t.prototype.render_selection=function(){var e,t,i,n,o;for(n={},i=this.model.value,e=0,t=i.length;e<t;e++)o=i[e],n[o]=!0;return this.$el.find("option").each(function(e){return function(t){if(t=e.$el.find(t),n[t.attr("value")])return t.attr("selected","selected")}}(this)),this.$el.find("select").attr("size",this.model.size)},t.prototype.change_input=function(){var e,i;if(e=this.$el.find("select:focus").size(),i=this.$el.find("select").val(),i?this.model.value=i:this.model.value=[],t.__super__.change_input.call(this),e)return this.$el.find("select").focus()},t}(a.InputWidgetView),i.MultiSelect=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type="MultiSelect",t.prototype.default_view=i.MultiSelectView,t.define({value:[s.Array,[]],options:[s.Array,[]],size:[s.Number,4]}),t}(a.InputWidget)},{"./input_widget":"models/widgets/input_widget","./multiselecttemplate":"models/widgets/multiselecttemplate","core/properties":void 0}],"models/widgets/multiselecttemplate":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("core/dom"),o=e("core/util/types");i["default"]=function(e){return n.createElement("fragment",null,n.createElement("label",{"for":e.id}," ",e.title," "),n.createElement("select",{multiple:!0,"class":"bk-widget-form-input",id:e.id,name:e.name},e.options.map(function(t){var i,r;o.isString(t)?i=r=t:(i=t[0],r=t[1]);var s=e.value.indexOf(i)>-1;return n.createElement("option",{selected:s,value:i},r)})))}},{"core/dom":void 0,"core/util/types":void 0}],"models/widgets/panel":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./widget"),s=e("core/properties");i.PanelView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.empty(),this},t}(r.WidgetView),i.Panel=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Panel",t.prototype.default_view=i.PanelView,t.define({title:[s.String,""],child:[s.Instance],closable:[s.Bool,!1]}),t}(r.Widget)},{"./widget":"models/widgets/widget","core/properties":void 0}],"models/widgets/paragraph":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./markup"),s=e("core/dom");i.ParagraphView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.p({style:{margin:0}},this.model.text),this.$el.find(".bk-markup").append(e)},t}(r.MarkupView),i.Paragraph=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="Paragraph",t.prototype.default_view=i.ParagraphView,t}(r.Markup)},{"./markup":"models/widgets/markup","core/dom":void 0}],"models/widgets/pretext":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e("./markup"),s=e("core/dom");i.PreTextView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.pre({style:{overflow:"auto"}},this.model.text),this.$el.find(".bk-markup").append(e)},t}(r.MarkupView),i.PreText=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="PreText",t.prototype.default_view=i.PreTextView,t}(r.Markup)},{"./markup":"models/widgets/markup","core/dom":void 0}],"models/widgets/radio_button_group":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e("bootstrap/button");var r=e("core/dom"),s=e("core/properties"),a=e("core/util/string"),l=e("./widget"),u=e("./button_group_template");i.RadioButtonGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={"change input":"change_input"},t.prototype.template=u["default"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.listenTo(this.model,"change",this.render)},t.prototype.render=function(){var e,i,n,o,s,l,u,c,d,h;for(t.__super__.render.call(this),this.$el.empty(),i=this.template(),this.$el.append(i),c=a.uniqueId("RadioButtonGroup"),e=this.model.active,d=this.model.labels,n=s=0,u=d.length;s<u;n=++s)h=d[n],o=r.input({type:"radio",name:c,value:""+n,checked:n===e}),l=r.label({"class":["bk-bs-btn","bk-bs-btn-"+this.model.button_type]},o,h),n===e&&l.classList.add("bk-bs-active"),this.$el.find(".bk-bs-btn-group").append(l);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find("input"),r=[],t=e=0,n=o.length;e<n;t=++e)i=o[t],i.checked&&r.push(t);return r}.call(this),this.model.active=e[0],null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(l.WidgetView),i.RadioButtonGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type="RadioButtonGroup",t.prototype.default_view=i.RadioButtonGroupView,t.define({active:[s.Any,null],labels:[s.Array,[]],button_type:[s.String,"default"],callback:[s.Instance]}),t}(l.Widget)},{"./button_group_template":"models/widgets/button_group_template","./widget":"models/widgets/widget","bootstrap/button":"bootstrap/button","core/dom":void 0,"core/properties":void 0,"core/util/string":void 0}],"models/widgets/radio_group":[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});va