PageSourceSearch

https://www.abri.co.uk/_next/static/chunks/582.5470589ec2402ab5.js

js abri.co.uk collected 2026-10-02 15:33:44 UTC 4,213 bytes, 19 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[582],{8297:e=>{e.exports={searchResultsPage:"SearchResultsPage_searchResultsPage__ZLgtb"}},25186:e=>{e.exports={appSearchBar:"SearchBar_appSearchBar__9Iqcd",searchContainer:"SearchBar_searchContainer__iuZYH",control:"SearchBar_control__DPVOB"}},30582:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>v});var t=a(37876),r=a(14232),l=a(51948),c=a(66586),i=a(89099),n=a(95359),o=a(15039),u=a.n(o),h=a(25186),d=a.n(h);let p=({value:e,_onChange:s,handleSubmit:a,loading:r})=>(0,t.jsx)("div",{className:d().appSearchBar,children:(0,t.jsx)("div",{className:d().searchContainer,children:(0,t.jsxs)("form",{onSubmit:a,children:[(0,t.jsx)("label",{htmlFor:"search-results-query",children:"Search the website"}),(0,t.jsxs)("div",{className:d().control,children:[(0,t.jsx)("input",{id:"search-results-query",className:"input",type:"search",value:e,placeholder:"Enter search term...",onChange:e=>s(e.target.value)}),(0,t.jsx)("button",{type:"submit",className:u()("button",r&&"is-loading"),children:"Search"})]})]})})});var m=a(86649),x=a(53412),S=a(57575),g=a.n(S);let _=({results:e,query:s,count:a,limit:r,setLimit:l,loading:c})=>(0,t.jsxs)("div",{className:g().appSearchResults,children:[e&&(0,t.jsxs)("h2",{className:g().appSearchResultsTitle,children:[a," results found for “",s,"”"]}),(0,t.jsx)(x.A,{loading:c,children:e&&e.map(e=>(0,t.jsxs)("div",{className:g().appSearchResultsSection,children:[(0,t.jsx)("a",{href:e.documentFileUrl||e.url,target:e.documentFileUrl?"_blank":void 0,rel:e.documentFileUrl?"noreferrer":void 0,children:(0,t.jsx)("h3",{className:g().appSearchResultsSectionTitle,children:e.title})}),e.excerpt&&(0,t.jsx)("p",{children:(0,m.Ay)(e.excerpt)})]},`result-${e.id}`))}),r<a&&(0,t.jsx)("button",{className:`button is-dark-blue ${c?"is-loading":""}`,onClick:()=>{l(e=>e+10)},children:c?"Loading":"Load more"})]});var j=a(67847),R=a(89283),y=a(8297),N=a.n(y);let b=(0,l.J1)`
2  query ($hostname: String!, $query: String!, $limit: Int) {
3    searchResults(hostname: $hostname, query: $query) {
4      count
5      results(limit: $limit, query: $query) {
6        id
7        title
8        slug
9        url
10        excerpt
11        documentFileUrl
12        ... on PageInterface {
13          url
14          urlPath
15        }
16      }
17    }
18  }
19`;function v({data:e}){let s=(0,i.useRouter)(),{query:a}=s,{search:l}=a,o=Array.isArray(l)?l[0]:l,{site:u}=e,{page:h}=u,[d,m]=(0,r.useState)(o||""),[x,S]=(0,r.useState)(10),[g,{data:y,loading:P,error:f}]=(0,c._)(b);(0,r.useEffect)(()=>{o&&g({variables:{hostname:u.hostname,query:o,limit:x}})},[x,g,o,u.hostname]);let q=y?.searchResults?.results?.filter(e=>e.url);return(0,t.jsxs)("div",{className:N().searchResultsPage,children:[(0,t.jsx)(n.A,{title:h.title,headerImage:h.headerImage}),(0,t.jsx)("section",{className:"page-content",children:(0,t.jsx)("div",{className:"sidebar-page",children:(0,t.jsx)("div",{className:"inner-container",children:(0,t.jsxs)("div",{className:"columns is-multiline",children:[(0,t.jsxs)("main",{className:"column is-7-tablet is-8-desktop",children:[h.body&&(0,t.jsx)(R.A,{data:h.body,rootPage:u.rootPage}),(0,t.jsx)(p,{value:d,_onChange:m,handleSubmit:e=>{e.preventDefault(),function(e,s,a=!1){let t=e.asPath.indexOf("?"),r=e.asPath;-1!==t&&(r=e.asPath.slice(0,t)),Reflect.deleteProperty(s,"site"),Reflect.deleteProperty(s,"urlPath"),e.push({pathname:r,query:s},void 0,{shallow:!0,scroll:a})}(s,{...a,search:d})},loading:P}),(0,t.jsx)(_,{results:q,query:o,count:y?.searchResults?.count,loading:P,limit:x,setLimit:S}),f&&(0,t.jsx)("div",{className:"text-danger",children:"Error finding results. Please try again."}),h.bodyBottom&&(0,t.jsx)(R.A,{data:h.bodyBottom,rootPage:u.rootPage})]}),(0,t.jsx)("aside",{className:"column is-5-tablet is-4-desktop",children:(0,t.jsx)(j.A,{relatedContent:h.searchResultsPageRelated,explore:!1,menus:[],rootPage:u.rootPage})})]})})})})]})}},57575:e=>{e.exports={appSearchResults:"SearchResults_appSearchResults__mmJrY",appSearchResultsTitle:"SearchResults_appSearchResultsTitle__DNN9B",appSearchResultsSection:"SearchResults_appSearchResultsSection__Tqrsy",appSearchResultsSectionTitle:"SearchResults_appSearchResultsSectionTitle__dtwNx"}}}]);

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.