module.exports = "(function(e,t,n){var i=n(5894),a=n(7358),s=n(9133),r=n(3316);e.exports={initialize:function(){this.__state={layers:{},experiments:{},variations:{}},this.on(a.DATA_LOADED,this.__loadData)},__loadData:function(e){if(!i.isEmpty(e.data.layers)){var t=this;i.each(e.data.layers,(function(e){i.each(e.experiments,(function(n){e.pageIds||(e.pageIds=e.viewIds),n.campaignName||r.isSingleExperimentPolicy(e.policy)?r.isSingleExperimentPolicy(e.policy)&&__GROUPS__&&e.groupId&&(n.groupId=e.groupId):n.campaignName=e.name,i.each(n.variations,(function(e){i.each(e.actions,(function(e){e.pageId||(e.pageId=e.viewId)})),t.__state.variations[e.id]=e})),t.__state.experiments[n.id]=n})),s.deepFreeze(e),t.__state.layers[e.id]=e})),this.emitChange()}},getAll:function(){return s.safeReference(i.values(this.__state.layers))},getCampaignsMap:function(){return s.safeReference(this.__state.layers)},getExperimentsMap:function(){return s.safeReference(this.__state.experiments)},getVariationsMap:function(){return s.safeReference(this.__state.variations)},getCount:function(){return i.keys(this.__state.layers).length},getAllByPageIds:function(e){return s.safeReference(i.filter(this.__state.layers,(function(t){return i.some(e,i.partial(i.includes,t.pageIds))})))},get:function(e){return s.safeReference(this.__state.layers[e])},getLayerByExperimentId:function(e){var t=i.find(this.__state.layers,(function(t){return i.find(t.experiments,{id:e})}));return s.safeReference(t)},getExperimentByVariationId:function(e){var t;return i.some(this.__state.layers,(function(n){return i.some(n.experiments,(function(n){return i.find(n.variations,{id:e})&&(t=n),t})),t})),s.safeReference(t)}}})";