@sura_ai/mcp-server 0.1.44 → 0.1.45
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/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
61
61
|
|
|
62
62
|
`)}J.write("payload.value = newResult;"),J.write("return payload;");let k=J.compile();return(P,x)=>k(H,P,x)},X,D=b1,W=!fU.jitless,G=W&&zG.value,N=I.catchall,B;$._zod.parse=(H,J)=>{B??(B=b.value);let A=H.value;if(!D(A))return H.issues.push({expected:"object",code:"invalid_type",input:A,inst:$}),H;if(W&&G&&J?.async===!1&&J.jitless!==!0){if(!X)X=w(I.shape);if(H=X(H,J),!N)return H;return Jq([],A,H,J,B,$)}return U(H,J)}});function $q($,I,U,b){for(let X of $)if(X.issues.length===0)return I.value=X.value,I;let w=$.filter((X)=>!_4(X));if(w.length===1)return I.value=w[0].value,w[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((X)=>X.issues.map((D)=>U6(D,b,P$())))}),I}var aU=z("$ZodUnion",($,I)=>{o.init($,I),s($._zod,"optin",()=>I.options.some((w)=>w._zod.optin==="optional")?"optional":void 0),s($._zod,"optout",()=>I.options.some((w)=>w._zod.optout==="optional")?"optional":void 0),s($._zod,"values",()=>{if(I.options.every((w)=>w._zod.values))return new Set(I.options.flatMap((w)=>Array.from(w._zod.values)));return}),s($._zod,"pattern",()=>{if(I.options.every((w)=>w._zod.pattern)){let w=I.options.map((X)=>X._zod.pattern);return new RegExp(`^(${w.map((X)=>lU(X.source)).join("|")})$`)}return});let U=I.options.length===1,b=I.options[0]._zod.run;$._zod.parse=(w,X)=>{if(U)return b(w,X);let D=!1,W=[];for(let Q of I.options){let G=Q._zod.run({value:w.value,issues:[]},X);if(G instanceof Promise)W.push(G),D=!0;else{if(G.issues.length===0)return G;W.push(G)}}if(!D)return $q(W,w,$,X);return Promise.all(W).then((Q)=>{return $q(Q,w,$,X)})}});function Iq($,I,U,b){let w=$.filter((X)=>X.issues.length===0);if(w.length===1)return I.value=w[0].value,I;if(w.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((X)=>X.issues.map((D)=>U6(D,b,P$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var DY=z("$ZodXor",($,I)=>{aU.init($,I),I.inclusive=!1;let U=I.options.length===1,b=I.options[0]._zod.run;$._zod.parse=(w,X)=>{if(U)return b(w,X);let D=!1,W=[];for(let Q of I.options){let G=Q._zod.run({value:w.value,issues:[]},X);if(G instanceof Promise)W.push(G),D=!0;else W.push(G)}if(!D)return Iq(W,w,$,X);return Promise.all(W).then((Q)=>{return Iq(Q,w,$,X)})}}),WY=z("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,aU.init($,I);let U=$._zod.parse;s($._zod,"propValues",()=>{let w={};for(let X of I.options){let D=X._zod.propValues;if(!D||Object.keys(D).length===0)throw new Error(`Invalid discriminated union option at index "${I.options.indexOf(X)}"`);for(let[W,Q]of Object.entries(D)){if(!w[W])w[W]=new Set;for(let G of Q)w[W].add(G)}}return w});let b=n1(()=>{let w=I.options,X=new Map;for(let D of w){let W=D._zod.propValues?.[I.discriminator];if(!W||W.size===0)throw new Error(`Invalid discriminated union option at index "${I.options.indexOf(D)}"`);for(let Q of W){if(X.has(Q))throw new Error(`Duplicate discriminator value "${String(Q)}"`);X.set(Q,D)}}return X});$._zod.parse=(w,X)=>{let D=w.value;if(!b1(D))return w.issues.push({code:"invalid_type",expected:"object",input:D,inst:$}),w;let W=b.value.get(D?.[I.discriminator]);if(W)return W._zod.run(w,X);if(I.unionFallback)return U(w,X);return w.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:D,path:[I.discriminator],inst:$}),w}}),QY=z("$ZodIntersection",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{let w=U.value,X=I.left._zod.run({value:w,issues:[]},b),D=I.right._zod.run({value:w,issues:[]},b);if(X instanceof Promise||D instanceof Promise)return Promise.all([X,D]).then(([Q,G])=>{return Uq(U,Q,G)});return Uq(U,X,D)}});function VN($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(T4($)&&T4(I)){let U=Object.keys(I),b=Object.keys($).filter((X)=>U.indexOf(X)!==-1),w={...$,...I};for(let X of b){let D=VN($[X],I[X]);if(!D.valid)return{valid:!1,mergeErrorPath:[X,...D.mergeErrorPath]};w[X]=D.data}return{valid:!0,data:w}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let b=0;b<$.length;b++){let w=$[b],X=I[b],D=VN(w,X);if(!D.valid)return{valid:!1,mergeErrorPath:[b,...D.mergeErrorPath]};U.push(D.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function Uq($,I,U){if(I.issues.length)$.issues.push(...I.issues);if(U.issues.length)$.issues.push(...U.issues);if(_4($))return $;let b=VN(I.value,U.value);if(!b.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(b.mergeErrorPath)}`);return $.value=b.data,$}var FX=z("$ZodTuple",($,I)=>{o.init($,I);let U=I.items;$._zod.parse=(b,w)=>{let X=b.value;if(!Array.isArray(X))return b.issues.push({input:X,inst:$,expected:"tuple",code:"invalid_type"}),b;b.value=[];let D=[],W=[...U].reverse().findIndex((N)=>N._zod.optin!=="optional"),Q=W===-1?0:U.length-W;if(!I.rest){let N=X.length>U.length,B=X.length<Q-1;if(N||B)return b.issues.push({...N?{code:"too_big",maximum:U.length}:{code:"too_small",minimum:U.length},input:X,inst:$,origin:"array"}),b}let G=-1;for(let N of U){if(G++,G>=X.length){if(G>=Q)continue}let B=N._zod.run({value:X[G],issues:[]},w);if(B instanceof Promise)D.push(B.then((H)=>OX(H,b,G)));else OX(B,b,G)}if(I.rest){let N=X.slice(U.length);for(let B of N){G++;let H=I.rest._zod.run({value:B,issues:[]},w);if(H instanceof Promise)D.push(H.then((J)=>OX(J,b,G)));else OX(H,b,G)}}if(D.length)return Promise.all(D).then(()=>b);return b}});function OX($,I,U){if($.issues.length)I.issues.push(...G6(U,$.issues));I.value[U]=$.value}var GY=z("$ZodRecord",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{let w=U.value;if(!T4(w))return U.issues.push({expected:"record",code:"invalid_type",input:w,inst:$}),U;let X=[],D=I.keyType._zod.values;if(D){U.value={};let W=new Set;for(let G of D)if(typeof G==="string"||typeof G==="number"||typeof G==="symbol"){W.add(typeof G==="number"?G.toString():G);let N=I.valueType._zod.run({value:w[G],issues:[]},b);if(N instanceof Promise)X.push(N.then((B)=>{if(B.issues.length)U.issues.push(...G6(G,B.issues));U.value[G]=B.value}));else{if(N.issues.length)U.issues.push(...G6(G,N.issues));U.value[G]=N.value}}let Q;for(let G in w)if(!W.has(G))Q=Q??[],Q.push(G);if(Q&&Q.length>0)U.issues.push({code:"unrecognized_keys",input:w,inst:$,keys:Q})}else{U.value={};for(let W of Reflect.ownKeys(w)){if(W==="__proto__")continue;let Q=I.keyType._zod.run({value:W,issues:[]},b);if(Q instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(Q.issues.length){if(I.mode==="loose")U.value[W]=w[W];else U.issues.push({code:"invalid_key",origin:"record",issues:Q.issues.map((N)=>U6(N,b,P$())),input:W,path:[W],inst:$});continue}let G=I.valueType._zod.run({value:w[W],issues:[]},b);if(G instanceof Promise)X.push(G.then((N)=>{if(N.issues.length)U.issues.push(...G6(W,N.issues));U.value[Q.value]=N.value}));else{if(G.issues.length)U.issues.push(...G6(W,G.issues));U.value[Q.value]=G.value}}}if(X.length)return Promise.all(X).then(()=>U);return U}}),NY=z("$ZodMap",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{let w=U.value;if(!(w instanceof Map))return U.issues.push({expected:"map",code:"invalid_type",input:w,inst:$}),U;let X=[];U.value=new Map;for(let[D,W]of w){let Q=I.keyType._zod.run({value:D,issues:[]},b),G=I.valueType._zod.run({value:W,issues:[]},b);if(Q instanceof Promise||G instanceof Promise)X.push(Promise.all([Q,G]).then(([N,B])=>{wq(N,B,U,D,w,$,b)}));else wq(Q,G,U,D,w,$,b)}if(X.length)return Promise.all(X).then(()=>U);return U}});function wq($,I,U,b,w,X,D){if($.issues.length)if(cU.has(typeof b))U.issues.push(...G6(b,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:w,inst:X,issues:$.issues.map((W)=>U6(W,D,P$()))});if(I.issues.length)if(cU.has(typeof b))U.issues.push(...G6(b,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:w,inst:X,key:b,issues:I.issues.map((W)=>U6(W,D,P$()))});U.value.set($.value,I.value)}var YY=z("$ZodSet",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{let w=U.value;if(!(w instanceof Set))return U.issues.push({input:w,inst:$,expected:"set",code:"invalid_type"}),U;let X=[];U.value=new Set;for(let D of w){let W=I.valueType._zod.run({value:D,issues:[]},b);if(W instanceof Promise)X.push(W.then((Q)=>bq(Q,U)));else bq(W,U)}if(X.length)return Promise.all(X).then(()=>U);return U}});function bq($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var BY=z("$ZodEnum",($,I)=>{o.init($,I);let U=uU(I.entries),b=new Set(U);$._zod.values=b,$._zod.pattern=new RegExp(`^(${U.filter((w)=>cU.has(typeof w)).map((w)=>typeof w==="string"?L6(w):w.toString()).join("|")})$`),$._zod.parse=(w,X)=>{let D=w.value;if(b.has(D))return w;return w.issues.push({code:"invalid_value",values:U,input:D,inst:$}),w}}),JY=z("$ZodLiteral",($,I)=>{if(o.init($,I),I.values.length===0)throw new Error("Cannot create literal schema with no valid values");let U=new Set(I.values);$._zod.values=U,$._zod.pattern=new RegExp(`^(${I.values.map((b)=>typeof b==="string"?L6(b):b?L6(b.toString()):String(b)).join("|")})$`),$._zod.parse=(b,w)=>{let X=b.value;if(U.has(X))return b;return b.issues.push({code:"invalid_value",values:I.values,input:X,inst:$}),b}}),HY=z("$ZodFile",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{let w=U.value;if(w instanceof File)return U;return U.issues.push({expected:"file",code:"invalid_type",input:w,inst:$}),U}}),AY=z("$ZodTransform",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{if(b.direction==="backward")throw new w1($.constructor.name);let w=I.transform(U.value,U);if(b.async)return(w instanceof Promise?w:Promise.resolve(w)).then((D)=>{return U.value=D,U});if(w instanceof Promise)throw new m6;return U.value=w,U}});function Xq($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var OY=z("$ZodOptional",($,I)=>{o.init($,I),$._zod.optin="optional",$._zod.optout="optional",s($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),s($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${lU(U.source)})?$`):void 0}),$._zod.parse=(U,b)=>{if(I.innerType._zod.optin==="optional"){let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>Xq(X,U.value));return Xq(w,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,b)}}),zY=z("$ZodNullable",($,I)=>{o.init($,I),s($._zod,"optin",()=>I.innerType._zod.optin),s($._zod,"optout",()=>I.innerType._zod.optout),s($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${lU(U.source)}|null)$`):void 0}),s($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(U,b)=>{if(U.value===null)return U;return I.innerType._zod.run(U,b)}}),LY=z("$ZodDefault",($,I)=>{o.init($,I),$._zod.optin="optional",s($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,b)=>{if(b.direction==="backward")return I.innerType._zod.run(U,b);if(U.value===void 0)return U.value=I.defaultValue,U;let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>Dq(X,I));return Dq(w,I)}});function Dq($,I){if($.value===void 0)$.value=I.defaultValue;return $}var KY=z("$ZodPrefault",($,I)=>{o.init($,I),$._zod.optin="optional",s($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,b)=>{if(b.direction==="backward")return I.innerType._zod.run(U,b);if(U.value===void 0)U.value=I.defaultValue;return I.innerType._zod.run(U,b)}}),vY=z("$ZodNonOptional",($,I)=>{o.init($,I),s($._zod,"values",()=>{let U=I.innerType._zod.values;return U?new Set([...U].filter((b)=>b!==void 0)):void 0}),$._zod.parse=(U,b)=>{let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>Wq(X,$));return Wq(w,$)}});function Wq($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var VY=z("$ZodSuccess",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{if(b.direction==="backward")throw new w1("ZodSuccess");let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>{return U.value=X.issues.length===0,U});return U.value=w.issues.length===0,U}}),qY=z("$ZodCatch",($,I)=>{o.init($,I),s($._zod,"optin",()=>I.innerType._zod.optin),s($._zod,"optout",()=>I.innerType._zod.optout),s($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,b)=>{if(b.direction==="backward")return I.innerType._zod.run(U,b);let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>{if(U.value=X.value,X.issues.length)U.value=I.catchValue({...U,error:{issues:X.issues.map((D)=>U6(D,b,P$()))},input:U.value}),U.issues=[];return U});if(U.value=w.value,w.issues.length)U.value=I.catchValue({...U,error:{issues:w.issues.map((X)=>U6(X,b,P$()))},input:U.value}),U.issues=[];return U}}),FY=z("$ZodNaN",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{if(typeof U.value!=="number"||!Number.isNaN(U.value))return U.issues.push({input:U.value,inst:$,expected:"nan",code:"invalid_type"}),U;return U}}),MY=z("$ZodPipe",($,I)=>{o.init($,I),s($._zod,"values",()=>I.in._zod.values),s($._zod,"optin",()=>I.in._zod.optin),s($._zod,"optout",()=>I.out._zod.optout),s($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,b)=>{if(b.direction==="backward"){let X=I.out._zod.run(U,b);if(X instanceof Promise)return X.then((D)=>zX(D,I.in,b));return zX(X,I.in,b)}let w=I.in._zod.run(U,b);if(w instanceof Promise)return w.then((X)=>zX(X,I.out,b));return zX(w,I.out,b)}});function zX($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var eU=z("$ZodCodec",($,I)=>{o.init($,I),s($._zod,"values",()=>I.in._zod.values),s($._zod,"optin",()=>I.in._zod.optin),s($._zod,"optout",()=>I.out._zod.optout),s($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,b)=>{if((b.direction||"forward")==="forward"){let X=I.in._zod.run(U,b);if(X instanceof Promise)return X.then((D)=>LX(D,I,b));return LX(X,I,b)}else{let X=I.out._zod.run(U,b);if(X instanceof Promise)return X.then((D)=>LX(D,I,b));return LX(X,I,b)}}});function LX($,I,U){if($.issues.length)return $.aborted=!0,$;if((U.direction||"forward")==="forward"){let w=I.transform($.value,$);if(w instanceof Promise)return w.then((X)=>KX($,X,I.out,U));return KX($,w,I.out,U)}else{let w=I.reverseTransform($.value,$);if(w instanceof Promise)return w.then((X)=>KX($,X,I.in,U));return KX($,w,I.in,U)}}function KX($,I,U,b){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},b)}var jY=z("$ZodReadonly",($,I)=>{o.init($,I),s($._zod,"propValues",()=>I.innerType._zod.propValues),s($._zod,"values",()=>I.innerType._zod.values),s($._zod,"optin",()=>I.innerType?._zod?.optin),s($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(U,b)=>{if(b.direction==="backward")return I.innerType._zod.run(U,b);let w=I.innerType._zod.run(U,b);if(w instanceof Promise)return w.then(Qq);return Qq(w)}});function Qq($){return $.value=Object.freeze($.value),$}var EY=z("$ZodTemplateLiteral",($,I)=>{o.init($,I);let U=[];for(let b of I.parts)if(typeof b==="object"&&b!==null){if(!b._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...b._zod.traits].shift()}`);let w=b._zod.pattern instanceof RegExp?b._zod.pattern.source:b._zod.pattern;if(!w)throw new Error(`Invalid template literal part: ${b._zod.traits}`);let X=w.startsWith("^")?1:0,D=w.endsWith("$")?w.length-1:w.length;U.push(w.slice(X,D))}else if(b===null||KG.has(typeof b))U.push(L6(`${b}`));else throw new Error(`Invalid template literal part: ${b}`);$._zod.pattern=new RegExp(`^${U.join("")}$`),$._zod.parse=(b,w)=>{if(typeof b.value!=="string")return b.issues.push({input:b.value,inst:$,expected:"template_literal",code:"invalid_type"}),b;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(b.value))return b.issues.push({input:b.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),b;return b}}),SY=z("$ZodFunction",($,I)=>{return o.init($,I),$._def=I,$._zod.def=I,$.implement=(U)=>{if(typeof U!=="function")throw new Error("implement() must be called with a function");return function(...b){let w=$._def.input?UX($._def.input,b):b,X=Reflect.apply(U,this,w);if($._def.output)return UX($._def.output,X);return X}},$.implementAsync=(U)=>{if(typeof U!=="function")throw new Error("implementAsync() must be called with a function");return async function(...b){let w=$._def.input?await wX($._def.input,b):b,X=await Reflect.apply(U,this,w);if($._def.output)return await wX($._def.output,X);return X}},$._zod.parse=(U,b)=>{if(typeof U.value!=="function")return U.issues.push({code:"invalid_type",expected:"function",input:U.value,inst:$}),U;if($._def.output&&$._def.output._zod.def.type==="promise")U.value=$.implementAsync(U.value);else U.value=$.implement(U.value);return U},$.input=(...U)=>{let b=$.constructor;if(Array.isArray(U[0]))return new b({type:"function",input:new FX({type:"tuple",items:U[0],rest:U[1]}),output:$._def.output});return new b({type:"function",input:U[0],output:$._def.output})},$.output=(U)=>{return new $.constructor({type:"function",input:$._def.input,output:U})},$}),PY=z("$ZodPromise",($,I)=>{o.init($,I),$._zod.parse=(U,b)=>{return Promise.resolve(U.value).then((w)=>I.innerType._zod.run({value:w,issues:[]},b))}}),kY=z("$ZodLazy",($,I)=>{o.init($,I),s($._zod,"innerType",()=>I.getter()),s($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),s($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),s($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),s($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(U,b)=>{return $._zod.innerType._zod.run(U,b)}}),RY=z("$ZodCustom",($,I)=>{A$.init($,I),o.init($,I),$._zod.parse=(U,b)=>{return U},$._zod.check=(U)=>{let b=U.value,w=I.fn(b);if(w instanceof Promise)return w.then((X)=>Gq(X,U,b,$));Gq(w,U,b,$);return}});function Gq($,I,U,b){if(!$){let w={code:"custom",input:U,inst:b,path:[...b._zod.def.path??[]],continue:!b._zod.def.abort};if(b._zod.def.params)w.params=b._zod.def.params;I.issues.push(i1(w))}}var b0={};v6(b0,{zhTW:()=>K7,zhCN:()=>L7,yo:()=>v7,vi:()=>z7,ur:()=>O7,uk:()=>w0,ua:()=>A7,tr:()=>H7,th:()=>J7,ta:()=>B7,sv:()=>Y7,sl:()=>N7,ru:()=>G7,pt:()=>Q7,ps:()=>D7,pl:()=>W7,ota:()=>X7,no:()=>b7,nl:()=>w7,ms:()=>U7,mk:()=>I7,lt:()=>$7,ko:()=>sY,km:()=>$0,kh:()=>eY,ka:()=>aY,ja:()=>tY,it:()=>pY,is:()=>dY,id:()=>oY,hu:()=>iY,he:()=>nY,frCA:()=>rY,fr:()=>mY,fi:()=>cY,fa:()=>lY,es:()=>uY,eo:()=>yY,en:()=>sU,de:()=>fY,da:()=>hY,cs:()=>xY,ca:()=>gY,bg:()=>CY,be:()=>ZY,az:()=>_Y,ar:()=>TY});var Mf=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return(w)=>{switch(w.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${w.expected}، ولكن تم إدخال ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(w.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return` أكبر من اللازم: يفترض أن تكون ${w.origin??"القيمة"} ${X} ${w.maximum.toString()} ${D.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${w.origin??"القيمة"} ${X} ${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`أصغر من اللازم: يفترض لـ ${w.origin} أن يكون ${X} ${w.minimum.toString()} ${D.unit}`;return`أصغر من اللازم: يفترض لـ ${w.origin} أن يكون ${X} ${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${w.prefix}"`;if(X.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${X.suffix}"`;if(X.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${X.includes}"`;if(X.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${X.pattern}`;return`${b[X.format]??w.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${w.divisor}`;case"unrecognized_keys":return`معرف${w.keys.length>1?"ات":""} غريب${w.keys.length>1?"ة":""}: ${L(w.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${w.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${w.origin}`;default:return"مدخل غير مقبول"}}};function TY(){return{localeError:Mf()}}var jf=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${w.expected}, daxil olan ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Yanlış dəyər: gözlənilən ${j(w.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Çox böyük: gözlənilən ${w.origin??"dəyər"} ${X}${w.maximum.toString()} ${D.unit??"element"}`;return`Çox böyük: gözlənilən ${w.origin??"dəyər"} ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Çox kiçik: gözlənilən ${w.origin} ${X}${w.minimum.toString()} ${D.unit}`;return`Çox kiçik: gözlənilən ${w.origin} ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Yanlış mətn: "${X.prefix}" ilə başlamalıdır`;if(X.format==="ends_with")return`Yanlış mətn: "${X.suffix}" ilə bitməlidir`;if(X.format==="includes")return`Yanlış mətn: "${X.includes}" daxil olmalıdır`;if(X.format==="regex")return`Yanlış mətn: ${X.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${b[X.format]??w.format}`}case"not_multiple_of":return`Yanlış ədəd: ${w.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${w.keys.length>1?"lar":""}: ${L(w.keys,", ")}`;case"invalid_key":return`${w.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${w.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function _Y(){return{localeError:jf()}}function Aq($,I,U,b){let w=Math.abs($),X=w%10,D=w%100;if(D>=11&&D<=19)return b;if(X===1)return I;if(X>=2&&X<=4)return U;return b}var Ef=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"лік";case"object":{if(Array.isArray(w))return"масіў";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return(w)=>{switch(w.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${w.expected}, атрымана ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Няправільны ўвод: чакалася ${j(w.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D){let W=Number(w.maximum),Q=Aq(W,D.unit.one,D.unit.few,D.unit.many);return`Занадта вялікі: чакалася, што ${w.origin??"значэнне"} павінна ${D.verb} ${X}${w.maximum.toString()} ${Q}`}return`Занадта вялікі: чакалася, што ${w.origin??"значэнне"} павінна быць ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D){let W=Number(w.minimum),Q=Aq(W,D.unit.one,D.unit.few,D.unit.many);return`Занадта малы: чакалася, што ${w.origin} павінна ${D.verb} ${X}${w.minimum.toString()} ${Q}`}return`Занадта малы: чакалася, што ${w.origin} павінна быць ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${X.prefix}"`;if(X.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${X.suffix}"`;if(X.format==="includes")return`Няправільны радок: павінен змяшчаць "${X.includes}"`;if(X.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${X.pattern}`;return`Няправільны ${b[X.format]??w.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${w.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${w.keys.length>1?"ключы":"ключ"}: ${L(w.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${w.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${w.origin}`;default:return"Няправільны ўвод"}}};function ZY(){return{localeError:Ef()}}var Sf=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"число";case"object":{if(Array.isArray($))return"масив";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return I},Pf=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(b){return $[b]??null}let U={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return(b)=>{switch(b.code){case"invalid_type":return`Невалиден вход: очакван ${b.expected}, получен ${Sf(b.input)}`;case"invalid_value":if(b.values.length===1)return`Невалиден вход: очакван ${j(b.values[0])}`;return`Невалидна опция: очаквано едно от ${L(b.values,"|")}`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`Твърде голямо: очаква се ${b.origin??"стойност"} да съдържа ${w}${b.maximum.toString()} ${X.unit??"елемента"}`;return`Твърде голямо: очаква се ${b.origin??"стойност"} да бъде ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`Твърде малко: очаква се ${b.origin} да съдържа ${w}${b.minimum.toString()} ${X.unit}`;return`Твърде малко: очаква се ${b.origin} да бъде ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Невалиден низ: трябва да започва с "${w.prefix}"`;if(w.format==="ends_with")return`Невалиден низ: трябва да завършва с "${w.suffix}"`;if(w.format==="includes")return`Невалиден низ: трябва да включва "${w.includes}"`;if(w.format==="regex")return`Невалиден низ: трябва да съвпада с ${w.pattern}`;let X="Невалиден";if(w.format==="emoji")X="Невалидно";if(w.format==="datetime")X="Невалидно";if(w.format==="date")X="Невалидна";if(w.format==="time")X="Невалидно";if(w.format==="duration")X="Невалидна";return`${X} ${U[w.format]??b.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${b.divisor}`;case"unrecognized_keys":return`Неразпознат${b.keys.length>1?"и":""} ключ${b.keys.length>1?"ове":""}: ${L(b.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${b.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${b.origin}`;default:return"Невалиден вход"}}};function CY(){return{localeError:Pf()}}var kf=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(w)=>{switch(w.code){case"invalid_type":return`Tipus invàlid: s'esperava ${w.expected}, s'ha rebut ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Valor invàlid: s'esperava ${j(w.values[0])}`;return`Opció invàlida: s'esperava una de ${L(w.values," o ")}`;case"too_big":{let X=w.inclusive?"com a màxim":"menys de",D=I(w.origin);if(D)return`Massa gran: s'esperava que ${w.origin??"el valor"} contingués ${X} ${w.maximum.toString()} ${D.unit??"elements"}`;return`Massa gran: s'esperava que ${w.origin??"el valor"} fos ${X} ${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?"com a mínim":"més de",D=I(w.origin);if(D)return`Massa petit: s'esperava que ${w.origin} contingués ${X} ${w.minimum.toString()} ${D.unit}`;return`Massa petit: s'esperava que ${w.origin} fos ${X} ${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Format invàlid: ha de començar amb "${X.prefix}"`;if(X.format==="ends_with")return`Format invàlid: ha d'acabar amb "${X.suffix}"`;if(X.format==="includes")return`Format invàlid: ha d'incloure "${X.includes}"`;if(X.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${X.pattern}`;return`Format invàlid per a ${b[X.format]??w.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${w.divisor}`;case"unrecognized_keys":return`Clau${w.keys.length>1?"s":""} no reconeguda${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${w.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${w.origin}`;default:return"Entrada invàlida"}}};function gY(){return{localeError:kf()}}var Rf=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(w))return"pole";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return(w)=>{switch(w.code){case"invalid_type":return`Neplatný vstup: očekáváno ${w.expected}, obdrženo ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Neplatný vstup: očekáváno ${j(w.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Hodnota je příliš velká: ${w.origin??"hodnota"} musí mít ${X}${w.maximum.toString()} ${D.unit??"prvků"}`;return`Hodnota je příliš velká: ${w.origin??"hodnota"} musí být ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Hodnota je příliš malá: ${w.origin??"hodnota"} musí mít ${X}${w.minimum.toString()} ${D.unit??"prvků"}`;return`Hodnota je příliš malá: ${w.origin??"hodnota"} musí být ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Neplatný řetězec: musí začínat na "${X.prefix}"`;if(X.format==="ends_with")return`Neplatný řetězec: musí končit na "${X.suffix}"`;if(X.format==="includes")return`Neplatný řetězec: musí obsahovat "${X.includes}"`;if(X.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${X.pattern}`;return`Neplatný formát ${b[X.format]??w.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${w.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${L(w.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${w.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${w.origin}`;default:return"Neplatný vstup"}}};function xY(){return{localeError:Rf()}}var Tf=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},I={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function U(D){return $[D]??null}function b(D){return I[D]??D}let w=(D)=>{let W=typeof D;switch(W){case"number":return Number.isNaN(D)?"NaN":"tal";case"object":{if(Array.isArray(D))return"liste";if(D===null)return"null";if(Object.getPrototypeOf(D)!==Object.prototype&&D.constructor)return D.constructor.name;return"objekt"}}return W},X={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return(D)=>{switch(D.code){case"invalid_type":return`Ugyldigt input: forventede ${b(D.expected)}, fik ${b(w(D.input))}`;case"invalid_value":if(D.values.length===1)return`Ugyldig værdi: forventede ${j(D.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${L(D.values,"|")}`;case"too_big":{let W=D.inclusive?"<=":"<",Q=U(D.origin),G=b(D.origin);if(Q)return`For stor: forventede ${G??"value"} ${Q.verb} ${W} ${D.maximum.toString()} ${Q.unit??"elementer"}`;return`For stor: forventede ${G??"value"} havde ${W} ${D.maximum.toString()}`}case"too_small":{let W=D.inclusive?">=":">",Q=U(D.origin),G=b(D.origin);if(Q)return`For lille: forventede ${G} ${Q.verb} ${W} ${D.minimum.toString()} ${Q.unit}`;return`For lille: forventede ${G} havde ${W} ${D.minimum.toString()}`}case"invalid_format":{let W=D;if(W.format==="starts_with")return`Ugyldig streng: skal starte med "${W.prefix}"`;if(W.format==="ends_with")return`Ugyldig streng: skal ende med "${W.suffix}"`;if(W.format==="includes")return`Ugyldig streng: skal indeholde "${W.includes}"`;if(W.format==="regex")return`Ugyldig streng: skal matche mønsteret ${W.pattern}`;return`Ugyldig ${X[W.format]??D.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${D.divisor}`;case"unrecognized_keys":return`${D.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${L(D.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${D.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${D.origin}`;default:return"Ugyldigt input"}}};function hY(){return{localeError:Tf()}}var _f=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"Zahl";case"object":{if(Array.isArray(w))return"Array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return(w)=>{switch(w.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${w.expected}, erhalten ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Ungültige Eingabe: erwartet ${j(w.values[0])}`;return`Ungültige Option: erwartet eine von ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Zu groß: erwartet, dass ${w.origin??"Wert"} ${X}${w.maximum.toString()} ${D.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${w.origin??"Wert"} ${X}${w.maximum.toString()} ist`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Zu klein: erwartet, dass ${w.origin} ${X}${w.minimum.toString()} ${D.unit} hat`;return`Zu klein: erwartet, dass ${w.origin} ${X}${w.minimum.toString()} ist`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Ungültiger String: muss mit "${X.prefix}" beginnen`;if(X.format==="ends_with")return`Ungültiger String: muss mit "${X.suffix}" enden`;if(X.format==="includes")return`Ungültiger String: muss "${X.includes}" enthalten`;if(X.format==="regex")return`Ungültiger String: muss dem Muster ${X.pattern} entsprechen`;return`Ungültig: ${b[X.format]??w.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${w.divisor} sein`;case"unrecognized_keys":return`${w.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${L(w.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${w.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${w.origin}`;default:return"Ungültige Eingabe"}}};function fY(){return{localeError:_f()}}var Zf=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"number";case"object":{if(Array.isArray($))return"array";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return I},Cf=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function I(b){return $[b]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(b)=>{switch(b.code){case"invalid_type":return`Invalid input: expected ${b.expected}, received ${Zf(b.input)}`;case"invalid_value":if(b.values.length===1)return`Invalid input: expected ${j(b.values[0])}`;return`Invalid option: expected one of ${L(b.values,"|")}`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`Too big: expected ${b.origin??"value"} to have ${w}${b.maximum.toString()} ${X.unit??"elements"}`;return`Too big: expected ${b.origin??"value"} to be ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`Too small: expected ${b.origin} to have ${w}${b.minimum.toString()} ${X.unit}`;return`Too small: expected ${b.origin} to be ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Invalid string: must start with "${w.prefix}"`;if(w.format==="ends_with")return`Invalid string: must end with "${w.suffix}"`;if(w.format==="includes")return`Invalid string: must include "${w.includes}"`;if(w.format==="regex")return`Invalid string: must match pattern ${w.pattern}`;return`Invalid ${U[w.format]??b.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${b.divisor}`;case"unrecognized_keys":return`Unrecognized key${b.keys.length>1?"s":""}: ${L(b.keys,", ")}`;case"invalid_key":return`Invalid key in ${b.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${b.origin}`;default:return"Invalid input"}}};function sU(){return{localeError:Cf()}}var gf=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"nombro";case"object":{if(Array.isArray($))return"tabelo";if($===null)return"senvalora";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return I},xf=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(b){return $[b]??null}let U={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return(b)=>{switch(b.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${b.expected}, riceviĝis ${gf(b.input)}`;case"invalid_value":if(b.values.length===1)return`Nevalida enigo: atendiĝis ${j(b.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${L(b.values,"|")}`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`Tro granda: atendiĝis ke ${b.origin??"valoro"} havu ${w}${b.maximum.toString()} ${X.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${b.origin??"valoro"} havu ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`Tro malgranda: atendiĝis ke ${b.origin} havu ${w}${b.minimum.toString()} ${X.unit}`;return`Tro malgranda: atendiĝis ke ${b.origin} estu ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${w.prefix}"`;if(w.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${w.suffix}"`;if(w.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${w.includes}"`;if(w.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${w.pattern}`;return`Nevalida ${U[w.format]??b.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${b.divisor}`;case"unrecognized_keys":return`Nekonata${b.keys.length>1?"j":""} ŝlosilo${b.keys.length>1?"j":""}: ${L(b.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${b.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${b.origin}`;default:return"Nevalida enigo"}}};function yY(){return{localeError:xf()}}var hf=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},I={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function U(D){return $[D]??null}function b(D){return I[D]??D}let w=(D)=>{let W=typeof D;switch(W){case"number":return Number.isNaN(D)?"NaN":"number";case"object":{if(Array.isArray(D))return"array";if(D===null)return"null";if(Object.getPrototypeOf(D)!==Object.prototype)return D.constructor.name;return"object"}}return W},X={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(D)=>{switch(D.code){case"invalid_type":return`Entrada inválida: se esperaba ${b(D.expected)}, recibido ${b(w(D.input))}`;case"invalid_value":if(D.values.length===1)return`Entrada inválida: se esperaba ${j(D.values[0])}`;return`Opción inválida: se esperaba una de ${L(D.values,"|")}`;case"too_big":{let W=D.inclusive?"<=":"<",Q=U(D.origin),G=b(D.origin);if(Q)return`Demasiado grande: se esperaba que ${G??"valor"} tuviera ${W}${D.maximum.toString()} ${Q.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${G??"valor"} fuera ${W}${D.maximum.toString()}`}case"too_small":{let W=D.inclusive?">=":">",Q=U(D.origin),G=b(D.origin);if(Q)return`Demasiado pequeño: se esperaba que ${G} tuviera ${W}${D.minimum.toString()} ${Q.unit}`;return`Demasiado pequeño: se esperaba que ${G} fuera ${W}${D.minimum.toString()}`}case"invalid_format":{let W=D;if(W.format==="starts_with")return`Cadena inválida: debe comenzar con "${W.prefix}"`;if(W.format==="ends_with")return`Cadena inválida: debe terminar en "${W.suffix}"`;if(W.format==="includes")return`Cadena inválida: debe incluir "${W.includes}"`;if(W.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${W.pattern}`;return`Inválido ${X[W.format]??D.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${D.divisor}`;case"unrecognized_keys":return`Llave${D.keys.length>1?"s":""} desconocida${D.keys.length>1?"s":""}: ${L(D.keys,", ")}`;case"invalid_key":return`Llave inválida en ${b(D.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${b(D.origin)}`;default:return"Entrada inválida"}}};function uY(){return{localeError:hf()}}var ff=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"عدد";case"object":{if(Array.isArray(w))return"آرایه";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return(w)=>{switch(w.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${w.expected} میبود، ${U(w.input)} دریافت شد`;case"invalid_value":if(w.values.length===1)return`ورودی نامعتبر: میبایست ${j(w.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${L(w.values,"|")} میبود`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`خیلی بزرگ: ${w.origin??"مقدار"} باید ${X}${w.maximum.toString()} ${D.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${w.origin??"مقدار"} باید ${X}${w.maximum.toString()} باشد`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`خیلی کوچک: ${w.origin} باید ${X}${w.minimum.toString()} ${D.unit} باشد`;return`خیلی کوچک: ${w.origin} باید ${X}${w.minimum.toString()} باشد`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`رشته نامعتبر: باید با "${X.prefix}" شروع شود`;if(X.format==="ends_with")return`رشته نامعتبر: باید با "${X.suffix}" تمام شود`;if(X.format==="includes")return`رشته نامعتبر: باید شامل "${X.includes}" باشد`;if(X.format==="regex")return`رشته نامعتبر: باید با الگوی ${X.pattern} مطابقت داشته باشد`;return`${b[X.format]??w.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${w.divisor} باشد`;case"unrecognized_keys":return`کلید${w.keys.length>1?"های":""} ناشناس: ${L(w.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${w.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${w.origin}`;default:return"ورودی نامعتبر"}}};function lY(){return{localeError:ff()}}var yf=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return(w)=>{switch(w.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${w.expected}, oli ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Virheellinen syöte: täytyy olla ${j(w.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Liian suuri: ${D.subject} täytyy olla ${X}${w.maximum.toString()} ${D.unit}`.trim();return`Liian suuri: arvon täytyy olla ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Liian pieni: ${D.subject} täytyy olla ${X}${w.minimum.toString()} ${D.unit}`.trim();return`Liian pieni: arvon täytyy olla ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${X.prefix}"`;if(X.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${X.suffix}"`;if(X.format==="includes")return`Virheellinen syöte: täytyy sisältää "${X.includes}"`;if(X.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${X.pattern}`;return`Virheellinen ${b[X.format]??w.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${w.divisor} monikerta`;case"unrecognized_keys":return`${w.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(w.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function cY(){return{localeError:yf()}}var uf=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"nombre";case"object":{if(Array.isArray(w))return"tableau";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(w)=>{switch(w.code){case"invalid_type":return`Entrée invalide : ${w.expected} attendu, ${U(w.input)} reçu`;case"invalid_value":if(w.values.length===1)return`Entrée invalide : ${j(w.values[0])} attendu`;return`Option invalide : une valeur parmi ${L(w.values,"|")} attendue`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Trop grand : ${w.origin??"valeur"} doit ${D.verb} ${X}${w.maximum.toString()} ${D.unit??"élément(s)"}`;return`Trop grand : ${w.origin??"valeur"} doit être ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Trop petit : ${w.origin} doit ${D.verb} ${X}${w.minimum.toString()} ${D.unit}`;return`Trop petit : ${w.origin} doit être ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Chaîne invalide : doit commencer par "${X.prefix}"`;if(X.format==="ends_with")return`Chaîne invalide : doit se terminer par "${X.suffix}"`;if(X.format==="includes")return`Chaîne invalide : doit inclure "${X.includes}"`;if(X.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${X.pattern}`;return`${b[X.format]??w.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${w.divisor}`;case"unrecognized_keys":return`Clé${w.keys.length>1?"s":""} non reconnue${w.keys.length>1?"s":""} : ${L(w.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${w.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${w.origin}`;default:return"Entrée invalide"}}};function mY(){return{localeError:uf()}}var lf=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(w)=>{switch(w.code){case"invalid_type":return`Entrée invalide : attendu ${w.expected}, reçu ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Entrée invalide : attendu ${j(w.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"≤":"<",D=I(w.origin);if(D)return`Trop grand : attendu que ${w.origin??"la valeur"} ait ${X}${w.maximum.toString()} ${D.unit}`;return`Trop grand : attendu que ${w.origin??"la valeur"} soit ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?"≥":">",D=I(w.origin);if(D)return`Trop petit : attendu que ${w.origin} ait ${X}${w.minimum.toString()} ${D.unit}`;return`Trop petit : attendu que ${w.origin} soit ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Chaîne invalide : doit commencer par "${X.prefix}"`;if(X.format==="ends_with")return`Chaîne invalide : doit se terminer par "${X.suffix}"`;if(X.format==="includes")return`Chaîne invalide : doit inclure "${X.includes}"`;if(X.format==="regex")return`Chaîne invalide : doit correspondre au motif ${X.pattern}`;return`${b[X.format]??w.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${w.divisor}`;case"unrecognized_keys":return`Clé${w.keys.length>1?"s":""} non reconnue${w.keys.length>1?"s":""} : ${L(w.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${w.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${w.origin}`;default:return"Entrée invalide"}}};function rY(){return{localeError:lf()}}var cf=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},U=(G)=>G?$[G]:void 0,b=(G)=>{let N=U(G);if(N)return N.label;return G??$.unknown.label},w=(G)=>`ה${b(G)}`,X=(G)=>{return(U(G)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},D=(G)=>{if(!G)return null;return I[G]??null},W=(G)=>{let N=typeof G;switch(N){case"number":return Number.isNaN(G)?"NaN":"number";case"object":{if(Array.isArray(G))return"array";if(G===null)return"null";if(Object.getPrototypeOf(G)!==Object.prototype&&G.constructor)return G.constructor.name;return"object"}default:return N}},Q={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return(G)=>{switch(G.code){case"invalid_type":{let N=G.expected,B=b(N),H=W(G.input),J=$[H]?.label??H;return`קלט לא תקין: צריך להיות ${B}, התקבל ${J}`}case"invalid_value":{if(G.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(G.values[0])}`;let N=G.values.map((J)=>j(J));if(G.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${N[0]} או ${N[1]}`;let B=N[N.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${N.slice(0,-1).join(", ")} או ${B}`}case"too_big":{let N=D(G.origin),B=w(G.origin??"value");if(G.origin==="string")return`${N?.longLabel??"ארוך"} מדי: ${B} צריכה להכיל ${G.maximum.toString()} ${N?.unit??""} ${G.inclusive?"או פחות":"לכל היותר"}`.trim();if(G.origin==="number"){let A=G.inclusive?`קטן או שווה ל-${G.maximum}`:`קטן מ-${G.maximum}`;return`גדול מדי: ${B} צריך להיות ${A}`}if(G.origin==="array"||G.origin==="set"){let A=G.origin==="set"?"צריכה":"צריך",O=G.inclusive?`${G.maximum} ${N?.unit??""} או פחות`:`פחות מ-${G.maximum} ${N?.unit??""}`;return`גדול מדי: ${B} ${A} להכיל ${O}`.trim()}let H=G.inclusive?"<=":"<",J=X(G.origin??"value");if(N?.unit)return`${N.longLabel} מדי: ${B} ${J} ${H}${G.maximum.toString()} ${N.unit}`;return`${N?.longLabel??"גדול"} מדי: ${B} ${J} ${H}${G.maximum.toString()}`}case"too_small":{let N=D(G.origin),B=w(G.origin??"value");if(G.origin==="string")return`${N?.shortLabel??"קצר"} מדי: ${B} צריכה להכיל ${G.minimum.toString()} ${N?.unit??""} ${G.inclusive?"או יותר":"לפחות"}`.trim();if(G.origin==="number"){let A=G.inclusive?`גדול או שווה ל-${G.minimum}`:`גדול מ-${G.minimum}`;return`קטן מדי: ${B} צריך להיות ${A}`}if(G.origin==="array"||G.origin==="set"){let A=G.origin==="set"?"צריכה":"צריך";if(G.minimum===1&&G.inclusive){let V=G.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${B} ${A} להכיל ${V}`}let O=G.inclusive?`${G.minimum} ${N?.unit??""} או יותר`:`יותר מ-${G.minimum} ${N?.unit??""}`;return`קטן מדי: ${B} ${A} להכיל ${O}`.trim()}let H=G.inclusive?">=":">",J=X(G.origin??"value");if(N?.unit)return`${N.shortLabel} מדי: ${B} ${J} ${H}${G.minimum.toString()} ${N.unit}`;return`${N?.shortLabel??"קטן"} מדי: ${B} ${J} ${H}${G.minimum.toString()}`}case"invalid_format":{let N=G;if(N.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${N.prefix}"`;if(N.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${N.suffix}"`;if(N.format==="includes")return`המחרוזת חייבת לכלול "${N.includes}"`;if(N.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${N.pattern}`;let B=Q[N.format],H=B?.label??N.format,A=(B?.gender??"m")==="f"?"תקינה":"תקין";return`${H} לא ${A}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${G.divisor}`;case"unrecognized_keys":return`מפתח${G.keys.length>1?"ות":""} לא מזוה${G.keys.length>1?"ים":"ה"}: ${L(G.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${w(G.origin??"array")}`;default:return"קלט לא תקין"}}};function nY(){return{localeError:cf()}}var mf=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"szám";case"object":{if(Array.isArray(w))return"tömb";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return(w)=>{switch(w.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${w.expected}, a kapott érték ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(w.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Túl nagy: ${w.origin??"érték"} mérete túl nagy ${X}${w.maximum.toString()} ${D.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${w.origin??"érték"} túl nagy: ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Túl kicsi: a bemeneti érték ${w.origin} mérete túl kicsi ${X}${w.minimum.toString()} ${D.unit}`;return`Túl kicsi: a bemeneti érték ${w.origin} túl kicsi ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Érvénytelen string: "${X.prefix}" értékkel kell kezdődnie`;if(X.format==="ends_with")return`Érvénytelen string: "${X.suffix}" értékkel kell végződnie`;if(X.format==="includes")return`Érvénytelen string: "${X.includes}" értéket kell tartalmaznia`;if(X.format==="regex")return`Érvénytelen string: ${X.pattern} mintának kell megfelelnie`;return`Érvénytelen ${b[X.format]??w.format}`}case"not_multiple_of":return`Érvénytelen szám: ${w.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${w.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${w.origin}`;default:return"Érvénytelen bemenet"}}};function iY(){return{localeError:mf()}}var rf=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`Input tidak valid: diharapkan ${w.expected}, diterima ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Input tidak valid: diharapkan ${j(w.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Terlalu besar: diharapkan ${w.origin??"value"} memiliki ${X}${w.maximum.toString()} ${D.unit??"elemen"}`;return`Terlalu besar: diharapkan ${w.origin??"value"} menjadi ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Terlalu kecil: diharapkan ${w.origin} memiliki ${X}${w.minimum.toString()} ${D.unit}`;return`Terlalu kecil: diharapkan ${w.origin} menjadi ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`String tidak valid: harus dimulai dengan "${X.prefix}"`;if(X.format==="ends_with")return`String tidak valid: harus berakhir dengan "${X.suffix}"`;if(X.format==="includes")return`String tidak valid: harus menyertakan "${X.includes}"`;if(X.format==="regex")return`String tidak valid: harus sesuai pola ${X.pattern}`;return`${b[X.format]??w.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${w.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${w.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${w.origin}`;default:return"Input tidak valid"}}};function oY(){return{localeError:rf()}}var nf=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"númer";case"object":{if(Array.isArray($))return"fylki";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return I},of=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(b){return $[b]??null}let U={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return(b)=>{switch(b.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${nf(b.input)} þar sem á að vera ${b.expected}`;case"invalid_value":if(b.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(b.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${L(b.values,"|")}`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`Of stórt: gert er ráð fyrir að ${b.origin??"gildi"} hafi ${w}${b.maximum.toString()} ${X.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${b.origin??"gildi"} sé ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`Of lítið: gert er ráð fyrir að ${b.origin} hafi ${w}${b.minimum.toString()} ${X.unit}`;return`Of lítið: gert er ráð fyrir að ${b.origin} sé ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Ógildur strengur: verður að byrja á "${w.prefix}"`;if(w.format==="ends_with")return`Ógildur strengur: verður að enda á "${w.suffix}"`;if(w.format==="includes")return`Ógildur strengur: verður að innihalda "${w.includes}"`;if(w.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${w.pattern}`;return`Rangt ${U[w.format]??b.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${b.divisor}`;case"unrecognized_keys":return`Óþekkt ${b.keys.length>1?"ir lyklar":"ur lykill"}: ${L(b.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${b.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${b.origin}`;default:return"Rangt gildi"}}};function dY(){return{localeError:of()}}var df=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"numero";case"object":{if(Array.isArray(w))return"vettore";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`Input non valido: atteso ${w.expected}, ricevuto ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Input non valido: atteso ${j(w.values[0])}`;return`Opzione non valida: atteso uno tra ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Troppo grande: ${w.origin??"valore"} deve avere ${X}${w.maximum.toString()} ${D.unit??"elementi"}`;return`Troppo grande: ${w.origin??"valore"} deve essere ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Troppo piccolo: ${w.origin} deve avere ${X}${w.minimum.toString()} ${D.unit}`;return`Troppo piccolo: ${w.origin} deve essere ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Stringa non valida: deve iniziare con "${X.prefix}"`;if(X.format==="ends_with")return`Stringa non valida: deve terminare con "${X.suffix}"`;if(X.format==="includes")return`Stringa non valida: deve includere "${X.includes}"`;if(X.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${X.pattern}`;return`Invalid ${b[X.format]??w.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${w.divisor}`;case"unrecognized_keys":return`Chiav${w.keys.length>1?"i":"e"} non riconosciut${w.keys.length>1?"e":"a"}: ${L(w.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${w.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${w.origin}`;default:return"Input non valido"}}};function pY(){return{localeError:df()}}var pf=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"数値";case"object":{if(Array.isArray(w))return"配列";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return(w)=>{switch(w.code){case"invalid_type":return`無効な入力: ${w.expected}が期待されましたが、${U(w.input)}が入力されました`;case"invalid_value":if(w.values.length===1)return`無効な入力: ${j(w.values[0])}が期待されました`;return`無効な選択: ${L(w.values,"、")}のいずれかである必要があります`;case"too_big":{let X=w.inclusive?"以下である":"より小さい",D=I(w.origin);if(D)return`大きすぎる値: ${w.origin??"値"}は${w.maximum.toString()}${D.unit??"要素"}${X}必要があります`;return`大きすぎる値: ${w.origin??"値"}は${w.maximum.toString()}${X}必要があります`}case"too_small":{let X=w.inclusive?"以上である":"より大きい",D=I(w.origin);if(D)return`小さすぎる値: ${w.origin}は${w.minimum.toString()}${D.unit}${X}必要があります`;return`小さすぎる値: ${w.origin}は${w.minimum.toString()}${X}必要があります`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`無効な文字列: "${X.prefix}"で始まる必要があります`;if(X.format==="ends_with")return`無効な文字列: "${X.suffix}"で終わる必要があります`;if(X.format==="includes")return`無効な文字列: "${X.includes}"を含む必要があります`;if(X.format==="regex")return`無効な文字列: パターン${X.pattern}に一致する必要があります`;return`無効な${b[X.format]??w.format}`}case"not_multiple_of":return`無効な数値: ${w.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${w.keys.length>1?"群":""}: ${L(w.keys,"、")}`;case"invalid_key":return`${w.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${w.origin}内の無効な値`;default:return"無効な入力"}}};function tY(){return{localeError:pf()}}var tf=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"რიცხვი";case"object":{if(Array.isArray($))return"მასივი";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[I]??I},af=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(b){return $[b]??null}let U={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return(b)=>{switch(b.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${b.expected}, მიღებული ${tf(b.input)}`;case"invalid_value":if(b.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(b.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${L(b.values,"|")}-დან`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`ზედმეტად დიდი: მოსალოდნელი ${b.origin??"მნიშვნელობა"} ${X.verb} ${w}${b.maximum.toString()} ${X.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${b.origin??"მნიშვნელობა"} იყოს ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`ზედმეტად პატარა: მოსალოდნელი ${b.origin} ${X.verb} ${w}${b.minimum.toString()} ${X.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${b.origin} იყოს ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${w.prefix}"-ით`;if(w.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${w.suffix}"-ით`;if(w.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${w.includes}"-ს`;if(w.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${w.pattern}`;return`არასწორი ${U[w.format]??b.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${b.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${b.keys.length>1?"ები":"ი"}: ${L(b.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${b.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${b.origin}-ში`;default:return"არასწორი შეყვანა"}}};function aY(){return{localeError:af()}}var ef=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(w))return"អារេ (Array)";if(w===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return(w)=>{switch(w.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${w.expected} ប៉ុន្តែទទួលបាន ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(w.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`ធំពេក៖ ត្រូវការ ${w.origin??"តម្លៃ"} ${X} ${w.maximum.toString()} ${D.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${w.origin??"តម្លៃ"} ${X} ${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`តូចពេក៖ ត្រូវការ ${w.origin} ${X} ${w.minimum.toString()} ${D.unit}`;return`តូចពេក៖ ត្រូវការ ${w.origin} ${X} ${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${X.prefix}"`;if(X.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${X.suffix}"`;if(X.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${X.includes}"`;if(X.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${X.pattern}`;return`មិនត្រឹមត្រូវ៖ ${b[X.format]??w.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${w.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${L(w.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${w.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${w.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function $0(){return{localeError:ef()}}function eY(){return $0()}var sf=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return(w)=>{switch(w.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${w.expected}, 받은 타입은 ${U(w.input)}입니다`;case"invalid_value":if(w.values.length===1)return`잘못된 입력: 값은 ${j(w.values[0])} 이어야 합니다`;return`잘못된 옵션: ${L(w.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let X=w.inclusive?"이하":"미만",D=X==="미만"?"이어야 합니다":"여야 합니다",W=I(w.origin),Q=W?.unit??"요소";if(W)return`${w.origin??"값"}이 너무 큽니다: ${w.maximum.toString()}${Q} ${X}${D}`;return`${w.origin??"값"}이 너무 큽니다: ${w.maximum.toString()} ${X}${D}`}case"too_small":{let X=w.inclusive?"이상":"초과",D=X==="이상"?"이어야 합니다":"여야 합니다",W=I(w.origin),Q=W?.unit??"요소";if(W)return`${w.origin??"값"}이 너무 작습니다: ${w.minimum.toString()}${Q} ${X}${D}`;return`${w.origin??"값"}이 너무 작습니다: ${w.minimum.toString()} ${X}${D}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`잘못된 문자열: "${X.prefix}"(으)로 시작해야 합니다`;if(X.format==="ends_with")return`잘못된 문자열: "${X.suffix}"(으)로 끝나야 합니다`;if(X.format==="includes")return`잘못된 문자열: "${X.includes}"을(를) 포함해야 합니다`;if(X.format==="regex")return`잘못된 문자열: 정규식 ${X.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${b[X.format]??w.format}`}case"not_multiple_of":return`잘못된 숫자: ${w.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${L(w.keys,", ")}`;case"invalid_key":return`잘못된 키: ${w.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${w.origin}`;default:return"잘못된 입력"}}};function sY(){return{localeError:sf()}}var $y=($)=>{return U0(typeof $,$)},U0=($,I=void 0)=>{switch($){case"number":return Number.isNaN(I)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":{if(I===void 0)return"nežinomas objektas";if(I===null)return"nulinė reikšmė";if(Array.isArray(I))return"masyvas";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name;return"objektas"}case"null":return"nulinė reikšmė"}return $},I0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function Oq($){let I=Math.abs($),U=I%10,b=I%100;if(b>=11&&b<=19||U===0)return"many";if(U===1)return"one";return"few"}var Iy=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(b,w,X,D){let W=$[b]??null;if(W===null)return W;return{unit:W.unit[w],verb:W.verb[D][X?"inclusive":"notInclusive"]}}let U={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return(b)=>{switch(b.code){case"invalid_type":return`Gautas tipas ${$y(b.input)}, o tikėtasi - ${U0(b.expected)}`;case"invalid_value":if(b.values.length===1)return`Privalo būti ${j(b.values[0])}`;return`Privalo būti vienas iš ${L(b.values,"|")} pasirinkimų`;case"too_big":{let w=U0(b.origin),X=I(b.origin,Oq(Number(b.maximum)),b.inclusive??!1,"smaller");if(X?.verb)return`${I0(w??b.origin??"reikšmė")} ${X.verb} ${b.maximum.toString()} ${X.unit??"elementų"}`;let D=b.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${I0(w??b.origin??"reikšmė")} turi būti ${D} ${b.maximum.toString()} ${X?.unit}`}case"too_small":{let w=U0(b.origin),X=I(b.origin,Oq(Number(b.minimum)),b.inclusive??!1,"bigger");if(X?.verb)return`${I0(w??b.origin??"reikšmė")} ${X.verb} ${b.minimum.toString()} ${X.unit??"elementų"}`;let D=b.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${I0(w??b.origin??"reikšmė")} turi būti ${D} ${b.minimum.toString()} ${X?.unit}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Eilutė privalo prasidėti "${w.prefix}"`;if(w.format==="ends_with")return`Eilutė privalo pasibaigti "${w.suffix}"`;if(w.format==="includes")return`Eilutė privalo įtraukti "${w.includes}"`;if(w.format==="regex")return`Eilutė privalo atitikti ${w.pattern}`;return`Neteisingas ${U[w.format]??b.format}`}case"not_multiple_of":return`Skaičius privalo būti ${b.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${b.keys.length>1?"i":"as"} rakt${b.keys.length>1?"ai":"as"}: ${L(b.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let w=U0(b.origin);return`${I0(w??b.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function $7(){return{localeError:Iy()}}var Uy=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"број";case"object":{if(Array.isArray(w))return"низа";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return(w)=>{switch(w.code){case"invalid_type":return`Грешен внес: се очекува ${w.expected}, примено ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Invalid input: expected ${j(w.values[0])}`;return`Грешана опција: се очекува една ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Премногу голем: се очекува ${w.origin??"вредноста"} да има ${X}${w.maximum.toString()} ${D.unit??"елементи"}`;return`Премногу голем: се очекува ${w.origin??"вредноста"} да биде ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Премногу мал: се очекува ${w.origin} да има ${X}${w.minimum.toString()} ${D.unit}`;return`Премногу мал: се очекува ${w.origin} да биде ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Неважечка низа: мора да започнува со "${X.prefix}"`;if(X.format==="ends_with")return`Неважечка низа: мора да завршува со "${X.suffix}"`;if(X.format==="includes")return`Неважечка низа: мора да вклучува "${X.includes}"`;if(X.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${X.pattern}`;return`Invalid ${b[X.format]??w.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${w.divisor}`;case"unrecognized_keys":return`${w.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${L(w.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${w.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${w.origin}`;default:return"Грешен внес"}}};function I7(){return{localeError:Uy()}}var wy=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"nombor";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`Input tidak sah: dijangka ${w.expected}, diterima ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Input tidak sah: dijangka ${j(w.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Terlalu besar: dijangka ${w.origin??"nilai"} ${D.verb} ${X}${w.maximum.toString()} ${D.unit??"elemen"}`;return`Terlalu besar: dijangka ${w.origin??"nilai"} adalah ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Terlalu kecil: dijangka ${w.origin} ${D.verb} ${X}${w.minimum.toString()} ${D.unit}`;return`Terlalu kecil: dijangka ${w.origin} adalah ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`String tidak sah: mesti bermula dengan "${X.prefix}"`;if(X.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${X.suffix}"`;if(X.format==="includes")return`String tidak sah: mesti mengandungi "${X.includes}"`;if(X.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${X.pattern}`;return`${b[X.format]??w.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${w.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(w.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${w.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${w.origin}`;default:return"Input tidak sah"}}};function U7(){return{localeError:wy()}}var by=()=>{let $={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"getal";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return(w)=>{switch(w.code){case"invalid_type":return`Ongeldige invoer: verwacht ${w.expected}, ontving ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Ongeldige invoer: verwacht ${j(w.values[0])}`;return`Ongeldige optie: verwacht één van ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Te groot: verwacht dat ${w.origin??"waarde"} ${D.verb} ${X}${w.maximum.toString()} ${D.unit??"elementen"}`;return`Te groot: verwacht dat ${w.origin??"waarde"} ${X}${w.maximum.toString()} is`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Te klein: verwacht dat ${w.origin} ${D.verb} ${X}${w.minimum.toString()} ${D.unit}`;return`Te klein: verwacht dat ${w.origin} ${X}${w.minimum.toString()} is`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Ongeldige tekst: moet met "${X.prefix}" beginnen`;if(X.format==="ends_with")return`Ongeldige tekst: moet op "${X.suffix}" eindigen`;if(X.format==="includes")return`Ongeldige tekst: moet "${X.includes}" bevatten`;if(X.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${X.pattern}`;return`Ongeldig: ${b[X.format]??w.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${w.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${w.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${w.origin}`;default:return"Ongeldige invoer"}}};function w7(){return{localeError:by()}}var Xy=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"tall";case"object":{if(Array.isArray(w))return"liste";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`Ugyldig input: forventet ${w.expected}, fikk ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Ugyldig verdi: forventet ${j(w.values[0])}`;return`Ugyldig valg: forventet en av ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`For stor(t): forventet ${w.origin??"value"} til å ha ${X}${w.maximum.toString()} ${D.unit??"elementer"}`;return`For stor(t): forventet ${w.origin??"value"} til å ha ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`For lite(n): forventet ${w.origin} til å ha ${X}${w.minimum.toString()} ${D.unit}`;return`For lite(n): forventet ${w.origin} til å ha ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Ugyldig streng: må starte med "${X.prefix}"`;if(X.format==="ends_with")return`Ugyldig streng: må ende med "${X.suffix}"`;if(X.format==="includes")return`Ugyldig streng: må inneholde "${X.includes}"`;if(X.format==="regex")return`Ugyldig streng: må matche mønsteret ${X.pattern}`;return`Ugyldig ${b[X.format]??w.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${w.divisor}`;case"unrecognized_keys":return`${w.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${L(w.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${w.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${w.origin}`;default:return"Ugyldig input"}}};function b7(){return{localeError:Xy()}}var Dy=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"numara";case"object":{if(Array.isArray(w))return"saf";if(w===null)return"gayb";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return(w)=>{switch(w.code){case"invalid_type":return`Fâsit giren: umulan ${w.expected}, alınan ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Fâsit giren: umulan ${j(w.values[0])}`;return`Fâsit tercih: mûteberler ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Fazla büyük: ${w.origin??"value"}, ${X}${w.maximum.toString()} ${D.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${w.origin??"value"}, ${X}${w.maximum.toString()} olmalıydı.`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Fazla küçük: ${w.origin}, ${X}${w.minimum.toString()} ${D.unit} sahip olmalıydı.`;return`Fazla küçük: ${w.origin}, ${X}${w.minimum.toString()} olmalıydı.`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Fâsit metin: "${X.prefix}" ile başlamalı.`;if(X.format==="ends_with")return`Fâsit metin: "${X.suffix}" ile bitmeli.`;if(X.format==="includes")return`Fâsit metin: "${X.includes}" ihtivâ etmeli.`;if(X.format==="regex")return`Fâsit metin: ${X.pattern} nakşına uymalı.`;return`Fâsit ${b[X.format]??w.format}`}case"not_multiple_of":return`Fâsit sayı: ${w.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`${w.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${w.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function X7(){return{localeError:Dy()}}var Wy=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"عدد";case"object":{if(Array.isArray(w))return"ارې";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return(w)=>{switch(w.code){case"invalid_type":return`ناسم ورودي: باید ${w.expected} وای, مګر ${U(w.input)} ترلاسه شو`;case"invalid_value":if(w.values.length===1)return`ناسم ورودي: باید ${j(w.values[0])} وای`;return`ناسم انتخاب: باید یو له ${L(w.values,"|")} څخه وای`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`ډیر لوی: ${w.origin??"ارزښت"} باید ${X}${w.maximum.toString()} ${D.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${w.origin??"ارزښت"} باید ${X}${w.maximum.toString()} وي`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`ډیر کوچنی: ${w.origin} باید ${X}${w.minimum.toString()} ${D.unit} ولري`;return`ډیر کوچنی: ${w.origin} باید ${X}${w.minimum.toString()} وي`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`ناسم متن: باید د "${X.prefix}" سره پیل شي`;if(X.format==="ends_with")return`ناسم متن: باید د "${X.suffix}" سره پای ته ورسيږي`;if(X.format==="includes")return`ناسم متن: باید "${X.includes}" ولري`;if(X.format==="regex")return`ناسم متن: باید د ${X.pattern} سره مطابقت ولري`;return`${b[X.format]??w.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${w.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${w.keys.length>1?"کلیډونه":"کلیډ"}: ${L(w.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${w.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${w.origin} کې`;default:return"ناسمه ورودي"}}};function D7(){return{localeError:Wy()}}var Qy=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"liczba";case"object":{if(Array.isArray(w))return"tablica";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return(w)=>{switch(w.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${w.expected}, otrzymano ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(w.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Za duża wartość: oczekiwano, że ${w.origin??"wartość"} będzie mieć ${X}${w.maximum.toString()} ${D.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${w.origin??"wartość"} będzie wynosić ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Za mała wartość: oczekiwano, że ${w.origin??"wartość"} będzie mieć ${X}${w.minimum.toString()} ${D.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${w.origin??"wartość"} będzie wynosić ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${X.prefix}"`;if(X.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${X.suffix}"`;if(X.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${X.includes}"`;if(X.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${X.pattern}`;return`Nieprawidłow(y/a/e) ${b[X.format]??w.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${w.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${w.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${w.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function W7(){return{localeError:Qy()}}var Gy=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"número";case"object":{if(Array.isArray(w))return"array";if(w===null)return"nulo";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(w)=>{switch(w.code){case"invalid_type":return`Tipo inválido: esperado ${w.expected}, recebido ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Entrada inválida: esperado ${j(w.values[0])}`;return`Opção inválida: esperada uma das ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Muito grande: esperado que ${w.origin??"valor"} tivesse ${X}${w.maximum.toString()} ${D.unit??"elementos"}`;return`Muito grande: esperado que ${w.origin??"valor"} fosse ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Muito pequeno: esperado que ${w.origin} tivesse ${X}${w.minimum.toString()} ${D.unit}`;return`Muito pequeno: esperado que ${w.origin} fosse ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Texto inválido: deve começar com "${X.prefix}"`;if(X.format==="ends_with")return`Texto inválido: deve terminar com "${X.suffix}"`;if(X.format==="includes")return`Texto inválido: deve incluir "${X.includes}"`;if(X.format==="regex")return`Texto inválido: deve corresponder ao padrão ${X.pattern}`;return`${b[X.format]??w.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${w.divisor}`;case"unrecognized_keys":return`Chave${w.keys.length>1?"s":""} desconhecida${w.keys.length>1?"s":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Chave inválida em ${w.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${w.origin}`;default:return"Campo inválido"}}};function Q7(){return{localeError:Gy()}}function zq($,I,U,b){let w=Math.abs($),X=w%10,D=w%100;if(D>=11&&D<=19)return b;if(X===1)return I;if(X>=2&&X<=4)return U;return b}var Ny=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"число";case"object":{if(Array.isArray(w))return"массив";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return(w)=>{switch(w.code){case"invalid_type":return`Неверный ввод: ожидалось ${w.expected}, получено ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Неверный ввод: ожидалось ${j(w.values[0])}`;return`Неверный вариант: ожидалось одно из ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D){let W=Number(w.maximum),Q=zq(W,D.unit.one,D.unit.few,D.unit.many);return`Слишком большое значение: ожидалось, что ${w.origin??"значение"} будет иметь ${X}${w.maximum.toString()} ${Q}`}return`Слишком большое значение: ожидалось, что ${w.origin??"значение"} будет ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D){let W=Number(w.minimum),Q=zq(W,D.unit.one,D.unit.few,D.unit.many);return`Слишком маленькое значение: ожидалось, что ${w.origin} будет иметь ${X}${w.minimum.toString()} ${Q}`}return`Слишком маленькое значение: ожидалось, что ${w.origin} будет ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Неверная строка: должна начинаться с "${X.prefix}"`;if(X.format==="ends_with")return`Неверная строка: должна заканчиваться на "${X.suffix}"`;if(X.format==="includes")return`Неверная строка: должна содержать "${X.includes}"`;if(X.format==="regex")return`Неверная строка: должна соответствовать шаблону ${X.pattern}`;return`Неверный ${b[X.format]??w.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${w.divisor}`;case"unrecognized_keys":return`Нераспознанн${w.keys.length>1?"ые":"ый"} ключ${w.keys.length>1?"и":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${w.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${w.origin}`;default:return"Неверные входные данные"}}};function G7(){return{localeError:Ny()}}var Yy=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"število";case"object":{if(Array.isArray(w))return"tabela";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return(w)=>{switch(w.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${w.expected}, prejeto ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Neveljaven vnos: pričakovano ${j(w.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Preveliko: pričakovano, da bo ${w.origin??"vrednost"} imelo ${X}${w.maximum.toString()} ${D.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${w.origin??"vrednost"} ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Premajhno: pričakovano, da bo ${w.origin} imelo ${X}${w.minimum.toString()} ${D.unit}`;return`Premajhno: pričakovano, da bo ${w.origin} ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Neveljaven niz: mora se začeti z "${X.prefix}"`;if(X.format==="ends_with")return`Neveljaven niz: mora se končati z "${X.suffix}"`;if(X.format==="includes")return`Neveljaven niz: mora vsebovati "${X.includes}"`;if(X.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${X.pattern}`;return`Neveljaven ${b[X.format]??w.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${w.divisor}`;case"unrecognized_keys":return`Neprepoznan${w.keys.length>1?"i ključi":" ključ"}: ${L(w.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${w.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${w.origin}`;default:return"Neveljaven vnos"}}};function N7(){return{localeError:Yy()}}var By=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"antal";case"object":{if(Array.isArray(w))return"lista";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return(w)=>{switch(w.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${w.expected}, fick ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Ogiltig inmatning: förväntat ${j(w.values[0])}`;return`Ogiltigt val: förväntade en av ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`För stor(t): förväntade ${w.origin??"värdet"} att ha ${X}${w.maximum.toString()} ${D.unit??"element"}`;return`För stor(t): förväntat ${w.origin??"värdet"} att ha ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`För lite(t): förväntade ${w.origin??"värdet"} att ha ${X}${w.minimum.toString()} ${D.unit}`;return`För lite(t): förväntade ${w.origin??"värdet"} att ha ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Ogiltig sträng: måste börja med "${X.prefix}"`;if(X.format==="ends_with")return`Ogiltig sträng: måste sluta med "${X.suffix}"`;if(X.format==="includes")return`Ogiltig sträng: måste innehålla "${X.includes}"`;if(X.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${X.pattern}"`;return`Ogiltig(t) ${b[X.format]??w.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${w.divisor}`;case"unrecognized_keys":return`${w.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${L(w.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${w.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${w.origin??"värdet"}`;default:return"Ogiltig input"}}};function Y7(){return{localeError:By()}}var Jy=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(w))return"அணி";if(w===null)return"வெறுமை";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return(w)=>{switch(w.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${w.expected}, பெறப்பட்டது ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(w.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${L(w.values,"|")} இல் ஒன்று`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${w.origin??"மதிப்பு"} ${X}${w.maximum.toString()} ${D.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${w.origin??"மதிப்பு"} ${X}${w.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${w.origin} ${X}${w.minimum.toString()} ${D.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${w.origin} ${X}${w.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`தவறான சரம்: "${X.prefix}" இல் தொடங்க வேண்டும்`;if(X.format==="ends_with")return`தவறான சரம்: "${X.suffix}" இல் முடிவடைய வேண்டும்`;if(X.format==="includes")return`தவறான சரம்: "${X.includes}" ஐ உள்ளடக்க வேண்டும்`;if(X.format==="regex")return`தவறான சரம்: ${X.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${b[X.format]??w.format}`}case"not_multiple_of":return`தவறான எண்: ${w.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${w.keys.length>1?"கள்":""}: ${L(w.keys,", ")}`;case"invalid_key":return`${w.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${w.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function B7(){return{localeError:Jy()}}var Hy=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(w))return"อาร์เรย์ (Array)";if(w===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return(w)=>{switch(w.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${w.expected} แต่ได้รับ ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(w.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"ไม่เกิน":"น้อยกว่า",D=I(w.origin);if(D)return`เกินกำหนด: ${w.origin??"ค่า"} ควรมี${X} ${w.maximum.toString()} ${D.unit??"รายการ"}`;return`เกินกำหนด: ${w.origin??"ค่า"} ควรมี${X} ${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?"อย่างน้อย":"มากกว่า",D=I(w.origin);if(D)return`น้อยกว่ากำหนด: ${w.origin} ควรมี${X} ${w.minimum.toString()} ${D.unit}`;return`น้อยกว่ากำหนด: ${w.origin} ควรมี${X} ${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${X.prefix}"`;if(X.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${X.suffix}"`;if(X.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${X.includes}" อยู่ในข้อความ`;if(X.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${X.pattern}`;return`รูปแบบไม่ถูกต้อง: ${b[X.format]??w.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${w.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${L(w.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${w.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${w.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function J7(){return{localeError:Hy()}}var Ay=($)=>{let I=typeof $;switch(I){case"number":return Number.isNaN($)?"NaN":"number";case"object":{if(Array.isArray($))return"array";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return I},Oy=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(b){return $[b]??null}let U={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return(b)=>{switch(b.code){case"invalid_type":return`Geçersiz değer: beklenen ${b.expected}, alınan ${Ay(b.input)}`;case"invalid_value":if(b.values.length===1)return`Geçersiz değer: beklenen ${j(b.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${L(b.values,"|")}`;case"too_big":{let w=b.inclusive?"<=":"<",X=I(b.origin);if(X)return`Çok büyük: beklenen ${b.origin??"değer"} ${w}${b.maximum.toString()} ${X.unit??"öğe"}`;return`Çok büyük: beklenen ${b.origin??"değer"} ${w}${b.maximum.toString()}`}case"too_small":{let w=b.inclusive?">=":">",X=I(b.origin);if(X)return`Çok küçük: beklenen ${b.origin} ${w}${b.minimum.toString()} ${X.unit}`;return`Çok küçük: beklenen ${b.origin} ${w}${b.minimum.toString()}`}case"invalid_format":{let w=b;if(w.format==="starts_with")return`Geçersiz metin: "${w.prefix}" ile başlamalı`;if(w.format==="ends_with")return`Geçersiz metin: "${w.suffix}" ile bitmeli`;if(w.format==="includes")return`Geçersiz metin: "${w.includes}" içermeli`;if(w.format==="regex")return`Geçersiz metin: ${w.pattern} desenine uymalı`;return`Geçersiz ${U[w.format]??b.format}`}case"not_multiple_of":return`Geçersiz sayı: ${b.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${b.keys.length>1?"lar":""}: ${L(b.keys,", ")}`;case"invalid_key":return`${b.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${b.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function H7(){return{localeError:Oy()}}var zy=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"число";case"object":{if(Array.isArray(w))return"масив";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return(w)=>{switch(w.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${w.expected}, отримано ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Неправильні вхідні дані: очікується ${j(w.values[0])}`;return`Неправильна опція: очікується одне з ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Занадто велике: очікується, що ${w.origin??"значення"} ${D.verb} ${X}${w.maximum.toString()} ${D.unit??"елементів"}`;return`Занадто велике: очікується, що ${w.origin??"значення"} буде ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Занадто мале: очікується, що ${w.origin} ${D.verb} ${X}${w.minimum.toString()} ${D.unit}`;return`Занадто мале: очікується, що ${w.origin} буде ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Неправильний рядок: повинен починатися з "${X.prefix}"`;if(X.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${X.suffix}"`;if(X.format==="includes")return`Неправильний рядок: повинен містити "${X.includes}"`;if(X.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${X.pattern}`;return`Неправильний ${b[X.format]??w.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${w.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${w.keys.length>1?"і":""}: ${L(w.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${w.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${w.origin}`;default:return"Неправильні вхідні дані"}}};function w0(){return{localeError:zy()}}function A7(){return w0()}var Ly=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"نمبر";case"object":{if(Array.isArray(w))return"آرے";if(w===null)return"نل";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return(w)=>{switch(w.code){case"invalid_type":return`غلط ان پٹ: ${w.expected} متوقع تھا، ${U(w.input)} موصول ہوا`;case"invalid_value":if(w.values.length===1)return`غلط ان پٹ: ${j(w.values[0])} متوقع تھا`;return`غلط آپشن: ${L(w.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`بہت بڑا: ${w.origin??"ویلیو"} کے ${X}${w.maximum.toString()} ${D.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${w.origin??"ویلیو"} کا ${X}${w.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`بہت چھوٹا: ${w.origin} کے ${X}${w.minimum.toString()} ${D.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${w.origin} کا ${X}${w.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`غلط سٹرنگ: "${X.prefix}" سے شروع ہونا چاہیے`;if(X.format==="ends_with")return`غلط سٹرنگ: "${X.suffix}" پر ختم ہونا چاہیے`;if(X.format==="includes")return`غلط سٹرنگ: "${X.includes}" شامل ہونا چاہیے`;if(X.format==="regex")return`غلط سٹرنگ: پیٹرن ${X.pattern} سے میچ ہونا چاہیے`;return`غلط ${b[X.format]??w.format}`}case"not_multiple_of":return`غلط نمبر: ${w.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${w.keys.length>1?"ز":""}: ${L(w.keys,"، ")}`;case"invalid_key":return`${w.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${w.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function O7(){return{localeError:Ly()}}var Ky=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"số";case"object":{if(Array.isArray(w))return"mảng";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return(w)=>{switch(w.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${w.expected}, nhận được ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(w.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Quá lớn: mong đợi ${w.origin??"giá trị"} ${D.verb} ${X}${w.maximum.toString()} ${D.unit??"phần tử"}`;return`Quá lớn: mong đợi ${w.origin??"giá trị"} ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Quá nhỏ: mong đợi ${w.origin} ${D.verb} ${X}${w.minimum.toString()} ${D.unit}`;return`Quá nhỏ: mong đợi ${w.origin} ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${X.prefix}"`;if(X.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${X.suffix}"`;if(X.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${X.includes}"`;if(X.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${X.pattern}`;return`${b[X.format]??w.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${w.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${L(w.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${w.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${w.origin}`;default:return"Đầu vào không hợp lệ"}}};function z7(){return{localeError:Ky()}}var vy=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(w))return"数组";if(w===null)return"空值(null)";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return(w)=>{switch(w.code){case"invalid_type":return`无效输入:期望 ${w.expected},实际接收 ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`无效输入:期望 ${j(w.values[0])}`;return`无效选项:期望以下之一 ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`数值过大:期望 ${w.origin??"值"} ${X}${w.maximum.toString()} ${D.unit??"个元素"}`;return`数值过大:期望 ${w.origin??"值"} ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`数值过小:期望 ${w.origin} ${X}${w.minimum.toString()} ${D.unit}`;return`数值过小:期望 ${w.origin} ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`无效字符串:必须以 "${X.prefix}" 开头`;if(X.format==="ends_with")return`无效字符串:必须以 "${X.suffix}" 结尾`;if(X.format==="includes")return`无效字符串:必须包含 "${X.includes}"`;if(X.format==="regex")return`无效字符串:必须满足正则表达式 ${X.pattern}`;return`无效${b[X.format]??w.format}`}case"not_multiple_of":return`无效数字:必须是 ${w.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${L(w.keys,", ")}`;case"invalid_key":return`${w.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${w.origin} 中包含无效值(value)`;default:return"无效输入"}}};function L7(){return{localeError:vy()}}var Vy=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"number";case"object":{if(Array.isArray(w))return"array";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return(w)=>{switch(w.code){case"invalid_type":return`無效的輸入值:預期為 ${w.expected},但收到 ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`無效的輸入值:預期為 ${j(w.values[0])}`;return`無效的選項:預期為以下其中之一 ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`數值過大:預期 ${w.origin??"值"} 應為 ${X}${w.maximum.toString()} ${D.unit??"個元素"}`;return`數值過大:預期 ${w.origin??"值"} 應為 ${X}${w.maximum.toString()}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`數值過小:預期 ${w.origin} 應為 ${X}${w.minimum.toString()} ${D.unit}`;return`數值過小:預期 ${w.origin} 應為 ${X}${w.minimum.toString()}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`無效的字串:必須以 "${X.prefix}" 開頭`;if(X.format==="ends_with")return`無效的字串:必須以 "${X.suffix}" 結尾`;if(X.format==="includes")return`無效的字串:必須包含 "${X.includes}"`;if(X.format==="regex")return`無效的字串:必須符合格式 ${X.pattern}`;return`無效的 ${b[X.format]??w.format}`}case"not_multiple_of":return`無效的數字:必須為 ${w.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${w.keys.length>1?"們":""}:${L(w.keys,"、")}`;case"invalid_key":return`${w.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${w.origin} 中有無效的值`;default:return"無效的輸入值"}}};function K7(){return{localeError:Vy()}}var qy=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(w){return $[w]??null}let U=(w)=>{let X=typeof w;switch(X){case"number":return Number.isNaN(w)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(w))return"akopọ";if(w===null)return"null";if(Object.getPrototypeOf(w)!==Object.prototype&&w.constructor)return w.constructor.name}}return X},b={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return(w)=>{switch(w.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${w.expected}, àmọ̀ a rí ${U(w.input)}`;case"invalid_value":if(w.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(w.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${L(w.values,"|")}`;case"too_big":{let X=w.inclusive?"<=":"<",D=I(w.origin);if(D)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${w.origin??"iye"} ${D.verb} ${X}${w.maximum} ${D.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${X}${w.maximum}`}case"too_small":{let X=w.inclusive?">=":">",D=I(w.origin);if(D)return`Kéré ju: a ní láti jẹ́ pé ${w.origin} ${D.verb} ${X}${w.minimum} ${D.unit}`;return`Kéré ju: a ní láti jẹ́ ${X}${w.minimum}`}case"invalid_format":{let X=w;if(X.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${X.prefix}"`;if(X.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${X.suffix}"`;if(X.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${X.includes}"`;if(X.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${X.pattern}`;return`Aṣìṣe: ${b[X.format]??w.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${w.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${L(w.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${w.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${w.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function v7(){return{localeError:qy()}}var Lq,V7=Symbol("ZodOutput"),q7=Symbol("ZodInput");class F7{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let U=I[0];if(this._map.set($,U),U&&typeof U==="object"&&"id"in U){if(this._idmap.has(U.id))throw new Error(`ID ${U.id} already exists in the registry`);this._idmap.set(U.id,$)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let U={...this.get(I)??{}};delete U.id;let b={...U,...this._map.get($)};return Object.keys(b).length?b:void 0}return this._map.get($)}has($){return this._map.has($)}}function MX(){return new F7}(Lq=globalThis).__zod_globalRegistry??(Lq.__zod_globalRegistry=MX());var d$=globalThis.__zod_globalRegistry;function M7($,I){return new $({type:"string",...S(I)})}function j7($,I){return new $({type:"string",coerce:!0,...S(I)})}function jX($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...S(I)})}function X0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...S(I)})}function EX($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...S(I)})}function SX($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(I)})}function PX($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(I)})}function kX($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(I)})}function D0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...S(I)})}function RX($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...S(I)})}function TX($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(I)})}function _X($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...S(I)})}function ZX($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(I)})}function CX($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...S(I)})}function gX($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...S(I)})}function xX($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(I)})}function hX($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(I)})}function fX($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(I)})}function E7($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...S(I)})}function yX($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(I)})}function uX($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(I)})}function lX($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...S(I)})}function cX($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...S(I)})}function mX($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...S(I)})}function rX($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...S(I)})}var S7={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function P7($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(I)})}function k7($,I){return new $({type:"string",format:"date",check:"string_format",...S(I)})}function R7($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...S(I)})}function T7($,I){return new $({type:"string",format:"duration",check:"string_format",...S(I)})}function _7($,I){return new $({type:"number",checks:[],...S(I)})}function Z7($,I){return new $({type:"number",coerce:!0,checks:[],...S(I)})}function C7($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...S(I)})}function g7($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...S(I)})}function x7($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...S(I)})}function h7($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...S(I)})}function f7($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...S(I)})}function y7($,I){return new $({type:"boolean",...S(I)})}function u7($,I){return new $({type:"boolean",coerce:!0,...S(I)})}function l7($,I){return new $({type:"bigint",...S(I)})}function c7($,I){return new $({type:"bigint",coerce:!0,...S(I)})}function m7($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...S(I)})}function r7($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...S(I)})}function n7($,I){return new $({type:"symbol",...S(I)})}function i7($,I){return new $({type:"undefined",...S(I)})}function o7($,I){return new $({type:"null",...S(I)})}function d7($){return new $({type:"any"})}function p7($){return new $({type:"unknown"})}function t7($,I){return new $({type:"never",...S(I)})}function a7($,I){return new $({type:"void",...S(I)})}function e7($,I){return new $({type:"date",...S(I)})}function s7($,I){return new $({type:"date",coerce:!0,...S(I)})}function $5($,I){return new $({type:"nan",...S(I)})}function r6($,I){return new JX({check:"less_than",...S(I),value:$,inclusive:!1})}function N6($,I){return new JX({check:"less_than",...S(I),value:$,inclusive:!0})}function n6($,I){return new HX({check:"greater_than",...S(I),value:$,inclusive:!1})}function p$($,I){return new HX({check:"greater_than",...S(I),value:$,inclusive:!0})}function nX($){return n6(0,$)}function iX($){return r6(0,$)}function oX($){return N6(0,$)}function dX($){return p$(0,$)}function Z4($,I){return new UN({check:"multiple_of",...S(I),value:$})}function W1($,I){return new XN({check:"max_size",...S(I),maximum:$})}function C4($,I){return new DN({check:"min_size",...S(I),minimum:$})}function e1($,I){return new WN({check:"size_equals",...S(I),size:$})}function Q1($,I){return new QN({check:"max_length",...S(I),maximum:$})}function b4($,I){return new GN({check:"min_length",...S(I),minimum:$})}function G1($,I){return new NN({check:"length_equals",...S(I),length:$})}function s1($,I){return new YN({check:"string_format",format:"regex",...S(I),pattern:$})}function $I($){return new BN({check:"string_format",format:"lowercase",...S($)})}function II($){return new JN({check:"string_format",format:"uppercase",...S($)})}function UI($,I){return new HN({check:"string_format",format:"includes",...S(I),includes:$})}function wI($,I){return new AN({check:"string_format",format:"starts_with",...S(I),prefix:$})}function bI($,I){return new ON({check:"string_format",format:"ends_with",...S(I),suffix:$})}function pX($,I,U){return new zN({check:"property",property:$,schema:I,...S(U)})}function XI($,I){return new LN({check:"mime_type",mime:$,...S(I)})}function Z6($){return new KN({check:"overwrite",tx:$})}function DI($){return Z6((I)=>I.normalize($))}function WI(){return Z6(($)=>$.trim())}function QI(){return Z6(($)=>$.toLowerCase())}function GI(){return Z6(($)=>$.toUpperCase())}function NI(){return Z6(($)=>OG($))}function I5($,I,U){return new $({type:"array",element:I,...S(U)})}function My($,I,U){return new $({type:"union",options:I,...S(U)})}function jy($,I,U){return new $({type:"union",options:I,inclusive:!1,...S(U)})}function Ey($,I,U,b){return new $({type:"union",options:U,discriminator:I,...S(b)})}function Sy($,I,U){return new $({type:"intersection",left:I,right:U})}function Py($,I,U,b){let w=U instanceof o;return new $({type:"tuple",items:I,rest:w?U:null,...S(w?b:U)})}function ky($,I,U,b){return new $({type:"record",keyType:I,valueType:U,...S(b)})}function Ry($,I,U,b){return new $({type:"map",keyType:I,valueType:U,...S(b)})}function Ty($,I,U){return new $({type:"set",valueType:I,...S(U)})}function _y($,I,U){let b=Array.isArray(I)?Object.fromEntries(I.map((w)=>[w,w])):I;return new $({type:"enum",entries:b,...S(U)})}function Zy($,I,U){return new $({type:"enum",entries:I,...S(U)})}function Cy($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...S(U)})}function U5($,I){return new $({type:"file",...S(I)})}function gy($,I){return new $({type:"transform",transform:I})}function xy($,I){return new $({type:"optional",innerType:I})}function hy($,I){return new $({type:"nullable",innerType:I})}function fy($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():LG(U)}})}function yy($,I,U){return new $({type:"nonoptional",innerType:I,...S(U)})}function uy($,I){return new $({type:"success",innerType:I})}function ly($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function cy($,I,U){return new $({type:"pipe",in:I,out:U})}function my($,I){return new $({type:"readonly",innerType:I})}function ry($,I,U){return new $({type:"template_literal",parts:I,...S(U)})}function ny($,I){return new $({type:"lazy",getter:I})}function iy($,I){return new $({type:"promise",innerType:I})}function w5($,I,U){let b=S(U);return b.abort??(b.abort=!0),new $({type:"custom",check:"custom",fn:I,...b})}function b5($,I,U){return new $({type:"custom",check:"custom",fn:I,...S(U)})}function X5($){let I=Kq((U)=>{return U.addIssue=(b)=>{if(typeof b==="string")U.issues.push(i1(b,U.value,I._zod.def));else{let w=b;if(w.fatal)w.continue=!1;w.code??(w.code="custom"),w.input??(w.input=U.value),w.inst??(w.inst=I),w.continue??(w.continue=!I._zod.def.abort),U.issues.push(i1(w))}},$(U.value,U)});return I}function Kq($,I){let U=new A$({check:"custom",...S(I)});return U._zod.check=$,U}function D5($){let I=new A$({check:"describe"});return I._zod.onattach=[(U)=>{let b=d$.get(U)??{};d$.add(U,{...b,description:$})}],I._zod.check=()=>{},I}function W5($){let I=new A$({check:"meta"});return I._zod.onattach=[(U)=>{let b=d$.get(U)??{};d$.add(U,{...b,...$})}],I._zod.check=()=>{},I}function Q5($,I){let U=S(I),b=U.truthy??["true","1","yes","on","y","enabled"],w=U.falsy??["false","0","no","off","n","disabled"];if(U.case!=="sensitive")b=b.map((J)=>typeof J==="string"?J.toLowerCase():J),w=w.map((J)=>typeof J==="string"?J.toLowerCase():J);let X=new Set(b),D=new Set(w),W=$.Codec??eU,Q=$.Boolean??tU,N=new($.String??D1)({type:"string",error:U.error}),B=new Q({type:"boolean",error:U.error}),H=new W({type:"pipe",in:N,out:B,transform:(J,A)=>{let O=J;if(U.case!=="sensitive")O=O.toLowerCase();if(X.has(O))return!0;else if(D.has(O))return!1;else return A.issues.push({code:"invalid_value",expected:"stringbool",values:[...X,...D],input:A.value,inst:H,continue:!1}),{}},reverseTransform:(J,A)=>{if(J===!0)return b[0]||"true";else return w[0]||"false"},error:U.error});return H}function YI($,I,U,b={}){let w=S(b),X={...S(b),check:"string_format",type:"string",format:I,fn:typeof U==="function"?U:(W)=>U.test(W),...w};if(U instanceof RegExp)X.pattern=U;return new $(X)}function g4($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??d$,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function G$($,I,U={path:[],schemaPath:[]}){var b;let w=$._zod.def,X=I.seen.get($);if(X){if(X.count++,U.schemaPath.includes($))X.cycle=U.path;return X.schema}let D={schema:{},count:1,cycle:void 0,path:U.path};I.seen.set($,D);let W=$._zod.toJSONSchema?.();if(W)D.schema=W;else{let N={...U,schemaPath:[...U.schemaPath,$],path:U.path},B=$._zod.parent;if(B)D.ref=B,G$(B,I,N),I.seen.get(B).isParent=!0;else if($._zod.processJSONSchema)$._zod.processJSONSchema(I,D.schema,N);else{let H=D.schema,J=I.processors[w.type];if(!J)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${w.type}`);J($,I,H,N)}}let Q=I.metadataRegistry.get($);if(Q)Object.assign(D.schema,Q);if(I.io==="input"&&t$($))delete D.schema.examples,delete D.schema.default;if(I.io==="input"&&D.schema._prefault)(b=D.schema).default??(b.default=D.schema._prefault);return delete D.schema._prefault,I.seen.get($).schema}function x4($,I){let U=$.seen.get(I);if(!U)throw new Error("Unprocessed schema. This is a bug in Zod.");let b=(X)=>{let D=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let N=$.external.registry.get(X[0])?.id,B=$.external.uri??((J)=>J);if(N)return{ref:B(N)};let H=X[1].defId??X[1].schema.id??`schema${$.counter++}`;return X[1].defId=H,{defId:H,ref:`${B("__shared")}#/${D}/${H}`}}if(X[1]===U)return{ref:"#"};let Q=`${"#"}/${D}/`,G=X[1].schema.id??`__schema${$.counter++}`;return{defId:G,ref:Q+G}},w=(X)=>{if(X[1].schema.$ref)return;let D=X[1],{ref:W,defId:Q}=b(X);if(D.def={...D.schema},Q)D.defId=Q;let G=D.schema;for(let N in G)delete G[N];G.$ref=W};if($.cycles==="throw")for(let X of $.seen.entries()){let D=X[1];if(D.cycle)throw new Error(`Cycle detected: #/${D.cycle?.join("/")}/<root>
|
|
63
63
|
|
|
64
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let X of $.seen.entries()){let D=X[1];if(I===X[0]){w(X);continue}if($.external){let Q=$.external.registry.get(X[0])?.id;if(I!==X[0]&&Q){w(X);continue}}if($.metadataRegistry.get(X[0])?.id){w(X);continue}if(D.cycle){w(X);continue}if(D.count>1){if($.reused==="ref"){w(X);continue}}}}function h4($,I){let U=$.seen.get(I);if(!U)throw new Error("Unprocessed schema. This is a bug in Zod.");let b=(D)=>{let W=$.seen.get(D),Q=W.def??W.schema,G={...Q};if(W.ref===null)return;let N=W.ref;if(W.ref=null,N){b(N);let B=$.seen.get(N).schema;if(B.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))Q.allOf=Q.allOf??[],Q.allOf.push(B);else Object.assign(Q,B),Object.assign(Q,G)}if(!W.isParent)$.override({zodSchema:D,jsonSchema:Q,path:W.path??[]})};for(let D of[...$.seen.entries()].reverse())b(D[0]);let w={};if($.target==="draft-2020-12")w.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")w.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")w.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let D=$.external.registry.get(I)?.id;if(!D)throw new Error("Schema is missing an `id` property");w.$id=$.external.uri(D)}Object.assign(w,U.def??U.schema);let X=$.external?.defs??{};for(let D of $.seen.entries()){let W=D[1];if(W.def&&W.defId)X[W.defId]=W.def}if($.external);else if(Object.keys(X).length>0)if($.target==="draft-2020-12")w.$defs=X;else w.definitions=X;try{let D=JSON.parse(JSON.stringify(w));return Object.defineProperty(D,"~standard",{value:{...I["~standard"],jsonSchema:{input:BI(I,"input"),output:BI(I,"output")}},enumerable:!1,writable:!1}),D}catch(D){throw new Error("Error converting schema to JSON.")}}function t$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let b=$._zod.def;if(b.type==="transform")return!0;if(b.type==="array")return t$(b.element,U);if(b.type==="set")return t$(b.valueType,U);if(b.type==="lazy")return t$(b.getter(),U);if(b.type==="promise"||b.type==="optional"||b.type==="nonoptional"||b.type==="nullable"||b.type==="readonly"||b.type==="default"||b.type==="prefault")return t$(b.innerType,U);if(b.type==="intersection")return t$(b.left,U)||t$(b.right,U);if(b.type==="record"||b.type==="map")return t$(b.keyType,U)||t$(b.valueType,U);if(b.type==="pipe")return t$(b.in,U)||t$(b.out,U);if(b.type==="object"){for(let w in b.shape)if(t$(b.shape[w],U))return!0;return!1}if(b.type==="union"){for(let w of b.options)if(t$(w,U))return!0;return!1}if(b.type==="tuple"){for(let w of b.items)if(t$(w,U))return!0;if(b.rest&&t$(b.rest,U))return!0;return!1}return!1}var G5=($,I={})=>(U)=>{let b=g4({...U,processors:I});return G$($,b),x4(b,$),h4(b,$)},BI=($,I)=>(U)=>{let{libraryOptions:b,target:w}=U??{},X=g4({...b??{},target:w,io:I,processors:{}});return G$($,X),x4(X,$),h4(X,$)};var oy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},N5=($,I,U,b)=>{let w=U;w.type="string";let{minimum:X,maximum:D,format:W,patterns:Q,contentEncoding:G}=$._zod.bag;if(typeof X==="number")w.minLength=X;if(typeof D==="number")w.maxLength=D;if(W){if(w.format=oy[W]??W,w.format==="")delete w.format}if(G)w.contentEncoding=G;if(Q&&Q.size>0){let N=[...Q];if(N.length===1)w.pattern=N[0].source;else if(N.length>1)w.allOf=[...N.map((B)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:B.source}))]}},Y5=($,I,U,b)=>{let w=U,{minimum:X,maximum:D,format:W,multipleOf:Q,exclusiveMaximum:G,exclusiveMinimum:N}=$._zod.bag;if(typeof W==="string"&&W.includes("int"))w.type="integer";else w.type="number";if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")w.minimum=N,w.exclusiveMinimum=!0;else w.exclusiveMinimum=N;if(typeof X==="number"){if(w.minimum=X,typeof N==="number"&&I.target!=="draft-04")if(N>=X)delete w.minimum;else delete w.exclusiveMinimum}if(typeof G==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")w.maximum=G,w.exclusiveMaximum=!0;else w.exclusiveMaximum=G;if(typeof D==="number"){if(w.maximum=D,typeof G==="number"&&I.target!=="draft-04")if(G<=D)delete w.maximum;else delete w.exclusiveMaximum}if(typeof Q==="number")w.multipleOf=Q},B5=($,I,U,b)=>{U.type="boolean"},J5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},H5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},A5=($,I,U,b)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},O5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},z5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},L5=($,I,U,b)=>{U.not={}},K5=($,I,U,b)=>{},v5=($,I,U,b)=>{},V5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},q5=($,I,U,b)=>{let w=$._zod.def,X=uU(w.entries);if(X.every((D)=>typeof D==="number"))U.type="number";if(X.every((D)=>typeof D==="string"))U.type="string";U.enum=X},F5=($,I,U,b)=>{let w=$._zod.def,X=[];for(let D of w.values)if(D===void 0){if(I.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof D==="bigint")if(I.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");else X.push(Number(D));else X.push(D);if(X.length===0);else if(X.length===1){let D=X[0];if(U.type=D===null?"null":typeof D,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[D];else U.const=D}else{if(X.every((D)=>typeof D==="number"))U.type="number";if(X.every((D)=>typeof D==="string"))U.type="string";if(X.every((D)=>typeof D==="boolean"))U.type="boolean";if(X.every((D)=>D===null))U.type="null";U.enum=X}},M5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},j5=($,I,U,b)=>{let w=U,X=$._zod.pattern;if(!X)throw new Error("Pattern not found in template literal");w.type="string",w.pattern=X.source},E5=($,I,U,b)=>{let w=U,X={type:"string",format:"binary",contentEncoding:"binary"},{minimum:D,maximum:W,mime:Q}=$._zod.bag;if(D!==void 0)X.minLength=D;if(W!==void 0)X.maxLength=W;if(Q)if(Q.length===1)X.contentMediaType=Q[0],Object.assign(w,X);else w.anyOf=Q.map((G)=>{return{...X,contentMediaType:G}});else Object.assign(w,X)},S5=($,I,U,b)=>{U.type="boolean"},P5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},k5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},R5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},T5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Z5=($,I,U,b)=>{let w=U,X=$._zod.def,{minimum:D,maximum:W}=$._zod.bag;if(typeof D==="number")w.minItems=D;if(typeof W==="number")w.maxItems=W;w.type="array",w.items=G$(X.element,I,{...b,path:[...b.path,"items"]})},C5=($,I,U,b)=>{let w=U,X=$._zod.def;w.type="object",w.properties={};let D=X.shape;for(let G in D)w.properties[G]=G$(D[G],I,{...b,path:[...b.path,"properties",G]});let W=new Set(Object.keys(D)),Q=new Set([...W].filter((G)=>{let N=X.shape[G]._zod;if(I.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(Q.size>0)w.required=Array.from(Q);if(X.catchall?._zod.def.type==="never")w.additionalProperties=!1;else if(!X.catchall){if(I.io==="output")w.additionalProperties=!1}else if(X.catchall)w.additionalProperties=G$(X.catchall,I,{...b,path:[...b.path,"additionalProperties"]})},aX=($,I,U,b)=>{let w=$._zod.def,X=w.inclusive===!1,D=w.options.map((W,Q)=>G$(W,I,{...b,path:[...b.path,X?"oneOf":"anyOf",Q]}));if(X)U.oneOf=D;else U.anyOf=D},g5=($,I,U,b)=>{let w=$._zod.def,X=G$(w.left,I,{...b,path:[...b.path,"allOf",0]}),D=G$(w.right,I,{...b,path:[...b.path,"allOf",1]}),W=(G)=>("allOf"in G)&&Object.keys(G).length===1,Q=[...W(X)?X.allOf:[X],...W(D)?D.allOf:[D]];U.allOf=Q},x5=($,I,U,b)=>{let w=U,X=$._zod.def;w.type="array";let D=I.target==="draft-2020-12"?"prefixItems":"items",W=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",Q=X.items.map((H,J)=>G$(H,I,{...b,path:[...b.path,D,J]})),G=X.rest?G$(X.rest,I,{...b,path:[...b.path,W,...I.target==="openapi-3.0"?[X.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(w.prefixItems=Q,G)w.items=G}else if(I.target==="openapi-3.0"){if(w.items={anyOf:Q},G)w.items.anyOf.push(G);if(w.minItems=Q.length,!G)w.maxItems=Q.length}else if(w.items=Q,G)w.additionalItems=G;let{minimum:N,maximum:B}=$._zod.bag;if(typeof N==="number")w.minItems=N;if(typeof B==="number")w.maxItems=B},h5=($,I,U,b)=>{let w=U,X=$._zod.def;if(w.type="object",I.target==="draft-07"||I.target==="draft-2020-12")w.propertyNames=G$(X.keyType,I,{...b,path:[...b.path,"propertyNames"]});w.additionalProperties=G$(X.valueType,I,{...b,path:[...b.path,"additionalProperties"]})},f5=($,I,U,b)=>{let w=$._zod.def,X=G$(w.innerType,I,b),D=I.seen.get($);if(I.target==="openapi-3.0")D.ref=w.innerType,U.nullable=!0;else U.anyOf=[X,{type:"null"}]},y5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},u5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType,U.default=JSON.parse(JSON.stringify(w.defaultValue))},l5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);if(X.ref=w.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(w.defaultValue))},c5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType;let D;try{D=w.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}U.default=D},m5=($,I,U,b)=>{let w=$._zod.def,X=I.io==="input"?w.in._zod.def.type==="transform"?w.out:w.in:w.out;G$(X,I,b);let D=I.seen.get($);D.ref=X},r5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType,U.readOnly=!0},n5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},i5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},o5=($,I,U,b)=>{let w=$._zod.innerType;G$(w,I,b);let X=I.seen.get($);X.ref=w},tX={string:N5,number:Y5,boolean:B5,bigint:J5,symbol:H5,null:A5,undefined:O5,void:z5,never:L5,any:K5,unknown:v5,date:V5,enum:q5,literal:F5,nan:M5,template_literal:j5,file:E5,success:S5,custom:P5,function:k5,transform:R5,map:T5,set:_5,array:Z5,object:C5,union:aX,intersection:g5,tuple:x5,record:h5,nullable:f5,nonoptional:y5,default:u5,prefault:l5,catch:c5,pipe:m5,readonly:r5,promise:n5,optional:i5,lazy:o5};function eX($,I){if("_idmap"in $){let b=$,w=g4({...I,processors:tX}),X={};for(let Q of b._idmap.entries()){let[G,N]=Q;G$(N,w)}let D={},W={registry:b,uri:I?.uri,defs:X};w.external=W;for(let Q of b._idmap.entries()){let[G,N]=Q;x4(w,N),D[G]=h4(w,N)}if(Object.keys(X).length>0){let Q=w.target==="draft-2020-12"?"$defs":"definitions";D.__shared={[Q]:X}}return{schemas:D}}let U=g4({...I,processors:tX});return G$($,U),x4(U,$),h4(U,$)}class d5{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=g4({processors:tX,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return G$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}x4(this.ctx,$);let U=h4(this.ctx,$),{"~standard":b,...w}=U;return w}}var vq={};var W0={};v6(W0,{xor:()=>BF,xid:()=>gq,void:()=>DF,uuidv7:()=>Sq,uuidv6:()=>Eq,uuidv4:()=>jq,uuid:()=>Mq,url:()=>Pq,unknown:()=>N1,union:()=>jD,undefined:()=>bF,ulid:()=>Cq,uint64:()=>UF,uint32:()=>sq,tuple:()=>PB,transform:()=>SD,templateLiteral:()=>jF,symbol:()=>wF,superRefine:()=>sB,success:()=>qF,stringbool:()=>ZF,stringFormat:()=>iq,string:()=>bD,strictObject:()=>NF,set:()=>zF,refine:()=>eB,record:()=>kB,readonly:()=>iB,promise:()=>EF,preprocess:()=>gF,prefault:()=>yB,pipe:()=>Y0,partialRecord:()=>HF,optional:()=>G0,object:()=>GF,number:()=>BB,nullish:()=>VF,nullable:()=>N0,null:()=>zB,nonoptional:()=>uB,never:()=>MD,nativeEnum:()=>LF,nanoid:()=>Tq,nan:()=>FF,meta:()=>TF,map:()=>OF,mac:()=>fq,looseRecord:()=>AF,looseObject:()=>YF,literal:()=>KF,lazy:()=>pB,ksuid:()=>xq,keyof:()=>QF,jwt:()=>nq,json:()=>CF,ipv6:()=>yq,ipv4:()=>hq,intersection:()=>EB,int64:()=>IF,int32:()=>eq,int:()=>XD,instanceof:()=>_F,httpUrl:()=>kq,hostname:()=>oq,hex:()=>dq,hash:()=>pq,guid:()=>Fq,function:()=>SF,float64:()=>aq,float32:()=>tq,file:()=>vF,enum:()=>ED,emoji:()=>Rq,email:()=>qq,e164:()=>rq,discriminatedUnion:()=>JF,describe:()=>RF,date:()=>WF,custom:()=>kF,cuid2:()=>Zq,cuid:()=>_q,codec:()=>MF,cidrv6:()=>lq,cidrv4:()=>uq,check:()=>PF,catch:()=>mB,boolean:()=>JB,bigint:()=>$F,base64url:()=>mq,base64:()=>cq,array:()=>H0,any:()=>XF,_function:()=>SF,_default:()=>hB,_ZodString:()=>DD,ZodXor:()=>FB,ZodXID:()=>JD,ZodVoid:()=>VB,ZodUnknown:()=>KB,ZodUnion:()=>O0,ZodUndefined:()=>AB,ZodUUID:()=>i6,ZodURL:()=>B0,ZodULID:()=>BD,ZodType:()=>t,ZodTuple:()=>SB,ZodTransform:()=>CB,ZodTemplateLiteral:()=>oB,ZodSymbol:()=>HB,ZodSuccess:()=>lB,ZodStringFormat:()=>J$,ZodString:()=>AI,ZodSet:()=>TB,ZodRecord:()=>z0,ZodReadonly:()=>nB,ZodPromise:()=>tB,ZodPrefault:()=>fB,ZodPipe:()=>RD,ZodOptional:()=>PD,ZodObject:()=>A0,ZodNumberFormat:()=>Y1,ZodNumber:()=>zI,ZodNullable:()=>gB,ZodNull:()=>OB,ZodNonOptional:()=>kD,ZodNever:()=>vB,ZodNanoID:()=>GD,ZodNaN:()=>rB,ZodMap:()=>RB,ZodMAC:()=>YB,ZodLiteral:()=>_B,ZodLazy:()=>dB,ZodKSUID:()=>HD,ZodJWT:()=>qD,ZodIntersection:()=>jB,ZodIPv6:()=>OD,ZodIPv4:()=>AD,ZodGUID:()=>Q0,ZodFunction:()=>aB,ZodFile:()=>ZB,ZodEnum:()=>HI,ZodEmoji:()=>QD,ZodEmail:()=>WD,ZodE164:()=>VD,ZodDiscriminatedUnion:()=>MB,ZodDefault:()=>xB,ZodDate:()=>J0,ZodCustomStringFormat:()=>OI,ZodCustom:()=>L0,ZodCodec:()=>TD,ZodCatch:()=>cB,ZodCUID2:()=>YD,ZodCUID:()=>ND,ZodCIDRv6:()=>LD,ZodCIDRv4:()=>zD,ZodBoolean:()=>LI,ZodBigIntFormat:()=>FD,ZodBigInt:()=>KI,ZodBase64URL:()=>vD,ZodBase64:()=>KD,ZodArray:()=>qB,ZodAny:()=>LB});var sX={};v6(sX,{uppercase:()=>II,trim:()=>WI,toUpperCase:()=>GI,toLowerCase:()=>QI,startsWith:()=>wI,slugify:()=>NI,size:()=>e1,regex:()=>s1,property:()=>pX,positive:()=>nX,overwrite:()=>Z6,normalize:()=>DI,nonpositive:()=>oX,nonnegative:()=>dX,negative:()=>iX,multipleOf:()=>Z4,minSize:()=>C4,minLength:()=>b4,mime:()=>XI,maxSize:()=>W1,maxLength:()=>Q1,lte:()=>N6,lt:()=>r6,lowercase:()=>$I,length:()=>G1,includes:()=>UI,gte:()=>p$,gt:()=>n6,endsWith:()=>bI});var JI={};v6(JI,{time:()=>a5,duration:()=>e5,datetime:()=>p5,date:()=>t5,ZodISOTime:()=>UD,ZodISODuration:()=>wD,ZodISODateTime:()=>$D,ZodISODate:()=>ID});var $D=z("ZodISODateTime",($,I)=>{ZN.init($,I),J$.init($,I)});function p5($){return P7($D,$)}var ID=z("ZodISODate",($,I)=>{CN.init($,I),J$.init($,I)});function t5($){return k7(ID,$)}var UD=z("ZodISOTime",($,I)=>{gN.init($,I),J$.init($,I)});function a5($){return R7(UD,$)}var wD=z("ZodISODuration",($,I)=>{xN.init($,I),J$.init($,I)});function e5($){return T7(wD,$)}var Vq=($,I)=>{nU.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>oU($,U)},flatten:{value:(U)=>iU($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,r1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,r1,2)}},isEmpty:{get(){return $.issues.length===0}}})},py=z("ZodError",Vq),b6=z("ZodError",Vq,{Parent:Error});var s5=o1(b6),$B=d1(b6),IB=p1(b6),UB=t1(b6),wB=bX(b6),bB=XX(b6),XB=DX(b6),DB=WX(b6),WB=QX(b6),QB=GX(b6),GB=NX(b6),NB=YX(b6);var t=z("ZodType",($,I)=>{return o.init($,I),Object.assign($["~standard"],{jsonSchema:{input:BI($,"input"),output:BI($,"output")}}),$.toJSONSchema=G5($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(E.mergeDefs(I,{checks:[...I.checks??[],...U.map((b)=>typeof b==="function"?{_zod:{check:b,def:{check:"custom"},onattach:[]}}:b)]}))},$.clone=(U,b)=>o$($,U,b),$.brand=()=>$,$.register=(U,b)=>{return U.add($,b),$},$.parse=(U,b)=>s5($,U,b,{callee:$.parse}),$.safeParse=(U,b)=>IB($,U,b),$.parseAsync=async(U,b)=>$B($,U,b,{callee:$.parseAsync}),$.safeParseAsync=async(U,b)=>UB($,U,b),$.spa=$.safeParseAsync,$.encode=(U,b)=>wB($,U,b),$.decode=(U,b)=>bB($,U,b),$.encodeAsync=async(U,b)=>XB($,U,b),$.decodeAsync=async(U,b)=>DB($,U,b),$.safeEncode=(U,b)=>WB($,U,b),$.safeDecode=(U,b)=>QB($,U,b),$.safeEncodeAsync=async(U,b)=>GB($,U,b),$.safeDecodeAsync=async(U,b)=>NB($,U,b),$.refine=(U,b)=>$.check(eB(U,b)),$.superRefine=(U)=>$.check(sB(U)),$.overwrite=(U)=>$.check(Z6(U)),$.optional=()=>G0($),$.nullable=()=>N0($),$.nullish=()=>G0(N0($)),$.nonoptional=(U)=>uB($,U),$.array=()=>H0($),$.or=(U)=>jD([$,U]),$.and=(U)=>EB($,U),$.transform=(U)=>Y0($,SD(U)),$.default=(U)=>hB($,U),$.prefault=(U)=>yB($,U),$.catch=(U)=>mB($,U),$.pipe=(U)=>Y0($,U),$.readonly=()=>iB($),$.describe=(U)=>{let b=$.clone();return d$.add(b,{description:U}),b},Object.defineProperty($,"description",{get(){return d$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return d$.get($);let b=$.clone();return d$.add(b,U[0]),b},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$}),DD=z("_ZodString",($,I)=>{D1.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>N5($,b,w,X);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(...b)=>$.check(s1(...b)),$.includes=(...b)=>$.check(UI(...b)),$.startsWith=(...b)=>$.check(wI(...b)),$.endsWith=(...b)=>$.check(bI(...b)),$.min=(...b)=>$.check(b4(...b)),$.max=(...b)=>$.check(Q1(...b)),$.length=(...b)=>$.check(G1(...b)),$.nonempty=(...b)=>$.check(b4(1,...b)),$.lowercase=(b)=>$.check($I(b)),$.uppercase=(b)=>$.check(II(b)),$.trim=()=>$.check(WI()),$.normalize=(...b)=>$.check(DI(...b)),$.toLowerCase=()=>$.check(QI()),$.toUpperCase=()=>$.check(GI()),$.slugify=()=>$.check(NI())}),AI=z("ZodString",($,I)=>{D1.init($,I),DD.init($,I),$.email=(U)=>$.check(jX(WD,U)),$.url=(U)=>$.check(D0(B0,U)),$.jwt=(U)=>$.check(rX(qD,U)),$.emoji=(U)=>$.check(RX(QD,U)),$.guid=(U)=>$.check(X0(Q0,U)),$.uuid=(U)=>$.check(EX(i6,U)),$.uuidv4=(U)=>$.check(SX(i6,U)),$.uuidv6=(U)=>$.check(PX(i6,U)),$.uuidv7=(U)=>$.check(kX(i6,U)),$.nanoid=(U)=>$.check(TX(GD,U)),$.guid=(U)=>$.check(X0(Q0,U)),$.cuid=(U)=>$.check(_X(ND,U)),$.cuid2=(U)=>$.check(ZX(YD,U)),$.ulid=(U)=>$.check(CX(BD,U)),$.base64=(U)=>$.check(lX(KD,U)),$.base64url=(U)=>$.check(cX(vD,U)),$.xid=(U)=>$.check(gX(JD,U)),$.ksuid=(U)=>$.check(xX(HD,U)),$.ipv4=(U)=>$.check(hX(AD,U)),$.ipv6=(U)=>$.check(fX(OD,U)),$.cidrv4=(U)=>$.check(yX(zD,U)),$.cidrv6=(U)=>$.check(uX(LD,U)),$.e164=(U)=>$.check(mX(VD,U)),$.datetime=(U)=>$.check(p5(U)),$.date=(U)=>$.check(t5(U)),$.time=(U)=>$.check(a5(U)),$.duration=(U)=>$.check(e5(U))});function bD($){return M7(AI,$)}var J$=z("ZodStringFormat",($,I)=>{B$.init($,I),DD.init($,I)}),WD=z("ZodEmail",($,I)=>{MN.init($,I),J$.init($,I)});function qq($){return jX(WD,$)}var Q0=z("ZodGUID",($,I)=>{qN.init($,I),J$.init($,I)});function Fq($){return X0(Q0,$)}var i6=z("ZodUUID",($,I)=>{FN.init($,I),J$.init($,I)});function Mq($){return EX(i6,$)}function jq($){return SX(i6,$)}function Eq($){return PX(i6,$)}function Sq($){return kX(i6,$)}var B0=z("ZodURL",($,I)=>{jN.init($,I),J$.init($,I)});function Pq($){return D0(B0,$)}function kq($){return D0(B0,{protocol:/^https?$/,hostname:K6.domain,...E.normalizeParams($)})}var QD=z("ZodEmoji",($,I)=>{EN.init($,I),J$.init($,I)});function Rq($){return RX(QD,$)}var GD=z("ZodNanoID",($,I)=>{SN.init($,I),J$.init($,I)});function Tq($){return TX(GD,$)}var ND=z("ZodCUID",($,I)=>{PN.init($,I),J$.init($,I)});function _q($){return _X(ND,$)}var YD=z("ZodCUID2",($,I)=>{kN.init($,I),J$.init($,I)});function Zq($){return ZX(YD,$)}var BD=z("ZodULID",($,I)=>{RN.init($,I),J$.init($,I)});function Cq($){return CX(BD,$)}var JD=z("ZodXID",($,I)=>{TN.init($,I),J$.init($,I)});function gq($){return gX(JD,$)}var HD=z("ZodKSUID",($,I)=>{_N.init($,I),J$.init($,I)});function xq($){return xX(HD,$)}var AD=z("ZodIPv4",($,I)=>{hN.init($,I),J$.init($,I)});function hq($){return hX(AD,$)}var YB=z("ZodMAC",($,I)=>{yN.init($,I),J$.init($,I)});function fq($){return E7(YB,$)}var OD=z("ZodIPv6",($,I)=>{fN.init($,I),J$.init($,I)});function yq($){return fX(OD,$)}var zD=z("ZodCIDRv4",($,I)=>{uN.init($,I),J$.init($,I)});function uq($){return yX(zD,$)}var LD=z("ZodCIDRv6",($,I)=>{lN.init($,I),J$.init($,I)});function lq($){return uX(LD,$)}var KD=z("ZodBase64",($,I)=>{mN.init($,I),J$.init($,I)});function cq($){return lX(KD,$)}var vD=z("ZodBase64URL",($,I)=>{rN.init($,I),J$.init($,I)});function mq($){return cX(vD,$)}var VD=z("ZodE164",($,I)=>{nN.init($,I),J$.init($,I)});function rq($){return mX(VD,$)}var qD=z("ZodJWT",($,I)=>{iN.init($,I),J$.init($,I)});function nq($){return rX(qD,$)}var OI=z("ZodCustomStringFormat",($,I)=>{oN.init($,I),J$.init($,I)});function iq($,I,U={}){return YI(OI,$,I,U)}function oq($){return YI(OI,"hostname",K6.hostname,$)}function dq($){return YI(OI,"hex",K6.hex,$)}function pq($,I){let U=I?.enc??"hex",b=`${$}_${U}`,w=K6[b];if(!w)throw new Error(`Unrecognized hash format: ${b}`);return YI(OI,b,w,I)}var zI=z("ZodNumber",($,I)=>{VX.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>Y5($,b,w,X),$.gt=(b,w)=>$.check(n6(b,w)),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.lt=(b,w)=>$.check(r6(b,w)),$.lte=(b,w)=>$.check(N6(b,w)),$.max=(b,w)=>$.check(N6(b,w)),$.int=(b)=>$.check(XD(b)),$.safe=(b)=>$.check(XD(b)),$.positive=(b)=>$.check(n6(0,b)),$.nonnegative=(b)=>$.check(p$(0,b)),$.negative=(b)=>$.check(r6(0,b)),$.nonpositive=(b)=>$.check(N6(0,b)),$.multipleOf=(b,w)=>$.check(Z4(b,w)),$.step=(b,w)=>$.check(Z4(b,w)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function BB($){return _7(zI,$)}var Y1=z("ZodNumberFormat",($,I)=>{dN.init($,I),zI.init($,I)});function XD($){return C7(Y1,$)}function tq($){return g7(Y1,$)}function aq($){return x7(Y1,$)}function eq($){return h7(Y1,$)}function sq($){return f7(Y1,$)}var LI=z("ZodBoolean",($,I)=>{tU.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>B5($,U,b,w)});function JB($){return y7(LI,$)}var KI=z("ZodBigInt",($,I)=>{qX.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>J5($,b,w,X),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.gt=(b,w)=>$.check(n6(b,w)),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.lt=(b,w)=>$.check(r6(b,w)),$.lte=(b,w)=>$.check(N6(b,w)),$.max=(b,w)=>$.check(N6(b,w)),$.positive=(b)=>$.check(n6(BigInt(0),b)),$.negative=(b)=>$.check(r6(BigInt(0),b)),$.nonpositive=(b)=>$.check(N6(BigInt(0),b)),$.nonnegative=(b)=>$.check(p$(BigInt(0),b)),$.multipleOf=(b,w)=>$.check(Z4(b,w));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function $F($){return l7(KI,$)}var FD=z("ZodBigIntFormat",($,I)=>{pN.init($,I),KI.init($,I)});function IF($){return m7(FD,$)}function UF($){return r7(FD,$)}var HB=z("ZodSymbol",($,I)=>{tN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>H5($,U,b,w)});function wF($){return n7(HB,$)}var AB=z("ZodUndefined",($,I)=>{aN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>O5($,U,b,w)});function bF($){return i7(AB,$)}var OB=z("ZodNull",($,I)=>{eN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>A5($,U,b,w)});function zB($){return o7(OB,$)}var LB=z("ZodAny",($,I)=>{sN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>K5($,U,b,w)});function XF(){return d7(LB)}var KB=z("ZodUnknown",($,I)=>{$Y.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>v5($,U,b,w)});function N1(){return p7(KB)}var vB=z("ZodNever",($,I)=>{IY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>L5($,U,b,w)});function MD($){return t7(vB,$)}var VB=z("ZodVoid",($,I)=>{UY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>z5($,U,b,w)});function DF($){return a7(VB,$)}var J0=z("ZodDate",($,I)=>{wY.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>V5($,b,w,X),$.min=(b,w)=>$.check(p$(b,w)),$.max=(b,w)=>$.check(N6(b,w));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function WF($){return e7(J0,$)}var qB=z("ZodArray",($,I)=>{bY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>Z5($,U,b,w),$.element=I.element,$.min=(U,b)=>$.check(b4(U,b)),$.nonempty=(U)=>$.check(b4(1,U)),$.max=(U,b)=>$.check(Q1(U,b)),$.length=(U,b)=>$.check(G1(U,b)),$.unwrap=()=>$.element});function H0($,I){return I5(qB,$,I)}function QF($){let I=$._zod.def.shape;return ED(Object.keys(I))}var A0=z("ZodObject",($,I)=>{XY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>C5($,U,b,w),E.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>ED(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:N1()}),$.loose=()=>$.clone({...$._zod.def,catchall:N1()}),$.strict=()=>$.clone({...$._zod.def,catchall:MD()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return E.extend($,U)},$.safeExtend=(U)=>{return E.safeExtend($,U)},$.merge=(U)=>E.merge($,U),$.pick=(U)=>E.pick($,U),$.omit=(U)=>E.omit($,U),$.partial=(...U)=>E.partial(PD,$,U[0]),$.required=(...U)=>E.required(kD,$,U[0])});function GF($,I){let U={type:"object",shape:$??{},...E.normalizeParams(I)};return new A0(U)}function NF($,I){return new A0({type:"object",shape:$,catchall:MD(),...E.normalizeParams(I)})}function YF($,I){return new A0({type:"object",shape:$,catchall:N1(),...E.normalizeParams(I)})}var O0=z("ZodUnion",($,I)=>{aU.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>aX($,U,b,w),$.options=I.options});function jD($,I){return new O0({type:"union",options:$,...E.normalizeParams(I)})}var FB=z("ZodXor",($,I)=>{O0.init($,I),DY.init($,I),$._zod.processJSONSchema=(U,b,w)=>aX($,U,b,w),$.options=I.options});function BF($,I){return new FB({type:"union",options:$,inclusive:!1,...E.normalizeParams(I)})}var MB=z("ZodDiscriminatedUnion",($,I)=>{O0.init($,I),WY.init($,I)});function JF($,I,U){return new MB({type:"union",options:I,discriminator:$,...E.normalizeParams(U)})}var jB=z("ZodIntersection",($,I)=>{QY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>g5($,U,b,w)});function EB($,I){return new jB({type:"intersection",left:$,right:I})}var SB=z("ZodTuple",($,I)=>{FX.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>x5($,U,b,w),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function PB($,I,U){let b=I instanceof o,w=b?U:I;return new SB({type:"tuple",items:$,rest:b?I:null,...E.normalizeParams(w)})}var z0=z("ZodRecord",($,I)=>{GY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>h5($,U,b,w),$.keyType=I.keyType,$.valueType=I.valueType});function kB($,I,U){return new z0({type:"record",keyType:$,valueType:I,...E.normalizeParams(U)})}function HF($,I,U){let b=o$($);return b._zod.values=void 0,new z0({type:"record",keyType:b,valueType:I,...E.normalizeParams(U)})}function AF($,I,U){return new z0({type:"record",keyType:$,valueType:I,mode:"loose",...E.normalizeParams(U)})}var RB=z("ZodMap",($,I)=>{NY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>T5($,U,b,w),$.keyType=I.keyType,$.valueType=I.valueType});function OF($,I,U){return new RB({type:"map",keyType:$,valueType:I,...E.normalizeParams(U)})}var TB=z("ZodSet",($,I)=>{YY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>_5($,U,b,w),$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(W1(...U)),$.size=(...U)=>$.check(e1(...U))});function zF($,I){return new TB({type:"set",valueType:$,...E.normalizeParams(I)})}var HI=z("ZodEnum",($,I)=>{BY.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>q5($,b,w,X),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(b,w)=>{let X={};for(let D of b)if(U.has(D))X[D]=I.entries[D];else throw new Error(`Key ${D} not found in enum`);return new HI({...I,checks:[],...E.normalizeParams(w),entries:X})},$.exclude=(b,w)=>{let X={...I.entries};for(let D of b)if(U.has(D))delete X[D];else throw new Error(`Key ${D} not found in enum`);return new HI({...I,checks:[],...E.normalizeParams(w),entries:X})}});function ED($,I){let U=Array.isArray($)?Object.fromEntries($.map((b)=>[b,b])):$;return new HI({type:"enum",entries:U,...E.normalizeParams(I)})}function LF($,I){return new HI({type:"enum",entries:$,...E.normalizeParams(I)})}var _B=z("ZodLiteral",($,I)=>{JY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>F5($,U,b,w),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function KF($,I){return new _B({type:"literal",values:Array.isArray($)?$:[$],...E.normalizeParams(I)})}var ZB=z("ZodFile",($,I)=>{HY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>E5($,U,b,w),$.min=(U,b)=>$.check(C4(U,b)),$.max=(U,b)=>$.check(W1(U,b)),$.mime=(U,b)=>$.check(XI(Array.isArray(U)?U:[U],b))});function vF($){return U5(ZB,$)}var CB=z("ZodTransform",($,I)=>{AY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>R5($,U,b,w),$._zod.parse=(U,b)=>{if(b.direction==="backward")throw new w1($.constructor.name);U.addIssue=(X)=>{if(typeof X==="string")U.issues.push(E.issue(X,U.value,I));else{let D=X;if(D.fatal)D.continue=!1;D.code??(D.code="custom"),D.input??(D.input=U.value),D.inst??(D.inst=$),U.issues.push(E.issue(D))}};let w=I.transform(U.value,U);if(w instanceof Promise)return w.then((X)=>{return U.value=X,U});return U.value=w,U}});function SD($){return new CB({type:"transform",transform:$})}var PD=z("ZodOptional",($,I)=>{OY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>i5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function G0($){return new PD({type:"optional",innerType:$})}var gB=z("ZodNullable",($,I)=>{zY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>f5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function N0($){return new gB({type:"nullable",innerType:$})}function VF($){return G0(N0($))}var xB=z("ZodDefault",($,I)=>{LY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>u5($,U,b,w),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function hB($,I){return new xB({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():E.shallowClone(I)}})}var fB=z("ZodPrefault",($,I)=>{KY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>l5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function yB($,I){return new fB({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():E.shallowClone(I)}})}var kD=z("ZodNonOptional",($,I)=>{vY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>y5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function uB($,I){return new kD({type:"nonoptional",innerType:$,...E.normalizeParams(I)})}var lB=z("ZodSuccess",($,I)=>{VY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>S5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function qF($){return new lB({type:"success",innerType:$})}var cB=z("ZodCatch",($,I)=>{qY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>c5($,U,b,w),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function mB($,I){return new cB({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var rB=z("ZodNaN",($,I)=>{FY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>M5($,U,b,w)});function FF($){return $5(rB,$)}var RD=z("ZodPipe",($,I)=>{MY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>m5($,U,b,w),$.in=I.in,$.out=I.out});function Y0($,I){return new RD({type:"pipe",in:$,out:I})}var TD=z("ZodCodec",($,I)=>{RD.init($,I),eU.init($,I)});function MF($,I,U){return new TD({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var nB=z("ZodReadonly",($,I)=>{jY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>r5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function iB($){return new nB({type:"readonly",innerType:$})}var oB=z("ZodTemplateLiteral",($,I)=>{EY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>j5($,U,b,w)});function jF($,I){return new oB({type:"template_literal",parts:$,...E.normalizeParams(I)})}var dB=z("ZodLazy",($,I)=>{kY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>o5($,U,b,w),$.unwrap=()=>$._zod.def.getter()});function pB($){return new dB({type:"lazy",getter:$})}var tB=z("ZodPromise",($,I)=>{PY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>n5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function EF($){return new tB({type:"promise",innerType:$})}var aB=z("ZodFunction",($,I)=>{SY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>k5($,U,b,w)});function SF($){return new aB({type:"function",input:Array.isArray($?.input)?PB($?.input):$?.input??H0(N1()),output:$?.output??N1()})}var L0=z("ZodCustom",($,I)=>{RY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>P5($,U,b,w)});function PF($){let I=new A$({check:"custom"});return I._zod.check=$,I}function kF($,I){return w5(L0,$??(()=>!0),I)}function eB($,I={}){return b5(L0,$,I)}function sB($){return X5($)}var RF=D5,TF=W5;function _F($,I={error:`Input not instance of ${$.name}`}){let U=new L0({type:"custom",check:"custom",fn:(b)=>b instanceof $,abort:!0,...E.normalizeParams(I)});return U._zod.bag.Class=$,U}var ZF=(...$)=>Q5({Codec:TD,Boolean:LI,String:AI},...$);function CF($){let I=pB(()=>{return jD([bD($),BB(),JB(),zB(),H0(I),kB(bD(),I)])});return I}function gF($,I){return Y0(SD($),I)}var ay={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ey($){P$({customError:$})}function sy(){return P$().customError}var $J;(function($){})($J||($J={}));var _={...W0,...sX,iso:JI};function $u($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Iu($,I){if(!$.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let b=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===b){let w=U[1];if(!w||!I.defs[w])throw new Error(`Reference not found: ${$}`);return I.defs[w]}throw new Error(`Reference not found: ${$}`)}function xF($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return _.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let w=$.$ref;if(I.refs.has(w))return I.refs.get(w);if(I.processing.has(w))return _.lazy(()=>{if(!I.refs.has(w))throw new Error(`Circular reference not resolved: ${w}`);return I.refs.get(w)});I.processing.add(w);let X=Iu(w,I),D=u$(X,I);return I.refs.set(w,D),I.processing.delete(w),D}if($.enum!==void 0){let w=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&w.length===1&&w[0]===null)return _.null();if(w.length===0)return _.never();if(w.length===1)return _.literal(w[0]);if(w.every((D)=>typeof D==="string"))return _.enum(w);let X=w.map((D)=>_.literal(D));if(X.length<2)return X[0];return _.union([X[0],X[1],...X.slice(2)])}if($.const!==void 0)return _.literal($.const);let U=$.type;if(Array.isArray(U)){let w=U.map((X)=>{let D={...$,type:X};return xF(D,I)});if(w.length===0)return _.never();if(w.length===1)return w[0];return _.union(w)}if(!U)return _.any();let b;switch(U){case"string":{let w=_.string();if($.format){let X=$.format;if(X==="email")w=w.check(_.email());else if(X==="uri"||X==="uri-reference")w=w.check(_.url());else if(X==="uuid"||X==="guid")w=w.check(_.uuid());else if(X==="date-time")w=w.check(_.iso.datetime());else if(X==="date")w=w.check(_.iso.date());else if(X==="time")w=w.check(_.iso.time());else if(X==="duration")w=w.check(_.iso.duration());else if(X==="ipv4")w=w.check(_.ipv4());else if(X==="ipv6")w=w.check(_.ipv6());else if(X==="mac")w=w.check(_.mac());else if(X==="cidr")w=w.check(_.cidrv4());else if(X==="cidr-v6")w=w.check(_.cidrv6());else if(X==="base64")w=w.check(_.base64());else if(X==="base64url")w=w.check(_.base64url());else if(X==="e164")w=w.check(_.e164());else if(X==="jwt")w=w.check(_.jwt());else if(X==="emoji")w=w.check(_.emoji());else if(X==="nanoid")w=w.check(_.nanoid());else if(X==="cuid")w=w.check(_.cuid());else if(X==="cuid2")w=w.check(_.cuid2());else if(X==="ulid")w=w.check(_.ulid());else if(X==="xid")w=w.check(_.xid());else if(X==="ksuid")w=w.check(_.ksuid())}if(typeof $.minLength==="number")w=w.min($.minLength);if(typeof $.maxLength==="number")w=w.max($.maxLength);if($.pattern)w=w.regex(new RegExp($.pattern));b=w;break}case"number":case"integer":{let w=U==="integer"?_.number().int():_.number();if(typeof $.minimum==="number")w=w.min($.minimum);if(typeof $.maximum==="number")w=w.max($.maximum);if(typeof $.exclusiveMinimum==="number")w=w.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")w=w.gt($.minimum);if(typeof $.exclusiveMaximum==="number")w=w.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")w=w.lt($.maximum);if(typeof $.multipleOf==="number")w=w.multipleOf($.multipleOf);b=w;break}case"boolean":{b=_.boolean();break}case"null":{b=_.null();break}case"object":{let w={},X=$.properties||{},D=new Set($.required||[]);for(let[Q,G]of Object.entries(X)){let N=u$(G,I);w[Q]=D.has(Q)?N:N.optional()}if($.propertyNames){let Q=u$($.propertyNames,I),G=$.additionalProperties&&typeof $.additionalProperties==="object"?u$($.additionalProperties,I):_.any();if(Object.keys(w).length===0){b=_.record(Q,G);break}let N=_.object(w).passthrough(),B=_.looseRecord(Q,G);b=_.intersection(N,B);break}if($.patternProperties){let Q=$.patternProperties,G=Object.keys(Q),N=[];for(let H of G){let J=u$(Q[H],I),A=_.string().regex(new RegExp(H));N.push(_.looseRecord(A,J))}let B=[];if(Object.keys(w).length>0)B.push(_.object(w).passthrough());if(B.push(...N),B.length===0)b=_.object({}).passthrough();else if(B.length===1)b=B[0];else{let H=_.intersection(B[0],B[1]);for(let J=2;J<B.length;J++)H=_.intersection(H,B[J]);b=H}break}let W=_.object(w);if($.additionalProperties===!1)b=W.strict();else if(typeof $.additionalProperties==="object")b=W.catchall(u$($.additionalProperties,I));else b=W.passthrough();break}case"array":{let{prefixItems:w,items:X}=$;if(w&&Array.isArray(w)){let D=w.map((Q)=>u$(Q,I)),W=X&&typeof X==="object"&&!Array.isArray(X)?u$(X,I):void 0;if(W)b=_.tuple(D).rest(W);else b=_.tuple(D);if(typeof $.minItems==="number")b=b.check(_.minLength($.minItems));if(typeof $.maxItems==="number")b=b.check(_.maxLength($.maxItems))}else if(Array.isArray(X)){let D=X.map((Q)=>u$(Q,I)),W=$.additionalItems&&typeof $.additionalItems==="object"?u$($.additionalItems,I):void 0;if(W)b=_.tuple(D).rest(W);else b=_.tuple(D);if(typeof $.minItems==="number")b=b.check(_.minLength($.minItems));if(typeof $.maxItems==="number")b=b.check(_.maxLength($.maxItems))}else if(X!==void 0){let D=u$(X,I),W=_.array(D);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);b=W}else b=_.array(_.any());break}default:throw new Error(`Unsupported type: ${U}`)}if($.description)b=b.describe($.description);if($.default!==void 0)b=b.default($.default);return b}function u$($,I){if(typeof $==="boolean")return $?_.any():_.never();let U=xF($,I),b=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let w=$.anyOf.map((D)=>u$(D,I)),X=_.union(w);U=b?_.intersection(U,X):X}if($.oneOf&&Array.isArray($.oneOf)){let w=$.oneOf.map((D)=>u$(D,I)),X=_.xor(w);U=b?_.intersection(U,X):X}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=b?U:_.any();else{let w=b?U:u$($.allOf[0],I),X=b?0:1;for(let D=X;D<$.allOf.length;D++)w=_.intersection(w,u$($.allOf[D],I));U=w}if($.nullable===!0&&I.version==="openapi-3.0")U=_.nullable(U);if($.readOnly===!0)U=_.readonly(U);return U}function hF($,I){if(typeof $==="boolean")return $?_.any():_.never();let U=$u($,I?.defaultTarget),b=$.$defs||$.definitions||{};return u$($,{version:U,defs:b,refs:new Map,processing:new Set,rootSchema:$})}var IJ={};v6(IJ,{string:()=>Uu,number:()=>wu,date:()=>Du,boolean:()=>bu,bigint:()=>Xu});function Uu($){return j7(AI,$)}function wu($){return Z7(zI,$)}function bu($){return u7(LI,$)}function Xu($){return c7(KI,$)}function Du($){return s7(J0,$)}P$(sU());var D4=Y.enum(["document","record"]),_D=["paragraph","heading","bulletListItem","numberedListItem","checkListItem","codeBlock","quote","table","divider","referenceList","annotationList","referenceItem","structure","structuredMatrix","procedureTree"],ZD=["literature","document","record","annotation","artifact"],CD=["molecule","reaction"],vI=50,gD=50;var UJ=Y.object({blockType:Y.enum(_D).default("paragraph").describe("Type of block to create. Default: paragraph"),content:Y.string().describe("Text content for the block"),headingLevel:Y.number().int().min(1).max(3).optional().describe("Heading level (1-3) if blockType is heading"),checked:Y.boolean().optional().describe("Checked state for checkListItem"),title:Y.string().optional().describe('Title for referenceList container (default: "References")'),refNumber:Y.number().int().min(1).optional().describe("Reference number for referenceItem (e.g., 1, 2, 3)"),refId:Y.string().optional().describe('Stable ref ID for citation linking (e.g., "lit-a3f7e2b9"). Auto-generated from linkedEntityId if omitted.'),refType:Y.enum(ZD).optional().describe("Type of reference: literature, document, record, or annotation"),linkedEntityId:Y.string().uuid().optional().describe("UUID of the linked entity (literature, document, or record)"),entityTitle:Y.string().optional().describe("Cached title of the linked entity"),doi:Y.string().optional().describe("DOI for literature references"),smiles:Y.string().optional().describe('SMILES string (e.g., "CCO" for ethanol, "CC(=O)C.N>>CC(N)C.O" for reactions). Required for molecule blocks.'),structureType:Y.enum(CD).optional().describe('Structure type for molecule blocks: "molecule" (default) or "reaction"'),moleculeName:Y.string().optional().describe('Name of the molecule or reaction (e.g., "Ethanol", "Reductive amination")'),moleculeDescription:Y.string().optional().describe("Optional description or notes for the molecule block"),matrixId:Y.string().optional().describe("UUID of the linked data matrix for structuredMatrix blocks"),nodeRef:Y.string().optional().describe("Procedure tree node ID for structuredMatrix blocks"),matrixLabel:Y.string().optional().describe("Display label for structuredMatrix blocks"),showPreview:Y.boolean().optional().describe("Whether structuredMatrix should show its inline preview"),recordId:Y.string().uuid().optional().describe("Record UUID for procedureTree blocks. The executor auto-fills this from the entityId of a record context — agents should omit it.")});var Wu=Y.enum(["text","number","unit","select","boolean"]),Qu=Y.enum(["mandatory","recommended","optional"]),fF=Y.object({key:Y.string().min(1).describe("Stable column key"),label:Y.string().min(1).describe("Human-readable column label"),type:Wu.describe("Column type"),unit:Y.string().optional().describe("Optional display unit"),mandation:Qu.describe("Field importance level"),description:Y.string().optional().describe("Optional field description"),standardRef:Y.string().optional().describe("Optional ontology reference"),options:Y.array(Y.string()).optional().describe("Allowed values for select columns"),hidden:Y.boolean().optional().describe("UI-hidden column. Still surfaced to agents in matrix TOON (with a `hidden` marker in the cols legend) and preserved across row mutations. Use for preset-internal linkage (e.g. stoichiometry `compoundId`).")}),VI=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])),yF=Y.enum(["generic","stoichiometry"]),wJ=Y.object({entityType:D4.describe('Entity type: "document" or "record"'),entityId:Y.string().uuid().describe("Document or record ID"),kind:yF.optional().describe('Typed preset. Defaults to "generic". Use "stoichiometry" for reaction stoichiometry matrices (client-side calc engine derives m/V/n from M/ρ/equiv). When "stoichiometry", `columns` is ignored — the server fills in the stoichiometry preset.'),label:Y.string().min(1).describe("Matrix label shown in the editor"),columns:Y.array(fF).max(vI).optional().describe('Matrix column definitions. Required for `kind="generic"` (the default). Ignored for `kind="stoichiometry"` (preset columns override).'),rows:Y.array(VI).optional().describe("Matrix rows"),nodeRef:Y.string().optional().describe("Optional procedure tree node ID for record matrices"),afterBlockId:Y.string().optional().describe("Insert AFTER this block ID (sibling insertion)"),beforeBlockId:Y.string().optional().describe("Insert BEFORE this block ID (sibling insertion)"),parentBlockId:Y.string().optional().describe("Insert as CHILD of this container block"),childPosition:Y.string().optional().describe('Position within parent children: "first", "last" (default), or child block ID to insert after'),showPreview:Y.boolean().optional().default(!0).describe("Whether the structured matrix block should show its preview")}).refine(($)=>{return[$.afterBlockId,$.beforeBlockId,$.parentBlockId].filter(Boolean).length<=1},{message:"Use only one positioning mode: afterBlockId, beforeBlockId, OR parentBlockId"}).refine(($)=>{if($.childPosition&&!$.parentBlockId)return!1;return!0},{message:"childPosition can only be used with parentBlockId"}).refine(($)=>{if($.kind==="stoichiometry")return!0;return($.columns?.length??0)>=1},{message:'`columns` is required for `kind="generic"` (omit or use `kind="stoichiometry"` for the preset).',path:["columns"]}),K0={name:"insert_matrix",description:"Create a structured data matrix AND insert its linked `structuredMatrix` block in one call.\n\nThe tool performs two writes atomically from the agent's perspective:\n1. Insert a new `data_matrices` row (columns + rows + label). The row starts at `version: 0`; all subsequent edits go through the `*_matrix_rows` / `rebind_matrix_to_node` / `delete_matrix` tools and each bumps `version`.\n2. Insert a `structuredMatrix` block referencing the new matrix id.\n\nTwo binding modes (both valid for records and documents):\n- **Body-level (default)**: omit `nodeRef`. The matrix belongs to the entity and the block lives at the top-level of the document/record body. Use this for free-standing tabular data (reagent inventory, condition sets attached to the whole experiment, etc).\n- **Node-attached**: pass `nodeRef` = procedure node UUID (records only). The matrix is logically scoped to that node and surfaces in `list_procedure_nodes` under that node's `matrixCount`. Use this when the matrix captures data produced inside a specific procedure step (e.g. readings per screening condition).\n\n**Typed presets via `kind`:**\n- `kind=\"generic\"` (default): supply your own `columns`.\n- `kind=\"stoichiometry\"`: choose this whenever you want reaction stoichiometry semantics — mixing reactants, reagents, solvents, catalysts, products and deriving the missing quantities. `columns` is ignored; the server fills the stoichiometry preset (Compound, Role, Phase, Equiv, Limiting, M, ρ, Purity, Stock c, Stock wt%, V, m, n, c, plus three hidden columns: `compoundId` linking to a `chemical` artifact, `cBasis` controlling how `c` is computed, and `cBasisManualVolume` for manual-basis rows).\n - Row shape: `{ compound, compoundId?, role, phase?, equiv?, limiting?, molecularWeight?, density?, purity?, stockMolarity?, stockWtPercent?, volume?, mass?, moles?, concentration?, cBasis?, cBasisManualVolume? }`.\n - **Phase grouping** (`phase` column): free-form text label that groups rows for per-phase volume totals. Use for biphasic syntheses (e.g. `phase: \"aqueous\"` vs `phase: \"oil\"`) or to sum per-mixture volumes within a single-pot reaction (e.g. `phase: \"aqueous\"` for water + dissolved CTAC + TEA). Leave blank for single-phase matrices. The UI renders a totals strip below the table; agents can read back via `get_content` to verify mass/volume balance per phase.\n - **Client-side calc engine auto-derives empty cells on every render. Do NOT pre-compute values you can leave null.** The identities propagated are: `n = m / M`, `n = V · c`, `m = V · ρ · purity` (neat liquids), `n = stockMolarity · V` (aqueous stock), `n = stockWtPercent · ρ_soln · V / M` (wt%-labelled stock), `n_i = equiv_i · n_limiting` (by row), and the reverse `equiv_i = n_i / n_limiting` (so molar ratios surface even when the user only entered masses). Derivation respects user-entered values — any non-null cell is treated as locked and never overwritten.\n - Limiting reactant: set `limiting: true` on exactly one reactant row (the engine also auto-picks the first reactant with enough info if none is flagged). Other reactants should carry `equiv` (molar ratio relative to limiting).\n - Units are fixed: M in g/mol, ρ in g/mL, V in mL, m in g, n in mmol, c in mol/L, purity as a decimal fraction (0–1), stockMolarity in mol/L, stockWtPercent in 0–100.\n - **Stock solution inputs**: for aqueous reagents (e.g. \"2 M NaOH\", \"25 wt% CTAC\"), prefer `stockMolarity` or `stockWtPercent` over `purity`. `purity` describes the dissolved compound itself (a neat liquid descriptor); `stockMolarity`/`stockWtPercent` describe the solution. Use only one of stockMolarity / stockWtPercent per row.\n - **Concentration basis** (`cBasis`, `cBasisManualVolume`): the displayed `c` is `n / V_ref` where the reference volume is picked per row. Defaults — solvent rows use `\"none\"` (c blank), non-solvent rows with a `phase` tag use `\"phase\"` (c relative to V_phase), other non-solvent rows use `\"total\"` (c relative to V_total). Leave `cBasis` null to inherit the default; explicit values are `\"none\" | \"phase\" | \"total\" | \"manual\"`. `\"manual\"` requires `cBasisManualVolume` (mL) and uses that as V_ref. Don't set these unless the user has chosen a non-default basis.\n - Minimal pattern for a reaction: one reactant with `{ role: 'reactant', limiting: true, equiv: 1, molecularWeight, mass OR volume }`; additional reactants with `{ role: 'reactant', equiv, molecularWeight }` (cells left null; the engine fills them from the limiting moles).\n\nIf a procedure node is later deleted, its matrices' `nodeRef` is cleared to null (FK `ON DELETE SET NULL`) and they surface in `list_procedure_nodes` as orphans — rebind via `rebind_matrix_to_node` or drop via `delete_matrix`.\n\nPositioning for the block:\n- `afterBlockId`: insert as SIBLING after the specified block\n- `beforeBlockId`: insert as SIBLING before the specified block\n- `parentBlockId`: insert as CHILD of a container block (e.g. inside a procedure section)\n- Omit all three: append the block at the end of the document. Safe for parallel `insert_matrix` calls — each one appends after the current tail, so agents can batch inserts instead of serialising on `afterBlockId`.\n\nExamples:\n- Body-level matrix appended after an existing block:\n `insert_matrix(entityType=\"record\", entityId=\"...\", afterBlockId=\"...\", label=\"Aqueous phase composition\", columns=[...], rows=[...])`\n- Node-attached matrix nested inside a procedure section:\n `insert_matrix(entityType=\"record\", entityId=\"...\", parentBlockId=\"...\", childPosition=\"last\", label=\"Screening Matrix\", columns=[...], rows=[...], nodeRef=\"...\")`\n\n**Record draft-gate:** matrices on records require the record to be in `draft` status. `completed` / `locked` records return a structured `record_not_draft` error — stop and surface it to the user; agents cannot flip record status themselves."};var bJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),rows:Y.array(VI).min(1).describe("New rows to append at the END of the existing rows array. **Row objects must be keyed by `col.key` (the stable column id), NOT `col.label`.** Unknown keys are retained in JSONB but never rendered and cannot be selected by `rowMatch` later. Call `get_content` on the owning entity first to read the column schema (`cols: key(Label,type[,unit])`)."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error with the actual version. Get the current version from `get_content` / `list_procedure_nodes` / prior tool output.")}),v0={name:"append_matrix_rows",description:["Append rows to the end of an existing data matrix (body-level or node-attached).","**Row objects must be keyed by `col.key`, not `col.label`.** Read the schema first via `get_content` on the owning entity; the matrix TOON shows `cols: key(Label,type[,unit])` and a `{key1,key2,...}` row header. Writing under a label-name that differs from the key persists opaque JSONB that the UI cannot render.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","Only draft records are writable; completed/locked records return a `record_not_draft` error. Matrices on documents/literature/artifacts have no draft gate.","Prefer this over rewriting the entire matrix via the legacy path — row identity is preserved for downstream consumers.",'**Stoichiometry matrices** (`kind=stoichiometry` in the matrix header): leave cells empty (`null`) whenever the client-side calc engine should derive them from the chemistry identities (n = m/M, n = V·c, m = V·ρ·purity, n = stockMolarity·V, n = stockWtPercent·ρ_soln·V/M, n_i = equiv_i · n_limiting, equiv_i = n_i / n_limiting). Only persist values you explicitly measured or want to lock. For aqueous reagent stocks (NaOH(aq), CTAC(aq), TEA(aq)) prefer `stockMolarity` (mol/L) or `stockWtPercent` (0–100) over `purity`. Must preserve `compoundId` (hidden column) verbatim on any row you touch — it is the link to the chemical artifact that auto-fills M and ρ. Two more hidden row keys control how the displayed `c` is computed: `cBasis` (one of `null` | `"none"` | `"phase"` | `"total"` | `"manual"`; null = let the engine pick a default from role+phase, "phase" = c relative to V_phase, "total" = c relative to V_total, "manual" = c relative to `cBasisManualVolume`, "none" = blank c) and `cBasisManualVolume` (mL, only used when cBasis="manual"). Leave both null unless the user has explicitly set them.'].join(" ")};var XJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the workspace-owned matrix to attach."),entityType:Y.enum(["record","artifact","document","literature"]).describe("Owner entity type. Typical use: `record` or `artifact`. Literature attach is currently not supported server-side and will fail."),entityId:Y.string().uuid().describe("Owner entity UUID. The owner MUST live in the same workspace as the matrix, or the server rejects with invalid_matrix_owner."),nodeRef:Y.string().uuid().optional().describe("Optional: if provided, AND the owner is a record, also bind the matrix to this procedure node in the same call. The node must belong to `entityId`."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),V0={name:"attach_matrix",description:["Bind a workspace-owned (orphan) matrix to a provenance owner. Matrices become workspace-owned when their original record/document is deleted — the trigger promotes them instead of cascading. This tool claims them back to a new record or artifact in the same workspace.","Workspace match is enforced server-side: the owner entity MUST live in the same workspace as the matrix. Cross-workspace attach returns an `invalid_matrix_owner` error.","If `nodeRef` is provided and `entityType` is `record`, the matrix is also bound to that procedure node in the same call (combines attach + rebind). The node must belong to the target record.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error.","Only draft records are writable; attaching to a completed/locked record returns `record_not_draft`.","Use `list_matrix_references` first if you want to see which documents/records embed the matrix before attaching."].join(" ")};var DJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the matrix to inspect.")}),q0={name:"list_matrix_references",description:["List the entity_links that embed a data matrix, with each source's type, id, and display title. Matrix embeds are N:M (one matrix can be inserted in multiple records/documents via a `structuredMatrix` block).","Use before calling `delete_matrix` to understand the blast radius — deleting a matrix with embeds elsewhere leaves those blocks in an unlinked state.",'Also useful for analytical questions: "which documents reference matrix X?" or "is this matrix used outside its owner record?".',"Returns empty when the matrix has no embeds. Read-only; no version gate."].join(" ")};var qI=Y.enum(["procedure","characterization","observation","step"]),FI=Y.object({type:Y.literal("file"),target:Y.enum(["local","server","url"]),path:Y.string().min(1),format:Y.string().min(1),label:Y.string().min(1),instrument:Y.string().optional(),metadata:Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean()])).optional()}),uF=Y.object({artifactId:Y.string().uuid(),role:Y.enum(["input","output"]),context:Y.record(Y.string(),Y.unknown()).optional()}),lF=Y.object({matrixId:Y.string().uuid()}),F0=Y.object({tempId:Y.string().min(1).describe("Agent-chosen temporary id; remapped to a real uuid on insert. Must be unique within the input list."),parentTempId:Y.string().nullable().optional().describe("tempId of the parent node, or null/omit for a root node of the tree."),label:Y.string().min(1).describe("Human-readable node label."),type:qI.describe("Node type: procedure (top-level), step (intermediate), characterization (measurement), observation (note)."),order:Y.number().int().min(0).optional().describe("Order within siblings. Defaults to append (one past the last existing sibling)."),copyable:Y.boolean().optional().describe('Whether this node is template-copyable. MUST be false when type === "observation".'),analyticalData:Y.array(FI).optional().describe("File references attached to this node (the typed `analytical_data` JSONB field). Artifact links live in `artifactLinks` below."),artifactLinks:Y.array(uF).optional().describe("Existing artifacts to link to this node at creation time. Use when the agent already has artifactIds in context (e.g., from `search` or a prior `create_artifact` call). For new artifacts, prefer `create_artifact({ linkToNode })` instead. Failures on individual links are non-fatal — the node is still created and a per-node summary is returned."),matrices:Y.array(lF).optional().describe("Existing data matrices to bind to this node at creation time. Workspace orphans are attached + bound; matrices already owned by this record are rebound. Cross-record matrices are rejected (would steal them from the other tree). For new matrices, call `insert_matrix(nodeRef=…)` after the tree exists.")}).refine(($)=>!($.type==="observation"&&$.copyable===!0),{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]});var cF=Y.enum(["replace","append"]),WJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),nodes:Y.array(F0).min(1).describe("Flat procedure-tree list. Each node carries a tempId (and optional parentTempId) that the server remaps to real uuids."),mode:cF.describe('"replace" deletes the existing tree first (destructive); "append" grafts the new nodes on top of the current structure.'),confirm:Y.literal(!0).optional().describe('MUST be set to true when mode="replace" — model-level self-check that the caller understands the existing tree (and its orphaned matrices) will be cleared.'),rootParentId:Y.string().uuid().optional().describe("Append mode only — existing node uuid under which the new roots should be grafted. Omit to graft as top-level siblings.")}).refine(($)=>!($.mode==="replace"&&$.confirm!==!0),{message:'mode="replace" requires confirm: true — destructive operation.',path:["confirm"]}).refine(($)=>!($.mode==="replace"&&$.rootParentId!==void 0),{message:"rootParentId is only valid in append mode; replace wipes the tree first.",path:["rootParentId"]}),M0={name:"build_procedure_tree",description:["Atomically build or augment the procedure-node tree of an ELN record from a canonical JSON tree.","Input is a flat list of nodes using `tempId` / `parentTempId` references; the server remaps to real uuids and returns the mapping.","Modes:","- `append`: grafts the new subtree onto existing structure (either as new roots or under `rootParentId`).","- `replace` (destructive): deletes the entire existing tree first, then inserts the new one. **Requires `confirm: true`** and will orphan any matrices that were bound to deleted nodes — check with `list_procedure_nodes` first.","Only draft records are writable; completed/locked records return a `record_not_draft` error.",'`type === "observation"` nodes must have `copyable` omitted or `false`.',"For surgical edits to a single node prefer `insert_procedure_node` / `update_procedure_node` over a full rebuild."].join(" ")};var QJ=Y.object({title:Y.string().min(1).max(500).describe("Title for the new document"),content:Y.string().optional().describe("Optional initial content in markdown format"),organizationId:Y.string().uuid().optional().describe("Organization ID (auto-resolved if omitted; ignored when spaceId is provided — derived from the space instead)"),workspaceId:Y.string().uuid().optional().describe("Workspace ID (auto-resolved if omitted; ignored when spaceId is provided — derived from the space instead)"),spaceId:Y.string().uuid().optional().describe("Optional space ID. When provided the document is created inside that space and workspace/organization are derived from it. Caller must be a member of the space with write access. Omit for a private (workspace-only) document.")}),j0={name:"create_document",description:"Create a new document. By default the document is private to the user in their current workspace. Pass `spaceId` to create it inside a specific space (shared with space members); workspace and organization are then derived from the space automatically. Use this when the user asks you to create a new document, draft, or note. You can optionally provide initial content in markdown format."};var GJ=Y.object({title:Y.string().min(1).max(500).describe("Paper title"),doi:Y.string().optional().describe("DOI for metadata resolution and CORE full text fetch"),authors:Y.array(Y.string()).optional().describe('Author full names (e.g., ["John Smith", "Jane Doe"]). Omit when a DOI is available so the server can resolve authoritative metadata.'),journal:Y.string().optional().describe("Journal name"),year:Y.number().int().positive().optional().describe("Publication year"),sourceUrl:Y.string().url().optional().describe("Publisher page URL where the paper can be found"),organizationId:Y.string().uuid().optional().describe("Organization ID (auto-resolved if omitted)"),workspaceId:Y.string().uuid().optional().describe("Workspace to assign the paper to"),spaceId:Y.string().uuid().optional().describe("Space within workspace"),fetchFullText:Y.boolean().optional().default(!1).describe("When true, fetches full text from CORE and stores as structured content blocks. Requires DOI. Default false for metadata-only creation.")}),E0={name:"create_literature",description:"Import a research paper into the user's library. Creates a literature item with bibliographic metadata. If a DOI is provided, the server will try to resolve authoritative metadata before creating the item. Set fetchFullText=true to also fetch and parse the full text from CORE (requires DOI). If a DOI is provided and already exists in the library, returns the existing item (idempotent). Use this when the user explicitly asks to import or add a paper to their library."};var mF=["sample","dataset","protocol","file","equipment","chemical","model","reaction"],Gu=["molecule","material","mixture","biomacromolecule"],o$$=Y.enum(Gu),rF=["active","depleted","archived","draft"],xD=Y.enum(mF),MI=Y.enum(rF),Nu=Y.enum(["merge","replace"]).default("merge").describe('How to apply `properties`. "merge" (default): top-level keys in `properties` are merged into the existing JSONB; pass `null` for a key to delete it. "replace": the supplied object fully overwrites the existing JSONB.'),NJ=Y.object({id:Y.string().uuid().describe("UUID of the artifact to update."),name:Y.string().min(1).optional().describe("Display name (skip to keep existing)."),description:Y.string().optional().describe("Plain-text description. Pass an empty string to clear."),tags:Y.array(Y.string()).optional().describe("Replaces the tag set. Pass an empty array to clear all tags. Omit to leave tags untouched."),properties:Y.record(Y.string(),Y.unknown()).optional().describe("Free-form JSONB blob. By default merged into existing properties (see `propertiesMode`). Common keys per type: sample → batch, storage_conditions, preparation_date; dataset → format, row_count, source_instrument; chemical → cas_number, molecular_formula, supplier; equipment → model, serial, last_calibration. Advisory only — any keys allowed."),propertiesMode:Nu.optional(),artifactType:xD.optional().describe("Change the artifact type. Note: existing `properties` are NOT auto-migrated to the new type's advisory schema."),status:MI.optional().describe("Lifecycle status: active | depleted | archived | draft."),storageRef:Y.string().optional().describe("Free-form storage pointer (path, URL, locker code)."),location:Y.string().optional().describe("Free-form physical/logical location."),parentId:Y.string().uuid().nullable().optional().describe("Parent artifact UUID for hierarchies (e.g. sub-samples). Pass null to detach."),templateId:Y.string().uuid().nullable().optional().describe("Template binding. Pass null to detach.")}).refine(($)=>$.name!==void 0||$.description!==void 0||$.tags!==void 0||$.properties!==void 0||$.artifactType!==void 0||$.status!==void 0||$.storageRef!==void 0||$.location!==void 0||$.parentId!==void 0||$.templateId!==void 0,{message:"Provide at least one field to update (name, description, tags, properties, artifactType, status, storageRef, location, parentId, templateId)."}),S0={name:"update_artifact",description:["Update non-identity fields of an artifact (name, description, tags, properties, artifactType, status, storageRef, location, parentId, templateId).",'`properties` (JSONB) is merged into the existing blob by default — pass `propertiesMode: "replace"` for full overwrite. Use null on a key in merge mode to delete it.',"Identity fields (id, workspaceId, orgId, createdBy*, sourceRecordId, deletedAt, timestamps) are never writable through this tool.","Soft-delete and link mutations have their own paths and are out of scope."].join(" ")};var nF=Y.object({cid:Y.number().int().positive().optional().describe("PubChem CID. Most specific identifier — bypasses lookup."),cas:Y.string().optional().describe('CAS Registry Number (e.g. "71-43-2"). Resolved via PubChem CID lookup.'),inchiKey:Y.string().optional().describe('27-character InChIKey (e.g. "UHOVQNZJYSORNB-UHFFFAOYSA-N"). Most reliable for exact-compound lookup.'),name:Y.string().optional().describe("Compound name (IUPAC, common, brand). Resolved via PubChem name search; uses the top match.")}).refine(($)=>$.cid||$.cas||$.inchiKey||$.name,{message:"enrichFromPubchem requires at least one of: cid, cas, inchiKey, name"}),YJ=Y.object({name:Y.string().min(1).max(500).describe('Display name for the artifact (e.g. "DMSN_66c", "TEOS lot 4").'),artifactType:xD.describe('sample | dataset | protocol | file | equipment | chemical | model | reaction. `chemical` is the substance (one per workspace per InChIKey/CCDC); `sample` is a physical instance of a chemical (set `parentId` to the chemical artifact). `reaction` is a sibling type — a transformation (e.g. "Suzuki coupling"), never a sub-flavor of chemical.'),workspaceId:Y.string().uuid().optional().describe("Workspace ID. The workspace's orgId is used as the artifact's org (any organizationId passed alongside is ignored). When omitted, falls back to the user's first workspace."),organizationId:Y.string().uuid().optional().describe("Organization ID. Ignored when workspaceId is provided — derived from the workspace. Auto-resolved to the user's first org only when nothing more specific is passed."),description:Y.string().optional().describe("Plain-text description."),tags:Y.array(Y.string()).optional().describe("Tag names. Resolved to canonical tag IDs server-side (alias-aware)."),properties:Y.record(Y.string(),Y.unknown()).optional().describe(["Free-form JSONB blob. Common keys per type: sample → batch, storage_conditions, preparation_date; dataset → format, row_count, source_instrument; equipment → model, serial, last_calibration; reaction → rxn_smiles, reaction_class, description.",'For chemical artifacts, set `properties.structureClass` to one of: "molecule" (default; PubChem-shaped — iupac_name, molecular_formula, cas_number, canonical_smiles, inchi, inchi_key, molecular_weight, density, ghs_*, …), "material" (MOFs/COFs/zeolites/perovskites — topology, space_group, unit_cell, ccdc_number, framework_formula, bet_surface_area, pore_volume, pore_size, skeletal_density), "mixture" (solutions/electrolytes — components JSON-array of `{artifactId, ratio, role?}`, solvent, concentration_basis), or "biomacromolecule" (proteins/oligonucleotides — uniprot_id, pdb_id, sequence, molecular_weight, pi).',"The server validates keys against the chosen class's typed schema and returns near-match suggestions for likely typos (warn-but-accept). Unknown keys are stored either way; the warning surfaces in the response so you can self-correct on the next call.","Advisory only — any keys allowed."].join(" ")),status:MI.optional().describe('Lifecycle status (default: active). Use "draft" for partially-known artifacts the user still needs to verify.'),storageRef:Y.string().optional().describe("Free-form storage pointer (path, URL, locker code)."),location:Y.string().optional().describe("Free-form physical/logical location."),parentId:Y.string().uuid().optional().describe("Parent artifact UUID for hierarchies (e.g. sub-samples)."),sourceRecordId:Y.string().uuid().optional().describe('UUID of the record this artifact was extracted/derived from. Sets provenance for the entity-search "derived from" view.'),templateId:Y.string().uuid().optional().describe("Optional template binding."),enrichFromPubchem:nF.optional().describe('When set and artifactType is "chemical" with structureClass molecule (or absent), resolve the identifier (cid > inchiKey > cas > name) and auto-fill missing properties from PubChem. Agent-supplied properties always win — enrichment never overwrites. PubChem does NOT index periodic materials, mixtures, biomacromolecules, or reactions, so this is a no-op (logged) for those classes. Failures (no match, PubChem unreachable) do NOT block creation; the artifact is still created with whatever was provided, and the enrichment status is reported in the result.'),linkToNode:Y.object({nodeId:Y.string().uuid(),role:Y.enum(["input","output"]),context:Y.record(Y.string(),Y.unknown()).optional()}).optional().describe("When set, immediately link the newly-created artifact to this procedure node. Equivalent to: `create_artifact(...)` → `link_artifact_to_node({ nodeId, artifactId, role })` — provided as a convenience for the common create-and-link flow. Per-link failures are non-fatal: the artifact is still created and the link error is surfaced in the response.")}),P0={name:"create_artifact",description:["Create a new artifact (sample, dataset, protocol, file, equipment, chemical, model, or reaction).","Pass `workspaceId` to control where it lands; otherwise the user's first workspace is used. Artifacts are workspace-level — there is no space association.",'`createdBySource` is forced to "agent" — never user-controllable through this tool.',"`properties` is free-form JSONB; advisory keys per type are listed in the field description but never enforced.","For molecular chemical artifacts: prefer `enrichFromPubchem: { cas | cid | inchiKey | name }` over hand-assembling properties — the server canonicalizes via PubChem, dedups by InChIKey within the workspace, and auto-fills SMILES/InChI/formula/MW/GHS/transport/descriptors with fillIfAbsent semantics (your `properties` always win). Enrichment failures don't block creation.",'For periodic materials (MOFs/COFs/zeolites/perovskites): set `properties.structureClass = "material"` and supply the structural identity tuple (topology + space_group + unit_cell + ccdc_number) by hand — PubChem does NOT index periodic structures.','For mixtures (solutions/electrolytes): set `properties.structureClass = "mixture"` and reference component chemicals via `properties.components` (JSON array of {artifactId, ratio, role?}). Each component should already exist as a chemical artifact in the workspace.','For reactions: set `artifactType = "reaction"` and supply `properties.rxn_smiles`. Reactions are sibling artifacts, not chemicals.','For samples (physical instances of a chemical): set `artifactType = "sample"` and `parentId = <chemical artifact id>`; the chemical\'s typed properties flow through the UI when the sample is displayed.',"Use this when the user asks to register a new sample, dataset, instrument, chemical, material, mixture, or reaction. To attach the new artifact to a procedure node, pass `linkToNode` (artifact + node + role) — atomic create-and-link."].join(" ")};var BJ=Y.object({title:Y.string().min(1).max(500).describe("Title for the new record."),organizationId:Y.string().uuid().optional().describe("Organization ID. Ignored when spaceId or workspaceId is provided — derived from the parent scope. Auto-resolved to the user's first org only when nothing more specific is passed."),workspaceId:Y.string().uuid().optional().describe("Workspace ID. Ignored when spaceId is provided — derived from the space. Otherwise the workspace's organizationId is used as the record's org (any organizationId passed alongside is ignored)."),spaceId:Y.string().uuid().optional().describe("Optional space to attach the record to. When omitted the record lives at workspace level only."),recordDate:Y.string().regex(/^\d{4}-\d{2}-\d{2}$/,"Expected YYYY-MM-DD").optional().describe("ISO date (YYYY-MM-DD) of the research activity, used for calendar navigation. Defaults to today."),recordType:Y.string().max(120).optional().describe('Freeform record category (e.g. "Experiment", "Characterization", "Protocol").'),collaborators:Y.array(Y.string().uuid()).optional().describe("User ids participating in this research activity."),initialTree:Y.array(F0).optional().describe("Optional flat procedure-tree list built via parentTempId. Inserted after the record is created; on success the response carries a tempId → nodeId map.")}),k0={name:"create_record",description:["Create a new ELN research record in the user's workspace.","Records are always created in `draft` status and begin empty — you can populate the prose body with the edit tools afterwards.","Pass `spaceId` to attach the record to a specific space; otherwise it lives at workspace level only.","Provide `initialTree` to stand up the procedure-node tree in the same call (topological insert, parentTempId → parentId).",'`type === "observation"` nodes are required to have `copyable === false` (or omitted).',"Use this when the user asks you to create a new record, experiment entry, or lab notebook page."].join(" ")};var JJ=Y.object({recordId:Y.string().uuid().describe("Record UUID whose procedure tree you want to inspect.")}),R0={name:"list_procedure_nodes",description:["List the procedure-tree nodes of a record as a flat, token-dense table.","Returns each node's `id`, `parentId`, `order`, `type`, `label`, `copyable`, and live counts of attached matrices, artifact links, and analytical-data file references.","Also emits an `[attachedMatrices]` block with each node-bound matrix's `{matrixId, label, version, rows, cols}` — the `cols` cell uses pipe-separated `key(Label/type[/unit])` entries so you can write `append_/update_/delete_matrix_rows` without an extra `get_content` round-trip.","Orphaned matrices (nodeRef cleared by a node deletion) appear in a separate block with the same schema so they can be rebound via `rebind_matrix_to_node` or dropped via `delete_matrix`.","Use this before editing the tree; reconstruct hierarchy from `parentId` + `order` and pick keys/version for matrix row writes straight from the output."].join(" ")};var HJ=Y.object({reactionArtifactId:Y.string().uuid().describe('UUID of the reaction artifact to derive the stoichiometry matrix from. Must be `artifactType: "reaction"` — other types return an error.'),workspaceId:Y.string().uuid().describe("Workspace scope. Must match the reaction artifact and (if provided) the target entity."),entityType:Y.enum(["record","artifact","document","literature"]).optional().describe("Owner entity type for the spawned matrix. Omit to create a workspace-orphan matrix. Typical use: `record` paired with a `nodeRef`."),entityId:Y.string().uuid().optional().describe("Owner entity UUID. Required when `entityType` is set."),nodeRef:Y.string().uuid().optional().describe('Procedure node UUID. When set with `entityType: "record"`, also ensures a procedure_node ↔ reaction artifact link exists (idempotent — duplicate calls are safe).'),label:Y.string().min(1).optional().describe('Optional matrix label. Defaults to "Stoichiometry — <reaction name>".')}),T0={name:"create_matrix_from_reaction_artifact",description:["Derive a stoichiometry matrix from a saved reaction artifact. Walks the artifact's `linkSlots` (typed component slots: reactant / product / reagent / catalyst / solvent), pulls each linked chemical artifact's name + MW + density, and emits one matrix row per bound slot using the slot's stoichCoefficient. Stamps `derivedFromArtifactId` on the matrix for provenance.","Frozen invariant: edits to the artifact never propagate forward to the spawned matrix; this is a one-shot copy at instantiation time.",'When `entityType: "record"` + `nodeRef` are set, the matrix is bound to the procedure node AND a `procedure_node → reaction artifact` link is ensured (created if absent). One call replaces "link reaction to node" + "spawn matrix" + "bind to node."',"Slots without a `defaultArtifactId` are skipped (no row emitted). The user can fill in those rows by hand on the derived matrix.","Returns the new matrix in the same shape as `insert_matrix`."].join(" ")};var hD=Y.object({entityType:D4.describe('Entity type: "document" or "record"'),entityId:Y.string().uuid().describe("Document or record ID"),blockId:Y.string().optional().describe("Block ID to delete (for single delete)"),blockIds:Y.array(Y.string()).max(gD).optional().describe(`Array of block IDs to delete (batch mode, max ${gD})`)}),Yu=hD.refine(($)=>{let I=$.blockId!==void 0,U=$.blockIds!==void 0&&$.blockIds.length>0;return I!==U},{message:"Provide either blockId (single delete) or blockIds (batch delete), not both"}),_0={name:"delete_block",description:"Delete blocks from a document. Supports single (blockId) or batch (blockIds) mode. Batch mode is more efficient for deleting multiple blocks in one operation. Be careful - this permanently removes blocks and their content. Use get_content first to verify blocks before deleting. "+"Records: only `draft` records are writable; `completed`/`locked` records return a `record_not_draft` error — do not try to flip the status yourself. "+"Do NOT attempt to delete `procedureTree`, `procedureSection`, or `nodeArtifacts` blocks on records — those are sync projections of table-backed rows and re-render on every sync; use the `*_procedure_node` tools to mutate the tree instead."};var AJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the matrix to delete."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error."),acknowledgeDataLoss:Y.literal(!0).describe("Model-level confirmation: MUST be set to true. Deleting the matrix removes all rows AND the linked structuredMatrix block from the owning document/record. Not recoverable outside of version snapshots.")}),Z0={name:"delete_matrix",description:["Delete a data matrix row AND the `structuredMatrix` block that references it in the owning document/record. Both writes happen in the same tool call.","Requires `acknowledgeDataLoss: true` as a model-level self-check — prefer `delete_matrix_rows` or `rebind_matrix_to_node` for less-destructive edits.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version.","Only draft records are writable; completed/locked records return a `record_not_draft` error. Matrices on documents/literature/artifacts have no draft gate.","Undo path: `record_versions` snapshots capture matrix state together with Y.js content when a version is cut, so a prior snapshot restore can recover an accidentally deleted matrix for records under version control."].join(" ")};var Bu=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])).describe("Row match: every provided key/value must equal the row's current value. Matches all rows where the criteria hold."),OJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),rowIndices:Y.array(Y.number().int().min(0)).min(1).optional().describe("Absolute 0-based indices of rows to delete in the current rows array. Indices resolve against the pre-delete snapshot (batch-safe)."),rowMatch:Bu.optional(),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}).refine(($)=>{let I=$.rowIndices!==void 0,U=$.rowMatch!==void 0;return I!==U},{message:"Provide exactly one of `rowIndices` (absolute indices) or `rowMatch` (by column values).",path:["rowIndices"]}),C0={name:"delete_matrix_rows",description:["Remove rows from an existing data matrix, either by absolute `rowIndices` or by `rowMatch` (every column/value in the match must equal the row's current cell). Match mode deletes every row that satisfies the criteria.","**`rowMatch` MUST use `col.key` as each object key, NOT `col.label`** — the schema is visible via `get_content` on the owning entity (`cols: key(Label,type[,unit])` + `{key1,key2,...}` row header).","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","To remove the matrix itself (row + structuredMatrix block) use `delete_matrix`. This tool only prunes rows.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var zJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node to delete."),acknowledgeCascade:Y.literal(!0).describe("Model-level confirmation: MUST be set to true. Deleting a node cascades to all descendants via FK and orphans any bound matrices (matrix.nodeRef → null).")}),g0={name:"delete_procedure_node",description:["Delete a procedure-tree node and all of its descendants (FK cascade).","Any matrices bound to deleted nodes have their `nodeRef` cleared — the response lists the orphaned matrix ids so the agent can rebind or drop them via the matrix tools.","Requires `acknowledgeCascade: true` as a model-level self-check — check `list_procedure_nodes` before deleting to understand the subtree you are about to remove.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var LJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),parentId:Y.string().uuid().optional().describe("Existing parent node UUID. Omit to insert as a top-level root under the record."),label:Y.string().min(1).describe("Human-readable node label."),type:qI.describe("Node type."),afterNodeId:Y.string().uuid().optional().describe("Insert immediately after this existing sibling. Resolves to the sibling's order + 1."),order:Y.number().int().min(0).optional().describe("Explicit sibling order (0-indexed). Mutually exclusive with afterNodeId; omit both to append."),copyable:Y.boolean().optional().describe('Template-copyable flag. MUST be false (or omitted) when type === "observation".'),analyticalData:Y.array(FI).optional().describe("File references attached to the new node.")}).refine(($)=>!($.type==="observation"&&$.copyable===!0),{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]}).refine(($)=>!($.afterNodeId&&$.order!==void 0),{message:"Provide either afterNodeId (relative) OR order (absolute), not both.",path:["afterNodeId"]}),x0={name:"insert_procedure_node",description:["Insert a single procedure-tree node under a draft record.","Positioning: `afterNodeId` (place right after an existing sibling) OR `order` (explicit 0-indexed slot) — omit both to append at the end.","`parentId` must be an existing node UUID in the same record; omit for a new root.",'`type === "observation"` must have `copyable` omitted or `false`.',"Only draft records are writable; completed/locked records return a `record_not_draft` error.","For bulk construction prefer `build_procedure_tree` instead."].join(" ")};var KJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),nodeRef:Y.union([Y.string().uuid(),Y.null()]).describe("Target procedure node UUID, or null to detach (body-level matrix). The node must belong to the same record that owns the matrix. Passing the same value as the current nodeRef is a no-op but still bumps version."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),h0={name:"rebind_matrix_to_node",description:["Change a matrix's procedure-node binding. Three modes via one tool: (a) promote a body-level matrix to a node-attached one (`nodeRef` = new node UUID, current was null), (b) move a node-attached matrix to a different node under the same record, (c) detach a node-attached matrix back to body level (`nodeRef: null`).","The matrix must be record-owned (documents/literature/artifacts have no procedure tree). The target `nodeRef`, when non-null, must reference a node that belongs to the SAME record as the matrix.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var vJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node to link the artifact to."),artifactId:Y.string().uuid().describe("UUID of the artifact to link. Use `search` first to discover existing artifacts, or call `create_artifact` and pass its `linkToNode` shortcut to skip this tool."),role:Y.enum(["input","output"]).describe("Role the artifact plays at this node. `input` = consumed/used (e.g., a starting material on a procedure step). `output` = produced/generated (e.g., a sample emerging from a step). Both roles are valid on every node type — pick by direction of flow."),context:Y.record(Y.string(),Y.unknown()).optional().describe('Optional structured context describing the link (e.g., `{quantity: "2.5 g", purpose: "limiting reagent"}`). Free-form JSONB; mirrors the UI surface.')}),f0={name:"link_artifact_to_node",description:['Bind an existing artifact to a procedure node by creating an `artifact_links` row with `source_type=procedure_node`. Mirrors the node inspector "Link artifact" affordance and is the agent equivalent of `attach_matrix` for matrices.',"The artifact must already exist — to create + link in one call, use `create_artifact({ linkToNode: { nodeId, role } })` instead.","Role semantics: `input` (consumed/used at this step) vs `output` (produced/generated). Pick by direction of flow; both roles are valid on every node type.","The mutation does NOT enforce same-record / same-workspace scope on the artifact — `artifact_links` is polymorphic by design (artifacts can be referenced across the workspace). The node's record drives the surface where the link appears.","Returns the new `linkId` so subsequent `unlink_artifact_from_node({ linkId })` calls don't need to re-query."].join(" ")};var VJ=Y.object({linkId:Y.string().uuid().describe("UUID of the `artifact_links` row to delete. Returned by `link_artifact_to_node` and `list_node_artifact_links`.")}),y0={name:"unlink_artifact_from_node",description:["Remove an artifact ↔ procedure-node link by `linkId`. The artifact and the node both stay; only the join row is dropped.","Use `list_node_artifact_links({ nodeId })` first if you only know the node + artifact identifiers — the link id is the join-row uuid, not the artifact id.","Idempotent at the user level: deleting a non-existent link returns `success: true` with `id` echoed (delete-by-id is a no-op on missing rows in the underlying repo)."].join(" ")};var qJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node whose artifact links to list.")}),u0={name:"list_node_artifact_links",description:["List all artifact ↔ procedure-node links for a given node. Returns one row per link with `linkId`, `artifactId`, `artifactName`, `artifactType`, `role`, `context`, and `createdAt`.",'Mirrors the node inspector "Artifacts" panel; use this before `unlink_artifact_from_node` when you only know the artifact id (the link id is the join-row uuid, not the artifact id).'].join(" ")};var iF=Y.object({nodeId:Y.string().uuid().describe("UUID of the node to move/reorder."),parentId:Y.string().uuid().nullable().describe("New parent UUID, or null to become a top-level root. Must belong to the same record."),order:Y.number().int().min(0).describe("New 0-indexed order within the new parent's children.")}),FJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),moves:Y.array(iF).min(1).describe("Batch of reparent/reorder operations applied together. Each entry carries the node's final parent and order — siblings you don't move keep their current values, so typically you pass moves for the whole sibling set you're rearranging.")}),l0={name:"reorder_procedure_nodes",description:["Batch reparent / reorder procedure-tree nodes in a draft record.","Each move carries the *final* `parentId` + `order` — think of it as a transaction that describes the desired post-state.","Any nodes you omit from `moves` keep their current parent/order, so you usually include the whole sibling set being rearranged.","All moves must target nodes in the same record; cross-record moves are rejected.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var Ju=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])).describe("Row match: every provided key/value must equal the row's current value. Matches all rows where the criteria hold (not just the first)."),Hu=Y.object({rowIndex:Y.number().int().min(0).optional().describe("Target a single row by 0-based index in the current rows array."),rowMatch:Ju.optional(),values:VI.describe("Partial row patch. **Keys MUST match `col.key` (the column id), NOT `col.label`.** Keys present here overwrite the matching rows' cells. Keys not in `values` retain their existing values. Set a key to null to clear a cell.")}).refine(($)=>{let I=$.rowIndex!==void 0,U=$.rowMatch!==void 0;return I!==U},{message:"Provide exactly one of `rowIndex` (absolute) or `rowMatch` (by column values).",path:["rowIndex"]}),MJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),updates:Y.array(Hu).min(1).describe("List of row patches. Each entry targets rows by `rowIndex` OR `rowMatch` and supplies a partial `values` patch."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),c0={name:"update_matrix_rows",description:["Patch cells in an existing data matrix. Each update targets rows by `rowIndex` (absolute 0-based) OR `rowMatch` (every provided column/value must equal the row's current cell); partial column updates are allowed.","**All row-keyed objects (`values`, `rowMatch`) MUST use `col.key` as the object key, NOT `col.label`.** Read the schema first via `get_content` on the owning entity — its matrix TOON shows `cols: key(Label,type[,unit])` and a `{key1,key2,...}` row header. Mismatched keys persist as opaque JSONB that the UI cannot render.","Match mode updates every row that satisfies the criteria — use it when the match is unique, or when you intend to update a whole group at once.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","Set a `values` entry to null to clear a cell. Keys not present in `values` are untouched.","Only draft records are writable; completed/locked records return a `record_not_draft` error.",'**Stoichiometry matrices** (`kind=stoichiometry` in the matrix header): clearing a numeric cell to null re-enables client-side derivation via the chemistry identities (n = m/M, n = V·c, m = V·ρ·purity, n = stockMolarity·V, n = stockWtPercent·ρ_soln·V/M, n_i = equiv_i · n_limiting, equiv_i = n_i / n_limiting). Keys not in `values` stay untouched — use this to preserve the hidden `compoundId` link to a chemical artifact while patching other cells. Do not manually recompute derived quantities; write only measured or locked-in values. For aqueous stock solutions, set `stockMolarity` (mol/L) or `stockWtPercent` (0–100) rather than approximating via `purity` × `density`. The displayed `c` is computed against a per-row reference volume controlled by two hidden keys: `cBasis` (`null` | `"none"` | `"phase"` | `"total"` | `"manual"`; null = engine picks default by role+phase, "phase" = c relative to V_phase, "total" = c relative to V_total, "manual" = c relative to `cBasisManualVolume`, "none" = blank c) and `cBasisManualVolume` (mL, only used when cBasis="manual"). Leave both null unless the user explicitly set them.'].join(" ")};var jJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the existing procedure node to update."),label:Y.string().min(1).optional().describe("New label (skip to keep existing)."),type:qI.optional().describe('New type (skip to keep existing). Changing type to "observation" forces copyable=false.'),copyable:Y.boolean().optional().describe('Template-copyable flag. When the resulting type is "observation" this must be false (or omitted).'),analyticalData:Y.array(FI).optional().describe("Replace the current `analyticalData` list with this one. Pass an empty array to clear it; omit to leave it untouched.")}).refine(($)=>{if($.type!=="observation")return!0;return $.copyable===void 0||$.copyable===!1},{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]}).refine(($)=>$.label!==void 0||$.type!==void 0||$.copyable!==void 0||$.analyticalData!==void 0,{message:"Provide at least one field to update (label, type, copyable, analyticalData)."}),m0={name:"update_procedure_node",description:["Update non-structural fields of a procedure-tree node (label, type, copyable, analyticalData).","Structural changes (move / reorder) go through `reorder_procedure_nodes` — this tool never touches parentId or order.",'`type === "observation"` implies `copyable = false`; setting both to a conflicting combination is rejected.',"Passing an empty `analyticalData` array clears the file-ref list; omitting the field leaves it untouched.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};function k$($){return` ${$.map((U)=>{if(U===null||U===void 0||U==="")return"";let b=String(U);return b.includes(",")?`"${b}"`:b}).join(",")}`}function fD($){if(!$)return"";let I=[];if($.previousBlock)I.push(`After: [${$.previousBlock.type} | ${$.previousBlock.id}]`);if($.nextBlock)I.push(`Before: [${$.nextBlock.type} | ${$.nextBlock.id}]`);return I.join(", ")}function pF($,I,U=150){let b=0,w=Math.min($.length,I.length);while(b<w&&$[b]===I[b])b++;let X=0;while(X<w-b&&$.at(1+X)===I.at(1+X))X++;let D=Math.floor(U/2),W=Math.max(0,b-D),Q=Math.min($.length,$.length-X+D),G=Math.min(I.length,I.length-X+D),N=W>0?"...":"",B=Q<$.length?"...":"",H=G<I.length?"...":"",J=`${N}${$.slice(W,Q)}${B}`,A=`${N}${I.slice(W,G)}${H}`;return`--- before
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let X of $.seen.entries()){let D=X[1];if(I===X[0]){w(X);continue}if($.external){let Q=$.external.registry.get(X[0])?.id;if(I!==X[0]&&Q){w(X);continue}}if($.metadataRegistry.get(X[0])?.id){w(X);continue}if(D.cycle){w(X);continue}if(D.count>1){if($.reused==="ref"){w(X);continue}}}}function h4($,I){let U=$.seen.get(I);if(!U)throw new Error("Unprocessed schema. This is a bug in Zod.");let b=(D)=>{let W=$.seen.get(D),Q=W.def??W.schema,G={...Q};if(W.ref===null)return;let N=W.ref;if(W.ref=null,N){b(N);let B=$.seen.get(N).schema;if(B.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))Q.allOf=Q.allOf??[],Q.allOf.push(B);else Object.assign(Q,B),Object.assign(Q,G)}if(!W.isParent)$.override({zodSchema:D,jsonSchema:Q,path:W.path??[]})};for(let D of[...$.seen.entries()].reverse())b(D[0]);let w={};if($.target==="draft-2020-12")w.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")w.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")w.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let D=$.external.registry.get(I)?.id;if(!D)throw new Error("Schema is missing an `id` property");w.$id=$.external.uri(D)}Object.assign(w,U.def??U.schema);let X=$.external?.defs??{};for(let D of $.seen.entries()){let W=D[1];if(W.def&&W.defId)X[W.defId]=W.def}if($.external);else if(Object.keys(X).length>0)if($.target==="draft-2020-12")w.$defs=X;else w.definitions=X;try{let D=JSON.parse(JSON.stringify(w));return Object.defineProperty(D,"~standard",{value:{...I["~standard"],jsonSchema:{input:BI(I,"input"),output:BI(I,"output")}},enumerable:!1,writable:!1}),D}catch(D){throw new Error("Error converting schema to JSON.")}}function t$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let b=$._zod.def;if(b.type==="transform")return!0;if(b.type==="array")return t$(b.element,U);if(b.type==="set")return t$(b.valueType,U);if(b.type==="lazy")return t$(b.getter(),U);if(b.type==="promise"||b.type==="optional"||b.type==="nonoptional"||b.type==="nullable"||b.type==="readonly"||b.type==="default"||b.type==="prefault")return t$(b.innerType,U);if(b.type==="intersection")return t$(b.left,U)||t$(b.right,U);if(b.type==="record"||b.type==="map")return t$(b.keyType,U)||t$(b.valueType,U);if(b.type==="pipe")return t$(b.in,U)||t$(b.out,U);if(b.type==="object"){for(let w in b.shape)if(t$(b.shape[w],U))return!0;return!1}if(b.type==="union"){for(let w of b.options)if(t$(w,U))return!0;return!1}if(b.type==="tuple"){for(let w of b.items)if(t$(w,U))return!0;if(b.rest&&t$(b.rest,U))return!0;return!1}return!1}var G5=($,I={})=>(U)=>{let b=g4({...U,processors:I});return G$($,b),x4(b,$),h4(b,$)},BI=($,I)=>(U)=>{let{libraryOptions:b,target:w}=U??{},X=g4({...b??{},target:w,io:I,processors:{}});return G$($,X),x4(X,$),h4(X,$)};var oy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},N5=($,I,U,b)=>{let w=U;w.type="string";let{minimum:X,maximum:D,format:W,patterns:Q,contentEncoding:G}=$._zod.bag;if(typeof X==="number")w.minLength=X;if(typeof D==="number")w.maxLength=D;if(W){if(w.format=oy[W]??W,w.format==="")delete w.format}if(G)w.contentEncoding=G;if(Q&&Q.size>0){let N=[...Q];if(N.length===1)w.pattern=N[0].source;else if(N.length>1)w.allOf=[...N.map((B)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:B.source}))]}},Y5=($,I,U,b)=>{let w=U,{minimum:X,maximum:D,format:W,multipleOf:Q,exclusiveMaximum:G,exclusiveMinimum:N}=$._zod.bag;if(typeof W==="string"&&W.includes("int"))w.type="integer";else w.type="number";if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")w.minimum=N,w.exclusiveMinimum=!0;else w.exclusiveMinimum=N;if(typeof X==="number"){if(w.minimum=X,typeof N==="number"&&I.target!=="draft-04")if(N>=X)delete w.minimum;else delete w.exclusiveMinimum}if(typeof G==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")w.maximum=G,w.exclusiveMaximum=!0;else w.exclusiveMaximum=G;if(typeof D==="number"){if(w.maximum=D,typeof G==="number"&&I.target!=="draft-04")if(G<=D)delete w.maximum;else delete w.exclusiveMaximum}if(typeof Q==="number")w.multipleOf=Q},B5=($,I,U,b)=>{U.type="boolean"},J5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},H5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},A5=($,I,U,b)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},O5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},z5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},L5=($,I,U,b)=>{U.not={}},K5=($,I,U,b)=>{},v5=($,I,U,b)=>{},V5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},q5=($,I,U,b)=>{let w=$._zod.def,X=uU(w.entries);if(X.every((D)=>typeof D==="number"))U.type="number";if(X.every((D)=>typeof D==="string"))U.type="string";U.enum=X},F5=($,I,U,b)=>{let w=$._zod.def,X=[];for(let D of w.values)if(D===void 0){if(I.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof D==="bigint")if(I.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");else X.push(Number(D));else X.push(D);if(X.length===0);else if(X.length===1){let D=X[0];if(U.type=D===null?"null":typeof D,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[D];else U.const=D}else{if(X.every((D)=>typeof D==="number"))U.type="number";if(X.every((D)=>typeof D==="string"))U.type="string";if(X.every((D)=>typeof D==="boolean"))U.type="boolean";if(X.every((D)=>D===null))U.type="null";U.enum=X}},M5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},j5=($,I,U,b)=>{let w=U,X=$._zod.pattern;if(!X)throw new Error("Pattern not found in template literal");w.type="string",w.pattern=X.source},E5=($,I,U,b)=>{let w=U,X={type:"string",format:"binary",contentEncoding:"binary"},{minimum:D,maximum:W,mime:Q}=$._zod.bag;if(D!==void 0)X.minLength=D;if(W!==void 0)X.maxLength=W;if(Q)if(Q.length===1)X.contentMediaType=Q[0],Object.assign(w,X);else w.anyOf=Q.map((G)=>{return{...X,contentMediaType:G}});else Object.assign(w,X)},S5=($,I,U,b)=>{U.type="boolean"},P5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},k5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},R5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},T5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_5=($,I,U,b)=>{if(I.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Z5=($,I,U,b)=>{let w=U,X=$._zod.def,{minimum:D,maximum:W}=$._zod.bag;if(typeof D==="number")w.minItems=D;if(typeof W==="number")w.maxItems=W;w.type="array",w.items=G$(X.element,I,{...b,path:[...b.path,"items"]})},C5=($,I,U,b)=>{let w=U,X=$._zod.def;w.type="object",w.properties={};let D=X.shape;for(let G in D)w.properties[G]=G$(D[G],I,{...b,path:[...b.path,"properties",G]});let W=new Set(Object.keys(D)),Q=new Set([...W].filter((G)=>{let N=X.shape[G]._zod;if(I.io==="input")return N.optin===void 0;else return N.optout===void 0}));if(Q.size>0)w.required=Array.from(Q);if(X.catchall?._zod.def.type==="never")w.additionalProperties=!1;else if(!X.catchall){if(I.io==="output")w.additionalProperties=!1}else if(X.catchall)w.additionalProperties=G$(X.catchall,I,{...b,path:[...b.path,"additionalProperties"]})},aX=($,I,U,b)=>{let w=$._zod.def,X=w.inclusive===!1,D=w.options.map((W,Q)=>G$(W,I,{...b,path:[...b.path,X?"oneOf":"anyOf",Q]}));if(X)U.oneOf=D;else U.anyOf=D},g5=($,I,U,b)=>{let w=$._zod.def,X=G$(w.left,I,{...b,path:[...b.path,"allOf",0]}),D=G$(w.right,I,{...b,path:[...b.path,"allOf",1]}),W=(G)=>("allOf"in G)&&Object.keys(G).length===1,Q=[...W(X)?X.allOf:[X],...W(D)?D.allOf:[D]];U.allOf=Q},x5=($,I,U,b)=>{let w=U,X=$._zod.def;w.type="array";let D=I.target==="draft-2020-12"?"prefixItems":"items",W=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",Q=X.items.map((H,J)=>G$(H,I,{...b,path:[...b.path,D,J]})),G=X.rest?G$(X.rest,I,{...b,path:[...b.path,W,...I.target==="openapi-3.0"?[X.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(w.prefixItems=Q,G)w.items=G}else if(I.target==="openapi-3.0"){if(w.items={anyOf:Q},G)w.items.anyOf.push(G);if(w.minItems=Q.length,!G)w.maxItems=Q.length}else if(w.items=Q,G)w.additionalItems=G;let{minimum:N,maximum:B}=$._zod.bag;if(typeof N==="number")w.minItems=N;if(typeof B==="number")w.maxItems=B},h5=($,I,U,b)=>{let w=U,X=$._zod.def;if(w.type="object",I.target==="draft-07"||I.target==="draft-2020-12")w.propertyNames=G$(X.keyType,I,{...b,path:[...b.path,"propertyNames"]});w.additionalProperties=G$(X.valueType,I,{...b,path:[...b.path,"additionalProperties"]})},f5=($,I,U,b)=>{let w=$._zod.def,X=G$(w.innerType,I,b),D=I.seen.get($);if(I.target==="openapi-3.0")D.ref=w.innerType,U.nullable=!0;else U.anyOf=[X,{type:"null"}]},y5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},u5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType,U.default=JSON.parse(JSON.stringify(w.defaultValue))},l5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);if(X.ref=w.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(w.defaultValue))},c5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType;let D;try{D=w.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}U.default=D},m5=($,I,U,b)=>{let w=$._zod.def,X=I.io==="input"?w.in._zod.def.type==="transform"?w.out:w.in:w.out;G$(X,I,b);let D=I.seen.get($);D.ref=X},r5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType,U.readOnly=!0},n5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},i5=($,I,U,b)=>{let w=$._zod.def;G$(w.innerType,I,b);let X=I.seen.get($);X.ref=w.innerType},o5=($,I,U,b)=>{let w=$._zod.innerType;G$(w,I,b);let X=I.seen.get($);X.ref=w},tX={string:N5,number:Y5,boolean:B5,bigint:J5,symbol:H5,null:A5,undefined:O5,void:z5,never:L5,any:K5,unknown:v5,date:V5,enum:q5,literal:F5,nan:M5,template_literal:j5,file:E5,success:S5,custom:P5,function:k5,transform:R5,map:T5,set:_5,array:Z5,object:C5,union:aX,intersection:g5,tuple:x5,record:h5,nullable:f5,nonoptional:y5,default:u5,prefault:l5,catch:c5,pipe:m5,readonly:r5,promise:n5,optional:i5,lazy:o5};function eX($,I){if("_idmap"in $){let b=$,w=g4({...I,processors:tX}),X={};for(let Q of b._idmap.entries()){let[G,N]=Q;G$(N,w)}let D={},W={registry:b,uri:I?.uri,defs:X};w.external=W;for(let Q of b._idmap.entries()){let[G,N]=Q;x4(w,N),D[G]=h4(w,N)}if(Object.keys(X).length>0){let Q=w.target==="draft-2020-12"?"$defs":"definitions";D.__shared={[Q]:X}}return{schemas:D}}let U=g4({...I,processors:tX});return G$($,U),x4(U,$),h4(U,$)}class d5{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=g4({processors:tX,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return G$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}x4(this.ctx,$);let U=h4(this.ctx,$),{"~standard":b,...w}=U;return w}}var vq={};var W0={};v6(W0,{xor:()=>BF,xid:()=>gq,void:()=>DF,uuidv7:()=>Sq,uuidv6:()=>Eq,uuidv4:()=>jq,uuid:()=>Mq,url:()=>Pq,unknown:()=>N1,union:()=>jD,undefined:()=>bF,ulid:()=>Cq,uint64:()=>UF,uint32:()=>sq,tuple:()=>PB,transform:()=>SD,templateLiteral:()=>jF,symbol:()=>wF,superRefine:()=>sB,success:()=>qF,stringbool:()=>ZF,stringFormat:()=>iq,string:()=>bD,strictObject:()=>NF,set:()=>zF,refine:()=>eB,record:()=>kB,readonly:()=>iB,promise:()=>EF,preprocess:()=>gF,prefault:()=>yB,pipe:()=>Y0,partialRecord:()=>HF,optional:()=>G0,object:()=>GF,number:()=>BB,nullish:()=>VF,nullable:()=>N0,null:()=>zB,nonoptional:()=>uB,never:()=>MD,nativeEnum:()=>LF,nanoid:()=>Tq,nan:()=>FF,meta:()=>TF,map:()=>OF,mac:()=>fq,looseRecord:()=>AF,looseObject:()=>YF,literal:()=>KF,lazy:()=>pB,ksuid:()=>xq,keyof:()=>QF,jwt:()=>nq,json:()=>CF,ipv6:()=>yq,ipv4:()=>hq,intersection:()=>EB,int64:()=>IF,int32:()=>eq,int:()=>XD,instanceof:()=>_F,httpUrl:()=>kq,hostname:()=>oq,hex:()=>dq,hash:()=>pq,guid:()=>Fq,function:()=>SF,float64:()=>aq,float32:()=>tq,file:()=>vF,enum:()=>ED,emoji:()=>Rq,email:()=>qq,e164:()=>rq,discriminatedUnion:()=>JF,describe:()=>RF,date:()=>WF,custom:()=>kF,cuid2:()=>Zq,cuid:()=>_q,codec:()=>MF,cidrv6:()=>lq,cidrv4:()=>uq,check:()=>PF,catch:()=>mB,boolean:()=>JB,bigint:()=>$F,base64url:()=>mq,base64:()=>cq,array:()=>H0,any:()=>XF,_function:()=>SF,_default:()=>hB,_ZodString:()=>DD,ZodXor:()=>FB,ZodXID:()=>JD,ZodVoid:()=>VB,ZodUnknown:()=>KB,ZodUnion:()=>O0,ZodUndefined:()=>AB,ZodUUID:()=>i6,ZodURL:()=>B0,ZodULID:()=>BD,ZodType:()=>t,ZodTuple:()=>SB,ZodTransform:()=>CB,ZodTemplateLiteral:()=>oB,ZodSymbol:()=>HB,ZodSuccess:()=>lB,ZodStringFormat:()=>J$,ZodString:()=>AI,ZodSet:()=>TB,ZodRecord:()=>z0,ZodReadonly:()=>nB,ZodPromise:()=>tB,ZodPrefault:()=>fB,ZodPipe:()=>RD,ZodOptional:()=>PD,ZodObject:()=>A0,ZodNumberFormat:()=>Y1,ZodNumber:()=>zI,ZodNullable:()=>gB,ZodNull:()=>OB,ZodNonOptional:()=>kD,ZodNever:()=>vB,ZodNanoID:()=>GD,ZodNaN:()=>rB,ZodMap:()=>RB,ZodMAC:()=>YB,ZodLiteral:()=>_B,ZodLazy:()=>dB,ZodKSUID:()=>HD,ZodJWT:()=>qD,ZodIntersection:()=>jB,ZodIPv6:()=>OD,ZodIPv4:()=>AD,ZodGUID:()=>Q0,ZodFunction:()=>aB,ZodFile:()=>ZB,ZodEnum:()=>HI,ZodEmoji:()=>QD,ZodEmail:()=>WD,ZodE164:()=>VD,ZodDiscriminatedUnion:()=>MB,ZodDefault:()=>xB,ZodDate:()=>J0,ZodCustomStringFormat:()=>OI,ZodCustom:()=>L0,ZodCodec:()=>TD,ZodCatch:()=>cB,ZodCUID2:()=>YD,ZodCUID:()=>ND,ZodCIDRv6:()=>LD,ZodCIDRv4:()=>zD,ZodBoolean:()=>LI,ZodBigIntFormat:()=>FD,ZodBigInt:()=>KI,ZodBase64URL:()=>vD,ZodBase64:()=>KD,ZodArray:()=>qB,ZodAny:()=>LB});var sX={};v6(sX,{uppercase:()=>II,trim:()=>WI,toUpperCase:()=>GI,toLowerCase:()=>QI,startsWith:()=>wI,slugify:()=>NI,size:()=>e1,regex:()=>s1,property:()=>pX,positive:()=>nX,overwrite:()=>Z6,normalize:()=>DI,nonpositive:()=>oX,nonnegative:()=>dX,negative:()=>iX,multipleOf:()=>Z4,minSize:()=>C4,minLength:()=>b4,mime:()=>XI,maxSize:()=>W1,maxLength:()=>Q1,lte:()=>N6,lt:()=>r6,lowercase:()=>$I,length:()=>G1,includes:()=>UI,gte:()=>p$,gt:()=>n6,endsWith:()=>bI});var JI={};v6(JI,{time:()=>a5,duration:()=>e5,datetime:()=>p5,date:()=>t5,ZodISOTime:()=>UD,ZodISODuration:()=>wD,ZodISODateTime:()=>$D,ZodISODate:()=>ID});var $D=z("ZodISODateTime",($,I)=>{ZN.init($,I),J$.init($,I)});function p5($){return P7($D,$)}var ID=z("ZodISODate",($,I)=>{CN.init($,I),J$.init($,I)});function t5($){return k7(ID,$)}var UD=z("ZodISOTime",($,I)=>{gN.init($,I),J$.init($,I)});function a5($){return R7(UD,$)}var wD=z("ZodISODuration",($,I)=>{xN.init($,I),J$.init($,I)});function e5($){return T7(wD,$)}var Vq=($,I)=>{nU.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>oU($,U)},flatten:{value:(U)=>iU($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,r1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,r1,2)}},isEmpty:{get(){return $.issues.length===0}}})},py=z("ZodError",Vq),b6=z("ZodError",Vq,{Parent:Error});var s5=o1(b6),$B=d1(b6),IB=p1(b6),UB=t1(b6),wB=bX(b6),bB=XX(b6),XB=DX(b6),DB=WX(b6),WB=QX(b6),QB=GX(b6),GB=NX(b6),NB=YX(b6);var t=z("ZodType",($,I)=>{return o.init($,I),Object.assign($["~standard"],{jsonSchema:{input:BI($,"input"),output:BI($,"output")}}),$.toJSONSchema=G5($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(E.mergeDefs(I,{checks:[...I.checks??[],...U.map((b)=>typeof b==="function"?{_zod:{check:b,def:{check:"custom"},onattach:[]}}:b)]}))},$.clone=(U,b)=>o$($,U,b),$.brand=()=>$,$.register=(U,b)=>{return U.add($,b),$},$.parse=(U,b)=>s5($,U,b,{callee:$.parse}),$.safeParse=(U,b)=>IB($,U,b),$.parseAsync=async(U,b)=>$B($,U,b,{callee:$.parseAsync}),$.safeParseAsync=async(U,b)=>UB($,U,b),$.spa=$.safeParseAsync,$.encode=(U,b)=>wB($,U,b),$.decode=(U,b)=>bB($,U,b),$.encodeAsync=async(U,b)=>XB($,U,b),$.decodeAsync=async(U,b)=>DB($,U,b),$.safeEncode=(U,b)=>WB($,U,b),$.safeDecode=(U,b)=>QB($,U,b),$.safeEncodeAsync=async(U,b)=>GB($,U,b),$.safeDecodeAsync=async(U,b)=>NB($,U,b),$.refine=(U,b)=>$.check(eB(U,b)),$.superRefine=(U)=>$.check(sB(U)),$.overwrite=(U)=>$.check(Z6(U)),$.optional=()=>G0($),$.nullable=()=>N0($),$.nullish=()=>G0(N0($)),$.nonoptional=(U)=>uB($,U),$.array=()=>H0($),$.or=(U)=>jD([$,U]),$.and=(U)=>EB($,U),$.transform=(U)=>Y0($,SD(U)),$.default=(U)=>hB($,U),$.prefault=(U)=>yB($,U),$.catch=(U)=>mB($,U),$.pipe=(U)=>Y0($,U),$.readonly=()=>iB($),$.describe=(U)=>{let b=$.clone();return d$.add(b,{description:U}),b},Object.defineProperty($,"description",{get(){return d$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return d$.get($);let b=$.clone();return d$.add(b,U[0]),b},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$}),DD=z("_ZodString",($,I)=>{D1.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>N5($,b,w,X);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(...b)=>$.check(s1(...b)),$.includes=(...b)=>$.check(UI(...b)),$.startsWith=(...b)=>$.check(wI(...b)),$.endsWith=(...b)=>$.check(bI(...b)),$.min=(...b)=>$.check(b4(...b)),$.max=(...b)=>$.check(Q1(...b)),$.length=(...b)=>$.check(G1(...b)),$.nonempty=(...b)=>$.check(b4(1,...b)),$.lowercase=(b)=>$.check($I(b)),$.uppercase=(b)=>$.check(II(b)),$.trim=()=>$.check(WI()),$.normalize=(...b)=>$.check(DI(...b)),$.toLowerCase=()=>$.check(QI()),$.toUpperCase=()=>$.check(GI()),$.slugify=()=>$.check(NI())}),AI=z("ZodString",($,I)=>{D1.init($,I),DD.init($,I),$.email=(U)=>$.check(jX(WD,U)),$.url=(U)=>$.check(D0(B0,U)),$.jwt=(U)=>$.check(rX(qD,U)),$.emoji=(U)=>$.check(RX(QD,U)),$.guid=(U)=>$.check(X0(Q0,U)),$.uuid=(U)=>$.check(EX(i6,U)),$.uuidv4=(U)=>$.check(SX(i6,U)),$.uuidv6=(U)=>$.check(PX(i6,U)),$.uuidv7=(U)=>$.check(kX(i6,U)),$.nanoid=(U)=>$.check(TX(GD,U)),$.guid=(U)=>$.check(X0(Q0,U)),$.cuid=(U)=>$.check(_X(ND,U)),$.cuid2=(U)=>$.check(ZX(YD,U)),$.ulid=(U)=>$.check(CX(BD,U)),$.base64=(U)=>$.check(lX(KD,U)),$.base64url=(U)=>$.check(cX(vD,U)),$.xid=(U)=>$.check(gX(JD,U)),$.ksuid=(U)=>$.check(xX(HD,U)),$.ipv4=(U)=>$.check(hX(AD,U)),$.ipv6=(U)=>$.check(fX(OD,U)),$.cidrv4=(U)=>$.check(yX(zD,U)),$.cidrv6=(U)=>$.check(uX(LD,U)),$.e164=(U)=>$.check(mX(VD,U)),$.datetime=(U)=>$.check(p5(U)),$.date=(U)=>$.check(t5(U)),$.time=(U)=>$.check(a5(U)),$.duration=(U)=>$.check(e5(U))});function bD($){return M7(AI,$)}var J$=z("ZodStringFormat",($,I)=>{B$.init($,I),DD.init($,I)}),WD=z("ZodEmail",($,I)=>{MN.init($,I),J$.init($,I)});function qq($){return jX(WD,$)}var Q0=z("ZodGUID",($,I)=>{qN.init($,I),J$.init($,I)});function Fq($){return X0(Q0,$)}var i6=z("ZodUUID",($,I)=>{FN.init($,I),J$.init($,I)});function Mq($){return EX(i6,$)}function jq($){return SX(i6,$)}function Eq($){return PX(i6,$)}function Sq($){return kX(i6,$)}var B0=z("ZodURL",($,I)=>{jN.init($,I),J$.init($,I)});function Pq($){return D0(B0,$)}function kq($){return D0(B0,{protocol:/^https?$/,hostname:K6.domain,...E.normalizeParams($)})}var QD=z("ZodEmoji",($,I)=>{EN.init($,I),J$.init($,I)});function Rq($){return RX(QD,$)}var GD=z("ZodNanoID",($,I)=>{SN.init($,I),J$.init($,I)});function Tq($){return TX(GD,$)}var ND=z("ZodCUID",($,I)=>{PN.init($,I),J$.init($,I)});function _q($){return _X(ND,$)}var YD=z("ZodCUID2",($,I)=>{kN.init($,I),J$.init($,I)});function Zq($){return ZX(YD,$)}var BD=z("ZodULID",($,I)=>{RN.init($,I),J$.init($,I)});function Cq($){return CX(BD,$)}var JD=z("ZodXID",($,I)=>{TN.init($,I),J$.init($,I)});function gq($){return gX(JD,$)}var HD=z("ZodKSUID",($,I)=>{_N.init($,I),J$.init($,I)});function xq($){return xX(HD,$)}var AD=z("ZodIPv4",($,I)=>{hN.init($,I),J$.init($,I)});function hq($){return hX(AD,$)}var YB=z("ZodMAC",($,I)=>{yN.init($,I),J$.init($,I)});function fq($){return E7(YB,$)}var OD=z("ZodIPv6",($,I)=>{fN.init($,I),J$.init($,I)});function yq($){return fX(OD,$)}var zD=z("ZodCIDRv4",($,I)=>{uN.init($,I),J$.init($,I)});function uq($){return yX(zD,$)}var LD=z("ZodCIDRv6",($,I)=>{lN.init($,I),J$.init($,I)});function lq($){return uX(LD,$)}var KD=z("ZodBase64",($,I)=>{mN.init($,I),J$.init($,I)});function cq($){return lX(KD,$)}var vD=z("ZodBase64URL",($,I)=>{rN.init($,I),J$.init($,I)});function mq($){return cX(vD,$)}var VD=z("ZodE164",($,I)=>{nN.init($,I),J$.init($,I)});function rq($){return mX(VD,$)}var qD=z("ZodJWT",($,I)=>{iN.init($,I),J$.init($,I)});function nq($){return rX(qD,$)}var OI=z("ZodCustomStringFormat",($,I)=>{oN.init($,I),J$.init($,I)});function iq($,I,U={}){return YI(OI,$,I,U)}function oq($){return YI(OI,"hostname",K6.hostname,$)}function dq($){return YI(OI,"hex",K6.hex,$)}function pq($,I){let U=I?.enc??"hex",b=`${$}_${U}`,w=K6[b];if(!w)throw new Error(`Unrecognized hash format: ${b}`);return YI(OI,b,w,I)}var zI=z("ZodNumber",($,I)=>{VX.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>Y5($,b,w,X),$.gt=(b,w)=>$.check(n6(b,w)),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.lt=(b,w)=>$.check(r6(b,w)),$.lte=(b,w)=>$.check(N6(b,w)),$.max=(b,w)=>$.check(N6(b,w)),$.int=(b)=>$.check(XD(b)),$.safe=(b)=>$.check(XD(b)),$.positive=(b)=>$.check(n6(0,b)),$.nonnegative=(b)=>$.check(p$(0,b)),$.negative=(b)=>$.check(r6(0,b)),$.nonpositive=(b)=>$.check(N6(0,b)),$.multipleOf=(b,w)=>$.check(Z4(b,w)),$.step=(b,w)=>$.check(Z4(b,w)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function BB($){return _7(zI,$)}var Y1=z("ZodNumberFormat",($,I)=>{dN.init($,I),zI.init($,I)});function XD($){return C7(Y1,$)}function tq($){return g7(Y1,$)}function aq($){return x7(Y1,$)}function eq($){return h7(Y1,$)}function sq($){return f7(Y1,$)}var LI=z("ZodBoolean",($,I)=>{tU.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>B5($,U,b,w)});function JB($){return y7(LI,$)}var KI=z("ZodBigInt",($,I)=>{qX.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>J5($,b,w,X),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.gt=(b,w)=>$.check(n6(b,w)),$.gte=(b,w)=>$.check(p$(b,w)),$.min=(b,w)=>$.check(p$(b,w)),$.lt=(b,w)=>$.check(r6(b,w)),$.lte=(b,w)=>$.check(N6(b,w)),$.max=(b,w)=>$.check(N6(b,w)),$.positive=(b)=>$.check(n6(BigInt(0),b)),$.negative=(b)=>$.check(r6(BigInt(0),b)),$.nonpositive=(b)=>$.check(N6(BigInt(0),b)),$.nonnegative=(b)=>$.check(p$(BigInt(0),b)),$.multipleOf=(b,w)=>$.check(Z4(b,w));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function $F($){return l7(KI,$)}var FD=z("ZodBigIntFormat",($,I)=>{pN.init($,I),KI.init($,I)});function IF($){return m7(FD,$)}function UF($){return r7(FD,$)}var HB=z("ZodSymbol",($,I)=>{tN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>H5($,U,b,w)});function wF($){return n7(HB,$)}var AB=z("ZodUndefined",($,I)=>{aN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>O5($,U,b,w)});function bF($){return i7(AB,$)}var OB=z("ZodNull",($,I)=>{eN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>A5($,U,b,w)});function zB($){return o7(OB,$)}var LB=z("ZodAny",($,I)=>{sN.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>K5($,U,b,w)});function XF(){return d7(LB)}var KB=z("ZodUnknown",($,I)=>{$Y.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>v5($,U,b,w)});function N1(){return p7(KB)}var vB=z("ZodNever",($,I)=>{IY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>L5($,U,b,w)});function MD($){return t7(vB,$)}var VB=z("ZodVoid",($,I)=>{UY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>z5($,U,b,w)});function DF($){return a7(VB,$)}var J0=z("ZodDate",($,I)=>{wY.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>V5($,b,w,X),$.min=(b,w)=>$.check(p$(b,w)),$.max=(b,w)=>$.check(N6(b,w));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function WF($){return e7(J0,$)}var qB=z("ZodArray",($,I)=>{bY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>Z5($,U,b,w),$.element=I.element,$.min=(U,b)=>$.check(b4(U,b)),$.nonempty=(U)=>$.check(b4(1,U)),$.max=(U,b)=>$.check(Q1(U,b)),$.length=(U,b)=>$.check(G1(U,b)),$.unwrap=()=>$.element});function H0($,I){return I5(qB,$,I)}function QF($){let I=$._zod.def.shape;return ED(Object.keys(I))}var A0=z("ZodObject",($,I)=>{XY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>C5($,U,b,w),E.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>ED(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:N1()}),$.loose=()=>$.clone({...$._zod.def,catchall:N1()}),$.strict=()=>$.clone({...$._zod.def,catchall:MD()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return E.extend($,U)},$.safeExtend=(U)=>{return E.safeExtend($,U)},$.merge=(U)=>E.merge($,U),$.pick=(U)=>E.pick($,U),$.omit=(U)=>E.omit($,U),$.partial=(...U)=>E.partial(PD,$,U[0]),$.required=(...U)=>E.required(kD,$,U[0])});function GF($,I){let U={type:"object",shape:$??{},...E.normalizeParams(I)};return new A0(U)}function NF($,I){return new A0({type:"object",shape:$,catchall:MD(),...E.normalizeParams(I)})}function YF($,I){return new A0({type:"object",shape:$,catchall:N1(),...E.normalizeParams(I)})}var O0=z("ZodUnion",($,I)=>{aU.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>aX($,U,b,w),$.options=I.options});function jD($,I){return new O0({type:"union",options:$,...E.normalizeParams(I)})}var FB=z("ZodXor",($,I)=>{O0.init($,I),DY.init($,I),$._zod.processJSONSchema=(U,b,w)=>aX($,U,b,w),$.options=I.options});function BF($,I){return new FB({type:"union",options:$,inclusive:!1,...E.normalizeParams(I)})}var MB=z("ZodDiscriminatedUnion",($,I)=>{O0.init($,I),WY.init($,I)});function JF($,I,U){return new MB({type:"union",options:I,discriminator:$,...E.normalizeParams(U)})}var jB=z("ZodIntersection",($,I)=>{QY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>g5($,U,b,w)});function EB($,I){return new jB({type:"intersection",left:$,right:I})}var SB=z("ZodTuple",($,I)=>{FX.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>x5($,U,b,w),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function PB($,I,U){let b=I instanceof o,w=b?U:I;return new SB({type:"tuple",items:$,rest:b?I:null,...E.normalizeParams(w)})}var z0=z("ZodRecord",($,I)=>{GY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>h5($,U,b,w),$.keyType=I.keyType,$.valueType=I.valueType});function kB($,I,U){return new z0({type:"record",keyType:$,valueType:I,...E.normalizeParams(U)})}function HF($,I,U){let b=o$($);return b._zod.values=void 0,new z0({type:"record",keyType:b,valueType:I,...E.normalizeParams(U)})}function AF($,I,U){return new z0({type:"record",keyType:$,valueType:I,mode:"loose",...E.normalizeParams(U)})}var RB=z("ZodMap",($,I)=>{NY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>T5($,U,b,w),$.keyType=I.keyType,$.valueType=I.valueType});function OF($,I,U){return new RB({type:"map",keyType:$,valueType:I,...E.normalizeParams(U)})}var TB=z("ZodSet",($,I)=>{YY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>_5($,U,b,w),$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(W1(...U)),$.size=(...U)=>$.check(e1(...U))});function zF($,I){return new TB({type:"set",valueType:$,...E.normalizeParams(I)})}var HI=z("ZodEnum",($,I)=>{BY.init($,I),t.init($,I),$._zod.processJSONSchema=(b,w,X)=>q5($,b,w,X),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(b,w)=>{let X={};for(let D of b)if(U.has(D))X[D]=I.entries[D];else throw new Error(`Key ${D} not found in enum`);return new HI({...I,checks:[],...E.normalizeParams(w),entries:X})},$.exclude=(b,w)=>{let X={...I.entries};for(let D of b)if(U.has(D))delete X[D];else throw new Error(`Key ${D} not found in enum`);return new HI({...I,checks:[],...E.normalizeParams(w),entries:X})}});function ED($,I){let U=Array.isArray($)?Object.fromEntries($.map((b)=>[b,b])):$;return new HI({type:"enum",entries:U,...E.normalizeParams(I)})}function LF($,I){return new HI({type:"enum",entries:$,...E.normalizeParams(I)})}var _B=z("ZodLiteral",($,I)=>{JY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>F5($,U,b,w),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function KF($,I){return new _B({type:"literal",values:Array.isArray($)?$:[$],...E.normalizeParams(I)})}var ZB=z("ZodFile",($,I)=>{HY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>E5($,U,b,w),$.min=(U,b)=>$.check(C4(U,b)),$.max=(U,b)=>$.check(W1(U,b)),$.mime=(U,b)=>$.check(XI(Array.isArray(U)?U:[U],b))});function vF($){return U5(ZB,$)}var CB=z("ZodTransform",($,I)=>{AY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>R5($,U,b,w),$._zod.parse=(U,b)=>{if(b.direction==="backward")throw new w1($.constructor.name);U.addIssue=(X)=>{if(typeof X==="string")U.issues.push(E.issue(X,U.value,I));else{let D=X;if(D.fatal)D.continue=!1;D.code??(D.code="custom"),D.input??(D.input=U.value),D.inst??(D.inst=$),U.issues.push(E.issue(D))}};let w=I.transform(U.value,U);if(w instanceof Promise)return w.then((X)=>{return U.value=X,U});return U.value=w,U}});function SD($){return new CB({type:"transform",transform:$})}var PD=z("ZodOptional",($,I)=>{OY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>i5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function G0($){return new PD({type:"optional",innerType:$})}var gB=z("ZodNullable",($,I)=>{zY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>f5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function N0($){return new gB({type:"nullable",innerType:$})}function VF($){return G0(N0($))}var xB=z("ZodDefault",($,I)=>{LY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>u5($,U,b,w),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function hB($,I){return new xB({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():E.shallowClone(I)}})}var fB=z("ZodPrefault",($,I)=>{KY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>l5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function yB($,I){return new fB({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():E.shallowClone(I)}})}var kD=z("ZodNonOptional",($,I)=>{vY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>y5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function uB($,I){return new kD({type:"nonoptional",innerType:$,...E.normalizeParams(I)})}var lB=z("ZodSuccess",($,I)=>{VY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>S5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function qF($){return new lB({type:"success",innerType:$})}var cB=z("ZodCatch",($,I)=>{qY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>c5($,U,b,w),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function mB($,I){return new cB({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var rB=z("ZodNaN",($,I)=>{FY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>M5($,U,b,w)});function FF($){return $5(rB,$)}var RD=z("ZodPipe",($,I)=>{MY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>m5($,U,b,w),$.in=I.in,$.out=I.out});function Y0($,I){return new RD({type:"pipe",in:$,out:I})}var TD=z("ZodCodec",($,I)=>{RD.init($,I),eU.init($,I)});function MF($,I,U){return new TD({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var nB=z("ZodReadonly",($,I)=>{jY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>r5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function iB($){return new nB({type:"readonly",innerType:$})}var oB=z("ZodTemplateLiteral",($,I)=>{EY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>j5($,U,b,w)});function jF($,I){return new oB({type:"template_literal",parts:$,...E.normalizeParams(I)})}var dB=z("ZodLazy",($,I)=>{kY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>o5($,U,b,w),$.unwrap=()=>$._zod.def.getter()});function pB($){return new dB({type:"lazy",getter:$})}var tB=z("ZodPromise",($,I)=>{PY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>n5($,U,b,w),$.unwrap=()=>$._zod.def.innerType});function EF($){return new tB({type:"promise",innerType:$})}var aB=z("ZodFunction",($,I)=>{SY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>k5($,U,b,w)});function SF($){return new aB({type:"function",input:Array.isArray($?.input)?PB($?.input):$?.input??H0(N1()),output:$?.output??N1()})}var L0=z("ZodCustom",($,I)=>{RY.init($,I),t.init($,I),$._zod.processJSONSchema=(U,b,w)=>P5($,U,b,w)});function PF($){let I=new A$({check:"custom"});return I._zod.check=$,I}function kF($,I){return w5(L0,$??(()=>!0),I)}function eB($,I={}){return b5(L0,$,I)}function sB($){return X5($)}var RF=D5,TF=W5;function _F($,I={error:`Input not instance of ${$.name}`}){let U=new L0({type:"custom",check:"custom",fn:(b)=>b instanceof $,abort:!0,...E.normalizeParams(I)});return U._zod.bag.Class=$,U}var ZF=(...$)=>Q5({Codec:TD,Boolean:LI,String:AI},...$);function CF($){let I=pB(()=>{return jD([bD($),BB(),JB(),zB(),H0(I),kB(bD(),I)])});return I}function gF($,I){return Y0(SD($),I)}var ay={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ey($){P$({customError:$})}function sy(){return P$().customError}var $J;(function($){})($J||($J={}));var _={...W0,...sX,iso:JI};function $u($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Iu($,I){if(!$.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let b=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===b){let w=U[1];if(!w||!I.defs[w])throw new Error(`Reference not found: ${$}`);return I.defs[w]}throw new Error(`Reference not found: ${$}`)}function xF($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return _.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let w=$.$ref;if(I.refs.has(w))return I.refs.get(w);if(I.processing.has(w))return _.lazy(()=>{if(!I.refs.has(w))throw new Error(`Circular reference not resolved: ${w}`);return I.refs.get(w)});I.processing.add(w);let X=Iu(w,I),D=u$(X,I);return I.refs.set(w,D),I.processing.delete(w),D}if($.enum!==void 0){let w=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&w.length===1&&w[0]===null)return _.null();if(w.length===0)return _.never();if(w.length===1)return _.literal(w[0]);if(w.every((D)=>typeof D==="string"))return _.enum(w);let X=w.map((D)=>_.literal(D));if(X.length<2)return X[0];return _.union([X[0],X[1],...X.slice(2)])}if($.const!==void 0)return _.literal($.const);let U=$.type;if(Array.isArray(U)){let w=U.map((X)=>{let D={...$,type:X};return xF(D,I)});if(w.length===0)return _.never();if(w.length===1)return w[0];return _.union(w)}if(!U)return _.any();let b;switch(U){case"string":{let w=_.string();if($.format){let X=$.format;if(X==="email")w=w.check(_.email());else if(X==="uri"||X==="uri-reference")w=w.check(_.url());else if(X==="uuid"||X==="guid")w=w.check(_.uuid());else if(X==="date-time")w=w.check(_.iso.datetime());else if(X==="date")w=w.check(_.iso.date());else if(X==="time")w=w.check(_.iso.time());else if(X==="duration")w=w.check(_.iso.duration());else if(X==="ipv4")w=w.check(_.ipv4());else if(X==="ipv6")w=w.check(_.ipv6());else if(X==="mac")w=w.check(_.mac());else if(X==="cidr")w=w.check(_.cidrv4());else if(X==="cidr-v6")w=w.check(_.cidrv6());else if(X==="base64")w=w.check(_.base64());else if(X==="base64url")w=w.check(_.base64url());else if(X==="e164")w=w.check(_.e164());else if(X==="jwt")w=w.check(_.jwt());else if(X==="emoji")w=w.check(_.emoji());else if(X==="nanoid")w=w.check(_.nanoid());else if(X==="cuid")w=w.check(_.cuid());else if(X==="cuid2")w=w.check(_.cuid2());else if(X==="ulid")w=w.check(_.ulid());else if(X==="xid")w=w.check(_.xid());else if(X==="ksuid")w=w.check(_.ksuid())}if(typeof $.minLength==="number")w=w.min($.minLength);if(typeof $.maxLength==="number")w=w.max($.maxLength);if($.pattern)w=w.regex(new RegExp($.pattern));b=w;break}case"number":case"integer":{let w=U==="integer"?_.number().int():_.number();if(typeof $.minimum==="number")w=w.min($.minimum);if(typeof $.maximum==="number")w=w.max($.maximum);if(typeof $.exclusiveMinimum==="number")w=w.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")w=w.gt($.minimum);if(typeof $.exclusiveMaximum==="number")w=w.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")w=w.lt($.maximum);if(typeof $.multipleOf==="number")w=w.multipleOf($.multipleOf);b=w;break}case"boolean":{b=_.boolean();break}case"null":{b=_.null();break}case"object":{let w={},X=$.properties||{},D=new Set($.required||[]);for(let[Q,G]of Object.entries(X)){let N=u$(G,I);w[Q]=D.has(Q)?N:N.optional()}if($.propertyNames){let Q=u$($.propertyNames,I),G=$.additionalProperties&&typeof $.additionalProperties==="object"?u$($.additionalProperties,I):_.any();if(Object.keys(w).length===0){b=_.record(Q,G);break}let N=_.object(w).passthrough(),B=_.looseRecord(Q,G);b=_.intersection(N,B);break}if($.patternProperties){let Q=$.patternProperties,G=Object.keys(Q),N=[];for(let H of G){let J=u$(Q[H],I),A=_.string().regex(new RegExp(H));N.push(_.looseRecord(A,J))}let B=[];if(Object.keys(w).length>0)B.push(_.object(w).passthrough());if(B.push(...N),B.length===0)b=_.object({}).passthrough();else if(B.length===1)b=B[0];else{let H=_.intersection(B[0],B[1]);for(let J=2;J<B.length;J++)H=_.intersection(H,B[J]);b=H}break}let W=_.object(w);if($.additionalProperties===!1)b=W.strict();else if(typeof $.additionalProperties==="object")b=W.catchall(u$($.additionalProperties,I));else b=W.passthrough();break}case"array":{let{prefixItems:w,items:X}=$;if(w&&Array.isArray(w)){let D=w.map((Q)=>u$(Q,I)),W=X&&typeof X==="object"&&!Array.isArray(X)?u$(X,I):void 0;if(W)b=_.tuple(D).rest(W);else b=_.tuple(D);if(typeof $.minItems==="number")b=b.check(_.minLength($.minItems));if(typeof $.maxItems==="number")b=b.check(_.maxLength($.maxItems))}else if(Array.isArray(X)){let D=X.map((Q)=>u$(Q,I)),W=$.additionalItems&&typeof $.additionalItems==="object"?u$($.additionalItems,I):void 0;if(W)b=_.tuple(D).rest(W);else b=_.tuple(D);if(typeof $.minItems==="number")b=b.check(_.minLength($.minItems));if(typeof $.maxItems==="number")b=b.check(_.maxLength($.maxItems))}else if(X!==void 0){let D=u$(X,I),W=_.array(D);if(typeof $.minItems==="number")W=W.min($.minItems);if(typeof $.maxItems==="number")W=W.max($.maxItems);b=W}else b=_.array(_.any());break}default:throw new Error(`Unsupported type: ${U}`)}if($.description)b=b.describe($.description);if($.default!==void 0)b=b.default($.default);return b}function u$($,I){if(typeof $==="boolean")return $?_.any():_.never();let U=xF($,I),b=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let w=$.anyOf.map((D)=>u$(D,I)),X=_.union(w);U=b?_.intersection(U,X):X}if($.oneOf&&Array.isArray($.oneOf)){let w=$.oneOf.map((D)=>u$(D,I)),X=_.xor(w);U=b?_.intersection(U,X):X}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=b?U:_.any();else{let w=b?U:u$($.allOf[0],I),X=b?0:1;for(let D=X;D<$.allOf.length;D++)w=_.intersection(w,u$($.allOf[D],I));U=w}if($.nullable===!0&&I.version==="openapi-3.0")U=_.nullable(U);if($.readOnly===!0)U=_.readonly(U);return U}function hF($,I){if(typeof $==="boolean")return $?_.any():_.never();let U=$u($,I?.defaultTarget),b=$.$defs||$.definitions||{};return u$($,{version:U,defs:b,refs:new Map,processing:new Set,rootSchema:$})}var IJ={};v6(IJ,{string:()=>Uu,number:()=>wu,date:()=>Du,boolean:()=>bu,bigint:()=>Xu});function Uu($){return j7(AI,$)}function wu($){return Z7(zI,$)}function bu($){return u7(LI,$)}function Xu($){return c7(KI,$)}function Du($){return s7(J0,$)}P$(sU());var D4=Y.enum(["document","record"]),_D=["paragraph","heading","bulletListItem","numberedListItem","checkListItem","codeBlock","quote","table","divider","referenceList","annotationList","referenceItem","structure","structuredMatrix","procedureTree"],ZD=["literature","document","record","annotation","artifact"],CD=["molecule","reaction"],vI=50,gD=50;var UJ=Y.object({blockType:Y.enum(_D).default("paragraph").describe("Type of block to create. Default: paragraph"),content:Y.string().describe("Text content for the block"),headingLevel:Y.number().int().min(1).max(3).optional().describe("Heading level (1-3) if blockType is heading"),checked:Y.boolean().optional().describe("Checked state for checkListItem"),title:Y.string().optional().describe('Title for referenceList container (default: "References")'),refNumber:Y.number().int().min(1).optional().describe("Reference number for referenceItem (e.g., 1, 2, 3)"),refId:Y.string().optional().describe('Stable ref ID for citation linking (e.g., "lit-a3f7e2b9"). Auto-generated from linkedEntityId if omitted.'),refType:Y.enum(ZD).optional().describe("Type of reference: literature, document, record, or annotation"),linkedEntityId:Y.string().uuid().optional().describe("UUID of the linked entity (literature, document, or record)"),entityTitle:Y.string().optional().describe("Cached title of the linked entity"),doi:Y.string().optional().describe("DOI for literature references"),smiles:Y.string().optional().describe('SMILES string (e.g., "CCO" for ethanol, "CC(=O)C.N>>CC(N)C.O" for reactions). Required for molecule blocks.'),structureType:Y.enum(CD).optional().describe('Structure type for molecule blocks: "molecule" (default) or "reaction"'),moleculeName:Y.string().optional().describe('Name of the molecule or reaction (e.g., "Ethanol", "Reductive amination")'),moleculeDescription:Y.string().optional().describe("Optional description or notes for the molecule block"),matrixId:Y.string().optional().describe("UUID of the linked data matrix for structuredMatrix blocks"),nodeRef:Y.string().optional().describe("Procedure tree node ID for structuredMatrix blocks"),matrixLabel:Y.string().optional().describe("Display label for structuredMatrix blocks"),showPreview:Y.boolean().optional().describe("Whether structuredMatrix should show its inline preview"),recordId:Y.string().uuid().optional().describe("Record UUID for procedureTree blocks. The executor auto-fills this from the entityId of a record context — agents should omit it.")});var Wu=Y.enum(["text","number","unit","select","boolean"]),Qu=Y.enum(["mandatory","recommended","optional"]),fF=Y.object({key:Y.string().min(1).describe("Stable column key"),label:Y.string().min(1).describe("Human-readable column label"),type:Wu.describe("Column type"),unit:Y.string().optional().describe("Optional display unit"),mandation:Qu.describe("Field importance level"),description:Y.string().optional().describe("Optional field description"),standardRef:Y.string().optional().describe("Optional ontology reference"),options:Y.array(Y.string()).optional().describe("Allowed values for select columns"),hidden:Y.boolean().optional().describe("UI-hidden column. Still surfaced to agents in matrix TOON (with a `hidden` marker in the cols legend) and preserved across row mutations. Use for preset-internal linkage (e.g. stoichiometry `compoundId`).")}),VI=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])),yF=Y.enum(["generic","stoichiometry"]),wJ=Y.object({entityType:D4.describe('Entity type: "document" or "record"'),entityId:Y.string().uuid().describe("Document or record ID"),kind:yF.optional().describe('Typed preset. Defaults to "generic". Use "stoichiometry" for reaction stoichiometry matrices (client-side calc engine derives m/V/n from M/ρ/equiv). When "stoichiometry", `columns` is ignored — the server fills in the stoichiometry preset.'),label:Y.string().min(1).describe("Matrix label shown in the editor"),columns:Y.array(fF).max(vI).optional().describe('Matrix column definitions. Required for `kind="generic"` (the default). Ignored for `kind="stoichiometry"` (preset columns override).'),rows:Y.array(VI).optional().describe("Matrix rows"),nodeRef:Y.string().optional().describe("Optional procedure tree node ID for record matrices"),afterBlockId:Y.string().optional().describe("Insert AFTER this block ID (sibling insertion)"),beforeBlockId:Y.string().optional().describe("Insert BEFORE this block ID (sibling insertion)"),parentBlockId:Y.string().optional().describe("Insert as CHILD of this container block"),childPosition:Y.string().optional().describe('Position within parent children: "first", "last" (default), or child block ID to insert after'),showPreview:Y.boolean().optional().default(!0).describe("Whether the structured matrix block should show its preview")}).refine(($)=>{return[$.afterBlockId,$.beforeBlockId,$.parentBlockId].filter(Boolean).length<=1},{message:"Use only one positioning mode: afterBlockId, beforeBlockId, OR parentBlockId"}).refine(($)=>{if($.childPosition&&!$.parentBlockId)return!1;return!0},{message:"childPosition can only be used with parentBlockId"}).refine(($)=>{if($.kind==="stoichiometry")return!0;return($.columns?.length??0)>=1},{message:'`columns` is required for `kind="generic"` (omit or use `kind="stoichiometry"` for the preset).',path:["columns"]}),K0={name:"insert_matrix",description:"Create a structured data matrix AND insert its linked `structuredMatrix` block in one call.\n\nThe tool performs two writes atomically from the agent's perspective:\n1. Insert a new `data_matrices` row (columns + rows + label). The row starts at `version: 0`; all subsequent edits go through the `*_matrix_rows` / `rebind_matrix_to_node` / `delete_matrix` tools and each bumps `version`.\n2. Insert a `structuredMatrix` block referencing the new matrix id.\n\nTwo binding modes (both valid for records and documents):\n- **Body-level (default)**: omit `nodeRef`. The matrix belongs to the entity and the block lives at the top-level of the document/record body. Use this for free-standing tabular data (reagent inventory, condition sets attached to the whole experiment, etc).\n- **Node-attached**: pass `nodeRef` = procedure node UUID (records only). The matrix is logically scoped to that node and surfaces in `list_procedure_nodes` under that node's `matrixCount`. Use this when the matrix captures data produced inside a specific procedure step (e.g. readings per screening condition).\n\n**Typed presets via `kind`:**\n- `kind=\"generic\"` (default): supply your own `columns`.\n- `kind=\"stoichiometry\"`: choose this whenever you want reaction stoichiometry semantics — mixing reactants, reagents, solvents, catalysts, products and deriving the missing quantities. `columns` is ignored; the server fills the stoichiometry preset (Compound, Role, Phase, Equiv, Limiting, M, ρ, Purity, Stock c, Stock wt%, V, m, n, c, plus three hidden columns: `compoundId` linking to a `chemical` artifact, `cBasis` controlling how `c` is computed, and `cBasisManualVolume` for manual-basis rows).\n - Row shape: `{ compound, compoundId?, role, phase?, equiv?, limiting?, molecularWeight?, density?, purity?, stockMolarity?, stockWtPercent?, volume?, mass?, moles?, concentration?, cBasis?, cBasisManualVolume? }`.\n - **Phase grouping** (`phase` column): free-form text label that groups rows for per-phase volume totals. Use for biphasic syntheses (e.g. `phase: \"aqueous\"` vs `phase: \"oil\"`) or to sum per-mixture volumes within a single-pot reaction (e.g. `phase: \"aqueous\"` for water + dissolved CTAC + TEA). Leave blank for single-phase matrices. The UI renders a totals strip below the table; agents can read back via `get_content` to verify mass/volume balance per phase.\n - **Client-side calc engine auto-derives empty cells on every render. Do NOT pre-compute values you can leave null.** The identities propagated are: `n = m / M`, `n = V · c`, `m = V · ρ · purity` (neat liquids), `n = stockMolarity · V` (aqueous stock), `n = stockWtPercent · ρ_soln · V / M` (wt%-labelled stock), `n_i = equiv_i · n_limiting` (by row), and the reverse `equiv_i = n_i / n_limiting` (so molar ratios surface even when the user only entered masses). Derivation respects user-entered values — any non-null cell is treated as locked and never overwritten.\n - Limiting reactant: set `limiting: true` on exactly one reactant row (the engine also auto-picks the first reactant with enough info if none is flagged). Other reactants should carry `equiv` (molar ratio relative to limiting).\n - Units are fixed: M in g/mol, ρ in g/mL, V in mL, m in g, n in mmol, c in mol/L, purity as a decimal fraction (0–1), stockMolarity in mol/L, stockWtPercent in 0–100.\n - **Stock solution inputs**: for aqueous reagents (e.g. \"2 M NaOH\", \"25 wt% CTAC\"), prefer `stockMolarity` or `stockWtPercent` over `purity`. `purity` describes the dissolved compound itself (a neat liquid descriptor); `stockMolarity`/`stockWtPercent` describe the solution. Use only one of stockMolarity / stockWtPercent per row.\n - **Concentration basis** (`cBasis`, `cBasisManualVolume`): the displayed `c` is `n / V_ref` where the reference volume is picked per row. Defaults — solvent rows use `\"none\"` (c blank), non-solvent rows with a `phase` tag use `\"phase\"` (c relative to V_phase), other non-solvent rows use `\"total\"` (c relative to V_total). Leave `cBasis` null to inherit the default; explicit values are `\"none\" | \"phase\" | \"total\" | \"manual\"`. `\"manual\"` requires `cBasisManualVolume` (mL) and uses that as V_ref. Don't set these unless the user has chosen a non-default basis.\n - Minimal pattern for a reaction: one reactant with `{ role: 'reactant', limiting: true, equiv: 1, molecularWeight, mass OR volume }`; additional reactants with `{ role: 'reactant', equiv, molecularWeight }` (cells left null; the engine fills them from the limiting moles).\n\nIf a procedure node is later deleted, its matrices' `nodeRef` is cleared to null (FK `ON DELETE SET NULL`) and they surface in `list_procedure_nodes` as orphans — rebind via `rebind_matrix_to_node` or drop via `delete_matrix`.\n\nPositioning for the block:\n- `afterBlockId`: insert as SIBLING after the specified block\n- `beforeBlockId`: insert as SIBLING before the specified block\n- `parentBlockId`: insert as CHILD of a container block (e.g. inside a procedure section)\n- Omit all three: append the block at the end of the document. Safe for parallel `insert_matrix` calls — each one appends after the current tail, so agents can batch inserts instead of serialising on `afterBlockId`.\n\nExamples:\n- Body-level matrix appended after an existing block:\n `insert_matrix(entityType=\"record\", entityId=\"...\", afterBlockId=\"...\", label=\"Aqueous phase composition\", columns=[...], rows=[...])`\n- Node-attached matrix nested inside a procedure section:\n `insert_matrix(entityType=\"record\", entityId=\"...\", parentBlockId=\"...\", childPosition=\"last\", label=\"Screening Matrix\", columns=[...], rows=[...], nodeRef=\"...\")`\n\n**Record draft-gate:** matrices on records require the record to be in `draft` status. `completed` / `locked` records return a structured `record_not_draft` error — stop and surface it to the user; agents cannot flip record status themselves."};var bJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),rows:Y.array(VI).min(1).describe("New rows to append at the END of the existing rows array. **Row objects must be keyed by `col.key` (the stable column id), NOT `col.label`.** Unknown keys are retained in JSONB but never rendered and cannot be selected by `rowMatch` later. Call `get_content` on the owning entity first to read the column schema (`cols: key(Label,type[,unit])`)."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error with the actual version. Get the current version from `get_content` / `list_procedure_nodes` / prior tool output.")}),v0={name:"append_matrix_rows",description:["Append rows to the end of an existing data matrix (body-level or node-attached).","**Row objects must be keyed by `col.key`, not `col.label`.** Read the schema first via `get_content` on the owning entity; the matrix TOON shows `cols: key(Label,type[,unit])` and a `{key1,key2,...}` row header. Writing under a label-name that differs from the key persists opaque JSONB that the UI cannot render.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","Only draft records are writable; completed/locked records return a `record_not_draft` error. Matrices on documents/literature/artifacts have no draft gate.","Prefer this over rewriting the entire matrix via the legacy path — row identity is preserved for downstream consumers.",'**Stoichiometry matrices** (`kind=stoichiometry` in the matrix header): leave cells empty (`null`) whenever the client-side calc engine should derive them from the chemistry identities (n = m/M, n = V·c, m = V·ρ·purity, n = stockMolarity·V, n = stockWtPercent·ρ_soln·V/M, n_i = equiv_i · n_limiting, equiv_i = n_i / n_limiting). Only persist values you explicitly measured or want to lock. For aqueous reagent stocks (NaOH(aq), CTAC(aq), TEA(aq)) prefer `stockMolarity` (mol/L) or `stockWtPercent` (0–100) over `purity`. Must preserve `compoundId` (hidden column) verbatim on any row you touch — it is the link to the chemical artifact that auto-fills M and ρ. Two more hidden row keys control how the displayed `c` is computed: `cBasis` (one of `null` | `"none"` | `"phase"` | `"total"` | `"manual"`; null = let the engine pick a default from role+phase, "phase" = c relative to V_phase, "total" = c relative to V_total, "manual" = c relative to `cBasisManualVolume`, "none" = blank c) and `cBasisManualVolume` (mL, only used when cBasis="manual"). Leave both null unless the user has explicitly set them.'].join(" ")};var XJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the workspace-owned matrix to attach."),entityType:Y.enum(["record","artifact","document","literature"]).describe("Owner entity type. Typical use: `record` or `artifact`. Literature attach is currently not supported server-side and will fail."),entityId:Y.string().uuid().describe("Owner entity UUID. The owner MUST live in the same workspace as the matrix, or the server rejects with invalid_matrix_owner."),nodeRef:Y.string().uuid().optional().describe("Optional: if provided, AND the owner is a record, also bind the matrix to this procedure node in the same call. The node must belong to `entityId`."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),V0={name:"attach_matrix",description:["Bind a workspace-owned (orphan) matrix to a provenance owner. Matrices become workspace-owned when their original record/document is deleted — the trigger promotes them instead of cascading. This tool claims them back to a new record or artifact in the same workspace.","Workspace match is enforced server-side: the owner entity MUST live in the same workspace as the matrix. Cross-workspace attach returns an `invalid_matrix_owner` error.","If `nodeRef` is provided and `entityType` is `record`, the matrix is also bound to that procedure node in the same call (combines attach + rebind). The node must belong to the target record.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error.","Only draft records are writable; attaching to a completed/locked record returns `record_not_draft`.","Use `list_matrix_references` first if you want to see which documents/records embed the matrix before attaching."].join(" ")};var DJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the matrix to inspect.")}),q0={name:"list_matrix_references",description:["List the entity_links that embed a data matrix, with each source's type, id, and display title. Matrix embeds are N:M (one matrix can be inserted in multiple records/documents via a `structuredMatrix` block).","Use before calling `delete_matrix` to understand the blast radius — deleting a matrix with embeds elsewhere leaves those blocks in an unlinked state.",'Also useful for analytical questions: "which documents reference matrix X?" or "is this matrix used outside its owner record?".',"Returns empty when the matrix has no embeds. Read-only; no version gate."].join(" ")};var qI=Y.enum(["procedure","characterization","observation","step"]),FI=Y.object({type:Y.literal("file"),target:Y.enum(["local","server","url"]),path:Y.string().min(1),format:Y.string().min(1),label:Y.string().min(1),instrument:Y.string().optional(),metadata:Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean()])).optional()}),uF=Y.object({artifactId:Y.string().uuid(),role:Y.enum(["input","output","derived_from","referenced"]),context:Y.record(Y.string(),Y.unknown()).optional()}),lF=Y.object({matrixId:Y.string().uuid()}),F0=Y.object({tempId:Y.string().min(1).describe("Agent-chosen temporary id; remapped to a real uuid on insert. Must be unique within the input list."),parentTempId:Y.string().nullable().optional().describe("tempId of the parent node, or null/omit for a root node of the tree."),label:Y.string().min(1).describe("Human-readable node label."),type:qI.describe("Node type: procedure (top-level), step (intermediate), characterization (measurement), observation (note)."),order:Y.number().int().min(0).optional().describe("Order within siblings. Defaults to append (one past the last existing sibling)."),copyable:Y.boolean().optional().describe('Whether this node is template-copyable. MUST be false when type === "observation".'),analyticalData:Y.array(FI).optional().describe("File references attached to this node (the typed `analytical_data` JSONB field). Artifact links live in `artifactLinks` below."),artifactLinks:Y.array(uF).optional().describe("Existing artifacts to link to this node at creation time. Use when the agent already has artifactIds in context (e.g., from `search` or a prior `create_artifact` call). For new artifacts, prefer `create_artifact({ linkToNode })` instead. Failures on individual links are non-fatal — the node is still created and a per-node summary is returned."),matrices:Y.array(lF).optional().describe("Existing data matrices to bind to this node at creation time. Workspace orphans are attached + bound; matrices already owned by this record are rebound. Cross-record matrices are rejected (would steal them from the other tree). For new matrices, call `insert_matrix(nodeRef=…)` after the tree exists.")}).refine(($)=>!($.type==="observation"&&$.copyable===!0),{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]});var cF=Y.enum(["replace","append"]),WJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),nodes:Y.array(F0).min(1).describe("Flat procedure-tree list. Each node carries a tempId (and optional parentTempId) that the server remaps to real uuids."),mode:cF.describe('"replace" deletes the existing tree first (destructive); "append" grafts the new nodes on top of the current structure.'),confirm:Y.literal(!0).optional().describe('MUST be set to true when mode="replace" — model-level self-check that the caller understands the existing tree (and its orphaned matrices) will be cleared.'),rootParentId:Y.string().uuid().optional().describe("Append mode only — existing node uuid under which the new roots should be grafted. Omit to graft as top-level siblings.")}).refine(($)=>!($.mode==="replace"&&$.confirm!==!0),{message:'mode="replace" requires confirm: true — destructive operation.',path:["confirm"]}).refine(($)=>!($.mode==="replace"&&$.rootParentId!==void 0),{message:"rootParentId is only valid in append mode; replace wipes the tree first.",path:["rootParentId"]}),M0={name:"build_procedure_tree",description:["Atomically build or augment the procedure-node tree of an ELN record from a canonical JSON tree.","Input is a flat list of nodes using `tempId` / `parentTempId` references; the server remaps to real uuids and returns the mapping.","Modes:","- `append`: grafts the new subtree onto existing structure (either as new roots or under `rootParentId`).","- `replace` (destructive): deletes the entire existing tree first, then inserts the new one. **Requires `confirm: true`** and will orphan any matrices that were bound to deleted nodes — check with `list_procedure_nodes` first.","Only draft records are writable; completed/locked records return a `record_not_draft` error.",'`type === "observation"` nodes must have `copyable` omitted or `false`.',"For surgical edits to a single node prefer `insert_procedure_node` / `update_procedure_node` over a full rebuild."].join(" ")};var QJ=Y.object({title:Y.string().min(1).max(500).describe("Title for the new document"),content:Y.string().optional().describe("Optional initial content in markdown format"),organizationId:Y.string().uuid().optional().describe("Organization ID (auto-resolved if omitted; ignored when spaceId is provided — derived from the space instead)"),workspaceId:Y.string().uuid().optional().describe("Workspace ID (auto-resolved if omitted; ignored when spaceId is provided — derived from the space instead)"),spaceId:Y.string().uuid().optional().describe("Optional space ID. When provided the document is created inside that space and workspace/organization are derived from it. Caller must be a member of the space with write access. Omit for a private (workspace-only) document.")}),j0={name:"create_document",description:"Create a new document. By default the document is private to the user in their current workspace. Pass `spaceId` to create it inside a specific space (shared with space members); workspace and organization are then derived from the space automatically. Use this when the user asks you to create a new document, draft, or note. You can optionally provide initial content in markdown format."};var GJ=Y.object({title:Y.string().min(1).max(500).describe("Paper title"),doi:Y.string().optional().describe("DOI for metadata resolution and CORE full text fetch"),authors:Y.array(Y.string()).optional().describe('Author full names (e.g., ["John Smith", "Jane Doe"]). Omit when a DOI is available so the server can resolve authoritative metadata.'),journal:Y.string().optional().describe("Journal name"),year:Y.number().int().positive().optional().describe("Publication year"),sourceUrl:Y.string().url().optional().describe("Publisher page URL where the paper can be found"),organizationId:Y.string().uuid().optional().describe("Organization ID (auto-resolved if omitted)"),workspaceId:Y.string().uuid().optional().describe("Workspace to assign the paper to"),spaceId:Y.string().uuid().optional().describe("Space within workspace"),fetchFullText:Y.boolean().optional().default(!1).describe("When true, fetches full text from CORE and stores as structured content blocks. Requires DOI. Default false for metadata-only creation.")}),E0={name:"create_literature",description:"Import a research paper into the user's library. Creates a literature item with bibliographic metadata. If a DOI is provided, the server will try to resolve authoritative metadata before creating the item. Set fetchFullText=true to also fetch and parse the full text from CORE (requires DOI). If a DOI is provided and already exists in the library, returns the existing item (idempotent). Use this when the user explicitly asks to import or add a paper to their library."};var mF=["sample","dataset","protocol","file","equipment","chemical","model","reaction"],Gu=["molecule","material","mixture","biomacromolecule"],o$$=Y.enum(Gu),rF=["active","depleted","archived","draft"],xD=Y.enum(mF),MI=Y.enum(rF),Nu=Y.enum(["merge","replace"]).default("merge").describe('How to apply `properties`. "merge" (default): top-level keys in `properties` are merged into the existing JSONB; pass `null` for a key to delete it. "replace": the supplied object fully overwrites the existing JSONB.'),NJ=Y.object({id:Y.string().uuid().describe("UUID of the artifact to update."),name:Y.string().min(1).optional().describe("Display name (skip to keep existing)."),description:Y.string().optional().describe("Plain-text description. Pass an empty string to clear."),tags:Y.array(Y.string()).optional().describe("Replaces the tag set. Pass an empty array to clear all tags. Omit to leave tags untouched."),properties:Y.record(Y.string(),Y.unknown()).optional().describe("Free-form JSONB blob. By default merged into existing properties (see `propertiesMode`). Common keys per type: sample → batch, storage_conditions, preparation_date; dataset → format, row_count, source_instrument; chemical → cas_number, molecular_formula, supplier; equipment → model, serial, last_calibration. Advisory only — any keys allowed."),propertiesMode:Nu.optional(),artifactType:xD.optional().describe("Change the artifact type. Note: existing `properties` are NOT auto-migrated to the new type's advisory schema."),status:MI.optional().describe("Lifecycle status: active | depleted | archived | draft."),storageRef:Y.string().optional().describe("Free-form storage pointer (path, URL, locker code)."),location:Y.string().optional().describe("Free-form physical/logical location."),parentId:Y.string().uuid().nullable().optional().describe("Parent artifact UUID for hierarchies (e.g. sub-samples). Pass null to detach."),templateId:Y.string().uuid().nullable().optional().describe("Template binding. Pass null to detach.")}).refine(($)=>$.name!==void 0||$.description!==void 0||$.tags!==void 0||$.properties!==void 0||$.artifactType!==void 0||$.status!==void 0||$.storageRef!==void 0||$.location!==void 0||$.parentId!==void 0||$.templateId!==void 0,{message:"Provide at least one field to update (name, description, tags, properties, artifactType, status, storageRef, location, parentId, templateId)."}),S0={name:"update_artifact",description:["Update non-identity fields of an artifact (name, description, tags, properties, artifactType, status, storageRef, location, parentId, templateId).",'`properties` (JSONB) is merged into the existing blob by default — pass `propertiesMode: "replace"` for full overwrite. Use null on a key in merge mode to delete it.',"Identity fields (id, workspaceId, orgId, createdBy*, sourceRecordId, deletedAt, timestamps) are never writable through this tool.","Soft-delete and link mutations have their own paths and are out of scope."].join(" ")};var nF=Y.object({cid:Y.number().int().positive().optional().describe("PubChem CID. Most specific identifier — bypasses lookup."),cas:Y.string().optional().describe('CAS Registry Number (e.g. "71-43-2"). Resolved via PubChem CID lookup.'),inchiKey:Y.string().optional().describe('27-character InChIKey (e.g. "UHOVQNZJYSORNB-UHFFFAOYSA-N"). Most reliable for exact-compound lookup.'),name:Y.string().optional().describe("Compound name (IUPAC, common, brand). Resolved via PubChem name search; uses the top match.")}).refine(($)=>$.cid||$.cas||$.inchiKey||$.name,{message:"enrichFromPubchem requires at least one of: cid, cas, inchiKey, name"}),YJ=Y.object({name:Y.string().min(1).max(500).describe('Display name for the artifact (e.g. "DMSN_66c", "TEOS lot 4").'),artifactType:xD.describe('sample | dataset | protocol | file | equipment | chemical | model | reaction. `chemical` is the substance (one per workspace per InChIKey/CCDC); `sample` is a physical instance of a chemical (set `parentId` to the chemical artifact). `reaction` is a sibling type — a transformation (e.g. "Suzuki coupling"), never a sub-flavor of chemical.'),workspaceId:Y.string().uuid().optional().describe("Workspace ID. The workspace's orgId is used as the artifact's org (any organizationId passed alongside is ignored). When omitted, falls back to the user's first workspace."),organizationId:Y.string().uuid().optional().describe("Organization ID. Ignored when workspaceId is provided — derived from the workspace. Auto-resolved to the user's first org only when nothing more specific is passed."),description:Y.string().optional().describe("Plain-text description."),tags:Y.array(Y.string()).optional().describe("Tag names. Resolved to canonical tag IDs server-side (alias-aware)."),properties:Y.record(Y.string(),Y.unknown()).optional().describe(["Free-form JSONB blob. Common keys per type: sample → batch, storage_conditions, preparation_date; dataset → format, row_count, source_instrument; equipment → model, serial, last_calibration; reaction → rxn_smiles, reaction_class, description.",'For chemical artifacts, set `properties.structureClass` to one of: "molecule" (default; PubChem-shaped — iupac_name, molecular_formula, cas_number, canonical_smiles, inchi, inchi_key, molecular_weight, density, ghs_*, …), "material" (MOFs/COFs/zeolites/perovskites — topology, space_group, unit_cell, ccdc_number, framework_formula, bet_surface_area, pore_volume, pore_size, skeletal_density), "mixture" (solutions/electrolytes — components JSON-array of `{artifactId, ratio, role?}`, solvent, concentration_basis), or "biomacromolecule" (proteins/oligonucleotides — uniprot_id, pdb_id, sequence, molecular_weight, pi).',"The server validates keys against the chosen class's typed schema and returns near-match suggestions for likely typos (warn-but-accept). Unknown keys are stored either way; the warning surfaces in the response so you can self-correct on the next call.","Advisory only — any keys allowed."].join(" ")),status:MI.optional().describe('Lifecycle status (default: active). Use "draft" for partially-known artifacts the user still needs to verify.'),storageRef:Y.string().optional().describe("Free-form storage pointer (path, URL, locker code)."),location:Y.string().optional().describe("Free-form physical/logical location."),parentId:Y.string().uuid().optional().describe("Parent artifact UUID for hierarchies (e.g. sub-samples)."),sourceRecordId:Y.string().uuid().optional().describe('UUID of the record this artifact was extracted/derived from. Sets provenance for the entity-search "derived from" view.'),templateId:Y.string().uuid().optional().describe("Optional template binding."),enrichFromPubchem:nF.optional().describe('When set and artifactType is "chemical" with structureClass molecule (or absent), resolve the identifier (cid > inchiKey > cas > name) and auto-fill missing properties from PubChem. Agent-supplied properties always win — enrichment never overwrites. PubChem does NOT index periodic materials, mixtures, biomacromolecules, or reactions, so this is a no-op (logged) for those classes. Failures (no match, PubChem unreachable) do NOT block creation; the artifact is still created with whatever was provided, and the enrichment status is reported in the result.'),linkToNode:Y.object({nodeId:Y.string().uuid(),role:Y.enum(["input","output","derived_from","referenced"]),context:Y.record(Y.string(),Y.unknown()).optional()}).optional().describe("When set, immediately link the newly-created artifact to this procedure node. Equivalent to: `create_artifact(...)` → `link_artifact_to_node({ nodeId, artifactId, role })` — provided as a convenience for the common create-and-link flow. Per-link failures are non-fatal: the artifact is still created and the link error is surfaced in the response.")}),P0={name:"create_artifact",description:["Create a new artifact (sample, dataset, protocol, file, equipment, chemical, model, or reaction).","Pass `workspaceId` to control where it lands; otherwise the user's first workspace is used. Artifacts are workspace-level — there is no space association.",'`createdBySource` is forced to "agent" — never user-controllable through this tool.',"`properties` is free-form JSONB; advisory keys per type are listed in the field description but never enforced.","For molecular chemical artifacts: prefer `enrichFromPubchem: { cas | cid | inchiKey | name }` over hand-assembling properties — the server canonicalizes via PubChem, dedups by InChIKey within the workspace, and auto-fills SMILES/InChI/formula/MW/GHS/transport/descriptors with fillIfAbsent semantics (your `properties` always win). Enrichment failures don't block creation.",'For periodic materials (MOFs/COFs/zeolites/perovskites): set `properties.structureClass = "material"` and supply the structural identity tuple (topology + space_group + unit_cell + ccdc_number) by hand — PubChem does NOT index periodic structures.','For mixtures (solutions/electrolytes): set `properties.structureClass = "mixture"` and reference component chemicals via `properties.components` (JSON array of {artifactId, ratio, role?}). Each component should already exist as a chemical artifact in the workspace.','For reactions: set `artifactType = "reaction"` and supply `properties.rxn_smiles`. Reactions are sibling artifacts, not chemicals.','For samples (physical instances of a chemical): set `artifactType = "sample"` and `parentId = <chemical artifact id>`; the chemical\'s typed properties flow through the UI when the sample is displayed.',"Use this when the user asks to register a new sample, dataset, instrument, chemical, material, mixture, or reaction. To attach the new artifact to a procedure node, pass `linkToNode` (artifact + node + role) — atomic create-and-link."].join(" ")};var BJ=Y.object({title:Y.string().min(1).max(500).describe("Title for the new record."),organizationId:Y.string().uuid().optional().describe("Organization ID. Ignored when spaceId or workspaceId is provided — derived from the parent scope. Auto-resolved to the user's first org only when nothing more specific is passed."),workspaceId:Y.string().uuid().optional().describe("Workspace ID. Ignored when spaceId is provided — derived from the space. Otherwise the workspace's organizationId is used as the record's org (any organizationId passed alongside is ignored)."),spaceId:Y.string().uuid().optional().describe("Optional space to attach the record to. When omitted the record lives at workspace level only."),recordDate:Y.string().regex(/^\d{4}-\d{2}-\d{2}$/,"Expected YYYY-MM-DD").optional().describe("ISO date (YYYY-MM-DD) of the research activity, used for calendar navigation. Defaults to today."),recordType:Y.string().max(120).optional().describe('Freeform record category (e.g. "Experiment", "Characterization", "Protocol").'),collaborators:Y.array(Y.string().uuid()).optional().describe("User ids participating in this research activity."),initialTree:Y.array(F0).optional().describe("Optional flat procedure-tree list built via parentTempId. Inserted after the record is created; on success the response carries a tempId → nodeId map.")}),k0={name:"create_record",description:["Create a new ELN research record in the user's workspace.","Records are always created in `draft` status and begin empty — you can populate the prose body with the edit tools afterwards.","Pass `spaceId` to attach the record to a specific space; otherwise it lives at workspace level only.","Provide `initialTree` to stand up the procedure-node tree in the same call (topological insert, parentTempId → parentId).",'`type === "observation"` nodes are required to have `copyable === false` (or omitted).',"Use this when the user asks you to create a new record, experiment entry, or lab notebook page."].join(" ")};var JJ=Y.object({recordId:Y.string().uuid().describe("Record UUID whose procedure tree you want to inspect.")}),R0={name:"list_procedure_nodes",description:["List the procedure-tree nodes of a record as a flat, token-dense table.","Returns each node's `id`, `parentId`, `order`, `type`, `label`, `copyable`, and live counts of attached matrices, artifact links, and analytical-data file references.","Also emits an `[attachedMatrices]` block with each node-bound matrix's `{matrixId, label, version, rows, cols}` — the `cols` cell uses pipe-separated `key(Label/type[/unit])` entries so you can write `append_/update_/delete_matrix_rows` without an extra `get_content` round-trip.","Orphaned matrices (nodeRef cleared by a node deletion) appear in a separate block with the same schema so they can be rebound via `rebind_matrix_to_node` or dropped via `delete_matrix`.","Use this before editing the tree; reconstruct hierarchy from `parentId` + `order` and pick keys/version for matrix row writes straight from the output."].join(" ")};var HJ=Y.object({reactionArtifactId:Y.string().uuid().describe('UUID of the reaction artifact to derive the stoichiometry matrix from. Must be `artifactType: "reaction"` — other types return an error.'),workspaceId:Y.string().uuid().describe("Workspace scope. Must match the reaction artifact and (if provided) the target entity."),entityType:Y.enum(["record","artifact","document","literature"]).optional().describe("Owner entity type for the spawned matrix. Omit to create a workspace-orphan matrix. Typical use: `record` paired with a `nodeRef`."),entityId:Y.string().uuid().optional().describe("Owner entity UUID. Required when `entityType` is set."),nodeRef:Y.string().uuid().optional().describe('Procedure node UUID. When set with `entityType: "record"`, also ensures a procedure_node ↔ reaction artifact link exists (idempotent — duplicate calls are safe).'),label:Y.string().min(1).optional().describe('Optional matrix label. Defaults to "Stoichiometry — <reaction name>".')}),T0={name:"create_matrix_from_reaction_artifact",description:["Derive a stoichiometry matrix from a saved reaction artifact. Walks the artifact's `linkSlots` (typed component slots: reactant / product / reagent / catalyst / solvent), pulls each linked chemical artifact's name + MW + density, and emits one matrix row per bound slot using the slot's stoichCoefficient. Stamps `derivedFromArtifactId` on the matrix for provenance.","Frozen invariant: edits to the artifact never propagate forward to the spawned matrix; this is a one-shot copy at instantiation time.",'When `entityType: "record"` + `nodeRef` are set, the matrix is bound to the procedure node AND a `procedure_node → reaction artifact` link is ensured (created if absent). One call replaces "link reaction to node" + "spawn matrix" + "bind to node."',"Slots without a `defaultArtifactId` are skipped (no row emitted). The user can fill in those rows by hand on the derived matrix.","Returns the new matrix in the same shape as `insert_matrix`."].join(" ")};var hD=Y.object({entityType:D4.describe('Entity type: "document" or "record"'),entityId:Y.string().uuid().describe("Document or record ID"),blockId:Y.string().optional().describe("Block ID to delete (for single delete)"),blockIds:Y.array(Y.string()).max(gD).optional().describe(`Array of block IDs to delete (batch mode, max ${gD})`)}),Yu=hD.refine(($)=>{let I=$.blockId!==void 0,U=$.blockIds!==void 0&&$.blockIds.length>0;return I!==U},{message:"Provide either blockId (single delete) or blockIds (batch delete), not both"}),_0={name:"delete_block",description:"Delete blocks from a document. Supports single (blockId) or batch (blockIds) mode. Batch mode is more efficient for deleting multiple blocks in one operation. Be careful - this permanently removes blocks and their content. Use get_content first to verify blocks before deleting. "+"Records: only `draft` records are writable; `completed`/`locked` records return a `record_not_draft` error — do not try to flip the status yourself. "+"Do NOT attempt to delete `procedureTree`, `procedureSection`, or `nodeArtifacts` blocks on records — those are sync projections of table-backed rows and re-render on every sync; use the `*_procedure_node` tools to mutate the tree instead."};var AJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the matrix to delete."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error."),acknowledgeDataLoss:Y.literal(!0).describe("Model-level confirmation: MUST be set to true. Deleting the matrix removes all rows AND the linked structuredMatrix block from the owning document/record. Not recoverable outside of version snapshots.")}),Z0={name:"delete_matrix",description:["Delete a data matrix row AND the `structuredMatrix` block that references it in the owning document/record. Both writes happen in the same tool call.","Requires `acknowledgeDataLoss: true` as a model-level self-check — prefer `delete_matrix_rows` or `rebind_matrix_to_node` for less-destructive edits.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version.","Only draft records are writable; completed/locked records return a `record_not_draft` error. Matrices on documents/literature/artifacts have no draft gate.","Undo path: `record_versions` snapshots capture matrix state together with Y.js content when a version is cut, so a prior snapshot restore can recover an accidentally deleted matrix for records under version control."].join(" ")};var Bu=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])).describe("Row match: every provided key/value must equal the row's current value. Matches all rows where the criteria hold."),OJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),rowIndices:Y.array(Y.number().int().min(0)).min(1).optional().describe("Absolute 0-based indices of rows to delete in the current rows array. Indices resolve against the pre-delete snapshot (batch-safe)."),rowMatch:Bu.optional(),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}).refine(($)=>{let I=$.rowIndices!==void 0,U=$.rowMatch!==void 0;return I!==U},{message:"Provide exactly one of `rowIndices` (absolute indices) or `rowMatch` (by column values).",path:["rowIndices"]}),C0={name:"delete_matrix_rows",description:["Remove rows from an existing data matrix, either by absolute `rowIndices` or by `rowMatch` (every column/value in the match must equal the row's current cell). Match mode deletes every row that satisfies the criteria.","**`rowMatch` MUST use `col.key` as each object key, NOT `col.label`** — the schema is visible via `get_content` on the owning entity (`cols: key(Label,type[,unit])` + `{key1,key2,...}` row header).","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","To remove the matrix itself (row + structuredMatrix block) use `delete_matrix`. This tool only prunes rows.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var zJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node to delete."),acknowledgeCascade:Y.literal(!0).describe("Model-level confirmation: MUST be set to true. Deleting a node cascades to all descendants via FK and orphans any bound matrices (matrix.nodeRef → null).")}),g0={name:"delete_procedure_node",description:["Delete a procedure-tree node and all of its descendants (FK cascade).","Any matrices bound to deleted nodes have their `nodeRef` cleared — the response lists the orphaned matrix ids so the agent can rebind or drop them via the matrix tools.","Requires `acknowledgeCascade: true` as a model-level self-check — check `list_procedure_nodes` before deleting to understand the subtree you are about to remove.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var LJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),parentId:Y.string().uuid().optional().describe("Existing parent node UUID. Omit to insert as a top-level root under the record."),label:Y.string().min(1).describe("Human-readable node label."),type:qI.describe("Node type."),afterNodeId:Y.string().uuid().optional().describe("Insert immediately after this existing sibling. Resolves to the sibling's order + 1."),order:Y.number().int().min(0).optional().describe("Explicit sibling order (0-indexed). Mutually exclusive with afterNodeId; omit both to append."),copyable:Y.boolean().optional().describe('Template-copyable flag. MUST be false (or omitted) when type === "observation".'),analyticalData:Y.array(FI).optional().describe("File references attached to the new node.")}).refine(($)=>!($.type==="observation"&&$.copyable===!0),{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]}).refine(($)=>!($.afterNodeId&&$.order!==void 0),{message:"Provide either afterNodeId (relative) OR order (absolute), not both.",path:["afterNodeId"]}),x0={name:"insert_procedure_node",description:["Insert a single procedure-tree node under a draft record.","Positioning: `afterNodeId` (place right after an existing sibling) OR `order` (explicit 0-indexed slot) — omit both to append at the end.","`parentId` must be an existing node UUID in the same record; omit for a new root.",'`type === "observation"` must have `copyable` omitted or `false`.',"Only draft records are writable; completed/locked records return a `record_not_draft` error.","For bulk construction prefer `build_procedure_tree` instead."].join(" ")};var KJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),nodeRef:Y.union([Y.string().uuid(),Y.null()]).describe("Target procedure node UUID, or null to detach (body-level matrix). The node must belong to the same record that owns the matrix. Passing the same value as the current nodeRef is a no-op but still bumps version."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),h0={name:"rebind_matrix_to_node",description:["Change a matrix's procedure-node binding. Three modes via one tool: (a) promote a body-level matrix to a node-attached one (`nodeRef` = new node UUID, current was null), (b) move a node-attached matrix to a different node under the same record, (c) detach a node-attached matrix back to body level (`nodeRef: null`).","The matrix must be record-owned (documents/literature/artifacts have no procedure tree). The target `nodeRef`, when non-null, must reference a node that belongs to the SAME record as the matrix.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var vJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node to link the artifact to."),artifactId:Y.string().uuid().describe("UUID of the artifact to link. Use `search` first to discover existing artifacts, or call `create_artifact` and pass its `linkToNode` shortcut to skip this tool."),role:Y.enum(["input","output","derived_from","referenced"]).describe("Role the artifact plays at this node. `input` = consumed/used (e.g., a starting material on a procedure step). `output` = produced/generated (e.g., a sample emerging from a step). `derived_from` = this step's design/procedure was adapted from the artifact (e.g., reaction artifact serving as the recipe template). `referenced` = the step references the artifact without consuming or producing it (e.g., a reaction artifact, equipment manual, or literature item it documents). Pick by direction of flow / nature of the relationship."),context:Y.record(Y.string(),Y.unknown()).optional().describe('Optional structured context describing the link (e.g., `{quantity: "2.5 g", purpose: "limiting reagent"}`). Free-form JSONB; mirrors the UI surface.')}),f0={name:"link_artifact_to_node",description:['Bind an existing artifact to a procedure node by creating an `artifact_links` row with `source_type=procedure_node`. Mirrors the node inspector "Link artifact" affordance and is the agent equivalent of `attach_matrix` for matrices.',"The artifact must already exist — to create + link in one call, use `create_artifact({ linkToNode: { nodeId, role } })` instead.","Role semantics: `input` (consumed/used at this step), `output` (produced/generated), `derived_from` (this step adapts another artifact as its recipe — e.g., a reaction artifact serving as the procedure template), `referenced` (the step references the artifact without consuming/producing — e.g., equipment manuals, literature, reaction artifacts). Pick by direction of flow / nature of the relationship.","The mutation does NOT enforce same-record / same-workspace scope on the artifact — `artifact_links` is polymorphic by design (artifacts can be referenced across the workspace). The node's record drives the surface where the link appears.","Returns the new `linkId` so subsequent `unlink_artifact_from_node({ linkId })` calls don't need to re-query."].join(" ")};var VJ=Y.object({linkId:Y.string().uuid().describe("UUID of the `artifact_links` row to delete. Returned by `link_artifact_to_node` and `list_node_artifact_links`.")}),y0={name:"unlink_artifact_from_node",description:["Remove an artifact ↔ procedure-node link by `linkId`. The artifact and the node both stay; only the join row is dropped.","Use `list_node_artifact_links({ nodeId })` first if you only know the node + artifact identifiers — the link id is the join-row uuid, not the artifact id.","Idempotent at the user level: deleting a non-existent link returns `success: true` with `id` echoed (delete-by-id is a no-op on missing rows in the underlying repo)."].join(" ")};var qJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the procedure node whose artifact links to list.")}),u0={name:"list_node_artifact_links",description:["List all artifact ↔ procedure-node links for a given node. Returns one row per link with `linkId`, `artifactId`, `artifactName`, `artifactType`, `role`, `context`, and `createdAt`.",'Mirrors the node inspector "Artifacts" panel; use this before `unlink_artifact_from_node` when you only know the artifact id (the link id is the join-row uuid, not the artifact id).'].join(" ")};var iF=Y.object({nodeId:Y.string().uuid().describe("UUID of the node to move/reorder."),parentId:Y.string().uuid().nullable().describe("New parent UUID, or null to become a top-level root. Must belong to the same record."),order:Y.number().int().min(0).describe("New 0-indexed order within the new parent's children.")}),FJ=Y.object({recordId:Y.string().uuid().describe("Target record UUID. Must be in draft status."),moves:Y.array(iF).min(1).describe("Batch of reparent/reorder operations applied together. Each entry carries the node's final parent and order — siblings you don't move keep their current values, so typically you pass moves for the whole sibling set you're rearranging.")}),l0={name:"reorder_procedure_nodes",description:["Batch reparent / reorder procedure-tree nodes in a draft record.","Each move carries the *final* `parentId` + `order` — think of it as a transaction that describes the desired post-state.","Any nodes you omit from `moves` keep their current parent/order, so you usually include the whole sibling set being rearranged.","All moves must target nodes in the same record; cross-record moves are rejected.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};var Ju=Y.record(Y.string(),Y.union([Y.string(),Y.number(),Y.boolean(),Y.null()])).describe("Row match: every provided key/value must equal the row's current value. Matches all rows where the criteria hold (not just the first)."),Hu=Y.object({rowIndex:Y.number().int().min(0).optional().describe("Target a single row by 0-based index in the current rows array."),rowMatch:Ju.optional(),values:VI.describe("Partial row patch. **Keys MUST match `col.key` (the column id), NOT `col.label`.** Keys present here overwrite the matching rows' cells. Keys not in `values` retain their existing values. Set a key to null to clear a cell.")}).refine(($)=>{let I=$.rowIndex!==void 0,U=$.rowMatch!==void 0;return I!==U},{message:"Provide exactly one of `rowIndex` (absolute) or `rowMatch` (by column values).",path:["rowIndex"]}),MJ=Y.object({matrixId:Y.string().uuid().describe("UUID of the target data_matrix."),updates:Y.array(Hu).min(1).describe("List of row patches. Each entry targets rows by `rowIndex` OR `rowMatch` and supplies a partial `values` patch."),version:Y.number().int().min(0).describe("Current matrix version (optimistic locking). Must equal the server's stored version; otherwise returns a matrix_version_conflict error.")}),c0={name:"update_matrix_rows",description:["Patch cells in an existing data matrix. Each update targets rows by `rowIndex` (absolute 0-based) OR `rowMatch` (every provided column/value must equal the row's current cell); partial column updates are allowed.","**All row-keyed objects (`values`, `rowMatch`) MUST use `col.key` as the object key, NOT `col.label`.** Read the schema first via `get_content` on the owning entity — its matrix TOON shows `cols: key(Label,type[,unit])` and a `{key1,key2,...}` row header. Mismatched keys persist as opaque JSONB that the UI cannot render.","Match mode updates every row that satisfies the criteria — use it when the match is unique, or when you intend to update a whole group at once.","Bumps `version` on success; stale `version` returns a structured `matrix_version_conflict` error with the current server version so you can re-fetch and retry.","Set a `values` entry to null to clear a cell. Keys not present in `values` are untouched.","Only draft records are writable; completed/locked records return a `record_not_draft` error.",'**Stoichiometry matrices** (`kind=stoichiometry` in the matrix header): clearing a numeric cell to null re-enables client-side derivation via the chemistry identities (n = m/M, n = V·c, m = V·ρ·purity, n = stockMolarity·V, n = stockWtPercent·ρ_soln·V/M, n_i = equiv_i · n_limiting, equiv_i = n_i / n_limiting). Keys not in `values` stay untouched — use this to preserve the hidden `compoundId` link to a chemical artifact while patching other cells. Do not manually recompute derived quantities; write only measured or locked-in values. For aqueous stock solutions, set `stockMolarity` (mol/L) or `stockWtPercent` (0–100) rather than approximating via `purity` × `density`. The displayed `c` is computed against a per-row reference volume controlled by two hidden keys: `cBasis` (`null` | `"none"` | `"phase"` | `"total"` | `"manual"`; null = engine picks default by role+phase, "phase" = c relative to V_phase, "total" = c relative to V_total, "manual" = c relative to `cBasisManualVolume`, "none" = blank c) and `cBasisManualVolume` (mL, only used when cBasis="manual"). Leave both null unless the user explicitly set them.'].join(" ")};var jJ=Y.object({nodeId:Y.string().uuid().describe("UUID of the existing procedure node to update."),label:Y.string().min(1).optional().describe("New label (skip to keep existing)."),type:qI.optional().describe('New type (skip to keep existing). Changing type to "observation" forces copyable=false.'),copyable:Y.boolean().optional().describe('Template-copyable flag. When the resulting type is "observation" this must be false (or omitted).'),analyticalData:Y.array(FI).optional().describe("Replace the current `analyticalData` list with this one. Pass an empty array to clear it; omit to leave it untouched.")}).refine(($)=>{if($.type!=="observation")return!0;return $.copyable===void 0||$.copyable===!1},{message:'copyable must be false (or omitted) when type is "observation".',path:["copyable"]}).refine(($)=>$.label!==void 0||$.type!==void 0||$.copyable!==void 0||$.analyticalData!==void 0,{message:"Provide at least one field to update (label, type, copyable, analyticalData)."}),m0={name:"update_procedure_node",description:["Update non-structural fields of a procedure-tree node (label, type, copyable, analyticalData).","Structural changes (move / reorder) go through `reorder_procedure_nodes` — this tool never touches parentId or order.",'`type === "observation"` implies `copyable = false`; setting both to a conflicting combination is rejected.',"Passing an empty `analyticalData` array clears the file-ref list; omitting the field leaves it untouched.","Only draft records are writable; completed/locked records return a `record_not_draft` error."].join(" ")};function k$($){return` ${$.map((U)=>{if(U===null||U===void 0||U==="")return"";let b=String(U);return b.includes(",")?`"${b}"`:b}).join(",")}`}function fD($){if(!$)return"";let I=[];if($.previousBlock)I.push(`After: [${$.previousBlock.type} | ${$.previousBlock.id}]`);if($.nextBlock)I.push(`Before: [${$.nextBlock.type} | ${$.nextBlock.id}]`);return I.join(", ")}function pF($,I,U=150){let b=0,w=Math.min($.length,I.length);while(b<w&&$[b]===I[b])b++;let X=0;while(X<w-b&&$.at(1+X)===I.at(1+X))X++;let D=Math.floor(U/2),W=Math.max(0,b-D),Q=Math.min($.length,$.length-X+D),G=Math.min(I.length,I.length-X+D),N=W>0?"...":"",B=Q<$.length?"...":"",H=G<I.length?"...":"",J=`${N}${$.slice(W,Q)}${B}`,A=`${N}${I.slice(W,G)}${H}`;return`--- before
|
|
65
65
|
${J}
|
|
66
66
|
+++ after
|
|
67
67
|
${A}`}function EJ($){let I=[];I.push(`[workspace context | default org:${$.defaults.orgId}${$.defaults.workspaceId?` ws:${$.defaults.workspaceId}`:""}]`);let U=0,b=[];for(let w of $.orgs)for(let X of w.workspaces)if(X.spaces.length===0)b.push(k$([w.name,w.id,X.name,X.id,X.type,"","",""])),U++;else for(let D of X.spaces)b.push(k$([w.name,w.id,X.name,X.id,X.type,D.name,D.id,D.type])),U++;return I.push(`{org,orgId,workspace,wsId,wsType,space,spaceId,spaceType}[${U}]:`),I.push(...b),I.join(`
|