78cc4e5049b8f9a2badd8c1191e32822fe24c9edfa2c38a6ab4f8a642e113d17

Source Code:

(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{691:function(e,a,t){"use strict";t.r(a);var l=t(8),o=t.n(l),s=t(3),r=t.n(s),n=t(2),i=t.n(n),p=t(5),c=t.n(p),v=t(4),d=t.n(v),u=t(9),f=t.n(u),h=t(6),y=t.n(h),m=t(0),w=t.n(m),O=t(12),b=t.n(O),k=t(7),g=t.n(k),N=t(15),_=t.n(N),E=t(328),S=t(61),C=t(109),F=t(26),G=t(29),x=t(1),I=t.n(x),L=t(64),A=t(135),D=t.n(A),T=t(329),B=t(331),U=t(60),M=t(110),q=function(e){function a(e){var t;return r()(this,a),(t=c()(this,d()(a).call(this,e))).collapseOverlay=t.collapseOverlay.bind(f()(t)),t.state={showOverlay:!1},t}return y()(a,e),i()(a,[{key:"shouldComponentUpdate",value:function(e,a){return g()(this,e,a)}},{key:"componentDidMount",value:function(){if(this.props.checkOnLoad){var e=this.props,a=e.socialOverlay,t=e.pageUrl;if("branded_app_promo"===a.module){var l=new S.a,o=l.get("app-overlay");if(null==o)l.set("app-overlay",t,{path:"/"});else if("completed-bap"!=o&&o!=t){var s=new Date;s.setTime(s.getTime()+864e8),this.openOverlay(),l.set("app-overlay","completed-bap",{path:"/",expires:s}),this.fireGa("app promo","impression","overlay")}}else if("newsletter"===a.module){var r=new S.a,n=r.get("newsletter-overlay");if(null==n)r.set("newsletter-overlay",t,{path:"/"});else if("completed-newsletter"!=n&&n!=t){var i=new Date;i.setTime(i.getTime()+864e8),this.openOverlay(),r.set("newsletter-overlay","completed-newsletter",{path:"/",expires:i}),this.fireGa("newsletter overlay","impression","")}}}}},{key:"componentDidUpdate",value:function(e){if("undefined"!=typeof window&&this.state.showOverlay){var a=b.a.findDOMNode(this),t=a.querySelector(".sub-facebook");if(t){var l=t.querySelector(".fb-like");window.FB&&"rendered"!==l.getAttribute("fb-xfbml-state")&&window.FB.XFBML.parse(a)}}this.props.showOverlay!==e.showOverlay&&this.setState({showOverlay:this.props.showOverlay})}},{key:"fireGa",value:function(e,a,t){Object(F.a)({data:{eventCategory:e,eventAction:a,eventLabel:t},ga:{ids:G.b.getAccounts("ids")},ca:{},pa:{}})}},{key:"openOverlay",value:function(){var e=I()(this.props,"hasApp"),a=I()(this.props,"socialOverlay.module");e||"branded_app_promo"!==a?this.setState({showOverlay:!0}):this.setState({showOverlay:!1})}},{key:"collapseOverlay",value:function(e){"signupclick"!==e&&("branded_app_promo"===I()(this.props,"socialOverlay.module")&&this.fireGa("app promo","closed","overlay"));this.setState({showOverlay:!1}),this.props.collapseCallback()}},{key:"render",value:function(){var e,a=this.props,t=a.options,l=(a.socialOverlay,a.socialInfo),s=a.socialOverlayId,r=a.socialOverlayInfo,n=a.blogInfo,i=a.logos,p=a.internalads,c=(a.hasApp,D.a.stripslashes(I()(t,"globalBlogOptions.loyalty_title_"+t.blogId,null))),v=I()(this.props,"socialOverlay.module"),d={"brandedapp-overlay":"branded_app_promo"===v&&!this.props.forceNewsletterOverlay,"default-overlay":"newsletter"===v||null===v||""===v||this.props.forceNewsletterOverlay};return e=r&&""===r.text?"null"!==c?"Sign up to have exclusive "+c+" contests, events, coupons, presales, and much more delivered to you for FREE.":"Never miss the latest news from "+n.blogName+".":r.text,w.a.createElement(C.default,null,this.state.showOverlay&&w.a.createElement(M.default,{className:"newsletter-overlay ".concat(_()(d)),onClick:this.collapseOverlay},w.a.createElement(B.default,o()({subTitle:e,module:v},{blogInfo:n,socialOverlayInfo:r,logos:i,Logo:L.default})),"branded_app_promo"===v&&!this.props.forceNewsletterOverlay&&w.a.createElement(E.default,{params:r,clubName:c,blogName:n.legalName,info:s,onSignupClick:this.collapseOverlay,fireGa:this.fireGa,location:"social overlay"}),("newsletter"===v||null===v||""===v||this.props.forceNewsletterOverlay)&&w.a.createElement(U.default,{params:r,info:s,onSignupClick:this.collapseOverlay,eventFn:this.fireGa,stSource:"desktop_social_overlay",location:"social overlay"}),("newsletter"===v||this.props.forceNewsletterOverlay&&l.facebookFanpage)&&w.a.createElement("div",{className:"sub-facebook"},w.a.createElement("div",{className:"fb-like","data-layout":"button","data-action":"like","data-size":"large","data-show-faces":"false","data-share":"false"}),w.a.createElement("span",{className:"overlay-facebook-text"},"Like Us On Facebook")),w.a.createElement(T.default,o()({options:t,internalads:p},{eventFn:this.fireGa}))))}}]),a}(w.a.Component);q.defaultProps={checkOnLoad:!0,showOverlay:!1,collapseCallback:function(){}},a.default=q}}]);