1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,61691,e=>{"use strict";function t(e,t){if(!e)return"";let r="string"==typeof e?new Date(e):e;if(isNaN(r.getTime()))return"";let a={year:"numeric",month:"short",day:"numeric",...t};return r.toLocaleDateString("en-US",a)}e.s(["formatDate",()=>t])},65526,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e.r(71645));let s=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));s.displayName="ArrowUpRight",r.ArrowUpRight=s},33033,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(18566),s=e.i(47209),l=e.i(65526),i=e.i(57688),o=e.i(22016),n=e.i(57793),c=e.i(61691);function g({blog:e,onCategoryClick:r,onTagClick:a,priority:s=!1}){let g=e.isExternal?e.link||"#":`/blog/${e.slug}`,d=e.isExternal,u=e.image&&""!==e.image.trim()?e.image:"https://d199zhavorrup5.cloudfront.net/admin%40agent.review/5d9af404-4e89-4fce-8157-d30c40a547a7-agent.png";return(0,t.jsxs)("article",{className:"flex flex-col gap-4",children:[(0,t.jsx)(o.default,{href:g,target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,className:"group overflow-hidden rounded-2xl bg-gray-100",tabIndex:-1,children:(0,t.jsx)(i.default,{src:u,alt:e.title||"Blog post",width:400,height:267,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",className:"aspect-[1.5] w-full object-cover transition duration-200 ease-out group-hover:scale-105",loading:s?"eager":"lazy",priority:s,fetchPriority:s?"high":"auto"})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.categories?.map(e=>(0,t.jsx)("button",{onClick:()=>r?.(e),className:"cursor-pointer",children:(0,t.jsx)(n.Badge,{color:"blue",size:"sm",children:e})},e)),e.tags?.map(e=>(0,t.jsx)("button",{onClick:()=>a?.(e),className:"cursor-pointer",children:(0,t.jsx)(n.Badge,{color:"success",size:"sm",children:e})},e))]}),(0,t.jsxs)(o.default,{href:g,target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,className:"group flex items-start justify-between gap-2",children:[(0,t.jsx)("h3",{className:"line-clamp-2 text-lg font-semibold text-gray-900 transition-colors group-hover:text-navy-blue",children:e.title}),(0,t.jsx)(l.ArrowUpRight,{className:"mt-0.5 size-4 shrink-0 text-gray-400 transition-colors group-hover:text-navy-blue"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:(0,c.formatDate)(e.publishDate||e.createdAt)})]})]})}function d(){return(0,t.jsxs)("div",{className:"flex animate-pulse flex-col gap-4",children:[(0,t.jsx)("div",{className:"aspect-[1.5] w-full rounded-2xl bg-gray-200"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("div",{className:"h-5 w-16 rounded-full bg-gray-200"}),(0,t.jsx)("div",{className:"h-5 w-12 rounded-full bg-gray-200"})]}),(0,t.jsx)("div",{className:"h-6 w-[90%] rounded bg-gray-200"}),(0,t.jsx)("div",{className:"h-6 w-[60%] rounded bg-gray-200"}),(0,t.jsx)("div",{className:"h-4 w-24 rounded bg-gray-200"})]})]})}function u({count:e=6}){return(0,t.jsx)(t.Fragment,{children:Array.from({length:e}).map((e,r)=>(0,t.jsx)(d,{},r))})}var h=e.i(89538);async function m(e){try{let t=await h.default.post("v1/blog",{category:e?.category||"",tag:e?.tag||""});return t.data?.blog||[]}catch(e){return console.error("Error fetching blogs:",e),[]}}async function x(){try{let e=await h.default.put("v1/blog/get-categories-and-tags",{});return{categories:e.data?.categories||[],tags:e.data?.tags||[]}}catch(e){return console.error("Error fetching categories and tags:",e),{categories:[],tags:[]}}}function p({initialBlogs:e=[],initialCategories:l=[],initialTags:i=[]}){let o=(0,a.useRouter)(),n=(0,a.useSearchParams)(),[c,d]=(0,r.useTransition)(),[h,p]=(0,r.useState)(e),[f,y]=(0,r.useState)(l),[v,j]=(0,r.useState)(i),[b,w]=(0,r.useState)(0===e.length),N=n.get("category")||"",k=n.get("tag")||"",C=(0,r.useCallback)(async()=>{w(!0);let[e,t]=await Promise.all([m({category:N,tag:k}),x()]);p(e),y(t.categories),j(t.tags),w(!1)},[N,k]);(0,r.useEffect)(()=>{(!(e.length>0)||N||k)&&C()},[N,k]);let S=e=>{d(()=>{let t=new URLSearchParams(n.toString());e?t.set("category",e):t.delete("category"),o.push(`/blog?${t.toString()}`)})},z=e=>{d(()=>{let t=new URLSearchParams(n.toString());e?t.set("tag",e):t.delete("tag"),o.push(`/blog?${t.toString()}`)})};return(0,t.jsxs)("div",{className:"w-full",children:[f.length>0&&(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap gap-3",role:"group","aria-label":"Filter by category",children:[(0,t.jsx)(s.Button,{color:""===N?"navy":"outline",size:"sm",onClick:()=>S(""),children:"All Categories"}),f.map(e=>(0,t.jsx)(s.Button,{color:N===e?"navy":"outline",size:"sm",onClick:()=>S(e),children:e},e))]}),v.length>0&&(0,t.jsxs)("div",{className:"mb-8 flex flex-wrap gap-3",role:"group","aria-label":"Filter by tag",children:[(0,t.jsx)(s.Button,{color:""===k?"navy":"outline",size:"sm",onClick:()=>z(""),children:"All Tags"}),v.map(e=>(0,t.jsx)(s.Button,{color:k===e?"navy":"outline",size:"sm",onClick:()=>z(e),children:e},e))]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3",children:b?(0,t.jsx)(u,{count:6}):h.length>0?h.map((e,r)=>(0,t.jsx)(g,{blog:e,onCategoryClick:S,onTagClick:z,priority:r<3},e._id)):(0,t.jsxs)("div",{className:"col-span-full py-16 text-center",children:[(0,t.jsx)("p",{className:"text-base font-semibold text-gray-500",children:"No articles found"}),(0,t.jsx)("p",{className:"mt-2 text-gray-400",children:"Try adjusting your filters"})]})})]})}e.s(["BlogList",()=>p],33033)},66151,e=>{e.v(t=>Promise.all(["static/chunks/3d1ea46b23cc7a88.js","static/chunks/363b287887e23cd1.js"].map(t=>e.l(t))).then(()=>t(60363)))}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.