module.exports = "(function(t,i,e){var a=e(5894),s=e(7358),n=e(8465);t.exports={initialize:function(){this.__state={profile:{},metadata:{},visitorId:null},this.on(s.SET_VISITOR_ID_VIA_API,this.__setVisitorId),this.on(s.SET_VISITOR_ATTRIBUTES,this.__setAttributes),this.on(s.LOAD_EXISTING_VISITOR_PROFILE,this.__setVisitorProfile)},getVisitorProfile:function(){return this.__state.profile},getVisitorProfileMetadata:function(){return this.__state.metadata},getAttribute:function(t){var i=this.__state.profile;return a.cloneDeep(n.getFieldValue(i,t))},getAttributeMetadata:function(t){return a.cloneDeep(this.__state.metadata[t])},getVisitorIdFromAPI:function(){return this.__state.visitorId},__setVisitorProfile:function(t){this.__state.profile=t.profile,this.__state.metadata=t.metadata,this.emitChange()},__setAttributes:function(t){a.each(t.attributes,a.bind((function(t){var i=t.key;n.setFieldValue(this.__state.profile,i,t.value),t.metadata&&a.forOwn(t.metadata,a.bind((function(t,e){n.setFieldValue(this.__state.metadata,i.concat(e),t)}),this))}),this)),this.emitChange()},__setVisitorId:function(t){this.__state.visitorId=t,this.emitChange()}}})";