// Chart Growth Hub — Student "Live Trading Room" panel.
// Access model v2 (2026-07-16): the old $88 separate paywall is RETIRED.
// VIP members -> full live access automatically, bundled into VIP tuition. No payment here.
// Free Trial -> limited live access, gated on a manually admin-verified broker account
// (VT Markets, under our IB) + an admin-set session cap. No payment either —
// this is earned by having a funded broker account, not by paying us directly.
// Source of truth: students.vip (VIP) and live_access.broker_verified / session_cap / sessions_used (Free Trial).
// Exposes window.LivePanel.
(function(){
const { useState, useEffect } = React;
// ---- video helpers ----
function ytId(u){ const m=(u||'').match(/(?:youtu\.be\/|v=|embed\/)([\w-]{11})/); return m?m[1]:null; }
function vimeoId(u){ const m=(u||'').match(/vimeo\.com\/(?:video\/)?(\d+)/); return m?m[1]:null; }
function recEmbed(s){
if(s.recording_type==='youtube'){ const id=ytId(s.recording_url); return id?`https://www.youtube.com/embed/${id}?rel=0`:null; }
if(s.recording_type==='vimeo'){ const id=vimeoId(s.recording_url); return id?`https://player.vimeo.com/video/${id}`:null; }
return null;
}
const fmtWhen = d => d ? new Date(d).toLocaleString(undefined,{weekday:'short',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'}) : '';
function Card({children, style}){ return
You joined {used} of {cap} free live session{cap===1?'':'s'} on your Free Trial. Become a VIP member for unlimited live trading, plus the Calculator, Journal, Signals and the Bot.
Trade live with a broker account under Chart Growth Hub
Free Trial members get a limited number of live trading sessions once we've confirmed you have an account under our broker relationship. Submit your account ID below and your coach will verify it.
Join live sessions with the coaches, limited number while on Free TrialFull recordings of every session to rewatchUpgrade to VIP anytime for unlimited live trading