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

4 lines
7.3 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]="66f35046-5473-64cf-9487-00796d47bcf4")}catch(e){}}();
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,499139,e=>{"use strict";var t=e.i(452797),r=e.i(907358);function s({email:e,className:s="",children:a}){let[n,i]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{i(!0)},[]),n)?(0,t.jsx)("a",{href:`mailto:${e}`,className:s,children:a||e}):(0,t.jsx)("span",{className:s,"aria-hidden":"true",children:a||e.replace("@"," [at] ").replace(/\./g," [dot] ")})}e.s(["default",()=>s])},936744,e=>{"use strict";var t=e.i(452797);let r=(0,e.i(902498).default)(()=>e.A(246796),{loadableGenerated:{modules:[408235]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"h-full w-full bg-neutral-medium flex items-center justify-center",children:(0,t.jsx)("div",{className:"animate-pulse text-primary font-medium",children:"Loading Map..."})})});function s({address:e,lat:s,lng:a}){return(0,t.jsx)(r,{locations:[{name:"E-TIB Gruppe",address:e,lat:s,lng:a}]})}e.s(["default",()=>s])},73191,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={callServer:function(){return n.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let n=e.r(273136),i=e.r(694658),o=e.r(429220)},833128,e=>{"use strict";var t=e.i(452797),r=e.i(907358),s=e.i(190422);e.i(445774);var a=e.i(676525),n=e.i(982016),i=e.i(105050),o=e.i(801206),c=e.i(587778),l=e.i(9797),d=e.i(73191);let m=(0,d.createServerReference)("401c12dde97031c8648de6d043366427e6ee05a7f1",d.callServer,void 0,d.findSourceMapURL,"sendContactFormAction");var u=e.i(630655),x=e.i(216033);function f(){let e=(0,s.useTranslations)("Contact"),{trackEvent:d}=(0,u.useAnalytics)(),[f,p]=(0,r.useState)("idle"),[h,g]=(0,r.useState)(!1),v=e=>{h||(g(!0),d(x.AnalyticsEvents.FORM_START,{form_id:"contact_form",form_name:"Contact"})),d(x.AnalyticsEvents.FORM_FIELD_FOCUS,{form_id:"contact_form",field_id:e})};async function j(e){e.preventDefault(),p("submitting");let t=new FormData(e.currentTarget),r=t.get("email");try{let s=await m(t);s?.success?(d("contact_form_submission",{form_type:"general",email:r}),p("success"),e.target.reset()):(console.error("Contact form submission failed:",{email:r,error:s.error}),d(x.AnalyticsEvents.FORM_ERROR,{form_id:"contact_form",error:s.error||"submission_failed"}),p("error"))}catch(e){console.error("Contact form submission error:",{email:r,error:e}),d(x.AnalyticsEvents.FORM_ERROR,{form_id:"contact_form",error:e.message||"unexpected_error"}),p("error")}}return"success"===f?(0,t.jsxs)(i.Card,{className:"p-6 md:p-12 rounded-2xl md:rounded-[40px] border-none shadow-2xl text-center",role:"alert","aria-live":"polite",children:[(0,t.jsx)("div",{className:"w-20 h-20 bg-accent rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg shadow-accent/20",children:(0,t.jsx)("svg",{className:"w-10 h-10 text-primary-dark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),(0,t.jsx)(n.Heading,{level:3,className:"mb-4",children:e("form.successTitle")||"Message Sent!"}),(0,t.jsx)("p",{className:"text-text-secondary text-lg mb-8",children:e("form.successDesc")||"Thank you for your message. We will get back to you as soon as possible."}),(0,t.jsx)(a.Button,{onClick:()=>p("idle"),variant:"saturated",children:e("form.sendAnother")||"Send another message"})]}):"error"===f?(0,t.jsxs)(i.Card,{className:"p-6 md:p-12 rounded-2xl md:rounded-[40px] border-destructive/20 shadow-2xl text-center bg-destructive/5 animate-slide-up",role:"alert","aria-live":"assertive",children:[(0,t.jsx)("div",{className:"w-20 h-20 bg-destructive rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg shadow-destructive/20",children:(0,t.jsxs)("svg",{className:"w-10 h-10 text-destructive-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,t.jsx)(n.Heading,{level:3,className:"mb-4 text-destructive font-black",children:e("form.errorTitle")||"Submission Failed!"}),(0,t.jsx)("p",{className:"text-destructive/80 text-lg mb-8 leading-relaxed font-medium",children:e("form.error")||"Something went wrong. Please check your input and try again."}),(0,t.jsx)(a.Button,{onClick:()=>p("idle"),variant:"destructive",size:"lg",className:"w-full",children:e("form.tryAgain")||"Try Again"})]}):(0,t.jsxs)(i.Card,{className:"p-6 md:p-12 rounded-2xl md:rounded-[40px] border-none shadow-2xl animate-slide-up",children:[(0,t.jsx)(n.Heading,{level:3,subtitle:e("form.subtitle"),className:"mb-6 md:mb-10",children:e("form.title")}),(0,t.jsxs)("form",{id:"contact-form",onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8",children:[(0,t.jsx)("input",{type:"text",name:"company_website",tabIndex:-1,autoComplete:"off",style:{display:"none"},"aria-hidden":"true"}),(0,t.jsxs)("div",{className:"space-y-1 md:space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"contact-name",children:e("form.name")}),(0,t.jsx)(o.Input,{type:"text",id:"contact-name",name:"name",autoComplete:"name",enterKeyHint:"next",onFocus:()=>v("contact-name"),required:!0})]}),(0,t.jsxs)("div",{className:"space-y-1 md:space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"contact-email",children:e("form.email")}),(0,t.jsx)(o.Input,{type:"email",id:"contact-email",name:"email",autoComplete:"email",inputMode:"email",enterKeyHint:"next",placeholder:e("form.emailPlaceholder"),onFocus:()=>v("contact-email"),required:!0})]}),(0,t.jsxs)("div",{className:"md:col-span-2 space-y-1 md:space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"contact-message",children:e("form.message")}),(0,t.jsx)(c.Textarea,{id:"contact-message",name:"message",rows:4,enterKeyHint:"send",placeholder:e("form.messagePlaceholder"),onFocus:()=>v("contact-message"),required:!0})]}),(0,t.jsx)("div",{className:"md:col-span-2 pt-2 md:pt-4",children:(0,t.jsx)(a.Button,{type:"submit",variant:"saturated",size:"lg",disabled:"submitting"===f,className:"w-full shadow-xl shadow-saturated/20 md:h-16 md:px-10 md:text-xl active:scale-[0.98] transition-transform",children:"submitting"===f?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("form.submitting")||"Sending..."]}):e("form.submit")})})]})]})}e.s(["default",()=>f],833128)},246796,e=>{e.v(t=>Promise.all(["static/chunks/c3e8a4ea96f068f8.js","static/chunks/e637d58b27e09d36.css"].map(t=>e.l(t))).then(()=>t(408235)))}]);
//# debugId=66f35046-5473-64cf-9487-00796d47bcf4