-->
🌐 THE INDEX
2,847 entity profiles — leaders, companies, countries and commodities with live signal data.
OPEN THE INDEX →
`;
setTimeout(initThumbs, 80);
}
// OPEN ARTICLE
function openArt(id){
const a=A.find(x=>x.id===id);
if(!a)return;
const tc=a.t==='HIGH'?'high':a.t==='EMERGING'?'em':'watch';
const rels=a.rel.map(r=>A.find(x=>x.id===r)).filter(Boolean);
document.getElementById('art-content').innerHTML=`
● ${a.t}
${a.sec}
${a.hl}
${a.sf}
PUBLISHED BY
LEADERSCARTEL INTELLIGENCE ENGINE
${a.time}
◈ ENTITIES IN THIS SIGNAL
${a.ents.map(e=>`${e} `).join('')}
${a.body}
◈ SIGNAL TIMELINE
Terminal subscribers received this signal hours before mainstream coverage . RAVEN analysed entity relationships, generated scenario tracks, and alerted users tracking these entities — all before the first headline was published.
${rels.length?`
RELATED INTELLIGENCE
${rels.map(r=>`
`).join('')}
`:''}
`;
document.getElementById('pg-home').style.display='none';
document.getElementById('pg-art').style.display='block';
curPage='art';
window.scrollTo(0,0);
setTimeout(initThumbs,80);
try{ if(window.history&&window.history.pushState) window.history.pushState({id},'','/intelligence/'+id); }catch(e){}
}
// NAV
function filt(cat,btn){
curCat=cat;
document.querySelectorAll('.sni').forEach(b=>b.classList.remove('act'));
if(btn)btn.classList.add('act');
goHome();
}
function goHome(){
document.getElementById('pg-home').style.display='block';
document.getElementById('pg-art').style.display='none';
curPage='home';
renderHome(curCat);
window.scrollTo(0,0);
}
/* lc-intel-finalize-v1 */
function goTerminal(){window.location.href='/terminal';}
function goIndex(){window.location.href='/the-index';}
function goIndexE(name){const s=name.toLowerCase().replace(/\s+/g,'-').replace(/[^a-z0-9-]/g,'');window.location.href='/the-index#profile:'+s;}
function focusSub(){document.getElementById('sub-email')?.focus();document.getElementById('sub-email')?.scrollIntoView({behavior:'smooth',block:'center'});}
function doSub(){
const e=document.getElementById('sub-email').value;
if(!e||!e.includes('@')){toast('Please enter a valid email','#FF3B4A');return;}
// Call backend API
fetch('/api/intel/subscribe',{
method:'POST',headers:{'Content-Type':'application/json'},
body:JSON.stringify({email:e,source:'intelligence_page'})
}).catch(function(){});
document.getElementById('sub-box').innerHTML='✓ SUBSCRIBED — first brief tomorrow 06:05 UTC
';
}
function toast(msg,col){
const t=document.getElementById('toast');
t.style.borderLeftColor=col||'var(--amber)';
t.style.color=col||'var(--amber)';
t.textContent='◈ '+msg;
t.classList.add('on');
clearTimeout(t._t);
t._t=setTimeout(()=>t.classList.remove('on'),2800);
}
// Initial render happens after articles_index.json loads
// ── LIVE DATA: Fetch articles and power scores from backend ──────────
(function fetchLiveData(){
// Fetch generated intelligence articles from index
fetch('/public/intelligence/articles_index.json').then(r=>r.json()).then(idx=>{
if(!Array.isArray(idx)||!idx.length){
LEGACY.forEach(l=>A.push(l));
renderHome(curCat);
return;
}
const catMap={GEOPOLITICS:'GEO',DEFENSE:'DEFENSE',ENERGY:'ENERGY',FINANCE:'FINANCE',TECHNOLOGY:'AI',TRADE:'COMMODITIES'};
const colMap={GEOPOLITICS:'#F5A623',DEFENSE:'#FF3B4A',ENERGY:'#00FF88',FINANCE:'#00D4FF',TECHNOLOGY:'#A855F7',TRADE:'#F5A623'};
idx.forEach(a=>{
A.push({
id:a.filename.replace('.html',''), t:a.tier||'HIGH',
cat:catMap[a.sector]||'GEO', sec:a.sector||'GEOPOLITICS', cats:(a.key_sectors||[a.sector]).map(s=>s.toUpperCase()),
hl:a.headline, sf:a.standfirst,
time:a.date, views:0, col:colMap[a.sector]||'#F5A623',
ents:a.entities||[], rel:[],
url:'/public/intelligence/'+a.filename,
heroImg:a.hero_image||'',
});
});
renderHome(curCat);
}).catch(function(){
renderHome(curCat);
});
// Skip intel/feed — RAVEN articles are the primary content now
//
// intel/feed disabled — RAVEN articles are primary content
// Fetch live power scores for sidebar
fetch('/api/influence?top=5').then(r=>r.json()).then(data=>{
if(!Array.isArray(data)||!data.length) return;
const el=document.querySelector('.sw-b .prow')?.parentElement;
if(!el) return;
el.innerHTML=data.map((e,i)=>`
${String(i+1).padStart(2,'0')}
${_esc(e.entity)}
${(e.score||0).toFixed(3)}
`).join('');
}).catch(function(){});
// Fetch live ticker from SSE or signals
fetch('/api/signals/live?limit=8').then(r=>r.json()).then(data=>{
if(!data.signals||!data.signals.length) return;
const tk=document.getElementById('tk');
if(!tk) return;
const items=data.signals.map(s=>{
const tier=s.tier==='high'?'HIGH':s.tier==='emerging'?'EMERGING':'WATCH';
const cls=tier==='HIGH'?'down':tier==='EMERGING'?'em':'';
return `SIGNAL ${_esc((s.topic||'').slice(0,40))} ${tier} `;
});
if(items.length>3) tk.innerHTML=[...items,...items].join('');
}).catch(function(){});
})();
function _esc(s){
if(s==null) return '';
return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');
}
function _timeAgo(d){
const s=Math.floor((Date.now()-new Date(d).getTime())/1000);
if(s<60) return 'just now';
if(s<3600) return Math.floor(s/60)+'m ago';
if(s<86400) return Math.floor(s/3600)+'h ago';
return Math.floor(s/86400)+'d ago';
}
LEADERSCARTEL
© 2026 Power Brand Ca · Vancouver, British Columbia, Canada
Real-time geopolitical intelligence — Intelligence before it becomes news.