(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[469],{9419:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/newsletter/[...path]",function(){return t(9454)}])},9454:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return k},default:function(){return C},getDocument:function(){return E}});var r=t(3235),i=t(2322),a=t(2784),s=t(752),l=t(1108),o=t(2103),c=t(8374),u=t(3128),d=t(7729),h=t.n(d),p=t(7348),f=t(4828);function x(){let e=(0,r._)(["\n  query getRedirect($path: String!, $externalBaseUrl: String!) {\n    redirection(path: $path, externalBaseUrl: $externalBaseUrl) {\n      target\n      status\n    }\n  }\n"]);return x=function(){return e},e}let g=(0,p.Ps)(x());var w=(0,f.B)(g,{props:e=>{let{data:n,ownProps:{serverContext:t,externalBaseUrl:r}}=e,i=!n.error&&!n.loading&&n.redirection;if(i){let{target:e,status:n}=i;return t.res.redirect(n||302,"".concat(r).concat(e)),{loading:!0}}return t&&(t.res.statusCode=404),{loading:!1}}})(e=>{let{loading:n}=e;return(0,i.jsx)(c.Loader,{loading:n,render:()=>(0,i.jsxs)(o.ZP,{children:[(0,i.jsx)(h(),{children:(0,i.jsx)("title",{children:"404"})}),(0,i.jsx)("h1",{children:"404"}),(0,i.jsx)("p",{children:"Seite nicht gefunden."})]})})}),j=t(1978),_=t(5632),m=t(5697);function b(){let e=(0,r._)(["\n  query getDocument($path: String!) {\n    newsletter: document(path: $path) {\n      content\n      meta {\n        publishDate\n        prepublication\n        slug\n        path\n        title\n        description\n        image\n        facebookTitle\n        facebookImage\n        facebookDescription\n        twitterTitle\n        twitterImage\n        twitterDescription\n        seoTitle\n        seoDescription\n        shareText\n        shareFontSize\n        shareInverted\n        shareTextPosition\n        format {\n          meta {\n            externalBaseUrl\n          }\n        }\n      }\n    }\n  }\n"]);return b=function(){return e},e}let v={prepub:(0,j.css)({position:"absolute",background:"#E9A733",width:"100%",padding:"2px 5px",color:"#ffffff",zIndex:10})},P=(0,c.createNewsletterWebSchema)({Paragraph:o.nv,List:o.aV,ListItem:o.HC});var k=!0;let E=(0,p.Ps)(b()),S=e=>{let{newsletter:n}=e,t={...n.meta,url:"".concat(l.tx,"/newsletter").concat(n.meta.path)},r=(0,u.c)(n.content);return(0,i.jsxs)(o.ZP,{raw:!0,meta:t,children:[t.prepublication&&(0,i.jsx)("div",{...v.prepub,children:"Editoren-Vorschau"}),r.title&&(0,i.jsxs)(i.Fragment,{children:[(0,s.FC)(r.title,P),(0,i.jsxs)(c.Center,{children:[(0,i.jsx)("h1",{children:t.title}),(0,i.jsx)("p",{children:(0,i.jsx)("b",{children:t.description})})]})]}),(0,s.FC)(r.main,P)]})};var C=()=>{let e="/"+(0,_.useRouter)().query.path.join("/"),{data:n,loading:t,error:r,refetch:s}=(0,m.aM)(E,{variables:{path:e}});return(0,a.useEffect)(()=>{!t&&!(null==n?void 0:n.newsletter)&&e.includes("/vorschau/")&&s()},[t,n,e,s]),(0,i.jsx)(c.Loader,{loading:t,error:r,render:()=>(null==n?void 0:n.newsletter)?(0,i.jsx)(S,{newsletter:null==n?void 0:n.newsletter}):(0,i.jsx)(w,{path:e,externalBaseUrl:"".concat(l.tx,"/newsletter")})})}}},function(e){e.O(0,[774,18,135,103,888,179],function(){return e(e.s=9419)}),_N_E=e.O()}]);