1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7161],{47161:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y});var a,i=n(32037),s=n(24161),r=n(85316),l=n(16916);let o=(0,n(48641).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var c=n(1273),p=n(45674),d=["title","titleId"];function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let h=function(e){var t=e.title,n=e.titleId,i=function(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)n=s[a],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,d);return s.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",width:"1em",height:"1em","aria-labelledby":n},i),t?s.createElement("title",{id:n},t):null,a||(a=s.createElement("path",{fill:"#195BFF",d:"m13.993 13.46-.958-5.43h.324c.26 0 .47-.206.47-.461V4.157a.465.465 0 0 0-.47-.462H8.915V.462A.465.465 0 0 0 8.445 0h-2.89c-.26 0-.47.206-.47.462v3.233H.641c-.26 0-.47.207-.47.462V7.57c0 .255.21.461.47.461h.324l-.958 5.43A.465.465 0 0 0 .47 14H13.53a.46.46 0 0 0 .463-.54M1.436 4.94H6.35V1.243h1.3v3.695h4.914v1.848H1.436zm8.454 7.816V9.985a.144.144 0 0 0-.144-.142h-.867a.144.144 0 0 0-.145.142v2.771H5.266V9.985a.144.144 0 0 0-.145-.142h-.867a.144.144 0 0 0-.144.142v2.771H1.414l.815-4.619h9.54l.815 4.62z"})))};var _=n(6427),f=n(40923),v=n(67951),m=n(68051),w=n(35426),g=n(52683),b=n.n(g);function x(e){let t=Array.from(e.children),n=t.findIndex(t=>t.offsetTop+t.offsetHeight>e.scrollTop),a=[...t.slice(n),...t.slice(0,n).reverse()];return{atBottom:e.scrollHeight-e.clientHeight-e.scrollTop<=2,anchors:a.map(t=>({id:t.dataset.eventId,offset:t.offsetTop-e.scrollTop}))}}function y(e){let{notices:t,onDismiss:n,onClear:a}
1=e,l=(0,c.c)("webPush.inApp"),{track:o}=(0,v.s)(),d=(0,p.cB)({updateInterval:6e4}),[u,_]=(0,s.useState)(!1),[m,w]=(0,s.useState)(),[g,y]=(0,s.useState)(()=>new Set),N=(0,s.useRef)(new Map),k=(0,s.useRef)(null),S=(0,s.useRef)(!1),T=(0,s.useRef)(!1),E=(0,s.useRef)({atBottom:!0,anchors:[]}),I=t.length>1,O=u?[...t].reverse():t.slice(0,1),C=(0,s.useCallback)(e=>{var a,i;N.current.has(e)||(e===(null==(a=t[0])?void 0:a.event_id)&&w(null==(i=t[1])?void 0:i.event_id),y(t=>new Set(t).add(e)),N.current.set(e,window.setTimeout(()=>{N.current.delete(e),y(t=>{let n=new Set(t);return n.delete(e),n}),n(e)},320)))},[t,n]),H=(0,s.useCallback)(()=>{for(let e of N.current.values())window.clearTimeout(e);N.current.clear(),y(new Set),a()},[a]),A=(0,s.useCallback)(e=>{var a,i;let s=e.event_id,r=N.current.get(s);void 0!==r&&(window.clearTimeout(r),N.current.delete(s),y(e=>{let t=new Set(e);return t.delete(s),t})),s===(null==(a=t[0])?void 0:a.event_id)&&w(null==(i=t[1])?void 0:i.event_id),n(s),o(f.R2.IN_APP_NOTICE_CLICK,{push_event_id:s,content_id:e.id,content_type:e.type,title:e.title,occurred_at:new Date().toISOString(),notification_surface:"in_app"})},[t,n,o]);return(0,s.useEffect)(()=>()=>{for(let e of N.current.values())window.clearTimeout(e);N.current.clear()},[]),(0,s.useEffect)(()=>{I&&S.current&&_(!0)},[I]),(0,s.useLayoutEffect)(()=>{let e=k.current;if(u&&e){let t=E.current;if(!T.current||t.atBottom)e.scrollTop=e.scrollHeight;else{let n=new Map(Array.from(e.children,e=>[e.dataset.eventId,e]));for(let a of t.anchors){let t=n.get(a.id);if(t){e.scrollTop=t.offsetTop-a.offset;break}}}E.current=x(e)}T.current=u},[u,t]),(0,r.createPortal)((0,i.jsxs)("div",{className:b().root,children:[u&&(0,i.jsx)("div",{className:b().overlay,onClick:()=>_(!1),"aria-hidden":!0}),(0,i.jsxs)("section",{className:b().region,"data-expanded":u,"data-stacked":!u&&I,"data-count":Math.min(t.length,3),"aria-label":l("label"),onMouseEnter:()=>{S.current=!0,I&&_(!0)},onMouseLeave:()=>{S.current=!1,_(!1)},onFocus:()=>{I&&_(!0)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||_(!1)},onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),_(!1))},children:[(0,i.jsx)("div",{"data-auto-scrollbar":!0,ref:k,className:"".concat(b().list," scrollbar-thin"),tabIndex:u?0:-1,"aria-label":l("label"),onScroll:e=>{u&&(E.current=x(e.currentTarget))},children:O.map(e=>(0,i.jsx)(j,{notice:e,now:d,promoted:e.event_id===m,dismissing:g.has(e.event_id),onDismiss:C,onOpen:A},e.event_id))}),u&&(0,i.jsxs)("button",{type:"button",className:b().clear,onClick:H,children:[(0,i.jsx)(h,{width:14,height:14,"aria-hidden":!0}),l("clear")]})]})]}),document.body)}function j(e){let{notice:t,now:n,promoted:a,dismissing:s,onDismiss:r,onOpen:p}=e,d=(0,c.c)("webPush.inApp"),u=(0,c.k)(),h=t.published_at?Date.parse(t.published_at):NaN,f=Number.isFinite(h)?h:t.received_at;return(0,i.jsxs)("article",{className:b().card,"data-event-id":t.event_id,"data-promoted":a,"data-dismissing":s,children:[(0,i.jsxs)("div",{className:b().heading,children:[(0,i.jsx)("span",{className:b().dot,"aria-hidden":!0}),(0,i.jsx)("span",{children:d("newsflash"===t.type?"newsflash":"article")}),(0,i.jsxs)("span",{className:b().live,children:[(0,i.jsx)("span",{"aria-hidden":!0}),d("live")]})]}),(0,i.jsx)("button",{type:"button",className:b().close,"aria-label":d("dismiss"),onClick:()=>r(t.event_id),children:(0,i.jsx)(l.A,{size:15,strokeWidth:1.3})}),(0,i.jsxs)(m.Link,{href:t.url,prefetch:!1,className:b().content,onClick:e=>(0,w.k3)(e.nativeEvent,()=>p(t)),children:[(0,i.jsxs)("p",{className:b().title,title:t.title,children:[t.is_starting&&(0,i.jsxs)("span",{className:b().first,children:[(0,i.jsx)(_.l,{size:16}),d("first")]}),t.title]}),(0,i.jsxs)("div",{className:b().meta,children:[(0,i.jsx)("time",{dateTime:new Date(f).toISOString(),children:u.relativeTime(f,n)}),(0,i.jsxs)("span",{children:[" ","\xb7"," ",d("newsflash"===t.type?"newsflashSource":"articleSource")]})]}),(0,i.jsxs)("span",{className:b().details,children:[d("details"),(0,i.jsx)(o,{size:12})]})]})]})}},52683:e=>{e.exports={root:"in-app-push_root__rWVq5",overlay:"in-app-push_overlay__kDR0B","overlay-in":"in-app-push_overlay-in__Blkt9",region:"in-app-push_region__EX7Cs",list:"in-app-push_list__NMnzz",card:"in-app-push_card___SeL8","notice-in":"in-app-push_notice-in__9cUe7","notice-up":"in-app-push_notice-up__35ERz","notice-promote":"in-app-push_notice-promote__MW73j","notice-dismiss":"in-app-push_notice-dismiss__wqubH",heading:"in-app-push_heading__09Fxg",dot:"in-app-push_dot__NGbPq",live:"in-app-push_live__dLweI",close:"in-app-push_close__Ew68Y",content:"in-app-push_content__phLkA",title:"in-app-push_title__sH4yv",first:"in-app-push_first__6WN8A",meta:"in-app-push_meta__A8GDm",details:"in-app-push_details__xY1Kt",clear:"in-app-push_clear__6gFi3"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.