PageSourceSearch

https://conteudos.meo.pt/Style%20Library/consumo/js/masterpagejs/menuv6.js

js meo.pt collected 2026-10-01 10:21:50 UTC 15,653 bytes, 1 lines download raw bytes

1$.getScriptCached||function(e){e.getScriptCached=function(n,o){return e.ajax({url:n,dataType:"script",cache:!0}).done(o)}}(jQuery);var cdnUrl,renderCopy,fnFullFilePathToFileParentPath=function(e){return e?e.substring(0,e.lastIndexOf("/")+1):null},fnExceptionToFullFilePath=function(e){var n="";if(e.fileName)n=e.fileName;else if(e.stacktrace){var o=e.stacktrace;o=(o=(o=o.substr(o.indexOf("http"))).substr(0,o.indexOf("Dummy Exception"))).substr(0,o.lastIndexOf(":")),n=o}else e.stack?function(){var o,t=e.stack,i=(o=t).indexOf("://")+3;"/"==(o=o.substr(i)).charAt(0)&&(o=o.substr(1),i++);var r=o.indexOf("/"),a=(o=o.substr(o.indexOf("/"))).indexOf(":"),s=t.substr(0,i+r+a);s=s.substr(s.indexOf("http")),n=s}():n=null;return n},fnExceptionToFileParentPath=function(e){return fnFullFilePathToFileParentPath(fnExceptionToFullFilePath(e))},fnGetJSFileParentPath=function(){try{throw new Error("Dummy Exception")}catch(e){return fnExceptionToFileParentPath(e)}},globalAppId="",offerCode="",offerName="",userIsAuth="",currAppID="",tmpMeosCount=null,tmpMeosDate=null,tmpMeosMenuObj=null,globalHeaderObject=null;void 0!==ISites.Configurations.CDN&&""!=ISites.Configurations.CDN.URL||(ISites.Configurations.CDN=new Object,ISites.Configurations.CDN.URL=ISites.Configurations.Header.CDNUrl);var curHeaderConfig=ISites.Configurations.Header;window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),void 0!==ISites.Configurations.AppId&&""!=ISites.Configurations.AppId||(ISites.Configurations.AppId="externo");var curParentPath=fnGetJSFileParentPath();function CreateFullHeader(e,n,o,t,i,r,a,s,u,l,c,p,d){userIsAuth=e||n;try{window.dataLayer&&(window.dataLayer.push({username:o}),window.dataLayer.push({userauth:userIsAuth}))}catch(e){console.log("error adding user info to dataLayer: "+e.message)}var g=fnGetJSFileParentPath();null==g&&(g=ISites.Configurations.CDN.URL+"/Style%20Library/consumo/js/masterpagejs/");var f=ISites.Configurations.Header;a&&a.length>0?(f.AppID=a.toLowerCase(),ISites.Configurations.AppId=a.toLowerCase()):f.AppID=ISites.Configurations.AppId.toLowerCase(),globalAppId=f.AppID,u&&u.length>0?f.LogoutUrl=u:f.AppID.indexOf("isell")>-1&&(f.LogoutUrl=f.LogoutStoreUrl),null!=l&&"boolean"==typeof l&&(f.PushLogin=l),null!=c&&"boolean"==typeof c&&(f.PullBanner=c),null!=p&&"boolean"==typeof p&&(f.RenderLang=p),null!=d&&"boolean"==typeof d&&(f.RenderC2C=d),s&&s.length>0&&(f.Segment=s),r&&r.length>0&&(f.NavID=r),new Array;var m={siteContext:appIdToContext(f.AppID),containerId:"header"},C={};if("forum"===f.AppID){var h=ISites.Configurations.CDN.URL+"/Style%20Library/Brand/react/app/main-menu/main-menu-v6.js";$.getScriptCached||function(e){e.getScriptCached=function(n,o){return e.ajax({url:n,dataType:"script",cache:!0}).done(o)}}(jQuery),$.getScriptCached(h,function(){tmpHeaderObject=new MenuV6.MainMenu(m),globalHeaderObject=null,C={skeleton:!0},tmpHeaderObject.getHeader(C),GetHeaderTaxonomy(e,n,o,t,i,r,a,s,u,l,c,p,d,tmpHeaderObject)})}else h=ISites.Configurations.CDN.URL+"/Style%20Library/Brand/react/app/main-menu/main-menu-v6-ISites.js",System.import(h).then(function(g){tmpHeaderObject=new g.MainMenu(m),globalHeaderObject=null,C={skeleton:!0},tmpHeaderObject.getHeader(C),GetHeaderTaxonomy(e,n,o,t,i,r,a,s,u,l,c,p,d,tmpHeaderObject)})}function GetHeaderTaxonomy(e,n,o,t,i,r,a,s,u,l,c,p,d,g){var f=ISites.Configurations.Services.TaxonomyAPI.EndpointUrl;f+="/header";var m={};m.appId=curHeaderConfig.AppID,m.segment=curHeaderConfig.Segment?curHeaderConfig.Segment:appIdToSegment(curHeaderConfig.AppID),m.configs={},curHeaderConfig.RenderLang&&(m.configs.renderLang=curHeaderConfig.RenderLang),curHeaderConfig.RenderC2C&&(m.configs.renderC2C=curHeaderConfig.RenderC2C),"undefined"!=typeof ignoreC2C&&1==ignoreC2C&&(m.configs.renderC2C=!1),appIdToContext(curHeaderConfig.AppID),jQuery.ajax({url:f,method:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(m),beforeSend:function(){var e=this.url,n=e.indexOf("&yip_csrf_token=");if(-1!=n){var o=e.substr(n+1),t="";-1!=o.indexOf("&")&&(t=o.substr(o.indexOf("&"))),this.url=e.substr(0,n)+t}},success:function(e){e&&CreateHeaderObject(e,userIsAuth,o,t,i,r,a,u,l,c,curHeaderConfig,g)},error:function(e,n,o){console.error("API error:",n,o),console.log(e.responseText)},crossDomain:!0,cache:!0,scriptCharset:"UTF-8",async:!0})}
1function CreateIdentifiedHeader(){if(window._spPageContextInfo&&_spPageContextInfo.userId)CreateFullHeader(!1,!1,"","","","","","","","");else{var e=ISites.Utils.Authentication.getIdentifiedUser();null==e?CreateFullHeader(!1,!1,"","","","","","","",""):CreateFullHeader(!1,!0,e.UserName,e.IdPID,e.Alias,e.NavId)}}function appIdToContext(e){switch(e.toLowerCase()){case"isitesconsumo":case"isitesconsumoen":return"MEO";case"isitesmeoempresas":return"MEOEmpresas";case"isitesuzo":return"uzo";case"isitesempresarial":case"isellempresarial":return"AlticeEmpresas";case"isitesmoche":return"MOCHE";case"isitesmeogo":return"MEOGo";case"isitesmeogoprivado":return"MEOGoPrivado";case"acc":return"acc";case"acme":return"acme";case"isitesmeoenergia":case"isitesmeoenergiaempresas":return"meoenergia";default:return e}}function appIdToSegment(e){switch(e.toLowerCase()){case"isitesconsumo":case"isitesconsumoen":case"isellconsumo":case"acc":return"meo";case"isitesmeoempresas":case"isellempresarial":return"meoempresas";default:return e}}function CreateHeaderObject(e,n,o,t,i,r,a,s,u,l,c,p){globalHeaderObject=null;var d=e;p.getHeader(d),setTimeout(function(){d=HeaderPostProcessing(p,d,n,o,t,i,u,l,c),globalHeaderObject=d,p.getHeader(d)},0)}function HeaderPostProcessing(e,n,o,t,i,r,a,s,u){var l=n.usermenu?n.usermenu:null;if(l){var c=!o;l.isAnon=c;var p=u.LogoutUrl;if(l.userMenuScript&&l.userMenuScript.length>0&&p&&p.length>0&&-1==l.userMenuScript.indexOf(p)){const e=/(document\.location\s*=\s*['"])https?:\/\/[^'"]+(["'])/i;l.userMenuScript=l.userMenuScript.replace(e,"$1${specLogoutUrl}$3")}else{var d="logout";if(l.Auth_LogoutLinkId&&l.Auth_LogoutLinkId.length>0&&(d=l.Auth_LogoutLinkId),p&&p.length>0){var g="<script type='text/javascript'>  var doLogout = function() { \t\tdocument.location = ' "+p+"';\t};  $('#"+d+"').on('click', function () { ";g+=" doLogout(); ",g+=" });",g+="<\/script>",l.userMenuScript=g}}var f="";c||-1!=u.AppID.indexOf("empresas")||i&&i.length>0&&"FACEBOOK"==i&&r&&r.length>0&&$.isNumeric(r)&&(f=u.UserPicFormatFacebook.format(r)),l.userPhoto=f,l.userName=t;var m="MEOAnonCampaign",C="MEOAuthCampaign",h=null,I=null,S=null,b=null,y="",v={};if(c){if(u.PushLogin&&!readCookie(m)){var P=null!=ISites.Configurations.Header&&null!=ISites.Configurations.Header.PushLoginPopupDesktop&&ISites.Configurations.Header.PushLoginPopupDesktop,H=null!=ISites.Configurations.Header&&null!=ISites.Configurations.Header.PushLoginPopupMobile&&ISites.Configurations.Header.PushLoginPopupMobile,w=(k=!mobileAndTabletcheck())?ISites.Configurations.Header.PushLoginPopupDesktopShowTime?ISites.Configurations.Header.PushLoginPopupDesktopShowTime:12:ISites.Configurations.Header.PushLoginPopupMobileShowTime?ISites.Configurations.Header.PushLoginPopupMobileShowTime:12;w*=1e3;var D=k?ISites.Configurations.Header.PushLoginDesktopCookieExpiration?ISites.Configurations.Header.PushLoginDesktopCookieExpiration:24:ISites.Configurations.Header.PushLoginMobileCookieExpiration?ISites.Configurations.Header.PushLoginMobileCookieExpiration:24;if(S=k?ISites.Configurations.Header.PushLoginDesktopDelayTime?ISites.Configurations.Header.PushLoginDesktopDelayTime:0:ISites.Configurations.Header.PushLoginPopupMobileDelayTime?ISites.Configurations.Header.PushLoginPopupMobileDelayTime:0,S*=1e3,k&&P||!k&&H)try{window.localStorage.consentGiven&&"true"==window.localStorage.consentGiven?(h=w,createCookie(m,1,D)):(h=w=S=null,y="")}catch(e){}}l.pushLoginTime=h,l.rubiCampaignHTML=y,l.pushDelayTime=S,n.usermenu=l}else if(!c){if(u.PullBanner&&!readCookie(C)){var k,T=null!=ISites.Configurations.Header&&null!=ISites.Configurations.Header.PullBannerPopupDesktop&&ISites.Configurations.Header.PullBannerPopupDesktop,x=null!=ISites.Configurations.Header&&null!=ISites.Configurations.Header.PullBannerPopupMobile&&ISites.Configurations.Header.PullBannerPopupMobile,L=(k=!mobileAndTabletcheck())?ISites.Configurations.Header.PullBannerPopupDesktopShowTime?ISites.Configurations.Header.PullBannerPopupDesktopShowTime:12:ISites.Configurations.Header.PullBannerPopupMobileShowTime?ISites.Configurations.Header.PullBannerPopupMobileShowTime:12;L*=1e3;var O=k?ISites.Configurations.Header.PullBannerDesktopCookieExpiration?ISites.Configurations.Header.PullBannerDesktopCookieExpiration:24:ISites.Configurations.Header.PullBannerMobileCookieExpiration?ISites.Configurations.Header.PullBannerMobileCookieExpiration:24;if(b=k?ISites.Configurations.Header.PullBannerDesktopDelayTime?ISites.Configurations.Header.PullBannerDesktopDelayTime:0:ISites.Configurations.Header.PullBannerMobileDelayTime?ISites.Configurations.Header.PullBannerMobileDelayTime:0,b*=1e3,k&&T||!k&&x)try{window.localStorage.consentGiven&&"true"==window.localStorage.consentGiven?(I=L,createCookie(C,1,O)):(h=w=b=null,y="")}catch(e){}}
1fetchRubiCampaigns(u.NavID,u.AppID).then(function(o){if(o.dataLayerObj){var t={},i=o.dataLayerObj.dataLayerObjName,r=o.dataLayerObj.dataLayerObjProps;t[i]=r,window.dataLayer.push(t)}if(l.pullBannerTime=I,l.rubiCampaignHTML=o.rubiCampaignHTML,l.pullDelayTime=b,isEmpty(v)&&o.nboDataEvents&&(v=o.nboDataEvents),l.attributes=v,globalHeaderObject.usermenu=l,n.meos){var a=n.meos;o.MEOS_COUNT&&(a.MEOS_COUNT=o.MEOS_COUNT),o.MEOS_DATE&&(a.MEOS_DATE=o.MEOS_DATE),globalHeaderObject.meos=a}e.getHeader(globalHeaderObject)}).catch(function(e){console.log("error fetching rubi campaigns:"+e)}),n.usermenu=l}}var A=n.meos?n.meos:null;return A&&tmpMeosCount&&tmpMeosDate&&(A.MEOS_COUNT=tmpMeosCount,A.MEOS_DATE=tmpMeosDate,n.meos=A),n}function fetchRubiCampaigns(e,n){return new Promise(function(o,t){var i=ISites.Configurations.Services.CampaignsAPI.EndpointUrl,r={};r.appId=n,r.navId=e,jQuery.ajax({url:i,method:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(r),crossDomain:!0,cache:!0,scriptCharset:"UTF-8",async:!0}).fail(function(e,n,o){t(o)}).done(function(e){o(e)})})}function termIsToShow(e){var n=!0;try{e.DataFim&&e.DataFim.length>0&&(n=new Date(Date.parse(e.DataFim))>=new Date)}catch(e){n=!0}return n}function CreateFullFooter(e,n){$(document).ready(function(){var n=fnGetJSFileParentPath();null==n&&(n=ISites.Configurations.CDN.URL+"/Style%20Library/consumo/js/masterpagejs/"),e.indexOf("empresarial"),e&&e.length>0?(curHeaderConfig.AppID=e.toLowerCase(),ISites.Configurations.AppId=e.toLowerCase()):curHeaderConfig.AppID=ISites.Configurations.AppId.toLowerCase(),globalAppId=curHeaderConfig.AppID;var o={},t=null,i={siteContext:appIdToContext(curHeaderConfig.AppID&&curHeaderConfig.AppID.length>0?curHeaderConfig.AppID:e),footerContainerId:"footer"};if("forum"===curHeaderConfig.AppID){var r=ISites.Configurations.CDN.URL+"/Style%20Library/Brand/react/app/main-menu/main-menu-v6.js";$.getScriptCached||function(e){e.getScriptCached=function(n,o){return e.ajax({type:"GET",url:n,dataType:"script",cache:!0}).done(o)}}(jQuery),$.getScriptCached(r,function(){o=new MenuV6.MainMenu(i),t={skeleton:!0},o.getFooter(t),GetFooterTaxonomy(e,o)})}else r=ISites.Configurations.CDN.URL+"/Style%20Library/Brand/react/app/main-menu/main-menu-v6-ISites.js",System.import(r).then(function(n){o=new n.MainMenu(i),t={skeleton:!0},o.getFooter(t),GetFooterTaxonomy(e,o)})})}function GetFooterTaxonomy(e,n){var o=ISites.Configurations.Services.TaxonomyAPI.EndpointUrl;o+="/footer";var t={};t.appId=curHeaderConfig.AppID,t.segment=curHeaderConfig.Segment?curHeaderConfig.Segment:appIdToSegment(curHeaderConfig.AppID),t.configs={},jQuery.ajax({url:o,method:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(t),beforeSend:function(){var e=this.url,n=e.indexOf("&yip_csrf_token=");if(-1!=n){var o=e.substr(n+1),t="";-1!=o.indexOf("&")&&(t=o.substr(o.indexOf("&"))),this.url=e.substr(0,n)+t}},success:function(o){o&&CreateFooterObject(o,e,n)},error:function(e,n,o){console.error("API error:",n,o),console.log(e.responseText)},crossDomain:!0,cache:!0,scriptCharset:"UTF-8",async:!0})}function CreateFooterObject(e,n,o){appIdToContext(curHeaderConfig.AppID&&curHeaderConfig.AppID.length>0?curHeaderConfig.AppID:n),o.getFooter(e)}function mobileAndTabletcheck(){var e,n=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(n=!0),n}function GetMainDomain(){var e=window.location.hostname;if(e&&e.length>0){var n=e.split("."),o=n.length;return o>2?"{0}.{1}".format(n[o-2],n[o-1]):""}}function createCookie(e,n,o){if(o){var t=new Date;t.setTime(t.getTime()+60*o*60*1e3);var i="; expires="+t.toGMTString()}else i="";var r=GetMainDomain();document.cookie=e+"="+n+i+";domain="+r+"; path=/"}function readCookie(e){for(var n=e+"=",o=document.cookie.split(";"),t=0;t<o.length;t++){for(var i=o[t];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(n))return i.substring(n.length,i.length)}return null}function eraseCookie(e){createCookie(e,"",-1)}function isEmpty(e){try{for(var n in e)return!1;return!0}catch(e){return!0}}cdnUrl=ISites.Configurations.CDN.URL,null==curParentPath&&(curParentPath=ISites.Configurations.CDN.URL+"/Style%20Library/consumo/js/masterpagejs/"),String.prototype.format||(String.prototype.format=function(){var e=arguments;return this.replace(/{(\d+)}/g,function(n,o){return void 0!==e[o]?e[o]:n})}),String.prototype.count||(String.prototype.count=function(e){for(var n=0,o=0;o<this.length;o++)this[o]==e&&n++;return n});

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.