rigorrun 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,6 +32,30 @@ it and reads your system to find out what actually happened.
32
32
  RigorRun: you do the job once → RigorRun writes the tests
33
33
  ```
34
34
 
35
+ ## How strongly was it verified?
36
+
37
+ RigorRun tells you how strongly each result was verified, on every result:
38
+
39
+ - **AUTHORITATIVE** — checked against direct, trusted state.
40
+ - **PARTIAL** — verified through the reads your system exposes. A normal
41
+ connected MCP server, whose state RigorRun reads back through the tools you
42
+ nominated, is **PARTIAL** — the common, honest case, not a defect.
43
+ - **OBSERVATIONAL** — actions were observed but the final state could not be
44
+ independently proven (e.g. a browser with nothing readable attached).
45
+
46
+ `AUTHORITATIVE` is claimed only where RigorRun genuinely has authoritative state
47
+ access. Against your own system the honest label is usually `PARTIAL`, and it is
48
+ shown on the same line as the verdict.
49
+
50
+ ## What it can build depends on your system
51
+
52
+ RigorRun generates every case it can safely and reproducibly verify, and tells
53
+ you what it could not test. A system it can **seed and reset** yields the
54
+ richest suite (boundary and adversarial cases, repeated destructive checks). A
55
+ system without a reset still works, but produces fewer cases, disables repeated
56
+ mutating cases, reports isolation `NONE`, and verifies `PARTIAL`. Best results:
57
+ a staging or scratch environment with read-back and a reset.
58
+
35
59
  ## Why it runs locally
36
60
 
37
61
  Your MCP server, your internal API and your staging box are usually not
@@ -48,7 +72,9 @@ infrastructure, because there is no path by which they could.
48
72
  instance, with a way to reset it.
49
73
  - **An agent.** If it speaks MCP it works unchanged; RigorRun hands it a URL —
50
74
  whether your agent listens on an address or is a command RigorRun runs. If it
51
- does not speak MCP, about ten lines of the agent SDK.
75
+ does not speak MCP, about ten lines of plain HTTP — there is no package to
76
+ install; the protocol is documented at
77
+ [docs/HTTP_AGENT.md](https://github.com/Konuktor/rigorrun/blob/master/docs/HTTP_AGENT.md).
52
78
 
53
79
  ## Commands
54
80
 
@@ -71,7 +97,7 @@ Setting a project up needs the interface; running and gating it does not. It has
71
97
  been used successfully by the people who wrote it and is now looking for people
72
98
  who did not.
73
99
 
74
- Every capability is marked WORKING, PARTIAL or MISSING in
100
+ Every capability is marked WORKING, PARTIAL, DEMO-ONLY, BROKEN or MISSING in
75
101
  [the v1 gap audit](https://github.com/Konuktor/rigorrun/blob/master/docs/V1_GAP_AUDIT.md),
76
102
  with how each one was checked. Read it before you rely on this for anything
77
103
  that matters.
package/dist/rigorrun.mjs CHANGED
@@ -61,7 +61,7 @@ async function writeText(path, text2) {
61
61
  }
62
62
 
63
63
  // src/help.ts
64
- var VERSION = "0.1.0";
64
+ var VERSION = "0.1.1";
65
65
  var HELP = `RigorRun ${VERSION} - acceptance testing for tool-using AI agents.
66
66
 
67
67
  Connect your system. Show RigorRun how one job is done. Connect your agent.
@@ -14840,6 +14840,21 @@ var Runner = class {
14840
14840
  );
14841
14841
  });
14842
14842
  app.use("/api/*", async (context, next) => {
14843
+ const method = context.req.method.toUpperCase();
14844
+ if (method !== "GET" && method !== "HEAD" && method !== "OPTIONS") {
14845
+ const site = context.req.header("sec-fetch-site");
14846
+ const origin = context.req.header("origin");
14847
+ const crossOrigin = site ? site !== "same-origin" && site !== "none" : origin !== void 0 && !originMatchesHost(origin, context.req.header("host"));
14848
+ if (crossOrigin) {
14849
+ return context.json(
14850
+ {
14851
+ error: "cross-origin request refused",
14852
+ detail: "A state-changing request must come from the runner\u2019s own page. This one looks cross-origin, so it was refused even though it carried a session."
14853
+ },
14854
+ 403
14855
+ );
14856
+ }
14857
+ }
14843
14858
  const bearer = context.req.header("authorization")?.replace(/^Bearer\s+/i, "");
14844
14859
  const cookie = cookieValue(context.req.header("cookie"), SESSION_COOKIE);
14845
14860
  if (!this.pairing.authorises(bearer ?? cookie)) {
@@ -15129,6 +15144,14 @@ function hostIsLocal2(host) {
15129
15144
  if (!host) return false;
15130
15145
  return ALLOWED_HOSTS2.has(host.replace(/:\d+$/, "").toLowerCase());
15131
15146
  }
15147
+ function originMatchesHost(origin, host) {
15148
+ if (!host) return false;
15149
+ try {
15150
+ return new URL(origin).host.toLowerCase() === host.toLowerCase();
15151
+ } catch {
15152
+ return false;
15153
+ }
15154
+ }
15132
15155
  function publicTool(tool) {
15133
15156
  return {
15134
15157
  name: tool.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rigorrun",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Acceptance testing for tool-using AI agents. Connect your system, show it one job, connect your agent, get a trustworthy pass or fail.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,u as m}from"./index-DAiDcuMt.js";var h=i();function ee(e){return JSON.stringify(te(e))}function te(e){if(typeof e!=`object`||!e)return typeof e==`number`&&!Number.isFinite(e)?String(e):e;if(Array.isArray(e))return e.map(te);if(e instanceof Date)return e.toISOString();let t=e,n={};for(let e of Object.keys(t).sort()){let r=t[e];r!==void 0&&(n[e]=te(r))}return n}function g(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function _(e){let t=new TextEncoder().encode(e);return g(await globalThis.crypto.subtle.digest(`SHA-256`,t))}async function ne(e){return`sha256:${await _(ee(e))}`}var re=`0123456789abcdefghijklmnopqrstuvwxyz`;function ie(e=12){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let n=``;for(let r=0;r<e;r+=1)n+=re[t[r]%36];return n}function ae(e,t=12){return`${e}_${ie(t)}`}function oe(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function se(e,t=`|`){return e.map(e=>we(e)).join(t)}function ce(e,t){return typeof t==`bigint`?t.toString():t}function le(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ue(e){return e==null}function de(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function fe(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pe(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function me(e){return JSON.stringify(e)}function he(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ge=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ve=le(()=>{if(ct.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ye(e){if(_e(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return _e(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function be(e){return ye(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var xe=new Set([`string`,`number`,`symbol`]);function Se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ce(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function y(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function we(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Te(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ee={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function De(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ce(e,pe(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&v(e,r,n.shape[r])}return v(this,`shape`,e),e},checks:[]}))}function Oe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ce(e,pe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return v(this,`shape`,r),r},checks:[]}))}function ke(e,t){if(!ye(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function Ae(e,t){if(!ye(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function je(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return v(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Me(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return Ce(t,pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return v(this,`shape`,i),i},checks:[]}))}function Ne(e,t,n){return Ce(t,pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return v(this,`shape`,i),i}}))}function Pe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ie(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Le(e){return typeof e==`string`?e:e?.message}function Re(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ze(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Le(e.inst?._zod.def?.error?.(e))??Le(a?.(e))??Le(t?.error?.(e))??Le(n.customError?.(e))??Le(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}var Be=/[\uD800-\uDBFF]/;function Ve(e){let t=e.length;if(!Be.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function He(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ue(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function We(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ge(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Je(e,n,r.value)}}function Ke(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function qe(e,t,n){return Ke(e,t,n,!1)}function Je(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ke(this,t,n.bind(this))},set(e){Ke(this,t,e)}})}function Ye(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Xe,Ze=!1,Qe={configurable:!0,get(){Ze=!0}};function b(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Xe!==e._zod){Xe=void 0;return}Xe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Qe);let e=Ze;Ze=!1;try{let r=n(this);return Ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ze||=e,r}catch(n){throw delete this[t],Ze||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function $e(e,t,n,r){let i=Ye(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var et=`~constantCatch`;function tt(e){let t=()=>e;return t[et]=!0,t}var nt,rt={value:void 0,enumerable:!1},it=`captureStackTrace`in Error?Error:null;function at(e){let t=it;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return it=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function x(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){rt.value=new a(r);try{Object.defineProperty(n,"_zod",rt)}finally{rt.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ge(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?at(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ot=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},st=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(nt=globalThis).__zod_globalConfig??(nt.__zod_globalConfig={});var ct=globalThis.__zod_globalConfig;function lt(e){return e&&Object.assign(ct,e),ct}function ut(){let e=this._zod;return e.message??=JSON.stringify(e.def,ce,2),e.message}function dt(e){this._zod.message=e}var ft={get:ut,set:dt,enumerable:!0,configurable:!0},pt={value:void 0,enumerable:!1},mt={value:void 0,enumerable:!1},ht=new WeakSet([Object.prototype,Error.prototype]),gt=(e,t)=>{e.name=`$ZodError`,pt.value=e._zod,Object.defineProperty(e,"_zod",pt),mt.value=t,Object.defineProperty(e,"issues",mt),pt.value=void 0,mt.value=void 0,Object.defineProperty(e,"message",ft);let n=Object.getPrototypeOf(e);ht.has(n)||(ht.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},_t=x(`$ZodError`,gt),vt=x(`$ZodError`,gt,void 0,{Parent:Error});function yt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function bt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?yt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function St(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ct=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ot;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,lt())));throw ge(n,a?.callee??t),n}return s.value};return t},wt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,lt())));throw ge(n,a?.callee??t),n}return s.value};return t},Tt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ot;return a.issues.length?{success:!1,error:new(e??_t)(a.issues.map(e=>ze(e,i,lt())))}:{success:!0,data:a.value}},Et=Tt(vt),Dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>ze(e,i,lt())))}:{success:!0,data:a.value}},Ot=Dt(vt),kt=e=>{let t=Ct(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,St(n,a))};return n},At=e=>{let t=Ct(e),n=(e,r,i,a)=>t(e,r,i,St(n,a));return n},jt=e=>{let t=wt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,St(n,a))};return n},Mt=e=>{let t=wt(e),n=async(e,r,i,a)=>await t(e,r,i,St(n,a));return n},Nt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tt(e)(t,n,i)},Pt=e=>(t,n,r)=>Tt(e)(t,n,r),Ft=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Dt(e)(t,n,i)},It=e=>async(t,n,r)=>Dt(e)(t,n,r),Lt=/^[cC][0-9a-z]{6,}$/,Rt=/^[0-9a-z]+$/,zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Bt=/^[0-9a-vA-V]{20}$/,Vt=/^[A-Za-z0-9]{27}$/,Ht=/^[a-zA-Z0-9_-]{21}$/;function Ut(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Wt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Kt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Yt(){return new RegExp(Jt,`u`)}var Xt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$t=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,en=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tn=/^[A-Za-z0-9_-]*$/,nn=/^https?$/,rn=/^\+[1-9]\d{6,14}$/,an=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function on(e){return RegExp(`^${e}$`)}var sn=on(an);function cn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ln(e){return RegExp(`^${cn(e)}$`)}function un(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${cn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${cn({precision:e.precision})}`:n;return RegExp(`^${an}T(?:${r})$`)}var dn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},fn=/^-?\d+$/,pn=/^-?\d+(?:\.\d+)?$/,mn=/^(?:true|false)$/i,hn=/^null$/i,gn=/^[^A-Z]*$/,_n=/^[^a-z]*$/,S=x(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vn=e=>{let t=e.value;return!ue(t)&&t.length!==void 0},yn={number:`number`,bigint:`bigint`,object:`date`},bn=x(`$ZodCheckLessThan`,(e,t)=>{S.init(e,t);let n=yn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:yn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xn=x(`$ZodCheckGreaterThan`,(e,t)=>{S.init(e,t);let n=yn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:yn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sn=x(`$ZodCheckMultipleOf`,(e,t)=>{S.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):fe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Cn=x(`$ZodCheckNumberFormat`,(e,t)=>{S.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ee[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=fn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),wn=x(`$ZodCheckMaxLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ve(r):i)<=t.maximum)return;let a=He(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tn=x(`$ZodCheckMinLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ve(r):i)>=t.minimum)return;let a=He(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),En=x(`$ZodCheckLengthEquals`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ve(r):i;if(a===t.length)return;let o=He(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Dn=x(`$ZodCheckStringFormat`,(e,t)=>{var n,r;S.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),On=x(`$ZodCheckRegex`,(e,t)=>{Dn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),kn=x(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gn,Dn.init(e,t)}),An=x(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_n,Dn.init(e,t)}),jn=x(`$ZodCheckIncludes`,(e,t)=>{S.init(e,t);let n=Se(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Mn=x(`$ZodCheckStartsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`^${Se(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Nn=x(`$ZodCheckEndsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`.*${Se(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Pn=x(`$ZodCheckOverwrite`,(e,t)=>{S.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Fn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
1
+ import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,u as m}from"./index-DGb1CZwY.js";var h=i();function ee(e){return JSON.stringify(te(e))}function te(e){if(typeof e!=`object`||!e)return typeof e==`number`&&!Number.isFinite(e)?String(e):e;if(Array.isArray(e))return e.map(te);if(e instanceof Date)return e.toISOString();let t=e,n={};for(let e of Object.keys(t).sort()){let r=t[e];r!==void 0&&(n[e]=te(r))}return n}function g(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function _(e){let t=new TextEncoder().encode(e);return g(await globalThis.crypto.subtle.digest(`SHA-256`,t))}async function ne(e){return`sha256:${await _(ee(e))}`}var re=`0123456789abcdefghijklmnopqrstuvwxyz`;function ie(e=12){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let n=``;for(let r=0;r<e;r+=1)n+=re[t[r]%36];return n}function ae(e,t=12){return`${e}_${ie(t)}`}function oe(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function se(e,t=`|`){return e.map(e=>we(e)).join(t)}function ce(e,t){return typeof t==`bigint`?t.toString():t}function le(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ue(e){return e==null}function de(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function fe(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pe(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function me(e){return JSON.stringify(e)}function he(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ge=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ve=le(()=>{if(ct.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ye(e){if(_e(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return _e(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function be(e){return ye(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var xe=new Set([`string`,`number`,`symbol`]);function Se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ce(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function y(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function we(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Te(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ee={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function De(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ce(e,pe(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&v(e,r,n.shape[r])}return v(this,`shape`,e),e},checks:[]}))}function Oe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ce(e,pe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return v(this,`shape`,r),r},checks:[]}))}function ke(e,t){if(!ye(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function Ae(e,t){if(!ye(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function je(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Ce(e,pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return v(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Me(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return Ce(t,pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return v(this,`shape`,i),i},checks:[]}))}function Ne(e,t,n){return Ce(t,pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return v(this,`shape`,i),i}}))}function Pe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ie(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Le(e){return typeof e==`string`?e:e?.message}function Re(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ze(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Le(e.inst?._zod.def?.error?.(e))??Le(a?.(e))??Le(t?.error?.(e))??Le(n.customError?.(e))??Le(n.localeError?.(e))??`Invalid input`,{inst:s,schema:c,continue:l,input:u,...d}=e;return d.path??=[],d.message=o,t?.reportInput&&(d.input=u),d}var Be=/[\uD800-\uDBFF]/;function Ve(e){let t=e.length;if(!Be.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function He(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ue(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function We(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ge(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Je(e,n,r.value)}}function Ke(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function qe(e,t,n){return Ke(e,t,n,!1)}function Je(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ke(this,t,n.bind(this))},set(e){Ke(this,t,e)}})}function Ye(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Xe,Ze=!1,Qe={configurable:!0,get(){Ze=!0}};function b(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Xe!==e._zod){Xe=void 0;return}Xe=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Qe);let e=Ze;Ze=!1;try{let r=n(this);return Ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ze||=e,r}catch(n){throw delete this[t],Ze||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function $e(e,t,n,r){let i=Ye(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var et=`~constantCatch`;function tt(e){let t=()=>e;return t[et]=!0,t}var nt,rt={value:void 0,enumerable:!1},it=`captureStackTrace`in Error?Error:null;function at(e){let t=it;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return it=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function x(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){rt.value=new a(r);try{Object.defineProperty(n,"_zod",rt)}finally{rt.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ge(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?at(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ot=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},st=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(nt=globalThis).__zod_globalConfig??(nt.__zod_globalConfig={});var ct=globalThis.__zod_globalConfig;function lt(e){return e&&Object.assign(ct,e),ct}function ut(){let e=this._zod;return e.message??=JSON.stringify(e.def,ce,2),e.message}function dt(e){this._zod.message=e}var ft={get:ut,set:dt,enumerable:!0,configurable:!0},pt={value:void 0,enumerable:!1},mt={value:void 0,enumerable:!1},ht=new WeakSet([Object.prototype,Error.prototype]),gt=(e,t)=>{e.name=`$ZodError`,pt.value=e._zod,Object.defineProperty(e,"_zod",pt),mt.value=t,Object.defineProperty(e,"issues",mt),pt.value=void 0,mt.value=void 0,Object.defineProperty(e,"message",ft);let n=Object.getPrototypeOf(e);ht.has(n)||(ht.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},_t=x(`$ZodError`,gt),vt=x(`$ZodError`,gt,void 0,{Parent:Error});function yt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function bt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?yt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function St(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ct=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ot;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,lt())));throw ge(n,a?.callee??t),n}return s.value};return t},wt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ze(e,o,lt())));throw ge(n,a?.callee??t),n}return s.value};return t},Tt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ot;return a.issues.length?{success:!1,error:new(e??_t)(a.issues.map(e=>ze(e,i,lt())))}:{success:!0,data:a.value}},Et=Tt(vt),Dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>ze(e,i,lt())))}:{success:!0,data:a.value}},Ot=Dt(vt),kt=e=>{let t=Ct(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,St(n,a))};return n},At=e=>{let t=Ct(e),n=(e,r,i,a)=>t(e,r,i,St(n,a));return n},jt=e=>{let t=wt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,St(n,a))};return n},Mt=e=>{let t=wt(e),n=async(e,r,i,a)=>await t(e,r,i,St(n,a));return n},Nt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Tt(e)(t,n,i)},Pt=e=>(t,n,r)=>Tt(e)(t,n,r),Ft=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Dt(e)(t,n,i)},It=e=>async(t,n,r)=>Dt(e)(t,n,r),Lt=/^[cC][0-9a-z]{6,}$/,Rt=/^[0-9a-z]+$/,zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Bt=/^[0-9a-vA-V]{20}$/,Vt=/^[A-Za-z0-9]{27}$/,Ht=/^[a-zA-Z0-9_-]{21}$/;function Ut(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Wt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Gt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Kt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Yt(){return new RegExp(Jt,`u`)}var Xt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$t=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,en=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tn=/^[A-Za-z0-9_-]*$/,nn=/^https?$/,rn=/^\+[1-9]\d{6,14}$/,an=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function on(e){return RegExp(`^${e}$`)}var sn=on(an);function cn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ln(e){return RegExp(`^${cn(e)}$`)}function un(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${cn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${cn({precision:e.precision})}`:n;return RegExp(`^${an}T(?:${r})$`)}var dn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},fn=/^-?\d+$/,pn=/^-?\d+(?:\.\d+)?$/,mn=/^(?:true|false)$/i,hn=/^null$/i,gn=/^[^A-Z]*$/,_n=/^[^a-z]*$/,S=x(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vn=e=>{let t=e.value;return!ue(t)&&t.length!==void 0},yn={number:`number`,bigint:`bigint`,object:`date`},bn=x(`$ZodCheckLessThan`,(e,t)=>{S.init(e,t);let n=yn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:yn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xn=x(`$ZodCheckGreaterThan`,(e,t)=>{S.init(e,t);let n=yn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:yn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sn=x(`$ZodCheckMultipleOf`,(e,t)=>{S.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):fe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Cn=x(`$ZodCheckNumberFormat`,(e,t)=>{S.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ee[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=fn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),wn=x(`$ZodCheckMaxLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ve(r):i)<=t.maximum)return;let a=He(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tn=x(`$ZodCheckMinLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ve(r):i)>=t.minimum)return;let a=He(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),En=x(`$ZodCheckLengthEquals`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=vn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ve(r):i;if(a===t.length)return;let o=He(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Dn=x(`$ZodCheckStringFormat`,(e,t)=>{var n,r;S.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),On=x(`$ZodCheckRegex`,(e,t)=>{Dn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),kn=x(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gn,Dn.init(e,t)}),An=x(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_n,Dn.init(e,t)}),jn=x(`$ZodCheckIncludes`,(e,t)=>{S.init(e,t);let n=Se(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Mn=x(`$ZodCheckStartsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`^${Se(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Nn=x(`$ZodCheckEndsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`.*${Se(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Pn=x(`$ZodCheckOverwrite`,(e,t)=>{S.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Fn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
2
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
3
3
  `)}\n};`)(...Object.values(this.closed))}},In={major:4,minor:5,patch:4},C=x(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=In;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Pe(t),a;for(let o of n){if(o._zod.def.when){if(Fe(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ot;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Re(t.issues,n,e),i||=Pe(t,n))});else{if(t.issues.length===n)continue;Re(t.issues,n,e),i||=Pe(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Pe(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ot;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ot;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return qe(this,`~standard`,Rn(this))},set"~standard"(e){Ke(this,`~standard`,e)}}),Ln=e=>e.success?{value:e.data}:{issues:e.error?.issues};function Rn(e){return{validate:t=>{try{return Ln(Et(e,t))}catch{return Ot(e,t).then(Ln)}},vendor:`zod`,version:1}}var zn=x(`$ZodString`,(e,t)=>{C.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??dn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),w=x(`$ZodStringFormat`,(e,t)=>{Dn.init(e,t),zn.init(e,t)}),Bn=x(`$ZodGUID`,(e,t)=>{t.pattern??=Gt,w.init(e,t)}),Vn=x(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Kt(e)}else t.pattern??=Kt();w.init(e,t)}),Hn=x(`$ZodEmail`,(e,t)=>{t.pattern??=qt,w.init(e,t)});function Un(e,t){if(!t.normalize&&t.protocol?.source===nn.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var Wn=/[\t\n\r]/g;function Gn(e){return e.replace(Wn,``)}function Kn(e,t){return t.lastIndex=0,t.test(e.hostname)}function qn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Jn=x(`$ZodURL`,(e,t)=>{w.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Un(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Kn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!qn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Gn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Yn=x(`$ZodEmoji`,(e,t)=>{t.pattern??=Yt(),w.init(e,t)}),Xn=x(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Ht:Ut(t.length),w.init(e,t)}),Zn=x(`$ZodCUID`,(e,t)=>{t.pattern??=Lt,w.init(e,t)}),Qn=x(`$ZodCUID2`,(e,t)=>{t.pattern??=Rt,w.init(e,t)}),$n=x(`$ZodULID`,(e,t)=>{t.pattern??=zt,w.init(e,t)}),er=x(`$ZodXID`,(e,t)=>{t.pattern??=Bt,w.init(e,t)}),tr=x(`$ZodKSUID`,(e,t)=>{t.pattern??=Vt,w.init(e,t)}),nr=x(`$ZodISODateTime`,(e,t)=>{t.pattern??=un(t),w.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),rr=x(`$ZodISODate`,(e,t)=>{t.pattern??=sn,w.init(e,t)}),ir=x(`$ZodISOTime`,(e,t)=>{t.pattern??=ln(t),w.init(e,t)}),ar=x(`$ZodISODuration`,(e,t)=>{t.pattern??=Wt,w.init(e,t)}),or=x(`$ZodIPv4`,(e,t)=>{t.pattern??=Xt,w.init(e,t),e._zod.bag.format=`ipv4`}),sr=/^[0-9a-fA-F:.]+$/;function cr(e){if(!sr.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var lr=x(`$ZodIPv6`,(e,t)=>{t.pattern??=Zt,w.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{cr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ur=x(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qt,w.init(e,t)});function dr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:cr(n)}var fr=x(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$t,w.init(e,t),e._zod.check=n=>{dr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function pr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var mr=x(`$ZodBase64`,(e,t)=>{t.pattern??=en,w.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{pr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function hr(e){if(!tn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return pr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var gr=x(`$ZodBase64URL`,(e,t)=>{t.pattern??=tn,w.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{hr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),_r=x(`$ZodE164`,(e,t)=>{t.pattern??=rn,w.init(e,t)});function vr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var yr=x(`$ZodJWT`,(e,t)=>{w.init(e,t),e._zod.check=n=>{vr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),br=x(`$ZodNumber`,(e,t)=>{C.init(e,t),e._zod.pattern=e._zod.bag.pattern??pn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),xr=x(`$ZodNumberFormat`,(e,t)=>{Cn.init(e,t),br.init(e,t)}),Sr=x(`$ZodBoolean`,(e,t)=>{C.init(e,t),e._zod.pattern=mn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Cr=x(`$ZodNull`,(e,t)=>{C.init(e,t),e._zod.pattern=hn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),wr=x(`$ZodUnknown`,(e,t)=>{C.init(e,t),e._zod.parse=e=>e}),Tr=x(`$ZodNever`,(e,t)=>{C.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Er(e,t,n){e.issues.length&&t.issues.push(...Ie(n,e.issues)),t.value[n]=e.value}var Dr=x(`$ZodArray`,(e,t)=>{C.init(e,t);let n=ct.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;e<a.length;e++){let n=a[e],s=t.element._zod.run({value:n,issues:[]},i);s instanceof Promise?o.push(s.then(t=>Er(t,r,e))):Er(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function Or(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ie(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var kr=[];function Ar(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:kr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Te(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function jr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Or(e,n,i,t,u,d))):Or(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Mr=new WeakMap,Nr=x(`$ZodObject`,(e,t)=>{if(C.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Mr.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Mr.set(t,n),n}})}let n=le(()=>Ar(t));b(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||v(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=_e,i=t.catchall,a,o=ct.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Or(n,t,e,c,r,i))):Or(a,t,e,c,r,i)}return i?jr(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Pr=x(`$ZodObjectJIT`,(e,t)=>{Nr.init(e,t);let n=e._zod.parse,r=le(()=>Ar(t)),i=ct.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Fn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
4
4
  for (let i = 0; i < ${e}.issues.length; i++) {
@@ -1 +1 @@
1
- import{a as e,h as t,i as n,p as r,s as i,t as a,u as o}from"./index-DAiDcuMt.js";var s=t(),c={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_OPS_URL??`http://127.0.0.1:5175`,l=a.workflows,u=[...new Set(l.flatMap(e=>e.templates))].sort();function d(){return(0,s.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-10`,children:[(0,s.jsxs)(`header`,{className:`max-w-3xl`,children:[(0,s.jsx)(i,{children:`Evidence`}),(0,s.jsx)(`h1`,{className:`mt-2 text-display font-semibold tracking-tight`,children:`One compiler. Five different jobs.`}),(0,s.jsx)(`p`,{className:`mt-3 text-body text-secondary`,children:`A refund desk, an accounts-payable queue, an inbound sales pipeline, an IT access register and a warehouse. Each is a schema, some fixture rows and a recording of somebody doing the work once. Nothing in the compiler, the generator, the verifier or the runner knows any of them exist — a build check fails if a business noun appears in any of them.`}),(0,s.jsxs)(`p`,{className:`mt-3 text-body text-secondary`,children:[`Every number below was produced by running the real pipeline. Regenerate it with`,` `,(0,s.jsx)(n,{children:`node scripts/build-proof.mjs`}),`.`]}),(0,s.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,s.jsx)(`a`,{href:c,target:`_blank`,rel:`noreferrer`,"data-testid":`open-systems`,className:`inline-flex h-10 shrink-0 items-center rounded-control border border-line px-4 text-body text-fg hover:border-line-strong`,children:`Open the four systems ↗`}),(0,s.jsx)(`span`,{className:`min-w-[16rem] max-w-md flex-1 text-meta text-muted`,children:`A finance console, a CRM, an access register and a warehouse — one renderer, and a build check that fails if it names any of them.`})]})]}),(0,s.jsx)(`div`,{className:`mt-8 grid gap-4 lg:grid-cols-2`,children:l.map(t=>(0,s.jsxs)(e,{title:t.title,subtitle:`${t.discipline} · ${t.environment} · ${t.entities} record types, ${t.actions} actions`,children:[(0,s.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3 px-4 py-3 sm:grid-cols-4`,children:[(0,s.jsx)(f,{label:`Recorded steps`,value:t.traceSteps}),(0,s.jsx)(f,{label:`Facts observed`,value:t.observedFacts}),(0,s.jsx)(f,{label:`Rules proposed`,value:t.rulesProposed}),(0,s.jsx)(f,{label:`Rules confirmed`,value:t.rulesConfirmed}),(0,s.jsx)(f,{label:`Cases generated`,value:t.cases}),(0,s.jsx)(f,{label:`Must be done`,value:t.mustPerform}),(0,s.jsx)(f,{label:`Must be refused`,value:t.mustRefuse}),(0,s.jsx)(f,{label:`Time to benchmark`,value:`${(t.timings.total/1e3).toFixed(2)}s`})]}),(0,s.jsxs)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:`Benchmark quality`}),(0,s.jsxs)(`ul`,{className:`mt-2 space-y-1.5`,children:[(0,s.jsx)(p,{label:`Fails no correct implementation`,ok:t.quality.falsePositiveRate===0,detail:r(1-(t.quality.falsePositiveRate??0))}),(0,s.jsx)(p,{label:`Injected defects caught`,ok:t.quality.mutantKillRate>=.75,detail:r(t.quality.mutantKillRate)}),(0,s.jsx)(p,{label:`Never fails harmless behaviour`,ok:t.quality.falseAccusationRate===0,detail:r(1-(t.quality.falseAccusationRate??0))}),(0,s.jsx)(p,{label:`Same seed, same world`,ok:t.quality.replayStable,detail:t.quality.replayStable?`stable`:`flaky`}),(0,s.jsx)(p,{label:`Answer never reaches the agent`,ok:t.quality.hiddenAnswerIsolated,detail:t.quality.hiddenAnswerIsolated?`isolated`:`leaks`}),(0,s.jsx)(p,{label:`Cases that separate implementations`,ok:(t.quality.caseDiscrimination??0)>.4,detail:r(t.quality.caseDiscrimination??0)})]})]}),(0,s.jsxs)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:`Agents`}),(0,s.jsxs)(`table`,{className:`mt-2 w-full text-meta`,children:[(0,s.jsx)(`thead`,{className:`text-muted`,children:(0,s.jsxs)(`tr`,{children:[(0,s.jsx)(`th`,{className:`pb-1 text-left font-medium`,children:`Implementation`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Task`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Policy`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Unsafe`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Gate`})]})}),(0,s.jsx)(`tbody`,{children:t.agents.map(e=>(0,s.jsxs)(`tr`,{className:`border-t border-line-soft`,children:[(0,s.jsx)(`td`,{className:`py-1 text-secondary`,children:e.name}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:r(e.taskSuccess)}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:r(e.policyCompliance)}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:e.unsafeActions}),(0,s.jsx)(`td`,{className:`py-1 text-right`,children:(0,s.jsx)(o,{tone:e.passed?`pass`:`fail`,children:e.passed?`pass`:`fail`})})]},e.id))})]}),(0,s.jsx)(`p`,{className:`mt-2 text-meta text-muted`,children:`The reference implementation replays the plan the expectation engine derived. It is given the answer, so its result says the benchmark is satisfiable — and nothing at all about agent quality.`})]})]},t.key))}),(0,s.jsxs)(e,{className:`mt-4`,title:`Rule shapes, across all five`,subtitle:`No workflow needs all of them, and none of them names a business object.`,children:[(0,s.jsx)(`div`,{className:`flex flex-wrap gap-2 px-4 py-3`,children:u.map(e=>(0,s.jsx)(o,{children:e.replace(/_/g,` `)},e))}),(0,s.jsx)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:(0,s.jsxs)(`table`,{className:`w-full text-meta`,children:[(0,s.jsx)(`thead`,{className:`text-muted`,children:(0,s.jsxs)(`tr`,{children:[(0,s.jsx)(`th`,{className:`pb-1 text-left font-medium`,children:`Job`}),u.map(e=>(0,s.jsx)(`th`,{className:`pb-1 text-center font-medium`,children:e.split(`_`)[0]},e))]})}),(0,s.jsx)(`tbody`,{children:l.map(e=>(0,s.jsxs)(`tr`,{className:`border-t border-line-soft`,children:[(0,s.jsx)(`td`,{className:`py-1 text-secondary`,children:e.title}),u.map(t=>(0,s.jsx)(`td`,{className:`py-1 text-center`,children:e.templates.includes(t)?(0,s.jsx)(`span`,{className:`text-pass`,children:`●`}):(0,s.jsx)(`span`,{className:`text-muted`,children:`·`})},t))]},e.key))})]})})]}),(0,s.jsx)(e,{className:`mt-4`,title:`Injected defects`,subtitle:`Deliberately broken implementations, and one control that must survive.`,children:(0,s.jsx)(`ul`,{children:(l[0]?.mutants??[]).map(e=>(0,s.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-line-soft px-4 py-2.5 last:border-0`,children:[(0,s.jsx)(o,{tone:e.expectation===`must_survive`?`info`:`neutral`,children:e.expectation===`must_survive`?`control`:`defect`}),(0,s.jsx)(`span`,{className:`min-w-[16rem] flex-1 text-secondary`,children:e.defect}),(0,s.jsx)(n,{className:`text-muted`,children:e.independence.replace(/_/g,` `)}),(0,s.jsxs)(`span`,{className:`text-meta text-muted`,children:[`caught in`,` `,l.filter(t=>t.mutants.find(t=>t.id===e.id)?.caught).length,` `,`of `,l.length]})]},e.id))})}),(0,s.jsxs)(`footer`,{className:`mt-6 flex flex-wrap gap-x-4 gap-y-1 text-meta text-muted`,children:[(0,s.jsxs)(`span`,{children:[`Generated from commit `,(0,s.jsx)(n,{children:a.commit})]}),(0,s.jsxs)(`span`,{children:[new Date(a.generatedAt).toISOString().replace(`T`,` `).slice(0,19),` UTC`]}),(0,s.jsxs)(`span`,{children:[(a.generationMs/1e3).toFixed(1),`s to produce every number on this page`]})]})]})}function f({label:e,value:t}){return(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:e}),(0,s.jsx)(`div`,{"data-numeric":!0,className:`text-metric-sm font-semibold`,children:t})]})}function p({label:e,ok:t,detail:r}){return(0,s.jsxs)(`li`,{className:`flex items-center gap-2 text-meta`,children:[(0,s.jsx)(`span`,{className:t?`text-pass`:`text-fail`,"aria-hidden":`true`,children:t?`✓`:`✕`}),(0,s.jsx)(`span`,{className:`min-w-[12rem] flex-1 text-secondary`,children:e}),(0,s.jsx)(n,{className:t?`text-pass`:`text-fail`,children:r})]})}export{d as Proof};
1
+ import{a as e,h as t,i as n,p as r,s as i,t as a,u as o}from"./index-DGb1CZwY.js";var s=t(),c={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_OPS_URL??`http://127.0.0.1:5175`,l=a.workflows,u=[...new Set(l.flatMap(e=>e.templates))].sort();function d(){return(0,s.jsxs)(`div`,{className:`mx-auto max-w-6xl px-5 py-10`,children:[(0,s.jsxs)(`header`,{className:`max-w-3xl`,children:[(0,s.jsx)(i,{children:`Evidence`}),(0,s.jsx)(`h1`,{className:`mt-2 text-display font-semibold tracking-tight`,children:`One compiler. Five different jobs.`}),(0,s.jsx)(`p`,{className:`mt-3 text-body text-secondary`,children:`A refund desk, an accounts-payable queue, an inbound sales pipeline, an IT access register and a warehouse. Each is a schema, some fixture rows and a recording of somebody doing the work once. Nothing in the compiler, the generator, the verifier or the runner knows any of them exist — a build check fails if a business noun appears in any of them.`}),(0,s.jsxs)(`p`,{className:`mt-3 text-body text-secondary`,children:[`Every number below was produced by running the real pipeline. Regenerate it with`,` `,(0,s.jsx)(n,{children:`node scripts/build-proof.mjs`}),`.`]}),(0,s.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-x-4 gap-y-2`,children:[(0,s.jsx)(`a`,{href:c,target:`_blank`,rel:`noreferrer`,"data-testid":`open-systems`,className:`inline-flex h-10 shrink-0 items-center rounded-control border border-line px-4 text-body text-fg hover:border-line-strong`,children:`Open the four systems ↗`}),(0,s.jsx)(`span`,{className:`min-w-[16rem] max-w-md flex-1 text-meta text-muted`,children:`A finance console, a CRM, an access register and a warehouse — one renderer, and a build check that fails if it names any of them.`})]})]}),(0,s.jsx)(`div`,{className:`mt-8 grid gap-4 lg:grid-cols-2`,children:l.map(t=>(0,s.jsxs)(e,{title:t.title,subtitle:`${t.discipline} · ${t.environment} · ${t.entities} record types, ${t.actions} actions`,children:[(0,s.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-3 px-4 py-3 sm:grid-cols-4`,children:[(0,s.jsx)(f,{label:`Recorded steps`,value:t.traceSteps}),(0,s.jsx)(f,{label:`Facts observed`,value:t.observedFacts}),(0,s.jsx)(f,{label:`Rules proposed`,value:t.rulesProposed}),(0,s.jsx)(f,{label:`Rules confirmed`,value:t.rulesConfirmed}),(0,s.jsx)(f,{label:`Cases generated`,value:t.cases}),(0,s.jsx)(f,{label:`Must be done`,value:t.mustPerform}),(0,s.jsx)(f,{label:`Must be refused`,value:t.mustRefuse}),(0,s.jsx)(f,{label:`Time to benchmark`,value:`${(t.timings.total/1e3).toFixed(2)}s`})]}),(0,s.jsxs)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:`Benchmark quality`}),(0,s.jsxs)(`ul`,{className:`mt-2 space-y-1.5`,children:[(0,s.jsx)(p,{label:`Fails no correct implementation`,ok:t.quality.falsePositiveRate===0,detail:r(1-(t.quality.falsePositiveRate??0))}),(0,s.jsx)(p,{label:`Injected defects caught`,ok:t.quality.mutantKillRate>=.75,detail:r(t.quality.mutantKillRate)}),(0,s.jsx)(p,{label:`Never fails harmless behaviour`,ok:t.quality.falseAccusationRate===0,detail:r(1-(t.quality.falseAccusationRate??0))}),(0,s.jsx)(p,{label:`Same seed, same world`,ok:t.quality.replayStable,detail:t.quality.replayStable?`stable`:`flaky`}),(0,s.jsx)(p,{label:`Answer never reaches the agent`,ok:t.quality.hiddenAnswerIsolated,detail:t.quality.hiddenAnswerIsolated?`isolated`:`leaks`}),(0,s.jsx)(p,{label:`Cases that separate implementations`,ok:(t.quality.caseDiscrimination??0)>.4,detail:r(t.quality.caseDiscrimination??0)})]})]}),(0,s.jsxs)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:`Agents`}),(0,s.jsxs)(`table`,{className:`mt-2 w-full text-meta`,children:[(0,s.jsx)(`thead`,{className:`text-muted`,children:(0,s.jsxs)(`tr`,{children:[(0,s.jsx)(`th`,{className:`pb-1 text-left font-medium`,children:`Implementation`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Task`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Policy`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Unsafe`}),(0,s.jsx)(`th`,{className:`pb-1 text-right font-medium`,children:`Gate`})]})}),(0,s.jsx)(`tbody`,{children:t.agents.map(e=>(0,s.jsxs)(`tr`,{className:`border-t border-line-soft`,children:[(0,s.jsx)(`td`,{className:`py-1 text-secondary`,children:e.name}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:r(e.taskSuccess)}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:r(e.policyCompliance)}),(0,s.jsx)(`td`,{"data-numeric":!0,className:`py-1 text-right`,children:e.unsafeActions}),(0,s.jsx)(`td`,{className:`py-1 text-right`,children:(0,s.jsx)(o,{tone:e.passed?`pass`:`fail`,children:e.passed?`pass`:`fail`})})]},e.id))})]}),(0,s.jsx)(`p`,{className:`mt-2 text-meta text-muted`,children:`The reference implementation replays the plan the expectation engine derived. It is given the answer, so its result says the benchmark is satisfiable — and nothing at all about agent quality.`})]})]},t.key))}),(0,s.jsxs)(e,{className:`mt-4`,title:`Rule shapes, across all five`,subtitle:`No workflow needs all of them, and none of them names a business object.`,children:[(0,s.jsx)(`div`,{className:`flex flex-wrap gap-2 px-4 py-3`,children:u.map(e=>(0,s.jsx)(o,{children:e.replace(/_/g,` `)},e))}),(0,s.jsx)(`div`,{className:`border-t border-line-soft px-4 py-3`,children:(0,s.jsxs)(`table`,{className:`w-full text-meta`,children:[(0,s.jsx)(`thead`,{className:`text-muted`,children:(0,s.jsxs)(`tr`,{children:[(0,s.jsx)(`th`,{className:`pb-1 text-left font-medium`,children:`Job`}),u.map(e=>(0,s.jsx)(`th`,{className:`pb-1 text-center font-medium`,children:e.split(`_`)[0]},e))]})}),(0,s.jsx)(`tbody`,{children:l.map(e=>(0,s.jsxs)(`tr`,{className:`border-t border-line-soft`,children:[(0,s.jsx)(`td`,{className:`py-1 text-secondary`,children:e.title}),u.map(t=>(0,s.jsx)(`td`,{className:`py-1 text-center`,children:e.templates.includes(t)?(0,s.jsx)(`span`,{className:`text-pass`,children:`●`}):(0,s.jsx)(`span`,{className:`text-muted`,children:`·`})},t))]},e.key))})]})})]}),(0,s.jsx)(e,{className:`mt-4`,title:`Injected defects`,subtitle:`Deliberately broken implementations, and one control that must survive.`,children:(0,s.jsx)(`ul`,{children:(l[0]?.mutants??[]).map(e=>(0,s.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-line-soft px-4 py-2.5 last:border-0`,children:[(0,s.jsx)(o,{tone:e.expectation===`must_survive`?`info`:`neutral`,children:e.expectation===`must_survive`?`control`:`defect`}),(0,s.jsx)(`span`,{className:`min-w-[16rem] flex-1 text-secondary`,children:e.defect}),(0,s.jsx)(n,{className:`text-muted`,children:e.independence.replace(/_/g,` `)}),(0,s.jsxs)(`span`,{className:`text-meta text-muted`,children:[`caught in`,` `,l.filter(t=>t.mutants.find(t=>t.id===e.id)?.caught).length,` `,`of `,l.length]})]},e.id))})}),(0,s.jsxs)(`footer`,{className:`mt-6 flex flex-wrap gap-x-4 gap-y-1 text-meta text-muted`,children:[(0,s.jsxs)(`span`,{children:[`Generated from commit `,(0,s.jsx)(n,{children:a.commit})]}),(0,s.jsxs)(`span`,{children:[new Date(a.generatedAt).toISOString().replace(`T`,` `).slice(0,19),` UTC`]}),(0,s.jsxs)(`span`,{children:[(a.generationMs/1e3).toFixed(1),`s to produce every number on this page`]})]})]})}function f({label:e,value:t}){return(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`text-micro font-medium uppercase text-muted`,children:e}),(0,s.jsx)(`div`,{"data-numeric":!0,className:`text-metric-sm font-semibold`,children:t})]})}function p({label:e,ok:t,detail:r}){return(0,s.jsxs)(`li`,{className:`flex items-center gap-2 text-meta`,children:[(0,s.jsx)(`span`,{className:t?`text-pass`:`text-fail`,"aria-hidden":`true`,children:t?`✓`:`✕`}),(0,s.jsx)(`span`,{className:`min-w-[12rem] flex-1 text-secondary`,children:e}),(0,s.jsx)(n,{className:t?`text-pass`:`text-fail`,children:r})]})}export{d as Proof};