var g=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),$=e=>({get value(){let t=e();return g(this,"value",t)}}),v=Array.isArray,S=e=>typeof e=="object"&&e!==null&&!v(e),w=$(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});var x=(e,t)=>e?{ok:!1,code:"join",left:e,right:t}:t,m=(e,t)=>({ok:!1,code:"prepend",key:e,tree:t}),E=e=>({ok:!0,value:e}),B=0,y=1,G=2,M=(e,t)=>{let{ok:n,msg:c,...r}=e;return{...r,path:t}},C=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{C(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push(M(e,t)),n}},O=e=>{let t=0;for(;;)switch(e.code){case"join":{t+=O(e.left),e=e.right;continue}case"prepend":{e=e.tree;continue}default:return t+1}};var Y=e=>{let t="",n=0;for(;;){switch(e.code){case"join":{n+=O(e.right),e=e.left;continue}case"prepend":{t+=`.${e.key}`,e=e.tree;continue}}break}let c=e.msg(),r=`${e.code} at ${t||"."} (${c})`;return n>0&&(r+=` (+${n} other issue(s))`),r},I=class extends Error{name="ValidationError";#e;constructor(t){super(),this.#e=t}get message(){return Y(this.#e)}get issues(){return C(this.#e)}};var P=(e,t,n)=>{let c=B;n?.strict&&(c|=G);let r=e["~run"](t,c);if(r===void 0)return t;if(r.ok)return r.value;throw new I(r)},L=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{L(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push({message:e.msg(),path:t.length>0?t:void 0}),n}},_=e=>({version:1,vendor:"@atcute/lexicons",validate(t){let n=e["~run"](t,B);return n===void 0?{value:t}:n.ok?{value:n.value}:{issues:L(n)}}});var A={ok:!1,code:"invalid_type",expected:"integer",msg(){return"expected integer"}},F={kind:"schema",type:"integer","~run"(e,t){if(typeof e!="number"||!Number.isSafeInteger(e))return A},get"~standard"(){return g(this,"~standard",_(this))}},d=()=>F;var D={ok:!1,code:"invalid_type",expected:"string",msg(){return"expected string"}},H={kind:"schema",type:"string",format:null,"~run"(e,t){if(typeof e!="string")return D},get"~standard"(){return g(this,"~standard",_(this))}},U=()=>H;var K=e=>e.type==="optional",W={ok:!1,code:"invalid_type",expected:"array",msg(){return"expected array"}},R=e=>{let t=$(()=>typeof e=="function"?e():e);return{kind:"schema",type:"array",get item(){return g(this,"item",t.value)},get"~run"(){let n=t.value;return g(this,"~run",(r,k)=>{if(!v(r))return W;let o,s;for(let i=0,a=r.length;i{t==="__proto__"?Object.defineProperty(e,t,{value:n}):e[t]=n},j=e=>{let t=$(()=>{let n=[];for(let c in e){let r=e[c];n.push({key:c,schema:r,optional:K(r),missing:m(c,J)})}return n});return{kind:"schema",type:"object",get shape(){let n=t.value,c={};for(let r of n)c[r.key]=r.schema;return g(this,"shape",c)},get"~run"(){let n=t.value,c=n.length,r=()=>{let o=[["$ok",E],["$joinIssues",x],["$prependPath",m]],s="let $iss,$out;";for(let a=0;aa).join(",")}]`,`return function matcher($in,$flags){${s}}`)(o.map(([,a])=>a))};if(w.value){let o=r();return g(this,"~run",(i,a)=>S(i)?o(i,a):N)}return g(this,"~run",(o,s)=>{if(!S(o))return N;let i,a;for(let l=0;lP(Z,e);export{te as parseStorageReport};