try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="25f91a90-89fb-43dc-8678-649b6af3bfc5",e._sentryDebugIdIdentifier="sentry-dbid-25f91a90-89fb-43dc-8678-649b6af3bfc5")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[242,4917],{4906:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),!function(e,a){for(var r in a)Object.defineProperty(e,r,{enumerable:!0,get:a[r]})}(a,{callServer:function(){return l.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}});let l=r(10909),s=r(11189),n=r(46764)},14398:(e,a,r)=>{r.d(a,{s:()=>o});let l={writeKey:r(55036).env.NEXT_PUBLIC_SEGMENT_WRITE_KEY||""};var s=r(75785),n=r(83982);let t={gaId:r(55036).env.NEXT_PUBLIC_GA_ID||""};function o(){let e=(0,n.useCallback)(e=>{let{name:a,params:r}=e;try{if(t.gaId){let e={event:a};if(r)for(let a in r)e[a]=r[a];(0,s.sendGAEvent)(e)}}catch(e){console.error("Failed to send Google Analytics event:",e)}(e=>{let{event:a,properties:r}=e;if(l.writeKey&&window.analytics)try{window.analytics.track(a,r)}catch(e){console.error("Failed to track Segment event:",e)}})({event:a,properties:r})},[]);return{sendEvent:e,identifyUser:(0,n.useCallback)(e=>{let{userId:a,traits:r}=e;(e=>{let{userId:a,traits:r}=e;if(l.writeKey&&window.analytics)try{window.analytics.identify(a,r)}catch(e){console.error("Failed to identify Segment user:",e)}})({userId:a,traits:r})},[]),trackPage:(0,n.useCallback)(()=>{if(l.writeKey&&window.analytics)try{window.analytics.page()}catch(e){console.error("Failed to track Segment page:",e)}},[])}}},24917:(e,a,r)=>{r.r(a),r.d(a,{ContactModal:()=>u});var l=r(48958),s=r(20669),n=r(37319),t=r(82432),o=r(47309),c=r(85032),i=r(53022),d=r(83982),m=r(30242);let u=(0,d.memo)(e=>{let{isOpen:a,onOpenChange:r}=e;return(0,l.jsx)(s.Y,{isOpen:a,onOpenChange:r,size:"sm",hideCloseButton:!0,children:(0,l.jsx)(n.g,{className:"pb-0",children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.c,{className:"flex flex-col gap-1",children:"Contact me"}),(0,l.jsxs)(o.h,{children:[(0,l.jsxs)("p",{children:["Fill in the form below or email me at"," ",(0,l.jsx)("span",{className:"select-all",children:"Luca@Luca-Dellanna.com"})]}),(0,l.jsx)("p",{children:"I read all emails personally and usually reply within 24h."}),(0,l.jsx)(m.default,{})]}),(0,l.jsx)(c.q,{children:(0,l.jsx)(i.T,{color:"primary",variant:"light",onPress:e,className:"shadow-none text-white",children:"Close"})})]})})})});u.displayName="ContactModal"},30242:(e,a,r)=>{r.r(a),r.d(a,{default:()=>i});var l=r(48958),s=r(83982),n=r(53022),t=r(34364),o=r(14398);let c={name:"",email:"",message:""};function i(e){let{title:a,description:r}=e,[i,d]=(0,s.useState)(c),[m,u]=(0,s.useState)(!1),[f,b]=(0,s.useState)("idle"),{sendEvent:h}=(0,o.s)(),x=(0,s.useCallback)(e=>{let{name:a,value:r}=e.target;d(e=>({...e,[a]:r}))},[]),g=(0,s.useCallback)(async e=>{e.preventDefault(),u(!0),b("idle");try{let e=await (0,t.Z)(i);if("success"===e)b("success"),d(c),h({name:"contact_form_submitted",params:{success:!0,form_name:i.name,form_email:i.email}});else throw Error("Unexpected response")}catch(e){console.error("Submission error:",e),b("error"),h({name:"contact_form_submitted",params:{success:!1,form_name:i.name,form_email:i.email}}),e instanceof Error&&console.error("Error details:",{message:e.message,stack:e.stack})}finally{u(!1)}},[i,h]);return"success"===f?(0,l.jsxs)("div",{className:"px-4 py-3 rounded-lg bg-green-100 border border-green-400",role:"alert",children:[(0,l.jsx)("strong",{className:"font-bold",children:"Thank you!"})," ",(0,l.jsx)("span",{className:"block sm:inline",children:"Your message has been sent successfully. I'll get back to you soon."})]}):(0,l.jsxs)("form",{onSubmit:g,className:"max-w-2xl mx-auto my-8 p-8 border border-black rounded-lg shadow-lg",children:[a&&(0,l.jsx)("h2",{className:"text-2xl font-bold mb-4",children:a}),r&&(0,l.jsx)("p",{className:"text-gray-600 mb-4",children:r}),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("label",{htmlFor:"name",className:"text-sm font-medium text-gray-700",children:["Name ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{id:"name",name:"name",type:"text",value:i.name,onChange:x,required:!0,className:"px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Your name (and organization, optionally)"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("label",{htmlFor:"email",className:"text-sm font-medium text-gray-700",children:["Email ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{id:"email",name:"email",type:"email",value:i.email,onChange:x,required:!0,className:"px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"your.email@example.com"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("label",{htmlFor:"message",className:"text-sm font-medium text-gray-700",children:["How can I help you? ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("textarea",{id:"message",name:"message",value:i.message,onChange:x,required:!0,rows:4,className:"px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-vertical",placeholder:"Tell me about your project, question, or how I can help..."})]}),(0,l.jsx)(n.T,{type:"submit",color:"primary",className:"font-semibold rounded-lg text-white",isLoading:m,children:m?"Submitting...":"Submit"}),"error"===f&&(0,l.jsxs)("p",{className:"text-red-600",children:["There was an error submitting the form. Please try emailing"," ",(0,l.jsx)("a",{href:"mailto:Luca@Luca-Dellanna.com",children:"Luca@Luca-Dellanna.com"})," ","directly."]})]})]})}},34364:(e,a,r)=>{r.d(a,{Z:()=>s});var l=r(4906);let s=(0,l.createServerReference)("40d202e80d0f9ee58d3426e110cdb23ad9b6938aef",l.callServer,void 0,l.findSourceMapURL,"sendEmail")}}]);