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(["common/views/state","common/views/collection","common/views/popover"],function(a,b,c){var d,e,f;return f=function(){function b(){b.__super__.constructor.apply(this,arguments)}return __extends(b,a.View),b.prototype.template=_.template('<span class="name"><%= name %></span>                <span class="description"><%= description %></span>'),b.prototype.events={click:"click"},b.prototype.render=function(){return this.el.html(this.template(this.model.toJSON())),this.el.data({id:this.model.id}),this},b.prototype.click=function(){return this.model.activate({local:!0})},b}(),e=function(){function a(){a.__super__.constructor.apply(this,arguments)}return __extends(a,c.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}(),d=function(){function a(){this.activate=__bind(this.activate,this),this.scrollToConcept=__bind(this.scrollToConcept,this),a.__super__.constructor.apply(this,arguments)}return __extends(a,b.View),a.prototype.el="#criteria",a.prototype.viewClass=f,a.prototype.events={"mouseenter div":"mouseenter","mouseleave div":"mouseleave",click:"click"},a.prototype.initialize=function(){return a.__super__.initialize.apply(this,arguments),this.collection.bind("active",this.activate),this.description=new e},a.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"})},a.prototype.activate=function(a,b){return(b!=null?!b.local:!void 0)&&_.defer(this.scrollToConcept,a),App.hub.publish("concept/active",a)},a.prototype.mouseenter=function(a){var b,c;return b=$(a.currentTarget).data("id"),c=this.childViews[b],this.description.show(c,"right")},a.prototype.mouseleave=function(){return this.description.hide()},a.prototype.click=function(){return this.description.hide(!0)},a}(),{View:f,CollectionView:d}})