‘:””;if(r){var a=n.promos.showYahooLogo?””:”yns-no-logo”;r=r.replace(“{notifOnboardBtnLabel}”,n.promos.notifOnboardBtnLabel).replace(“{notifOnboardMsg}”,n.promos.notifOnboardMsg).replace(“{subscriptionTopic}”,n.promos.subscriptionTopic).replace(“{noLogoClass}”,a).replace(“{promoLogo}”,n.promos.promoLogo)}var s=t.newCount>n.panel.maxCount?t.newCount:””,c=n.panel.notificationCenterPath,l=c?””:ne,u=n.panel.headerMsg?””:” “+ne,d=c?oe:””,f=void 0;t.count?f=t.markup:f=’
{emptyPanelMsg}
‘.replace(“{emptyPanelMsg}”,n.panel.emptyPanelMsg);return e=e.replace(“{notifMarkup}”,f).replace(“{promoMarkup}”,r).replace(“{hideClass}”,l).replace(“{notifCenterLink}”,c).replace(“{paddingClass}”,d).replace(“{headerMsg}”,n.panel.headerMsg).replace(“{hideHeaderClass}”,u).replace(/{notificationCenterNavMsg}/g,n.panel.notificationCenterNavMsg).replace(/{newCount}/g,s)}},{key:”render”,value:function(e,t){var n=this;if(n._panelNode){var o=void 0,i=n._panelNode,r=void 0,a=void 0;switch(e){case”expanded_panel”:o=’
{headerMsg}
‘,a=n._store.getNotifications(),r=n._generatePanelMarkup(o,a),i.innerHTML=r;break;case”error_panel”:r=(o=’
{errorMsg}
‘).replace(“{errorMsg}”,n._config.panel.errorMsg),i.innerHTML=r}t&&t()}else t&&t(new Error(“No panel parent”))}},{key:”createPanelParentNode”,value:function(e){e&&(e.innerHTML=”,this._panelNode=document.getElementById(te))}},{key:”updateBadgeNode”,value:function(e){if(e){var t=this._store.getNotifications().newCount,n=this._config.badge.maxCount;if(t){var o=t>n?n+”+”:t;e.innerHTML=o}else e.innerHTML=””}}},{key:”addStyles”,value:function(e){if(e&&”undefined”!=typeof window){var t=document.getElementById(this._config.panel.styleTagId);t||((t=document.createElement(“style”)).type=”text/css”,t.id=this._config.panel.styleTagId,t.innerText=e,document.head.appendChild(t))}}}]),e}(),re=function(){function e(t,n,o){z(this,e);var i=this;i._store=n,i._view=o,i._config=t;var r=i._config.panel;i._panelParentNode=document.querySelector(r.parentSelector),i._badgeNode=i._config.badge.selector&&document.querySelector(i._config.badge.selector),i._indicatorNode=r.indicatorSelector&&document.querySelector(r.indicatorSelector)}return G(e,[{key:”createPanelParentNode”,value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(te)}},{key:”refreshPanelNode”,value:function(e,t){var n=this;V(n._notifPanelNode,ee),n._store.fetchNotifications(e,(function(e,o){var i=window.wafer&&window.wafer.base;i&&i.destroy(n._notifPanelNode),e?n._notifPanelNode.innerHTML||(n._view.render(“error_panel”),V(n._notifPanelNode,ee)):(n._view.render(“expanded_panel”),n._view.updateBadgeNode(n._badgeNode),n._showBadge(),n._showIndicator(),n._view.addStyles(o.css)),X(n._notifPanelNode,ee),i&&i.sync(n._notifPanelNode.parentNode),t&&t(e,o)}))}},{key:”resetBadge”,value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),V(e._badgeNode,e._config.badge.hideClass)}},{key:”_showIndicator”,value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?V(this._indicatorNode,this._config.panel.indicatorClass):X(this._indicatorNode,this._config.panel.indicatorClass))}},{key:”_showBadge”,value:function(){var e=this;e._store.getNotifications().newCount?X(e._badgeNode,e._config.badge.hideClass):V(e._badgeNode,e._config.badge.hideClass)}}]),e}(),ae={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0,bypassEligibleClassCheck:!1,notifOnboardBtnLabel:”Notify Me”,notifOnboardMsg:”Get alerts for breaking news and top stories”,promoLogo:”https://s.yimg.com/cv/apiv2/ae/news/circle_bell.png”,showYahooLogo:!0,subscriptionTopic:”gondor_homerun_news”},badge:{hideClass:””,maxCount:5,selector:””},panel:{emptyPanelMsg:”You have no new notifications.”,errorMsg:””,headerMsg:”Notifications”,imageTag:”img:40×40|2|80″,indicatorClass:”yns-indicator”,indicatorSelector:null,maxCount:6,notificationCenterNavMsg:”View all {newCount} notifications”,notificationCenterPath:””,notificationTypes:””,parentSelector:null,styleTagId:”notificationStyles”,theme:”default”},service:{attemptCount:1,attemptDelay:2,url:null,resetUrl:null,isRMP:!1,responseType:”json”,timeout:1500}},se={NotificationClient:function(){function e(t){z(this,e);var n=this;n.config=n._parseConfig(t),n._validateRequiredConfigs()&&(n._request=new F(n.config),n._store=new Q(n.config,n._request),n._view=new ie(n.config,n._store),n._panelController=new re(n.config,n._store,n._view),n._panelController.createPanelParentNode(),n._assignHelperMethods())}return G(e,[{key:”_parseConfig”,value:function(e){var t={};for(var n in $(t,ae),t)if(t.hasOwnProperty(n)){var o=t[n],i=e[n];”object”===(void 0===o?”undefined”:H(o))?$(o,i):t[n]=e[n]}return t}},{key:”_validateRequiredConfigs”,value:function(){var e=this.config;return!(!e.panel.parentSelector||!e.service.url)}},{key:”_assignHelperMethods”,value:function(){var e=this;e.helpers={refreshPanelNode:e._panelController.refreshPanelNode.bind(e._panelController),resetBadge:e._panelController.resetBadge.bind(e._panelController),resetIndicator:function(){X(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}()},ce=”lnct”,le=function(){function t(){var e,t;this.personalized=!1,this.ybarElem=document.getElementById(“ybar”),this.partnerClasses=null===(t=null===(e=this.ybarElem)||void 0===e?void 0:e.className)||void 0===t?void 0:t.match(/ybar-variant-([a-z]*)/),this.client=new se.NotificationClient(this.getConfig())}return t.prototype.refreshPanel=function(){var e,t,n,o=this,i={lastUpdate:this.getTimeStamp()||this.setTimeStamp(),loadInHpViewer:!0,includePersonalized:this.personalized},r=(null===(e=window.YAHOO)||void 0===e?void 0:e.context)||(null===(t=window.Af)||void 0===t?void 0:t.context)||{};return r.region&&r.lang&&(i.lang=r.lang,i.region=r.region),(null===(n=this.partnerClasses)||void 0===n?void 0:n.length)&&(i.partner=this.partnerClasses[1]),new Promise((function(e,t){o.client.helpers.refreshPanelNode({matrixParams:i},(function(n,o){n&&(p(“Notification refresh error:”,n),t(n)),e(o)}))}))},t.prototype.resetBadge=function(){this.client.helpers.resetBadge(),this.setTimeStamp()},t.prototype.getConfig=function(){var t,n,o,i,r,a=document.getElementById(“notification-container”),s=null===(t=null==a?void 0:a.dataset)||void 0===t?void 0:t.config;if(K&&!s)return K;var c={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0},badge:{selector:”#notif-badge”,hideClass:”ybar-notification-hidden”},panel:{emptyPanelMsg:”You have no new notifications.”,errorMsg:”Please check back later.”,headerMsg:”Notifications”,maxCount:5,parentSelector:”#ybarNotificationBody”,notificationTypes:”breakingNews”},service:{url:”/tdv2_fp/api/resource/NotificationHistory.getHistory”,isRMP:!1}},l={};if(s){“att”===(null===(n=this.partnerClasses)||void 0===n?void 0:n[1])&&(c.promos.showYahooLogo=!1);try{var u=JSON.parse(s);l=e({},u),this.personalized=1===u.personalize}catch(e){p(“Notifications config parsing error”,e)}a&&delete a.dataset.config}return K=this.mergeConfigs(c,l),(null===(o=this.partnerClasses)||void 0===o?void 0:o.length)&&”yahoo”!==(null===(i=this.partnerClasses)||void 0===i?void 0:i[1])&&(null===(r=K.promos)||void 0===r?void 0:r.subscriptionTopic)&&delete K.promos.subscriptionTopic,K},t.prototype.mergeConfigs=function(t,n){var o=e({},t);for(var i in t)o[i]=e(e({},t[i]),n[i]);return o},t.prototype.getTimeStamp=function(){var e;return null===(e=window.localStorage)||void 0===e?void 0:e.getItem(ce)},t.prototype.setTimeStamp=function(){var e,t=””+Math.floor((new Date).getTime()/1e3);return null===(e=window.localStorage)||void 0===e||e.setItem(ce,t),t},t}(),ue=new le,de=function(){return ue},fe=function(e){return~e.indexOf(“?”)?e+=”&”:e+=”?”,e},pe={navBeaconFired:!1},ve=[“ready”,”navigation”],me=function(){function t(t){var n=this;this.triggerEvent=d,this.addEventListener=f,this.logError=p,this.logPerformance=v,this.getConfig=O,this.getPerformanceMetrics=R,this.rapidRefresh=L,this.state=e({},pe),this.modules=t,this.userEmail=””,window.YBAR&&(ve.forEach((function(e){var t=”on”.concat(e),o=window.YBAR[t];o&&(n[t]=o)})),window.YBAR.wssid&&(this.wssid=window.YBAR.wssid),window.YBAR.appid&&(this.appid=window.YBAR.appid)),ve.forEach((function(e){var t=”on”.concat(e);f(e,(function(){for(var r,a=[],s=0;s90&&_e(“performance”,e)}catch(e){}}),1e3)})),M(),f(“error”,(function(e){var t=e&&e.detail||{},n=t.error||{},o=t.message||n.message||n.toString();try{var i={code:n.name,file:n.fileName||””,line:n.lineNumber||””,message:o};_e(“error”,i)}catch(e){}}));var Le=”_yb_1yuyah3″,ke=”_yb_orhzsm”,Ce=”_yb_1d3zssw”,Se=”_yb_cqwfgw”;if(“undefined”!=typeof Element&&!Element.prototype.matches){var xe=Element.prototype;xe.matches=xe.matchesSelector||xe.mozMatchesSelector||xe.msMatchesSelector||xe.oMatchesSelector||xe.webkitMatchesSelector}var Ne=function(e,t){for(;e&&9!==e.nodeType;){if(“function”==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function Ae(e,t,n,o,i){var r=Me.apply(this,arguments);return e.addEventListener(n,r,i),{destroy:function(){e.removeEventListener(n,r,i)}}}function Me(e,t,n,o){return function(n){n.delegateTarget=Ne(n.target,t),n.delegateTarget&&o.call(e,n)}}var Te,qe=function(e,t,n,o,i){return”function”==typeof e.addEventListener?Ae.apply(null,arguments):”function”==typeof n?Ae.bind(null,document).apply(null,arguments):(“string”==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return Ae(e,t,n,o,i)})))},Ie=function(e){this.data=e,this.next=null,this.prev=null},Pe=function(){function e(){this.head=null,this.tail=null}return e.prototype.push=function(e){var t=new Ie(e);return this.head?this.tail?(t.prev=this.tail,this.tail.next=t,this.tail=t):(this.tail=t,this.tail.prev=this.head,this.head.next=this.tail):(this.head=t,t.next=this.tail),t},e.prototype.size=function(){for(var e=0,t=this.head;t;)e+=1,t=t.next;return e},e.prototype.getHead=function(){return this.head},e.prototype.getTail=function(){return this.tail},e.prototype.get=function(e){if(e>=this.size())return null;for(var t=0,n=this.head;(null==n?void 0:n.next)&&t=200&&i.status<=299,status:i.status,text:function(){return Promise.resolve(i.responseText)},json:function(){return new Promise((function(e,t){try{e(JSON.parse(i.responseText))}catch(e){t(e)}}))}})},i.send(o.body)}))]}))}))},_t=function(e,t){return void 0===t&&(t={}),(“function”==typeof window.fetch?fetch:wt)(e,t)},Et=function(e,t){var n=e.url,o=e.headers,i=void 0===o?{}:o;return i[“X-Requested-With”]=”XMLHttpRequest”,_t(n,{headers:i,credentials:”include”}).then((function(e){return e.text().then((function(n){bt({status:e.status,responseText:n},t)}))}))};!function(e){e[e.COUNT=0]=”COUNT”}(ze||(ze={})),function(e){e[e.PENDING=0]=”PENDING”,e[e.COMPLETE=1]=”COMPLETE”}(Ge||(Ge={}));var Lt={0:0,1:1,9:9,99:99,150:150},kt=new Map,Ct=function(){function o(){}return Object.defineProperty(o.prototype,”wssid”,{get:function(){var e,t,n=null===(e=window.YBAR)||void 0===e?void 0:e.wssid;return n||(n=(null===(t=document.querySelector(‘input[name=”mail_wssid”]’))||void 0===t?void 0:t.value)||””,this.wssid=n),n},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.wssid=e||””},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,”appid”,{get:function(){var e,t,n=null===(e=window.YBAR)||void 0===e?void 0:e.appid;return n||(n=(null===(t=document.querySelector(‘input[name=”mail_appid”]’))||void 0===t?void 0:t.value)||””,this.appid=n),n},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.appid=e||””},enumerable:!1,configurable:!0}),o.prototype.fetchCount=function(e){return t(this,void 0,void 0,(function(){var t,o,i,r,a=this;return n(this,(function(n){return t=function(e){var t=kt.get(e);if(t){if(t.status===Ge.PENDING)return t.promise;var n=Date.now()-12e4;return t.data&&t.lastRequested>n?Promise.resolve(t.data):void 0}}(ze.COUNT),(o=this._checkForMockData())?[2,o]:!e&&t?[2,t]:(1,i={data:{responseType:”json”,requests:[{id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:{select:{mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”}},suppressResponse:!0,requests:[{id:”ListDecos”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/decos”,method:”GET”}]}]}},r=this._fetch(i,1,(function(e){var t=a._normalizerCountResponse(e);return function(e,t){var n={lastRequested:Date.now(),status:Ge.COMPLETE,promise:Promise.resolve(t),data:t};kt.set(e,n)}(ze.COUNT,t),t})),s=ze.COUNT,c=r,l={lastRequested:Date.now(),status:Ge.PENDING,promise:c},kt.set(s,l),[2,r]);var s,c,l}))}))},o.prototype._fetch=function(o,i,r){var a,s;return t(this,void 0,void 0,(function(){var t,c,l,u,d,f,v,m,y,h,g,b,w,_,E,L;return n(this,(function(n){switch(n.label){case 0:if(t=o.data,c=void 0===t?{}:t,l=o.params,u=void 0===l?{}:l,d=”EC-4008″,f=”EC-4003″,v=this._getYmreqid(),!this.appid)throw new Error(“No appId, user is logged out”);m=e({appId:this.appid},u),this.wssid&&(m.wssid=this.wssid),o.params=m,y=[],Object.keys(m).forEach((function(e){var t=m[e];t&&y.push(“”.concat(encodeURIComponent(e),”=”).concat(encodeURIComponent(t)))})),h=y.length?”?”.concat(y.join(“&”)):””,g=”https://apis.mail.yahoo.com/ws/v3/batch”.concat(h),n.label=1;case 1:return n.trys.push([1,4,,5]),[4,_t(g,{method:”POST”,body:JSON.stringify(c),credentials:”include”,headers:{“Content-Type”:”application/json”,”X-Oath-YmReqId”:v}})];case 2:return[4,(b=n.sent()).json()];case 3:if(w=n.sent(),b.ok)return[2,r(null===(s=w.result)||void 0===s?void 0:s.responses)];if((_=null===(a=null==w?void 0:w.error)||void 0===a?void 0:a.code)===f)return[2,this._handleWssidApiError(w,o,i,r)];throw _===d?new Error(“Session has expired”):new Error(“Mail Api Responded with an Error”);case 4:throw E=n.sent(),p(“JWS: “.concat((L=E).message),L),E;case 5:return[2]}}))}))},o.prototype._checkForMockData=function(){var e=document.getElementById(“ybar”);if(e&&e.hasAttribute(“data-mc”)){var t=e.getAttribute(“data-mc”);if(t&&Lt[t])return Lt[t]}},o.prototype._normalizerCountResponse=function(e){var t,n,o,i,r,a;if(!e)return 0;var s=((null===(o=null===(n=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.response)||void 0===n?void 0:n.result)||void 0===o?void 0:o.decos)||[]).find((function(e){return”FTI”===(null==e?void 0:e.id)}));return s&&null!==(a=null===(r=null===(i=null==s?void 0:s.counts)||void 0===i?void 0:i[0])||void 0===r?void 0:r.unseen)&&void 0!==a?a:0},o.prototype._handleWssidApiError=function(e,t,n,o){var i,r,a=null===(r=null===(i=null==e?void 0:e.error)||void 0===i?void 0:i.details)||void 0===r?void 0:r.wssid,s=t.params,c=(void 0===s?{}:s).wssid;if(a){if(c&&a===c)throw new Error(“API provided same invalid WSSID”);if(void 0!==n&&n>0)return n-=1,this.wssid=a,this._fetch(t,n,o);throw new Error(“Max retries with invalid WSSID reached”)}throw new Error(“valid WSSID missing from API Response”)},o.prototype._getYmreqid=function(){var e=(new Date).getTime();return”xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00″.replace(new RegExp(“x”,”g”),(function(){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),t.toString(16)}))},o}(),St={add:[{itemId:”ybar-mail-banner”,reactions:[“SHOWN”]}]};he(“ybar-mod-sidenav”,(function(t){var n,r={sidenavBtn:document.getElementById(“_yb_sidenav-btn”),sidenav:document.querySelector(“.”.concat(ct)),menu:document.querySelector(“.”.concat(ut)),sections:document.querySelectorAll(“.”.concat(it)),closeBtn:document.querySelector(“.”.concat(Je)),panels:document.querySelectorAll(“.”.concat(ot)),backBtn:document.querySelector(“.”.concat(Fe)),footer:document.querySelector(“.”.concat(Ze)),copyright:document.querySelector(“.”.concat(We)),selectedSectionLinks:document.querySelectorAll(“.”.concat(at,” a”)),focusedElement:document.querySelector(“.”.concat(at,” .”).concat(Ke)),editionsDropdown:document.querySelector(“.”.concat(Xe)),mailUnread:document.querySelector(“.”.concat(ft)),mailTooltip:document.getElementById(“_yb_mail-tooltip”),tooltipClose:document.getElementById(“_yb_mail-tooltip-close”)},a=window.location.href.split(“?”)[0]?window.location.href.split(“?”)[0].replace(//$/,””):window.location.href,s=i([],o(r.selectedSectionLinks),!1);if(!r.focusedElement)for(var c=0;c0){if(n&&o){var i=t>99;n.classList.add(“”.concat(mt)),o.classList.add(“”.concat(mt)),n.textContent=i?”99+”:t+””,i?n.classList.add(“”.concat(pt)):t>=10&&n.classList.add(“”.concat(vt))}e.onDestroy((function(){n&&(n.textContent=””)}))}})).catch((function(){}))}(t,u)}));var xt=”_yb_11szbh0″,Nt=function(e,t){e&&(!function(e,t,n){var o=”ybar-show-outline”,i=”ybar-hide-outline”,r=[],a=document.querySelector(e),s=document.querySelector(t),c=function(e,t){for(var n=e.className.split(” “),r=[],a=0;a0&&Array.prototype.forEach.call(n,(function(e){e.onerror=function(){e.onerror=null,e.style.display=”none”}})),t.wrapper&&(Nt(t.wrapper,e),function(e,t){t&&e.addElementListener(t,”click”,(function(){e.triggerEvent(“logo-click”)}))}(e,t.wrapper))};he(“ybar-mod-logo”,(function(e){var t={wrapper:document.getElementById(“ybar-logo”),logoImages:document.querySelectorAll(“.”.concat(xt))};At(e,t)}));var Mt=”_yb_11wuu2l”,Tt=”_yb_9dtjy5″,qt=”_yb_hd49uw”,It=”_yb_11wktex”,Pt=”_yb_1ilkop8″,Bt=”_yb_1gbgof5″,Ot=”_yb_glr7qt”,Rt=”_yb_pjnxfi”;he(“ybar-mod-adaptivenav”,(function(e){var t={moreDropDown:document.querySelector(“.”.concat(Mt)),moreBtn:document.querySelector(“.”.concat(Tt)),wrap:document.querySelector(“.”.concat(It)),moreSectionTitle:document.querySelectorAll(“.”.concat(Pt)),editionsCtaBtn:document.querySelector(“.”.concat(Bt)),editionsMenu:document.querySelector(“.”.concat(Ot)),closeBtn:document.querySelector(“.”.concat(Rt))},n=!1,o=function(t,n){var o=t.moreDropDown,i=t.moreBtn,r=t.wrap,a={sec:”ybar”,slk:”More”,elm:”expand”,pkgt:”top”,subsec:”navrail”,itc:”1″};o&&i&&r&&o.classList.contains(“”.concat(Mt))&&(o.classList.remove(“”.concat(Mt)),r.classList.add(“”.concat(qt)),i.setAttribute(“aria-expanded”,”true”),a.elm=”expand”,e.triggerEvent(“adapnav:more:show”,{event:n}),E(“ybar”,a.slk,””,a))},i=function(e){var t=e.moreDropDown,o=e.moreBtn,i=e.wrap,r={sec:”ybar”,slk:”More”,elm:”close”,pkgt:”top”,subsec:”navrail”,itc:”1″};t&&o&&i&&(t.classList.contains(“”.concat(Mt))||(t.classList.add(“”.concat(Mt)),i.classList.remove(“”.concat(qt)),o.setAttribute(“aria-expanded”,”false”),n||E(“ybar”,r.slk,””,r)))},r=function(e){var t=e.editionsMenu,n={sec:”ybar”,slk:”More”,elm:”close”,pkgt:”top”,subsec:”navrail”,itc:”1″};null==t||t.close(),E(“ybar”,n.slk,””,n)},a=function(){var e;window.innerWidth<1024&&(null===(e=t.editionsMenu)||void 0===e||e.close())};t.moreBtn&&(e.addElementListener(t.moreBtn.parentNode,”focusin”,(function(e){o(t,e)})),e.addElementListener(t.moreBtn.parentNode,”focusout”,(function(){i(t)})),e.addElementListener(t.moreBtn,”mouseenter”,(function(e){var n;window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&window.YAHOO.SA.apps[0].view.shown?window.YAHOO.SA.apps[0].view.hide():null===(n=t.moreBtn)||void 0===n||n.click(),o(t,e)})),e.addElementListener(t.moreBtn.parentNode,”mouseleave”,(function(){i(t)})),e.addElementListener(t.moreBtn.parentNode,”click”,(function(e){t.moreDropDown&&t.moreDropDown.classList.contains(“”.concat(Mt))&&o(t,e)})),e.addElementListener(t.moreBtn,”keydown”,(function(e){var n;27===e.keyCode&&(null===(n=t.moreBtn)||void 0===n||n.blur())}))),t.moreSectionTitle&&Array.from(t.moreSectionTitle).forEach((function(t){e.addElementListener(t,”mouseover”,(function(){n=!0})),e.addElementListener(t,”mouseout”,(function(){n=!1}))})),t.editionsCtaBtn&&t.editionsMenu&&(e.addElementListener(t.editionsCtaBtn,”click”,(function(){var e,n;t.editionsMenu&&(e=t.editionsMenu,n={sec:”ybar”,slk:”More”,elm:”expand”,pkgt:”top”,subsec:”navrail”,itc:”1″},e&&(e.showModal(),E(“ybar”,n.slk,””,n)))})),e.addElementListener(t.closeBtn,”click”,(function(){r(t)})),t.editionsMenu.addEventListener(“click”,(function(e){var n,o,i=null===(n=t.editionsMenu)||void 0===n?void 0:n.getBoundingClientRect();(e.clientXi.right||e.clientYi.bottom)&&(null===(o=t.editionsMenu)||void 0===o||o.close())})),window.addEventListener(“resize”,a)),e.onDestroy((function(){i(t),r(t),window.removeEventListener(“resize”,a)})),window.addEventListener(“keyup”,(function(e){27===e.keyCode&&i(t)}))}));var Dt={“popover-body”:”_yb_3svx3f”,”ybar-mail-link”:”_yb_qbuynq”,”ybar-mail-preview”:”_yb_16ndfdo”,”ybar-mail-signin-link”:”_yb_1mdchqn”,”ybar-mod-mail”:”_yb_sewj5c”,”ybar-mod-mail-promo-imp”:”_yb_dp6nhn”,”ybar-large-unread”:”_yb_1kgr963″,”ybar-mid-unread”:”_yb_nennsm”,”ybar-mail-indicator”:”_yb_ex6ogn”,”ybar-unread-active”:”_yb_sn8a8q”,”count-loaded”:”_yb_5m6tz2″},Yt=function(e,t){var n=t.mailModule,o=t.mailLink,i=t.mailSigninLink,r=t.mailPreview;if(n){var a=new Ct;if(e.addElementListener(n,”mouseenter”,(function(){e.triggerEvent(“close-all-menus”)})),e.addEventListener(“close-all-menus”,(function(){q(n)||jt(t)})),e.addElementListener(r,”focusin”,(function(){Ut(t)})),e.addElementListener(r,”focusout”,(function(){jt(t)})),e.onDestroy((function(){jt(t)})),i){var c=o.getAttribute(“data-redirect-params”);if(c&&””!==c){var l=o.href;e.onDestroy((function(){o.href=l})),c=-1!==o.href.indexOf(“&activity=ybar-“)?””:c.replace(/[[pspid]]/,function(){var e,t,n,o=s||_(),i=null==o?void 0:o.getRapidAttribute(“spaceid”);if(i||(i=null===(t=null===(e=window.YAHOO)||void 0===e?void 0:e.i13n)||void 0===t?void 0:t.SPACEID),!i){var r=w();i=null!==(n=null==r?void 0:r.getAttribute(“data-spaceid”))&&void 0!==n?n:””}return i||””}()),o.href=fe(o.href)+c,(null==i?void 0:i.href)&&(i.href=fe(i.href)+c)}}else Ht(e,t,a)}},Ut=function(e){var t,n;null===(t=e.mailPreview)||void 0===t||t.classList.add(“ybarMenuOpen”),null===(n=e.mailLink)||void 0===n||n.setAttribute(“aria-expanded”,”true”)},jt=function(e){var t,n;null===(t=e.mailPreview)||void 0===t||t.classList.remove(“ybarMenuOpen”),null===(n=e.mailLink)||void 0===n||n.setAttribute(“aria-expanded”,”false”)},Ht=function(e,t,n){var o=t.mailLink,i=t.mailUnread,r=t.mailUnreadSpan,a=t.mailIndicator,s=””.concat(Dt[“ybar-unread-active”]);n.fetchCount().then((function(t){if(i&&t>0){var n=e.getConfig(),c=n.i18n.root.MAIL_ARIA_LINK;if(o&&o.hasAttribute(“aria-label”)&&c&&o.setAttribute(“aria-label”,c.replace(“{count}”,t.toString())),”finance”!==n.property&&i.classList.add(s),a&&a.classList.add(s),r){var l=t>99;r.textContent=l?”99+”:t+””,i.classList.add(“”.concat(Dt[“count-loaded”])),l?i.classList.add(“”.concat(Dt[“ybar-large-unread”])):t>=10&&i.classList.add(“”.concat(Dt[“ybar-mid-unread”]))}e.onDestroy((function(){i.classList.remove(s),a&&a.classList.remove(s),r&&(r.textContent=””)}))}})).catch((function(){}))};he(“ybar-mail-init”,(function(e){var t=document.getElementById(“ybarUnread”),n={mailModule:document.querySelector(“.”.concat(Dt[“ybar-mod-mail”])),mailIndicator:document.querySelector(“.”.concat(Dt[“ybar-mail-indicator”])),mailLink:document.querySelector(“.”.concat(Dt[“ybar-mail-link”])),mailSigninLink:document.querySelector(“.”.concat(Dt[“ybar-mail-signin-link”])),mailUnread:t,mailUnreadSpan:null==t?void 0:t.querySelector(“span”),mailPreview:document.getElementById(“ybarMailPreview”),popoverBody:document.querySelector(“.”.concat(Dt[“popover-body”].split(” “).join(“.”))),mailPreviewPopover:document.querySelector(“.”.concat(Dt[“ybar-mail-preview”].split(” “).join(“.”),” .”).concat(Dt[“popover-body”].split(” “).join(“.”)))};Yt(e,n)}));var zt=function(e){var t=document.querySelector(“#ybar-navigation-item-mail”),n=document.querySelector(“#ybar-navigation-item-mail > a”),o=document.querySelector(“#ybar-navigation-item-mail > a > span”);null!==t&&null!==n&&(new Ct).fetchCount().then((function(t){o&&t>0&&(o.textContent=”(“+(t>99?”99+”:t)+”)”,e.onDestroy((function(){o.textContent=””})))})).catch((function(){}))};he(“ybar-mod-navigation”,(function(e){!function(e,t){if(t)for(var n=function(t){e.triggerEvent(“navigation”,{event:t})},o=function(o){var i=t[o];i.addEventListener?e.addElementListener(i,”click”,n):i.attachEvent&&(i.attachEvent(“click”,n),e.onDestroy((function(){i.detachEvent(“click”,n)})))},i=0;i=5||n.initialized?clearInterval(r):(void 0!==n.isNotificationsSupported()&&n.init(),i++)}),100)}return e.prototype.show=function(e){var t;this.initialized&&(this.historyEnabled&&!e||(document.body.classList.add($t),null===(t=this.a11yMenu)||void 0===t||t.setAttribute(“aria-expanded”,”true”),this.lastSeen=(new Date).getTime()))},e.prototype.hide=function(){var e;this.initialized&&(this.historyEnabled&&document.body.classList.remove(Kt),document.body.classList.remove($t),null===(e=this.a11yMenu)||void 0===e||e.setAttribute(“aria-expanded”,”false”))},Object.defineProperty(e.prototype,”lastSeen”,{get:function(){return this.state.lastSeen},set:function(e){this.state.lastSeen=e,this.setLocalStorage()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,”manuallyClosed”,{get:function(){return this.state.manuallyClosed},set:function(e){this.state.manuallyClosed=!!e,this.setLocalStorage()},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.isNotificationsSupported()&&this.isNotificationPermissionDefault()&&(this.historyEnabled||document.body.classList.add(Kt),this.addEventListeners(),this.initialized=!0,this.hasSeenTooltipIn(this.manuallyClosed?6048e5:Xt)||(document.body.classList.add(Kt),this.show(!0)))},e.prototype.addEventListeners=function(){var e=this;this.ybar.addElementListener(this.container.getElementsByClassName(Zt)[0],”click”,(function(){e.hide(),e.manuallyClosed=!0}))},e.prototype.isNotificationsSupported=function(){var e;return null===(e=null===window||void 0===window?void 0:window.subscriptionHelperInstance)||void 0===e?void 0:e.checkIsSupportedBrowser()},e.prototype.isNotificationPermissionDefault=function(){var e;return”default”===(null===(e=window.Notification)||void 0===e?void 0:e.permission)},e.prototype.hasSeenTooltipIn=function(e){if(!this.lastSeen)return!1;var t=new Date(this.lastSeen),n=new Date;return t.getTime()+e>n.getTime()},e.prototype.setLocalStorage=function(){var e;null===(e=window.localStorage)||void 0===e||e.setItem(Wt,JSON.stringify(this.state))},e.prototype.getLocalStorage=function(){var e,t,n=null===(e=window.localStorage)||void 0===e?void 0:e.getItem(Wt);if(null===n)return null;try{return JSON.parse(n)}catch(e){return null===(t=window.localStorage)||void 0===t||t.removeItem(Wt),null}},e}(),tn=-1,nn={0:0,1:1,9:9,99:99,150:150},on=function(e,t){var n,o=t.isUH3,i=t.notifMenu,r=t.notifMenuOpener,a=t.notifDropdown,s=t.notifBadge,c=t.notifContainer,l=t.notifLabel;t.tooltipContainer&&(n=new en(e,t.tooltipContainer));var u=de(),d=function(){i&&(i.checked=!1),null==a||a.classList.remove(“ybarMenuOpen”)},f=function(){var t;e.triggerEvent(“close-all-menus”),!!document.querySelector(“.display-push-promos .”.concat(Gt))||(u.resetBadge(),s&&(o?null===(t=s.parentElement)||void 0===t||t.classList.remove(Ft):s.style.display=”none”))},p=function(e){var t,n;0===tn&&(null===(t=null==e?void 0:e.css)||void 0===t?void 0:t.length)&&e.css.length>0&&(tn++,function(e){for(var t,n,o=0;o0&&s)if(o){var r,a=(r=e.newCount)>99;s.textContent=a?”99+”:r+””,null===(n=s.parentElement)||void 0===n||n.classList.add(Ft)}else s.style.display=”block”},v=function(){u.refreshPanel().then(p).then(L).catch((function(){}))};e.addEventListener(“close-all-menus”,(function(){q(c)||d()})),c&&(v(),setInterval((function(){v()}),3e5),o?l&&l.addEventListener(“mouseenter”,(function(){f(),null==n||n.show()})):c.addEventListener(“mouseenter”,(function(){f(),null==n||n.show()})),c.addEventListener(“mouseleave”,(function(){d(),null==n||n.hide()}))),e.addElementListener(i,”click”,(function(){E(“ybar”,”notification”,””,{elm:”btn”,elmt:”block”===(null==s?void 0:s.style.display)?”newalert”:””,subsec:”notification”,itc:”1″})})),r&&function(e,t,n,o,i){e.addElementListener(t,”mouseenter”,(function(){var e=JSON.stringify({sec:n,slk:o,params:i});I[e]||(I[e]=!0,E(n,o,””,i),setTimeout((function(){delete I[e]}),1e3))}))}(e,r,”ybar”,”notification”,{elm:”expand”,subsec:”notifications”,itc:”2″}),e.addElementListener(a,”focusin”,(function(){i&&(i.checked=!0),null==a||a.classList.add(“ybarMenuOpen”)})),e.addElementListener(a,”focusout”,d),e.addElementListener(t.tooltipContainer,”focusin”,(function(){null==n||n.show()})),e.addElementListener(t.tooltipContainer,”focusout”,(function(){null==n||n.hide()}));var m=e.getConfig().device,y=document.getElementById(“ybar”);y&&y.classList.contains(“ybar-ytheme-crunch”)&&(tn=0);var h=new RegExp(“[?&]notifications=1(&|#|$)”);”desktop”===m&&i&&h.test(window.location.search)&&(i.checked=!0)};he(“ybar-mod-notification”,(function(e){var t={isUH3:”crunch”===e.getConfig().ytheme,notifContainer:document.getElementById(“notification-container”),notifBadge:document.getElementById(“notif-badge”),notifMenu:document.getElementById(“ybarNotificationMenu”),notifMenuOpener:document.querySelector(“#ybarNotificationMenu + label”),notifDropdown:document.getElementById(“notifDropdownContainer”),tooltipContainer:document.querySelector(“.”.concat(Jt)),notifLabel:document.querySelector(“.”.concat(Vt))};on(e,t)}))}()}};