(window.webpackJsonp=window.webpackJsonp||[]).push([[163],{528:function(e,t,o){"use strict";o.r(t),o.d(t,"default",function(){return d});var t=o(22),n=o.n(t),t=o(20),a=o.n(t),t=o(15),r=o.n(t),t=o(16),i=o.n(t),t=o(343),l=o.n(t),t=o(344),c=o.n(t),t=o(345),u=o.n(t),t=o(346),s=o(529);function f(o){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=u()(o);return t=n?(e=u()(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),c()(this,t)}}var d=function(e){l()(o,e);var t=f(o);function o(){return r()(this,o),t.apply(this,arguments)}return i()(o,[{key:"onCreate",value:function(){var e=this,t=JSON.parse(this.dom.getAttribute("data-config")),o=document.getElementsByTagName("script"),n=a()(o,1)[0],r=this.createElement("script","widget-profile-jssdk",t);this.addPolyfill(),window.requestIdleCallback?window.requestIdleCallback(function(){n.parentNode.insertBefore(r,n)}):n.parentNode.insertBefore(r,n),r.onload=r.onreadystatechange=function(){if(r.onload=null,r.onreadystatechange=null,void 0===window.UOL)return!1;"function"==typeof(((window.UOL||{}).perfil||{}).widgets||{}).Notify&&e.updateWidget(t,e)}}},{key:"addPolyfill",value:function(){window.requestIdleCallback||(window.requestIdleCallback=function(e,t){var o=(t=t||{}).timeout||1,n=performance.now();return setTimeout(function(){e({get didTimeout(){return!t.timeout&&performance.now()-n-1>o},timeRemaining:function(){return Math.max(0,performance.now()-n+1)}})},1)}),window.cancelIdleCallback||(window.cancelIdleCallback=function(e){clearTimeout(e)})}},{key:"createElement",value:function(e,t,o){if(!document.getElementById(t)){e=document.createElement(e);return e.id=t,e.crossOrigin="anonymous",e.src=o.sourceJs,e}}},{key:"updateWidget",value:function(e,t){var o=window.lib["babel-login"],r=document.querySelector(".news-notice .girouol #subscriber-cmp1"),a=void 0!==n()(r)&&null!==r;window.widgetProfile=window.UOL.perfil.widgets.Notify({avatarSize:e.avatarSize,avatarIconColor:e.avatarIconColor,widgetStyle:{username:e.widgetStyle.username,counter:e.widgetStyle.counter,zIndex:e.widgetStyle.zIndex},responsive:!0,enableSeeLater:!1,linkCheckout:{sg:"2668383698",sa:e["ga-id"]},target:"profile-avatar",portal:window.Config.portal.slug,callbacks:{onInit:function(e){var r=e.auth.isLogged?1:0;r&&(document.querySelector("li.sac").style.display="none"),t.mailNotify(e),document.querySelector(".header-services ul.services").style.display="flex",t.when("components/areas/estilo/horoscope",function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var n=Array.prototype.slice.call(t);n.length&&n.forEach(function(e,t){0==t&&e.getUserStatus(r)})})},onLogin:function(n){t.mailNotify(n),o&&o.setSession(n),a&&(r.value=n.auth.email.toLowerCase()),t.when("components/areas/estilo/horoscope",function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];Array.prototype.slice.call(t).forEach(function(e){e.onUserLogin(n.auth.isLogged)})}),t.when("components/areas/esporte/futebol/team-selector-home",function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];Array.prototype.slice.call(t).forEach(function(e){e.loadTeamByCookie(n.auth.isLogged)})})},onLogout:function(n){t.mailNotify(n),o&&o.logout(n),a&&(r.value=""),t.when("components/areas/estilo/horoscope",function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];Array.prototype.slice.call(t).forEach(function(e){e.onUserLogout(n.auth.isLogged)})}),t.when("components/areas/esporte/futebol/team-selector-home",function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];Array.prototype.slice.call(t).forEach(function(e){e.loadTeamByCookie(n.auth.isLogged)})})}}})}},{key:"mailNotify",value:function(e){var t,o=document.querySelector(".header #uol-mail-link, .bbolp-2014 #uol-mail-link");o&&(t=o.querySelector(".mail-notification"),e.auth.isLogged?s.a.init(function(e){e.url&&""!=e.url&&null!=n()(e.href)&&(o.href=e.url),1<=e.count&&(t.innerHTML='<em class="'+e.moreThan+'">'+e.countStr+"</em>")}):t.innerHTML="")}}]),o}(t.a)}}]);