1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1848,3550],{83550:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return o}});var r=t(57437),s=t(87138),n=t(16463),i=t(2265),l=t(44839),c=t(22375);function o(e){let{totalPages:a}=e,t=(0,n.usePathname)(),o=(0,n.useSearchParams)(),d=Number(o.get("page"))||1,u=e=>{let a=new URLSearchParams(o);return a.set("page",e.toString()),"".concat(t,"?").concat(a.toString())},m=(e,t)=>e===t||e===t-1||e===t+1||1===e||e===a||1===t&&e<4||t===a&&e>a-3,g=(e,t)=>!(a<5)&&(1===e&&t>3||e===a-1&&t<a-2),h=(0,l.Z)("pagination__link group flex items-center justify-center w-10 h-10 md:w-12 md:h-12 rounded-full outline-primary-light transition-colors hover:text-primary-dark-1 hover:bg-primary-accent focus:outline focus:outline-2");return(0,r.jsxs)("div",{className:"pagination flex justify-center gap-x-2 lg:gap-x-3 pt-10",children:[(0,r.jsx)("div",{className:"pagination__item hidden md:block",children:(0,r.jsx)(s.default,{className:(0,l.Z)(h,"pr-1 bg-primary-dark-3"),href:u(d-1||1),title:"Previous page",children:(0,r.jsx)(c.Z,{name:"chevron-left",color:"currentColor",size:28})})}),[...Array(a)].map((e,a)=>{let t=a+1;return(0,r.jsxs)(i.Fragment,{children:[m(t,d)&&(0,r.jsx)("div",{className:"pagination__item",children:(0,r.jsx)(s.default,{className:(0,l.Z)(h,d===t?"text-primary-dark-1 bg-primary-accent":"bg-primary-dark-3"),href:u(t),title:"Page ".concat(t),children:(0,r.jsx)("span",{className:"font-czoo-sharp-grotesk text-base md:text-lg",children:t})})}),g(t,d)&&(0,r.jsx)("div",{className:"pagination__item",children:(0,r.jsx)("div",{className:"pagination__link group flex items-center justify-center w-12 h-12 font-czoo-sharp-grotesk text-lg bg-primary-dark-3 rounded-full",children:"..."})})]},t)}),(0,r.jsx)("div",{className:"pagination__item hidden md:block",children:(0,r.jsx)(s.default,{className:(0,l.Z)(h,"pl-1 bg-primary-dark-3"),href:u(d+1>a?a:d+1),title:"Next page",children:(0,r.jsx)(c.Z,{name:"chevron-right",color:"currentColor",size:28})})})]})}},76834:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return c}});var r=t(57437);async function s(e){let a="https://app-czn-prod-uks-cms-service.azurewebsites.net/v1/search"+"?query=".concat(e.query,"&pageSize=").concat("12","&page=").concat(e.page||1),t=await fetch(a,{cache:"no-store"});return t.ok?t.json():{error:{status:t.status,statusText:t.statusText,message:"There was an error fetching results, please try again."}}}var n=t(83550),i=t(12430),l=t(54477);async function c(e){let{searchParams:a}=e,{totalSearchResults:t=0,pageSize:c,searchResults:o,error:d}=await s(a),u=Math.ceil(Number(t)/Number(c));return d?(0,r.jsxs)("div",{className:"text-center mb-10",children:[(0,r.jsxs)(l.Z,{className:"!leading-10",level:"h1",size:"heading-5",margin:"mb-0",children:[d.status," ",d.statusText]}),(null==d?void 0:d.message)&&(0,r.jsx)("p",{className:"text-base mb-0",children:d.message})]}):(0,r.jsxs)(r.Fragment,{children:[(null==a?void 0:a.query)&&(0,r.jsx)("div",{className:"text-center mb-10",children:(0,r.jsx)(l.Z,{className:"!leading-10",level:"h1",size:"heading-5",margin:"mb-0",children:t>0?(0,r.jsxs)(r.Fragment,{children:[t," results found matching your search"]}):(0,r.jsx)(r.Fragment,{children:"Unfortunately we couldnât find any results matching your search"})})}),t>0&&(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2 md:gap-4 xl-gap-6",children:o.map((e,a)=>(0,r.jsx)(i.Z,{name:e.name,url:e.url,image:null==e?void 0:e.imageProperties,summary:e.summary},a))}),u>1&&(0,r.jsx)(n.default,{totalPages:u})]})}},12430:function(e,a,t){"use strict";t.d(a,{Z:function(){return o}});var r=t(57437),s=t(66648),n=t(87138),i=t(44839),l=t(34833),c=t(77220);function o(e){let{name:a,url:t,image:o,summary:d,category:u,date:m}=e;return(0,r.jsx)("div",{className:"card-search",children:(0,r.jsxs)(n.default,{className:(0,i.Z)("relative flex flex-col h-full aspect-7/9 md:aspect-11/16 lg:aspect-2/3 rounded-2xl lg:rounded-3xl overflow-hidden outline-primary-accent focus:outline focus:outline-2",u?"justify-between":"justify-end"),href:(0,c.n)({url:t,title:a}),children:[(0,r.jsx)("div",{className:(0,i.Z)('card__image group absolute inset-0 flex bg-primary-dark-3 transition-transform hover:scale-105 after:content-[""] after:absolute after:inset-0 after:bg-gradient-to-b after:from-transparent after:from-1.5% after:via-black/50 after:via-35.49% after:via-black/67 after:via-58.94% after:to-black/75 to-80%'),children:(null==o?void 0:o.url)?(0,r.jsx)(s.default,{className:"w-full h-full object-fit object-cover",src:o.url+"?width=560",alt:o.altText,width:o.width,height:o.height,loading:"lazy"}):(0,r.jsx)(s.default,{className:"w-full h-full object-fit object-cover",src:"/images/default-meta-image.png",alt:"",width:"1200",height:"628",loading:"lazy"})}),u&&(0,r.jsx)("div",{className:"flex pt-6 px-6",children:(0,r.jsx)(l.Z,{type:"primary",name:u})}),(0,r.jsxs)("div",{className:"card__content relative grid gap-y-2 p-6",children:[(0,r.jsx)("div",{className:"font-czoo-sharp-grotesk heading-5",children:a}),d&&(0,r.jsx)("div",{className:"body-xs line-clamp-4",dangerouslySetInnerHTML:{__html:d}}),m&&(0,r.jsx)("div",{className:"text-xs lg:text-sm font-semibold",children:(e=>{let a=new Date(e);
1return"".concat(a.getDate()," ").concat(a.toLocaleString("default",{month:"short",year:"numeric"}))})(m)})]})]})})}},34833:function(e,a,t){"use strict";t.d(a,{Z:function(){return s}});var r=t(57437);function s(e){let{type:a="primary",name:t}=e;return(0,r.jsx)("div",{className:"category-tag category-tag--".concat(a," relative flex items-center py-[2px] px-1 rounded"),children:(0,r.jsx)("span",{className:"category-tag-text font-czoo-sharp-grotesk text-sm leading-[0.875rem] uppercase tracking-wider",children:t})})}t(25592)},25592:function(){}}]);
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.