betterwithage commited on
Commit
7554df8
·
verified ·
1 Parent(s): 28065bf

feat(domain-v4): publish panels.html from szl-holdings/a11oy@41042b47cb6fa5e32745c9d4b7275faa3bf40e3d

Browse files
Files changed (1) hide show
  1. panels.html +48 -0
panels.html CHANGED
@@ -7,8 +7,56 @@
7
  .tape>.illus{grid-column:1/-1;margin:10px 12px 9px}
8
  :root{--bg:#030403;--panel:rgba(7,10,7,.95);--muted:#9ca892;--accent:#f6c85f;--accent2:#7cf29a}.domain{margin-top:48px;display:grid;grid-template-columns:1fr;gap:12px}.tape{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}.quote{background:#050805;padding:14px}.quote b{display:block;font:900 18px ui-monospace,monospace;color:var(--accent2)}.quote span{font:700 10px ui-monospace,monospace;color:var(--muted)}.matrix{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:12px}.ledger{font:12px ui-monospace,monospace}.row{display:grid;grid-template-columns:1.2fr .7fr .7fr .8fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}.row b{color:var(--accent)}.stress{display:grid;gap:10px}.bar{display:grid;grid-template-columns:90px 1fr 50px;gap:8px;align-items:center}.bar i{display:block;block-size:8px;background:linear-gradient(90deg,var(--accent2),var(--accent));border-radius:9px}@media(max-width:850px){.tape{grid-template-columns:1fr 1fr}.matrix{grid-template-columns:1fr}.row{grid-template-columns:1fr 1fr}}
9
  .finance-desk{margin-top:32px;display:grid;gap:16px;min-width:0}.finance-desk *{box-sizing:border-box;min-width:0}.finance-desk .fin-head{display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;align-items:center}.finance-desk h2{margin:0;font-size:clamp(22px,4vw,34px)}.finance-desk h3{font-size:18px;margin:0 0 12px}.finance-desk .fin-note{font-size:14px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}.finance-desk .fin-state{font:700 12px ui-monospace,monospace;letter-spacing:.08em;border:1px solid var(--line);padding:10px;overflow-wrap:anywhere}.finance-desk .fin-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.4fr);gap:16px}.finance-desk .fin-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:16px 0}.finance-desk label{display:block;font-size:14px;line-height:1.6}.finance-desk input,.finance-desk select{display:block;width:100%;max-width:100%;min-height:44px;background:#0b1119;color:var(--text,#edf3ff);border:1px solid #50637d;border-radius:6px;padding:10px;font-size:16px}.finance-desk button{min-width:44px;min-height:44px;white-space:normal}.finance-desk button:disabled{opacity:.65;cursor:not-allowed}.finance-desk .fin-actions{display:flex;flex-wrap:wrap;gap:10px}.finance-desk :focus-visible{outline:3px solid var(--accent,#a6c8ff);outline-offset:3px}.finance-desk .fin-scroll{overflow:auto;max-width:100%;border:1px solid var(--line)}.finance-desk table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}.finance-desk th,.finance-desk td{padding:10px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.finance-desk summary{min-height:44px;padding:12px;cursor:pointer}.finance-desk caption{padding:10px;text-align:left;line-height:1.5}.finance-desk svg{display:block;width:100%;height:auto;max-height:280px;border:1px solid var(--line);background:linear-gradient(130deg,rgba(86,136,255,.09),rgba(136,80,255,.04))}.finance-desk .fin-provenance{white-space:pre-wrap;overflow-wrap:anywhere;max-height:380px;overflow:auto;font-size:12px;line-height:1.6}.finance-desk .fin-instrument{min-height:170px;background:radial-gradient(ellipse at 30% 0,rgba(94,143,255,.13),transparent 70%)}.finance-desk [hidden]{display:none!important}@media(max-width:800px){.finance-desk .fin-grid{grid-template-columns:1fr}.finance-desk th,.finance-desk td{padding:6px}}@media(prefers-reduced-motion:reduce){.finance-desk *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){.finance-desk input,.finance-desk select,.finance-desk button,.finance-desk svg{border:1px solid CanvasText}.finance-desk polyline{stroke:CanvasText!important}}
 
 
10
  </style></head>
11
  <body><main class="shell"><header class="top"><div class="brand">SZL HOLDINGS / PURIQ FINANCE</div><div class="mono">DOMAIN EXPERIENCE V4 · SOURCE BOUND</div></header><section style="margin-top:clamp(52px,9vw,112px)"><div class="eyebrow">FINANCIAL INTELLIGENCE</div><h1>PURIQ Finance</h1><p class="lede">Provenance-first financial signal and decision console. One governed runtime underneath; a domain-native workbench above it. Observed evidence, modeled analysis, human authority, and audit receipts remain separate states.</p><div class="flow"><span>INGEST</span><span>PRICE</span><span>STRESS</span><span>DECIDE</span><span>AUDIT</span></div></section>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <section id="fin-desk" class="finance-desk" data-szl-finance-workspace="1" aria-labelledby="fin-title">
13
  <div class="panel fin-head"><div><div class="mono">PURIQ / SOURCE WORKBENCH</div><h2 id="fin-title">Inspect the evidence before the thesis.</h2></div><button id="fin-refresh" type="button">Refresh source status</button></div>
14
  <div class="panel"><p id="fin-registry-state" class="fin-state" role="status">NOT PROBED</p><p class="fin-note">Configuration is not connectivity. Status describes the last request for an adapter, not every market or instrument. Source revision: <span id="fin-revision">UNAVAILABLE</span>.</p><details><summary>Inspect the 16-source access register</summary><div class="fin-scroll" tabindex="0" role="region" aria-label="Provider status table"><table><caption>Canonical market-data adapters. Owner-only sources are not exposed by this public Space.</caption><thead><tr><th scope="col">Source</th><th scope="col">Last-request state</th><th scope="col">Access</th></tr></thead><tbody id="fin-provider-body"></tbody></table></div></details></div>
 
7
  .tape>.illus{grid-column:1/-1;margin:10px 12px 9px}
8
  :root{--bg:#030403;--panel:rgba(7,10,7,.95);--muted:#9ca892;--accent:#f6c85f;--accent2:#7cf29a}.domain{margin-top:48px;display:grid;grid-template-columns:1fr;gap:12px}.tape{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}.quote{background:#050805;padding:14px}.quote b{display:block;font:900 18px ui-monospace,monospace;color:var(--accent2)}.quote span{font:700 10px ui-monospace,monospace;color:var(--muted)}.matrix{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:12px}.ledger{font:12px ui-monospace,monospace}.row{display:grid;grid-template-columns:1.2fr .7fr .7fr .8fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}.row b{color:var(--accent)}.stress{display:grid;gap:10px}.bar{display:grid;grid-template-columns:90px 1fr 50px;gap:8px;align-items:center}.bar i{display:block;block-size:8px;background:linear-gradient(90deg,var(--accent2),var(--accent));border-radius:9px}@media(max-width:850px){.tape{grid-template-columns:1fr 1fr}.matrix{grid-template-columns:1fr}.row{grid-template-columns:1fr 1fr}}
9
  .finance-desk{margin-top:32px;display:grid;gap:16px;min-width:0}.finance-desk *{box-sizing:border-box;min-width:0}.finance-desk .fin-head{display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between;align-items:center}.finance-desk h2{margin:0;font-size:clamp(22px,4vw,34px)}.finance-desk h3{font-size:18px;margin:0 0 12px}.finance-desk .fin-note{font-size:14px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}.finance-desk .fin-state{font:700 12px ui-monospace,monospace;letter-spacing:.08em;border:1px solid var(--line);padding:10px;overflow-wrap:anywhere}.finance-desk .fin-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.4fr);gap:16px}.finance-desk .fin-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:16px 0}.finance-desk label{display:block;font-size:14px;line-height:1.6}.finance-desk input,.finance-desk select{display:block;width:100%;max-width:100%;min-height:44px;background:#0b1119;color:var(--text,#edf3ff);border:1px solid #50637d;border-radius:6px;padding:10px;font-size:16px}.finance-desk button{min-width:44px;min-height:44px;white-space:normal}.finance-desk button:disabled{opacity:.65;cursor:not-allowed}.finance-desk .fin-actions{display:flex;flex-wrap:wrap;gap:10px}.finance-desk :focus-visible{outline:3px solid var(--accent,#a6c8ff);outline-offset:3px}.finance-desk .fin-scroll{overflow:auto;max-width:100%;border:1px solid var(--line)}.finance-desk table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}.finance-desk th,.finance-desk td{padding:10px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.finance-desk summary{min-height:44px;padding:12px;cursor:pointer}.finance-desk caption{padding:10px;text-align:left;line-height:1.5}.finance-desk svg{display:block;width:100%;height:auto;max-height:280px;border:1px solid var(--line);background:linear-gradient(130deg,rgba(86,136,255,.09),rgba(136,80,255,.04))}.finance-desk .fin-provenance{white-space:pre-wrap;overflow-wrap:anywhere;max-height:380px;overflow:auto;font-size:12px;line-height:1.6}.finance-desk .fin-instrument{min-height:170px;background:radial-gradient(ellipse at 30% 0,rgba(94,143,255,.13),transparent 70%)}.finance-desk [hidden]{display:none!important}@media(max-width:800px){.finance-desk .fin-grid{grid-template-columns:1fr}.finance-desk th,.finance-desk td{padding:6px}}@media(prefers-reduced-motion:reduce){.finance-desk *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media(forced-colors:active){.finance-desk input,.finance-desk select,.finance-desk button,.finance-desk svg{border:1px solid CanvasText}.finance-desk polyline{stroke:CanvasText!important}}
10
+
11
+ .fin-research textarea{width:100%;min-height:290px;padding:14px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px;font:inherit;font-size:14px;line-height:1.6;resize:vertical}.fin-research .fin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.fin-research .fin-metric{padding:16px;border:1px solid var(--line)}.fin-research .fin-metric strong{display:block;font-size:28px;margin-top:8px}.fin-research .fin-metric span{font-size:14px;color:var(--muted)}.fin-research .fin-references{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px}.fin-research .fin-reference{border:1px solid var(--line);padding:16px}.fin-research .fin-reference a{font-size:16px;color:var(--accent);text-decoration:underline;text-underline-offset:4px}.fin-research .fin-reference p{font-size:14px;line-height:1.65;color:var(--muted)}.fin-research table{font-size:14px}.fin-research .fin-empty{padding:18px;color:var(--muted);font-size:14px;line-height:1.6}@media(max-width:640px){.fin-research .fin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
12
  </style></head>
13
  <body><main class="shell"><header class="top"><div class="brand">SZL HOLDINGS / PURIQ FINANCE</div><div class="mono">DOMAIN EXPERIENCE V4 · SOURCE BOUND</div></header><section style="margin-top:clamp(52px,9vw,112px)"><div class="eyebrow">FINANCIAL INTELLIGENCE</div><h1>PURIQ Finance</h1><p class="lede">Provenance-first financial signal and decision console. One governed runtime underneath; a domain-native workbench above it. Observed evidence, modeled analysis, human authority, and audit receipts remain separate states.</p><div class="flow"><span>INGEST</span><span>PRICE</span><span>STRESS</span><span>DECIDE</span><span>AUDIT</span></div></section>
14
+ <section class="finance-desk fin-research" id="fin-research" aria-labelledby="fin-research-title">
15
+ <section class="panel"><div class="mono">PURIQ / RESEARCH AUDIT</div><h2 id="fin-research-title">What survives the data checks?</h2><p class="fin-note">Audit an annual panel before using it in a financial thesis. Inspect exclusions, release timing, coverage, and supplied robustness estimates. No model is fitted here.</p>
16
+ <div class="fin-grid"><form id="fin-research-form"><div class="fin-fields"><label for="fin-research-date">As known on<input id="fin-research-date" type="date" value="2024-12-31" required></label></div><label for="fin-research-input">Research packet (JSON)</label><textarea id="fin-research-input" spellcheck="false" maxlength="160000" aria-describedby="fin-research-help"></textarea><p id="fin-research-help" class="fin-note">Up to 160 KB. Each record needs entity, period (year), value, and state: observed, suppressed, missing, or invalid. Add available_at to establish eligibility as of the selected date. Send only data you are authorized to submit.</p><div class="fin-actions"><button type="submit" id="fin-research-run">Audit research packet</button><button type="button" id="fin-research-demo">Load synthetic example</button></div></form>
17
+ <div><p id="fin-research-state" class="fin-state" role="status">SYNTHETIC EXAMPLE / NOT AUDITED</p><p class="fin-note">The example uses fictional entities and estimates. Suppression is never converted into an observed zero. Unknown release dates are excluded from the as-of sample.</p><div id="fin-research-metrics" class="fin-metrics"></div><div id="fin-research-issues" class="fin-empty">Run the audit to inspect the sample.</div><button type="button" id="fin-research-export" disabled>Export evidence packet</button><p class="fin-note">The result is a stateless calculation over caller-supplied records. Export includes your inputs and an unsigned integrity receipt. It does not establish source authenticity or causal validity.</p></div></div>
18
+ </section>
19
+ <div class="fin-grid"><section class="panel"><h3>Sample attrition</h3><div id="fin-research-attrition" class="fin-scroll" tabindex="0" role="region" aria-label="Sample attrition table"><p class="fin-empty">No audit yet.</p></div></section><section class="panel"><h3>Robustness comparison</h3><p class="fin-note">Reported estimates only. A sign change or fewer than 30 declared clusters prompts review; the threshold is a screening heuristic, not a validity test.</p><div id="fin-research-robustness" class="fin-scroll" tabindex="0" role="region" aria-label="Reported robustness table"><p class="fin-empty">No specifications evaluated.</p></div></section></div>
20
+ <section class="panel"><h3>Entity-year coverage</h3><p id="fin-research-coverage-note" class="fin-note">Supply expected_entities, start_year, and end_year to define the intended sample. A sample inferred only from submitted records can hide absent entities.</p><div id="fin-research-coverage" class="fin-scroll" tabindex="0" role="region" aria-label="Entity year coverage table"></div><details><summary>Full audit and integrity receipt</summary><pre id="fin-research-evidence" class="fin-provenance">No audit yet.</pre></details></section>
21
+ <section class="panel"><h3>Research references</h3><p class="fin-note">Selected public primary sources reviewed on 7 October 2026. These inform the design; the authors and projects do not endorse this product.</p><div class="fin-references">
22
+ <article class="fin-reference"><a href="https://docs.openbb.co/odp/v4/python/developer/standardization" target="_blank" rel="noopener noreferrer">OpenBB</a><p>Normalize schemas while preserving the difference between missing values and real zeros.</p></article><article class="fin-reference"><a href="https://www.quantconnect.com/docs/v2/writing-algorithms/importing-data/streaming-data/custom-securities/key-concepts" target="_blank" rel="noopener noreferrer">QuantConnect / LEAN</a><p>Use the date information became available to guard against look-ahead bias.</p></article><article class="fin-reference"><a href="https://github.com/microsoft/qlib" target="_blank" rel="noopener noreferrer">Microsoft Qlib</a><p>Make data preparation, evaluation, and data health checks explicit parts of research.</p></article><article class="fin-reference"><a href="https://fred.stlouisfed.org/docs/api/fred/realtime_period.html" target="_blank" rel="noopener noreferrer">FRED / ALFRED</a><p>Historical vintages describe what was known at the time. This audit checks supplied release dates; it does not fetch vintages.</p></article><article class="fin-reference"><a href="https://www.bls.gov/cew/questions-and-answers.htm" target="_blank" rel="noopener noreferrer">BLS QCEW</a><p>Suppressed employment and wage fields can be zero-filled. Interpret disclosure flags before classifying a value.</p></article><article class="fin-reference"><a href="https://www.irs.gov/statistics/soi-tax-stats-migration-data" target="_blank" rel="noopener noreferrer">IRS migration data</a><p>Retain period-specific documentation when comparing tax-return migration across years.</p></article><article class="fin-reference"><a href="https://www.sec.gov/search-filings/edgar-application-programming-interfaces" target="_blank" rel="noopener noreferrer">SEC EDGAR</a><p>Keep filing dates, units, and reporting periods with financial observations.</p></article><article class="fin-reference"><a href="https://economics.stanford.edu/people/susan-athey" target="_blank" rel="noopener noreferrer">Susan Athey</a><p>Stanford economist whose work connects economics and machine learning. Reading focus: identification and research design.</p></article><article class="fin-reference"><a href="https://scholars.duke.edu/person/andrew.patton" target="_blank" rel="noopener noreferrer">Andrew Patton</a><p>Duke financial econometrician. Reading focus: forecast evaluation and volatility.</p></article><article class="fin-reference"><a href="https://arxiv.org/abs/1607.00699" target="_blank" rel="noopener noreferrer">Athey &amp; Imbens</a><p>Applied econometrics: causality, policy evaluation, sensitivity, and robustness.</p></article></div></section></section>
23
+ <script>
24
+ (()=>{'use strict';
25
+ const $=id=>document.getElementById(id);let accepted=null,epoch=0,controller=null;
26
+ const example={expected_entities:['County A','County B','County C'],start_year:2022,end_year:2023,records:[
27
+ {entity:'County A',period:2022,value:0,state:'observed',available_at:'2023-06-01',group:'Large'},
28
+ {entity:'County A',period:2023,value:12,state:'observed',available_at:'2024-06-01',group:'Large'},
29
+ {entity:'County B',period:2022,value:0,state:'suppressed',available_at:'2023-06-01',group:'Small'},
30
+ {entity:'County B',period:2023,value:null,state:'missing',group:'Small'},
31
+ {entity:'County C',period:2022,value:8,state:'observed',group:'Small'},
32
+ {entity:'County C',period:2023,value:9,state:'observed',available_at:'2025-02-01',group:'Small'}],
33
+ specifications:[{label:'Synthetic baseline',estimate:0.2,standard_error:0.1,n:60,clusters:4},{label:'Synthetic alternate trend',estimate:-0.1,standard_error:0.15,n:48,clusters:4}]};
34
+ function text(tag,value){const e=document.createElement(tag);e.textContent=String(value);return e;}
35
+ function empty(id,message){$(id).replaceChildren(text('p',message));}
36
+ function clear(){accepted=null;$('fin-research-export').disabled=true;$('fin-research-metrics').replaceChildren();empty('fin-research-attrition','No current audit.');empty('fin-research-robustness','No current comparison.');$('fin-research-coverage').replaceChildren();$('fin-research-evidence').textContent='No current evidence.';$('fin-research-issues').textContent='Run the audit to inspect the sample.';$('fin-research-coverage-note').textContent='Coverage is calculated after you submit the research packet.';}
37
+ function invalidate(){epoch++;if(controller)controller.abort();clear();$('fin-research-state').textContent='INPUTS CHANGED / NOT AUDITED';}
38
+ function demo(){invalidate();$('fin-research-input').value=JSON.stringify(example,null,2);$('fin-research-date').value='2024-12-31';$('fin-research-state').textContent='SYNTHETIC EXAMPLE / NOT AUDITED';}
39
+ function table(id,heads,rows){const t=document.createElement('table'),head=document.createElement('thead'),tr=document.createElement('tr');heads.forEach(h=>{const th=text('th',h);th.scope='col';tr.append(th);});head.append(tr);t.append(head);const body=document.createElement('tbody');for(const row of rows){const tr=document.createElement('tr');for(const item of row)tr.append(text('td',item===null||item===undefined?'Unknown':item));body.append(tr);}t.append(body);$(id).replaceChildren(t);}
40
+ function show(body){const r=body.result,s=r.summary;
41
+ for(const [label,value] of [['Submitted',s.total_records],['Eligible as of date',s.kept_records],['Excluded',s.excluded_records],['Observed zeros kept',s.kept_zero_records]]){const card=document.createElement('div');card.className='fin-metric';card.append(text('span',label),text('strong',value));$('fin-research-metrics').append(card);}
42
+ $('fin-research-state').textContent=(r.audit_accepted?'AUDITED':'REVIEW REQUIRED')+' / CALLER-SUPPLIED DATA / '+r.as_of;
43
+ const issues=r.issues.map(i=>i.code.replaceAll('_',' ')+(i.count===undefined?'':' ('+i.count+')'));$('fin-research-issues').textContent=issues.length?issues.join(' · '):'No configured audit flags. This does not establish source validity.';
44
+ table('fin-research-attrition',['Group','Submitted','Kept','Excluded'],r.attrition.groups.map(g=>[g.group,g.total_records,g.kept_records,g.excluded_records]));
45
+ if(r.robustness.specifications.length){table('fin-research-robustness',['Reported specification','Estimate','Std. error','N / clusters'],r.robustness.specifications.map(x=>[x.label,x.estimate,x.standard_error,(x.n??'?')+' / '+(x.clusters??'?')]));const p=text('p',r.robustness.flags.length?r.robustness.flags.map(f=>f.code.replaceAll('_',' ')+(f.label?' — '+f.label:'')).join(' · '):'No configured robustness flags. Estimates have not been recomputed.');p.className='fin-note';$('fin-research-robustness').append(p);}else{empty('fin-research-robustness','No estimates supplied. No regression has been run.');}
46
+ const c=r.coverage;$('fin-research-coverage-note').textContent=c.recorded_cells+' recorded / '+c.expected_cells+' expected cells; '+c.absent_cells+' absent; '+c.eligible_cells+' eligible as of date. Grid: '+c.grid_origin+'. Showing '+Math.min(c.cells.length,150)+' cells. Export contains the full audit within documented bounds.';
47
+ table('fin-research-coverage',['Entity','Year','Data state','As-of eligible'],c.cells.slice(0,150).map(x=>[x.entity,x.period,x.state,x.eligible?'Yes':'No']));
48
+ $('fin-research-evidence').textContent=JSON.stringify(body,null,2);$('fin-research-export').disabled=false;accepted=body;
49
+ }
50
+ async function read(response){if(!(response.headers.get('content-type')||'').startsWith('application/json'))throw Error('INVALID RESPONSE');const reader=response.body.getReader(),chunks=[];let total=0;for(;;){const part=await reader.read();if(part.done)break;total+=part.value.length;if(total>4000000){await reader.cancel();throw Error('RESPONSE TOO LARGE');}chunks.push(part.value);}const all=new Uint8Array(total);let pos=0;for(const chunk of chunks){all.set(chunk,pos);pos+=chunk.length;}return JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(all));}
51
+ $('fin-research-form').addEventListener('submit',async event=>{event.preventDefault();invalidate();const serial=epoch;let payload,raw;try{const input=$('fin-research-input').value;for(const match of input.matchAll(/"(?:\\.|[^"\\])*"|(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)/g)){if(match[1]!==undefined){const n=Number(match[1]);if(!Number.isFinite(n)||(n===0&&/[1-9]/.test(match[1].split(/[eE]/)[0])))throw Error();}}payload=JSON.parse(input);if(!payload||Array.isArray(payload)||typeof payload!=='object')throw Error();payload.as_of=$('fin-research-date').value;raw=JSON.stringify(payload);if(new TextEncoder().encode(raw).length>160000)throw Error();}catch(e){$('fin-research-state').textContent='INVALID JSON PACKET / LIMIT 160 KB';return;}
52
+ controller=new AbortController();const timer=setTimeout(()=>controller.abort(),20000);$('fin-research-state').textContent='AUDITING';
53
+ try{const response=await fetch('/api/finance/research/audit',{method:'POST',credentials:'omit',cache:'no-store',redirect:'error',signal:controller.signal,headers:{Accept:'application/json','Content-Type':'application/json'},body:raw}),body=await read(response);if(serial!==epoch)return;if(!response.ok||body.ok!==true)throw Error(typeof body.error==='string'&&/^[A-Z_]+$/.test(body.error)?body.error:'UNAVAILABLE');
54
+ if(body.schema!=='szl.finance.research/v1'||body.execution_enabled!==false||body.operation!=='research-audit'||body.truth_label!=='MODELED'||body.receipt?.signing!=='UNSIGNED_HONEST'||body.receipt?.signed!==false||!body.result||body.result.schema!=='szl.finance.research-audit/v1'||body.result.as_of!==payload.as_of)throw Error('INVALID CONTRACT');show(body);
55
+ }catch(e){if(serial===epoch){clear();$('fin-research-state').textContent='BLOCKED / '+(e.name==='AbortError'?'DEADLINE':e.message);}}finally{clearTimeout(timer);}});
56
+ $('fin-research-form').addEventListener('input',invalidate);$('fin-research-demo').addEventListener('click',demo);$('fin-research-export').addEventListener('click',()=>{if(!accepted)return;const url=URL.createObjectURL(new Blob([JSON.stringify(accepted,null,2)+'\n'],{type:'application/json'})),a=document.createElement('a');a.href=url;a.download='puriq-research-audit.json';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);});window.addEventListener('pagehide',invalidate);demo();
57
+ })();
58
+ </script>
59
+
60
  <section id="fin-desk" class="finance-desk" data-szl-finance-workspace="1" aria-labelledby="fin-title">
61
  <div class="panel fin-head"><div><div class="mono">PURIQ / SOURCE WORKBENCH</div><h2 id="fin-title">Inspect the evidence before the thesis.</h2></div><button id="fin-refresh" type="button">Refresh source status</button></div>
62
  <div class="panel"><p id="fin-registry-state" class="fin-state" role="status">NOT PROBED</p><p class="fin-note">Configuration is not connectivity. Status describes the last request for an adapter, not every market or instrument. Source revision: <span id="fin-revision">UNAVAILABLE</span>.</p><details><summary>Inspect the 16-source access register</summary><div class="fin-scroll" tabindex="0" role="region" aria-label="Provider status table"><table><caption>Canonical market-data adapters. Owner-only sources are not exposed by this public Space.</caption><thead><tr><th scope="col">Source</th><th scope="col">Last-request state</th><th scope="col">Access</th></tr></thead><tbody id="fin-provider-body"></tbody></table></div></details></div>