var __hasProp=Object.prototype.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},__bind=function(a,b){return function(){return a.apply(b,arguments)}};define(["underscore","common/views/state","common/views/collection","common/views/popover"],function(a,b,c,d){var e,f,g;return g=function(){function c(){c.__super__.constructor.apply(this,arguments)}return __extends(c,b.View),c.prototype.template=a.template('<span class="name"><%= name %></span>            <span class="description"><%= description %></span>'),c.prototype.events={click:"click"},c.prototype.render=function(){return this.el.html(this.template(this.model.toJSON())),this.el.data({id:this.model.id}),this},c.prototype.click=function(){return this.model.activate({local:!0})},c}(),f=function(){function a(){a.__super__.constructor.apply(this,arguments)}return __extends(a,d.Popover),a.prototype.el="#concept-description",a.prototype.defaultContent='<span class="info">No description available</span>',a.prototype.update=function(a){return this.title.text(a.model.get("name")),this.content.html(a.model.get("description")||this.defaultContent)},a}(),e=function(){function b(){this.activate=__bind(this.activate,this),this.scrollToConcept=__bind(this.scrollToConcept,this),b.__super__.constructor.apply(this,arguments)}return __extends(b,c.View),b.prototype.el="#criteria",b.prototype.viewClass=g,b.prototype.events={"mouseenter div":"mouseenter","mouseleave div":"mouseleave",click:"click"},b.prototype.initialize=function(){return b.__super__.initialize.apply(this,arguments),this.collection.bind("active",this.activate),this.description=new f},b.prototype.reset=function(a,c){b.__super__.reset.apply(this,arguments);if(c.initial)return this.el.parent().fadeIn()},b.prototype.scrollToConcept=function(a){var b;return b=this.childViews[a.id],this.el.scrollTo(b.el,{duration:800,axis:"y",offset:{top:this.el.outerHeight()/-2},easing:"easeOutQuint"})},b.prototype.activate=function(b,c){return(c!=null?!c.local:!void 0)&&a.defer(this.scrollToConcept,b),App.hub.publish("concept/active",b)},b.prototype.mouseenter=function(a){var b,c;return b=this.$(a.currentTarget).data("id"),c=this.childViews[b],this.description.show(c,"right")},b.prototype.mouseleave=function(a){return this.description.hide()},b.prototype.click=function(){return this.description.hide(!0)},b}(),{View:g,CollectionView:e}})