  def('bootstrap/alert', function(){ def("alert",function(){$("body").on("click",".alert-open",function(e){e.preventDefault(),$(this).next(".alert").toggleClass("show")}),$("body").on("click",".alert-close",function(e){e.preventDefault(),$(this).parent(".alert").toggleClass("show")})}); });    def('bootstrap/forms', function(){ function FormFilter(e){var t,l,n=this,i={onOpen:!1,onClose:!1,onSelect:!1};function r(){var e=[].slice.call(arguments),t=e.shift();return e.unshift(this.element),"function"==typeof i[t]?i[t].apply(this,e):null}this.element=e,this.template=function(t,l,i){var r=l?new RegExp("("+l.join("|")+")","gim"):null,s=e.querySelector(".target");n.list||(n.list=t||[]),s.innerHTML=(t||n.list).map(function(e){return{text:e[1]||e[0],attrs:e[2]}}).reduce(function(e,t,l){if(r){var n=t.text.replace(/<[^>]+>/g,"").trim();r.test(n)&&(t.text=t.text.replace(n,n.replace(r,'<span class="result-highlight">$&</span>')))}var s="";if(t.attrs)for(var o=t.attrs.length-1;o>=0;o--)s+=t.attrs[o].name+"='"+t.attrs[o].value+"' ";return e+'<li class="select-option '+(i==l?"selected-term":"")+'" '+s+" >"+t.text+"</li>"},"");var o=s.querySelector(".selected-term");s.scrollTop=o?o.offsetTop-o.offsetHeight-18:0},this.config=function(e){$.extend(i,e)},t=null,(l=$(n.element)).off().on("click",".final-term, .svg-icon, .btn-close",function(e){e.preventDefault(),n.list&&n.template(n.list),toggleListResult.call(this)}).on("keyup",".input-term",function(e){var l;t&&(t=clearTimeout(t)),n.list||(n.list=(l=Array.prototype.slice.call(n.element.querySelectorAll(".select-option"))).length?l.reduce(function(e,t){return e.push([t.innerText,t.innerHTML,t.attributes]),e},[]):[]);var i=this;t=setTimeout(function(){inputKey.call(i,e,n)},120)}).on("click",".select-option",getText.bind(n)),l.on("form-filter-open",function(){r.call(n,"onOpen")}).on("form-filter-close",function(){r.call(n,"onClose")}).on("form-filter-select",function(e,t){r.call(n,"onSelect",e,t)})}function preventScroll(e,t){if(!t&&-1==!t.indexOf(lib.breakpoints.breakpoint.name)){var l,n=$("body"),i=$("html");e?(l=window.pageYOffset,i.css({overflow:"hidden"}),n.css({position:"fixed",top:-l})):(l=-parseInt(n.css("top")),i.css({overflow:""}),n.css({position:"",top:""}),window.scrollTo(0,l))}}function inputKey(e,t){var l=this.value,n=t.list;if(n)if("selected"in n||(n.selected=0),27==e.keyCode)t.template(n),toggleListResult();else if(l){var i=l.split(" ");if(38==e.keyCode)n.selected=n.selected>0?n.selected-1:n.indexes.length-1;else if(40==e.keyCode)n.selected=n.selected+1<n.indexes.length?n.selected+1:0;else{if(13==e.keyCode)return $(this).parents(".form-filter").find(".selected-term").trigger("click"),t.template(n),void toggleListResult();37!=e.keyCode&&39!=e.keyCode&&(n.selected=0,n.indexes=n.filter(function(e){return i.length==i.filter(function(t){return-1!=lib.string.slug(e[0]).indexOf(lib.string.slug(t))}).length}))}t.template(n.indexes,i,n.selected)}else t.template(n)}function toggleListResult(){var e=$(this).closest(".form-filter"),t=$(".form-filter").not(e).addClass("closed");t.find(".svg-icon > use")?t.find(".svg-icon > use").attr("xlink:href","#svg-single-arrow-down"):t.find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down");var l=e.toggleClass("closed");l.find(".svg-icon > use")?l.find(".svg-icon > use").toggleAttr("xlink:href","#svg-single-arrow-up","#svg-single-arrow-down"):l.find("i").toggleClass("icon-single-arrow-down icon-single-arrow-up"),$(".form-filter").not(e).each(function(){var e=$(this);e.hasClass("closed")||(e.addClass("closed").find("i").removeClass("icon-single-arrow-up").addClass("icon-single-arrow-down"),e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"]))}),e.length&&e.hasClass("closed")?(e.triggerHandler("form-filter-open"),preventScroll(!0,["xs"])):e.length&&(e.triggerHandler("form-filter-close"),preventScroll(!1,["xs"])),e.find(".input-term").focus().val("")}function getText(e){var t=$(e.currentTarget),l=t.closest(".form-filter");l.find(".final-term").html(t.html()),toggleListResult(),this.list&&(this.list.selected=t.index()),l.triggerHandler("form-filter-select",t.data())}expose.selector=".form-filter",expose.init=function(){this.FormFilter=new FormFilter(this.dom),$(this.dom).data("formFilter",this.FormFilter)},0!=$(document).find(".form-filter").length&&$(document).mouseup(function(e){0==$(e.target).closest(".form-filter").length&&toggleListResult()}),$(".drop-select").off().on("click",".drop-item",function(){var e=$(this),t=e.parents(".drop-select"),l=t.find(".selector").children("span"),n=null,i=parseInt(t.attr("data-open")),r=(parseInt(t.attr("data-selected")),e.prop("tagName").toLowerCase());if(i?t.attr("data-open",0):t.attr("data-open",1),t.find("p.selector").find("use").toggleAttr("xlink:href","#svg-single-arrow-up","#svg-single-arrow-down"),"label"==r){e.attr("data-default")?(n="0",t.find("input:checkbox").removeAttr("checked")):n="1",t.attr("data-selected",n);var s=e.children("span").html();l.html(s),t.find(".drop-item").removeClass("selected"),e.addClass("selected")}return!1}),0!=$(document).find(".drop-select[data-open=1]").length&&$(document).mouseup(function(e){var t=$(".drop-select[data-open=1]");t.is(e.target)||0!==t.has(e.target).length||(1==t.attr("data-open")&&t.attr("data-close-metric")&&hitAudience.countClick(t.attr("data-close-metric")),t.attr("data-open",0),t.find("p.selector").find("use").attr("xlink:href","#svg-single-arrow-down"))}); });    def('bootstrap/photo', function(){ def("photo",function(){expose.pinit=function(){var t=$(this.dom),i=navigator.userAgent||"";t.each(function(){var t=$(this),e="uol_"+Date.now(),n=$('<a class="pinit-btn" href="javascript:void()"><img height="24" src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a>'),o=t[0].classList.contains("img-placeholder")?" placeholder":"";t.wrap('<div class="pinit-wraper'+o+'"></div>'),n.insertAfter(t),n.on("click",function(){var i="http://br.pinterest.com/pin/create/button/?url="+location.protocol+"//"+location.host+location.pathname+"&media="+t.attr("data-src")+"&description="+document.title;hitAudience.countClick({component:"pinterest-on-images",reference:"compartilhe_pinterest",action:"clique"}),window.open(i,e,"height=550, width=750")}),i.match(/Windows Phone/i)?t.parent().on("click",function(){n.toggle()}):(t.parent().on("mouseover",function(){n.show()}),t.parent().on("mouseout",function(){n.hide()}))})},expose.init=function(){this.pinit()},expose.selector=".pinit-img"}); });    def('bootstrap/read-more', function(){ def("read-more",function(){"use strict";include("breakpoints"),expose.flag=!1,expose.update=function(t){var s=this.parse(this.dom.getAttribute("data-height"),{}),e=this.breakpoints.sortOptions(Object.keys(s),!0,!1),i=$(this.dom).find(".calc-height").length>0?$(this.dom).find(".calc-height"):$(this.dom);$(this.dom).removeClass("btn-hide").addClass("btn-show"),e&&0!=s[e].close&&s[e]["min-height"]<i.outerHeight()?this.flag||this.change(s[e].close+"px"):($(this.dom).addClass("btn-hide").removeClass("btn-show"),this.show(!1))},expose.scrollTop=function(t){var s=$(t).parents(".read-more").offset().top;s-=50,$("html,body").animate({scrollTop:s+"px"})},expose.hide=function(){this.flag=!1,this.update()},expose.show=function(t){!1!==t&&(this.flag=!0),this.change("auto")},expose.change=function(t){var s=$(this.dom);s.removeClass("auto"==t?"closed":"opened").addClass("auto"==t?"opened":"closed"),"auto"==t?s.removeAttr("style"):s.height(t)},expose.isOpen=function(){return this.flag},expose.toggle=function(){this.isOpen()?this.hide():this.show()},expose.init=function(){var t=this;if(this.update(),this.breakpoints.change(this,function(){setTimeout(function(){t.update()},500)}),!this.dom.querySelector(".read-more-btn")){$(this.dom).append('<div class="read-more-btn"><button class="btn btn-primary btn-large btn-first">Ver mais <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-down" /></svg></button><button class="btn btn-primary btn-large btn-last hide">Ver menos <svg class="svg-icon-view-box-small right-icon"><use xlink:href="#svg-single-arrow-up" /></svg></button></div>')}$(this.dom).on("click",".read-more-btn:last > .btn, .read-more-btn:last .btn-divisor",function(s){$(this).hasClass("btn-last")&&t.scrollTop(this,$(this).parent(".read-more")),t.toggle.call(t),$(this).parent().find(".btn").toggleClass("hide")})}}); });    def('modal', function(){ instances.modal=[];var bodyTopPosition=0;expose.create=function(){return new this.Modal},expose.open=function(e,o,t,s,n){var c=this.create();return o&&c.setMode.apply(c,o.split(":").reverse()),t&&c.setStyle(t),s&&c.setEvents(s),c.setContent(e,!0),-1==document.body.className.indexOf("modal-open")&&(n?(bodyTopPosition=document.body.scrollTop||document.documentElement.scrollTop,$("body").addClass("googleCaptcha")):document.body.style.top="-"+(document.body.scrollTop||document.documentElement.scrollTop)+"px"),document.body.className+=" modal-open",c},expose.Modal=function(){this.buildStructure(),this.enableUIControl(),this.enableEscClose(),this.enableClickClose(),"function"==typeof crazyloadinit&&this.addScrollEvent(crazyloadinit),instances.modal.push(this),$(this.dom).parent().prepend('<svg width="70px" height="70px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="loading uil-ring"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><defs><filter id="uil-ring-shadow" x="-100%" y="-100%" width="300%" height="300%"><feOffset result="offOut" in="SourceGraphic" dx="0" dy="0"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="0"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter></defs><path d="M10,50c0,0,0,0.5,0.1,1.4c0,0.5,0.1,1,0.2,1.7c0,0.3,0.1,0.7,0.1,1.1c0.1,0.4,0.1,0.8,0.2,1.2c0.2,0.8,0.3,1.8,0.5,2.8 c0.3,1,0.6,2.1,0.9,3.2c0.3,1.1,0.9,2.3,1.4,3.5c0.5,1.2,1.2,2.4,1.8,3.7c0.3,0.6,0.8,1.2,1.2,1.9c0.4,0.6,0.8,1.3,1.3,1.9 c1,1.2,1.9,2.6,3.1,3.7c2.2,2.5,5,4.7,7.9,6.7c3,2,6.5,3.4,10.1,4.6c3.6,1.1,7.5,1.5,11.2,1.6c4-0.1,7.7-0.6,11.3-1.6 c3.6-1.2,7-2.6,10-4.6c3-2,5.8-4.2,7.9-6.7c1.2-1.2,2.1-2.5,3.1-3.7c0.5-0.6,0.9-1.3,1.3-1.9c0.4-0.6,0.8-1.3,1.2-1.9 c0.6-1.3,1.3-2.5,1.8-3.7c0.5-1.2,1-2.4,1.4-3.5c0.3-1.1,0.6-2.2,0.9-3.2c0.2-1,0.4-1.9,0.5-2.8c0.1-0.4,0.1-0.8,0.2-1.2 c0-0.4,0.1-0.7,0.1-1.1c0.1-0.7,0.1-1.2,0.2-1.7C90,50.5,90,50,90,50s0,0.5,0,1.4c0,0.5,0,1,0,1.7c0,0.3,0,0.7,0,1.1 c0,0.4-0.1,0.8-0.1,1.2c-0.1,0.9-0.2,1.8-0.4,2.8c-0.2,1-0.5,2.1-0.7,3.3c-0.3,1.2-0.8,2.4-1.2,3.7c-0.2,0.7-0.5,1.3-0.8,1.9 c-0.3,0.7-0.6,1.3-0.9,2c-0.3,0.7-0.7,1.3-1.1,2c-0.4,0.7-0.7,1.4-1.2,2c-1,1.3-1.9,2.7-3.1,4c-2.2,2.7-5,5-8.1,7.1 c-0.8,0.5-1.6,1-2.4,1.5c-0.8,0.5-1.7,0.9-2.6,1.3L66,87.7l-1.4,0.5c-0.9,0.3-1.8,0.7-2.8,1c-3.8,1.1-7.9,1.7-11.8,1.8L47,90.8 c-1,0-2-0.2-3-0.3l-1.5-0.2l-0.7-0.1L41.1,90c-1-0.3-1.9-0.5-2.9-0.7c-0.9-0.3-1.9-0.7-2.8-1L34,87.7l-1.3-0.6 c-0.9-0.4-1.8-0.8-2.6-1.3c-0.8-0.5-1.6-1-2.4-1.5c-3.1-2.1-5.9-4.5-8.1-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2 c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3 c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4,0-0.7,0-1.1c0-0.7,0-1.2,0-1.7C10,50.5,10,50,10,50z" filter="url(#uil-ring-shadow)"></path></svg>')},expose.Modal.prototype={mode:"normal",upmode:"",fx:{name:"fade",speed:200},visible:!1,onshow:function(){},onbeforeshow:function(){},onhide:function(){},onclose:function(e){if(e&&e.category){var o=e&&this.audienceObject(e);o&&hitAudience.countClick(o)}},audienceObject:function(e,o){return o=o||"","click"==e.type&&-1!=e.target.className.indexOf("icon-close")?o="fechar-modal":"click"==e.type&&-1!=e.target.className.indexOf("no-load")?o="fechar-clique-fora":"keyup"==e.type&&-1!=e.target.className.indexOf("modal-open")&&(o="fechar-esc-keyup"),e={reference:o,category:"login-"+e.category,action:"clique"}},onbeforeclose:function(){$("body").hasClass("googleCaptcha")&&(document.body.style.top=-1*bodyTopPosition+"px",$("body").removeClass("googleCaptcha"),$("body").removeClass("modal-open"))},visible_:!1,esc_:!1,click_:!1,queue_:[],setMode:function(e,o,t){t?this.fx.name=t:e&&(this.fx.name=e),e&&(this.closure.className+=" modal-mode-"+(this.mode=e)),void 0!==o&&(this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,"")),this.upmode=o,document.body.className+=" modal-"+this.upmode)},setEvents:function(e){for(var o in e)this[o]=e[o]},setStyle:function(e){$(this.dom).css(e)},setContent:function(e,o){if(!0===o&&(o=this.show),e instanceof jQuery&&(e=e.get(0)),e instanceof Node&&(e=e.outerHTML),"object"==typeof e){var t=(Config||{}).servicename!=undefined?Config.servicename:"/service/",s=(e.path||t)+"?json&loadComponent="+e.type+"&data="+encodeURIComponent(JSON.stringify(e.args))+"&configPath="+e.configPath;this.setMode(null,e.type),def.prototype.getjson.call(this,s,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()})}else-1==e.indexOf("\n")&&/^(https?:)?\/+[a-z0-9]|\..{2,4}$/.test(e)?def.prototype.getjson.call(this,e,function(e){this.dom.innerHTML=e.body,o&&o.call(this),render()}):(this.dom.innerHTML=e,o&&o.call(this),render())},show:function(e){if(this.visible=!0,this.closure.className=this.closure.className.replace(/\s+hide/,""),0==this.onbeforeshow())return!1;var o=this;"left"==this.fx.name?$(this.dom).animate({left:"0"},"normal",function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):"fade"==this.fx.name?$(this.dom).hide().fadeIn(this.fx.speed,function(){e&&e.call(o),o.onshow(),render(),$(o.closure).addClass("no-load")}):(e&&e.call(o),this.onshow(),$(o.closure).addClass("no-load"))},hide:function(e){this.visible=!1;var o=this;"left"==this.fx.name?($(this.closure).fadeOut(),$(this.dom).animate({left:"-100%"},"normal",function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()})):"fade"==this.fx.name?$(this.dom).show().fadeOut(this.fx.speed,function(){o.closure.className+=" hide",e&&e.call(o),o.onhide()}):(this.closure.className+=" hide",e&&e.call(this),this.onhide()),this.upmode&&(document.body.className=document.body.className.replace(" modal-"+this.upmode,""));e:{for(var t=instances.modal.length;t--;)if(instances.modal[t].visible)break e;var s=Math.abs(parseInt(document.body.style.top));document.body.className=document.body.className.replace(/\smodal-open/g,""),document.body.removeAttribute("style"),window.scrollTo(0,s)}},enableUIControl:function(){var e=this;$(this.closure).on("click",".modal-close",function(o){o.preventDefault(),e.close(o);var t=$("head meta[name=viewport]"),s=t.attr("content");t.remove(),$("head").prepend('<meta name="viewport" content="'+s+'" />')})},enableEscClose:function(){this.esc_=!0},disableEscClose:function(){this.esc_=!1},enableClickClose:function(){this.click_=!0},disableClickClose:function(){this.click_=!1},addButtonClose:function(e,o){o=o||"fechar-modal";$(this.dom).prepend('<button class="btn modal-close" data-audience-click=\'{"reference":"'+o+'","component":"'+e+'"}\'><i class="icon-close-2"></i></button>')},addHeader:function(e,o){var t="",s=this.dom;"object"==typeof e?(t=e.html,s=e.closure?this.closure:s):(e&&(t+="<h4>"+e+"</h4>"),o&&(t+='<p class="node"><small>'+o+"</small></p>")),t='<div class="modal-header">'+t+"</div>",$(".modal-header",this.dom).remove(),"BUTTON"==(this.dom.firstElementChild||{}).nodeName?$(this.dom.firstElementChild).after(t):$(s).prepend(t)},addScrollEvent:function(e){var o=this;$(this.dom).on("scroll",function(){e.apply(o,arguments)})},standalone:function(){for(var e=instances.modal.length;e--;){var o=instances.modal[e];o!==this&&(o.visible_=o.visible,o.visible&&o.hide(),this.queue_.push(instances.modal.splice(e,1)[0]))}},close:function(e){if(!1!==this.onbeforeclose()){e&&document.getElementsByClassName("modal-mode-babel-login").length&&(e.category=document.getElementsByClassName("modal-mode-babel-login")[0].dataset.category);for(var o=instances.modal.length;o--&&instances.modal[o]!==this;);if(-1!=o){for(var t=instances.modal.length;--t>o;)instances.modal.splice(t,1)[0].close();instances.modal.splice(o,1)}this.hide(function(){if(this.closure.parentNode.removeChild(this.closure),this.close=function(){},this.onclose(e),this.queue_.length){for(var o=this.queue_.length;o--;)this.queue_[o].visible_&&this.queue_[o].show();instances.modal=this.queue_}})}},buildStructure:function(){this.closure=document.createElement("div"),this.closure.className="modal",this.dom=document.createElement("div"),this.dom.className="modal-wrapper",this.closure.appendChild(this.dom),document.body.appendChild(this.closure)},unique:function(){for(var e=instances.modal.length;e--;)instances.modal[e]!==this&&instances.modal[e].close()}},window.addEventListener("keyup",function(e){switch(e.which||e.keyCode){case 27:var o=instances.modal&&instances.modal.slice(-1)[0];o&&o.esc_&&o.close(e)}}),window.addEventListener("click",function(e){var o=instances.modal&&instances.modal.slice(-1)[0];if(o&&o.click_){for(var t=window.SVGElementInstance&&e.target instanceof SVGElementInstance?e.target.correspondingUseElement:e.target;t&&("object"==typeof t.className||!t.className||-1==t.className.indexOf("modal-wrapper")&&-1==t.className.indexOf("loginbox"));)t=t.parentNode;t||o.close(e)}document.querySelector(".wrapper-header")&&document.querySelector(".wrapper-header").classList.remove("positioning")},!0); });    def('babel', function(){ "use strict";function like(e){action.call(this,"like",e)}function dislike(e){action.call(this,"dislike",e)}function action(e,i){return e?i?void lib["babel-login"].login().then(function(o){o.token&&lib["babel-service"].get({type:"message",service:e,id:i,params:{token:o.token}}).then(function(e){if(e.error)return alert(e.error),!1})}):(console.log("Informe o ID do comentário."),!1):(console.error("Informe o tipo da ação (like/dislike)."),!1)}expose.like=like,expose.dislike=dislike; });    def('babel-login', function(){ def("babel-login",["widget-profile","babel-service","babel","modal"],function(){"use strict";var e="babel.user.",o={opener:".babel-login, .pill.not-logged",modal:".modal",user:"#loginUser",password:"#loginPassword",login:"#login",logout:".logout, .pill.logged",message:"label.error",social:".login .loginWith a",changeView:".login .backToLogin a"};function n(){return!!widgetProfile&&widgetProfile.Login.isUserLoggedIn()}function t(){var o=this,n="object"==typeof widgetProfile&&widgetProfile.Settings.getAuth();events.emit(e+"login.success",null,["Usuário checado",n]),o.checkStatus().then(function(o){200==+o.code&&o.result&&o.result.user?5!=o.result.user.userStatus&&7!=o.result.user.userStatus||events.emit(e+"needNickname",null,["Usuário necessita um apelido"]):events.emit(e+"login.checked",null,["Usuário checado",o])},function(){setTimeout(function(){t.call(o)},1e3)})}function i(){var e,o=this,n=$.Deferred();return(e={product:"noticias",source:"UOL",auto_import:!0},console.debug("checkLogin ",e),lib["babel-service"].get({type:"user",service:"login",params:e||{}})).then(function(e){e&&"code"in e&&(200==+e.code||401==+e.code||428==+e.code)&&"result"in e&&"isLogged"in e.result?(o.session=e.result,o.session.code=+e.code,200===o.session.code&&o.session.isLogged&&o.persist(),n.resolve(o.session)):n.reject({type:"error",msg:"Houve um problema na autenticação do usuário. Tente novamente."})}),n.promise()}function s(o){o="function"==typeof o?o:function(){};var n=this;widgetProfile&&widgetProfile.Login.doLogout(!1,function(){n.session=!1;try{instances.header[0].showItens(0)}catch(s){console.error("[widget-profile] A função instances.header[0].showItens() não existe!")}events.emit(e+"logout.success",null,"Deslogado com sucesso!"),document.querySelector(".header, .bbolp-2014").querySelector("#uol-mail-link").querySelector(".mail-notification").innerHTML="";var t=document.querySelector(".news-notice .girouol #subscriber-cmp1"),i=!1;typeof t!==undefined&&null!==t&&(i=!0),i&&(t.value=""),o()})}function a(){clearTimeout(window.persistence)}function r(e){var o="",n=e.separator||"&";return e.separator&&delete e.separator,jQuery.each(e,function(e,t){o+=(o.length?n:"")+encodeURIComponent(e)+"="+encodeURIComponent(t)}),o}function l(e){if("boolean"==typeof e.isLogged&&localStorage.getItem("porteira-login")){var o=e.isLogged?"login-success":"login-failure",n=JSON.parse(localStorage.getItem("porteira-login"));localStorage.removeItem("porteira-login"),e={category:n.component,reference:n.network,action:o},"undefined"!=n.component&&hitAudience.countEvent(e)}else if("string"==typeof e){let o=document.getElementsByClassName("modal-wrapper")[0].dataset.category;localStorage.setItem("porteira-login",JSON.stringify({network:e,component:o}))}}expose.session=!1;var c={fields:o.user+","+o.password+","+o.login,inputs:o.user+","+o.password,enabled:function(e){$(c.fields).attr("disabled",!e)},hasFocus:function(){$(this).closest("label")["focusin"==event.type||"focus"==event.type?"addClass":"removeClass"]("focus")},changeView:function(e){e.preventDefault(),$(".login .modal-body").toggleClass("alternative")}},u={login:function(e){var o={network:{facebook:{sn:1,source:"FACEBOOK"},twitter:{sn:5,source:"TWITTER"}}[(e=$.extend(!0,{type:"login",network:"facebook"},e)).network].sn,type:e.type,url:location.protocol+"//"+location.host+'/service/?loadComponent=babel-login&data={"closeWindow":true}'};l(e.network),c.enabled(!1);var n=window.open("","socialLogin",r({separator:",",width:600,height:600,scrolling:"no",statusbar:"no",resizeable:"no"}));lib["babel-service"].get({type:"user",service:"socialStart",params:{sn:o.network,social_auth_type:o.type,url_callback:o.url}}).then(function(e){var t={separator:"&",sn:o.network,"x-uol-social-tk":e.result.socialtoken};n.location.href="https://social.api.uol.com.br/oauth?"+r(t)})},select:function(e){e.preventDefault(),u.login({network:$(this).text().trim().toLowerCase()})},attempts:0,callback:function(e){var o=lib["babel-login"];if(e.success){var n=function(){i.call(o).then(function(e){!e.isLogged&&u.attempts<=1?(u.attempts++,setTimeout(n,1e3)):(u.attempts=0,g.instance&&g.newWindow&&g.close&&g.close(),events.emit("babel.user.login.success",null,["Logado com sucesso!",g]),o.loginRegister({isLogged:e.isLogged}))},function(){setTimeout(function(){u.callback.call(null,e)},1e3)})};setTimeout(n,100)}else d.error("Ocorreu um erro na autenticação por Rede Social. Tente novamente mais tarde!"),o.loginRegister({isLogged:!1})}},g={template:null,instance:null,newWindow:!0,getTemplate:function(e,o){if(g.template)g.template=g.template.replace(/(:"login)(-\w+)*/gi,"$1-"+o),e();else{var n={type:"babel-login",args:{page:window.location.href.replace(/#.*/,""),category:o}},t=new XMLHttpRequest;t.open("GET","/service/?loadComponent="+n.type+"&data="+encodeURIComponent(JSON.stringify(n.args))),t.onload=function(){g.template=t.responseText,e()},t.send()}},open:function(o){o.preventDefault();var t=o.currentTarget.dataset.category||"undefined",i=$.Deferred(),s={};"undefined"!=t&&(s={action:"open",loginStyle:{hideOutdoor:!1,title:"Acesse sua conta",subtitle:"Para dar sua opinião, participar do debate e interagir com os demais leitores, faça seu login no UOL."},metrics:{category:t}}),console.debug("BABEL OPEN",t);var a=function(){widgetProfile.View.widgetModal(s,function(){console.debug("OPEN to login! - modal.open",t)})};401===lib["babel-login"].session.code&&lib["babel-login"].isLogged()||428===lib["babel-login"].session.code?lib["babel-login"].logout(a):a();var r=o.data&&o.data.instance||{};if(!!n.apply(r)){var l=$(this).data("config")||{};events.emit(e+"logged",null,["Usuário logado!",l])}return i.promise()},close:function(){g.instance.close&&g.instance.close()}},d={login:function(o){var n=o.data.instance;n.loginRegister("uol"),n.session=!1,n.login().then(function(o){o.type&&"error"==o.type?(d.error(o.msg),n.loginRegister({isLogged:"error"!=o.type})):(console.debug("self.login else",o),n.loginRegister({isLogged:!0}),events.emit(e+"login.success",null,["Logado com sucesso!",g]))})},logout:function(o){var n=o.data.instance;s.call(n),n.unpersist(),events.emit(e+"logout.success",null,"Deslogado com sucesso!"),"object"==typeof widgetProfile&&widgetProfile.reloadWidget()},error:function(o){$(".login .form").addClass("hasError").find(".error").text(o).removeClass("hidden").end().find("input").filter(function(){return""==this.value}).first().focus(),c.enabled(!0),l({islogged:!1}),events.emit(e+"login.fail",null,o)}};$("body").on("close",o.modal,g.close).on("click",o.opener,{instance:expose},g.open).on("click",o.login,{instance:expose},d.login).on("click",o.logout,{instance:expose},d.logout).on("click",o.social,u.select).on("click",o.changeView,c.changeView).on("focusin focusout",c.inputs,c.hasFocus),expose.login=function(){var e=$.Deferred();return this.isLogged()?(events.emit("babel.user.login.success",null,["Logado com sucesso!",g]),e.resolve(this.session)):function n(){var e=this,t=$.Deferred(),i=$(o.user).val(),s=$(o.password).val();if($(o.message).html(""),console.debug("doLogin"),!i||!s){var a=i?"Informe a senha.":"Informe o usuário.";return t.resolve({type:"error",msg:a})}return $.ajaxFrame({url:lib["babel-service"].routes.url.auth,data:{user:i,pass:s},callback:function(){e.checkStatus().then(function(e){t.resolve(e.isLogged?e:{type:"error",msg:"Email ou senha informados estão incorretos."})},function(){setTimeout(function(){n.call(e)},1e3)})}}),t.promise()}.call(this)},expose.logout=s,expose.modalLogin=g.open,expose.isLogged=n,expose.socialLogin=u.login,expose.whereAmI=function(){return lib["babel-service"].get({type:"user",service:"socialSimpleWhereAmI"})},expose.setSession=t,expose.checkStatus=i,expose.persist=function f(){var e;a(),(e={type:"user",service:"ping",params:{token:lib["babel-login"].session.token}},lib["babel-service"].get(e)).then(function(e){e.error||"pong"!==e.result.ping||(window.persistence=setTimeout(function(){f()},9e5))})},expose.unpersist=a,expose.loginRegister=l,window.callbackSocialLogin=u.callback,window.onfocus=function(e){var o=lib["babel-login"];if(e.currentTarget===window&&o){var n=o.isLogged(),i=function(){for(var e=document.cookie.split(";"),o=0;o<e.length;o++){for(var n=e[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf("CAUBR01="))return n.substring("CAUBR01=".length,n.length)}return"eos"}();(!n&&"eos"!=i||n&&"eos"==i)&&t.call(o)}};var p=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;"xs"==lib.breakpoints.breakpoint.name&&p&&document.addEventListener("widgetNotifyModalLogin",function(e){var o=e.detail;"modal-open"===o.action?$(".header").addClass("modal-login-ios"):"modal-close"===o.action&&$(".header").removeClass("modal-login-ios")},!0),jQuery.ajaxFrame=function(e){var o,n,t;e=jQuery.extend({data:{},dataType:"post",callback:jQuery.noop},e);var i="ajax-frame-"+(new Date).getTime(),s=jQuery('<iframe scrolling="no" frameborder="0" name="'+i+'"></iframe>');for(t in o='<form action="'+e.url+'" method="'+e.dataType+'" target="'+i+'">',e.data)e.data.hasOwnProperty(t)&&(o+='<input type="hidden" name="'+t+'" value="'+e.data[t]+'"/>');o+="</form>",n=jQuery(o),s.hide().appendTo("body"),n.appendTo("body").hide(),window.setTimeout(function(){s.load(function(){window.setTimeout(function(){s.remove()},500),n.remove(),e.callback.apply(this,arguments)}),n.submit()},500)}}); });    def('babel-service', function(){ def("babel-service",["/exposejs/jsonp-promise"],function(){"use strict";var e="https://n.comentarios.uol.com.br/",o={url:{auth:"https://acesso.uol.com.br/login.html?skin=comentarios&dest=REDIR|"+location.protocol+"//www3.uol.com.br/interacao/comentarios/blank.htm"},messages:{subject:"v1/messages/subject/{id}",editor:"v1/messages/editor-recommended/{id}",likesBySubject:"v1/users/likes-by-subject/{id}",parent:"parent/{id}"},subject:{retrieve:"ws/v1/subject/retrieve/{id}",simpleRetrieve:"ws/v1/subject/simple-retrieve/"},user:{login:"ws/v2/user/login",logout:"ws/v1/user/logout",create:"ws/v2/user/create",update:"ws/v2/user/update",ping:"ws/v1/user/ping",updateNotification:"ws/v1/user/update/reply-notification",updateNotificationType:"ws/v1/user/update/reply-notification-type",socialStart:"ws/v1/user/social/start-session",socialSimpleWhereAmI:"ws/v1/user/social/simple-where-am-i",socialWhereAmI:"ws/v1/user/social/where-am-i"},message:{create:"ws/v2/message/create",preview:"ws/v1/message/preview",del:"ws/v1/message/delete/{id}",edit:"ws/v2/message/edit/{id}",createSubject:"ws/v2/message/create/subject",pin:"ws/v1/message/pin/{id}/{id}",unpin:"ws/v1/messager/unpin/{id}",like:"ws/v1/message/like/{id}",dislike:"ws/v1/message/dislike/{id}"}};expose.get=function(s){var a;if(a={user:e,message:e,messages:"https://view.comentarios.uol.com.br/",subject:"https://view.comentarios.uol.com.br/"}[s.type]+function(e){return o[e.type][e.service].replace(/{id}/,e.id)}(s),s.params){var i;for(i in s.params)s.params.hasOwnProperty(i)&&"sort"!==i&&(s.params[i]=encodeURIComponent(s.params[i]));a+="?"+$.param(s.params)}return lib["jsonp-promise"]&&lib["jsonp-promise"].jsonp(a,s.service).error(function(e){var o="Ocorreu uma falha na requisição de dados.",a=s.root&&s.root.dom||!1;a?events.emit("babel.service.feedback",a,o):events.emit("babel.service.feedback",null,o)})},expose.routes=o,expose.messageHandler=function(e){if(!e)return console.log("Sem param"),!1;var o={api:{423:"Assunto inativo",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Proteção antiflood",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Falha na autenticação",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},friendlyMessage:{200:{message:{create:"Seu comentário foi enviado com sucesso.",del:"Seu comentário foi removido com sucesso.",preview:"",edit:"",createSubject:"",pin:"",unpin:"",like:"",dislike:""}},423:"Esta discussão foi encerrada",425:"Usuário não encontrado",426:"Assunto não encontrado",427:"Mensagem não encontrada",428:"Você já avaliou esta mensagem",431:"Token de autenticação inválido",432:"Ops!\n Aguarde alguns instantes antes de publicar seu novo comentário",433:"Json inválido",434:"Critério de avaliação inválido",435:"Critério de avaliação não encontrado",436:"Usuário não tem permissão",440:"Tempo para responder foi excedido.\n Por favor, faça novamente o login.",444:"Tema não encontrado",446:"Falha na autorização",451:"Turing inválido",458:"Avaliação e comentários obrigatórios",500:"Operação não realizada, verifique os dados*"},events:{200:"babel:success",400:"babel:invalid-parameter",422:"babel:subject:invalid-size",431:"babel:user:nickname",423:"babel:subject:close",432:"babel:user:anti-flood",436:"babel:user:not-allowed",440:"babel:session-expired"}},s={},a="Seu comentário foi enviado com sucesso.",i=+e.data.code,r=e.data.callback||jQuery.noop;if(!i)throw"Erro na API";200===i?(s=e.data.result,o.friendlyMessage[i][e.type]&&(a=o.friendlyMessage[i][e.type][e.service]),+s.pending_messages&&+s.user_pending_messages&&(a={badword_disapproved:"Seu comentário contém URL ou palavras de abuso. \nEscreva novamente seu comentário em <var>15</var> segundos",pending:"Seu comentário foi enviado com sucesso para moderação. \nHá "+s.pending_messages+" "+(1==s.pending_messages?"comentário":"comentários")+" na fila de moderação. "+s.user_pending_messages+" "+(1==s.user_pending_messages?"foi enviado":"foram enviados")+" por você."}[s.moderation_status.toLowerCase()],"badword_disapproved"==s.moderation_status.toLowerCase()&&(i=432))):a=o.friendlyMessage[i][e.type]?o.friendlyMessage[i][e.type][e.service]:o.friendlyMessage[i];var n={msg:a,code:i,callback:r};return e.root.dom?(n.button=e.button,events.emit("babel.service.feedback",e.root.dom,n)):events.emit("babel.service.feedback",null,n),a}}); });    def('comments', function(){ def("comments",function(){"use strict";include("angular","babel","teaser","modal","/exposejs/jsonp-promise");var e=e||{};$("body").on("click",".open-comments",function(){var e=$(this);if("string"==typeof(t=e.data("config")||!1))var t=JSON.parse(t.replace(/\'/g,'"'));if(!t||!t.id)return console.log("Não há dados de configuração setados neste botão"),!1;e.removeAttr("data-config");var n={type:"comments",args:$.extend({},t)};n.args.hasOwnProperty("modalOpen")&&(n.args.modalOpen=":"+n.args.modalOpen);var o=lib.modal.open(n,n.type+(n.args.modalOpen||""));o.onshow=function(){$(".babel-login",this.closure).data("modalOpen",t.modalOpen)},o.onbeforeshow=function(){var e=$(".comments:first",this.closure),n=e.data("config"),i=$.extend(!0,{},n,t);e.data("config",i),o.addButtonClose("comments"),render.call(this)},o.onclose=function(e){}}),expose.init=function(){var t=angular.module("comentario",[]).filter("html",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]),n=this;this.$dom=$(this.dom),window.socialSimpleWhereAmI=window.socialSimpleWhereAmI||"";n.$dom.hasClass("display-inline");var o,i=this.$dom.data("initial-size");this.babel=lib.babel,this.babelLogin=lib["babel-login"],this.babelService=lib["babel-service"],t.constant("config",(o=n.$dom.data("config")||{},n.$dom.removeAttr("data-config"),o)),t.value("docs",[]),t.value("tabFilter",{type:"all",size:i||5,sort:"created:desc"}),t.run(function(){events.push("babel.service.feedback",n.$dom,function(e){var t=e.split?e:e.msg,o=e.code||0,i=e.callback||null,r=(t=t.split("\n")).length,s=t[0],a="";if(r>1){for(var c=1;c<r;c++)a+=(1==c?"<p>":"<br/>")+t[c];a+="</p>"}var l,u='<div class="row alert alert-'+(200===o?"success":"danger")+'"><h3>'+s+"</h3>"+a+'<a class="alert-close"><i class="icon-close-2"></i></a></div>',d=e.button==undefined?n.$dom.find(".feedback-service").first():n.$dom.find(e.button).parents(".comment-reply").find(".feedback-service"),m=d.offset().top,f=d.parent();function g(e){d.css("height",0).parent().css("height","auto"),window.setTimeout(function(){d.removeClass("show").html("")},300),e&&e.call&&e.call(this),closingAlert&&window.clearTimeout(closingAlert)}f.css("height",f.outerHeight()),window.scrollY>m&&window.scrollTo(0,d.offset().top),d.html(u).addClass("show"),l=d.find(".alert").outerHeight(),d.add(f).css("height",l).find(".alert").addClass("show"),d.find(".alert-close").bind("click",function(){g(i)}),window.closingAlert=window.setTimeout(function(){d.find(".alert").length&&g(i)},3e4)}),$(".feedback-service").ajaxError(function(e,t,o){events.emit("babel.service.feedback",n.$dom,"Error requesting page "+o.url)})}),t.filter("brDate",[function(){return function(e){return e.trim().replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,"$3/$2/$1 $4:$5:$6")}}]),t.filter("prettyDate",[function(){return function(e){var t=new Date((e||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=((new Date).getTime()-($(window).data("server-date-diff")||0)-t.getTime())/1e3,o=Math.floor(n/86400);if(!(isNaN(o)||o<0)){var i=Math.ceil(o/7);return 0===o&&((n<60?"agora":n<120&&"1 minuto")||n<3600&&Math.floor(n/60)+" minutos atrás"||n<7200&&"1 hora atrás"||n<86400&&Math.floor(n/3600)+" horas atrás")||1==o&&"ontem"||o<7&&o+" dias atrás"||7==o&&"1 semana atrás"||i<=5&&Math.ceil(o/7)+" semanas atrás"||i>5&&e.replace(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}).*/g,"$3/$2/$1 $4h$5")}}}]),t.filter("formatDate",[function(){return function(e){return e.trim().replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/,"$1-$2-$3T$4:$5:$6Z")}}]),t.filter("inversedDate",[function(){return function(e){if(!(e instanceof Date))return!1;function t(e){return(e<10?"0":"")+e}return e.getFullYear()+t(e.getMonth())+t(e.getDate())+t(e.getHours())+t(e.getMinutes())+t(e.getSeconds())}}]),t.filter("htmlentities",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]),t.directive("ngImgonerror",function(){return{restrict:"A",link:function(e,t,n){t.bind("error",function(){$(this).attr("src","https://imguol.com/c/_layout/v2/components/comments/avatar.png").attr("title","O avatar não foi encontrado!").parent().addClass("img-error")})}}}),t.directive("ngHasTeaser",function(){return{restrict:"A",link:function(e,t,o){var i=t.find("textarea"),r=t.find(".teaser"),s=o.ngHasTeaser||960;n.teaser.create({dom:t,input:i,output:r,invert:!0,limit:s})}}}),t.directive("ngHasFocus",function(){return{restrict:"A",link:function(e,t,n){$(t).closest("label")["focusin"==event.type||"focus"==event.type?"addClass":"removeClass"]("focus")}}}),t.directive("ngAutoHeight",function(){return{restrict:"A",link:function(e,t,n){t.on("keyup",function(){var e=$(this),t=e.val(),n=e.css("max-height"),o=n.replace(/(\d+).*/,"$1");e.next().is(".resize")||e.after('<div class="resize"/>');var i=e.next(".resize");t=t.replace(/\n/g,"<br/>"),i.html(t+'<br class="lbr" />'),n.length&&e.css("overflow",i.height()>=o?"auto":"hidden"),e.css("height",i.height())}).on("keydown",function(){if($(this).hasClass("babel-login"))return!1}).on("focus",function(e){$(this).hasClass("babel-login")&&(e.preventDefault(),$(this).blur())}).on("focus",function(e){$("head meta[name=viewport]").remove(),$("head").prepend('<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />')}).focusout(function(){$("head meta[name=viewport]").remove(),$("head").prepend('<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=10.0, user-scalable=yes" />')})}}}),t.service("Rating",function(){this.get=function(e){var t=e?$(e).first():n.$dom.find(".comment-post").first(),o=t.find(".rating").find(".rating-star").length,i=t.find(".rating").attr("data-rating");return!(!o||!i)&&i/o*100},this.reset=function(e){var t=e?$(e).first():n.$dom.find(".comment-post").first();t.find(".rating").find(".rating-star").removeClass("on"),t.find(".rating").attr("data-rating","0")},this.set=function(e){for(var t=[],n=1;n<=5;n++)t.push(parseInt(+e/20)>=n);return t}}),t.factory("User",[function(){var e,t={},o="https://imguol.com/c/_layout/v2/components/comments/avatar.png",i="Usuário não logado";return{get:function(e){return e?e in t&&t[e]:t},set:function(r,s,a){e=n.babelLogin.session,r&&r in e&&(e[r]=s),t.isLogged=e.user&&!0,t.uniqueId=e.user&&e.user.uniqueId,t.loggedWithFacebook=e.user&&"facebook"===e.user.socialNetwork.toLowerCase(),t.loggedWithTwitter=e.user&&"twitter"===e.user.socialNetwork.toLowerCase(),t.loggedWithUol=e.user&&"uol"===e.user.socialNetwork.toLowerCase(),"facebook"===window.socialSimpleWhereAmI?(t.loggedWithTwitter=!1,t.loggedWithFacebook=!0):"twitter"===window.socialSimpleWhereAmI&&(t.loggedWithTwitter=!0,t.loggedWithFacebook=!1),t.avatarUrl=(e.user&&e.user.avatarUrl||o).replace("http:","https:"),t.alternativeText=e.user&&e.user.username||i},getSession:function(){return e},setSession:function(){return n.babelLogin.setSession()}}}]),t.factory("Likes",["$filter","User","config",function(e,t,o){var i={};return{getFromUser:function(e){var r=$.Deferred(),s=t.get("isLogged",Object.keys(i));return!s||Object.keys(i).length?(s||(i={}),r.resolve(!0)):(n.babelService.get({type:"messages",root:{dom:n.$dom},service:"likesBySubject",id:o.id}).then(function(e){return i=e.docs||{},r.resolve(!0)}),r.promise())},apply:function(e){return e in i},it:function r(o,s,a,c){function l(){c||(o.like++,o.likedByMe=!0,i[o.id]=e("inversedDate")(new Date))}t.get("isLogged")?(n.babel[s](o.id),l()):(l(),window.setTimeout(function(){t.set(),r(o,s,a,!0)},1e3))}}}]),t.service("Action",["Subject","User","Likes","Rating","config",function(e,t,o,i,r){var s=[];this.create=function(){var e,o=this,a=t.getSession(),c=(o.newText||"").trim(),l=i.get();if(hitAudience.countClick({component:"comments",reference:"enviar-comentario"}),!l&&!c.length)return events.emit("babel.service.feedback",n.$dom,"Avaliação ou comentário obrigatórios."),!1;(e=$.Deferred(),s.length?e.resolve(s):n.babelLogin.whereAmI().then(function(t){if(200==+t.code)for(var n in t.result){var o=t.result[n];s.push(o.snname)}e.resolve(s)}),e.promise()).then(function(e){var t={type:"message",root:{dom:n.$dom},service:"create",params:{subject:r.id,token:a.token,product:"noticias",source:"UOL"}};""!==c&&(t.params.message=c),l&&(t.params.rating='{"344": "'+l+'"}'),n.babelService.get(t).then(function(e){t.data=e,n.babelService.messageHandler(t),200==+e.code&&(i.reset(),o.newText="",o.refresh())})})},this.del=function(e,o){var i=this,r=o||e,s=t.getSession(),a={type:"message",root:{dom:n.$dom},service:"del",id:r.id,params:{token:s.token}};n.babelService.get(a).then(function(t){if(a.data=t,n.babelService.messageHandler(a),200==+t.code){if(r.del=!0,o)e.reply_count>0&&e.reply_count--;i.refresh()}})},this.reply=function(e,o){var i=this,s=o.currentTarget,a=t.getSession(),c=e.replyText[e.id],l={type:"message",service:"create",button:s,root:{dom:n.$dom},params:{subject:r.id,parent:e.id,message:c,token:a.token}};hitAudience.countClick({component:"comments",reference:"enviar-resposta"}),n.babelService.get(l).then(function(t){l.data=t,n.babelService.messageHandler(l),200==+t.code&&(e.replyText[e.id]="",e.replyit=!0,setTimeout(function(){e.replyit=!1,i.refresh()},5e3))})},this.like=function(e,t){return o.it(e,"like",t)},this.logout=function(){$(".comment-fadOut").fadeOut(function(){n.babelLogin.logout()}),hitAudience.countClick({component:"comments",reference:"deslogar"})}}]),t.factory("Subject",["config","tabFilter",function(e,t){if(e.id){var o={comments:{},subject:{}},i=function(t){return n.babelService.get({type:"messages",root:{dom:n.$dom},service:t.service,id:e.id,params:t.params})};return{get:function(e){return o.subject[e]||o.subject},load:function(r){var s=$.Deferred();function a(){i(r).then(function(e){return o.comments="docs"in e?e:undefined,s.resolve({data:o})})}return(r=angular.extend({params:{}},r)).service="subject",r.next&&(r.params.next=r.next),r.prev&&(r.params.prev=r.prev),r.params.size=t.size,r.size&&(r.params.size=r.size),Object.keys(o.subject).length?a():function(t){return n.babelService.get({type:"subject",service:"retrieve",root:{dom:n.$dom},id:e.id,params:t.params})}(r).then(function(e){if(200!=+e.code)return s.resolve({hasError:!0,result:e});o.subject=e,a()}),s.promise()}}}}]),t.controller("CommentsController",["$scope","Subject","User","Action","Rating","Likes","config","docs","tabFilter",function(t,o,i,r,s,a,c,l,u){var d=this;i.setSession(),t.btnSizeReplies=function(){return"xs"==lib.breakpoints.breakpoint.name?"btn-small":"btn-medium"},d.report=function(e,t){"comment"==e?hitAudience.countClick({component:"comments",reference:"denunciar-comentario"},t):"reply"==e&&hitAudience.countClick({component:"comments",reference:"denunciar-resposta"},t)},d.replyit=function(){hitAudience.countClick({component:"comments",reference:"responder-comentario"}),hitAudience.countClick({action:i.get("isLogged")?"logged-user-sucess":"abrir-modal-login",area:"modal-login",component:"login-comments",position:"coluna-unica",reference:i.get("isLogged")?"responder-comentario":"impressao"})},d.textArea=function(e){"escrever"==e?(hitAudience.countClick({component:"comments",reference:"escrever-comentario"}),i.get("isLogged")&&hitAudience.countClick({action:"logged-user-sucess",area:"modal-login",component:"login-comments",position:"coluna-unica",reference:"escrever-comentario"})):"responder"==e&&hitAudience.countClick({component:"comments",reference:"escrever-resposta"})},d.getMore=function(e){hitAudience.countClick({component:"comments",reference:"ver-mais-comentarios"});var o=n.$dom.find(".comment").last();if(c["display-inline"])o.offset().top,o.outerHeight();else o.position().top,o.outerHeight();n.$dom.children().first().append('<div class="overlay" />'),d.load({type:"all",id:c.subjectId,size:t.nextsize,next:d.next}),setTimeout(function(){n.$dom.find(".overlay").remove()},100),d.refresh()},d.filter=function(){var e=i.get("isLogged"),t=i.get("uniqueId");function n(n){return n.hasReplies=+n.reply_count,n.commentedWithFB="facebook"===n.social_network.toLowerCase(),n.commentedWithTT="twitter"===n.social_network.toLowerCase(),n.has_rating&&(n.rating=s.set(n.rating_average)),e&&(n.isMyMessage=n.unique_user_id===t),n.likedByMe=a.apply(n.id),n}return l.filter(function(e){n(e),e.replies.filter(function(e){n(e)})}),l},d.firstComment=function(){null==i.get("isLogged")&&!c["display-inline"]&&c["first-comment"]&&window.setTimeout(function(){$(".modal .comments .babel-login:visible").trigger("click")},300)},d.openReplies=function(e){if(hitAudience.countClick({component:"comments",reference:"ver-respostas"}),e.hasReplies&&!e.replies){var t=i.getSession(),r=o.get("result"),s={type:"messages",service:"parent",root:{dom:n.$dom},id:e.id,params:{size:20,repository:r.repository,token:t.token}};n.babelService.get(s).then(function(e){angular.forEach(d.docs,function(t,n){if(t.id==coment.id)return t.replies.push(e.docs),!1}),d.docs=d.filter()})}e.repliesOpened=!e.repliesOpened},d.getReplies=function(e){if(e.hasReplies>3){if(e.replies.length>3)var r=t.nextsizereplies;else r=t.nextsizereplies+3;e.nextReplies||(e.nextReplies="");var s=i.getSession(),a=o.get("result"),c={type:"messages",service:"parent",root:{dom:n.$dom},id:e.id,params:{size:r,repository:a.repository,next:e.nextReplies,token:s.token}};n.babelService.get(c).then(function(t){angular.forEach(d.docs,function(n,o){if(n.id==e.id)return e.nextReplies||t.docs.splice(0,3),e.nextReplies=t.next,angular.forEach(t.docs,function(e,t){n.replies.push(e)}),!1}),d.refresh()}),hitAudience.countClick({component:"comments",reference:"ver-mais-respostas"})}},d.del=r.del,d.reply=r.reply,d.logout=r.logout,d.create=r.create,d.like=function(e,t,n){return"comment"==n?(hitAudience.countClick({component:"comments",reference:"curtir-comentario"}),hitAudience.countClick({action:i.get("isLogged")?"logged-user-sucess":"abrir-modal-login",area:"modal-login",component:"login-comments",position:"coluna-unica",reference:i.get("isLogged")?"curtir-comentario":"impressao"})):"reply"==n&&(hitAudience.countClick({component:"comments",reference:"curtir-resposta"}),hitAudience.countClick({action:i.get("isLogged")?"logged-user-sucess":"abrir-modal-login",area:"modal-login",component:"login-comments",position:"coluna-unica",reference:i.get("isLogged")?"curtir-resposta":"impressao"})),d.refresh(),a.it(e,"like",t)},d.load=function(e){n.$dom.attr("data-loaded","true"),o.load(e).then(function(e){var n=e.data;if(e.hasError)d.hasError=!0;else{if(n.subject&&n.subject.result){d.subject=n.subject;var o=d.subject.result,i=+o.total;o.hasRating&&(i+=+o.totalRatings+ +o.totalCommentsWithRatings),o.replies&&(i+=+o.replies),d.isClosed=o.isClosed,d.info=o,d.total=i,d.title=d.title||d.info.description}if(n.comments){for(var r=n.comments.docs.length,s=0;s<r;s++)n.comments.docs[s].avatar=n.comments.docs[s].avatar.replace("http://","//");l=l.concat(n.comments.docs),d.docs=d.filter(),d.next=n.comments.next,d.prev=n.comments.prev}}d.isVisible=!0,t.$apply(),render()})},d.whereAmI=function(){n.babelLogin.whereAmI().then(function(e){if(200==+e.code){for(var t in e.result){var n=e.result[t];window.socialSimpleWhereAmI=n.snname}d.refresh()}})},d.refresh=function(){i.set(),t.user=i.get(),t.user.isLogged||(d.newText=""),d.docs=d.filter(),t.$$phase||t.$apply()},d.isDebug=c.debug||!1,d.title=c.title||e.mediaTitle||"",d.subtitle=c.subtitle||"",events.push("babel.user.logged",null,function(e,t){d.refresh(),console.log("logged",e,t)}),events.push("babel.user.login.checked",null,function(e,t){""===window.socialSimpleWhereAmI&&(window.socialSimpleWhereAmI="Request Realizado!",d.whereAmI()),d.refresh(),console.log("login.checked",e)}),events.push("babel.user.login.success",null,function(e,t){c["display-inline"];d.refresh(),t.def&&t.def(),console.log("login.success",e)}),events.push("babel.user.login.fail",null,function(e){d.refresh(),console.log("login.fail",e)}),events.push("babel.user.needNickname",null,function(e){d.refresh(),console.log("needNickname",e)}),events.push("babel.user.logout.success",null,function(e){d.refresh(),console.log("logout.success",e)}),d.load()}]),angular.bootstrap(this.dom,["comentario"])}}); });    def('suggest', function(){ instances.suggest=[],expose.create=function(e,t){var s=new this.Suggest;if(e instanceof jQuery)e=e[0];return s.dom=e,s.input=s.dom&&s.dom.querySelector(".suggest[data-args]"),t&&s.setEvents(t),s.events.call(s),s},expose.Suggest=function(){instances.suggest.push(this)},expose.Suggest.prototype.fired=!1,expose.Suggest.prototype.storage={},expose.Suggest.prototype.lastRequest=function(){},expose.Suggest.prototype.onSuccess=function(){},expose.Suggest.prototype.onCancel=function(){},expose.Suggest.prototype.onEmpty=function(){},expose.Suggest.prototype.onBeforeSearch=function(){},expose.Suggest.prototype.setEvents=function(e){for(key in e)this[key]=e[key]},expose.Suggest.prototype.search=function(e,t){if(e.getAttribute("data-search")&&"false"!=$(e).attr("changepage")){this.onBeforeSearch.call(this);var s=$(e).closest(".input-box").find(".suggest-list li");s.attr("data-link")?location.href=s.attr("data-link"):location.href=e.getAttribute("data-search")+encodeURIComponent(e.value)}},expose.Suggest.prototype.events=function(){var e=this;this.input&&$(this.input).on("keyup",function(t){var s=this.value,o=this.getAttribute("data-length");if(clearTimeout(e.lastRequest),(""==s||o&&s.length<=o||!o&&s.length<=3||27==t.keyCode)&&e.fired)return e.fired=!1,27==t.keyCode&&(this.value=""),void e.onCancel.call(e);if(!o&&s.length>=3||o&&s.length>=o){var n="request",a=$(this).parent().find(".suggest-list li");13==t.keyCode&&a.length>0&&a.first().attr("data-link")&&(n="search"),e[n].call(e,this,t)}}),this.dom&&$(this.dom).on("click","[data-search-suggest]",function(t){t.preventDefault();var s=this.innerHTML||this.text;e.input.value=s,e.search.call(e,e.input,t)})},expose.Suggest.prototype.request=function(e,t){var s=this;this.lastRequest=setTimeout(function(){var t=e.getAttribute("data-args"),o=JSON.parse(t).slugify?lib.string.slug(e.value):e.value,n=location.origin+Config.servicename+"?loadComponent=suggest&data="+encodeURIComponent(t.replace(/<<value>>/g,o));$.get(n,function(e){"empty result"==e.message?s.onEmpty.call(s):s.onSuccess.call(s,e.data),s.lastRequest=function(){},s.fired=!0})},1e3)}; });    def('ads', function(){ !function(){"use strict";include("breakpoints"),expose.update=function(){var e=this.parse(this.dom.getAttribute("data-ads"),{}),i=this.parse(this.dom.getAttribute("data-position")),t=this.dom.getAttribute("data-tag"),a=!0;if(e.push!==undefined){a=e.push;delete e.push}var n=[],s=Object.keys(e);for(var d in s)if(s.hasOwnProperty(d)){var r=s[d];r&&r.match(/(xs|sm|md|lg)/)&&n.push(r)}for(var o=this.breakpoints.sortOptions(n),h=0;h<o.length;h++)if(this.breakpoints.checkin(o[h],!!e[o[h]])){if(e[o[h]])var l=o[h];break}if($(this.dom).children().hide().removeClass("visible"),l){if($(this.dom).show().children().each(function(){this.id.match(e[l])&&$(this).show().addClass("visible")}),!$(this.dom).children(".visible").length){var p=document.createElement("div"),u=document.querySelectorAll("[id*=banner-"+e[l]+"]").length+1;if("120x35-area"!=e[l]&&"120x35-area-2"!=e[l]&&"120x35-2-area"!=e[l]?p.id="banner-"+e[l]+"-"+u:p.id="banner-"+e[l],"banner-responsive-vertical-1"==p.id&&0==document.querySelectorAll("[id*=banner-responsive-top-vertical-1]").length&&(p.id="banner-responsive-top-vertical-1"),""!=i&&-1!=p.id.indexOf("banner-300x250-area-")&&(p.id="banner-300x250-area-"+i),this.dom.appendChild(p),-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-")&&-1!=p.id.indexOf("banner-responsive-middle-2-horizontal-area-2"))a=!1;a&&!$("body").hasClass("modal-open")&&(t?window.uolads.push({id:p.id,customTargetings:{tag:t}}):window.uolads&&window.uolads.push({id:p.id}))}}else this.dom.style.display="none"},expose.init=function(){this.update(),this.breakpoints.change(this,function(){this.update()})}}(); });    def('tooltip', function(){ !function(){"use strict";include("breakpoints"),expose.selector=".tooltip-container";var t={init:function(){t.binds.call(this)},binds:function(){var o=this;"ontouchstart"in window?($(this.dom).on("click",".open-tooltip, .icon-close",function(i){t.toggle.call(o,i.type,!0)}),$(this.dom).find(".tooltip").on("scroll",t.scroll)):$(this.dom).hasClass("show-opened")?($(this.dom).find(".arrow").show(),$(this.dom).find(".tooltip").show(),$(this.dom).find(".icon-close").on("click",function(t){t.preventDefault(),$(this).parents(".over-tooltip").find(".arrow, .tooltip").hide()})):$(this.dom).on("mouseenter mouseleave",".w-tooltip",function(i){t.toggle.call(o,i.type,!1)})},toggle:function(o,i){var e,n="open"==(e=i?"none"==$(this.dom).find(".tooltip").css("display")?"open":"close":"mouseenter"==o?"open":"close")?["fadeIn","addClass"]:["fadeOut","removeClass"];(lib.breakpoints.checkin(["sm"])||lib.breakpoints.checkin(["md"]))&&("open"==e?$(this.dom).parents(".article, .readme").bind("touchstart",function(){0==$(event.touches[0].target).parents(".tooltip").length&&t.toggle.call(self,"touchend",!0)}):$(this.dom).parents(".article, .readme").unbind("touchstart"));var s=this.dom?this.dom:".tooltip-container";$(s).find(".tooltip").stop()[n[0]](300),$(s).find(".arrow").stop()[n[0]](300),$(s).find(".over-tooltip")[n[1]]("active")},scroll:function(){this.scrollTop>10?$(this).find("header").addClass("border"):$(this).find("header").removeClass("border")}};expose.init=function(){(function(){var t=$(this.dom).find(".w-tooltip"),o=t.find(".tabs a"),i=t.find(".tab-item");o.on("click",function(t){t.preventDefault();var e=this;o.each(function(t){$(this)[e==this?"addClass":"removeClass"]("active"),i.eq(t)[e==this?"show":"hide"]()})})}).call(this),t.init.call(this),function(){var t=$(this.dom).closest(".read-more");if(t.length&&lib.breakpoints.checkin(["lg"])){var o=-154,i=160;t.find(".author").offset().left>500&&(o=-310,i=312),$(this.dom).find(".w-tooltip .tooltip").css("left",o+"px"),$(this.dom).find(".w-tooltip .tooltip .arrow").css("left",i+"px")}}.call(this)}}(); });    def('share', function(){ include("breakpoints","modal"),expose.view={},expose.socialpage=[],expose.omniturereferences={},expose.update=!0,expose.tpl={link:'<div class="link"><span>compartilhar</span><svg class="svg-icon svg-icon-share-right"><use xlink:href="#svg-share-right" /></svg></div>',more:'<div class="share-item more-item clearfix"><div class="share-item social-item more" data-ref="more"><div class="table"><div><svg class="icon-more"><use xlink:href="#svg-more" /></svg></div></div></div><div class="share-item group"><div class="overflow">{{group}}</div></div></div>',after:'<div class="share-item after">{{group}}</div>',component:'<div class="share-item social-item comp-{{name}}" data-ref="{{name}}" data-target-click><div class="table">{{component}}</div></div>',def:'<div class="share-item social-item {{name}}" data-ref="{{name}}" data-target-click><div class="table"><div><svg class="icon-{{name}}"><use xlink:href="#svg-{{svg}}"/></svg></div></div></div>'},expose.defaultapis={general:{"follow-title":!1,kicker:!1,title:!1,description:!1,image:{src:!1},date:!1,site:!1,url:!1,redirect:!1,app_id:!1},facebook:{sharing:{defaults:{newtab:!0,host:"https://tm.uol.com.br/bt/facebook_auth/facebook-check-login.html?group=B&url_share=//www.facebook.com/dialog/feed",params:{app_id:!1,display:"popup",link:!1,redirect_uri:!1,quote:""}}},newwindow:"width=626,height=316,left=350,top=350"},twitter:{sharing:{defaults:{newtab:!0,host:"{{protocol}}//twitter.com/intent/tweet",params:{url:!1,text:!1,via:!1,hashtags:!1}}},newwindow:"width=450,height=270,scrollbars=yes,left=350,top=350"},pinterest:{sharing:{defaults:{newtab:!0,host:"{{protocol}}//br.pinterest.com/pin/create/button/",params:{url:!1,media:!1,description:!1}}},newwindow:"width=700,height=300"},linkedin:{sharing:{defaults:{newtab:!0,host:"{{protocol}}//www.linkedin.com/shareArticle",params:{url:!1,mini:!0,title:!1,summary:!1,source:!1}}},newwindow:"width=700,height=300"},mail:{sharing:{xs:{host:"mailto:",params:{cc:!1,bcc:!1,subject:!1,body:!1}},defaults:{host:"{{protocol}}//www3.uol.com.br/envie/index.jhtm",params:{origem:!1,texto:!1,xurl:!1,data:!1}}},newwindow:"width=780,height=490,left=350,top=350",svgicon:"mail"},whatsapp:{sharing:{defaults:{host:"whatsapp://send",params:{url:!1,concat:"text"}}},newwindow:"width=900,height=600,left=350,top=350"},viber:{sharing:{defaults:{host:"viber://forward",params:{url:!1,concat:"text"}}}},messenger:{sharing:{defaults:{host:"fb-messenger://share",params:{link:!1}}}}},expose.apiupdate=function(){var e=this,i="general";this.config.defaults.general.url=this.config.defaults.general.url.replace(/[&?]json/g,"");var t=[this.config.defaults,this.current in this.config?this.config[this.current]:{}],s=[],a={},r=function(e,i,t){var s,a=Object.keys(t);return"url"!=e&&"link"!=e||t[e]?"title"!=e||t[e]?"description"!=e||t[e]?"image"!=e||t[e]?"site"!=e||t[e]?"kicker"!=e||t[e]?"date"!=e||t[e]?"redirect"!=e||t[e]?"domain"!=e||t[e]||-1!=a.indexOf("source")&&(s="source"):-1!=a.indexOf("redirect_uri")&&(s="redirect_uri"):-1!=a.indexOf("data")&&(s="data"):-1!=a.indexOf("origem")&&(s="origem"):-1!=a.indexOf("via")&&(s="via"):-1!=a.indexOf("media")&&"pinterest"==i?s="media":-1!=a.indexOf("picture")&&"facebook"==i&&(s="picture"):-1!=a.indexOf("summary")&&(s="summary"):-1!=a.indexOf("name")?s="name":-1!=a.indexOf("text")&&"twitter"==i?s="text":-1!=a.indexOf("description")&&"pinterest"==i?s="description":-1!=a.indexOf("texto")&&"mail"==i&&(s="texto"):-1!=a.indexOf("link")?s="link":-1!=a.indexOf("xurl")?s="xurl":-1!=a.indexOf("url")&&(s="url"),s||e};this.config.defaultapis&&Object.keys(this.config.defaultapis).length>0&&function(i,t,s){i=i||e.config.defaultapis,t=t||e.apis;for(var a in i){var r="object"==typeof i[a];r&&"sharing"!=s?a in t&&r&&!Array.isArray(i[a])&&arguments.callee(i[a],t[a],a):t[a]=i[a]}}();for(var o=0;o<t.length;o++){var n=Object.keys(t[o]);-1!=n.indexOf(i)&&(n=n.filter(function(e){return e!=i})).unshift(i),s.push(n)}for(c in this.apis)if(this.apis[c].sharing){var h=this.current in this.apis[c].sharing?this.current:"defaults";this.apis[c].sharing=this.apis[c].sharing[h]}for(o=0;o<t.length;o++){if(-1!=s[o].indexOf(i))for(g in this.apis)if(this.apis[g].sharing&&this.apis[g].sharing.params&&g!=i)for(y in t[o].general){var l=r(y,g,this.apis[g].sharing.params);l in this.apis[g].sharing.params&&(!a[g]||-1==a[g].indexOf(l))&&(this.apis[g].sharing.params[l]="image"==y?t[o].general[y].src:t[o].general[y],a[g]||(a[g]=[]),a[g].push(l))}for(var d=0;d<s[o].length;d++)if(s[o][d]in this.apis){var m=s[o][d];$.extend(!0,this.apis[m].sharing&&this.apis[m].sharing.params||this.apis[m],t[o][m])}}for(z in this.apis)if(this.apis[z].sharing&&this.apis[z].sharing.params&&this.apis[z].sharing.params.concat){var p=this.apis[z].sharing.params.concat,f="";for(v in this.apis[z].sharing.params)"url"==v||"concat"==v||v==p||Array.isArray(this.apis[z].sharing.params[v])||!1===this.apis[z].sharing.params[v]||(!this.apis[z].sharing.params.not||-1!=this.apis[z].sharing.params.not.indexOf(v))&&this.apis[z].sharing.params.not||(f+=this.apis[z].sharing.params[v]+" ");f+=this.apis[z].sharing.params.url,this.apis[z].sharing.params={},""!=f&&(this.apis[z].sharing.params[p]=f.substr(0,f.length))}for(var m in this.config["characters-limit"])if(this.apis[m]&&this.apis[m].sharing&&this.apis[m].sharing.params)for(var g in this.config["characters-limit"][m])g in this.apis[m].sharing.params&&this.apis[m].sharing.params[g].length>this.config["characters-limit"][m][g]&&(this.apis[m].sharing.params[g]=$("<textarea>").html(this.apis[m].sharing.params[g]).val().substr(0,this.config["characters-limit"][m][g])+"...");this.update=!1},expose.sharingFacebookApi=function(e){FB.ui({method:"share_open_graph",action_type:"og.shares",display:"popup",action_properties:JSON.stringify({object:{"og:url":e.url||"","og:title":e.title||"","og:description":e.body||"","og:image":e.image.src||"","og:image:width":e.image.width||80,"og:image:height":e.image.height||80}})})},expose.loadFacebookApi=function(){var e,i=document,t="script",s="facebook-jssdk",a=i.getElementsByTagName(t)[0];i.getElementById(s)||((e=i.createElement(t)).id=s,e.src="//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6",a.parentNode.insertBefore(e,a))},expose.urlbuilder=function(e){var i="",t="facebook"==e||!1;for(key in this.params)if(!1!==this.params[key]||""!=this.params[key]){var s=[t?encodeURIComponent("?"):"?",t?encodeURIComponent("&"):"&",window[t?"escape":"encodeURIComponent"]($("<textarea>").html(this.params[key]).val())];i+=(""==i?this.host.replace("{{protocol}}",location.protocol)+s[0]:s[1])+key+"="+s[2]}return i};var template=function(e){var i=this,t=e.name,s=-1!=this.config.components.indexOf(t)?this.tpl.component:this.tpl[e.tpl]||this.tpl[t]||this.tpl.def,a=function(){var s=$(i.originaldom).find("."+(e.tpl||t));if(!(s=s.get(0)&&s.get(0).outerHTML)||-1==i.config.components.indexOf(t))return"";var a=-1!=i.view.mode.indexOf("large")?t+"-large":-1!=i.view.mode.indexOf("medium")?t+"-medium":t+"-small",r=new RegExp(t+"-large|"+t+"-medium|"+t+"-small","g");return s.match(r)?s.replace(r,a):s.replace(/(class=\"[^"]+)/,"$1 "+a+'"')}(),r=(i.apis[t]||{}).svgicon;return s=(s=(s=(s=s.replace(/{{name}}/g,t)).replace(/{{svg}}/g,r||"social-"+t)).replace(/{{component}}/,a)).replace(/{{group}}/,e.pattern),-1==this.config.components.indexOf(t)||a?s:""},mount=function(){var e="";for(order in this.view.mode&&-1!=this.view.mode.indexOf("link")&&(e+=template.call(this,{name:"link"})),this.view.order)if("before"!=order){var t="";for(i in this.view.order[order])t+=template.call(this,{name:this.view.order[order][i]}),this.socialpage.push(this.view.order[order][i]);e+=template.call(this,{tpl:order,pattern:t})}else for(i in this.view.order[order])e+=template.call(this,{name:this.view.order[order][i]}),this.socialpage.push(this.view.order[order][i]);return e};expose.sharing=function(e){e.update&&e.apiupdate.call(e);var i=this.getAttribute("data-ref"),t=!(!e.apis[i]||!e.apis[i].sharing||0==Object.keys(e.apis[i].sharing.params).length)&&e.urlbuilder.call(e.apis[i].sharing,i);if(i){if(i in e.omniturereferences){var s=$.extend(!0,{},e.config.audience.click);s.reference=e.omniturereferences[i],hitAudience.countClick.call(this,s)}if(!t)return;if(e.breakpoints.checkin("xs")||e.breakpoints.checkin("sm")||"whatsapp"!=i||(t=t.replace("whatsapp://","https://web.whatsapp.com/")),!e.breakpoints.checkin("xs")||e.apis[i].sharing.newtab){var a=[!e.breakpoints.checkin("xs")&&e.apis[i].newwindow?e.apis[i].newwindow:"","fullscreen=yes","scrollbars=yes","type=fullWindow"].join(",");"facebook"==i&&e.config.facebookApi?e.sharingFacebookApi(e.config.defaults.general):open(t,"shareUOL",a)}else location.href=t}},expose.mode=function(){for(mode in this.view.mode||(this.view.mode=[]),this.view.mode)this.dom.className+=" share-"+this.view.mode[mode]},expose.events=function(){var e=this,i=$(this.dom).find(':not(".modal-mode-share") .overflow'),t=[-1!=e.view.mode.indexOf("column"),-1!=e.view.mode.indexOf("right")&&-1!=e.view.mode.indexOf("vertical")&&-1==e.view.mode.indexOf("column")],s=i.children()[t[0]?"height":"width"]()*i.children().length;i[t[0]?"height":"width"](s),$(this.dom).on("click",".link, .more",function(i){var a=$.extend(!0,{},e.config.audience.click),r=this.getAttribute("data-ref")||"more";if(-1!=e.view.mode.indexOf("modal")||e.breakpoints.checkin("xs")&&-1==e.view.mode.indexOf("no-modal"))-1==e.view.mode.indexOf("modal")?e.view.mode.push("modal"):e.view.mode=e.dom.getAttribute("data-originalmode").split(","),e._modal=e.modal.open(e.dom,"share"),e._modal.disableClickClose(),e._modal.addHeader({html:'<div class="modal-close"><h1>Fechar</h1> <div class="icon-close"></div></div>',closure:!0}),e._modal.onbeforeclose=function(){a.reference=e.omniturereferences[r+"-close"],hitAudience.countClick.call(this,a)},e._modal.dom.querySelector(".share").className="share share-center share-modal",$(e._modal.dom).find(".share .overflow").children().appendTo(e._modal.dom.querySelector(".share")),$(e._modal.dom).find(".share-item:visible").on("click",function(){e.sharing.call(this,e)}),a.reference=e.omniturereferences[r+"-open"];else if(this.className.match("more")&&e.dom.className.match("share-link"))$(e.dom).children().removeClass("visible").end().children(".link").show(),a.reference=e.omniturereferences[r+"-close"];else if(this.className.match("more")&&-1==e.view.mode.indexOf("modal")){var o={},n=0==$(this).siblings(".group")[t[0]?"height":"width"]()?s:0;t[0]?o.height=n:t[1]?(o.width=n,o.marginLeft=n):o.width=n,a.reference=e.omniturereferences[r+"-"+(/open/.test(this.parentNode.className)?"close":"open")],this.parentNode.className=this.parentNode.className.replace(" open","")+(-1==this.parentNode.className.indexOf("open")?" open":"");var h=this;$(this).siblings(".group").stop(!0,!1).animate(o,200,function(){$(h).toggleClass("on")})}else this.className.match("link")&&-1==e.view.mode.indexOf("modal")&&($(this).hide().nextAll().addClass("visible"),a.reference=e.omniturereferences[r+"-open"]);i.originalEvent&&hitAudience.countClick.call(this,a)}),$(this.dom).on("click","[data-target-click]",function(i){-1==e.config.components.indexOf(this.getAttribute("data-ref"))&&i.stopPropagation(),e.sharing.call(this,e)}),$(this.dom).on("mouseleave",function(){var i=this;e.view.mode&&-1!=e.view.mode.indexOf("link")||(e.timeOpened=setTimeout(function(){$(i).find(".more-item .more.on").trigger("click")},4e3))}),$(this.dom).on("mouseenter",function(){clearTimeout(e.timeOpened)})},expose.destroy=function(){this.dom.className=this.selector.substr(1),this.view={},this.socialpage=[],this.update=!0,this._modal&&this._modal.close(),$(this.dom).off("click"),this._modal&&$(this._modal.dom).find(".share-item").off("click")},expose.modelOrder=function(e){for(var i in e)if("string"==typeof e[i]&&"mode"==i)e[i]=e[i].split(";");else if("order"==i)for(var t in e[i])"string"==typeof e[i][t]&&(e[i][t]=e[i][t].split(";"));return e},expose.init=function(){/no-mount/.test(this.dom.className)||(this.config=this.config||this.parse(this.dom.getAttribute("data-config").replace(/\n/g,"{{new-line}}"),this.config),this.breakpoint=this.breakpoints.sortOptions(Object.keys(this.config),!0,!0),this.omniturereferences=this.config.omniturereferences||{},this.current=this.breakpoints.breakpoint.name,this.view=this.modelOrder(this.config[this.breakpoint]),this.config.facebookApi&&this.loadFacebookApi(),this.dom.setAttribute("data-originalmode",this.view.mode),this.tpl=$.extend(!0,{},this.tpl),this.apis=$.extend(!0,{},this.defaultapis),this.dom.removeAttribute("style"),-1!=this.view.mode.indexOf("fixed")?this.dom.removeAttribute("data-static"):this.dom.setAttribute("data-static",!0),this.updateBreakpoint||this.breakpoints.change(this,function(){this.updateBreakpoint=!0,this.destroy.call(this),this.init.call(this)}),this.originaldom||(this.originaldom=this.dom.outerHTML),this.dom.innerHTML=mount.call(this),$(this.dom).find("[initiated]").length&&($(this.dom).find("[initiated]").removeAttr("initiated"),render()),this.mode.call(this),!this.view&&this.view.disabled||(this.dom.className=this.dom.className.replace(/hidden/,""),this.events.call(this)))},expose.selector=".share"; });    def('datepicker', function(){ !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e,i,a,n;function s(e,i){var a,n,s,o=e.nodeName.toLowerCase();return"area"===o?(n=(a=e.parentNode).name,!(!e.href||!n||"map"!==a.nodeName.toLowerCase())&&(!!(s=t("img[usemap='#"+n+"']")[0])&&r(s))):(/^(input|select|textarea|button|object)$/.test(o)?!e.disabled:"a"===o&&e.href||i)&&r(e)}function r(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),a="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var e=t(this);return(!a||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&s.length?s:t(this[0].ownerDocument||document)},uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,a){return!!t.data(e,a[3])},focusable:function(e){return s(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var i=t.attr(e,"tabindex"),a=isNaN(i);return(a||i>=0)&&s(e,!a)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){var a="Width"===i?["Left","Right"]:["Top","Bottom"],n=i.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function r(e,i,n,s){return t.each(a,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}t.fn["inner"+i]=function(e){return e===undefined?s["inner"+i].call(this):this.each(function(){t(this).css(n,r(this,e)+"px")})},t.fn["outer"+i]=function(e,a){return"number"!=typeof e?s["outer"+i].call(this,e):this.each(function(){t(this).css(n,r(this,e,!0,a)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=(i=t.fn.removeData,function(e){return arguments.length?i.call(this,t.camelCase(e)):i.call(this)})),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:(n=t.fn.focus,function(e,i){return"number"==typeof e?this.each(function(){var a=this;setTimeout(function(){t(a).focus(),i&&i.call(a)},e)}):n.apply(this,arguments)}),disableSelection:(a="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(a+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(e!==undefined)return this.css("zIndex",e);if(this.length)for(var i,a,n=t(this[0]);n.length&&n[0]!==document;){if(("absolute"===(i=n.css("position"))||"relative"===i||"fixed"===i)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0}}),t.ui.plugin={add:function(e,i,a){var n,s=t.ui[e].prototype;for(n in a)s.plugins[n]=s.plugins[n]||[],s.plugins[n].push([i,a[n]])},call:function(t,e,i,a){var n,s=t.plugins[e];if(s&&(a||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<s.length;n++)t.options[s[n][0]]&&s[n][1].apply(t.element,i)}};var o=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var a,n,s;for(s=0;null!=(n=i[s]);s++)try{(a=t._data(n,"events"))&&a.remove&&t(n).triggerHandler("remove")}catch(r){}e(i)}}(t.cleanData),t.widget=function(e,i,a){var n,s,r,o,l={},d=e.split(".")[0];return e=e.split(".")[1],n=d+"-"+e,a||(a=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[d]=t[d]||{},s=t[d][e],r=t[d][e]=function(t,e){if(!this._createWidget)return new r(t,e);arguments.length&&this._createWidget(t,e)},t.extend(r,s,{version:a.version,_proto:t.extend({},a),_childConstructors:[]}),(o=new i).options=t.widget.extend({},o.options),t.each(a,function(e,a){var n,s;t.isFunction(a)?l[e]=(n=function(){return i.prototype[e].apply(this,arguments)},s=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=s,t=a.apply(this,arguments),this._super=e,this._superApply=i,t}):l[e]=a}),r.prototype=t.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||e},l,{constructor:r,namespace:d,widgetName:e,widgetFullName:n}),s?(t.each(s._childConstructors,function(e,i){var a=i.prototype;t.widget(a.namespace+"."+a.widgetName,r,i._proto)}),delete s._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var i,a,n=l.call(arguments,1),s=0,r=n.length;s<r;s++)for(i in n[s])a=n[s][i],n[s].hasOwnProperty(i)&&a!==undefined&&(t.isPlainObject(a)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],a):t.widget.extend({},a):e[i]=a);return e},t.widget.bridge=function(e,i){var a=i.prototype.widgetFullName||e;t.fn[e]=function(n){var s="string"==typeof n,r=l.call(arguments,1),o=this;return s?this.each(function(){var i,s=t.data(this,a);return"instance"===n?(o=s,!1):s?t.isFunction(s[n])&&"_"!==n.charAt(0)?(i=s[n].apply(s,r))!==s&&i!==undefined?(o=i&&i.jquery?o.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):(r.length&&(n=t.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=t.data(this,a);e?(e.option(n||{}),e._init&&e._init()):t.data(this,a,new i(n,this))})),o}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=o++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var a,n,s,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},e=(a=e.split(".")).shift(),a.length){for(n=r[e]=t.widget.extend({},this.options[e]),s=0;s<a.length-1;s++)n[a[s]]=n[a[s]]||{},n=n[a[s]];if(e=a.pop(),1===arguments.length)return n[e]===undefined?null:n[e];n[e]=i}else{if(1===arguments.length)return this.options[e]===undefined?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,a){var n,s=this;"boolean"!=typeof e&&(a=i,i=e,e=!1),a?(i=n=t(i),this.bindings=this.bindings.add(i)):(a=i,i=this.element,n=this.widget()),t.each(a,function(a,r){function o(){if(e||!0!==s.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(o.guid=r.guid=r.guid||o.guid||t.guid++);var l=a.match(/^([\w:-]*)\s*(.*)$/),d=l[1]+s.eventNamespace,c=l[2];c?n.delegate(c,d,o):i.bind(d,o)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,a){var n,s,r=this.options[e];if(a=a||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(n in s)n in i||(i[n]=s[n]);return this.element.trigger(i,a),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(a))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(a,n,s){"string"==typeof n&&(n={effect:n});var r,o=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})&&(n={duration:n}),r=!t.isEmptyObject(n),n.complete=s,n.delay&&a.delay(n.delay),r&&t.effects&&t.effects.effect[o]?a[e](n):o!==e&&a[o]?a[o](n.duration,n.easing,s):a.queue(function(i){t(this)[e](),s&&s.call(a[0]),i()})}});t.widget;var d=!1;t(document).mouseup(function(){d=!1});t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,a=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(a&&!n&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),d=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),d=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){t.ui=t.ui||{};var e,i,a=Math.max,n=Math.abs,s=Math.round,r=/left|center|right/,o=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,c=/%$/,h=t.fn.position;function u(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function p(e,i){return parseInt(t.css(e,i),10)||0}t.position={scrollbarWidth:function(){if(e!==undefined)return e;var i,a,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=n.children()[0];return t("body").append(n),i=s.offsetWidth,n.css("overflow","scroll"),i===(a=s.offsetWidth)&&(a=n[0].clientWidth),n.remove(),e=i-a},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),a=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===a||"auto"===a&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),a=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:a,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:a||n?i.width():i.outerWidth(),height:a||n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return h.apply(this,arguments);e=t.extend({},e);var c,g,f,m,_,D,v,k,y=t(e.of),w=t.position.getWithinInfo(e.within),b=t.position.getScrollInfo(w),M=(e.collision||"flip").split(" "),C={};return D=9===(k=(v=y)[0]).nodeType?{width:v.width(),height:v.height(),offset:{top:0,left:0}}:t.isWindow(k)?{width:v.width(),height:v.height(),offset:{top:v.scrollTop(),left:v.scrollLeft()}}:k.preventDefault?{width:0,height:0,offset:{top:k.pageY,left:k.pageX}}:{width:v.outerWidth(),height:v.outerHeight(),offset:v.offset()},y[0].preventDefault&&(e.at="left top"),g=D.width,f=D.height,m=D.offset,_=t.extend({},m),t.each(["my","at"],function(){var t,i,a=(e[this]||"").split(" ");1===a.length&&(a=r.test(a[0])?a.concat(["center"]):o.test(a[0])?["center"].concat(a):["center","center"]),a[0]=r.test(a[0])?a[0]:"center",a[1]=o.test(a[1])?a[1]:"center",t=l.exec(a[0]),i=l.exec(a[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(a[0])[0],d.exec(a[1])[0]]}),1===M.length&&(M[1]=M[0]),"right"===e.at[0]?_.left+=g:"center"===e.at[0]&&(_.left+=g/2),"bottom"===e.at[1]?_.top+=f:"center"===e.at[1]&&(_.top+=f/2),c=u(C.at,g,f),_.left+=c[0],_.top+=c[1],this.each(function(){var r,o,l=t(this),d=l.outerWidth(),h=l.outerHeight(),D=p(this,"marginLeft"),v=p(this,"marginTop"),k=d+D+p(this,"marginRight")+b.width,x=h+v+p(this,"marginBottom")+b.height,I=t.extend({},_),N=u(C.my,l.outerWidth(),l.outerHeight());"right"===e.my[0]?I.left-=d:"center"===e.my[0]&&(I.left-=d/2),"bottom"===e.my[1]?I.top-=h:"center"===e.my[1]&&(I.top-=h/2),I.left+=N[0],I.top+=N[1],i||(I.left=s(I.left),I.top=s(I.top)),r={marginLeft:D,marginTop:v},t.each(["left","top"],function(i,a){t.ui.position[M[i]]&&t.ui.position[M[i]][a](I,{targetWidth:g,targetHeight:f,elemWidth:d,elemHeight:h,collisionPosition:r,collisionWidth:k,collisionHeight:x,offset:[c[0]+N[0],c[1]+N[1]],my:e.my,at:e.at,within:w,elem:l})}),e.using&&(o=function(t){var i=m.left-I.left,s=i+g-d,r=m.top-I.top,o=r+f-h,c={target:{element:y,left:m.left,top:m.top,width:g,height:f},element:{element:l,left:I.left,top:I.top,width:d,height:h},horizontal:s<0?"left":i>0?"right":"center",vertical:o<0?"top":r>0?"bottom":"middle"};g<d&&n(i+s)<g&&(c.horizontal="center"),f<h&&n(r+o)<f&&(c.vertical="middle"),a(n(i),n(s))>a(n(r),n(o))?c.important="horizontal":c.important="vertical",e.using.call(this,t,c)}),l.offset(t.extend(I,{using:o}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,d=o+e.collisionWidth-r-s;e.collisionWidth>r?l>0&&d<=0?(i=t.left+l+e.collisionWidth-r-s,t.left+=l-i):t.left=d>0&&l<=0?s:l>d?s+r-e.collisionWidth:s:l>0?t.left+=l:d>0?t.left-=d:t.left=a(t.left-o,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,r=e.within.height,o=t.top-e.collisionPosition.marginTop,l=s-o,d=o+e.collisionHeight-r-s;e.collisionHeight>r?l>0&&d<=0?(i=t.top+l+e.collisionHeight-r-s,t.top+=l-i):t.top=d>0&&l<=0?s:l>d?s+r-e.collisionHeight:s:l>0?t.top+=l:d>0?t.top-=d:t.top=a(t.top-o,t.top)}},flip:{left:function(t,e){var i,a,s=e.within,r=s.offset.left+s.scrollLeft,o=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,d=t.left-e.collisionPosition.marginLeft,c=d-l,h=d+e.collisionWidth-o-l,u="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,g=-2*e.offset[0];c<0?((i=t.left+u+p+g+e.collisionWidth-o-r)<0||i<n(c))&&(t.left+=u+p+g):h>0&&((a=t.left-e.collisionPosition.marginLeft+u+p+g-l)>0||n(a)<h)&&(t.left+=u+p+g)},top:function(t,e){var i,a,s=e.within,r=s.offset.top+s.scrollTop,o=s.height,l=s.isWindow?s.scrollTop:s.offset.top,d=t.top-e.collisionPosition.marginTop,c=d-l,h=d+e.collisionHeight-o-l,u="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];c<0?((a=t.top+u+p+g+e.collisionHeight-o-r)<0||a<n(c))&&(t.top+=u+p+g):h>0&&((i=t.top-e.collisionPosition.marginTop+u+p+g-l)>0||n(i)<h)&&(t.top+=u+p+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,a,n,s,r,o=document.getElementsByTagName("body")[0],l=document.createElement("div");for(r in e=document.createElement(o?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"}),n)e.style[r]=n[r];e.appendChild(l),(a=o||document.documentElement).insertBefore(e,a.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",s=t(l).offset().left,i=s>10&&s<11,e.innerHTML="",a.removeChild(e)}()}();var c;t.ui.position;function h(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesLower:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["DOM","SEG","TER","QUA","QUI","SEX","SÁB"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=u(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function u(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",p)}function p(){t.datepicker._isDisabledDatepicker(c.inline?c.dpDiv.parent()[0]:c.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function g(e,i){for(var a in t.extend(e,i),i)null==i[a]&&(e[a]=i[a]);return e}t.extend(t.ui,{datepicker:{version:"1.11.4"}}),t.extend(h.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return g(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var a,n,s;n="div"===(a=e.nodeName.toLowerCase())||"span"===a,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(s=this._newInst(t(e),n)).settings=t.extend({},i||{}),"input"===a?this._connectDatepicker(e,s):n&&this._inlineDatepicker(e,s)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?u(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var a=t(e);i.append=t([]),i.trigger=t([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var a,n,s,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(a=this._get(i,"showOn"))&&"both"!==a||e.focus(this._showDatepicker),"button"!==a&&"both"!==a||(n=this._get(i,"buttonText"),s=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:s,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(s?t("<img/>").attr({src:s,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,a,n,s=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,a=0,n=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,a=n);return a},s.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),t.input.attr("size",this._formatDate(t,s).length)}},_inlineDatepicker:function(e,i){var a=t(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,a,n,s){var r,o,l,d,c,h=this._dialogInst;return h||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),(h=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",h)),g(h.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(h,i):i,this._dialogInput.val(i),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(o=document.documentElement.clientWidth,l=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+d,l/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(e){var i,a=t(e),n=t.data(e,"datepicker");a.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||a.removeClass(this.markerClassName).empty(),c===n&&(c=null))},_enableDatepicker:function(e){var i,a,n=t(e),s=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((a=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,a,n=t(e),s=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||((a=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,a){var n,s,r,o,l=this._getInst(e);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null;n=i||{},"string"==typeof i&&((n={})[i]=a),l&&(this._curInst===l&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),o=this._getMinMaxDate(l,"max"),g(l.settings,n),null!==r&&n.dateFormat!==undefined&&n.minDate===undefined&&(l.settings.minDate=this._formatDate(l,r)),null!==o&&n.dateFormat!==undefined&&n.maxDate===undefined&&(l.settings.maxDate=this._formatDate(l,o)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,s),this._updateAlternate(l),this._updateDatepicker(l))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,a,n,s=t.datepicker._getInst(e.target),r=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return(n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",s.dpDiv))[0]&&t.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,n[0]),(i=t.datepicker._get(s,"onSelect"))?(a=t.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[a,s])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,a,n=t.datepicker._getInst(e.target);if(t.datepicker._get(n,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),a=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||a<" "||!i||i.indexOf(a)>-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(a){}return!0},_showDatepicker:function(e){var i,a,n,s,r,o,l;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e)||(i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(n=(a=t.datepicker._get(i,"beforeShow"))?a.apply(e,[e,i]):{})&&(g(i.settings,n),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),s=!1,t(e).parents().each(function(){return!(s|="fixed"===t(this).css("position"))}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,s),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":s?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(o=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[o]?i.dpDiv.show(o,t.datepicker._get(i,"showOptions"),l):i.dpDiv[o||"show"](o?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i)))},_updateDatepicker:function(e){this.maxRows=4,c=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,a=this._getNumberOfMonths(e),n=a[1],s=e.dpDiv.find("."+this._dayOverClass+" a");s.length>0&&p.apply(s.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",17*n+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,a){var n=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(a?0:t(document).scrollLeft()),d=document.documentElement.clientHeight+(a?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=a&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=a&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+s>d&&d>s?Math.abs(s+o):0),i},_findPos:function(e){for(var i,a=this._getInst(e),n=this._get(a,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,a,n,s,r=this._curInst;!r||e&&r!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),a=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),a,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,n),i||n(),this._datepickerShowing=!1,(s=this._get(r,"onClose"))&&s.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),a=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===a)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,a){var n=t(e),s=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(s,i+("M"===a?this._get(s,"showCurrentAtPos"):0),a),this._updateDatepicker(s))},_gotoToday:function(e){var i,a=t(e),n=this._getInst(a[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(a)},_selectMonthYear:function(e,i,a){var n=t(e),s=this._getInst(n[0]);s["selected"+("M"===a?"Month":"Year")]=s["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(n)},_selectDay:function(e,i,a,n){var s,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||((s=this._getInst(r[0])).selectedDay=s.currentDay=t("a",n).html(),s.selectedMonth=s.currentMonth=i,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var a,n=t(e),s=this._getInst(n[0]);i=null!=i?i:this._formatDate(s),s.input&&s.input.val(i),this._updateAlternate(s),(a=this._get(s,"onSelect"))?a.apply(s.input?s.input[0]:null,[i,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,a,n,s=this._get(e,"altField");s&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),a=this._getDate(e),n=this.formatDate(i,a,this._getFormatConfig(e)),t(s).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,a){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var n,s,r,o,l=0,d=(a?a.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof d?d:(new Date).getFullYear()%100+parseInt(d,10),h=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,u=(a?a.dayNames:null)||this._defaults.dayNames,p=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,g=(a?a.monthNames:null)||this._defaults.monthNames,f=-1,m=-1,_=-1,D=-1,v=!1,k=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},y=function(t){var e=k(t),a="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=new RegExp("^\\d{"+("y"===t?a:1)+","+a+"}"),s=i.substring(l).match(n);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},w=function(e,a,n){var s=-1,r=t.map(k(e)?n:a,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,e){var a=e[1];if(i.substr(l,a.length).toLowerCase()===a.toLowerCase())return s=e[0],l+=a.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+l},b=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;n<e.length;n++)if(v)"'"!==e.charAt(n)||k("'")?b():v=!1;else switch(e.charAt(n)){case"d":_=y("d");break;case"D":w("D",h,u);break;case"o":D=y("o");break;case"m":m=y("m");break;case"M":m=w("M",p,g);break;case"y":f=y("y");break;case"@":f=(o=new Date(y("@"))).getFullYear(),m=o.getMonth()+1,_=o.getDate();break;case"!":f=(o=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),m=o.getMonth()+1,_=o.getDate();break;case"'":k("'")?b():v=!0;break;default:b()}if(l<i.length&&(r=i.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=c?0:-100)),D>-1)for(m=1,_=D;;){if(_<=(s=this._getDaysInMonth(f,m-1)))break;m++,_-=s}if((o=this._daylightSavingAdjust(new Date(f,m-1,_))).getFullYear()!==f||o.getMonth()+1!==m||o.getDate()!==_)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var a,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=a+1<t.length&&t.charAt(a+1)===e;return i&&a++,i},d=function(t,e,i){var a=""+e;if(l(t))for(;a.length<i;)a="0"+a;return a},c=function(t,e,i,a){return l(t)?a[e]:i[e]},h="",u=!1;if(e)for(a=0;a<t.length;a++)if(u)"'"!==t.charAt(a)||l("'")?h+=t.charAt(a):u=!1;else switch(t.charAt(a)){case"d":h+=d("d",e.getDate(),2);break;case"D":h+=c("D",e.getDay(),n,s);break;case"o":h+=d("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=d("m",e.getMonth()+1,2);break;case"M":h+=c("M",e.getMonth(),r,o);break;case"y":h+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":u=!0;break;default:h+=t.charAt(a)}return h},_possibleChars:function(t){var e,i="",a=!1,n=function(i){var a=e+1<t.length&&t.charAt(e+1)===i;return a&&e++,a};for(e=0;e<t.length;e++)if(a)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):a=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":a=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return t.settings[e]!==undefined?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),a=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),s=n,r=this._getFormatConfig(t);try{s=this.parseDate(i,a,r)||n}catch(o){a=e?"":a}t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),t.currentDay=a?s.getDate():0,t.currentMonth=a?s.getMonth():0,t.currentYear=a?s.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,a){var n=null==i||""===i?a:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(d){}for(var a=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,n=a.getFullYear(),s=a.getMonth(),r=a.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=o.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":s+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(n,s));break;case"y":case"Y":n+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(n,s))}l=o.exec(i)}return new Date(n,s,r)}(i):"number"==typeof i?isNaN(i)?a:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return(n=n&&"Invalid Date"===n.toString()?a:n)&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var a=!e,n=t.selectedMonth,s=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&s===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(a?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(a,-i,"M")},next:function(){t.datepicker._adjustDate(a,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(a)},selectDay:function(){return t.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(a,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,a,n,s,r,o,l,d,c,h,u,p,g,f,m,_,D,v,k,y,w,b,M,C,x,I,N,S,T,F,Y,A,W,E,j,O,L,K,H,P=new Date,R=this._daylightSavingAdjust(new Date(P.getFullYear(),P.getMonth(),P.getDate())),U=this._get(t,"isRTL"),z=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),J=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==J[0]||1!==J[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),tt=t.drawMonth-V,et=t.drawYear;if(tt<0&&(tt+=12,et--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-J[0]*J[1]+1,Z.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(et,tt,1))>e;)--tt<0&&(tt=11,et--);for(t.drawMonth=tt,t.drawYear=et,hoje=new Date,i=this._get(t,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,tt-$,1)),this._getFormatConfig(t)):i,a=this._canAdjustMonth(t,-1,et,tt)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><svg class='navigator-arrows ui-icon svg-icon'><use xlink:href='#svg-single-arrow-left' /></svg></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,tt+$,1)),this._getFormatConfig(t)):n,s=this._canAdjustMonth(t,1,et,tt)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><svg class='navigator-arrows ui-icon svg-icon'><use xlink:href='#svg-single-arrow-right' /></svg></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+n+"</span></a>",et>=hoje.getFullYear()&&tt>=hoje.getMonth()&&(s="<a class='ui-datepicker-next ui-datepicker-disabled'><svg class='navigator-arrows ui-icon svg-icon'><use xlink:href='#svg-single-arrow-right' /></svg></a>"),r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?G:R,r=q?this.formatDate(r,o,this._getFormatConfig(t)):r,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",d=z?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(U?l:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(U?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),u=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),dayNamesMinShort=this._get(t,"dayNamesShort"),g=this._get(t,"monthNames"),f=this._get(t,"monthNamesShort"),m=this._get(t,"monthNamesLower"),_=this._get(t,"beforeShowDay"),D=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),k=this._getDefaultDate(t),y="",b=0;b<J[0];b++){for(M="",this.maxRows=4,C=0;C<J[1];C++){if(x=this._daylightSavingAdjust(new Date(et,tt,t.selectedDay)),I=" ui-corner-all",N="",X){if(N+="<div class='ui-datepicker-group",J[1]>1)switch(C){case 0:N+=" ui-datepicker-group-first",I=" ui-corner-"+(U?"right":"left");break;case J[1]-1:N+=" ui-datepicker-group-last",I=" ui-corner-"+(U?"left":"right");break;default:N+=" ui-datepicker-group-middle",I=""}N+="'>"}for(N+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===b?U?s:a:"")+(/all|right/.test(I)&&0===b?U?a:s:"")+this._generateMonthYearHeader(t,tt,et,Q,Z,b>0||C>0,g,f)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)T=(w+c)%7,S+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+u[T]+"'>"+p[T]+"</span></th>";N+=S+"</tr></thead><tbody>",F=this._getDaysInMonth(et,tt),et===t.selectedYear&&tt===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,F)),Y=(this._getFirstDayOfMonth(et,tt)-c+7)%7,A=Math.ceil((Y+F)/7),W=X&&this.maxRows>A?this.maxRows:A,this.maxRows=W,E=this._daylightSavingAdjust(new Date(et,tt,1-Y)),hostname=window.location.hostname;var it="/";for(/\/blog\//.test(window.location.pathname)&&(it="/"+window.location.pathname.split("/")[1]+"/"+window.location.pathname.split("/")[2]+"/"),j=0;j<W;j++){for(N+="<tr>",O=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;w<7;w++)_dateCalendar=E.getFullYear()+("0"+E.getMonth()).slice(-2)+("0"+E.getDate()).slice(-2),_dateCalendarToday=hoje.getFullYear()+("0"+hoje.getMonth()).slice(-2)+("0"+hoje.getDate()).slice(-2),pastDate=!1,parseInt(_dateCalendar)<=parseInt(_dateCalendarToday)&&(pastDate=!0),searchLink="http://"+hostname+(-1!=hostname.indexOf("blogmilton")?"/blog":"")+it+"/"+E.getFullYear()+"/"+(E.getMonth()+1)+"/?s=&day="+E.getDate(),L=_?_.apply(t.input?t.input[0]:null,[E]):[!0,""],H=(K=E.getMonth()!==tt)&&!v||!L[0]||Q&&E<Q||Z&&E>Z,O+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(E.getTime()===x.getTime()&&tt===t.selectedMonth&&t._keyEvent||k.getTime()===E.getTime()&&k.getTime()===x.getTime()?" "+this._dayOverClass:"")+(H?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!D?"":" "+L[1]+(E.getTime()===G.getTime()?" "+this._currentClass:"")+(E.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(K&&!D||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(H?"":" data-handler='selectDay ' data-event='click' data-year='"+E.getFullYear()+"'")+">"+(K&&!D?"&#xa0;":H||!pastDate?"<span class='ui-state-default "+E.getTime()+"'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===R.getTime()?" ui-state-highlight":"")+(E.getTime()===G.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='"+searchLink+"'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);N+=O+"</tr>"}mesBusca=m[tt],mesNum=tt+1,mesNum=("0"+mesNum).slice(-2),anoNum=et,searchLinkMonth="http://"+hostname+(-1!=hostname.indexOf("blogmilton")?"/blog":"")+it+"/"+anoNum+"/"+mesNum+"/?s=&month="+mesNum,tt++,M+=N+="</tbody></table><div class='all-month-results'><a href='"+searchLinkMonth+"'>Visualizar todos os posts de "+mesBusca+"</a></div>"+(X?"</div>"+(J[0]>0&&C===J[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),tt>11&&(tt=0,et++)}y+=M}return y+=d,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,a,n,s,r,o){var l,d,c,h,u,p,g,f,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),D=this._get(t,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",k="";if(s||!m)k+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=a&&a.getFullYear()===i,d=n&&n.getFullYear()===i,k+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=a.getMonth())&&(!d||c<=n.getMonth())&&(k+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");k+="</select>"}if(D||(v+=k+(!s&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",s||!_)v+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),g=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(e)?u:e})(h[0]),f=Math.max(g,p(h[1]||"")),g=a?Math.max(g,a.getFullYear()):g,f=n?Math.min(f,n.getFullYear()):f,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g<=f;g++)t.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";t.yearshtml+="</select>",v+=t.yearshtml,t.yearshtml=null}return v+=this._get(t,"yearSuffix"),D&&(v+=(!s&&m&&_?"":"&#xa0;")+k),v+="</div>"},_adjustInstDate:function(t,e,i){var a=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),s=Math.min(t.selectedDay,this._getDaysInMonth(a,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(a,n,s)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return a&&n>a?a:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,a){var n=this._getNumberOfMonths(t),s=this._daylightSavingAdjust(new Date(i,a+(e<0?e:n[0]*n[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var i,a,n=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),r=null,o=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!n||e.getTime()>=n.getTime())&&(!s||e.getTime()<=s.getTime())&&(!r||e.getFullYear()>=r)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,a){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(a,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new h,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4";t.datepicker}),expose.init=function(){$(this.dom).datepicker()}; });    def('report-error', function(){ include("modal","storage");var idEstacao={};!0===/\.bol\.uol/.test(location.hostname)&&(idEstacao=Object.assign(idEstacao,{22798:1,12810:2,35976:4,79097:101,13014:102,22373:103,16614:104,79496:109,76513:111,13703:114,78612:1e3,76663:1002,73845:1003,79623:1006,79713:1007,79818:1009})),expose.getPushWebalertToken=function(){var e=this.storage.get("uolPushNotification");return e&&e.subscriptionID},expose.getSeeStationId=function(e){var a=[];-1!==e.indexOf("79794")&&a.push(1010);var t=e.slice(0,2);for(var n in idEstacao)if(!0===idEstacao.hasOwnProperty(n)&&-1!==t.indexOf(n)){a.push(idEstacao[n]);break}return a},expose.init=function(){var e=this;this.on("click",null,function(a,t){this.modal.open({type:"report-error",args:{},configPath:Config.configPath},"report-error").onshow=function(){var a={link:$(t).parents("[data-url]").attr("data-url")||document.documentURI||Config.channel.link,station:Config.portal.title,single:e.dom.getAttribute("data-title")||""};$(this.dom).find(".ep-source").html(a.single),$(".c-e").text(a.station);var n=e.getSeeStationId(universal_variable.aud.tags.split(","));n.length>0&&(this.dom.querySelector('input[name="estacao"]').value+=","+n.join(","));var o=function(e){var a,t=null,n=null;switch(e.type){case"email":n=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;break;case"text":t=4;break;case"textarea":t=10;break;default:t=0}return n&&(a=n.test(e.value)),t&&(a=e.value.length>=t),a};$("form",this.dom).on("submit",function(t){var n=$(this).parents(".modal"),s=n.find('input[type!="hidden"], textarea'),i=[],r=!0===navigator.cookieEnabled?"1":"0";if(n.find('[name="cookies"]')[0].value=r,s&&s.length>0&&s.each(function(){var e=[];e.label=$(this).closest(".form-group").find("label.error"),e.type=$(this).attr("type")||$(this).prop("tagName").toLowerCase(),e.value=$(this).val(),$(this)[o(e)?"removeClass":"addClass"]("error"),e.label[o(e)?"addClass":"removeClass"]("hidden"),o(e)||i.push(!1)}),n.find(".modal-wrapper").attr("data-success",[0==i.length?"1":"0"]),n.find(".modal-success")[0==i.length?"removeClass":"addClass"]("hidden"),n.find(".alert-danger")[0==i.length?"addClass":"removeClass"]("ghost"),n.find(".modal-form")[0==i.length?"addClass":"removeClass"]("hidden"),0==i.length){var l={estacao:n.find('[name="estacao"]').val(),flash:"-",cookies:n.find('[name="cookies"]').val(),extra_dna:n.find('[name="extra_dna"]').val(),link:a.link,titulo:a.single||a.station,nome:n.find('[name="nome"]').val(),email:n.find('[name="email"]').val(),mensagem:n.find('[name="mensagem"]').val()};e.getPushWebalertToken()&&(l.extra_webalert_token=e.getPushWebalertToken()),$.ajax({url:"https://services.uol.com/see/",data:l,dataType:"json",type:"POST",success:function(e){console.log(e)},error:function(){console.log("Erro")}}),t.preventDefault()}}),$("input[type=text], input[type=email], textarea",this.dom).on("focus",function(){$(this).parents().find(".alert-danger").addClass("ghost");return $(this).removeClass("error"),$(this).parents(".form-group").find("label.error").addClass("hidden"),!1}),UOLPD.TagManager.Commons.RemoteStorage().get("DNA",function(e,a){$('[name="extra_dna"]',this.dom).val(a)})}})}; });    def('widget-profile', function(){ !function(e,o,t){expose.init=function(){var n,r,a=this.dom,i=this,c=JSON.parse(a.getAttribute("data-config")),l=e.getElementsByTagName(o)[0];if(!e.getElementById(t)){(r=e.createElement(o)).id=t,r.crossOrigin="anonymous",r.src=c.sourceJs,r.onload=r.onreadystatechange=function(){r.onload=null,r.onreadystatechange=null,n=setInterval(function(){if("undefined"==typeof UOL)return!1;if(clearInterval(n),UOL.hasOwnProperty("perfil")&&UOL.perfil.hasOwnProperty("widgets")&&UOL.perfil.widgets.hasOwnProperty("Notify")&&"function"==typeof UOL.perfil.widgets.Notify){var e=lib["babel-login"],o=document.querySelector(".news-notice .girouol #subscriber-cmp1"),t=!1;typeof o!==undefined&&null!==o&&(t=!0),window.widgetProfile=UOL.perfil.widgets.Notify({avatarSize:c.avatarSize,avatarIconColor:c.avatarIconColor,widgetStyle:{username:c.widgetStyle.username,counter:c.widgetStyle.counter,zIndex:c.widgetStyle.zIndex},responsive:!0,linkCheckout:{sg:"2668383698",sa:c["ga-id"]},target:"profile-avatar",portal:Config.portal.slug,callbacks:{onInit:function(e){e.auth.isLogged;s(e),i.when("see-later",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.init})}),i.when("components/areas/estilo/horoscope",function(){Array.prototype.slice.call(arguments).forEach(function(o){o.getUserStatus(e.auth.isLogged)})})},onLogin:function(n){s(n),e&&e.setSession(n),t&&(o.value=n.auth.email.toLowerCase()),i.when("see-later",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.checkUrl()})}),i.when("components/areas/estilo/horoscope",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.onUserLogin(n.auth.isLogged)})}),i.when("components/areas/esporte/futebol/team-selector-home",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.loadTeamByCookie(n.auth.isLogged)})})},onLogout:function(n){s(n),e&&e.logout(n),t&&(o.value=""),i.when("see-later",function(e){Array.prototype.slice.call(arguments).forEach(function(e){e.checkUrl()})}),i.when("components/areas/estilo/horoscope",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.onUserLogout(n.auth.isLogged)})}),i.when("components/areas/esporte/futebol/team-selector-home",function(){Array.prototype.slice.call(arguments).forEach(function(e){e.loadTeamByCookie(n.auth.isLogged)})})}}})}},200)};var s=function(e){var o=document.querySelector(".header, .bbolp-2014").querySelector("#uol-mail-link"),t=o.querySelector(".mail-notification");e.auth.isLogged?NotificacaoUOL.init(function(e){e.url&&""!=e.url&&typeof e.href!=undefined&&(o.href=e.url),e.count>=1&&(t.innerHTML='<em class="'+e.moreThan+'">'+e.countStr+"</em>")}):t.innerHTML=""};l.parentNode.insertBefore(r,l)}}}(document,"script","widget-profile-jssdk"); });    def('readspeaker', function(){ function updateProgress(e){if("progress"==e.type)var t=Math.ceil(e.position/100*100);else{var o=Math.round(e.position/e.duration*100);t=Math.ceil(1*o)}e.dom.querySelector(e.progressSelector).style.width=t+"%"}include("breakpoints"),expose.selector=".readspeaker",expose.loaded=!1,expose.timeToSeconds=function(e){var t=e.split(":");return t.length>2?3600*parseInt(t[0])+60*parseInt(t[1])+parseInt(t[2]):t.length>1?60*parseInt(t[0])+parseInt(t[1]):parseInt(t[0])},expose.formatTime=function(e){var t=parseInt(e/3600,10)%24,o=parseInt(e/60,10)%60,s=parseInt(e%60,10),r=(o<10?"0"+o:o)+":"+(s<10?"0"+s:s);return t>0?(t<10?"0"+t:t)+":"+r:r},expose.playPause=function(){var e=this,t=this.dom.getAttribute("data-url"),o=this.dom.getAttribute("data-full-url"),s=$(this.dom).parents("[data-url]:last").attr("data-url");-1!=t.indexOf("service.htm")&&""!=s&&(t=s);var r=window.location.search;if(""==r||this.dom.getAttribute("data-url-force"))a="http://app-na.readspeaker.com/cgi-bin/rsent?customerid=7406&lang=pt_br&readid=texto&url="+(-1!=encodeURIComponent(t).indexOf("%3F")?encodeURIComponent(t)+"%26cpVersion=readspeaker%26cpExtend=true":encodeURIComponent(t)+"%3FcpVersion=readspeaker%26cpExtend=true");else{-1!=(r=r.replace("?","")).indexOf("doc")&&(r=r.replace("&component",""));var i=window.location.origin+window.location.pathname;window.location.port&&(i=i.replace(/:\d{4}/,""));var a="http://app-na.readspeaker.com/cgi-bin/rsent?customerid=7406&lang=pt_br&readid=texto&url="+(-1!=encodeURIComponent(i).indexOf("%3F")?encodeURIComponent(i)+"%26cpVersion=readspeaker%26cpExtend=true%26"+r:encodeURIComponent(i)+"%3FcpVersion=readspeaker%26cpExtend=true%26"+r)}if(o&&""!=o)a=o;if(a){a=a.replace("http://","https://");var n="";System.isBlockedAccess?(t=t.replace("http://","https://"),$.ajax({url:t+(-1!=t.indexOf("?")?"&":"?")+"gettoken",async:!1,dataType:"json",success:function(t){n="%26"+t.parameter+"="+t.token,p.call(e,a+n)}})):p.call(this,a)}function p(e){this.loaded||this.player.load(e),this.loaded=!0,this.dom.querySelector(".text")&&this.dom.querySelector(".text").remove(),this.player.playing?this.pause():this.play()}},expose.play=function(){this.dom.setAttribute("data-status","playing"),this.dom.querySelector(".duration").style.display="block",this.dom.querySelector(".bar").style.display="block",this.dom.querySelector(".i-sound")?this.dom.querySelector(".i-sound").setAttribute("class","i-pause control"):this.dom.querySelector(".i-play").setAttribute("class","i-pause control"),this.player.play()},expose.pause=function(){this.dom.setAttribute("data-status","paused"),this.dom.querySelector(".i-pause").setAttribute("class","i-play control"),this.player.pause()},expose.stop=function(){this.dom.querySelector(".duration").style.display="none",this.dom.querySelector(".bar").style.display="none",this.dom.removeAttribute("data-status"),this.dom.querySelector(".i-pause").setAttribute("class","i-sound control"),this.player.audio.seek(0),this.player.audio.pause()},expose.timeUpdate=function(e,t,o){o.querySelector(".duration").innerText=e;updateProgress({position:this.timeToSeconds(e),duration:t,type:"timeupdate",progressSelector:".timeupdate",dom:o})},expose.progress=function(e,t){updateProgress({position:e,duration:this.player.duration,type:"progress",progressSelector:".progress",dom:t})},expose.seek=function(e){var t=e.offsetX,o=parseInt(e.target.parentNode.clientWidth),s=Math.ceil(t/o*100),r=parseFloat(this.formatTime(this.player.duration).replace(":",".")),i=parseInt(r),a=(60*i+100*(r-i))*s/100;this.player.seek(a)},expose.elements=[],expose.clone=function(){var e=document.createElement("div");this.elements.push(e),document.body.appendChild(e)},expose.init=function(){var e=this;this.dom;function t(){this.seekable=!0,this.on("ended",function(){e.stop()}),this.on("timeupdate",function(t,o){e.timeUpdate(t,o,e.dom)}),this.on("progress",function(t){e.progress(t,e.dom)})}e=this;setTimeout(function(){e.player=new Audio5js({ready:t})},2e3),$(this.dom).on("click",function(){e.playPause()}),$(this.dom).find(".bar").on("click",function(t){e.seek(t)})}; });    def('collection', function(){ include("session-blacklist","storage"),expose.items=[],expose.loadItemLocked=!1,expose.initialItem={url:location.href,title:document.title,actualUrl:location.href},expose.index=-1,expose.viewRatio=1.5,expose.permanenceTime=2e3,expose.permanenceIndex=0,expose.permanenceTimer,expose.onscroll=function(){this.checkItemsToLoad(),this.checkViewport()},expose.current=function(){return-1!=this.index&&this.allItems[this.index]},expose.updateHistory=function(){},expose.enablePushState=function(){this.updateHistory=function(){var e=this.current(),t=this.initialItem,i=(e.getAttribute("data-url")||"").replace(/https?:/,location.protocol).replace(".br",".br:"+location.port)||"";if(-1==i.search(/external-content/)){if(!i)return document.title=t.title,void history.replaceState(null,document.title,t.url);document.title=((e.uol||{}).metatags||{}).title||Audience.mediaTitle,document.title=$("<textarea>").html(document.title).val(),history.replaceState(null,document.title,i),window.pSUPERFLY&&pSUPERFLY.virtualPage(e.getAttribute("data-url").replace(/https?:\/\/.*?(\/.*)/,"$1"),document.title),t.actualUrl=i}}},expose.startPermanenceControl=function(){var e=this;this.permanenceTimer&&clearTimeout(this.permanenceTimer),this.permanenceTimer=setTimeout(function(){e.permanenceIndex!=e.index&&(e.permanenceIndex=e.index,e.permanenceCallback())},this.permanenceTime)},expose.permanenceCallback=function(){hitAudience.countMetrics(this.current().uol&&this.current().uol.audience||Audience),delete Audience.firstView},expose.contentUpdated=function(){this.items=this.dom.querySelectorAll(".collection-item:not([data-loaded])")},expose.checkViewport=function(){for(var e=window.innerHeight/2,t=0;t<this.allItems.length;t++){var i=this.allItems[t].getBoundingClientRect();i.top<e&&i.bottom>e&&this.index!=t&&this.updateIndex(t)}},expose.autoClick=function(){var e=!(!this.current()||-1==this.current().className.indexOf("collection-first-item"))&&this.current().querySelector(".btn[data-open]");e&&$(window).on("scroll",function(){var t=[$(e).offset().top,$(this).scrollTop()+$(this).height(),50];t[1]>t[0]-t[2]&&$(e).is(":visible")&&e.click()})},expose.updateIndex=function(e){this.index=e,this.updateHistory(),this.startPermanenceControl()},expose.checkItemsToLoad=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e],i=t.getBoundingClientRect();window.innerHeight*this.viewRatio>Math.abs(i.top)&&!this.loadItemLocked&&(this.loadItemLocked=!0,this.loadItem(t,this.checkItemsToLoad))}},expose.loadItem=function(e,t){var i,o,n=this,l=this.parse(e.getAttribute("data-service"),{});if(l.hasOwnProperty("url")&&l.isBlog)o=l.url;else{if(i=Config.servicename+"?loadComponent=collection-item&data=",l.hasOwnProperty("url")&&(l.url=escape(l.url)),e.getAttribute("data-component"))if(l.path=Collection.path,"headline-content"==e.getAttribute("data-component"))l.blacklist=this.sessionStorage.getList("collection");else if(-1!=e.getAttribute("data-component").indexOf("chapter-synopsis")){var a=location.search.slice(1),c=a.split("&"),s={};""!=a&&c.length>0&&c.forEach(function(e){var t=e.split("="),i=t[0],o=t[1];s[i]=o}),s.titulo=Collection.titulo,s["tags-id-collection"]=Collection.search.tags,l.compData=s}o=i+JSON.stringify(l)}function r(i){e.setAttribute("data-loaded",i),this.loadItemLocked=!1,this.contentUpdated(),$(".collection-loading").hide(),t&&t.call(this)}$(".collection-loading").show(),this.getjson(o.replace(/https?:/g,location.protocol),function(t){if(t.hasOwnProperty("body"))if($(e).html(t.body),(t.audience||{}).string&&delete t.audience.string,$(e).hasClass("collection-module")){if(e.uol={type:"modulo-cruzado",metatags:t.metatags,audience:{collection:Collection.titulo,channel:Collection.channel,central:Collection.central,mediaType:t.type,mediaName:"Módulo Cruzado",mediaTitle:"Módulo Cruzado"}},(Component[t.type]||{}).audience)for(var i in Component[t.type].audience)e.uol.audience[i]=Component[t.type].audience[i];t.blacklist.map(function(t){"headline-content"==e.getAttribute("data-component")&&n.sessionStorage.addItem("collection",t)})}else t.audience.collection=Collection.titulo,t.audience.channel=Collection.channel,t.audience.central=Collection.central,e.uol={type:t.type,metatags:t.metatags,audience:t.audience};r.call(this,"loaded")},function(){r.call(this,"error")})},expose.init=function(){var e=this;this.sessionStorage=new this["session-blacklist"],this.allItems=this.dom.querySelectorAll(".collection-item"),this.contentUpdated(),this.checkItemsToLoad(),this.updateIndex(0),$(window).on("scroll.collection",function(){e.onscroll.call(e)}),Collection.collectionIndex||(-1==location.search.search(/nopush/)&&this.enablePushState(),window.addEventListener("beforeunload",function(){document.title=e.initialItem.title,history.replaceState(null,document.title,e.initialItem.url)})),"scrollRestoration"in history&&(history.scrollRestoration="manual")},expose.selector="body"; });  