Files
e-tib.com/.next/server/chunks/ssr/_5c5ade9f._.js
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

13 lines
13 KiB
JavaScript

;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="cc4a72d4-07d7-ce53-2b49-3c2248b8af36")}catch(e){}}();
module.exports=[581631,a=>{"use strict";var b=a.i(526156),c=a.i(150765),d=a.i(841757),e=a.i(110644),f=a.i(5423),g=a.i(608986),h=a.i(766165),i=a.i(205640),j=a.i(427402),k=a.i(976523),l=a.i(604682),m=c,n=a.i(937051);function o(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}class p extends m.Component{getSnapshotBeforeUpdate(a){let b=this.props.childRef.current;if((0,l.isHTMLElement)(b)&&a.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let a=b.offsetParent,c=(0,l.isHTMLElement)(a)&&a.offsetWidth||0,d=(0,l.isHTMLElement)(a)&&a.offsetHeight||0,e=getComputedStyle(b),f=this.props.sizeRef.current;f.height=parseFloat(e.height),f.width=parseFloat(e.width),f.top=b.offsetTop,f.left=b.offsetLeft,f.right=c-f.width-f.left,f.bottom=d-f.height-f.top}return null}componentDidUpdate(){}render(){return this.props.children}}function q({children:a,isPresent:d,anchorX:e,anchorY:f,root:g,pop:h}){let i=(0,m.useId)(),j=(0,m.useRef)(null),k=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,m.useContext)(n.MotionConfigContext),q=function(...a){return c.useCallback(function(...a){return b=>{let c=!1,d=a.map(a=>{let d=o(a,b);return c||"function"!=typeof d||(c=!0),d});if(c)return()=>{for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof c?c():o(a[b],null)}}}}(...a),a)}(j,a.props?.ref??a?.ref);return(0,m.useInsertionEffect)(()=>{let{width:a,height:b,top:c,left:m,right:n,bottom:o}=k.current;if(d||!1===h||!j.current||!a||!b)return;let p="left"===e?`left: ${m}`:`right: ${n}`,q="bottom"===f?`bottom: ${o}`:`top: ${c}`;j.current.dataset.motionPopId=i;let r=document.createElement("style");l&&(r.nonce=l);let s=g??document.head;return s.appendChild(r),r.sheet&&r.sheet.insertRule(`
[data-motion-pop-id="${i}"] {
position: absolute !important;
width: ${a}px !important;
height: ${b}px !important;
${p}px !important;
${q}px !important;
}
`),()=>{j.current?.removeAttribute("data-motion-pop-id"),s.contains(r)&&s.removeChild(r)}},[d]),(0,b.jsx)(p,{isPresent:d,childRef:j,sizeRef:k,pop:h,children:!1===h?a:m.cloneElement(a,{ref:q})})}let r=({children:a,initial:d,isPresent:e,onExitComplete:f,custom:g,presenceAffectsLayout:h,mode:j,anchorX:l,anchorY:m,root:n})=>{let o=(0,i.useConstant)(s),p=(0,c.useId)(),r=!0,t=(0,c.useMemo)(()=>(r=!1,{id:p,initial:d,isPresent:e,custom:g,onExitComplete:a=>{for(let b of(o.set(a,!0),o.values()))if(!b)return;f&&f()},register:a=>(o.set(a,!1),()=>o.delete(a))}),[e,o,f]);return h&&r&&(t={...t}),(0,c.useMemo)(()=>{o.forEach((a,b)=>o.set(b,!1))},[e]),c.useEffect(()=>{e||o.size||!f||f()},[e]),a=(0,b.jsx)(q,{pop:"popLayout"===j,isPresent:e,anchorX:l,anchorY:m,root:n,children:a}),(0,b.jsx)(k.PresenceContext.Provider,{value:t,children:a})};function s(){return new Map}var t=a.i(831404);let u=a=>a.key||"";function v(a){let b=[];return c.Children.forEach(a,a=>{(0,c.isValidElement)(a)&&b.push(a)}),b}let w=({children:a,custom:d,initial:e=!0,onExitComplete:f,presenceAffectsLayout:g=!0,mode:k="sync",propagate:l=!1,anchorX:m="left",anchorY:n="top",root:o})=>{let[p,q]=(0,t.usePresence)(l),s=(0,c.useMemo)(()=>v(a),[a]),w=l&&!p?[]:s.map(u),x=(0,c.useRef)(!0),y=(0,c.useRef)(s),z=(0,i.useConstant)(()=>new Map),A=(0,c.useRef)(new Set),[B,C]=(0,c.useState)(s),[D,E]=(0,c.useState)(s);(0,j.useIsomorphicLayoutEffect)(()=>{x.current=!1,y.current=s;for(let a=0;a<D.length;a++){let b=u(D[a]);w.includes(b)?(z.delete(b),A.current.delete(b)):!0!==z.get(b)&&z.set(b,!1)}},[D,w.length,w.join("-")]);let F=[];if(s!==B){let a=[...s];for(let b=0;b<D.length;b++){let c=D[b],d=u(c);w.includes(d)||(a.splice(b,0,c),F.push(c))}return"wait"===k&&F.length&&(a=F),E(v(a)),C(s),null}let{forceRender:G}=(0,c.useContext)(h.LayoutGroupContext);return(0,b.jsx)(b.Fragment,{children:D.map(a=>{let c=u(a),h=(!l||!!p)&&(s===D||w.includes(c));return(0,b.jsx)(r,{isPresent:h,initial:(!x.current||!!e)&&void 0,custom:d,presenceAffectsLayout:g,mode:k,root:o,onExitComplete:h?void 0:()=>{if(A.current.has(c)||!z.has(c))return;A.current.add(c),z.set(c,!0);let a=!0;z.forEach(b=>{b||(a=!1)}),a&&(G?.(),E(y.current),l&&q?.(),f&&f())},anchorX:m,anchorY:n,children:a},c)})})};function x({navLinks:a}){let[h,i]=c.useState(!1),[j,k]=c.useState(!1),l=(0,f.usePathname)()||"/",m=l.startsWith("/en")?"en":"de",n=a=>{let b=l.replace(/^\/(en|de)/,"");return`/${a}${""===b?"":b}`};c.useEffect(()=>{let a=()=>{i(window.scrollY>20)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]),c.useEffect(()=>{k(!1)},[l]);let o=({mobile:a=!1})=>(0,b.jsxs)("div",{className:`flex items-center gap-2 ${a?"text-xl":"text-sm font-bold"} ${a?"text-neutral-dark":h?"text-text-primary":"text-neutral-light"}`,children:[(0,b.jsx)(d.default,{href:n("de"),className:`transition-colors hover:text-primary ${"de"===m?"text-primary":""}`,children:"DE"}),(0,b.jsx)("span",{className:"opacity-50",children:"|"}),(0,b.jsx)(d.default,{href:n("en"),className:`transition-colors hover:text-primary ${"en"===m?"text-primary":""}`,children:"EN"})]});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ease-in-out ${h?"bg-neutral-light/90 backdrop-blur-md shadow-sm py-4":"bg-transparent py-6"}`,children:(0,b.jsxs)("div",{className:"container flex items-center justify-between",children:[(0,b.jsx)(d.default,{href:`/${m}`,className:"relative flex items-center h-12 w-48 z-50",children:(0,b.jsx)(e.default,{src:h||j?"/assets/logo.png":"/assets/logo-white.png",alt:"E-TIB Gruppe",fill:!0,className:"object-contain object-left",priority:!0,sizes:"192px"})}),(0,b.jsxs)("nav",{className:"hidden md:flex items-center gap-10",children:[a&&a.length>0&&a.map(a=>{let c=a.url.startsWith("/")&&!a.url.match(/^\/(en|de)/)?`/${m}${a.url}`:a.url;return(0,b.jsx)(d.default,{href:c,className:`font-semibold text-sm uppercase tracking-widest transition-all duration-300 ${h?"text-text-primary hover:text-primary":"text-neutral-light hover:text-primary-light"}`,children:a.label},a.url)}),(0,b.jsx)("div",{className:"h-4 w-px bg-white/20 mx-2"}),(0,b.jsx)(o,{}),(0,b.jsx)(d.default,{href:`/${m}/kontakt`,className:"rounded-xl bg-primary hover:bg-primary-dark text-neutral-light px-8 py-3 font-bold text-sm uppercase tracking-wider transition-all shadow-xl hover:shadow-primary/20 hover:-translate-y-0.5 active:translate-y-0",children:"Kontakt"})]}),(0,b.jsx)("button",{className:"md:hidden z-50 text-primary p-2",onClick:()=>k(!j),"aria-label":"Toggle menu",children:(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:h||j?"currentColor":"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,b.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("line",{x1:"3",x2:"21",y1:"6",y2:"6"}),(0,b.jsx)("line",{x1:"3",x2:"21",y1:"12",y2:"12"}),(0,b.jsx)("line",{x1:"3",x2:"21",y1:"18",y2:"18"})]})})})]})}),(0,b.jsx)(w,{children:j&&(0,b.jsx)(g.motion.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2},className:"fixed inset-0 z-40 bg-white md:hidden pt-32 pb-8 px-6 overflow-y-auto",children:(0,b.jsxs)("nav",{className:"flex flex-col gap-6",children:[a&&a.length>0&&a.map(a=>{let c=a.url.startsWith("/")&&!a.url.match(/^\/(en|de)/)?`/${m}${a.url}`:a.url;return(0,b.jsx)(d.default,{href:c,className:"text-2xl font-heading font-bold text-neutral-dark border-b border-neutral-100 pb-4",children:a.label},a.url)}),(0,b.jsx)(d.default,{href:`/${m}/kontakt`,className:"text-2xl font-heading font-bold text-primary border-b border-neutral-100 pb-4",children:"Kontakt"}),(0,b.jsxs)("div",{className:"mt-8 pt-6",children:[(0,b.jsx)("p",{className:"text-text-secondary text-sm font-bold uppercase tracking-widest mb-4",children:"Sprache wählen"}),(0,b.jsx)(o,{mobile:!0})]})]})})})]})}a.s(["Header",()=>x],581631)},909381,a=>{"use strict";var b=a.i(526156),c=a.i(603836);function d(){let a=(0,c.useTranslations)("Navigation");return(0,b.jsx)("a",{href:"#main-content",className:"fixed -top-full left-4 z-[100] px-6 py-3 bg-white text-primary-dark font-bold rounded-lg shadow-xl outline-none ring-2 ring-accent transition-all duration-300 focus:top-4",children:a("skipToContent")})}a.s(["default",()=>d])},749397,a=>{"use strict";var b=a.i(526156),c=a.i(150765);let d=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim(),e=a=>{let b=a.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,b,c)=>c?c.toUpperCase():b.toLowerCase());return b.charAt(0).toUpperCase()+b.slice(1)};var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let g=(0,c.forwardRef)(({color:a="currentColor",size:b=24,strokeWidth:e=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,c.createElement)("svg",{ref:l,...f,width:b,height:b,stroke:a,strokeWidth:g?24*Number(e)/Number(b):e,className:d("lucide",h),...!i&&!(a=>{for(let b in a)if(b.startsWith("aria-")||"role"===b||"title"===b)return!0;return!1})(k)&&{"aria-hidden":"true"},...k},[...j.map(([a,b])=>(0,c.createElement)(a,b)),...Array.isArray(i)?i:[i]])),h=(a,b)=>{let f=(0,c.forwardRef)(({className:f,...h},i)=>(0,c.createElement)(g,{ref:i,iconNode:b,className:d(`lucide-${e(a).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${a}`,f),...h}));return f.displayName=e(a),f},i=h("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),j=h("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var k=a.i(638847);function l(){let[,a]=(0,c.useState)("checking"),[d,e]=(0,c.useState)(""),[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{(async()=>{let b=new URLSearchParams(window.location.search).has("cms_debug"),c=k.config.isDevelopment,d=k.config.isTesting,f=process.env.NEXT_PUBLIC_TARGET||"";if(c||d||"branch"===f||b)try{let b=await fetch("/api/health/cms"),c=await b.json();"ok"!==c.status?(a("error"),e(c.message),g(!0)):(a("ok"),g(!1))}catch{(b||c)&&(a("error"),e("Could not connect to CMS health endpoint"),g(!0))}})()},[]),f)?(0,b.jsx)("div",{className:"fixed bottom-4 right-4 z-[9999] animate-slide-up",children:(0,b.jsx)("div",{className:"bg-red-500/90 backdrop-blur-md border border-red-400 text-white p-4 rounded-2xl shadow-2xl max-w-sm",children:(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"bg-white/20 p-2 rounded-lg",children:(0,b.jsx)(i,{className:"w-5 h-5"})}),(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("h4",{className:"font-bold text-sm mb-1",children:"CMS Issue Detected"}),(0,b.jsx)("p",{className:"text-xs opacity-90 leading-relaxed mb-3",children:'relation "products" does not exist'===d?"The database schema is missing. Please run migrations for this environment.":"A content service is unavailable. Check the deployment logs for details."}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("button",{onClick:()=>window.location.reload(),className:"bg-white text-red-600 text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-lg flex items-center gap-2 hover:bg-neutral-100 transition-colors",children:[(0,b.jsx)(j,{className:"w-3 h-3"}),"Retry"]}),(0,b.jsx)("button",{onClick:()=>g(!1),className:"bg-black/20 text-white text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-lg hover:bg-black/30 transition-colors",children:"Dismiss"})]})]})]})})}):null}a.s(["default",()=>l],749397)},905651,a=>{"use strict";var b=a.i(526156),c=a.i(411487),d=a.i(150765);let e=(0,c.default)(async()=>{},{loadableGenerated:{modules:[565071]},ssr:!1}),f=(0,c.default)(async()=>{},{loadableGenerated:{modules:[248785]},ssr:!1}),g=(0,c.default)(async()=>{},{loadableGenerated:{modules:[950648]},ssr:!1});function h(){let[a,c]=(0,d.useState)(!1);return((0,d.useEffect)(()=>{if("true"!==process.env.NEXT_PUBLIC_CI){let a=setTimeout(()=>c(!0),2500);return()=>clearTimeout(a)}},[]),a)?(0,b.jsxs)(d.Suspense,{fallback:null,children:[(0,b.jsx)(e,{}),(0,b.jsx)(f,{}),(0,b.jsx)(g,{})]}):null}a.s(["default",()=>h])},650766,a=>{"use strict";var b=a.i(268200),c=a.i(526156);function d({locale:a,...d}){if(!a)throw Error(void 0);return(0,c.jsx)(b.IntlProvider,{locale:a,...d})}a.s(["default",()=>d])},894447,a=>{"use strict";var b=a.i(526156);let c=(0,a.i(411487).default)(async()=>{},{loadableGenerated:{modules:[566137]},ssr:!1});function d({feedbackEnabled:a}){return a?(0,b.jsx)(c,{}):null}a.s(["default",()=>d])}];
//# debugId=cc4a72d4-07d7-ce53-2b49-3c2248b8af36
//# sourceMappingURL=_5c5ade9f._.js.map