1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9754],{63177:(e,t,l)=>{l.r(t),l.d(t,{default:()=>y});var s=l(95155),a=l(12115),r=l(5565),i=l(48173),n=l.n(i),c=l(14505),d=l(92823),o=l(20591),x=l(26336),h=l(1466),m=l(31417),p=l(99271),u=l(16075),f=l(58767),g=l(23798),b=l(8449),w=l(76046);function y(e){let t=(0,a.use)(e.params).id,{user:l}=(0,b.A)();(0,w.useRouter)();let[i,y]=(0,a.useState)(null),[v,j]=(0,a.useState)([]),[k,N]=(0,a.useState)(!0),[A,C]=(0,a.useState)(null);(0,a.useEffect)(()=>{(async()=>{if(t)try{var e,l;let s=await fetch("/api/agency/".concat(t));if(!s.ok){y(null),N(!1);return}let a=await s.json();if(!a.agency){y(null),N(!1);return}y({id:a.agency.id,name:a.agency.name||"สัà¸à¸à¸±à¸",logo:a.agency.logo||"https://placehold.co/100x100/e0e7ff/4f46e5?text=".concat(((null===(e=a.agency.name)||void 0===e?void 0:e[0])||"G").toUpperCase()),color:a.agency.color||"bg-indigo-600",cover:a.agency.cover||a.agency.logo||"https://images.unsplash.com/photo-1570158268183-d296b2892211?auto=format&fit=crop&q=80&w=1000",desc:a.agency.description||"à¸à¸¥à¸±à¸à¸ªà¸¸à¸à¹à¸à¹à¸à¸à¹à¸à¸¥à¸¹à¸à¸µà¸ à¸à¸£à¹à¸à¸¡à¹à¸«à¹à¸à¸£à¸´à¸à¸²à¸£",location:a.agency.location||"à¹à¸¡à¹à¸£à¸°à¸à¸¸à¸à¸³à¹à¸«à¸à¹à¸",memberCount:a.agency.memberCount||0,postCount:(null===(l=a.posts)||void 0===l?void 0:l.length)||0,followers:a.agency.followers||0,followerIds:[],lineId:a.agency.lineId||"",verified:a.agency.verified||!1}),j(a.posts||[])}catch(e){console.error("Error fetching agency:",e),y(null)}finally{N(!1)}})()},[t]);let _=e=>{C(e),setTimeout(()=>C(null),3e3)},z=async()=>{try{await navigator.clipboard.writeText(window.location.href),_("à¸à¸±à¸à¸¥à¸à¸à¸¥à¸´à¸à¸à¹à¸ªà¸±à¸à¸à¸±à¸à¹à¸£à¸µà¸¢à¸à¸£à¹à¸à¸¢à¹à¸¥à¹à¸§")}catch(e){console.error("Error sharing:",e),_("à¹à¸¡à¹à¸ªà¸²à¸¡à¸²à¸£à¸à¸à¸±à¸à¸¥à¸à¸à¸¥à¸´à¸à¸à¹à¹à¸à¹")}},I=async()=>{alert("à¸à¸±à¸à¸à¹à¸à¸±à¸à¸à¸´à¸à¸à¸²à¸¡à¸ªà¸±à¸à¸à¸±à¸à¸à¸³à¸¥à¸±à¸à¸à¸£à¸±à¸à¸à¸£à¸¸à¸à¸£à¸°à¸à¸")};return k?(0,s.jsxs)("div",{className:"min-h-screen bg-white flex items-center justify-center pb-24 font-sans max-w-[1200px] mx-auto relative shadow-2xl",children:[(0,s.jsx)("h1",{className:"sr-only",children:"à¸à¹à¸à¸¡à¸¹à¸¥à¸ªà¸±à¸à¸à¸±à¸à¹à¸à¹à¸à¸à¸à¸µà¹ - Sideline Hub"}),(0,s.jsx)(c.A,{className:"w-10 h-10 animate-spin text-pink-500"})]}):i?(0,s.jsxs)("div",{className:"min-h-screen bg-white pb-24 font-sans max-w-[1200px] mx-auto relative shadow-2xl overflow-hidden",children:[A&&(0,s.jsx)("div",{className:"fixed top-20 right-4 md:right-8 z-[100] animate-in slide-in-from-right-8 fade-in duration-300",children:(0,s.jsxs)("div",{className:"bg-white border border-slate-200 text-slate-800 px-4 py-3 rounded-xl shadow-lg font-medium text-[14px] flex items-center gap-2",children:[(0,s.jsx)(x.A,{className:"w-5 h-5 text-green-500"}),A]})}),(0,s.jsxs)("div",{className:"absolute top-0 left-0 w-full h-[380px] sm:h-[450px] md:h-[500px] z-0 overflow-hidden",children:[(0,s.jsx)(r.default,{src:i.cover,alt:"".concat(i.name," cover"),fill:!0,className:"object-cover scale-110 blur-[2px] opacity-100"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-white/10"}),(0,s.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-1/2 bg-gradient-to-t from-white via-white/80 to-transparent"})]}),(0,s.jsxs)("div",{className:"relative z-10 flex flex-col items-center pt-[140px] sm:pt-[160px] md:pt-[200px]",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"w-[140px] h-[140px] rounded-full overflow-hidden border-[4px] border-white shadow-[0_10px_40px_-10px_rgba(0,0,0,0.3)] bg-slate-100 flex items-center justify-center relative",children:i.logo?(0,s.jsx)(r.default,{src:i.logo,alt:i.name,fill:!0,className:"object-cover"}):(0,s.jsx)(h.A,{className:"w-16 h-16 text-slate-300"})}),i.verified&&(0,s.jsx)("div",{className:"absolute bottom-1 right-2 w-8 h-8 rounded-full bg-white flex items-center justify-center p-[2px] shadow-md z-10",children:(0,s.jsx)(m.A,{className:"w-full h-full text-white fill-blue-500"})})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col items-center gap-3 bg-white/95 backdrop-blur-2xl px-8 py-5 rounded-[2rem]
1shadow-[0_8px_30px_rgb(0,0,0,0.08)] border border-slate-100/80 mx-4 w-auto min-w-[300px] max-w-full",children:[(0,s.jsx)("h1",{className:"text-[28px] md:text-[32px] font-black text-slate-900 tracking-tight leading-none drop-shadow-sm text-center px-2",children:i.name}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[i.verified&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 bg-blue-50 px-3.5 py-1.5 rounded-full border border-blue-100",children:[(0,s.jsx)(m.A,{className:"w-4 h-4 text-blue-500"}),(0,s.jsx)("span",{className:"font-bold text-blue-600 text-[13px]",children:"ยืà¸à¸¢à¸±à¸à¹à¸¥à¹à¸§"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 bg-pink-50 px-3.5 py-1.5 rounded-full border border-pink-100",children:[(0,s.jsx)(o.A,{className:"w-4 h-4 text-pink-500 fill-pink-500/20"}),(0,s.jsxs)("span",{className:"font-bold text-pink-600 text-[13px]",children:[i.followers," à¸à¸¹à¹à¸à¸´à¸à¸à¸²à¸¡"]})]})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2.5 mt-5 px-4 w-full",children:[(0,s.jsxs)("button",{onClick:I,className:"flex-1 min-w-[110px] max-w-[160px] px-2 py-3 rounded-full flex items-center justify-center gap-1.5 font-bold shadow-sm active:scale-95 transition-all text-[14px] ".concat(l&&i.followerIds.includes(l.uid)?"bg-pink-100 text-pink-600 shadow-pink-100/20":"bg-pink-500 hover:bg-pink-600 text-white shadow-pink-500/20"),children:[(0,s.jsx)(o.A,{className:"w-[18px] h-[18px] ".concat(l&&i.followerIds.includes(l.uid)?"fill-pink-500":"fill-white")}),l&&i.followerIds.includes(l.uid)?"à¸à¸³à¸¥à¸±à¸à¸à¸´à¸à¸à¸²à¸¡":"à¸à¸´à¸à¸à¸²à¸¡"]}),i.lineId&&"à¸à¸´à¸à¸à¹à¸à¹à¸à¸à¸¡à¸´à¸"!==i.lineId&&"-"!==i.lineId&&(0,s.jsxs)(n(),{prefetch:!1,href:"https://line.me/ti/p/~".concat(i.lineId),target:"_blank",className:"flex-1 min-w-[110px] max-w-[160px] bg-[#06C755] hover:bg-[#05b34c] text-white px-2 py-3 rounded-full flex items-center justify-center gap-1.5 font-bold shadow-sm transition-all focus:scale-95 text-[14px]",children:[(0,s.jsx)(p.A,{className:"w-[18px] h-[18px] fill-white"}),"Line"]}),(0,s.jsx)("button",{onClick:z,className:"flex-none bg-slate-100 hover:bg-slate-200 text-slate-900 w-[44px] h-[44px] rounded-full flex items-center justify-center gap-1.5 font-bold shadow-sm active:scale-95 transition-all outline-none border border-slate-200",children:(0,s.jsx)(u.A,{className:"w-[18px] h-[18px]"})})]}),(0,s.jsx)("div",{className:"w-full px-5 mt-6 mb-2",children:(0,s.jsx)("div",{className:"bg-slate-50 border border-slate-200 rounded-2xl p-5 shadow-sm text-center",children:(0,s.jsx)("p",{className:"text-slate-900 text-[15px] leading-relaxed whitespace-pre-line relative z-10",children:i.desc})})}),(0,s.jsxs)("div",{className:"w-full px-3 mt-4 pb-4",children:[(0,s.jsxs)("div",{className:"mb-4 px-3 flex items-center justify-between",children:[(0,s.jsxs)("h2",{className:"font-bold text-lg md:text-xl text-slate-900",children:["à¸à¹à¸à¸à¹ à¹à¸à¸ªà¸±à¸à¸à¸±à¸ (",i.postCount,")"]}),(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 flex items-center justify-center text-slate-500",children:(0,s.jsx)(f.A,{className:"w-4 h-4"})})]}),v.length>0?(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-x-4 gap-y-8 md:gap-x-6 pb-4",children:v.map(e=>(0,s.jsx)(g.A,{post:e,forceLight:!0},e.id))}):(0,s.jsx)("div",{className:"text-center py-10 bg-slate-50 rounded-2xl border border-slate-100",children:(0,s.jsx)("p",{className:"text-slate-500",children:"ยัà¸à¹à¸¡à¹à¸¡à¸µà¹à¸à¸ªà¸à¹à¸£à¸±à¸à¸à¸²à¸à¹à¸à¸ªà¸±à¸à¸à¸±à¸à¸à¸µà¹"})})]})]})]}):(0,s.jsx)("div",{className:"min-h-screen bg-slate-50 flex flex-col items-center justify-center p-6 font-sans",children:(0,s.jsxs)("div",{className:"bg-white p-8 rounded-3xl shadow-sm text-center border border-slate-100 max-w-sm w-full",children:[(0,s.jsx)("div",{className:"w-20 h-20 bg-pink-50 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,s.jsx)(d.A,{className:"w-10 h-10 text-pink-500"})}),(0,s.jsx)("h1",{className:"text-2xl font-black text-slate-800 mb-3",children:"à¹à¸¡à¹à¸à¸à¸ªà¸±à¸à¸à¸±à¸à¸à¹à¸à¸¡à¸¹à¸¥à¸à¸µà¹"}),(0,s.jsx)("p",{className:"text-slate-500 mb-8 leading-relaxed text-[15px]",children:"à¸à¸à¸à¸ ัย สัà¸à¸à¸±à¸à¸à¸µà¹à¸à¸¸à¸à¸à¸³à¸¥à¸±à¸à¸à¹à¸à¸«à¸²à¸à¸²à¸à¸à¸¹à¸à¹à¸à¸¥à¸µà¹à¸¢à¸à¸à¸·à¹à¸, ลà¸à¹à¸à¹à¸¥à¹à¸§ หรืà¸à¹à¸¡à¹à¸¡à¸µà¸à¸¢à¸¹à¹à¹à¸à¸£à¸°à¸à¸"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)(n(),{prefetch:!1,href:"/feed",className:"w-full bg-pink-500 hover:bg-pink-600 text-white font-bold py-3.5 px-6 rounded-full transition-colors flex items-center justify-center gap-2 shadow-sm text-[15px]",children:[(0,s.jsx)(o.A,{className:"w-5 h-5"}),"à¸à¸¹à¸à¹à¸à¸à¹ สัà¸à¸à¸±à¸à¸à¸·à¹à¸à¹ à¹à¸à¸à¸µà¸"]}),(0,s.jsx)(n(),{prefetch:!1,href:"/",className:"w-full bg-slate-50 hover:bg-slate-100 text-slate-700 font-bold py-3.5 px-6 rounded-full transition-colors inline-block border border-slate-200 text-[15px]",children:"à¸à¸¥à¸±à¸à¸ªà¸¹à¹à¸«à¸à¹à¸²à¸«à¸¥à¸±à¸"})]})]})})}},63394:(e,t,l)=>{l.d(t,{A:()=>x});var s=l(12115);let a=function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter((e,t,l)=>!!e&&""!==e.trim()&&l.indexOf(e)===t).join(" ").trim()},r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,l)=>l?l.toUpperCase():t.toLowerCase()),n=e=>{let t=i(e);return t.charAt(0).toUpperCase()+t.slice(1)};var c={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"};let d=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},o=(0,s.forwardRef)((e,t)=>{let{color:l="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:n,className:o="",children:x,iconNode:h,...m}=e;return(0,s.createElement)("svg",{ref:t,...c,width:r,height:r,stroke:l,strokeWidth:n?24*Number(i)/Number(r):i,className:a("lucide",o),...!x&&!d(m)&&{"aria-hidden":"true"},...m},[...h.map(e=>{let[t,l]=e;return(0,s.createElement)(t,l)}),...Array.isArray(x)?x:[x]])}),x=(e,t)=>{let l=(0,s.forwardRef)((l,i)=>{let{className:c,...d}=l;return(0,s.createElement)(o,{ref:i,iconNode:t,className:a("lucide-".concat(r(n(e))),"lucide-".concat(e),c),...d})});return l.displayName=n(e),l}},31417:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},26336:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},20591:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]])},27554:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},58767:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("images",[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",ke
1y:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]])},14505:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},99271:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]])},16075:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},1466:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).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"}]])},92823:(e,t,l)=>{l.d(t,{A:()=>s});let s=(0,l(63394).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},76046:(e,t,l)=>{var s=l(66658);l.o(s,"useParams")&&l.d(t,{useParams:function(){return s.useParams}}),l.o(s,"usePathname")&&l.d(t,{usePathname:function(){return s.usePathname}}),l.o(s,"useRouter")&&l.d(t,{useRouter:function(){return s.useRouter}}),l.o(s,"useSearchParams")&&l.d(t,{useSearchParams:function(){return s.useSearchParams}})}}]);
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.