1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13153],{3998:(e,t,a)=>{a.d(t,{$:()=>o,r:()=>i});var l=a(95155);a(12115);var s=a(32467),r=a(83101),n=a(64269);let i=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-primary focus-visible:ring-primary/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a,size:r,asChild:o=!1,...d}=e,c=o?s.DX:"button";return(0,l.jsx)(c,{"data-slot":"button",className:(0,n.cn)(i({variant:a,size:r,className:t})),...d})}},5917:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},10383:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},15239:(e,t,a)=>{a.d(t,{default:()=>s.a});var l=a(54652),s=a.n(l)},20305:(e,t,a)=>{a.d(t,{A:()=>l});var l=(0,a(30313).A)("outline","command","IconCommand",[["path",{d:"M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10",key:"svg-0"}]])},20508:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},23529:(e,t,a)=>{a.d(t,{l6:()=>p,gC:()=>f,eb:()=>g,bq:()=>u,yv:()=>m});var l=a(95155),s=a(47887),r=a(12108),n=a(24033),i=a(12115),o=a(72264);let d=e=>(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M13.3346 4L6.0013 11.3333L2.66797 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});var c=a(64269);let p=s.bL;s.YJ;let m=s.WT,u=i.forwardRef((e,t)=>{let{className:a,children:r,hideIcon:n,...i}=e;return(0,l.jsxs)(s.l9,{ref:t,className:(0,c.cn)("border-input ring-offset-background data-[placeholder]:text-muted-foreground flex h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border px-3 py-2.5 text-sm shadow-[4px_4px_8px_0_var(--shadow-proxy-input))] focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","data-[state=open]:border-primary data-[state=open]:ring-primary/20 data-[state=open]:ring-[3px]","[&>span]:min-w-0 [&>span]:flex-1 [&>span]:truncate [&>span]:text-left",a),...i,children:[r,!n&&(0,l.jsx)(s.In,{asChild:!0,className:"shrink-0 hover:cursor-pointer",children:(0,l.jsx)(o.F.ChevronsDownSolidIcon,{className:"text-icon-template-3 h-[14px] w-[14px]"})})]})});u.displayName=s.l9.displayName,i.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;
1return(0,l.jsxs)(s.l9,{ref:t,className:(0,c.cn)("border-input ring-offset-background data-[placeholder]:text-muted-foreground flex h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border px-3 py-2.5 text-sm whitespace-nowrap shadow-[4px_4px_8px_0_var(--shadow-proxy-input))] focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","data-[state=open]:border-primary data-[state=open]:ring-primary/20 data-[state=open]:ring-[3px]",a),...n,children:[r,(0,l.jsx)(s.In,{asChild:!0,className:"hover:cursor-pointer",children:(0,l.jsx)(o.F.ChevronsDownIcon,{className:"h-[20px] w-[20px] text-[#161616]"})})]})}).displayName=s.l9.displayName;let x=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,l.jsx)(s.PP,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,l.jsx)(r.A,{className:"h-4 w-4"})})});x.displayName=s.PP.displayName;let h=i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,l.jsx)(s.wn,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,l.jsx)(n.A,{className:"h-4 w-4"})})});h.displayName=s.wn.displayName;let f=i.forwardRef((e,t)=>{let{className:a,children:r,position:n="popper",...i}=e;return(0,l.jsx)(s.ZL,{children:(0,l.jsxs)(s.UC,{ref:t,className:(0,c.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:n,...i,children:[(0,l.jsx)(x,{}),(0,l.jsx)(s.LM,{className:(0,c.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,l.jsx)(h,{})]})})});f.displayName=s.UC.displayName,i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,l.jsx)(s.JU,{ref:t,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",a),...r})}).displayName=s.JU.displayName;let g=i.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;return(0,l.jsxs)(s.q7,{ref:t,className:(0,c.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...n,children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:(0,l.jsx)(s.p4,{children:r})}),(0,l.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-[#18181B]",children:(0,l.jsx)(s.VF,{children:(0,l.jsx)(d,{className:"h-4 w-4"})})})]})});g.displayName=s.q7.displayName,i.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,l.jsx)(s.wv,{ref:t,className:(0,c.cn)("bg-muted -mx-1 my-1 h-px",a),...r})}).displayName=s.wv.displayName},25959:(e,t,a)=>{a.d(t,{v:()=>n});var l=a(12115);let s=e=>{let t,a=new Set,l=(e,l)=>{let s="function"==typeof e?e(t):e;if(!Object.is(s,t)){let e=t;t=(null!=l?l:"object"!=typeof s||null===s)?s:Object.assign({},t,s),a.forEach(a=>a(t,e))}},s=()=>t,r={setState:l,getState:s,getInitialState:()=>n,subscribe:e=>(a.add(e),()=>a.delete(e))},n=t=e(l,s,r);return r},r=e=>{let t=(e=>e?s(e):s)(e),a=e=>(function(e,t=e=>e){let a=l.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return l.useDebugValue(a),a})(t,e);return Object.assign(a,t),a},n=e=>e?r(e):r},26767:(e,t,a)=>{a.d(t,{A:()=>n});var l=a(95155),s=a(64269),r=a(77186);function n(e){let{children:t,scrollable:a=!0,className:n="",contentMaxWidthClassName:i="max-w-[1480px]",openMarqueeTop:o=!0,openMarqueeBottom:d=!0}=e;return(0,l.jsx)(l.Fragment,{children:a?(0,l.jsx)(r.F,{className:(0,s.cn)("bg-background-blur-template-3 mx-auto h-[calc(100dvh-70px)] w-full max-w-full min-w-0 overflow-x-hidden px-3 sm:px-4 md:px-6 [&_[data-slot=scroll-area-viewport]]:max-w-full [&_[data-slot=scroll-area-viewport]]:min-w-0 [&_[data-slot=scroll-area-viewport]]:overflow-x-hidden [&_[data-slot=scroll-area-viewport]>div]:max-w-full [&_[data-slot=scroll-area-viewport]>div]:min-w-0",n),children:(0,l.jsx)("div",{className:"flex min-h-full w-full min-w-0 flex-col justify-between gap-3 overflow-x-hidden",children:(0,l.jsx)("div",{className:"@container mx-auto flex w-full max-w-[var(--template-3-content-max-width,1152px)] min-w-0 flex-1 overflow-x-hidden pt-6 pb-10",children:t})})}):(0,l.jsx)("div",{className:"bg-background-blur-template-3 mx-auto flex h-full w-full max-w-full min-w-0 overflow-x-hidden px-3 pt-3 sm:px-4 md:px-6 ".concat(n),children:(0,l.jsx)("div",{className:"flex h-full w-full min-w-0 flex-col justify-between gap-3 overflow-x-hidden",children:(0,l.jsx)("div",{className:"mx-auto flex w-full max-w-[var(--template-3-content-max-width,1152px)] min-w-0 flex-1 overflow-x-hidden py-3 pt-6 pb-8",children:t})})})})}a(12115)},30313:(e,t,a)=>{a.d(t,{A:()=>r});var l=a(12115),s={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"
1currentColor",stroke:"none"}};let r=(e,t,a,r)=>{let n=(0,l.forwardRef)((a,n)=>{let{color:i="currentColor",size:o=24,stroke:d=2,title:c,className:p,children:m,...u}=a;return(0,l.createElement)("svg",{ref:n,...s[e],width:o,height:o,className:["tabler-icon","tabler-icon-".concat(t),p].join(" "),..."filled"===e?{fill:i}:{strokeWidth:d,stroke:i},...u},[c&&(0,l.createElement)("title",{key:"svg-title"},c),...r.map(e=>{let[t,a]=e;return(0,l.createElement)(t,a)}),...Array.isArray(m)?m:[m]])});return n.displayName="".concat(a),n}},39180:(e,t,a)=>{a.d(t,{r:()=>s});var l=a(68019);let s=(0,a(25959).v)((e,t)=>({config:null,affiliateProgram:null,setConfig:t=>{var a,s;return e({config:{...t,theme:(null==t?void 0:t.theme)?{...t.theme,textmarquee:null!=(s=null!=(a=t.theme.textmarquee)?a:t.theme.textMarquee)?s:"",...t.theme.logo&&{logo:(0,l.V)(t.theme.logo,t.hostName)},...t.theme["logo-l"]&&{"logo-l":(0,l.V)(t.theme["logo-l"],t.hostName)}}:t.theme}})},setAffiliateProgram:t=>e({affiliateProgram:t}),getRotateUrl:()=>{var e,a;return null==(a=t().config)||null==(e=a.theme)?void 0:e.rotateUrl}}))},54652:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{default:function(){return o},getImageProps:function(){return i}});let l=a(28140),s=a(75040),r=a(81356),n=l._(a(71124));function i(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,a]of Object.entries(t))void 0===a&&delete t[e];return{props:t}}let o=r.Image},57828:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},58734:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},65229:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},68019:(e,t,a)=>{a.d(t,{V:()=>l});let l=(e,t)=>{if(!e||"string"!=typeof e)return"";let a=e.trim();if(a.startsWith("https://")||a.startsWith("http://"))return a.replace("/api/v1","");if((e=>e.startsWith("/api/v1/files")||e.startsWith("/files/")||e.includes("/files/"))(a)){let e="https://api.homeproxy.vn".replace(/\/$/,"");if(e){let t=a.startsWith("/")?a:"/".concat(a);return"".concat(e).concat(t).replace("/api/v1","")}}let l=(t||"https://app.homeproxy.vn").trim().replace(/^https?:\/\//,"").replace(/\/$/,"");return l?a.startsWith("/")?"https://".concat(l).concat(a).replace("/api/v1",""):"https://".concat(l,"/").concat(a).replace("/api/v1",""):a}},71569:(e,t,a)=>{a.r(t),a.d(t,{default:()=>W});var l=a(95155),s=a(12115),r=a(10383),n=a(20508),i=a(57828),o=a(52619),d=a.n(o),c=a(15239),p=a(39180),m=a(13744);function u(e){var t;let{blog:a}=e,s=(0,p.r)(e=>e.config),o=null==s?void 0:s.hostName,u=null==s||null==(t=s.theme)?void 0:t.logo;a.thumbnail;let x=a.thumbnail?"https://".concat(o).concat(a.thumbnail.path):u?u.replace("/api/v1",""):"https://placehold.co/600x400/1a1a1a/666666?text=No+Image";return(0,l.jsx)(d(),{href:"/blogs/".concat(a.slug),className:"group block h-full",children:(0,l.jsxs)("div",{className:"flex h-full flex-col items-start gap-4 roun
1ded-2xl bg-white p-4 shadow-[inset_0_0_0_1px_#E4E4E7] drop-shadow-[0px_1px_1.5px_rgba(0,0,0,0.1),0px_1px_1px_rgba(0,0,0,0.1)] transition-all group-hover:shadow-[inset_0_0_0_1px_#DF3B30] group-hover:drop-shadow-[0px_4px_3px_rgba(0,0,0,0.1),0px_2px_2px_rgba(0,0,0,0.1)]",children:[(0,l.jsxs)("div",{className:"relative h-40 w-full shrink-0 overflow-hidden rounded-xl bg-[#F4F4F5]",children:[(0,l.jsx)(c.default,{src:x,alt:a.title,fill:!0,className:"object-cover",sizes:"(max-width: 768px) 100vw, 33vw",loading:"lazy"}),"draft"===a.status?(0,l.jsx)("div",{className:"absolute top-2 right-2 z-10 rounded-full bg-yellow-500/90 px-2 py-0.5 text-xs text-white shadow-lg",children:"Nh\xe1p"}):null]}),(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-3",children:[a.category?(0,l.jsxs)("div",{className:"flex items-center gap-1.5 rounded-2xl bg-[#EEF2FF] py-0.5 pr-2.5 pl-2",children:[(0,l.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-[#1D4ED8]"}),(0,l.jsx)("span",{className:"text-sm whitespace-nowrap text-[#1D4ED8]",children:a.category.title})]}):null,(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-2",children:[(0,l.jsx)("p",{className:"line-clamp-2 min-h-10 w-full text-sm font-medium text-[#18181B]",children:a.title}),(0,l.jsx)("p",{className:"line-clamp-2 min-h-10 w-full text-sm text-[#71717A]",children:a.excerpt})]}),a.tags.length>0?(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[a.tags.slice(0,2).map(e=>(0,l.jsxs)("span",{className:"rounded-full bg-[#F4F4F5] px-2 py-0.5 text-xs whitespace-nowrap text-[#71717A]",children:["#",e]},e)),a.tags.length>2?(0,l.jsxs)("span",{className:"rounded-full bg-[#F4F4F5] px-2 py-0.5 text-xs whitespace-nowrap text-[#71717A]",children:["+",a.tags.length-2]}):null]}):null,(0,l.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(r.A,{className:"size-4 shrink-0 text-[#71717A]","aria-hidden":!0}),(0,l.jsx)("span",{className:"text-xs whitespace-nowrap text-[#71717A]",children:new Date(a.createdAt).toLocaleDateString("vi-VN",{day:"2-digit",month:"long",year:"numeric"}).toLowerCase()})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(n.A,{className:"size-4 shrink-0 text-[#71717A]","aria-hidden":!0}),(0,l.jsxs)("span",{className:"text-xs whitespace-nowrap text-[#71717A]",children:[a.author.firstName," ",a.author.lastName]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)(i.A,{className:"size-4 shrink-0 text-[#71717A]","aria-hidden":!0}),(0,l.jsx)("span",{className:"text-xs whitespace-nowrap text-[#71717A]",children:m.A.formatNum(a.viewCount)})]})]})]})]})})}var x=a(23529),h=a(64269),f=a(24033),g=a(99975),v=a(90368),w=a(27937),b=a(90088);let y="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-[#D4D4D8] bg-white text-sm font-normal text-[#18181B] disabled:cursor-not-allowed disabled:opacity-50 hover:cursor-pointer";function j(e){let{page:t,totalPages:a,onPageChange:s,className:r}=e,n=Array.from({length:a},(e,t)=>t+1);return(0,l.jsxs)("div",{className:(0,h.cn)("flex w-full flex-col items-center justify-between gap-4 sm:flex-row",r),children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("span",{className:"text-base font-normal text-[#18181B]",children:"Trang"}),(0,l.jsxs)(x.l6,{value:"".concat(t),onValueChange:e=>s(Number(e)),children:[(0,l.jsxs)(x.bq,{hideIcon:!0,className:"h-8 w-[51px] gap-2 rounded-lg border-[#D7DBE0] bg-white px-2.5 py-2.5 text-base font-semibold text-[#18181B] shadow-none",children:[(0,l.jsx)(x.yv,{placeholder:t}),(0,l.jsx)(f.A,{className:"!h-4 !w-4 shrink-0 text-[#18181B]"})]}),(0,l.jsx)(x.gC,{side:"top",children:n.map(e=>(0,l.jsx)(x.eb,{value:"".concat(e),children:e},e))})]}),(0,l.jsxs)("span",{className:"text-base font-normal whitespace-nowrap text-[#18181B]",children:["cá»§a ",a]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-[5px]",children:[(0,l.jsx)("button",{type:"button",className:y,onClick:()=>s(1),disabled:t<=1,"aria-label":"Trang Äầu",children:(0,l.jsx)(g.A,{className:"!h-4 !w-4",strokeWidth:1.5})}),(0,l.jsx)("button",{type:"button",className:y,onClick:()=>s(t-1),disabled:t<=1,"aria-label":"Trang trưá»c",children:(0,l.jsx)(v.A,{className:"!h-4 !w-4",strokeWidth:1.5})}),(()=>{let e=[];
1if(a<=5)for(let t=1;t<=a;t++)e.push(t);else if(t<=3){for(let t=1;t<=3;t++)e.push(t);e.push("..."),e.push(a)}else if(t>=a-2){e.push(1),e.push("...");for(let t=a-2;t<=a;t++)e.push(t)}else{e.push(1),e.push("...");for(let a=t-1;a<=t+1;a++)e.push(a);e.push("..."),e.push(a)}return e})().map((e,a)=>"..."===e?(0,l.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center text-sm text-[#18181B]",children:"..."},"ellipsis-".concat(a)):(0,l.jsx)("button",{type:"button",className:(0,h.cn)(y,e===t?"bg-[#FBEBEA]":"bg-white"),onClick:()=>s(e),children:e},e)),(0,l.jsx)("button",{type:"button",className:y,onClick:()=>s(t+1),disabled:t>=a,"aria-label":"Trang sau",children:(0,l.jsx)(w.A,{className:"!h-4 !w-4",strokeWidth:1.5})}),(0,l.jsx)("button",{type:"button",className:y,onClick:()=>s(a),disabled:t>=a,"aria-label":"Trang cuá»i",children:(0,l.jsx)(b.A,{className:"!h-4 !w-4",strokeWidth:1.5})})]})]})}var N=a(58734),k=a(65229),C=a(3998),A=a(72264);let _=e=>(0,l.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.575 11C5.45 11 5.325 10.975 5.2 10.925C5.075 10.875 4.9625 10.8 4.8625 10.7L1.2875 7.125C1.1875 7.025 1.11458 6.91458 1.06875 6.79375C1.02292 6.67292 1 6.55 1 6.425C1 6.3 1.02292 6.175 1.06875 6.05C1.11458 5.925 1.1875 5.8125 1.2875 5.7125L5.6875 1.3C5.77917 1.20833 5.8875 1.13542 6.0125 1.08125C6.1375 1.02708 6.26667 1 6.4 1H9.9875C10.2625 1 10.4979 1.09792 10.6938 1.29375C10.8896 1.48958 10.9875 1.725 10.9875 2V5.5875C10.9875 5.72083 10.9625 5.84792 10.9125 5.96875C10.8625 6.08958 10.7917 6.19583 10.7 6.2875L6.2875 10.7C6.1875 10.8 6.075 10.875 5.95 10.925C5.825 10.975 5.7 11 5.575 11ZM5.575 10L9.9875 5.575V2H6.4125L2 6.425L5.575 10ZM8.7375 4C8.94583 4 9.12292 3.92708 9.26875 3.78125C9.41458 3.63542 9.4875 3.45833 9.4875 3.25C9.4875 3.04167 9.41458 2.86458 9.26875 2.71875C9.12292 2.57292 8.94583 2.5 8.7375 2.5C8.52917 2.5 8.35208 2.57292 8.20625 2.71875C8.06042 2.86458 7.9875 3.04167 7.9875 3.25C7.9875 3.45833 8.06042 3.63542 8.20625 3.78125C8.35208 3.92708 8.52917 4 8.7375 4Z",fill:"currentColor"})});var F=a(26767),z=a(47971),M=a(5917),D=a(99051);let L=z.bL,B=z.l9;z.YJ,z.ZL;let E=z.Pb;z.z6;let R=s.forwardRef((e,t)=>{let{className:a,inset:s,children:r,...n}=e;return(0,l.jsxs)(z.ZP,{ref:t,className:(0,h.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",s&&"pl-8",a),...n,children:[r,(0,l.jsx)(w.A,{className:"ml-auto"})]})});R.displayName=z.ZP.displayName;let V=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,l.jsx)(z.G5,{ref:t,className:(0,h.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",a),...s})});V.displayName=z.G5.displayName;let S=s.forwardRef((e,t)=>{let{className:a,sideOffset:s=4,...r}=e;return(0,l.jsx)(z.ZL,{children:(0,l.jsx)(z.UC,{ref:t,sideOffset:s,className:(0,h.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",a),...r})})});S.displayName=z.UC.displayName;let P=s.forwardRef((e,t)=>
1{let{className:a,inset:s,...r}=e;return(0,l.jsx)(z.q7,{ref:t,className:(0,h.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",s&&"pl-8",a),...r})});function W(e){var t,a;let{initialBlogs:r,initialCategories:n}=e,[i,o]=(0,s.useState)(),[d,c]=(0,s.useState)(""),[p,m]=(0,s.useState)(""),[x,h]=(0,s.useState)(1),f=null!=r?r:[],g=null!=n?n:[],v=f.filter(e=>{var t,a,l;if(i&&(null==(t=e.category)?void 0:t.id)!==i)return!1;if(d){let t=d.toLowerCase();return e.title.toLowerCase().includes(t)||(null==(a=e.excerpt)?void 0:a.toLowerCase().includes(t))||(null==(l=e.tags)?void 0:l.some(e=>e.toLowerCase().includes(t)))}return!0}),w=Math.max(1,Math.ceil(v.length/6)),b=v.slice((x-1)*6,6*x),y=Object.entries(f.flatMap(e=>e.tags).reduce((e,t)=>(e[t]=(e[t]||0)+1,e),{})).map(e=>{let[t,a]=e;return{tag:t,count:a}}).sort((e,t)=>t.count-e.count).slice(0,10),z=g.flatMap(e=>[e,...e.children||[]]),M=i&&null!=(a=null==(t=z.find(e=>e.id===i))?void 0:t.title)?a:"Tất cả",D=e=>{o(e),h(1)},W=()=>{c(p),h(1)},T=()=>{c(""),m(""),o(void 0),h(1)};return(0,l.jsx)(F.A,{openMarqueeTop:!0,scrollable:!0,children:(0,l.jsxs)("div",{className:"relative flex flex-1 flex-col items-center gap-5 overflow-clip rounded-[32px] bg-white px-4 pt-[42px] pb-8 shadow-[0px_0px_8px_0px_rgba(0,0,0,0.05)] md:px-8",children:[(0,l.jsx)("div",{className:"absolute top-0 left-0 flex items-center rounded-br-[32px] bg-gradient-to-r from-[#fc98b1] to-[#fbccc9] px-6 py-1",children:(0,l.jsx)("span",{className:"text-sm font-medium text-[#591c19]",children:"B\xe0i viết"})}),(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-3",children:[(0,l.jsxs)("div",{className:"relative flex h-10 w-full items-center gap-2.5 rounded-full border border-[#D4D4D8] bg-white pr-12 has-[input:focus]:border-[#DF3B30]",children:[(0,l.jsxs)(L,{children:[(0,l.jsx)(B,{asChild:!0,children:(0,l.jsxs)("button",{type:"button",className:"flex h-full shrink-0 items-center gap-2.5 rounded-full border border-[#D4D4D8] bg-[#F4F4F5] px-2.5 py-1",children:[(0,l.jsx)("span",{className:"text-xs whitespace-nowrap text-[#000000]",children:M}),(0,l.jsx)(A.F.ChevronsDownSolidIcon,{className:"size-3.5 shrink-0 text-[#8A92A6]"})]})}),(0,l.jsxs)(S,{align:"start",children:[(0,l.jsxs)(P,{onClick:()=>D(void 0),children:["Tất cả (",f.length,")"]}),g.map(e=>{if(e.children&&e.children.length>0){var t;return(0,l.jsxs)(E,{children:[(0,l.jsx)(R,{children:e.title}),(0,l.jsxs)(V,{children:[(0,l.jsxs)(P,{onClick:()=>D(e.id),children:[e.title," (Tất cả)"]}),null==(t=e.children)?void 0:t.map(e=>(0,l.jsx)(P,{onClick:()=>D(e.id),children:e.title},e.id))]})]},e.id)}return(0,l.jsx)(P,{onClick:()=>D(e.id),children:e.title},e.id)})]})]}),(0,l.jsx)("input",{placeholder:"T\xecm kiếm chá»§ Äá»",value:p,onChange:e=>m(e.target.value),onKeyDown:e=>"Enter"===e.key&&W(),className:"h-full min-w-0 flex-1 bg-transparent text-sm text-[#18181B] placeholder:text-[rgba(60,60,67,0.6)] focus:outline-none"}),(0,l.jsx)("button",{type:"button",onClick:W,"aria-label":"T\xecm kiếm",className:"absolute top-0 right-0 flex h-10 w-10 items-center justify-center rounded-full bg-[#DF3B30] hover:bg-[#DF3B30]/90",children:(0,l.jsx)(A.F.MagnifyingGlass,{className:"!h-6 !w-6 text-white"})})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,l.jsxs)("button",{type:"button",onClick:T,className:"flex shrink-0 items-center gap-1 rounded-full bg-[#DF3B30] px-3 py-1",children:[(0,l.jsx)("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-[#F5E5E5] p-[2px]",children:(0,l.jsx)(_,{className:"size-3 text-[#DF3B30]"})}),(0,l.jsx)("span",{className:"text-sm whitespace-nowrap text-white",children:"Hashtag"})]}),y.length>0&&(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:y.map(e=>{let{tag:t}=e;return(0,l.jsx)("button",{type:"button",onClick:()=>{m(t),c(t),h(1)},className:"rounded-full bg-[#F4F4F5] px-3 py-1 text-sm whitespace-nowrap text-[#71717A] transition-colors hover:bg-[#
1E4E4E7]",children:t},t)})})]})]}),b.length>0?(0,l.jsxs)("div",{className:"flex w-full flex-col items-start gap-5",children:[(0,l.jsx)("div",{className:"grid w-full grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3",children:b.map(e=>(0,l.jsx)(u,{blog:e},e.id))}),(0,l.jsx)(j,{page:x,totalPages:w,onPageChange:h})]}):(0,l.jsxs)("div",{className:"animate-in fade-in zoom-in-95 flex flex-col items-center justify-center py-20 text-center duration-500",children:[(0,l.jsx)("div",{className:"bg-muted/50 mb-6 rounded-full p-6",children:(0,l.jsx)(N.A,{className:"text-muted-foreground/50 h-16 w-16"})}),(0,l.jsx)("h3",{className:"mb-3 text-xl font-bold",children:"Kh\xf4ng t\xecm thấy b\xe0i viết"}),(0,l.jsx)("p",{className:"text-muted-foreground mb-6 max-w-md text-base",children:d||i?"Thá» Äiá»u chá»nh bá» lá»c hoặc t\xecm kiếm vá»i từ kh\xf3a kh\xe1c":"Chưa c\xf3 b\xe0i viết n\xe0o"}),(d||i)&&(0,l.jsxs)(C.$,{variant:"outline",size:"lg",onClick:T,className:"hover:bg-primary hover:text-primary-foreground border-2 transition-all hover:scale-105",children:[(0,l.jsx)(k.A,{className:"mr-2 h-4 w-4"}),"X\xf3a tất cả bá» lá»c"]})]})]})})}P.displayName=z.q7.displayName,s.forwardRef((e,t)=>{let{className:a,children:s,checked:r,...n}=e;return(0,l.jsxs)(z.H_,{ref:t,className:(0,h.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:r,...n,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(z.VF,{children:(0,l.jsx)(M.A,{className:"h-4 w-4"})})}),s]})}).displayName=z.H_.displayName,s.forwardRef((e,t)=>{let{className:a,children:s,...r}=e;return(0,l.jsxs)(z.hN,{ref:t,className:(0,h.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...r,children:[(0,l.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,l.jsx)(z.VF,{children:(0,l.jsx)(D.A,{className:"h-2 w-2 fill-current"})})}),s]})}).displayName=z.hN.displayName,s.forwardRef((e,t)=>{let{className:a,inset:s,...r}=e;return(0,l.jsx)(z.JU,{ref:t,className:(0,h.cn)("px-2 py-1.5 text-sm font-semibold",s&&"pl-8",a),...r})}).displayName=z.JU.displayName,s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,l.jsx)(z.wv,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",a),...s})}).displayName=z.wv.displayName},77186:(e,t,a)=>{a.d(t,{$:()=>o,F:()=>i});var l=a(95155),s=a(12115),r=a(83360),n=a(64269);let i=s.forwardRef((e,t)=>{let{className:a,children:s,...i}=e;return(0,l.jsxs)(r.bL,{ref:t,"data-slot":"scroll-area",className:(0,n.cn)("relative overflow-hidden",a),...i,children:[(0,l.jsx)(r.LM,{"data-slot":"scroll-area-viewport",className:"h-full w-full rounded-[inherit]",children:s}),(0,l.jsx)(o,{}),(0,l.jsx)(r.OK,{})]})});i.displayName=r.bL.displayName;let o=s.forwardRef((e,t)=>{let{className:a,orientation:s="vertical",...i}=e;return(0,l.jsx)(r.VM,{ref:t,"data-slot":"scroll-area-scrollbar",orientation:s,className:(0,n.cn)("flex touch-none transition-colors select-none","vertical"===s&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===s&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...i,children:(0,l.jsx)(r.lr,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})});o.displayName=r.VM.displayName},83101:(e,t,a)=>{a.d(t,{F:()=>n});var l=a(2821);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r=l.$,n=(e,t)=>a=>{var l;if((null==t?void 0:t.variants)==null)return r(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:n,defaultVariants:i}=t,o=Object.keys(n).map(e=>{let t=null==a?void 0:a[e],l=null==i?void 0:i[e];if(null===t)return null;let r=s(t)||s(l);return n[e][r]}),d=a&&Object.entries(a).reduce((e,t)=>{let[a,l]=t;return void 0===l||(e[a]=l),e},{});return r(e,o,null==t||null==(l=t.compoundVariants)?void 0:l.reduce((e,t)=>
1{let{class:a,className:l,...s}=t;return Object.entries(s).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...i,...d}[t]):({...i,...d})[t]===a})?[...e,a,l]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}},90088:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]])},90368:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},99051:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},99975:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(71847).A)("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]])}}]);
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.