PageSourceSearch

https://www.normet.com/_next/static/chunks/pages/search-4293edeb5c982195.js

js normet.com collected 2026-10-02 02:57:08 UTC 4,560 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[612],{5212:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSG:()=>D,default:()=>B});var s=t(55427),a=t(14085),l=t(44600),n=t(19907),i=t(17799),u=t(52692),o=t(97867),d=t(3540),c=t(12231),h=t(34478),m=t(53039),p=t.n(m),y=t(70679),g=t(77019);async function f(e){try{let r=e.text(),t=await r;if(t.length>0)return JSON.parse(t);return t}catch(r){return e}}let b="/api/search/";var x=t(69123);let j="ResultsCount",q={strong:(0,s.jsx)("strong",{})},v=e=>{let{count:r,isError:t,isLoading:a}=e,{query:{query:l}}=(0,d.useRouter)();return l&&"string"==typeof l?(0,s.jsx)(n.az,{mt:"10",mb:"16",fontSize:"md","data-testid":j,"aria-live":"polite","aria-atomic":"true",wordBreak:"break-all",children:(0,s.jsx)(x.A,{i18nKey:a||t?a?"pages.search.results-loading":"pages.search.results-error":"pages.search.results",components:q,values:{count:r,query:l}})}):null};v.displayName=j;var w=t(71554),S=t(5305),k=t(21091),_=t(38527),N=t(62360),z=t(81579);let A={link:{sx:{"&:where(:hover, :focus-visible) > h2":{textDecoration:"underline"}}},heading:{mb:"4"},preamble:{mb:"6",color:"black"},divider:{borderBottomWidth:"1px !important"},typename:{fontWeight:"500",fontSize:"md",mb:"2"}},E=e=>{let{__typename:r,sys:t,heading:a,preamble:l,isLast:n}=e,{t:o}=(0,u.A)(),d=(0,z.A)(),c=o("pages.search.type",null,{returnObjects:!0}),h=c&&(0,N.A)(c,r)&&c[r];return(0,s.jsx)(w.ck,{my:"6","data-typename":r,"data-sys-id":t.id,children:(0,s.jsxs)(_.A,{href:d(t.id),variant:"ghost",...A.link,rel:"noopener noreferrer","aria-label":a,children:["string"==typeof h?(0,s.jsx)(S.E,{...A.typename,children:h}):null,(0,s.jsx)(i.D,{as:"h2",size:"md",noOfLines:3,...A.heading,children:a}),l&&(0,s.jsx)(S.E,{noOfLines:4,...A.preamble,children:l}),(0,s.jsx)(k.c,{hidden:n,...A.divider})]})})};E.displayName="ResultsListItem";let C="ResultsList",L=e=>{let{results:r}=e;return(null==r?void 0:r.length)?(0,s.jsx)(w.B8,{"data-testid":C,id:"search-results",children:r.map((e,t)=>(0,s.jsx)(E,{...e,isLast:t===r.length-1},e.sys.id))}):null};L.displayName=C;var O=t(77464);let P="SearchContent",R={wrapper:{w:"full"},input:{h:"20",boxSize:"2rem",fontSize:{base:"md",md:"lg"}}},I=()=>{let{t:e,lang:r}=(0,u.A)(),{push:t,query:a,isReady:l}=(0,d.useRouter)(),i="string"==typeof a.query?a.query:"",{data:m,error:x,trigger:j,status:q}=(()=>{let{lang:e}=(0,u.A)(),r=(0,g.J)(e),{isReady:t,query:s}=(0,d.useRouter)(),[a,l]=(0,o.useState)("string"==typeof s.query?s.query:"");(0,o.useEffect)(()=>{t&&"string"==typeof s.query&&s.query&&l(s.query)},[t]);let{data:n,error:i,status:c}=(0,h.I)([b,a,r],{queryFn:e=>{let{signal:r,queryKey:[,t,s]}=e;return function(e,r){var t;return(null==(t=r.query)?void 0:t.trim())?fetch("".concat(b,"?").concat(new URLSearchParams({...r}).toString()),{method:"POST",signal:e}).then(e=>f(e)):Promise.resolve({total:0,items:[]})}(r,{query:t,lang:s})},keepPreviousData:!0}),m=(0,y.A)(()=>{var e,r;return i?{total:0,items:[]}:{total:null!=(e=null==n?void 0:n.total)?e:0,items:null!=(r=null==n?void 0:n.items)?r:[]}},p());return(0,o.useMemo)(()=>({status:c,data:m,error:i,trigger:l}),[i,m,c])})(),{register:w,setValue:S,getValues:k,handleSubmit:_,formState:{isSubmitting:N}}=(0,c.mN)({defaultValues:{query:""},mode:"onChange"}),z=(0,o.useCallback)(()=>S("query",""),[S]),A=(0,o.useCallback)(async e=>{let r=e.query.trim();j(r),await t({query:{query:r}},void 0,{shallow:!0,scroll:!0})},[t,j]);(0,o.useEffect)(()=>{let e=k().query;l&&i!==e&&(j(i),S("query",i))},[l,i,r]);let E=N||"loading"===q;return(0,s.jsx)(n.az,{...R.wrapper,children:(0,s.jsxs)(n.az,{as:"form",role:"search",name:P,onSubmit:_(A),"data-testid":P,children:[(0,s.jsx)(O.A,{...R.input,register:w,clearInput:z,isSubmitting:E}),(0,s.jsx)("button",{type:"submit",hidden:!0,disabled:E,children:e("components.header.searchInput.button")}),(0,s.jsx)(v,{count:m.total,isLoading:E,isError:!!x}),(0,s.jsx)(L,{results:m.items})]})})};I.displayName=P;let W=()=>{let{t:e}=(0,u.A)();return(0,s.jsx)(a.m,{maxW:"desktop",p:{base:"4",lg:"10"},py:{base:"10",lg:"16"},children:(0,s.jsxs)(l.s,{wrap:{base:"wrap",lg:"nowrap"},children:[(0,s.jsx)(n.az,{minW:{base:"full",lg:"side-block-lg"},children:(0,s.jsx)(i.D,{as:"h1",size:"lg",mb:4,color:"primary.red",children:e("pages.search.title")})}),(0,s.jsx)(n.az,{w:"full",minWidth:"0",zIndex:"0",children:(0,s.jsx)(I,{})})]})})};W.displayName="Search",W.displayName="SearchPage";var D=!0;let B=W},27358:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return t(5212)}
1])}},e=>{e.O(0,[478,636,593,792],()=>e(e.s=27358)),_N_E=e.O()}]);

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.