MSN

[]
MSN 1?n[1]:null}return null}function a(e){try{if(e)return JSON.parse(e)}catch(e){}return null}var d;!function(e){e.Adult=”adult”,e.Enterprise=”enterprise”,e.Kids=”kids”}(d||(d={}));const u=”prg-“;function l(e){const t=u.length,n=[];return e&&e.length&&(e.forEach((e=>{const o=e&&e.trim();o&&o.length>=t&&o.substring(0,t).toLowerCase()===u&&n.push(o.toLowerCase())})),n.sort()),n}function p(e){var t;return document.head.dataset[e]||(null===(t=function(){void 0===h&&(h=document.getElementsByClassName(“peregrine-widget-settings”)[0]||null);return h}())||void 0===t?void 0:t.dataset[e])}let h;const g=”Authorization”;var f,m;!function(e){e.Presentation=”presentation”}(f||(f={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(m||(m={}));var w,v;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(w||(w={})),function(e){e.Init=”init”,e.Config=”config”,e.Targeted=”targeted”,e.Sticky=”sticky”,e.NoSticky=”no_sticky”,e.Admin=”admin”,e.Forced=”forced”,e.Manual=”manual”}(v||(v={}));new Set([“winp0dash”,”winp1taskbar”,”winp1taskbarent”,”winp1taskbardirect”,”winp1taskbardirectent”,”winp1taskbarent”,”winp2juntaskbar”,”winp2juntaskbarent”,”winp2″,”winp2ent”,”winp2fp”,”winp2fpent”,”winp2fptaskbar”,”winp2fptaskbarent”,”winp2fptaskbarhover”,”winp2fptaskbarhoverent”,”winp2widget”,”winp2widgetent”]);const b=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]),y=(new Set([“msedgdhp”,”msedgdhphdr”,”msedgntphdr”,”msedgntp”,”msedgdhp”,”entnewsntp”]),new Set([“hpmsn”]));function S(){var e;return s()?a(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}const A=”feed/personalize/settings”;var k,C,I;function _(e){try{return decodeURIComponent(e)}catch(e){}}let q;function E(e,t){if(!e)return null;if(t)return N(e);if(!q){const e=”undefined”!=typeof document&&document.cookie.split(“; “);q={};const t=e&&e.length;for(let n=0;n{n=!1,t=void 0}},o}!function(e){e[e.Unknown=0]=”Unknown”,e[e.NotSignedIn=1]=”NotSignedIn”,e[e.SignedIn=2]=”SignedIn”}(k||(k={})),function(e){e.MSA=”MSA”,e.AAD=”AAD”,e.UNSUPPORTED_SOVEREIGNTY=”UNSUPPORTED_SOVEREIGNTY”}(C||(C={})),function(e){e[e.NonAadAccount=0]=”NonAadAccount”,e[e.AadAccount=1]=”AadAccount”,e[e.Unknown=2]=”Unknown”}(I||(I={}));const R=”currentaccount”,T=x((()=>{const e=E(R,!0),t=e&&a(e),{login_hint:n}=t||{};return n&&t})),P=x((()=>!!E(R)));let M=new class{constructor(){s()?(this.isDebugEnabled=(function(e,t){const n=t.replace(/[[]]/g,”\$&”),o=new RegExp(“[?&]”+n+”(=([^&#]*)|&|#|$)”).exec(e);if(!o)return null;const i=o[2];return decodeURIComponent(i.replace(/+/g,” “))||””}(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1},this.isDebugEnabled&&!i.g.TEST_ENV&&(window.webpackRequire=i)):this.isDebugEnabled=!1}getLoggingService(){return null}isDebug(){return this.isDebugEnabled}setDebug(e){this.isDebugEnabled=e}setTags(e){}log(e,t){this.isDebug()&&console.info(e)}logError(e){console.error(e)}logCallback(e){this.isDebug()&&console.info(e())}logObjects(){this.isDebug()&&console.log(…arguments)}logSingleObject(e,t){this.isDebug()&&console.log(e)}};class L{constructor(e){this.storage=e}get supported(){return!!this.storage}getItem(e){if(this.supported)return this.storage.getItem(e)}getObject(e,t){const n=this.getItem(e);if(null!=n){const e=a(n);if(null!=e)return e}return t}key(e){if(this.supported&&e>=0)return this.storage.key(e)}keys(){return this.supported?Object.keys(this.storage):[]}setObject(e,t){void 0!==t?this.setItem(e,JSON.stringify(t)):this.removeItem(e)}removeObject(e){const t=this.removeItem(e);if(null!=t)return a(t)}setItem(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.supported)try{if(!t)throw”Attempted to store null/undefined value: “+t;this.storage.setItem(e,t)}catch(e){if(!n)throw e;M.logError(e)}else if(!n)throw new Error(“WebStorage not supported”)}get length(){if(this.supported)return this.storage.length}removeItem(e){if(this.supported){const t=this.getItem(e);return this.storage.removeItem(e),t}}clear(){this.supported&&this.storage.clear()}removeSubstringKeys(e){if(!this.supported||!e)return;const t=[];for(let n=0;nU.has(e)});const F=”__PageExperimentInstance__”;function $(e){W.set(F,e)}function H(e){if(!W.has(F)&&s()){var t,n;$(j(document.head.dataset.info||(null===(t=window.document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.info)||””))}const o=W.get(F);return o&&o.has(e)}function j(e){const t=(e||””).replace(/(^f:|;.*$)/g,””).split(“,”);return new Set(t)}const B=”1s-tokens”,J=12096e5;var G;let V,z;function X(){return V=Y(),V&&V.accessToken?V:void 0}function K(){if(V=Y(),!V)return”notAvailable”;const e=V.expiresOn,t=new Date(e),n=”expired”;if(!t.getTime())return n;const o=new Date,i=”valid”;if(t>o)return i;if(H(“prg-noext”))return n;if(J){const e=T();if(e&&e.account_type===C.MSA){if(new Date(t.getTime()+J)>o)return i}}return n}function Y(){return V=V||void 0===V&&D.getObject(B)||null,V}!function(e){e.NotAvailable=”notAvailable”,e.Expired=”expired”,e.Valid=”valid”}(G||(G={}));const Q=”__RequestDataInstance__”;class Z{constructor(e,t){if(this.url=new URL(e.href),this.innerHeight=e.innerHeight,this.devicePixelRatio=e.devicePixelRatio,this.canUseCssGrid=e.canUseCssGrid,this.requestId=e.requestId,this.cookie=e.cookie,this.referer=e.referer,this.userAgent=e.userAgent,this.clientData=e.clientData,this.oneServiceHeaders=function(e){try{if(e)return JSON.parse(e)}catch(e){}}(e.oneServiceHeaders)||{},this.isPssrMode=t,t){const e=ee(“OSATE”,this.cookie),t=!!e&&”1″===e,n=ee(“OSAT”,this.cookie);if(t&&n||!e&&!n)return this.msalAuthReady=!0,void(n&&(this.oneServiceHeaders.Authorization=`Bearer ${n}`));this.msalAuthReady=!1,this.pssrRejectedReason=e&&!t?”interactiveLogin”:e&&!n?”missOSAT”:”missOSATE”}}static getInstance(){const e=W.get(Q);return e||(i.g.TEST_ENV?te({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}):te({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}))}static resetInstance(e){const t=new Z(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return W.set(Q,t),t}}function ee(e,t){if(t&&e){const n=new RegExp(“\b”+e+”\s*=\s*([^;]*)”,”i”).exec(t);return n&&n.length>1?n[1]:null}return null}const te=Z.resetInstance,ne=()=>Z.getInstance();function oe(){try{return localStorage}catch(e){return null}}const ie=”uxlogin”,se=”uxlogout”,re=”uxedit”,ce=”useRedirect”,ae=”uxswitch”,de=x((()=>{const e=oe();return e&&”1″===e.getItem(ie)||s()&&location.search&&location.search.includes(`${ie}=1`)}));const ue=x((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(se)}));const le=x((()=>{const e=oe();return e&&”1″===e.getItem(re)}));const pe=x((()=>{const e=oe(),t=!H(“prg-noredirect”)&&e&&”1″===e.getItem(ce)&&function(){const e=document.head.dataset.clientSettings||””,{browser:t}=a(e)||{},{browserType:n=””}=t||{};return!!/safari/i.test(n)}();return t}));const he=x((()=>{const e=oe();return e&&”1″===e.getItem(ae)}));const ge={outlookMobile:”OnOOutlookMobile”,officeMobile:”OnOOfficeMobile”,sapphire:”OnOStartApp”,skype:”OnOSkype”,winWeatherApp:”weather-app-win”,xiaomiApp:”xmweather-“,winMoneyApp:”finance-app-win”},fe=”superappdhp”,me=[“ios”,”android”,”ipados”];let we=Ee(“ocid”).toLowerCase(),ve=Ee(“chpltfm”),[be,ye]=ve.toLowerCase().split(“-“);function Se(){if(!s())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,o=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!o)}function Ae(){const e=ve&&”outlook”===be&&me.includes(ye),t=we===ge.outlookMobile.toLowerCase();return e||t}function ke(){const e=ve&&[“office”,”union”].includes(be)&&me.includes(ye),t=we===ge.officeMobile.toLowerCase();return e||t}function Ce(){const e=we===ge.skype.toLowerCase()||”skype”===be;return s()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function Ie(){return Se()||we===ge.sapphire.toLowerCase()||we===fe.toLowerCase()}function _e(){return”3rdp”===be||we.startsWith(ge.xiaomiApp)}const qe=x((()=>Se()||Ce()||ke()||Ae()||Ie()||we===ge.winWeatherApp.toLowerCase()||we===ge.winMoneyApp.toLowerCase()||function(){const e=Ee(“edge”);return(“emmx”===be||”1″===e)&&Ie()}()||_e()));function Ee(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}const Ne=S()||{},Oe={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channel:1,mmx:1,edgeMobile:1},xe={edgeChromium:1},Re={winWidgets:1},Te={shopping:1},Pe={edge:1,edgeChromium:1,channel:1,cgHomePage:1,distribution:1,mmx:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1},Me=x((()=>Ne&&Ne.apptype)),Le=(x((()=>s()&&Me()in Re)),x((()=>s()&&!qe()&&!(Me()in Oe)&&!We()&&!Fe()))),De=x((()=>Le()&&!(Me()in xe)));x((()=>Le()&&(!(Me()in xe)||!P()))),x((()=>Le()&&!Be()&&!Je()));function Ue(){return Je()||Be()}const We=x((()=>{const e=”edgeChromium”!==Me()&&!(Me()in Te)&&Ge()&&function(){const e=new URLSearchParams(s()?window.location.search:ne().url.search).get(“ocid”)||(null==Ne?void 0:Ne.ocid),t=null==e?void 0:e.toLowerCase(),n=!y.has(t)&&”homePage”!==Me()&&!b.has(t);return n}()&&!function(){const e=”windows”==Me()&&”windowshp”==(Ne&&Ne.pagetype)&&(s()?window.location.href:ne().url.href).includes(`${A}`);return e}();return e})),Fe=()=>s()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0,$e=x((()=>H(“prg-1s-workid”)));x((()=>Me()in Pe||We()));function He(){const e=z;if(e)return M.log(“dual-auth: tryGet1SAuthToken returned live tokens”),e;const t=X();if(t)return M.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${K()}`),t;M.log(“dual-auth: tryGet1SAuthToken returned empty tokens”)}function je(e){const t={};return e&&(t[g]=`Bearer ${e}`),t}function Be(){return De()&&de()||function(){const e=De()&&!de()&&T()&&(“expired”==K()||le());return e}()||ue()||pe()}function Je(){return De()&&!T()&&he()}const Ge=x((()=>{const{browser:e}=Ne,{browserType:t=””}=e||{};return!!/edgeChromium/i.test(t)}));const Ve=”__core_auth_authHeaderPromiseParts__”,ze=()=>W.get(Ve);var Xe;!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};W.set(Ve,t)}(),function(e){e.GLOBAL=”GLOBAL”,e.GCC_MODERATE=”GCC_MODERATE”}(Xe||(Xe={}));let Ke;function Ye(){return Ke}function Qe(e){const t=e||Ye()||”al_app_anon”,n=Ze();return!!(n&&([“anon”,”al_anon”].includes(t)&&n.AL_ANON||[“app_anon”,”al_app_anon”].includes(t)&&n.AL_APP_ANON))}const Ze=x((()=>a(E(“AL_STATE”,!0))));const et=()=>{const e=E(“elt”,!0),t=e&&a(e),{access_token:n,account_type:o,login_hint:i}=t||{};return(n||o||i)&&t};class tt{constructor(){this.childCookieName=”child”,this.domInfo=document.head.dataset.info,this.command=”command”}init(e,t){this.clientSettings=e||S(),this.authCookieName=Ye()||window._authCookieName||””,this.bundle=window._webWorkerBundle||””,t=t||{};const n=this.buildWebWorkerUrl(this.clientSettings,t),o=window.webWorker=new Worker(n,{name:”web-worker”}),i=window.webWorkerMessages=[];o.onmessage=e=>{i.push(e.data)};const s=window.webWorkerErrors=[];if(o.onerror=e=>{s.push(e)},window.chrome){const e=this.getAudienceMode(this.clientSettings),t=window.webWorker&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&”function”==typeof t.getPref&&(t.getPref(“ntp.news_feed_display”,(e=>{e&&e.value&&o.postMessage({id:”FeedDisplaySetting”,type:this.command,payload:e.value})})),t.getPref(“ntp.layout_mode”,(e=>{e&&e.value&&o.postMessage({id:”LayoutModeSetting”,type:this.command,payload:e.value})})),t.getPref(“ntp.user_nurturing”,(e=>{let t=!1;e&&e.value&&e.value.length&&(t=this.getSingleColRequest(e.value)),o.postMessage({id:”RenderSingleColumn”,type:this.command,payload:t})})),t.getPref(“new_device_fre.has_user_seen_new_fre”,(e=>{e&&o.postMessage({id:”NewUserFre”,type:this.command,payload:e.value})}))),t&&”function”==typeof t.getConfigData&&t.getConfigData((e=>{const t=(null==e?void 0:e.enabledFeatures)||[];t.includes(“msReducedNtpAdsForNewDevice_stage1″)&&o.postMessage({id:”EdgeNoAds”,type:this.command,payload:!0}),t.includes(“msReducedNtpAdsForNewDevice_stage2″)&&o.postMessage({id:”EdgeReduceAds”,type:this.command,payload:!0})})),e===d.Enterprise&&this.clientSettings.browser&&”edgeChromium”===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87?this.getEnterpriseAccessToken().then((e=>{e&&o.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:je(e)})})):o.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:{}}),e!==d.Adult&&e!==d.Enterprise||this.sendPageConfiguration()}Ue()&&ze().promise.then((e=>o.postMessage({id:”AuthHeaders”,type:this.command,payload:e||{}})))}buildWebWorkerUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return(this.bundle||””)+”#”+this.qsFromDocument()+this.qsFromCookies()+this.qsFromDataAttribute(e||this.clientSettings)+this.qsMisc(t)+this.qsAuth(e||this.clientSettings)+this.qsFromUrl()+this.qsFromServiceWorker()+this.qsSelectedPivot()+this.qsXboxXToken()}qs(e,t,n){return e?t+”=”+(n||e)+”&”:””}qsFromDocument(){var e;return this.qs(document.getElementsByTagName(“html”)[0].getAttribute(“lang”),”lang”)+this.qs(encodeURIComponent(window.location.href),”adsReferer”)+this.qs(null===(e=s()?window.devicePixelRatio:ne().devicePixelRatio)||void 0===e?void 0:e.toString(),”devicePixelRatio”)}qsFromServiceWorker(){if(!navigator.serviceWorker||!navigator.serviceWorker.controller)return””;const e=navigator.serviceWorker.controller;if(“activated”!==e.state||!e.scriptURL)return””;if(e.scriptURL){const t=new URL(e.scriptURL).searchParams.toString();return t?”&”+t+”&”:””}return””}qsFromCookies(){return this.qs(O(this.authCookieName),”aace”,”1″)+this.qs(O(“muid”),”muid”)+this.qs(O(this.childCookieName),”child”)+this.qs(O(“cbypass”),”cbypass”)+this.qs(this.cookieBannerConsentRequired().toString(),”ccRequired”)+this.qs(O(“ecasession”),”ecasession”)+this.qs(O(“TOptOut”),”browserOptOut”)}qsFromDataAttributeHelper(e,t){return e&&e.featureFlags&&e.featureFlags.wpoEnabled&&t&&!t.includes(“remwpofltww”)&&(t=this.appendWpoFlightsToInfo(e,t)),this.qs(e.pcsInfo&&e.pcsInfo.env||e.env,”env”)+this.qs(e.aid,”aid”)+this.qs(e.apptype,”apptype”)+this.qs(e.pagetype,”pagetype”)+this.qs(e.audienceMode,”audienceMode”)+this.qs(e.configIndexDocId,”configIndexDocId”)+this.qs(e.deviceFormFactor,”deviceFormFactor”)+this.qs(e.domain,”domain”)+this.qs(e.configRootUrl,”configRootUrl”)+this.qs(this.getHighestCbid(e.cbid,e.apptype),”cbid”)+this.qs(e.ocid,”ocid”)+this.qs(e.os,”os”)+this.qs(JSON.stringify(e.locale),”locale”)+this.qs(e.geo_lat,”lat”)+this.qs(e.geo_long,”long”)+this.qs(JSON.stringify(e.featureFlags),”featureFlags”)+this.qs(JSON.stringify(e.browser),”browser”)+this.qs(JSON.stringify(e.servicesEndpoints),”servicesEndpoints”)+this.qs(e.bundleInfo&&e.bundleInfo.v||””,”buildVersion”)+this.qs(t,”dataInfo”)}qsSelectedPivot(){const e=”selectedPivot”;let t;try{const n=oe();n&&(t=n.getItem(e))}catch(e){console.warn(“Error getting pivot id from local storage. “+e)}return this.qs(t,e)}qsXboxXToken(){const e=”xboxXTokenId”;let t;try{const n=oe();n&&(t=n.getItem(e))}catch(e){console.warn(“Error getting xbox XToken from local storage. “+e)}return this.qs(t,e)}appendWpoFlightsToInfo(e,t){const n=this.getWpoFlightsFromLocalStorage(e);if(n&&n.length){const e=”;”,o=t.split(e);for(let e=0;ee.id))}}catch(e){console.warn(`Error getting wpo flights from ls for ${o} Error:${e}`)}return null}getHighestCbid(e,t){try{const n=oe(),o=parseInt(e),i=parseInt(JSON.parse(n.getItem(`cbid_${t||””}`)));let s;if(o&&!isNaN(o)&&i&&!isNaN(i)&&(s=o>i?o:i),s=s||o||i,s)return window._cbid=s.toString()}catch(e){console.warn(“Error getting highest CBID”+e)}}getAudienceMode(e){oe();const t=E(this.authCookieName),n=E(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};return t&&(1===o||n)?”kids”:e.audienceMode||d.Adult}sendPageConfiguration(){const e=this.clientSettings.pagetype;if(e){const t=E&&E(“pglt-edgeChromium-“+e);if(t)return void window.webWorker.postMessage({id:”PageConfiguration”,type:this.command,payload:t})}window.webWorker.postMessage({id:”PageConfiguration”,type:this.command,payload:!1})}qsFromDataAttribute(e){let t,n;const o=oe();if(o){const i=JSON.parse(o.getItem(“shd_”+e.pagetype)||null);i&&i.clientSettings&&i.info&&(t={…i.clientSettings,bundleInfo:e.bundleInfo},n=i.info)}return(!t||!n||e.pageGenTime>=t.pageGenTime)&&(t=e,n=this.domInfo),t.audienceMode=this.getAudienceMode(t),this.qsFromDataAttributeHelper(t,n)}qsFromUrl(){const e=location.search;return e&&e.length?e.substring(1,e.length):””}getEnterpriseAccessToken(){return new Promise((e=>{window.chrome&&window.chrome.authPrivate?window.chrome.authPrivate.getPrimaryAccountInfo((t=>{t&&”GCC_MODERATE”!==t.region_scope||e(“”);const n={account_id:t.account_id,account_type:t.account_type,client_id:”d7b530a4-7680-4c23-a8bf-c52c121d2e87″,scope_or_resource:”https://enterprisenews.microsoft.com”};window.chrome.authPrivate.acquireAccessTokenSilently(n,(t=>{t.is_success?e(t.access_token):e(“”)}))})):e(“”)}))}qsMisc(e){return this.qs(performance.timeOrigin&&performance.timeOrigin.toString(),”mainTimeOrigin”)+this.qs(e.disableWWConfig&&”1″,”disableWWConfig”)}qsAuth(e){let t=this.qs(De()&&”1″,”disableWWAuth”);if(!Ue()){const e=De()&&He()||{};t+=this.qs(encodeURIComponent(JSON.stringify(je(e.accessToken))),”authHeaders”)}return t+=this.qs(Qe()&&”1″,”isAccountLinked”),t+=this.qs(this.shouldFetchAppAnonCookie()&&”1″,”fetchAppAnonCookie”),t}getSingleColRequest(e){const t=”render_single_column”,n=”feed_layout”;let o,i;for(const s of e){const{key:e,value:r}=s;e===t?o=r:e===n&&(i=r)}return”boolean”==typeof o?o:!!i&&(i&&”single”===i.type)}cookieBannerConsentRequired(){const e=null!=document.getElementById(“consent-banner-container”)&&null===E(“MSCC”),t=null!=document.getElementById(“onetrust-sdk”)&&null===E(“eupubconsent-v2”);return e||t}shouldFetchAppAnonCookie(){if(!Ge())return!0;const e=(()=>{const e=et();if(e){if(“MSA”===e.account_type)return C.MSA;if(“AAD”===e.account_type)return C.AAD}})();return e===C.MSA||N(“lt”)?!N(“aace”):e===C.AAD?Qe()&&!$e():void 0}}let nt,ot,it;function st(){if(ot)return ot;const e=document.head.getAttribute(“data-info”);return ot=((/f:s*([^;]+)/i.exec(e)||{})[1]||””).toLowerCase(),ot}var rt;!function(e){e[e.Alert=0]=”Alert”,e[e.NoAlert=1]=”NoAlert”,e[e.HighImpact=2]=”HighImpact”,e[e.Critical=3]=”Critical”}(rt||(rt={}));const ct=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;this.maxLength=20,this.list=[],this.maxLength=e}push(e){this.list.push(e),this.list.length>this.maxLength&&this.list.shift()}get data(){return this.list}};function at(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:rt.Alert;try{const i=function(){if(!nt){const e=document.head.getAttribute(“data-client-settings”);e&&(nt=JSON.parse(e))}return nt}(),s=st(),r=function(e){if(e){const{pcsInfo:t,pageGenTime:n}=e,o=new Date(n).getTime(),i=!t||[“prod”,”prod-ssr”,”prod-ssrntp”].includes(t.env);it=i?”browser.events.data.msn.com”:”events-sandbox.data.msn.com”;return{cors:”true”,”content-type”:”application/x-json-stream”,”client-id”:”NO_AUTH”,”client-version”:”1DS-Web-JS-2.2.2″,apikey:i?”0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279″:”f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028″,”upload-time”:o,w:”0″,anoncknm:”app_anon”}}return null}(i);let c=””;r&&r.apikey&&””!==r.apikey&&(c=function(e){if(e){const t=e.indexOf(“-“);if(t>0)return e.substring(0,t)}return””}(r.apikey));const a=function(e,t,n,o,i,s){let r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:rt.Alert;if(n){i=i||{};const{apptype:a,audienceMode:d,pagetype:u,pageGenTime:l,bundleInfo:p,deviceFormFactor:h=””,fd_muid:g,os:f}=n;i.pageGenTime=l,i.build=p&&p.v,i.appType=a;const m=function(e,t,n){const o=n&&”phone”===n.toLowerCase(),i=t&&”enterprise”===t;return{bingHomepage:”binghomepage”,mmx:”emmx”,edge:”spartan”,edgeChromium:i?”entnews”:”anaheim”,hybrid:”spartan”,hub:o?”prime_mobile”:”prime”,microsoftNews:”msnews”,office:”entnews”,views:o?”prime_mobile”:”prime”,windowsShell:”windowsshell”}[e]}(a,d,h),w=m||a,v=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let b,y=””,S=”muid”;try{if(“edgeChromium”===a&&”object”==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);b=e.has(“startpage”)?”msedgdhp”:”msedgntp”,”enterprise”===d?b=”entnewsntp”:”xbox”===f&&(b=”xboxntp”)}window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(y=E(“muid”))}catch{}y||(y=n.aid,S=”aid”);const A={name:”MS.News.Web.AppError”,time:l,ver:”4.0″,iKey:`o:${o}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{name:”default”,product:w,type:dt(u),content:{category:”standaloneError”},ocid:b},browser:{clientId:y,clientIdType:S},flight:{id:s},request:{activityId:n.aid,requestId:n.aid,afdMuid:g},locale:{mkt:v},extSchema:{id:e,severity:r,pb:i,message:t}}};var c;if(y&&”muid”===S)A.ext={…null==A?void 0:A.ext,user:{…null==A||null===(c=A.ext)||void 0===c?void 0:c.user,localId:`t:${y}`}};return A.data.flight.tmpl=””,i.isSSRScope&&(A.data.flight.tmpl+=”ssrscope:1″),”object”==typeof window&&(window.isSSREnabled&&(A.data.flight.tmpl+=”;ssr-enabled:1″),window.isSSRCompleted&&(A.data.flight.tmpl+=”;ssr-completed:1″)),A?JSON.stringify(A):null}return null}(t,e,i,c,n,s,o);if(r&&a){console.error(a),ct.push(a);const e=”https://”+it+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map((function(t){return t+”=”+encodeURIComponent(e[t])})).join(“&”)}(r);navigator.sendBeacon(e,a)}}catch{}}function dt(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”}return t}function ut(e){return new Promise((t=>setTimeout(t,e)))}const lt=”https://acdn.adnxs.com/ast/ast.js”;async function pt(){window.apntag=window.apntag||{anq:[]},window.apntag.anq=window.apntag.anq||[],await async function(e){if(!s())return;const{src:t,id:n,async:o=!0,container:i=document.head,retryNumber:r=0,retryDelayMs:c=0}=e;try{await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;if(t<=1)return e();let o,i=1;do{try{o=await e()}catch(e){if(i===t)throw e&&e.message&&(e.message=`${e.message} after ${i} attempts`),e;await ut(n)}}while(!o&&++ifunction(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new Promise(((i,r)=>{const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:”anonymous”,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0;if(!s())throw new Error(“createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().”);const c=document.createElement(“script”);return t&&(c.id=t),i&&c.setAttribute(“class”,i),r&&(c.onload=r),c.type=”text/javascript”,e&&(c.src=e,c.async=n,c.crossOrigin=o),window&&window.NONCE_ID&&(c.nonce=window.NONCE_ID),c}(e,t,o,void 0,void 0,(()=>i(!0)));c.crossOrigin=void 0,c.onerror=r,n.prepend(c)}))}(t,n,i,o)),r,c)}catch(e){at(“Failed to download Static JS”,11103,{scriptId:n,scriptSrc:t},rt.Alert)}}({id:”display-sdk”,src:lt,container:document.head,retryDelayMs:200,retryNumber:5})}const ht=S();function gt(e){return((null==ht?void 0:ht.ocid)||””).toLowerCase().includes(e.toLowerCase())}function ft(){return gt(“superappdhp”)}const mt=”visibilitychange”;function wt(){return”visible”===document.visibilityState?Promise.resolve():new Promise((e=>{document.addEventListener(mt,(()=>{“visible”===document.visibilityState&&e()}))}))}function vt(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.logLoadingError&&wt().then((()=>{t.logLoadingError(e)}))}function bt(e,t){if(e instanceof Error){const n=e.toString();return t&&e.stack?`${n}, Stack: ${e.stack}`:n}return”string”==typeof e?e:function(e){try{return JSON.stringify(e)}catch{return””}}(e)}const{inlineCRS:yt}=function(){const e={};try{if(!s())return e;const{all:t,prg:n}=function(){const e=p(“info”),t=(e&&e.match(/f:s*([^;]+)/i)||[])[1]||””,n=t.split(“,”);return{all:n,prg:l(n)}}();t.includes(“inlinecrscall”)&&(!function(e){const t=a(p(“clientSettings”))||{},n=function(e,t){let n;const o=decodeURIComponent(c(e,”aace”)),{child:i}=o&&a(o)||{},s=c(e,r);return n=o&&(1===i||s)?d.Kids:t.audienceMode||d.Adult,n}(document.cookie,t),{apptype:o,browser:i,bundleInfo:{v:s}={},deviceFormFactor:u=””,domain:l=””,locale:{content:h,display:g}={},ocid:f,os:m=””,pagetype:w=””,servicesEndpoints:{crs:v}={}}=t;if(!o||!s||!v)return;const b={audienceMode:n,browser:i,deviceFormFactor:u,domain:l,locale:{content:h,display:g},ocid:f,os:m,platform:”web”,pageType:w,pageExperiments:e},y=new URLSearchParams([[“expType”,”AppConfig”],[“expInstance”,”default”],[“apptype”,o],[“v”,s]]),S=`${v.path}${v.v}/config/?${y}&targetScope=${JSON.stringify(b)}`,A=e=>{const t=new URL(`https://${e}${S}`);window.crsRequestData={url:t.toString()};const n=new AbortController;return setTimeout((()=>n.abort()),5e3),fetch(t,{credentials:”omit”,signal:n.signal})},k=”msn.”+(function(e,t){return!!(e.hostname.toLowerCase().endsWith(“.cn”)||t.isChinaCompliance||t.useCnDomain||e.search.match(/item=revip:cn/))}(location,t)?”cn”:”com”),{domain:C}=v,I=C&&new URL(C).host;window.crsPromise=A(I||`assets.${k}`).catch((()=>{const{hostname:e}=location,t=e.match(/.msn.(com|cn)$/)?e:`www.${k}`;return A(t)}))}(n),e.inlineCRS=!0)}catch(e){console.error(“InlineHeadCommon: “+e)}return e}();var St;!function(){!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[“vendors”,”common”,”microsoft”],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:”Error when loading bundle(s): “,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e5,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;wt().then((()=>{setTimeout((()=>{const n=window.webpackJsonp;if(n){const s=n.length,r=e.length+1;s{t.length&&t[0][0]&&e.splice(e.indexOf(t[0][0]),1)})),vt(20202),at(t+e.toString(),20202,{}),i&&(vt(o),i(o,{customMessage:e.toString()})))}}),n)}))}();const e=new Set([“Script error.”,”ResizeObserver loop limit exceeded”,”ResizeObserver loop completed with undelivered notifications.”]);window.onerror=function(t,n,o,i,s){if(e.has(t))return;at(“JS Exception”,20203,{source:n,line:o,message:t,stack:bt(s,!0),currentUrl:window.location.href,column:i},rt.Alert)}}(),St={disableWWConfig:yt},ft()||(new tt).init(void 0,St),ft()||gt(“skype”)||gt(“office”)||gt(“outlook”)||pt()}(); ]]> onErrorHandler(s.src);s.nonce=””;s.crossOrigin=”anonymous”;document.body.appendChild(s);} ]]>

Source

Leave a Comment