1import{b as F,B as j,a as C}from"./aFYMDe2O.js";import{_ as N}from"./BaduyjGM.js";import{aD as V,c_ as A,bV as u,bF as $,at as r,dr as E,dj as H,cv as e,ap as o,F as f,bX as _,ay as n,dq as p,bJ as i,as as g,a9 as S,ax as D}from"./DtGgvzh8.js";import{_ as q}from"./CDIEhzHb.js";import"./Bwdh1ohi.js";const J={class:"animate-fade-in px-10 md:px-40"},L={class:"flex mt-10 justify-between h-12"},M={class:"flex space-x-3 w-1/2 md:w-1/3 h-full justify-end"},P={class:"flex flex-col space-y-3 h-auto w-full"},R={key:0,class:"animate-fade-in h-full w-full"},T={key:1,class:"h-24 p-6 text-center border border-grey-300 rounded-lg w-full col-span-1 md:col-span-3 animate-fade-in flex items-center justify-center"},O=V({__name:"[...slug]",setup(W){const h=A(),s=u(!0),l=u(!1),m=u(h.params.slug),t=u({}),v=async()=>{if(s.value=!0,l.value=!1,!m.value){l.value=!0;return}try{const a=await(await fetch(`/api/blog/${m.value[0]}`)).json();t.value=a}catch(d){console.error("Error fetching article data",d),l.value=!0}finally{s.value=!1}};return $(()=>{v()}),(d,a)=>{const y=F,x=j,b=C,w=N,B=S,k=q;return i(),r("div",null,[E(o("div",J,[a[1]||(a[1]=o("div",{class:"rounded-lg bg-grey-300 animate-pulse w-full h-40"},null,-1)),o("div",L,[a[0]||(a[0]=o("div",{class:"rounded-lg bg-grey-300 animate-pulse w-1/3 md:w-1/4 h-full"},null,-1)),o("div",M,[(i(),r(f,null,_(4,c=>o("div",{class:"rounded-full bg-grey-300 animate-pulse w-12 h-full",key:c})),64))])]),o("div",P,[(i(),r(f,null,_(3,c=>o("div",{class:"mt-12 rounded-lg bg-grey-300 animate-pulse w-full h-10",key:`p-${c}`})),64))])],512),[[H,e(s)]]),n(k,{compressed:""},{default:p(()=>[e(t)?.id&&!e(s)&&!e(l)?(i(),r("div",R,[n(y,{title:e(t).title,author:e(t).author,"read-time":e(t).read_time,"featured-image":e(t).featured_image,"published-date":e(t).publish_date},null,8,["title","author","read-time","featured-image","published-date"]),n(x,{content:e(t).content},null,8,["content"]),n(b,{tags:e(t).tags,author:e(t).author},null,8,["tags","author"]),n(w,{currentArticle:e(t)},null,8,["currentArticle"])])):g("",!0),!e(t)?.id&&!e(s)||e(l)?(i(),r("div",T,[n(B,{class:"text-grey-500 text-md"},{default:p(()=>[...a[2]||(a[2]=[D("Article Not Found",-1)])]),_:1})])):g("",!0)]),_:1})])}}});export{O as default};
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.