PageSourceSearch

https://buzzlinq.com/assets/BeatExternalArticle-BQ5MdSTd.js

js buzzlinq.com collected 2026-10-09 22:01:35 UTC 4,878 bytes, 1 lines download raw bytes

1import{bJ as N,r as a,j as e,L as p,b,B as _,s as f}from"./index-BRvw6ug7.js";import{B as n}from"./badge-Do8giT55.js";import{A as v}from"./ArticleImageUpload-CPGd_Cla.js";import{A as k}from"./arrow-left-LhnkNjzC.js";import{E as g}from"./external-link-D8TxgYyU.js";import{M as B}from"./index-ZahucKNX.js";import{f as A}from"./format-D2sD5dXX.js";import"./image-plus-CndsX6d2.js";function U(){const{id:i}=N(),[r,o]=a.useState(null),[c,j]=a.useState(null),[w,d]=a.useState(!0),[z,m]=a.useState(!1);return a.useEffect(()=>{async function l(){var u;if(!i)return;const{data:s,error:x}=await f.from("beat_external_articles").select("id, source_url, title, description, image_url, source_name, category, scanned_at, related_display_name").eq("id",i).single();if(x||!s){console.error("Error loading article:",x),d(!1);return}o(s),d(!1),m(!0);try{const{data:t,error:h}=await f.functions.invoke("firecrawl-scrape",{body:{url:s.source_url,options:{formats:["markdown"],onlyMainContent:!0}}});if(h)console.error("Scrape error:",h);else{const y=((u=t==null?void 0:t.data)==null?void 0:u.markdown)||(t==null?void 0:t.markdown)||null;j(y)}}catch(t){console.error("Failed to scrape:",t)}finally{m(!1)}}l()},[i]),w?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(p,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):r?e.jsxs("article",{className:"max-w-3xl mx-auto",children:[e.jsxs(b,{to:"/beat",className:"inline-flex items-center gap-1 text-sm text-buzz-white/50 hover:text-primary transition-colors mb-6",children:[e.jsx(k,{className:"h-4 w-4"}),"Back to Beat"]}),e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(n,{variant:"secondary",className:"text-xs bg-buzz-white/5 text-buzz-white/60 border-buzz-white/10",children:r.category}),r.source_name&&e.jsx(n,{variant:"outline",className:"text-xs text-primary/70 border-primary/20",children:r.source_name}),r.related_display_name&&e.jsxs(n,{variant:"outline",className:"text-xs text-buzz-white/40 border-buzz-white/10",children:["About: ",r.related_display_name]})]}),e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-buzz-white mb-3 leading-tight",children:r.title}),r.description&&e.jsx("p",{className:"text-buzz-white/50 mb-4 text-lg",children:r.description}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-buzz-white/30 mb-6",children:[e.jsx("span",{children:A(new Date(r.scanned_at),"MMM d, yyyy")}),e.jsx("span",{children:"·"}),e.jsxs("a",{href:r.source_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary/60 hover:text-primary transition-colors",children:["View original ",e.jsx(g,{className:"h-3 w-3"})]})]}),r.image_url?e.jsx("div",{className:"rounded-xl overflow-hidden mb-8 bg-buzz-white/5",children:e.jsx("img",{src:r.image_url,alt:r.title,className:"w-full max-h-80 object-cover"})}):e.jsxs("div",{className:"rounded-xl border border-dashed border-buzz-white/10 mb-8 p-6 flex flex-col items-center gap-3 bg-buzz-white/[0.02]",children:[e.jsx("p",{className:"text-sm text-buzz-white/30",children:"No image available for this article"}),e.jsx(v,{articleId:r.id,onImageUploaded:l=>o(s=>s&&{...s,image_url:l})})]}),e.jsx("div",{className:"border-t border-buzz-white/10 pt-8",children:z?e.jsxs("div",{className:"flex items-center gap-3 text-buzz-white/40 py-10 justify-center",children:[e.jsx(p,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:"Loading article content…"})]}):c?e.jsx("div",{className:"prose prose-invert prose-sm max-w-none [&_a]:text-primary [&_h1]:text-xl [&_h2]:text-lg [&_img]:rounded-lg",children:e.jsx(B,{children:c})}):e.jsxs("div",{className:"text-center py-10 text-buzz-white/40",children:[e.jsx("p",{className:"mb-4",children:"Could not load the full article content."}),e.jsx(_,{asChild:!0,variant:"outline",size:"sm",children:e.jsxs("a",{href:r.source_url,target:"_blank",rel:"noopener noreferrer",children:["Read on ",r.source_name||"source"," ",e.jsx(g,{className:"h-3 w-3 ml-1"})]})})]})}),e.jsx("div",{className:"mt-8 border-t border-buzz-white/10 pt-6 text-xs text-buzz-white/30 leading-relaxed",children:e.jsxs("p",{children:[e.jsx("strong",{className:"text-buzz-white/40",children:"Disclaimer:"})," This content is sourced from third-party websites and is displayed here for informational purposes only. Buzzlinq does not claim ownership of or responsibility for the accuracy of this content. All rights belong to the original publisher.",e.jsx("a",{href:r.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary/50 hover:text-primary ml-1",children:"View original source →"})]})})]}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx("h2",{className:"text-xl font-bold mb-2",children:"Article not found"}),e.jsx(b,{to:"/beat",className:"text-primary hover:underline",children:"Back to Beat"})]})}
1export{U 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.