1/*! For license information please see 6421.b4813eb2.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[6421],{73:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},797:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},3416:(e,a,s)=>{s.d(a,{T:()=>c});var t=s(9379),i=s(3986),n=s(5043),r=s(9766),o=s(579);const l=["className"],c=n.forwardRef((e,a)=>{let{className:s}=e,n=(0,i.A)(e,l);return(0,o.jsx)("textarea",(0,t.A)({className:(0,r.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:a},n))});c.displayName="Textarea"},3677:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},5059:(e,a,s)=>{s.d(a,{A:()=>m});var t=s(5043),i=s(4662),n=s(1680),r=s(8306),o=s(3677),l=s(5699),c=s(614),d=s(579);const m=e=>{let{image:a,category:s="Feature Article",title:m,subtitle:h,author:x="BWGELA",readTime:p,wordCount:u,content:f,onClose:g}=e;const[b,y]=(0,t.useState)(!1),[v,w]=(0,t.useState)(!1),j=(0,t.useRef)(null),N=()=>{navigator.clipboard.writeText(window.location.href),alert("Link copied to clipboard!")};return(0,d.jsxs)("div",{className:"mb-12",children:[!b&&(0,d.jsx)("div",{className:"bg-gradient-to-r from-[#1a1a1a] to-[#252525] rounded-2xl overflow-hidden cursor-pointer hover:from-[#222] hover:to-[#2a2a2a] transition-all duration-300 border border-white/5",onClick:()=>y(!0),children:(0,d.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,d.jsx)("div",{className:"md:w-1/2 h-48 md:h-64",children:(0,d.jsx)("img",{src:a,alt:m,className:"w-full h-full object-cover"})}),(0,d.jsxs)("div",{className:"md:w-1/2 p-6 md:p-8 flex flex-col justify-center",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,d.jsx)(n.A,{className:"w-4 h-4 text-[#F5F5DC]"}),(0,d.jsx)("span",{className:"text-[#F5F5DC] text-xs",children:s})]}),(0,d.jsx)("h2",{className:"text-base md:text-lg text-[#F5F5DC] mb-2",children:m}),(0,d.jsx)("p",{className:"text-[#A8A8A8] text-base mb-4",children:h}),(0,d.jsxs)("div",{className:"flex items-center gap-4 text-[#666] text-xs",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"text-[#A8A8A8]",children:"\u2726"})," ",x]}),(0,d.jsxs)("span",{children:["\u23f1 ",p]}),(0,d.jsxs)("span",{children:[u," words"]})]}),(0,d.jsxs)("div",{className:"mt-4 text-[#F5F5DC] text-xs flex items-center gap-2 group-hover:gap-3 transition-all",children:["Click to read article ",(0,d.jsx)("span",{children:"\u2192"})]})]})]})}),b&&(0,d.jsxs)("div",{className:"bg-gradient-to-b from-[#1a1a1a] to-[#0f0f0f] rounded-2xl overflow-hidden border border-white/5",children:[(0,d.jsxs)("div",{className:"relative h-64 md:h-80",children:[(0,d.jsx)("img",{src:a,alt:m,className:"w-full h-full object-cover"}),(0,d.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1a1a1a] to-transparent"}),(0,d.jsx)("button",{onClick:()=>{y(!1),v&&(window.speechSynthesis.cancel(),w(!1))},className:"absolute top-4 right-4 bg-black/50 hover:bg-black/70 text-white p-2 rounded-full transition-colors",children:(0,d.jsx)(c.A,{className:"w-5 h-5"})})]}),(0,d.jsxs)("div",{className:"px-6 md:px-12 py-8 -mt-20 relative",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,d.jsx)(n.A,{className:"w-4 h-4 text-[#F5F5DC]"}),(0,d.jsx)("span",{className:"text-[#F5F5DC] text-xs",children:s})]}),(0,d.jsx)("h1",{className:"text-lg md:text-xl text-[#F5F5DC] mb-3",children:m}),(0,d.jsx)("p",{className:"text-[#A8A8A8] text-sm mb-4 italic",children:h}),(0,d.jsxs)("div",{className:"flex items-center gap-4 text-[#666] text-xs mb-6",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"text-[#A8A8A8]",children:"\u2726"})," ",x]}),(0,d.jsxs)("span",{children:["\u23f1 ",p]}),(0,d.jsxs)("span",{children:[u," words"]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 mb-8",children:[(0,d.jsxs)("button",{onClick:()=>{const e=window.open("","_blank");e.document.write("\n <!DOCTYPE html>\n <html>\n <head>\n <title>".concat(m,"</title>\n <style>\n body { font-family: Georgia, serif; max-width: 800px; margin: 40px auto; padding: 20px; line-height: 1.8; color: #333; }\n h1 { font-size: 28px; margin-bottom: 10px; }\n .subtitle { font-style: italic; color: #666; margin-bottom: 20px; }\n .meta { font-size: 14px; color: #888; margin-bottom: 30px; }\n .content { font-size: 16px; }\n .content p { margin-bottom: 16px; }\n @media print { body { margin: 20px; } }\n </style>\n </head>\n <body>\n <h1>").concat(m,'</h1>\n <p class="subtitle">').concat(h,'</p>\n <p class="meta">By ').concat(x," \xb7 ").concat(p," \xb7 ").concat(u,' words</p>\n <div class="content">').concat(f.split("\n\n").map(e=>"<p>".concat(e,"</p>")).join(""),"</div>\n </body>\n </html>\n ")),e.document.close(),e.print()},className:"flex items-center gap-2 px-4 py-2 bg-[#2a2a2a] hover:bg-[#333] text-[#A8A8A8] rounded-lg text-xs transition-colors",children:[(0,d.jsx)(n.A,{className:"w-4 h-4"}),"PDF"]}),(0,d.jsxs)("button",{onClick:async()=>
2{const e={title:m,text:h,url:window.location.href};if(navigator.share)try{await navigator.share(e)}catch(a){N()}else N()},className:"flex items-center gap-2 px-4 py-2 bg-[#2a2a2a] hover:bg-[#333] text-[#A8A8A8] rounded-lg text-xs transition-colors",children:[(0,d.jsx)(r.A,{className:"w-4 h-4"}),"Share"]}),(0,d.jsxs)("button",{onClick:()=>{if(v)return window.speechSynthesis.cancel(),void w(!1);const e=new SpeechSynthesisUtterance(f);e.lang="en-GB",e.rate=.9,e.pitch=1,e.onend=()=>w(!1),e.onerror=()=>w(!1),j.current=e,(0,i.s)("audio_play",{type:"featured_article"}),window.speechSynthesis.speak(e),w(!0)},className:"flex items-center gap-2 px-4 py-2 rounded-lg text-xs transition-colors ".concat(v?"bg-[#F5F5DC] text-black":"bg-[#2a2a2a] hover:bg-[#333] text-[#A8A8A8]"),children:[v?(0,d.jsx)(l.A,{className:"w-4 h-4"}):(0,d.jsx)(o.A,{className:"w-4 h-4"}),v?"Stop":"Listen"]})]}),(0,d.jsx)("div",{className:"prose prose-invert max-w-none",children:f.split("\n\n").map((e,a)=>(0,d.jsx)("p",{className:"text-[#A8A8A8] leading-relaxed mb-4 text-sm",children:e},a))}),(0,d.jsx)("div",{className:"mt-8 pt-6 border-t border-white/10 text-center",children:(0,d.jsx)("button",{onClick:()=>{y(!1),v&&(window.speechSynthesis.cancel(),w(!1))},className:"text-[#A8A8A8] hover:text-[#F5F5DC] text-sm transition-colors",children:"Close Article"})})]})]})]})}},5088:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},5395:(e,a,s)=>{s.d(a,{k:()=>d});var t=s(9379),i=s(3986),n=s(5043),r=s(3332),o=s(9766),l=s(579);const c=["className","value"],d=n.forwardRef((e,a)=>{let{className:s,value:n}=e,d=(0,i.A)(e,c);return(0,l.jsx)(r.bL,(0,t.A)((0,t.A)({ref:a,className:(0,o.cn)("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s)},d),{},{children:(0,l.jsx)(r.C1,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(n||0),"%)")}})}))});d.displayName=r.bL.displayName},5699:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},5949:(e,a,s)=>{s.d(a,{E:()=>d});var t=s(9379),i=s(3986),n=(s(5043),s(917)),r=s(9766),o=s(579);const l=["className","variant"],c=(0,n.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d(e){let{className:a,variant:s}=e,n=(0,i.A)(e,l);return(0,o.jsx)("div",(0,t.A)({className:(0,r.cn)(c({variant:s}),a)},n))}},6382:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]])},6421:(e,a,s)=>{s.r(a),s.d(a,{default:()=>F});var t=s(9379),i=s(5043),n=s(3390),r=s(1140),o=s(5949),l=s(9690),c=s(5395),d=s(3416),m=s(6382),h=s(797),x=s(7784);const p=(0,x.A)("scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);var u=s(7719),f=s(73),g=s(4919);const b=(0,x.A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var y=s(5088),v=s(2196),w=s(5830),j=s(4528),N=s(1118),k=s(5059),A=s(579);const C={image:"https://static.prod-images.emergentagent.com/jobs/af7aaeeb-59d1-491b-a2dd-23bb9df3a4ce/images/ba5d08a1e90c5be0fddbe9006729907847831567944471f7b0bc6f8b4cbc8001.png",category:"Feature Article",title:"Why Bias Scanning Matters in the Age of Misinformation",subtitle:"Navigating truth in a world of algorithmic manipulation",author:"BWGELA",readTime:"4 min read",wordCount:"820",content:'In an era where information flows faster than ever before, the ability to recognise cognitive biases has become not merely useful, but essential. Every day, billions of people consume content through social media feeds, news outlets, and messaging platforms\u2014often without realising how carefully that content has been curated to exploit their psychological vulnerabilities.\n\nMisinformation and disinformation have emerged as two of the most significant threats to informed public discourse. Whilst misinformation refers to false information shared without malicious intent, disinformation is deliberately crafted to deceive. Both exploit cognitive biases\u2014mental shortcuts our brains use to process information quickly\u2014to spread rapidly and embed themselves in our understanding of reality.\n\nConsider the confirmation bias, perhaps the most pervasive of all cognitive biases. We naturally gravitate towards information that confirms what we already believe, whilst dismissing evidence that c
2ontradicts our existing views. Social media algorithms have learned to exploit this tendency ruthlessly, creating echo chambers that reinforce our beliefs and shield us from challenging perspectives. The result is a fragmented society where people inhabit entirely different informational realities.\n\nThe availability heuristic poses another significant challenge. We tend to judge the likelihood of events based on how easily examples come to mind. When dramatic stories dominate our feeds\u2014regardless of their statistical significance\u2014we begin to believe such events are far more common than they actually are. This distorts our perception of risk and shapes our decisions in ways that may not serve our best interests.\n\nAnchoring bias affects how we interpret numerical information. The first figure we encounter becomes a reference point against which all subsequent information is measured. Skilled propagandists understand this well, strategically placing extreme claims early in their messaging to shift the entire frame of debate. Even if we reject the initial extreme claim, our perception of what constitutes a "reasonable" position has already been manipulated.\n\nThe bandwagon effect\u2014our tendency to adopt beliefs and behaviours simply because others have done so\u2014has been weaponised through the strategic use of bots and coordinated inauthentic behaviour. When we see something trending or widely shared, we assume it must have merit. Yet in today\'s digital landscape, viral popularity can be manufactured with alarming ease.\n\nPerhaps most insidiously, the illusory truth effect means that repeated exposure to a claim increases our likelihood of believing it, regardless of its accuracy. This is why false narratives, once they begin circulating, prove so remarkably difficult to correct. Each repetition strengthens the neural pathways associated with the misinformation, making it feel increasingly familiar and therefore true.\n\nThe emotional manipulation inherent in modern disinformation campaigns deserves particular attention. Content designed to provoke outrage, fear, or righteous indignation spreads faster and wider than neutral information. Our emotional responses override our rational faculties, compelling us to share before we verify. The affect heuristic\u2014our tendency to make judgements based on current emotions rather than objective analysis\u2014makes us extraordinarily vulnerable to manipulation.\n\nUnderstanding these biases is the first step towards developing resistance. When we recognise the psychological mechanisms being exploited, we can pause before reacting, question our initial responses, and seek out diverse perspectives. This is not about becoming cynical or mistrustful of all information, but rather about developing a healthy scepticism and the tools to evaluate claims more rigorously.\n\nThe Bias Scanner represents a practical application of this understanding. By analysing the content we consume\u2014whether news articles, social media posts, or messages from colleagues\u2014we can identify potential manipulation attempts before they influence our thinking. It transforms abstract knowledge about cognitive biases into concrete, actionable insights.\n\nYet tools alone are insufficient. We must cultivate habits of mind that prioritise truth over comfort, evidence over intuition, and understanding over winning arguments. This requires intellectual humility\u2014the recognition that we might be wrong, that our current beliefs may require revision in light of new evidence.\n\nThe stakes could not be higher. Democracies depend upon informed citizens capable of evaluating competing claims and making reasoned decisions. Public health relies on accurate information about risks and treatments. Scientific progress requires honest engagement with evidence, even when it challenges established theories.\n\nIn this context, bias awareness is not merely an intellectual exercise but a civic responsibility. By understanding how our minds can be manipulated, we become more resistant to manipulation. By recognising the tactics used to spread misinformation, we be
2come better equipped to identify and counter it.\n\nThe journey towards clearer thinking begins with a single step: acknowledging that we are all susceptible to bias. None of us is immune to the cognitive shortcuts that evolution has bequeathed us. But with awareness, practice, and the right tools, we can learn to think more clearly, evaluate information more rigorously, and contribute to a more informed public discourse.\n\nThe choice is ours. We can continue to be passive consumers of algorithmically curated content, allowing our biases to be exploited for profit and influence. Or we can become active, critical thinkers who demand evidence, question assumptions, and seek truth even when it proves uncomfortable. The future of our shared reality depends upon which path we choose.'},F=()=>{const{user:e,token:a}=(0,j.A)(),[s,x]=(0,i.useState)("text"),[F,S]=(0,i.useState)(""),[D,T]=(0,i.useState)(null),[B,R]=(0,i.useState)(!1),[M,z]=(0,i.useState)(null),[E,q]=(0,i.useState)([]),[W,L]=(0,i.useState)(!1),[P,_]=(0,i.useState)(null),[U,Z]=(0,i.useState)(null);(0,i.useEffect)(()=>{window.scrollTo({top:0,left:0,behavior:"instant"}),document.documentElement.scrollTop=0,document.body.scrollTop=0},[]),(0,i.useEffect)(()=>{e&&a&&(G(),H())},[e,a]);const G=async()=>{try{const e="https://bwgela.com",s=await fetch("".concat(e,"/api/profile"),{headers:{Authorization:"Bearer ".concat(a)}});if(s.ok){const e=await s.json();_(e)}}catch(e){console.error("Error fetching profile:",e)}},H=async()=>{try{const e="https://bwgela.com",s=await fetch("".concat(e,"/api/scan-history"),{headers:{Authorization:"Bearer ".concat(a)}});if(s.ok){const e=await s.json();q(e)}}catch(e){console.error("Error fetching scan history:",e)}},O=e=>{switch(e){case"High":return"destructive";case"Medium":default:return"secondary";case"Low":return"outline"}};return(0,A.jsxs)("div",{className:"min-h-screen bg-[#0a0a0a] overflow-x-hidden",children:[(0,A.jsxs)("div",{className:"w-full max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20",children:[(0,A.jsxs)("div",{className:"text-center mb-20",children:[(0,A.jsx)("h1",{className:"text-3xl md:text-4xl text-[#F5F5DC] mb-4",children:"Bias Scanner"}),(0,A.jsx)("p",{className:"text-base text-white max-w-2xl mx-auto leading-relaxed",children:"Upload your social media feed or paste your text to discover what biases you are being served."})]}),(0,A.jsx)(k.A,(0,t.A)({},C)),(0,A.jsxs)(l.tU,{value:s,onValueChange:x,className:"space-y-6",children:[(0,A.jsxs)(l.j7,{className:"grid w-full grid-cols-2",children:[(0,A.jsxs)(l.Xi,{value:"text",className:"flex items-center gap-2",children:[(0,A.jsx)(m.A,{className:"h-4 w-4"}),"Text Scanner"]}),(0,A.jsxs)(l.Xi,{value:"feed",className:"flex items-center gap-2",children:[(0,A.jsx)(h.A,{className:"h-4 w-4"}),"Feed Scanner"]})]}),(0,A.jsx)(l.av,{value:"text",className:"mt-0",children:(0,A.jsxs)(r.Zp,{className:"w-full bg-[#F5F5DC] border-[#e5e5cc]",children:[(0,A.jsxs)(r.aR,{children:[(0,A.jsx)(r.ZB,{className:"text-white",children:"Text Bias Analysis"}),(0,A.jsx)(r.BT,{className:"text-white",children:"Paste any text (news article, social media post, email) and we'll analyse the cognitive biases that you are reading or receiving."})]}),(0,A.jsxs)(r.Wu,{className:"break-words space-y-4",children:[(0,A.jsx)(d.T,{placeholder:"Paste your text here... (news article, social post, email, etc.)",value:F,onChange:e=>S(e.target.value),className:"min-h-32 bg-white border-[#ccc] text-[#0a0a0a] placeholder:text-gray-500"}),(0,A.jsxs)("div",{className:"flex gap-3",children:[(0,A.jsx)(n.$,{onClick:async()=>{if(!F.trim())return void(0,w.oR)({title:"Nothing to scan",description:"Please enter some text to analyse for biases.",variant:"destructive"});const s=new AbortController;Z(s),R(!0);try{const t="https://bwgela.com",i={"Content-Type":"application/json"};a&&(i.Authorization="Bearer ".concat(a));const n=await fetch("".concat(t,"/api/analyze-bias"),{method:"POST",headers:i,body:JSON.stringify({text:F}),signal:s.signal});if(!n.ok)throw new Error("Analysis failed");const r=await n.json(),o={biasesDetected:r.biases_detected.map(e=>({name:e.name,confidence:e.confidence,evidence:e.evidence,severity:e.severity})),overallScore:r.overall_score,recommendations:r.recommendations,insight:r.insight};T(o),(0,w.oR)({title:"Analysis complete!",description:"Detected ".concat(o.biasesDetected.length," potential biases in your text.")}),e&&a&&(G(),H())}catch(t){if("AbortError"===t.name)return void console.log("Scan
2was cancelled by user");console.error("Analysis error:",t);T({biasesDetected:[{name:"Service Unavailable",confidence:0,evidence:"Could not connect to analysis service",severity:"Low"}],overallScore:50,recommendations:["Check your internet connection","Try again in a few moments","Consider analyzing shorter text segments"],insight:"The AI analysis service is temporarily unavailable. Please try again later."}),(0,w.oR)({title:"Analysis error",description:"Using fallback analysis. Please try again later.",variant:"destructive"})}Z(null),R(!1)},disabled:B||!F.trim(),className:"flex-1 bg-black text-white hover:bg-gray-900 disabled:bg-black disabled:opacity-70",children:B?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Analysing..."]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p,{className:"mr-2 h-4 w-4"}),"Analyse Text"]})}),(B||D)&&(0,A.jsx)(n.$,{onClick:B?()=>{U&&(U.abort(),Z(null)),R(!1),(0,w.oR)({title:"Scan cancelled",description:"The analysis has been stopped."})}:()=>{T(null),S(""),(0,w.oR)({title:"Results cleared",description:"Ready for a new scan."})},variant:"outline",className:"flex-shrink-0 border-white text-white hover:bg-white/10",children:B?"Cancel":"Clear"})]})]})]})}),(0,A.jsx)(l.av,{value:"feed",className:"mt-0",children:(0,A.jsxs)(r.Zp,{className:"w-full bg-[#F5F5DC] border-[#e5e5cc]",children:[(0,A.jsxs)(r.aR,{children:[(0,A.jsx)(r.ZB,{className:"text-white",children:"Feed Analysis"}),(0,A.jsx)(r.BT,{className:"text-white",children:"Upload a screenshot of your social media feed and we'll analyse what biases the algorithm is feeding you."})]}),(0,A.jsxs)(r.Wu,{className:"break-words space-y-4",children:[(0,A.jsxs)("div",{className:"border-2 border-dashed border-[#ccc] rounded-lg p-8 text-center bg-white",children:[(0,A.jsx)(h.A,{className:"h-12 w-12 text-gray-500 mx-auto mb-4"}),(0,A.jsx)("p",{className:"text-[#333] mb-4",children:M?(0,A.jsxs)("span",{className:"text-green-700 font-medium",children:["\u2713 ",M.name," uploaded"]}):"Upload a screenshot of your social media feed"}),(0,A.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{const a=e.target.files[0];a&&(z(a),(0,w.oR)({title:"File uploaded",description:"Ready to scan ".concat(a.name," for algorithmic bias patterns.")}))},className:"hidden",id:"file-upload"}),(0,A.jsx)("label",{htmlFor:"file-upload",className:"inline-flex items-center justify-center rounded-md text-sm transition-colors h-10 px-4 py-2 cursor-pointer bg-black text-white hover:bg-gray-900",children:"Choose File"})]}),(0,A.jsxs)("div",{className:"flex gap-3",children:[(0,A.jsx)(n.$,{onClick:async()=>{if(M){R(!0);try{const e="https://bwgela.com",a=new FormData;a.append("file",M);const s=await fetch("".concat(e,"/api/analyze-feed"),{method:"POST",body:a});if(!s.ok)throw new Error("Feed analysis failed");const t=await s.json(),i={biasesDetected:t.biases_detected.map(e=>({name:e.name,confidence:e.confidence,evidence:e.evidence,severity:e.severity})),overallScore:t.overall_score,recommendations:t.recommendations,insight:t.insight};T(i),(0,w.oR)({title:"Feed analysis complete!",description:"Detected ".concat(i.biasesDetected.length," algorithmic bias patterns.")})}catch(e){console.error("Feed analysis error:",e);T({biasesDetected:[{name:"Service Unavailable",confidence:0,evidence:"Could not connect to feed analysis service",severity:"Low"}],overallScore:50,recommendations:["Check your internet connection","Ensure the uploaded image is clear and readable","Try uploading a different screenshot"],insight:"The feed analysis service is temporarily unavailable. Please try again later."}),(0,w.oR)({title:"Analysis error",description:"Using fallback analysis. Please try again later.",variant:"destructive"})}R(!1)}else(0,w.oR)({title:"No file selected",description:"Please upload a screenshot of your social media feed first.",variant:"destructive"})},disabled:B||!M,className:"flex-1 bg-black text-white hover:bg-gray-900 disabled:bg-black disabled:opacity-70",children:B?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p,{className:"mr-2 h-4 w-4 animate-spin"}),"Analysing your feed..."]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p,{className:"mr-2 h-4 w-4"}),"Scan Feed"]})}),(M||D)&&(0,A.jsx)(n.$,{onClick:()=>{T(null),z(null);const e=document.getElementById("file-upload");e&&(e.value=""),(0,w.oR)({title:"Results cleared",description:"Ready for a new feed scan."})},variant:"outline",className:"flex-shrink-0 border-white text-white hover:bg-white/10",children:"Clear"})]})]})]})})]}),(0,A.jsx)("div",{className:"mt-6 max-w-3xl mx-auto",children:(0,A.jsx)("div",{className:"bg-[#1a1a1a] border border-[#333] rounded-lg p-4",children:(0,A.jsxs)("p",{className:"text-sm text-white",children:[(0,A.jsx)("span",{className:"text-[#F5F5DC]",children:"Note:"})," If the same text or feed is scanned more than once, results may differ due to a deeper interpretation of the wording and vocabulary in your content."]})})}),D&&(0,A.jsxs)("div",{className:"w-full mt-8 rounded-xl border p-6 bg-[#1a1a1a] border-[#333]",children:[(0,A.jsxs)("div",{className:"space-y-1.5 mb-6",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between",children:[(0,A.jsxs)("div",{className:"flex items-center gap-2 text-[#F5F5DC] font-medium leading-none tracking-tight",children:[(0,A.jsx)(u.A,{className:"h-5 w-5 text-orange-500"}
2),"Scan Results"]}),(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)("span",{className:"text-sm text-white",children:"Bias Score:"}),(0,A.jsxs)(o.E,{variant:D.overallScore>70?"destructive":"secondary",className:"text-lg px-3 py-1",children:[D.overallScore,"/100"]})]})]}),(0,A.jsx)("div",{className:"text-sm text-white",children:D.insight})]}),(0,A.jsxs)("div",{className:"break-words space-y-6",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-medium text-[#F5F5DC] mb-3",children:"Detected Biases"}),(0,A.jsx)("div",{className:"space-y-3",children:D.biasesDetected.map((e,a)=>(0,A.jsxs)("div",{className:"rounded-lg p-4 bg-[#0f0f0f] border border-[#333]",children:[(0,A.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,A.jsx)("h5",{className:"font-medium text-[#F5F5DC]",children:e.name}),(0,A.jsxs)("div",{className:"flex items-center gap-2",children:[(0,A.jsx)(o.E,{variant:O(e.severity),children:e.severity}),(0,A.jsxs)("span",{className:"text-sm text-white",children:[e.confidence,"% confident"]})]})]}),(0,A.jsx)("p",{className:"text-sm text-white",children:e.evidence}),(0,A.jsx)("div",{className:"mt-2",children:(0,A.jsx)(c.k,{value:e.confidence,className:"h-2"})})]},a))})]}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-medium text-[#F5F5DC] mb-3",children:"Recommendations"}),(0,A.jsx)("div",{className:"rounded-lg p-4 bg-[#0f0f0f] border border-[#333]",children:(0,A.jsx)("ul",{className:"space-y-2",children:D.recommendations.map((e,a)=>(0,A.jsxs)("li",{className:"flex items-start gap-2 text-sm text-white",children:[(0,A.jsx)(f.A,{className:"h-4 w-4 mt-0.5 text-[#F5F5DC]"}),e]},a))})})]}),(0,A.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,A.jsx)(n.$,{variant:"outline",onClick:()=>T(null),className:"border-[#333] text-white hover:bg-[#333]",children:"Scan Again"}),(0,A.jsx)(n.$,{onClick:()=>{const e=window.open("","_blank");e.document.write("\n <!DOCTYPE html>\n <html>\n <head>\n <title>Bias Scan Report</title>\n <style>\n body { font-family: Georgia, serif; max-width: 800px; margin: 40px auto; padding: 20px; line-height: 1.8; color: #333; }\n h1 { font-size: 28px; margin-bottom: 10px; }\n h2 { font-size: 20px; margin-top: 30px; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 5px; }\n .score { font-size: 24px; color: ".concat(D.overallScore>70?"#dc2626":"#666",'; }\n .bias-item { margin-bottom: 20px; padding: 15px; border: 1px solid #ddd; border-radius: 8px; }\n .bias-name { font-weight: bold; font-size: 16px; }\n .severity { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-left: 10px; }\n .severity-high { background: #fee2e2; color: #dc2626; }\n .severity-medium { background: #fef3c7; color: #d97706; }\n .severity-low { background: #e0e7ff; color: #4f46e5; }\n .evidence { color: #666; margin-top: 8px; }\n .recommendation { margin: 8px 0; padding-left: 20px; }\n @media print { body { margin: 20px; } }\n </style>\n </head>\n <body>\n <h1>Bias Scan Report</h1>\n <p class="score">Bias Score: ').concat(D.overallScore,"/100</p>\n <p>").concat(D.insight,"</p>\n \n <h2>Detected Biases</h2>\n ").concat(D.biasesDetected.map(e=>'\n <div class="bias-item">\n <span class="bias-name">'.concat(e.name,'</span>\n <span class="severity severity-').concat(e.severity.toLowerCase(),'">').concat(e.severity,'</span>
2\n <span style="margin-left: 10px; color: #666;">').concat(e.confidence,'% confidence</span>\n <p class="evidence">').concat(e.evidence,"</p>\n </div>\n ")).join(""),"\n \n <h2>Recommendations</h2>\n ").concat(D.recommendations.map(e=>'<p class="recommendation">\u2022 '.concat(e,"</p>")).join(""),'\n \n <p style="margin-top: 40px; color: #999; font-size: 12px;">Generated by BWGELA Bias Scanner</p>\n </body>\n </html>\n ')),e.document.close(),e.print()},className:"bg-[#F5F5DC] text-black hover:bg-[#e5e5cc]",children:"Download PDF"})]})]})]}),(0,A.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-4 gap-4 mt-8",children:[(0,A.jsx)(r.Zp,{className:"w-full bg-[#1a1a1a] border-[#333]",children:(0,A.jsx)(r.Wu,{className:"break-words pt-6",children:(0,A.jsxs)("div",{className:"flex items-center",children:[(0,A.jsx)(g.A,{className:"h-8 w-8 text-blue-400 mr-3"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"text-2xl font-bold text-white",children:(null===P||void 0===P?void 0:P.biases_discovered)||v.Dj.biasesDiscovered}),(0,A.jsx)("div",{className:"text-sm text-gray-400",children:"Biases Discovered"})]})]})})}),(0,A.jsx)(r.Zp,{className:"w-full bg-[#1a1a1a] border-[#333]",children:(0,A.jsx)(r.Wu,{className:"break-words pt-6",children:(0,A.jsxs)("div",{className:"flex items-center",children:[(0,A.jsx)(m.A,{className:"h-8 w-8 text-purple-400 mr-3"}),(0,A.jsxs)("div",{children:[(0,A.jsxs)("div",{className:"text-2xl font-bold text-white",children:[(null===P||void 0===P?void 0:P.resistance_score)||v.Dj.resistanceScore,"%"]}),(0,A.jsx)("div",{className:"text-sm text-gray-400",children:"Resistance Score"})]})]})})}),(0,A.jsx)(r.Zp,{className:"w-full bg-[#1a1a1a] border-[#333]",children:(0,A.jsx)(r.Wu,{className:"break-words pt-6",children:(0,A.jsxs)("div",{className:"flex items-center",children:[(0,A.jsx)(f.A,{className:"h-8 w-8 text-green-400 mr-3"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"text-2xl font-bold text-white",children:(null===P||void 0===P?void 0:P.streak_days)||v.Dj.streakDays}),(0,A.jsx)("div",{className:"text-sm text-gray-400",children:"Day Streak"})]})]})})}),(0,A.jsx)(r.Zp,{className:"w-full cursor-pointer hover:shadow-lg transition-shadow bg-[#1a1a1a] border-[#333]",onClick:()=>L(!W),children:(0,A.jsx)(r.Wu,{className:"break-words pt-6",children:(0,A.jsxs)("div",{className:"flex items-center",children:[(0,A.jsx)(b,{className:"h-8 w-8 text-orange-400 mr-3"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"text-2xl font-bold text-white",children:E.length}),(0,A.jsx)("div",{className:"text-sm text-gray-400",children:"30 Day History"})]})]})})})]}),(0,A.jsxs)(r.Zp,{className:"w-full mt-6 bg-[#1a1a1a] border-[#333]",children:[(0,A.jsxs)(r.aR,{children:[(0,A.jsx)(r.ZB,{className:"text-lg text-[#F5F5DC]",children:"What Do These Numbers Mean?"}),(0,A.jsx)(r.BT,{className:"text-white",children:"Understanding your critical thinking progress metrics"})]}),(0,A.jsx)(r.Wu,{className:"break-words space-y-4",children:(0,A.jsxs)("div",{className:"grid gap-4",children:[(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(g.A,{className:"h-5 w-5 text-blue-400 mt-0.5"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-semibold text-blue-300",children:"Biases Discovered"}),(0,A.jsx)("p",{className:"text-sm text-white",children:"The total number of cognitive biases you've encountered and identified through text analysis, feed scanning, and the bias library. Each successful identification strengthens your mental defences."})]})]}),(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(m.A,{className:"h-5 w-5 text-purple-400 mt-0.5"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-semibold text-purple-300",children:"Resistance Score"}),(0,A.jsx)("p",{className:"text-sm text-white",children:"Your cognitive immunity percentage based on bias recognition accuracy, scan frequency, and diversity of content analysed. A higher score indicates better critical thinking skills and reduced susceptibility to manipulation."})]})]}),(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(f.A,{className:"h-5 w-5 text-green-400 mt-0.5"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-semibold text-green-300",children:"Daily Streak"}),(0,A.jsx)("p",{className:"text-sm text-white",children:"Consecutive days you've actively engaged with bias analysis - scanning text, reviewing feeds, or exploring the library. Consistent practice builds lasting critical thinking habits that algorithms can't easily manipulate."})]})]}),(0,A.jsxs)("div",{className:"flex items-start gap-3",children:[(0,A.jsx)(b,{className:"h-5 w-5 text-orange-400 mt-0.5"}),(0,A.jsxs)("div",{children:[(0,A.jsx)("h4",{className:"font-semibold text-orange-300",children:"30 Day History"}),(0,A.jsx)("p",{className:"text-sm text-white",children:"Your recent scan activity over the past 30 days. Click the history box above to view detailed records of texts analysed and biases discovered in each session."})]})]})]})})]}),W&&(0,A.jsxs)(r.Zp,{className:"w-full mt-6",children:[(0,A.jsxs)(r.aR,{children:[(0,A.jsxs)(r.ZB,{className:"text-lg flex items-center gap-2",children:[(0,A.jsx)(y.A,{className:"h-5 w-5"}),"30-Day Scan History"]}),(0,A.jsx)(r.BT,{children:E.length>0?"Your recent analysis activity (".concat(E.length," scans in the last 30 days)"):"No scan history available. Start analysing text to build your history!"})]}),(0,A.jsx)(r.Wu,{className:"break-words",children:E.length>0?(0,A.jsx)("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:E.map(e=>(0,A.jsxs)("div",{className:"border border-gray-700 rounded-lg p-4 hover:bg-gray-900 bg-[#1a2332]",children:[(0,A.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,A.jsxs)("div",{className:"flex-1",children:[(0,A.jsxs)("p",{className:"text-sm text-white font-medium",children:['"',e.text_snippet,'"']}),(0,A.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:new Date(e.timestamp).toLocaleDateString("en-GB",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]}),(0,A.jsxs)(o.E,{variant:"outline",className:"ml-2",children:[e.bias_count," biases"]})]}),e.biases_found.length>0&&(0,A.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.biases_found.map((e,a)=>(0,A.jsx)(o.E,{variant:"secondary",className:"text-xs",children:e},a))})]},e.id))}):(0,A.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[(0,A.jsx)(b,{className:"h-12 w-12 mx-auto mb-4 text-gray-300"}),(0,A.jsx)("p",{children:"No scan history yet."}),(0,A.jsx)("p",{className:"text-sm",children:"Analyse some text above to start building your history!"})]})})]})]}),(0,A.jsx)(N.A,{})]})}}
2,7719:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(7784).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},9690:(e,a,s)=>{s.d(a,{Xi:()=>p,av:()=>u,j7:()=>x,tU:()=>h});var t=s(9379),i=s(3986),n=s(5043),r=s(3514),o=s(9766),l=s(579);const c=["className"],d=["className"],m=["className"],h=r.bL,x=n.forwardRef((e,a)=>{let{className:s}=e,n=(0,i.A)(e,c);return(0,l.jsx)(r.B8,(0,t.A)({ref:a,className:(0,o.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s)},n))});x.displayName=r.B8.displayName;const p=n.forwardRef((e,a)=>{let{className:s}=e,n=(0,i.A)(e,d);return(0,l.jsx)(r.l9,(0,t.A)({ref:a,className:(0,o.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s)},n))});p.displayName=r.l9.displayName;const u=n.forwardRef((e,a)=>{let{className:s}=e,n=(0,i.A)(e,m);return(0,l.jsx)(r.UC,(0,t.A)({ref:a,className:(0,o.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s)},n))});u.displayName=r.UC.displayName}}]); 3//# sourceMappingURL=6421.b4813eb2.chunk.js.map
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.