try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a7e6e3ad-b1be-4abb-a786-88475aeac65e",e._sentryDebugIdIdentifier="sentry-dbid-a7e6e3ad-b1be-4abb-a786-88475aeac65e")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1393],{173:(e,t,r)=>{"use strict";function s(e,t){let r=function(e,t){try{if(e.startsWith("http://")||e.startsWith("https://"))return new URL(e),e;if(e.startsWith("/"))return new URL(e,window.location.origin).href;if(e.startsWith("//"))return new URL(e,window.location.protocol).href;if(!e.startsWith("/")&&!e.startsWith("http"))return new URL("/".concat(e),window.location.origin).href;return null}catch(t){return console.warn("Invalid URL detected:",e,t),null}}(t);if(!r)return console.warn("Attempted to navigate to invalid URL:",t),!1;try{return e.push(r),!0}catch(e){return console.error("Navigation failed:",e),!1}}r.d(t,{LI:()=>s})},14916:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r(83982);function i(e){let{maxWidth:t,minScale:r=.1,debounceMs:i=100}=e,[l,a]=(0,s.useState)(1),n=(0,s.useRef)(void 0),o=(0,s.useCallback)(()=>{a(Math.min(.95,Math.max(r,window.innerWidth/t)))},[t,r]);return(0,s.useEffect)(()=>{let e=()=>n.current&&clearTimeout(n.current),t=()=>{e(),n.current=setTimeout(o,i)};return o(),window.addEventListener("resize",t,{passive:!0}),()=>{e(),window.removeEventListener("resize",t)}},[o,i]),l}},33313:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HomeNewsletterSignup:()=>f});var s=r(48958),i=r(83982),l=r(85631),a=r(42997),n=r(53022),o=r(173),c=r(45368);let d=(0,i.memo)(function(){let[e,t]=(0,i.useState)(""),[l,a]=(0,i.useState)(!1),[d,m]=(0,i.useState)(null),u=(0,c.useRouter)(),h=async t=>{if(t.preventDefault(),!l){a(!0),m(null);try{let{config:t}=await r.e(4717).then(r.bind(r,74717));if(!t.convertkit.formUrl)throw Error("ConvertKit form URL not configured");let s=await fetch(t.convertkit.formUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email_address:e})}),i={ok:s.ok,error:s.ok?void 0:await s.text()};i.ok?(0,o.LI)(u,t.site.welcomePage||"/welcome"):(console.error("Subscription failed:",i.error),m("Subscription failed. Please try again."))}catch(e){console.error("Error:",e),m("An error occurred. Please try again later.")}finally{a(!1)}}};return(0,s.jsxs)("form",{onSubmit:h,className:"mx-auto md:max-w-none flex px-2 my-2 md:my-4 items-center justify-center","aria-label":"Newsletter subscription form",children:[(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsxs)("div",{id:"ck-form",className:"flex flex-col sm:flex-row gap-2 items-center sm:items-center",children:[(0,s.jsx)("label",{htmlFor:"small-ck-email",className:"sr-only",children:"Email address"}),(0,s.jsx)("input",{id:"small-ck-email",type:"email",value:e,onChange:e=>t(e.target.value),placeholder:"Your email",required:!0,className:"small-ck-input w-full min-h-10 sm:h-8 max-w-none sm:max-w-xs shrink text-sm px-2 py-2 sm:py-1 rounded-md border border-gray-300 focus:outline-hidden focus:ring-2 focus:ring-focus","aria-label":"Email address","aria-describedby":d?"small-ck-error":void 0,"aria-invalid":!!d,disabled:l}),(0,s.jsx)(n.T,{type:"submit",color:"primary",className:"min-w-max min-h-10 sm:h-8 btn-primary flex-1 px-4 py-2 sm:py-0 text-sm font-semibold rounded-md",disabled:l,"aria-describedby":l?"small-ck-submitting":void 0,children:l?"Joining...":"Join 25,000+ readers"})]})}),d&&(0,s.jsx)("div",{id:"small-ck-error",className:"text-red-500 text-xs mt-1",role:"alert","aria-live":"polite",children:d}),l&&(0,s.jsx)("div",{id:"small-ck-submitting",className:"sr-only","aria-live":"polite",children:"Submitting subscription..."})]})});var m=r(78251);let u={title:"Subscribe to my newsletter",description:"Expect 1-2 emails per month. No spam. Subscribe anytime."},h=()=>(0,s.jsxs)("div",{className:"mx-auto",children:[(0,s.jsx)("h2",{className:"mb-2 text-xl md:text-2xl",children:u.title}),(0,s.jsx)(d,{}),(0,s.jsx)("p",{className:"text-center text-xs",children:u.description})]}),f=(0,i.memo)(function(){let e=m.Y.find(e=>e.object.includes("Luca"))||null,[t,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{r(!0)},[]),(0,s.jsxs)(l.a,{orientation:"horizontal",children:[(0,s.jsx)(h,{}),e&&t&&(0,s.jsx)("div",{className:"hidden md:block",children:(0,s.jsx)(a.ReviewCard,{review:e,showRating:!1,showBorder:!1})})]})})},39697:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var s=r(48958),i=r(83982),l=r(72807),a=r.n(l);let n={viewAll:"View all my posts"},o=(0,i.memo)(function(){return(0,s.jsx)(a(),{href:"/blog",className:"no-underline hover:opacity-80 transition-opacity",children:(0,s.jsx)("p",{className:"text-xs text-center italic text-muted mt-2",children:n.viewAll})})});function c(e){let{post:t}=e;return(0,s.jsx)(a(),{href:"/posts/".concat(t.slug),children:(0,s.jsx)("p",{className:"text-[0.8rem] leading-4 my-1",children:t.title})})}function d(e){let{posts:t}=e;return t&&0!==t.length?(0,s.jsxs)("nav",{"aria-label":"Blog posts list",children:[t.map(e=>(0,s.jsx)("div",{className:"mb-2",children:(0,s.jsx)(c,{post:e})},e.slug)),(0,s.jsx)(o,{})]}):(0,s.jsx)("p",{className:"text-gray-500","aria-label":"No posts available",children:"No posts available."})}var m=r(85631),u=r(48083);let h={title:"My top posts",loading:"Loading..."},f=(0,i.memo)(function(){let[e,t]=(0,i.useState)([]),[r,l]=(0,i.useState)(!0),[a,n]=(0,i.useState)(null);return((0,i.useEffect)(()=>{!async function(){try{let e=await (0,u.K)(void 0,4);t(e),n(null)}catch(e){console.error("Error fetching posts:",e),n(e instanceof Error?e:Error("Failed to fetch posts"))}finally{l(!1)}}()},[]),a)?(0,s.jsxs)(m.a,{orientation:"vertical",className:"w-full md:max-w-72 content-start",children:[(0,s.jsx)("h3",{className:"text-xl font-bold mt-0 mb-4",children:h.title}),(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Unable to load posts at this time."})]}):(0,s.jsxs)(m.a,{orientation:"vertical",className:"w-full md:max-w-72 content-start",children:[(0,s.jsx)("h3",{className:"text-xl font-bold mt-0 mb-4",children:h.title}),r?(0,s.jsx)("p",{children:h.loading}):(0,s.jsx)(d,{posts:e})]})})},48083:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var s=r(4906);let i=(0,s.createServerReference)("70ed40074f3c7b47478fa17d40f2d1e364ce3ce23a",s.callServer,void 0,s.findSourceMapURL,"getPosts")},76511:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,72807,23)),Promise.resolve().then(r.t.bind(r,44320,23)),Promise.resolve().then(r.bind(r,68001)),Promise.resolve().then(r.bind(r,75964)),Promise.resolve().then(r.bind(r,39697)),Promise.resolve().then(r.bind(r,33313)),Promise.resolve().then(r.bind(r,88480))},85631:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});var s=r(48958),i=r(78262);let l={normal:"border-slate-400 shadow-md",strong:"border-black shadow-lg"},a={horizontal:"flex-row",vertical:"flex-col"};function n(e){let{orientation:t,children:r,className:n,id:o,style:c="normal"}=e;return(0,s.jsx)("div",{id:o,className:(0,i.QP)("max-w-3xl flex-1 mx-auto flex gap-4 items-center justify-center p-4 border rounded-lg",l[c],a[t],n),children:r})}},88480:(e,t,r)=>{"use strict";r.d(t,{LogoReel:()=>m});var s=r(48958),i=r(83982);let l=e=>{let{side:t,className:r,width:i}=e;return(0,s.jsx)("div",{className:"".concat(r," ").concat(i," ").concat(t,"-0 bg-gradient-to-").concat("left"===t?"r":"l"," from-white to-transparent"),"aria-hidden":"true"})},a=(0,i.memo)(function(e){let{width:t}=e,r="absolute top-0 bottom-0 pointer-events-none";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l,{side:"left",className:r,width:t}),(0,s.jsx)(l,{side:"right",className:r,width:t})]})});var n=r(62467),o=r(14916);let c={width:100,height:50},d=(0,i.memo)(function(e){let{logo:t,index:r}=e;return(0,s.jsx)("div",{className:"shrink-0 mx-4",children:(0,s.jsx)(n.default,{src:t.src,alt:t.alt,width:c.width,height:c.height,sizes:"(max-width: 768px) 100px, 100px",quality:85,className:"h-12 w-auto object-contain",onError:e=>{e.target.style.display="none"}})})}),m=(0,i.memo)(function(e){let{logos:t}=e,r=(0,i.useRef)(null),l=Array.isArray(t)&&t.length>0,n=l?Array.from({length:4},()=>t).flat():[],m=l?c.width*t.length*4:0,u=(0,o.A)({maxWidth:m}),h=(0,i.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.scrollWidth;e.style.setProperty("--scroll-width","".concat(t,"px"))},[]);return((0,i.useEffect)(()=>{var e;if(!l)return;h();let t=()=>{requestAnimationFrame(h)};window.addEventListener("resize",t);let s=null==(e=r.current)?void 0:e.getElementsByTagName("img");return s&&Promise.all(Array.from(s).map(e=>e.complete||new Promise(t=>{e.onload=t,e.onerror=t}))).then(h),()=>window.removeEventListener("resize",t)},[h,l]),l)?(0,s.jsxs)("div",{className:"w-[95vw] max-w-full overflow-hidden bg-white mt-4 relative",children:[(0,s.jsx)("div",{className:"flex animate-scroll max-w-full",ref:r,style:{transform:"scale(".concat(u,")"),transformOrigin:"left center"},role:"region","aria-label":"Scrolling logo display","aria-live":"off",children:n.map((e,t)=>(0,s.jsx)(d,{logo:e,index:t},"logo-".concat(e.alt,"-").concat(t)))}),(0,s.jsx)(a,{width:"w-24"})]}):null})}},e=>{e.O(0,[4320,1675,3022,2966,7913,1287,7942,6293,7358],()=>e(e.s=76511)),_N_E=e.O()}]);