PageSourceSearch

https://www.swp.de/static/assets/DZ2xWZrD.js

js swp.de collected 2026-09-24 08:43:06 UTC 8,512 bytes, 1 lines download raw bytes

1import ie from"./C8me8Yxg.js";import{d as ae,r as g,K as k,m as se,S as re,x as le,aB as ue,p as D,ae as ce,A as de,o as me,R as E,e as r,f as l,i as K,w as B,g as i,F as v,l as M,k as C,v as pe,j as L,q as j,c as a,M as O,O as W,aC as H,n as J,h as I,_ as fe}from"./wGaC-Zcn.js";import{N as be}from"./B7KIGEBT.js";import"./BNwYj8wM.js";import"./DrE469NJ.js";import"./La00Ijyy.js";import"./BfYqtZUW.js";import"./DIu70L6q.js";import"./sTTMYkzP.js";import"./BehRJDZa.js";import"./wBKEM5pJ.js";import"./CotgsRq0.js";import"./2LaCKLr6.js";import"./mkZzzYft.js";import"./BGG3FQIg.js";import"./DtxA6ZXE.js";import"./C2CcVVBo.js";import"./CJUgHS6l.js";import"./BGFod6da.js";import"./B7pRSIFn.js";import"./-jdA4pKC.js";import"./BFEV7oOG.js";import"./CQK3CvcC.js";import"./DgMihJOi.js";import"./C7IgfJOi.js";import"./DPV69xC8.js";import"./CVbQMhyD.js";import"./CPeRe0Bd.js";import"./DEHJaEqD.js";import"./DezPDB9o.js";import"./BH07OsSP.js";import"./DceIif45.js";import"./DQzS1Qg_.js";import"./B6cpWjtx.js";import"./CVMx9qG5.js";import"./X9MRHzqW.js";import"./Co1YIp_a.js";import"./BR_rOBzX.js";const ve={class:"u-main-content u-meine-region"},we={class:"u-sort-controls u-section--style-box"},ge={key:0,class:"u-notification-bar"},he={class:"u-notification-bar__button-container"},_e=["aria-label"],ke={key:2,class:"u-meine-region__location-block u-meine-region__location-block-by-date"},Ce=["onClick","disabled"],ye={key:3,class:"u-meine-region__location-block"},xe=["onClick","disabled"],ct=ae({__name:"index",async setup(Te){let m,y;const h=g([]),b=g("date");function X(t){h.value=t.filter(Boolean)}const A=k(()=>[...h.value].sort((t,e)=>t.localeCompare(e,"de"))),G=k(()=>Math.max(4,h.value.length*3)),_=se(),Q=re(),x=le()||{},Y=ue(),{data:Z}=([m,y]=D(()=>j("/api/no-cache/user/user-favourites/available-locations","$CIU95qKufN")),m=await m,y(),m),{data:R}=([m,y]=D(()=>j("/api/newsletter","$XjiIe9CCMl")),m=await m,y(),m),$=k(()=>{const t={};for(const e of Z.value??[]){const o=String(e?.label??"").trim();o&&(t[o]=e)}return t}),U=k(()=>A.value.map(t=>{const e=$.value[t]?.cleverpushId;return e?{location:t,id:e}:null}).filter(Boolean)),p=g([]),N=g(!1);function w(...t){window.CleverPush=window.CleverPush||[],window.CleverPush.push(t)}function S(){w("getTopics",(t,e)=>{t||(p.value=e??[],N.value=!0)})}function F(){const t=window.CleverPush;t?.on?.("subscribed",S),t?.on?.("topicsSet",S),w("isSubscribed",e=>{e&&S()})}function z(t){if(!N.value)return;const e=p.value.includes(t)?p.value.filter(o=>o!==t):[...p.value,t];w("setTopics",e),p.value=e}function ee(t){w("isSubscribed",e=>{if(e){z(t);return}w("subscribe",o=>{o||w("getTopics",(s,u)=>{s||(p.value=u??[],N.value=!0),z(t)})})})}const P=k(()=>{const t=R.value??[];return A.value.map(e=>{const o=$.value[e]?.newsletterId;if(!o)return null;const s=String(o),u=t.find(n=>[n?.documentId,n?.newsletter_id].map(f=>f?.toString()).includes(s));return!u||u.active===!1?null:{location:e,newsletter:u}}).filter(Boolean)}),V=g(null),c=g(null),d=ce({countAbos:-1,formPrivacyText:_?.privacyText,formAgreementText:_?.newsletterAgreementText,formInfoText:_?.newsletterTextHint,loggedIn:Q,newsletterCardAbos:[""],displayHeader:!1,userData:{salutation:x?.salutation,firstName:x?.firstname,lastName:x?.lastname,email:x?.email}});function q(){c.value=null,d.response=void 0}async function te(t){if(c.value===t.location){q();return}const e=t.newsletter,o=_?.newsletter_svg_base_url??"",s=e?.salescloud_key??"";c.value=t.location,d.formTitle=e?.title,d.formText=e?.teaser,d.formKey=s,d.newsletterIcon=o+(s.startsWith("nl_")?s:"nl_default")+".svg",d.newsletterNotificationTime=e?.interval,d.response=void 0,await E()}de(P,t=>{c.value&&(t.some(e=>e.location===c.value)||(c.value=null))});async function ne(t){document.body.dispatchEvent(new CustomEvent("avo-submit-newsletter-form",{detail:V.value}));const e=t?.aboList??[];if(e.length)for(const o of e){const s=(R.value??[]).find(u=>u?.salescloud_key===o);if(s)try{await $fetch("/api/user/newsletter",{method:"POST",body:{newsletter_meta_data:_.newsletter_meta_data,subscriptionSource:"NL-Anmeldung Meine Region",currentURL:Y?.href,...t,campaignId:s.campaign_id}}),d.response={status:"success",title:"Ihre Anmeldung war erfolgreich",message:"Danke für Ihre Bestellung, Ihre Anmeldung war erfolgreich! In Kürze erhalten Sie eine Aktivierungsmail. Bitte beachten Sie: Wenn Sie Ihre E-Mail-Adresse schon einmal bei uns bestätigt haben, erhalten Sie keine Aktivierungsmail mehr."}}catch(u){console.error("[Newsletter] Anmeldung fehlgeschlagen",u),d.response={status:"error",title:null,message:"Ein Fehler ist aufgetreten versuchen Sie es bitte später erneut."}}}}return me(async()=>{await E();const t=document.querySelector(".u-personalization-with-options .u-info-box"),e=document.querySelector("main.u-main-content");
1if(t&&e?.appendChild(t),window.CleverPush?.initialized)F();else{const o=window.cleverPushInitCallback;window.cleverPushInitCallback=s=>{o?.(s),s||F()}}}),(t,e)=>{const o=ie,s=fe,u=be;return a(),r("main",ve,[l("section",null,[K(o,{audience:"mein_ort",gridLayout:"1",initialTeaserCount:0,onLocationsUpdated:X},{"meine-region-sort-filter":B(()=>[l("div",we,[e[4]||(e[4]=l("span",null,"Sortierung nach:",-1)),l("div",null,[O(l("input",{id:"radio-date",type:"radio","onUpdate:modelValue":e[0]||(e[0]=n=>W(b)?b.value=n:null),value:"date"},null,512),[[H,i(b)]]),e[2]||(e[2]=l("label",{for:"radio-date"}," Datum ",-1))]),l("div",null,[O(l("input",{id:"radio-region",type:"radio","onUpdate:modelValue":e[1]||(e[1]=n=>W(b)?b.value=n:null),value:"region"},null,512),[[H,i(b)]]),e[3]||(e[3]=l("label",{for:"radio-region"}," Region ",-1))])])]),_:1})]),i(U).length>0||i(P).length>0?(a(),r("section",ge,[e[5]||(e[5]=l("div",{class:"u-notification-bar__title"},"Jetzt Mitteilungen aktivieren oder Newsletter abonnieren",-1)),l("div",he,[(a(!0),r(v,null,M(i(U),n=>(a(),L(s,{key:`push-${n.location}`,"data-topic":n.id,label:i(p).includes(n.id)?`${n.location} aktiviert`:n.location,class:J(["u-notification-bar-button cleverpush-topic-button",{"cleverpush-topic-button-subscribed":i(p).includes(n.id)}]),"data-button-text":n.location,"data-button-text-subscribed":n.location+" aktiviert",type:"button",onClick:f=>ee(n.id)},null,8,["data-topic","label","class","data-button-text","data-button-text-subscribed","onClick"]))),128)),(a(!0),r(v,null,M(i(P),n=>(a(),L(s,{key:`nl-${n.location}`,label:`Newsletter ${n.location}`,class:J(["u-notification-bar-button u-notification-bar-button--newsletter",{"u-notification-bar-button--active":i(c)===n.location}]),"aria-expanded":i(c)===n.location,type:"button",onClick:f=>te(n)},null,8,["label","class","aria-expanded","onClick"]))),128))])])):C("",!0),i(c)?(a(),r("section",{key:1,ref_key:"newsletterAnchorRef",ref:V,class:"u-region-newsletter"},[l("button",{type:"button",class:"u-region-newsletter__close","aria-label":`Newsletter-Anmeldung ${i(c)} schließen`,onClick:q},e[6]||(e[6]=[l("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[l("path",{d:"M1 1L13 13M13 1L1 13",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)]),8,_e),K(u,pe({class:"u-newsletter__form u-newsletter__form--article"},i(d),{onSubmit:ne}),null,16)],512)):C("",!0),i(b)==="date"?(a(),r("div",ke,[i(h).length>0?(a(),L(o,{key:`flat-${i(h).join("|")}`,audience:"mein_ort",gridLayout:"1",initialTeaserCount:i(G),loadMoreTeaserCount:6,hideLocationPicker:!0,locationAudienceTitle:"Regionale Artikel",mergeLocations:""},{"after-teasers":B(({loadMore:n,isLoading:f,hasMore:T})=>[T?(a(),r("button",{key:0,type:"button",class:"u-meine-region__load-more-btn u-base-cta u-base-cta--version-primary u-base-cta--text-left u-base-cta--text-right",onClick:n,disabled:f},[f?(a(),r(v,{key:0},[I("Lädt...")],64)):(a(),r(v,{key:1},[I("weitere Inhalte nachladen")],64))],8,Ce)):C("",!0)]),_:1},8,["initialTeaserCount"])):C("",!0)])):(a(),r("div",ye,[(a(!0),r(v,null,M(i(A),n=>(a(),L(o,{key:n,audience:"mein_ort",gridLayout:"1",initialTeaserCount:6,singleLocation:n,locationAudienceTitle:n},{"after-teasers":B(({loadMore:f,isLoading:T,hasMore:oe})=>[oe?(a(),r("button",{key:0,type:"button",class:"u-meine-region__load-more-btn u-base-cta u-base-cta--version-primary u-base-cta--text-left u-base-cta--text-right",onClick:f,disabled:T},[T?(a(),r(v,{key:0},[I("Lädt...")],64)):(a(),r(v,{key:1},[I("weitere Inhalte nachladen")],64))],8,xe)):C("",!0)]),_:2},1032,["singleLocation","locationAudienceTitle"]))),128))]))])}}});export{ct as default};

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.