5 lines
7.1 KiB
JavaScript
5 lines
7.1 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]="4105db8e-5b9e-5274-3abd-e18847b56c56")}catch(e){}}();
|
|
module.exports=[567784,a=>{"use strict";var b=a.i(526156),c=a.i(150765);function d({email:a,className:d="",children:e}){let[f,g]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{g(!0)},[]),f)?(0,b.jsx)("a",{href:`mailto:${a}`,className:d,children:e||a}):(0,b.jsx)("span",{className:d,"aria-hidden":"true",children:e||a.replace("@"," [at] ").replace(/\./g," [dot] ")})}a.s(["default",()=>d])},100249,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={callServer:function(){return f.callServer},createServerReference:function(){return h.createServerReference},findSourceMapURL:function(){return g.findSourceMapURL}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(297622),g=a.r(308360),h=a.r(770173)},366014,a=>{"use strict";var b=a.i(526156),c=a.i(150765),d=a.i(603836);a.i(594214);var e=a.i(912466),f=a.i(544027),g=a.i(434904),h=a.i(618180),i=a.i(781027),j=a.i(41100),k=a.i(100249);let l=(0,k.createServerReference)("401c12dde97031c8648de6d043366427e6ee05a7f1",k.callServer,void 0,k.findSourceMapURL,"sendContactFormAction");var m=a.i(274209),n=a.i(281682);function o(){let a=(0,d.useTranslations)("Contact"),{trackEvent:k}=(0,m.useAnalytics)(),[o,p]=(0,c.useState)("idle"),[q,r]=(0,c.useState)(!1),s=a=>{q||(r(!0),k(n.AnalyticsEvents.FORM_START,{form_id:"contact_form",form_name:"Contact"})),k(n.AnalyticsEvents.FORM_FIELD_FOCUS,{form_id:"contact_form",field_id:a})};async function t(a){a.preventDefault(),p("submitting");let b=new FormData(a.currentTarget),c=b.get("email");try{let d=await l(b);d?.success?(k("contact_form_submission",{form_type:"general",email:c}),p("success"),a.target.reset()):(console.error("Contact form submission failed:",{email:c,error:d.error}),k(n.AnalyticsEvents.FORM_ERROR,{form_id:"contact_form",error:d.error||"submission_failed"}),p("error"))}catch(a){console.error("Contact form submission error:",{email:c,error:a}),k(n.AnalyticsEvents.FORM_ERROR,{form_id:"contact_form",error:a.message||"unexpected_error"}),p("error")}}return"success"===o?(0,b.jsxs)(g.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,b.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,b.jsx)("svg",{className:"w-10 h-10 text-primary-dark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),(0,b.jsx)(f.Heading,{level:3,className:"mb-4",children:a("form.successTitle")||"Message Sent!"}),(0,b.jsx)("p",{className:"text-text-secondary text-lg mb-8",children:a("form.successDesc")||"Thank you for your message. We will get back to you as soon as possible."}),(0,b.jsx)(e.Button,{onClick:()=>p("idle"),variant:"saturated",children:a("form.sendAnother")||"Send another message"})]}):"error"===o?(0,b.jsxs)(g.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,b.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,b.jsxs)("svg",{className:"w-10 h-10 text-destructive-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,b.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15",strokeLinecap:"round",strokeLinejoin:"round"}),(0,b.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,b.jsx)(f.Heading,{level:3,className:"mb-4 text-destructive font-black",children:a("form.errorTitle")||"Submission Failed!"}),(0,b.jsx)("p",{className:"text-destructive/80 text-lg mb-8 leading-relaxed font-medium",children:a("form.error")||"Something went wrong. Please check your input and try again."}),(0,b.jsx)(e.Button,{onClick:()=>p("idle"),variant:"destructive",size:"lg",className:"w-full",children:a("form.tryAgain")||"Try Again"})]}):(0,b.jsxs)(g.Card,{className:"p-6 md:p-12 rounded-2xl md:rounded-[40px] border-none shadow-2xl animate-slide-up",children:[(0,b.jsx)(f.Heading,{level:3,subtitle:a("form.subtitle"),className:"mb-6 md:mb-10",children:a("form.title")}),(0,b.jsxs)("form",{id:"contact-form",onSubmit:t,className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8",children:[(0,b.jsx)("input",{type:"text",name:"company_website",tabIndex:-1,autoComplete:"off",style:{display:"none"},"aria-hidden":"true"}),(0,b.jsxs)("div",{className:"space-y-1 md:space-y-2",children:[(0,b.jsx)(j.Label,{htmlFor:"contact-name",children:a("form.name")}),(0,b.jsx)(h.Input,{type:"text",id:"contact-name",name:"name",autoComplete:"name",enterKeyHint:"next",onFocus:()=>s("contact-name"),required:!0})]}),(0,b.jsxs)("div",{className:"space-y-1 md:space-y-2",children:[(0,b.jsx)(j.Label,{htmlFor:"contact-email",children:a("form.email")}),(0,b.jsx)(h.Input,{type:"email",id:"contact-email",name:"email",autoComplete:"email",inputMode:"email",enterKeyHint:"next",placeholder:a("form.emailPlaceholder"),onFocus:()=>s("contact-email"),required:!0})]}),(0,b.jsxs)("div",{className:"md:col-span-2 space-y-1 md:space-y-2",children:[(0,b.jsx)(j.Label,{htmlFor:"contact-message",children:a("form.message")}),(0,b.jsx)(i.Textarea,{id:"contact-message",name:"message",rows:4,enterKeyHint:"send",placeholder:a("form.messagePlaceholder"),onFocus:()=>s("contact-message"),required:!0})]}),(0,b.jsx)("div",{className:"md:col-span-2 pt-2 md:pt-4",children:(0,b.jsx)(e.Button,{type:"submit",variant:"saturated",size:"lg",disabled:"submitting"===o,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"===o?(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.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,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,b.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"})]}),a("form.submitting")||"Sending..."]}):a("form.submit")})})]})]})}a.s(["default",()=>o],366014)},648658,a=>{"use strict";var b=a.i(526156);let c=(0,a.i(411487).default)(async()=>{},{loadableGenerated:{modules:[408235]},ssr:!1,loading:()=>(0,b.jsx)("div",{className:"h-full w-full bg-neutral-medium flex items-center justify-center",children:(0,b.jsx)("div",{className:"animate-pulse text-primary font-medium",children:"Loading Map..."})})});function d({address:a,lat:d,lng:e}){return(0,b.jsx)(c,{locations:[{name:"E-TIB Gruppe",address:a,lat:d,lng:e}]})}a.s(["default",()=>d])}];
|
|
|
|
//# debugId=4105db8e-5b9e-5274-3abd-e18847b56c56
|
|
//# sourceMappingURL=_f1a21f8b._.js.map
|