1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4565],{4565:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var n=l(95155),s=l(12115),r=l(21403),a=l(61362);let o=e=>{if(!e||"string"!=typeof e)return"";let t=e.trim().split(/\s+/);if(t.length<3)return e.toUpperCase();let l=t[0],n=(t[1]||"").slice(0,3).toUpperCase(),s=t[2];return l&&n&&s?"".concat(n," ").concat(l,", ").concat(s):e.toUpperCase()},i=e=>{let{productId:t,productName:l,newsId:i,fetcher:d=a.MK,latestDevelopmentsLabel:c,newsUpdatesLabel:u,headingLevel:x="h3",onClose:p}=e,f="string"==typeof i&&i.length>0,[m,h]=(0,s.useState)([]),[b,y]=(0,s.useState)(0),[g,v]=(0,s.useState)(null),[w,j]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),E=(0,s.useRef)(null),C=(0,s.useRef)(null),F=(0,s.useCallback)(async e=>{if(!w){j(!0),k(!1);try{let n=await d(t,e,10,i);if(n&&"string"!=typeof n&&200===n.statusCode&&Array.isArray(n.data)){var l;let t=n.data,s=Number(null!=(l=n.totalPages)?l:1);h(l=>1===e?t:[...l,...t.filter(e=>!l.some(t=>t.id===e.id))]),y(e),v(f?1:Number.isFinite(s)&&s>0?s:1)}else k(!0)}catch(e){k(!0)}finally{j(!1)}}},[t,w,i,f,d]);(0,s.useEffect)(()=>{F(1)},[t]),(0,s.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&p()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[p]),(0,s.useEffect)(()=>{if(f)return;let e=E.current,t=C.current;if(!e||!t||w||null!==g&&b>=g)return;let l=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&F(b+1)},{root:e,rootMargin:"0px 0px 100px 0px",threshold:0});return l.observe(t),()=>l.disconnect()},[b,g,w,F,f]);let _=null!==g&&b<g;return(0,n.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"latest-developments-modal-title",className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(15,23,41,0.55)] px-4 py-6 mb-0",onClick:e=>{e.target===e.currentTarget&&p()},children:(0,n.jsxs)("div",{className:"relative bg-white rounded-2xl shadow-[0_24px_48px_0_rgba(15,23,41,0.18)] w-full max-w-[860px] max-h-[85vh] flex flex-col overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4 px-8 pt-7 pb-6 border-b border-[#E5EBF0]",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1 min-w-0",children:[(0,n.jsx)("h3"===x?"h3":"h2",{id:"latest-developments-modal-title",className:"font-body text-2xl font-bold text-black-1",children:c||"Latest Developments"}),(0,n.jsx)("p",{className:"font-body text-sm font-normal text-[#667382]",children:l?"".concat(l," market â ").concat(u||"news, regulation and operational updates"):u||"News, regulation and operational updates"})]}),(0,n.jsx)(r.A,{type:"button","aria-label":"Close",onClick:p,pressScale:.9,className:"shrink-0 inline-flex items-center justify-center w-10 h-10 rounded-[20px] bg-[#F2F5F7] text-black-1 hover:bg-[#E5EBF0] transition-colors",children:(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M6 6l12 12M18 6l-12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),(0,n.jsxs)("div",{ref:E,className:"flex-1 overflow-y-auto overscroll-contain px-8",children:[0===m.length&&w?(0,n.jsx)("p",{className:"font-body text-sm text-black-2 py-8 text-center",children:"Loading latest developmentsâ¦"}):null,0!==m.length||w||N?null:(0,n.jsx)("p",{className:"font-body text-sm text-black-2 py-8 text-center",children:"No recent developments to show."}),(0,n.jsx)("ul",{className:"flex flex-col",children:m.map((e,t)=>{var l,s,r;let a=t===m.length-1,i=o(e.publish_date),d=null!=(l=e.heading)?l:"",c=null!=(s=e.description)?s:"";return(0,n.jsxs)("li",{className:"py-6 ".concat(a?"":"border-b border-[#EBF0F5]"),children:[(0,n.jsx)("div",{className:"flex items-center flex-wrap gap-2 mb-3",children:i?(0,n.jsx)("span",{className:"inline-flex items-center font-body text-[11px] font-semibold uppercase text-[#4A5466] bg-[#F0F2F7] rounded-full px-3 py-1",children:i}):null}),d?(0,n.jsx)("p",{className:"font-heading text-base font-semibold text-purple-1 mb-2",children:d}):null,c?(0,n.jsx)("p",{className:"font-body text-sm font-normal text-[#4A5466] leading-relaxed",children:c}):null]},null!=(r=e.id)?r:"latest-dev-modal-".concat(t))})}),_?(0,n.jsx)("div",{ref:C,className:"py-6 text-center font-body text-xs text-black-2","aria-hidden":"true",children:w?"Loadingâ¦":""}):null,N?(0,n.jsx)("div",{className:"py-6 flex items-center justify-center",children:(0,n.jsx)(r.A,{type:"button",onClick:()=>F(b+1||1),pressScale:.97,className:"font-body text-sm text-purple-1 underline",children:"Couldn't load more â tap to retry"})}):null]})]})})}}}]);
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.