import{a as z}from"./csdLL1z_.js";import{G as C,aY as A,R as U,aZ as q,a_ as N,a$ as F,b0 as W,b1 as H,k as M,l as y,u as b,S as E,L as u,j as B,g as V,av as I,b2 as x,ad as J,aB as X,aM as R,b3 as Y,_ as G,b4 as K,r as Q,o as Z,b as ee,b5 as te}from"./rEkXUOr9.js";function oe(e,n){if(typeof e!="string")throw new TypeError("argument str must be a string");const t={},o=n||{},s=o.decode||ne;let i=0;for(;iq(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},T=globalThis.cookieStore;function re(e,n){const t={...ae,...n};t.filter??=l=>l===e;const o=_(t)||{};let s;t.maxAge!==void 0?s=t.maxAge*1e3:t.expires&&(s=t.expires.getTime()-Date.now());const i=s!==void 0&&s<=0,a=i||o[e]===void 0||o[e]===null,c=g(i?void 0:o[e]??t.default?.()),r=s&&!i?ue(c,s,t.watch&&t.watch!=="shallow"):C(c);{let l=null;try{!T&&typeof BroadcastChannel<"u"&&(l=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const p=(d=!1)=>{!d&&(t.readonly||W(r.value,o[e]))||(le(e,r.value,t),o[e]=g(r.value),l?.postMessage({value:t.encode(r.value)}))},m=d=>{const h=d.refresh?_(t)?.[e]:t.decode(d.value);w=!0,r.value=h,o[e]=g(h),H(()=>{w=!1})};let w=!1;const k=!!N();if(k&&A(()=>{w=!0,p(),l?.close()}),T){const d=h=>{const f=h.changed.find(v=>v.name===e),L=h.deleted.find(v=>v.name===e);f&&m({value:f.value}),L&&m({value:null})};T.addEventListener("change",d),k&&A(()=>T.removeEventListener("change",d))}else l&&(l.onmessage=({data:d})=>m(d));t.watch&&U(r,()=>{w||p()},{deep:t.watch!=="shallow"}),a&&p(a)}return r}function _(e={}){return oe(document.cookie,e)}function ce(e,n,t={}){return n==null?P(e,n,{...t,maxAge:-1}):P(e,n,t)}function le(e,n,t={}){document.cookie=ce(e,n,t)}const $=2147483647;function ue(e,n,t){let o,s,i=0;const a=t?C(e):{value:e};return N()&&A(()=>{s?.(),clearTimeout(o)}),F((c,r)=>{t&&(s=U(a,r));function l(){i=0,clearTimeout(o);const p=n-i,m=p<$?p:$;o=settimeout(()=>{if(i+=m,i{const e=M().siteIdentity,n=B(),t=y(),{locale:o,t:s}=b(),i=u(()=>n.public.DESIGNTYPE==="freebrand-simple"),a=u(()=>t.path.split("/")[2]==="nsb"),c=C(null);E(async()=>{if(!a.value||!t.query.id)return;const f=z(`onsb_${o.value}_${t.query.id}`),L=`${n.public.CONTENTBROKER_NEWS_API_PUBLIC_URL}/v1/${f}`;try{const D=(await(await fetch(L)).json())?.content;c.value=D?.departments?.[0]?.name}catch(v){pe.error("Error fetching data:",v)}});const r=e?.metadata,l=u(()=>a.value?c.value??"Webseiten Titel":""),p=u(()=>r?.websiteSubtitle?r?.websiteTitle+"
"+r?.websiteSubtitle:r?.websiteTitle??"Webseiten Titel"),m=u(()=>{const f="Mobile Titel";return a.value?c.value??f:r?.websiteTitleMobile??f}),w=u(()=>{const f=i.value?"":"/images/swiss-logo-flag.svg";return r?.websiteLogo?.originalUrl??f}),k=u(()=>r?.websiteLogo?.imageAlt??s("headerLogoAlt")),d=u(()=>{const f=i.value?"":"/images/swiss-logo-name.svg";return r?.websiteLogoAddition?.originalUrl??f}),h=u(()=>r?.websiteLogoAddition?.imageAlt??s("headerDescriptionAlt"));return{props:u(()=>({homepagelink:`/${o.value}`,title:p.value,accronym:m.value,logoImagePath:w.value,logonameimagepath:d.value,logoAltText:k.value,logoDescriptionAltText:h.value,homepageLinkLabel:s("haederLinkLabel"),isFreebrand:i.value})),nsbTitle:l}},de=e=>window?.sessionStorage?sessionStorage.getItem(e):null,fe=e=>{window?.sessionStorage&&sessionStorage.removeItem(e)},ge=(e,n)=>{window?.sessionStorage&&sessionStorage.setItem(e,n)},me=(e,n)=>{let t=`/${n}`;const o=de("accessiblePageEntry");if(!o)return t;try{const{standardPage:s,accessiblePage:i}=JSON.parse(o);e===i&&(t=s)}catch{}return fe("accessiblePageEntry"),t},be=(e,n)=>{try{ge("accessiblePageEntry",JSON.stringify({standardPage:e,accessiblePage:n}))}catch{}},je=e=>{const{accessibilityLinks:n}=I(),t=y(),{locale:o}=b(),s=n[e];return{isAvailable:u(()=>!!s),navigate:()=>{if(s)return be(t.path,s),x({path:s},{external:!0})},closePage:()=>x({path:me(t.path,o.value)},{external:!0})}},he=e=>(n="")=>{if(n===null)return null;const o=n.split("/").filter(Boolean),s=o[0];return e.includes(s)?`/${o.slice(1).join("/")}`:`/${o.join("/")}`},j=(e,n)=>t=>{if(t===null)return null;const o=he(e)(t);return`/${n}${o}`},we=e=>{const n=["de","fr","it","en","rm"],t=new Map(n.map((o,s)=>[o,s]));return e.sort((o,s)=>{const i=t.get(o.locale),a=t.get(s.locale);return i===void 0&&a===void 0?o.locale.localeCompare(s.locale):i===void 0?1:a===void 0?-1:i-a}),e.map(o=>({code:o.locale,label:o.label}))},ve=(e,n,t)=>{const o=Object.keys(e).map(a=>`${a}=${e[a]}`).join("&"),i=[n,...t.slice(1)].filter(Boolean).join("/");return o?`/${i}?${o}`:`/${i}`},ye=(e,n,t)=>{const o=e.find(c=>c.lang===n.code),s=y(),i=s.path.split("/").filter(Boolean);return["search","overview","publication","nsb","newnsb"].includes(i[1])?j(t??[],n.code)(ve(s.query,n.code,i)):o?j(t??[],n.code)(o.slug):`/${n.code}`},ke=()=>{const{locale:e}=b(),n=J().$i18nLivingdocs.available,t=n.map(i=>i.locale),o=u(()=>we(n)),s=I().pageTranslations;return u(()=>o.value.map(i=>{const a=ye(s,i,t);return{...i,href:a??"",active:i.code===e.value}}))},Ue=()=>{const{t:e}=b(),n=ke(),t=u(()=>n.value.map(r=>({...r,label:e(r.code.toLowerCase())}))),o=u(()=>{const r=t.value.find(({active:l})=>l);return{code:r?.code?.toUpperCase()||"",label:r?.label||""}}),s=u(()=>n.value.map(({code:r})=>({value:r.toUpperCase(),name:r.toUpperCase()})));function i(r){const l=n.value.find(p=>p.code.toLowerCase()===r.toLowerCase());l?.href&&x(l.href,{external:!0})}function a(r){const l=r.value?.$el?.querySelector("select");l&&(l.value=o.value.code)}const c=u(()=>{const r=e("changeLanguage");return o.value.label?r.replaceAll(/<.*?>/gm,o.value.label):""});return{activeLanguage:o,options:s,setSelectedLanguage:i,syncSelectValue:a,translatedLabel:c}},Se=["","404","search","overviewnsb","overviewnews","overviewevents","overviewservices","overviewpublications","overvieworganizations"],Te=new Set(["page-glossary"]),xe=(e,n)=>{const t=e.replaceAll("/","");return Se.every(o=>t!==`${n}${o}`)},Ce=()=>{const{locale:e}=b(),n=y(),t=I();return u(()=>{const o=t.pageContentType;return!o||Te.has(o)?!1:xe(n.path,e.value)})},Le=()=>{const e=C(0),n=()=>{e.value=window.innerWidth};return E(()=>{n(),window.addEventListener("resize",n)}),X(()=>{window.removeEventListener("resize",n)}),u(()=>e.value<=1023?"mobile":"desktop")},ne=()=>({shareBarIsVisible:Ce(),context:Le()}),O=(e,n)=>(e?.children??[]).map(t=>({title:n&&(t.title==="easyLang"||t.title==="signLang")?n(`topBarAccessibilityTitles.${t.title}`):t.title,link:t.link,linkTarget:t.linkTarget,icon:t.icon})),Me=()=>{const e=R();return u(()=>O(e.metaNavigation))},Be=()=>{const{t:e}=b(),n=R();return u(()=>O(n.topBarNavigation,e))},Re=()=>{const e=Y(),{locale:n}=b();return async()=>{window.history.length>1?e.back():await x({path:`/${n.value}`},{external:!0})}},Oe=()=>{const e=re("ssg_analytics_accepted"),n=M();function t(){o(n?.siteIdentity?.metadata?.matomoScript)}function o(s){if(!s)return;const i=document.createElement("script");i.text=s,document.body.append(i)}return E(()=>{const s=n?.siteIdentity?.metadata?.requireUserCookieConsent;(String(e.value)==="true"||!s)&&t(),o(n?.siteIdentity?.metadata?.additionalScript)}),{injectMatomoScript:t}},Ae={components:{WglNotificationBanner:K},setup(){const e=te();let n=!1;const t=e.cookiepopupData;return t&&t.cookiepopup&&(n=!0),{text:t?.cookiepopup?.cookietext||"",accepttext:t?.cookiepopup?.accepttext||"",declinetext:t?.cookiepopup?.declinetext||"",isclosed:!0,cookiepopupExists:n}},computed:{acceptAction(){return()=>{this.isclosed||this.$emit("cookieAccepted"),this.$cookies.set("ssg_analytics_accepted",!0)}},declineAction(){return()=>{this.$cookies.set("ssg_analytics_accepted",!1)}}},beforeMount(){const e=this.$cookies.isKey("ssg_analytics_accepted");this.isclosed=!(!e&&this.cookiepopupExists)}};function Ee(e,n,t,o,s,i){const a=Q("wgl-notification-banner");return Z(),ee(a,{type:"info",text:o.text,"button-accept-text":o.accepttext,"button-decline-text":o.declinetext,"is-fixed":!0,"is-closed":o.isclosed,"accept-action":i.acceptAction,"decline-action":i.declineAction},null,8,["text","button-accept-text","button-decline-text","is-closed","accept-action","decline-action"])}const De=Object.assign(G(Ae,[["render",Ee]]),{__name:"StructureCookiepopup"}),Ie=()=>{const e=y();return u(()=>new URLSearchParams(e.query))},ze=()=>{const e=y(),{t:n}=b(),t=B(),o=Ie(),s=()=>{const i=new URL(e.path,`https://${t.public.SITEMAP_URL}`);return o.value&&(i.search=o.value.toString()),i.toString()};return u(()=>{const i=s();return{links:[{label:"Facebook",icon:"Facebook",link:`https://www.facebook.com/sharer.php?u=${i}`,title:n("facebookTitle")},{label:"Twitter",icon:"Twitter",link:`https://twitter.com/share?url=${i}`,title:n("twitterTitle")},{label:"LinkedIn",icon:"LinkedIn",link:`https://www.linkedin.com/sharing/share-offsite/?url=${i}`,title:n("linkedInTitle")},{label:"Xing",icon:"Xing",link:`https://www.xing.com/spi/shares/new?url=${i}`,title:n("xingTitle")},{label:"Whatsapp",icon:"Phone",link:`https://api.whatsapp.com/send?text=${n("whatsappTitle")}%20${i}`,title:n("whatsappTitle")}],website:i,copyButtonText:n("copyButtonText")}})};export{De as C,Ue as a,je as b,Me as c,Ne as d,Re as e,Oe as f,ze as g,Be as h,$e as u};

AltStyle によって変換されたページ (->オリジナル) /