1import{c as u,d as m,r as c,j as e,L as f,H as g,v as j,C as b,f as N,a as d,S as p,T as y,b as w}from"./index-BpZ236K-.js";import{B as v}from"./badge-BgkV1kVo.js";import{T as _}from"./triangle-alert-BoRk9qz9.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const k=u("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);function D(t){const s=new Date(t);return Number.isNaN(s.getTime())?new Date:s}async function C(){const t=[m("archive/daily_report_latest.json"),m("archive/morning_call_latest.json")];for(const s of t){const r=await fetch(s,{headers:{"Cache-Control":"no-cache"}});if(r.ok)return r.json()}throw new Error("Failed to load daily report from any known endpoint.")}async function T(){const t=await C(),s=t.daily_report_markdown??t.morning_call_markdown??`### Daily report unavailable 7 8No content available.`,r=new Date,n=(t.highlights||[]).map(a=>({...a,smart_groups:a.smart_groups||[],curated:!!a.curated,publishedDate:D(a.published)})).filter(a=>a.publishedDate<=r);return{...t,daily_report_markdown:s,highlights:n}}function h(t){return t.split(/(\*\*[^*]+\*\*|`[^`]+`)/g).map((r,n)=>r.startsWith("**")&&r.endsWith("**")?e.jsx("strong",{children:r.slice(2,-2)},`bold-${n}
8`):r.startsWith("`")&&r.endsWith("`")?e.jsx("code",{className:"px-1 py-0.5 bg-muted rounded",children:r.slice(1,-1)},`code-${n}`):e.jsx(c.Fragment,{children:r},`text-${n}`))}function S({content:t}){const s=t.split(` 9`),r=[];let n=[];const a=()=>{n.length!==0&&(r.push(e.jsx("ul",{className:"list-disc pl-6 space-y-1",children:n.map((i,o)=>e.jsx("li",{className:"text-[15px] text-muted-foreground",children:h(i)},`li-${o}`))},`list-${r.length}`)),n=[])};return s.forEach((i,o)=>{const l=i.trim();if(l.startsWith("###")){a(),r.push(e.jsx("h3",{className:"text-xl font-semibold text-foreground mt-6",children:l.replace(/^###\s*/,"")},`h-${o}`));return}if(l.startsWith("- ")){n.push(l.replace(/^-+\s*/,""));return}if(l===""){a();return}a(),r.push(e.jsx("p",{className:"text-[15px] text-muted-foreground",children:h(l)},`p-${o}`))}),a(),e.jsx("div",{className:"space-y-3",children:r})}function $({highlight:t}){return e.jsxs(d,{className:"p-5 bg-card border-border",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] font-mono text-muted-foreground uppercase",children:t.source}),e.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-foreground hover:text-primary transition-colors",children:t.title})]}),e.jsx("span",{className:"text-[13px] text-muted-foreground font-mono",children:w(t.publishedDate,{addSuffix:!0})})]}),t.smart_groups.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:t.smart_groups.map(s=>e.jsxs(v,{variant:"category",className:"text-[12px]",children:["#",s]},s))})]})}function W(){const[t,s]=c.useState(null),[r,n]=c.useState(!0),[a,i]=c.useState(null);c.useEffect(()=>{(async()=>{try{n(!0);const x=await T();s(x),i(null)}catch(x){console.error("Failed to load daily report data:",x),i("Daily report is unavailable right now.")}finally{n(!1)}})()},[]);const o={curated:(t==null?void 0:t.total_items_in_window_curated)??0,total:(t==null?void 0:t.total_items_in_window_all)??0,highlights:(t==null?void 0:t.highlights.length)??0};return e.jsxs(f,{children:[e.jsxs(g,{children:[e.jsxs("title",{children:["Daily Report â ",j.metaTitle]}),e.jsx("meta",{name:"description",content:"Daily SOC-ready security report generated from curated intelligence."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(b,{className:"h-8 w-8 text-primary"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Daily Report Briefing"}),e.jsx("p",{className:"text-[15px] text-muted-foreground",children:t?`Published ${N(new Date(t.generated_at),"MMMM d, yyyy 'at' HH:mm")} UTC`:"Latest curated overview for SOC teams"})]})]})}),r?e.jsxs("div",{className:"text-center py-12 bg-card rounded-lg border border-border",children:[e.jsx("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent mb-4"}),e.jsx("p",{className:"text-[15px] text-muted-foreground font-mono",children:"Loading daily report..."})]}):a?e.jsx("div",{className:"text-center py-12 bg-card rounded-lg border border-destructive",children:e.jsx("p",{className:"text-[15px] text-destructive font-mono",children:a})}):t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs(d,{className:"p-5 bg-card border-border flex items-center gap-3",children:[e.jsx(p,{className:"h-8 w-8 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] text-muted-foreground font-mono uppercase",children:"Curated Items"}),e.jsx("p",{className:"text-2xl font-bold text-foreground",children:o.curated})]})]}),e.jsxs(d,{className:"p-5 bg-card border-border flex items-center gap-3",children:[e.jsx(_,{className:"h-8 w-8 text-destructive"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] text-muted-foreground font-mono uppercase",children:"Window Coverage"}),e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[o.total," items"]})]})]}),e.jsxs(d,{className:"p-5 bg-card border-border flex items-center gap-3",children:[e.jsx(y,{className:"h-8 w-8 text-success"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[13px] text-muted-foreground font-mono uppercase",children:"Highlighted Stories"}),e.jsx("p",{className:"text-2xl font-bold text-foreground",children:o.highlights})]})]})]}),e.jsxs(d,{className:"p-6 bg-card border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(k,{className:"h-5 w-5 text-primary"}),e.jsxs("h2",{className:"text-xl font-semibold text-foreground",children:["SOC Daily Report (",t.window_hours,"h window)"]})]}),e.jsx(S,{content:t.daily_report_markdown})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-5 w-5 text-primary"}),e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Top Highlights"})]}),t.highlights.length===0?e.jsx(d,{className:"p-6 bg-card border-border text-center",children:e.jsx("p",{className:"text-[15px] text-muted-foreground",children:"No curated highlights were generated for this window."})}):e.jsx("div",{className:"space-y-4",children:t.highlights.map(l
9=>e.jsx($,{highlight:l},`${l.link}-${l.published}`))})]})]}):null]})]})}export{W 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.