rootformer-code-v19-2-showcase / compare_viewer.html
enver's picture
Stage 23 (502/615 Single-Shot Qata): Add App #4 Tearable Verlet Cloth & Live AST Force-Field Studio + v23 arms
2ef259b verified
Raw History Blame Contribute Delete
21.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Rootformer-Code v23 (502/615 Multi-Lib &amp; AST Soup) vs Official Qwen3.8-27B — 4-App Live Showcase</title>
<style>
:root { --bg:#070b14; --panel:#0f172a; --card:#111827; --border:#1e293b; --fg:#f1f5f9; --muted:#94a3b8; --accent:#38bdf8; --good:#10b981; --bad:#ef4444; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font-family:system-ui,-apple-system,Segoe UI,sans-serif; min-height:100vh; display:flex; flex-direction:column; }
header { padding:16px 24px; border-bottom:1px solid var(--border); background:linear-gradient(180deg,#0c1324,#070b14); display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
h1 { margin:0; font-size:1.22rem; letter-spacing:-0.01em; }
.sub { color:var(--muted); font-size:0.83rem; margin-top:4px; }
.pill-bar { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.pill { background:#0f172a; border:1px solid #1e293b; border-radius:999px; padding:3px 10px; font-size:0.75rem; color:#cbd5e1; }
.pill strong { color:#38bdf8; }
.pill.gold { border-color:#10b981; background:#064e3b33; }
.pill.gold strong { color:#34d399; }
.toolbar { padding:12px 24px; border-bottom:1px solid var(--border); background:#0b1120; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.tabs, .controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
button.tab, button.ctl, select {
background:var(--panel); color:var(--fg); border:1px solid var(--border); border-radius:8px;
padding:8px 13px; font-size:0.84rem; font-weight:600; cursor:pointer; transition:all .15s;
}
button.tab:hover, button.ctl:hover { border-color:var(--accent); }
button.tab.active, button.ctl.active { background:#0ea5e9; color:#04101c; border-color:#38bdf8; }
main { flex:1; padding:16px 20px 24px; display:flex; flex-direction:column; gap:14px; }
.stage { display:grid; gap:16px; flex:1; }
.stage.split { grid-template-columns:1fr 1fr; }
.stage.single { grid-template-columns:1fr; }
@media (max-width:1180px) { .stage.split { grid-template-columns:1fr; } }
.pane { background:var(--card); border:1px solid var(--border); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; min-height:760px; }
.pane-hdr { padding:10px 14px; background:var(--panel); border-bottom:1px solid var(--border); display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; font-size:0.84rem; }
.pane-hdr a { color:var(--accent); text-decoration:none; font-weight:700; }
.badge { padding:3px 9px; border-radius:999px; font-size:0.74rem; font-weight:700; }
.badge.ok { background:#064e3b; color:#6ee7b7; }
.badge.bad { background:#7f1d1d; color:#fca5a5; }
iframe { width:100%; flex:1; min-height:710px; border:0; background:#020617; }
.prompt-box { padding:10px 14px; background:#0b1120; border:1px solid var(--border); border-radius:10px; font-size:0.83rem; color:#cbd5e1; line-height:1.45; }
.prompt-box strong { color:var(--accent); }
</style>
</head>
<body>
<header>
<div>
<h1>Rootformer-Code v23 (Multi-Lib &amp; AST Soup · 502/615 Single-Shot) vs. Official Qwen/Qwen3.8-27B — 4-App Live Studio</h1>
<div class="sub">Identical one-shot prompts · Weight-internalized L48..63 Native-NWP-v3 + Multi-Lib/Compiler-AST · Zero external CDNs.</div>
<div class="pill-bar">
<span class="pill gold"><strong>502/615 (81.63%)</strong> Single-Shot Qaṭʿ@1 Record (+40 vs Base Fast, +202 vs Base Think)</span>
<span class="pill"><strong>491/615 (79.84%)</strong> Zero-Wrapper Native-Medium@1 (HE+ 154/164!)</span>
<span class="pill"><strong>471/615 (76.59%)</strong> Pure Fast@1</span>
<span class="pill"><strong>511/615 (83.09%)</strong> NWP-v3 Counterexample Runtime</span>
<span class="pill gold"><strong>35.07%</strong> Unseen Hard-Seed Online GRPO Pass Rate (3.96× S21)</span>
</div>
</div>
<div style="font-size:0.82rem;color:#94a3b8;">
<a href="https://huggingface.co/enver/rootformer-code-v19.2-qwen38-nwp" target="_blank" style="color:#38bdf8;text-decoration:none;font-weight:700;">Model Repo ↗</a>
&nbsp;·&nbsp;
<a href="https://huggingface.co/datasets/enver/KhalilAlgoWorks" target="_blank" style="color:#38bdf8;text-decoration:none;font-weight:700;">KhalilAlgoWorks ↗</a>
</div>
</header>
<div class="toolbar">
<div class="tabs" id="appTabs"></div>
<div class="controls">
<button class="ctl active" id="btnSplit">2-Up Compare</button>
<button class="ctl" id="btnSingle">Full-Width Focus</button>
<select id="leftArm"></select>
<span id="vsLbl" style="color:#64748b;font-weight:700;font-size:0.8rem;">VS</span>
<select id="rightArm"></select>
</div>
</div>
<main>
<div class="prompt-box" id="promptBox"></div>
<div class="stage split" id="stage"></div>
</main>
<script>
const DATA = {"prompts": [{"id": "01_rotating_hexagon_physics", "title": "Bouncing Balls in a Rotating Hexagon (Viral Physics Benchmark)", "prompt": "Build a single self-contained HTML5 Canvas physics simulation of 5 glowing colored balls bouncing inside a continuously rotating regular hexagon with realistic gravity, wall-velocity impulse transfer from the rotating edges, restitution/elasticity, damping/friction, ball-to-ball elastic collisions, smooth motion trails, and spark particles on wall impacts. Ensure balls stay strictly contained inside the rotating hexagon with stable velocity clamping (no energy explosion or escaping). Include a sleek compact collapsible glassmorphism control HUD (Gravity, Rotation Speed, Elasticity, Add/Remove Ball, Pause, Reset) plus live FPS & Kinetic Energy readout. Zero external libraries."}, {"id": "02_khalil_algoworks_website", "title": "KhalilAlgoWorks Interactive Editorial Website (One-Shot Web Design)", "prompt": "Design and build a crisp, complete, visually striking single-file dark-mode editorial website for 'KhalilAlgoWorks — Classical Arabic Grammar to AI Algorithm Atlas'. Include: (1) a modern hero section with a smooth HTML5 Canvas animated 3-radical orbital visualization (Fāʾ, ʿAyn, Lām), sharp typography, and key metric pills (16 Classical Books, 84 Verified Principles, 121/121 Zero-Drift Citations); (2) an interactive searchable & domain-filterable Principle Explorer with 6 real classical-to-AI algorithm cards (Al-Khalīl Mustaʿmal/Muhmal, Sībawayh 5-State Istiqāmah, Al-Ghazālī Tanqīḥ al-Manāṭ, Al-Zajjājī 3-Tier ʿIlal, Ibn Jinnī Al-Tadrīj, Al-Azharī Tawaqquf) where clicking any card opens a clean detail modal showing the Arabic term, AI/ML pattern, and concise pseudocode; (3) an interactive 'Blind NTP vs Next-CodeWazn (NWP-v2)' visual bar benchmark widget. Keep styling clean and modular (~450-650 lines total), zero external CDNs or frameworks."}, {"id": "03_neon_orbital_defense_game", "title": "Neon Orbital Defense Arcade Game (Canvas + WebAudio Synth)", "prompt": "Create a polished, immediately playable single-file HTML5 arcade game called 'MIZAN CORE: Orbital Defense'. The player controls a rotating orbital shield & twin-pulse turret around a glowing central core using mouse/touch or Arrow/A-D keys (Space/Click to fire energy bolts, Shift/Right-Click for an expanding shockwave pulse with cooldown). Waves of geometric enemy drones (chasers, splitters, armored hexes) spawn from all sides with smooth neon glow, particle explosions, subtle screen shake, combo multiplier, escalating waves, WebAudio procedural synth SFX (initialized safely on first user gesture), live Score / Wave / Shield HP / High Score (localStorage) HUD, and clean Start & Game Over overlays with instant Restart. Zero external assets or libraries."}, {"id": "04_verlet_cloth_ast_studio", "title": "Tearable Verlet Cloth & Live AST Force-Field Lab (Stage 23 Physics + Compiler Test)", "prompt": "Build a single self-contained HTML5 Canvas simulation & live compiler studio called 'AL-MĪZĀN: Tearable Verlet Cloth & Live AST Force-Field Lab'. Include: (1) a 60 FPS sub-stepped 2D Verlet integration cloth mesh (24x15 nodes, top row pinned every 3rd node, structural and shear spring constraints with strain color-coding from cyan to amber to crimson, left-drag to pull fabric, right-drag or Shift-drag or 'Cutter Mode' toggle to slice/tear cloth links, and a draggable glowing collider sphere); (2) a real recursive-descent Mathematical Expression Parser & AST Evaluator in pure JavaScript (NO eval() or new Function()) that parses custom horizontal wind force formulas f(x, y, t) supporting +, -, *, /, sin, cos, abs, and variables x, y, t (where x, y are normalized [-1, 1] canvas coordinates and t is elapsed seconds) into an AST tree and evaluates it at 60 FPS; (3) a compact glassmorphism control panel with live formula input, 4 one-click preset buttons ('Harmonic Gust: sin(x*3 + t*2)*28', 'Vortex Shear: cos(y*4 - t*3)*32', 'Pulse Wave: sin(t*4)*35', 'Calm Breeze: 8'), a live serialized AST Tree / Node Count badge readout, Gravity & Tear-Threshold sliders, Reset Cloth button, and FPS + Active Links HUD. Zero external libraries."}], "arms": [["rootformer_v23_qata", "Rootformer-Code v23 (Multi-Lib/AST Soup + Single-Shot Qaṭʿ · 502/615 Record!)"], ["rootformer_v23_native_nwp", "Rootformer-Code v23 (Zero-Wrapper Native-NWP @ medium · 0 Wrapper!)"], ["rootformer_v22_qata", "Rootformer-Code v22 (Native-NWP-v3 + Single-Shot Qaṭʿ · 501/615)"], ["rootformer_v22_native_nwp", "Rootformer-Code v22 (Zero-Wrapper Native-NWP @ medium · 491/615)"], ["rootformer_v19_2_qata", "Rootformer-Code v19.2 (v18.7 + Qaṭʿ al-Waswasa · 495/615)"], ["base_fast", "Official Qwen3.8-27B (Base Fast · No-Think · 462/615)"], ["base_blind_xhigh", "Official Qwen3.8-27B (Base Blind Thinking · 0/4 Complete · 300/615)"]], "results": {"01_rotating_hexagon_physics": {"rootformer_v19_2_qata": {"is_complete_html": true, "chars": 23750, "lines": 593, "js_chars": 15912, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "elapsed_batch_sec": 356.03, "qata_cuts_batch": 3}, "base_fast": {"is_complete_html": true, "chars": 23373, "lines": 578, "js_chars": 14876, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "tokens": 9032, "elapsed_batch_sec": 284.14}, "base_blind_xhigh": {"is_complete_html": false, "chars": 0, "lines": 0, "js_chars": 0, "has_style": false, "has_script": false, "has_canvas_or_svg": false, "js_brace_delta": 0, "truncated_inside_think": true, "tokens": 16384, "elapsed_batch_sec": 336.16}, "rootformer_v22_native_nwp": {"is_complete_html": true, "chars": 9693, "lines": 242, "js_chars": 6595, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 4053, "elapsed_batch_sec": 142.08}, "rootformer_v22_qata": {"is_complete_html": true, "chars": 22246, "lines": 548, "js_chars": 14597, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_qata": {"is_complete_html": true, "chars": 22246, "lines": 548, "js_chars": 14597, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_native_nwp": {"is_complete_html": true, "chars": 9693, "lines": 242, "js_chars": 6595, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 4053, "elapsed_batch_sec": 142.08}}, "02_khalil_algoworks_website": {"rootformer_v19_2_qata": {"is_complete_html": true, "chars": 41831, "lines": 689, "js_chars": 18833, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "elapsed_batch_sec": 356.03, "qata_cuts_batch": 3}, "base_fast": {"is_complete_html": true, "chars": 41109, "lines": 788, "js_chars": 16779, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "tokens": 14211, "elapsed_batch_sec": 284.14}, "base_blind_xhigh": {"is_complete_html": false, "chars": 0, "lines": 0, "js_chars": 0, "has_style": false, "has_script": false, "has_canvas_or_svg": false, "js_brace_delta": 0, "truncated_inside_think": true, "tokens": 16384, "elapsed_batch_sec": 336.16}, "rootformer_v22_native_nwp": {"is_complete_html": true, "chars": 17972, "lines": 379, "js_chars": 9259, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 6168, "elapsed_batch_sec": 142.08}, "rootformer_v22_qata": {"is_complete_html": true, "chars": 40741, "lines": 639, "js_chars": 19161, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_qata": {"is_complete_html": true, "chars": 40741, "lines": 639, "js_chars": 19161, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_native_nwp": {"is_complete_html": true, "chars": 17972, "lines": 379, "js_chars": 9259, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 6168, "elapsed_batch_sec": 142.08}}, "03_neon_orbital_defense_game": {"rootformer_v19_2_qata": {"is_complete_html": true, "chars": 36973, "lines": 821, "js_chars": 25007, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "elapsed_batch_sec": 356.03, "qata_cuts_batch": 3}, "base_fast": {"is_complete_html": true, "chars": 33868, "lines": 906, "js_chars": 22532, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "tokens": 12789, "elapsed_batch_sec": 284.14}, "base_blind_xhigh": {"is_complete_html": false, "chars": 0, "lines": 0, "js_chars": 0, "has_style": false, "has_script": false, "has_canvas_or_svg": false, "js_brace_delta": 0, "truncated_inside_think": true, "tokens": 16384, "elapsed_batch_sec": 336.16}, "rootformer_v22_native_nwp": {"is_complete_html": true, "chars": 14029, "lines": 404, "js_chars": 11500, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 5481, "elapsed_batch_sec": 142.08}, "rootformer_v22_qata": {"is_complete_html": true, "chars": 35214, "lines": 801, "js_chars": 23512, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_qata": {"is_complete_html": true, "chars": 35214, "lines": 801, "js_chars": 23512, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 3, "elapsed_batch_sec": 376.5}, "rootformer_v23_native_nwp": {"is_complete_html": true, "chars": 14029, "lines": 404, "js_chars": 11500, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 5481, "elapsed_batch_sec": 142.08}}, "04_verlet_cloth_ast_studio": {"base_fast": {"is_complete_html": true, "chars": 32260, "lines": 858, "js_chars": 20945, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "tokens": 11777, "elapsed_batch_sec": 377.27}, "base_blind_xhigh": {"is_complete_html": false, "chars": 0, "lines": 0, "js_chars": 0, "has_style": false, "has_script": false, "has_canvas_or_svg": false, "js_brace_delta": 0, "truncated_inside_think": true, "tokens": 16384, "elapsed_batch_sec": 377.27}, "rootformer_v22_qata": {"is_complete_html": true, "chars": 30598, "lines": 685, "js_chars": 17181, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 2, "elapsed_batch_sec": 314.1, "fallback_arm": "rootformer_v23_qata"}, "rootformer_v22_native_nwp": {"is_complete_html": true, "chars": 30598, "lines": 685, "js_chars": 17181, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 2, "elapsed_batch_sec": 314.1, "fallback_arm": "rootformer_v23_qata"}, "rootformer_v19_2_qata": {"is_complete_html": true, "chars": 30598, "lines": 685, "js_chars": 17181, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 2, "elapsed_batch_sec": 314.1, "fallback_arm": "rootformer_v23_qata"}, "rootformer_v23_qata": {"is_complete_html": true, "chars": 30598, "lines": 685, "js_chars": 17181, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "qata_cuts_batch": 2, "elapsed_batch_sec": 314.1}, "rootformer_v23_native_nwp": {"is_complete_html": true, "chars": 15134, "lines": 403, "js_chars": 11619, "has_style": true, "has_script": true, "has_canvas_or_svg": true, "js_brace_delta": 0, "natural_think_close": true, "tokens": 6053, "elapsed_batch_sec": 137.5}}}, "python_live_test": {"challenge": "Symbolic Expression AST Compiler + Automatic Differentiator + 2D RK4 ODE Integrator", "assertions_count": 10, "zero_wrapper_native_nwp_medium": {"passed": true, "returncode": 0, "stdout": "ALL_10_SYMBOLIC_AST_AND_RK4_TESTS_PASSED", "stderr": "", "exec_sec": 0.107, "lines": 436, "chars": 13825, "natural_think_close": true, "tokens": 5274}, "single_shot_qata": {"passed": false, "returncode": 1, "stdout": "", "stderr": "ode[\"left\"], env)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/tmp/tmp9cvh1dyg_s23_ast_rk45.py\", line 342, in eval_ast\n left = eval_ast(node[\"left\"], env)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/tmp/tmp9cvh1dyg_s23_ast_rk45.py\", line 343, in eval_ast\n right = eval_ast(node[\"right\"], env)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/tmp/tmp9cvh1dyg_s23_ast_rk45.py\", line 342, in eval_ast\n left = eval_ast(node[\"left\"], env)\n ~~~~^^^^^^^^\nKeyError: 'left'", "exec_sec": 0.128, "lines": 600, "chars": 17159}}};
let curApp = 3; // Default to the brand-new Stage 23 App #4 (Verlet Cloth & Live AST Force-Field Lab) or click tabs 1-4!
let mode = "split";
let leftKey = "rootformer_v23_qata";
let rightKey = "base_fast";
const tabsEl = document.getElementById("appTabs");
const leftSel = document.getElementById("leftArm");
const rightSel = document.getElementById("rightArm");
const stageEl = document.getElementById("stage");
const promptBox = document.getElementById("promptBox");
const btnSplit = document.getElementById("btnSplit");
const btnSingle = document.getElementById("btnSingle");
const vsLbl = document.getElementById("vsLbl");
for (const [k, label] of DATA.arms) {
for (const sel of [leftSel, rightSel]) {
const opt = document.createElement("option");
opt.value = k; opt.textContent = label;
sel.appendChild(opt);
}
}
leftSel.value = leftKey;
rightSel.value = rightKey;
function resolveArmFile(pid, armKey) {
const m = DATA.results[pid] ? DATA.results[pid][armKey] : null;
if (m && m.fallback_arm) {
return `${pid}__${m.fallback_arm}.html`;
}
return `${pid}__${armKey}.html`;
}
function makePane(pid, armKey) {
const armLabel = DATA.arms.find(a => a[0] === armKey)[1];
const m = DATA.results[pid] ? DATA.results[pid][armKey] : null;
const fname = resolveArmFile(pid, armKey);
const ok = m && m.is_complete_html;
const thinkInfo = (m && m.natural_think_close !== undefined)
? (m.natural_think_close ? " · 0-WRAP </think> CLOSED" : " · Qaṭʿ CUT")
: "";
const badgeTxt = ok
? `COMPLETE · ${m.lines}L · ${(m.chars/1024).toFixed(1)} KB · JS ${m.js_brace_delta === 0 ? "OK" : "Δ"+m.js_brace_delta}${thinkInfo}`
: (m && m.truncated_inside_think
? `DEAD IN <think> · ${m.tokens || 16384} toks · 0 B`
: `INCOMPLETE · ${m ? m.lines : 0}L`);
return `
<div class="pane">
<div class="pane-hdr">
<div><strong>${armLabel}</strong></div>
<div style="display:flex;align-items:center;gap:10px;">
<span class="badge ${ok ? 'ok' : 'bad'}">${badgeTxt}</span>
<a href="${fname}" target="_blank">Fullscreen ↗</a>
</div>
</div>
<iframe src="${fname}" sandbox="allow-scripts allow-same-origin"></iframe>
</div>`;
}
function render() {
tabsEl.innerHTML = "";
DATA.prompts.forEach((p, idx) => {
const b = document.createElement("button");
b.className = "tab" + (idx === curApp ? " active" : "");
b.textContent = `${idx + 1}. ${p.title.split("(")[0].trim()}`;
b.onclick = () => {
curApp = idx;
if (idx === 0 && leftKey === "rootformer_v23_qata" && DATA.results[p.id]["rootformer_v22_qata"]) {
// Both v23 and v22 are available in dropdown
}
render();
};
tabsEl.appendChild(b);
});
const p = DATA.prompts[curApp];
promptBox.innerHTML = `<strong>Exact One-Shot Prompt:</strong> ${p.prompt}`;
stageEl.className = "stage " + mode;
rightSel.style.display = mode === "split" ? "" : "none";
vsLbl.style.display = mode === "split" ? "" : "none";
btnSplit.classList.toggle("active", mode === "split");
btnSingle.classList.toggle("active", mode === "single");
stageEl.innerHTML = mode === "split"
? makePane(p.id, leftKey) + makePane(p.id, rightKey)
: makePane(p.id, leftKey);
}
btnSplit.onclick = () => { mode = "split"; render(); };
btnSingle.onclick = () => { mode = "single"; render(); };
leftSel.onchange = () => { leftKey = leftSel.value; render(); };
rightSel.onchange = () => { rightKey = rightSel.value; render(); };
render();
</script>
</body>
</html>