1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1685],{31817:(o,r,t)=>{t.d(r,{$8:()=>p,GI:()=>_,Ix:()=>f,JE:()=>x,Pz:()=>i,Sz:()=>d,WO:()=>g,es:()=>s,gf:()=>w,j6:()=>y,py:()=>l,vX:()=>v});var n,e,c=t(76367),a=t(91167),i=((n={}).CROP="crop",n.SCALE="scale",n.MAX="max",n),u={landscape:"aspect-w-16 aspect-h-9",portrait:"",square:"aspect-w-1 aspect-h-1",strap:""};function f(o){return u[function(o){var r="landscape";if(o){var t=o.cropHeight,n=o.cropWidth;void 0!==t&&void 0!==n&&(Math.min(n,t)/Math.max(n,t)>.8?r="square":t/n<.3?r="strap":t>n&&(r="portrait"))}return r}(o)]}var h={c100x66:{f:"crop",h:66,w:100},c105x70:{f:"crop",h:70,w:105},c200x132:{f:"crop",h:132,w:200},c284x270:{f:"crop",h:270,w:284},c370x246:{f:"crop",h:246,w:370},c370x270:{f:"crop",h:270,w:370},c576x298:{f:"crop",h:298,w:576},c627x561:{f:"crop",h:561,w:627},c700x400:{f:"crop",h:400,w:770},c800x561:{f:"crop",h:561,w:800},c1200x678:{f:"crop",h:678,w:1200},cartoon:{f:"crop",h:365,w:500},cartoonLarge:{f:"crop",h:730,w:1e3},deep:{f:"crop",h:630,w:470},exploreTravel:{f:"crop",h:651,w:980},feature:{f:"crop",h:300,w:850},iphone:{f:"crop",h:320,w:320},iphone2x:{f:"scale",h:640,w:640},large:{f:"crop",h:678,w:1200},medium:{f:"crop",h:298,w:576},postcard:{f:"crop",h:180,w:270},small:{f:"crop",h:246,w:370},square:{f:"crop",h:320,w:470},thumbnail:{f:"crop",h:90,w:130},thumbnailLarge:{f:"crop",h:145,w:215},thumbnailSmall:{f:"crop",h:60,w:90},tiny:{f:"crop",h:132,w:200},wide:{f:"crop",h:210,w:370}};function s(o){var r,t,n=o.sourceHeight,e=o.sourceWidth,c={cropHeight:n,cropWidth:e,cropX:0,cropY:0,focalX:Math.round(e/2),focalY:Math.round(n/2),scale:1};return e>=n&&(e/n>16/9?(c.cropHeight=n,c.cropWidth=16*n/9):e/n<16/9&&(c.cropWidth=e,c.cropHeight=9*e/16),c.cropX=(e-(null!=(r=c.cropWidth)?r:0))/2,c.cropY=(n-(null!=(t=c.cropHeight)?t:0))/2),c.cropX<0&&(c.cropX=0),c.cropY<0&&(c.cropY=0),c}function d(o){var r=o.aspect,t=o.focalX,n=o.focalY,e=o.height,c=void 0===e?1:e,a=o.scale,i=void 0===a?1:a,u=o.width,f=void 0===u?1:u,h=f/i,s=c/i;r>f/c?s=h/r:h=s*r;var d=n-n/c*s;return{height:Math.round(s),topX:Math.round(t-t/f*h),topY:Math.round(d),width:Math.round(h)}}var l=((e={}).JPG="jpg",e.WEBP="webp",e);function p(o){var r=o.fit,t=o.height,n=o.ignoreCrop,e=void 0!==n&&n,i=o.image,u=o.outputFormat,f=void 0===u?"jpg":u,s=o.size,l=o.useFocalPoint,p=void 0===l||l,m=o.width,v="cropConfig"in i?i.cropConfig:void 0,g={f:"crop",h:t,w:m};if(s&&!(g=(0,c._)({},h[s])))throw Error("Unsupported transform size ".concat(s));if(r&&(g.f=r),g.path=i.uri.replace(/^\/+|\/+$/g,""),void 0===g.h&&(g.h=0),void 0===g.w&&(g.w=0),void 0===g.f&&(g.f="crop"),e||!((w="cropConfig"in i?i.cropConfig:void 0)&&w.cropWidth))g.transform="resize",g.request=0!==g.h?"w".concat(g.w,"_h").concat(g.h,"_f").concat(e?"max":g.f,".").concat(f):"w".concat(g.w,"_h").concat(g.h,".").concat(f,"?resize_filter=lanczos2&quality=100");else{var w,x,y,_,b=function(o,r){var t=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n="cropConfig"in o?o.cropConfig:void 0;if(!n)return[];if(t&&void 0!==n.focalX&&void 0!==n.focalY){var e=d({aspect:r,focalX:n.focalX-n.cropX,focalY:n.focalY-n.cropY,height:n.cropHeight,width:n.cropWidth}),c=Math.round(e.topX+n.cropX),a=Math.round(e.topY+n.cropY);return[[c,a],[Math.round(c+e.width),Math.round(a+e.height)]]}return[[Math.round(n.cropX),Math.round(n.cropY)],[Math.round(n.cropX+(n.cropWidth||0)),Math.round(n.cropY+(n.cropHeight||0))]]}(i,0===g.h?1:g.w/g.h,p);g.transform="crop",x=(0,a._)(b,2),y=(0,a._)(x[0],2),g.x1=y[0],g.y1=y[1],_=(0,a._)(x[1],2),g.x2=_[0],g.y2=_[1],p&&(null==v?void 0:v.focalX)!==void 0&&(g.f="max"),g.request="r".concat(g.x1,"_").concat(g.y1,"_").concat(g.x2,"_").concat(g.y2,"_")+"w".concat(g.w,"_h").concat(g.h,"_f").concat(g.f,".").concat(f)}return g}function m(o){var r=p(o),t="transform/v1/".concat(r.transform,"/frm/").concat(r.path,"/");return"".concat(t).concat(r.request)}function v(o){var r=p(o);return[r.x1+r.x2,r.y1+r.y2]}function g(o){var r=o.fit,t=o.height,n=o.ignoreCrop,e=o.image,c=o.outputFormat,a=o.size,i=o.transformUrl,u=o.useFocalPoint,f=o.width;if(a&&(f||t))throw Error("Cannot use fixedSize and dimensions together");
1return"".concat(i).concat(m({fit:r,height:t,ignoreCrop:n,image:e,outputFormat:c,size:a,useFocalPoint:u,width:f}))}function w(o){var r=o.fit,t=o.height,n=o.image,e=o.outputFormat,c=o.transformUrl,a=o.width;return"".concat(c).concat(m({fit:void 0===r?"crop":r,height:t,ignoreCrop:!1,image:n,outputFormat:e,useFocalPoint:!1,width:a}))}function x(o){var r=o.height,t=o.image,n=o.outputFormat,e=o.transformUrl,c=o.width;return"".concat(e).concat(m({height:r,ignoreCrop:!0,image:t,outputFormat:void 0===n?"jpg":n,useFocalPoint:!1,width:c}))}function y(o){return"uri"in o&&!!o.uri}function _(o){return new Promise(function(r){var t=new Image;t.onload=function(){return r(!0)},t.onerror=function(){return r(!1)},t.src=o})}},38791:(o,r,t)=>{t.r(r),t.d(r,{default:()=>f});var n=t(60143),e=t(29722);t(45159);var c=t(62715),a=t(98165),i=t(94232),u=t(54504);let f=function(o){var r=o.zoneItemData,t=r.limit,f=r.offset,h=r.showCanonicalSite,s=r.stories,d=r.storyListId,l=r.useCanonicalUrl,p=f-1,m=Math.min(null!=t?t:s.length,20),v=(0,c.GV)(function(o){return o.page}),g=(0,u.DP)()!==a.w3.SPORT,w=(0,u.cM)({limitWithOffset:m+p,loadStoryCount:6,showCanonicalSite:h,stories:s,storyListId:d,useCanonicalUrl:l}),x=w.loadMore,y=w.loadedStories,_=w.loadedStoryLimit,b=w.loading,C=w.noMoreStories,M=y.length<m-p,j=y.slice(0,_).map(function(o,r){return{index:r+1,story:o}});return j.length>0?(0,n.jsxs)("div",{className:"border-gray-300",children:[(0,n.jsx)("div",{className:"grid grid-cols-2 justify-items-center gap-x-4 gap-y-2 md:grid-cols-3 md:gap-x-12 md:gap-y-4",children:(0,n.jsx)(i.yf,{showSignpost:g,stories:j})}),(0,n.jsx)("div",{className:"mb-5 mt-6 w-full",children:C?(0,n.jsxs)("div",{className:"m-auto text-center font-inter text-base text-gray-500","data-testid":"no-more",children:[(0,n.jsx)("div",{className:"mb-2.5 font-bold",children:"\uD83C\uDFC6 Mission accomplished \uD83C\uDFC6"}),(0,n.jsxs)("div",{className:"font-medium",children:["There are no more stories.",(0,n.jsx)("br",{}),"Fancy some more?"," ",(0,n.jsx)("a",{className:"text-indigo-700 underline",href:"/",children:"Visit our home page"})]})]}):!M&&(0,n.jsxs)("button",{className:(0,e.A)("m-auto mt-10 flex select-none items-center justify-center","rounded-md border border-gray-900 px-4 py-2 text-sm","font-inter text-gray-900 hover:bg-gray-50 focus:outline-none",{"pointer-events-none opacity-50":b}),"data-testid":"load-button",onClick:x,type:"button",children:["More ",v.name.toLowerCase()]})})]}):null}},50172:(o,r,t)=>{t.d(r,{A:()=>h,m:()=>f});var n=t(76367),e=t(30694),c=t(91167),a=t(60143),i=t(45159),u=t(62715),f=(0,i.createContext)({addStory(){},forStory:()=>null});function h(o){var r=o.children,t=(0,u.GV)(function(o){return o.features.viafoura}),h=(0,c._)((0,i.useState)({}),2),s=h[0],d=h[1];(0,i.useEffect)(function(){t.enabled&&Object.entries(s).forEach(function(o){var r=(0,c._)(o,2),t=r[0],a=Object.entries(r[1]).filter(function(o){return void 0===(0,c._)(o,2)[1]}).map(function(o){return(0,c._)(o,1)[0]});0!==a.length&&(d(function(o){var r=(0,n._)({},o);return a.forEach(function(o){r[t][o]=null}),r}),fetch("https://livecomments.viafoura.co/v4/livecomments/"+"".concat(t,"/content-containers/")+"comment-count-and-status/by-container-ids",{body:JSON.stringify(a),method:"POST"}).then(function(o){if(!o.ok)throw d(function(o){var r=(0,n._)({},o);return a.forEach(function(o){r[t][o]=0}),r}),Error("Viafoura comment count response error");return o}).then(function(o){return o.json()}).then(function(o){d(function(r){var c,a=!1,i=null!=(c=r[t])?c:{};return(o.forEach(function(o){var r=o.commentCount,t=o.containerId;i[t]!==r&&(a=!0,i[t]=r)}),a)?(0,e._)((0,n._)({},r),{[t]:i}):r})}).catch(function(o){console.error(o)}))})},[s,t]);var l=t.enabled?t.data.sectionUuid:"",p=(0,i.useCallback)(function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;t.enabled&&d(function(t){return t[r]&&o in t[r]?t:(0,e._)((0,n._)({},t),{[r]:(0,e._)((0,n._)({},t[r]),{[o]:void 0})})})},[l,t.enabled]),m=(0,i.useCallback)(function(o){var r,t,n;return null!=(t=null==(n=s[null!=(r=o.viafouraSyndicationSectionUuid)?r:l])?void 0:n[o.id])?t:null},[s,l]),v=(0,i.useMemo)(function(){return{addStory:p,forStory:m}},[p,m]);return t.enabled?(0,a.jsx)(f.Provider,{value:v,children:r}):(0,a.jsx)(a.Fragment,{children:r})}}}]);
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.