var Multimedia;(function(n){var t;(function(){var r=ImageDetailReducers,t=n.Utils.LayoutInstrumentation,i=t===null||t===void 0?void 0:t.gmcit(),e=1500,u=new Map,o=function(n){return React.useEffect(function(){i&&n.currentInsightsId&&n.currentInsightsRequestState===SharedInterfaces.RequestState.Success&&(u.has(n.currentInsightsId)||(u.set(n.currentInsightsId,!0),setTimeout(function(){i.writeLayoutFromElement(n.rootElement);i.flushInstrumentation()},e)))},[n.currentInsightsId,n.currentInsightsRequestState]),React.useEffect(function(){n.pageLayoutLogLoaded&&n.pageLayoutLogLoaded()},[]),null},s=function(n){var t=r.getInsightsState(n),i=ImageDetailReducers.getDisplayInsightsId(n);return{ig:r.getCurrentImpressionId(n),currentInsightsId:i,currentInsightsRequestState:t?t.requestState:SharedInterfaces.RequestState.Ready}},h=function(n){return{pageLayoutLogLoaded:function(){n(ImageDetailActions.pageLayoutLogLoaded())}}},c=ReactRedux.connect(s,h),f=c(o);f.displayName="PageLayoutLogController";n.ImageDetail.PageLayoutLogController=f})(t=n.ImageDetail||(n.ImageDetail={}))})(Multimedia||(Multimedia={}))