text: /*! grafana - v4.0.0-1478693311beta1 - 2016-11-09
   * Copyright (c) 2016 Torkel Ödegaard; Licensed Apache-2.0 */
  
  System.register(["lodash","app/core/core"],function(a){var b,c,d;return{setters:[function(a){b=a},function(a){c=a}],execute:function(){d=function(){function a(a){this.model=a,this.defaults={title:"Dashboard Row",panels:[],showTitle:!1,titleSize:"h6",height:250,isNew:!1,repeat:null,repeatRowId:null,repeatIteration:null,collapse:!1},c.assignModelProperties(this,a,this.defaults),this.events=new c.Emitter,this.updateRowSpan()}return a.prototype.getSaveModel=function(){return c.assignModelProperties(this.model,this,this.defaults),this.model},a.prototype.updateRowSpan=function(){this.span=0;for(var a=0,b=this.panels;a<b.length;a++){var c=b[a];this.span+=c.span}},a.prototype.panelSpanChanged=function(a){var b=this.span;this.updateRowSpan(),(a||b!==this.span)&&this.events.emit("span-changed")},a.prototype.addPanel=function(a){var b=this.span,c=this.panels.length,d=12-b-a.span;d<=0&&(1===c?(this.panels[0].span=6,a.span=6):2===c?(this.panels[0].span=4,this.panels[1].span=4,a.span=4):3===c&&(this.panels[0].span=3,this.panels[1].span=3,this.panels[2].span=3,a.span=3)),this.panels.push(a),this.events.emit("panel-added",a),this.panelSpanChanged()},a.prototype.removePanel=function(a,d){var e=this;if(d!==!1)return void c.appEvents.emit("confirm-modal",{title:"Remove Panel",text:"Are you sure you want to remove this panel?",icon:"fa-trash",yesText:"Remove",onConfirm:function(){e.removePanel(a,!1)}});var f=b["default"].indexOf(this.panels,a);this.panels.splice(f,1),this.events.emit("panel-removed",a),this.panelSpanChanged()},a.prototype.movePanel=function(a,b){this.panels.splice(b,0,this.panels.splice(a,1)[0])},a.prototype.destroy=function(){this.events.removeAllListeners()},a.prototype.copyPropertiesFromRowSource=function(a){this.height=a.height,this.title=a.title,this.showTitle=a.showTitle,this.titleSize=a.titleSize},a.prototype.toggleCollapse=function(){this.collapse=!this.collapse},a}(),a("DashboardRow",d)}}});