module.exports = "(function(t,i,e){var r=e(5894),a=e(7358);t.exports={initialize:function(){this.__state={},this.on(a.DATA_LOADED,this.__setVisitorAttributeEntities)},getCustomBehavioralAttributes:function(){return r.filter(this.__state,(function(t){return!!t.rule_json}))},getVisitorAttribute:function(t){__INVARIANT__&&e(2048).isType(\"VisitorAttributeDescriptor\",t);var i=r.values(this.__state);if(t.datasourceId&&(i=r.filter(i,{dcp_datasource_id:String(t.datasourceId)})),t.attributeName&&t.attributeId)throw new Error(\"Must not specify both attribute name and attribute ID\");if(t.attributeId){var a=this.__state[t.attributeId];if(!a)throw new Error(\"Unrecognized attribute ID: \"+t.attributeId);return a}if(t.attributeName){var n=r.filter(i,{name:t.attributeName});if(!n.length)throw new Error(\"Unrecognized attribute name: \"+t.attributeName);if(n.length>1)throw new Error(\"Too many attributes with name: \"+t.attributeName);return n[0]}throw new Error(\"Must specify attribute name or attribute ID\")},__setVisitorAttributeEntities:function(t){r.isEmpty(t.data.visitorAttributes)||(r.each(t.data.visitorAttributes,r.bind((function(t){this.__state[t.id]=t}),this)),this.emitChange())}}})";