Proposal from MGI’s Nomination Committee


    {promoMarkup}{notifMarkup}

“,panelEmptyTemplate=”

  • {emptyPanelMsg}

  • “,panelErrorTemplate=”

    {errorMsg}

    “,panelParentTemplate=””,notifOnboardPromoTemplate=”

  • “,EXPANDED_PANEL=”expanded_panel”,ERROR_PANEL=”error_panel”,NotificationView=perform(){perform e(n,t){classCallCheck(this,e);var i=this;i._config=n,i._panelNode=null,i._store=t}return createClass(e,[{key:”_generatePanelMarkup”,value:function(e,n){var t=this._config,i=void 0,o=void 0;”undefined”!=typeof window&&(i=window.Notification&&”default”===window.Notification.permission,o=t.promos.bypassEligibleClassCheck||hasClass(document.body,t.promos.eligibleBodyClass));var r=t.promos.enableNotifOnboard&&i&&o?notifOnboardPromoTemplate:””;if(r){var s=t.promos.showYahooLogo?””:”yns-no-logo”;r=r.replace(“{notifOnboardBtnLabel}”,t.promos.notifOnboardBtnLabel).replace(“{notifOnboardMsg}”,t.promos.notifOnboardMsg).replace(“{subscriptionTopic}”,t.promos.subscriptionTopic).replace(“{noLogoClass}”,s).replace(” a=n.newCount>t.panel.maxCount?n.newCount:””,c=t.panel.notificationCenterPath,l=c?””:constants.panelHideElement,d=t.panel.headerMsg?””:” “+constants.panelHideElement,u=c?constants.panelPaddingBtm:””,p=void 0;n.count?p=n.markup:p=panelEmptyTemplate.replace(“{emptyPanelMsg}”,t.panel.emptyPanelMsg);return e=e.replace(“{notifMarkup}”,p).replace(“{promoMarkup}”,r).replace(“{hideClass}”,l).replace(” t=this;if(t._panelNode){var i=void 0,o=t._panelNode,r=void 0,s=void 0;switch(e){case EXPANDED_PANEL:i=panelTemplate,s=t._store.getNotifications(),r=t._generatePanelMarkup(i,s),o.innerHTML=r;break;case ERROR_PANEL:r=(i=panelErrorTemplate).replace(“{errorMsg}”,t._config.panel.errorMsg),o.innerHTML=r}n&&n()}else n&&n(new Error(“No panel parent”))}},{key:”createPanelParentNode”,value:function(e){e&&(e.innerHTML=panelParentTemplate,this._panelNode=document.getElementById(constants.panelNodeId))}},{key:”updateBadgeNode”,value:function(e){if(e){var n=this._store.getNotifications().newCount,t=this._config.badge.maxCount;if(n){var i=n>t?t+”+”:n;e.innerHTML=i}else e.innerHTML=””}}},{key:”addStyles”,value:function(e){if(e&&”undefined”!=typeof window)}}]),e}(),EXPANDED_PANEL$1=”expanded_panel”,ERROR_PANEL$1=”error_panel”,PanelController=perform(){perform e(n,t,i){classCallCheck(this,e);var o=this;o._store=t,o._view=i,o._config=n;var r=o._config.panel;o._panelParentNode=doc.querySelector(r.parentSelector),o._badgeNode=o._config.badge.selector&&doc.querySelector(o._config.badge.selector),o._indicatorNode=r.indicatorSelector&&doc.querySelector(r.indicatorSelector)}return createClass(e,[{key:”createPanelParentNode”,value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(constants.panelNodeId)}},{key:”refreshPanelNode”,value:function(e,n){var t=this;addClass(t._notifPanelNode,constants.panelLoading),t._store.fetchNotifications(e,(function(e,i)(t._view.render(ERROR_PANEL$1),addClass(t._notifPanelNode,constants.panelLoading)):(t._view.render(EXPANDED_PANEL$1),t._view.updateBadgeNode(t._badgeNode),t._showBadge(),t._showIndicator(),t._view.addStyles(i.css)),removeClass(t._notifPanelNode,constants.panelLoading),n&&n(e,i)))}},{key:”resetBadge”,value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),addClass(e._badgeNode,e._config.badge.hideClass)}},{key:”_showIndicator”,value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?addClass(this._indicatorNode,this._config.panel.indicatorClass):removeClass(this._indicatorNode,this._config.panel.indicatorClass))}},{key:”_showBadge”,value:function(){var e=this;e._store.getNotifications().newCount?removeClass(e._badgeNode,e._config.badge.hideClass):addClass(e._badgeNode,e._config.badge.hideClass)}}]),e}(),config={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0,bypassEligibleClassCheck:!1,notifOnboardBtnLabel:”Notify Me”,notifOnboardMsg:”Get alerts for breaking information and prime tales”,promoLogo:” haven’t any 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:2,attemptDelay:1,url:null,resetUrl:null,isRMP:!1,responseType:”json”,timeout:1500}},Foremost=perform(){perform e(n){classCallCheck(this,e);var t=this;t.config=t._parseConfig(n),t._validateRequiredConfigs()&&(t._request=new NotificationRequest(t.config),t._store=new NotificationStore(t.config,t._request),t._view=new NotificationView(t.config,t._store),t._panelController=new PanelController(t.config,t._store,t._view),t._panelController.createPanelParentNode(),t._assignHelperMethods())}return createClass(e,[{key:”_parseConfig”,value:function(e){var n={};for(var t in objectAssign(n,config),n)if(n.hasOwnProperty(t)){var i=n[t],o=e[t];”object”===(void 0===i?”undefined”:_typeof(i))?objectAssign(i,o):n[t]=e[t]}return n}},{key:”_validateRequiredConfigs”,worth:perform()},{key:”_assignHelperMethods”,worth:perform(){var e=this;e.helpers={refreshPanelNode:e._panelController.refreshPanelNode.bind(e._panelController),resetBadge:e._panelController.resetBadge.bind(e._panelController),resetIndicator:perform(){removeClass(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}(),notificationClient_module_min=Foremost,notificationClient={NotificationClient:notificationClient_module_min},CONSUMPTION_STORAGE_KEY=”lnct”,NotifClient=perform(){perform e()return e.prototype.refreshPanel=perform(){var e,n,t,i=this,o=,r=(null===(e=window.YAHOO)||void 0===e?void 0:e.context)||(null===(n=window.Af)||void 0===n?void 0:n.context)||{};return r.area&&r.lang&&(o.lang=r.lang,o.area=r.area),(null===(t=this.partnerClasses)||void 0===t?void 0:t.size)&&(o.accomplice=this.partnerClasses[1]),new Promise((perform(e,n){i.consumer.helpers.refreshPanelNode({matrixParams:o},(perform(t,i){t&&(logError(“Notification refresh error:”,t),n(t)),e(i)}))}))},e.prototype.resetBadge=perform(){this.consumer.helpers.resetBadge(),this.setTimeStamp()},e.prototype.getConfig=perform(){var e,n,t={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0},badge:{selector:”#notif-badge”,hideClass:”ybar-notification-hidden”},panel:{emptyPanelMsg:”You haven’t any new notifications.”,errorMsg:”Please verify again later.”,headerMsg:”Notifications”,maxCount:5,parentSelector:”#ybarNotificationBody”,notificationTypes:”breakingNews”},service:{url:”/tdv2_fp/api/useful resource/NotificationHistory.getHistory”,isRMP:!1}},i=doc.getElementById(“notification-container”),o=null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.config,r={};if(o){“att”===(null===(n=this.partnerClasses)||void 0===n?void 0:n[1])&&(t.promos.showYahooLogo=!1);strive{var s=JSON.parse(o);r=__assign({},s),this.personalised=1===s.personalize}catch(e){logError(“Notifications config parsing error”,e)}i&&delete i.dataset.config}return this.mergeConfigs(t,r)},e.prototype.mergeConfigs=perform(e,n){var t=__assign({},e);for(var i in e)t[i]=__assign(__assign({},e[i]),n[i]);return t},e.prototype.getTimeStamp=perform(),e.prototype.setTimeStamp=perform(),e}(),notifClient=new NotifClient,getNotifClient=perform(){return notifClient},reInit=perform(){notifClient=new NotifClient},ybarRapid,ybarRapidInterval,ybarRapidErrMsg=””,beaconQueue=[],noop=perform(){},logRapidError=perform(){window.removeEventListener(“beforeunload”,logRapidError),””!==ybarRapidErrMsg&&logError(“Fast not discovered on web page”,new Error(ybarRapidErrMsg))},findRapidWithSpaceid=perform(e){var n=void 0;if(e&&e.size>0)for(var t=0;t0){if(ybarRapid.addModules(o,!1,i),beaconQueue.size>0)for(e=0;e90&&fireImageBeacon(“efficiency”,e)}catch(e){}}),1e3)}))},measureInit=measure(“ybar-init”);initYbar(),measureInit.cease(),initPerformanceMetricsBeaconListener(),initRapid(),initErrorBeaconListener();var chosen=”_yb_23nt1″,Css$7={“right-item”:”_yb_ord12″,chosen:chosen,”ybar-mod-topnavigation”:”_yb_yitki”,”ybar-mod-topnavigation-teaser-imp”:”_yb_c48yy”},DOCUMENT_NODE_TYPE=9;if(“undefined”!=typeof Aspect&&!Aspect.prototype.matches)proto.mozMatchesSelectorperform closest(e,n){for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;){if(“perform”==typeof e.matches&&e.matches(n))return e;e=e.parentNode}}var closest_1=closest;perform _delegate(e,n,t,i,o){var r=listener.apply(this,arguments);return e.addEventListener(t,r,o),{destroy:perform(){e.removeEventListener(t,r,o)}}}perform delegate(e,n,t,i,o){return”perform”==typeof e.addEventListener?_delegate.apply(null,arguments):”perform”==typeof t?_delegate.bind(null,doc).apply(null,arguments):(“string”==typeof e&&(e=doc.querySelectorAll(e)),Array.prototype.map.name(e,(perform(e){return _delegate(e,n,t,i,o)})))}perform listener(e,n,t,i){return perform(t){t.delegateTarget=closest_1(t.goal,n),t.delegateTarget&&i.name(e,t)}}var delegate_1=delegate,ListNode=perform(e){this.information=e,this.subsequent=null,this.prev=null},LinkedList=perform(){perform e(){this.head=null,this.tail=null}return e.prototype.push=perform(e){var n=new ListNode(e);return this.head?this.tail?(n.prev=this.tail,this.tail.subsequent=n,this.tail=n):(this.tail=n,this.tail.prev=this.head,this.head.subsequent=this.tail):(this.head=n,n.subsequent=this.tail),n},e.prototype.dimension=perform(){for(var e=0,n=this.head;n;)e+=1,n=n.subsequent;return e},e.prototype.getHead=perform(){return this.head},e.prototype.getTail=perform(){return this.tail},e.prototype.get=perform(e){if(e>=this.dimension())return null;for(var n=0,t=this.head;(null==t?void 0:t.subsequent)&&n0&&Array.prototype.forEach.name(e,(perform(e){e.onerror=perform(){e.onerror=null,e.model.show=”none”}}))},fixLogoOutline=perform(e,n){e&&(hideOutlineOnMouseDown(“#ybar-logo”,”#ybar-logo”,n),n.onDestroy((perform(){e.classList.take away(“ybar-show-outline”),e.classList.take away(“ybar-hide-outline”)})))},logoClick=perform(e,n){n&&e.addElementListener(n,”click on”,(perform(){e.triggerEvent(“logo-click”)}))},init$4=perform(e,n){n.logoImages&&hideLogosOnError(n.logoImages),n.wrapper&&(fixLogoOutline(n.wrapper,e),logoClick(e,n.wrapper))};initModule(“ybar-mod-logo”,(perform(e){var n={wrapper:doc.getElementById(“ybar-logo”),logoImages:doc.querySelectorAll(“.”.concat(Css$6[“logo-image”]))};init$4(e,n)}));var overlay$1=”_yb_17b0f”,tooltip=”_yb_130ue”,tooltip__text=”_yb_14dxb”,tooltip__voice=”_yb_kw9q8″,tooltip__web=”_yb_4dt44″,Css$5={“dropdown-open”:”_yb_axsmw”,”merchant-is-selected”:”_yb_1jde2″,overlay:overlay$1,”selected-merchant-clear-button”:”_yb_1a6pg”,”shops-buttons”:”_yb_8laxm”,”styled-select”:”_yb_1is1e”,tooltip:tooltip,”tooltip–show”:”_yb_1atzl”,tooltip__text:tooltip__text,tooltip__voice:tooltip__voice,tooltip__web:tooltip__web},vary=perform(e,n){var t=Math.max(e,n),i=Math.min(e,n),o=Math.abs(t-i);return __spreadArray([],new Array(o+1),!0).map((perform(e,n){return i+n}))},openSearchOverlay=perform(e,n,t){var i=e.getConfig().bucketConfig,o=(void 0===i?{}:i).enable_search_ui,r=void 0!==o&&o;if(n.ybar){n.ybar.classList.add(“ybar-searchbox-assist-fullscreen”),doc.documentElement.classList.add(“ybar-overlay”),doc.physique.classList.add(“ybar-overlay-noscroll”);beaconClick(“ybar”,”websrch”,””,{elm:”increase”,subsec:”searchbox”,itc:”1″}),setTimeout((perform(){n.searchInput instanceof HTMLInputElement&&(t&&(n.searchInput.worth=t),n.searchInput.focus(),r&&n.searchInput.click on())}))}},closeSearchOverlay=perform(e)void 0===n,initMweb=perform(e,n){“smartphone”===e.getConfig().system&&(e.addElementListener(n.searchBoxPlaceholder,”click on”,(perform(){openSearchOverlay(e,n)})),e.addElementListener(n.searchBoxPlaceholder,”keydown”,(perform(t))),n.searchBoxBackButton&&(e.addElementListener(n.searchBoxBackButton,”click on”,(perform(e){e.stopPropagation(),closeSearchOverlay(n);beaconClick(“ybar”,”back-close-srch”,””,{elm:”btn”,subsec:”searchbox”,itc:”1″})})),e.addElementListener(n.searchInput,”keyup”,(perform(e){e.stopPropagation();27===e.keyCode&&(e.stopPropagation(),closeSearchOverlay(n))}))),e.onDestroy((perform(){closeSearchOverlay(n)})))},Tooltip=perform(){perform e(e,n,t){n&&(this.ybar=e,this.elem=n,this.choices=t,this.present=this.present.bind(this),this.conceal=this.conceal.bind(this),this.addEventListeners())}return Object.defineProperty(e.prototype,”tooltip”,{get:perform()this.elem).appendChild(this.tooltipMarkup),this.ybar.onDestroy((perform()void 0===n?void 0:n.parentNode)))),this.tooltipMarkup,enumerable:!1,configurable:!0}),e.prototype.present=perform(){this.tooltip.classList.add(this.choices.showClass)},e.prototype.conceal=perform(){this.tooltip.classList.take away(this.choices.showClass)},e.prototype.addEventListeners=perform(){this.ybar.addElementListener(this.elem,”mouseenter”,this.present),this.ybar.addElementListener(this.elem,”focus”,this.present),this.ybar.addElementListener(this.elem,”mouseleave”,this.conceal),this.ybar.addElementListener(this.elem,”blur”,this.conceal)},e.prototype.createTooltip=perform(),e}();createCommonjsModule((perform(module){(perform(){var __webpack_modules__={“./src/index.js”:
    /*!**********************!*
    !*** ./src/index.js ***!
    **********************/perform(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){eval(“var I18n = __webpack_require__(/*! ./lib/I18n */ “./src/lib/I18n.js”);nn(perform (win, doc) {n “use strict”;nn var defaultConfig = {n uiLang: ‘en-US’,n speechLang: ‘en-US’,n voiceButton: ‘#voice-btn’,n searchBox: {n type: ‘#sf’,n enter: ‘#yschsp’,n params: {n fr: ”,n fr2: ”n }n },n enable_voice_trending: false,n trending: {n market: “en-us”n },n ui: {n speechOverlay: {n disableBlur: falsen }n },n browsers: {n edge: falsen }n };nn perform VoiceSearch(config) {n var self = this;n self.config = Object.assign(defaultConfig, config || {});n self.i18n = new VoiceSearch.I18n({n lang: self.config.uiLangn });n self.renderPermissionGuide(self);n self.renderSpeechPanel(self);n self.speechResult=””;n self.noSpeech = true;n self.isRecognitionStart = false;n self.recognition = null;n self.voiceButton = doc.querySelector(self.config.voiceButton);n self.searchBoxForm = doc.querySelector(self.config.searchBox.type);n self.searchBoxQuery = doc.querySelector(self.config.searchBox.enter);n self.speechPanel = doc.querySelector(‘#spch’);n self.speechButtonContainer = doc.querySelector(‘#spchbc’);n self.speechButton = doc.querySelector(‘#spchbc-btn’);n self.speechText = doc.querySelector(‘#spcht’);n self.speechOverlay = doc.getElementById(‘spch-overlay’);n self.retryLink = doc.querySelector(‘#spcht-retry’);n self.trending = doc.getElementById(‘spch-trending’);n self.trendingTerms = doc.getElementById(‘trending-terms’);n self.termSpans = doc.getElementsByClassName(“trending-term”);n self.closeButton = doc.querySelector(‘#spchx’);n self.startAudio = new Audio(‘ self.resultAudio = new Audio(‘ self.errorAudio = new Audio(‘ self.closeAudio = new Audio(‘ self.permissionGuide = doc.querySelector(‘#spchp’);n self.permissionGuideClose = doc.querySelector(‘#spchpx’);n self.permissionGuideTimer = null;nn self.onEscKeyDown = perform (e) {n if (e.code !== ‘Escape’) {n return;n }nn self.recognition.cease();n self.sendBeacon(‘keybrd’, ‘voicesearch_cancel_esc’); // The clear up ought to put inside closePanel() as an alternative of right here,n // or func will not be cleaned up if person shut panel with btn or overlaynn self.closePanel(self);n };nn if (self.isBrowserSupported()) {n var SpeechRecognition = win.SpeechRecognition || win.webkitSpeechRecognition;n var SpeechGrammarList = win.SpeechGrammarList || win.webkitSpeechGrammarList;n var speechGrammar=”#JSGF V1.0;”;n self.recognition = new SpeechRecognition();n var speechRecognitionList = new SpeechGrammarList();nn if (speechRecognitionList.addFromString) {n speechRecognitionList.addFromString(speechGrammar, 1);n }nn self.recognition.grammars = speechRecognitionList;n self.recognition.steady = false;n self.recognition.lang = self.config.speechLang;n self.recognition.interimResults = false;n self.recognition.maxAlternatives = 1;n /* Listeners */nn if (self.voiceButton) {n self.voiceButton.onclick = perform () {n self.recognition.begin();nn if (self.permissionGuideTimer) {n win.clearTimeout(self.permissionGuideTimer);n }nn self.permissionGuideTimer = win.setTimeout(perform () {n if (!self.isRecognitionStart) {n self.showPermissionGuide(self);n }n }, 300); // Additionally shut when urgent escnn doc.addEventListener(‘keydown’, self.onEscKeyDown);n self.sendBeacon(‘clk’, ‘voicesearch’);n };n }nn if (self.speechButton) {n self.speechButton.onclick = perform () {n if (!self.isRecognitionStart) {n self.recognition.begin();n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_restart’);n } else {n self.recognition.cease();n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_close’);n self.closePanel(self);n }n };n }nn if (self.retryLink) {n self.retryLink.onclick = perform () {n if (!self.isRecognitionStart) {n self.recognition.begin();n self.sendBeacon(‘clk’, ‘voicesearch_panel_retry’);n }n };n }nn if (self.speechOverlay) {n self.speechOverlay.onclick = perform () {n self.recognition.cease();n self.sendBeacon(‘clk’, ‘voicesearch_cancel_outside’);n self.closePanel(self);n };n }nn if (self.closeButton) {n self.closeButton.onclick = perform () {n self.recognition.cease();n self.sendBeacon(‘clk’, ‘voicesearch_cancel’);n self.closePanel(self);n };n }nn if (self.permissionGuideClose) {n self.permissionGuideClose.onclick = perform () {n self.recognition.cease();n self.sendBeacon(‘clk’, ‘voicesearch_permission_close’);n self.closeAudio.play();n self.hidePermissionGuide(self);n };n }n /* Recognition Occasions */nnn self.recognition.onresult = perform (occasion) {n // The SpeechRecognitionEvent outcomes property returns a SpeechRecognitionResultList objectn // The SpeechRecognitionResultList object comprises SpeechRecognitionResult objects.n // It has a getter so it may be accessed like an arrayn // The primary [0] returns the SpeechRecognitionResult on the final place.n // Every SpeechRecognitionResult object comprises SpeechRecognitionAlternative objects that include particular person outcomes.n // These even have getters to allow them to be accessed like arrays.n // The second [0] returns the SpeechRecognitionAlternative at place 0.n // We then return the transcript property of the SpeechRecognitionAlternative objectn // console.log(‘Confidence: ‘ + occasion.outcomes[0][0].confidence);n self.speechResult = occasion.outcomes[0][0].transcript;n /* Punctuation Dealing with: Examine final character and strip it if vital */nn self.handlePunctuation(self);nn if (self.speechText) {n self.speechText.innerText = self.speechResult;n }nn if (self.searchBoxQuery) {n self.searchBoxQuery.worth = self.speechResult;n }nn self.resultAudio.play();n win.setTimeout(perform () {n if (self.speechPanel) {n self.speechPanel.classList.take away(“s2tb”);n self.speechPanel.classList.add(“s2tb-h”);n }nn self.hideRetryLink(self);nn if (self.searchBoxForm) {n if (self.searchBoxForm.fr && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr) {n self.searchBoxForm.fr.worth = config.searchBox.params.fr;n self.searchBoxForm.fr.disabled = false; // for homepage casen }nn if (self.searchBoxForm.fr2 && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr2) {n self.searchBoxForm.fr2.worth = config.searchBox.params.fr2;n self.searchBoxForm.fr2.disabled = false; // for homepage casen }nn self.searchBoxForm.submit();n }n }, 1000);n };nn self.recognition.onspeechstart = perform () {// Fired when speech startsn };nn self.recognition.onspeechend = perform () {n // Fired when speech endsn self.recognition.cease();n };nn self.recognition.onerror = perform () {n // console.log(‘Error occurred in recognition: ‘ + occasion.error);n if (self.speechText) {n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_error’);n }nn self.hideTrending(self);n self.showRetryLink(self);n self.errorAudio.play();n };nn self.recognition.onaudiostart = perform () {n // Fired when the person agent has began to seize audio.n if (self.speechButtonContainer) {n self.speechButtonContainer.classList.add(“listening”);n }n };nn self.recognition.onaudioend = perform () {n // Fired when the person agent has completed capturing audio.n if (self.speechButtonContainer) {n self.speechButtonContainer.classList.take away(“listening”);n }n };nn self.recognition.onsoundstart = perform () {n // Fired when any sound — recognisable speech or not — has been detected.n self.hideTrending(self);n self.noSpeech = false;nn if (self.speechButtonContainer) {n self.speechButtonContainer.classList.take away(“listening”);n self.speechButtonContainer.classList.add(“talking”);n }n };nn self.recognition.onsoundend = perform () {n // Fired when no sound presentn if (self.speechButtonContainer) {n self.speechButtonContainer.classList.take away(“talking”);n }n };nn self.recognition.onstart = perform () {n // Fired when the speech recognition service has begun listeningn self.recognitionInit(self);n self.startRecognition(self);n };nn self.recognition.onend = perform () {n // Fired when the speech recognition service has disconnected.n self.isRecognitionStart = false;nn if (self.noSpeech == false && self.speechResult == ”) {n // No match: Fired when the speech recognition cannot recognise speechn if (self.speechText) {n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_nomatch’);n }nn self.hideTrending(self);n self.showRetryLink(self);n self.errorAudio.play();n }n }; // set off onReady occasion when initializednnn if (doc && doc.dispatchEvent) {n doc.dispatchEvent(new Occasion(‘VOICE_JS_READY’));n }n }n } // static membersnnn VoiceSearch.I18n = I18n; // occasion membersnn VoiceSearch.prototype.renderPermissionGuide = perform (self) {n var tmpl = “n

    n n

    n n

    n

    “.concat(self.i18n.t(‘search.voice.permission_title’), “

    n

    “).concat(self.i18n.t(‘search.voice.permission_text’), “

    n

    n

    n

    n “);n var dom = new DOMParser().parseFromString(tmpl, ‘textual content/html’);n doc.physique.appendChild(dom.physique.kids[0]);n };nn VoiceSearch.prototype.renderSpeechPanel = perform (self) {n var tmpl = “n

    n n n

    n

    n

    n n n n n n n

    n

    n

    n n n “.concat(self.i18n.t(‘search.voice.recognition_retry’), “n

    n

    n

    n

    n

    n

    n “).concat(self.i18n.t(‘search.voice.trending_title’), “n n

    n

    n

    n “);n var dom = new DOMParser().parseFromString(tmpl, ‘textual content/html’);nn if (self && self.config && self.config.ui && self.config.ui.speechOverlay && self.config.ui.speechOverlay.disableBlur) {n dom.physique.kids[0].classList.add(‘disable-blur-overlay’);n }nn doc.physique.appendChild(dom.physique.kids[0]);n };nn VoiceSearch.prototype.isBrowserSupported = perform () {n var isSupported = false;n var self = this;n var isChromium = Boolean(window.chrome);n var isIOSChrome = /CriOS/.check(window.navigator.userAgent);n var isEdge = /Edg//.check(window.navigator.userAgent);n var isLegacyEdge = /Edge//.check(window.navigator.userAgent);n var isOpera = Boolean(window.opr);n var isBrave = Boolean(window.navigator.courageous);n var browsers = [// chromen {n checkEnabled: function checkEnabled() {n return true;n },n checkBrowser: function checkBrowser() {n return isChromium && !isIOSChrome && !isEdge && !isOpera && !isBrave;n },n checkAPI: function checkAPI() ‘webkitSpeechGrammarList’ in win);n n }, // edgen {n checkEnabled: function checkEnabled() {n return self && self.config && self.config.browsers && self.config.browsers.edge;n },n checkBrowser: function checkBrowser() {n return isChromium && isEdge && !isLegacyEdge;n },n checkAPI: function checkAPI() ‘webkitSpeechGrammarList’ in win);n n }];nn for (var b = 0; b 0) {n var lastChar = self.speechResult.charAt(self.speechResult.size – 1);nn if (lastChar === ‘.’ || lastChar === ‘?’ || lastChar === ‘。’ || lastChar === ‘?’) {n self.speechResult = self.speechResult.slice(0, -1);n }n }n };nn VoiceSearch.prototype.sendBeacon = perform (actn, slk) {n var ULT = win.YAHOO.ULT || {},n SB = win.YAHOO.SB || {};nn if (ULT.beacon_click) {n var trackParams = {n _S: SB.config.i13n.spaceid,n _I: SB.config.i13n.pvid,n actn: actn,n sec: ‘search’,n slk: slkn };n win.YAHOO.ULT.beacon_click(trackParams);n }n };nn VoiceSearch.prototype.ajaxReq = perform (url, callback) {n var DONE_STATE = XMLHttpRequest.DONE || 4; // for IE-compatibilitynn var xhr = new XMLHttpRequest();n var responseRaw;n var response; // CORS request just for IE8/IE9nn if (doc.documentMode && doc.documentMode n // tags it’s going to enable on a pagenn if (!choices.singleton && typeof choices.singleton !== ‘boolean’) {n choices.singleton = isOldIE();n }nn record = record || [];n var lastIdentifiers = modulesToDom(record, choices);n return perform replace(newList) {n newList = newList || [];nn if (Object.prototype.toString.name(newList) !== ‘[object Array]’) {n return;n }nn for (var i = 0; i =200&&o.status40959)&&(o19903))return!1}return!0},normalizeAndEscapeUserRecord=perform(e),createAccountItemElement=perform(e,n,t){var i=t.ybarAccMenuItemTemplate,o=t.crumb;if(i){var r=(n+1).toString(),s=i.getAttribute(“data-signedOutState”),a=i.getAttribute(“data-done”)||””,c=getTemplateContent(i),l=c.kids&&c.kids[0];if(!l&&c.childNodes)for(var d=0;d0){var h=doc.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-sign-out”])),g=h&&h.getAttribute(“data-soa”),v=doc.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-sign-out-text”]));if(v&&g&&(v.innerText=g),c&&c.classList.add(Css$4.present),t){var y=doc.querySelector(“”.concat(r,” “).concat(Css$4[“ybar-icon-arrow”])),b=Css$4[“ybar-icon-arrow-up”],_=Css$4[“ybar-icon-arrow-down”],w=Css$4[“ybar-item-hidden”],E=doc.querySelectorAll(“.”.concat(Css$4[“ybar-item-hidden”]));y&&(y.classList.toggle(_),e.addElementListener(y,”click on”,(perform(){for(var e=0;ed){var C=doc.querySelector(“”.concat(r,” .”).concat(Css$4[“ybar-see-info”]));C&&C.model&&(C.model.show=”block”)}addDoneUrlToAllLink(n,e)}else s&&(s.model.show=”block”)}))}},handleResetBadge=perform(e){getNotifClient().resetBadge(),e.notifBadge&&(e.notifBadge.model.visibility=”hidden”),e.profNotifBadge&&(e.profNotifBadge.model.visibility=”hidden”)},getPath=perform(e){if(“perform”==typeof e.composedPath)return e.composedPath();if(e.path)return e.path;for(var n=e.goal,t=[];null!==n.parentNode;)t.push(n),n=n.parentNode;return t.push(doc,window),t},notify=perform(e,n){var t=n.ybarAccountContainer,i=n.smartphoneNotifContainer,o=n.notificationMenu,r=n.notifBadge,s=n.dropdownContainer,a=n.ybarNotificationBody,c=n.profNotifBadge,l=n.backButton,d=perform(e){(null==e?void 0:e.newCount)&&e.newCount>0&&r&&(r.model.visibility=”seen”,c&&(c.model.visibility=”seen”,c.innerText=r.innerText))},u=getNotifClient(),p=perform(){u.refreshPanel().then(d).catch((perform(){}))};if(i){p();var f=setInterval((perform(){p()}),3e5);e.onDestroy((perform(){clearInterval(f)})),e.addElementListener(o,”click on”,(perform(){p(),s&&(s.model.show=”block”),t&&(t.model.width=”100%”,t.scrollTop=0,t.model.overflow=”hidden”),handleResetBadge(n),beaconClick(“ybar”,”notification”,””,{slk:”notification”,elm:”btn”,elmt:”seen”===(null==r?void 0:r.model.visibility)?”new alert”:””,sec:”ybar”,subsec:”notification”,pkgt:”profile-pane”,itc:”1″})})),e.addElementListener(l,”click on”,(perform(){s&&(s.model.show=”none”),t&&(t.model.width=””,t.model.overflow=””),beaconClick(“ybar”,”back-notification”,””,{slk:”back-notification”,elm:”arrow”,pkgt:”profile-pane”,sec:”ybar”,subsec:”notification”,itc:”1″})})),a&&e.addElementListener(a,”click on”,(perform(e){getPath(e).discover((perform(e){var n=e;if(n.nodeName&&”a”===n.nodeName.toLowerCase()&&n.classList.comprises(“yns-link”))return s&&(s.model.show=”none”),t&&(t.model.width=””,t.dispatchEvent(new CustomEvent(“toggle-overlay”))),!0}))}))}},canBuildAccSwitcherList=!0,accSettingDropdownOpen=!1,visibilityTracking=0,params,imageElementsConfig={ybarAccountImage:{selector:”ybar-account-img”,dimension:”64″},ybarCurrentUserProfileImage:{selector:”ybar-current-user-profile-img”,dimension:”128″},ybarUserProfileImage:{selector:”ybar-user-profile-img”,dimension:”128″}},pictureOnErrorForSize=perform(e,n){var t=” t=n.ybarAccountContainer,i=n.ybarAccountMenu,o=n.ybarMobile,r=n.isSmartphone,s=n.ybarMenuManagePub,a=n.arrowWrapper,c=n.downArrow,l=n.upArrow,d=n.otherAccWrapper,u=n.signInAccountMenu,p=n.signInBtn,f=n.ybarModAccount,m=n.yahooPlusImpression,h=perform(i){if(t)t.model.removeProperty(“show”),”false”===t.getAttribute(“data-enabled”)&&(t.model.show=”none”),addDoneUrlToAllLink(n,e);else{var o=new Error(“ybarAccountContainer not Discovered”);logError(“ERROR:”,o)}t&&canBuildAccSwitcherList&&(canBuildAccSwitcherList=!1,e.onDestroy((perform(){canBuildAccSwitcherList=!0})),buildAccSwitcherList(e,n,i))},g=perform(){var e,n;0===visibilityTracking&&(visibilityTracking=1,null===(e=null==i?void 0:i.parentNode)||void 0===e||e.removeEventListener(“mouseenter”,g),null===(n=null==i?void 0:i.parentNode)||void 0===n||n.removeEventListener(“focusin”,g),setTimeout((perform(){refreshModule()}),500))},v=perform(),y=perform(){if(m&&!m.getAttribute(“src”)&&m.getAttribute(“data-src”)){var n=m.getAttribute(“data-src”)||””;addConsentToUrl(n).then((perform(e){m.setAttribute(“src”,e)})),e.onDestroy((perform(){m.setAttribute(“src”,””)}))}};if(p&&(addHoverEvent(e,p,”ybar”,”sign-in”,params={elm:”signin”,subsec:”settings”,itc:”2″}),addDoneUrlToAllLink(n,e)),i||o||u){if(o)h(!0);else{if(h(!1),e.addEventListener(“close-all-menus”,(perform(){i&&!isHovered(i)?i.checked=!1:u&&u.classList.comprises(Css$4.present)&&u.parentNode&&!isHovered(u.parentNode)&&v()})),e.onDestroy((perform(){v()})),i){if(i.onchange=perform(){e.triggerEvent(“close-all-menus”)},params={itc:”2″,elm:”menu”,elmt:”user-info”,subsec:”accounts”},r){var b=doc.querySelector(“#ybarAccountMenuOpener”);b&&b.setAttribute(“data-ylk”,”slk:Settings;elm:btn;sec:ybar;subsec:settings;pkgt:profile-pane;itc:0;tar:login.yahoo.com”),perform(){t&&addOverlay(t,”proper”,e);var n=doc.querySelector(“.”.concat(Css$4[“ybar-icon-image-wrapper”]));e.addElementListener(n,”click on”,(perform()))}(),e.addElementListener(a,”click on”,(perform(){var e,n;accSettingDropdownOpen?(null==c||c.classList.take away(“conceal”),null==l||l.classList.add(“conceal”),d&&(d.model.top=”0″)):(null==c||c.classList.add(“conceal”),null==l||l.classList.take away(“conceal”),d&&(n=(e=d).scrollHeight,e.model.top=n+”px”));var t=”manage-account-open”,i={elm:”increase”,subsec:”settings”,pkgt:”profile-pane”,itc:”1″};(accSettingDropdownOpen=!accSettingDropdownOpen)||(t=”manage-account-close”,i.elm=”btn”),beaconClick(“ybar”,t,””,i)})),notify(e,n)}else{var _=doc.querySelector(“#ybarAccountMenu + label”);_&&(addHoverEvent(e,_,”ybar”,”profile-expand”,params),e.addElementListener(_,”mouseenter”,y),e.addElementListener(f,”focus”,y)),i&&i.parentNode&&(e.addElementListener(i.parentNode,”mouseenter”,g),e.addElementListener(i.parentNode,”focusin”,g))}hideOutlineOnMouseDown(“#ybarAccountMenu”,”#ybarAccountMenu + label”,e)}e.addElementListener(t,”focusin”,(perform()t.classList.add(“ybarMenuOpen”),null==i)),e.addElementListener(t,”focusout”,v),e.addElementListener(s,”click on”,v)}Object.keys(imageElementsConfig).forEach((perform(e){var n=imageElementsConfig[e],t=doc.querySelector(“.”.concat(Css$4[n.selector]));t&&(t.onerror=perform(){pictureOnErrorForSize(n.dimension,t)})}))}};initModule(“ybar-account-init”,(perform(e){var n=doc.getElementById(“ybarAccountContainer”),t={ybarAccountContainer:n,ybarAccountMenu:doc.getElementById(“ybarAccountMenu”),ybarMobile:doc.querySelector(“.”.concat(Css$4.cellular,” .”).concat(Css$4[“ybar-account-user-email”])),isSmartphone:doc.querySelector(“.”.concat(Css$4.smartphone)),ybarMenuManagePub:doc.getElementById(“ybarMenuManagePub”),arrowWrapper:doc.getElementById(“smartphone-arrow”),downArrow:doc.getElementById(“down-arrow”),upArrow:doc.getElementById(“up-arrow”),otherAccWrapper:doc.getElementById(“otherAccWrapper”),signInAccountMenu:doc.querySelector(“.”.concat(Css$4[“ybar-mod-account”],” .”).concat(Css$4[“sign-in-menu”])),signInBtn:doc.querySelector(“.”.concat(Css$4[“ybar-mod-account”],” .”).concat(Css$4[“ybar-login-btn”])),ybarModAccount:doc.querySelector(“.”.concat(Css$4[“ybar-mod-account”])),yahooPlusImpression:n&&n.querySelector(“.”.concat(Css$4[“ybar-account-yahoo-plus-imp”])),crumb:doc.querySelector(‘enter[name=”crumb”]’),ybarAccMenuItemTemplate:doc.getElementById(“ybarAccMenuItemTemplate”),generalSignin:doc.getElementById(“generalSignin”),inSessionSignin:doc.getElementById(“inSessionSignin”),smartphoneNotifContainer:doc.getElementById(“smartphoneNotifContainer”),notificationMenu:doc.getElementById(“smartphoneNotifMenu”),notifBadge:doc.getElementById(“notif-badge”),profNotifBadge:doc.querySelector(“.”.concat(Css$4[“prof-notif-badge”])),dropdownContainer:doc.getElementById(“notifDropdownContainer”),ybarNotificationBody:doc.getElementById(“ybarNotificationBody”),backButton:doc.getElementById(“backButton”)};init$3(e,t)}));var Css$2={“popover-body”:”_yb_u9saa”,”ybar-mail-item-desc”:”_yb_y1wzw”,”ybar-mail-item-image”:”_yb_tqoe2″,”ybar-mail-item-link”:”_yb_19fir”,”ybar-mail-item-name”:”_yb_10fdx”,”ybar-mail-item-snippet”:”_yb_qkzlq”,”ybar-mail-item-time”:”_yb_1g38j”,”ybar-mail-item-unread”:”_yb_1cpwl”,”ybar-mail-link”:”_yb_xoadi”,”ybar-mail-list”:”_yb_11nme”,”ybar-mail-preview”:”_yb_eqt6e”,”ybar-mail-signin-link”:”_yb_1sqtp”,”ybar-mod-mail”:”_yb_11hjb”,”ybar-mod-mail-promo-imp”:”_yb_e23ja”},JwsRequestType,JwsRequestStatus;!perform(e){e[e.COUNT=0]=”COUNT”,e[e.PREVIEW=1]=”PREVIEW”}(JwsRequestType||(JwsRequestType={})),perform(e){e[e.PENDING=0]=”PENDING”,e[e.COMPLETE=1]=”COMPLETE”}(JwsRequestStatus||(JwsRequestStatus={}));var jwsCache=new Map,getCache=perform(e){var n=jwsCache.get(e);if(n){if(n.standing===JwsRequestStatus.PENDING)return n.promise;var t=Date.now()-12e4;return n.information&&n.lastRequested>t?Promise.resolve(n.information):void 0}},setCacheData=perform(e,n){var t={lastRequested:Date.now(),standing:JwsRequestStatus.COMPLETE,promise:Promise.resolve(n),information:n};jwsCache.set(e,t)},setCachePromise=perform(e,n){var t={lastRequested:Date.now(),standing:JwsRequestStatus.PENDING,promise:n};jwsCache.set(e,t)},Jws=perform(){perform e(){}return Object.defineProperty(e.prototype,”wssid”,{get:perform()void 0===e?void 0:e.wssid;return t,set:perform(e){window.YBAR=window.YBAR||{},window.YBAR.wssid=e||””},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,”appid”,{get:perform(),set:perform(e){window.YBAR=window.YBAR||{},window.YBAR.appid=e||””},enumerable:!1,configurable:!0}),e.prototype.fetchPreview=perform(e,n){var t=(void 0===e?{}:e).maxMessages,i=void 0===t?4:t;return __awaiter(this,void 0,void 0,(perform(){var e,t,o,r=this;return __generator(this,(perform(s){return e=getCache(JwsRequestType.PREVIEW),!n&&e?[2,e]:(1,t={information:{responseType:”json”,requests:[{id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:{select:{mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”}},suppressResponse:!0,requests:[{id:”ListMessages”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/messages/@.select==q?q=count%3A6+offset%3A0+folderType%3AINBOX+-sort%3Adate”,method:”GET”}]}]}},o=this._fetch(t,1,(perform(e){var n=r._normalizePreviewResponse(e,{maxMessages:i});return setCacheData(JwsRequestType.PREVIEW,n),n})),setCachePromise(JwsRequestType.PREVIEW,o),[2,o])}))}))},e.prototype.fetchCount=perform(e){return __awaiter(this,void 0,void 0,(perform(){var n,t,i,o=this;return __generator(this,(perform(r){return n=getCache(JwsRequestType.COUNT),!e&&n?[2,n]:(1,t={information:{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”}]}]}},i=this._fetch(t,1,(perform(e){var n=o._normalizerCountResponse(e);return setCacheData(JwsRequestType.COUNT,n),n})),setCachePromise(JwsRequestType.COUNT,i),[2,i])}))}))},e.prototype._fetch=perform(e,n,t){var i,o;return __awaiter(this,void 0,void 0,(perform(){var r,s,a,c,l,d,u,p,f,m,h,g,v,y,b,_;return __generator(this,(perform(w){swap(w.label){case 0:if(r=e.information,s=void 0===r?{}:r,a=e.params,c=void 0===a?{}:a,l=”EC-4008″,d=”EC-4003″,u=this._getYmreqid(),!this.appid)throw new Error(“No appId, person is logged out”);p=__assign({appId:this.appid},c),this.wssid&&(p.wssid=this.wssid),e.params=p,f=[],Object.keys(p).forEach((perform(e){var n=p[e];n&&f.push(“”.concat(encodeURIComponent(e),”=”).concat(encodeURIComponent(n)))})),m=f.size?”?”.concat(f.be part of(“&”)):””,h=” 1:return w.trys.push([1,4,,5]),[4,ybarFetch(h,{method:”POST”,body:JSON.stringify(s),credentials:”include”,headers:{“Content-Type”:”application/json”,”X-Oath-YmReqId”:u}})];case 2:return[4,(g=w.sent()).json()];case 3:if(v=w.despatched(),g.okay)return[2,t(null===(o=v.result)||void 0===o?void 0:o.responses)];if((y=null===(i=null==v?void 0:v.error)||void 0===i?void 0:i.code)===d)return[2,this._handleWssidApiError(v,e,n,t)];throw y===l?new Error(“Session has expired”):new Error(“Mail Api Responded with an Error”);case 4:throw b=w.despatched(),logError(“JWS: “.concat((_=b).message),_),b;case 5:return[2]}}))}))},e.prototype._normalizePreviewResponse=perform(e,n){var t,i,o,r=this,s=(void 0===n?{}:n).maxMessages,a=void 0===s?4:s;return e?((null===(o=null===(i=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.response)||void 0===i?void 0:i.outcome)||void 0===o?void 0:o.messages)||[]).map((perform(e){return r._parseRawMessage(e)})).filter((perform(e,n){return!!(e&&n0)return t-=1,this.wssid=s,this._fetch(n,t,i);throw new Error(“Max retries with invalid WSSID reached”)}throw new Error(“legitimate WSSID lacking from API Response”)},e.prototype._parseRawMessage=perform(e)void 0===n?void 0:n[0])?:null,e.prototype._getYmreqid=perform(){var e=(new Date).getTime();return”xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00″.change(new RegExp(“x”,”g”),(perform()0;return e=Math.flooring(e/16),n.toString(16)))},e}(),loadAssets=perform(e,n,t){for(var i,o,r=[],s=[],a=0;a

    Yoruma kapalı.