1/*! 2023-01-25 */ 2!function(){var a,b,c,d,e,f,g;for(a={byId:function(a){return YAHOO.util.Dom.get(a)},query:function(){return YAHOO.util.Selector.query.apply(window,arguments)},addClass:function(a,b){return YAHOO.util.Dom.addClass(a,b)},hasClass:function(a,b){return YAHOO.util.Dom.hasClass(a,b)},removeClass:function(a,b){return YAHOO.util.Dom.removeClass(a,b)},setStyle:function(a,b,c){return YAHOO.util.Dom.setStyle(a,b,c)},isNull:function(a){return null===a},isArray:function(a){return YAHOO.lang.isArray(a)},isObject:function(b){return"object"==typeof b&&!a.isArray(b)&&!a.isNull(b)},later:function(a,b,c,d,e){return YAHOO.lang.later(a,b,c,d,e)},jsonEncode:function(a){return YAHOO.lang.JSON.stringify(a)},connect:function(b,c,d,e){var f,g,h;if(a.isObject(e))for(f in e)e.hasOwnProperty(f)&&(g=e[f],h+=a.isObject(g)||a.isArray(g)?"&"+f+"="+a.jsonEncode(g):"&"+f+"="+g);else h=e;return YAHOO.util.Connect.asyncRequest(b,c,d,h)},addEvent:function(a,b,c,d,e){return YAHOO.util.Event.addListener(a,b,c,d,e)},removeEvent:function(a,b,c){return YAHOO.util.Event.removeListener(a,b,c)},CreateEvent:function(a,b){return new YAHOO.util.CustomEvent(a,b)},createNode:function(b,c,d){var e,f=document.createElement(b);d=a.byId(d);for(e in c)c.hasOwnProperty(e)&&(f[e]=c[e]);return d?d.appendChild(f):f},Animation:function(a,b,c,d){return c=c||1,d||(d=null),new YAHOO.util.Anim(a,b,c,d)},Easing:YAHOO.util.Easing,xmlGet:function(a,b,c){var d;return b?(d=b.getElementsByTagName(a),0===d.length?!1:c?d[0]:d):!1},xmlGetText:function(b,c){var d=a.xmlGet(b,c,!0);return d?d.childNodes[0].nodeValue:null}},b=function(b){this.cfg={},this.cfg.loadingImagePath="/BannerGadget/css/bin/loading_images.png",this.timer=null,this.isRendered=!1,this.images=[],this.nodes={},this.nodes.domNode=a.byId(b),this.events={onReadXML:new a.CreateEvent("onReadXML"),onLoad:new a.CreateEvent("onLoad"),onRender:new a.CreateEvent("onRender"),onImageLoad:new a.CreateEvent("onImageLoad"),onTransitionStart:new a.CreateEvent("onTransitionStart"),onTransitionEnd:new a.CreateEvent("onTransitionEnd"),onImageShow:new a.CreateEvent("onImageShow"),onLegendShow:new a.CreateEvent("onLegendShow")},this._init()},b.prototype={_init:function(){var b=this;this.loadingImageLoaded=!1,this.images.loadingImage=new Image,this._addEvents(),this.images.loadingImage.onreadystatechange=function(){if("complete"===this.readyState||"loaded"===this.readyState){if(this.onreadystatechange=function(){},b.loadingImageLoaded===!0)return;b.loadingImageLoaded=!0,b._build()}},a.addEvent(this.images.loadingImage,"load",function(b,c){a.removeEvent(this,"load"),c.loadingImageLoaded!==!0&&(c.loadingImageLoaded=!0,c._build())},this,!1),this.images.loadingImage.src=this.cfg.loadingImagePath,this.images.loadingImage.alt="",a.later(500,this,this._forceBuild,[],!1),this.events.onLoad.fire(this)},_forceBuild:function(){this.loadingImageLoaded||(this.loadingImageLoaded=!0,this._build())},_build:function(){this.nodes.domNode&&(this.nodes.images=a.createNode("div",{className:"gcb_image"},this.nodes.domNode),this.nodes.loadingImage=a.createNode("div",{className:"gcb_image_loading"},this.nodes.images),this.nodes.loadingImage.appendChild(this.images.loadingImage),this.nodes.loadingImageOverlay=a.createNode("div",{className:"gcb_image_loading_overlay"},this.nodes.loadingImage),this.nodes.firstImage=a.createNode("div",{className:"gcb_image_current"},this.nodes.images),this.nodes.secondImage=a.createNode("div",{className:"gcb_image_next"},this.nodes.images),this.nodes.beforelegend=a.createNode("div",{className:"gcb_image_legend"},this.nodes.images),this.nodes.legend=a.createNode("div",{className:"gcb_image_legendWrapper"},this.nodes.beforelegend),this.nodes.link=a.createNode("a",{className:"gcb_image_link"},this.nodes.images),this.nodes.navigation=a.createNode("div",{className:"gcb_navigation"},this.nodes.domNode),this.nodes.previousImage=a.createNode("div",{className:"gcb_navigation_arrow previous"},this.nodes.navigation),this.nodes.paginator=a.createNode("div",{className:"gcb_navigation_paginator"},this.nodes.navigation),this.nodes.nextImage=a.createNode("div",{className:"gcb_navigation_arrow next"},this.nodes.navigation),this.nodes.thumbnails=a.createNode("ul",{className:"gcb_navigation_paginator_thumbs"},this.nodes.paginator),this.isRendered=!0,this.events.onRender.fire(this))},_addEvents:function(){this.events.onRender.subscribe(this._readXML,this,!0),this.events.onRender.subscribe(this._createAnimations,this,!0),this.events.onRender.subscribe(this._showLoading,this,
2!0),this.events.onReadXML.subscribe(this._loadImages,this,!0),this.events.onImageShow.subscribe(this._controller,this,!0),this.events.onReadXML.subscribe(this._addPaginator,this,!0)},_removeEvents:function(){a.removeEvent(window,"load",this._readXML)},_readXML:function(){var b,c,d;b=a.query("meta[name=bannerXML]","",!0),b&&(c=b.getAttribute("content"),d={scope:this,timeout:3e3,success:this._parseXML,failure:function(){}},a.connect("GET",c,d,""))},_parseXML:function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(imgs=[],nimgs=[],start=0,c=b.responseXML,l=a.xmlGet("details",c,!0),!l||!l.getAttribute("expositiontime"))return void this._hideGadget();if(this.nodes.domNode=this.nodes.domNode||a.query(".gcb_container","",!0),!this.nodes.domNode)return void console.error("Dom node for banner gadget not found!");for(this.nodes.domNode.className=this.nodes.domNode.className?this.nodes.domNode.className+" gcb_container_sized":"gcb_container_sized",this.cfg.expositionTime=parseFloat(l.getAttribute("expositiontime"),10),this.cfg.transitionTime=parseFloat(l.getAttribute("transitionTime"),10),this.cfg.transitionType=l.getAttribute("transitionType"),o=Selector.query("meta[name='channel']",null,!0)||Selector.query("meta[name='channel']",null,!0),n=o.getAttribute("content"),Selector.query("meta[http-equiv='content-language']",null,!0)||Selector.query("meta[httpEquiv='content-language']",null,!0)?(p=Selector.query("meta[http-equiv='content-language']",null,!0)||Selector.query("meta[httpEquiv='content-language']",null,!0),q=p.getAttribute("content")):(p=Selector.query("html",null,!0),q=p.getAttribute("lang")),e=a.xmlGet(q,c),d=a.xmlGet("imagem",e[0]),f=0,g=d.length;g>f;++f)h=d[f],h.isdefault&&(start=f),nimgs.push(h);for(imgs=0!==start?nimgs.slice(start).concat(nimgs.slice(0,start)):nimgs,f=0,g=imgs.length;g>f;++f)h=imgs[f],i=a.xmlGet(n,h,!0),j=a.xmlGet("bimage",i,!0),k={path:j.getAttribute("img"),legend:j.getAttribute("leg"),link:j.getAttribute("picLink"),target:j.getAttribute("linkTarget"),type:"image"},m=a.xmlGet("legend",h,!0),m&&(k.legend=m.textContent||m.text||""),k.legend.match(/(http|https):\/\/?/g)&&""===k.link&&(k.link=k.legend,k.legend="",k.target="_self"),this.images.push(k);this.events.onReadXML.fire()},_loadImages:function(){var b,c,d,e,f=this;for(e=function(){("complete"===this.readyState||"loaded"===this.readyState)&&(this.onreadystatechange=function(){},f._controller())},b=0,c=this.images.length;c>b;++b)d=this.images[b],d.file=new Image,d.file.src=d.path,d.file.onreadystatechange=e,("complete"===d.file.readyState||"loaded"===d.file.readyState)&&this._controller(),d.file.readyState||a.addEvent(d.file,"load",this._controller,this,!0)},_runTransition:function(b){this.cfg.transitionType&&this.transitions[this.cfg.transitionType]||(this.cfg.transitionType="dissolve"),this._hideLoading(),this.events.onTransitionStart.fire(),this.isAnimated=!0,a.setStyle(this.nodes.beforelegend,"opacity",0),this.nodes.legend.innerHTML=b.legend,this.transitions[this.cfg.transitionType].call(this,b)},_createAnimations:function(){this.firstImageAnimation=new a.Animation(this.nodes.firstImage,{},1e3*this.cfg.transitionTime,a.Easing.easeOut),this.secondImageAnimation=new a.Animation(this.nodes.secondImage,{},1e3*this.cfg.transitionTime,a.Easing.easeOut),this.legendAnimation=new a.Animation(this.nodes.beforelegend,{},1e3*this.cfg.transitionTime,a.Easing.easeOut),this.firstImageAnimation.onComplete.subscribe(this._fireOnTransitionEnd,this,!0),this.secondImageAnimation.onComplete.subscribe(this._fireOnTransitionEnd,this,!0)},transitions:{dissolve:function(b){var c;this.foreground=a.query(".gcb_image_current",this.nodes.domNode,!0),this.background=a.query(".gcb_image_next",this.nodes.domNode,!0),c=b.path,this._addLink(b),this.background.style.backgroundImage="url("+c+")",a.setStyle(this.background,"opacity",1),this.firstImageAnimation||this._createAnimations(),this.foreground===this.firstImageAnimation.getEl()?(this.firstImageAnimation.attributes={opacity:{to:0}},this.firstImageAnimation.animate()):(this.secondImageAnimation.attributes={opacity:{to:0}},this.secondImageAnimation.animate())}},_exposing:function(){this.timer=a.later(1e3*this.cfg.expositionTime,this,this._fireOnImageShow)}
2,_fireOnImageShow:function(){this.isAnimated=!1,this.events.onImageShow.fire()},_showLegend:function(){this.legendAnimation.attributes={opacity:{to:1}},this.legendAnimation.animate()},_fireOnTransitionEnd:function(){this.foreground.className="gcb_image_next",this.background.className="gcb_image_current",this._showLegend(),this.events.onTransitionEnd.fire(),this._exposing()},_controller:function(){var a;this.nextImageIndex||(this.nextImageIndex=0),a=this.images[this.nextImageIndex],this.isRendered&&!this.isAnimated&&(this._runTransition(a),this._updatePaginator(this.nextImageIndex),this.nextImageIndex=(this.nextImageIndex+1)%this.images.length)},next:function(a,b){b.timer&&b.timer.cancel&&b.timer.cancel(),b._fireOnImageShow()},previous:function(a,b){b.timer&&b.timer.cancel&&b.timer.cancel(),b.nextImageIndex=b.nextImageIndex-2>=0?(b.nextImageIndex-2)%b.images.length:b.images.length+b.nextImageIndex-2,b._fireOnImageShow()},goTo:function(a,b){b.scope.timer&&b.scope.timer.cancel&&b.scope.timer.cancel(),b.scope.nextImageIndex=b.imageIndex%b.scope.images.length,b.scope._fireOnImageShow()},_showLoading:function(){this.nodes.loadingImage.style.display="block"},_hideLoading:function(){this.nodes.loadingImage.style.display="none"},_addPaginator:function(){var b,c,d,e;for(b=0,c=this.images.length;c>b;++b)d="",0===b&&(d="selected"),e=a.createNode("li",{className:d},this.nodes.thumbnails),this.nodes.thumbnails.appendChild(e),a.addEvent(e,"click",this.goTo,{scope:this,imageIndex:b},this,!1);a.addEvent(this.nodes.nextImage,"click",this.next,this,!1),a.addEvent(this.nodes.previousImage,"click",this.previous,this,!1)},_updatePaginator:function(b){var c,d,e=a.query("li",this.nodes.thumbnails);for(c=0,d=e.length;d>c;++c)c===b?a.addClass(e[c],"selected"):a.removeClass(e[c],"selected")},_addLink:function(b){b.link?(this.nodes.link.setAttribute("href",b.link),this.nodes.link.setAttribute("target",b.target),a.setStyle(this.nodes.link,"display","block")):(this.nodes.link.removeAttribute("href"),this.nodes.link.removeAttribute("target"),a.setStyle(this.nodes.link,"display","none"))},_hideGadget:function(){this.nodes.domNode.style.height=0,this.nodes.domNode.style.overflow="hidden"},destroy:function(){this._removeEvents()}},f=a.query(".gcb_container"),c=0,d=f.length;d>c;++c)g=f[c],a.hasClass(g,"bannerImage")||(e=new b(g))}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.