@synnaxlabs/drift 0.45.0 → 0.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron.cjs +1 -1
- package/dist/electron.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/{selectors-By2hD6jK.js → selectors-CvgeW9LM.js} +1 -1
- package/dist/{selectors-2MSm_GSG.cjs → selectors-oCvMthlz.cjs} +1 -1
- package/dist/state-DSydrpNM.cjs +34 -0
- package/dist/{state-B5czbfja.js → state-fkp7Fjfe.js} +3771 -3689
- package/dist/tauri.cjs +1 -1
- package/dist/tauri.js +1 -1
- package/package.json +4 -4
- package/dist/state-Cs3c0gyv.cjs +0 -34
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";const al=require("@reduxjs/toolkit"),Xe=(t=!1,...e)=>{t&&console.log(...e)},Yi=(t=!1,...e)=>{t&&console.group(...e)},fn=t=>{t&&console.groupEnd()},ul=t=>{const e=t.replace(/_[a-z]/g,r=>r[1].toUpperCase());return e.length>1&&e[0]===e[0].toUpperCase()&&e[1]===e[1].toUpperCase()||e.length===0?e:e[0].toLowerCase()+e.slice(1)},Xi=t=>{const e=(r,i=mn)=>{if(typeof r=="string")return t(r);if(Array.isArray(r))return r.map(a=>e(a,i));if(!cn(r))return r;i=dl(i);const n={},o=r;return"toJSON"in o&&typeof o.toJSON=="function"?e(o.toJSON(),i):(Object.keys(o).forEach(a=>{let u=o[a];const s=t(a);i.recursive&&(cn(u)?zi(u)||(u=e(u,i)):i.recursiveInArray&&Oi(u)&&(u=[...u].map(l=>{let m=l;return cn(l)?zi(m)||(m=e(l,i)):Oi(l)&&(m=e({key:l},i).key),m}))),n[s]=u}),n)};return e},Hi=Xi(ul),sl=t=>t.replace(/([a-z0-9])([A-Z])/g,(e,r,i)=>`${r}_${i.toLowerCase()}`),cl=Xi(sl),ll=[Number,String,Uint8Array],mn={recursive:!0,recursiveInArray:!0},dl=(t=mn)=>(t.recursive==null?t=mn:t.recursiveInArray??=!1,t),Oi=t=>t!=null&&Array.isArray(t),cn=t=>t!=null&&typeof t=="object"&&!Array.isArray(t),zi=t=>ll.some(e=>t instanceof e),ln=t=>t!=null&&typeof t=="object"&&!Array.isArray(t);let fl=class{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,r){return this.decodeString(this.decoder.decode(e),r)}decodeString(e,r){const i=JSON.parse(e),n=Hi(i);return r!=null?r.parse(n):n}encodeString(e){const r=cl(e);return JSON.stringify(r,(i,n)=>ArrayBuffer.isView(n)?Array.from(n):typeof n=="bigint"?n.toString():n)}};const pn=new fl,Qi=Object.freeze({status:"aborted"});function c(t,e,r){function i(u,s){var l;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(l=u._zod).traits??(l.traits=new Set),u._zod.traits.add(t),e(u,s);for(const m in a.prototype)m in u||Object.defineProperty(u,m,{value:a.prototype[m].bind(u)});u._zod.constr=a,u._zod.def=s}const n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:t});function a(u){var s;const l=r?.Parent?new o:this;i(l,u),(s=l._zod).deferred??(s.deferred=[]);for(const m of l._zod.deferred)m();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}const eo=Symbol("zod_brand");class Le extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Ot={};function H(t){return t&&Object.assign(Ot,t),Ot}function ml(t){return t}function pl(t){return t}function gl(t){}function hl(t){throw new Error}function vl(t){}function Nn(t){const e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function b(t,e="|"){return t.map(r=>O(r)).join(e)}function to(t,e){return typeof e=="bigint"?e.toString():e}function Zt(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Ee(t){return t==null}function Mt(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function no(t,e){const r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,o=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return o%a/10**n}function T(t,e,r){Object.defineProperty(t,e,{get(){{const i=r();return t[e]=i,i}},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function Ve(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function yl(t,e){return e?e.reduce((r,i)=>r?.[i],t):t}function bl(t){const e=Object.keys(t),r=e.map(i=>t[i]);return Promise.all(r).then(i=>{const n={};for(let o=0;o<e.length;o++)n[e[o]]=i[o];return n})}function $l(t=10){const e="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<t;i++)r+=e[Math.floor(Math.random()*e.length)];return r}function Ae(t){return JSON.stringify(t)}const Tn=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function it(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const ro=Zt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ot(t){if(it(t)===!1)return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(it(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function wl(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}const _l=t=>{const e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},zt=new Set(["string","number","symbol"]),io=new Set(["string","number","bigint","boolean","symbol","undefined"]);function De(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(t,e,r){const i=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(i._zod.parent=t),i}function p(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Il(t){let e;return new Proxy({},{get(r,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(r,i,n,o){return e??(e=t()),Reflect.set(e,i,n,o)},has(r,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(r,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(r,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function O(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function oo(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const ao={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function so(t,e){const r={},i=t._zod.def;for(const n in e){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&(r[n]=i.shape[n])}return fe(t,{...t._zod.def,shape:r,checks:[]})}function co(t,e){const r={...t._zod.def.shape},i=t._zod.def;for(const n in e){if(!(n in i.shape))throw new Error(`Unrecognized key: "${n}"`);e[n]&&delete r[n]}return fe(t,{...t._zod.def,shape:r,checks:[]})}function lo(t,e){if(!ot(e))throw new Error("Invalid input to extend: expected a plain object");const r={...t._zod.def,get shape(){const i={...t._zod.def.shape,...e};return Ve(this,"shape",i),i},checks:[]};return fe(t,r)}function fo(t,e){return fe(t,{...t._zod.def,get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return Ve(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function mo(t,e,r){const i=e._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=t?new t({type:"optional",innerType:i[o]}):i[o])}else for(const o in i)n[o]=t?new t({type:"optional",innerType:i[o]}):i[o];return fe(e,{...e._zod.def,shape:n,checks:[]})}function po(t,e,r){const i=e._zod.def.shape,n={...i};if(r)for(const o in r){if(!(o in n))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(n[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(const o in i)n[o]=new t({type:"nonoptional",innerType:i[o]});return fe(e,{...e._zod.def,shape:n,checks:[]})}function Ce(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function re(t,e){return e.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(t),r})}function He(t){return typeof t=="string"?t:t?.message}function ae(t,e,r){const i={...t,path:t.path??[]};if(!t.message){const n=He(t.inst?._zod.def?.error?.(t))??He(e?.error?.(t))??He(r.customError?.(t))??He(r.localeError?.(t))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,e?.reportInput||delete i.input,i}function Ct(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Rt(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function We(...t){const[e,r,i]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:i}:{...e}}function kl(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}class Sl{constructor(...e){}}const Ol=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:uo,Class:Sl,NUMBER_FORMAT_RANGES:ao,aborted:Ce,allowsEval:ro,assert:vl,assertEqual:ml,assertIs:gl,assertNever:hl,assertNotEqual:pl,assignProp:Ve,cached:Zt,captureStackTrace:Tn,cleanEnum:kl,cleanRegex:Mt,clone:fe,createTransparentProxy:Il,defineLazy:T,esc:Ae,escapeRegex:De,extend:lo,finalizeIssue:ae,floatSafeRemainder:no,getElementAtPath:yl,getEnumValues:Nn,getLengthableOrigin:Rt,getParsedType:_l,getSizableOrigin:Ct,isObject:it,isPlainObject:ot,issue:We,joinValues:b,jsonStringifyReplacer:to,merge:fo,normalizeParams:p,nullish:Ee,numKeys:wl,omit:co,optionalKeys:oo,partial:mo,pick:so,prefixIssues:re,primitiveTypes:io,promiseAllObject:bl,propertyKeyTypes:zt,randomString:$l,required:po,stringifyPrimitive:O,unwrapMessage:He},Symbol.toStringTag,{value:"Module"})),go=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,to,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},jn=c("$ZodError",go),dt=c("$ZodError",go,{Parent:Error});function Un(t,e=r=>r.message){const r={},i=[];for(const n of t.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}function En(t,e){const r=e||function(o){return o.message},i={_errors:[]},n=o=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(u=>n({issues:u}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)i._errors.push(r(a));else{let u=i,s=0;for(;s<a.path.length;){const l=a.path[s];s===a.path.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(r(a))):u[l]=u[l]||{_errors:[]},u=u[l],s++}}};return n(t),i}function ho(t,e){const r=e||function(o){return o.message},i={errors:[]},n=(o,a=[])=>{var u,s;for(const l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(m=>n({issues:m},l.path));else if(l.code==="invalid_key")n({issues:l.issues},l.path);else if(l.code==="invalid_element")n({issues:l.issues},l.path);else{const m=[...a,...l.path];if(m.length===0){i.errors.push(r(l));continue}let d=i,h=0;for(;h<m.length;){const y=m[h],f=h===m.length-1;typeof y=="string"?(d.properties??(d.properties={}),(u=d.properties)[y]??(u[y]={errors:[]}),d=d.properties[y]):(d.items??(d.items=[]),(s=d.items)[y]??(s[y]={errors:[]}),d=d.items[y]),f&&d.errors.push(r(l)),h++}}};return n(t),i}function vo(t){const e=[];for(const r of t)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function yo(t){const e=[],r=[...t.issues].sort((i,n)=>i.path.length-n.path.length);for(const i of r)e.push(`✖ ${i.message}`),i.path?.length&&e.push(` → at ${vo(i.path)}`);return e.join(`
|
|
2
|
+
`)}const Dn=t=>(e,r,i,n)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Le;if(a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ae(s,o,H())));throw Tn(u,n?.callee),u}return a.value},gn=Dn(dt),Pn=t=>async(e,r,i,n)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new(n?.Err??t)(a.issues.map(s=>ae(s,o,H())));throw Tn(u,n?.callee),u}return a.value},hn=Pn(dt),An=t=>(e,r,i)=>{const n=i?{...i,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Le;return o.issues.length?{success:!1,error:new(t??jn)(o.issues.map(a=>ae(a,n,H())))}:{success:!0,data:o.value}},bo=An(dt),Zn=t=>async(e,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let o=e._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>ae(a,n,H())))}:{success:!0,data:o.value}},$o=Zn(dt),wo=/^[cC][^\s-]{8,}$/,_o=/^[0-9a-z]+$/,Io=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ko=/^[0-9a-vA-V]{20}$/,So=/^[A-Za-z0-9]{27}$/,Oo=/^[a-zA-Z0-9_-]{21}$/,zo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zl=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Be=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,xl=Be(4),Nl=Be(6),Tl=Be(7),No=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jl=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ul=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,El=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Dl=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Pl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function To(){return new RegExp(Pl,"u")}const jo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Uo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Eo=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Do=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Po=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mn=/^[A-Za-z0-9_-]*$/,Ao=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Al=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Zo=/^\+(?:[0-9]){6,14}[0-9]$/,Mo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Co=new RegExp(`^${Mo}$`);function Ro(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Lo(t){return new RegExp(`^${Ro(t)}$`)}function Wo(t){const e=Ro({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");const i=`${e}(?:${r.join("|")})`;return new RegExp(`^${Mo}T(?:${i})$`)}const Bo=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Fo=/^\d+n?$/,Jo=/^\d+$/,Vo=/^-?\d+(?:\.\d+)?/i,Go=/true|false/i,qo=/null/i,Ko=/undefined/i,Yo=/^[^A-Z]*$/,Xo=/^[^a-z]*$/,Ho=Object.freeze(Object.defineProperty({__proto__:null,base64:Po,base64url:Mn,bigint:Fo,boolean:Go,browserEmail:Dl,cidrv4:Eo,cidrv6:Do,cuid:wo,cuid2:_o,date:Co,datetime:Wo,domain:Al,duration:zo,e164:Zo,email:No,emoji:To,extendedDuration:zl,guid:xo,hostname:Ao,html5Email:jl,integer:Jo,ipv4:jo,ipv6:Uo,ksuid:So,lowercase:Yo,nanoid:Oo,null:qo,number:Vo,rfc5322Email:Ul,string:Bo,time:Lo,ulid:Io,undefined:Ko,unicodeEmail:El,uppercase:Xo,uuid:Be,uuid4:xl,uuid6:Nl,uuid7:Tl,xid:ko},Symbol.toStringTag,{value:"Module"})),F=c("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Qo={number:"number",bigint:"bigint",object:"date"},Cn=c("$ZodCheckLessThan",(t,e)=>{F.init(t,e);const r=Qo[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,o=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:r,code:"too_big",maximum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Rn=c("$ZodCheckGreaterThan",(t,e)=>{F.init(t,e);const r=Qo[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,o=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:r,code:"too_small",minimum:e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ea=c("$ZodCheckMultipleOf",(t,e)=>{F.init(t,e),t._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):no(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),ta=c("$ZodCheckNumberFormat",(t,e)=>{F.init(t,e),e.format=e.format||"float64";const r=e.format?.includes("int"),i=r?"int":"number",[n,o]=ao[e.format];t._zod.onattach.push(a=>{const u=a._zod.bag;u.format=e.format,u.minimum=n,u.maximum=o,r&&(u.pattern=Jo)}),t._zod.check=a=>{const u=a.value;if(r){if(!Number.isInteger(u)){a.issues.push({expected:i,format:e.format,code:"invalid_type",input:u,inst:t});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!e.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,continue:!e.abort});return}}u<n&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inst:t})}}),na=c("$ZodCheckBigIntFormat",(t,e)=>{F.init(t,e);const[r,i]=uo[e.format];t._zod.onattach.push(n=>{const o=n._zod.bag;o.format=e.format,o.minimum=r,o.maximum=i}),t._zod.check=n=>{const o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:t})}}),ra=c("$ZodCheckMaxSize",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{const n=i.value;n.size<=e.maximum||i.issues.push({origin:Ct(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),ia=c("$ZodCheckMinSize",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{const n=i.value;n.size>=e.minimum||i.issues.push({origin:Ct(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),oa=c("$ZodCheckSizeEquals",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{const n=i.value,o=n.size;if(o===e.size)return;const a=o>e.size;i.issues.push({origin:Ct(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),aa=c("$ZodCheckMaxLength",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{const n=i.value;if(n.length<=e.maximum)return;const a=Rt(n);i.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),ua=c("$ZodCheckMinLength",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{const n=i.value;if(n.length>=e.minimum)return;const a=Rt(n);i.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),sa=c("$ZodCheckLengthEquals",(t,e)=>{var r;F.init(t,e),(r=t._zod.def).when??(r.when=i=>{const n=i.value;return!Ee(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{const n=i.value,o=n.length;if(o===e.length)return;const a=Rt(n),u=o>e.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),ft=c("$ZodCheckStringFormat",(t,e)=>{var r,i;F.init(t,e),t._zod.onattach.push(n=>{const o=n._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),ca=c("$ZodCheckRegex",(t,e)=>{ft.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),la=c("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Yo),ft.init(t,e)}),da=c("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Xo),ft.init(t,e)}),fa=c("$ZodCheckIncludes",(t,e)=>{F.init(t,e);const r=De(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=i,t._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),ma=c("$ZodCheckStartsWith",(t,e)=>{F.init(t,e);const r=new RegExp(`^${De(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),pa=c("$ZodCheckEndsWith",(t,e)=>{F.init(t,e);const r=new RegExp(`.*${De(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function xi(t,e,r){t.issues.length&&e.issues.push(...re(r,t.issues))}const ga=c("$ZodCheckProperty",(t,e)=>{F.init(t,e),t._zod.check=r=>{const i=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>xi(n,r,e.property));xi(i,r,e.property)}}),ha=c("$ZodCheckMimeType",(t,e)=>{F.init(t,e);const r=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t})}}),va=c("$ZodCheckOverwrite",(t,e)=>{F.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class ya{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const i=e.split(`
|
|
3
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of o)this.content.push(a)}compile(){const e=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,n.join(`
|
|
4
|
+
`))}}const ba={major:4,minor:0,patch:2},k=c("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=ba;const i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(const n of i)for(const o of n._zod.onattach)o(t);if(i.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const n=(o,a,u)=>{let s=Ce(o),l;for(const m of a){if(m._zod.def.when){if(!m._zod.def.when(o))continue}else if(s)continue;const d=o.issues.length,h=m._zod.check(o);if(h instanceof Promise&&u?.async===!1)throw new Le;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,o.issues.length!==d&&(s||(s=Ce(o,d)))});else{if(o.issues.length===d)continue;s||(s=Ce(o,d))}}return l?l.then(()=>o):o};t._zod.run=(o,a)=>{const u=t._zod.parse(o,a);if(u instanceof Promise){if(a.async===!1)throw new Le;return u.then(s=>n(s,i,a))}return n(u,i,a)}}t["~standard"]={validate:n=>{try{const o=bo(t,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return $o(t,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),mt=c("$ZodString",(t,e)=>{k.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Bo(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),M=c("$ZodStringFormat",(t,e)=>{ft.init(t,e),mt.init(t,e)}),$a=c("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=xo),M.init(t,e)}),wa=c("$ZodUUID",(t,e)=>{if(e.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Be(i))}else e.pattern??(e.pattern=Be());M.init(t,e)}),_a=c("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=No),M.init(t,e)}),Ia=c("$ZodURL",(t,e)=>{M.init(t,e),t._zod.check=r=>{try{const i=r.value,n=new URL(i),o=n.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ao.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!i.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),ka=c("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=To()),M.init(t,e)}),Sa=c("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Oo),M.init(t,e)}),Oa=c("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=wo),M.init(t,e)}),za=c("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=_o),M.init(t,e)}),xa=c("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Io),M.init(t,e)}),Na=c("$ZodXID",(t,e)=>{e.pattern??(e.pattern=ko),M.init(t,e)}),Ta=c("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=So),M.init(t,e)}),ja=c("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Wo(e)),M.init(t,e)}),Ua=c("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Co),M.init(t,e)}),Ea=c("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Lo(e)),M.init(t,e)}),Da=c("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=zo),M.init(t,e)}),Pa=c("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=jo),M.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),Aa=c("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Uo),M.init(t,e),t._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Za=c("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Eo),M.init(t,e)}),Ma=c("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Do),M.init(t,e),t._zod.check=r=>{const[i,n]=r.value.split("/");try{if(!n)throw new Error;const o=Number(n);if(`${o}`!==n)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Ln(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Ca=c("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Po),M.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{Ln(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Ra(t){if(!Mn.test(t))return!1;const e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Ln(r)}const La=c("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Mn),M.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Ra(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Wa=c("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Zo),M.init(t,e)});function Ba(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}const Fa=c("$ZodJWT",(t,e)=>{M.init(t,e),t._zod.check=r=>{Ba(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Ja=c("$ZodCustomStringFormat",(t,e)=>{M.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Wn=c("$ZodNumber",(t,e)=>{k.init(t,e),t._zod.pattern=t._zod.bag.pattern??Vo,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...o?{received:o}:{}}),r}}),Va=c("$ZodNumber",(t,e)=>{ta.init(t,e),Wn.init(t,e)}),Bn=c("$ZodBoolean",(t,e)=>{k.init(t,e),t._zod.pattern=Go,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),r}}),Fn=c("$ZodBigInt",(t,e)=>{k.init(t,e),t._zod.pattern=Fo,t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Ga=c("$ZodBigInt",(t,e)=>{na.init(t,e),Fn.init(t,e)}),qa=c("$ZodSymbol",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),r}}),Ka=c("$ZodUndefined",(t,e)=>{k.init(t,e),t._zod.pattern=Ko,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),r}}),Ya=c("$ZodNull",(t,e)=>{k.init(t,e),t._zod.pattern=qo,t._zod.values=new Set([null]),t._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),r}}),Xa=c("$ZodAny",(t,e)=>{k.init(t,e),t._zod.parse=r=>r}),xt=c("$ZodUnknown",(t,e)=>{k.init(t,e),t._zod.parse=r=>r}),Ha=c("$ZodNever",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Qa=c("$ZodVoid",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),r}}),eu=c("$ZodDate",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:t}),r}});function Ni(t,e,r){t.issues.length&&e.issues.push(...re(r,t.issues)),e.value[r]=t.value}const Jn=c("$ZodArray",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),r;r.value=Array(n.length);const o=[];for(let a=0;a<n.length;a++){const u=n[a],s=e.element._zod.run({value:u,issues:[]},i);s instanceof Promise?o.push(s.then(l=>Ni(l,r,a))):Ni(s,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function vt(t,e,r){t.issues.length&&e.issues.push(...re(r,t.issues)),e.value[r]=t.value}function Ti(t,e,r,i){t.issues.length?i[r]===void 0?r in i?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...re(r,t.issues)):t.value===void 0?r in i&&(e.value[r]=void 0):e.value[r]=t.value}const tu=c("$ZodObject",(t,e)=>{k.init(t,e);const r=Zt(()=>{const d=Object.keys(e.shape);for(const y of d)if(!(e.shape[y]instanceof k))throw new Error(`Invalid element at key "${y}": expected a Zod schema`);const h=oo(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(h)}});T(t._zod,"propValues",()=>{const d=e.shape,h={};for(const y in d){const f=d[y]._zod;if(f.values){h[y]??(h[y]=new Set);for(const $ of f.values)h[y].add($)}}return h});const i=d=>{const h=new ya(["shape","payload","ctx"]),y=r.value,f=I=>{const S=Ae(I);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};h.write("const input = payload.value;");const $=Object.create(null);let w=0;for(const I of y.keys)$[I]=`key_${w++}`;h.write("const newResult = {}");for(const I of y.keys)if(y.optionalKeys.has(I)){const S=$[I];h.write(`const ${S} = ${f(I)};`);const j=Ae(I);h.write(`
|
|
5
|
+
if (${S}.issues.length) {
|
|
6
|
+
if (input[${j}] === undefined) {
|
|
7
|
+
if (${j} in input) {
|
|
8
|
+
newResult[${j}] = undefined;
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
payload.issues = payload.issues.concat(
|
|
12
|
+
${S}.issues.map((iss) => ({
|
|
13
|
+
...iss,
|
|
14
|
+
path: iss.path ? [${j}, ...iss.path] : [${j}],
|
|
15
|
+
}))
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
} else if (${S}.value === undefined) {
|
|
19
|
+
if (${j} in input) newResult[${j}] = undefined;
|
|
20
|
+
} else {
|
|
21
|
+
newResult[${j}] = ${S}.value;
|
|
22
|
+
}
|
|
23
|
+
`)}else{const S=$[I];h.write(`const ${S} = ${f(I)};`),h.write(`
|
|
24
|
+
if (${S}.issues.length) payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
25
|
+
...iss,
|
|
26
|
+
path: iss.path ? [${Ae(I)}, ...iss.path] : [${Ae(I)}]
|
|
27
|
+
})));`),h.write(`newResult[${Ae(I)}] = ${S}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");const P=h.compile();return(I,S)=>P(d,I,S)};let n;const o=it,a=!Ot.jitless,s=a&&ro.value,l=e.catchall;let m;t._zod.parse=(d,h)=>{m??(m=r.value);const y=d.value;if(!o(y))return d.issues.push({expected:"object",code:"invalid_type",input:y,inst:t}),d;const f=[];if(a&&s&&h?.async===!1&&h.jitless!==!0)n||(n=i(e.shape)),d=n(d,h);else{d.value={};const S=m.shape;for(const j of m.keys){const ke=S[j],ht=ke._zod.run({value:y[j],issues:[]},h),ki=ke._zod.optin==="optional"&&ke._zod.optout==="optional";ht instanceof Promise?f.push(ht.then(Si=>ki?Ti(Si,d,j,y):vt(Si,d,j))):ki?Ti(ht,d,j,y):vt(ht,d,j)}}if(!l)return f.length?Promise.all(f).then(()=>d):d;const $=[],w=m.keySet,P=l._zod,I=P.def.type;for(const S of Object.keys(y)){if(w.has(S))continue;if(I==="never"){$.push(S);continue}const j=P.run({value:y[S],issues:[]},h);j instanceof Promise?f.push(j.then(ke=>vt(ke,d,S))):vt(j,d,S)}return $.length&&d.issues.push({code:"unrecognized_keys",keys:$,input:y,inst:t}),f.length?Promise.all(f).then(()=>d):d}});function ji(t,e,r,i){for(const n of t)if(n.issues.length===0)return e.value=n.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(n=>n.issues.map(o=>ae(o,i,H())))}),e}const Vn=c("$ZodUnion",(t,e)=>{k.init(t,e),T(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),T(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),T(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),T(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){const r=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Mt(i.source)).join("|")})$`)}}),t._zod.parse=(r,i)=>{let n=!1;const o=[];for(const a of e.options){const u=a._zod.run({value:r.value,issues:[]},i);if(u instanceof Promise)o.push(u),n=!0;else{if(u.issues.length===0)return u;o.push(u)}}return n?Promise.all(o).then(a=>ji(a,r,t,i)):ji(o,r,t,i)}}),nu=c("$ZodDiscriminatedUnion",(t,e)=>{Vn.init(t,e);const r=t._zod.parse;T(t._zod,"propValues",()=>{const n={};for(const o of e.options){const a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(const[u,s]of Object.entries(a)){n[u]||(n[u]=new Set);for(const l of s)n[u].add(l)}}return n});const i=Zt(()=>{const n=e.options,o=new Map;for(const a of n){const u=a._zod.propValues[e.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const s of u){if(o.has(s))throw new Error(`Duplicate discriminator value "${String(s)}"`);o.set(s,a)}}return o});t._zod.parse=(n,o)=>{const a=n.value;if(!it(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),n;const u=i.value.get(a?.[e.discriminator]);return u?u._zod.run(n,o):e.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[e.discriminator],inst:t}),n)}}),ru=c("$ZodIntersection",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value,o=e.left._zod.run({value:n,issues:[]},i),a=e.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,l])=>Ui(r,s,l)):Ui(r,o,a)}});function vn(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ot(t)&&ot(e)){const r=Object.keys(e),i=Object.keys(t).filter(o=>r.indexOf(o)!==-1),n={...t,...e};for(const o of i){const a=vn(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<t.length;i++){const n=t[i],o=e[i],a=vn(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ui(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Ce(t))return t;const i=vn(e.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return t.value=i.data,t}const Lt=c("$ZodTuple",(t,e)=>{k.init(t,e);const r=e.items,i=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");t._zod.parse=(n,o)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];const u=[];if(!e.rest){const l=a.length>r.length,m=a.length<i-1;if(l||m)return n.issues.push({input:a,inst:t,origin:"array",...l?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),n}let s=-1;for(const l of r){if(s++,s>=a.length&&s>=i)continue;const m=l._zod.run({value:a[s],issues:[]},o);m instanceof Promise?u.push(m.then(d=>yt(d,n,s))):yt(m,n,s)}if(e.rest){const l=a.slice(r.length);for(const m of l){s++;const d=e.rest._zod.run({value:m,issues:[]},o);d instanceof Promise?u.push(d.then(h=>yt(h,n,s))):yt(d,n,s)}}return u.length?Promise.all(u).then(()=>n):n}});function yt(t,e,r){t.issues.length&&e.issues.push(...re(r,t.issues)),e.value[r]=t.value}const iu=c("$ZodRecord",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!ot(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),r;const o=[];if(e.keyType._zod.values){const a=e.keyType._zod.values;r.value={};for(const s of a)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){const l=e.valueType._zod.run({value:n[s],issues:[]},i);l instanceof Promise?o.push(l.then(m=>{m.issues.length&&r.issues.push(...re(s,m.issues)),r.value[s]=m.value})):(l.issues.length&&r.issues.push(...re(s,l.issues)),r.value[s]=l.value)}let u;for(const s in n)a.has(s)||(u=u??[],u.push(s));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:u})}else{r.value={};for(const a of Reflect.ownKeys(n)){if(a==="__proto__")continue;const u=e.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map(l=>ae(l,i,H())),input:a,path:[a],inst:t}),r.value[u.value]=u.value;continue}const s=e.valueType._zod.run({value:n[a],issues:[]},i);s instanceof Promise?o.push(s.then(l=>{l.issues.length&&r.issues.push(...re(a,l.issues)),r.value[u.value]=l.value})):(s.issues.length&&r.issues.push(...re(a,s.issues)),r.value[u.value]=s.value)}}return o.length?Promise.all(o).then(()=>r):r}}),ou=c("$ZodMap",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),r;const o=[];r.value=new Map;for(const[a,u]of n){const s=e.keyType._zod.run({value:a,issues:[]},i),l=e.valueType._zod.run({value:u,issues:[]},i);s instanceof Promise||l instanceof Promise?o.push(Promise.all([s,l]).then(([m,d])=>{Ei(m,d,r,a,n,t,i)})):Ei(s,l,r,a,n,t,i)}return o.length?Promise.all(o).then(()=>r):r}});function Ei(t,e,r,i,n,o,a){t.issues.length&&(zt.has(typeof i)?r.issues.push(...re(i,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:n,inst:o,issues:t.issues.map(u=>ae(u,a,H()))})),e.issues.length&&(zt.has(typeof i)?r.issues.push(...re(i,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:e.issues.map(u=>ae(u,a,H()))})),r.value.set(t.value,e.value)}const au=c("$ZodSet",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),r;const o=[];r.value=new Set;for(const a of n){const u=e.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(s=>Di(s,r))):Di(u,r)}return o.length?Promise.all(o).then(()=>r):r}});function Di(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}const uu=c("$ZodEnum",(t,e)=>{k.init(t,e);const r=Nn(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(i=>zt.has(typeof i)).map(i=>typeof i=="string"?De(i):i.toString()).join("|")})$`),t._zod.parse=(i,n)=>{const o=i.value;return t._zod.values.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:t}),i}}),su=c("$ZodLiteral",(t,e)=>{k.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?De(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,i)=>{const n=r.value;return t._zod.values.has(n)||r.issues.push({code:"invalid_value",values:e.values,input:n,inst:t}),r}}),cu=c("$ZodFile",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),r}}),Gn=c("$ZodTransform",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=e.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Le;return r.value=n,r}}),lu=c("$ZodOptional",(t,e)=>{k.init(t,e),t._zod.optin="optional",t._zod.optout="optional",T(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),T(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Mt(r.source)})?$`):void 0}),t._zod.parse=(r,i)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,i):r.value===void 0?r:e.innerType._zod.run(r,i)}),du=c("$ZodNullable",(t,e)=>{k.init(t,e),T(t._zod,"optin",()=>e.innerType._zod.optin),T(t._zod,"optout",()=>e.innerType._zod.optout),T(t._zod,"pattern",()=>{const r=e.innerType._zod.pattern;return r?new RegExp(`^(${Mt(r.source)}|null)$`):void 0}),T(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,i)=>r.value===null?r:e.innerType._zod.run(r,i)}),fu=c("$ZodDefault",(t,e)=>{k.init(t,e),t._zod.optin="optional",T(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{if(r.value===void 0)return r.value=e.defaultValue,r;const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Pi(o,e)):Pi(n,e)}});function Pi(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const mu=c("$ZodPrefault",(t,e)=>{k.init(t,e),t._zod.optin="optional",T(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,i))}),pu=c("$ZodNonOptional",(t,e)=>{k.init(t,e),T(t._zod,"values",()=>{const r=e.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(r,i)=>{const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Ai(o,t)):Ai(n,t)}});function Ai(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const gu=c("$ZodSuccess",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>{const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),hu=c("$ZodCatch",(t,e)=>{k.init(t,e),t._zod.optin="optional",T(t._zod,"optout",()=>e.innerType._zod.optout),T(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,i)=>{const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>ae(a,i,H()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=e.catchValue({...r,error:{issues:n.issues.map(o=>ae(o,i,H()))},input:r.value}),r.issues=[]),r)}}),vu=c("$ZodNaN",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),qn=c("$ZodPipe",(t,e)=>{k.init(t,e),T(t._zod,"values",()=>e.in._zod.values),T(t._zod,"optin",()=>e.in._zod.optin),T(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,i)=>{const n=e.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Zi(o,e,i)):Zi(n,e,i)}});function Zi(t,e,r){return Ce(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}const yu=c("$ZodReadonly",(t,e)=>{k.init(t,e),T(t._zod,"propValues",()=>e.innerType._zod.propValues),T(t._zod,"values",()=>e.innerType._zod.values),T(t._zod,"optin",()=>e.innerType._zod.optin),T(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,i)=>{const n=e.innerType._zod.run(r,i);return n instanceof Promise?n.then(Mi):Mi(n)}});function Mi(t){return t.value=Object.freeze(t.value),t}const bu=c("$ZodTemplateLiteral",(t,e)=>{k.init(t,e);const r=[];for(const i of e.parts)if(i instanceof k){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);const n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);const o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||io.has(typeof i))r.push(De(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"template_literal",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),$u=c("$ZodPromise",(t,e)=>{k.init(t,e),t._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),wu=c("$ZodLazy",(t,e)=>{k.init(t,e),T(t._zod,"innerType",()=>e.getter()),T(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),T(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),T(t._zod,"optin",()=>t._zod.innerType._zod.optin),T(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,i)=>t._zod.innerType._zod.run(r,i)}),_u=c("$ZodCustom",(t,e)=>{F.init(t,e),k.init(t,e),t._zod.parse=(r,i)=>r,t._zod.check=r=>{const i=r.value,n=e.fn(i);if(n instanceof Promise)return n.then(o=>Ci(o,r,i,t));Ci(n,r,i,t)}});function Ci(t,e,r,i){if(!t){const n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(We(n))}}const Zl=()=>{const t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${O(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${b(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Ml(){return{localeError:Zl()}}const Cl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${O(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Rl(){return{localeError:Cl()}}function Ri(t,e,r,i){const n=Math.abs(t),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?r:i}const Ll=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${O(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=Ri(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${s}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=Ri(u,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${s}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${b(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function Wl(){return{localeError:Ll()}}const Bl=()=>{const t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${O(n.values[0])}`:`Opció invàlida: s'esperava una de ${b(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=e(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=e(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function Fl(){return{localeError:Bl()}}const Jl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"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(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${O(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${b(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function Vl(){return{localeError:Jl()}}const Gl=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${O(n.values[0])}`:`Ungültige Option: erwartet eine von ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function ql(){return{localeError:Gl()}}const Kl=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Yl=()=>{const t={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 e(i){return t[i]??null}const r={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 i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Kl(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${O(i.values[0])}`:`Invalid option: expected one of ${b(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${b(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Iu(){return{localeError:Yl()}}const Xl=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Hl=()=>{const t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}const r={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 i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${Xl(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${O(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${b(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${b(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function Ql(){return{localeError:Hl()}}const ed=()=>{const t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"arreglo";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Entrada inválida: se esperaba ${n.expected}, recibido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${O(n.values[0])}`:`Opción inválida: se esperaba una de ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Demasiado grande: se esperaba que ${n.origin??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${n.origin??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Demasiado pequeño: se esperaba que ${n.origin} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado pequeño: se esperaba que ${n.origin} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Cadena inválida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inválida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inválida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${o.pattern}`:`Inválido ${i[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${n.origin}`;default:return"Entrada inválida"}}};function td(){return{localeError:ed()}}const nd=()=>{const t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${O(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${b(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${b(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function rd(){return{localeError:nd()}}const id=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${O(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${b(n.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 od(){return{localeError:id()}}const ad=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${O(n.values[0])} attendu`:`Option invalide : une valeur parmi ${b(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function ud(){return{localeError:ad()}}const sd=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${O(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=e(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=e(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function cd(){return{localeError:sd()}}const ld=()=>{const t={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return n=>{switch(n.code){case"invalid_type":return`קלט לא תקין: צריך ${n.expected}, התקבל ${r(n.input)}`;case"invalid_value":return n.values.length===1?`קלט לא תקין: צריך ${O(n.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`גדול מדי: ${n.origin??"value"} צריך להיות ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()} ${a.unit}`:`קטן מדי: ${n.origin} צריך להיות ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${o.prefix}"`:o.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${o.suffix}"`:o.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${o.includes}"`:o.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${o.pattern}`:`${i[o.format]??n.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${n.divisor}`;case"unrecognized_keys":return`מפתח${n.keys.length>1?"ות":""} לא מזוה${n.keys.length>1?"ים":"ה"}: ${b(n.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${n.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n.origin}`;default:return"קלט לא תקין"}}};function dd(){return{localeError:ld()}}const fd=()=>{const t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${O(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function md(){return{localeError:fd()}}const pd=()=>{const t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${O(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function gd(){return{localeError:pd()}}const hd=()=>{const t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${O(n.values[0])}`:`Opzione non valida: atteso uno tra ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${b(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function vd(){return{localeError:hd()}}const yd=()=>{const t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${O(n.values[0])}が期待されました`:`無効な選択: ${b(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=e(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=e(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${b(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function bd(){return{localeError:yd()}}const $d=()=>{const t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${O(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${b(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function wd(){return{localeError:$d()}}const _d=()=>{const t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${O(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${b(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",u=e(n.origin),s=u?.unit??"요소";return u?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${s} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${b(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Id(){return{localeError:_d()}}const kd=()=>{const t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${O(n.values[0])}`:`Грешана опција: се очекува една ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${b(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function Sd(){return{localeError:kd()}}const Od=()=>{const t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${O(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function zd(){return{localeError:Od()}}const xd=()=>{const t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${O(n.values[0])}`:`Ongeldige optie: verwacht één van ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Nd(){return{localeError:xd()}}const Td=()=>{const t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${O(n.values[0])}`:`Ugyldig valg: forventet en av ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function jd(){return{localeError:Td()}}const Ud=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${O(n.values[0])}`:`Fâsit tercih: mûteberler ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Ed(){return{localeError:Ud()}}const Dd=()=>{const t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${O(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${b(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${b(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function Pd(){return{localeError:Dd()}}const Ad=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${O(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Zd(){return{localeError:Ad()}}const Md=()=>{const t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${O(n.values[0])}`:`Opção inválida: esperada uma das ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function Cd(){return{localeError:Md()}}function Li(t,e,r,i){const n=Math.abs(t),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?e:o>=2&&o<=4?r:i}const Rd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${O(n.values[0])}`:`Неверный вариант: ожидалось одно из ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);if(a){const u=Number(n.maximum),s=Li(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${s}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);if(a){const u=Number(n.minimum),s=Li(u,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${s}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function Ld(){return{localeError:Rd()}}const Wd=()=>{const t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${O(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Bd(){return{localeError:Wd()}}const Fd=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${O(n.values[0])}`:`Ogiltigt val: förväntade en av ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function Jd(){return{localeError:Fd()}}const Vd=()=>{const t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${O(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${b(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Gd(){return{localeError:Vd()}}const qd=()=>{const t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${O(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=e(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=e(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${b(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Kd(){return{localeError:qd()}}const Yd=t=>{const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Xd=()=>{const t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function e(i){return t[i]??null}const r={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 i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${Yd(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${O(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${b(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=e(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=e(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${b(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Hd(){return{localeError:Xd()}}const Qd=()=>{const t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${O(n.values[0])}`:`Неправильна опція: очікується одне з ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function ef(){return{localeError:Qd()}}const tf=()=>{const t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${O(n.values[0])} متوقع تھا`:`غلط آپشن: ${b(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${b(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function nf(){return{localeError:tf()}}const rf=()=>{const t={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 e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${O(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${b(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.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 ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function of(){return{localeError:rf()}}const af=()=>{const t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${O(n.values[0])}`:`无效选项:期望以下之一 ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function uf(){return{localeError:af()}}const sf=()=>{const t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function e(n){return t[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={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 n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${O(n.values[0])}`:`無效的選項:預期為以下其中之一 ${b(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=e(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=e(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${b(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function cf(){return{localeError:sf()}}const ku=Object.freeze(Object.defineProperty({__proto__:null,ar:Ml,az:Rl,be:Wl,ca:Fl,cs:Vl,de:ql,en:Iu,eo:Ql,es:td,fa:rd,fi:od,fr:ud,frCA:cd,he:dd,hu:md,id:gd,it:vd,ja:bd,kh:wd,ko:Id,mk:Sd,ms:zd,nl:Nd,no:jd,ota:Ed,pl:Zd,ps:Pd,pt:Cd,ru:Ld,sl:Bd,sv:Jd,ta:Gd,th:Kd,tr:Hd,ua:ef,ur:nf,vi:of,zhCN:uf,zhTW:cf},Symbol.toStringTag,{value:"Module"})),Su=Symbol("ZodOutput"),Ou=Symbol("ZodInput");class Kn{constructor(){this._map=new Map,this._idmap=new Map}add(e,...r){const i=r[0];if(this._map.set(e,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){const r=e._zod.parent;if(r){const i={...this.get(r)??{}};return delete i.id,{...i,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function Yn(){return new Kn}const Se=Yn();function zu(t,e){return new t({type:"string",...p(e)})}function xu(t,e){return new t({type:"string",coerce:!0,...p(e)})}function Xn(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...p(e)})}function Nt(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...p(e)})}function Hn(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...p(e)})}function Qn(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...p(e)})}function er(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...p(e)})}function tr(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...p(e)})}function nr(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...p(e)})}function rr(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...p(e)})}function ir(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...p(e)})}function or(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...p(e)})}function ar(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...p(e)})}function ur(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...p(e)})}function sr(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...p(e)})}function cr(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...p(e)})}function lr(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...p(e)})}function dr(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...p(e)})}function fr(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...p(e)})}function mr(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...p(e)})}function pr(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...p(e)})}function gr(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...p(e)})}function hr(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...p(e)})}function vr(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...p(e)})}const Nu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Tu(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...p(e)})}function ju(t,e){return new t({type:"string",format:"date",check:"string_format",...p(e)})}function Uu(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...p(e)})}function Eu(t,e){return new t({type:"string",format:"duration",check:"string_format",...p(e)})}function Du(t,e){return new t({type:"number",checks:[],...p(e)})}function Pu(t,e){return new t({type:"number",coerce:!0,checks:[],...p(e)})}function Au(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...p(e)})}function Zu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...p(e)})}function Mu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...p(e)})}function Cu(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...p(e)})}function Ru(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...p(e)})}function Lu(t,e){return new t({type:"boolean",...p(e)})}function Wu(t,e){return new t({type:"boolean",coerce:!0,...p(e)})}function Bu(t,e){return new t({type:"bigint",...p(e)})}function Fu(t,e){return new t({type:"bigint",coerce:!0,...p(e)})}function Ju(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...p(e)})}function Vu(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...p(e)})}function Gu(t,e){return new t({type:"symbol",...p(e)})}function qu(t,e){return new t({type:"undefined",...p(e)})}function Ku(t,e){return new t({type:"null",...p(e)})}function Yu(t){return new t({type:"any"})}function Tt(t){return new t({type:"unknown"})}function Xu(t,e){return new t({type:"never",...p(e)})}function Hu(t,e){return new t({type:"void",...p(e)})}function Qu(t,e){return new t({type:"date",...p(e)})}function es(t,e){return new t({type:"date",coerce:!0,...p(e)})}function ts(t,e){return new t({type:"nan",...p(e)})}function Te(t,e){return new Cn({check:"less_than",...p(e),value:t,inclusive:!1})}function oe(t,e){return new Cn({check:"less_than",...p(e),value:t,inclusive:!0})}function je(t,e){return new Rn({check:"greater_than",...p(e),value:t,inclusive:!1})}function ee(t,e){return new Rn({check:"greater_than",...p(e),value:t,inclusive:!0})}function ns(t){return je(0,t)}function rs(t){return Te(0,t)}function is(t){return oe(0,t)}function os(t){return ee(0,t)}function at(t,e){return new ea({check:"multiple_of",...p(e),value:t})}function Wt(t,e){return new ra({check:"max_size",...p(e),maximum:t})}function ut(t,e){return new ia({check:"min_size",...p(e),minimum:t})}function yr(t,e){return new oa({check:"size_equals",...p(e),size:t})}function Bt(t,e){return new aa({check:"max_length",...p(e),maximum:t})}function Fe(t,e){return new ua({check:"min_length",...p(e),minimum:t})}function Ft(t,e){return new sa({check:"length_equals",...p(e),length:t})}function br(t,e){return new ca({check:"string_format",format:"regex",...p(e),pattern:t})}function $r(t){return new la({check:"string_format",format:"lowercase",...p(t)})}function wr(t){return new da({check:"string_format",format:"uppercase",...p(t)})}function _r(t,e){return new fa({check:"string_format",format:"includes",...p(e),includes:t})}function Ir(t,e){return new ma({check:"string_format",format:"starts_with",...p(e),prefix:t})}function kr(t,e){return new pa({check:"string_format",format:"ends_with",...p(e),suffix:t})}function as(t,e,r){return new ga({check:"property",property:t,schema:e,...p(r)})}function Sr(t,e){return new ha({check:"mime_type",mime:t,...p(e)})}function Pe(t){return new va({check:"overwrite",tx:t})}function Or(t){return Pe(e=>e.normalize(t))}function zr(){return Pe(t=>t.trim())}function xr(){return Pe(t=>t.toLowerCase())}function Nr(){return Pe(t=>t.toUpperCase())}function Tr(t,e,r){return new t({type:"array",element:e,...p(r)})}function lf(t,e,r){return new t({type:"union",options:e,...p(r)})}function df(t,e,r,i){return new t({type:"union",options:r,discriminator:e,...p(i)})}function ff(t,e,r){return new t({type:"intersection",left:e,right:r})}function us(t,e,r,i){const n=r instanceof k,o=n?i:r,a=n?r:null;return new t({type:"tuple",items:e,rest:a,...p(o)})}function mf(t,e,r,i){return new t({type:"record",keyType:e,valueType:r,...p(i)})}function pf(t,e,r,i){return new t({type:"map",keyType:e,valueType:r,...p(i)})}function gf(t,e,r){return new t({type:"set",valueType:e,...p(r)})}function hf(t,e,r){const i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...p(r)})}function vf(t,e,r){return new t({type:"enum",entries:e,...p(r)})}function yf(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...p(r)})}function ss(t,e){return new t({type:"file",...p(e)})}function bf(t,e){return new t({type:"transform",transform:e})}function $f(t,e){return new t({type:"optional",innerType:e})}function wf(t,e){return new t({type:"nullable",innerType:e})}function _f(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function If(t,e,r){return new t({type:"nonoptional",innerType:e,...p(r)})}function kf(t,e){return new t({type:"success",innerType:e})}function Sf(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Of(t,e,r){return new t({type:"pipe",in:e,out:r})}function zf(t,e){return new t({type:"readonly",innerType:e})}function xf(t,e,r){return new t({type:"template_literal",parts:e,...p(r)})}function Nf(t,e){return new t({type:"lazy",getter:e})}function Tf(t,e){return new t({type:"promise",innerType:e})}function cs(t,e,r){const i=p(r);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function ls(t,e,r){return new t({type:"custom",check:"custom",fn:e,...p(r)})}function ds(t,e){const r=p(e);let i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));const o=new Set(i),a=new Set(n),u=t.Pipe??qn,s=t.Boolean??Bn,l=t.String??mt,m=t.Transform??Gn,d=new m({type:"transform",transform:(f,$)=>{let w=f;return r.case!=="sensitive"&&(w=w.toLowerCase()),o.has(w)?!0:a.has(w)?!1:($.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:$.value,inst:d}),{})},error:r.error}),h=new u({type:"pipe",in:new l({type:"string",error:r.error}),out:d,error:r.error});return new u({type:"pipe",in:h,out:new s({type:"boolean",error:r.error}),error:r.error})}function fs(t,e,r,i={}){const n=p(i),o={...p(i),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new t(o)}class ms{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw new Error("implement() must be called with a function");const r=(...i)=>{const n=this._def.input?gn(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=e(...n);return this._def.output?gn(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(e){if(typeof e!="function")throw new Error("implement() must be called with a function");const r=async(...i)=>{const n=this._def.input?await hn(this._def.input,i,void 0,{callee:r}):i;if(!Array.isArray(n))throw new Error("Invalid arguments schema: not an array or tuple schema.");const o=await e(...n);return this._def.output?hn(this._def.output,o,void 0,{callee:r}):o};return r}input(...e){const r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new Lt({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){const r=this.constructor;return new r({type:"function",input:this._def.input,output:e})}}function ps(t){return new ms({type:"function",input:Array.isArray(t?.input)?us(Lt,t?.input):t?.input??Tr(Jn,Tt(xt)),output:t?.output??Tt(xt)})}class yn{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Se,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var i;const n=e._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,u);const s=e._zod.toJSONSchema?.();if(s)u.schema=s;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path},h=e._zod.parent;if(h)u.ref=h,this.process(h,d),this.seen.get(h).isParent=!0;else{const y=u.schema;switch(n.type){case"string":{const f=y;f.type="string";const{minimum:$,maximum:w,format:P,patterns:I,contentEncoding:S}=e._zod.bag;if(typeof $=="number"&&(f.minLength=$),typeof w=="number"&&(f.maxLength=w),P&&(f.format=o[P]??P,f.format===""&&delete f.format),S&&(f.contentEncoding=S),I&&I.size>0){const j=[...I];j.length===1?f.pattern=j[0].source:j.length>1&&(u.schema.allOf=[...j.map(ke=>({...this.target==="draft-7"?{type:"string"}:{},pattern:ke.source}))])}break}case"number":{const f=y,{minimum:$,maximum:w,format:P,multipleOf:I,exclusiveMaximum:S,exclusiveMinimum:j}=e._zod.bag;typeof P=="string"&&P.includes("int")?f.type="integer":f.type="number",typeof j=="number"&&(f.exclusiveMinimum=j),typeof $=="number"&&(f.minimum=$,typeof j=="number"&&(j>=$?delete f.minimum:delete f.exclusiveMinimum)),typeof S=="number"&&(f.exclusiveMaximum=S),typeof w=="number"&&(f.maximum=w,typeof S=="number"&&(S<=w?delete f.maximum:delete f.exclusiveMaximum)),typeof I=="number"&&(f.multipleOf=I);break}case"boolean":{const f=y;f.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{y.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{y.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const f=y,{minimum:$,maximum:w}=e._zod.bag;typeof $=="number"&&(f.minItems=$),typeof w=="number"&&(f.maxItems=w),f.type="array",f.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{const f=y;f.type="object",f.properties={};const $=n.shape;for(const I in $)f.properties[I]=this.process($[I],{...d,path:[...d.path,"properties",I]});const w=new Set(Object.keys($)),P=new Set([...w].filter(I=>{const S=n.shape[I]._zod;return this.io==="input"?S.optin===void 0:S.optout===void 0}));P.size>0&&(f.required=Array.from(P)),n.catchall?._zod.def.type==="never"?f.additionalProperties=!1:n.catchall?n.catchall&&(f.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{const f=y;f.anyOf=n.options.map(($,w)=>this.process($,{...d,path:[...d.path,"anyOf",w]}));break}case"intersection":{const f=y,$=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),w=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),P=S=>"allOf"in S&&Object.keys(S).length===1,I=[...P($)?$.allOf:[$],...P(w)?w.allOf:[w]];f.allOf=I;break}case"tuple":{const f=y;f.type="array";const $=n.items.map((I,S)=>this.process(I,{...d,path:[...d.path,"prefixItems",S]}));if(this.target==="draft-2020-12"?f.prefixItems=$:f.items=$,n.rest){const I=this.process(n.rest,{...d,path:[...d.path,"items"]});this.target==="draft-2020-12"?f.items=I:f.additionalItems=I}n.rest&&(f.items=this.process(n.rest,{...d,path:[...d.path,"items"]}));const{minimum:w,maximum:P}=e._zod.bag;typeof w=="number"&&(f.minItems=w),typeof P=="number"&&(f.maxItems=P);break}case"record":{const f=y;f.type="object",f.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]}),f.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const f=y,$=Nn(n.entries);$.every(w=>typeof w=="number")&&(f.type="number"),$.every(w=>typeof w=="string")&&(f.type="string"),f.enum=$;break}case"literal":{const f=y,$=[];for(const w of n.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");$.push(Number(w))}else $.push(w);if($.length!==0)if($.length===1){const w=$[0];f.type=w===null?"null":typeof w,f.const=w}else $.every(w=>typeof w=="number")&&(f.type="number"),$.every(w=>typeof w=="string")&&(f.type="string"),$.every(w=>typeof w=="boolean")&&(f.type="string"),$.every(w=>w===null)&&(f.type="null"),f.enum=$;break}case"file":{const f=y,$={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:P,mime:I}=e._zod.bag;w!==void 0&&($.minLength=w),P!==void 0&&($.maxLength=P),I?I.length===1?($.contentMediaType=I[0],Object.assign(f,$)):f.anyOf=I.map(S=>({...$,contentMediaType:S})):Object.assign(f,$);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const f=this.process(n.innerType,d);y.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),u.ref=n.innerType;break}case"success":{const f=y;f.type="boolean";break}case"default":{this.process(n.innerType,d),u.ref=n.innerType,y.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),u.ref=n.innerType,this.io==="input"&&(y._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),u.ref=n.innerType;let f;try{f=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}y.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const f=y,$=e._zod.pattern;if(!$)throw new Error("Pattern not found in template literal");f.type="string",f.pattern=$.source;break}case"pipe":{const f=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(f,d),u.ref=f;break}case"readonly":{this.process(n.innerType,d),u.ref=n.innerType,y.readOnly=!0;break}case"promise":{this.process(n.innerType,d),u.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),u.ref=n.innerType;break}case"lazy":{const f=e._zod.innerType;this.process(f,d),u.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const l=this.metadataRegistry.get(e);return l&&Object.assign(u.schema,l),this.io==="input"&&V(e)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(e).schema}emit(e,r){const i={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=m=>{const d=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const $=i.external.registry.get(m[0])?.id,w=i.external.uri??(I=>I);if($)return{ref:w($)};const P=m[1].defId??m[1].schema.id??`schema${this.counter++}`;return m[1].defId=P,{defId:P,ref:`${w("__shared")}#/${d}/${P}`}}if(m[1]===n)return{ref:"#"};const y=`#/${d}/`,f=m[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:y+f}},a=m=>{if(m[1].schema.$ref)return;const d=m[1],{ref:h,defId:y}=o(m);d.def={...d.schema},y&&(d.defId=y);const f=d.schema;for(const $ in f)delete f[$];f.$ref=h};if(i.cycles==="throw")for(const m of this.seen.entries()){const d=m[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
28
|
+
|
|
29
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of this.seen.entries()){const d=m[1];if(e===m[0]){a(m);continue}if(i.external){const y=i.external.registry.get(m[0])?.id;if(e!==m[0]&&y){a(m);continue}}if(this.metadataRegistry.get(m[0])?.id){a(m);continue}if(d.cycle){a(m);continue}if(d.count>1&&i.reused==="ref"){a(m);continue}}const u=(m,d)=>{const h=this.seen.get(m),y=h.def??h.schema,f={...y};if(h.ref===null)return;const $=h.ref;if(h.ref=null,$){u($,d);const w=this.seen.get($).schema;w.$ref&&d.target==="draft-7"?(y.allOf=y.allOf??[],y.allOf.push(w)):(Object.assign(y,w),Object.assign(y,f))}h.isParent||this.override({zodSchema:m,jsonSchema:y,path:h.path??[]})};for(const m of[...this.seen.entries()].reverse())u(m[0],{target:this.target});const s={};if(this.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?s.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),i.external?.uri){const m=i.external.registry.get(e)?.id;if(!m)throw new Error("Schema is missing an `id` property");s.$id=i.external.uri(m)}Object.assign(s,n.def);const l=i.external?.defs??{};for(const m of this.seen.entries()){const d=m[1];d.def&&d.defId&&(l[d.defId]=d.def)}i.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{return JSON.parse(JSON.stringify(s))}catch{throw new Error("Error converting schema to JSON.")}}}function gs(t,e){if(t instanceof Kn){const i=new yn(e),n={};for(const u of t._idmap.entries()){const[s,l]=u;i.process(l)}const o={},a={registry:t,uri:e?.uri,defs:n};for(const u of t._idmap.entries()){const[s,l]=u;o[s]=i.emit(l,{...e,external:a})}if(Object.keys(n).length>0){const u=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[u]:n}}return{schemas:o}}const r=new yn(e);return r.process(t),r.emit(t,e)}function V(t,e){const r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);const n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return V(n.element,r);case"object":{for(const o in n.shape)if(V(n.shape[o],r))return!0;return!1}case"union":{for(const o of n.options)if(V(o,r))return!0;return!1}case"intersection":return V(n.left,r)||V(n.right,r);case"tuple":{for(const o of n.items)if(V(o,r))return!0;return!!(n.rest&&V(n.rest,r))}case"record":return V(n.keyType,r)||V(n.valueType,r);case"map":return V(n.keyType,r)||V(n.valueType,r);case"set":return V(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return V(n.innerType,r);case"lazy":return V(n.getter(),r);case"default":return V(n.innerType,r);case"prefault":return V(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return V(n.in,r)||V(n.out,r);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${n.type}`)}const jf=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Uf=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Xa,$ZodArray:Jn,$ZodAsyncError:Le,$ZodBase64:Ca,$ZodBase64URL:La,$ZodBigInt:Fn,$ZodBigIntFormat:Ga,$ZodBoolean:Bn,$ZodCIDRv4:Za,$ZodCIDRv6:Ma,$ZodCUID:Oa,$ZodCUID2:za,$ZodCatch:hu,$ZodCheck:F,$ZodCheckBigIntFormat:na,$ZodCheckEndsWith:pa,$ZodCheckGreaterThan:Rn,$ZodCheckIncludes:fa,$ZodCheckLengthEquals:sa,$ZodCheckLessThan:Cn,$ZodCheckLowerCase:la,$ZodCheckMaxLength:aa,$ZodCheckMaxSize:ra,$ZodCheckMimeType:ha,$ZodCheckMinLength:ua,$ZodCheckMinSize:ia,$ZodCheckMultipleOf:ea,$ZodCheckNumberFormat:ta,$ZodCheckOverwrite:va,$ZodCheckProperty:ga,$ZodCheckRegex:ca,$ZodCheckSizeEquals:oa,$ZodCheckStartsWith:ma,$ZodCheckStringFormat:ft,$ZodCheckUpperCase:da,$ZodCustom:_u,$ZodCustomStringFormat:Ja,$ZodDate:eu,$ZodDefault:fu,$ZodDiscriminatedUnion:nu,$ZodE164:Wa,$ZodEmail:_a,$ZodEmoji:ka,$ZodEnum:uu,$ZodError:jn,$ZodFile:cu,$ZodFunction:ms,$ZodGUID:$a,$ZodIPv4:Pa,$ZodIPv6:Aa,$ZodISODate:Ua,$ZodISODateTime:ja,$ZodISODuration:Da,$ZodISOTime:Ea,$ZodIntersection:ru,$ZodJWT:Fa,$ZodKSUID:Ta,$ZodLazy:wu,$ZodLiteral:su,$ZodMap:ou,$ZodNaN:vu,$ZodNanoID:Sa,$ZodNever:Ha,$ZodNonOptional:pu,$ZodNull:Ya,$ZodNullable:du,$ZodNumber:Wn,$ZodNumberFormat:Va,$ZodObject:tu,$ZodOptional:lu,$ZodPipe:qn,$ZodPrefault:mu,$ZodPromise:$u,$ZodReadonly:yu,$ZodRealError:dt,$ZodRecord:iu,$ZodRegistry:Kn,$ZodSet:au,$ZodString:mt,$ZodStringFormat:M,$ZodSuccess:gu,$ZodSymbol:qa,$ZodTemplateLiteral:bu,$ZodTransform:Gn,$ZodTuple:Lt,$ZodType:k,$ZodULID:xa,$ZodURL:Ia,$ZodUUID:wa,$ZodUndefined:Ka,$ZodUnion:Vn,$ZodUnknown:xt,$ZodVoid:Qa,$ZodXID:Na,$brand:eo,$constructor:c,$input:Ou,$output:Su,Doc:ya,JSONSchema:jf,JSONSchemaGenerator:yn,NEVER:Qi,TimePrecision:Nu,_any:Yu,_array:Tr,_base64:pr,_base64url:gr,_bigint:Bu,_boolean:Lu,_catch:Sf,_cidrv4:fr,_cidrv6:mr,_coercedBigint:Fu,_coercedBoolean:Wu,_coercedDate:es,_coercedNumber:Pu,_coercedString:xu,_cuid:or,_cuid2:ar,_custom:cs,_date:Qu,_default:_f,_discriminatedUnion:df,_e164:hr,_email:Xn,_emoji:rr,_endsWith:kr,_enum:hf,_file:ss,_float32:Zu,_float64:Mu,_gt:je,_gte:ee,_guid:Nt,_includes:_r,_int:Au,_int32:Cu,_int64:Ju,_intersection:ff,_ipv4:lr,_ipv6:dr,_isoDate:ju,_isoDateTime:Tu,_isoDuration:Eu,_isoTime:Uu,_jwt:vr,_ksuid:cr,_lazy:Nf,_length:Ft,_literal:yf,_lowercase:$r,_lt:Te,_lte:oe,_map:pf,_max:oe,_maxLength:Bt,_maxSize:Wt,_mime:Sr,_min:ee,_minLength:Fe,_minSize:ut,_multipleOf:at,_nan:ts,_nanoid:ir,_nativeEnum:vf,_negative:rs,_never:Xu,_nonnegative:os,_nonoptional:If,_nonpositive:is,_normalize:Or,_null:Ku,_nullable:wf,_number:Du,_optional:$f,_overwrite:Pe,_parse:Dn,_parseAsync:Pn,_pipe:Of,_positive:ns,_promise:Tf,_property:as,_readonly:zf,_record:mf,_refine:ls,_regex:br,_safeParse:An,_safeParseAsync:Zn,_set:gf,_size:yr,_startsWith:Ir,_string:zu,_stringFormat:fs,_stringbool:ds,_success:kf,_symbol:Gu,_templateLiteral:xf,_toLowerCase:xr,_toUpperCase:Nr,_transform:bf,_trim:zr,_tuple:us,_uint32:Ru,_uint64:Vu,_ulid:ur,_undefined:qu,_union:lf,_unknown:Tt,_uppercase:wr,_url:nr,_uuid:Hn,_uuidv4:Qn,_uuidv6:er,_uuidv7:tr,_void:Hu,_xid:sr,clone:fe,config:H,flattenError:Un,formatError:En,function:ps,globalConfig:Ot,globalRegistry:Se,isValidBase64:Ln,isValidBase64URL:Ra,isValidJWT:Ba,locales:ku,parse:gn,parseAsync:hn,prettifyError:yo,regexes:Ho,registry:Yn,safeParse:bo,safeParseAsync:$o,toDotPath:vo,toJSONSchema:gs,treeifyError:ho,util:Ol,version:ba},Symbol.toStringTag,{value:"Module"})),jr=c("ZodISODateTime",(t,e)=>{ja.init(t,e),C.init(t,e)});function hs(t){return Tu(jr,t)}const Ur=c("ZodISODate",(t,e)=>{Ua.init(t,e),C.init(t,e)});function vs(t){return ju(Ur,t)}const Er=c("ZodISOTime",(t,e)=>{Ea.init(t,e),C.init(t,e)});function ys(t){return Uu(Er,t)}const Dr=c("ZodISODuration",(t,e)=>{Da.init(t,e),C.init(t,e)});function bs(t){return Eu(Dr,t)}const Ef=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:Ur,ZodISODateTime:jr,ZodISODuration:Dr,ZodISOTime:Er,date:vs,datetime:hs,duration:bs,time:ys},Symbol.toStringTag,{value:"Module"})),$s=(t,e)=>{jn.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>En(t,r)},flatten:{value:r=>Un(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},Df=c("ZodError",$s),pt=c("ZodError",$s,{Parent:Error}),ws=Dn(pt),_s=Pn(pt),Is=An(pt),ks=Zn(pt),z=c("ZodType",(t,e)=>(k.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),t.clone=(r,i)=>fe(t,r,i),t.brand=()=>t,t.register=(r,i)=>(r.add(t,i),t),t.parse=(r,i)=>ws(t,r,i,{callee:t.parse}),t.safeParse=(r,i)=>Is(t,r,i),t.parseAsync=async(r,i)=>_s(t,r,i,{callee:t.parseAsync}),t.safeParseAsync=async(r,i)=>ks(t,r,i),t.spa=t.safeParseAsync,t.refine=(r,i)=>t.check(cc(r,i)),t.superRefine=r=>t.check(lc(r)),t.overwrite=r=>t.check(Pe(r)),t.optional=()=>Ut(t),t.nullable=()=>Et(t),t.nullish=()=>Ut(Et(t)),t.nonoptional=r=>Xs(t,r),t.array=()=>gt(t),t.or=r=>L([t,r]),t.and=r=>Cs(t,r),t.transform=r=>Dt(t,oi(r)),t.default=r=>qs(t,r),t.prefault=r=>Ys(t,r),t.catch=r=>ec(t,r),t.pipe=r=>Dt(t,r),t.readonly=()=>rc(t),t.describe=r=>{const i=t.clone();return Se.add(i,{description:r}),i},Object.defineProperty(t,"description",{get(){return Se.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Se.get(t);const i=t.clone();return Se.add(i,r[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),Pr=c("_ZodString",(t,e)=>{mt.init(t,e),z.init(t,e);const r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...i)=>t.check(br(...i)),t.includes=(...i)=>t.check(_r(...i)),t.startsWith=(...i)=>t.check(Ir(...i)),t.endsWith=(...i)=>t.check(kr(...i)),t.min=(...i)=>t.check(Fe(...i)),t.max=(...i)=>t.check(Bt(...i)),t.length=(...i)=>t.check(Ft(...i)),t.nonempty=(...i)=>t.check(Fe(1,...i)),t.lowercase=i=>t.check($r(i)),t.uppercase=i=>t.check(wr(i)),t.trim=()=>t.check(zr()),t.normalize=(...i)=>t.check(Or(...i)),t.toLowerCase=()=>t.check(xr()),t.toUpperCase=()=>t.check(Nr())}),Jt=c("ZodString",(t,e)=>{mt.init(t,e),Pr.init(t,e),t.email=r=>t.check(Xn(Ar,r)),t.url=r=>t.check(nr(Zr,r)),t.jwt=r=>t.check(vr(Hr,r)),t.emoji=r=>t.check(rr(Mr,r)),t.guid=r=>t.check(Nt(jt,r)),t.uuid=r=>t.check(Hn(me,r)),t.uuidv4=r=>t.check(Qn(me,r)),t.uuidv6=r=>t.check(er(me,r)),t.uuidv7=r=>t.check(tr(me,r)),t.nanoid=r=>t.check(ir(Cr,r)),t.guid=r=>t.check(Nt(jt,r)),t.cuid=r=>t.check(or(Rr,r)),t.cuid2=r=>t.check(ar(Lr,r)),t.ulid=r=>t.check(ur(Wr,r)),t.base64=r=>t.check(pr(Kr,r)),t.base64url=r=>t.check(gr(Yr,r)),t.xid=r=>t.check(sr(Br,r)),t.ksuid=r=>t.check(cr(Fr,r)),t.ipv4=r=>t.check(lr(Jr,r)),t.ipv6=r=>t.check(dr(Vr,r)),t.cidrv4=r=>t.check(fr(Gr,r)),t.cidrv6=r=>t.check(mr(qr,r)),t.e164=r=>t.check(hr(Xr,r)),t.datetime=r=>t.check(hs(r)),t.date=r=>t.check(vs(r)),t.time=r=>t.check(ys(r)),t.duration=r=>t.check(bs(r))});function A(t){return zu(Jt,t)}const C=c("ZodStringFormat",(t,e)=>{M.init(t,e),Pr.init(t,e)}),Ar=c("ZodEmail",(t,e)=>{_a.init(t,e),C.init(t,e)});function Pf(t){return Xn(Ar,t)}const jt=c("ZodGUID",(t,e)=>{$a.init(t,e),C.init(t,e)});function Af(t){return Nt(jt,t)}const me=c("ZodUUID",(t,e)=>{wa.init(t,e),C.init(t,e)});function Zf(t){return Hn(me,t)}function Mf(t){return Qn(me,t)}function Cf(t){return er(me,t)}function Rf(t){return tr(me,t)}const Zr=c("ZodURL",(t,e)=>{Ia.init(t,e),C.init(t,e)});function Lf(t){return nr(Zr,t)}const Mr=c("ZodEmoji",(t,e)=>{ka.init(t,e),C.init(t,e)});function Wf(t){return rr(Mr,t)}const Cr=c("ZodNanoID",(t,e)=>{Sa.init(t,e),C.init(t,e)});function Bf(t){return ir(Cr,t)}const Rr=c("ZodCUID",(t,e)=>{Oa.init(t,e),C.init(t,e)});function Ff(t){return or(Rr,t)}const Lr=c("ZodCUID2",(t,e)=>{za.init(t,e),C.init(t,e)});function Jf(t){return ar(Lr,t)}const Wr=c("ZodULID",(t,e)=>{xa.init(t,e),C.init(t,e)});function Vf(t){return ur(Wr,t)}const Br=c("ZodXID",(t,e)=>{Na.init(t,e),C.init(t,e)});function Gf(t){return sr(Br,t)}const Fr=c("ZodKSUID",(t,e)=>{Ta.init(t,e),C.init(t,e)});function qf(t){return cr(Fr,t)}const Jr=c("ZodIPv4",(t,e)=>{Pa.init(t,e),C.init(t,e)});function Kf(t){return lr(Jr,t)}const Vr=c("ZodIPv6",(t,e)=>{Aa.init(t,e),C.init(t,e)});function Yf(t){return dr(Vr,t)}const Gr=c("ZodCIDRv4",(t,e)=>{Za.init(t,e),C.init(t,e)});function Xf(t){return fr(Gr,t)}const qr=c("ZodCIDRv6",(t,e)=>{Ma.init(t,e),C.init(t,e)});function Hf(t){return mr(qr,t)}const Kr=c("ZodBase64",(t,e)=>{Ca.init(t,e),C.init(t,e)});function Qf(t){return pr(Kr,t)}const Yr=c("ZodBase64URL",(t,e)=>{La.init(t,e),C.init(t,e)});function em(t){return gr(Yr,t)}const Xr=c("ZodE164",(t,e)=>{Wa.init(t,e),C.init(t,e)});function tm(t){return hr(Xr,t)}const Hr=c("ZodJWT",(t,e)=>{Fa.init(t,e),C.init(t,e)});function nm(t){return vr(Hr,t)}const Ss=c("ZodCustomStringFormat",(t,e)=>{Ja.init(t,e),C.init(t,e)});function rm(t,e,r={}){return fs(Ss,t,e,r)}const Vt=c("ZodNumber",(t,e)=>{Wn.init(t,e),z.init(t,e),t.gt=(i,n)=>t.check(je(i,n)),t.gte=(i,n)=>t.check(ee(i,n)),t.min=(i,n)=>t.check(ee(i,n)),t.lt=(i,n)=>t.check(Te(i,n)),t.lte=(i,n)=>t.check(oe(i,n)),t.max=(i,n)=>t.check(oe(i,n)),t.int=i=>t.check(le(i)),t.safe=i=>t.check(le(i)),t.positive=i=>t.check(je(0,i)),t.nonnegative=i=>t.check(ee(0,i)),t.negative=i=>t.check(Te(0,i)),t.nonpositive=i=>t.check(oe(0,i)),t.multipleOf=(i,n)=>t.check(at(i,n)),t.step=(i,n)=>t.check(at(i,n)),t.finite=()=>t;const r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function x(t){return Du(Vt,t)}const Ge=c("ZodNumberFormat",(t,e)=>{Va.init(t,e),Vt.init(t,e)});function le(t){return Au(Ge,t)}function im(t){return Zu(Ge,t)}function om(t){return Mu(Ge,t)}function am(t){return Cu(Ge,t)}function um(t){return Ru(Ge,t)}const Gt=c("ZodBoolean",(t,e)=>{Bn.init(t,e),z.init(t,e)});function Y(t){return Lu(Gt,t)}const qt=c("ZodBigInt",(t,e)=>{Fn.init(t,e),z.init(t,e),t.gte=(i,n)=>t.check(ee(i,n)),t.min=(i,n)=>t.check(ee(i,n)),t.gt=(i,n)=>t.check(je(i,n)),t.gte=(i,n)=>t.check(ee(i,n)),t.min=(i,n)=>t.check(ee(i,n)),t.lt=(i,n)=>t.check(Te(i,n)),t.lte=(i,n)=>t.check(oe(i,n)),t.max=(i,n)=>t.check(oe(i,n)),t.positive=i=>t.check(je(BigInt(0),i)),t.negative=i=>t.check(Te(BigInt(0),i)),t.nonpositive=i=>t.check(oe(BigInt(0),i)),t.nonnegative=i=>t.check(ee(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(at(i,n));const r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function ge(t){return Bu(qt,t)}const Qr=c("ZodBigIntFormat",(t,e)=>{Ga.init(t,e),qt.init(t,e)});function sm(t){return Ju(Qr,t)}function cm(t){return Vu(Qr,t)}const Os=c("ZodSymbol",(t,e)=>{qa.init(t,e),z.init(t,e)});function zs(t){return Gu(Os,t)}const xs=c("ZodUndefined",(t,e)=>{Ka.init(t,e),z.init(t,e)});function Ns(t){return qu(xs,t)}const Ts=c("ZodNull",(t,e)=>{Ya.init(t,e),z.init(t,e)});function ei(t){return Ku(Ts,t)}const js=c("ZodAny",(t,e)=>{Xa.init(t,e),z.init(t,e)});function lm(){return Yu(js)}const Us=c("ZodUnknown",(t,e)=>{xt.init(t,e),z.init(t,e)});function Je(){return Tt(Us)}const Es=c("ZodNever",(t,e)=>{Ha.init(t,e),z.init(t,e)});function Kt(t){return Xu(Es,t)}const Ds=c("ZodVoid",(t,e)=>{Qa.init(t,e),z.init(t,e)});function dm(t){return Hu(Ds,t)}const ti=c("ZodDate",(t,e)=>{eu.init(t,e),z.init(t,e),t.min=(i,n)=>t.check(ee(i,n)),t.max=(i,n)=>t.check(oe(i,n));const r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function Ps(t){return Qu(ti,t)}const As=c("ZodArray",(t,e)=>{Jn.init(t,e),z.init(t,e),t.element=e.element,t.min=(r,i)=>t.check(Fe(r,i)),t.nonempty=r=>t.check(Fe(1,r)),t.max=(r,i)=>t.check(Bt(r,i)),t.length=(r,i)=>t.check(Ft(r,i)),t.unwrap=()=>t.element});function gt(t,e){return Tr(As,t,e)}function fm(t){const e=t._zod.def.shape;return Fs(Object.keys(e))}const Yt=c("ZodObject",(t,e)=>{tu.init(t,e),z.init(t,e),T(t,"shape",()=>e.shape),t.keyof=()=>J(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Je()}),t.loose=()=>t.clone({...t._zod.def,catchall:Je()}),t.strict=()=>t.clone({...t._zod.def,catchall:Kt()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>lo(t,r),t.merge=r=>fo(t,r),t.pick=r=>so(t,r),t.omit=r=>co(t,r),t.partial=(...r)=>mo(ai,t,r[0]),t.required=(...r)=>po(ui,t,r[0])});function D(t,e){const r={type:"object",get shape(){return Ve(this,"shape",{...t}),this.shape},...p(e)};return new Yt(r)}function mm(t,e){return new Yt({type:"object",get shape(){return Ve(this,"shape",{...t}),this.shape},catchall:Kt(),...p(e)})}function pm(t,e){return new Yt({type:"object",get shape(){return Ve(this,"shape",{...t}),this.shape},catchall:Je(),...p(e)})}const ni=c("ZodUnion",(t,e)=>{Vn.init(t,e),z.init(t,e),t.options=e.options});function L(t,e){return new ni({type:"union",options:t,...p(e)})}const Zs=c("ZodDiscriminatedUnion",(t,e)=>{ni.init(t,e),nu.init(t,e)});function gm(t,e,r){return new Zs({type:"union",options:e,discriminator:t,...p(r)})}const Ms=c("ZodIntersection",(t,e)=>{ru.init(t,e),z.init(t,e)});function Cs(t,e){return new Ms({type:"intersection",left:t,right:e})}const Rs=c("ZodTuple",(t,e)=>{Lt.init(t,e),z.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});function pe(t,e,r){const i=e instanceof k,n=i?r:e,o=i?e:null;return new Rs({type:"tuple",items:t,rest:o,...p(n)})}const ri=c("ZodRecord",(t,e)=>{iu.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function Xt(t,e,r){return new ri({type:"record",keyType:t,valueType:e,...p(r)})}function hm(t,e,r){return new ri({type:"record",keyType:L([t,Kt()]),valueType:e,...p(r)})}const Ls=c("ZodMap",(t,e)=>{ou.init(t,e),z.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function vm(t,e,r){return new Ls({type:"map",keyType:t,valueType:e,...p(r)})}const Ws=c("ZodSet",(t,e)=>{au.init(t,e),z.init(t,e),t.min=(...r)=>t.check(ut(...r)),t.nonempty=r=>t.check(ut(1,r)),t.max=(...r)=>t.check(Wt(...r)),t.size=(...r)=>t.check(yr(...r))});function ym(t,e){return new Ws({type:"set",valueType:t,...p(e)})}const st=c("ZodEnum",(t,e)=>{uu.init(t,e),z.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);const r=new Set(Object.keys(e.entries));t.extract=(i,n)=>{const o={};for(const a of i)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new st({...e,checks:[],...p(n),entries:o})},t.exclude=(i,n)=>{const o={...e.entries};for(const a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new st({...e,checks:[],...p(n),entries:o})}});function J(t,e){const r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new st({type:"enum",entries:r,...p(e)})}function bm(t,e){return new st({type:"enum",entries:t,...p(e)})}const Bs=c("ZodLiteral",(t,e)=>{su.init(t,e),z.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Fs(t,e){return new Bs({type:"literal",values:Array.isArray(t)?t:[t],...p(e)})}const Js=c("ZodFile",(t,e)=>{cu.init(t,e),z.init(t,e),t.min=(r,i)=>t.check(ut(r,i)),t.max=(r,i)=>t.check(Wt(r,i)),t.mime=(r,i)=>t.check(Sr(Array.isArray(r)?r:[r],i))});function $m(t){return ss(Js,t)}const ii=c("ZodTransform",(t,e)=>{Gn.init(t,e),z.init(t,e),t._zod.parse=(r,i)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(We(o,r.value,e));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(We(a))}};const n=e.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function oi(t){return new ii({type:"transform",transform:t})}const ai=c("ZodOptional",(t,e)=>{lu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Ut(t){return new ai({type:"optional",innerType:t})}const Vs=c("ZodNullable",(t,e)=>{du.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Et(t){return new Vs({type:"nullable",innerType:t})}function wm(t){return Ut(Et(t))}const Gs=c("ZodDefault",(t,e)=>{fu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function qs(t,e){return new Gs({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const Ks=c("ZodPrefault",(t,e)=>{mu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Ys(t,e){return new Ks({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}const ui=c("ZodNonOptional",(t,e)=>{pu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Xs(t,e){return new ui({type:"nonoptional",innerType:t,...p(e)})}const Hs=c("ZodSuccess",(t,e)=>{gu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function _m(t){return new Hs({type:"success",innerType:t})}const Qs=c("ZodCatch",(t,e)=>{hu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ec(t,e){return new Qs({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const tc=c("ZodNaN",(t,e)=>{vu.init(t,e),z.init(t,e)});function Im(t){return ts(tc,t)}const si=c("ZodPipe",(t,e)=>{qn.init(t,e),z.init(t,e),t.in=e.in,t.out=e.out});function Dt(t,e){return new si({type:"pipe",in:t,out:e})}const nc=c("ZodReadonly",(t,e)=>{yu.init(t,e),z.init(t,e)});function rc(t){return new nc({type:"readonly",innerType:t})}const ic=c("ZodTemplateLiteral",(t,e)=>{bu.init(t,e),z.init(t,e)});function km(t,e){return new ic({type:"template_literal",parts:t,...p(e)})}const oc=c("ZodLazy",(t,e)=>{wu.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.getter()});function ac(t){return new oc({type:"lazy",getter:t})}const uc=c("ZodPromise",(t,e)=>{$u.init(t,e),z.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Sm(t){return new uc({type:"promise",innerType:t})}const Ht=c("ZodCustom",(t,e)=>{_u.init(t,e),z.init(t,e)});function sc(t){const e=new F({check:"custom"});return e._zod.check=t,e}function ci(t,e){return cs(Ht,t??(()=>!0),e)}function cc(t,e={}){return ls(Ht,t,e)}function lc(t){const e=sc(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(We(i,r.value,e._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),r.issues.push(We(n))}},t(r.value,r)));return e}function W(t,e={error:`Input not instance of ${t.name}`}){const r=new Ht({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...p(e)});return r._zod.bag.Class=t,r}const Om=(...t)=>ds({Pipe:si,Boolean:Gt,String:Jt,Transform:ii},...t);function zm(t){const e=ac(()=>L([A(t),x(),Y(),ei(),gt(e),Xt(A(),e)]));return e}function xm(t,e){return Dt(oi(t),e)}const Nm={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 Tm(t){H({customError:t})}function jm(){return H().customError}function Um(t){return xu(Jt,t)}function Em(t){return Pu(Vt,t)}function Dm(t){return Wu(Gt,t)}function dc(t){return Fu(qt,t)}function Pm(t){return es(ti,t)}const Am=Object.freeze(Object.defineProperty({__proto__:null,bigint:dc,boolean:Dm,date:Pm,number:Em,string:Um},Symbol.toStringTag,{value:"Module"}));H(Iu());const B=Object.freeze(Object.defineProperty({__proto__:null,$brand:eo,$input:Ou,$output:Su,NEVER:Qi,TimePrecision:Nu,ZodAny:js,ZodArray:As,ZodBase64:Kr,ZodBase64URL:Yr,ZodBigInt:qt,ZodBigIntFormat:Qr,ZodBoolean:Gt,ZodCIDRv4:Gr,ZodCIDRv6:qr,ZodCUID:Rr,ZodCUID2:Lr,ZodCatch:Qs,ZodCustom:Ht,ZodCustomStringFormat:Ss,ZodDate:ti,ZodDefault:Gs,ZodDiscriminatedUnion:Zs,ZodE164:Xr,ZodEmail:Ar,ZodEmoji:Mr,ZodEnum:st,ZodError:Df,ZodFile:Js,ZodGUID:jt,ZodIPv4:Jr,ZodIPv6:Vr,ZodISODate:Ur,ZodISODateTime:jr,ZodISODuration:Dr,ZodISOTime:Er,ZodIntersection:Ms,ZodIssueCode:Nm,ZodJWT:Hr,ZodKSUID:Fr,ZodLazy:oc,ZodLiteral:Bs,ZodMap:Ls,ZodNaN:tc,ZodNanoID:Cr,ZodNever:Es,ZodNonOptional:ui,ZodNull:Ts,ZodNullable:Vs,ZodNumber:Vt,ZodNumberFormat:Ge,ZodObject:Yt,ZodOptional:ai,ZodPipe:si,ZodPrefault:Ks,ZodPromise:uc,ZodReadonly:nc,ZodRealError:pt,ZodRecord:ri,ZodSet:Ws,ZodString:Jt,ZodStringFormat:C,ZodSuccess:Hs,ZodSymbol:Os,ZodTemplateLiteral:ic,ZodTransform:ii,ZodTuple:Rs,ZodType:z,ZodULID:Wr,ZodURL:Zr,ZodUUID:me,ZodUndefined:xs,ZodUnion:ni,ZodUnknown:Us,ZodVoid:Ds,ZodXID:Br,_ZodString:Pr,_default:qs,any:lm,array:gt,base64:Qf,base64url:em,bigint:ge,boolean:Y,catch:ec,check:sc,cidrv4:Xf,cidrv6:Hf,clone:fe,coerce:Am,config:H,core:Uf,cuid:Ff,cuid2:Jf,custom:ci,date:Ps,discriminatedUnion:gm,e164:tm,email:Pf,emoji:Wf,endsWith:kr,enum:J,file:$m,flattenError:Un,float32:im,float64:om,formatError:En,function:ps,getErrorMap:jm,globalRegistry:Se,gt:je,gte:ee,guid:Af,includes:_r,instanceof:W,int:le,int32:am,int64:sm,intersection:Cs,ipv4:Kf,ipv6:Yf,iso:Ef,json:zm,jwt:nm,keyof:fm,ksuid:qf,lazy:ac,length:Ft,literal:Fs,locales:ku,looseObject:pm,lowercase:$r,lt:Te,lte:oe,map:vm,maxLength:Bt,maxSize:Wt,mime:Sr,minLength:Fe,minSize:ut,multipleOf:at,nan:Im,nanoid:Bf,nativeEnum:bm,negative:rs,never:Kt,nonnegative:os,nonoptional:Xs,nonpositive:is,normalize:Or,null:ei,nullable:Et,nullish:wm,number:x,object:D,optional:Ut,overwrite:Pe,parse:ws,parseAsync:_s,partialRecord:hm,pipe:Dt,positive:ns,prefault:Ys,preprocess:xm,prettifyError:yo,promise:Sm,property:as,readonly:rc,record:Xt,refine:cc,regex:br,regexes:Ho,registry:Yn,safeParse:Is,safeParseAsync:ks,set:ym,setErrorMap:Tm,size:yr,startsWith:Ir,strictObject:mm,string:A,stringFormat:rm,stringbool:Om,success:_m,superRefine:lc,symbol:zs,templateLiteral:km,toJSONSchema:gs,toLowerCase:xr,toUpperCase:Nr,transform:oi,treeifyError:ho,trim:zr,tuple:pe,uint32:um,uint64:cm,ulid:Vf,undefined:Ns,union:L,unknown:Je,uppercase:wr,url:Lf,uuid:Zf,uuidv4:Mf,uuidv6:Cf,uuidv7:Rf,void:dm,xid:Gf},Symbol.toStringTag,{value:"Module"})),ne=t=>t!=null&&typeof t=="object"&&"value"in t;let qe=class{value;constructor(e){this.value=e}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}};const Zm=t=>t!=null&&typeof t=="object"&&"toString"in t,Mm=(t,e=!1)=>{const r=Zm(t)?"stringer":typeof t;let i;switch(r){case"string":i=(n,o)=>n.localeCompare(o);break;case"stringer":i=(n,o)=>n.toString().localeCompare(o.toString());break;case"number":i=(n,o)=>Number(n)-Number(o);break;case"bigint":i=(n,o)=>BigInt(n)-BigInt(o)>0n?1:-1;break;case"boolean":i=(n,o)=>Number(n)-Number(o);break;case"undefined":i=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return e?Cm(i):i},Cm=t=>(e,r)=>t(r,e),Qt=pe([x(),x()]);pe([ge(),ge()]);const li=D({width:x(),height:x()}),Rm=D({signedWidth:x(),signedHeight:x()}),Lm=["width","height"];J(Lm);const Wm=["start","center","end"],Bm=["signedWidth","signedHeight"];J(Bm);const ct=D({x:x(),y:x()}),fc=D({clientX:x(),clientY:x()}),mc=["x","y"],pc=J(mc),gc=["top","right","bottom","left"];J(gc);const di=["left","right"],hc=J(di),fi=["top","bottom"],vc=J(fi),yc=["center"],Wi=J(yc),Fm=[...gc,...yc],bc=J(Fm);J(Wm);const Jm=["first","last"];J(Jm);const Vm=D({lower:x(),upper:x()}),Gm=D({lower:ge(),upper:ge()});L([Vm,Qt]);L([Gm,Qt]);J([...pc.options,...bc.options]);J(["x","left","right"]);J(["y","top","bottom"]);L([pc,bc,W(String)]);const en=t=>(e,r)=>{if(typeof e=="bigint"){if(qm(r))return t(e,BigInt(r));const i=t(Number(e),Number(r));return typeof i=="number"?BigInt(Math.round(i)):i}return t(Number(e),Number(r))},tn=en((t,e)=>t-e),nn=en((t,e)=>t+e),qm=t=>typeof t=="bigint"?!0:Number.isInteger(t),ce=en((t,e)=>t*e),rn=en((t,e)=>t/e),ze=(t,e,r)=>{const i={};if(typeof e=="object"&&(r=e,e=void 0),r={makeValid:!0,...r},typeof t=="number"||typeof t=="bigint")e!=null?(i.lower=t,i.upper=e):(i.lower=typeof t=="bigint"?0n:0,i.upper=t);else if(Array.isArray(t)){if(t.length!==2)throw new Error("bounds: expected array of length 2");[i.lower,i.upper]=t}else i.lower=t.lower,i.upper=t.upper;return r?.makeValid?Km(i):i},Km=t=>t.lower>t.upper?{lower:t.upper,upper:t.lower}:t,Bi=(t,e)=>{const r=ze(t);return e<r.lower?r.lower:e>=r.upper?r.upper-(typeof r.upper=="number"?1:1n):e},mi=t=>mc.includes(t)?t:fi.includes(t)?"y":"x";D({x:hc.or(Wi),y:vc.or(Wi)});const Ym=D({x:hc,y:vc}),pi=Object.freeze({x:"left",y:"top"}),Xm=Object.freeze({x:"right",y:"top"}),$c=Object.freeze({x:"left",y:"bottom"}),Hm=Object.freeze({x:"right",y:"bottom"}),Qm=Object.freeze({x:"center",y:"top"}),ep=Object.freeze({x:"center",y:"bottom"}),tp=Object.freeze({x:"right",y:"center"}),np=Object.freeze({x:"left",y:"center"}),wc=(t,e)=>t.x===e.x&&t.y===e.y,rp=t=>[t.x,t.y],bn=L([x(),ct,Qt,li,Rm,fc]),E=(t,e)=>{if(typeof t=="string"){if(e===void 0)throw new Error("The y coordinate must be given.");return t==="x"?{x:e,y:0}:{x:0,y:e}}return typeof t=="number"?{x:t,y:e??t}:Array.isArray(t)?{x:t[0],y:t[1]}:"signedWidth"in t?{x:t.signedWidth,y:t.signedHeight}:"clientX"in t?{x:t.clientX,y:t.clientY}:"width"in t?{x:t.width,y:t.height}:{x:t.x,y:t.y}},de=Object.freeze({x:0,y:0}),_c=Object.freeze({x:1,y:1}),ip=Object.freeze({x:1/0,y:1/0}),op=Object.freeze({x:NaN,y:NaN}),Pt=(t,e,r=0)=>{const i=E(t),n=E(e);return r===0?i.x===n.x&&i.y===n.y:Math.abs(i.x-n.x)<=r&&Math.abs(i.y-n.y)<=r},ap=t=>Pt(t,de),gi=(t,e,r)=>{const i=E(t),n=E(e,r);return{x:i.x*n.x,y:i.y*n.y}},Ic=(t,e)=>{const r=E(t);return{x:r.x+e,y:r.y}},kc=(t,e)=>{const r=E(t);return{x:r.x,y:r.y+e}},lt=(t,e,r,...i)=>{if(typeof e=="string"){if(typeof r!="number")throw new Error("The value must be a number.");return e==="x"?Ic(t,r):kc(t,r)}if(typeof e=="object"&&"x"in e&&typeof e.x=="string"){const n=E(r),o=E(t);return e.x==="left"?n.x=-n.x:e.x==="center"&&(n.x=0),e.y==="top"?n.y=-n.y:e.y==="center"&&(n.y=0),{x:o.x+n.x,y:o.y+n.y}}return[t,e,r??de,...i].reduce((n,o)=>{const a=E(o);return{x:n.x+a.x,y:n.y+a.y}},de)},up=(t,e,r)=>{const i=E(t);return e==="x"?{x:r,y:i.y}:{x:i.x,y:r}},sp=(t,e)=>{const r=E(t),i=E(e);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)},cp=(t,e)=>{const r=E(t),i=E(e);return{x:i.x-r.x,y:i.y-r.y}},lp=t=>{const e=E(t);return Number.isNaN(e.x)||Number.isNaN(e.y)},dp=t=>{const e=E(t);return Number.isFinite(e.x)&&Number.isFinite(e.y)},fp=t=>{const e=E(t);return[e.x,e.y]},mp=t=>{const e=E(t);return{left:e.x,top:e.y}},$n=(t,e=0)=>{const r=E(t);return{x:Number(r.x.toFixed(e)),y:Number(r.y.toFixed(e))}},Qe=(t,e)=>{const r=E(t),i=E(e);return{x:r.x-i.x,y:r.y-i.y}},et=t=>{const e=E(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:-e.y/r,y:e.x/r}},Sc=t=>{const e=E(t),r=Math.hypot(e.x,e.y);return r===0?{x:0,y:0}:{x:e.x/r,y:e.y/r}},Oc=(...t)=>{const e=t.reduce((r,i)=>lt(r,i),de);return gi(e,1/t.length)},pp=(t,e)=>{const r=[];for(let i=0;i<t.length;i++){const n=t[i];let o,a,u,s;if(i===0){const l=t[i+1],m=Qe(l,n);a=et(m),u=a,s=e}else if(i===t.length-1){const l=t[i-1],m=Qe(n,l);o=et(m),u=o,s=e}else{const l=t[i-1],m=t[i+1],d=Qe(n,l),h=Qe(m,n);o=et(d),a=et(h);const y=Math.acos((d.x*h.x+d.y*h.y)/(Math.hypot(d.x,d.y)*Math.hypot(h.x,h.y))),f=Math.sin(y/2);f===0?s=e:s=e/f,u=Sc(Oc(o,a))}r.push(gi(u,s))}return r},gp=t=>{const e=E(t);return{x:e.y,y:e.x}},wn=t=>{const e=E(t);return{x:Math.round(e.x),y:Math.round(e.y)}},At=Object.freeze(Object.defineProperty({__proto__:null,INFINITY:ip,NAN:op,ONE:_c,ZERO:de,average:Oc,calculateMiters:pp,clientXY:fc,construct:E,couple:fp,crudeZ:bn,css:mp,distance:sp,equals:Pt,isFinite:dp,isNan:lp,isZero:ap,normal:et,normalize:Sc,round:wn,scale:gi,set:up,sub:Qe,swap:gp,translate:lt,translateX:Ic,translateY:kc,translation:cp,truncate:$n,xy:ct},Symbol.toStringTag,{value:"Module"})),bt=L([x(),A()]),hp=D({top:bt,left:bt,width:bt,height:bt}),vp=D({left:x(),top:x(),right:x(),bottom:x()}),yp=D({one:ct,two:ct,root:Ym}),zc={one:de,two:de,root:pi},bp={one:de,two:_c,root:$c},xc=(t,e)=>({one:t.one,two:t.two,root:e??t.root}),Z=(t,e,r=0,i=0,n)=>{const o={one:{...de},two:{...de},root:n??pi};if(typeof t=="number"){if(typeof e!="number")throw new Error("Box constructor called with invalid arguments");return o.one={x:t,y:e},o.two={x:o.one.x+r,y:o.one.y+i},o}return"one"in t&&"two"in t&&"root"in t?{...t,root:n??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(o.one={x:t.left,y:t.top},o.two={x:t.right,y:t.bottom},o):(o.one=t,e==null?o.two={x:o.one.x+r,y:o.one.y+i}:typeof e=="number"?o.two={x:o.one.x+e,y:o.one.y+r}:"width"in e?o.two={x:o.one.x+e.width,y:o.one.y+e.height}:"signedWidth"in e?o.two={x:o.one.x+e.signedWidth,y:o.one.y+e.signedHeight}:o.two=e,o))},$p=(t,e,r)=>{const i=Z(t);if(typeof e=="string"){if(r==null)throw new Error("Invalid arguments for resize");const n=mi(e);return Z(i.one,void 0,n==="x"?r:we(i),n==="y"?r:_e(i),i.root)}return Z(i.one,e,void 0,void 0,i.root)},wp=(t,e,r=!0)=>{const i=Z(t);let n=(o,a)=>o<a;return r&&(n=(o,a)=>o<=a),"one"in e?n(be(i),be(e))&&n(xe(e),xe(i))&&n($e(i),$e(e))&&n(Ne(e),Ne(i)):n(be(i),e.x)&&n(e.x,xe(i))&&n($e(i),e.y)&&n(e.y,Ne(i))},_p=(t,e)=>Pt(t.one,e.one)&&Pt(t.two,e.two)&&wc(t.root,e.root),Nc=t=>({width:we(t),height:_e(t)}),Ip=t=>({signedWidth:on(t),signedHeight:an(t)}),kp=t=>({top:$e(t),left:be(t),width:we(t),height:_e(t)}),hi=(t,e,r=!1)=>{const i=mi(e)==="y"?an(t):on(t);return r?i:Math.abs(i)},he=(t,e)=>{const r=Z(t);return{x:e.x==="center"?_n(r).x:Ue(r,e.x),y:e.y==="center"?_n(r).y:Ue(r,e.y)}},Ue=(t,e)=>{const r=Z(t),i=rp(r.root).includes(e)?Math.min:Math.max;return di.includes(e)?i(r.one.x,r.two.x):i(r.one.y,r.two.y)},Sp=t=>t.one.x===t.two.x&&t.one.y===t.two.y,we=t=>hi(t,"x"),_e=t=>hi(t,"y"),on=t=>{const e=Z(t);return e.two.x-e.one.x},an=t=>{const e=Z(t);return e.two.y-e.one.y},Tc=t=>he(t,pi),Op=t=>he(t,Qm),zp=t=>he(t,Xm),xp=t=>he(t,$c),Np=t=>he(t,ep),Tp=t=>he(t,Hm),jp=t=>he(t,np),Up=t=>he(t,tp),xe=t=>Ue(t,"right"),Ne=t=>Ue(t,"bottom"),be=t=>Ue(t,"left"),$e=t=>Ue(t,"top"),_n=t=>lt(Tc(t),{x:on(t)/2,y:an(t)/2}),vi=t=>{const e=Z(t);return e.root.x==="left"?be(e):xe(e)},yi=t=>{const e=Z(t);return e.root.y==="top"?$e(e):Ne(e)},Ep=t=>({x:vi(t),y:yi(t)}),wt=t=>{const e=Z(t);return{lower:e.one.x,upper:e.two.x}},_t=t=>{const e=Z(t);return{lower:e.one.y,upper:e.two.y}},Dp=(t,e)=>xc(t,e),Pp=(t,e)=>{const r=Z(t),i=di.includes(e)?"x":fi.includes(e)?"y":null;if(i===null)throw new Error(`Invalid location: ${e}`);const n=e==="top"||e==="left"?Math.min:Math.max,o={...r.one},a={...r.two};return o[i]=n(r.one[i],r.two[i]),a[i]=n(r.one[i],r.two[i]),[o,a]},Ap=(t,e)=>{const r=Z(t),i=Z(e),n=vi(i)+(we(i)-we(r))/2,o=yi(i)+(_e(i)-_e(r))/2;return Z({x:n,y:o},Nc(r))},jc=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,Zp=t=>we(t)/_e(t),Mp=(t,e,r)=>{if(typeof e=="string"){if(r==null)throw new Error("Undefined amount passed into box.translate");const n=mi(e);e=E(n,r)}const i=Z(t);return Z(lt(i.one,e),lt(i.two,e),void 0,void 0,i.root)},Cp=(t,e)=>{const r=Math.max(be(t),be(e)),i=Math.max($e(t),$e(e)),n=Math.min(xe(t),xe(e)),o=Math.min(Ne(t),Ne(e));return r>n||i>o?zc:Z({x:r,y:i},{x:n,y:o},void 0,void 0,t.root)},Rp=t=>we(t)*_e(t),Lp=(t,e)=>{const r=Z(t);return Z($n(r.one,e),$n(r.two,e),void 0,void 0,r.root)},Wp=(t,e,r,i,n,o)=>{const a={x:t,y:e},u={x:t+r,y:e+i};return n.x!==o.x&&(n.x==="center"?(a.x-=r/2,u.x-=r/2):(a.x-=r,u.x-=r)),n.y!==o.y&&(n.y==="center"?(a.y-=i/2,u.y-=i/2):(a.y-=i,u.y-=i)),Z(a,u,void 0,void 0,o)},Bp=t=>{const e=Z(t);return Z(wn(e.one),wn(e.two),void 0,void 0,e.root)},tt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:bp,ZERO:zc,area:Rp,areaIsZero:Sp,aspect:Zp,bottom:Ne,bottomCenter:Np,bottomLeft:xp,bottomRight:Tp,box:yp,center:_n,centerLeft:jp,centerRight:Up,construct:Z,constructWithAlternateRoot:Wp,contains:wp,copy:xc,css:kp,cssBox:hp,dim:hi,dims:Nc,domRect:vp,edgePoints:Pp,equals:_p,height:_e,intersection:Cp,isBox:jc,left:be,loc:Ue,positionInCenter:Ap,reRoot:Dp,resize:$p,right:xe,root:Ep,round:Bp,signedDims:Ip,signedHeight:an,signedWidth:on,top:$e,topCenter:Op,topLeft:Tc,topRight:zp,translate:Mp,truncate:Lp,width:we,x:vi,xBounds:wt,xyLoc:he,y:yi,yBounds:_t},Symbol.toStringTag,{value:"Module"})),Uc=D({signedWidth:x(),signedHeight:x()}),Fp=L([li,Uc,ct,Qt]),Jp={width:0,height:0},Vp={width:1,height:1},ue=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},Gp=(t,e)=>{if(e==null)return!1;const r=ue(t),i=ue(e);return r.width===i.width&&r.height===i.height},qp=t=>{const e=ue(t);return{width:e.height,height:e.width}},Kp=t=>{const e=ue(t);return`0 0 ${e.width} ${e.height}`},Yp=t=>{const e=ue(t);return[e.width,e.height]},Xp=t=>({width:Math.max(...t.map(e=>ue(e).width)),height:Math.max(...t.map(e=>ue(e).height))}),Hp=t=>({width:Math.min(...t.map(e=>ue(e).width)),height:Math.min(...t.map(e=>ue(e).height))}),Qp=(t,e)=>{const r=ue(t);return{width:r.width*e,height:r.height*e}},It=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:Vp,ZERO:Jp,construct:ue,couple:Yp,crude:Fp,dimensions:li,equals:Gp,max:Xp,min:Hp,scale:Qp,signed:Uc,svgViewBox:Kp,swap:qp},Symbol.toStringTag,{value:"Module"})),eg=(t,e,r)=>e!==void 0&&t<e?e:r!==void 0&&t>r?r:t;D({offset:bn,scale:bn});D({offset:x(),scale:x()});const tg=t=>(e,r,i,n)=>r==="dimension"?[e,i]:[e,n?i-t:i+t],ng=t=>(e,r,i,n)=>[e,n?i/t:i*t],rg=t=>(e,r,i)=>{if(e===null)return[t,i];const{lower:n,upper:o}=e,{lower:a,upper:u}=t,s=o-n,l=u-a;if(r==="dimension")return[t,i*(l/s)];const m=(i-n)*(l/s)+a;return[t,m]},ig=t=>(e,r,i)=>[t,i],og=()=>(t,e,r)=>{if(t===null)throw new Error("cannot invert without bounds");if(e==="dimension")return[t,r];const{lower:i,upper:n}=t;return[t,n-(r-i)]},ag=t=>(e,r,i)=>{const{lower:n,upper:o}=t;return i=eg(i,n,o),[e,i]};let Fi=class Ze{ops=[];currBounds=null;currType=null;reversed=!1;constructor(){this.ops=[]}static translate(e){return new Ze().translate(e)}static magnify(e){return new Ze().magnify(e)}static scale(e,r){return new Ze().scale(e,r)}translate(e){const r=this.new(),i=tg(e);return i.type="translate",r.ops.push(i),r}magnify(e){const r=this.new(),i=ng(e);return i.type="magnify",r.ops.push(i),r}scale(e,r){const i=ze(e,r),n=this.new(),o=rg(i);return o.type="scale",n.ops.push(o),n}clamp(e,r){const i=ze(e,r),n=this.new(),o=ag(i);return o.type="clamp",n.ops.push(o),n}reBound(e,r){const i=ze(e,r),n=this.new(),o=ig(i);return o.type="re-bound",n.ops.push(o),n}invert(){const e=og();e.type="invert";const r=this.new();return r.ops.push(e),r}pos(e){return this.exec("position",e)}dim(e){return this.exec("dimension",e)}new(){const e=new Ze;return e.ops=this.ops.slice(),e.reversed=this.reversed,e}exec(e,r){return this.currBounds=null,this.ops.reduce(([i,n],o)=>o(i,e,n,this.reversed),[null,r])[1]}reverse(){const e=this.new();e.ops.reverse();const r=[];return e.ops.forEach((i,n)=>{if(i.type==="scale"||r.some(([a,u])=>n>=a&&n<=u))return;const o=e.ops.findIndex((a,u)=>a.type==="scale"&&u>n);o!==-1&&r.push([n,o])}),r.forEach(([i,n])=>{const o=e.ops.slice(i,n);o.unshift(e.ops[n]),e.ops.splice(i,n-i+1,...o)}),e.reversed=!e.reversed,e}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}static IDENTITY=new Ze},hv=class se{x;y;currRoot;constructor(e=new Fi,r=new Fi,i=null){this.x=e,this.y=r,this.currRoot=i}static translate(e,r){return new se().translate(e,r)}static translateX(e){return new se().translateX(e)}static translateY(e){return new se().translateY(e)}static clamp(e){return new se().clamp(e)}static magnify(e){return new se().magnify(e)}static scale(e){return new se().scale(e)}static reBound(e){return new se().reBound(e)}translate(e,r){const i=E(e,r),n=this.copy();return n.x=this.x.translate(i.x),n.y=this.y.translate(i.y),n}translateX(e){const r=this.copy();return r.x=this.x.translate(e),r}translateY(e){const r=this.copy();return r.y=this.y.translate(e),r}magnify(e){const r=this.copy();return r.x=this.x.magnify(e.x),r.y=this.y.magnify(e.y),r}scale(e){const r=this.copy();if(jc(e)){const i=this.currRoot;return r.currRoot=e.root,i!=null&&!wc(i,e.root)&&(i.x!==e.root.x&&(r.x=r.x.invert()),i.y!==e.root.y&&(r.y=r.y.invert())),r.x=r.x.scale(wt(e)),r.y=r.y.scale(_t(e)),r}return r.x=r.x.scale(e.width),r.y=r.y.scale(e.height),r}reBound(e){const r=this.copy();return r.x=this.x.reBound(wt(e)),r.y=this.y.reBound(_t(e)),r}clamp(e){const r=this.copy();return r.x=this.x.clamp(wt(e)),r.y=this.y.clamp(_t(e)),r}copy(){const e=new se;return e.currRoot=this.currRoot,e.x=this.x,e.y=this.y,e}reverse(){const e=this.copy();return e.x=this.x.reverse(),e.y=this.y.reverse(),e}pos(e){return{x:this.x.pos(e.x),y:this.y.pos(e.y)}}dim(e){return{x:this.x.dim(e.x),y:this.y.dim(e.y)}}box(e){return Z(this.pos(e.one),this.pos(e.two),0,0,this.currRoot??e.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}static IDENTITY=new se},Ec=(t,e=21)=>(r=e)=>{let i="",n=r|0;for(;n--;)i+=t[Math.random()*t.length|0];return i};const Dc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ug=`0123456789${Dc}`,Pc=11,sg=Ec(Dc,1),cg=Ec(ug,Pc-1),Ac=()=>`${sg()}${cg()}`,In=Object.freeze(Object.defineProperty({__proto__:null,LENGTH:Pc,create:Ac},Symbol.toStringTag,{value:"Module"})),lg=(t,e)=>r=>r instanceof e||typeof r=="object"&&r!==null&&"discriminator"in r&&r.discriminator===t,dg=J(["static","dynamic"]),fg=L([pe([le()]),pe([le(),le().min(1).max(12)]),pe([le(),le().min(1).max(12),le().min(1).max(31)])]),Zc=(t,e)=>{const r=new g(e);if(![U.DAY,U.HOUR,U.MINUTE,U.SECOND,U.MILLISECOND,U.MICROSECOND,U.NANOSECOND].some(n=>n.equals(r)))throw new Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");const i=t.valueOf()%r.valueOf();return t instanceof g?new g(i):new U(i)};class g extends qe{constructor(e,r="UTC"){if(e==null)super(g.now().valueOf());else if(e instanceof Date)super(BigInt(e.getTime())*g.MILLISECOND.valueOf());else if(typeof e=="string")super(g.parseDateTimeString(e,r).valueOf());else if(Array.isArray(e))super(g.parseDate(e));else{let i=0n;e instanceof Number&&(e=e.valueOf()),r==="local"&&(i=g.utcOffset.valueOf()),typeof e=="number"&&(isFinite(e)?e=Math.trunc(e):(isNaN(e)&&(e=0),e===1/0?e=g.MAX:e=g.MIN)),ne(e)&&(e=e.value),super(BigInt(e.valueOf())+i)}}static parseDate([e=1970,r=1,i=1]){const n=new Date(e,r-1,i,0,0,0,0);return new g(BigInt(n.getTime())*g.MILLISECOND.valueOf()).truncate(g.DAY).valueOf()}valueOf(){return this.value}static parseTimeString(e,r="UTC"){const[i,n,o]=e.split(":");let a="00",u="00";o!=null&&([a,u]=o.split("."));let s=g.hours(parseInt(i??"00")).add(g.minutes(parseInt(n??"00"))).add(g.seconds(parseInt(a??"00"))).add(g.milliseconds(parseInt(u??"00")));return r==="local"&&(s=s.add(g.utcOffset)),s.valueOf()}static parseDateTimeString(e,r="UTC"){if(!e.includes("/")&&!e.includes("-"))return g.parseTimeString(e,r);const i=new Date(e);return e.includes(":")||i.setUTCHours(0,0,0,0),new g(BigInt(i.getTime())*g.MILLISECOND.valueOf(),r).valueOf()}fString(e="ISO",r="UTC"){switch(e){case"ISODate":return this.toISOString(r).slice(0,10);case"ISOTime":return this.toISOString(r).slice(11,23);case"time":return this.timeString(!1,r);case"preciseTime":return this.timeString(!0,r);case"date":return this.dateString();case"preciseDate":return`${this.dateString()} ${this.timeString(!0,r)}`;case"dateTime":return`${this.dateString()} ${this.timeString(!1,r)}`;default:return this.toISOString(r)}}toISOString(e="UTC"){return e==="UTC"?this.date().toISOString():this.sub(g.utcOffset).date().toISOString()}timeString(e=!1,r="UTC"){const i=this.toISOString(r);return e?i.slice(11,23):i.slice(11,19)}dateString(){const e=this.date(),r=e.toLocaleString("default",{month:"short"}),i=e.toLocaleString("default",{day:"numeric"});return`${r} ${i}`}static get utcOffset(){return new U(BigInt(new Date().getTimezoneOffset())*g.MINUTE.valueOf())}static since(e){return new g().span(e)}date(){return new Date(this.milliseconds)}equals(e){return this.valueOf()===new g(e).valueOf()}span(e){return this.range(e).span}range(e){return new nt(this,e).makeValid()}spanRange(e){return this.range(this.add(e)).makeValid()}get isZero(){return this.valueOf()===0n}after(e){return this.valueOf()>new g(e).valueOf()}afterEq(e){return this.valueOf()>=new g(e).valueOf()}before(e){return this.valueOf()<new g(e).valueOf()}beforeEq(e){return this.valueOf()<=new g(e).valueOf()}add(e){return new g(nn(this.valueOf(),new U(e).valueOf()))}sub(e){return new g(tn(this.valueOf(),new U(e).valueOf()))}get hours(){return Number(this.valueOf())/Number(U.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(U.MINUTE.valueOf())}get days(){return Number(this.valueOf())/Number(U.DAY.valueOf())}get seconds(){return Number(this.valueOf())/Number(U.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(g.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(g.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get year(){return this.date().getUTCFullYear()}setYear(e){const r=this.date();return r.setUTCFullYear(e),new g(r)}get month(){return this.date().getUTCMonth()}setMonth(e){const r=this.date();return r.setUTCMonth(e),new g(r)}get day(){return this.date().getUTCDate()}setDay(e){const r=this.date();return r.setUTCDate(e),new g(r)}get hour(){return this.date().getUTCHours()}get localHour(){return this.date().getHours()}setLocalHour(e){const r=this.date();return r.setHours(e),new g(r)}setHour(e){const r=this.date();return r.setUTCHours(e),new g(r)}get minute(){return this.date().getUTCMinutes()}setMinute(e){const r=this.date();return r.setUTCMinutes(e),new g(r)}get second(){return this.date().getUTCSeconds()}setSecond(e){const r=this.date();return r.setUTCSeconds(e),new g(r)}get millisecond(){return this.date().getUTCMilliseconds()}setMillisecond(e){const r=this.date();return r.setUTCMilliseconds(e),new g(r)}toString(){return this.date().toISOString()}remainder(e){return Zc(this,e)}get isToday(){return this.truncate(U.DAY).equals(g.now().truncate(U.DAY))}truncate(e){return this.sub(this.remainder(e))}static now(){return new g(new Date)}static max(...e){let r=g.MIN;for(const i of e){const n=new g(i);n.after(r)&&(r=n)}return r}static min(...e){let r=g.MAX;for(const i of e){const n=new g(i);n.before(r)&&(r=n)}return r}static nanoseconds(e,r="UTC"){return new g(e,r)}static NANOSECOND=g.nanoseconds(1);static microseconds(e,r="UTC"){return g.nanoseconds(e*1e3,r)}static MICROSECOND=g.microseconds(1);static milliseconds(e,r="UTC"){return g.microseconds(e*1e3,r)}static MILLISECOND=g.milliseconds(1);static seconds(e,r="UTC"){return g.milliseconds(e*1e3,r)}static SECOND=g.seconds(1);static minutes(e,r="UTC"){return g.seconds(e*60,r)}static MINUTE=g.minutes(1);static hours(e,r="UTC"){return g.minutes(e*60,r)}static HOUR=g.hours(1);static days(e,r="UTC"){return g.hours(e*24,r)}static DAY=g.days(1);static MAX=new g((1n<<63n)-1n);static MIN=new g(0);static ZERO=new g(0);static z=L([W(g),D({value:ge()}).transform(e=>new g(e.value)),A().transform(e=>new g(BigInt(e))),x().transform(e=>new g(e)),ge().transform(e=>new g(e)),Ps().transform(e=>new g(e)),ci(e=>e instanceof U).transform(e=>new g(e)),fg.transform(e=>new g(e))]);static sort(e,r){return Number(e.valueOf()-r.valueOf())}}let U=class _ extends qe{constructor(e){typeof e=="number"&&(e=Math.trunc(e.valueOf())),ne(e)&&(e=e.value),super(BigInt(e.valueOf()))}static fromSeconds(e){return e instanceof _?e:e instanceof X?e.period:e instanceof g?new _(e):(ne(e)&&(e=e.value),["number","bigint"].includes(typeof e)?_.seconds(e):new _(e))}static fromMilliseconds(e){return e instanceof _?e:e instanceof X?e.period:e instanceof g?new _(e):(ne(e)&&(e=e.value),["number","bigint"].includes(typeof e)?_.milliseconds(e):new _(e))}valueOf(){return this.value}lessThan(e){return this.valueOf()<new _(e).valueOf()}greaterThan(e){return this.valueOf()>new _(e).valueOf()}lessThanOrEqual(e){return this.valueOf()<=new _(e).valueOf()}greaterThanOrEqual(e){return this.valueOf()>=new _(e).valueOf()}remainder(e){return Zc(this,e)}truncate(e){return new _(BigInt(Math.trunc(Number(this.valueOf()/e.valueOf())))*e.valueOf())}toString(){const e=this.truncate(_.DAY),r=this.truncate(_.HOUR),i=this.truncate(_.MINUTE),n=this.truncate(_.SECOND),o=this.truncate(_.MILLISECOND),a=this.truncate(_.MICROSECOND),u=this.truncate(_.NANOSECOND),s=e,l=r.sub(e),m=i.sub(r),d=n.sub(i),h=o.sub(n),y=a.sub(o),f=u.sub(a);let $="";return s.isZero||($+=`${s.days}d `),l.isZero||($+=`${l.hours}h `),m.isZero||($+=`${m.minutes}m `),d.isZero||($+=`${d.seconds}s `),h.isZero||($+=`${h.milliseconds}ms `),y.isZero||($+=`${y.microseconds}µs `),f.isZero||($+=`${f.nanoseconds}ns`),$.trim()}mult(e){return new _(ce(this.valueOf(),e))}div(e){return new _(rn(this.valueOf(),e))}get days(){return Number(this.valueOf())/Number(_.DAY.valueOf())}get hours(){return Number(this.valueOf())/Number(_.HOUR.valueOf())}get minutes(){return Number(this.valueOf())/Number(_.MINUTE.valueOf())}get seconds(){return Number(this.valueOf())/Number(_.SECOND.valueOf())}get milliseconds(){return Number(this.valueOf())/Number(_.MILLISECOND.valueOf())}get microseconds(){return Number(this.valueOf())/Number(_.MICROSECOND.valueOf())}get nanoseconds(){return Number(this.valueOf())}get isZero(){return this.valueOf()===0n}equals(e){return this.valueOf()===new _(e).valueOf()}add(e){return new _(this.valueOf()+new _(e).valueOf())}sub(e){return new _(this.valueOf()-new _(e).valueOf())}static nanoseconds(e=1){return new _(e)}static NANOSECOND=_.nanoseconds(1);static microseconds(e=1){return _.nanoseconds(ce(e,1e3))}static MICROSECOND=_.microseconds(1);static milliseconds(e=1){return _.microseconds(ce(e,1e3))}static MILLISECOND=_.milliseconds(1);static seconds(e=1){return _.milliseconds(ce(e,1e3))}static SECOND=_.seconds(1);static minutes(e=1){return _.seconds(ce(e,60))}static MINUTE=_.minutes(1);static hours(e){return _.minutes(ce(e,60))}static HOUR=_.hours(1);static days(e){return _.hours(ce(e,24))}static DAY=_.days(1);static MAX=new _((1n<<63n)-1n);static MIN=new _(0);static ZERO=new _(0);static z=L([D({value:ge()}).transform(e=>new _(e.value)),A().transform(e=>new _(BigInt(e))),x().transform(e=>new _(e)),ge().transform(e=>new _(e)),W(_),W(g).transform(e=>new _(e)),ci(e=>e instanceof X).transform(e=>new _(e))])};class X extends qe{constructor(e){ne(e)&&(e=e.value),super(e.valueOf())}toString(){return`${this.valueOf()} Hz`}equals(e){return this.valueOf()===new X(e).valueOf()}get period(){return U.seconds(1/this.valueOf())}sampleCount(e){return new U(e).seconds*this.valueOf()}byteCount(e,r){return this.sampleCount(e)*new q(r).valueOf()}span(e){return U.seconds(e/this.valueOf())}byteSpan(e,r){return this.span(e.valueOf()/new q(r).valueOf())}add(e){return new X(nn(this.valueOf(),new X(e).valueOf()))}sub(e){return new X(tn(this.valueOf(),new X(e).valueOf()))}mult(e){return new X(ce(this.valueOf(),e))}div(e){return new X(rn(this.valueOf(),e))}static hz(e){return new X(e)}static khz(e){return X.hz(e*1e3)}static z=L([x().transform(e=>new X(e)),W(X)])}let q=class K extends qe{constructor(e){ne(e)&&(e=e.value),super(e.valueOf())}length(e){return e.valueOf()/this.valueOf()}size(e){return new kn(e*this.valueOf())}add(e){return new K(nn(this.valueOf(),new K(e).valueOf()))}sub(e){return new K(tn(this.valueOf(),new K(e).valueOf()))}mult(e){return new K(ce(this.valueOf(),e))}div(e){return new K(rn(this.valueOf(),e))}static UNKNOWN=new K(0);static BIT128=new K(16);static BIT64=new K(8);static BIT32=new K(4);static BIT16=new K(2);static BIT8=new K(1);static z=L([x().transform(e=>new K(e)),W(K)])},nt=class ie{start;end;constructor(e,r){typeof e=="object"&&"start"in e?(this.start=new g(e.start),this.end=new g(e.end)):(this.start=new g(e),this.end=new g(r))}get span(){return new U(this.end.valueOf()-this.start.valueOf())}get isValid(){return this.start.valueOf()<=this.end.valueOf()}makeValid(){return this.isValid?this:this.swap()}get isZero(){return this.span.isZero}get numeric(){return{start:Number(this.start.valueOf()),end:Number(this.end.valueOf())}}swap(){return new ie(this.end,this.start)}get numericBounds(){return{lower:Number(this.start.valueOf()),upper:Number(this.end.valueOf())}}equals(e,r=U.ZERO){if(r.isZero)return this.start.equals(e.start)&&this.end.equals(e.end);let i=this.start.sub(e.start).valueOf(),n=this.end.sub(e.end).valueOf();return i<0&&(i=-i),n<0&&(n=-n),i<=r.valueOf()&&n<=r.valueOf()}toString(){return`${this.start.toString()} - ${this.end.toString()}`}toPrettyString(){return`${this.start.fString("preciseDate")} - ${this.span.toString()}`}overlapsWith(e,r=U.ZERO){e=e.makeValid();const i=this.makeValid();if(this.equals(e))return!0;if(e.end.equals(i.start)||i.end.equals(e.start))return!1;const n=g.max(i.start,e.start),o=g.min(i.end,e.end);return o.before(n)?!1:new U(o.sub(n)).greaterThanOrEqual(r)}contains(e){return e instanceof ie?this.contains(e.start)&&this.contains(e.end):this.start.beforeEq(e)&&this.end.after(e)}boundBy(e){const r=new ie(this.start,this.end);return e.start.after(this.start)&&(r.start=e.start),e.start.after(this.end)&&(r.end=e.start),e.end.before(this.end)&&(r.end=e.end),e.end.before(this.start)&&(r.start=e.end),r}static max(...e){return new ie(g.min(...e.map(r=>r.start)),g.max(...e.map(r=>r.end)))}static MAX=new ie(g.MIN,g.MAX);static MIN=new ie(g.MAX,g.MIN);static ZERO=new ie(g.ZERO,g.ZERO);static z=L([D({start:g.z,end:g.z}).transform(e=>new ie(e.start,e.end)),W(ie)]);static sort(e,r){return g.sort(e.start,r.start)||g.sort(e.end,r.end)}static simplify(e){return e.map(r=>r.makeValid()).sort((r,i)=>ie.sort(r,i)).reduce((r,i)=>{if(i.isZero)return r;if(r.length===0)return r.push(i),r;const n=r[r.length-1];return n.overlapsWith(i)||n.end.equals(i.start)?n.end=g.max(n.end,i.end):r.push(i),r},[])}},R=class v extends qe{constructor(e){if(ne(e)&&(e=e.value),e instanceof v||typeof e=="string"||typeof e.valueOf()=="string")super(e.valueOf());else{const r=v.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);if(r==null)throw new Error(`unable to find data type for ${e.toString()}`);super(r.valueOf())}}get Array(){const e=v.ARRAY_CONSTRUCTORS.get(this.toString());if(e==null)throw new Error(`unable to find array constructor for ${this.valueOf()}`);return e}equals(e){return this.valueOf()===e.valueOf()}matches(...e){return e.some(r=>this.equals(r))}toString(){return this.valueOf()}get isVariable(){return this.equals(v.JSON)||this.equals(v.STRING)}get isNumeric(){return!this.isVariable&&!this.equals(v.UUID)}get isInteger(){const e=this.toString();return e.startsWith("int")||e.startsWith("uint")}get isFloat(){return this.toString().startsWith("float")}get density(){const e=v.DENSITIES.get(this.toString());if(e==null)throw new Error(`unable to find density for ${this.valueOf()}`);return e}get isUnsignedInteger(){return this.equals(v.UINT8)||this.equals(v.UINT16)||this.equals(v.UINT32)||this.equals(v.UINT64)}get isSignedInteger(){return this.equals(v.INT8)||this.equals(v.INT16)||this.equals(v.INT32)||this.equals(v.INT64)}canSafelyCastTo(e){return this.equals(e)?!0:!this.isNumeric||!e.isNumeric||this.isVariable||e.isVariable||this.isUnsignedInteger&&e.isSignedInteger?!1:this.isFloat?e.isFloat&&this.density.valueOf()<=e.density.valueOf():this.equals(v.INT32)&&e.equals(v.FLOAT64)||this.equals(v.INT8)&&e.equals(v.FLOAT32)?!0:this.isInteger&&e.isInteger?this.density.valueOf()<=e.density.valueOf()&&this.isUnsignedInteger===e.isUnsignedInteger:!1}canCastTo(e){return this.isNumeric&&e.isNumeric?!0:this.equals(e)}checkArray(e){return e.constructor===this.Array}get usesBigInt(){return v.BIG_INT_TYPES.some(e=>e.equals(this))}static UNKNOWN=new v("unknown");static FLOAT64=new v("float64");static FLOAT32=new v("float32");static INT64=new v("int64");static INT32=new v("int32");static INT16=new v("int16");static INT8=new v("int8");static UINT64=new v("uint64");static UINT32=new v("uint32");static UINT16=new v("uint16");static UINT8=new v("uint8");static BOOLEAN=this.UINT8;static TIMESTAMP=new v("timestamp");static UUID=new v("uuid");static STRING=new v("string");static JSON=new v("json");static ARRAY_CONSTRUCTORS=new Map([[v.UINT8.toString(),Uint8Array],[v.UINT16.toString(),Uint16Array],[v.UINT32.toString(),Uint32Array],[v.UINT64.toString(),BigUint64Array],[v.FLOAT32.toString(),Float32Array],[v.FLOAT64.toString(),Float64Array],[v.INT8.toString(),Int8Array],[v.INT16.toString(),Int16Array],[v.INT32.toString(),Int32Array],[v.INT64.toString(),BigInt64Array],[v.TIMESTAMP.toString(),BigInt64Array],[v.STRING.toString(),Uint8Array],[v.JSON.toString(),Uint8Array],[v.UUID.toString(),Uint8Array]]);static ARRAY_CONSTRUCTOR_DATA_TYPES=new Map([[Uint8Array.name,v.UINT8],[Uint16Array.name,v.UINT16],[Uint32Array.name,v.UINT32],[BigUint64Array.name,v.UINT64],[Float32Array.name,v.FLOAT32],[Float64Array.name,v.FLOAT64],[Int8Array.name,v.INT8],[Int16Array.name,v.INT16],[Int32Array.name,v.INT32],[BigInt64Array.name,v.INT64]]);static DENSITIES=new Map([[v.UINT8.toString(),q.BIT8],[v.UINT16.toString(),q.BIT16],[v.UINT32.toString(),q.BIT32],[v.UINT64.toString(),q.BIT64],[v.FLOAT32.toString(),q.BIT32],[v.FLOAT64.toString(),q.BIT64],[v.INT8.toString(),q.BIT8],[v.INT16.toString(),q.BIT16],[v.INT32.toString(),q.BIT32],[v.INT64.toString(),q.BIT64],[v.TIMESTAMP.toString(),q.BIT64],[v.STRING.toString(),q.UNKNOWN],[v.JSON.toString(),q.UNKNOWN],[v.UUID.toString(),q.BIT128]]);static ALL=[v.UNKNOWN,v.FLOAT64,v.FLOAT32,v.INT64,v.INT32,v.INT16,v.INT8,v.UINT64,v.UINT32,v.UINT16,v.UINT8,v.TIMESTAMP,v.UUID,v.STRING,v.JSON];static BIG_INT_TYPES=[v.INT64,v.UINT64,v.TIMESTAMP];static z=L([A().transform(e=>new v(e)),W(v)])},kn=class N extends qe{constructor(e){ne(e)&&(e=e.value),super(e.valueOf())}largerThan(e){return ne(e)&&(e=e.value),this.valueOf()>e.valueOf()}smallerThan(e){return ne(e)&&(e=e.value),this.valueOf()<e.valueOf()}add(e){return ne(e)&&(e=e.value),new N(nn(this.valueOf(),e.valueOf()))}sub(e){return ne(e)&&(e=e.value),new N(tn(this.valueOf(),e.valueOf()))}mult(e){return new N(ce(this.valueOf(),e))}div(e){return new N(rn(this.valueOf(),e))}truncate(e){return new N(Math.trunc(this.valueOf()/new N(e).valueOf())*new N(e).valueOf())}remainder(e){return N.bytes(this.valueOf()%new N(e).valueOf())}get gigabytes(){return this.valueOf()/N.GIGABYTE.valueOf()}get megabytes(){return this.valueOf()/N.MEGABYTE.valueOf()}get kilobytes(){return this.valueOf()/N.KILOBYTE.valueOf()}get terabytes(){return this.valueOf()/N.TERABYTE.valueOf()}toString(){const e=this.truncate(N.TERABYTE),r=this.truncate(N.GIGABYTE),i=this.truncate(N.MEGABYTE),n=this.truncate(N.KILOBYTE),o=this.truncate(N.BYTE),a=e,u=r.sub(e),s=i.sub(r),l=n.sub(i),m=o.sub(n);let d="";return a.isZero||(d+=`${a.terabytes}TB `),u.isZero||(d+=`${u.gigabytes}GB `),s.isZero||(d+=`${s.megabytes}MB `),l.isZero||(d+=`${l.kilobytes}KB `),(!m.isZero||d==="")&&(d+=`${m.valueOf()}B`),d.trim()}static bytes(e=1){return new N(e)}static BYTE=new N(1);static kilobytes(e=1){return N.bytes(new N(e).valueOf()*1e3)}static KILOBYTE=N.kilobytes(1);static megabytes(e=1){return N.kilobytes(new N(e).valueOf()*1e3)}static MEGABYTE=N.megabytes(1);static gigabytes(e=1){return N.megabytes(new N(e).valueOf()*1e3)}static GIGABYTE=N.gigabytes(1);static terabytes(e){return N.gigabytes(new N(e).valueOf()*1e3)}static TERABYTE=N.terabytes(1);static ZERO=new N(0);static z=L([x().transform(e=>new N(e)),W(N)]);get isZero(){return this.valueOf()===0}};L([W(Uint8Array),W(Uint16Array),W(Uint32Array),W(BigUint64Array),W(Float32Array),W(Float64Array),W(Int8Array),W(Int16Array),W(Int32Array),W(BigInt64Array)]);const Mc=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"||t instanceof g||t instanceof U||t instanceof Date},mg=(t,e,r,i=0)=>t.usesBigInt&&!e.usesBigInt?Number(r)-Number(i):!t.usesBigInt&&e.usesBigInt?BigInt(r.valueOf())-BigInt(i.valueOf()):kt(r,-i),kt=(t,e)=>e==0?t:t==0?e:typeof t=="bigint"&&typeof e=="bigint"||typeof t=="number"&&typeof e=="number"?t+e:Number(t)+Number(e),pg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function gg(t){return typeof t=="string"&&pg.test(t)}const G=[];for(let t=0;t<256;++t)G.push((t+256).toString(16).slice(1));function hg(t,e=0){return(G[t[e+0]]+G[t[e+1]]+G[t[e+2]]+G[t[e+3]]+"-"+G[t[e+4]]+G[t[e+5]]+"-"+G[t[e+6]]+G[t[e+7]]+"-"+G[t[e+8]]+G[t[e+9]]+"-"+G[t[e+10]]+G[t[e+11]]+G[t[e+12]]+G[t[e+13]]+G[t[e+14]]+G[t[e+15]]).toLowerCase()}function vg(t,e=0){const r=hg(t,e);if(!gg(r))throw TypeError("Stringified UUID is invalid");return r}typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Cc=(t,e)=>vg(t,e),ve=-1,yg=A().transform(t=>new Uint8Array(atob(t).split("").map(e=>e.charCodeAt(0))).buffer),bg=L([ei(),Ns()]).transform(()=>new Uint8Array().buffer),Sn=10,$g=(t,e)=>{if(t==="number"&&!e.isNumeric)throw new Error(`cannot convert series of type ${e.toString()} to number`);if(t==="bigint"&&!e.usesBigInt)throw new Error(`cannot convert series of type ${e.toString()} to bigint`)},Rc="sy_x_telem_series";let Lc=class ye{key;discriminator=Rc;dataType;sampleOffset;gl;_data;timeRange=nt.ZERO;alignment=0n;alignmentMultiple=1n;cachedMin;cachedMax;writePos=ve;_refCount=0;cachedLength;_cachedIndexes;static crudeZ=D({timeRange:nt.z.optional(),dataType:R.z,alignment:dc().optional(),data:L([yg,bg,W(ArrayBuffer),W(Uint8Array)]),glBufferUsage:dg.optional().default("static").optional()});static z=ye.crudeZ.transform(e=>new ye(e));constructor(e){wg(e)&&(e={data:e}),e.data??=[];const{dataType:r,timeRange:i,sampleOffset:n=0,glBufferUsage:o="static",alignment:a=0n,alignmentMultiple:u=1n,key:s=Ac(),data:l}=e;if(_g(l)){const h=l;this.key=h.key,this.dataType=h.dataType,this.sampleOffset=h.sampleOffset,this.gl=h.gl,this._data=h._data,this.timeRange=h.timeRange,this.alignment=h.alignment,this.alignmentMultiple=h.alignmentMultiple,this.cachedMin=h.cachedMin,this.cachedMax=h.cachedMax,this.writePos=h.writePos,this._refCount=h._refCount,this.cachedLength=h.cachedLength;return}const m=Mc(l),d=Array.isArray(l);if(r!=null)this.dataType=new R(r);else{if(l instanceof ArrayBuffer)throw new Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");if(d||m){let h=l;if(!m){if(l.length===0)throw new Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");h=l[0]}if(typeof h=="string")this.dataType=R.STRING;else if(typeof h=="number")this.dataType=R.FLOAT64;else if(typeof h=="bigint")this.dataType=R.INT64;else if(typeof h=="boolean")this.dataType=R.BOOLEAN;else if(h instanceof g||h instanceof Date||h instanceof g)this.dataType=R.TIMESTAMP;else if(typeof h=="object")this.dataType=R.JSON;else throw new Error(`cannot infer data type of ${typeof h} when constructing a Series from a JS array`)}else this.dataType=new R(l)}if(!d&&!m)this._data=l;else if(d&&l.length===0)this._data=new this.dataType.Array([]).buffer;else{let h=m?[l]:l;const y=h[0];(y instanceof g||y instanceof Date||y instanceof U)&&(h=h.map(f=>new g(f).valueOf())),this.dataType.equals(R.STRING)?(this.cachedLength=h.length,this._data=new TextEncoder().encode(`${h.join(`
|
|
30
|
+
`)}
|
|
31
|
+
`).buffer):this.dataType.equals(R.JSON)?(this.cachedLength=h.length,this._data=new TextEncoder().encode(`${h.map(f=>pn.encodeString(f)).join(`
|
|
32
|
+
`)}
|
|
33
|
+
`).buffer):this.dataType.usesBigInt&&typeof y=="number"?this._data=new this.dataType.Array(h.map(f=>BigInt(Math.round(f)))).buffer:!this.dataType.usesBigInt&&typeof y=="bigint"?this._data=new this.dataType.Array(h.map(Number)).buffer:this._data=new this.dataType.Array(h).buffer}this.key=s,this.alignment=a,this.alignmentMultiple=u,this.sampleOffset=n??0,this.timeRange=i??nt.ZERO,this.gl={control:null,buffer:null,prevBuffer:0,bufferUsage:o}}static alloc({capacity:e,dataType:r,...i}){if(e===0)throw new Error("[Series] - cannot allocate an array of length 0");const n=new new R(r).Array(e),o=new ye({data:n.buffer,dataType:r,...i});return o.writePos=0,o}get refCount(){return this._refCount}acquire(e){this._refCount++,e!=null&&this.updateGLBuffer(e)}release(){this._refCount--,this.refCount===0&&this.gl.control!=null?this.maybeGarbageCollectGLBuffer(this.gl.control):this.refCount<0&&console.warn("cannot release a series with a negative reference count")}write(e){if(!e.dataType.equals(this.dataType))throw new Error("buffer must be of the same type as this array");return this.dataType.isVariable?this.writeVariable(e):this.writeFixed(e)}writeVariable(e){if(this.writePos===ve)return 0;const r=this.byteCapacity.valueOf()-this.writePos,i=e.subBytes(0,r);return this.writeToUnderlyingData(i),this.writePos+=i.byteLength.valueOf(),this.cachedLength!=null&&(this.cachedLength+=i.length,this.calculateCachedLength()),i.length}writeFixed(e){if(this.writePos===ve)return 0;const r=this.capacity-this.writePos,i=e.sub(0,r);return this.writeToUnderlyingData(i),this.cachedLength=void 0,this.maybeRecomputeMinMax(i),this.writePos+=i.length,i.length}writeToUnderlyingData(e){this.underlyingData.set(e.data,this.writePos)}get buffer(){return typeof this._data=="object"&&"buffer"in this._data?this._data.buffer:this._data}get underlyingData(){return new this.dataType.Array(this._data)}get data(){return this.writePos===ve?this.underlyingData:new this.dataType.Array(this._data,0,this.writePos)}toStrings(){return this.dataType.isVariable?new TextDecoder().decode(this.underlyingData).split(`
|
|
34
|
+
`).slice(0,-1):Array.from(this).map(e=>e.toString())}parseJSON(e){if(!this.dataType.equals(R.JSON))throw new Error("cannot parse non-JSON series as JSON");return this.toStrings().map(r=>e.parse(pn.decodeString(r)))}get byteCapacity(){return new kn(this.underlyingData.byteLength)}get capacity(){return this.dataType.isVariable?this.byteCapacity.valueOf():this.dataType.density.length(this.byteCapacity)}get byteLength(){return this.writePos===ve?this.byteCapacity:this.dataType.isVariable?new kn(this.writePos):this.dataType.density.size(this.writePos)}get length(){return this.cachedLength!=null?this.cachedLength:this.dataType.isVariable?this.calculateCachedLength():this.writePos===ve?this.byteCapacity.valueOf()/this.dataType.density.valueOf():this.writePos}calculateCachedLength(){if(!this.dataType.isVariable)throw new Error("cannot calculate length of a non-variable length data type");let e=0;const r=[0];return this.data.forEach((i,n)=>{i===Sn&&(e++,r.push(n+1))}),this._cachedIndexes=r,this.cachedLength=e,e}convert(e,r=0){if(this.dataType.equals(e))return this;const i=new e.Array(this.length);for(let n=0;n<this.length;n++)i[n]=mg(this.dataType,e,this.data[n],r);return new ye({data:i.buffer,dataType:e,timeRange:this.timeRange,sampleOffset:r,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment})}calcRawMax(){if(this.length===0)return-1/0;if(this.dataType.equals(R.TIMESTAMP))this.cachedMax=this.data[this.data.length-1];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMax=e.reduce((r,i)=>r>i?r:i)}else{const e=this.data;this.cachedMax=e.reduce((r,i)=>r>i?r:i)}return this.cachedMax}get max(){return this.calcMax()}calcMax(){if(this.dataType.isVariable)throw new Error("cannot calculate maximum on a variable length data type");return this.writePos===0?-1/0:(this.cachedMax??=this.calcRawMax(),kt(this.cachedMax,this.sampleOffset))}calcRawMin(){if(this.length===0)return 1/0;if(this.dataType.equals(R.TIMESTAMP))this.cachedMin=this.data[0];else if(this.dataType.usesBigInt){const e=this.data;this.cachedMin=e.reduce((r,i)=>r<i?r:i)}else{const e=this.data;this.cachedMin=e.reduce((r,i)=>r<i?r:i)}return this.cachedMin}get min(){return this.calcMin()}calcMin(){if(this.dataType.isVariable)throw new Error("cannot calculate minimum on a variable length data type");return this.writePos===0?1/0:(this.cachedMin??=this.calcRawMin(),kt(this.cachedMin,this.sampleOffset))}get bounds(){return ze(Number(this.min),Number(this.max),{makeValid:!1})}maybeRecomputeMinMax(e){if(this.cachedMin!=null){const r=e.cachedMin??e.calcRawMin();r<this.cachedMin&&(this.cachedMin=r)}if(this.cachedMax!=null){const r=e.cachedMax??e.calcRawMax();r>this.cachedMax&&(this.cachedMax=r)}}atAlignment(e,r){const i=Number((e-this.alignment)/this.alignmentMultiple);if(i<0||i>=this.length){if(r===!0)throw new Error(`[series] - no value at index ${i}`);return}return this.at(i,r)}at(e,r=!1){if(this.dataType.isVariable)return this.atVariable(e,r??!1);if(this.dataType.equals(R.UUID))return this.atUUID(e,r);e<0&&(e=this.length+e);const i=this.data[e];if(i==null){if(r===!0)throw new Error(`[series] - no value at index ${e}`);return}return kt(i,this.sampleOffset)}atUUID(e,r){e<0&&(e=this.length+e);const i=Cc(new Uint8Array(this.buffer,e*this.dataType.density.valueOf()));if(i==null){if(r)throw new Error(`[series] - no value at index ${e}`);return}return i}atVariable(e,r){let i=0,n=0;if(this._cachedIndexes!=null)i=this._cachedIndexes[e],n=this._cachedIndexes[e+1]-1;else{e<0&&(e=this.length+e);for(let a=0;a<this.data.length;a++)if(this.data[a]===Sn){if(e===0){n=a;break}i=a+1,e--}if(n===0&&(n=this.data.length),i>=n||e>0){if(r)throw new Error(`[series] - no value at index ${e}`);return}}const o=this.data.slice(i,n);return this.dataType.equals(R.STRING)?new TextDecoder().decode(o):Hi(JSON.parse(new TextDecoder().decode(o)))}binarySearch(e){let r=0,i=this.length-1;const n=Mm(e);for(;r<=i;){const o=Math.floor((r+i)/2),a=n(this.at(o,!0),e);if(a===0)return o;a<0?r=o+1:i=o-1}return r}updateGLBuffer(e){if(this.gl.control=e,!this.dataType.equals(R.FLOAT32)&&!this.dataType.equals(R.UINT8))throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");const{buffer:r,bufferUsage:i,prevBuffer:n}=this.gl;if(r==null&&(this.gl.buffer=e.createBuffer()),this.writePos!==n)if(e.bindBuffer(e.ARRAY_BUFFER,this.gl.buffer),this.writePos!==ve){n===0&&e.bufferData(e.ARRAY_BUFFER,this.byteCapacity.valueOf(),e.STATIC_DRAW);const o=this.dataType.density.size(n).valueOf(),a=this.underlyingData.slice(this.gl.prevBuffer,this.writePos);e.bufferSubData(e.ARRAY_BUFFER,o,a.buffer),this.gl.prevBuffer=this.writePos}else e.bufferData(e.ARRAY_BUFFER,this.buffer,i==="static"?e.STATIC_DRAW:e.DYNAMIC_DRAW),this.gl.prevBuffer=ve}as(e){return $g(e,this.dataType),this}get digest(){return{key:this.key,dataType:this.dataType.toString(),sampleOffset:this.sampleOffset,alignment:{lower:Vi(this.alignmentBounds.lower),upper:Vi(this.alignmentBounds.upper),multiple:this.alignmentMultiple},timeRange:this.timeRange.toString(),length:this.length,capacity:this.capacity}}get alignmentBounds(){return ze(this.alignment,this.alignment+BigInt(this.length)*this.alignmentMultiple)}maybeGarbageCollectGLBuffer(e){this.gl.buffer!=null&&(e.deleteBuffer(this.gl.buffer),this.gl.buffer=null,this.gl.prevBuffer=0,this.gl.control=null)}get glBuffer(){if(this.gl.buffer==null)throw new Error("gl buffer not initialized");return this.gl.prevBuffer!==this.writePos&&console.warn("buffer not updated"),this.gl.buffer}[Symbol.iterator](){if(this.dataType.isVariable){const e=new Ig(this);return this.dataType.equals(R.JSON)?new kg(e):e}return this.dataType.equals(R.UUID)?new Sg(this):new Og(this)}slice(e,r){return this.sliceSub(!1,e,r)}sub(e,r){return this.sliceSub(!0,e,r)}subIterator(e,r){return new Ji(this,e,r??this.length)}subAlignmentIterator(e,r){const i=Math.ceil(Number(e-this.alignment)/Number(this.alignmentMultiple)),n=Math.ceil(Number(r-this.alignment)/Number(this.alignmentMultiple));return new Ji(this,i,n)}subBytes(e,r){if(e>=0&&(r==null||r>=this.byteLength.valueOf()))return this;const i=this.data.subarray(e,r);return new ye({data:i,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(e)})}sliceSub(e,r,i){if(r<=0&&(i==null||i>=this.length))return this;let n;return e?n=this.data.subarray(r,i):n=this.data.slice(r,i),new ye({data:n,dataType:this.dataType,timeRange:this.timeRange,sampleOffset:this.sampleOffset,glBufferUsage:this.gl.bufferUsage,alignment:this.alignment+BigInt(r)})}reAlign(e){return new ye({data:this.buffer,dataType:this.dataType,timeRange:nt.ZERO,sampleOffset:this.sampleOffset,glBufferUsage:"static",alignment:e})}toString(){let e=`Series(${this.dataType.toString()} ${this.length} [`;if(this.length<=10)e+=Array.from(this).map(r=>r.toString());else{for(let r=0;r<5;r++)e+=`${this.at(r)?.toString()}`,e+=",";e+="...,";for(let r=-5;r<0;r++)e+=this.at(r)?.toString(),r<-1&&(e+=",")}return e+="])",e}};const wg=t=>t==null?!1:Array.isArray(t)||t instanceof ArrayBuffer||ArrayBuffer.isView(t)&&!(t instanceof DataView)||t instanceof Lc?!0:Mc(t),_g=lg(Rc,Lc);class Ji{series;end;index;constructor(e,r,i){this.series=e;const n=ze(0,e.length+1);this.end=Bi(n,i),this.index=Bi(n,r)}next(){return this.index>=this.end?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}class Ig{series;index;decoder;constructor(e){if(!e.dataType.isVariable)throw new Error("cannot create a variable series iterator for a non-variable series");this.series=e,this.index=0,this.decoder=new TextDecoder}next(){const e=this.index,r=this.series.data;for(;this.index<r.length&&r[this.index]!==Sn;)this.index++;const i=this.index;return e===i?{done:!0,value:void 0}:(this.index++,{done:!1,value:this.decoder.decode(this.series.buffer.slice(e,i))})}}let kg=class Wc{wrapped;static schema=Xt(A(),Je());constructor(e){this.wrapped=e}next(){const e=this.wrapped.next();return e.done===!0?{done:!0,value:void 0}:{done:!1,value:pn.decodeString(e.value,Wc.schema)}}},Sg=class{series;index;data;density;constructor(e){if(!e.dataType.equals(R.UUID))throw new Error("cannot create a UUID series iterator for a non-UUID series");this.series=e,this.index=0,this.data=new Uint8Array(e.buffer),this.density=R.UUID.density.valueOf()}next(){if(this.index>=this.series.length)return{done:!0,value:void 0};const e=Cc(this.data,this.index*this.density);return this.index++,{done:!1,value:e}}};class Og{series;index;constructor(e){this.series=e,this.index=0}next(){return this.index>=this.series.length?{done:!0,value:void 0}:{done:!1,value:this.series.at(this.index++,!0)}}}const Vi=t=>{const e=t>>32n,r=t&0xffffffffn;return{domain:e,sample:r}},Q=".",zg=(t,e,r=Q)=>{const i=t.split(r);return i.map((n,o)=>{const a=e(n,o,i);return a==null?null:typeof a=="string"?a:a.join(r)}).filter(n=>n!=null).join(r)},Ke=(t,e)=>{if(!Array.isArray(t))return t[e];const r=t[e];if(r!=null||t.length==0)return r;const i=t[0];if(typeof i=="object"&&"key"in i)return t.find(n=>n.key===e)},xg=(t,e)=>{const r=t.split(Q);return r.forEach((i,n)=>{e=Ke(e,i),e!=null&&typeof e=="object"&&"key"in e&&(r[n]=e.key)}),r.join(Q)},Ng=(t,e)=>{const r=t.split(Q);return e<0?r[r.length+e]:r[e]},Tg=(t,e)=>{if(e.length===0)return!0;const r=t.split(Q),i=e.split(Q);if(i.length>r.length)return!1;for(let n=0;n<i.length;n++){const o=r[n],a=i[n];if(a!=="*"&&o!==a)return!1}return!0},Me=t=>{const e=parseInt(t);return isNaN(e)||e<0||e.toString()!==t?null:e},On=(t,e)=>{for(let r=1;r<=e.length;r++){const i=e.slice(0,r).join(Q);if(Ke(t,i)!=null)return[i,r]}return null},Bc=(t,e,r={optional:!1})=>{const{optional:i,getter:n=Ke}=r;if(e==="")return t;const o=e.split(Q);if(o.length===1){const u=n(t,o[0]);if(u===void 0){if(i)return null;throw new Error(`Path ${e} does not exist. ${o[0]} is undefined`)}return u}const a=(u,s)=>{if(s>=o.length)return u;for(let l=o.length-s;l>=1;l--){const m=o.slice(s,s+l).join(Q),d=n(u,m);if(d!==void 0){if(s+l===o.length)return d;if(d===null){if(i)return null;throw new Error(`Path ${e} does not exist. ${m} is null`)}return a(d,s+l)}}if(i)return null;throw new Error(`Path ${e} does not exist. ${o[s]} is undefined`)};return a(t,0)},jg=(t,e)=>Bc(t,e,{optional:!0})!==null,Ug=t=>{try{return structuredClone(t)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",t),console.trace(),JSON.parse(JSON.stringify(t))}},Eg=(t,e,r="")=>{const i={},n=(o,a,u)=>{if(typeof o!=typeof a||o===null||a===null){i[u]=[o,a];return}if(typeof o=="object"&&typeof a=="object")if(Array.isArray(o)&&Array.isArray(a)){if(o.length!==a.length){i[u]=[o,a];return}for(let s=0;s<o.length;s++)n(o[s],a[s],`${u}[${s}]`)}else new Set([...Object.keys(o),...Object.keys(a)]).forEach(s=>{n(o[s],a[s],u!==""?`${u}.${s}`:s)});else o!==a&&(i[u]=[o,a])};return n(t,e,r),i},zn=(t,e)=>{const r=Array.isArray(t),i=Array.isArray(e);if(r!==i)return!1;if(r&&i){const a=t,u=e;if(a.length!==u.length)return!1;for(let s=0;s<a.length;s++)if(!zn(a[s],u[s]))return!1;return!0}if(t==null||e==null||typeof t!="object"||typeof e!="object")return t===e;if("equals"in t)return t.equals(e);const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const a of n){const u=t[a],s=e[a];if(typeof u=="object"&&typeof s=="object"){if(!zn(u,s))return!1}else if(u!==s)return!1}return!0},Fc=(t,e)=>{if(typeof t!="object"||t==null)return t===e;const r=Object.keys(t),i=Object.keys(e);if(i.length>r.length)return!1;for(const n of i){const o=t[n],a=e[n];if(typeof o=="object"&&typeof a=="object"){if(!Fc(o,a))return!1}else if(o!==a)return!1}return!0},xn=(t,...e)=>{if(e.length===0)return t;const r=e.shift();if(ln(t)&&ln(r))for(const i in r)try{ln(r[i])?(i in t||Object.assign(t,{[i]:{}}),xn(t[i],r[i])):Object.assign(t,{[i]:r[i]})}catch(n){throw n instanceof TypeError?new TypeError(`.${i}: ${n.message}`):n}return xn(t,...e)},Dg=(t,e,r)=>{const i=(n,o,a)=>{if(a.def?.type==="union")return a.def.options.reduce((u,s)=>i(u,o,s),n);if(a.def?.type==="intersection"){const u=i(n,o,a.def.left);return i(u,o,a.def.right)}for(const u in o){const s=o[u];let l=a?.shape;if(l!=null)for(;l!=null;){if(l[u]!=null){const m=l[u].safeParse(s);if(m.success){n[u]=m.data;break}}l=l.def?.shape}typeof s=="object"&&!Array.isArray(s)&&s!==null&&a&&a.shape&&a.shape[u]&&(n[u]||={},i(n[u],s,a.shape[u]))}return n};return i({...t},e,r)},Pg=(t,e)=>{const r=e.split(Q);let i=t,n=0;for(;n<r.length;){if(n===r.length-1){const a=r[n];if(Array.isArray(i)){const u=parseInt(a);if(!isNaN(u)&&u<i.length){i.splice(u,1);return}const s=i[0];if(typeof s=="object"&&"key"in s){const l=i.findIndex(m=>m.key===a);if(l!==-1){i.splice(l,1);return}}return}delete i[a];return}let o=!1;if(Array.isArray(i)&&i.length>0){const a=i[0];if(typeof a=="object"&&"key"in a)for(let u=r.length-n;u>=1;u--){const s=r.slice(n,n+u).join(Q),l=i.find(m=>m.key===s);if(l!=null){if(n+u===r.length){const m=i.findIndex(d=>d.key===s);m!==-1&&i.splice(m,1);return}i=l,n+=u,o=!0;break}}}if(!o)for(let a=r.length-n;a>=1;a--){const u=r.slice(n,n+a).join(Q);if(!Array.isArray(i)&&typeof i=="object"&&i!==null&&u in i){if(n+a===r.length){delete i[u];return}i=i[u],n+=a,o=!0;break}}if(!o){const a=Ke(i,r[n]);if(a==null)return;i=a,n++}}},Ag=(t,e,r)=>{const i=e.split(Q);let n=t,o=0;for(;o<i.length-1;){const a=On(n,i.slice(o,i.length-1));let u;a!=null?[u,o]=[a[0],o+a[1]]:(u=i[o],o++);let s=Ke(n,u);if(s==null){const l=i[o];let m=Me(l);m==null&&l.startsWith("-")&&Me(l.substring(1))!=null&&(m=0),s=m!=null?[]:{},n[u]=s}n=s}try{const a=i[i.length-1];if(Array.isArray(n)){let s=Me(a);if(s==null){if(a.startsWith("-")){const l=Me(a.substring(1));l!=null&&(s=n.length-l)}if(s==null){if(n.length===0){const m=Me(a);if(m!=null){n[m]=r;return}}const l=n[0];if(typeof l=="object"&&"key"in l){const m=n.findIndex(d=>d.key===a);if(m!==-1){n[m]=r;return}}return}}n[s]=r;return}const u=On(n,[a]);if(u!=null){n[u[0]]=r;return}n[a]=r}catch(a){throw console.error("failed to set value",r,"at path",e,"on object",t),a}},bi=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:Q,copy:Ug,defaultGetter:Ke,difference:Eg,element:Ng,equal:zn,findBestKey:On,get:Bc,getIndex:Me,has:jg,override:xn,overrideValidItems:Dg,partialEqual:Fc,pathsMatch:Tg,remove:Pg,resolvePath:xg,set:Ag,transformPath:zg},Symbol.toStringTag,{value:"Module"}));D({key:A(),value:A()});Xt(L([x(),A(),zs()]),Je());const Jc=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",Zg=Jc(),Vc=["macOS","Windows","Linux"],Mg=["macos","windows","linux"],Cg={macos:"macOS",windows:"Windows",linux:"Linux"},Rg=J(Vc).or(J(Mg).transform(t=>Cg[t])),Lg=()=>{if(typeof window>"u")return;const t=window.navigator.userAgent.toLowerCase();if(t.includes("mac"))return"macOS";if(t.includes("win"))return"Windows";if(t.includes("linux"))return"Linux"};let dn;const Wg=(t={})=>{const{force:e,default:r}=t;return e??dn??(dn=Lg(),dn??r)},Bg=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:Vc,RUNTIME:Zg,detect:Jc,getOS:Wg,osZ:Rg},Symbol.toStringTag,{value:"Module"})),Fg=(...t)=>t.map(Gc).join(""),Gc=t=>(t.endsWith("/")||(t+="/"),t.startsWith("/")&&(t=t.slice(1)),t),Jg=t=>t.endsWith("/")?t.slice(0,-1):t;class St{protocol;host;port;path;constructor({host:e,port:r,protocol:i="",pathPrefix:n=""}){this.protocol=i,this.host=e,this.port=r,this.path=Gc(n)}replace(e){return new St({host:e.host??this.host,port:e.port??this.port,protocol:e.protocol??this.protocol,pathPrefix:e.pathPrefix??this.path})}child(e){return new St({...this,pathPrefix:Fg(this.path,e)})}toString(){return Jg(`${this.protocol}://${this.host}:${this.port}/${this.path}`)}static UNKNOWN=new St({host:"unknown",port:0})}D({baseInterval:U.z.optional(),maxRetries:x().optional(),scale:x().optional()});const Vg=/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i,qc=A().regex(Vg),Re=x().min(0).max(255),Kc=x().min(0).max(1),Yc=pe([Re,Re,Re,Kc]),Gg=pe([Re,Re,Re]),qg=D({rgba255:Yc}),Kg=x().min(0).max(360),Yg=x().min(0).max(100),Xg=x().min(0).max(100),Hg=pe([Kg,Yg,Xg,Kc]),$i=L([qc,Gg,Yc,Hg,qg]),Qg=$i.transform(t=>wi(t)),wi=(t,e=1)=>{if(t=$i.parse(t),typeof t=="string")return eh(t,e);if(Array.isArray(t)){if(t.length<3||t.length>4)throw new Error(`Invalid color: [${t.join(", ")}]`);return t.length===3?[...t,e]:t}return t.rgba255},eh=(t,e=1)=>(t=qc.parse(t),t=th(t),[$t(t,0),$t(t,2),$t(t,4),t.length===8?$t(t,6)/255:e]),$t=(t,e)=>parseInt(t.slice(e,e+2),16),th=t=>t.startsWith("#")?t.slice(1):t;wi("#000000");wi("#ffffff");const nh=D({key:A(),color:$i,position:x(),switched:Y().optional()});gt(nh);const rh=D({key:A(),name:A(),color:Qg});D({key:A(),name:A(),swatches:gt(rh)});le().min(0).max(255);D({name:A(),key:A()});const ih=t=>Object.getOwnPropertySymbols(globalThis).includes(t),oh=(t,e)=>{const r=Symbol.for(t);if(!ih(r)){const i=e();Object.defineProperty(globalThis,r,{value:i})}return()=>globalThis[r]},Xc="sy_x_error",ah=t=>e=>e!=null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"?e.type.startsWith(t):e instanceof Error?e.message.startsWith(t):typeof e!="string"?!1:e.startsWith(t),Hc=t=>class rt extends Error{static discriminator=Xc;discriminator=rt.discriminator;static TYPE=t;type=rt.TYPE;static matches=ah(t);matches=rt.matches;constructor(r,i){super(r,i),this.name=rt.TYPE}static sub(r){return Hc(`${t}.${r}`)}},uh=t=>{if(t==null||typeof t!="object")return!1;const e=t;if(e.discriminator!==Xc)return!1;if(!("type"in e))throw new Error(`X Error is missing its type property: ${JSON.stringify(e)}`);return!0},Ye="unknown",Gi="nil";class sh{providers=[];register(e){this.providers.push(e)}encode(e){if(e==null)return{type:Gi,data:""};if(uh(e))for(const r of this.providers){const i=r.encode(e);if(i!=null)return i}if(e instanceof Error)return{type:Ye,data:e.message};if(typeof e=="string")return{type:Ye,data:e};try{return{type:Ye,data:JSON.stringify(e)}}catch{return{type:Ye,data:"unable to encode error information"}}}decode(e){if(e==null||e.type===Gi)return null;if(e.type===Ye)return new qi(e.data);for(const r of this.providers){const i=r.decode(e);if(i!=null)return i}return new qi(e.data)}}oh("synnax-error-registry",()=>new sh);class qi extends Hc("unknown"){}D({type:A(),data:A()});const ch=B.object({jsonrpc:B.literal("2.0"),method:B.string(),params:B.any().optional(),id:B.union([B.string(),B.number(),B.null()]).optional()}),Qc=B.object({jsonrpc:B.literal("2.0"),id:B.union([B.string(),B.number(),B.null()])}),lh=Qc.extend({result:B.json()}),dh=Qc.extend({error:B.object({code:B.number().int(),message:B.string().optional(),data:B.json().optional()})}),fh=B.union([lh,dh]);B.union([ch,fh]);A().regex(/^\d+\.\d+\.\d+$/);const mh=["standard","scientific","engineering"];J(mh);J(["success","info","warning","error","loading","disabled"]);const Oe="main",_i="prerender",un={stage:"creating",processCount:0,reserved:!1,focusCount:0,centerCount:0},el={...un,key:_i,visible:!1},ph=D({key:A(),url:A().optional(),title:A().optional(),center:Y().optional(),position:At.xy.optional(),size:It.dimensions.optional(),minSize:It.dimensions.optional(),maxSize:It.dimensions.optional(),resizable:Y().optional(),fullscreen:Y().optional(),focus:Y().optional(),maximized:Y().optional(),visible:Y().optional(),minimized:Y().optional(),decorations:Y().optional(),skipTaskbar:Y().optional(),fileDropEnabled:Y().optional(),transparent:Y().optional(),alwaysOnTop:Y().optional()}),gh=U.milliseconds(50),tl=()=>setTimeout(()=>window.location.reload(),gh.milliseconds),nl={label:Oe,config:{enablePrerender:!0,debug:!1,defaultWindowProps:{}},windows:{main:{...un,key:Oe,reserved:!0}},labelKeys:{main:Oe},keyLabels:{main:Oe}},hh=(t,e)=>{if(t.type===il.type)return e.label!==Oe||(t.payload.label=In.create(),t.payload.prerenderLabel=In.create()),t;if("label"in t.payload)return t;let r=e.label;const i=t.payload;return i.key!=null&&(i.key in e.windows?r=i.key:r=e.keyLabels[i.key]),t.payload={...t.payload,label:r},t},te=t=>(e,r)=>{if(!("label"in r.payload))throw new Error("Missing label");t(e,r)},Ie=(t,e=!1)=>te((r,i)=>{let n=e;const o=r.windows[i.payload.label];if(o!=null){if(i.payload.value!=null)n=i.payload.value;else{const a=o[t];a!=null&&(n=!a)}r.windows[i.payload.label]={...o,[t]:n}}}),sn=(t,e=!1)=>(r,i)=>{const n=r.windows[i.payload.label];n!=null&&(r.windows[i.payload.label]={...n,[t]:n[t]+(e?-1:1)})},vh=t=>Object.values(t.windows).some(e=>e.key===_i&&!e.reserved),Ii="drift",yh=(t,e,r)=>t.position!=null&&t.size!=null&&e==null?tt.topLeft(tt.positionInCenter(tt.construct(At.ZERO,r??At.ZERO),tt.construct(t.position,t.size))):e,bh=(t,{payload:e})=>{if(e.key===_i)return;const{key:r,label:i,prerenderLabel:n}=e;if(i==null||n==null)throw new Error("[drift] - bug - missing label and prerender label");Yi(t.config.debug,"reducer create window");const o=t.windows.main;if(e.position=yh(o,e.position,e.size),r in t.keyLabels){Xe(t.config.debug,"window already exists, un-minimize and focus it");const s=t.keyLabels[e.key];t.windows[s].visible=!0,t.windows[s].focusCount+=1,t.windows[s].minimized=!1,t.windows[s].position=e.position,fn(t.config.debug);return}const[a,u]=Object.entries(t.windows).find(([,s])=>!s.reserved)??[null,null];a!=null?(Xe(t.config.debug,"using available pre-rendered window"),t.windows[a]={...u,visible:!0,reserved:!0,focusCount:1,focus:!0,...e},t.labelKeys[a]=e.key,t.keyLabels[e.key]=a):(Xe(t.config.debug,"creating new window"),t.windows[i]={...t.config.defaultWindowProps,...un,...e,reserved:!0},t.labelKeys[i]=r,t.keyLabels[r]=i),t.config.enablePrerender&&!vh(t)&&(Xe(t.config.debug,"creating pre-render window"),t.windows[n]=bi.copy({...t.config.defaultWindowProps,...el})),fn(t.config.debug)},$h=te((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.stage=e.payload.stage)}),wh=te((t,{payload:{label:e}})=>{const r=t.windows[e];r==null||r.processCount>0||(r.stage="closing",delete t.windows[e],delete t.labelKeys[e],delete t.keyLabels[r.key])}),_h=te((t,e)=>{const r=t.windows[e.payload.label];r==null||r.processCount>0||(r.stage="reloading",tl())}),Ih=te(sn("processCount")),kh=te((t,e)=>{sn("processCount",!0)(t,e);const r=t.windows[e.payload.label];r!=null&&r.processCount===0&&(r.stage==="reloading"?tl():(t.windows[e.payload.label].visible=!1,delete t.windows[e.payload.label],delete t.labelKeys[e.payload.label],delete t.keyLabels[r.key]))}),Sh=(t,e)=>{const r=t.windows[e.payload.key];r!=null&&(r.error=e.payload.message)},Oh=te((t,e)=>{const r=t.windows[e.payload.label];r!=null&&(r.visible!==!0&&(r.visible=!0),sn("focusCount")(t,e))}),zh=Ie("minimized"),xh=Ie("maximized"),Nh=Ie("visible",!0),Th=Ie("fullscreen",!0),jh=te(sn("centerCount")),Uh=te((t,e)=>{t.windows[e.payload.label].position=e.payload.position}),Eh=te((t,e)=>{t.windows[e.payload.label].size=e.payload.size}),Dh=te((t,e)=>{t.windows[e.payload.label].minSize=e.payload.size}),Ph=te((t,e)=>{t.windows[e.payload.label].maxSize=e.payload.size}),Ah=Ie("resizable"),Zh=Ie("skipTaskbar"),Mh=Ie("alwaysOnTop"),Ch=te((t,e)=>{t.windows[e.payload.label].title=e.payload.title}),Rh=Ie("decorations"),Ki=(t,e)=>{const r=t.windows[e.payload.label];bi.partialEqual(r,e.payload)||(t.windows[e.payload.label]={...r,...e.payload})},Lh=(t,e)=>{if(t.config={...t.config,...e.payload},t.label=e.payload.label,t.label===Oe&&t.config.enablePrerender){const r=In.create();t.windows[r]={...t.config.defaultWindowProps,...el}}},rl=al.createSlice({name:Ii,initialState:nl,reducers:{internalSetInitial:Lh,createWindow:bh,setWindowStage:$h,closeWindow:wh,registerProcess:Ih,completeProcess:kh,setWindowError:Sh,focusWindow:Oh,reloadWindow:_h,setWindowMinimized:zh,setWindowMaximized:xh,setWindowVisible:Nh,setWindowFullscreen:Th,centerWindow:jh,setWindowPosition:Uh,setWindowSize:Eh,setWindowMinSize:Dh,setWindowMaxSize:Ph,setWindowResizable:Ah,setWindowSkipTaskbar:Zh,setWindowAlwaysOnTop:Mh,setWindowTitle:Ch,setWindowDecorations:Rh,runtimeSetWindowProps:Ki,setWindowProps:Ki}}),{actions:{runtimeSetWindowProps:Wh,setWindowProps:Bh,createWindow:il,internalSetInitial:ol,setWindowStage:Fh,closeWindow:Jh,registerProcess:Vh,completeProcess:Gh,setWindowError:qh,focusWindow:Kh,reloadWindow:Yh,setWindowMinimized:Xh,setWindowMaximized:Hh,setWindowVisible:Qh,setWindowFullscreen:ev,centerWindow:yv,setWindowPosition:tv,setWindowSize:nv,setWindowMinSize:rv,setWindowMaxSize:iv,setWindowResizable:ov,setWindowSkipTaskbar:av,setWindowAlwaysOnTop:uv,setWindowTitle:sv,setWindowDecorations:cv}}=rl,lv=rl.reducer,dv=t=>t.startsWith(Ii),fv=[ol.type],mv=(t,e)=>!t&&!fv.includes(e);exports.Ho=tt;exports.INITIAL_WINDOW_STATE=un;exports.K=At;exports.MAIN_WINDOW=Oe;exports.S=Bg;exports.SLICE_NAME=Ii;exports.T=bi;exports.ZERO_SLICE_STATE=nl;exports._=It;exports.assignLabel=hh;exports.closeWindow=Jh;exports.completeProcess=Gh;exports.createWindow=il;exports.focusWindow=Kh;exports.group=Yi;exports.groupEnd=fn;exports.i=U;exports.internalSetInitial=ol;exports.isDriftAction=dv;exports.log=Xe;exports.reducer=lv;exports.registerProcess=Vh;exports.reloadWindow=Yh;exports.runtimeSetWindowProps=Wh;exports.setWindowAlwaysOnTop=uv;exports.setWindowDecorations=cv;exports.setWindowError=qh;exports.setWindowFullscreen=ev;exports.setWindowMaxSize=iv;exports.setWindowMaximized=Hh;exports.setWindowMinSize=rv;exports.setWindowMinimized=Xh;exports.setWindowPosition=tv;exports.setWindowProps=Bh;exports.setWindowResizable=ov;exports.setWindowSize=nv;exports.setWindowSkipTaskbar=av;exports.setWindowStage=Fh;exports.setWindowTitle=sv;exports.setWindowVisible=Qh;exports.shouldEmit=mv;exports.windowPropsZ=ph;
|