(function(e){define([],function(){var t=Backbone.View.extend({className:"upfront-inline-panels upfront-ui",initialize:function(){this.panels=_([])},render:function(){var t=this,n=typeof this.panels=="function"?this.panels():this.panels,r=e('<div class="upfront-inline-panels-wrap" />');this.$el.html(""),n.each(function(e){if(!e)return;e.panels_view=t,e.render(),e.delegateEvents(),r.append(e.el)}),this.$el.append(r),typeof this.on_render=="function"&&this.on_render()},on_active:function(){e(".upfront-inline-panels-active").removeClass("upfront-inline-panels-active"),this.$el.addClass("upfront-inline-panels-active")},remove:function(){var e=typeof this.panels=="function"?this.panels():this.panels;e&&e.each(function(e){e.remove()}),Backbone.View.prototype.remove.call(this)}});return t})})(jQuery);