strings.moreOptionsButtonText}"
        aria-label="${e=>e.strings.moreOptionsButtonText}"
        role="button"
        @click="${(e,t)=>e.toggleSDCardActionMenu(t.event)}"
        @keypress="${(e,t)=>e.toggleSDCardActionMenu(t.event)}"
        class="more-actions"
        data-t="${e=>(0,s.q4)(e.actionButtonTelemetryContract)}"
    >
        ${N.Z}
    </fluent-button>
`,W=F.d`
    <msft-structured-data-card
        :data=${e=>e.cardData}
        target=${e=>e.openLinksInNewTab?"_blank":"_self"}
    >
        <a class="clickable" 
           @click="${e=>e.goToPersonalizeCallback()}"
           tabindex="0"
           data-t="${e=>(0,s.q4)(e.personalizationCardTelemetryContract)}">
        </a>

        ${R}

        <div class="card-body">
            <div class="card-body-thumbnails">
                ${(0,H.rx)((e=>e.thumbnails),F.d`
                  <div class="card-body-thumbnail">
                    <img src="${e=>e}" alt="Thumbnail image for a sample game." />
                  </div>
                `)}
            </div>
            <div class="card-body-main">
                <div class="card-body-description">
                    ${e=>e.strings.descriptionText}
                </div>
                <div class="card-body-cta-container">
                  <fluent-anchor
                      class="call-to-action-button"
                      title="${e=>e.strings.callToActionButtonText}"
                      aria-label="${e=>e.strings.callToActionButtonText}"
                      appearance="accent"
                      @click="${e=>e.goToPersonalizeCallback()}"
                      data-t="${e=>(0,s.q4)(e.personalizeNowButtonTelemetryContract)}"
                  >
                      ${e=>e.strings.callToActionButtonText}
                  </fluent-anchor>
                </div>
            </div>
        </div>
    </msft-structured-data-card>
`;var D=r(40082),M=r(32804),j=r(53046);const q=j.i`
    msft-structured-data-card {
        background: linear-gradient(44.24deg, #C2CEE8 0%, rgba(241, 246, 255, 0.6) 100%);
    }
`,B=j.i`
    msft-structured-data-card {
        background: linear-gradient(44.24deg, #2B3C59 0%, rgba(43, 60, 89, 0.6) 100%);
    }
`,X=j.i`

msft-structured-data-card {
    padding-top: 12px;
    cursor: pointer;
}

msft-structured-data-card:hover .call-to-action-button {
    background: var(--accent-fill-hover);
    color: var(--foreground-on-accent-hover);
}

msft-structured-data-card::part(title) {
  text-transform: uppercase;
  font-weight: 600;
}

msft-structured-data-card::part(title-content) {
    margin: 0;
}

.clickable {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 1;
}

.more-actions {
  z-index: 2;
}

.card-body {
  display: flex;
  flex-direction: row;
  padding: 10px 16px 0 16px;
  gap: 12px;
  min-width: 0;
  height: 80px;
}

.card-body-thumbnails {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: ${c.gap.toFixed()}px;
  min-width: ${(2*c.width+c.gap).toFixed()}px;
  width: ${(2*c.width+c.gap).toFixed()}px;
  height: ${(2*c.height+c.gap).toFixed()}px;
}

.card-body-thumbnail {
  width: ${c.width.toFixed()}px;
  height: ${c.height.toFixed()}px;
  border-radius: 4px;
  overflow: hidden;
}

.card-body-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.card-body-description {
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  font-weight: 400;
  font-size: ${M.sNp};
  line-height: ${M.vgC};
}

.card-body-cta-container {
  display: flex;
  flex-direction: row;
}

.call-to-action-button {
  height: unset;
  border-radius: 20px;
  font-weight: 400;
  font-size: ${M.sNp};
  line-height: ${M.vgC};
  z-index: 2;
  margin-top: 8px;
}

.call-to-action-button::part(control) {
  border: none;
  padding: 4px 20px;
}
`.withBehaviors((0,D.zw)(q),(0,D.Uu)(B)),z={experienceConfigSchema:i}},19280:function(e,t,r){"use strict";r.d(t,{d:function(){return n}});var n,i=r(33940),o=r(33799),a=r(68364),s=r(26415),d=r(16517),c=r(65337),l=r(67267),u=r(63535),h=r(87298),p=r(17157),g=r(59207),f=r(66861),m=r(11708),y=r(65135),v=r(99478),b=r(791),w=r(51671);!function(e){function t(e,t,r,n,d){return(0,i.mG)(this,void 0,void 0,(function*(){if((0,v.TF)(e))return null;const c=e,p={displayName:t,idType:"Satori",dataType:d},g={method:"POST",body:JSON.stringify({actionType:r,targetId:c,targetType:n,metadata:p}),headers:yield l.$.getOneServiceHeaders()},m=yield(0,w.rr)();m===o.Hy.SignedIn&&(g.credentials="include");const y=(0,u.PH)(f.X.interestServiceEndpoint);let b;(yield C(m,f.X.interestServiceOcid)).forEach((e=>e.value&&y.searchParams.set(e.key,e.value)));try{return b=yield(0,h.w)((()=>(0,i.mG)(this,void 0,void 0,(function*(){const e=yield fetch(y.href,g);if(e.status>=400){const t=`postActionRequest OneService returned error response. Status: ${e.status} for actionType: ${r}, targetId: ${c}, targetType: ${n}`;return(0,a.OO)(new Error,s.IIT,t),null}return e.json()}))),`postCardAction${r}`),yield b}catch(e){(0,a.OO)(e,s.IIT,"Error while posting action for card interest action",`Url: ${y.href}`)}return b}))}function r({apiUrl:e,ocid:t=null,addPageInfoToOcid:r=!1,appendCommonParams:n=!0,appendMarket:a=!1,method:c="GET",body:u=null,additionalHeaders:h=null,withRetries:f=!0,logErrorAsWarning:m=!1}){return(0,i.mG)(this,void 0,void 0,(function*(){let v,b;try{v=new URL(e)}catch(t){return void y.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.I8d),{message:"Error while request esports data with URL exception.",pb:Object.assign(Object.assign({},s.I8d.pb),{fetchNetworkResponse:{activityId:(0,d.Yq)().ActivityId,requestUrl:e},customMessage:`Error while request esports data with URL exception: ${t&&t.message} URL: ${e}`})}))}if(n){b=yield l.$.getBaseRequestData(c),u&&(b.body=JSON.stringify(u));const e=yield(0,w.rr)();e===o.Hy.SignedIn&&(b.credentials="include"),function(e){(0,i.mG)(this,void 0,void 0,(function*(){const t="undefined"!=typeof window&&(0,p.wq)()&&(0,g._4)(),r=t?t.market||"en-us":(0,d.Yq)().CurrentMarket||"en-us",n=t?t.latitude:(0,d.Yq)().Latitude,i=t?t.longitude:(0,d.Yq)().Longitude;e.set("market",r),n&&i&&(e.set("lat",n),e.set("long",i))}))}(v.searchParams);(yield C(e,t,r)).forEach((e=>e.value&&v.searchParams.set(e.key,e.value)))}if(a){const e="undefined"!=typeof window&&(0,p.wq)()&&(0,g._4)(),t=e?e.market:(0,d.Yq)().CurrentMarket;v.searchParams.set("market",t)}return h&&h.length&&h.forEach((e=>{e.value&&v.searchParams.set(e.key,e.value)})),x(v.href,b,"fetchEsportsData",f,m)}))}function n(e,t,r,n=!1){return(0,i.mG)(this,void 0,void 0,(function*(){const i=yield fetch(decodeURIComponent(e),t);if(i&&i.ok)return i;{const o={statusCode:i.status,statusText:i.statusText,activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},a=`Error while calling ${r}`,c=`${a}: URL: ${e}, responseMessage: ${JSON.stringify(i)}`;n?y.M0.sendClientLogEvent({message:a,type:"information",pb:Object.assign(Object.assign({},(0,s.mnt)()),{fetchNetworkResponse:o,customMessage:c})}):y.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.bKC),{message:a,pb:Object.assign(Object.assign({},s.bKC.pb),{fetchNetworkResponse:o,customMessage:c})}))}}))}function C(e,t=null,r=!0){return(0,i.mG)(this,void 0,void 0,(function*(){return e===o.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,t,r):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,t,r)}))}function x(e,t,r,o=!0,a=!1){return(0,i.mG)(this,void 0,void 0,(function*(){let i;try{return i=o?yield(0,h.w)((()=>n(e,t,r,a)),r):yield n(e,t,r,a),yield i.json()}catch(n){const i={activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},o=`Error while requesting ${r}`,c=`${o}}: ${n&&n.message} URL: ${e} headers: ${(null==t?void 0:t.headers)&&JSON.stringify(null==t?void 0:t.headers)}`;a?y.M0.sendClientLogEvent({message:o,type:"information",pb:Object.assign(Object.assign({},(0,s.mnt)()),{fetchNetworkResponse:i,customMessage:c})}):y.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.I8d),{message:o,pb:Object.assign(Object.assign({},s.I8d.pb),{fetchNetworkResponse:i,customMessage:c})}))}}))}function T(){return(0,i.mG)(this,void 0,void 0,(function*(){const e="xboxXTokenId";let t=(0,c.$o)().getObject(e);const r=new Date;if(r.setHours(r.getHours()+1),!t||!t.xid||!t.notAfter||new Date(t.notAfter)<=r){const n=yield function(){return(0,i.mG)(this,void 0,void 0,(function*(){const e={"x-xbl-contract-version":"1","content-type":"application/json"};return yield function(){return(0,i.mG)(this,void 0,void 0,(function*(){if((yield(0,w.rr)())===o.Hy.SignedIn&&d.jG&&d.jG.ResolvedAccountInfo&&(!d.jG.ResolvedAccountInfo||d.jG.ResolvedAccountInfo.account_type===o.Qm.MSA))return new Promise(((e,t)=>{if(!window.chrome||!window.chrome.authPrivate||!window.chrome.authPrivate.acquireAccessTokenSilently)return e(null);const r={account_id:d.jG.ResolvedAccountInfo.account_id,account_type:window.chrome.authPrivate.AccountType.MSA,client_id:"f3222e55-ab35-49de-81f3-88a3be08cf77",scope_or_resource:"service::xboxlive.signin::DELEGATION",use_msa_v2_api:!0};window.chrome.authPrivate.acquireAccessTokenSilently(r,(r=>{r&&r.is_success&&r.is_token_valid?e(r.access_token):(y.M0.sendClientLogEvent({message:"Failed to fetch access_token from privateAuth API",type:"information",pb:Object.assign({},(0,s.mnt)())}),t(null))}))}));y.M0.sendClientLogEvent({message:"Unable to get xbox authentication token as account type is not MSA",type:"information",pb:Object.assign({},(0,s.mnt)())})}))}().then((t=>{if(!t)return null;const r={method:"POST",body:JSON.stringify({RelyingParty:"http://auth.xboxlive.com",TokenType:"JWT",Properties:{AuthMethod:"RPS",SiteName:"user.auth.xboxlive.com",RpsTicket:`d=[${t}]`}}),headers:e};return x(f.X.getXboxUserTokenUrl,r,"getXboxUserToken",!1,!0)})).then((t=>{if(!t||!t.Token)return null;const r={method:"POST",body:JSON.stringify({Properties:{SandboxId:"RETAIL",UserTokens:[`${t.Token}`]},RelyingParty:"http://xboxlive.com",TokenType:"JWT"}),headers:e};return x(f.X.getXboxXTokenUrl,r,"getXboxXToken",!1,!0)}))}))}();if(n&&n.IssueInstant&&n.NotAfter&&n.Token&&n.DisplayClaims&&n.DisplayClaims.xui&&n.DisplayClaims.xui.length&&n.DisplayClaims.xui[0].xid&&n.DisplayClaims.xui[0].uhs)t={issueInstant:n.IssueInstant,notAfter:n.NotAfter,token:n.Token,xid:n.DisplayClaims.xui[0].xid,uhs:n.DisplayClaims.xui[0].uhs};else{y.M0.sendClientLogEvent({message:"Unable to get Xbox XToken",type:"information",pb:Object.assign({},(0,s.mnt)())});const e=new Date;e.setFullYear(r.getFullYear()+1),t={issueInstant:null,notAfter:e,token:"NoToken",xid:null,uhs:null}}(0,c.$o)().setObject(e,t)}}))}function S(){return(0,i.mG)(this,void 0,void 0,(function*(){const e=(0,c.$o)().getObject(f.X.localStorageXboxXTokenId);return e&&e.token&&e.xid&&e.uhs&&e.notAfter&&new Date(e.notAfter)>new Date?yield O().then((t=>(0,i.mG)(this,void 0,void 0,(function*(){if(!t)return null;const r={};r.authorization=`XBL3.0 x=${e.uhs};${e.token}`,r["x-xbl-contract-version"]="2",r["x-xbl-client-name"]="Gaming",r["x-xbl-client-type"]="Service",r["xbl-scenario-type"]="EdgeGNTP",r["Accept-Language"]=(0,d.Yq)().CurrentMarket.substring(0,2),r["content-type"]="application/json";const n={method:"GET",headers:r},i=f.X.xboxTitleHubUrlTemplate.replace("{xuidValue}",e.xid),o=yield x(i,n,"fetchXboxTitleHubData",!1,!0);if(!o||!o.titles||!o.titles.length)return null;const a=o.titles.filter((e=>e.type&&"game"===e.type.toLowerCase()&&e.titleRecord&&e.titleRecord.lastTimePlayed)).sort((function(e,t){return new Date(t.titleRecord.lastTimePlayed).getTime()-new Date(e.titleRecord.lastTimePlayed).getTime()}));if(!a||!a.length)return null;const s=a[0];if(s&&s.images&&s.images.length){const e=s.images.find((e=>e.type&&"poster"===e.type.toLowerCase()));e&&e.url&&(s.displayImage=e.url)}const c=new Array;return c.push(a[0]),a.slice(1).filter((e=>e.isStreamable)).forEach((e=>{c.push(e)})),c.slice(0,6)})))):null}))}function O(){return(0,i.mG)(this,void 0,void 0,(function*(){const e=yield r({apiUrl:f.X.pdpUserSettingsUrl,ocid:f.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"GET",body:null,additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0});if(!(e&&e.value&&e.value.length&&e.value[0]&&e.value[0].userSettings&&e.value[0].userSettings.gamingCards))return!1;let t;try{t=JSON.parse(e.value[0].userSettings.gamingCards)}catch(e){y.M0.sendClientLogEvent({message:"Error in getXboxUserConsent(). Unable to parse user settings",type:"information",pb:Object.assign({},(0,s.mnt)())})}return t&&t.isConnectToXboxEnabled}))}e.hideEsportsCard=function(){return(0,i.mG)(this,void 0,void 0,(function*(){const e=m.f.EsportsCard;try{return yield b.N.updateSegmentCardsEnableStatus([{cardType:e,enabled:!1}]),!0}catch(t){return(0,a.OO)(t,s.IIT,`'${e.toString()}' card settings save failed while hiding esports card.`),!1}}))},e.updateGamingCardEnableStatus=function(e,t){return(0,i.mG)(this,void 0,void 0,(function*(){const r=[{cardType:e,enabled:t}];try{return yield b.N.updateGamingCardsEnableStatus(r),!0}catch(t){return(0,a.OO)(t,s.aKV,`User ${e} settings update failed`),!1}}))},e.notInterestedCard=function(e){return(0,i.mG)(this,void 0,void 0,(function*(){if(!e||(0,v.TF)(e.videoGame.id))return!1;try{return yield t(e.videoGame.id,e.videoGame.name,f.X.dislikeAction,e.videoGame.type,e.dataType),!0}catch(t){return(0,a.OO)(t,s.IIT,`Esports card settings save failed while dislike esports live stream card videogame Id: ${e.videoGame.id}`),!1}}))},e.esportsFetch=function(e,t){return(0,i.mG)(this,void 0,void 0,(function*(){if((0,v.TF)(e))return null;try{const r=yield fetch(e,t);return r&&r.ok?r.json():void y.M0.sendAppErrorEvent(Object.assign(Object.assign({},s.bKC),{message:"Error while calling esports fetch.",pb:Object.assign(Object.assign({},s.bKC.pb),{fetchNetworkResponse:{statusCode:r.status,statusText:r.statusText,activityId:(0,d.Yq)().ActivityId,requestUrl:e,requestHeaders:JSON.stringify(t&&t.headers)},customMessage:`Error while calling esports fetch, URL: ${e}, responseMessage: ${JSON.stringify(r)}`})}))}catch(t){(0,a.OO)(t,s.bKC,"Error while calling esports fetch",`Url: ${e}`)}}))},e.postActionRequest=t,e.isEsportsUserGamer=function(){return(0,i.mG)(this,void 0,void 0,(function*(){const e=yield r({apiUrl:f.X.checkIfUserGamerUrl,ocid:f.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"GET",body:null,additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0}),t=e&&e.value&&e.value.length&&e.value.filter((e=>e.metadata&&e.metadata.score&&"Follow"===e.actionType&&Number(e.metadata.score)>=.2));let n="";const i=t&&t.some((e=>e.metadata.satoriId&&f.X.userGamerGames.includes(e.metadata.satoriId))),o=t&&t.some((e=>e.targetId&&"Y_xboxSpecialInterest"===e.targetId)),a=t&&t.some((e=>e.targetId&&"Y_windowsSpecialInterest"===e.targetId));return i&&(n=f.X.GamerUserType.Gamer),o&&(n&&(n+=";"),n+=f.X.GamerUserType.XboxGamer),a&&(n&&(n+=";"),n+=f.X.GamerUserType.PCGamer),n}))},e.postRewards=function(e){return(0,i.mG)(this,void 0,void 0,(function*(){const t=yield r({apiUrl:f.X.PostRewardsEventApiUrl,ocid:f.X.anaheimNtpFeedsOcid,addPageInfoToOcid:!1,appendCommonParams:!0,appendMarket:!1,method:"POST",body:{offerid:e},additionalHeaders:null,withRetries:!1,logErrorAsWarning:!0});return t&&t.value}))},e.fetchEsportsData=r,e.sendRequestWithRetries=x,e.setXboxXToken=T,e.setXboxTitleHubData=function(){return(0,i.mG)(this,void 0,void 0,(function*(){yield T();const e=(0,c.$o)().getObject(f.X.localStorageXboxTitleHubDataId);if(e&&e.timestamp){const t=((new Date).getTime()-new Date(e.timestamp).getTime())/1e3/60;if(Math.round(t)<30)return}yield S().then((e=>{if(!e)return null;const t={timestamp:new Date,games:e};(0,c.$o)().setObject(f.X.localStorageXboxTitleHubDataId,t)}))}))},e.fetchXboxTitleHubData=S,e.getXboxUserConsent=O}(n||(n={}))},66861:function(e,t,r){"use strict";r.d(t,{X:function(){return n}});var n,i=r(83227),o=r(53909);!function(e){let t,r,n,a;e.startggStreamBaseUrl="https://www.start.gg/game",e.hubBaseUrl="https://www.msn.com/{0}/esports",e.edgeForGamersOcid="e4gntp",e.interestServiceEndpoint="graph/actions",e.interestServiceOcid="Peregrine",e.gamingShorelineOcid="gaming-shoreline",e.anaheimNtpFeedsOcid="anaheim-ntp-feeds",e.dislikeAction="Dislike",e.bingImagePartnerId="uxf",e.thFallbackImage="hubstream_fallback.jpg",e.streamImagePlaceholderThId="OUWL.streamer_placeholder",e.actionMenuItemKeyNotInterested="notInterested",e.actionMenuItemKeyHideCard="hideCard",e.actionMenuItemKeyMoreSettings="moreSettings",e.esportsAppKey="LszQbGWEXeh76bQTAnx4q79cOFDP2WLYWpLDIpKfpJ",e.gamePlayEventCollectionUrl=`https://api.msn.com/sports/RecordGamePlayEvent?apikey=${e.esportsAppKey}&ocid=${e.gamingShorelineOcid}`,e.checkIfUserGamerUrl="https://api.msn.com/news/users/me/actions?actionType=Follow&domain=Sports&interestType=All",e.pdpUserSettingsUrl="https://api.msn.com/Msn/User",e.PostRewardsEventApiUrl="https://api.msn.com/sports/GamingPostRewardsEvent",e.getXboxUserTokenUrl="https://user.auth.xboxlive.com/user/authenticate",e.getXboxXTokenUrl="https://xsts.auth.xboxlive.com/xsts/authorize",e.xboxTitleHubUrlTemplate="https://titlehub.xboxlive.com/users/xuid({xuidValue})/titles/TitleRecord/decoration/image,productid,titlerecord",e.localStorageXboxXTokenId="xboxXTokenId",e.localStorageXboxTitleHubDataId="xboxTitleHubDataId",function(e){e._1x_1y="_1x_1y",e._1x_2y="_1x_2y",e._2x_2y="_2x_2y",e._1x_3y="_1x_3y",e._1x_4y="_1x_4y",e._3x_2y="_3x_2y",e._4x_2y="_4x_2y",e._5x_2y="_5x_2y"}(t=e.EsportsCardLayout||(e.EsportsCardLayout={})),function(e){e.ALL="All",e.APEXLEGEND="2781507b-9bd4-4c47-416f-d433779a2d6a",e.BRAWLHALLA="b1f5c13d-8516-a262-f45c-0fe77103db58",e.COD="ea104807-e8bd-68bf-a85b-c01c90fd5e18",e.COD_MODERN_WARFARE="873504a6-feb4-e8af-fe27-e46326e4b8be",e.CSGO="8f345aa7-ff29-2efd-48fd-8230fd8795aa",e.DOTA2="51b8bf37-fede-45d5-3943-fef79b0fa628",e.FIFA="4e3a60d9-f3ec-ad0f-82ab-472cd8d340a2",e.FORTNITE="13cbc36a-9316-174d-9f11-61ed80751dc8",e.FREEFIRE="4e01bfde-542a-46b7-8c3e-658af348176a",e.GEARS="d98409bb-18ff-541b-1ceb-1d1632e5442a",e.LOL="dcd754dc-9f53-0f8b-3bfc-9c401f16138b",e.MINECRAFT="a9646932-a188-6101-5549-da706613afa0",e.NBA="a3cac10a-d3a0-ac0e-0c04-e23c12a6b4b3",e.NFL="d15fca59-bf56-d81f-d64a-6f44c3bc6a03",e.OVERWATCH="c7762702-92e8-4ab9-87d5-4aac3f34a16c",e.PUBG="a002f1d4-ea2f-ea92-db95-ddeb4e8206f9",e.RAINBOWSIX="8d2a217f-dbef-13a0-708b-53618a35ab1c",e.ROBLOX="3312f0b2-0877-a9cf-aa03-547a861a96f3",e.ROCKETLEAGUE="b872778f-614c-a7ea-e82a-6c42c6c6ccb9",e.SMASH="8b505cf6-ee61-5e74-143b-6db3fc488f26",e.TEKKEN7="ff53a039-d7ac-8c35-39ab-0748e4c8825f",e.VALORANT="72d5fb42-ec96-44e0-ae93-2e1cfb2c1836",e.HALO="9fb23673-5160-bfc9-6234-f986b96819b2",e.WOW="a5c80c6b-1c83-2986-81b7-ca9d8465e940"}(r=e.Game||(e.Game={})),e.userGamerGames=[r.LOL,r.DOTA2,r.FORTNITE,r.VALORANT,r.APEXLEGEND,r.CSGO,r.COD_MODERN_WARFARE,r.ROCKETLEAGUE,r.OVERWATCH,r.WOW],e.csgo={id:r.CSGO,abbreviation:"csgo",thId:"OUWL.esportshub_gamelogo_CSGO"},e.cod={id:r.COD,abbreviation:"cod",thId:"OUWL.esportshub_gamelogo_callofduty"},e.dota2={id:r.DOTA2,abbreviation:"dota2",thId:"OUWL.esportshub_gamelogo_dota2"},e.fortnite={id:r.FORTNITE,abbreviation:"fortnite",thId:"OUWL.esportshub_gamelogo_Fortnite"},e.lol={id:r.LOL,abbreviation:"lol",thId:"OUWL.esportshub_gamelogo_leagueoflegends"},e.overwatch={id:r.OVERWATCH,abbreviation:"overwatch",thId:"OUWL.esportshub_gamelogo_overwatch"},e.pubg={id:r.PUBG,abbreviation:"pubg",thId:"OUWL.esportshub_gamelogo_pubg"},e.rainbowSix={id:r.RAINBOWSIX,abbreviation:"rainbowsix",thId:"OUWL.esportshub_gamelogo_rainboxsix"},e.rocketLeague={id:r.ROCKETLEAGUE,abbreviation:"rocketleague",thId:"OUWL.esportshub_gamelogo_rocketleague"},e.valorant={id:r.VALORANT,abbreviation:"valorant",thId:"OUWL.esportshub_gamelogo_valorant"},e.fifa={id:r.FIFA,abbreviation:"fifa",thId:"OUWL.esportshub_gamelogo_fifa"},e.gears={id:r.GEARS,abbreviation:"gears",thId:"OUWL.esportshub_gamelogo_gears5"},e.smashBros={id:r.SMASH,abbreviation:"smash",thId:"OUWL.esportshub_gamelogo_smashbros"},e.apexLegends={id:r.APEXLEGEND,abbreviation:"apexlegend",thId:"OUWL.esportshub_gamelogo_apex"},e.brawlhalla={id:r.BRAWLHALLA,abbreviation:"brawlhalla",thId:"OUWL.esportshub_gamelogo_brawlhalla"},e.minecraft={id:r.MINECRAFT,abbreviation:"minecraft",thId:"OUWL.esportshub_gamelogo_minecraft"},e.nba={id:r.NBA,abbreviation:"nba",thId:"OUWL.esportshub_gamelogo_nba"},e.roblox={id:r.ROBLOX,abbreviation:"roblox",thId:"OUWL.esportshub_gamelogo_roblox"},e.tekken7={id:r.TEKKEN7,abbreviation:"tekken7",thId:"OUWL.esportshub_gamelogo_tekken"},e.freeFire={id:r.FREEFIRE,abbreviation:"freefire",thId:"OUWL.esportshub_gamelogo_freefirte"},e.nfl={id:r.NFL,abbreviation:"nfl",thId:"OUWL.esportshub_gamelogo_madden"},e.halo={id:r.HALO,abbreviation:"halo",thId:"OUWL.esportshub_gamelogo_haloinfinite"},e.GameMap=new Map([[e.csgo.id,e.csgo],[e.lol.id,e.lol],[e.valorant.id,e.valorant],[e.fortnite.id,e.fortnite],[e.rocketLeague.id,e.rocketLeague],[e.csgo.id,e.csgo],[e.dota2.id,e.dota2],[e.overwatch.id,e.overwatch],[e.pubg.id,e.pubg],[e.cod.id,e.cod],[e.rainbowSix.id,e.rainbowSix],[e.fifa.id,e.fifa],[e.gears.id,e.gears],[e.smashBros.id,e.smashBros],[e.apexLegends.id,e.apexLegends],[e.freeFire.id,e.freeFire],[e.minecraft.id,e.minecraft],[e.roblox.id,e.roblox],[e.tekken7.id,e.tekken7],[e.nfl.id,e.nfl],[e.nba.id,e.nba],[e.brawlhalla.id,e.brawlhalla],[e.halo.id,e.halo]]),e.esportsTelemetryConstants={vertical:"esports",esportsCard:"esports_{cardtype}_card",header:"esports_{cardtype}_header",stream:"esports_{cardtype}_stream",game:"esports_{cardtype}_game",customization:"esports_{cardtype}_customization",moreSettings:"esports_{cardtype}_customization_moresettings",hideCard:"esports_{cardtype}customization_hidecard",notInterested:"esports_{cardtype}_customization_notinterested"},e.gamingTelemetryVertical="gaming",e.gamingTelemetryProviderType="publisher",e.gamingTelemetryAudienceMode="consumer",e.GamingExperienceTelemetryMap=new Map([[i.x.gamingCompeteCard,"GamingCompeteCard"],[i.x.gamingMediaCarousel,"GamingMediaCarousel"],[i.x.gamingPersonalizationCard,"GamingPersonalizeCTACard"],[i.x.gamingRecentlyPlayedCard,"GamingRecentlyPlayedCard"],[i.x.gamingRecommendedCard,"GamingRecommendedCard"],[i.x.gamingRedditCard,"GamingRedditCard"],[i.x.gamingRewardsCard,"GamingRewardsCard"],[i.x.gamingStreamCard,"GamingLiveStreamsCard"],[i.x.gamingTournamentCard,"GamingProTournamentsCard"],[i.x.gamingUpcomingCard,"GamingUpcomingGamesCard"],[i.x.gamingVideoCard,"GamingYoutubeCard"],[i.x.gamingMatchCard,"GamingProMatchesCard"],[i.x.casualGamesCard,"GamingCasualGamesCard"],[i.x.esportsCasualGamesCard,"GamingCasualGamesCard"]]),function(e){e.TitleLink="TitleLink",e.SubredditLink="SubredditLink",e.SingleEventLink="SingleEventLink",e.XboxPlayLink="XboxPlayLink",e.AchievementGuideLink="AchievementGuideLink",e.GameGuideLink="GameGuideLink",e.XCloudGameLink="XCloudGameLink",e.DiscoverLink="DiscoverLink",e.ConnectToXboxButton="ConnectToXboxButton",e.JoinButton="JoinButton",e.TermsButton="TermsButton",e.PrivacyButton="PrivacyButton",e.TournamentContentCard="TournamentContentCard",e.MatchContentCard="MatchContentCard",e.ContentCard="ContentCard",e.GameCarouselCard="GameCarouselCard",e.SeeMore="SeeMore",e.SeeAll="SeeAll",e.UpNextTab="UpNextTab",e.MyEventsTab="MyEventsTab",e.EventCard="EventCarouselCard",e.GamingCarousel="GamingCarousel",e.SequenceIndicator="SequenceIndicator",e.NextFlipper="NextFlipper",e.PreviousFlipper="PreviousFlipper",e.PaginationDot="PaginationDot",e.NewReleasesTab="NewReleasesTab",e.ComingSoonTab="ComingSoonTab",e.GamePassTab="GamePassTab",e.CarouselCard="CarouselCard",e.PersonalizeNowButton="PersonalizeNowButton",e.Header="Header",e.ActionButton="ActionButton",e.MoreSettings="MoreSettingsAction",e.MoreOptions="MoreOptionsAction",e.HideCard="HideCardAction",e.NotInterested="NotInterestedAction",e.HeadCard="HeadCard",e.genreMenuButton="genreMenuButton",e.genreMenuItem="genreMenuItem",e.genreCard="genreCard",e.CarouselHeaderLink="CarouselHeaderLink",e.CarouselHeaderIconLink="CarouselHeaderIconLink"}(n=e.GamingTelemetryComponent||(e.GamingTelemetryComponent={})),e.cardImageInfo={width:300,height:146,enableDpiScaling:!1,format:o.D3.PNG},e.cardImage1uInfo={width:300,height:304,enableDpiScaling:!1,format:o.D3.PNG},e.cardImage16_9Info={width:300,height:157,enableDpiScaling:!1,format:o.D3.PNG},e.timeIconThid="OUWL.gaming_time",e.timeIconSettings={width:12,height:12,enableDpiScaling:!1},e.viewsIconThid="OUWL.gaming_views",e.viewsIconSettings={width:12,height:8,enableDpiScaling:!1},e.youtubeIconThid="OUWL.gaming_youtube",e.twitchIconPurpleThid="OUWL.gaming_twitch_purple",e.twitchIconWhiteThid="OUWL.gaming_twitch_white",e.facebookgamingIconBlueThid="OUWL.gaming_facebookgaming_blue",e.facebookgamingIconWhiteThid="OUWL.gaming_facebookgaming_white",e.providerIconSettings={width:16,height:16,enableDpiScaling:!0},e.gameIconSettings={width:20,height:20,enableDpiScaling:!0},e.streamerIcon={width:32,height:32,enableDpiScaling:!0,format:o.D3.PNG},e.streamerIconLarge={width:60,height:60,enableDpiScaling:!0,format:o.D3.PNG},function(e){e.Gamer="IsGamer",e.XboxGamer="IsXboxGamer",e.PCGamer="IsPCGamer"}(a=e.GamerUserType||(e.GamerUserType={}))}(n||(n={}))},4936:function(e,t,r){"use strict";r.d(t,{At:function(){return f},I$:function(){return l},J_:function(){return g},Lj:function(){return m},tY:function(){return d},xx:function(){return p},zI:function(){return h}});var n=r(53909),i=r(16517),o=r(66861),a=r(76859),s=r(49088);const d=new Map([[a.Nv._1x_1y,o.X.EsportsCardLayout._1x_1y],[a.Nv._1x_2y,o.X.EsportsCardLayout._1x_2y],[a.Nv._2x_2y,o.X.EsportsCardLayout._2x_2y],[a.Nv._1x_3y,o.X.EsportsCardLayout._1x_3y],[a.Nv._1x_4y,o.X.EsportsCardLayout._1x_4y],[a.Nv._3x_2y,o.X.EsportsCardLayout._3x_2y],[a.Nv._4x_2y,o.X.EsportsCardLayout._4x_2y],[a.Nv._5x_2y,o.X.EsportsCardLayout._5x_2y]]);var c;!function(e){e.VideoGame="VideoGame",e.Streamer="Streamer",e.Stream="Stream"}(c||(c={}));function l(e){if(!e||0==e.length)return null;return e[Math.floor(Math.random()*e.length)]}const u=Math.ceil(4*Math.random())||4;function h(){return`ts${u}.cn.mm.bing.net/th`}function p(e,t,r=!1){if((0,s.T)(e))return r?(0,n.zz)(o.X.streamImagePlaceholderThId,t):null;let a=n.q3;return i.jG.IsChinaCompliance&&(a=h()),(0,n.mL)(`${a}?id=${e}&pid=${o.X.bingImagePartnerId}&rf=${o.X.thFallbackImage}`,t)}function g(e){let t=0;for(let r=0;r<e.length;r++)if("0"!==e.charAt(r)&&":"!==e.charAt(r)||r>=e.length-4){t=r;break}return e.substring(t)}function f(e){if(null==e||isNaN(e)||e<=0)return"";return g(new Date(1e3*e).toISOString().slice(11,19))}function m(e,t){if(!e.includes("?"))return"";const r=e.split("?")[1].split("&");for(let e=0;e<r.length;e++){const n=r[e];if(!n.includes("="))continue;const i=n.split("="),o=i[0],a=i[1];if(o==t)return a}return""}},58239:function(e,t,r){"use strict";r.d(t,{BR:function(){return l},cZ:function(){return s},q4:function(){return d},t6:function(){return c}});var n=r(38156),i=r(39860),o=r(60483),a=r(66861);const s=(e,t)=>{if(!t||!t.name)throw new Error("Invalid telemetry contract. Contract must include 'name' property.");return Object.assign(Object.assign(Object.assign({},h),t),{content:Object.assign(Object.assign({},h.content),t.content)})};function d(e){if(!e)return;return new o.D(e).getMetadataTag()}const c=(e,t,r)=>Object.assign(Object.assign({},u(e,r)),{ext:t}),l=(e,t)=>Object.assign(Object.assign({},e),{content:Object.assign(Object.assign({},e.content),t)}),u=(e,t)=>l(e,{id:null!=t?t:(0,i.GW)()}),h={content:{vertical:a.X.gamingTelemetryVertical,type:n.uH.StructuredData},type:n.c9.ActionButton}},49088:function(e,t,r){"use strict";function n(e){return!e||!function(e){if(!e)return e;if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}(e)}r.d(t,{T:function(){return n}})},76859:function(e,t,r){"use strict";r.d(t,{C7:function(){return a},Nv:function(){return n},OO:function(){return s},X9:function(){return d},sn:function(){return o}});var n,i=r(9791);!function(e){e._1x_1y="_1x_1y",e._1x_2y="_1x_2y",e._1x_3y="_1x_3y",e._1x_4y="_1x_4y",e._1x_5y="_1x_5y",e._2x_1y="_2x_1y",e._2x_2y="_2x_2y",e._2x_3y="_2x_3y",e._2x_4y="_2x_4y",e._2x_6y="_2x_6y",e._3x_1y="_3x_1y",e._3x_2y="_3x_2y",e._4x_1y="_4x_1y",e._4x_2y="_4x_2y",e._5x_1y="_5x_1y",e._5x_2y="_5x_2y"}(n||(n={}));const o=146,a=300,s=12,d=(0,i.Z)((e=>Array(e).fill(o)))},68384:function(e,t,r){"use strict";var n;r.d(t,{S:function(){return n}}),function(e){e.ClipCard="ClipCard",e.ConnectToXbox="ConnectToXbox",e.CasualGamesCard="CasualGamesCard",e.CompeteCard="CompeteCard",e.HighlightsCard="HighlightsCard",e.PersonalizationCard="PersonalizationCard",e.LivestreamCard="LivestreamCard",e.ProMatchesCard="ProMatchesCard",e.ProTournamentsCard="ProTournamentsCard",e.RecentlyPlayedCard="RecentlyPlayedCard",e.RecommendedCard="RecommendedCard",e.RecoVideoCard="RecoVideoCard",e.RedditCard="RedditCard",e.RewardsCard="RewardsCard",e.UpcomingGamesCard="UpcomingGamesCard",e.VideoCard="VideoCard"}(n||(n={}))},30113:function(e,t,r){"use strict";var n;r.d(t,{m:function(){return n}}),function(e){e.small="OneByOne",e.medium="OneByTwo",e.large="OneByThree"}(n||(n={}))},11708:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.AiCharacter="aicharacterCardEnabled",e.AutosMarketplaceCard="autosmarketplaceCardEnabled",e.HoroscopeCard="horoscopeCardEnabled",e.WeatherCard="weatherCardEnabled",e.SportsCard="sportsCardEnabled",e.MoneyCard="moneyCardEnabled",e.FinanceCard="financeCardEnabled",e.OnThisDayCard="onthisdayCardEnabled",e.ShoppingCard="shoppingCardEnabled",e.ShoppingEventCard="eventSDCardShoppingEnabled",e.TrafficCard="trafficCardEnabled",e.EsportsCard="esportsCardEnabled",e.EsportsStreamsCard="esportsStreamsCardEnabled",e.ElectionsCard="genericelectionCardEnabled",e.LotteryCard="lotteryCardEnabled",e.QnaCard="qnaCardEnabled",e.RecipesCard="recipeCardEnabled",e.InspirationCard="inspirationCardEnabled",e.TravelCard="travelCardEnabled",e.HealthCard="healthCardEnabled",e.TopStoriesCard="topstoriesCardEnabled",e.TrendingTopics="TrendingTopicsUpsellEnabled",e.LocalGuideCard="localGuideCardEnabled",e.GroceryCard="groceryCardEnabled",e.RewardsCard="rewardsCardEnabled",e.RecommendedSearchesCard="recommendedSearchesCardEnabled",e.PersonalizedOffersCard="personalizedoffersCardEnabled",e.PollsCard="pollsCardEnabled",e.MarketPlaceCard="marketplaceCardEnabled",e.QuizCard="quizCardEnabled",e.CasualGamesCard="esportsCardEnabled",e.CommuteCard="commuteCardEnabled",e.Crypto="CryptoCard",e.MarketBrief="MarketBriefCard"}(n||(n={}))},83152:function(e,t,r){"use strict";var n;r.d(t,{L:function(){return n}}),function(e){e.Location="Location",e.Weather="Weather",e.Finance="Finance",e.Team="Team",e.League="League",e.Player="Player",e.Traffic="Traffic",e.Widget="Widget",e.TopicFeed="TopicFeed"}(n||(n={}))},791:function(e,t,r){"use strict";r.d(t,{N:function(){return b}});var n=r(33940),i=r(33954),o=r(26415),a=r(68364),s=r(33799),d=r(16517),c=r(94788),l=r(67267),u=r(63535),h=r(87298),p=r(83152),g=r(11708),f=r(30113),m=r(65135),y=r(33379),v=r(51671);const b=new class extends class{constructor(e){this.fetchImpl=e,this.userUpdateEndpoint="msn/user",this.pdpServiceEndpoint="graph/actions",this.locationsServiceEndPoint="v1/news/users/me/locations",this.userActionServiceEndPoint="news/users/me/actions",this.ocid="Peregrine",this.ocidOverride=!1}getUserDefaultLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"GET",headers:yield l.$.getOneServiceHeaders(),credentials:"include"},r=(0,u.PH)(this.locationsServiceEndPoint);let i;[...l.$.getCommonParams2(this.ocid,!this.ocidOverride),{key:"autodetect",value:e&&`${e}`}].forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{i=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(r.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: getUserDefaultLocation}`;throw new Error(t)}return e}))),"getUserDefaultLocation")}catch(e){return i}return i}))}addToFavoriteLocation(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const r="Location",i="Follow",o={method:"POST",body:JSON.stringify({actionType:i,targetType:r,definitionName:t,degree:"FavoriteLocation",metaData:e}),headers:yield l.$.getOneServiceHeaders(),credentials:"include"},a=(0,u.PH)(this.pdpServiceEndpoint);let c;((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&a.searchParams.set(e.key,e.value)}));try{c=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: Location`;throw new Error(t)}return e.json()}))),"addToFavoriteLocation")}catch(e){return!1}return!0}))}removeFavoriteLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}removeLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}updatePdpHomeLocation(e,t,r={},i){return(0,n.mG)(this,void 0,void 0,(function*(){const o=p.L.Location,a="Follow",c=yield this.getRequestInit({method:"POST"},r);c.body=JSON.stringify({actionType:a,targetType:o,definitionName:t,degree:"DefaultLocation",metaData:e});const g=(0,u.PH)(this.pdpServiceEndpoint);return((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)})),yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${o}`;throw new Error(t)}return e}))),"setPdpHomeLocation"),this.tryInvalidateBulkFetchedPdpTargetType(o),!0}))}updateTrafficMyRoutes(e,t,r,o,a,s){return(0,n.mG)(this,void 0,void 0,(function*(){const d=r.replace(/[^a-zA-Z0-9\-.,_]/g,""),c=p.L.Traffic,u="Follow",g={method:"POST",body:JSON.stringify({actionType:u,targetType:c,targetId:d,degree:e,definitionName:t,metadata:o,createdDateTime:s}),headers:yield l.$.getOneServiceHeaders(),credentials:"include"},f=yield this.getTrafficPdpUrl(null,null,a);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(f.href,g);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${c}`;throw new Error(t)}return e.json()}))),"updateTrafficMyRoutes");this.tryInvalidateBulkFetchedPdpTargetType(c)}catch(e){return i.k.logError(e.message),!1}return!0}))}deleteTrafficMyRoutes(e,t,r){return(0,n.mG)(this,void 0,void 0,(function*(){const i={method:"DELETE",headers:yield this.getOneserviceHeaders(),credentials:"include"},o=yield this.getTrafficPdpUrl(e,t,r);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"deleteTrafficFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Traffic)}catch(e){return!1}return!0}))}getTrafficMyRoutes(e,t){var r;return(0,n.mG)(this,void 0,void 0,(function*(){const i={method:"GET",headers:yield this.getOneserviceHeaders(),credentials:"include"},o=yield this.getTrafficPdpUrl(e,null,t);try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(o.href,i);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"getTrafficFromPdp");return null===(r=yield e.json())||void 0===r?void 0:r.value}catch(e){return null}}))}getTrafficPdpUrl(e,t,r){return(0,n.mG)(this,void 0,void 0,(function*(){const n=(0,u.PH)(this.pdpServiceEndpoint),i=(yield(0,v.XJ)())===s.Hy.SignedIn,o=(0,d.Yq)().UserId,a=i?l.$.getOneServiceParamsWithAuth(o,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(o,this.ocid,!this.ocidOverride);if(e||t){const r=`targetType eq '${p.L.Traffic}'`,i=e?`degree eq '${e}'`:"",o=t?`definitionName eq '${t}'`:"";n.searchParams.set("$filter",`actionType eq 'Follow' and (${r})${i?` and (${i})`:""}${o?` and (${o})`:""}`)}return[...a,...r||[]].forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)})),n}))}addToWatchList(e,t=0,r={},i={}){return(0,n.mG)(this,void 0,void 0,(function*(){const o=p.L.Finance,a="Follow",c={method:"POST",body:JSON.stringify({actionType:a,targetType:o,targetId:e,metadata:Object.assign({securityType:t,tickerId:this.generateUUID()},i)}),headers:yield this.getOneserviceHeaders(r),credentials:"include"},g=(0,u.PH)(this.pdpServiceEndpoint),f="zh-cn"!==(0,d.Yq)().CurrentMarket;let m;((yield(0,v.XJ)())===s.Hy.SignedIn&&f?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)}));try{m=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${o}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(o)}catch(e){return!1}return!0}))}addListToWatchList(e,t={},r={}){return(0,n.mG)(this,void 0,void 0,(function*(){const i=p.L.Finance,o="Follow",a={method:"POST",body:JSON.stringify(e.map((e=>({actionType:o,targetType:i,targetId:e.key,metadata:Object.assign({securityType:e.value,tickerId:this.generateUUID()},r)})))),headers:yield this.getOneserviceHeaders(t),credentials:"include"},c=(0,u.PH)(this.pdpServiceEndpoint),g="zh-cn"!==(0,d.Yq)().CurrentMarket;let f;((yield(0,v.XJ)())===s.Hy.SignedIn&&g?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));try{f=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(c.href,a);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${i}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(i)}catch(e){return!1}return!0}))}generateUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)}))}sortWatchList(e,t={}){var r;return(0,n.mG)(this,void 0,void 0,(function*(){const i=p.L.Finance,o="Follow",a=yield b.readPdpWithTargetType(p.L.Finance,!0,200,t),c=a&&(null===(r=a.value)||void 0===r?void 0:r.filter((e=>e.actionType===o&&e.targetId)));if(!c||c.length<e.length)return!1;const g={};let f=e.length;c.forEach((t=>{let r=e.findIndex((e=>e===t.targetId));r<0&&(r=f,f++),g[t.targetId]=JSON.stringify({actionType:o,targetId:t.targetId,targetType:i,rank:r,metadata:t.metadata})}));const m={method:"PUT",body:JSON.stringify(g),headers:yield this.getOneserviceHeaders(t),credentials:"include"},y=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&y.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(y.href,m);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${i}`;throw new Error(t)}return e.json()}))),"sortWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Finance)}catch(e){return!1}return!0}))}updateWeatherInterests(e,t,r,o={},a){return(0,n.mG)(this,void 0,void 0,(function*(){const t=p.L.Weather,n={method:"POST",body:JSON.stringify({actionType:"Follow",targetType:t,targetId:e,metadata:{UserAction:{0:{UpdateTime:new Date,Location:r}}}}),headers:yield this.getOneserviceHeaders(o),credentials:"include"},c=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=a?a:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=a?a:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&c.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(c.href,n);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather interests call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}))}updateWeatherSettings(e,t,r={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!t)return!0;let n="";n=e&&!t?'{"weatherDisplayUnit":"'+e+'"}':!e&&t?'{"userSettings":{"weatherLocationSettingMode":"'+t+'"}}':'{"weatherDisplayUnit":"'+e+'","userSettings":{"weatherLocationSettingMode":"'+t+'"}}';const o=yield this.getRequestInit({method:"POST"},r);o.body=n;const a=(0,u.PH)(this.userUpdateEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&a.searchParams.set(e.key,e.value)}));const c=yield this.fetchImpl(a.href,o);if(c.status>=400){const e=`OneService returned error response. Status: ${c.status} for update weather setting call`;throw new Error(e)}return!0}))}updateFinanceInterests(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const t={financeInterests:e},r=JSON.stringify(t),n=yield this.getRequestInit({method:"POST"});n.body=r;const i=(0,u.PH)(this.userUpdateEndpoint),o="zh-cn"!==(0,d.Yq)().CurrentMarket;((yield(0,v.XJ)())===s.Hy.SignedIn&&o?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));const a=yield this.fetchImpl(i.href,n);if(a.status>=400){const e=`OneService returned error response. Status: ${a.status} for update finance interests call`;throw new Error(e)}return!0}))}updateUserSettings(e,t={},r){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!0;const n=[];let o;for(o in e)null!=e[o]&&n.push('"'+o+'": '+JSON.stringify(e[o]));const a='{"userSettings":{'+n.join(", ")+"}}",c=yield this.getRequestInit({method:"POST"},t);c.body=a;const h=(0,u.PH)(this.userUpdateEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(null!=r?r:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(null!=r?r:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&h.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(h.href,c);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather setting call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}))}getPdpUserPreference(e,t={},r){return(0,n.mG)(this,void 0,void 0,(function*(){const o=yield this.getRequestInit({method:"GET"},t),a=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth(r||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth(r||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&a.searchParams.set(e.key,e.value)}));try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}))),"readPDPData");if(!e.ok&&404!=e.status)throw Error(`code=${e.status}, ${e.statusText}`);return Object.assign(Object.assign({},yield e.json()),{is404:404==e.status})}catch(t){if(i.k.logError(t.message),e)throw Error(t.message);return null}}))}updatePdpLayoutPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"PUT",credentials:"include",body:JSON.stringify({dummyid:{userLayoutPreference:e}})},r=(0,u.PH)(this.userUpdateEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(r.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update layout preference setting call`;throw new Error(t)}}catch(e){return i.k.logError(e.message),!1}return!0}))}updateSegmentCardsEnableStatus(e,t=null){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const r=[];if(t){let e;for(e in t)null!=t[e]&&r.push('"'+e+'": '+JSON.stringify(t[e]))}const n=e.map((e=>e.cardType!=g.f.TopStoriesCard?`\\"${e.cardType}\\":${e.enabled?'\\"1\\"':'\\"0\\"'}`:"")).join(","),i=r.length>0?'{"segmentCardSettings":"{'+n+'}","userSettings":{'+r.join(", ")+"}}":'{"segmentCardSettings":"{'+n+'}"}';return this.updateUserPreference(i)}))}updateProductivityCardsEnableStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t=`{userSettings:{enterpriseCardsEnabled:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}))}updateGamingCardsEnableStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t=`{userSettings:{gamingCards:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}))}updateCommunitySettingsOptOutStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t={};e.forEach((e=>{t[e.settingType]=e.optedOut?"1":"0"}));const r={communitySettings:t};return this.updateUserPreference(JSON.stringify(r))}))}updateWidgetSettings(e,t={},r){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const n=e.map((e=>({actionType:"Follow",targetId:e.cardType,targetType:p.L.Widget,metadata:{prongsv2:{region:e.region,size:f.m[e.size],position:e.position}}})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:r})}))}muteWidget(e,t={},r){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e||!e.length)return!1;const n=e.map((e=>({actionType:"Mute",targetId:e,targetType:p.L.Widget})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:r})}))}disableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const r={actionType:"Disabled",definitionName:e,targetType:p.L.TopicFeed};return this.sendGenericActionRequest({endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(r),appError:t})}))}enableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!e&&(yield this.deleteFromPdp(p.L.TopicFeed,"definitionName",[e],{},void 0,"Disabled",t))}))}sendGenericActionRequest(e){return(0,n.mG)(this,void 0,void 0,(function*(){const{additionalHeaders:t,additionalParams:r,endpoint:i,method:o,payload:a,appError:c}=e;if(!i||!o)return this.logError(new Error("Missing arguments: 'endpoint' and 'method' should be provided and valid"),c),!1;const p=(0,u.PH)(i);let g;((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)})),r&&r.forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)}));try{JSON.parse(a),g=a}catch(e){g=JSON.stringify(a)}const f={method:o,body:g,headers:yield this.getOneserviceHeaders(t),credentials:"include"},m="GET"==o;try{return yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(p.href,f);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for payload: ${a}`;throw new Error(t)}return!m||(yield e.json())}))),"sendActions")}catch(e){return this.logError(e,c),!1}}))}getUserActions(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=[{key:"actionType",value:e}],r=yield this.sendGenericActionRequest({additionalParams:t,endpoint:this.userActionServiceEndPoint,method:"GET"});return r&&r.value}))}setUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!(yield this.sendGenericActionRequest({endpoint:this.userActionServiceEndPoint,method:"POST",payload:Object.assign({actionType:e},t)}))}))}deleteUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const r=[{key:"actionType",value:e},{key:"targetId",value:t.targetId},{key:"definitionName",value:t.definitionName}];return!!(yield this.sendGenericActionRequest({additionalParams:r,endpoint:this.userActionServiceEndPoint,method:"DELETE"}))}))}updateUserPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.getRequestInit({method:"POST"});t.body=e;const r=(0,u.PH)(this.userUpdateEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{const n=yield this.fetchImpl(r.href,t);if(n.status>=400){const t=`OneService returned error response while updating user preference. Status: ${n.status}, payload: ${e}`;throw new Error(t)}}catch(e){return!1}return!0}))}setPdpTargetTypesForBulkLoad(e){e&&e.length&&!this.bulkGraphActionTargetTypes&&(this.bulkGraphActionTargetTypes=e)}readPdpWithTargetType(e,t=!1,r,i={},a=!0,s=[]){return(0,n.mG)(this,void 0,void 0,(function*(){if(a){const t=yield this.getFromWebWorker(e);if(t)return t}if(this.bulkGraphActionTargetTypes&&this.bulkGraphActionTargetTypes.length)if(this.bulkGraphActionTargetTypes.indexOf(e)>=0){this.bulkGraphActionResultCache=this.bulkGraphActionResultCache||(yield this.bulkGraphActionPromise||(this.bulkGraphActionPromise=this.fetchPdpWithTargetTypes(this.bulkGraphActionTargetTypes,t,r,i,s)));const n=this.bulkGraphActionResultCache.get(e);if(n)return{value:n}}else m.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.srQ),{message:`Received an unknown target type "${e}" that was not in the bulk graph action target types list "${this.bulkGraphActionTargetTypes}". Falling back to new network call. Please update the EntryPoint config's "graphActionsToBulkLoad" property to include this type.`}));const n=(yield this.fetchPdpWithTargetTypes([e],t,r,i,s)).get(e);if(n)return{value:n}}))}deleteFromPdp(e,t,r,i={},o,a="Follow",c,p=[]){return(0,n.mG)(this,void 0,void 0,(function*(){const g={method:"DELETE",headers:yield this.getOneserviceHeaders(i),credentials:"include"},f=(0,u.PH)(this.pdpServiceEndpoint),y=(yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride),b=`targetType eq '${e}'`,w=r.map((e=>`${t} eq '${e}'`)).join(" or ");let C=`actionType eq '${a}' and (${w}) and (${b})`;o&&(C+=` and (degree eq '${o}')`),f.searchParams.set("$filter",C),[...y,...p].forEach((e=>{e.value&&f.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.fetchImpl(f.href,g);if(t.status>=400){const r=`OneService returned error response. Status: ${t.status} for actionType: ${a}, targetType: ${e}`;throw new Error(r)}return t}))),"deleteFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(e)}catch(e){return c&&m.M0.sendAppErrorEvent(Object.assign(Object.assign({},c),{pb:Object.assign(Object.assign({},c.pb),{actionType:a,error:e.message})})),!1}return!0}))}tryInvalidateBulkFetchedPdpTargetType(e){this.bulkGraphActionResultCache&&this.bulkGraphActionResultCache.delete(e)}fetchPdpWithTargetTypes(e,t=!1,r,i={},o=[]){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e.length)return new Map;const a=e.map((e=>`targetType eq '${e}'`)).join(" or "),c=[{key:"$top",value:`${r=r||10*e.length*2}`},{key:"$filter",value:`actionType eq 'Follow' and (${a})`}],p=yield this.getRequestInit({method:"GET"},i);!0===t&&(p.cache="no-store");const g=(0,u.PH)(this.pdpServiceEndpoint);[...c,...(yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride),...o].forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)}));const f=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,p);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}))),"readPDPData");if(!f.ok)throw Error(`code=${f.status}, ${f.statusText}`);const m=new Map,y=yield f.json();if(!y)return m;if(y.value)for(const e of y.value){let t=m.get(e.targetType);t||m.set(e.targetType,t=[]),t.push(e)}for(const t of e)m.get(t)||m.set(t,[]);return m}))}updateMarketPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"POST",credentials:"include",body:JSON.stringify({userSettings:{preferredMarket:e}})},r=(0,u.PH)(this.userUpdateEndpoint);((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(r.href,t);if(!e.ok)throw new Error(`Failed to update market preference: Status: ${e.status}`);return!0}catch(e){return i.k.logError(e.message),!1}}))}getFromWebWorker(e){return(0,n.mG)(this,void 0,void 0,(function*(){let t=null;if(c.yb){const r=this.maptoWebWorkerId(e);if(r&&r.trim()){const r=yield(0,c.ot)({id:this.maptoWebWorkerId(e)});r.fetched&&(t=r.payload)}}return t}))}maptoWebWorkerId(e){switch(e){case p.L.Location:return"weatherpdp";case p.L.League:return"sportsleaguepdp";case p.L.Player:return"sportsplayerpdp";case p.L.Team:return"sportsteampdp";case p.L.Finance:return"moneypdp";default:return""}}getRequestInit(e={method:"GET"},t={}){return(0,n.mG)(this,void 0,void 0,(function*(){const r=yield l.$.getOneServiceHeaders();return e.headers=Object.assign(Object.assign({},r),t),e.credentials="include",e}))}getOneserviceHeaders(e={}){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield l.$.getOneServiceHeaders();return Object.assign(Object.assign({},t),e)}))}getFollowedLists(){return(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.getRequestInit({method:"GET"}),t=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&t.searchParams.set(e.key,e.value)}));try{const r=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const r=yield this.fetchImpl(t.href,e);if(!r.ok){if(r.status>=400&&r.status<500&&408!=r.status)return r;(0,a.OO)(null,o.G9t,"Error get followed list")}return r}))),"getFollowedLists");return r.ok||(0,a.OO)(null,o.G9t,"Error get followed list"),yield r.json()}catch(e){return i.k.logError(e.message),null}}))}addToFollowedLists(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=p.L.Finance,r={method:"POST",body:JSON.stringify({financeListIds:e}),headers:yield l.$.getOneServiceHeaders(),credentials:"include"},i=(0,u.PH)(this.userUpdateEndpoint);let o;((yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{o=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(i.href,r);if(e.status>=400){const r=`OneService returned error response. Status: ${e.status} for actionType: FollowList, targetType: ${t}`;throw new Error(r)}return e.json()}))),"addToFollowedLists")}catch(e){return!1}return!0}))}deleteFromFollowedLists(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=p.L.Finance,r={method:"DELETE",body:null,headers:yield l.$.getOneServiceHeaders(),credentials:"include"},i=(0,u.PH)(this.userUpdateEndpoint);let o;[...(yield(0,v.XJ)())===s.Hy.SignedIn?l.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):l.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride),...[{key:"financeListIds",value:e.toString()}]].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{o=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(i.href,r);if(e.status>=400){const r=`OneService returned error response. Status: ${e.status} for actionType: UnFollowList, targetType: ${t}`;throw new Error(r)}return e.json()}))),"deleteFromFollowedLists")}catch(e){return!1}return!0}))}logError(e,t){t?m.M0.sendAppErrorEvent(Object.assign(Object.assign({},t),{pb:Object.assign(Object.assign({},t.pb),{error:e.message})})):i.k.logError(e.message)}}{constructor(){super((0,y.N)()?window.fetch.bind(window):fetch),"windowsNewsPlus"===d.jG.AppType||"newsAndInterests"===d.jG.AppType||"winWidgets"===d.jG.AppType?(this.ocid="winp2",this.ocidOverride=!0):"sharedWidgets"===d.jG.AppType?(this.ocid="hpwidget",this.ocidOverride=!0):"windowsNewsbar"===d.jG.AppType?(this.ocid="winp0dash",this.ocidOverride=!0):"travel"===d.jG.AppType?(this.ocid="travel-verthp-feeds",this.ocidOverride=!0):"gaming"===d.jG.AppType&&(this.ocid="startgg-feeds",this.ocidOverride=!0)}}},96345:function(e,t,r){"use strict";r.d(t,{$x:function(){return o},Ef:function(){return d},Ei:function(){return h},FM:function(){return s},SP:function(){return p},_k:function(){return u},_u:function(){return a},c6:function(){return f},dP:function(){return y},gR:function(){return l},o9:function(){return c},pQ:function(){return m},v_:function(){return g}});var n=r(17157);function i(e,t){(0,n.dw)("navigate",e,t)}function o(e){return new Promise(((t,r)=>{i(e,(e=>{t(e)}))}))}function a(e,t){i(e,t)}function s(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("getHttp",e,t)}(e,(e=>{t(e)}))}))}function d(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("postHttp",e,t)}(e,(e=>{t(e)}))}))}function c(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("deleteHttp",e,t)}(e,(e=>{t(e)}))}))}function l(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("logEvent",e,t)}(e,(e=>{t(e)}))}))}function u(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("logError",e,t)}(e,(e=>{t(e)}))}))}function h(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("getDeviceInfo",e,t)}(e,(e=>{t(e)}))}))}function p(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("getLocationInfo",e,t)}(e,(e=>{t(e)}))}))}function g(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("getNetworkInfo",e,t)}(e,(e=>{t(e)}))}))}function f(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("getUserInfo",e,t)}(e,(e=>{t(e)}))}))}function m(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("requestSnackBar",e,t)}(e,(e=>{t(e)}))}))}function y(e){return new Promise(((t,r)=>{!function(e,t){(0,n.dw)("requestCustom",e,t)}(e,(e=>{t(e)}))}))}},17157:function(e,t,r){"use strict";r.d(t,{dw:function(){return s},wq:function(){return i}});r(83648);const n={};function i(){var e,t,r,n;const i=null===(e=window.sapphireWebViewBridge)||void 0===e?void 0:e.send,o=null===(n=null===(r=null===(t=window.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===r?void 0:r.send)||void 0===n?void 0:n.postMessage;return i||o}let o;function a(e,t){var r,n,i,a,s,d,c;console.log(e,t);const l="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),u={scenario:e,data:{data:t},id:l};o&&!u.data.data.appId&&(u.data.data.appId=o);const h=JSON.stringify(u);return(null===(i=null===(n=null===(r=window.webkit)||void 0===r?void 0:r.messageHandlers)||void 0===n?void 0:n.send)||void 0===i?void 0:i.postMessage)&&(null===(d=null===(s=null===(a=window.webkit)||void 0===a?void 0:a.messageHandlers)||void 0===s?void 0:s.send)||void 0===d||d.postMessage(h)),(null===(c=window.sapphireWebViewBridge)||void 0===c?void 0:c.send)&&window.sapphireWebViewBridge.send(h),l}function s(e,t,r){const i=a(e,t);r&&function(e,t){n[e]?n[e].push(t):n[e]=[t]}(i,r)}},59207:function(e,t,r){"use strict";r.d(t,{hP:function(){return v},_4:function(){return y}});var n,i=r(33940);!function(e){e.Android="Android",e.iOS="iOS"}(n||(n={}));var o=r(96345),a=r(54433),s=r(9344),d=r(58155);let c,l,u,h,p,g,f;const m={};function y(){return h}function v(e){return(0,i.mG)(this,void 0,void 0,(function*(){if(c.isSignedIn&&"AAD"===c.accountType){const e=yield(0,o.c6)({refresh:!0,accountType:"AAD"});try{const t=JSON.parse(e);if(t.accessToken&&t.accessToken.length>0)return`Bearer ${t.accessToken}`}catch(e){w(e,"SapphireUserConfig.getAccessToken: Failed to parse AAD access token")}}if(c.isSignedIn&&"MSA"===c.accountType){const t=yield(0,o.c6)({refresh:!0,accountType:"MSA",type:"AccessToken",scope:e});try{const e=JSON.parse(t);if(e.succeed)return e.accessToken}catch(e){w(e,"SapphireUserConfig.getAccessToken: Failed to parse MSA access token")}}return null}))}function b(){return(0,i.mG)(this,void 0,void 0,(function*(){const e=yield(0,o.Ei)({});try{return JSON.parse(e)}catch(e){w(e,"SapphireUserConfig.getDeviceInformation: Failed to parse response")}}))}function w(e,t){(0,o._k)({type:"Failure",name:"HP_WEBVIEW_APP_ERROR",error:t,data:{error:e,customMessage:t}})}function C(e){if(!e)return"en-us";const t=e.toLowerCase();return"en-id"===t?"en-xl":t}function x(e){"ru-ru"===e.market&&e.detectedCountry&&"RU"!==e.detectedCountry&&(e.market="en-xl");const t=e.market.split("-");t&&2==t.length&&(e.language=t[0],e.countryCode=t[1])}function T(e,t){m[t]||(m[t]=function(e){const t={},r=function(e,t=!1){if(!e)return null;return function(e,t=!1){const r=[];e&&e.startsWith("?")&&(e=e.substring(1));if(e){const n=(e=e.split("#")[0]).split("&");for(let e=0;e<n.length;e++){const i=n[e].split("=");let o=i[0],s=i[1];t&&(o=S(o),s&&(s=S(s)));const d={key:o,value:s},c=(0,a.Z)(r,(e=>e.key===d.key));-1===c?r.push(d):r[c]=d}}return r}((e||"").split("?")[1],t)}(e,!0);r&&r.length&&r.forEach((e=>t[e.key]=e.value));return t}(t));const r=m[t][e];return void 0!==r?r:null}function S(e){return e=e.replace(/\+/g," "),e=decodeURIComponent(e)}function O(){return w(new Error("SapphireUserConfig.uuidv4: Recieved empty activityId"),"Empty activityId"),"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toS