From 192c3f653be6d01fb8757c379fdd1bf6ad67bcb7 Mon Sep 17 00:00:00 2001 From: bodobraegger Date: Fri, 12 Jul 2024 14:50:16 +0000 Subject: [PATCH] deploy: ff86d0d534e38ddf8e8fc924d97f066e1325ee98 --- assets/{index-8907da02.js => index-0d9f4327.js} | 2 +- index.html | 2 +- sw.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index-8907da02.js => index-0d9f4327.js} (99%) diff --git a/assets/index-8907da02.js b/assets/index-0d9f4327.js similarity index 99% rename from assets/index-8907da02.js rename to assets/index-0d9f4327.js index 81dac23..20a22fb 100644 --- a/assets/index-8907da02.js +++ b/assets/index-0d9f4327.js @@ -188,4 +188,4 @@ object-assign ](?=s?|$)`,"gmi"))].reduce((B,P)=>B.concat(P),[]);return E=[...new Set(E)],E=E.map(B=>B.replace(new RegExp(h,"gi"),"**$&**")),E}),y=()=>f?null:a.length>=n?l.length>0?l.map(h=>O.jsxs("div",{className:"search-result border rounded",children:[O.jsxs("div",{className:"title-match",style:{color:h.section.color_primary},children:[O.jsx(Er,{to:`/${h.section.slug}`,className:"color-fg-inherit",children:h.section.title})," / ",O.jsx(Er,{to:`/${h.slug_with_section}`,className:"color-fg-inherit",children:h.title})]}),h.matchingContents.length>0?O.jsx("div",{className:"content-match",children:h.matchingContents.map((b,v)=>O.jsx(wo,{remarkPlugins:[ss],components:cs,children:b,className:"border-bottom"},v))}):null]},h.id)):O.jsx("div",{children:e("searchPage.noResults")}):O.jsxs("div",{children:[" ",e("searchPage.noKeyword",{amountOfCharacters:n})]});return O.jsxs(O.Fragment,{children:[O.jsx(w4,{keyword:a,onChange:p}),O.jsx("br",{}),O.jsx(tS,{isLoading:f}),O.jsx("div",{className:"search-results",children:y()})]})}const WF=Nt()(UF);function VF({page:e,sections:t,t:n}){const r=e;return O.jsxs("div",{className:"content",children:[O.jsx(qr,{children:O.jsx("title",{children:n("searchPage.title")})}),O.jsxs("div",{className:"search",children:[O.jsx("h1",{className:"mb-4",children:n("searchPage.title")}),O.jsx(wo,{remarkPlugins:[ss],components:cs,children:r.content}),O.jsx(WF,{sections:t})]})]})}const qF=Nt()(VF),GF=({t:e,xs:t,mediumOrLower:n})=>{const r={de:{name:"Deutsch"},fr:{name:"Français"},it:{name:"Italiano"}},i=Object.keys(r),a=rt.language,o=r[a];if(i.length<2)return null;const l=u=>{rt.changeLanguage(u)},s=i.map(u=>O.jsx(ot.Item,{selected:u===a,onSelect:()=>{if(u)try{console.log("LanguagePicker change to: "+u),l(u)}catch(c){console.warn("Unable to set preferred language",c)}},children:O.jsx("span",{children:r[u].name})},`/${u}`));return O.jsx("div",{className:"d-flex",children:t?O.jsx(O.Fragment,{children:O.jsxs(kn,{children:[O.jsx(kn.Anchor,{children:O.jsxs(kn.Button,{className:"width-full mb-3","aria-label":`Select language: current language is ${o.name}`,sx:{height:"auto",textAlign:"left","span:first-child":{display:"inline"}},children:[O.jsx("span",{style:{whiteSpace:"pre-wrap"},children:e("languagePicker.tooltip")+` `}),O.jsx("span",{className:"color-fg-muted text-normal f6",children:o.name})]})}),O.jsx(kn.Overlay,{align:"end",children:O.jsx(ot,{selectionVariant:"single",children:s})})]})}):n?O.jsx(ot,{className:"hide-sm width-full",selectionVariant:"single",children:O.jsx(ot.Group,{title:e("languagePicker.tooltip"),children:s})}):O.jsxs(kn,{children:[O.jsx(kn.Anchor,{children:O.jsx(xa,{"aria-label":e("languagePicker.tooltip"),direction:"s",children:O.jsx(ea,{icon:Q_,"aria-label":`${e("languagePicker.tooltip")}: ${o.name}`})})}),O.jsx(kn.Overlay,{align:"end",children:O.jsx(ot,{selectionVariant:"single",children:s})})]})})},fy=Nt()(GF);function bp(e){document.querySelectorAll('button:has(.nav-item-title)[aria-expanded="true"]').forEach(n=>{let r=n;r.parentElement.contains(e.target)?e.stopPropagation():r.click()})}function KF(e){const{t}=e,n=Ir(),i=window.sections.map(function(o,l){const s=n.pathname.replace("/","")===o.slug,u=`nav_item_${o.sorting}_${o.slug}`,f=o.chapters.sort(function(d,g){return d.sorting-g.sorting}).map(function(d){const g=n.hash.replace("#","")===d.slug,p=`subnav_item_${d.sorting}_${d.slug_with_section}`;return O.jsxs(oi.Item,{id:p,className:bt("ml-4",`${d.slug_with_section}`),style:{color:o.color_primary},"aria-current":g&&"location",as:Er,to:d.slug_with_section,onClick:bp,children:[O.jsx(oi.LeadingVisual,{style:{color:o.color_primary},children:g?O.jsx(q_,{}):O.jsx(V_,{})}),O.jsx("span",{className:bt(g&&"text-bold"),style:{color:o.color_primary},children:d.menu_name})]},p)});return O.jsxs(oi.Item,{id:u,className:bt(o.slug,s&&"active"),"data-link":o.slug,"aria-current":s&&"page",...f.length>0?{defaultOpen:s}:{},as:Er,to:o.slug,children:[O.jsxs(oi.LeadingVisual,{style:{color:o.color_primary},children:[o.icon&&O.jsx("img",{className:"icon",src:o.icon.url,alt:"icon",width:"16px",height:"16px"}),!o.icon&&O.jsx(eN,{})]}),f.length>0?O.jsx(uk,{as:Er,to:o.slug,children:O.jsx(ql,{title:o.menu_name,as:"span",className:bt(o.slug,"nav-item-title","d-inline-block",s&&"active text-bold"),"data-link":o.slug,maxWidth:200,style:{color:o.color_primary},onClick:bp,children:o.menu_name})}):O.jsx(ql,{title:o.menu_name,as:"span",className:bt("d-inline-block",s&&"text-bold"),maxWidth:200,style:{color:o.color_primary},onClick:bp,children:o.menu_name}),f.length>0&&O.jsx(oi.SubNav,{children:f})]},u)}),a=e.variant;return O.jsxs("div",{"data-container":"nav",style:{minWidth:"261px",minHeight:"var(--sticky-pane-height)"},className:bt(a==="full"?"position-sticky d-xxl-block d-lg-block d-none border-right height-full color-border-subtle":""),children:[O.jsxs(oi,{className:bt("primary-nav"),children:[O.jsxs(oi.Item,{as:Er,to:"/","aria-current":n.pathname==="/"&&"page","data-link":"",children:[O.jsxs(oi.LeadingVisual,{children:[n.pathname==="/"&&O.jsx(Z_,{}),n.pathname!=="/"&&O.jsx(Y_,{})]}),O.jsx("span",{className:bt(n.pathname==="/"&&"text-bold"),children:t("sidebar.home")})]}),i]}),O.jsx("div",{className:bt(a==="overlay"?"d-xxl-none":"d-none d-lg-block d-xxl-block")})]})}const S4=Nt()(KF),QF="_header_kglax_1",YF="_portalRoot_kglax_5",ZF="_widgetsContainer_kglax_9",XF="_searchContainerWithClosedSearch_kglax_18",JF="_searchContainerWithOpenSearch_kglax_27",e$="_logoWithClosedSearch_kglax_36",t$="_logoWithOpenSearch_kglax_42",n$="_menuOverlay_kglax_53",dy={header:QF,portalRoot:YF,widgetsContainer:ZF,searchContainerWithClosedSearch:XF,searchContainerWithOpenSearch:JF,logoWithClosedSearch:e$,logoWithOpenSearch:t$,menuOverlay:n$},r$=()=>{const e=Dc(),t=Ir(),n=window.sections,r=i=>{console.log("Language changed to: "+i);const a=t.pathname.replace("/",""),o=n.find(u=>u.slug===a);if(a==="impressum"){e("/impressum");return}let l=window.localStorage.getItem(`sections_${i}`),s=[];if(l!==null)s=JSON.parse(l);else{console.error("No sections found in local storage");return}if(o){const u=s.find(c=>c.sorting===o.sorting);if(s&&u){const c=s.find(f=>f.sorting===u.sorting);if(c){e("/"+c.slug);return}}}e("/")};A.useEffect(()=>(rt.on("languageChanged",r),()=>{rt.off("languageChanged",r)}),[e,t])},i$=({t:e})=>{const[t,n]=A.useState(!1),[r,i]=A.useState(!1),a=A.useCallback(()=>i(!0),[]),o=A.useCallback(()=>i(!1),[]),[l,s]=A.useState(!1),{width:u}=v(),c=A.useRef(null),f=[{id:"auto",name:e("header.theme_auto_name")},{id:"light",name:e("header.theme_light_name")},{id:"dark",name:e("header.theme_dark_name")}],{setColorMode:d}=ps(),[g,p]=A.useState(f[1]),m=Ir(),y=Dc(),h=m.pathname==="/search",b=S=>{if(S.key==="Enter"){const T=S.currentTarget.value,E="/search";if(m.pathname!==E){const B={pathname:E,search:""};(T==null?void 0:T.length)>0&&(B.search=`keyword=${T}`),y(B)}else y({search:`keyword=${T}`});S.currentTarget.value="",o()}};A.useEffect(()=>{const S=document.querySelector("body");S==null||S.setAttribute("data-color-mode",g.id)},[g.id]),A.useEffect(()=>{function S(){n(window.scrollY>10)}return window.addEventListener("scroll",S),()=>{window.removeEventListener("scroll",S)}},[]),A.useEffect(()=>{const S=document.querySelector("body div"),T=document.querySelector("body");S&&T&&(T.style.overflow=r&&u&&u<1280?"hidden":"auto")},[r,u]),A.useEffect(()=>{const S=()=>{i(!1)};return window.addEventListener("hashchange",S),()=>{window.removeEventListener("hashchange",S)}},[]);function v(){const S=typeof window<"u",T=A.useCallback(()=>({width:S?window.innerWidth:null}),[S]),[E,B]=A.useState(T());return A.useEffect(()=>{if(S){const P=function(){B(T())};return window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)}},[S,T]),E}return r$(),O.jsx(O.Fragment,{children:O.jsx("header",{className:bt("AppHeader","z-1 sections position-sticky top-0"),role:"banner","aria-label":"Main",children:O.jsxs("div",{className:bt("d-flex flex-items-center p-3"),children:[O.jsx(ea,{className:bt("AppHeader-button hide-xxl mr-3 color-fg-muted"),icon:tN,"aria-label":"Open Sidebar",onClick:a,ref:c,sx:l?{"@media (max-width: 400px)":{display:"none"}}:{}}),O.jsxs(A2,{returnFocusRef:c,isOpen:r,onDismiss:o,"aria-labelledby":"sidebar-overlay-header",className:` rounded-0 rounded-right-3 position-fixed top-0 left-0 - `,sx:{marginTop:"0",maxHeight:"100vh !important",height:"100vh",width:"auto !important",transform:"none",overflow:"auto"},children:[O.jsx(A2.Header,{id:"sidebar-overlay-header",children:e("sideBarNav.title")}),O.jsx(S4,{startPageMenuName:e("startPage.menuName"),variant:"overlay"})]}),!h&&O.jsx("div",{className:bt(l?dy.searchContainerWithOpenSearch:dy.searchContainerWithClosedSearch,"mr-3 ml-auto"),children:O.jsx(w4,{onKeyDown:b,tooltipDirection:"s"})}),!h&&O.jsxs(O.Fragment,{children:[O.jsx(ea,{className:bt("hide-lg hide-xl AppHeader-button color-fg-muted",l?"d-none":"d-flex flex-items-center ml-auto"),onClick:()=>s(!l),"aria-label":"Open Search Bar","aria-expanded":l?"true":"false",icon:ek}),O.jsx(ea,{onClick:()=>s(!l),"aria-label":"Close Search Bar","aria-expanded":l?"true":"false",icon:tk,className:"show AppHeader-button color-fg-muted",sx:l?{"@media (min-width: 768px)":{display:"none"}}:{display:"none"}})]}),O.jsx("div",{className:h?"ml-auto":"",children:O.jsx("div",{className:"dotdotdot-nav",children:O.jsxs(kn,{"aria-labelledby":"sidebar-overlay-header",children:[O.jsx(kn.Anchor,{children:O.jsx(ea,{className:"AppHeader-button color-fg-muted",icon:X_,"aria-label":"Open Menu",sx:l?{marginLeft:"8px",display:"none","@media (min-width: 768px)":{display:"inline-block",marginLeft:"4px"},"@media (min-width: 1012px)":{display:"none"}}:{marginLeft:"16px","@media (min-width: 768px)":{marginLeft:"0"},"@media (min-width: 1012px)":{display:"inline-block"}}})}),O.jsx(kn.Overlay,{align:"start",children:O.jsxs(ot,{children:[O.jsx(ot.Group,{children:u&&u>544?O.jsx(fy,{mediumOrLower:!0}):O.jsx(fy,{xs:!0})}),O.jsxs(kn,{children:[O.jsxs(kn.Button,{className:"width-full",sx:{textAlign:"left","span:first-child":{display:"inline"}},children:["Theme: ",g.name]}),O.jsx(kn.Overlay,{children:O.jsx(ot,{selectionVariant:"single",children:f.map(S=>O.jsx(ot.Item,{selected:S.id===g.id,onSelect:()=>{p(S),d(S.id)},children:S.name},S.id))})})]}),O.jsxs(ot.Group,{children:[O.jsx(ot.Item,{as:Er,to:"/impressum",children:e("header.imprint")}),O.jsx(ot.Item,{disabled:!0,children:"© 2024 Pfadibewegung Schweiz"})]})]})})]})})})]})})})},a$=Nt()(i$);var o$=[{base:"0",chars:["߀"]},{base:"A",chars:["Ⓐ","A","Ⱥ","Ɐ"]},{base:"AA",chars:["Ꜳ"]},{base:"AE",chars:["Æ","Ǽ","Ǣ"]},{base:"AO",chars:["Ꜵ"]},{base:"AU",chars:["Ꜷ"]},{base:"AV",chars:["Ꜹ","Ꜻ"]},{base:"AY",chars:["Ꜽ"]},{base:"B",chars:["Ⓑ","B","Ƀ","Ɓ"]},{base:"C",chars:["Ⓒ","C","Ꜿ","Ƈ","Ȼ"]},{base:"D",chars:["Ⓓ","D","Đ","Ɗ","Ɖ","ᴅ","Ꝺ"]},{base:"Dh",chars:["Ð"]},{base:"DZ",chars:["DZ","DŽ"]},{base:"Dz",chars:["Dz","Dž"]},{base:"E",chars:["ɛ","Ⓔ","E","Ɛ","Ǝ","ᴇ"]},{base:"F",chars:["ꝼ","Ⓕ","F","Ƒ","Ꝼ"]},{base:"G",chars:["Ⓖ","G","Ǥ","Ɠ","Ꞡ","Ᵹ","Ꝿ","ɢ"]},{base:"H",chars:["Ⓗ","H","Ħ","Ⱨ","Ⱶ","Ɥ"]},{base:"I",chars:["Ⓘ","I","Ɨ"]},{base:"J",chars:["Ⓙ","J","Ɉ","ȷ"]},{base:"K",chars:["Ⓚ","K","Ƙ","Ⱪ","Ꝁ","Ꝃ","Ꝅ","Ꞣ"]},{base:"L",chars:["Ⓛ","L","Ŀ","Ł","Ƚ","Ɫ","Ⱡ","Ꝉ","Ꝇ","Ꞁ"]},{base:"LJ",chars:["LJ"]},{base:"Lj",chars:["Lj"]},{base:"M",chars:["Ⓜ","M","Ɱ","Ɯ","ϻ"]},{base:"N",chars:["Ꞥ","Ƞ","Ⓝ","N","Ɲ","Ꞑ","ᴎ"]},{base:"NJ",chars:["NJ"]},{base:"Nj",chars:["Nj"]},{base:"O",chars:["Ⓞ","O","Ø","Ǿ","Ɔ","Ɵ","Ꝋ","Ꝍ"]},{base:"OE",chars:["Œ"]},{base:"OI",chars:["Ƣ"]},{base:"OO",chars:["Ꝏ"]},{base:"OU",chars:["Ȣ"]},{base:"P",chars:["Ⓟ","P","Ƥ","Ᵽ","Ꝑ","Ꝓ","Ꝕ"]},{base:"Q",chars:["Ⓠ","Q","Ꝗ","Ꝙ","Ɋ"]},{base:"R",chars:["Ⓡ","R","Ɍ","Ɽ","Ꝛ","Ꞧ","Ꞃ"]},{base:"S",chars:["Ⓢ","S","ẞ","Ȿ","Ꞩ","Ꞅ"]},{base:"T",chars:["Ⓣ","T","Ŧ","Ƭ","Ʈ","Ⱦ","Ꞇ"]},{base:"Th",chars:["Þ"]},{base:"TZ",chars:["Ꜩ"]},{base:"U",chars:["Ⓤ","U","Ʉ"]},{base:"V",chars:["Ⓥ","V","Ʋ","Ꝟ","Ʌ"]},{base:"VY",chars:["Ꝡ"]},{base:"W",chars:["Ⓦ","W","Ⱳ"]},{base:"X",chars:["Ⓧ","X"]},{base:"Y",chars:["Ⓨ","Y","Ƴ","Ɏ","Ỿ"]},{base:"Z",chars:["Ⓩ","Z","Ƶ","Ȥ","Ɀ","Ⱬ","Ꝣ"]},{base:"a",chars:["ⓐ","a","ẚ","ⱥ","ɐ","ɑ"]},{base:"aa",chars:["ꜳ"]},{base:"ae",chars:["æ","ǽ","ǣ"]},{base:"ao",chars:["ꜵ"]},{base:"au",chars:["ꜷ"]},{base:"av",chars:["ꜹ","ꜻ"]},{base:"ay",chars:["ꜽ"]},{base:"b",chars:["ⓑ","b","ƀ","ƃ","ɓ","Ƃ"]},{base:"c",chars:["c","ⓒ","ƈ","ȼ","ꜿ","ↄ"]},{base:"d",chars:["ⓓ","d","đ","ƌ","ɖ","ɗ","Ƌ","Ꮷ","ԁ","Ɦ"]},{base:"dh",chars:["ð"]},{base:"dz",chars:["dz","dž"]},{base:"e",chars:["ⓔ","e","ɇ","ǝ"]},{base:"f",chars:["ⓕ","f","ƒ"]},{base:"ff",chars:["ff"]},{base:"fi",chars:["fi"]},{base:"fl",chars:["fl"]},{base:"ffi",chars:["ffi"]},{base:"ffl",chars:["ffl"]},{base:"g",chars:["ⓖ","g","ǥ","ɠ","ꞡ","ꝿ","ᵹ"]},{base:"h",chars:["ⓗ","h","ħ","ⱨ","ⱶ","ɥ"]},{base:"hv",chars:["ƕ"]},{base:"i",chars:["ⓘ","i","ɨ","ı"]},{base:"j",chars:["ⓙ","j","ɉ"]},{base:"k",chars:["ⓚ","k","ƙ","ⱪ","ꝁ","ꝃ","ꝅ","ꞣ"]},{base:"l",chars:["ⓛ","l","ŀ","ſ","ł","ƚ","ɫ","ⱡ","ꝉ","ꞁ","ꝇ","ɭ"]},{base:"lj",chars:["lj"]},{base:"m",chars:["ⓜ","m","ɱ","ɯ"]},{base:"n",chars:["ⓝ","n","ƞ","ɲ","ʼn","ꞑ","ꞥ","л","ԉ"]},{base:"nj",chars:["nj"]},{base:"o",chars:["ⓞ","o","ø","ǿ","ꝋ","ꝍ","ɵ","ɔ","ᴑ"]},{base:"oe",chars:["œ"]},{base:"oi",chars:["ƣ"]},{base:"oo",chars:["ꝏ"]},{base:"ou",chars:["ȣ"]},{base:"p",chars:["ⓟ","p","ƥ","ᵽ","ꝑ","ꝓ","ꝕ","ρ"]},{base:"q",chars:["ⓠ","q","ɋ","ꝗ","ꝙ"]},{base:"r",chars:["ⓡ","r","ɍ","ɽ","ꝛ","ꞧ","ꞃ"]},{base:"s",chars:["ⓢ","s","ȿ","ꞩ","ꞅ","ẛ","ʂ"]},{base:"ss",chars:["ß"]},{base:"t",chars:["ⓣ","t","ŧ","ƭ","ʈ","ⱦ","ꞇ"]},{base:"th",chars:["þ"]},{base:"tz",chars:["ꜩ"]},{base:"u",chars:["ⓤ","u","ʉ"]},{base:"v",chars:["ⓥ","v","ʋ","ꝟ","ʌ"]},{base:"vy",chars:["ꝡ"]},{base:"w",chars:["ⓦ","w","ⱳ"]},{base:"x",chars:["ⓧ","x"]},{base:"y",chars:["ⓨ","y","ƴ","ɏ","ỿ"]},{base:"z",chars:["ⓩ","z","ƶ","ȥ","ɀ","ⱬ","ꝣ"]}],l$=new Map(o$.flatMap(function(e){var t=e.base,n=e.chars;return n.map(function(r){return[r,t]})}));function s$(e,t){var n="".concat(e).normalize("NFD"),r;try{r=n.replace(/\p{Diacritic}/gu,"")}catch{r=n.replace(/[\u0300-\u036f]/g,"")}return t!=null&&t.lowerCase?r.toLowerCase():r}var k4=[{base:" ",chars:[" "]},{base:"'",chars:["’","‘"]},{base:'"',chars:["“","”","""]},{base:"-",chars:["–","—","−"]}],u$=new Map(k4.flatMap(function(e){var t=e.base,n=e.chars;return n.map(function(r){return[r,t]})})),c$=new RegExp(k4.flatMap(function(e){return e.chars}).join("|"),"g");function f$(e,t){var n,r,i,a=(n=t==null?void 0:t.trim)!==null&&n!==void 0?n:!0,o=(r=t==null?void 0:t.forceSingleSpace)!==null&&r!==void 0?r:!1,l=(i=t==null?void 0:t.replaceWhiteSpace)!==null&&i!==void 0?i:!1,s="".concat(e),u,c=s.replace(c$,function(f){return(u=u$.get(f))?u:f});return a&&(c=c.trim()),o&&(c=c.replace(/\s{2,}/g," ")),l!==!1&&(c=c.replace(/\s/g,l)),c}function d$(e,t){var n,r,i,a,o,l=(n=t==null?void 0:t.symbols)!==null&&n!==void 0?n:!0,s=(r=t==null?void 0:t.lowerCase)!==null&&r!==void 0?r:!1,u=(i=t==null?void 0:t.trim)!==null&&i!==void 0?i:!1,c=(a=t==null?void 0:t.forceSingleSpace)!==null&&a!==void 0?a:!1,f=(o=t==null?void 0:t.replaceWhiteSpace)!==null&&o!==void 0?o:void 0,d,g=s$(e),p="";u&&(g=g.trim()),l&&(g=f$(g,{trim:!1,forceSingleSpace:c,replaceWhiteSpace:f}));for(var m=0;m{let y=m[0].data;y.filter&&(y=y.filter(h=>h.published_at!==null)),g(y),window.localStorage.setItem(`${f}_${d}`,JSON.stringify(y)),console.info(`pulled from strapi - ${f}_${d}`)})}if(A.useEffect(()=>{let f=window.localStorage.getItem(`start-page_${s}`),d=window.localStorage.getItem(`sections_${s}`),g=window.localStorage.getItem(`links_${s}`),p=window.localStorage.getItem("always-reload");p="not-null-during-dev",p===null?(f!==null?(a(JSON.parse(f)),console.info("loaded from local storage - start-page")):u("start-page",s,a),d!==null&&d!=="[]"?(t(JSON.parse(d)),l(JSON.parse(d)),console.info("loaded from local storage - sections")):(u("sections",s,t),u("sections",s,l)),g!==null&&g!=="[]"?(r(JSON.parse(g)),console.info("loaded from local storage - links")):u("links",s,r)):(console.log("always reload is not null! reloading data from strapi..."),u("start-page",s,a),u("sections",s,t),u("sections",s,l),u("links",s,r))},[s]),A.useEffect(()=>{window.history.scrollRestoration="manual"},[]),!e||!n||!i||!o)return null;const c=e.reduce(function(f,d){return d.slug=py(d.title,{trim:!0,forceSingleSpace:!0}),d.chapters=d.chapters.map(function(g){return g.slug=py(g.title,{trim:!0,forceSingleSpace:!0}),g.slug_with_section=`${d.slug}#${g.slug}`,g}),f[d.slug]=d,f},{});return KM(e,n),window.sections=e,O.jsx(JR,{colorMode:"light",children:O.jsxs(Ga,{children:[O.jsx(qr,{children:O.jsx("script",{defer:!0,"data-domain":"scout-ch.github.io/thilo",src:"https://plausible.io/js/script.js"})}),O.jsx("div",{className:"App",children:O.jsx(l9,{basename:"/",children:O.jsxs(C4.Provider,{value:n,children:[O.jsx(a$,{}),O.jsxs(up,{sx:{padding:"0"},children:[O.jsx(up.Content,{children:O.jsxs("div",{id:"main-content",className:"p-3",children:[O.jsxs(e9,{children:[O.jsx(Ki,{path:"/",element:O.jsx(Lv,{page:i})}),O.jsx(Ki,{path:"/thilo/",element:O.jsx(Lv,{page:i})}),O.jsx(Ki,{path:"/search",element:O.jsx(qF,{page:o,sections:e})}),O.jsx(Ki,{path:"/impressum",element:O.jsx(GM,{})}),O.jsx(Ki,{path:"/:slug",element:O.jsx(pD,{sections:c})}),O.jsx(Ki,{path:"*",element:O.jsx(Fk,{})})]}),O.jsx(iD,{})]})}),O.jsx(up.Pane,{position:"start",sticky:!0,hidden:{narrow:!0,regular:!0,wide:!1},offsetHeader:64,children:O.jsx(S4,{startPageMenuName:"start",variant:"full"})})]})]})})})]})})}const g$=Nt()(p$),h$="modulepreload",m$=function(e){return"/thilo/"+e},gy={},b$=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=m$(a),a in gy)return;gy[a]=!0;const o=a.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":h$,o||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),o)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},v$=e=>{e&&e instanceof Function&&b$(()=>import("./web-vitals-867e2ef8.js"),[]).then(({getCLS:t,getFID:n,getFCP:r,getLCP:i,getTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})};var E4,hy=h0;E4=hy.createRoot,hy.hydrateRoot;const y$=document.getElementById("root"),x$=E4(y$);x$.render(O.jsx(x.StrictMode,{children:O.jsx(g$,{})}));v$(); + `,sx:{marginTop:"0",maxHeight:"100vh !important",height:"100vh",width:"auto !important",transform:"none",overflow:"auto"},children:[O.jsx(A2.Header,{id:"sidebar-overlay-header",children:e("sideBarNav.title")}),O.jsx(S4,{startPageMenuName:e("startPage.menuName"),variant:"overlay"})]}),!h&&O.jsx("div",{className:bt(l?dy.searchContainerWithOpenSearch:dy.searchContainerWithClosedSearch,"mr-3 ml-auto"),children:O.jsx(w4,{onKeyDown:b,tooltipDirection:"s"})}),!h&&O.jsxs(O.Fragment,{children:[O.jsx(ea,{className:bt("hide-lg hide-xl AppHeader-button color-fg-muted",l?"d-none":"d-flex flex-items-center ml-auto"),onClick:()=>s(!l),"aria-label":"Open Search Bar","aria-expanded":l?"true":"false",icon:ek}),O.jsx(ea,{onClick:()=>s(!l),"aria-label":"Close Search Bar","aria-expanded":l?"true":"false",icon:tk,className:"show AppHeader-button color-fg-muted",sx:l?{"@media (min-width: 768px)":{display:"none"}}:{display:"none"}})]}),O.jsx("div",{className:h?"ml-auto":"",children:O.jsx("div",{className:"dotdotdot-nav",children:O.jsxs(kn,{"aria-labelledby":"sidebar-overlay-header",children:[O.jsx(kn.Anchor,{children:O.jsx(ea,{className:"AppHeader-button color-fg-muted",icon:X_,"aria-label":"Open Menu",sx:l?{marginLeft:"8px",display:"none","@media (min-width: 768px)":{display:"inline-block",marginLeft:"4px"},"@media (min-width: 1012px)":{display:"none"}}:{marginLeft:"16px","@media (min-width: 768px)":{marginLeft:"0"},"@media (min-width: 1012px)":{display:"inline-block"}}})}),O.jsx(kn.Overlay,{align:"start",children:O.jsxs(ot,{children:[O.jsx(ot.Group,{children:u&&u>544?O.jsx(fy,{mediumOrLower:!0}):O.jsx(fy,{xs:!0})}),O.jsxs(kn,{children:[O.jsxs(kn.Button,{className:"width-full",sx:{textAlign:"left","span:first-child":{display:"inline"}},children:["Theme: ",g.name]}),O.jsx(kn.Overlay,{children:O.jsx(ot,{selectionVariant:"single",children:f.map(S=>O.jsx(ot.Item,{selected:S.id===g.id,onSelect:()=>{p(S),d(S.id)},children:S.name},S.id))})})]}),O.jsxs(ot.Group,{children:[O.jsx(ot.Item,{as:Er,to:"/impressum",children:e("header.imprint")}),O.jsx(ot.Item,{disabled:!0,children:"© 2024 Pfadibewegung Schweiz"})]})]})})]})})})]})})})},a$=Nt()(i$);var o$=[{base:"0",chars:["߀"]},{base:"A",chars:["Ⓐ","A","Ⱥ","Ɐ"]},{base:"AA",chars:["Ꜳ"]},{base:"AE",chars:["Æ","Ǽ","Ǣ"]},{base:"AO",chars:["Ꜵ"]},{base:"AU",chars:["Ꜷ"]},{base:"AV",chars:["Ꜹ","Ꜻ"]},{base:"AY",chars:["Ꜽ"]},{base:"B",chars:["Ⓑ","B","Ƀ","Ɓ"]},{base:"C",chars:["Ⓒ","C","Ꜿ","Ƈ","Ȼ"]},{base:"D",chars:["Ⓓ","D","Đ","Ɗ","Ɖ","ᴅ","Ꝺ"]},{base:"Dh",chars:["Ð"]},{base:"DZ",chars:["DZ","DŽ"]},{base:"Dz",chars:["Dz","Dž"]},{base:"E",chars:["ɛ","Ⓔ","E","Ɛ","Ǝ","ᴇ"]},{base:"F",chars:["ꝼ","Ⓕ","F","Ƒ","Ꝼ"]},{base:"G",chars:["Ⓖ","G","Ǥ","Ɠ","Ꞡ","Ᵹ","Ꝿ","ɢ"]},{base:"H",chars:["Ⓗ","H","Ħ","Ⱨ","Ⱶ","Ɥ"]},{base:"I",chars:["Ⓘ","I","Ɨ"]},{base:"J",chars:["Ⓙ","J","Ɉ","ȷ"]},{base:"K",chars:["Ⓚ","K","Ƙ","Ⱪ","Ꝁ","Ꝃ","Ꝅ","Ꞣ"]},{base:"L",chars:["Ⓛ","L","Ŀ","Ł","Ƚ","Ɫ","Ⱡ","Ꝉ","Ꝇ","Ꞁ"]},{base:"LJ",chars:["LJ"]},{base:"Lj",chars:["Lj"]},{base:"M",chars:["Ⓜ","M","Ɱ","Ɯ","ϻ"]},{base:"N",chars:["Ꞥ","Ƞ","Ⓝ","N","Ɲ","Ꞑ","ᴎ"]},{base:"NJ",chars:["NJ"]},{base:"Nj",chars:["Nj"]},{base:"O",chars:["Ⓞ","O","Ø","Ǿ","Ɔ","Ɵ","Ꝋ","Ꝍ"]},{base:"OE",chars:["Œ"]},{base:"OI",chars:["Ƣ"]},{base:"OO",chars:["Ꝏ"]},{base:"OU",chars:["Ȣ"]},{base:"P",chars:["Ⓟ","P","Ƥ","Ᵽ","Ꝑ","Ꝓ","Ꝕ"]},{base:"Q",chars:["Ⓠ","Q","Ꝗ","Ꝙ","Ɋ"]},{base:"R",chars:["Ⓡ","R","Ɍ","Ɽ","Ꝛ","Ꞧ","Ꞃ"]},{base:"S",chars:["Ⓢ","S","ẞ","Ȿ","Ꞩ","Ꞅ"]},{base:"T",chars:["Ⓣ","T","Ŧ","Ƭ","Ʈ","Ⱦ","Ꞇ"]},{base:"Th",chars:["Þ"]},{base:"TZ",chars:["Ꜩ"]},{base:"U",chars:["Ⓤ","U","Ʉ"]},{base:"V",chars:["Ⓥ","V","Ʋ","Ꝟ","Ʌ"]},{base:"VY",chars:["Ꝡ"]},{base:"W",chars:["Ⓦ","W","Ⱳ"]},{base:"X",chars:["Ⓧ","X"]},{base:"Y",chars:["Ⓨ","Y","Ƴ","Ɏ","Ỿ"]},{base:"Z",chars:["Ⓩ","Z","Ƶ","Ȥ","Ɀ","Ⱬ","Ꝣ"]},{base:"a",chars:["ⓐ","a","ẚ","ⱥ","ɐ","ɑ"]},{base:"aa",chars:["ꜳ"]},{base:"ae",chars:["æ","ǽ","ǣ"]},{base:"ao",chars:["ꜵ"]},{base:"au",chars:["ꜷ"]},{base:"av",chars:["ꜹ","ꜻ"]},{base:"ay",chars:["ꜽ"]},{base:"b",chars:["ⓑ","b","ƀ","ƃ","ɓ","Ƃ"]},{base:"c",chars:["c","ⓒ","ƈ","ȼ","ꜿ","ↄ"]},{base:"d",chars:["ⓓ","d","đ","ƌ","ɖ","ɗ","Ƌ","Ꮷ","ԁ","Ɦ"]},{base:"dh",chars:["ð"]},{base:"dz",chars:["dz","dž"]},{base:"e",chars:["ⓔ","e","ɇ","ǝ"]},{base:"f",chars:["ⓕ","f","ƒ"]},{base:"ff",chars:["ff"]},{base:"fi",chars:["fi"]},{base:"fl",chars:["fl"]},{base:"ffi",chars:["ffi"]},{base:"ffl",chars:["ffl"]},{base:"g",chars:["ⓖ","g","ǥ","ɠ","ꞡ","ꝿ","ᵹ"]},{base:"h",chars:["ⓗ","h","ħ","ⱨ","ⱶ","ɥ"]},{base:"hv",chars:["ƕ"]},{base:"i",chars:["ⓘ","i","ɨ","ı"]},{base:"j",chars:["ⓙ","j","ɉ"]},{base:"k",chars:["ⓚ","k","ƙ","ⱪ","ꝁ","ꝃ","ꝅ","ꞣ"]},{base:"l",chars:["ⓛ","l","ŀ","ſ","ł","ƚ","ɫ","ⱡ","ꝉ","ꞁ","ꝇ","ɭ"]},{base:"lj",chars:["lj"]},{base:"m",chars:["ⓜ","m","ɱ","ɯ"]},{base:"n",chars:["ⓝ","n","ƞ","ɲ","ʼn","ꞑ","ꞥ","л","ԉ"]},{base:"nj",chars:["nj"]},{base:"o",chars:["ⓞ","o","ø","ǿ","ꝋ","ꝍ","ɵ","ɔ","ᴑ"]},{base:"oe",chars:["œ"]},{base:"oi",chars:["ƣ"]},{base:"oo",chars:["ꝏ"]},{base:"ou",chars:["ȣ"]},{base:"p",chars:["ⓟ","p","ƥ","ᵽ","ꝑ","ꝓ","ꝕ","ρ"]},{base:"q",chars:["ⓠ","q","ɋ","ꝗ","ꝙ"]},{base:"r",chars:["ⓡ","r","ɍ","ɽ","ꝛ","ꞧ","ꞃ"]},{base:"s",chars:["ⓢ","s","ȿ","ꞩ","ꞅ","ẛ","ʂ"]},{base:"ss",chars:["ß"]},{base:"t",chars:["ⓣ","t","ŧ","ƭ","ʈ","ⱦ","ꞇ"]},{base:"th",chars:["þ"]},{base:"tz",chars:["ꜩ"]},{base:"u",chars:["ⓤ","u","ʉ"]},{base:"v",chars:["ⓥ","v","ʋ","ꝟ","ʌ"]},{base:"vy",chars:["ꝡ"]},{base:"w",chars:["ⓦ","w","ⱳ"]},{base:"x",chars:["ⓧ","x"]},{base:"y",chars:["ⓨ","y","ƴ","ɏ","ỿ"]},{base:"z",chars:["ⓩ","z","ƶ","ȥ","ɀ","ⱬ","ꝣ"]}],l$=new Map(o$.flatMap(function(e){var t=e.base,n=e.chars;return n.map(function(r){return[r,t]})}));function s$(e,t){var n="".concat(e).normalize("NFD"),r;try{r=n.replace(/\p{Diacritic}/gu,"")}catch{r=n.replace(/[\u0300-\u036f]/g,"")}return t!=null&&t.lowerCase?r.toLowerCase():r}var k4=[{base:" ",chars:[" "]},{base:"'",chars:["’","‘"]},{base:'"',chars:["“","”","""]},{base:"-",chars:["–","—","−"]}],u$=new Map(k4.flatMap(function(e){var t=e.base,n=e.chars;return n.map(function(r){return[r,t]})})),c$=new RegExp(k4.flatMap(function(e){return e.chars}).join("|"),"g");function f$(e,t){var n,r,i,a=(n=t==null?void 0:t.trim)!==null&&n!==void 0?n:!0,o=(r=t==null?void 0:t.forceSingleSpace)!==null&&r!==void 0?r:!1,l=(i=t==null?void 0:t.replaceWhiteSpace)!==null&&i!==void 0?i:!1,s="".concat(e),u,c=s.replace(c$,function(f){return(u=u$.get(f))?u:f});return a&&(c=c.trim()),o&&(c=c.replace(/\s{2,}/g," ")),l!==!1&&(c=c.replace(/\s/g,l)),c}function d$(e,t){var n,r,i,a,o,l=(n=t==null?void 0:t.symbols)!==null&&n!==void 0?n:!0,s=(r=t==null?void 0:t.lowerCase)!==null&&r!==void 0?r:!1,u=(i=t==null?void 0:t.trim)!==null&&i!==void 0?i:!1,c=(a=t==null?void 0:t.forceSingleSpace)!==null&&a!==void 0?a:!1,f=(o=t==null?void 0:t.replaceWhiteSpace)!==null&&o!==void 0?o:void 0,d,g=s$(e),p="";u&&(g=g.trim()),l&&(g=f$(g,{trim:!1,forceSingleSpace:c,replaceWhiteSpace:f}));for(var m=0;m{let y=m[0].data;y.filter&&(y=y.filter(h=>h.published_at!==null)),g(y),window.localStorage.setItem(`${f}_${d}`,JSON.stringify(y)),console.info(`pulled from strapi - ${f}_${d}`)})}if(A.useEffect(()=>{let f=window.localStorage.getItem(`start-page_${s}`),d=window.localStorage.getItem(`sections_${s}`),g=window.localStorage.getItem(`links_${s}`),p=window.localStorage.getItem("always-reload");p="not-null-during-dev",p===null?(f!==null?(a(JSON.parse(f)),console.info("loaded from local storage - start-page")):u("start-page",s,a),d!==null&&d!=="[]"?(t(JSON.parse(d)),l(JSON.parse(d)),console.info("loaded from local storage - sections")):(u("sections",s,t),u("sections",s,l)),g!==null&&g!=="[]"?(r(JSON.parse(g)),console.info("loaded from local storage - links")):u("links",s,r)):(console.log("always reload is not null! reloading data from strapi..."),u("start-page",s,a),u("sections",s,t),u("sections",s,l),u("links",s,r))},[s]),A.useEffect(()=>{window.history.scrollRestoration="manual"},[]),!e||!n||!i||!o)return null;const c=e.reduce(function(f,d){return d.slug=py(d.title,{trim:!0,forceSingleSpace:!0}),d.chapters=d.chapters.map(function(g){return g.slug=py(g.title,{trim:!0,forceSingleSpace:!0}),g.slug_with_section=`${d.slug}#${g.slug}`,g}),f[d.slug]=d,f},{});return KM(e,n),window.sections=e,O.jsx(JR,{colorMode:"light",children:O.jsxs(Ga,{children:[O.jsx(qr,{children:O.jsx("script",{defer:!0,"data-domain":"scout-ch.github.io/thilo",src:"https://plausible.io/js/script.js"})}),O.jsx("div",{className:"App",children:O.jsx(l9,{basename:"/thilo/",children:O.jsxs(C4.Provider,{value:n,children:[O.jsx(a$,{}),O.jsxs(up,{sx:{padding:"0"},children:[O.jsx(up.Content,{children:O.jsxs("div",{id:"main-content",className:"p-3",children:[O.jsxs(e9,{children:[O.jsx(Ki,{path:"/",element:O.jsx(Lv,{page:i})}),O.jsx(Ki,{path:"/thilo/",element:O.jsx(Lv,{page:i})}),O.jsx(Ki,{path:"/search",element:O.jsx(qF,{page:o,sections:e})}),O.jsx(Ki,{path:"/impressum",element:O.jsx(GM,{})}),O.jsx(Ki,{path:"/:slug",element:O.jsx(pD,{sections:c})}),O.jsx(Ki,{path:"*",element:O.jsx(Fk,{})})]}),O.jsx(iD,{})]})}),O.jsx(up.Pane,{position:"start",sticky:!0,hidden:{narrow:!0,regular:!0,wide:!1},offsetHeader:64,children:O.jsx(S4,{startPageMenuName:"start",variant:"full"})})]})]})})})]})})}const g$=Nt()(p$),h$="modulepreload",m$=function(e){return"/thilo/"+e},gy={},b$=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=m$(a),a in gy)return;gy[a]=!0;const o=a.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${l}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":h$,o||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),o)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})},v$=e=>{e&&e instanceof Function&&b$(()=>import("./web-vitals-867e2ef8.js"),[]).then(({getCLS:t,getFID:n,getFCP:r,getLCP:i,getTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})};var E4,hy=h0;E4=hy.createRoot,hy.hydrateRoot;const y$=document.getElementById("root"),x$=E4(y$);x$.render(O.jsx(x.StrictMode,{children:O.jsx(g$,{})}));v$(); diff --git a/index.html b/index.html index a6a0496..1671ab6 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ }; - + diff --git a/sw.js b/sw.js index 009b9f7..de3ed33 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),f={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map((e=>f[e]||l(e)))).then((e=>(r(...e),o)))}}define(["./workbox-28fe7b12"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-246691aa.css",revision:null},{url:"assets/index-8907da02.js",revision:null},{url:"assets/web-vitals-867e2ef8.js",revision:null},{url:"index.html",revision:"638fefff987c0cc674778b4fe8a28d42"},{url:"registerSW.js",revision:"f294c23f3839727e8f4f3ab55ecfee09"},{url:"manifest.webmanifest",revision:"a7d58352071c9ea56499e3524db5905f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),f={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map((e=>f[e]||l(e)))).then((e=>(r(...e),o)))}}define(["./workbox-28fe7b12"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-0d9f4327.js",revision:null},{url:"assets/index-246691aa.css",revision:null},{url:"assets/web-vitals-867e2ef8.js",revision:null},{url:"index.html",revision:"53447723ddcb6650a89719b13208cbfc"},{url:"registerSW.js",revision:"f294c23f3839727e8f4f3ab55ecfee09"},{url:"manifest.webmanifest",revision:"a7d58352071c9ea56499e3524db5905f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));