PageSourceSearch

https://www.ttela.se/_next/static/chunks/pages/mina-sidor/nyhetsbrev-455f0c6478e09905.js

js ttela.se collected 2026-09-24 09:29:58 UTC 9,513 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[748],{19650:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/mina-sidor/nyhetsbrev",function(){return r(43527)}])},20146:(e,t,r)=>{"use strict";r.d(t,{h:()=>x});var i=r(94513),n=r(38255),s=r(10288),a=r(89381),l=r(57005),o=r(53334),d=r(8664),c=r(45106),h=r(20397),p=r(5930);let m=()=>(0,i.jsx)(h.v.Nav,{children:(0,i.jsx)(n.m,{children:(0,i.jsx)(h.v.HorizontalList,{children:c.JW.map(({path:e,name:t},r)=>(0,i.jsx)(p.q,{isHorizontal:!0,path:e,name:t},t+r))})})});var u=r(41528),g=r(56691);let x=({openGraphData:e,withMenu:t=!0,children:r})=>{let c=(0,l.Hr)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.A,{openGraphData:e,titleMetaData:e,showTakeoverAd:!1}),(0,i.jsx)(d.A,{isOn:!0}),(0,i.jsxs)(g.A,{disableFooter:c,fluid:!0,children:[t?(0,i.jsx)(o.qX,{children:(0,i.jsx)(m,{})}):null,(0,i.jsx)(s.h,{value:a.B.Spacing24}),(0,i.jsx)(n.m,{withMinHeight:!0,className:"c-mypages-wrapper",children:r}),(0,i.jsx)(s.h,{value:a.B.Spacing40})]})]})}},35982:(e,t,r)=>{"use strict";r.d(t,{P:()=>i.P});var i=r(59003)},43527:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var i=r(94513),n=r(75629),s=r(57005),a=r(20146),l=r(53211),o=r(49311),d=r(98122),c=r(60994);let h="Mina Sidor - Nyhetsbrev",p=(0,c.K)({Component:(0,d.OZ)({Component:()=>{let e=(0,s.UO)(),t=(0,s.Pj)(),r=t.getSiteBaseUrl(),{newsletters:d}=(0,n.K)(),c={title:`${t.getFullTitleName()} | Nyhetsbrev`,description:`${h} - ${t.getSiteBaseUrl()}`,type:"website",image:t.getLogoUrl()};return(0,i.jsxs)(a.h,{openGraphData:c,children:[(0,i.jsx)(l.d.Heading,{children:"Prenumerera p\xe5 v\xe5ra nyhetsbrev"}),(0,i.jsx)(l.d.IntroText,{children:"V\xe5ra journalister ger dig noggrant utvalt inneh\xe5ll inom de \xe4mnen som intresserar dig."}),(0,i.jsx)(l.d.IntroText,{children:"Klicka p\xe5 knappen vid respektive nyhetsbrev f\xf6r att b\xf6rja f\xe5 nyhetsbrevet i din mejlbox."}),(0,i.jsx)(l.d.Container,{children:d.map(t=>(0,i.jsx)(o.A,{siteName:e,newsletter:t,baseUrl:r},t.id))})]})},shouldRedirect:d.Rm}),loggedOutText:"Du m\xe5ste vara inloggad f\xf6r att ta del av Mina sidor",loggedOutTitle:h})},49311:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var i=r(94513),n=r(94285),s=r(75629),a=r(9876),l=r(12551),o=r(1133),d=r(6269),c=r(31157),h=r(60839),p=r(53211);let m=({newsletter:e,siteName:t,customSettings:r={subscribeText:"Prenumerera",unsubscribeText:"Avprenumerera",rightAlignButton:!1,hideImage:!1}})=>{let[m,u]=(0,n.useState)(!1),g=e?.title?.replace("*newspaper_short*",t),[x,w]=(0,n.useState)(void 0),b=e.image?x||`/${e.image}`.toLowerCase():void 0,[f,{status:j}]=(0,a.DB)(),{updateNewsletterSubscription:v,loading:y}=(0,s.K)(),A="resolved"===j&&!y&&!m,[I,C]=(0,n.useState)(!1),N=async()=>{if(f&&e?.id){u(!0);try{await v({targetNewsletterId:e.id,newSubscribedState:!e.follows}),(0,h.KA)("manageNewsletter",e.follows?"unsubscribe":"signup")}catch(t){c.vF.error({newsletterId:e.id},"Update for newsletter failed")}finally{u(!1)}}else C(!0)};(0,n.useEffect)(()=>{f&&C(!1)},[f]);let k=e.follows?"theme-tertiary":"theme",O=(0,i.jsx)(p.d.ItemButton,{onClick:N,disabled:!A,variant:k,"data-testid":"newsletter-item-subscribe-button",children:e.follows?r.unsubscribeText:r.subscribeText});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(p.d.Item,{children:[!r.hideImage&&(0,i.jsx)(p.d.ImageContainer,{children:A&&b&&(0,i.jsx)(p.d.ItemImage,{src:b,alt:e.title??"",width:126,height:189,loader:d.A,placeholder:"empty",onError:()=>w("/images/newsletters/nyheter.png")})}),(0,i.jsxs)(p.d.ItemDescription,{children:[(0,i.jsxs)("div",{"data-testid":"newsletter-item-description",children:[(0,i.jsx)("h3",{children:g}),e?.description&&(0,i.jsx)(o.d,{as:"p",html:e.description.replace("bold","strong")})]}),r.rightAlignButton?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(i.Fragment,{children:[" ",O," "]})]}),r.rightAlignButton?O:(0,i.jsx)(i.Fragment,{})]}),I&&(0,i.jsx)(l.A,{onClose:()=>C(!1),open:I,type:"newsletter"})]})}},53211:(e,t,r)=>{"use strict";r.d(t,{d:()=>x});var i=r(43492),n=r(14531),s=r(54020),a=r(60930),l=r(49490),o=r.n(l),d=r(11730);let c=d.Ay.div.withConfig({componentId:"sc-cdb3ee99-0"})(["display:grid;grid-gap:1.625rem;grid-template-columns:1fr;",";@media ","{grid-template-columns:1fr 1fr;}"],(0,s.xe)({my:"1.625rem"}),n.j.md),h=d.Ay.h2.withConfig({componentId:"sc-cdb3ee99-1"})([""]),p=d.Ay.span.withConfig({componentId:"sc-cdb3ee99-2"})(["display:block;"]),m=d.Ay.div.withConfig({componentId:"sc-cdb3ee99-3"})(["display:flex;flex-wrap:wrap;align-items:center;background-color:var(--theme-secondary-bg);",";border-radius:0.25rem;"],(0,s.xe)({p:"1rem"})),u=d.Ay.div.withConfig({componentId:"sc-cdb3ee99-4"})(["width:126px;height:189px;position:relative;"]),g=(0,d.Ay)(o()).withConfig({componentId:"sc-cdb3ee99-5"})(["border-radius:5%;height:189px;width:126px;line-height:1;"]),x={ImageContainer:u,Container:c,Heading:h,IntroText:p,Item:m,ItemImage:g,ItemDescription:d.Ay.div.withConfig({componentId:"sc-cdb3ee99-6"})(["display:flex;width:calc(100% - 126px);box-sizing:border-box;flex-direction:column;justify-content:space-between;flex-grow:1;",";h3{",";",";@media ","{",";}}p{color:var(--gray-800);",";",";}"],(0,s.xe)({pl:".9735rem",pr:0}),(0,s.xe)({mb:0}),(0,a.I)({fontSize:"1.25rem"}),n.j.lg,(0,a.I)({fontSize:"1.5625rem"}),(0,s.xe)({mt:".3125rem",mb:"15px"}),(0,a.I)({fontSize:"15px",lineHeight:"1.3"})),ItemButton:(0,d.Ay)(i.$n).withConfig({componentId:"sc-cdb3ee99-7"})(["&.btn{max-width:168px;}"])}},59003:(e,t,r)=>{"use strict";r.d(t,{P:()=>i.A});var i=r(56691)},60010:(e,t,r)=>{"use strict";r.d(t,{c:()=>p});var i=r(94513),n=r(43492),s=r(57005),a=r(91544),l=r(11730),o=r(75769),d=r
1(39154),c=r(15923),h=r(37009);let p=({title:e,text:t})=>{let r=(0,s.Hr)(),l=(0,a.useRouter)().asPath;return(0,i.jsx)(o.wn,{children:(0,i.jsxs)(m,{isMobileApp:r,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(o.hE,{children:e}),(0,i.jsx)("p",{children:t})]}),(0,i.jsx)(u,{children:r?(0,i.jsx)(n.$n,{variant:"primary",size:"large",onClick:()=>{(0,h.eT)()},children:(0,c.u)("link","login")}):(0,i.jsx)(n.Aj,{variant:"primary",size:"large",href:(0,d.aM)(d.Y0.LOGIN,l),children:(0,c.u)("link","login")})})]})})},m=(0,l.Ay)(o.UC).withConfig({componentId:"sc-672be926-0"})(["",""],({isMobileApp:e})=>{if(e)return(0,l.AH)(["height:calc(100vh - 2rem);display:flex;flex-direction:column;justify-content:space-between;"])}),u=(0,l.Ay)(o.eM).withConfig({componentId:"sc-672be926-1"})(["align-self:center;"])},60994:(e,t,r)=>{"use strict";r.d(t,{K:()=>g});var i=r(94513);r(94285);var n=r(10485),s=r(38255),a=r(54020),l=r(9876),o=r(57005),d=r(11730),c=r(35982),h=r(41528),p=r(73478),m=r(60010);let u=(0,d.Ay)(s.m).withConfig({componentId:"sc-26f2c522-0"})([""," min-height:40vh;"],(0,a.xe)({my:3,px:3})),g=({Component:e,loggedOutText:t="Du m\xe5ste vara inloggad f\xf6r att kunna se denna sidan.",loggedOutTitle:r})=>{let s=s=>{let[a,d]=(0,l.DB)(),g=(0,o.Hr)(),{isApp:x}=(0,o.nO)(),w=(0,o.Pj)(),b=`${w.getFullTitleName()} | ${r} | Utloggad`,f=x?(0,i.jsx)(p.a,{isApp:!0}):(0,i.jsx)(m.c,{title:"Logga in",text:t});return a?(0,i.jsx)(e,{...s}):(0,i.jsxs)(i.Fragment,{children:["pending"!==d.status?(0,i.jsx)(h.A,{showTakeoverAd:!1,titleMetaData:{title:b}}):(0,i.jsx)(i.Fragment,{}),(0,i.jsx)(c.P,{fluid:!0,disableFooter:g,children:(0,i.jsx)(u,{children:"pending"===d.status?(0,i.jsx)(n.r,{children:(0,i.jsx)(n.y,{})}):f})})]})};return s.displayName=`withProtectedRoute(${e.displayName||e.name||"Component"})`,s}},75629:(e,t,r)=>{"use strict";r.d(t,{K:()=>a});var i=r(3197),n=r(31157),s=r(9876);let a=()=>{let[e,{status:t}]=(0,s.DB)(),r=e?"userNewsletters":"newsletterList",{data:n,mutate:a,error:d,isValidating:c}=(0,i.Ay)("resolved"===t?r:null,()=>o(e),{refreshInterval:0,revalidateOnMount:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshWhenOffline:!1,shouldRetryOnError:!1}),h=n??[];return{newsletters:h,loading:!n&&!d||c,updateNewsletterSubscription:l(h,a,e)}},l=(e,t,r)=>async({newSubscribedState:i,targetNewsletterId:s})=>{if(!r)throw Error("updating followstate while not signed in not allowed");let a=e.map((({newSubscribedState:e,targetNewsletterId:t})=>r=>r.id===t?{...r,follows:e}:r)({newSubscribedState:i,targetNewsletterId:s}));await t(d({optimisticData:a,newSubscribedState:i,targetNewsletterId:s}).catch(e=>{throw n.vF.error({error:e},`Error ${i?"subscribing":"unsubscribing"} to newsletter with id ${s}`),e}),{optimisticData:a,revalidate:!1,rollbackOnError:!0})},o=async e=>fetch(e?"/api/resource/newsletter":"/api/c/newsletterList").then(e=>e.json()),d=async({optimisticData:e,newSubscribedState:t,targetNewsletterId:r})=>{if(!(await fetch("/api/resource/newsletter",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({newsletterId:r,subscribed:t})})).ok)throw Error("Failed to update newsletter subscritpions");return e}},98122:(e,t,r)=>{"use strict";r.d(t,{By:()=>h,OZ:()=>o,Q2:()=>d,Rm:()=>c});var i=r(94513),n=r(94285),s=r(14493),a=r(57005),l=r(91544);let o=({Component:e,shouldRedirect:t,redirectTo:r="/"})=>function(o){let d=(0,a.Pj)(),c=(0,l.useRouter)(),[h,p]=(0,n.useState)(!1),{cmsSettings:m,isLoading:u}=(0,s.m)(d.settingsEtag,d.cmsSettings);(0,n.useEffect)(()=>{u||p(!0)},[u]);let g=t(m);return(0,n.useEffect)(()=>{h&&g&&c.replace(r)},[g,c,h]),h&&!g?(0,i.jsx)(e,{...o}):null},d=e=>!e.admin.webmaster.purchaseflow.purchaseEnabled,c=e=>!e.admin.webmaster.mypages.showMyPages,h=e=>!e.admin.webmaster.mypages.readLater.isActive}},e=>{e.O(0,[1985,5599,1960,1633,2665,4973,640,7318,1482,3864,4314,2463,4440,636,6593,8792],()=>e(e.s=19650)),_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.