PageSourceSearch

https://hyscore.io/assets/_-_locale_._slug-DtC_b2ti.js

js hyscore.io collected 2026-10-01 11:35:00 UTC 3,115 bytes, 1 lines download raw bytes

1import{Z as q,i as O,b as g,_ as R,t as U,o as Z,u as $,$ as z,j as d,f as m,w as G,x as J,a0 as V,a1 as W,C as X,B as T,m as Y,n as ee,h as te,r as ae}from"./index-DfAU25pB.js";import{d as F}from"./default-home-CpbMCnki.js";import{D as C}from"./DraftPreviewBanner-BKScIvtF.js";function ie(){const o=q.useParams(),{slug:e}=o,j=!o.locale&&O(e),h=g(R),v=g(U),y=g(Z),{locale:s}=$(),P=q.useSearch(),a=q.useLoaderData(),f=Date.now(),i=P.cms_preview,{isAdmin:l}=z();if(j)return d.jsx(oe,{locale:e});const u=a&&a.locale===s?a:null,w=m({...G(e,s),queryFn:()=>h({data:{slug:e,locale:s}}),initialData:u?.page??void 0,initialDataUpdatedAt:u?f:void 0}),p=m({queryKey:["cms","page-preview",e,s],queryFn:()=>v({data:{slug:e,locale:s}}),enabled:l&&!i,staleTime:0}),t=m({queryKey:["cms","page-preview-token",e,s,i],queryFn:()=>y({data:{token:i,slug:e,locale:s}}),enabled:!!i,staleTime:0,retry:!1}),c=m({...J(s),initialData:u?.home??void 0,initialDataUpdatedAt:u?f:void 0}),r=t.data?.page??null,k=p.data?.page??null,B=r??k,I=i?t.data?.blocks??[]:p.data?.blocks??[],S=!!r||l&&!!k,K=S&&B&&!B.is_published,b=S?I:w.data?.blocks??[],D=V.find(n=>n.slug===e),N=!!i&&t.isLoading;if(!(b.length>0||!!D)&&(w.isLoading||N))return d.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Lädt…"});if(b.length===0&&!D)throw W();const x=b.length>0?b:(D?.blocks??[]).map((n,_)=>({id:`default-${e}-${_}`,page_id:"default",type:n.type,sort_order:_,data:n.data}));e==="kontakt"&&!x.some(n=>n.type==="contact_form")&&x.push({id:`contact-form-${e}`,page_id:"default",type:"contact_form",sort_order:x.length,data:{}});const E=c.data?.blocks??[],Q=(n,_)=>{const A=E.find(L=>L.type===n);if(A)return A;const H=F.find(L=>L.type===n);return{id:`default-${n}`,page_id:"default",type:H.type,sort_order:_,data:H.data}},M=[Q("header",0),...x,Q("footer",999)];return d.jsxs("div",{className:"min-h-screen bg-background text-foreground overflow-x-hidden",children:[K?d.jsx(C,{pageId:B?.id??null}):null,d.jsx(X,{seed:a?{locale:a.locale,header:a.headerMenu,footer:a.footerMenu}:null,children:d.jsx(T,{blocks:M})})]})}function oe({locale:o}){const e=g(Y),j=g(ee),h=te(),{locale:v,setLocale:y}=$();ae.useEffect(()=>{v!==o&&y(o)},[o,v,y]);const s=m({queryKey:["cms","home",o],queryFn:()=>e({data:{locale:o}})}),P=m({queryKey:["cms","home-preview",o],queryFn:()=>j({data:{locale:o}}),enabled:h,staleTime:0}),a=P.data?.page??null,f=h&&!!a,i=f&&a&&!a.is_published,l=f?P.data?.blocks??[]:s.data?.blocks??[],u=(t,c)=>{const r=F.find(k=>k.type===t);return{id:`default-${t}`,page_id:"default",type:r.type,sort_order:c,data:r.data}},w=l.some(t=>["hero_pro","problem","gap","solution"].includes(t.type));let p;if(w){const t=l.some(r=>r.type==="header"),c=l.some(r=>r.type==="footer");p=[...t?[]:[u("header",0)],...l,...c?[]:[u("footer",999)]]}else p=F.map((t,c)=>({id:`default-${c}`,page_id:"default",type:t.type,sort_order:c,data:t.data}));return d.jsxs("div",{className:"min-h-screen bg-background text-foreground overflow-x-hidden",children:[i?d.jsx(C,{pageId:a?.id??null}):null,d.jsx(T,{blocks:p})]})}export{ie as component};

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.