try{!function(){var 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]="23d5434a-96e2-4f2b-bc4c-6e016bb924d8",e._sentryDebugIdIdentifier="sentry-dbid-23d5434a-96e2-4f2b-bc4c-6e016bb924d8")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[187],{17344:(e,a,r)=>{r.d(a,{$m:()=>n,aF:()=>i,cw:()=>c,jl:()=>d,rQ:()=>o});var s=r(90947),t=r(6627),l=r(77570);function i(e){let{children:a,isOpen:r,onOpenChange:i,className:n}=e,o=(0,t.useCallback)(e=>{"Escape"===e.key&&i(!1)},[i]);return((0,t.useEffect)(()=>{if(r)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[r,o]),r)?(0,s.jsxs)("div",{className:(0,l.QP)("fixed inset-0 z-50 flex items-center justify-center bg-black/50",n),onClick:e=>{e.target===e.currentTarget&&i(!1)},onKeyDown:e=>{"Escape"===e.key&&i(!1)},role:"button",tabIndex:0,"aria-label":"Click outside or press Escape to close this modal","aria-describedby":"modal-backdrop-description",children:[(0,s.jsx)("div",{id:"modal-backdrop-description",className:"sr-only",children:"Click outside or press Escape to close this modal"}),a]}):null}function n(e){let{children:a,className:r,onOpenChange:t}=e;return(0,s.jsx)("div",{className:(0,l.QP)("relative bg-white rounded-lg shadow-xl max-w-xl w-full mx-4 max-h-[90vh] overflow-hidden",r),children:"function"==typeof a?a(()=>t(!1)):a})}function o(e){let{children:a,className:r}=e;return(0,s.jsx)("div",{className:(0,l.QP)("px-6 py-4 border-b border-gray-200",r),children:a})}function c(e){let{children:a,className:r}=e;return(0,s.jsx)("div",{className:(0,l.QP)("px-6 py-4",r),children:a})}function d(e){let{children:a,className:r}=e;return(0,s.jsx)("div",{className:(0,l.QP)("px-6 py-4 border-t border-gray-200 flex justify-end gap-2",r),children:a})}},26347:(e,a,r)=>{r.d(a,{M:()=>o});var s=r(70639),t=r(37476),l=r(38132),i=r(6627),n=r(24342);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{componentName:a,operationName:r,onError:o,rethrow:c=!1}=e;return{handleAsyncError:(0,i.useCallback)(async(e,i)=>{try{return await e()}catch(d){let e;if(e=(0,l.A)(d)?d:d instanceof Error?d.message.includes("fetch")||d.message.includes("network")?(0,l.tS)("Network connection failed. Please check your internet connection and try again.",{originalError:d.message,...i}):d.message.includes("validation")||d.message.includes("invalid")?(0,l.UL)(d.message,{originalError:d.message,...i}):d.message.includes("server")||d.message.includes("500")?(0,l.ic)("Server error occurred. Please try again later.",{originalError:d.message,...i}):(0,l.go)("An error occurred while processing your request. Please try again.",{originalError:d.message,...i}):(0,l.go)("An unexpected error occurred. Please try again.",{originalError:String(d),...i}),(0,l.A)(e)&&e.isUserFriendly||s.v4(s=>{let l;if((null==i?void 0:i.formData)&&"object"==typeof i.formData&&null!==i.formData){let e=i.formData;e.email&&"string"==typeof e.email&&(l=e.email)}else(null==i?void 0:i.email)&&"string"==typeof i.email&&(l=i.email);l&&s.setUser({email:l}),t.Cp(e,{extra:{componentName:a,operationName:r,context:i,originalError:d},tags:{location:a||"unknown",operation:r||"unknown",errorType:e.name}})}),o&&o(e),n.K.error("Error in ".concat(a||"component"," during ").concat(r||"operation",":"),e),c)throw e;return null}},[a,r,o,c])}}},42954:(e,a,r)=>{r.d(a,{X:()=>s});let s=e=>{let[a,r]=e.split("@");if(!a||!r)return e;let s=r.split(".");if(s.length<2)return e;let t=s[0],l=s.slice(1).join(".");return t&&l?"".concat(a.charAt(0).toUpperCase()+a.slice(1),"@").concat(t.charAt(0).toUpperCase()+t.slice(1),".").concat(l):e}},50187:(e,a,r)=>{r.r(a),r.d(a,{default:()=>E});var s=r(90947),t=r(6627),l=r(47237),i=r(76342),n=r(77570);function o(e){let{label:a,id:r,type:t="text",placeholder:l,required:i=!1,disabled:o=!1,register:c,error:d,rows:m=4,className:u="",helperText:x,leftContent:p,rightContent:g}=e,b=(0,n.QP)("w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-focus focus:border-focus resize-vertical transition-colors duration-200",d?"border-error":"border-gray-300",p&&"pl-10",g&&"pr-10",u),h=d?"".concat(r,"-error"):void 0,f=x?"".concat(r,"-helper"):void 0;return(0,s.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[a&&(0,s.jsxs)("label",{htmlFor:r,className:"text-sm font-medium text-gray-700",children:[a," ",i&&(0,s.jsx)("span",{className:"text-error","aria-hidden":"true",children:"*"})]}),(0,s.jsxs)("div",{className:"relative w-full",children:[p&&(0,s.jsx)("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400",children:p}),"textarea"===t?(0,s.jsx)("textarea",{id:r,rows:m,...c,className:b,placeholder:l,"aria-describedby":h||f,"aria-invalid":!!d,disabled:o,"aria-required":i}):(0,s.jsx)("input",{id:r,type:t,...c,className:b,placeholder:l,"aria-describedby":h||f,"aria-invalid":!!d,disabled:o,"aria-required":i}),g&&(0,s.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:g})]}),x&&!d&&(0,s.jsx)("p",{id:f,className:"text-sm text-gray-500",children:x}),d&&(0,s.jsx)("p",{id:h,className:"text-error text-sm",role:"alert",children:d.message})]})}var c=r(17344),d=r(30417),m=r(38132),u=r(68239),x=r(62102),p=r(26347),g=r(28004),b=r(26403),h=r(42954),f=r(64491);let y=f.YjP().min(1,"Email is required").regex(/^[^\s@]+@[^\s@]+\.[^\s@]+$/,"Please enter a valid email address").max(254,"Email must be 254 characters or less"),j=f.YjP().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(RegExp("^[\\p{L}\\d\\s\\-'.()&/@#,]+$","u"),"Name contains invalid characters"),v=f.YjP().min(1,"Message is required").max(2e3,"Message must be 2000 characters or less").regex(/^[\s\S]*$/,"Message contains invalid characters"),w=f.aig().min(1,"Rating is required").max(5,"Rating must be between 1 and 5"),N=f.Ikc({name:j,email:y,message:v,honeypot:f.YjP().optional(),formLoadTime:f.aig().optional(),submissionTime:f.aig().optional()});f.Ikc({email:y,source:f.YjP().max(100,"Source must be 100 characters or less").optional(),tags:f.YOg(f.YjP().max(50)).max(10,"Maximum 10 tags allowed").optional().default([])}),f.Ikc({name:j,email:y,rating:w,comment:f.YjP().min(10,"Comment must be at least 10 characters").max(1e3,"Comment must be 1000 characters or less").regex(/^[\s\S]*$/,"Comment contains invalid characters"),referrals:f.PVZ([f.YjP(),f.YjP(),f.YjP()]),category:f.k5n(["book","course","consulting","coaching","general"]).optional(),allowPublicUse:f.zMY().optional().default(!1)});var k=r(16297);function E(e){let{title:a,description:r}=e,[n,f]=(0,t.useState)("idle"),[y,j]=(0,t.useState)(!1),[v,w]=(0,t.useState)(!1),E=(0,t.useRef)(null),{sendEvent:P}=(0,x.s)(),{handleAsyncError:C}=(0,p.M)({componentName:"ContactForm",operationName:"form_submission"});(0,t.useEffect)(()=>{null===E.current&&(E.current=Date.now())},[]);let{register:S,handleSubmit:_,reset:I,formState:{errors:D,isSubmitting:Y}}=(0,g.mN)({resolver:(0,b.u)(N),mode:"onSubmit",defaultValues:{name:"",email:"",message:"",honeypot:""}}),T=(0,t.useCallback)(async e=>{f("idle"),w(!1);let a=await C(async()=>{var a;let r=await (0,u.Z)({...e,formLoadTime:null!=(a=E.current)?a:Date.now(),submissionTime:Date.now()});if("success"!==r&&"spam"!==r)throw(0,m.ic)("Unexpected response from email service",{emailResult:r,formData:e,type:"type_safety_violation"});return r},{formData:{name:e.name,email:e.email}});if(null===a){f("error"),w(!1),j(!0),P((0,k.bu)({success:!1,error_type:k.dK.NETWORK_OR_SERVER,form_name:e.name,form_email:e.email}));return}let r="success"===a;f(r?"success":"error"),w("spam"===a),r?I():j(!0),P((0,k.bu)({success:r,form_name:e.name,form_email:e.email}))},[P,C,I]);return"success"===n?(0,s.jsx)(i.m,{maxWidth:"2xl",padding:"none",className:"my-8",children:(0,s.jsxs)("div",{className:"px-4 py-3 rounded-lg bg-success-light border border-green-400",role:"alert","aria-live":"polite",children:[(0,s.jsx)("strong",{className:"font-bold",children:"Thank you!"})," ",(0,s.jsx)("span",{className:"block sm:inline",children:"Your message has been sent successfully. I'll get back to you soon."})]})}):(0,s.jsxs)(i.m,{maxWidth:"2xl",padding:"none",className:"my-8",children:[(0,s.jsxs)("form",{onSubmit:_(T),className:"p-8 border border-black rounded-lg shadow-lg bg-white","data-component":"ContactForm","aria-label":"Contact form",children:[a&&(0,s.jsx)("h2",{className:"text-2xl font-bold mb-4",children:a}),r&&(0,s.jsx)("p",{className:"text-muted mb-6",children:r}),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"sr-only","aria-hidden":"true",children:[(0,s.jsx)("label",{htmlFor:"address2",children:"Address Line 2"}),(0,s.jsx)("input",{type:"text",id:"address2",tabIndex:-1,autoComplete:"off",...S("honeypot")})]}),(0,s.jsx)(o,{label:"Name",id:"name",type:"text",placeholder:"Your name (and organization, optionally)",required:!0,register:S("name"),error:D.name,disabled:Y}),(0,s.jsx)(o,{label:"Email",id:"email",type:"email",placeholder:"your.email@example.com",required:!0,register:S("email"),error:D.email,disabled:Y}),(0,s.jsx)(o,{label:"How can I help you?",id:"message",type:"textarea",placeholder:"Tell me about your project, question, or how I can help...",required:!0,register:S("message"),error:D.message,disabled:Y,rows:4}),(0,s.jsx)(l.$,{type:"submit",variant:"primary",size:"lg",loading:Y,disabled:Y,className:"w-full sm:w-auto","aria-describedby":Y?"submitting-status":void 0,children:Y?"Submitting...":"Submit"}),Y&&(0,s.jsx)("div",{id:"submitting-status",className:"sr-only","aria-live":"polite",children:"Submitting contact form..."})]})]}),(0,s.jsx)(c.aF,{isOpen:y,onOpenChange:j,"aria-label":"Error notification for contact form submission failure",children:(0,s.jsx)(c.$m,{onOpenChange:j,children:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.rQ,{children:(0,s.jsx)("h2",{className:"text-xl font-bold text-red-600",children:v?"Unable to Submit Form":"Something Went Wrong"})}),(0,s.jsxs)(c.cw,{children:[v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"mb-4",children:"Our spam protection system detected potential automated activity. This helps protect against spam submissions."}),(0,s.jsx)("p",{className:"mb-4",children:"If you're a real person trying to contact me, I apologize for the inconvenience. Please email me directly instead:"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"mb-4",children:"We couldn't submit your message through the contact form. This might be due to a temporary issue with our email service."}),(0,s.jsx)("p",{className:"mb-4",children:(0,s.jsx)("strong",{children:"Please email me directly instead:"})})]}),(0,s.jsx)("p",{className:"text-center",children:(0,s.jsx)("a",{href:"mailto:".concat(d.config.contactEmail),className:"text-xl font-semibold text-primary hover:underline","aria-label":"Email Luca directly",children:(0,h.X)(d.config.contactEmail)})})]}),(0,s.jsx)(c.jl,{children:(0,s.jsx)(l.$,{variant:"primary",onClick:e,children:"Close"})})]})})})]})}},68239:(e,a,r)=>{r.d(a,{Z:()=>t});var s=r(92079);let t=(0,s.createServerReference)("40378f17db9498005fbc2bd2ddf4d270cb344f865e",s.callServer,void 0,s.findSourceMapURL,"sendEmail")},76342:(e,a,r)=>{r.d(a,{m:()=>n});var s=r(90947);r(6627);var t=r(77570);let l={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl",full:"max-w-full",none:""},i={none:"",sm:"px-4",md:"px-6",lg:"px-8",xl:"px-12"};function n(e){let{children:a,className:r,as:n="div",maxWidth:o="lg",padding:c="md",centered:d=!0,fluid:m=!1}=e,u=(0,t.QP)("w-full",!m&&"none"!==o&&l[o],!m&&d&&"mx-auto",i[c],r);return(0,s.jsx)(n,{className:u,children:a})}}}]);