(()=>{var e={};e.id=9404,e.ids=[9404],e.modules={53524:e=>{"use strict";e.exports=require("@prisma/client")},47849:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external")},72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},55403:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},94749:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},50852:e=>{"use strict";e.exports=require("async_hooks")},32081:e=>{"use strict";e.exports=require("child_process")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},76224:e=>{"use strict";e.exports=require("tty")},73837:e=>{"use strict";e.exports=require("util")},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>n.ZP,__next_app__:()=>u,originalPathname:()=>d,pages:()=>c,routeModule:()=>g,tree:()=>l});var a=r(50482),s=r(69108),n=r(83543),i=r(68300),o={};for(let e in i)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(o[e]=()=>i[e]);r.d(t,o);let l=["",{children:["blog",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,72098)),"C:\\test2\\pagecraft-ai\\src\\app\\blog\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,43625)),"C:\\test2\\pagecraft-ai\\src\\app\\layout.tsx"],error:[()=>Promise.resolve().then(r.bind(r,24117)),"C:\\test2\\pagecraft-ai\\src\\app\\error.tsx"],"not-found":[()=>Promise.resolve().then(r.bind(r,48206)),"C:\\test2\\pagecraft-ai\\src\\app\\not-found.tsx"]}],c=["C:\\test2\\pagecraft-ai\\src\\app\\blog\\page.tsx"],d="/blog/page",u={require:r,loadChunk:()=>Promise.resolve()},g=new a.AppPageRouteModule({definition:{kind:s.x.APP_PAGE,page:"/blog/page",pathname:"/blog",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:l}})},66044:(e,t,r)=>{Promise.resolve().then(r.bind(r,67507))},55794:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,r(69224).Z)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},25545:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,r(69224).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},67507:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var a=r(95344),s=r(3729),n=r(56506),i=r(89410),o=r(81723),l=r(9885),c=r(55794),d=r(25545),u=r(37121);let g={indigo:{bg:"rgba(99,102,241,0.15)",text:"#818cf8",border:"rgba(99,102,241,0.3)",gradient:"from-indigo-600 to-indigo-400"},purple:{bg:"rgba(168,85,247,0.15)",text:"#c084fc",border:"rgba(168,85,247,0.3)",gradient:"from-purple-600 to-purple-400"},blue:{bg:"rgba(59,130,246,0.15)",text:"#93c5fd",border:"rgba(59,130,246,0.3)",gradient:"from-blue-600 to-blue-400"},violet:{bg:"rgba(139,92,246,0.15)",text:"#a78bfa",border:"rgba(139,92,246,0.3)",gradient:"from-violet-600 to-violet-400"},pink:{bg:"rgba(236,72,153,0.15)",text:"#f472b6",border:"rgba(236,72,153,0.3)",gradient:"from-pink-600 to-pink-400"},cyan:{bg:"rgba(6,182,212,0.15)",text:"#67e8f9",border:"rgba(6,182,212,0.3)",gradient:"from-cyan-600 to-cyan-400"},emerald:{bg:"rgba(16,185,129,0.15)",text:"#6ee7b7",border:"rgba(16,185,129,0.3)",gradient:"from-emerald-600 to-emerald-400"}},p=g.indigo;function x(e){return g[e??""]??p}function m({category:e,lang:t}){if(!e)return null;let r=x(e.color),s="ar"===t?e.nameAr:e.nameEn;return a.jsx("span",{className:"text-xs font-medium px-2.5 py-1 rounded-full",style:{backgroundColor:r.bg,color:r.text,border:`1px solid ${r.border}`},children:s})}function h({post:e,lang:t}){let r=e.author?.name??("ar"===t?"مجهول":"Unknown"),s=r.charAt(0).toUpperCase();return(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-gray-400",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.author?.image?a.jsx(i.default,{src:e.author.image,alt:r,width:20,height:20,className:"rounded-full"}):a.jsx("span",{className:"w-5 h-5 rounded-full bg-indigo-500/30 text-indigo-300 flex items-center justify-center text-[10px] font-bold",children:s}),a.jsx("span",{children:r})]}),a.jsx("span",{className:"text-gray-600",children:"\xb7"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[a.jsx(c.Z,{className:"w-3 h-3"}),a.jsx("span",{children:new Date(e.publishedAt).toLocaleDateString("ar"===t?"ar-EG":"en-US",{year:"numeric",month:"short",day:"numeric"})})]}),a.jsx("span",{className:"text-gray-600",children:"\xb7"}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[a.jsx(d.Z,{className:"w-3 h-3"}),(0,a.jsxs)("span",{children:[e.readTimeMin," ","ar"===t?"د":"min"]})]})]})}function f({post:e,lang:t}){let r="ar"===t?e.titleAr:e.titleEn,s="ar"===t?e.excerptAr??e.excerptEn:e.excerptEn??e.excerptAr,o=x(e.category?.color);return a.jsx(n.default,{href:`/blog/${e.slug}`,className:"group block",children:(0,a.jsxs)("div",{className:"grid md:grid-cols-2 gap-0 bg-white/[0.03] border border-white/[0.06] rounded-2xl overflow-hidden transition-transform duration-300 group-hover:-translate-y-1 group-hover:shadow-2xl group-hover:shadow-indigo-500/5",children:[a.jsx("div",{className:"relative aspect-[16/10] md:aspect-auto md:min-h-[320px]",children:e.coverImage?a.jsx(i.default,{src:e.coverImage,alt:r,fill:!0,className:"object-cover",sizes:"(max-width: 768px) 100vw, 50vw",priority:!0}):a.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${o.gradient} opacity-30`})}),(0,a.jsxs)("div",{className:"flex flex-col justify-center p-6 md:p-10 gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[a.jsx("span",{className:"text-xs font-semibold px-3 py-1 rounded-full bg-indigo-500/20 text-indigo-300 border border-indigo-500/30",children:"ar"===t?"مميز":"Featured"}),a.jsx(m,{category:e.category,lang:t})]}),a.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-white leading-tight group-hover:text-indigo-300 transition-colors",children:r}),s&&a.jsx("p",{className:"text-gray-400 line-clamp-3 text-sm md:text-base leading-relaxed",children:s}),a.jsx(h,{post:e,lang:t})]})]})})}function b({post:e,lang:t}){let r="ar"===t?e.titleAr:e.titleEn,s="ar"===t?e.excerptAr??e.excerptEn:e.excerptEn??e.excerptAr,o=x(e.category?.color);return a.jsx(n.default,{href:`/blog/${e.slug}`,className:"group block",children:(0,a.jsxs)("article",{className:"bg-white/[0.03] border border-white/[0.06] rounded-xl overflow-hidden transition-all duration-300 group-hover:-translate-y-1 group-hover:shadow-xl group-hover:shadow-indigo-500/5 h-full flex flex-col",children:[(0,a.jsxs)("div",{className:"relative aspect-[16/10] overflow-hidden",children:[e.coverImage?a.jsx(i.default,{src:e.coverImage,alt:r,fill:!0,className:"object-cover transition-transform duration-500 group-hover:scale-105",sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"}):a.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${o.gradient} opacity-20`}),e.category&&a.jsx("div",{className:"absolute top-3 left-3",children:a.jsx(m,{category:e.category,lang:t})})]}),(0,a.jsxs)("div",{className:"flex flex-col flex-1 p-5 gap-3",children:[a.jsx("h3",{className:"text-lg font-semibold text-white line-clamp-2 group-hover:text-indigo-300 transition-colors leading-snug",children:r}),s&&a.jsx("p",{className:"text-sm text-gray-400 line-clamp-2 leading-relaxed",children:s}),a.jsx("div",{className:"mt-auto pt-3 border-t border-white/[0.04]",children:a.jsx(h,{post:e,lang:t})})]})]})})}function y({initialPosts:e,initialCategories:t}){let{lang:r,isRTL:n}=(0,l.Z)(),[i,c]=(0,s.useState)(1),[d,g]=(0,s.useState)(""),[p,x]=(0,s.useState)(e),m=e.find(e=>e.featured)??null,h=p.filter(e=>!m||e.id!==m.id);function y(t){g(t),c(1),""===t?x(e):x(e.filter(e=>e.category?.slug===t))}return(0,a.jsxs)("div",{className:"min-h-screen bg-[#0a0a0f]",dir:n?"rtl":"ltr",children:[a.jsx(o.Navbar,{}),(0,a.jsxs)("main",{className:"container mx-auto max-w-7xl px-4 pt-28 pb-16",children:[(0,a.jsxs)("section",{className:"text-center mb-16",children:[a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-white mb-4",children:"ar"===r?"المدونة":"Blog"}),a.jsx("p",{className:"text-gray-400 text-lg",children:"ar"===r?"أخبار، نصائح، وتحديثات":"News, tips, and updates"})]}),a.jsx("section",{className:"mb-16",children:m&&a.jsx(f,{post:m,lang:r})}),a.jsx("section",{className:"mb-10",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 justify-center",children:[a.jsx("button",{onClick:()=>y(""),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${""===d?"bg-indigo-500 text-white":"bg-white/[0.05] text-gray-400 hover:bg-white/[0.08]"}`,children:"ar"===r?"الكل":"All"}),t?.map(e=>a.jsx("button",{onClick:()=>y(e.slug),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${d===e.slug?"bg-indigo-500 text-white":"bg-white/[0.05] text-gray-400 hover:bg-white/[0.08]"}`,children:"ar"===r?e.nameAr:e.nameEn},e.id))]})}),h.length>0?a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:h.map(e=>a.jsx(b,{post:e,lang:r},e.id))}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:[a.jsx(u.Z,{className:"w-16 h-16 text-gray-600 mb-4"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-400 mb-2",children:"ar"===r?"لا توجد مقالات":"No posts yet"}),a.jsx("p",{className:"text-gray-500 text-sm",children:"ar"===r?"تابعنا لأحدث المقالات والتحديثات":"Stay tuned for the latest articles and updates"})]}),!1]}),a.jsx("footer",{className:"py-8 text-center text-gray-500 text-sm border-t border-white/[0.06]",children:"\xa9 2025 PageCraft AI"})]})}},48096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return a},isDynamicServerError:function(){return s}});let r="DYNAMIC_SERVER_USAGE";class a extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function s(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isStaticGenBailoutError:function(){return o},staticGenerationBailout:function(){return c}});let a=r(48096),s=r(45869),n="NEXT_STATIC_GEN_BAILOUT";class i extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}function l(e,t){let{dynamic:r,link:a}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(a?" See more info here: "+a:"")}let c=(e,t)=>{let{dynamic:r,link:n}=void 0===t?{}:t,o=s.staticGenerationAsyncStorage.getStore();if(!o)return!1;if(o.forceStatic)return!0;if(o.dynamicShouldError)throw new i(l(e,{link:n,dynamic:null!=r?r:"error"}));let c=l(e,{dynamic:r,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(null==o.postpone||o.postpone.call(o,e),o.revalidate=0,o.isStaticGeneration){let t=new a.DynamicServerError(c);throw o.dynamicUsageDescription=e,o.dynamicUsageStack=t.stack,t}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72098:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g,generateMetadata:()=>u,revalidate:()=>d});var a=r(25036),s=r(34490);let n=(0,r(86843).createProxy)(String.raw`C:\test2\pagecraft-ai\src\app\blog\BlogContent.tsx`),{__esModule:i,$$typeof:o}=n,l=n.default;var c=r(87976);let d=3600;async function u(){return(0,c.Zr)({title:"Blog — PageCraft AI",description:"Tips, tutorials, and insights about landing page design, conversion optimization, and AI-powered web development.",path:"/blog"})}async function g(){let e=[],t=[];try{let[r,a]=await Promise.all([s.prisma.blogPost.findMany({where:{status:"PUBLISHED"},orderBy:{publishedAt:"desc"},include:{author:{select:{name:!0,image:!0}},category:{select:{slug:!0,nameEn:!0,nameAr:!0,color:!0}}}}),s.prisma.blogCategory.findMany({where:{posts:{some:{status:"PUBLISHED"}}},orderBy:{nameEn:"asc"}})]);e=JSON.parse(JSON.stringify(r)),t=JSON.parse(JSON.stringify(a))}catch(e){console.error("[blog] Failed to fetch posts:",e)}return(0,a.jsxs)(a.Fragment,{children:[a.jsx(c.hg,{data:(0,c.cG)({name:"Blog — PageCraft AI",description:"Tips, tutorials, and insights about landing page design",url:`${(0,c.$2)()}/blog`})}),a.jsx(l,{initialPosts:e,initialCategories:t})]})}},87976:(e,t,r)=>{"use strict";r.d(t,{$2:()=>s,A2:()=>o,A8:()=>i,FE:()=>c,Kj:()=>u,Ut:()=>l,Zr:()=>n,cG:()=>d,hg:()=>g});var a=r(25036);function s(){let e="http://localhost:3000";return e.endsWith("/")?e.slice(0,-1):e}function n(e){let{title:t,description:r,path:a="",image:n,noIndex:i=!1,publishedTime:o,modifiedTime:l,authors:c,type:d="website"}=e,u=s(),g=`${u}${a}`,p=n||`${u}/og-default.svg`,x={title:t,description:r,alternates:{canonical:g,languages:{en:g,ar:g,"x-default":g}},openGraph:{title:t,description:r,url:g,siteName:"PageCraft AI",type:d,locale:"en_US",alternateLocale:["ar_SA"],images:[{url:p,width:1200,height:630,alt:t}]},twitter:{card:"summary_large_image",title:t,description:r,images:[p]}};return"article"===d&&o&&(x.openGraph={...x.openGraph,type:"article",publishedTime:o,modifiedTime:l,authors:c?.map(e=>e.name)}),i&&(x.robots={index:!1,follow:!1}),x}function i(e){let{siteName:t,siteDescription:r,logoUrl:a}=e,n=s();return{"@context":"https://schema.org","@type":"Organization",name:t,description:r,url:n,logo:a||`${n}/logo.png`,sameAs:[]}}function o(e){let{siteName:t,siteDescription:r}=e,a=s();return{"@context":"https://schema.org","@type":"WebSite",name:t,description:r,url:a,potentialAction:{"@type":"SearchAction",target:`${a}/search?q={search_term_string}`,"query-input":"required name=search_term_string"}}}function l(e){let{headline:t,description:r,url:a,image:n,author:i,publishedTime:o,modifiedTime:l,readTime:c}=e,d=s();return{"@context":"https://schema.org","@type":"Article",headline:t,description:r,url:a,image:n||`${d}/og-default.svg`,author:{"@type":"Person",name:i.name,url:i.url},publisher:{"@type":"Organization",name:"PageCraft AI",logo:{"@type":"ImageObject",url:`${d}/logo.png`}},datePublished:o,dateModified:l||o,...c&&{timeRequired:`PT${c}M`}}}function c(e){let{name:t,description:r,price:a,currency:n,features:i,image:o}=e,l=s();return{"@context":"https://schema.org","@type":"Product",name:t,description:r,image:o||`${l}/og-default.svg`,offers:{"@type":"Offer",price:a,priceCurrency:n,availability:"https://schema.org/InStock"},...i&&{additionalProperty:i.map(e=>({"@type":"PropertyValue",name:"Feature",value:e}))}}}function d(e){let{name:t,description:r,url:a}=e;return{"@context":"https://schema.org","@type":"WebPage",name:t,description:r,url:a}}function u(){let e=s();return{"@context":"https://schema.org","@type":"ContactPage",name:"Contact Us",description:"Get in touch with the PageCraft AI team",url:`${e}/contact`}}function g({data:e}){return a.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})}}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[1638,5312,6632,3910],()=>r(5382));module.exports=a})();