define(["modules/ui/module"],function(a){"use strict";return a.registerDirective("smartClassFilter",function(){return{restrict:"A",scope:{model:"=",displayElements:"@",filterElements:"@"},link:function(a,b){a.$watch("model",function(c){if(angular.isString(c)){var d=c.trim();d?(angular.element(a.displayElements,b).hide(),angular.element(a.filterElements,b).filter(function(){var a=new RegExp(d,"i");return a.test($(this).attr("class")+$(this).attr("alt"))}).closest(a.displayElements).show()):angular.element(a.displayElements,b).show()}})}}})});