PageSourceSearch

https://observer.co.uk/_next/static/chunks/3971-fcc262422145e004.js

js observer.co.uk collected 2026-09-24 08:33:42 UTC 13,542 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3971],{1788:(e,t,r)=>{r.d(t,{G:()=>b});var i=r(54568),s=r(17947),n=r(54076),l=r(62142),a=r(84965),o=r(50457),c=r(85266),d=r(5595);let u=({color:e="#333333",...t})=>(0,i.jsx)(d.BS,{role:"img",accessible:!1,width:16,height:16,viewBox:"0 0 14.1421 14.1421",fill:"none",...t,children:(0,i.jsx)(d.G,{transform:"rotate(45 7.07105 7.07105)",children:(0,i.jsx)(d.wA,{d:"M8.52107 7.07107L13.0711 11.6211L11.6211 13.0711L7.07107 8.52107L2.52107 13.0711L1.07107 11.6211L5.62107 7.07107L1.07107 2.52107L2.52107 1.07107L7.07107 5.62107L11.6211 1.07107L13.0711 2.52107L8.52107 7.07107Z",fill:e})})});var h=r(17953);let g=(0,n.styled)(a.a,{fontSize:"$16",lineHeight:"$23",$lg:{fontSize:"$16",lineHeight:"$23"}}),b=({label:e,newsletterTitle:t,isSelected:r,isLoading:a=!1,onPress:d})=>{let b=(0,n.useThemeName)(),p=(0,n.useTheme)(),f=b.includes("dark"),w=(0,c.X)(p.newsletter_text,o.T.newsletter_text),x=f?o.T.white:o.T.grey_600,m=f?o.T.grey_600:o.T.white,y=r?s._6.Az:e,j=`${y} to ${t}`;return(0,i.jsxs)(l.$n,{unstyled:!0,accessible:!0,accessibilityRole:"button",accessibilityState:{selected:r,disabled:a,busy:a},disabled:a,opacity:a?.5:1,"aria-label":j,testID:"newsletter-card-cta",onPress:()=>{a||d()},flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"$10",maxWidth:"100%",borderRadius:30,borderWidth:1,borderColor:r?x:w,paddingHorizontal:"$16",paddingTop:"$8",paddingBottom:"$10",backgroundColor:r?x:"transparent",cursor:"pointer",hoverStyle:r?void 0:{backgroundColor:"$backgroundHover"},children:[(0,i.jsx)(g,{flexShrink:1,color:r?m:w,children:y}),r?(0,i.jsx)(h.P,{width:16,height:15,color:m}):(0,i.jsx)(u,{width:16,height:16,color:w})]})}},16789:(e,t,r)=>{r.d(t,{o:()=>s});var i=r(5974);let s=(0,i.createServerReference)("003d7390517cc000073eca832c8b8c40a01f186f70",i.callServer,void 0,i.findSourceMapURL,"getNewslettersPageLive")},17953:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(54568),s=r(5595);let n=({color:e="#FFFFFF",...t})=>(0,i.jsx)(s.BS,{role:"img",accessible:!1,width:16,height:15,viewBox:"0 0 16 15",fill:"none",...t,children:(0,i.jsx)(s.wA,{d:"M14.7914 0L5.37869 10.5917L1.2086 7.1L0 8.35L4.55428 15H6.1951L16 1.25L14.7914 0Z",fill:e})})},35557:(e,t,r)=>{r.d(t,{l:()=>x});var i=r(68728),s=r(17031),n=r(19053),l=r(19279),a=r(7620),o=r(84975),c=r(5974);let d=(0,c.createServerReference)("40949b64503490f4fa0e684c9fe31c42863ec53a1e",c.callServer,void 0,c.findSourceMapURL,"getNewsletterSubscriptionsLive");class u extends Error{constructor(){super("Contact is suppressed and needs to re-opt in before subscribing."),this.needsReoptin=!0,this.name="ContactSuppressedError"}}let h=(0,c.createServerReference)("406c155ae84a2546a776eafcdb3051494626ba5b17",c.callServer,void 0,c.findSourceMapURL,"postNewsletterSubscriptionsLive"),g=async({email:e,preferences:t,source:r})=>{if(!e)throw Error("postNewsletterSubscriptions requires an email address.");if(0===Object.keys(t).length)throw Error("postNewsletterSubscriptions requires at least one preference.");if(void 0!==r&&!/^https?:\/\//.test(r))throw Error(`postNewsletterSubscriptions: source must be an absolute URI, got ${r}. Omit it to let the CMS default it to the newsletters page URL.`);if(Object.values(t).some(e=>"boolean"!=typeof e))throw Error("postNewsletterSubscriptions: every preference value must be a boolean.");let i=await h({email:e,preferences:t,source:r});if("contact_suppressed"===i.outcome)throw new u;if("failed"===i.outcome)throw Error(`Failed to write newsletter subscriptions: ${i.detail}`);return{success:!0,subscriptions:i.subscriptions}};var b=r(17947),p=r(59429),f=r(22062);let w="newsletter-subscriptions",x=(e,{source:t,enabled:r=!0})=>{var c;let h,x,m,{isAnonymous:y,email:j}=(0,p.q)(),v=(0,i.jE)(),_=(0,l.J$)(),$=(0,s.I)({queryKey:[w,j],queryFn:()=>d(j),enabled:r&&!y&&!!j,staleTime:3e4,refetchOnWindowFocus:!1,retry:1});(0,a.useEffect)(()=>{$.isError&&(0,o.$s)("ui_error",{event_category:"api_error",error_message:"Newsletter subscriptions read failed",content_id:"newsletter-subscriptions"})},[$.isError]);let k=(0,a.useMemo)(()=>{let t=$.data?.subscriptions??{};return e.filter(e=>!0===t[e.key]).map(e=>e.key)},[$.data,e]),[S,C]=(0,a.useState)(null),L=(0,a.useRef)(null),I=(0,a.useCallback)(e=>{L.current=e,C(e)},[]),T=S??k,{mutateAsync:R,isPending:F}=(0,n.n)({mutationFn:async({email:e,preferences:t})=>g({email:e,preferences:t})}),A=(0,a.useCallback)(async(r,i)=>{try{let s=await R({email:r,preferences:i});
1return Object.entries(i).forEach(([r,i])=>{let s=e.find(e=>e.key===r);if(s){if(y){if(!i)return;f.ex.dispatch({type:"newsletter_email_capture_submit",newsletterId:s.id,newsletterTitle:s.title,source:t,userType:"anonymous"});return}f.ex.dispatch({type:i?"newsletter_subscribe":"newsletter_unsubscribe",newsletterId:s.id,newsletterTitle:s.title,source:t,userType:"signed_in"})}}),await v.cancelQueries({queryKey:[w,r]}),v.setQueryData([w,r],{subscriptions:s.subscriptions,contactStatus:"subscribed"}),!0}catch(e){return e instanceof u?console.info("Newsletter subscribe blocked: contact suppressed, needs re-opt-in"):console.error("Newsletter subscription write failed",e.message),(0,o.$s)("ui_error",{event_category:"api_error",error_message:e instanceof u?"contact_suppressed":e.message,content_id:"newsletter-subscriptions-write"}),_.show(b._6.Rp,{status:"error"}),!1}},[y,R,e,v,t,_]),E=(0,a.useRef)(null);E.current={write:async e=>{await A(j,e)},onIdle:()=>I(null)};let W=(0,a.useRef)(null);W.current||(c=()=>E.current,h={},x=!1,m=async()=>{if(!x){x=!0;try{for(;Object.keys(h).length>0;){let e=h;h={};try{await c().write(e)}catch(e){console.error("Newsletter preference write rejected instead of resolving",e.message)}}}finally{x=!1}c().onIdle()}},W.current={enqueue:(e,t)=>{h[e]=t,m()}});let M=(0,a.useCallback)(e=>{let t=L.current??k,r=t.includes(e.key),i=r?t.filter(t=>t!==e.key):[...t,e.key];y?I(i):j?(I(i),W.current?.enqueue(e.key,!r)):_.show(b._6.Rp,{status:"error"})},[j,y,k,I,_]),N=(0,a.useCallback)(()=>I(null),[I]),P=(0,a.useCallback)(async(t,r)=>{let i=t??j;if(!i)return!1;let s={};if(e.forEach(e=>{let t=k.includes(e.key),r=T.includes(e.key);t!==r&&(s[e.key]=r)}),r&&(s.MARKETING=!0),0===Object.keys(s).length)return I(null),!0;let n=await A(i,s);return n&&I(null),n},[j,e,T,k,I,A]);return{selectedKeys:T,hasPendingChanges:y&&null!==S&&(S.length!==k.length||S.some(e=>!k.includes(e))),selectedCount:T.length,isLoading:$.isLoading,isCommitting:F,toggle:M,commit:P,reset:N}}},46588:(e,t,r)=>{r.d(t,{R:()=>y,s:()=>v});var i=r(54568),s=r(17947),n=r(7620),l=r(42584),a=r(30770),o=r(25469),c=r(59902),d=r(97486),u=r(2028),h=r(32165),g=r(48648),b=r(73105),p=r(50843),f=r(61550),w=r(54076),x=r(17953);let m=()=>(0,i.jsx)(w.Stack,{alignItems:"center",backgroundColor:"$success",borderRadius:9999,height:32,justifyContent:"center",width:32,children:(0,i.jsx)(x.P,{width:16,height:15,color:"#FFFFFF"})}),y=({selectedCount:e,totalCount:t,isCommitting:r,hasPendingChanges:p,hasSucceeded:w,onConfirm:x,onDismiss:y,onHeightChange:v})=>{let[_,$]=(0,n.useState)(!1),{control:k,handleSubmit:S,formState:{errors:C}}=(0,l.mN)({mode:"onBlur",defaultValues:{email:""}});if(w)return(0,i.jsx)(j,{backgroundColor:"$successful_tint",borderTopColor:"$success",onDismiss:y,onHeightChange:v,children:(0,i.jsxs)(a.Se,{alignItems:"center",gap:"$8",paddingVertical:"$16",children:[(0,i.jsx)(m,{}),(0,i.jsx)(g.H5,{tag:"h2",children:s._6.i1}),(0,i.jsx)(d.a,{textAlign:"center",maxWidth:520,children:s._6.UR})]})});let L=`${e} of ${t} ${s._6._P}`;return(0,i.jsx)(j,{backgroundColor:"$background_primary",borderTopColor:"$grey_600",onDismiss:y,onHeightChange:v,children:(0,i.jsxs)(a.Se,{alignItems:"center",gap:"$8",paddingVertical:"$16",width:"100%",children:[(0,i.jsx)(d.a,{textAlign:"center",paddingHorizontal:56,maxWidth:532,children:L}),(0,i.jsxs)(a.Se,{width:"100%",maxWidth:370,gap:"$8",children:[(0,i.jsx)(l.xI,{control:k,name:"email",rules:{required:s.Wb.pA,pattern:{value:f.LQ,message:s.Wb.oU}},render:({field:{onChange:e,onBlur:t,value:r}})=>(0,i.jsx)(b.p,{id:"newsletter-drawer-email",errorMessage:C.email?.message,onBlur:t,onChangeText:e,placeholder:s._6.yI,textContentType:"emailAddress",value:r})}),(0,i.jsx)(h.S,{checked:_,onCheckedChange:()=>$(e=>!e),size:"$20",label:s._6.TA}),(0,i.jsxs)(d.a,{fontSize:"$14",lineHeight:"$20",children:[s.Wb.zf,(0,i.jsx)(c.M,{"aria-label":"Privacy Policy Link",href:f.bw.PRIVACY_DATA_USAGE_AND_COOKIE_POLICY,fontSize:"$14",lineHeight:"$20",fontFamily:"$caslonIonic",fontWeight:"$300",unstyled:!1,style:{fontSize:14,lineHeight:21},children:s.Wb.hM})]})]}),(0,i.jsx)(u.$,{variant:"primary","aria-label":s._6.i9,testID:"newsletter-drawer-confirm",disabled:r||!p,icon:r?(0,i.jsx)(o.y,{}):void 0,onPress:S(({email:e})=>x({email:e,marketingOptIn:_})),children:s._6.i9})]})})},j=({backgroundColor:e,borderTopColor:t,onDismiss:r,onHeightChange:s,children:n})=>(0,i.jsxs)(a.lW,{testID:"newsletter-drawer-frame",backgroundColor:e,borderTopColor:t,borderTopWidth:4,justifyContent:"center",paddingHorizontal:"$16",position:"relative",width:"100%",onLayout:e=>
1s?.(e.nativeEvent.layout.height),children:[(0,i.jsx)(a.lW,{flex:1,maxWidth:"$maxContentWidth",justifyContent:"center",children:n}),(0,i.jsx)(u.$,{"aria-label":"Close",variant:"icon",onPress:r,position:"absolute",right:"$16",top:"$16",width:56,icon:(0,i.jsx)(p.b,{width:24,height:24}),padding:0,cursor:"pointer"})]}),v=({children:e})=>(0,i.jsx)("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:9e4},children:e})},57353:(e,t,r)=>{r.d(t,{c:()=>h});var i=r(54568),s=r(54076),n=r(70931),l=r(5595),a=r(50457),o=r(85266);let c="13.636363636363635%",d="-6.8181818181818175%",u=()=>{let e=(0,s.useTheme)(),t=(0,o.X)(e.newsletter_card_background,a.T.newsletter_card_background);return(0,i.jsx)(s.View,{bottom:d,height:c,left:0,pointerEvents:"none",position:"absolute",right:0,children:(0,i.jsx)(l.BS,{width:"100%",height:"100%",viewBox:"0 0 308 42",preserveAspectRatio:"none",children:(0,i.jsx)(l.wA,{d:"M0,0 L154,21 L308,0 L308,42 L0,42 Z",fill:t})})})},h=({coverImage:e,size:t,priority:r=!1,showEnvelopeFlap:l=!0})=>(0,i.jsxs)(s.View,{...t?{width:t,height:t}:{width:"100%",aspectRatio:1},flexShrink:0,overflow:"hidden",backgroundColor:e?void 0:"$orange_600",children:[e&&(0,i.jsx)(n.M,{imageUrl:e.url,alt:e.altText,imageMode:"direct",aspectRatio:1,objectFit:"cover",objectPosition:"center",fillBox:!0,priority:r,width:"100%",height:"100%"}),l&&(0,i.jsx)(u,{})]})},59429:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(68402);let s=()=>{let{currentUser:e}=(0,i.As)(),t=!e||!!e.isAnonymous;return{isAnonymous:t,email:t?void 0:e?.email??void 0,userType:t?"anonymous":"signed_in"}}},62243:(e,t,r)=>{r.d(t,{Z:()=>c,d:()=>u});var i=r(54568),s=r(7620),n=r(62068),l=r(54076),a=r(50457),o=r(85266);let c=({width:e,height:t,aspectRatio:r,radius:c=4,color:d,testID:u})=>{let h=(0,l.useTheme)(),g=d??(0,o.X)(h.grey_50,a.T.grey_50),b=(0,n.useSharedValue)(.5);(0,s.useEffect)(()=>(b.value=(0,n.withRepeat)((0,n.withTiming)(1,{duration:800,easing:n.Easing.inOut(n.Easing.ease)}),-1,!0),()=>(0,n.cancelAnimation)(b)),[b]);let p=(0,n.useAnimatedStyle)(()=>({opacity:b.value}),[b]);return(0,i.jsx)(n.default.View,{testID:u,style:[{width:e,...r?{aspectRatio:r}:{height:t},borderRadius:c,backgroundColor:g},p]})};var d=r(30770);let u=({width:e,lineHeight:t,color:r,testID:s})=>(0,i.jsx)(d.Se,{testID:s,height:t,justifyContent:"center",children:(0,i.jsx)(c,{testID:s?`${s}-block`:void 0,color:r,width:e,height:Math.max(4,Math.min(24,t-8,t))})})},66563:(e,t,r)=>{r.d(t,{yx:()=>p,Ig:()=>g,eC:()=>l});var i=r(54568),s=r(7620),n=r(48648);let l=e=>{let t;if(!e)return[];let r=[[]],i=0,s=0,n=0,l=!1,c=e=>{let t=d(e).replace(/\s+/g," ");if(!t)return;for(;n>0;)r.push([]),n-=1;let a=i>0,o=s>0,c=r[r.length-1],u=c[c.length-1];u&&!!u.italic===a&&!!u.bold===o?u.text+=t:c.push({kind:"text",text:t,...a?{italic:!0}:{},...o?{bold:!0}:{}}),l=!0},u=/<\s*(\/?)\s*([a-zA-Z][a-zA-Z0-9]*)[^>]*>|([^<]+)/g;for(;null!==(t=u.exec(e));){let[,e,r,d]=t;if(void 0!==d){c(d);continue}let u=r.toLowerCase(),h="/"===e;"br"===u||"p"===u&&h?l&&(n+=1):a.has(u)?i=Math.max(0,i+(h?-1:1)):o.has(u)&&(s=Math.max(0,s+(h?-1:1)))}return r.map(e=>{let t=e.filter(e=>e.text.length>0);if(0===t.length)return t;t[0]={...t[0],text:t[0].text.replace(/^\s+/,"")};let r=t.length-1;return t[r]={...t[r],text:t[r].text.replace(/\s+$/,"")},t.filter(e=>e.text.length>0)}).flatMap((e,t)=>0===t?e:[{kind:"break"},...e])},a=new Set(["i","em"]),o=new Set(["b","strong"]),c={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xa0"},d=e=>e.replace(/&(#[xX]?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,t)=>{if(t.startsWith("#")){let r="x"===t[1]||"X"===t[1],i=Number.parseInt(r?t.slice(2):t.slice(1),r?16:10);if(!Number.isFinite(i)||i<=0)return e;try{return String.fromCodePoint(i)}catch{return e}}return c[t.toLowerCase()]??e});var u=r(54076),h=r(35677);let g=({nodes:e,italicFace:t})=>(0,i.jsx)(i.Fragment,{children:e.map((e,r)=>{let n=`rich-text-run-${r}`;return"break"===e.kind?u.isWeb?(0,i.jsx)("br",{},n):(0,i.jsx)(s.Fragment,{children:"\n"},n):e.italic||e.bold?(0,i.jsx)(h.E,{color:"inherit",fontFamily:e.italic&&!u.isWeb?t(!!e.bold):"$caslonIonic",...e.bold&&{fontWeight:"$700"},...e.italic&&u.isWeb&&{fontStyle:"italic"},children:e.text},n):(0,i.jsx)(s.Fragment,{children:e.text},n)})}),b=e=>e?"caslonIonicBoldItalic":"caslonIonicRegularItalic",p=({displayTitle:e,title:t,...r})=>{let a=(0,s.useMemo)(()=>l(e),[e]);return 0===a.length?(0,i.jsx)(n.H5,{...r,children:t}):(0,i.jsx)(n.H5,{...r,children:(0,i.jsx)(g,{nodes:a,italicFace:b})})}}}]);
2//# sourceMappingURL=3971-fcc262422145e004.js.map

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.