1import{j as e}from"./vendor-motion-BZXRTvaM.js";import{h as b,c as y,r as s}from"./vendor-react-8OToQnYg.js";import{Z as j,n as S,a1 as v}from"./index-zJJ2m_hC.js";function I(){const{date:o}=b(),d=y(),[n,f]=s.useState(null),[g,l]=s.useState(!0),[h,p]=s.useState(!1);s.useEffect(()=>{if(!o){l(!1);return}const t="https://uolmycktidxunnydkfaz.supabase.co",r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVvbG15Y2t0aWR4dW5ueWRrZmF6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzMxNTEzNzQsImV4cCI6MjA4ODcyNzM3NH0.3suTQYc-RcBGrs8jZj3eLOamTCNTiTTyOEh7BLhdkW0";fetch(`${t}/functions/v1/get-briefing?date=${o}&limit=1`,{headers:{apikey:r,Authorization:`Bearer ${r}`}}).then(i=>i.json()).then(({data:i})=>{!i||i.length===0?p(!0):f(i[0]),l(!1)}).catch(i=>{console.error("[BriefingArchive] Failed to fetch briefing:",i),p(!0),l(!1)})},[o]);const x=t=>new Date(t).toLocaleDateString("en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),m=t=>new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});if(g)return e.jsx("div",{style:{minHeight:"60vh",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"96px"},children:e.jsx("span",{style:{color:"#475569"},children:"Loading briefing..."})});if(h)return e.jsxs("div",{className:"w-full max-w-[1600px] mx-auto px-3 sm:px-4 md:px-5 pt-[112px] pb-10 min-h-[80vh] flex flex-col items-center justify-center",children:[e.jsx("p",{style:{color:"#64748b",fontSize:"15px",marginBottom:"20px"},children:"No briefing found for this date."}),e.jsx("button",{onClick:()=>d("/briefing"),style:{color:"#94a3b8",fontSize:"14px",cursor:"pointer",background:"none",border:"1px solid #334155",borderRadius:"6px",padding:"8px 16px"},children:"â Back to Briefings"})]});const c=n!=null&&n.briefing_text?j(n.briefing_text):[];return e.jsxs("div",{className:"w-full max-w-[1600px] mx-auto px-3 sm:px-4 md:px-5 pt-[112px] pb-10 min-h-[80vh]",children:[e.jsx(S,{title:"Briefing Archive | FSMonitor",description:"Archive of daily flight simulation briefings.",canonical:"https://fsmonitor.io/briefing",noIndex:!0}),e.jsx("button",{onClick:()=>d("/briefing"),style:{color:"#64748b",fontSize:"14px",cursor:"pointer",background:"none",border:"none",padding:"0",marginBottom:"24px",display:"inline-block"},children:"â Back to Briefings"}),e.jsxs("h1",{style:{color:"white",fontSize:"22px",fontWeight:"700",marginBottom:"24px"},children:["Briefing â ",o?x(o):""]}),n&&e.jsxs("div",{style:{background:"#111827",border:"1px solid #1e293b",borderTop:"3px solid #94a3b8",borderRadius:"10px",padding:"28px",marginBottom:"40px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"24px",flexWrap:"wrap",gap:"12px"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{color:"white",fontSize:"18px",fontWeight:"600",marginBottom:"4px"},children:x(n.date)}),e.jsxs("div",{style:{color:"#64748b",fontSize:"13px"}
1,children:["Updated at ",m(n.generated_at)," · ",n.article_count," stories reviewed"]})]}),e.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:n.source_names.map(t=>e.jsx("span",{style:{background:"#1e293b",border:"1px solid #334155",color:"#94a3b8",fontSize:"12px",padding:"4px 10px",borderRadius:"999px"},children:t},t))})]}),c.length>0?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:c.map((t,r)=>{const i=v(t.label);return e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"12px",paddingBottom:"8px",borderBottom:`1px solid ${i}33`},children:[e.jsx("span",{style:{color:i,fontSize:"11px",fontWeight:"700",letterSpacing:"0.12em",textTransform:"uppercase"},children:t.label}),e.jsx("span",{style:{background:`${i}22`,color:i,fontSize:"10px",padding:"1px 6px",borderRadius:"999px",border:`1px solid ${i}44`},children:t.items.length})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:t.items.map((a,u)=>e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"10px",padding:"10px 14px",background:"#0d1525",borderRadius:"6px",border:"1px solid #1e293b"},children:[e.jsx("span",{style:{color:i,fontSize:"14px",flexShrink:0,marginTop:"1px",fontWeight:"700"},children:"â¢"}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#e2e8f0",fontSize:"14px",lineHeight:"1.5",fontWeight:"500"},children:a.title}),a.source&&e.jsx("span",{style:{display:"inline-block",marginLeft:"8px",color:"#475569",fontSize:"12px",background:"#1e293b",padding:"1px 7px",borderRadius:"999px",border:"1px solid #334155",verticalAlign:"middle"},children:a.source})]})]},u))})]},r)})}):e.jsx("p",{style:{color:"#475569",fontSize:"14px"},children:"No content available for this briefing."}),e.jsx("div",{style:{marginTop:"24px",paddingTop:"16px",borderTop:"1px solid #1e293b",color:"#475569",fontSize:"12px",lineHeight:"1.6"},children:"FSMonitor aggregates headlines directly from official developer and publisher RSS feeds. All articles link to their original source. We do not modify or rewrite any content."})]})]})}export{I 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.