PageSourceSearch

https://www.skvidar.no/_next/static/chunks/pages/news-22a77d1435e69a7c.js

js skvidar.no collected 2026-10-07 05:47:18 UTC 4,581 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b82730ce-234b-47fe-940e-ab1ce53b2ac7",e._sentryDebugIdIdentifier="sentry-dbid-b82730ce-234b-47fe-940e-ab1ce53b2ac7")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[277],{42630:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/news",function(){return a(94489)}])},94489:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>C,default:()=>j});var r=a(37876),n=a(31753),s=a(14232),l=a(89099),i=a(77879),o=a(67840),c=a(13145),u=a(52563),d=a(30997),g=a(23647),p=a(60420),y=a(57931),h=a(74441),b=a(41347),m=a(10643);let f=function({articles:e=[],categories:t=[],currentPage:a,pageCount:s,selectedCategory:i}){let f=(0,o.A)(),{t:w}=(0,n.Bd)(),x=(0,l.useRouter)(),_=w("all_categories_option"),C=i||_,j=[_,...t],A=s>0,P=(0,h.X4)(f.palette.primary.main,.35);return(0,r.jsx)(m.A,{"data-sentry-element":"BoxSection","data-sentry-component":"NewsList","data-sentry-source-file":"NewsList.tsx",children:(0,r.jsxs)(c.A,{"data-sentry-element":"Container","data-sentry-source-file":"NewsList.tsx",children:[!A&&(0,r.jsx)(u.A,{variant:"h3",children:w("no_published_articles_text")}),A&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{variant:"h3",children:w("news_tab_name")}
1),(0,r.jsx)(d.A,{value:C,onChange:(e,t)=>{t===_?x.push({pathname:"/news"}):x.push({pathname:"/news",query:{category:t}})},"aria-label":"news category tabs",variant:"scrollable",scrollButtons:"auto",sx:{margin:"1em 0 2em 0",".Mui-selected":{color:"black !important"},"& .MuiTab-root":{minHeight:"28px",padding:"8px 25px"}},TabIndicatorProps:{style:{display:"none"}},children:j.map(e=>(0,r.jsx)(g.A,{label:e.toUpperCase(),value:e,sx:{borderRadius:"5px",backgroundColor:C===e?P:"transparent",color:C===e?f.palette.common.black:f.palette.primary.main}},e))}),(0,r.jsx)(b.A,{data:e}),s>1&&(0,r.jsx)(p.A,{alignItems:"center",mt:4,children:(0,r.jsx)(y.A,{count:s,page:a,onChange:(e,t)=>{let a={};t>1&&(a.page=String(t)),i&&(a.category=i),x.push({pathname:"/news",query:a})},color:"primary",sx:{".MuiPaginationItem-root":{borderRadius:1,"&.Mui-selected":{backgroundColor:P,color:"black","&:hover":{backgroundColor:P}},"&:not(.Mui-selected)":{color:f.palette.primary.main}}}})})]})]})})};var w=a(6459),x=a(703),_=a(47101),C=!0;function j({data:e,articles:t,categories:a,currentPage:i,pageCount:o,selectedCategory:c}){let{t:u}=(0,n.Bd)(),{logoUrl:d}=e,g=(0,l.useRouter)(),{articles:p,isComplete:y}=(0,_.e)(),h=!t,b=(0,s.useMemo)(()=>h&&y?function(e,t,a){let r=Array.from(new Set(e.flatMap(e=>e.categories??[]).filter(Boolean))),n=t&&r.includes(t)?t:void 0;if(t&&!n)return{articles:[],categories:r,currentPage:1,pageCount:0,selectedCategory:null,shouldRedirect:!0,redirectDestination:"/news"};let s=[...n?e.filter(e=>e.categories?.includes(n)):e].sort((e,t)=>new Date(t.publishDate||t.createdAt).getTime()-new Date(e.publishDate||e.createdAt).getTime()),l=s.length,i=Math.ceil(l/5);if(0===l)return{articles:[],categories:r,currentPage:1,pageCount:0,selectedCategory:n||null,shouldRedirect:!1};let o=Math.max(1,parseInt(a||"1",10)||1),c=Math.min(o,i);if(o!==c){let e=new URLSearchParams;c>1&&e.set("page",String(c)),n&&e.set("category",n);let t=e.toString();return{articles:[],categories:r,currentPage:c,pageCount:i,selectedCategory:n||null,shouldRedirect:!0,redirectDestination:`/news${t?`?${t}`:""}`}}return{articles:s.slice((c-1)*5,5*c),categories:r,currentPage:c,pageCount:i,selectedCategory:n||null,shouldRedirect:!1}}(p,"string"==typeof g.query.category?g.query.category:void 0,"string"==typeof g.query.page?g.query.page:void 0):null,[h,y,p,g.query.category,g.query.page]);(0,s.useEffect)(()=>{b?.shouldRedirect&&b.redirectDestination&&g.replace(b.redirectDestination)},[b]);let m=t??b?.articles??[],C=a??b?.categories??[],j=i??b?.currentPage??1,A=o??b?.pageCount??0,P=c??b?.selectedCategory??null;return h&&!y?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.c,{title:u("news_tab_name"),clubName:e.name,clubLogoUrl:d,clubUrl:(0,x.a4)(e),canonicalPath:"/news",image:d,"data-sentry-element":"HeadWithMeta","data-sentry-source-file":"news.tsx"}),(0,r.jsx)(f,{articles:m,categories:C,currentPage:j,pageCount:A,selectedCategory:P,"data-sentry-element":"NewsList","data-sentry-source-file":"news.tsx"})]})}j.getLayout=(e,t)=>(0,r.jsxs)(i.A,{data:t,children:[" ",e," "]})}},e=>{e.O(0,[531,272,511,461,41,698,261,636,593,792],()=>e(e.s=42630)),_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.