(()=>{var e={};e.id=831,e.ids=[831],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},12412:e=>{"use strict";e.exports=require("assert")},79428:e=>{"use strict";e.exports=require("buffer")},94735:e=>{"use strict";e.exports=require("events")},81630:e=>{"use strict";e.exports=require("http")},55591:e=>{"use strict";e.exports=require("https")},91645:e=>{"use strict";e.exports=require("net")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},11723:e=>{"use strict";e.exports=require("querystring")},27910:e=>{"use strict";e.exports=require("stream")},34631:e=>{"use strict";e.exports=require("tls")},83997:e=>{"use strict";e.exports=require("tty")},79551:e=>{"use strict";e.exports=require("url")},28354:e=>{"use strict";e.exports=require("util")},74075:e=>{"use strict";e.exports=require("zlib")},41040:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>i.a,__next_app__:()=>u,pages:()=>d,routeModule:()=>p,tree:()=>c});var s=r(70260),o=r(28203),a=r(25155),i=r.n(a),n=r(67292),l={};for(let e in n)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>n[e]);r.d(t,l);let c=["",{children:["blog",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,1668)),"C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\blog\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,71354)),"C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,19937,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(r.t.bind(r,69116,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(r.t.bind(r,41485,23)),"next/dist/client/components/unauthorized-error"]}],d=["C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\blog\\page.tsx"],u={require:r,loadChunk:()=>Promise.resolve()},p=new s.AppPageRouteModule({definition:{kind:o.RouteKind.APP_PAGE,page:"/blog/page",pathname:"/blog",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},74240:(e,t,r)=>{Promise.resolve().then(r.bind(r,1668))},37792:(e,t,r)=>{Promise.resolve().then(r.bind(r,1131))},1131:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var s=r(45512),o=r(66005),a=r(96674),i=r(4725),n=r(45103),l=r(28531),c=r.n(l);function d({title:e,excerpt:t,image:r,slug:o}){return(0,s.jsx)("section",{className:"w-full mb-16 mt-28",children:(0,s.jsx)(i.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"relative w-full h-[500px] rounded-xl overflow-hidden",children:(0,s.jsx)(c(),{href:`/blog/${o}`,children:(0,s.jsxs)("div",{className:"relative w-full h-full group",children:[(0,s.jsx)(n.default,{src:r,alt:e,fill:!0,className:"object-cover transition-transform duration-300 group-hover:scale-105",priority:!0}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/60"}),(0,s.jsxs)("div",{className:"absolute bottom-0 left-0 p-8 text-white",children:[(0,s.jsx)(i.P.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-4xl font-script mb-2",children:e}),(0,s.jsx)(i.P.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"text-lg font-light max-w-2xl",children:t})]})]})})})})}var u=r(50908),p=r(14856),x=r(85477),m=r(58009);let h=(0,o.E)(`*[_type == "blogPost"] {
  title,
  excerpt,
  "slug": slug.current,
  "image": mainImage.asset->url,
  "author": author->name,
  "authorImage": author->image.asset->url,
  _createdAt,
}[$start...$end] | order(_createdAt desc)`);function f(){let[e,t]=(0,m.useState)([]),[r,o]=(0,m.useState)(!0),[i,n]=(0,m.useState)(!1),[l,c]=(0,m.useState)(null),[f,g]=(0,m.useState)(1),[b,v]=(0,m.useState)(!0);async function j(e,r,s=!1){try{n(s);let o=await a.S.fetch(h,{start:e,end:r});s?t(e=>[...e,...o]):t(o||[]),v(3===o.length)}catch(e){console.error("Error fetching blog posts:",e),c("Failed to load blog posts")}finally{o(!1),n(!1)}}if(r)return(0,s.jsxs)("main",{className:"min-h-screen",children:[(0,s.jsx)(x.A,{topPlacement:!0}),(0,s.jsx)("div",{className:"container md:max-w-[1200px] mx-auto px-4 py-12 mt-40",children:(0,s.jsx)("h2",{className:"text-2xl font-medium",children:"Loading blog posts..."})}),(0,s.jsx)(p.A,{})]});if(l)return(0,s.jsxs)("main",{children:[(0,s.jsx)(x.A,{topPlacement:!0}),(0,s.jsx)("div",{className:"container md:max-w-[1200px] mx-auto px-4 py-12",children:(0,s.jsx)("h2",{className:"text-2xl font-medium",children:l})}),(0,s.jsx)(p.A,{})]});if(!e||0===e.length)return(0,s.jsxs)("main",{children:[(0,s.jsx)(x.A,{topPlacement:!0}),(0,s.jsx)("div",{className:"container md:max-w-[1200px] mx-auto px-4 py-12",children:(0,s.jsx)("h2",{className:"text-2xl font-medium",children:"No blog posts found"})}),(0,s.jsx)(p.A,{})]});let y=e.map(e=>({...e,date:new Date(e._createdAt).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})})),P=y[0],q=y.slice(1);return(0,s.jsxs)("main",{children:[(0,s.jsx)(x.A,{topPlacement:!0}),(0,s.jsxs)("div",{className:"container md:max-w-[1200px] mx-auto px-4",children:[P&&(0,s.jsx)(d,{...P}),(0,s.jsx)(u.A,{blogPosts:q,loadMoreButton:()=>{let e=3*f;g(f+1),j(e,e+3,!0)},loadMore:b,isLoadingMore:i})]}),(0,s.jsx)(p.A,{})]})}},1668:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});let s=(0,r(46760).registerClientReference)(function(){throw Error("Attempted to call the default export of \"C:\\\\Users\\\\od41\\\\Documents\\\\code\\\\paid\\\\loveisabc\\\\src\\\\app\\\\blog\\\\page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\blog\\page.tsx","default")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[994,481,249,725,241,159,376],()=>r(41040));module.exports=s})();