1var T=Object.defineProperty,C=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var v=(s,o,r)=>o in s?T(s,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[o]=r,S=(s,o)=>{for(var r in o||(o={}))D.call(o,r)&&v(s,r,o[r]);if(j)for(var r of j(o))H.call(o,r)&&v(s,r,o[r]);return s},B=(s,o)=>C(s,R(o));import{r as a,j as e}from"./react-vendor-BfWn7mO-.js";import{A as O}from"./AppStoreBadges-C365AjQl.js";import{a as F}from"./sanitize-Bpw1kuOw.js";import"./index-CuUAF55y.js";import"./i18n-vi-C8tq8Mhp.js";import"./vendor-B_rZVQz_.js";import"./purify.es-CqK4XRbh.js";const x="";function N(){const[s,o]=a.useState([]),[r,A]=a.useState([]),[c,m]=a.useState(""),[p,f]=a.useState(1),[_,z]=a.useState(0),[i,u]=a.useState(null),[w,g]=a.useState(!0),l=window.location.pathname.replace(/^\/blog\/?/,"");a.useEffect(()=>{if(l){const t=typeof window!="undefined"?window.__BLOG_POST__:null;if(t&&t.slug===l){u(t),g(!1);return}g(!0),fetch(`${x}/api/blog/posts/${l}`).then(n=>n.ok?n.json():null).then(n=>{u(n),g(!1)}).catch(()=>g(!1))}else k(),fetch(`${x}/api/blog/categories`).then(t=>t.json()).then(A).catch(()=>{})},[l,p,c]);const k=()=>{g(!0);const t=new URLSearchParams({page:p,limit:12});c&&t.set("category",c),fetch(`${x}/api/blog/posts?${t}`).then(n=>n.json()).then(n=>{o(n.posts||[]),z(n.total||0),g(!1)}).catch(()=>g(!1))};if(a.useEffect(()=>{if(i){document.title=`${i.title} â OpsOne AI Blog`;const t=(n,b,W)=>{let h=document.querySelector(`meta[${n}="${b}"]`);h||(h=document.createElement("meta"),h.setAttribute(n,b),document.head.appendChild(h)),h.content=W};t("name","description",i.meta_description||i.excerpt||""),t("property","og:title",i.title),t("property","og:description",i.meta_description||i.excerpt||""),t("property","og:type","article"),i.og_image&&t("property","og:image",i.og_image)}else l||(document.title="Blog â OpsOne AI")},[i,l]),w)return e.jsx("div",{style:d.page,children:e.jsx("div",{style:d.container,children:e.jsx("div",{style:{textAlign:"center",padding:60,color:"#94a3b8"},children:"Äang tải..."})})});if(l&&i)return e.jsx("div",{style:d.page,children:e.jsxs("div",{style:B(S({},d.container),{maxWidth:800}),children:[e.jsx("a",{href:"/blog",style:{color:"#1B3A57",fontSize:14,textDecoration:"none",marginBottom:20,display:"inline-block"},children:"â Quay lại Blog"}),i.og_image&&e.jsx("img",{src:i.og_image,alt:i.title,style:{width:"100%",borderRadius:16,marginBottom:24,maxHeight:400,objectFit:"cover"}}),e.jsxs("div",{style:{fontSize:12,color:"#94a3b8",marginBottom:8},children:[i.category&&e.jsx("span",{style:{background:"#F0F4F8",color:"#1B3A57",padding:"2px 10px",borderRadius:12,marginRight:8,fontSize:11,fontWeight:600},children:i.category}),i.published_at&&new Date(i.published_at).toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric"}),i.author_name&&e.jsxs("span",{children:[" ⢠",i.author_name]}),e.jsxs("span",{children:[" ⢠",i.view_count||0," lượt xem"]})]}),e.jsx("h1",{style:{fontSize:32,fontWeight:800,color:"#0f172a",lineHeight:1.3,margin:"0 0 24px"},children:i.title}),e.jsx("div",{style:{fontSize:16,lineHeight:1.8,color:"#334155"},dangerouslySetInnerHTML:{__html:F(i.content)}}),e.jsxs("div",{style:{marginTop:40,padding:"24px 28px",background:"linear-gradient(135deg, #163049, #1B3A57)",borderRadius:16,textAlign:"center",color:"#fff"},children:[e.jsx("h3",{style:{margin:"0 0 8px",fontSize:20,fontWeight:700},children:"Dùng OpsOne AI miá»
n phà â 5 ngưá»i dùng, vÄ©nh viá»
n"}),e.jsx("p",{style:{margin:"0 0 16px",opacity:.9,fontSize:14},children:"Không cần thẻ tÃn dụng, không giá»i hạn thá»i gian. Hoặc chẩn Äoán sức khoẻ váºn hà nh miá»
n phà trong 2 phút."}),e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"center",flexWrap:"wrap"},children:[e.jsx("a",{href:"/diagnostic",style:{display:"inline-block",padding:"12px 28px",borderRadius:10,background:"#fff",color:"#163049",fontWeight:700,textDecoration:"none",fontSize:15},children:"Chẩn Äoán miá»
n phÃ"}),e.jsx("a",{href:"/onboarding",style:{display:"inline-block",padding:"12px 28px",borderRadius:10,background:"rgba(255,255,255,0.15)",color:"#fff",border:"1px solid rgba(255,255,255,0.5)",fontWeight:700,textDecoration:"none",fontSize:15},children:"Bắt Äầu dùng Free"})]}),e.jsxs("div",{style:{marginTop:18,paddingTop:16,borderTop:"1px solid rgba(255,255,255,0.18)"},children:[e.jsx("div",{style:{fontSize:12,opacity:.85,marginBottom:10},children:"Hoặc dùng ngay trên Äiá»n thoại"}),e.jsx(O,{size:"sm",theme:"light",emphasis:"auto"})]})]})]})});if(l&&!i)return e.jsx("div",{style:d.page,children:e.jsx("div",{style:d.container,children:e.jsxs("div",{style:{textAlign:"center",padding:60},children:[e.jsx("div",{style:{fontSize:48,marginBottom:16},children:"ð"}),e.jsx("h2",{style:{color:"#64748b"},children:"Bà i viết không tá»n tại"}),e.jsx("a",{href:"/blog",style:{color:"#1B3A57"},children:"â Quay lại Blog"})]})})});const y=Math.ceil(_/12);return e.jsx("div",{style:d.page,children:e.jsxs("div",{style:d.container,children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[e.jsx("a",{href:"/",style:{color:"#1B3A57",fontSize:14,textDecoration:"none",marginBottom:12,display:"inline-block"},children:"â Trang chá»§"}),e.jsx("h1",{style:{fontSize:36,fontWeight:800,color:"#0f172a",margin:"0 0 8px"},children:"OpsOne AI Blog"}),e.jsx("p",{style:{color:"#64748b",fontSize:16},children:"Kiến thức quản trá» doanh nghiá»p, chuyá»n Äá»i sá», và AI"})]}),r.length>0&&e.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",justifyContent:"center",marginBottom:32},children:[e.jsx("button",{onClick:()=>{m(""),f(1)},style:{padding:"6px 16px",borderRadius:20,border:"none",cursor:"pointer",fontSize:13,fontWeight:600,background:c?"#f1f5f9":"#1B3A57",color:c?"#64748b":"#fff"},children:"Tất cả"}),r.map(t=>e.jsxs("button",{onClick:()=>{m(t.category),f(1)},style:{padding:"6px 16px",borderRadius:20,border:"none",cursor:"pointer",fontSize:13,fontWeight:600,background:c===t.category?"#1B3A57":"#f1f5f9",color:c===t.category?"#fff":"#64748b"},children:[t.category," (",t.count,")"]},t.category))]}),s.length===0?e.jsx("div",{style:{textAlign:"center",padding:60,color:"#94a3b8"},children:"Chưa có bà i viết nà o"}):e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:24},children:s.map(t=>e.jsx("a",{href:`/blog/${t.slug}`,style:{textDecoration:"none",color:"inherit"},children:e.jsxs("div",{style:{border:"1px solid #e2e8f0",borderRadius:16,overflow:"hidden",background:"#fff",transition:"box-shadow 0.2s"},onMouseEnter:n=>n.currentTarget.style.boxShadow="0 4px 20px rgba(0,0,0,0.08)",onMouseLeave:n=>n.currentTarget.style.boxShadow="none",children:[t.og_image&&e.jsx("img",{src:t.og_image,alt:t.title,style:{width:"100%",height:180,objectFit:"cover"}}),e.jsxs("div",{style:{padding:"16px 20px"},children:[t.category&&e.jsx("span",{style:{fontSize:11,fontWeight:600,color:"#1B3A57",background:"#F0F4F8",padding:"2px 8px",borderRadius:8},children:t.category}),e.jsx("h3",{style:{fontSize:17,fontWeight:700,color:"#0f172a",margin:"8px 0 6px",lineHeight:1.4},children:t.title}),t.excerpt&&e.jsx("p",{style:{fontSize:13,color:"#64748b",lineHeight:1.6,margin:0},children:t.excerpt}),e.jsxs("div",{style:{fontSize:12,color:"#94a3b8",marginTop:10},children:[t.published_at&&new Date(t.published_at).toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric"}),t.view_count>0&&e.jsxs("span",{children:[" ⢠",t.view_count," lượt xem"]})]})]})]})},t.id))}),y>1&&e.jsx("div",{style:{display:"flex",justifyContent:"center",gap:8,marginTop:32},children:Array.from({length:y},(t,n)=>n+1).map(t=>e.jsx("button",{onClick:()=>f(t),style:{width:36,height:36,borderRadius:8,border:"none",cursor:"pointer",fontSize:13,fontWeight:600,background:p===t?"#1B3A57":"#f1f5f9",color:p===t?"#fff":"#64748b"},children:t},t))})]})})}const d={page:{minHeight:"var(--app-vh)",background:"#f8fafc",padding:"40px 20px"},container:{maxWidth:1100,margin:"0 auto"}};export{N 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.