MSN

[]
MSN i.delete(e),has:e=>i.has(e)});const s=”__RequestDataInstance__”;class c{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=a(“OSATE”,this.cookie),t=!!e&&”1″===e,n=a(“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=r.get(s);return e||(n.g.TEST_ENV?d({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}):d({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}))}static resetInstance(e){const t=new c(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return r.set(s,t),t}}function a(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 d=c.resetInstance,l=()=>c.getInstance();var u,p;!function(e){e.Anon=”ANON”,e.AppAnon=”APP_ANON”,e.Unknown=””}(u||(u={})),function(e){e.AnonCookieExists=”ace”,e.AppAnonCookieExists=”aace”}(p||(p={}));const h=”child”;function g(e,t){if(e){const n=new RegExp(“\b”+t+”\s*=\s*([^;]*)”,”i”).exec(e);return n&&n.length>1?n[1]:null}return null}function w(e){try{if(e)return JSON.parse(e)}catch(e){}return null}const m=”prg-pw-“,f=”prg-“,b=”prg-1sw-“,v=”prg1flights”;function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;const n=t.length,o=[];return e&&e.length&&(e.forEach((e=>{const i=e&&e.trim();i&&i.length>=n&&i.substring(0,n).toLowerCase()===t&&o.push(i.toLowerCase())})),o.sort()),o}function k(e){var t;return document.head.dataset[e]||(null===(t=C())||void 0===t?void 0:t.dataset[e])}let S;function C(){return void 0===S&&(S=document.getElementsByClassName(“peregrine-widget-settings”)[0]||null),S}const A=”Authorization”;var I,_;!function(e){e.Presentation=”presentation”}(I||(I={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(_||(_={}));var q,E;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(q||(q={})),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”}(E||(E={}));new Set([“winp0dash”,”winp1taskbar”,”winp1taskbarent”,”winp1taskbardirect”,”winp1taskbardirectent”,”winp1taskbarent”,”winp2juntaskbar”,”winp2juntaskbarent”,”winp2″,”winp2ent”,”winp2fp”,”winp2fpent”,”winp2fptaskbar”,”winp2fptaskbarent”,”winp2fptaskbarhover”,”winp2fptaskbarhoverent”,”winp2widget”,”winp2widgetent”]);const x=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]),O=(new Set([“msedgdhp”,”msedgdhphdr”,”msedgntphdr”,”msedgntp”,”msedgdhp”,”entnewsntp”]),new Set([“hpmsn”]));new Set([“chromentpnews”]);function T(){var e;return o()?w(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}const P=”feed/personalize/settings”;function L(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,” “))||””}let R=new class{constructor(){o()?(this.isDebugEnabled=(L(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1}||”vp”===(L(window.location.href,”reqsrc”)||””).toLowerCase(),this.isDebugEnabled&&!n.g.TEST_ENV&&(window.webpackRequire=n)):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 N{get supported(){return!!this.storage}constructor(e){this.storage=e}getItem(e){if(this.supported)return this.storage.getItem(e)}getObject(e,t){const n=this.getItem(e);if(null!=n){const e=w(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 w(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;R.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;n{const e=J(K,!0),t=e&&w(e),{login_hint:n}=t||{};return n&&t})),Y=X((()=>!!J(K)));function Z(){try{return localStorage}catch(e){return null}}const ee=”__PageExperimentInstance__”;function te(e){r.set(ee,e)}function ne(e){if(!r.has(ee)&&o()){var t;te(oe(document.head.dataset.info||(null===(t=window.document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===t||null===(t=t.dataset)||void 0===t?void 0:t.info)||””))}const n=r.get(ee);return n&&n.has(e)}function oe(e){const t=(e||””).replace(/(^f:|;.*$)/g,””).split(“,”);return new Set(t)}const ie=”uxlogin”,re=”uxlogout”,se=”uxedit”,ce=”useRedirect”,ae=”uxswitch”,de=X((()=>{const e=Z();return e&&”1″===e.getItem(ie)||o()&&location.search&&location.search.includes(`${ie}=1`)}));const le=X((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(re)}));const ue=X((()=>{const e=Z();return e&&”1″===e.getItem(se)}));const pe=X((()=>{const e=Z(),t=!ne(“prg-noredirect”)&&e&&”1″===e.getItem(ce)&&function(){const e=document.head.dataset.clientSettings||””,{browser:t}=w(e)||{},{browserType:n=””}=t||{};return!!/safari/i.test(n)}();return t}));const he=X((()=>{const e=Z();return e&&”1″===e.getItem(ae)}));const ge={bingHomepageMobile:”binghomepagemobile”,outlookMobile:”OnOOutlookMobile”,officeMobile:”OnOOfficeMobile”,sapphire:”OnOStartApp”,skype:”OnOSkype”,freFullPage:”emmxFre”,winWeatherApp:”weather-app-win”,xiaomiApp:”xmweather-“,launcher:”launcherntp”,launcherInterests:”launcherInterests”,moto:”moto”,swiftKey:”swiftKey”,winMoneyApp:”finance-app-win”},we=”superappdhp”,me=[“ios”,”android”,”ipados”];let fe=Te(“ocid”).toLowerCase(),be=Te(“chpltfm”),[ve,ye]=be.toLowerCase().split(“-“);function ke(){if(!o()||Ee())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,i=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!i)}function Se(){const e=be&&”outlook”===ve&&me.includes(ye),t=fe===ge.outlookMobile.toLowerCase();return e||t}function Ce(){const e=be&&[“office”,”union”].includes(ve)&&me.includes(ye),t=fe===ge.officeMobile.toLowerCase();return e||t}function Ae(){const e=fe===ge.skype.toLowerCase()||”skype”===ve;return o()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function Ie(){return!(!o()||Ee())&&(ke()||fe===ge.sapphire.toLowerCase()||fe===we.toLowerCase())}function _e(){const e=Te(“edge”);return(“emmx”===ve||”1″===e)&&Ie()||”mmx”===fe}function qe(){return”3rdp”===ve||fe.startsWith(ge.xiaomiApp)||fe===ge.moto.toLowerCase()||Ee()}function Ee(){return fe.toLowerCase()===ge.swiftKey.toLowerCase()||”swiftkey”==ve.toLowerCase()}function xe(){return-1!==location.href.indexOf(“huawei”)||-1!==location.href.indexOf(“airfind”)||-1!==location.href.indexOf(“aloha”)||”vivo”===fe&&qe()}const Oe=X((()=>ke()||Ae()||Ce()||Se()||Ie()||fe===ge.winWeatherApp.toLowerCase()||fe===ge.winMoneyApp.toLowerCase()||_e()||qe()||[ge.launcher.toLowerCase(),ge.launcherInterests.toLowerCase()].includes(fe)&&Ie()||Ee()||xe()||-1!==location.href.indexOf(“metaos=true”)));function Te(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}const Pe=T()||{},Le={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channeldesktop:1,channelmobile:1,edgeMobile:1},Re={edgeChromium:1},Ne={winWidgets:1},We={edgeChromium:1,shopping:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1},Me={edgeChromium:1,channeldesktop:1,channelmobile:1,cgHomePage:1,distribution:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1,edgeMobile:1},De=X((()=>Pe&&Pe.apptype)),Ue=(X((()=>o()&&De()in Ne)),X((()=>o()&&!Oe()&&!(De()in Le)&&!Be()&&!He()))),Fe=X((()=>Ue()&&!(De()in Re)));X((()=>Ue()&&(!(De()in Re)||!Y()))),X((()=>Ue()&&!Ve()&&!ze()));const $e=X((()=>ze()||Ve())),Be=X((()=>{const e=!(De()in We)&&Xe()&&function(){const e=new URLSearchParams(o()?window.location.search:l().url.search).get(“ocid”)||(null==Pe?void 0:Pe.ocid),t=null==e?void 0:e.toLowerCase(),n=!O.has(t)&&”homePage”!==De()&&!x.has(t);return n}()&&!function(){const e=”windows”==De()&&”windowshp”==(Pe&&Pe.pagetype)&&(o()?window.location.href:l().url.href).includes(`${P}`);return e}();return e})),He=()=>o()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0,je=X((()=>ne(“prg-1s-workid”)||ne(“prg-1s-sm-workid”)||ne(“prg-1s-twid”)||ne(“prg-1s-mm-wid-t”)));X((()=>De()in Me||Be()));function Ge(){const e=F;if(e)return R.log(“dual-auth: tryGet1SAuthToken returned live tokens”),e;const t=B();if(t)return R.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${H()}`),t;R.log(“dual-auth: tryGet1SAuthToken returned empty tokens”)}function Je(e){const t={};return e&&(t[A]=`Bearer ${e}`),t}function Ve(){return Fe()&&de()||function(){const e=Fe()&&!Ke()&&!de()&&Q()&&(“expired”==H()||ue());return e}()||le()||pe()}function ze(){return Fe()&&!Q()&&he()}const Xe=X((()=>{const{browser:e}=Pe,{browserType:t=””,detected:n={}}=e||{},{browserType:o=””}=n||{};return/edgeChromium/i.test(t)||/edgeAndroid/i.test(t)||/edgeiOS/i.test(t)||/edge/i.test(o)}));X((()=>Fe()&&!Be()));const Ke=()=>{if(!ne(“bypass-early-token”))return!1;const e=Q();if(!e)return!1;let t;switch(e.account_type){case”MSA”:t=Fe()?”ace”:”aace”;break;case”AAD”:t=Fe()?”WID”:”APP_WID”;break;default:return!1}return!!J(t)};const Qe=”__core_auth_authHeaderPromiseParts__”,Ye=()=>r.get(Qe);var Ze;!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};r.set(Qe,t)}(),function(e){e.GLOBAL=”GLOBAL”,e.GCC_MODERATE=”GCC_MODERATE”}(Ze||(Ze={}));let et;function tt(){return et}function nt(e){const t=e||tt()||”al_app_anon”,n=ot();return!!(n&&([“anon”,”al_anon”].includes(t)&&n.AL_ANON||[“app_anon”,”al_app_anon”].includes(t)&&n.AL_APP_ANON))}const ot=X((()=>w(J(“AL_STATE”,!0))));const it=()=>{const e=J(“elt”,!0),t=e&&w(e),{access_token:n,account_type:o,login_hint:i,region_scope:r}=t||{};return(n||o||i||r)&&t};function rt(e){if(“undefined”==typeof window||!window.document||window.isRenderServiceEnv)return;const t=window.trustedTypes;if(!t||!t.createPolicy)return;const n=window.trustedTypePolicies||(window.trustedTypePolicies={});if(n[e])return n[e];const o=t.createPolicy(e,{createScriptURL:e=>{const t=function(e){const t=[“ntp.msn.com”,”ntp.msn.cn”,”assets.msn.cn”,”assets.msn.com”,”www.bing.com”,”assets2.msn.com”,”assets2.msn.cn”,”www.clarity.ms”,”int.msn.com”,”r.bing.com”,”business.bing.com”,”staticview.msn.com”,”staticview.msn.cn”,document.location.hostname];let n;try{n=new URL(e,location.origin)}catch(e){return”about:blank#error”}if(n.hostname&&!t.includes(n.hostname))return”about:blank#error”;return e}(e);return t}});return n[e]=o,o}class st{constructor(){this.childCookieName=”child”,this.domInfo=document.head.dataset.info,this.command=”command”}init(e,t){this.clientSettings=e||T(),this.authCookieName=tt()||window._authCookieName||””,this.bundle=window._webWorkerBundle||””,t=t||{};const n=this.buildWebWorkerUrl(this.clientSettings,t),o=this.clientSettings.apptype;let i;if(o&&”edgeChromium”===o){if(i=this.tryGetWebWorkerUsingPolicy(n,”webWorkerUrlPolicy”),!i)return void console.warn(“Error in creating trusted types compliant web worker”)}else i=window.webWorker=new Worker(n,{name:”web-worker”});const r=window.webWorkerMessages=[];i.onmessage=e=>{r.push(e.data)};const s=window.webWorkerErrors=[];if(i.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&&i.postMessage({id:”FeedDisplaySetting”,type:this.command,payload:e.value})})),t.getPref(“ntp.layout_mode”,(e=>{e&&e.value&&i.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)),i.postMessage({id:”RenderSingleColumn”,type:this.command,payload:t})})),t.getPref(“new_device_fre.has_user_seen_new_fre”,(e=>{e&&i.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″)&&i.postMessage({id:”EdgeNoAds”,type:this.command,payload:!0}),t.includes(“msReducedNtpAdsForNewDevice_stage2″)&&i.postMessage({id:”EdgeReduceAds”,type:this.command,payload:!0})})),”enterprise”===e&&this.clientSettings.browser&&”edgeChromium”===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87?this.getEnterpriseAccessToken().then((e=>{e&&i.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:Je(e)})})):i.postMessage({id:”AuthTokenEnterprise”,type:this.command,payload:{}}),”adult”!==e&&”enterprise”!==e||this.sendPageConfiguration()}$e()&&Ye().promise.then((e=>i.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=o()?window.devicePixelRatio:l().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(z(this.authCookieName),”aace”,”1″)+this.qs(z(“muid”),”muid”)+this.qs(z(this.childCookieName),”child”)+this.qs(z(“cbypass”),”cbypass”)+this.qs(this.cookieBannerConsentRequired().toString(),”ccRequired”)+this.qs(z(“ecasession”),”ecasession”)+this.qs(z(“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=Z();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=Z();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=Z(),o=parseInt(e),i=parseInt(JSON.parse(n.getItem(`cbid_${t||””}`)));let r;if(o&&!isNaN(o)&&i&&!isNaN(i)&&(r=o>i?o:i),r=r||o||i,r)return window._cbid=r.toString()}catch(e){console.warn(“Error getting highest CBID”+e)}}getAudienceMode(e){Z();const t=J(this.authCookieName),n=J(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};return t&&(1===o||n)?”kids”:e.audienceMode||”adult”}sendPageConfiguration(){const e=this.clientSettings.pagetype;if(e){const t=J&&J(“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=Z();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(Fe()&&”1″,”disableWWAuth”);if(!$e()){const e=Fe()&&Ge()||{};t+=this.qs(encodeURIComponent(JSON.stringify(Je(e.accessToken))),”authHeaders”)}return t+=this.qs(nt()&&”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 r of e){const{key:e,value:s}=r;e===t?o=s:e===n&&(i=s)}return”boolean”==typeof o?o:!!i&&(i&&”single”===i.type)}cookieBannerConsentRequired(){const e=null!=document.getElementById(“consent-banner-container”)&&null===J(“MSCC”),t=null!=document.getElementById(“onetrust-sdk”)&&null===J(“eupubconsent-v2”);return e||t}shouldFetchAppAnonCookie(){if(!Xe())return!0;const e=(()=>{const e=it();if(e){if(“MSA”===e.account_type)return”MSA”;if(“AAD”===e.account_type)return”AAD”}})();return”MSA”===e||V(“lt”)?!V(“aace”):”AAD”===e?nt()&&!je():void 0}tryGetWebWorkerUsingPolicy(e,t){const n=rt(t);if(n){const t=n.createScriptURL(e),o=t&&t.toString();if(!o||”about:blank#error”===o)return;window.webWorker=new Worker(t,{name:”web-worker”})}else window.webWorker=new Worker(e,{name:”web-worker”});return window.webWorker}getFlightList(){return((/^f:s*([^;]+)/i.exec(this.domInfo)||{})[1]||””).toLowerCase().split(“,”)}}let ct,at,dt;function lt(){if(at)return at;const e=document.head.getAttribute(“data-info”);return at=((/f:s*([^;]+)/i.exec(e)||{})[1]||””).toLowerCase(),at}function ut(e){var t;return((null===(t=document.head)||void 0===t||null===(t=t.getAttribute(“data-info”))||void 0===t?void 0:t.split(“;”).find((e=>e.startsWith(“f:”))))||””).includes(e)}var pt;!function(e){e[e.Alert=0]=”Alert”,e[e.Deprecated=1]=”Deprecated”,e[e.HighImpact=2]=”HighImpact”,e[e.Critical=3]=”Critical”}(pt||(pt={}));const ht=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 gt(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:pt.Alert,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0;try{const s=function(){if(!ct){const e=document.head.getAttribute(“data-client-settings”);e&&(ct=JSON.parse(e))}return ct}(),c=lt(),a=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);dt=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}(s);let d=””;a&&a.apikey&&””!==a.apikey&&(d=function(e){if(e){const t=e.indexOf(“-“);if(t>0)return e.substring(0,t)}return””}(a.apikey));const l=function(e,t,n,o,i,r){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:pt.Alert;if(n){i=i||{};const{apptype:a,audienceMode:d,pagetype:l,pageGenTime:u,bundleInfo:p,deviceFormFactor:h=””,fd_muid:g,os:w}=n;i.pageGenTime=u,i.build=p&&p.v,i.appType=a;const m=function(e,t,n){const o=n&&”phone”===n.toLowerCase(),i=t&&”enterprise”===t,r={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”,homePage:o?”prime_mobile”:”prime”,windowsShell:”windowsshell”};return r[e]}(a,d,h),f=m||a,b=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let v,y=””,k=”muid”;try{if(“edgeChromium”===a&&”object”==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);v=e.has(“startpage”)?”msedgdhp”:”msedgntp”,”enterprise”===d?v=”entnewsntp”:”xbox”===w&&(v=”xboxntp”)}window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(y=J(“muid”))}catch{}y||(y=n.aid,k=”aid”);const S={name:”MS.News.Web.AppError”,time:u,ver:”4.0″,iKey:`o:${o}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{name:”default”,product:f,type:mt(l),content:wt[a]??{category:”standaloneError”},ocid:v},browser:{clientId:y,clientIdType:k},flight:{id:r},request:{activityId:n.aid,requestId:n.aid,afdMuid:g},locale:{mkt:b},extSchema:{id:e,severity:s,pb:i,message:t}}};var c;if(y&&”muid”===k)S.ext={…null==S?void 0:S.ext,user:{…null==S||null===(c=S.ext)||void 0===c?void 0:c.user,localId:`t:${y}`}};return S.data.flight.tmpl=””,”object”==typeof window&&(window.isSSREnabled&&(S.data.flight.tmpl+=”;ssr-enabled:1″),window.isSSRCompleted&&(S.data.flight.tmpl+=”;ssr-completed:1″)),S?JSON.stringify(S):null}return null}(t,e,s,d,n,c,o);if(r&&!function(e){if(null==e)return!1;return e.startsWith(“2”)||e.startsWith(“3″)}(null==s?void 0:s.aid))return console.error(l),void console.error(`This App error Id: ${t} will not be sent due to app error sampling!`);if(a&&l){console.error(l),ht.push(l);const e=”https://”+dt+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map((function(t){return t+”=”+encodeURIComponent(e[t])})).join(“&”)}(a);if(i&&!performance.getEntriesByType(“visibility-state”).some((e=>”visible”===e.name))){const t=()=>{“visible”===document.visibilityState&&navigator.sendBeacon(e,l)};document.addEventListener(“visibilitychange”,t,{once:!0})}else navigator.sendBeacon(e,l)}}catch{}}const wt={homePage:{vertical:”homepage”,category:””,id:””,domainId:”13041″,title:”undefined”!=typeof document?document.title:””}};function mt(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”}return t}function ft(e){return new Promise((t=>setTimeout(t,e)))}const bt=”https://acdn.adnxs.com/ast/ast.js”;async function vt(){window.apntag=window.apntag||{anq:[]},window.apntag.anq=window.apntag.anq||[],await async function(e){if(!o())return;const{src:t,id:n,async:i=!0,container:r=document.head,retryNumber:s=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 ft(n)}}while(!o&&++ifunction(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new Promise(((r,s)=>{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],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:”anonymous”,r=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;if(!o())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),r&&c.setAttribute(“class”,r),s&&(c.onload=s),c.type=”text/javascript”,e&&(window&&window.trustedTypesURLValidation?c.src=window.trustedTypesURLValidation(e,”scriptSrcUrlPolicy”):c.src=e,c.async=n,c.crossOrigin=i),window&&window.NONCE_ID&&(c.nonce=window.NONCE_ID),c}(e,t,i,void 0,void 0,(()=>r(!0)));c.crossOrigin=void 0,c.onerror=s,n.prepend(c)}))}(t,n,r,i)),s,c)}catch(e){gt(“Failed to download Static JS”,11103,{scriptId:n,scriptSrc:t},pt.Alert)}}({id:”display-sdk”,src:bt,container:document.head,retryDelayMs:200,retryNumber:5})}const yt=T();function kt(e){return((null==yt?void 0:yt.ocid)||””).toLowerCase().includes(e.toLowerCase())}function St(){return kt(“superappdhp”)}const Ct=”visibilitychange”;function At(){return”visible”===document.visibilityState?Promise.resolve():new Promise((e=>{document.addEventListener(Ct,(()=>{“visible”===document.visibilityState&&e()}),{once:!0})}))}function It(e){const t=window&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&t.logLoadingError&&At().then((()=>{t.logLoadingError(e)}))}const _t=223300,qt=223301;function Et(e,t){const n=rt(t);if(n){const t=n.createScriptURL(e),o=t&&t.toString();return t&&”about:blank#error”!==o?t:(gt(“URL is not trusted types compliant.”,qt,{customMessage:”Failed URL is: “+e},pt.Deprecated,!0),e)}return gt(“Trusted types policy is not available.”,_t,{},pt.Deprecated,!0),e}const xt={},Ot=3;function Tt(e){const t=document.createElement(“script”);return t.type=”text/javascript”,t.crossOrigin=”anonymous”,t.src=Et(e,”fallbackBundleUrlPolicy”),t.onerror=()=>Pt(t),t.onload=e=>function(e){const t=e.target.src,n=t.substring(t.lastIndexOf(“/”)+1).split(“.”)[0]||””,o=window._pageTimings.retriedBundles;window._pageTimings.retriedBundles=o?`${o},${n}`:n}(e),t}function Pt(e){if(!e)return;const t=e.src;let n=xt[t]||1;if(ne.replaceWith(o)),100)}else gt(“Error when loading bundle: “+t,20202,{retryCount:n,timeElapsed:Math.round(performance.now())},pt.Deprecated)}const Lt=”experience”;function Rt(){const e=[“vendors”,”microsoft”,”common”];window.addEventListener(“load”,(()=>{window.requestIdleCallback((()=>{const t=function(e){const t=window.viewsWebpackChunks;if(!t)return[…e,Lt];if(t.length>e.length)return[];t.forEach((t=>e.splice(e.indexOf(t[0][0]),1)));const n=Wt(Lt);t.push===Array.prototype.push&&n.responseEnd>0&&e.push(Lt);return e}(e);var n;t.length&&(ut(“msn-bndl-irtry”)?t.forEach(Nt):Promise.race([At(),(n=5e5,new Promise((e=>setTimeout((()=>e(“timeout”)),n))))]).then((()=>{t.forEach(Nt)})))}))}),{once:!0})}function Nt(e){const t=Wt(e);t&&(t.responseEnd>0?Pt(Array.from(document.scripts).find((e=>e.src===t.name))):setTimeout((()=>{window.requestIdleCallback((()=>{Nt(e)}))}),100))}function Wt(e){const t=performance.getEntriesByType(“resource”).filter((t=>”script”===t.initiatorType&&t.name.indexOf(`/${e}.`)>-1));return t[t.length-1]}function Mt(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 void 0===e?”undefined”:JSON.stringify(e)}catch{return””}}(e)}”undefined”!=typeof window&&window.document&&window.document.createElement&&(window._pageTimings=window._pageTimings||{},window.requestIdleCallback=window.requestIdleCallback||window.setTimeout);const{inlineCRS:Dt}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};try{var n,i;if(!o())return t;const r=w(k(“clientSettings”))||{};let s=null===(n=r.apptype)||void 0===n?void 0:n.toLocaleLowerCase();const c=e.crsOptions||{};”winwidgets”!==s&&”homepage”!==s||(c.crsPrefetch=!0),”edgechromium”===s&&(s=”edgechr”);const a=!(null===(i=r.widgetAttributes)||void 0===i||null===(i=i.clientPerf)||void 0===i||!i.shouldUsePWOnlyFlights),{all:d,prg:u}=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=k(“info”),n=(t&&t.match(/f:s*([^;]+)/i)||[])[1]||””,o=n.split(“,”),i=function(e){let t=f;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?t=m:null!=e&&e.includes(v)&&(t=b),t}(o,e),r=y(o,i);return{all:o,prg:r}}(a);(c.crsPrefetch||d.includes(“inlinecrscall”)||d.includes(`icrscall-${s}`))&&(!function(e,t,n){const i=function(e,t){let n;const o=decodeURIComponent(g(e,”aace”)),{child:i}=o&&w(o)||{},r=g(e,h);return n=o&&(1===i||r)?”kids”:t.audienceMode||”adult”,n}(document.cookie,e),{apptype:r,browser:s,domain:c,bundleInfo:{v:a}={},deviceFormFactor:d,locale:{content:u,display:p}={},ocid:m,os:f,pagetype:b,servicesEndpoints:{crs:v}={}}=e,y=(C()?o()?window.location.hostname:l().url.hostname:c)||””;if(!r||!a||!v)return;const k={audienceMode:i,browser:s,deviceFormFactor:d,domain:y,locale:{content:u,display:p},ocid:m,os:f,platform:”web”,pageType:b,pageExperiments:t},S=new URLSearchParams([[“expType”,”AppConfig”],[“expInstance”,”default”],[“apptype”,r],[“v”,a]]),A=`${v.path}${v.v}/config/?${S}&targetScope=${JSON.stringify(k)}`,I=e=>{const t=new URL(`https://${e}${A}`),{timeout:o=5e3}=n;let i;if(window.crsRequestData={url:t.toString()},o>=0){const e=new AbortController;setTimeout((()=>e.abort()),o),i=e.signal}return fetch(t,{signal:i})},_=”msn.”+(function(e,t){return!!(e.hostname.toLowerCase().endsWith(“.cn”)||t.isChinaCompliance||t.useCnDomain||e.search.match(/item=revip:cn/))}(location,e)?”cn”:”com”),{domain:q}=v,E=q&&new URL(q).host;let x=I(E||`assets.${_}`);n.disableFallback||(x=x.catch((()=>{const{hostname:e}=location,t=e.match(/.msn.(com|cn)$/)?e:`www.${_}`;return I(t)})));window.crsPromise=x}(r,u,c),t.inlineCRS=!0)}catch(e){console.error(“InlineHeadCommon: “+e)}return t}();var Ut;!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;ut(“msn-bndl-rtry”)||ut(“msn-bndl-irtry”)?Rt():At().then((()=>{setTimeout((()=>{const n=window.viewsWebpackChunks;if(n){const r=n.length,s=e.length+1;r{t.length&&t[0][0]&&e.splice(e.indexOf(t[0][0]),1)})),It(20202),gt(t+e.toString(),20202,{}),i&&(It(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,r){if(e.has(t))return;gt(“JS Exception”,20203,{source:n,line:o,message:t,stack:Mt(r,!0),currentUrl:window.location.href,column:i},pt.Alert)}}(),Ut={disableWWConfig:Dt},St()||(new st).init(void 0,Ut),function(){const e=kt(“skype”)&&(t=”prg-rr-skype-rv”,!((null===(n=document.head)||void 0===n||null===(n=n.getAttribute(“data-info”))||void 0===n?void 0:n.split(“;”).find((e=>e.startsWith(“f:”))))||””).includes(t))&&!(kt(“msnaroverlay”)||”phone”===(null==yt?void 0:yt.deviceFormFactor));var t,n;const o=kt(“skype”)&&”video”===(null==yt?void 0:yt.pagetype);St()||(kt(“skype”)||kt(“office”)||kt(“outlook”))&&!e&&!o||vt()}()}(); ]]> onErrorHandler(s.src);s.nonce=””;s.crossOrigin=”anonymous”;document.body.appendChild(s);} ]]>

You May Also Like

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다