@onderwijsin/directus-seeder-hook 1.0.0 → 1.0.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/CHANGELOG.md +8 -0
- package/README.md +16 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"node:process";import{createHash as t,randomUUID as n}from"node:crypto";import{lstat as i,realpath as r,readdir as o,unlink as s,mkdir as a,open as u,rename as c,stat as l,readFile as d}from"node:fs/promises";import m,{join as p}from"node:path";import{promisify as f}from"node:util";import{gzip as h,gunzip as g}from"node:zlib";import"node:buffer";import v from"crypto";import y from"events";import _ from"cluster";import b from"assert";import $ from"util";import k from"fs";import w from"path";import S from"url";import I from"tty";import x from"os";import E from"stream";import O from"dns";import N from"net";import z from"tls";import T from"buffer";import D from"string_decoder";import{readFileSync as A,constants as C,writeFileSync as U,existsSync as P,statSync as j,rmSync as R,createReadStream as Z}from"node:fs";import{createRequire as L}from"node:module";import{tmpdir as M}from"node:os";import{performance as F}from"node:perf_hooks";import*as B from"node:readline";function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const V=["interface","display","layout","module","panel","theme"],G=["hook","endpoint"],W=["operation"];var K,q,H,Q,Y,X={exports:{}},ee={exports:{}};function te(){if(q)return K;q=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return K=function(a,u){u=u||{};var c=typeof a;if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*r;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(r){var o=Math.abs(r);if(o>=i)return s(r,o,i,"day");if(o>=n)return s(r,o,n,"hour");if(o>=t)return s(r,o,t,"minute");if(o>=e)return s(r,o,e,"second");return r+" ms"}(a):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},K}function ne(){if(Q)return H;return Q=1,H=function(e){function t(e){let i,r,o,s=null;function a(...e){if(!a.enabled)return;const n=a,r=Number(new Date),o=r-(i||r);n.diff=o,n.prev=i,n.curr=r,i=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(i,r)=>{if("%%"===i)return"%";s++;const o=t.formatters[r];if("function"==typeof o){const t=e[s];i=o.call(n,t),e.splice(s,1),s--}return i}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function i(e,t){let n=0,i=0,r=-1,o=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(r=i,o=n,i++):(n++,i++);else{if(-1===r)return!1;i=r+1,o++,n=o}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=te(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},H}var ie,re,oe,se,ae,ue,ce={exports:{}};function le(){return re?ie:(re=1,ie=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return-1!==i&&(-1===r||i<r)})}function de(){return ae||(ae=1,function(e,t){const n=I,i=$;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let i=0;i<n.length;i++)e.inspectOpts[n[i]]=t.inspectOpts[n[i]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:i,useColors:r}=this;if(r){const t=this.color,r="[3"+(t<8?t:"8;5;"+t),o=` ${r};1m${i} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(r+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+i+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(se)return oe;se=1;const e=x,t=I,n=le(),{env:i}=process;let r;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(t,o){if(0===r)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===r)return 0;const s=r||0;if("dumb"===i.TERM)return s;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||"codeship"===i.CI_NAME?1:s;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:s}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?r=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(r=1),"FORCE_COLOR"in i&&(r="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),oe={supportsColor:function(e){return o(s(e,e&&e.isTTY))},stdout:o(s(!0,t.isatty(1))),stderr:o(s(!0,t.isatty(2)))},oe}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[n]=i,e},{}),e.exports=ne()(t);const{formatters:r}=e.exports;r.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(ce,ce.exports)),ce.exports}function me(){return ue||(ue=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?X.exports=(Y||(Y=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=ne()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ee,ee.exports)),ee.exports):X.exports=de()),X.exports}const pe=Object.freeze({status:"aborted"});function fe(e,t,n){function i(n,i){var r;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(r=n._zod).traits??(r.traits=new Set),n._zod.traits.add(e),t(n,i);for(const e in s.prototype)e in n||Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=i}const r=n?.Parent??Object;class o extends r{}function s(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const he=Symbol("zod_brand");let ge=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ve=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};const ye={};function _e(e){return e&&Object.assign(ye,e),ye}function be(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function $e(e,t="|"){return e.map(e=>Fe(e)).join(t)}function ke(e,t){return"bigint"==typeof t?t.toString():t}function we(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Se(e){return null==e}function Ie(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function xe(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const o=n>r?n:r;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}const Ee=Symbol("evaluating");function Oe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Ee)return void 0===i&&(i=Ee,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ne(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ze(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Te(e){return JSON.stringify(e)}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ae(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Ce=we(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Ue(e){if(!1===Ae(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Ae(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Pe(e){return Ue(e)?{...e}:Array.isArray(e)?[...e]:e}const je=new Set(["string","number","symbol"]),Re=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ze(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Le(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Me(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Fe(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function Be(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const Je={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]},Ve={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ge(e,t){const n=e._zod.def;return Le(e,ze(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return Ne(this,"shape",e),e},checks:[]}))}function We(e,t){const n=e._zod.def,i=ze(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return Ne(this,"shape",i),i},checks:[]});return Le(e,i)}function Ke(e,t){if(!Ue(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ne(this,"shape",n),n},checks:[]});return Le(e,i)}function qe(e,t){if(!Ue(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return Ne(this,"shape",n),n},checks:e._zod.def.checks};return Le(e,n)}function He(e,t){const n=ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ne(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Le(e,n)}function Qe(e,t,n){const i=ze(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return Ne(this,"shape",r),r},checks:[]});return Le(t,i)}function Ye(e,t,n){const i=ze(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return Ne(this,"shape",r),r},checks:[]});return Le(t,i)}function Xe(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function et(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tt(e){return"string"==typeof e?e:e?.message}function nt(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=tt(e.inst?._zod.def?.error?.(e))??tt(t?.error?.(e))??tt(n.customError?.(e))??tt(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function it(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function rt(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ot(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function st(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function at(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var ut=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Ve,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:Je,aborted:Xe,allowsEval:Ce,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error},assertNotEqual:function(e){return e},assignProp:Ne,base64ToUint8Array:st,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return st(t+"=".repeat((4-t.length%4)%4))},cached:we,captureStackTrace:De,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:Ie,clone:Le,cloneDef:function(e){return ze(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:Oe,esc:Te,escapeRegex:Ze,extend:Ke,finalizeIssue:nt,floatSafeRemainder:xe,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:be,getLengthableOrigin:rt,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:it,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:Ae,isPlainObject:Ue,issue:ot,joinValues:$e,jsonStringifyReplacer:ke,merge:He,mergeDefs:ze,normalizeParams:Me,nullish:Se,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:We,optionalKeys:Be,partial:Qe,pick:Ge,prefixIssues:et,primitiveTypes:Re,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:je,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:Ye,safeExtend:qe,shallowClone:Pe,stringifyPrimitive:Fe,uint8ArrayToBase64:at,uint8ArrayToBase64url:function(e){return at(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:tt});const ct=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ke,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lt=fe("$ZodError",ct),dt=fe("$ZodError",ct,{Parent:Error});function mt(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function pt(e,t=e=>e.message){const n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>i({issues:e}));else if("invalid_key"===r.code)i({issues:r.issues});else if("invalid_element"===r.code)i({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(e),n}function ft(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,s;for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>i({issues:e},a.path));else if("invalid_key"===a.code)i({issues:a.issues},a.path);else if("invalid_element"===a.code)i({issues:a.issues},a.path);else{const e=[...r,...a.path];if(0===e.length){n.errors.push(t(a));continue}let i=n,u=0;for(;u<e.length;){const n=e[u],r=u===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(s=i.items)[n]??(s[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(a)),u++}}};return i(e),n}function ht(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function gt(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ht(e.path)}`);return t.join("\n")}const vt=e=>(t,n,i,r)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ge;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>nt(e,o,_e())));throw De(t,r?.callee),t}return s.value},yt=vt(dt),_t=e=>async(t,n,i,r)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>nt(e,o,_e())));throw De(t,r?.callee),t}return s.value},bt=_t(dt),$t=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new ge;return o.issues.length?{success:!1,error:new(e??lt)(o.issues.map(e=>nt(e,r,_e())))}:{success:!0,data:o.value}},kt=$t(dt),wt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>nt(e,r,_e())))}:{success:!0,data:o.value}},St=wt(dt),It=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vt(e)(t,n,r)},xt=It(dt),Et=e=>(t,n,i)=>vt(e)(t,n,i),Ot=Et(dt),Nt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _t(e)(t,n,r)},zt=Nt(dt),Tt=e=>async(t,n,i)=>_t(e)(t,n,i),Dt=Tt(dt),At=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return $t(e)(t,n,r)},Ct=At(dt),Ut=e=>(t,n,i)=>$t(e)(t,n,i),Pt=Ut(dt),jt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return wt(e)(t,n,r)},Rt=jt(dt),Zt=e=>async(t,n,i)=>wt(e)(t,n,i),Lt=Zt(dt),Mt=/^[cC][^\s-]{8,}$/,Ft=/^[0-9a-z]+$/,Bt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Jt=/^[0-9a-vA-V]{20}$/,Vt=/^[A-Za-z0-9]{27}$/,Gt=/^[a-zA-Z0-9_-]{21}$/,Wt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kt=/^([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})$/,qt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=qt(4),Qt=qt(6),Yt=qt(7),Xt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,en=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,tn=en;function nn(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const rn=/^(?:(?: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])$/,on=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sn=/^((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])$/,an=/^(([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])$/,un=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cn=/^[A-Za-z0-9_-]*$/,ln=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,dn=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,mn=/^\+(?:[0-9]){6,14}[0-9]$/,pn="(?:(?:\\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])))",fn=new RegExp(`^${pn}$`);function hn(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gn(e){return new RegExp(`^${hn(e)}$`)}function vn(e){const t=hn({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${pn}T(?:${i})$`)}const yn=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),_n=/^-?\d+n?$/,bn=/^-?\d+$/,$n=/^-?\d+(?:\.\d+)?/,kn=/^(?:true|false)$/i,wn=/^null$/i,Sn=/^undefined$/i,In=/^[^A-Z]*$/,xn=/^[^a-z]*$/,En=/^[0-9a-fA-F]*$/;function On(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Nn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const zn=On(22,"=="),Tn=Nn(22),Dn=On(27,"="),An=Nn(27),Cn=On(43,"="),Un=Nn(43),Pn=On(64,""),jn=Nn(64),Rn=On(86,"=="),Zn=Nn(86);var Ln=Object.freeze({__proto__:null,base64:un,base64url:cn,bigint:_n,boolean:kn,browserEmail:/^[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])?)*$/,cidrv4:sn,cidrv6:an,cuid:Mt,cuid2:Ft,date:fn,datetime:vn,domain:dn,duration:Wt,e164:mn,email:Xt,emoji:nn,extendedDuration:/^[-+]?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)?)??$/,guid:Kt,hex:En,hostname:ln,html5Email:/^[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])?)*$/,idnEmail:tn,integer:bn,ipv4:rn,ipv6:on,ksuid:Vt,lowercase:In,md5_base64:zn,md5_base64url:Tn,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Gt,null:wn,number:$n,rfc5322Email:/^(([^<>()\[\]\\.,;:\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,}))$/,sha1_base64:Dn,sha1_base64url:An,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Cn,sha256_base64url:Un,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Pn,sha384_base64url:jn,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Rn,sha512_base64url:Zn,sha512_hex:/^[0-9a-fA-F]{128}$/,string:yn,time:gn,ulid:Bt,undefined:Sn,unicodeEmail:en,uppercase:xn,uuid:qt,uuid4:Ht,uuid6:Qt,uuid7:Yt,xid:Jt});const Mn=fe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Fn={number:"number",bigint:"bigint",object:"date"},Bn=fe("$ZodCheckLessThan",(e,t)=>{Mn.init(e,t);const n=Fn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jn=fe("$ZodCheckGreaterThan",(e,t)=>{Mn.init(e,t);const n=Fn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vn=fe("$ZodCheckMultipleOf",(e,t)=>{Mn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===xe(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gn=fe("$ZodCheckNumberFormat",(e,t)=>{Mn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Je[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=bn)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}))}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),Wn=fe("$ZodCheckBigIntFormat",(e,t)=>{Mn.init(e,t);const[n,i]=Ve[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Kn=fe("$ZodCheckMaxSize",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:it(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qn=fe("$ZodCheckMinSize",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:it(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hn=fe("$ZodCheckSizeEquals",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:it(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qn=fe("$ZodCheckMaxLength",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=rt(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Yn=fe("$ZodCheckMinLength",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=rt(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Xn=fe("$ZodCheckLengthEquals",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=rt(i),s=r>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ei=fe("$ZodCheckStringFormat",(e,t)=>{var n,i;Mn.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),ti=fe("$ZodCheckRegex",(e,t)=>{ei.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ni=fe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=In),ei.init(e,t)}),ii=fe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=xn),ei.init(e,t)}),ri=fe("$ZodCheckIncludes",(e,t)=>{Mn.init(e,t);const n=Ze(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),oi=fe("$ZodCheckStartsWith",(e,t)=>{Mn.init(e,t);const n=new RegExp(`^${Ze(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),si=fe("$ZodCheckEndsWith",(e,t)=>{Mn.init(e,t);const n=new RegExp(`.*${Ze(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function ai(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues))}const ui=fe("$ZodCheckProperty",(e,t)=>{Mn.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>ai(n,e,t.property));ai(n,e,t.property)}}),ci=fe("$ZodCheckMimeType",(e,t)=>{Mn.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),li=fe("$ZodCheckOverwrite",(e,t)=>{Mn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});let di=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}};const mi={major:4,minor:1,patch:12},pi=fe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mi;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=Xe(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new ge;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=Xe(e,t)))});else{if(e.issues.length===t)continue;r||(r=Xe(e,t))}}return i?i.then(()=>e):e},n=(n,r,o)=>{if(Xe(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new ge;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new ge;return s.then(e=>t(e,i,o))}return t(s,i,o)}}e["~standard"]={validate:t=>{try{const n=kt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return St(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),fi=fe("$ZodString",(e,t)=>{pi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yn(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),hi=fe("$ZodStringFormat",(e,t)=>{ei.init(e,t),fi.init(e,t)}),gi=fe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Kt),hi.init(e,t)}),vi=fe("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qt(e))}else t.pattern??(t.pattern=qt());hi.init(e,t)}),yi=fe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Xt),hi.init(e,t)}),_i=fe("$ZodURL",(e,t)=>{hi.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ln.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),bi=fe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nn()),hi.init(e,t)}),$i=fe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Gt),hi.init(e,t)}),ki=fe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Mt),hi.init(e,t)}),wi=fe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ft),hi.init(e,t)}),Si=fe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bt),hi.init(e,t)}),Ii=fe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Jt),hi.init(e,t)}),xi=fe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Vt),hi.init(e,t)}),Ei=fe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vn(t)),hi.init(e,t)}),Oi=fe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fn),hi.init(e,t)}),Ni=fe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=gn(t)),hi.init(e,t)}),zi=fe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Wt),hi.init(e,t)}),Ti=fe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rn),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Di=fe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=on),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ai=fe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sn),hi.init(e,t)}),Ci=fe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=an),hi.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Ui(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Pi=fe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=un),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Ui(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function ji(e){if(!cn.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ui(t.padEnd(4*Math.ceil(t.length/4),"="))}const Ri=fe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cn),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{ji(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Zi=fe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mn),hi.init(e,t)});function Li(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Mi=fe("$ZodJWT",(e,t)=>{hi.init(e,t),e._zod.check=n=>{Li(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fi=fe("$ZodCustomStringFormat",(e,t)=>{hi.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Bi=fe("$ZodNumber",(e,t)=>{pi.init(e,t),e._zod.pattern=e._zod.bag.pattern??$n,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Ji=fe("$ZodNumber",(e,t)=>{Gn.init(e,t),Bi.init(e,t)}),Vi=fe("$ZodBoolean",(e,t)=>{pi.init(e,t),e._zod.pattern=kn,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Gi=fe("$ZodBigInt",(e,t)=>{pi.init(e,t),e._zod.pattern=_n,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Wi=fe("$ZodBigInt",(e,t)=>{Wn.init(e,t),Gi.init(e,t)}),Ki=fe("$ZodSymbol",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),qi=fe("$ZodUndefined",(e,t)=>{pi.init(e,t),e._zod.pattern=Sn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Hi=fe("$ZodNull",(e,t)=>{pi.init(e,t),e._zod.pattern=wn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),Qi=fe("$ZodAny",(e,t)=>{pi.init(e,t),e._zod.parse=e=>e}),Yi=fe("$ZodUnknown",(e,t)=>{pi.init(e,t),e._zod.parse=e=>e}),Xi=fe("$ZodNever",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),er=fe("$ZodVoid",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),tr=fe("$ZodDate",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function nr(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues)),t.value[n]=e.value}const ir=fe("$ZodArray",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const s=r[e],a=t.element._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(t=>nr(t,n,e))):nr(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function rr(e,t,n,i){e.issues.length&&t.issues.push(...et(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function or(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=Be(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function sr(e,t,n,i,r,o){const s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type;for(const r of Object.keys(t)){if(a.has(r))continue;if("never"===c){s.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>rr(e,n,r,t))):rr(o,n,r,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const ar=fe("$ZodObject",(e,t)=>{pi.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=we(()=>or(t));Oe(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=Ae,o=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=i.value);const a=t.value;if(!r(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const i=c[e]._zod.run({value:a[e],issues:[]},n);i instanceof Promise?u.push(i.then(n=>rr(n,t,e,a))):rr(i,t,e,a)}return o?sr(u,a,t,n,i.value,e):u.length?Promise.all(u).then(()=>t):t}}),ur=fe("$ZodObjectJIT",(e,t)=>{ar.init(e,t);const n=e._zod.parse,i=we(()=>or(t));let r;const o=Ae,s=!ye.jitless,a=s&&Ce.value,u=t.catchall;let c;e._zod.parse=(l,d)=>{c??(c=i.value);const m=l.value;return o(m)?s&&a&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new di(["shape","payload","ctx"]),n=i.value,r=e=>{const t=Te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let s=0;for(const e of n.keys)o[e]="key_"+s++;t.write("const newResult = {};");for(const e of n.keys){const n=o[e],i=Te(e);t.write(`const ${n} = ${r(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=r(l,d),u?sr([],m,l,d,c,e):l):n(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),l)}});function cr(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!Xe(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>nt(e,i,_e())))}),t)}const lr=fe("$ZodUnion",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Ie(e.source)).join("|")})$`)}});const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then(t=>cr(t,r,e,o)):cr(a,r,e,o)}}),dr=fe("$ZodDiscriminatedUnion",(e,t)=>{lr.init(e,t);const n=e._zod.parse;Oe(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=we(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const s=r.value;if(!Ae(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),mr=fe("$ZodIntersection",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>fr(e,t,n)):fr(e,r,o)}});function pr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Ue(e)&&Ue(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=pr(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=pr(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Xe(e))return e;const i=pr(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const hr=fe("$ZodTuple",(e,t)=>{pi.init(e,t);const n=t.items,i=n.length-[...n].reverse().findIndex(e=>"optional"!==e._zod.optin);e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const a=[];if(!t.rest){const t=s.length>n.length,o=s.length<i-1;if(t||o)return r.issues.push({...t?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),r}let u=-1;for(const e of n){if(u++,u>=s.length&&u>=i)continue;const t=e._zod.run({value:s[u],issues:[]},o);t instanceof Promise?a.push(t.then(e=>gr(e,r,u))):gr(t,r,u)}if(t.rest){const e=s.slice(n.length);for(const n of e){u++;const e=t.rest._zod.run({value:n,issues:[]},o);e instanceof Promise?a.push(e.then(e=>gr(e,r,u))):gr(e,r,u)}}return a.length?Promise.all(a).then(()=>r):r}});function gr(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues)),t.value[n]=e.value}const vr=fe("$ZodRecord",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Ue(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const s=t.valueType._zod.run({value:r[e],issues:[]},i);s instanceof Promise?o.push(s.then(t=>{t.issues.length&&n.issues.push(...et(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...et(e,s.issues)),n.value[e]=s.value)}let a;for(const e in r)s.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:a})}else{n.value={};for(const s of Reflect.ownKeys(r)){if("__proto__"===s)continue;const a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>nt(e,i,_e())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}const u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&n.issues.push(...et(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...et(s,u.issues)),n.value[a.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),yr=fe("$ZodMap",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[s,a]of r){const u=t.keyType._zod.run({value:s,issues:[]},i),c=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([t,o])=>{_r(t,o,n,s,r,e,i)})):_r(u,c,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function _r(e,t,n,i,r,o,s){e.issues.length&&(je.has(typeof i)?n.issues.push(...et(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>nt(e,s,_e()))})),t.issues.length&&(je.has(typeof i)?n.issues.push(...et(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>nt(e,s,_e()))})),n.value.set(e.value,t.value)}const br=fe("$ZodSet",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>$r(e,n))):$r(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function $r(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const kr=fe("$ZodEnum",(e,t)=>{pi.init(e,t);const n=be(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>je.has(typeof e)).map(e=>"string"==typeof e?Ze(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),wr=fe("$ZodLiteral",(e,t)=>{if(pi.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?Ze(e):e?Ze(e.toString()):String(e)).join("|")})$`),e._zod.parse=(n,i)=>{const r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),Sr=fe("$ZodFile",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),Ir=fe("$ZodTransform",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new ve(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new ge;return n.value=r,n}});function xr(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Er=fe("$ZodOptional",(e,t)=>{pi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ie(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>xr(t,e.value)):xr(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Or=fe("$ZodNullable",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ie(e.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Nr=fe("$ZodDefault",(e,t)=>{pi.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>zr(e,t)):zr(i,t)}});function zr(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Tr=fe("$ZodPrefault",(e,t)=>{pi.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Dr=fe("$ZodNonOptional",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>Ar(t,e)):Ar(r,e)}});function Ar(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Cr=fe("$ZodSuccess",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new ve("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Ur=fe("$ZodCatch",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>nt(e,n,_e()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>nt(e,n,_e()))},input:e.value}),e.issues=[]),e)}}),Pr=fe("$ZodNaN",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),jr=fe("$ZodPipe",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Rr(e,t.in,n)):Rr(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Rr(e,t.out,n)):Rr(i,t.out,n)}});function Rr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Zr=fe("$ZodCodec",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Lr(e,t,n)):Lr(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Lr(e,t,n)):Lr(i,t,n)}}});function Lr(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Mr(e,i,t.out,n)):Mr(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Mr(e,i,t.in,n)):Mr(e,i,t.in,n)}}function Mr(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Fr=fe("$ZodReadonly",(e,t)=>{pi.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Br):Br(i)}});function Br(e){return e.value=Object.freeze(e.value),e}const Jr=fe("$ZodTemplateLiteral",(e,t)=>{pi.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!Re.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(Ze(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Vr=fe("$ZodFunction",(e,t)=>(pi.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?yt(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?yt(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await bt(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await bt(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new hr({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Gr=fe("$ZodPromise",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Wr=fe("$ZodLazy",(e,t)=>{pi.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Kr=fe("$ZodCustom",(e,t)=>{Mn.init(e,t),pi.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>qr(t,n,i,e));qr(r,n,i,e)}});function qr(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(ot(e))}}const Hr=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${Fe(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${$e(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Qr=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${Fe(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Yr(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const Xr=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":if(Array.isArray(e))return"масіў";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${Fe(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Yr(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Yr(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const eo=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Невалиден вход: очакван ${e.expected}, получен ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${Fe(e.values[0])}`:`Невалидна опция: очаквано едно от ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const to=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${Fe(e.values[0])}`:`Opció invàlida: s'esperava una de ${$e(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const no=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"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(e))return"pole";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${Fe(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${$e(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const io=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function n(t){return e[t]??null}function i(e){return t[e]??e}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Ugyldigt input: forventede ${i(e.expected)}, fik ${i((e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tal";case"object":return Array.isArray(e)?"liste":null===e?"null":Object.getPrototypeOf(e)!==Object.prototype&&e.constructor?e.constructor.name:"objekt"}return t})(e.input))}`;case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${Fe(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${$e(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=n(e.origin),o=i(e.origin);return r?`For stor: forventede ${o??"value"} ${r.verb} ${t} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=n(e.origin),o=i(e.origin);return r?`For lille: forventede ${o} ${r.verb} ${t} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${r[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const ro=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":if(Array.isArray(e))return"Array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${Fe(e.values[0])}`:`Ungültige Option: erwartet eine von ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const oo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${e.expected}, received ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Fe(e.values[0])}`:`Invalid option: expected one of ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function so(){return{localeError:oo()}}const ao=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${e.expected}, riceviĝis ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":if(Array.isArray(e))return"tabelo";if(null===e)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${Fe(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const uo=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(t){return e[t]??null}function i(e){return t[e]??e}const r={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 e=>{switch(e.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(e.expected)}, recibido ${i((e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":return Array.isArray(e)?"array":null===e?"null":Object.getPrototypeOf(e)!==Object.prototype?e.constructor.name:"object"}return t})(e.input))}`;case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${Fe(e.values[0])}`:`Opción inválida: se esperaba una de ${$e(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=n(e.origin),o=i(e.origin);return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${t}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=n(e.origin),o=i(e.origin);return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${t}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${r[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(e.origin)}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(e.origin)}`}}};const co=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"آرایه";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} دریافت شد`;case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${Fe(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${$e(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${$e(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const lo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${Fe(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${$e(e.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"}}};const mo=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Entrée invalide : ${e.expected} attendu, ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":if(Array.isArray(e))return"tableau";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} reçu`;case"invalid_value":return 1===e.values.length?`Entrée invalide : ${Fe(e.values[0])} attendu`:`Option invalide : une valeur parmi ${$e(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Trop grand : ${e.origin??"valeur"} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Trop petit : ${e.origin} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${$e(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const po=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Entrée invalide : attendu ${e.expected}, reçu ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${Fe(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${$e(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const fo=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`קלט לא תקין: צריך ${e.expected}, התקבל ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`קלט לא תקין: צריך ${Fe(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`גדול מדי: ${e.origin??"value"} צריך להיות ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`גדול מדי: ${e.origin??"value"} צריך להיות ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()} ${i.unit}`:`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:"ends_with"===t.format?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:"includes"===t.format?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:"regex"===t.format?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${n[t.format]??e.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case"unrecognized_keys":return`מפתח${e.keys.length>1?"ות":""} לא מזוה${e.keys.length>1?"ים":"ה"}: ${$e(e.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${e.origin}`;case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${e.origin}`}}};const ho=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":if(Array.isArray(e))return"tömb";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${Fe(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};const go=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input tidak valid: diharapkan ${e.expected}, diterima ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${Fe(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const vo=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return e=>{switch(e.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":if(Array.isArray(e))return"fylki";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} þar sem á að vera ${e.expected}`;case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${Fe(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const yo=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input non valido: atteso ${e.expected}, ricevuto ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":if(Array.isArray(e))return"vettore";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${Fe(e.values[0])}`:`Opzione non valida: atteso uno tra ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const _o=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`無効な入力: ${e.expected}が期待されましたが、${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":if(Array.isArray(e))return"配列";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}が入力されました`;case"invalid_value":return 1===e.values.length?`無効な入力: ${Fe(e.values[0])}が期待されました`:`無効な選択: ${$e(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${$e(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const bo=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return e=>{switch(e.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${e.expected}, მიღებული ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":if(Array.isArray(e))return"მასივი";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t})(e.input)}`;case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${Fe(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${$e(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${$e(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const $o=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":if(Array.isArray(e))return"អារេ (Array)";if(null===e)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Fe(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${$e(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function ko(){return{localeError:$o()}}const wo=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}입니다`;case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${Fe(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${$e(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${$e(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const So=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return void 0===t?"nežinomas objektas":null===t?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Io=e=>e.charAt(0).toUpperCase()+e.slice(1);function xo(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const Eo=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return e=>{switch(e.code){case"invalid_type":return`Gautas tipas ${i=e.input,So(typeof i,i)}, o tikėtasi - ${So(e.expected)}`;case"invalid_value":return 1===e.values.length?`Privalo būti ${Fe(e.values[0])}`:`Privalo būti vienas iš ${$e(e.values,"|")} pasirinkimų`;case"too_big":{const n=So(e.origin),i=t(e.origin,xo(Number(e.maximum)),e.inclusive??!1,"smaller");if(i?.verb)return`${Io(n??e.origin??"reikšmė")} ${i.verb} ${e.maximum.toString()} ${i.unit??"elementų"}`;const r=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Io(n??e.origin??"reikšmė")} turi būti ${r} ${e.maximum.toString()} ${i?.unit}`}case"too_small":{const n=So(e.origin),i=t(e.origin,xo(Number(e.minimum)),e.inclusive??!1,"bigger");if(i?.verb)return`${Io(n??e.origin??"reikšmė")} ${i.verb} ${e.minimum.toString()} ${i.unit??"elementų"}`;const r=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Io(n??e.origin??"reikšmė")} turi būti ${r} ${e.minimum.toString()} ${i?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${$e(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=So(e.origin);return`${Io(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}var i}};const Oo=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Грешен внес: се очекува ${e.expected}, примено ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":if(Array.isArray(e))return"низа";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Fe(e.values[0])}`:`Грешана опција: се очекува една ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const No=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input tidak sah: dijangka ${e.expected}, diterima ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${Fe(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${$e(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const zo=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ongeldige invoer: verwacht ${e.expected}, ontving ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${Fe(e.values[0])}`:`Ongeldige optie: verwacht één van ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Te lang: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} bevat`:`Te lang: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const To=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ugyldig input: forventet ${e.expected}, fikk ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${Fe(e.values[0])}`:`Ugyldig valg: forventet en av ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Do=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Fâsit giren: umulan ${e.expected}, alınan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":if(Array.isArray(e))return"saf";if(null===e)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${Fe(e.values[0])}`:`Fâsit tercih: mûteberler ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Ao=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ناسم ورودي: باید ${e.expected} وای, مګر ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"ارې";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} ترلاسه شو`;case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${Fe(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${$e(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Co=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":if(Array.isArray(e))return"tablica";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${Fe(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Uo=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Tipo inválido: esperado ${e.expected}, recebido ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"array";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${Fe(e.values[0])}`:`Opção inválida: esperada uma das ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Po(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const jo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Неверный ввод: ожидалось ${e.expected}, получено ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"массив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${Fe(e.values[0])}`:`Неверный вариант: ожидалось одно из ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Po(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Po(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Ro=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":if(Array.isArray(e))return"tabela";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${Fe(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const Zo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${e.expected}, fick ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":if(Array.isArray(e))return"lista";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${Fe(e.values[0])}`:`Ogiltigt val: förväntade en av ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Lo=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":if(Array.isArray(e))return"அணி";if(null===e)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Fe(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${$e(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Mo=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":if(Array.isArray(e))return"อาร์เรย์ (Array)";if(null===e)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${Fe(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${$e(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Fo=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Geçersiz değer: beklenen ${e.expected}, alınan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${Fe(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const Bo=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${Fe(e.values[0])}`:`Неправильна опція: очікується одне з ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Jo(){return{localeError:Bo()}}const Vo=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`غلط ان پٹ: ${e.expected} متوقع تھا، ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":if(Array.isArray(e))return"آرے";if(null===e)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} موصول ہوا`;case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${Fe(e.values[0])} متوقع تھا`:`غلط آپشن: ${$e(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${$e(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Go=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":if(Array.isArray(e))return"mảng";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${Fe(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${$e(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const Wo=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`无效输入:期望 ${e.expected},实际接收 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":if(Array.isArray(e))return"数组";if(null===e)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`无效输入:期望 ${Fe(e.values[0])}`:`无效选项:期望以下之一 ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Ko=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`無效的輸入值:預期為 ${e.expected},但收到 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${Fe(e.values[0])}`:`無效的選項:預期為以下其中之一 ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${$e(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const qo=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return e=>{switch(e.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${e.expected}, àmọ̀ a rí ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nọ́mbà";case"object":if(Array.isArray(e))return"akopọ";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${Fe(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${$e(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Ho=Object.freeze({__proto__:null,ar:function(){return{localeError:Hr()}},az:function(){return{localeError:Qr()}},be:function(){return{localeError:Xr()}},bg:function(){return{localeError:eo()}},ca:function(){return{localeError:to()}},cs:function(){return{localeError:no()}},da:function(){return{localeError:io()}},de:function(){return{localeError:ro()}},en:so,eo:function(){return{localeError:ao()}},es:function(){return{localeError:uo()}},fa:function(){return{localeError:co()}},fi:function(){return{localeError:lo()}},fr:function(){return{localeError:mo()}},frCA:function(){return{localeError:po()}},he:function(){return{localeError:fo()}},hu:function(){return{localeError:ho()}},id:function(){return{localeError:go()}},is:function(){return{localeError:vo()}},it:function(){return{localeError:yo()}},ja:function(){return{localeError:_o()}},ka:function(){return{localeError:bo()}},kh:function(){return ko()},km:ko,ko:function(){return{localeError:wo()}},lt:function(){return{localeError:Eo()}},mk:function(){return{localeError:Oo()}},ms:function(){return{localeError:No()}},nl:function(){return{localeError:zo()}},no:function(){return{localeError:To()}},ota:function(){return{localeError:Do()}},pl:function(){return{localeError:Co()}},ps:function(){return{localeError:Ao()}},pt:function(){return{localeError:Uo()}},ru:function(){return{localeError:jo()}},sl:function(){return{localeError:Ro()}},sv:function(){return{localeError:Zo()}},ta:function(){return{localeError:Lo()}},th:function(){return{localeError:Mo()}},tr:function(){return{localeError:Fo()}},ua:function(){return Jo()},uk:Jo,ur:function(){return{localeError:Vo()}},vi:function(){return{localeError:Go()}},yo:function(){return{localeError:qo()}},zhCN:function(){return{localeError:Wo()}},zhTW:function(){return{localeError:Ko()}}});const Qo=Symbol("ZodOutput"),Yo=Symbol("ZodInput");let Xo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function es(){return new Xo}const ts=es();function ns(e,t){return new e({type:"string",...Me(t)})}function is(e,t){return new e({type:"string",coerce:!0,...Me(t)})}function rs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function os(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function ss(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function as(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function us(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function cs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function ls(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function ds(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function ms(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function ps(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function fs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function hs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function gs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function vs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function ys(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function _s(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function bs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function $s(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function ks(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function ws(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function Ss(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function Is(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}const xs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Es(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function Os(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function Ns(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function zs(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function Ts(e,t){return new e({type:"number",checks:[],...Me(t)})}function Ds(e,t){return new e({type:"number",coerce:!0,checks:[],...Me(t)})}function As(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function Cs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Me(t)})}function Us(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Me(t)})}function Ps(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Me(t)})}function js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Me(t)})}function Rs(e,t){return new e({type:"boolean",...Me(t)})}function Zs(e,t){return new e({type:"boolean",coerce:!0,...Me(t)})}function Ls(e,t){return new e({type:"bigint",...Me(t)})}function Ms(e,t){return new e({type:"bigint",coerce:!0,...Me(t)})}function Fs(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Me(t)})}function Bs(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Me(t)})}function Js(e,t){return new e({type:"symbol",...Me(t)})}function Vs(e,t){return new e({type:"undefined",...Me(t)})}function Gs(e,t){return new e({type:"null",...Me(t)})}function Ws(e){return new e({type:"any"})}function Ks(e){return new e({type:"unknown"})}function qs(e,t){return new e({type:"never",...Me(t)})}function Hs(e,t){return new e({type:"void",...Me(t)})}function Qs(e,t){return new e({type:"date",...Me(t)})}function Ys(e,t){return new e({type:"date",coerce:!0,...Me(t)})}function Xs(e,t){return new e({type:"nan",...Me(t)})}function ea(e,t){return new Bn({check:"less_than",...Me(t),value:e,inclusive:!1})}function ta(e,t){return new Bn({check:"less_than",...Me(t),value:e,inclusive:!0})}function na(e,t){return new Jn({check:"greater_than",...Me(t),value:e,inclusive:!1})}function ia(e,t){return new Jn({check:"greater_than",...Me(t),value:e,inclusive:!0})}function ra(e){return na(0,e)}function oa(e){return ea(0,e)}function sa(e){return ta(0,e)}function aa(e){return ia(0,e)}function ua(e,t){return new Vn({check:"multiple_of",...Me(t),value:e})}function ca(e,t){return new Kn({check:"max_size",...Me(t),maximum:e})}function la(e,t){return new qn({check:"min_size",...Me(t),minimum:e})}function da(e,t){return new Hn({check:"size_equals",...Me(t),size:e})}function ma(e,t){return new Qn({check:"max_length",...Me(t),maximum:e})}function pa(e,t){return new Yn({check:"min_length",...Me(t),minimum:e})}function fa(e,t){return new Xn({check:"length_equals",...Me(t),length:e})}function ha(e,t){return new ti({check:"string_format",format:"regex",...Me(t),pattern:e})}function ga(e){return new ni({check:"string_format",format:"lowercase",...Me(e)})}function va(e){return new ii({check:"string_format",format:"uppercase",...Me(e)})}function ya(e,t){return new ri({check:"string_format",format:"includes",...Me(t),includes:e})}function _a(e,t){return new oi({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function ba(e,t){return new si({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function $a(e,t,n){return new ui({check:"property",property:e,schema:t,...Me(n)})}function ka(e,t){return new ci({check:"mime_type",mime:e,...Me(t)})}function wa(e){return new li({check:"overwrite",tx:e})}function Sa(e){return wa(t=>t.normalize(e))}function Ia(){return wa(e=>e.trim())}function xa(){return wa(e=>e.toLowerCase())}function Ea(){return wa(e=>e.toUpperCase())}function Oa(e,t,n){return new e({type:"array",element:t,...Me(n)})}function Na(e,t){return new e({type:"file",...Me(t)})}function za(e,t,n){const i=Me(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function Ta(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function Da(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(ot(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(ot(i))}},e(n.value,n)));return t}function Aa(e,t){const n=new Mn({check:"custom",...Me(t)});return n._zod.check=e,n}function Ca(e,t){const n=Me(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),s=new Set(r),a=e.Codec??Zr,u=e.Boolean??Vi,c=new a({type:"pipe",in:new(e.String??fi)({type:"string",error:n.error}),out:new u({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!s.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function Ua(e,t,n,i={}){const r=Me(i),o={...Me(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}let Pa=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??ts,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,t={path:[],schemaPath:[]}){var n;const i=e._zod.def,r={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(e);if(o){o.count++;return t.schemaPath.includes(e)&&(o.cycle=t.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const n={...t,schemaPath:[...t.schemaPath,e],path:t.path},o=e._zod.parent;if(o)s.ref=o,this.process(o,n),this.seen.get(o).isParent=!0;else{const t=s.schema;switch(i.type){case"string":{const n=t;n.type="string";const{minimum:i,maximum:o,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof o&&(n.maxLength=o),a&&(n.format=r[a]??a,""===n.format&&delete n.format),c&&(n.contentEncoding=c),u&&u.size>0){const e=[...u];1===e.length?n.pattern=e[0].source:e.length>1&&(s.schema.allOf=[...e.map(e=>({..."draft-7"===this.target||"draft-4"===this.target||"openapi-3.0"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{const n=t,{minimum:i,maximum:r,format:o,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:u}=e._zod.bag;"string"==typeof o&&o.includes("int")?n.type="integer":n.type="number","number"==typeof u&&("draft-4"===this.target||"openapi-3.0"===this.target?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&"draft-4"!==this.target&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof a&&("draft-4"===this.target||"openapi-3.0"===this.target?(n.maximum=a,n.exclusiveMaximum=!0):n.exclusiveMaximum=a),"number"==typeof r&&(n.maximum=r,"number"==typeof a&&"draft-4"!==this.target&&(a<=r?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof s&&(n.multipleOf=s);break}case"boolean":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":"openapi-3.0"===this.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":t.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":{const r=t,{minimum:o,maximum:s}=e._zod.bag;"number"==typeof o&&(r.minItems=o),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=this.process(i.element,{...n,path:[...n.path,"items"]});break}case"object":{const e=t;e.type="object",e.properties={};const r=i.shape;for(const t in r)e.properties[t]=this.process(r[t],{...n,path:[...n.path,"properties",t]});const o=new Set(Object.keys(r)),s=new Set([...o].filter(e=>{const t=i.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));s.size>0&&(e.required=Array.from(s)),"never"===i.catchall?._zod.def.type?e.additionalProperties=!1:i.catchall?i.catchall&&(e.additionalProperties=this.process(i.catchall,{...n,path:[...n.path,"additionalProperties"]})):"output"===this.io&&(e.additionalProperties=!1);break}case"union":{const e=t,r=i.options.map((e,t)=>this.process(e,{...n,path:[...n.path,"anyOf",t]}));e.anyOf=r;break}case"intersection":{const e=t,r=this.process(i.left,{...n,path:[...n.path,"allOf",0]}),o=this.process(i.right,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,a=[...s(r)?r.allOf:[r],...s(o)?o.allOf:[o]];e.allOf=a;break}case"tuple":{const r=t;r.type="array";const o="draft-2020-12"===this.target?"prefixItems":"items",s="draft-2020-12"===this.target||"openapi-3.0"===this.target?"items":"additionalItems",a=i.items.map((e,t)=>this.process(e,{...n,path:[...n.path,o,t]})),u=i.rest?this.process(i.rest,{...n,path:[...n.path,s,..."openapi-3.0"===this.target?[i.items.length]:[]]}):null;"draft-2020-12"===this.target?(r.prefixItems=a,u&&(r.items=u)):"openapi-3.0"===this.target?(r.items={anyOf:a},u&&r.items.anyOf.push(u),r.minItems=a.length,u||(r.maxItems=a.length)):(r.items=a,u&&(r.additionalItems=u));const{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l);break}case"record":{const e=t;e.type="object","draft-7"!==this.target&&"draft-2020-12"!==this.target||(e.propertyNames=this.process(i.keyType,{...n,path:[...n.path,"propertyNames"]})),e.additionalProperties=this.process(i.valueType,{...n,path:[...n.path,"additionalProperties"]});break}case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":{const e=t,n=be(i.entries);n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),e.enum=n;break}case"literal":{const e=t,n=[];for(const e of i.values)if(void 0===e){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(e))}else n.push(e);if(0===n.length);else if(1===n.length){const t=n[0];e.type=null===t?"null":typeof t,"draft-4"===this.target||"openapi-3.0"===this.target?e.enum=[t]:e.const=t}else n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),n.every(e=>"boolean"==typeof e)&&(e.type="string"),n.every(e=>null===e)&&(e.type="null"),e.enum=n;break}case"file":{const n=t,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:r,maximum:o,mime:s}=e._zod.bag;void 0!==r&&(i.minLength=r),void 0!==o&&(i.maxLength=o),s?1===s.length?(i.contentMediaType=s[0],Object.assign(n,i)):n.anyOf=s.map(e=>({...i,contentMediaType:e})):Object.assign(n,i);break}case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":{const e=this.process(i.innerType,n);"openapi-3.0"===this.target?(s.ref=i.innerType,t.nullable=!0):t.anyOf=[e,{type:"null"}];break}case"nonoptional":case"promise":case"optional":this.process(i.innerType,n),s.ref=i.innerType;break;case"success":t.type="boolean";break;case"default":this.process(i.innerType,n),s.ref=i.innerType,t.default=JSON.parse(JSON.stringify(i.defaultValue));break;case"prefault":this.process(i.innerType,n),s.ref=i.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break;case"catch":{let e;this.process(i.innerType,n),s.ref=i.innerType;try{e=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{const n=t,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source;break}case"pipe":{const e="input"===this.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;this.process(e,n),s.ref=e;break}case"readonly":this.process(i.innerType,n),s.ref=i.innerType,t.readOnly=!0;break;case"lazy":{const t=e._zod.innerType;this.process(t,n),s.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if("throw"===this.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")}}}const u=this.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===this.io&&Ra(e)&&(delete s.schema.examples,delete s.schema.default),"input"===this.io&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault;return this.seen.get(e).schema}emit(e,t){const n={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},i=this.seen.get(e);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=e=>{const t="draft-2020-12"===this.target?"$defs":"definitions";if(n.external){const i=n.external.registry.get(e[0])?.id,r=n.external.uri??(e=>e);if(i)return{ref:r(i)};const o=e[1].defId??e[1].schema.id??"schema"+this.counter++;return e[1].defId=o,{defId:o,ref:`${r("__shared")}#/${t}/${o}`}}if(e[1]===i)return{ref:"#"};const r=`#/${t}/`,o=e[1].schema.id??"__schema"+this.counter++;return{defId:o,ref:r+o}},o=e=>{if(e[1].schema.$ref)return;const t=e[1],{ref:n,defId:i}=r(e);t.def={...t.schema},i&&(t.defId=i);const o=t.schema;for(const e in o)delete o[e];o.$ref=n};if("throw"===n.cycles)for(const e of this.seen.entries()){const t=e[1];if(t.cycle)throw new Error(`Cycle detected: #/${t.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const t of this.seen.entries()){const i=t[1];if(e===t[0]){o(t);continue}if(n.external){const i=n.external.registry.get(t[0])?.id;if(e!==t[0]&&i){o(t);continue}}const r=this.metadataRegistry.get(t[0])?.id;r?o(t):(i.cycle||i.count>1&&"ref"===n.reused)&&o(t)}const s=(e,t)=>{const n=this.seen.get(e),i=n.def??n.schema,r={...i};if(null===n.ref)return;const o=n.ref;if(n.ref=null,o){s(o,t);const e=this.seen.get(o).schema;!e.$ref||"draft-7"!==t.target&&"draft-4"!==t.target&&"openapi-3.0"!==t.target?(Object.assign(i,e),Object.assign(i,r)):(i.allOf=i.allOf??[],i.allOf.push(e))}n.isParent||this.override({zodSchema:e,jsonSchema:i,path:n.path??[]})};for(const e of[...this.seen.entries()].reverse())s(e[0],{target:this.target});const a={};if("draft-2020-12"===this.target?a.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?a.$schema="http://json-schema.org/draft-07/schema#":"draft-4"===this.target?a.$schema="http://json-schema.org/draft-04/schema#":"openapi-3.0"===this.target||console.warn(`Invalid target: ${this.target}`),n.external?.uri){const t=n.external.registry.get(e)?.id;if(!t)throw new Error("Schema is missing an `id` property");a.$id=n.external.uri(t)}Object.assign(a,i.def);const u=n.external?.defs??{};for(const e of this.seen.entries()){const t=e[1];t.def&&t.defId&&(u[t.defId]=t.def)}n.external||Object.keys(u).length>0&&("draft-2020-12"===this.target?a.$defs=u:a.definitions=u);try{return JSON.parse(JSON.stringify(a))}catch(e){throw new Error("Error converting schema to JSON.")}}};function ja(e,t){if(e instanceof Xo){const n=new Pa(t),i={};for(const t of e._idmap.entries()){const[e,i]=t;n.process(i)}const r={},o={registry:e,uri:t?.uri,defs:i};for(const i of e._idmap.entries()){const[e,s]=i;r[e]=n.emit(s,{...t,external:o})}if(Object.keys(i).length>0){const e="draft-2020-12"===n.target?"$defs":"definitions";r.__shared={[e]:i}}return{schemas:r}}const n=new Pa(t);return n.process(e),n.emit(e,t)}function Ra(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.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":case"custom":case"success":case"catch":case"function":return!1;case"array":return Ra(i.element,n);case"object":for(const e in i.shape)if(Ra(i.shape[e],n))return!0;return!1;case"union":for(const e of i.options)if(Ra(e,n))return!0;return!1;case"intersection":return Ra(i.left,n)||Ra(i.right,n);case"tuple":for(const e of i.items)if(Ra(e,n))return!0;return!(!i.rest||!Ra(i.rest,n));case"record":case"map":return Ra(i.keyType,n)||Ra(i.valueType,n);case"set":return Ra(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return Ra(i.innerType,n);case"lazy":return Ra(i.getter(),n);case"transform":return!0;case"pipe":return Ra(i.in,n)||Ra(i.out,n)}throw new Error(`Unknown schema type: ${i.type}`)}var Za=Object.freeze({__proto__:null}),La=Object.freeze({__proto__:null,$ZodAny:Qi,$ZodArray:ir,$ZodAsyncError:ge,$ZodBase64:Pi,$ZodBase64URL:Ri,$ZodBigInt:Gi,$ZodBigIntFormat:Wi,$ZodBoolean:Vi,$ZodCIDRv4:Ai,$ZodCIDRv6:Ci,$ZodCUID:ki,$ZodCUID2:wi,$ZodCatch:Ur,$ZodCheck:Mn,$ZodCheckBigIntFormat:Wn,$ZodCheckEndsWith:si,$ZodCheckGreaterThan:Jn,$ZodCheckIncludes:ri,$ZodCheckLengthEquals:Xn,$ZodCheckLessThan:Bn,$ZodCheckLowerCase:ni,$ZodCheckMaxLength:Qn,$ZodCheckMaxSize:Kn,$ZodCheckMimeType:ci,$ZodCheckMinLength:Yn,$ZodCheckMinSize:qn,$ZodCheckMultipleOf:Vn,$ZodCheckNumberFormat:Gn,$ZodCheckOverwrite:li,$ZodCheckProperty:ui,$ZodCheckRegex:ti,$ZodCheckSizeEquals:Hn,$ZodCheckStartsWith:oi,$ZodCheckStringFormat:ei,$ZodCheckUpperCase:ii,$ZodCodec:Zr,$ZodCustom:Kr,$ZodCustomStringFormat:Fi,$ZodDate:tr,$ZodDefault:Nr,$ZodDiscriminatedUnion:dr,$ZodE164:Zi,$ZodEmail:yi,$ZodEmoji:bi,$ZodEncodeError:ve,$ZodEnum:kr,$ZodError:lt,$ZodFile:Sr,$ZodFunction:Vr,$ZodGUID:gi,$ZodIPv4:Ti,$ZodIPv6:Di,$ZodISODate:Oi,$ZodISODateTime:Ei,$ZodISODuration:zi,$ZodISOTime:Ni,$ZodIntersection:mr,$ZodJWT:Mi,$ZodKSUID:xi,$ZodLazy:Wr,$ZodLiteral:wr,$ZodMap:yr,$ZodNaN:Pr,$ZodNanoID:$i,$ZodNever:Xi,$ZodNonOptional:Dr,$ZodNull:Hi,$ZodNullable:Or,$ZodNumber:Bi,$ZodNumberFormat:Ji,$ZodObject:ar,$ZodObjectJIT:ur,$ZodOptional:Er,$ZodPipe:jr,$ZodPrefault:Tr,$ZodPromise:Gr,$ZodReadonly:Fr,$ZodRealError:dt,$ZodRecord:vr,$ZodRegistry:Xo,$ZodSet:br,$ZodString:fi,$ZodStringFormat:hi,$ZodSuccess:Cr,$ZodSymbol:Ki,$ZodTemplateLiteral:Jr,$ZodTransform:Ir,$ZodTuple:hr,$ZodType:pi,$ZodULID:Si,$ZodURL:_i,$ZodUUID:vi,$ZodUndefined:qi,$ZodUnion:lr,$ZodUnknown:Yi,$ZodVoid:er,$ZodXID:Ii,$brand:he,$constructor:fe,$input:Yo,$output:Qo,Doc:di,JSONSchema:Za,JSONSchemaGenerator:Pa,NEVER:pe,TimePrecision:xs,_any:Ws,_array:Oa,_base64:ks,_base64url:ws,_bigint:Ls,_boolean:Rs,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:bs,_cidrv6:$s,_coercedBigint:Ms,_coercedBoolean:Zs,_coercedDate:Ys,_coercedNumber:Ds,_coercedString:is,_cuid:ps,_cuid2:fs,_custom:za,_date:Qs,_decode:Et,_decodeAsync:Tt,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():Pe(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...Me(i)})},_e164:Ss,_email:rs,_emoji:ds,_encode:It,_encodeAsync:Nt,_endsWith:ba,_enum:function(e,t,n){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...Me(n)})},_file:Na,_float32:Cs,_float64:Us,_gt:na,_gte:ia,_guid:os,_includes:ya,_int:As,_int32:Ps,_int64:Fs,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:ys,_ipv6:_s,_isoDate:Os,_isoDateTime:Es,_isoDuration:zs,_isoTime:Ns,_jwt:Is,_ksuid:vs,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:fa,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Me(n)})},_lowercase:ga,_lt:ea,_lte:ta,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...Me(i)})},_max:ta,_maxLength:ma,_maxSize:ca,_mime:ka,_min:ia,_minLength:pa,_minSize:la,_multipleOf:ua,_nan:Xs,_nanoid:ms,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...Me(n)})},_negative:oa,_never:qs,_nonnegative:aa,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...Me(n)})},_nonpositive:sa,_normalize:Sa,_null:Gs,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Ts,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:wa,_parse:vt,_parseAsync:_t,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:ra,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:$a,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...Me(i)})},_refine:Ta,_regex:ha,_safeDecode:Ut,_safeDecodeAsync:Zt,_safeEncode:At,_safeEncodeAsync:jt,_safeParse:$t,_safeParseAsync:wt,_set:function(e,t,n){return new e({type:"set",valueType:t,...Me(n)})},_size:da,_startsWith:_a,_string:ns,_stringFormat:Ua,_stringbool:Ca,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Da,_symbol:Js,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...Me(n)})},_toLowerCase:xa,_toUpperCase:Ea,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Ia,_tuple:function(e,t,n,i){const r=n instanceof pi;return new e({type:"tuple",items:t,rest:r?n:null,...Me(r?i:n)})},_uint32:js,_uint64:Bs,_ulid:hs,_undefined:Vs,_union:function(e,t,n){return new e({type:"union",options:t,...Me(n)})},_unknown:Ks,_uppercase:va,_url:ls,_uuid:ss,_uuidv4:as,_uuidv6:us,_uuidv7:cs,_void:Hs,_xid:gs,clone:Le,config:_e,decode:Ot,decodeAsync:Dt,encode:xt,encodeAsync:zt,flattenError:mt,formatError:pt,globalConfig:ye,globalRegistry:ts,isValidBase64:Ui,isValidBase64URL:ji,isValidJWT:Li,locales:Ho,parse:yt,parseAsync:bt,prettifyError:gt,regexes:Ln,registry:es,safeDecode:Pt,safeDecodeAsync:Lt,safeEncode:Ct,safeEncodeAsync:Rt,safeParse:kt,safeParseAsync:St,toDotPath:ht,toJSONSchema:ja,treeifyError:ft,util:ut,version:mi});const Ma=fe("ZodISODateTime",(e,t)=>{Ei.init(e,t),hu.init(e,t)});function Fa(e){return Es(Ma,e)}const Ba=fe("ZodISODate",(e,t)=>{Oi.init(e,t),hu.init(e,t)});function Ja(e){return Os(Ba,e)}const Va=fe("ZodISOTime",(e,t)=>{Ni.init(e,t),hu.init(e,t)});function Ga(e){return Ns(Va,e)}const Wa=fe("ZodISODuration",(e,t)=>{zi.init(e,t),hu.init(e,t)});function Ka(e){return zs(Wa,e)}var qa=Object.freeze({__proto__:null,ZodISODate:Ba,ZodISODateTime:Ma,ZodISODuration:Wa,ZodISOTime:Va,date:Ja,datetime:Fa,duration:Ka,time:Ga});const Ha=(e,t)=>{lt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>pt(e,t)},flatten:{value:t=>mt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ke,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ke,2)}},isEmpty:{get:()=>0===e.issues.length}})},Qa=fe("ZodError",Ha),Ya=fe("ZodError",Ha,{Parent:Error}),Xa=vt(Ya),eu=_t(Ya),tu=$t(Ya),nu=wt(Ya),iu=It(Ya),ru=Et(Ya),ou=Nt(Ya),su=Tt(Ya),au=At(Ya),uu=Ut(Ya),cu=jt(Ya),lu=Zt(Ya),du=fe("ZodType",(e,t)=>(pi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ze(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Le(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Xa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>tu(e,t,n),e.parseAsync=async(t,n)=>eu(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>nu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>iu(e,t,n),e.decode=(t,n)=>ru(e,t,n),e.encodeAsync=async(t,n)=>ou(e,t,n),e.decodeAsync=async(t,n)=>su(e,t,n),e.safeEncode=(t,n)=>au(e,t,n),e.safeDecode=(t,n)=>uu(e,t,n),e.safeEncodeAsync=async(t,n)=>cu(e,t,n),e.safeDecodeAsync=async(t,n)=>lu(e,t,n),e.refine=(t,n)=>e.check(qc(t,n)),e.superRefine=t=>e.check(Hc(t)),e.overwrite=t=>e.check(wa(t)),e.optional=()=>Sc(e),e.nullable=()=>xc(e),e.nullish=()=>Sc(xc(e)),e.nonoptional=t=>Dc(e,t),e.array=()=>nc(e),e.or=t=>sc([e,t]),e.and=t=>cc(e,t),e.transform=t=>Rc(e,kc(t)),e.default=t=>Oc(e,t),e.prefault=t=>zc(e,t),e.catch=t=>Uc(e,t),e.pipe=t=>Rc(e,t),e.readonly=()=>Mc(e),e.describe=t=>{const n=e.clone();return ts.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ts.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ts.get(e);const n=e.clone();return ts.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),mu=fe("_ZodString",(e,t)=>{fi.init(e,t),du.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ha(...t)),e.includes=(...t)=>e.check(ya(...t)),e.startsWith=(...t)=>e.check(_a(...t)),e.endsWith=(...t)=>e.check(ba(...t)),e.min=(...t)=>e.check(pa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(fa(...t)),e.nonempty=(...t)=>e.check(pa(1,...t)),e.lowercase=t=>e.check(ga(t)),e.uppercase=t=>e.check(va(t)),e.trim=()=>e.check(Ia()),e.normalize=(...t)=>e.check(Sa(...t)),e.toLowerCase=()=>e.check(xa()),e.toUpperCase=()=>e.check(Ea())}),pu=fe("ZodString",(e,t)=>{fi.init(e,t),mu.init(e,t),e.email=t=>e.check(rs(gu,t)),e.url=t=>e.check(ls(_u,t)),e.jwt=t=>e.check(Is(Cu,t)),e.emoji=t=>e.check(ds(bu,t)),e.guid=t=>e.check(os(vu,t)),e.uuid=t=>e.check(ss(yu,t)),e.uuidv4=t=>e.check(as(yu,t)),e.uuidv6=t=>e.check(us(yu,t)),e.uuidv7=t=>e.check(cs(yu,t)),e.nanoid=t=>e.check(ms($u,t)),e.guid=t=>e.check(os(vu,t)),e.cuid=t=>e.check(ps(ku,t)),e.cuid2=t=>e.check(fs(wu,t)),e.ulid=t=>e.check(hs(Su,t)),e.base64=t=>e.check(ks(Tu,t)),e.base64url=t=>e.check(ws(Du,t)),e.xid=t=>e.check(gs(Iu,t)),e.ksuid=t=>e.check(vs(xu,t)),e.ipv4=t=>e.check(ys(Eu,t)),e.ipv6=t=>e.check(_s(Ou,t)),e.cidrv4=t=>e.check(bs(Nu,t)),e.cidrv6=t=>e.check($s(zu,t)),e.e164=t=>e.check(Ss(Au,t)),e.datetime=t=>e.check(Fa(t)),e.date=t=>e.check(Ja(t)),e.time=t=>e.check(Ga(t)),e.duration=t=>e.check(Ka(t))});function fu(e){return ns(pu,e)}const hu=fe("ZodStringFormat",(e,t)=>{hi.init(e,t),mu.init(e,t)}),gu=fe("ZodEmail",(e,t)=>{yi.init(e,t),hu.init(e,t)});const vu=fe("ZodGUID",(e,t)=>{gi.init(e,t),hu.init(e,t)});const yu=fe("ZodUUID",(e,t)=>{vi.init(e,t),hu.init(e,t)});const _u=fe("ZodURL",(e,t)=>{_i.init(e,t),hu.init(e,t)});const bu=fe("ZodEmoji",(e,t)=>{bi.init(e,t),hu.init(e,t)});const $u=fe("ZodNanoID",(e,t)=>{$i.init(e,t),hu.init(e,t)});const ku=fe("ZodCUID",(e,t)=>{ki.init(e,t),hu.init(e,t)});const wu=fe("ZodCUID2",(e,t)=>{wi.init(e,t),hu.init(e,t)});const Su=fe("ZodULID",(e,t)=>{Si.init(e,t),hu.init(e,t)});const Iu=fe("ZodXID",(e,t)=>{Ii.init(e,t),hu.init(e,t)});const xu=fe("ZodKSUID",(e,t)=>{xi.init(e,t),hu.init(e,t)});const Eu=fe("ZodIPv4",(e,t)=>{Ti.init(e,t),hu.init(e,t)});const Ou=fe("ZodIPv6",(e,t)=>{Di.init(e,t),hu.init(e,t)});const Nu=fe("ZodCIDRv4",(e,t)=>{Ai.init(e,t),hu.init(e,t)});const zu=fe("ZodCIDRv6",(e,t)=>{Ci.init(e,t),hu.init(e,t)});const Tu=fe("ZodBase64",(e,t)=>{Pi.init(e,t),hu.init(e,t)});const Du=fe("ZodBase64URL",(e,t)=>{Ri.init(e,t),hu.init(e,t)});const Au=fe("ZodE164",(e,t)=>{Zi.init(e,t),hu.init(e,t)});const Cu=fe("ZodJWT",(e,t)=>{Mi.init(e,t),hu.init(e,t)});const Uu=fe("ZodCustomStringFormat",(e,t)=>{Fi.init(e,t),hu.init(e,t)});const Pu=fe("ZodNumber",(e,t)=>{Bi.init(e,t),du.init(e,t),e.gt=(t,n)=>e.check(na(t,n)),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.lt=(t,n)=>e.check(ea(t,n)),e.lte=(t,n)=>e.check(ta(t,n)),e.max=(t,n)=>e.check(ta(t,n)),e.int=t=>e.check(Zu(t)),e.safe=t=>e.check(Zu(t)),e.positive=t=>e.check(na(0,t)),e.nonnegative=t=>e.check(ia(0,t)),e.negative=t=>e.check(ea(0,t)),e.nonpositive=t=>e.check(ta(0,t)),e.multipleOf=(t,n)=>e.check(ua(t,n)),e.step=(t,n)=>e.check(ua(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ju(e){return Ts(Pu,e)}const Ru=fe("ZodNumberFormat",(e,t)=>{Ji.init(e,t),Pu.init(e,t)});function Zu(e){return As(Ru,e)}const Lu=fe("ZodBoolean",(e,t)=>{Vi.init(e,t),du.init(e,t)});function Mu(e){return Rs(Lu,e)}const Fu=fe("ZodBigInt",(e,t)=>{Gi.init(e,t),du.init(e,t),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.gt=(t,n)=>e.check(na(t,n)),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.lt=(t,n)=>e.check(ea(t,n)),e.lte=(t,n)=>e.check(ta(t,n)),e.max=(t,n)=>e.check(ta(t,n)),e.positive=t=>e.check(na(BigInt(0),t)),e.negative=t=>e.check(ea(BigInt(0),t)),e.nonpositive=t=>e.check(ta(BigInt(0),t)),e.nonnegative=t=>e.check(ia(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ua(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});const Bu=fe("ZodBigIntFormat",(e,t)=>{Wi.init(e,t),Fu.init(e,t)});const Ju=fe("ZodSymbol",(e,t)=>{Ki.init(e,t),du.init(e,t)});const Vu=fe("ZodUndefined",(e,t)=>{qi.init(e,t),du.init(e,t)});const Gu=fe("ZodNull",(e,t)=>{Hi.init(e,t),du.init(e,t)});function Wu(e){return Gs(Gu,e)}const Ku=fe("ZodAny",(e,t)=>{Qi.init(e,t),du.init(e,t)});const qu=fe("ZodUnknown",(e,t)=>{Yi.init(e,t),du.init(e,t)});function Hu(){return Ks(qu)}const Qu=fe("ZodNever",(e,t)=>{Xi.init(e,t),du.init(e,t)});function Yu(e){return qs(Qu,e)}const Xu=fe("ZodVoid",(e,t)=>{er.init(e,t),du.init(e,t)});const ec=fe("ZodDate",(e,t)=>{tr.init(e,t),du.init(e,t),e.min=(t,n)=>e.check(ia(t,n)),e.max=(t,n)=>e.check(ta(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});const tc=fe("ZodArray",(e,t)=>{ir.init(e,t),du.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(pa(t,n)),e.nonempty=t=>e.check(pa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(fa(t,n)),e.unwrap=()=>e.element});function nc(e,t){return Oa(tc,e,t)}const ic=fe("ZodObject",(e,t)=>{ur.init(e,t),du.init(e,t),Oe(e,"shape",()=>t.shape),e.keyof=()=>vc(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Yu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ke(e,t),e.safeExtend=t=>qe(e,t),e.merge=t=>He(e,t),e.pick=t=>Ge(e,t),e.omit=t=>We(e,t),e.partial=(...t)=>Qe(wc,e,t[0]),e.required=(...t)=>Ye(Tc,e,t[0])});function rc(e,t){const n={type:"object",shape:e??{},...Me(t)};return new ic(n)}const oc=fe("ZodUnion",(e,t)=>{lr.init(e,t),du.init(e,t),e.options=t.options});function sc(e,t){return new oc({type:"union",options:e,...Me(t)})}const ac=fe("ZodDiscriminatedUnion",(e,t)=>{oc.init(e,t),dr.init(e,t)});const uc=fe("ZodIntersection",(e,t)=>{mr.init(e,t),du.init(e,t)});function cc(e,t){return new uc({type:"intersection",left:e,right:t})}const lc=fe("ZodTuple",(e,t)=>{hr.init(e,t),du.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function dc(e,t,n){const i=t instanceof pi;return new lc({type:"tuple",items:e,rest:i?t:null,...Me(i?n:t)})}const mc=fe("ZodRecord",(e,t)=>{vr.init(e,t),du.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function pc(e,t,n){return new mc({type:"record",keyType:e,valueType:t,...Me(n)})}const fc=fe("ZodMap",(e,t)=>{yr.init(e,t),du.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const hc=fe("ZodSet",(e,t)=>{br.init(e,t),du.init(e,t),e.min=(...t)=>e.check(la(...t)),e.nonempty=t=>e.check(la(1,t)),e.max=(...t)=>e.check(ca(...t)),e.size=(...t)=>e.check(da(...t))});const gc=fe("ZodEnum",(e,t)=>{kr.init(e,t),du.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new gc({...t,checks:[],...Me(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new gc({...t,checks:[],...Me(i),entries:r})}});function vc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new gc({type:"enum",entries:n,...Me(t)})}const yc=fe("ZodLiteral",(e,t)=>{wr.init(e,t),du.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function _c(e,t){return new yc({type:"literal",values:Array.isArray(e)?e:[e],...Me(t)})}const bc=fe("ZodFile",(e,t)=>{Sr.init(e,t),du.init(e,t),e.min=(t,n)=>e.check(la(t,n)),e.max=(t,n)=>e.check(ca(t,n)),e.mime=(t,n)=>e.check(ka(Array.isArray(t)?t:[t],n))});const $c=fe("ZodTransform",(e,t)=>{Ir.init(e,t),du.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new ve(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(ot(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(ot(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function kc(e){return new $c({type:"transform",transform:e})}const wc=fe("ZodOptional",(e,t)=>{Er.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new wc({type:"optional",innerType:e})}const Ic=fe("ZodNullable",(e,t)=>{Or.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new Ic({type:"nullable",innerType:e})}const Ec=fe("ZodDefault",(e,t)=>{Nr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Oc(e,t){return new Ec({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():Pe(t)}})}const Nc=fe("ZodPrefault",(e,t)=>{Tr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zc(e,t){return new Nc({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():Pe(t)}})}const Tc=fe("ZodNonOptional",(e,t)=>{Dr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dc(e,t){return new Tc({type:"nonoptional",innerType:e,...Me(t)})}const Ac=fe("ZodSuccess",(e,t)=>{Cr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Cc=fe("ZodCatch",(e,t)=>{Ur.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Uc(e,t){return new Cc({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Pc=fe("ZodNaN",(e,t)=>{Pr.init(e,t),du.init(e,t)});const jc=fe("ZodPipe",(e,t)=>{jr.init(e,t),du.init(e,t),e.in=t.in,e.out=t.out});function Rc(e,t){return new jc({type:"pipe",in:e,out:t})}const Zc=fe("ZodCodec",(e,t)=>{jc.init(e,t),Zr.init(e,t)});const Lc=fe("ZodReadonly",(e,t)=>{Fr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mc(e){return new Lc({type:"readonly",innerType:e})}const Fc=fe("ZodTemplateLiteral",(e,t)=>{Jr.init(e,t),du.init(e,t)});const Bc=fe("ZodLazy",(e,t)=>{Wr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Jc(e){return new Bc({type:"lazy",getter:e})}const Vc=fe("ZodPromise",(e,t)=>{Gr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Gc=fe("ZodFunction",(e,t)=>{Vr.init(e,t),du.init(e,t)});function Wc(e){return new Gc({type:"function",input:Array.isArray(e?.input)?dc(e?.input):e?.input??nc(Hu()),output:e?.output??Hu()})}const Kc=fe("ZodCustom",(e,t)=>{Kr.init(e,t),du.init(e,t)});function qc(e,t={}){return Ta(Kc,e,t)}function Hc(e){return Da(e)}var Qc;Qc||(Qc={});var Yc=Object.freeze({__proto__:null,bigint:function(e){return Ms(Fu,e)},boolean:function(e){return Zs(Lu,e)},date:function(e){return Ys(ec,e)},number:function(e){return Ds(Pu,e)},string:function(e){return is(pu,e)}});_e(so());var Xc=Object.freeze({__proto__:null,$brand:he,$input:Yo,$output:Qo,NEVER:pe,TimePrecision:xs,ZodAny:Ku,ZodArray:tc,ZodBase64:Tu,ZodBase64URL:Du,ZodBigInt:Fu,ZodBigIntFormat:Bu,ZodBoolean:Lu,ZodCIDRv4:Nu,ZodCIDRv6:zu,ZodCUID:ku,ZodCUID2:wu,ZodCatch:Cc,ZodCodec:Zc,ZodCustom:Kc,ZodCustomStringFormat:Uu,ZodDate:ec,ZodDefault:Ec,ZodDiscriminatedUnion:ac,ZodE164:Au,ZodEmail:gu,ZodEmoji:bu,ZodEnum:gc,ZodError:Qa,ZodFile:bc,get ZodFirstPartyTypeKind(){return Qc},ZodFunction:Gc,ZodGUID:vu,ZodIPv4:Eu,ZodIPv6:Ou,ZodISODate:Ba,ZodISODateTime:Ma,ZodISODuration:Wa,ZodISOTime:Va,ZodIntersection:uc,ZodIssueCode:{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"},ZodJWT:Cu,ZodKSUID:xu,ZodLazy:Bc,ZodLiteral:yc,ZodMap:fc,ZodNaN:Pc,ZodNanoID:$u,ZodNever:Qu,ZodNonOptional:Tc,ZodNull:Gu,ZodNullable:Ic,ZodNumber:Pu,ZodNumberFormat:Ru,ZodObject:ic,ZodOptional:wc,ZodPipe:jc,ZodPrefault:Nc,ZodPromise:Vc,ZodReadonly:Lc,ZodRealError:Ya,ZodRecord:mc,ZodSet:hc,ZodString:pu,ZodStringFormat:hu,ZodSuccess:Ac,ZodSymbol:Ju,ZodTemplateLiteral:Fc,ZodTransform:$c,ZodTuple:lc,ZodType:du,ZodULID:Su,ZodURL:_u,ZodUUID:yu,ZodUndefined:Vu,ZodUnion:oc,ZodUnknown:qu,ZodVoid:Xu,ZodXID:Iu,_ZodString:mu,_default:Oc,_function:Wc,any:function(){return Ws(Ku)},array:nc,base64:function(e){return ks(Tu,e)},base64url:function(e){return ws(Du,e)},bigint:function(e){return Ls(Fu,e)},boolean:Mu,catch:Uc,check:function(e){const t=new Mn({check:"custom"});return t._zod.check=e,t},cidrv4:function(e){return bs(Nu,e)},cidrv6:function(e){return $s(zu,e)},clone:Le,codec:function(e,t,n){return new Zc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})},coerce:Yc,config:_e,core:La,cuid:function(e){return ps(ku,e)},cuid2:function(e){return fs(wu,e)},custom:function(e,t){return za(Kc,e??(()=>!0),t)},date:function(e){return Qs(ec,e)},decode:ru,decodeAsync:su,discriminatedUnion:function(e,t,n){return new ac({type:"union",options:t,discriminator:e,...Me(n)})},e164:function(e){return Ss(Au,e)},email:function(e){return rs(gu,e)},emoji:function(e){return ds(bu,e)},encode:iu,encodeAsync:ou,endsWith:ba,enum:vc,file:function(e){return Na(bc,e)},flattenError:mt,float32:function(e){return Cs(Ru,e)},float64:function(e){return Us(Ru,e)},formatError:pt,function:Wc,getErrorMap:function(){return _e().customError},globalRegistry:ts,gt:na,gte:ia,guid:function(e){return os(vu,e)},hash:function(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Ln[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ua(Uu,n,i,t)},hex:function(e){return Ua(Uu,"hex",En,e)},hostname:function(e){return Ua(Uu,"hostname",ln,e)},httpUrl:function(e){return ls(_u,{protocol:/^https?$/,hostname:dn,...Me(e)})},includes:ya,instanceof:function(e,t={error:`Input not instance of ${e.name}`}){const n=new Kc({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...Me(t)});return n._zod.bag.Class=e,n},int:Zu,int32:function(e){return Ps(Ru,e)},int64:function(e){return Fs(Bu,e)},intersection:cc,ipv4:function(e){return ys(Eu,e)},ipv6:function(e){return _s(Ou,e)},iso:qa,json:function(e){const t=Jc(()=>sc([fu(e),ju(),Mu(),Wu(),nc(t),pc(fu(),t)]));return t},jwt:function(e){return Is(Cu,e)},keyof:function(e){const t=e._zod.def.shape;return vc(Object.keys(t))},ksuid:function(e){return vs(xu,e)},lazy:Jc,length:fa,literal:_c,locales:Ho,looseObject:function(e,t){return new ic({type:"object",shape:e,catchall:Hu(),...Me(t)})},lowercase:ga,lt:ea,lte:ta,map:function(e,t,n){return new fc({type:"map",keyType:e,valueType:t,...Me(n)})},maxLength:ma,maxSize:ca,mime:ka,minLength:pa,minSize:la,multipleOf:ua,nan:function(e){return Xs(Pc,e)},nanoid:function(e){return ms($u,e)},nativeEnum:function(e,t){return new gc({type:"enum",entries:e,...Me(t)})},negative:oa,never:Yu,nonnegative:aa,nonoptional:Dc,nonpositive:sa,normalize:Sa,null:Wu,nullable:xc,nullish:function(e){return Sc(xc(e))},number:ju,object:rc,optional:Sc,overwrite:wa,parse:Xa,parseAsync:eu,partialRecord:function(e,t,n){const i=Le(e);return i._zod.values=void 0,new mc({type:"record",keyType:i,valueType:t,...Me(n)})},pipe:Rc,positive:ra,prefault:zc,preprocess:function(e,t){return Rc(kc(e),t)},prettifyError:gt,promise:function(e){return new Vc({type:"promise",innerType:e})},property:$a,readonly:Mc,record:pc,refine:qc,regex:ha,regexes:Ln,registry:es,safeDecode:uu,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:cu,safeParse:tu,safeParseAsync:nu,set:function(e,t){return new hc({type:"set",valueType:e,...Me(t)})},setErrorMap:function(e){_e({customError:e})},size:da,startsWith:_a,strictObject:function(e,t){return new ic({type:"object",shape:e,catchall:Yu(),...Me(t)})},string:fu,stringFormat:function(e,t,n={}){return Ua(Uu,e,t,n)},stringbool:(...e)=>Ca({Codec:Zc,Boolean:Lu,String:pu},...e),success:function(e){return new Ac({type:"success",innerType:e})},superRefine:Hc,symbol:function(e){return Js(Ju,e)},templateLiteral:function(e,t){return new Fc({type:"template_literal",parts:e,...Me(t)})},toJSONSchema:ja,toLowerCase:xa,toUpperCase:Ea,transform:kc,treeifyError:ft,trim:Ia,tuple:dc,uint32:function(e){return js(Ru,e)},uint64:function(e){return Bs(Bu,e)},ulid:function(e){return hs(Su,e)},undefined:function(e){return Vs(Vu,e)},union:sc,unknown:Hu,uppercase:va,url:function(e){return ls(_u,e)},util:ut,uuid:function(e){return ss(yu,e)},uuidv4:function(e){return as(yu,e)},uuidv6:function(e){return us(yu,e)},uuidv7:function(e){return cs(yu,e)},void:function(e){return Hs(Xu,e)},xid:function(e){return gs(Iu,e)}});const el="directus:extension",tl=rc({app:fu(),api:fu()}),nl=rc({request:Sc(rc({urls:nc(fu()),methods:nc(sc([_c("GET"),_c("POST"),_c("PATCH"),_c("PUT"),_c("DELETE")]))})),log:Sc(rc({})),sleep:Sc(rc({}))}),il=Sc(rc({enabled:Mu(),requestedScopes:nl})),rl=sc([rc({type:vc(G),name:fu(),source:fu()}),rc({type:vc(V),name:fu(),source:fu()}),rc({type:vc(W),name:fu(),source:tl})]),ol=rc({host:fu(),hidden:Mu().optional()}),sl=rc({type:vc(V),path:fu(),source:fu()}),al=rc({type:vc(G),path:fu(),source:fu(),sandbox:il}),ul=rc({type:vc(W),path:tl,source:tl,sandbox:il}),cl=rc({type:_c("bundle"),partial:Mu().optional(),path:tl,entries:nc(rl)});nc(rl);const ll=ol.and(sc([sl,al,ul,cl]));rc({name:fu(),version:fu(),type:sc([_c("module"),_c("commonjs")]).optional(),description:fu().optional(),icon:fu().optional(),dependencies:pc(fu(),fu()).optional(),devDependencies:pc(fu(),fu()).optional(),[el]:ll});var dl=/^(?:[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 ml(e){if(!function(e){return"string"==typeof e&&dl.test(e)}(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}const pl=[];for(let e=0;e<256;++e)pl.push((e+256).toString(16).slice(1));function fl(e,t=0){return(pl[e[t+0]]+pl[e[t+1]]+pl[e[t+2]]+pl[e[t+3]]+"-"+pl[e[t+4]]+pl[e[t+5]]+"-"+pl[e[t+6]]+pl[e[t+7]]+"-"+pl[e[t+8]]+pl[e[t+9]]+"-"+pl[e[t+10]]+pl[e[t+11]]+pl[e[t+12]]+pl[e[t+13]]+pl[e[t+14]]+pl[e[t+15]]).toLowerCase()}const hl=new Uint8Array(16);function gl(e,t,n,i,r,o){const s="string"==typeof n?function(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}(n):n,a="string"==typeof i?ml(i):i;if("string"==typeof i&&(i=ml(i)),16!==i?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+s.length);if(u.set(a),u.set(s,a.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){if(o??=0,o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let e=0;e<16;++e)r[o+e]=u[e];return r}return fl(u)}function vl(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),t("sha1").update(e).digest()}function yl(e,t,n,i){return gl(80,vl,e,t,n,i)}yl.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",yl.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";const _l={};function bl(e,t,n){let i;{const e=Date.now(),r=crypto.getRandomValues(hl);!function(e,t,n){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(_l,e,r),i=function(e,t,n,i,r=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(i){if(r<0||r+16>i.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`)}else i=new Uint8Array(16),r=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],i[r++]=t/1099511627776&255,i[r++]=t/4294967296&255,i[r++]=t/16777216&255,i[r++]=t/65536&255,i[r++]=t/256&255,i[r++]=255&t,i[r++]=112|n>>>28&15,i[r++]=n>>>20&255,i[r++]=128|n>>>14&63,i[r++]=n>>>6&255,i[r++]=n<<2&255|3&e[10],i[r++]=e[11],i[r++]=e[12],i[r++]=e[13],i[r++]=e[14],i[r++]=e[15],i}(r,_l.msecs,_l.seq,t,n)}return t??fl(i)}function $l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function kl(e){return"string"==typeof e}function wl(e){return kl(e)&&e.trim().length>0}function Sl(e){return"function"==typeof e}const Il=yl.URL;var xl,El,Ol,Nl,zl,Tl,Dl,Al,Cl,Ul,Pl,jl,Rl,Zl,Ll,Ml,Fl,Bl,Jl,Vl,Gl,Wl,Kl,ql,Hl,Ql,Yl,Xl,ed,td,nd,id,rd,od,sd,ad,ud,cd,ld,dd,md,pd,fd,hd,gd,vd,yd,_d,bd,$d,kd,wd,Sd,Id,xd,Ed,Od,Nd,zd,Td,Dd,Ad,Cd={},Ud={};function Pd(){return Nl?Ol:(Nl=1,Ol=class{constructor(e={}){this.points=e.points,this.duration=e.duration,this.blockDuration=e.blockDuration,this.execEvenly=e.execEvenly,this.execEvenlyMinDelayMs=e.execEvenlyMinDelayMs,this.keyPrefix=e.keyPrefix}get points(){return this._points}set points(e){this._points=e>=0?e:4}get duration(){return this._duration}set duration(e){this._duration=void 0===e?1:e}get msDuration(){return 1e3*this.duration}get blockDuration(){return this._blockDuration}set blockDuration(e){this._blockDuration=void 0===e?0:e}get msBlockDuration(){return 1e3*this.blockDuration}get execEvenly(){return this._execEvenly}set execEvenly(e){this._execEvenly=void 0!==e&&Boolean(e)}get execEvenlyMinDelayMs(){return this._execEvenlyMinDelayMs}set execEvenlyMinDelayMs(e){this._execEvenlyMinDelayMs=void 0===e?Math.ceil(this.msDuration/this.points):e}get keyPrefix(){return this._keyPrefix}set keyPrefix(e){if(void 0===e&&(e="rlflx"),"string"!=typeof e)throw new Error("keyPrefix must be string");this._keyPrefix=e}_getKeySecDuration(e={}){return e&&e.customDuration>=0?e.customDuration:this.duration}getKey(e){return this.keyPrefix.length>0?`${this.keyPrefix}:${e}`:e}parseKey(e){return e.substring(this.keyPrefix.length)}consume(){throw new Error("You have to implement the method 'consume'!")}penalty(){throw new Error("You have to implement the method 'penalty'!")}reward(){throw new Error("You have to implement the method 'reward'!")}get(){throw new Error("You have to implement the method 'get'!")}set(){throw new Error("You have to implement the method 'set'!")}block(){throw new Error("You have to implement the method 'block'!")}delete(){throw new Error("You have to implement the method 'delete'!")}})}function jd(){if(Al)return Dl;Al=1;const e=(Tl||(Tl=1,zl=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const e=Date.now();Object.keys(this._keys).forEach(t=>{this._keys[t]<=e&&delete this._keys[t]}),this._addedKeysAmount=Object.keys(this._keys).length}add(e,t){this.addMs(e,1e3*t)}addMs(e,t){this._keys[e]=Date.now()+t,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(e){const t=this._keys[e];if(t&&t>=Date.now()){this.collectExpired();const e=Date.now();return t>=e?t-e:0}return 0}delete(e){e?delete this._keys[e]:Object.keys(this._keys).forEach(e=>{delete this._keys[e]})}}),zl);return Dl=e}function Rd(){return Ul||(Ul=1,Cl=class{constructor(e,t,n,i){this.remainingPoints=void 0===e?0:e,this.msBeforeNext=void 0===t?0:t,this.consumedPoints=void 0===n?0:n,this.isFirstInDuration=void 0!==i&&i}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(e){return this._msBeforeNext=e,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(e){return this._remainingPoints=e,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(e){return this._consumedPoints=e,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(e){this._isFirstInDuration=Boolean(e)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}}),Cl}function Zd(){if(jl)return Pl;jl=1;const e=Pd(),t=jd(),n=Rd();return Pl=class extends e{constructor(e={}){super(e),this.inMemoryBlockOnConsumed=e.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=e.inMemoryBlockDuration,this.insuranceLimiter=e.insuranceLimiter,this._inMemoryBlockedKeys=new t}get client(){return this._client}set client(e){if(void 0===e)throw new Error("storeClient is not set");this._client=e}_afterConsume(e,t,n,i,r,o={}){const s=this._getRateLimiterRes(n,i,r);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&s.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(n,s.msBeforeNext),s.consumedPoints>this.points?t(s):e(s);if(s.consumedPoints>this.points){let e=Promise.resolve();this.blockDuration>0&&s.consumedPoints<=this.points+i&&(s.msBeforeNext=this.msBlockDuration,e=this._block(n,s.consumedPoints,this.msBlockDuration,o)),this.inMemoryBlockOnConsumed>0&&s.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(n,this.inMemoryBlockDuration),s.msBeforeNext=this.msInMemoryBlockDuration),e.then(()=>{t(s)}).catch(e=>{t(e)})}else if(this.execEvenly&&s.msBeforeNext>0&&!s.isFirstInDuration){let t=Math.ceil(s.msBeforeNext/(s.remainingPoints+2));t<this.execEvenlyMinDelayMs&&(t=s.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(e,t,s)}else e(s)}_handleError(t,n,i,r,o,s=!1,a={}){this.insuranceLimiter instanceof e?this.insuranceLimiter[n](o,s,a).then(e=>{i(e)}).catch(e=>{r(e)}):r(t)}getInMemoryBlockMsBeforeExpire(e){return this.inMemoryBlockOnConsumed>0?this._inMemoryBlockedKeys.msBeforeExpire(e):0}get inMemoryBlockOnConsumed(){return this._inMemoryBlockOnConsumed}set inMemoryBlockOnConsumed(e){if(this._inMemoryBlockOnConsumed=e?parseInt(e):0,this.inMemoryBlockOnConsumed>0&&this.points>this.inMemoryBlockOnConsumed)throw new Error('inMemoryBlockOnConsumed option must be greater or equal "points" option')}get inMemoryBlockDuration(){return this._inMemoryBlockDuration}set inMemoryBlockDuration(e){if(this._inMemoryBlockDuration=e?parseInt(e):0,this.inMemoryBlockDuration>0&&0===this.inMemoryBlockOnConsumed)throw new Error("inMemoryBlockOnConsumed option must be set up")}get msInMemoryBlockDuration(){return 1e3*this._inMemoryBlockDuration}get insuranceLimiter(){return this._insuranceLimiter}set insuranceLimiter(t){if(void 0!==t&&!(t instanceof e))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=t,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(e,t,n={}){const i=1e3*t;return this._block(this.getKey(e),this.points+1,i,n)}set(e,t,n,i={}){const r=1e3*(n>=0?n:this.duration);return this._block(this.getKey(e),t,r,i)}consume(e,t=1,i={}){return new Promise((r,o)=>{const s=this.getKey(e),a=this.getInMemoryBlockMsBeforeExpire(s);if(a>0)return o(new n(0,a));this._upsert(s,t,1e3*this._getKeySecDuration(i),!1,i).then(e=>{this._afterConsume(r,o,s,t,e)}).catch(n=>{this._handleError(n,"consume",r,o,e,t,i)})})}penalty(e,t=1,n={}){const i=this.getKey(e);return new Promise((r,o)=>{this._upsert(i,t,1e3*this._getKeySecDuration(n),!1,n).then(e=>{r(this._getRateLimiterRes(i,t,e))}).catch(i=>{this._handleError(i,"penalty",r,o,e,t,n)})})}reward(e,t=1,n={}){const i=this.getKey(e);return new Promise((r,o)=>{this._upsert(i,-t,1e3*this._getKeySecDuration(n),!1,n).then(e=>{r(this._getRateLimiterRes(i,-t,e))}).catch(i=>{this._handleError(i,"reward",r,o,e,t,n)})})}get(e,t={}){const n=this.getKey(e);return new Promise((i,r)=>{this._get(n,t).then(e=>{i(null==e?null:this._getRateLimiterRes(n,0,e))}).catch(n=>{this._handleError(n,"get",i,r,e,t)})})}delete(e,t={}){const n=this.getKey(e);return new Promise((i,r)=>{this._delete(n,t).then(e=>{this._inMemoryBlockedKeys.delete(n),i(e)}).catch(n=>{this._handleError(n,"delete",i,r,e,t)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(e,t,n){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(e,t,i,r={}){return new Promise((o,s)=>{this._upsert(e,t,i,!0,r).then(()=>{o(new n(0,i>0?i:-1,t))}).catch(t=>{this._handleError(t,"block",o,s,this.parseKey(e),i/1e3,r)})})}_get(e,t={}){throw new Error("You have to implement the method '_get'!")}_delete(e,t={}){throw new Error("You have to implement the method '_delete'!")}_upsert(e,t,n,i=!1,r={}){throw new Error("You have to implement the method '_upsert'!")}}}function Ld(){if(ql)return Kl;ql=1;const e=Wl?Gl:(Wl=1,Gl=class{constructor(e,t,n=null){this.value=e,this.expiresAt=t,this.timeoutId=n}get value(){return this._value}set value(e){this._value=parseInt(e)}get expiresAt(){return this._expiresAt}set expiresAt(e){e instanceof Date||!Number.isInteger(e)||(e=new Date(e)),this._expiresAt=e}get timeoutId(){return this._timeoutId}set timeoutId(e){this._timeoutId=e}}),t=Rd();return Kl=class{constructor(){this._storage={}}incrby(e,n,i){if(this._storage[e]){const r=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return!this._storage[e].expiresAt||r>0?(this._storage[e].value=this._storage[e].value+n,new t(0,r,this._storage[e].value,!1)):this.set(e,n,i)}return this.set(e,n,i)}set(n,i,r){const o=1e3*r;return this._storage[n]&&this._storage[n].timeoutId&&clearTimeout(this._storage[n].timeoutId),this._storage[n]=new e(i,o>0?new Date(Date.now()+o):null),o>0&&(this._storage[n].timeoutId=setTimeout(()=>{delete this._storage[n]},o),this._storage[n].timeoutId.unref&&this._storage[n].timeoutId.unref()),new t(0,0===o?-1:o,this._storage[n].value,!0)}get(e){if(this._storage[e]){const n=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return new t(0,n,this._storage[e].value,!1)}return null}delete(e){return!!this._storage[e]&&(this._storage[e].timeoutId&&clearTimeout(this._storage[e].timeoutId),delete this._storage[e],!0)}}}function Md(){if(Ql)return Hl;Ql=1;const e=Pd(),t=Ld(),n=Rd();return Hl=class extends e{constructor(e={}){super(e),this._memoryStorage=new t}consume(e,t=1,n={}){return new Promise((i,r)=>{const o=this.getKey(e),s=this._getKeySecDuration(n);let a=this._memoryStorage.incrby(o,t,s);if(a.remainingPoints=Math.max(this.points-a.consumedPoints,0),a.consumedPoints>this.points)this.blockDuration>0&&a.consumedPoints<=this.points+t&&(a=this._memoryStorage.set(o,a.consumedPoints,this.blockDuration)),r(a);else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let e=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));e<this.execEvenlyMinDelayMs&&(e=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(i,e,a)}else i(a)})}penalty(e,t=1,n={}){const i=this.getKey(e);return new Promise(e=>{const r=this._getKeySecDuration(n),o=this._memoryStorage.incrby(i,t,r);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)})}reward(e,t=1,n={}){const i=this.getKey(e);return new Promise(e=>{const r=this._getKeySecDuration(n),o=this._memoryStorage.incrby(i,-t,r);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)})}block(e,t){const i=1e3*t,r=this.points+1;return this._memoryStorage.set(this.getKey(e),r,t),Promise.resolve(new n(0,0===i?-1:i,r))}set(e,t,i){const r=1e3*(i>=0?i:this.duration);return this._memoryStorage.set(this.getKey(e),t,i),Promise.resolve(new n(0,0===r?-1:r,t))}get(e){const t=this._memoryStorage.get(this.getKey(e));return null!==t&&(t.remainingPoints=Math.max(this.points-t.consumedPoints,0)),Promise.resolve(t)}delete(e){return Promise.resolve(this._memoryStorage.delete(this.getKey(e)))}}}function Fd(){if(Xl)return Yl;Xl=1;const e=_,t=v,n=Pd(),i=Md(),r=Rd(),o="rate_limiter_flexible";let s=null;const a=function(e,t,n,i){let r;r=null===i||!0===i||!1===i?i:{remainingPoints:i.remainingPoints,msBeforeNext:i.msBeforeNext,consumedPoints:i.consumedPoints,isFirstInDuration:i.isFirstInDuration},e.send({channel:o,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:r})},u=function(e){setTimeout(()=>{this._initiated?process.send(e):void 0!==this._promises[e.promiseId]&&u.call(this,e)},30)},c=function(e,t,n,i,r){const s={channel:o,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:i,opts:r}};this._initiated?process.send(s):u.call(this,s)},l=function(e,t){if(!t||t.channel!==o||void 0===this._rateLimiters[t.keyPrefix])return!1;let n;switch(t.func){case"consume":n=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":n=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":n=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":n=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":n=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":n=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}n&&n.then(n=>{a(e,t,"resolve",n)}).catch(n=>{a(e,t,"reject",n)})},d=function(e){if(!e||e.channel!==o||e.keyPrefix!==this.keyPrefix)return!1;if(this._promises[e.promiseId]){let t;switch(clearTimeout(this._promises[e.promiseId].timeoutId),t=null===e.data||!0===e.data||!1===e.data?e.data:new r(e.data.remainingPoints,e.data.msBeforeNext,e.data.consumedPoints,e.data.isFirstInDuration),e.type){case"resolve":this._promises[e.promiseId].resolve(t);break;case"reject":this._promises[e.promiseId].reject(t);break;default:throw new Error(`RateLimiterCluster: no such message type '${e.type}'`)}delete this._promises[e.promiseId]}},m=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},p=function(e,n){const i=process.hrtime();let r=i[0].toString()+i[1].toString();return void 0!==this._promises[r]&&(r+=t.randomBytes(12).toString("base64")),this._promises[r]={resolve:e,reject:n,timeoutId:setTimeout(()=>{delete this._promises[r],n(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},r};return Yl={RateLimiterClusterMaster:class{constructor(){if(s)return s;this._rateLimiters={},e.setMaxListeners(0),e.on("message",(e,t)=>{t&&t.channel===o&&"init"===t.type?(void 0===this._rateLimiters[t.opts.keyPrefix]&&(this._rateLimiters[t.opts.keyPrefix]=new i(t.opts)),e.send({channel:o,type:"init",keyPrefix:t.opts.keyPrefix})):l.call(this,e,t)}),s=this}},RateLimiterClusterMasterPM2:class{constructor(e){if(s)return s;this._rateLimiters={},e.launchBus((t,n)=>{n.on("process:msg",t=>{const n=t.raw;if(n&&n.channel===o&&"init"===n.type)void 0===this._rateLimiters[n.opts.keyPrefix]&&(this._rateLimiters[n.opts.keyPrefix]=new i(n.opts)),e.sendDataToProcessId(t.process.pm_id,{data:{},topic:o,channel:o,type:"init",keyPrefix:n.opts.keyPrefix},(e,t)=>{e&&console.log(e,t)});else{l.call(this,{send:n=>{const i=n;i.topic=o,void 0===i.data&&(i.data={}),e.sendDataToProcessId(t.process.pm_id,i,(e,t)=>{e&&console.log(e,t)})}},n)}})}),s=this}},RateLimiterCluster:class extends n{get timeoutMs(){return this._timeoutMs}set timeoutMs(e){this._timeoutMs=void 0===e?5e3:Math.abs(parseInt(e))}constructor(e={}){super(e),process.setMaxListeners(0),this.timeoutMs=e.timeoutMs,this._initiated=!1,process.on("message",e=>{e&&e.channel===o&&"init"===e.type&&e.keyPrefix===this.keyPrefix?this._initiated=!0:d.call(this,e)}),process.send({channel:o,type:"init",opts:m.call(this)}),this._promises={}}consume(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"consume",o,e,t,n)})}penalty(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"penalty",o,e,t,n)})}reward(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"reward",o,e,t,n)})}block(e,t,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"block",o,e,t,n)})}get(e,t={}){return new Promise((n,i)=>{const r=p.call(this,n,i);c.call(this,"get",r,e,t)})}delete(e,t={}){return new Promise((n,i)=>{const r=p.call(this,n,i);c.call(this,"delete",r,e,t)})}}}}function Bd(){if(cd)return ud;cd=1;const e=ad?sd:(ad=1,sd=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="CustomError",this.message=e,t&&(this.extra=t)}}),t=4294967295,n="limiter";ud=class{constructor(e,n={maxQueueSize:t}){this._queueLimiters={KEY_DEFAULT:new i(e,n)},this._limiterFlexible=e,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(e=n){return this._queueLimiters[e]?this._queueLimiters[e].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(e,t=n){return this._queueLimiters[t]||(this._queueLimiters[t]=new i(this._limiterFlexible,{key:t,maxQueueSize:this._maxQueueSize})),this._queueLimiters[t].removeTokens(e)}};class i{constructor(e,i={maxQueueSize:t,key:n}){this._key=i.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=e,this._maxQueueSize=i.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then(e=>null!==e?e.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((i,r)=>{t>n._limiterFlexible.points?r(new e(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`)):n._queue.length>0?n._queueRequest.call(n,i,r,t):n._limiterFlexible.consume(n._key,t).then(e=>{i(e.remainingPoints)}).catch(e=>{e instanceof Error?r(e):(n._queueRequest.call(n,i,r,t),null===n._waitTimeout&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),e.msBeforeNext)))})})}_queueRequest(t,n,i){const r=this;r._queue.length<r._maxQueueSize?r._queue.push({resolve:t,reject:n,tokens:i}):n(new e(`Number of requests reached it's maximum ${r._maxQueueSize}`))}_processFIFO(){const e=this;if(null!==e._waitTimeout&&(clearTimeout(e._waitTimeout),e._waitTimeout=null),0===e._queue.length)return;const t=e._queue.shift();e._limiterFlexible.consume(e._key,t.tokens).then(n=>{t.resolve(n.remainingPoints),e._processFIFO.call(e)}).catch(n=>{n instanceof Error?(t.reject(n),e._processFIFO.call(e)):(e._queue.unshift(t),null===e._waitTimeout&&(e._waitTimeout=setTimeout(e._processFIFO.bind(e),n.msBeforeNext)))})}}return ud}function Jd(){if(Nd)return Od;Nd=1;const e=Zd(),t=Rd(),n=Ed?xd:(Ed=1,xd=class extends Error{constructor(e){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="RateLimiterSetupError",this.message=e}});return Od=class extends e{constructor(e){if(super(e),!e.storeClient)throw new n('You need to set the option "storeClient" to an instance of class "Etcd3".');this.client=e.storeClient}_getRateLimiterRes(e,n,i){const r=new t;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.expire?Math.max(i.expire-Date.now(),0):-1,r}async _upsert(e,t,n,i=!1){const r=n>0?Date.now()+n:null;let o={points:t,expire:r};if(i)await this.client.put(e).value(JSON.stringify(o));else{const n=await this._get(e);o={points:(null!==n?n.points:0)+t,expire:r},await this.client.put(e).value(JSON.stringify(o))}return o}async _get(e){return this.client.get(e).string().then(e=>null!==e?JSON.parse(e):null)}async _delete(e){return this.client.delete().key(e).then(e=>"1"===e.deleted)}},Od}function Vd(){if(Td)return zd;Td=1;const e=Id?Sd:(Id=1,Sd=class extends Error{constructor(e){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="RateLimiterEtcdTransactionFailedError",this.message=e}}),t=Jd();return zd=class extends t{async _upsert(t,n,i,r=!1){const o=i>0?Date.now()+i:null;let s,a={points:n,expire:o};if(r)await this.client.put(t).value(JSON.stringify(a));else{if(!await this.client.if(t,"Version","===","0").then(this.client.put(t).value(JSON.stringify(a))).commit().then(e=>!!e.succeeded)){let i=!1;for(let e=0;e<5&&(s=await this._get(t),a={points:s.points+n,expire:o},i=await this.client.if(t,"Value","===",JSON.stringify(s)).then(this.client.put(t).value(JSON.stringify(a))).commit().then(e=>!!e.succeeded),!i);e++);if(!i)throw new e("Could not set new value in a transaction.")}}return a}},zd}!function(){if(El)return Cd;El=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.Redlock=Cd.Lock=Cd.ExecutionError=Cd.ResourceLockedError=void 0;const e=v,t=y,n=function(){if(xl)return Ud;xl=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.ensureCommands=void 0;const e='\n -- Protected call to execute SELECT command if supported\n redis.pcall("SELECT", tonumber(ARGV[1]))\n',t=`\n ${e}\n\n -- Return 0 if an entry already exists.\n for i, key in ipairs(KEYS) do\n if redis.call("exists", key) == 1 then\n return 0\n end\n end\n\n -- Create an entry for each provided key.\n for i, key in ipairs(KEYS) do\n redis.call("set", key, ARGV[2], "PX", ARGV[3])\n end\n\n -- Return the number of entries added.\n return #KEYS\n`,n=`\n ${e}\n\n -- Return 0 if an entry exists with a *different* lock value.\n for i, key in ipairs(KEYS) do\n if redis.call("get", key) ~= ARGV[2] then\n return 0\n end\n end\n\n -- Update the entry for each provided key.\n for i, key in ipairs(KEYS) do\n redis.call("set", key, ARGV[2], "PX", ARGV[3])\n end\n\n -- Return the number of entries updated.\n return #KEYS\n`,i=`\n ${e}\n\n local count = 0\n for i, key in ipairs(KEYS) do\n -- Only remove entries for *this* lock value.\n if redis.call("get", key) == ARGV[2] then\n redis.pcall("del", key)\n count = count + 1\n end\n end\n\n -- Return the number of entries removed.\n return count\n`;return Ud.ensureCommands=function(e){"function"!=typeof e.acquireLock&&(e.defineCommand("acquireLock",{lua:t}),e.defineCommand("extendLock",{lua:n}),e.defineCommand("releaseLock",{lua:i}))},Ud}(),i={driftFactor:.01,retryCount:10,retryDelay:200,retryJitter:100,automaticExtensionThreshold:500,db:0};Object.freeze(i);class r extends Error{message;constructor(e){super(),this.message=e,this.name="ResourceLockedError"}}Cd.ResourceLockedError=r;class o extends Error{message;attempts;constructor(e,t){super(),this.message=e,this.attempts=t,this.name="ExecutionError"}}Cd.ExecutionError=o;class s{redlock;resources;value;attempts;expiration;settings;constructor(e,t,n,i,r,o){this.redlock=e,this.resources=t,this.value=n,this.attempts=i,this.expiration=r,this.settings=o}async release(){return this.redlock.release(this)}async extend(e){return this.redlock.extend(this,e,this.settings)}}Cd.Lock=s;class a extends t.EventEmitter{clients;settings;constructor(e,t={}){if(super(),this.on("error",()=>{}),this.clients=new Set(e),0===this.clients.size)throw new Error("Redlock must be instantiated with at least one redis client.");this.settings={driftFactor:"number"==typeof t.driftFactor?t.driftFactor:i.driftFactor,retryCount:"number"==typeof t.retryCount?t.retryCount:i.retryCount,retryDelay:"number"==typeof t.retryDelay?t.retryDelay:i.retryDelay,retryJitter:"number"==typeof t.retryJitter?t.retryJitter:i.retryJitter,automaticExtensionThreshold:"number"==typeof t.automaticExtensionThreshold?t.automaticExtensionThreshold:i.automaticExtensionThreshold,db:"number"==typeof t.db&&Number.isInteger(t.db)&&t.db>=0&&t.db<=15?t.db:i.db}}_hash(t){return(0,e.createHash)("sha1").update(t).digest("hex")}_random(){return(0,e.randomBytes)(16).toString("hex")}async quit(){const e=[];for(const t of this.clients)e.push(t.quit());await Promise.all(e)}async acquire(e,t,n){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");const i=this._random();try{const{attempts:r,start:o}=await this._execute("acquireLock",e,[this.settings.db,i,t],n),a=Math.round((n?.driftFactor??this.settings.driftFactor)*t)+2;return new s(this,e,i,r,o+t-a,n)}catch(t){throw await this._execute("releaseLock",e,[this.settings.db,i],{retryCount:0}).catch(()=>{}),t}}async release(e,t){return e.expiration=0,this._execute("releaseLock",e.resources,[this.settings.db,e.value],t)}async extend(e,t,n){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");if(e.expiration<Date.now())throw new o("Cannot extend an already-expired lock.",[]);const{attempts:i,start:r}=await this._execute("extendLock",e.resources,[this.settings.db,e.value,t],n);e.expiration=0;const a=Math.round((n?.driftFactor??this.settings.driftFactor)*t)+2;return new s(this,e.resources,e.value,i,r+t-a,n)}async _execute(e,t,n,i){const r=i?{...this.settings,...i}:this.settings,s=-1===r.retryCount?1/0:r.retryCount+1,a=[];for(;a.length<s;){const{vote:i,stats:o,start:u}=await this._attemptOperation(e,t,n);if(a.push(o),"for"===i)return{attempts:a,start:u};a.length<s&&await new Promise(e=>{setTimeout(e,Math.max(0,r.retryDelay+Math.floor((2*Math.random()-1)*r.retryJitter)),void 0)})}throw new o("The operation was unable to achieve a quorum during its retry window.",a)}async _attemptOperation(e,t,n){const i=Date.now();return await new Promise(r=>{const o=[];for(const i of this.clients)o.push(this._attemptOperationOnClient(i,e,t,n));const s={membershipSize:o.length,quorumSize:Math.floor(o.length/2)+1,votesFor:new Set,votesAgainst:new Map};let a;const u=new Promise(e=>{a=()=>e(s)}),c=e=>{switch(e.vote){case"for":s.votesFor.add(e.client);break;case"against":s.votesAgainst.set(e.client,e.error)}s.votesFor.size===s.quorumSize&&r({vote:"for",stats:u,start:i}),s.votesAgainst.size===s.quorumSize&&r({vote:"against",stats:u,start:i}),s.votesFor.size+s.votesAgainst.size===s.membershipSize&&a()},l=e=>{throw e};for(const e of o)e.then(c,l)})}async _attemptOperationOnClient(e,t,i,o){try{(0,n.ensureCommands)(e);const s=await e[t](i.length,...i,...o);if("number"!=typeof s)throw new Error(`Unexpected result of type ${typeof s} returned from redis.`);const a=s;if(a!==i.length)throw new r(`The operation was applied to: ${a} of the ${i.length} requested resources.`);return{vote:"for",client:e,value:a}}catch(t){if(!(t instanceof Error))throw new Error(`Unexpected type ${typeof t} thrown with value: ${t}`);return this.emit("error",t),{vote:"against",client:e,error:t}}}async using(e,t,n,i){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");const r=n&&"function"!=typeof n?{...this.settings,...n}:this.settings,o=i??n;if("function"!=typeof o)throw new Error("INVARIANT: routine is not a function.");if(r.automaticExtensionThreshold>t-100)throw new Error("A lock `duration` must be at least 100ms greater than the `automaticExtensionThreshold` setting.");const s=new AbortController,a=s.signal;function u(){l=setTimeout(()=>d=c(),m.lock.expiration-Date.now()-r.automaticExtensionThreshold)}async function c(){l=void 0;try{m.lock=await m.lock.extend(t),m.extensions+=1,u()}catch(e){if(!(e instanceof Error))throw new Error(`Unexpected thrown ${typeof e}: ${e}.`);if(m.lock.expiration>Date.now())return d=c();a.error=e instanceof Error?e:new Error(`${e}`),s.abort()}}let l,d;const m={lock:await this.acquire(e,t,r),extensions:0};u();try{return await o(a,m)}finally{l&&(clearTimeout(l),l=void 0),d&&await d.catch(()=>{}),await m.lock.release()}}}Cd.Redlock=a}(),function(){if(Ad)return Dd;Ad=1;const e=function(){if(Zl)return Rl;Zl=1;const e=Zd(),t=Rd();return Rl=class extends e{constructor(e){super(e),this.client=e.storeClient,this._rejectIfRedisNotReady=!!e.rejectIfRedisNotReady,this._incrTtlLuaScript=e.customIncrTtlLuaScript||"redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then redis.call('expire', KEYS[1], ARGV[2]) ttl = 1000 * ARGV[2] end return {consumed, ttl} ",this.useRedisPackage=e.useRedisPackage||"Commander"===this.client.constructor.name||!1,this.useRedis3AndLowerPackage=e.useRedis3AndLowerPackage,"function"==typeof this.client.defineCommand&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isRedisReady(){return!(this._rejectIfRedisNotReady&&(this.client.status&&"ready"!==this.client.status||"function"==typeof this.client.isReady&&!this.client.isReady()))}_getRateLimiterRes(e,n,i){let[r,o]=i;Array.isArray(r)&&([,r]=r,[,o]=o);const s=new t;return s.consumedPoints=parseInt(r),s.isFirstInDuration=s.consumedPoints===n,s.remainingPoints=Math.max(this.points-s.consumedPoints,0),s.msBeforeNext=o,s}async _upsert(e,t,n,i=!1){if("string"==typeof t){if(!RegExp("^[1-9][0-9]*$").test(t))throw new Error("Consuming string different than integer values is not supported by this package")}else if(!Number.isInteger(t))throw new Error("Consuming decimal number of points is not supported by this package");if(!this._isRedisReady())throw new Error("Redis connection is not ready");const r=Math.floor(n/1e3),o=this.client.multi();return i?(r>0?this.useRedisPackage||this.useRedis3AndLowerPackage?o.set(e,t,{EX:r}):o.set(e,t,"EX",r):o.set(e,t),this.useRedisPackage||this.useRedis3AndLowerPackage?o.pTTL(e).exec(!0):o.pttl(e).exec(!0)):r>0?this.useRedisPackage||this.useRedis3AndLowerPackage?this.useRedis3AndLowerPackage?new Promise((n,i)=>{const o=function(e,t){return e?i(e):n(t)};"function"==typeof this.client.rlflxIncr?this.client.rlflxIncr(e,t,r,this.points,this.duration,o):this.client.eval(this._incrTtlLuaScript,1,e,t,r,this.points,this.duration,o)}):this.client.eval(this._incrTtlLuaScript,{keys:[e],arguments:[String(t),String(r),String(this.points),String(this.duration)]}):this.client.rlflxIncr([e].concat([String(t),String(r),String(this.points),String(this.duration)])):this.useRedisPackage||this.useRedis3AndLowerPackage?o.incrBy(e,t).pTTL(e).exec(!0):o.incrby(e,t).pttl(e).exec(!0)}async _get(e){if(!this._isRedisReady())throw new Error("Redis connection is not ready");return this.useRedisPackage||this.useRedis3AndLowerPackage?this.client.multi().get(e).pTTL(e).exec(!0).then(e=>{const[t]=e;return null===t?null:e}):this.client.multi().get(e).pttl(e).exec().then(e=>{const[[,t]]=e;return null===t?null:e})}_delete(e){return this.client.del(e).then(e=>e>0)}},Rl}(),t=function(){if(Ml)return Ll;Ml=1;const e=Zd(),t=Rd();function n(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(void 0===t.topology){const{version:e}=t.options.metadata.driver;n=e.split("|",1)[0].split(".").map(e=>parseInt(e))}else{const{version:e}=t.topology.s.options.metadata.driver;n=e.split(".").map(e=>parseInt(e))}return{major:n[0],feature:n[1],patch:n[2]}}catch(e){return{major:0,feature:0,patch:0}}}class i extends e{constructor(e){super(e),this.dbName=e.dbName,this.tableName=e.tableName,this.indexKeyPrefix=e.indexKeyPrefix,e.mongo?this.client=e.mongo:this.client=e.storeClient,"function"==typeof this.client.then?this.client.then(e=>{this.client=e,this._initCollection(),this._driverVersion=n(this.client)}):(this._initCollection(),this._driverVersion=n(this.client))}get dbName(){return this._dbName}set dbName(e){this._dbName=void 0===e?i.getDbName():e}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get client(){return this._client}set client(e){if(void 0===e)throw new Error("mongo is not set");this._client=e}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(e){this._indexKeyPrefix=e||{}}_initCollection(){const e=("function"==typeof this.client.db?this.client.db(this.dbName):this.client).collection(this.tableName);e.createIndex({expire:-1},{expireAfterSeconds:0}),e.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=e}_getRateLimiterRes(e,n,i){const r=new t;let o;return o=void 0===i.value?i:i.value,r.isFirstInDuration=o.points===n,r.consumedPoints=o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,r}_upsert(e,t,n,i=!1,r={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=r.attrs||{};let s,a;i?(s={key:e},s=Object.assign(s,o),a={$set:{key:e,points:t,expire:n>0?new Date(Date.now()+n):null}},a.$set=Object.assign(a.$set,o)):(s={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:e},s=Object.assign(s,o),a={$setOnInsert:{key:e,expire:n>0?new Date(Date.now()+n):null},$inc:{points:t}},a.$setOnInsert=Object.assign(a.$setOnInsert,o));const u={upsert:!0};return this._driverVersion.major>=4||3===this._driverVersion.major&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?u.returnDocument="after":u.returnOriginal=!1,new Promise((r,c)=>{this._collection.findOneAndUpdate(s,a,u).then(e=>{r(e)}).catch(s=>{if(s&&11e3===s.code){const s=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:e},o),a={$set:Object.assign({key:e,points:t,expire:n>0?new Date(Date.now()+n):null},o)};this._collection.findOneAndUpdate(s,a,u).then(e=>{r(e)}).catch(o=>{o&&11e3===o.code?this._upsert(e,t,n,i).then(e=>r(e)).catch(e=>c(e)):c(o)})}else c(s)})})}_get(e,t={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const n=t.attrs||{},i=Object.assign({key:e,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},n);return this._collection.findOne(i)}_delete(e,t={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const n=t.attrs||{},i=Object.assign({key:e},n);return this._collection.deleteOne(i).then(e=>e.deletedCount>0)}}return Ll=i}(),n=function(){if(Bl)return Fl;Bl=1;const e=Zd(),t=Rd();return Fl=class extends e{constructor(e,t=null){super(e),this.client=e.storeClient,this.clientType=e.storeType,this.dbName=e.dbName,this.tableName=e.tableName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}clearExpired(e){return new Promise(t=>{this._getConnection().then(n=>{n.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,e],()=>{this._releaseConnection(n),t()})}).catch(()=>{t()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise((e,t)=>{this.client.getConnection((n,i)=>{if(n)return t(n);e(i)})});case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(e){switch(this.clientType){case"pool":return e.release();case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e);default:return!0}}_createDbAndTable(){return new Promise((e,t)=>{this._getConnection().then(n=>{n.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(n),t(i);n.query(this._getCreateTableStmt(),i=>{if(i)return this._releaseConnection(n),t(i);this._releaseConnection(n),e()})})}).catch(e=>{t(e)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS \`${this.dbName}\`.\`${this.tableName}\` (\`key\` VARCHAR(255) CHARACTER SET utf8 NOT NULL,\`points\` INT(9) NOT NULL default 0,\`expire\` BIGINT UNSIGNED,PRIMARY KEY (\`key\`)) ENGINE = INNODB;`}get clientType(){return this._clientType}set clientType(e){if(void 0===e)if("Connection"===this.client.constructor.name)e="connection";else if("Pool"===this.client.constructor.name)e="pool";else{if("Sequelize"!==this.client.constructor.name)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get dbName(){return this._dbName}set dbName(e){this._dbName=void 0===e?"rtlmtrflx":e}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout=void 0===e||Boolean(e)}_getRateLimiterRes(e,n,i){const r=new t,[o]=i;return r.isFirstInDuration=n===o.points,r.consumedPoints=r.isFirstInDuration?n:o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,r}_upsertTransaction(e,t,n,i,r){return new Promise((o,s)=>{e.query("BEGIN",a=>{if(a)return e.rollback(),s(a);const u=Date.now(),c=i>0?u+i:null;let l,d;r?(l="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = ?, \n expire = ?;",d=[this.dbName,this.tableName,t,n,c,n,c]):(l="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = IF(expire <= ?, ?, points + (?)), \n expire = IF(expire <= ?, ?, expire);",d=[this.dbName,this.tableName,t,n,c,u,n,n,u,c]),e.query(l,d,n=>{if(n)return e.rollback(),s(n);e.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,t],(t,n)=>{if(t)return e.rollback(),s(t);e.query("COMMIT",t=>{if(t)return e.rollback(),s(t);o(n)})})})})})}_upsert(e,t,n,i=!1){return this.tableCreated?new Promise((r,o)=>{this._getConnection().then(s=>{this._upsertTransaction(s,e,t,n,i).then(e=>{r(e),this._releaseConnection(s)}).catch(e=>{o(e),this._releaseConnection(s)})}).catch(e=>{o(e)})}):Promise.reject(Error("Table is not created yet"))}_get(e){return this.tableCreated?new Promise((t,n)=>{this._getConnection().then(i=>{i.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,e,Date.now()],(e,r)=>{e?n(e):0===r.length?t(null):t(r),this._releaseConnection(i)})}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?new Promise((t,n)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,e],(e,r)=>{e?n(e):t(r.affectedRows>0),this._releaseConnection(i)})}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}},Fl}(),i=function(){if(Vl)return Jl;Vl=1;const e=Zd(),t=Rd();return Jl=class extends e{constructor(e,t=null){super(e),this.client=e.storeClient,this.clientType=e.storeType,this.tableName=e.tableName,this.schemaName=e.schemaName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(e){return new Promise(t=>{const n={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[e]};this._query(n).then(()=>{t()}).catch(()=>{t()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":default:return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master)}}_releaseConnection(e){switch(this.clientType){case"pool":case"typeorm":default:return!0;case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e)}}_createTable(){return new Promise((e,t)=>{this._query({text:this._getCreateTableStmt()}).then(()=>{e()}).catch(n=>{"23505"===n.code?e():t(n)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS ${this._getTableIdentifier()} (\n key varchar(255) PRIMARY KEY,\n points integer NOT NULL DEFAULT 0,\n expire bigint\n );`}get clientType(){return this._clientType}set clientType(e){const t=this.client.constructor.name;if(void 0===e)if("Client"===t)e="client";else if("Pool"===t||"BoundPool"===t)e="pool";else{if("Sequelize"!==t)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get schemaName(){return this._schemaName}set schemaName(e){this._schemaName=e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout=void 0===e||Boolean(e)}_getRateLimiterRes(e,n,i){const r=new t,o=i.rows[0];return r.isFirstInDuration=n===o.points,r.consumedPoints=r.isFirstInDuration?n:o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,r}_query(e){const t={name:`${this.tableName.toLowerCase()}:${e.name}`,text:e.text,values:e.values};return new Promise((e,n)=>{this._getConnection().then(i=>{i.query(t).then(t=>{e(t),this._releaseConnection(i)}).catch(e=>{n(e),this._releaseConnection(i)})}).catch(e=>{n(e)})})}_upsert(e,t,n,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const r=n>0?Date.now()+n:null,o=i?" $3 ":` CASE\n WHEN ${this._getTableIdentifier()}.expire <= $4 THEN $3\n ELSE ${this._getTableIdentifier()}.expire\n END `;return this._query({name:i?"rlflx-upsert-force":"rlflx-upsert",text:`\n INSERT INTO ${this._getTableIdentifier()} VALUES ($1, $2, $3)\n ON CONFLICT(key) DO UPDATE SET\n points = CASE\n WHEN (${this._getTableIdentifier()}.expire <= $4 OR 1=${i?1:0}) THEN $2\n ELSE ${this._getTableIdentifier()}.points + ($2)\n END,\n expire = ${o}\n RETURNING points, expire;`,values:[e,t,r,Date.now()]})}_get(e){return this.tableCreated?new Promise((t,n)=>{this._query({name:"rlflx-get",text:`\n SELECT points, expire FROM ${this._getTableIdentifier()} WHERE key = $1 AND (expire > $2 OR expire IS NULL);`,values:[e,Date.now()]}).then(e=>{0===e.rowCount&&(e=null),t(e)}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?this._query({name:"rlflx-delete",text:`DELETE FROM ${this._getTableIdentifier()} WHERE key = $1`,values:[e]}).then(e=>e.rowCount>0):Promise.reject(Error("Table is not created yet"))}},Jl}(),{RateLimiterClusterMaster:r,RateLimiterClusterMasterPM2:o,RateLimiterCluster:s}=Fd(),a=Md(),u=function(){if(td)return ed;td=1;const e=Zd(),t=Rd();return ed=class extends e{constructor(e){super(e),this.client=e.storeClient}_getRateLimiterRes(e,n,i){const r=new t;return r.consumedPoints=parseInt(i.consumedPoints),r.isFirstInDuration=i.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.msBeforeNext,r}_upsert(e,t,n,i=!1,r={}){return new Promise((o,s)=>{const a=Date.now(),u=Math.floor(n/1e3);i?this.client.set(e,t,u,n=>{n?s(n):this.client.set(`${e}_expire`,u>0?a+1e3*u:-1,u,()=>{o({consumedPoints:t,msBeforeNext:u>0?1e3*u:-1})})}):this.client.incr(e,t,(c,l)=>{c||!1===l?this.client.add(e,t,u,(c,l)=>{if(c||!l)if(void 0===r.attemptNumber||r.attemptNumber<3){const a=Object.assign({},r);a.attemptNumber=a.attemptNumber?a.attemptNumber+1:1,this._upsert(e,t,n,i,a).then(e=>o(e)).catch(e=>s(e))}else s(new Error("Can not add key"));else this.client.add(`${e}_expire`,u>0?a+1e3*u:-1,u,()=>{o({consumedPoints:t,msBeforeNext:u>0?1e3*u:-1})})}):this.client.get(`${e}_expire`,(e,t)=>{if(e)s(e);else{const e=!1===t?0:t,n={consumedPoints:l,msBeforeNext:e>=0?Math.max(e-a,0):-1};o(n)}})})})}_get(e){return new Promise((t,n)=>{const i=Date.now();this.client.get(e,(r,o)=>{o?this.client.get(`${e}_expire`,(e,r)=>{if(e)n(e);else{const e=!1===r?0:r,n={consumedPoints:o,msBeforeNext:e>=0?Math.max(e-i,0):-1};t(n)}}):t(null)})})}_delete(e){return new Promise((t,n)=>{this.client.del(e,(i,r)=>{i?n(i):!1===r?t(r):this.client.del(`${e}_expire`,e=>{e?n(e):t(r)})})})}}}(),c=function(){if(id)return nd;id=1;const e=Rd();return nd=class{constructor(e={}){this.limiter=e.limiter,this.blackList=e.blackList,this.whiteList=e.whiteList,this.isBlackListed=e.isBlackListed,this.isWhiteListed=e.isWhiteListed,this.runActionAnyway=e.runActionAnyway}get limiter(){return this._limiter}set limiter(e){if(void 0===e)throw new Error("limiter is not set");this._limiter=e}get runActionAnyway(){return this._runActionAnyway}set runActionAnyway(e){this._runActionAnyway=void 0!==e&&e}get blackList(){return this._blackList}set blackList(e){this._blackList=Array.isArray(e)?e:[]}get isBlackListed(){return this._isBlackListed}set isBlackListed(e){if(void 0===e&&(e=()=>!1),"function"!=typeof e)throw new Error("isBlackListed must be function");this._isBlackListed=e}get whiteList(){return this._whiteList}set whiteList(e){this._whiteList=Array.isArray(e)?e:[]}get isWhiteListed(){return this._isWhiteListed}set isWhiteListed(e){if(void 0===e&&(e=()=>!1),"function"!=typeof e)throw new Error("isWhiteListed must be function");this._isWhiteListed=e}isBlackListedSomewhere(e){return this.blackList.indexOf(e)>=0||this.isBlackListed(e)}isWhiteListedSomewhere(e){return this.whiteList.indexOf(e)>=0||this.isWhiteListed(e)}getBlackRes(){return new e(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new e(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(e,t=1){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.rejectBlack()),void 0===n?this.limiter.consume(e,t):(this.runActionAnyway&&this.limiter.consume(e,t).catch(()=>{}),n)}block(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.block(e,t):(this.runActionAnyway&&this.limiter.block(e,t).catch(()=>{}),n)}penalty(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.penalty(e,t):(this.runActionAnyway&&this.limiter.penalty(e,t).catch(()=>{}),n)}reward(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.reward(e,t):(this.runActionAnyway&&this.limiter.reward(e,t).catch(()=>{}),n)}get(e){let t;return this.isWhiteListedSomewhere(e)?t=this.resolveWhite():this.isBlackListedSomewhere(e)&&(t=this.resolveBlack()),void 0===t||this.runActionAnyway?this.limiter.get(e):t}delete(e){return this.limiter.delete(e)}}}(),l=function(){if(od)return rd;od=1;const e=Pd();return rd=class{constructor(...t){if(t.length<1)throw new Error("RateLimiterUnion: at least one limiter have to be passed");t.forEach(t=>{if(!(t instanceof e))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(e,t=1){return new Promise((n,i)=>{const r=[];this._limiters.forEach(n=>{r.push(n.consume(e,t).catch(e=>({rejected:!0,rej:e})))}),Promise.all(r).then(e=>{const t={};let r=!1;e.forEach(e=>{!0===e.rejected&&(r=!0)});for(let n=0;n<e.length;n++)r&&!0===e[n].rejected?t[this._limiters[n].keyPrefix]=e[n].rej:r||(t[this._limiters[n].keyPrefix]=e[n]);r?i(t):n(t)})})}}}(),d=Bd(),m=function(){if(dd)return ld;dd=1;const e=Rd();return ld=class{constructor(e,t){this._rateLimiter=e,this._burstLimiter=t}_combineRes(t,n){return t?new e(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,i={}){return this._rateLimiter.consume(t,n,i).catch(r=>r instanceof e?this._burstLimiter.consume(t,n,i).then(e=>Promise.resolve(this._combineRes(r,e))).catch(t=>t instanceof e?Promise.reject(this._combineRes(r,t)):Promise.reject(t)):Promise.reject(r))}get(e){return Promise.all([this._rateLimiter.get(e),this._burstLimiter.get(e)]).then(([e,t])=>this._combineRes(e,t))}get points(){return this._rateLimiter.points}}}(),p=Rd(),f=function(){if(pd)return md;pd=1;const e=Rd(),t=Zd();class n{constructor(e,t,n){this.key=e,this.points=t,this.expire=n}}return md=class extends t{constructor(e,t=null){super(e),this.client=e.storeClient,this.tableName=e.tableName,this.tableCreated=e.tableCreated,this.ttlManuallySet=e.ttlSet,this.tableCreated?this._setTTL().finally(()=>{"function"==typeof t&&t()}):this._createTable(e.dynamoTableOpts).then(e=>{this.tableCreated=!0,this._setTTL().finally(()=>{"function"==typeof t&&t()})}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?"node-rate-limiter-flexible":e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}async _createTable(e){const t={TableName:this.tableName,AttributeDefinitions:[{AttributeName:"key",AttributeType:"S"}],KeySchema:[{AttributeName:"key",KeyType:"HASH"}],ProvisionedThroughput:{ReadCapacityUnits:e&&e.readCapacityUnits?e.readCapacityUnits:25,WriteCapacityUnits:e&&e.writeCapacityUnits?e.writeCapacityUnits:25}};try{return await this.client.createTable(t)}catch(e){if(e.__type&&e.__type.includes("ResourceInUseException"))return null;throw e}}async _get(e){if(!this.tableCreated)throw new Error("Table is not created yet");const t={TableName:this.tableName,Key:{key:{S:e}}},i=await this.client.getItem(t);return i.Item?new n(i.Item.key.S,Number(i.Item.points.N),Number(i.Item.expire.N)):null}async _delete(e){if(!this.tableCreated)throw new Error("Table is not created yet");const t={TableName:this.tableName,Key:{key:{S:e}},ConditionExpression:"attribute_exists(#k)",ExpressionAttributeNames:{"#k":"key"}};try{return 200===(await this._client.deleteItem(t)).$metadata.httpStatusCode}catch(e){if(e.__type&&e.__type.includes("ConditionalCheckFailedException"))return!1;throw e}}async _upsert(e,t,n,i=!1,r={}){if(!this.tableCreated)throw new Error("Table is not created yet");const o=Date.now(),s=o/1e3,a=n>0?(o+n)/1e3:-1;if(i)return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = :points, expire = :expire",ExpressionAttributeValues:{":points":{N:t.toString()},":expire":{N:a.toString()}},ReturnValues:"ALL_NEW"});try{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = :new_points, expire = :new_expire",ExpressionAttributeValues:{":new_points":{N:t.toString()},":new_expire":{N:a.toString()},":where_expire":{N:s.toString()}},ConditionExpression:"expire <= :where_expire OR attribute_not_exists(points)",ReturnValues:"ALL_NEW"})}catch(n){return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = points + :new_points",ExpressionAttributeValues:{":new_points":{N:t.toString()},":where_expire":{N:s.toString()}},ConditionExpression:"expire > :where_expire",ReturnValues:"ALL_NEW"})}}async _baseUpsert(e){if(!this.tableCreated)throw new Error("Table is not created yet");try{const t=await this.client.updateItem(e);return new n(t.Attributes.key.S,Number(t.Attributes.points.N),Number(t.Attributes.expire.N))}catch(e){throw e}}async _setTTL(){if(!this.tableCreated)throw new Error("Table is not created yet");try{if(await this._isTTLSet())return;const e={TableName:this.tableName,TimeToLiveSpecification:{AttributeName:"expire",Enabled:!0}};return await this.client.updateTimeToLive(e)}catch(e){throw e}}async _isTTLSet(){if(!this.tableCreated)throw new Error("Table is not created yet");if(this.ttlManuallySet)return!0;try{const e=await this.client.describeTimeToLive({TableName:this.tableName});return 200==e.$metadata.httpStatusCode&&"ENABLED"===e.TimeToLiveDescription.TimeToLiveStatus&&"expire"===e.TimeToLiveDescription.AttributeName}catch(e){throw e}}_getRateLimiterRes(t,n,i){const r=new e;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=-1!=i.expire?Math.max(1e3*i.expire-Date.now(),0):-1,r}}}(),h=function(){if(hd)return fd;hd=1;const e=Zd(),t=Rd();return fd=class extends e{constructor(e){if(super(e),this.modelName=e.tableName||"RateLimiterFlexible",this.prismaClient=e.storeClient,this.clearExpiredByTimeout=e.clearExpiredByTimeout||!0,!this.prismaClient)throw new Error("Prisma client is not provided");this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(e,n,i){const r=new t;let o=i;return r.isFirstInDuration=o.points===n,r.consumedPoints=o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,r}_upsert(e,t,n,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const r=new Date,o=n>0?new Date(r.getTime()+n):null;return this.prismaClient.$transaction(async n=>{const s=await n[this.modelName].findFirst({where:{key:e}});if(s){const a=i||!s.expire||s.expire<=r||null===o;return n[this.modelName].update({where:{key:e},data:{points:a?t:s.points+t,...a&&{expire:o}}})}return n[this.modelName].create({data:{key:e,points:t,expire:o}})})}_get(e){return this.prismaClient?this.prismaClient[this.modelName].findFirst({where:{AND:[{key:e},{OR:[{expire:{gt:new Date}},{expire:null}]}]}}):Promise.reject(new Error("Prisma client is not established"))}_delete(e){return this.prismaClient?this.prismaClient[this.modelName].deleteMany({where:{key:e}}).then(e=>e.count>0):Promise.reject(new Error("Prisma client is not established"))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(async()=>{await this.prismaClient[this.modelName].deleteMany({where:{expire:{lt:new Date(Date.now()-36e5)}}}),this._clearExpiredHourAgo()},3e5),this._clearExpiredTimeoutId.unref()}}}(),g=function(){if(vd)return gd;vd=1;let e=null;class t extends Error{constructor(e){super(e),this.name="RateLimiterDrizzleError"}}function n(){if(e)return e;try{const{and:t,or:n,gt:i,lt:r,eq:o,isNull:s,sql:a}=require("drizzle-orm");return e={and:t,or:n,gt:i,lt:r,eq:o,isNull:s,sql:a},e}catch(e){throw new t("drizzle-orm is not installed. Please install drizzle-orm to use RateLimiterDrizzle.")}}const i=Zd(),r=Rd();return gd=class extends i{constructor(e){if(super(e),!e?.schema)throw new t("Drizzle schema is required");if(!e?.storeClient)throw new t("Drizzle client is required");this.schema=e.schema,this.drizzleClient=e.storeClient,this.clearExpiredByTimeout=e.clearExpiredByTimeout??!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(e,t,n){const i=new r;let o=n;return i.isFirstInDuration=o.points===t,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}async _upsert(e,i,r,o=!1){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{eq:s,sql:a}=n(),u=new Date,c=r>0?new Date(u.getTime()+r):null;return await this.drizzleClient.transaction(async t=>{const[n]=await t.select().from(this.schema).where(s(this.schema.key,e)).limit(1),r=o||!n?.expire||n?.expire<=u||null===c,[l]=await t.insert(this.schema).values({key:e,points:i,expire:c}).onConflictDoUpdate({target:this.schema.key,set:{points:r?i:a`${this.schema.points} + ${i}`,...r&&{expire:c}}}).returning();return l})}async _get(e){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{and:i,or:r,gt:o,eq:s,isNull:a}=n(),[u]=await this.drizzleClient.select().from(this.schema).where(i(s(this.schema.key,e),r(o(this.schema.expire,new Date),a(this.schema.expire)))).limit(1);return u||null}async _delete(e){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{eq:i}=n(),[r]=await this.drizzleClient.delete(this.schema).where(i(this.schema.key,e)).returning({key:this.schema.key});return!!r?.key}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId);const{lt:e}=n();this._clearExpiredTimeoutId=setTimeout(async()=>{try{await this.drizzleClient.delete(this.schema).where(e(this.schema.expire,new Date(Date.now()-36e5)))}catch(e){console.warn("Failed to clear expired records:",e)}this._clearExpiredHourAgo()},3e5),this._clearExpiredTimeoutId.unref()}},gd}(),v=function(){if(_d)return yd;_d=1;const e=Zd(),t=Rd();return yd=class extends e{constructor(e){super(e),this.client=e.storeClient,this._rejectIfValkeyNotReady=!!e.rejectIfValkeyNotReady,this._incrTtlLuaScript=e.customIncrTtlLuaScript||"\nserver.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX')\nlocal consumed = server.call('incrby', KEYS[1], ARGV[1])\nlocal ttl = server.call('pttl', KEYS[1])\nreturn {consumed, ttl}\n",this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isValkeyReady(){return!this._rejectIfValkeyNotReady||"ready"===this.client.status}_getRateLimiterRes(e,n,i){let r,o;Array.isArray(i[0])?[[,r],[,o]]=i:[r,o]=i;const s=new t;return s.consumedPoints=+r,s.isFirstInDuration=s.consumedPoints===n,s.remainingPoints=Math.max(this.points-s.consumedPoints,0),s.msBeforeNext=o,s}_upsert(e,t,n,i=!1){if(!this._isValkeyReady())throw new Error("Valkey connection is not ready");const r=Math.floor(n/1e3);if(i){const n=this.client.multi();return r>0?n.set(e,t,"EX",r):n.set(e,t),n.pttl(e).exec()}return r>0?this.client.rlflxIncr([e,String(t),String(r),String(this.points),String(this.duration)]):this.client.multi().incrby(e,t).pttl(e).exec()}_get(e){if(!this._isValkeyReady())throw new Error("Valkey connection is not ready");return this.client.multi().get(e).pttl(e).exec().then(e=>{const[[,t]]=e;return null===t?null:e})}_delete(e){return this.client.del(e).then(e=>e>0)}},yd}(),y=function(){if($d)return bd;$d=1;const e=Zd(),t=Rd(),n="local key = KEYS[1]\nlocal value = server.call('get', key)\nif value == nil then\n return value\nend\nlocal pttl = server.call('pttl', key)\nreturn {tonumber(value), pttl}";return bd=class extends e{constructor(e){super(e),this.client=e.storeClient,this._scriptLoaded=!1,this._getScriptLoaded=!1,this._rejectIfValkeyNotReady=!!e.rejectIfValkeyNotReady,this._luaScript=e.customFunction||"local key = KEYS[1]\nlocal pointsToConsume = tonumber(ARGV[1])\nif tonumber(ARGV[2]) > 0 then\n server.call('set', key, \"0\", 'EX', ARGV[2], 'NX')\n local consumed = server.call('incrby', key, pointsToConsume)\n local pttl = server.call('pttl', key)\n return {consumed, pttl}\nend\nlocal consumed = server.call('incrby', key, pointsToConsume)\nlocal pttl = server.call('pttl', key)\nreturn {consumed, pttl}",this._libraryName=e.customFunctionLibName||"ratelimiterflexible"}async _loadScripts(){if(this._scriptLoaded&&this._getScriptLoaded)return!0;if(!this.client)throw new Error("Valkey client is not set");const e=[];if(this._scriptLoaded)e.push(Promise.resolve(this._libraryName));else{const t=Buffer.from(`#!lua name=${this._libraryName}\n local function consume(KEYS, ARGV)\n ${this._luaScript.trim()}\n end\n server.register_function('consume', consume)`);e.push(this.client.functionLoad(t,{replace:!0}))}if(this._getScriptLoaded)e.push(Promise.resolve("ratelimiter_get"));else{const t=Buffer.from(`#!lua name=ratelimiter_get\n local function getValue(KEYS, ARGV)\n ${n.trim()}\n end\n server.register_function('getValue', getValue)`);e.push(this.client.functionLoad(t,{replace:!0}))}const t=await Promise.all(e);if(this._scriptLoaded=t[0]===this._libraryName,this._getScriptLoaded="ratelimiter_get"===t[1],!this._scriptLoaded||!this._getScriptLoaded)throw new Error("Valkey connection is not ready, scripts not loaded");return!0}async _upsert(e,t,n,i=!1,r={}){await this._loadScripts();const o=Math.floor(n/1e3);return i?o>0?(await this.client.set(e,String(t),{expiry:{type:"EX",count:o}}),[t,1e3*o]):(await this.client.set(e,String(t)),[t,-1]):await this.client.fcall("consume",[e],[String(t),String(o)])}async _get(e,t={}){await this._loadScripts();const n=await this.client.fcall("getValue",[e],[]);return n.length>0?n:null}async _delete(e,t={}){return await this.client.del([e])>0}_getRateLimiterRes(e,n,i){if(null===i)return null;const r=new t,[o,s]=i,a=Number(o);return r.isFirstInDuration=a===n,r.consumedPoints=a,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=s,r}async close(){if(this._scriptLoaded&&(await this.client.functionDelete(this._libraryName),this._scriptLoaded=!1),this._getScriptLoaded&&(await this.client.functionDelete("ratelimiter_get"),this._getScriptLoaded=!1),this.insuranceLimiter)try{await this.insuranceLimiter.close()}catch(e){}this.client=null,this._scriptLoaded=!1,this._getScriptLoaded=!1,this._rejectIfValkeyNotReady=!1,this._luaScript=null,this._libraryName=null,this.insuranceLimiter=null}},bd}(),_=function(){if(wd)return kd;wd=1;const e=Zd(),t=Rd();return kd=class extends e{_internalStoreType=null;constructor(e,t=null){super(e),this.client=e.storeClient,this.storeType=e.storeType||"sqlite3",this.tableName=e.tableName,this.tableCreated=e.tableCreated||!1,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this._validateStoreTypes(t),this._validateStoreClient(t),this._setInternalStoreType(t),this._validateTableName(t),this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}_validateStoreTypes(e){const t=["sqlite3","better-sqlite3","knex"];if(!t.includes(this.storeType)){const n=new Error(`storeType must be one of: ${t.join(", ")}`);if("function"==typeof e)return e(n);throw n}}_validateStoreClient(e){if("sqlite3"===this.storeType){if("function"!=typeof this.client.run){const t=new Error("storeClient must be an instance of sqlite3.Database when storeType is 'sqlite3' or no storeType was provided");if("function"==typeof e)return e(t);throw t}}else if("better-sqlite3"===this.storeType){if("function"!=typeof this.client.prepare||void 0!==this.client.run){const t=new Error("storeClient must be an instance of better-sqlite3.Database when storeType is 'better-sqlite3'");if("function"==typeof e)return e(t);throw t}}else if("knex"===this.storeType&&"function"!=typeof this.client.raw){const t=new Error("storeClient must be an instance of Knex when storeType is 'knex'");if("function"==typeof e)return e(t);throw t}}_setInternalStoreType(e){if("knex"===this.storeType){const t=this.client.client.config.client;if("sqlite3"===t)this._internalStoreType="sqlite3";else{if("better-sqlite3"!==t){const t=new Error("Knex must be configured with 'sqlite3' or 'better-sqlite3' for RateLimiterSQLite");if("function"==typeof e)return e(t);throw t}this._internalStoreType="better-sqlite3"}}else this._internalStoreType=this.storeType}_validateTableName(e){if(!/^[A-Za-z0-9_]*$/.test(this.tableName)){const t=new Error("Table name must contain only letters and numbers");if("function"==typeof e)return e(t);throw t}}async _getConnection(){return"knex"===this.storeType?this.client.client.acquireConnection():this.client}_releaseConnection(e){"knex"===this.storeType&&this.client.client.releaseConnection(e)}async _createDbAndTable(){const e=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":await new Promise((t,n)=>{e.run(this._getCreateTableSQL(),e=>e?n(e):t())});break;case"better-sqlite3":e.prepare(this._getCreateTableSQL()).run();break;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(e)}}_getCreateTableSQL(){return`CREATE TABLE IF NOT EXISTS ${this.tableName} (\n key TEXT PRIMARY KEY,\n points INTEGER NOT NULL DEFAULT 0,\n expire INTEGER\n )`}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>this._clearExpiredHourAgo())},3e5),this._clearExpiredTimeoutId.unref()}async clearExpired(e){const t=`DELETE FROM ${this.tableName} WHERE expire < ?`,n=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":await new Promise((i,r)=>{n.run(t,[e],e=>e?r(e):i())});break;case"better-sqlite3":n.prepare(t).run(e);break;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(n)}}_getRateLimiterRes(e,n,i){const r=new t;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.expire?Math.max(i.expire-Date.now(),0):-1,r}async _upsertTransactionSQLite3(e,t,n){return await new Promise((i,r)=>{e.serialize(()=>{e.run("SAVEPOINT rate_limiter_trx;",o=>{if(o)return r(o);e.get(t,n,(t,n)=>{t?e.run("ROLLBACK TO SAVEPOINT rate_limiter_trx;",()=>r(t)):e.run("RELEASE SAVEPOINT rate_limiter_trx;",()=>i(n))})})})})}async _upsertTransactionBetterSQLite3(e,t,n){return e.transaction(()=>e.prepare(t).get(...n))()}async _upsertTransaction(e,t,n,i){const r=Date.now(),o=n>0?r+n:null,s=i?`INSERT OR REPLACE INTO ${this.tableName} (key, points, expire) VALUES (?, ?, ?) RETURNING points, expire`:`INSERT INTO ${this.tableName} (key, points, expire)\n VALUES (?, ?, ?)\n ON CONFLICT(key) DO UPDATE SET\n points = CASE WHEN expire IS NULL OR expire > ? THEN points + excluded.points ELSE excluded.points END,\n expire = CASE WHEN expire IS NULL OR expire > ? THEN expire ELSE excluded.expire END\n RETURNING points, expire`,a=i?[e,t,o]:[e,t,o,r,r],u=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return this._upsertTransactionSQLite3(u,s,a);case"better-sqlite3":return this._upsertTransactionBetterSQLite3(u,s,a);default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(u)}}_upsert(e,t,n,i=!1){return this.tableCreated?this._upsertTransaction(e,t,n,i):Promise.reject(new Error("Table is not created yet"))}async _get(e){const t=`SELECT points, expire FROM ${this.tableName} WHERE key = ? AND (expire > ? OR expire IS NULL)`,n=Date.now(),i=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return await new Promise((r,o)=>{i.get(t,[e,n],(e,t)=>e?o(e):r(t||null))});case"better-sqlite3":return i.prepare(t).get(e,n)||null;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(i)}}async _delete(e){if(!this.tableCreated)return Promise.reject(new Error("Table is not created yet"));const t=`DELETE FROM ${this.tableName} WHERE key = ?`,n=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return await new Promise((i,r)=>{n.run(t,[e],function(e){e?r(e):i(this.changes>0)})});case"better-sqlite3":return n.prepare(t).run(e).changes>0;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(n)}}}}(),b=Vd(),$=Jd();Dd={RateLimiterRedis:e,RateLimiterMongo:t,RateLimiterMySQL:n,RateLimiterPostgres:i,RateLimiterMemory:a,RateLimiterMemcache:u,RateLimiterClusterMaster:r,RateLimiterClusterMasterPM2:o,RateLimiterCluster:s,RLWrapperBlackAndWhite:c,RateLimiterUnion:l,RateLimiterQueue:d,BurstyRateLimiter:m,RateLimiterRes:p,RateLimiterDynamo:f,RateLimiterPrisma:h,RateLimiterValkey:v,RateLimiterValkeyGlide:y,RateLimiterSQLite:_,RateLimiterEtcd:b,RateLimiterDrizzle:g,RateLimiterEtcdNonAtomic:$}}(),f(h),f(g),new TextEncoder,new TextDecoder;var Gd,Wd={exports:{}},Kd={},qd={},Hd={acl:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},append:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},asking:{arity:1,flags:["fast"],keyStart:0,keyStop:0,step:0},auth:{arity:-2,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},bgrewriteaof:{arity:1,flags:["admin","noscript","no_async_loading"],keyStart:0,keyStop:0,step:0},bgsave:{arity:-1,flags:["admin","noscript","no_async_loading"],keyStart:0,keyStop:0,step:0},bitcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},bitfield:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},bitfield_ro:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},bitop:{arity:-4,flags:["write","denyoom"],keyStart:2,keyStop:-1,step:1},bitpos:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},blmove:{arity:6,flags:["write","denyoom","noscript","blocking"],keyStart:1,keyStop:2,step:1},blmpop:{arity:-5,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},blpop:{arity:-3,flags:["write","noscript","blocking"],keyStart:1,keyStop:-2,step:1},brpop:{arity:-3,flags:["write","noscript","blocking"],keyStart:1,keyStop:-2,step:1},brpoplpush:{arity:4,flags:["write","denyoom","noscript","blocking"],keyStart:1,keyStop:2,step:1},bzmpop:{arity:-5,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},bzpopmax:{arity:-3,flags:["write","noscript","blocking","fast"],keyStart:1,keyStop:-2,step:1},bzpopmin:{arity:-3,flags:["write","noscript","blocking","fast"],keyStart:1,keyStop:-2,step:1},client:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},cluster:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},command:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},config:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},copy:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},dbsize:{arity:1,flags:["readonly","fast"],keyStart:0,keyStop:0,step:0},debug:{arity:-2,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},decr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},decrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},del:{arity:-2,flags:["write"],keyStart:1,keyStop:-1,step:1},discard:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},dump:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},echo:{arity:2,flags:["fast"],keyStart:0,keyStop:0,step:0},eval:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},eval_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},evalsha:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},evalsha_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},exec:{arity:1,flags:["noscript","loading","stale","skip_slowlog"],keyStart:0,keyStop:0,step:0},exists:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},expire:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},expireat:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},expiretime:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},failover:{arity:-1,flags:["admin","noscript","stale"],keyStart:0,keyStop:0,step:0},fcall:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},fcall_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},flushall:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},flushdb:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},function:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},geoadd:{arity:-5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},geodist:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},geohash:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},geopos:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},georadius:{arity:-6,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},georadius_ro:{arity:-6,flags:["readonly"],keyStart:1,keyStop:1,step:1},georadiusbymember:{arity:-5,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},georadiusbymember_ro:{arity:-5,flags:["readonly"],keyStart:1,keyStop:1,step:1},geosearch:{arity:-7,flags:["readonly"],keyStart:1,keyStop:1,step:1},geosearchstore:{arity:-8,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},get:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getbit:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getdel:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},getex:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},getrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},getset:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hdel:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hello:{arity:-1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},hexists:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hexpire:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hpexpire:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hget:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hgetall:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hincrbyfloat:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hkeys:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmget:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hrandfield:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},hset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hsetnx:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hstrlen:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hvals:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},incr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrbyfloat:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},info:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},keys:{arity:2,flags:["readonly"],keyStart:0,keyStop:0,step:0},lastsave:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},latency:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},lcs:{arity:-3,flags:["readonly"],keyStart:1,keyStop:2,step:1},lindex:{arity:3,flags:["readonly"],keyStart:1,keyStop:1,step:1},linsert:{arity:5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},llen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},lmove:{arity:5,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},lmpop:{arity:-4,flags:["write","movablekeys"],keyStart:0,keyStop:0,step:0},lolwut:{arity:-1,flags:["readonly","fast"],keyStart:0,keyStop:0,step:0},lpop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},lpos:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},lpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},lrem:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},lset:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},ltrim:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},memory:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},mget:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},migrate:{arity:-6,flags:["write","movablekeys"],keyStart:3,keyStop:3,step:1},module:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},monitor:{arity:1,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},move:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},mset:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},msetnx:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},multi:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},object:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},persist:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpire:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpireat:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpiretime:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},pfadd:{arity:-2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},pfcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},pfdebug:{arity:3,flags:["write","denyoom","admin"],keyStart:2,keyStop:2,step:1},pfmerge:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},pfselftest:{arity:1,flags:["admin"],keyStart:0,keyStop:0,step:0},ping:{arity:-1,flags:["fast"],keyStart:0,keyStop:0,step:0},psetex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},psubscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},psync:{arity:-3,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},pttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},publish:{arity:3,flags:["pubsub","loading","stale","fast"],keyStart:0,keyStop:0,step:0},pubsub:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},punsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},quit:{arity:-1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},randomkey:{arity:1,flags:["readonly"],keyStart:0,keyStop:0,step:0},readonly:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},readwrite:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},rename:{arity:3,flags:["write"],keyStart:1,keyStop:2,step:1},renamenx:{arity:3,flags:["write","fast"],keyStart:1,keyStop:2,step:1},replconf:{arity:-1,flags:["admin","noscript","loading","stale","allow_busy"],keyStart:0,keyStop:0,step:0},replicaof:{arity:3,flags:["admin","noscript","stale","no_async_loading"],keyStart:0,keyStop:0,step:0},reset:{arity:1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},restore:{arity:-4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},"restore-asking":{arity:-4,flags:["write","denyoom","asking"],keyStart:1,keyStop:1,step:1},role:{arity:1,flags:["noscript","loading","stale","fast"],keyStart:0,keyStop:0,step:0},rpop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},rpoplpush:{arity:3,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},rpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},rpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},sadd:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},save:{arity:1,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},scan:{arity:-2,flags:["readonly"],keyStart:0,keyStop:0,step:0},scard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},script:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},sdiff:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sdiffstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},select:{arity:2,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},set:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setbit:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setnx:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},setrange:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},shutdown:{arity:-1,flags:["admin","noscript","loading","stale","no_multi","allow_busy"],keyStart:0,keyStop:0,step:0},sinter:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sintercard:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},sinterstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},sismember:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},slaveof:{arity:3,flags:["admin","noscript","stale","no_async_loading"],keyStart:0,keyStop:0,step:0},slowlog:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},smembers:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},smismember:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},smove:{arity:4,flags:["write","fast"],keyStart:1,keyStop:2,step:1},sort:{arity:-2,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},sort_ro:{arity:-2,flags:["readonly","movablekeys"],keyStart:1,keyStop:1,step:1},spop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},spublish:{arity:3,flags:["pubsub","loading","stale","fast"],keyStart:1,keyStop:1,step:1},srandmember:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},srem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},sscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},ssubscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:1,keyStop:-1,step:1},strlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},subscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},substr:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},sunion:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sunionstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},sunsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:1,keyStop:-1,step:1},swapdb:{arity:3,flags:["write","fast"],keyStart:0,keyStop:0,step:0},sync:{arity:1,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},time:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},touch:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},ttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},type:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},unlink:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:-1,step:1},unsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},unwatch:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},wait:{arity:3,flags:["noscript"],keyStart:0,keyStop:0,step:0},watch:{arity:-2,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:1,keyStop:-1,step:1},xack:{arity:-4,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xadd:{arity:-5,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},xautoclaim:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xclaim:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xdel:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xdelex:{arity:-5,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xgroup:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},xinfo:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},xlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},xpending:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},xrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},xread:{arity:-4,flags:["readonly","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},xreadgroup:{arity:-7,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},xrevrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},xsetid:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},xtrim:{arity:-4,flags:["write"],keyStart:1,keyStop:1,step:1},zadd:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zcard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zdiff:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zdiffstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},zincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zinter:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zintercard:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zinterstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},zlexcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zmpop:{arity:-4,flags:["write","movablekeys"],keyStart:0,keyStop:0,step:0},zmscore:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zpopmax:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zpopmin:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zrandmember:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangestore:{arity:-5,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},zrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zrem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zremrangebylex:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyrank:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyscore:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zrevrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},zscore:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zunion:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zunionstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1}};function Qd(){return Gd||(Gd=1,function(e){var t=qd&&qd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getKeyIndexes=e.hasFlag=e.exists=e.list=void 0;const n=t(Hd);e.list=Object.keys(n.default);const i={};function r(e){"string"!=typeof e&&(e=String(e));const t=e.indexOf("->");return-1===t?e.length:t}e.list.forEach(e=>{i[e]=n.default[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),e.exists=function(e){return Boolean(n.default[e])},e.hasFlag=function(e,t){if(!i[e])throw new Error("Unknown command "+e);return Boolean(i[e][t])},e.getKeyIndexes=function(e,t,i){const o=n.default[e];if(!o)throw new Error("Unknown command "+e);if(!Array.isArray(t))throw new Error("Expect args to be an array");const s=[],a=Boolean(i&&i.parseExternalKey),u=(e,t)=>{const n=[],i=Number(e[t]);for(let e=0;e<i;e++)n.push(e+t+1);return n},c=(e,t,n)=>{for(let i=t;i<e.length-1;i+=1)if(String(e[i]).toLowerCase()===n.toLowerCase())return i+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":s.push(0,...u(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":s.push(...u(t,1));break;case"sintercard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":s.push(...u(t,0));break;case"georadius":{s.push(0);const e=c(t,5,"STORE");e&&s.push(e);const n=c(t,5,"STOREDIST");n&&s.push(n);break}case"georadiusbymember":{s.push(0);const e=c(t,4,"STORE");e&&s.push(e);const n=c(t,4,"STOREDIST");n&&s.push(n);break}case"sort":case"sort_ro":s.push(0);for(let e=1;e<t.length-1;e++){let n=t[e];if("string"!=typeof n)continue;const i=n.toUpperCase();"GET"===i?(e+=1,n=t[e],"#"!==n&&(a?s.push([e,r(n)]):s.push(e))):"BY"===i?(e+=1,a?s.push([e,r(t[e])]):s.push(e)):"STORE"===i&&(e+=1,s.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){const n=t[e];if("string"==typeof n&&"KEYS"===n.toUpperCase()){for(let n=e+1;n<t.length;n++)s.push(n);break}}else s.push(2);break;case"xreadgroup":case"xread":for(let n="xread"===e?0:3;n<t.length-1;n++)if("STREAMS"===String(t[n]).toUpperCase()){for(let e=n+1;e<=n+(t.length-1-n)/2;e++)s.push(e);break}break;default:if(o.step>0){const e=o.keyStart-1,n=o.keyStop>0?o.keyStop:t.length+o.keyStop+1;for(let t=e;t<n;t+=o.step)s.push(t)}}return s}}(qd)),qd}var Yd,Xd,em={},tm={};function nm(){if(Xd)return em;Xd=1,Object.defineProperty(em,"__esModule",{value:!0});const e=(Yd||(Yd=1,function(e){let t;function n(n,i){try{const e=t;return t=null,e.apply(this,arguments)}catch(t){return e.errorObj.e=t,e.errorObj}}Object.defineProperty(e,"__esModule",{value:!0}),e.tryCatch=e.errorObj=void 0,e.errorObj={e:{}},e.tryCatch=function(e){return t=e,n}}(tm)),tm);function t(e){setTimeout(function(){throw e},0)}return em.default=function(n,i,r){return"function"==typeof i&&n.then(n=>{let o;o=void 0!==r&&Object(r).spread&&Array.isArray(n)?e.tryCatch(i).apply(void 0,[null].concat(n)):void 0===n?e.tryCatch(i)(null):e.tryCatch(i)(null,n),o===e.errorObj&&t(o.e)},n=>{if(!n){const e=new Error(n+"");Object.assign(e,{cause:n}),n=e}const r=e.tryCatch(i)(n);r===e.errorObj&&t(r.e)}),n},em}var im,rm,om,sm,am,um,cm={};function lm(){if(um)return am;um=1;const e=process.version.charCodeAt(1)<55&&46===process.version.charCodeAt(2)?function(){if(rm)return im;rm=1;const e=b,t=$;function n(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function i(t,n,i){e(n),e.strictEqual(typeof i,"number"),Object.defineProperty(this,"message",{value:t||"",configurable:!0,writable:!0});const r=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=r,this.offset=i,this.buffer=n}function r(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});const t=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=t}function o(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function s(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}return t.inherits(n,Error),Object.defineProperty(n.prototype,"name",{value:"RedisError",configurable:!0,writable:!0}),t.inherits(i,n),Object.defineProperty(i.prototype,"name",{value:"ParserError",configurable:!0,writable:!0}),t.inherits(r,n),Object.defineProperty(r.prototype,"name",{value:"ReplyError",configurable:!0,writable:!0}),t.inherits(o,n),Object.defineProperty(o.prototype,"name",{value:"AbortError",configurable:!0,writable:!0}),t.inherits(s,o),Object.defineProperty(s.prototype,"name",{value:"InterruptError",configurable:!0,writable:!0}),im={RedisError:n,ParserError:i,ReplyError:r,AbortError:o,InterruptError:s}}():function(){if(sm)return om;sm=1;const e=b;class t extends Error{get name(){return this.constructor.name}}class n extends t{get name(){return this.constructor.name}}return om={RedisError:t,ParserError:class extends t{constructor(t,n,i){e(n),e.strictEqual(typeof i,"number");const r=Error.stackTraceLimit;Error.stackTraceLimit=2,super(t),Error.stackTraceLimit=r,this.offset=i,this.buffer=n}get name(){return this.constructor.name}},ReplyError:class extends t{constructor(e){const t=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=t}get name(){return this.constructor.name}},AbortError:n,InterruptError:class extends n{get name(){return this.constructor.name}}}}();return am=e}var dm,mm={},pm={exports:{}};function fm(){if(dm)return pm.exports;dm=1;var e=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],t=pm.exports=function(t){for(var n,i=0,r=-1,o=0,s=0,a="string"==typeof t?function(e){for(var t,n=0,i=0,r=[],o=e.length;n<o;n++)(t=e.charCodeAt(n))<128?r[i++]=t:t<2048?(r[i++]=t>>6|192,r[i++]=63&t|128):55296==(64512&t)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++n)),r[i++]=t>>18|240,r[i++]=t>>12&63|128,r[i++]=t>>6&63|128,r[i++]=63&t|128):(r[i++]=t>>12|224,r[i++]=t>>6&63|128,r[i++]=63&t|128);return r}(t):t,u=a.length;i<u;){if(n=a[i++],-1===r)123===n&&(r=i);else if(125!==n)s=e[255&(n^s>>8)]^s<<8;else if(i-1!==r)return 16383&s;o=e[255&(n^o>>8)]^o<<8}return 16383&o};return pm.exports.generateMulti=function(e){for(var n=1,i=e.length,r=t(e[0]);n<i;)if(t(e[n++])!==r)return-1;return r},pm.exports}var hm,gm,vm,ym,_m,bm={},$m={};function km(){if(gm)return hm;gm=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",i="[object GeneratorFunction]",r=/^(?:0|[1-9]\d*)$/;function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var s=Object.prototype,a=s.hasOwnProperty,u=s.toString,c=s.propertyIsEnumerable,l=Math.max;function d(e,n){var i=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&_(e)}(e)&&a.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==t)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],r=i.length,o=!!r;for(var s in e)o&&("length"==s||g(s,r))||i.push(s);return i}function m(e,t,n,i){return void 0===e||v(e,s[n])&&!a.call(i,n)?t:e}function p(e,t,n){var i=e[t];a.call(e,t)&&v(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function f(e){if(!b(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,i,r=(n=(t=e)&&t.constructor,i="function"==typeof n&&n.prototype||s,t===i),o=[];for(var u in e)("constructor"!=u||!r&&a.call(e,u))&&o.push(u);return o}function h(e,t){return t=l(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,r=l(n.length-t,0),s=Array(r);++i<r;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=s,o(e,this,a)}}function g(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<n}function v(e,t){return e===t||e!=e&&t!=t}var y=Array.isArray;function _(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=b(e)?u.call(e):"";return t==n||t==i}(t)}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var $,k=($=function(e,t,n,i){!function(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],a=i?i(n[s],e[s],s,n,e):void 0;p(n,s,void 0===a?e[s]:a)}}(t,function(e){return _(e)?d(e):f(e)}(t),e,i)},h(function(e,t){var n=-1,i=t.length,r=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(r=$.length>3&&"function"==typeof r?(i--,r):void 0,o&&function(e,t,n){if(!b(n))return!1;var i=typeof t;return!!("number"==i?_(n)&&g(t,n.length):"string"==i&&t in n)&&v(n[t],e)}(t[0],t[1],o)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var s=t[n];s&&$(e,s,n,r)}return e})),w=h(function(e){return e.push(void 0,m),o(k,void 0,e)});return hm=w}function wm(){if(ym)return vm;ym=1;var e=9007199254740991,t="[object Function]",n="[object GeneratorFunction]",i=Object.prototype,r=i.hasOwnProperty,o=i.toString,s=i.propertyIsEnumerable;return vm=function(i){return function(i){return function(e){return!!e&&"object"==typeof e}(i)&&function(i){return null!=i&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(i.length)&&!function(e){var i=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?o.call(e):"";return i==t||i==n}(i)}(i)}(i)&&r.call(i,"callee")&&(!s.call(i,"callee")||"[object Arguments]"==o.call(i))},vm}function Sm(){if(_m)return $m;_m=1,Object.defineProperty($m,"__esModule",{value:!0}),$m.isArguments=$m.defaults=$m.noop=void 0;const e=km();$m.defaults=e;const t=wm();return $m.isArguments=t,$m.noop=function(){},$m}var Im,xm={};var Em,Om,Nm,zm={};function Tm(){return Om||(Om=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=e.defaults=e.Debug=e.getPackageMeta=e.zipMap=e.CONNECTION_CLOSED_ERROR_MSG=e.shuffle=e.sample=e.resolveTLSProfile=e.parseURL=e.optimizeErrorStack=e.toArg=e.convertMapToArray=e.convertObjectToArray=e.timeout=e.packObject=e.isInt=e.wrapMultiResult=e.convertBufferToString=void 0;const t=k,n=w,i=S,r=Sm();Object.defineProperty(e,"defaults",{enumerable:!0,get:function(){return r.defaults}}),Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return r.noop}});const o=function(){if(Im)return xm;Im=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.genRedactedString=xm.getStringValue=xm.MAX_ARGUMENT_LENGTH=void 0;const e=me();function t(e){if(null!==e)switch(typeof e){case"boolean":case"number":return;case"object":if(Buffer.isBuffer(e))return e.toString("hex");if(Array.isArray(e))return e.join(",");try{return JSON.stringify(e)}catch(e){return}case"string":return e}}function n(e,t){const{length:n}=e;return n<=t?e:e.slice(0,t)+' ... <REDACTED full-length="'+n+'">'}return xm.MAX_ARGUMENT_LENGTH=200,xm.getStringValue=t,xm.genRedactedString=n,xm.default=function(i){const r=(0,e.default)(`ioredis:${i}`);function o(...e){if(r.enabled){for(let i=1;i<e.length;i++){const r=t(e[i]);"string"==typeof r&&r.length>200&&(e[i]=n(r,200))}return r.apply(null,e)}}return Object.defineProperties(o,{namespace:{get:()=>r.namespace},enabled:{get:()=>r.enabled},destroy:{get:()=>r.destroy},log:{get:()=>r.log,set(e){r.log=e}}}),o},xm}();e.Debug=o.default;const s=function(){if(Em)return zm;Em=1,Object.defineProperty(zm,"__esModule",{value:!0});const e="-----BEGIN CERTIFICATE-----\nMIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP\nJnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz\nrmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E\nQwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2\nBDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfhyCzRWMQ7Hn71u1eolRxwVxgi3\nTMn+/vTaFSqxKjgck6zuAYjBRPaHe7qLxHNr1So/Mc9nPy+3wHebFwbIcnUojwbp\n4nctkWbjb2cCAwEAAaNQME4wHQYDVR0OBBYEFP1whtcrydmW3ZJeuSoKZIKjze3w\nMB8GA1UdIwQYMBaAFP1whtcrydmW3ZJeuSoKZIKjze3wMAwGA1UdEwQFMAMBAf8w\nDQYJKoZIhvcNAQEFBQADggEBAG2erXhwRAa7+ZOBs0B6X57Hwyd1R4kfmXcs0rta\nlbPpvgULSiB+TCbf3EbhJnHGyvdCY1tvlffLjdA7HJ0PCOn+YYLBA0pTU/dyvrN6\nSu8NuS5yubnt9mb13nDGYo1rnt0YRfxN+8DM3fXIVr038A30UlPX2Ou1ExFJT0MZ\nuFKY6ZvLdI6/1cbgmguMlAhM+DhKyV6Sr5699LM3zqeI816pZmlREETYkGr91q7k\nBpXJu/dtHaGxg1ZGu6w/PCsYGUcECWENYD4VQPd8N32JjOfu6vEgoEAwfPP+3oGp\nZ4m3ewACcWOAenqflb+cQYC4PsF7qbXDmRaWrbKntOlZ3n0=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIGMTCCBBmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwajELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJzMS0w\nKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN\nMTgwMjI1MTUzNzM3WhcNMjgwMjIzMTUzNzM3WjBfMQswCQYDVQQGEwJVUzELMAkG\nA1UECAwCQ0ExEjAQBgNVBAoMCVJlZGlzTGFiczEvMC0GA1UEAwwmUkNQIEludGVy\nbWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA\nA4ICDwAwggIKAoICAQDf9dqbxc8Bq7Ctq9rWcxrGNKKHivqLAFpPq02yLPx6fsOv\nTq7GsDChAYBBc4v7Y2Ap9RD5Vs3dIhEANcnolf27QwrG9RMnnvzk8pCvp1o6zSU4\nVuOE1W66/O1/7e2rVxyrnTcP7UgK43zNIXu7+tiAqWsO92uSnuMoGPGpeaUm1jym\nhjWKtkAwDFSqvHY+XL5qDVBEjeUe+WHkYUg40cAXjusAqgm2hZt29c2wnVrxW25W\nP0meNlzHGFdA2AC5z54iRiqj57dTfBTkHoBczQxcyw6hhzxZQ4e5I5zOKjXXEhZN\nr0tA3YC14CTabKRus/JmZieyZzRgEy2oti64tmLYTqSlAD78pRL40VNoaSYetXLw\nhhNsXCHgWaY6d5bLOc/aIQMAV5oLvZQKvuXAF1IDmhPA+bZbpWipp0zagf1P1H3s\nUzsMdn2KM0ejzgotbtNlj5TcrVwpmvE3ktvUAuA+hi3FkVx1US+2Gsp5x4YOzJ7u\nP1WPk6ShF0JgnJH2ILdj6kttTWwFzH17keSFICWDfH/+kM+k7Y1v3EXMQXE7y0T9\nMjvJskz6d/nv+sQhY04xt64xFMGTnZjlJMzfQNi7zWFLTZnDD0lPowq7l3YiPoTT\nt5Xky83lu0KZsZBo0WlWaDG00gLVdtRgVbcuSWxpi5BdLb1kRab66JptWjxwXQID\nAQABo4HrMIHoMDoGA1UdHwQzMDEwL6AtoCuGKWh0dHBzOi8vcmwtY2Etc2VydmVy\nLnJlZGlzbGFicy5jb20vdjEvY3JsMEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcw\nAYYqaHR0cHM6Ly9ybC1jYS1zZXJ2ZXIucmVkaXNsYWJzLmNvbS92MS9vY3NwMB0G\nA1UdDgQWBBQHar5OKvQUpP2qWt6mckzToeCOHDAfBgNVHSMEGDAWgBQi42wH6hM4\nL2sujEvLM0/u8lRXTzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIB\nhjANBgkqhkiG9w0BAQsFAAOCAgEAirEn/iTsAKyhd+pu2W3Z5NjCko4NPU0EYUbr\nAP7+POK2rzjIrJO3nFYQ/LLuC7KCXG+2qwan2SAOGmqWst13Y+WHp44Kae0kaChW\nvcYLXXSoGQGC8QuFSNUdaeg3RbMDYFT04dOkqufeWVccoHVxyTSg9eD8LZuHn5jw\n7QDLiEECBmIJHk5Eeo2TAZrx4Yx6ufSUX5HeVjlAzqwtAqdt99uCJ/EL8bgpWbe+\nXoSpvUv0SEC1I1dCAhCKAvRlIOA6VBcmzg5Am12KzkqTul12/VEFIgzqu0Zy2Jbc\nAUPrYVu/+tOGXQaijy7YgwH8P8n3s7ZeUa1VABJHcxrxYduDDJBLZi+MjheUDaZ1\njQRHYevI2tlqeSBqdPKG4zBY5lS0GiAlmuze5oENt0P3XboHoZPHiqcK3VECgTVh\n/BkJcuudETSJcZDmQ8YfoKfBzRQNg2sv/hwvUv73Ss51Sco8GEt2lD8uEdib1Q6z\nzDT5lXJowSzOD5ZA9OGDjnSRL+2riNtKWKEqvtEG3VBJoBzu9GoxbAc7wIZLxmli\niF5a/Zf5X+UXD3s4TMmy6C4QZJpAA2egsSQCnraWO2ULhh7iXMysSkF/nzVfZn43\niqpaB8++9a37hWq14ZmOv0TJIDz//b2+KC4VFXWQ5W5QC6whsjT+OlG4p5ZYG0jo\n616pxqo=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIFujCCA6KgAwIBAgIJAJ1aTT1lu2ScMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV\nBAYTAlVTMQswCQYDVQQIDAJDQTELMAkGA1UEBwwCQ0ExEjAQBgNVBAoMCVJlZGlz\nTGFiczEtMCsGA1UEAwwkUmVkaXNMYWJzIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MB4XDTE4MDIyNTE1MjA0MloXDTM4MDIyMDE1MjA0MlowajELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJz\nMS0wKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw\nggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDLEjXy7YrbN5Waau5cd6g1\nG5C2tMmeTpZ0duFAPxNU4oE3RHS5gGiok346fUXuUxbZ6QkuzeN2/2Z+RmRcJhQY\nDm0ZgdG4x59An1TJfnzKKoWj8ISmoHS/TGNBdFzXV7FYNLBuqZouqePI6ReC6Qhl\npp45huV32Q3a6IDrrvx7Wo5ZczEQeFNbCeCOQYNDdTmCyEkHqc2AGo8eoIlSTutT\nULOC7R5gzJVTS0e1hesQ7jmqHjbO+VQS1NAL4/5K6cuTEqUl+XhVhPdLWBXJQ5ag\n54qhX4v+ojLzeU1R/Vc6NjMvVtptWY6JihpgplprN0Yh2556ewcXMeturcKgXfGJ\nxeYzsjzXerEjrVocX5V8BNrg64NlifzTMKNOOv4fVZszq1SIHR8F9ROrqiOdh8iC\nJpUbLpXH9hWCSEO6VRMB2xJoKu3cgl63kF30s77x7wLFMEHiwsQRKxooE1UhgS9K\n2sO4TlQ1eWUvFvHSTVDQDlGQ6zu4qjbOpb3Q8bQwoK+ai2alkXVR4Ltxe9QlgYK3\nStsnPhruzZGA0wbXdpw0bnM+YdlEm5ffSTpNIfgHeaa7Dtb801FtA71ZlH7A6TaI\nSIQuUST9EKmv7xrJyx0W1pGoPOLw5T029aTjnICSLdtV9bLwysrLhIYG5bnPq78B\ncS+jZHFGzD7PUVGQD01nOQIDAQABo2MwYTAdBgNVHQ4EFgQUIuNsB+oTOC9rLoxL\nyzNP7vJUV08wHwYDVR0jBBgwFoAUIuNsB+oTOC9rLoxLyzNP7vJUV08wDwYDVR0T\nAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAHfg\nz5pMNUAKdMzK1aS1EDdK9yKz4qicILz5czSLj1mC7HKDRy8cVADUxEICis++CsCu\nrYOvyCVergHQLREcxPq4rc5Nq1uj6J6649NEeh4WazOOjL4ZfQ1jVznMbGy+fJm3\n3Hoelv6jWRG9iqeJZja7/1s6YC6bWymI/OY1e4wUKeNHAo+Vger7MlHV+RuabaX+\nhSJ8bJAM59NCM7AgMTQpJCncrcdLeceYniGy5Q/qt2b5mJkQVkIdy4TPGGB+AXDJ\nD0q3I/JDRkDUFNFdeW0js7fHdsvCR7O3tJy5zIgEV/o/BCkmJVtuwPYOrw/yOlKj\nTY/U7ATAx9VFF6/vYEOMYSmrZlFX+98L6nJtwDqfLB5VTltqZ4H/KBxGE3IRSt9l\nFXy40U+LnXzhhW+7VBAvyYX8GEXhHkKU8Gqk1xitrqfBXY74xKgyUSTolFSfFVgj\nmcM/X4K45bka+qpkj7Kfv/8D4j6aZekwhN2ly6hhC1SmQ8qjMjpG/mrWOSSHZFmf\nybu9iD2AYHeIOkshIl6xYIa++Q/00/vs46IzAbQyriOi0XxlSMMVtPx0Q3isp+ji\nn8Mq9eOuxYOEQ4of8twUkUDd528iwGtEdwf0Q01UyT84S62N8AySl1ZBKXJz6W4F\nUhWfa/HQYOAPDdEjNgnVwLI23b8t0TozyCWw7q8h\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIEjzCCA3egAwIBAgIQe55B/ALCKJDZtdNT8kD6hTANBgkqhkiG9w0BAQsFADBM\nMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xv\nYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0yMjAxMjYxMjAwMDBaFw0y\nNTAxMjYwMDAwMDBaMFgxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWdu\nIG52LXNhMS4wLAYDVQQDEyVHbG9iYWxTaWduIEF0bGFzIFIzIE9WIFRMUyBDQSAy\nMDIyIFEyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmGmg1LW9b7Lf\n8zDD83yBDTEkt+FOxKJZqF4veWc5KZsQj9HfnUS2e5nj/E+JImlGPsQuoiosLuXD\nBVBNAMcUFa11buFMGMeEMwiTmCXoXRrXQmH0qjpOfKgYc5gHG3BsRGaRrf7VR4eg\nofNMG9wUBw4/g/TT7+bQJdA4NfE7Y4d5gEryZiBGB/swaX6Jp/8MF4TgUmOWmalK\ndZCKyb4sPGQFRTtElk67F7vU+wdGcrcOx1tDcIB0ncjLPMnaFicagl+daWGsKqTh\ncounQb6QJtYHa91KvCfKWocMxQ7OIbB5UARLPmC4CJ1/f8YFm35ebfzAeULYdGXu\njE9CLor0OwIDAQABo4IBXzCCAVswDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQG\nCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW\nBBSH5Zq7a7B/t95GfJWkDBpA8HHqdjAfBgNVHSMEGDAWgBSP8Et/qC5FJK5NUPpj\nmove4t0bvDB7BggrBgEFBQcBAQRvMG0wLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3Nw\nMi5nbG9iYWxzaWduLmNvbS9yb290cjMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9zZWN1\ncmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L3Jvb3QtcjMuY3J0MDYGA1UdHwQvMC0w\nK6ApoCeGJWh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5jb20vcm9vdC1yMy5jcmwwIQYD\nVR0gBBowGDAIBgZngQwBAgIwDAYKKwYBBAGgMgoBAjANBgkqhkiG9w0BAQsFAAOC\nAQEAKRic9/f+nmhQU/wz04APZLjgG5OgsuUOyUEZjKVhNGDwxGTvKhyXGGAMW2B/\n3bRi+aElpXwoxu3pL6fkElbX3B0BeS5LoDtxkyiVEBMZ8m+sXbocwlPyxrPbX6mY\n0rVIvnuUeBH8X0L5IwfpNVvKnBIilTbcebfHyXkPezGwz7E1yhUULjJFm2bt0SdX\ny+4X/WeiiYIv+fTVgZZgl+/2MKIsu/qdBJc3f3TvJ8nz+Eax1zgZmww+RSQWeOj3\n15Iw6Z5FX+NwzY/Ab+9PosR5UosSeq+9HhtaxZttXG1nVh+avYPGYddWmiMT90J5\nZgKnO/Fx2hBgTxhOTMYaD312kg==\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G\nA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp\nZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4\nMTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG\nA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8\nRgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT\ngHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm\nKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd\nQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ\nXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw\nDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o\nLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU\nRUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp\njjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK\n6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX\nmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs\nMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH\nWD9f\n-----END CERTIFICATE-----",t={RedisCloudFixed:{ca:e},RedisCloudFlexible:{ca:e}};return zm.default=t,zm}();function a(e){const t=parseFloat(e);return!isNaN(e)&&(0|t)===t}e.convertBufferToString=function e(t,n){if(t instanceof Buffer)return t.toString(n);if(Array.isArray(t)){const i=t.length,r=Array(i);for(let o=0;o<i;++o)r[o]=t[o]instanceof Buffer&&"utf8"===n?t[o].toString():e(t[o],n);return r}return t},e.wrapMultiResult=function(e){if(!e)return null;const t=[],n=e.length;for(let i=0;i<n;++i){const n=e[i];n instanceof Error?t.push([n]):t.push([null,n])}return t},e.isInt=a,e.packObject=function(e){const t={},n=e.length;for(let i=1;i<n;i+=2)t[e[i-1]]=e[i];return t},e.timeout=function(e,t){let n=null;const i=function(){n&&(clearTimeout(n),n=null,e.apply(this,arguments))};return n=setTimeout(i,t,new Error("timeout")),i},e.convertObjectToArray=function(e){const t=[],n=Object.keys(e);for(let i=0,r=n.length;i<r;i++)t.push(n[i],e[n[i]]);return t},e.convertMapToArray=function(e){const t=[];let n=0;return e.forEach(function(e,i){t[n]=i,t[n+1]=e,n+=2}),t},e.toArg=function(e){return null==e?"":String(e)},e.optimizeErrorStack=function(e,t,n){const i=t.split("\n");let r,o="";for(r=1;r<i.length&&-1!==i[r].indexOf(n);++r);for(let e=r;e<i.length;++e)o+="\n"+i[e];if(e.stack){const t=e.stack.indexOf("\n");e.stack=e.stack.slice(0,t)+o}return e},e.parseURL=function(e){if(a(e))return{port:e};let t=(0,i.parse)(e,!0,!0);t.slashes||"/"===e[0]||(e="//"+e,t=(0,i.parse)(e,!0,!0));const n=t.query||{},o={};if(t.auth){const e=t.auth.indexOf(":");o.username=-1===e?t.auth:t.auth.slice(0,e),o.password=-1===e?"":t.auth.slice(e+1)}if(t.pathname&&("redis:"===t.protocol||"rediss:"===t.protocol?t.pathname.length>1&&(o.db=t.pathname.slice(1)):o.path=t.pathname),t.host&&(o.host=t.hostname),t.port&&(o.port=t.port),"string"==typeof n.family){const e=Number.parseInt(n.family,10);Number.isNaN(e)||(o.family=e)}return(0,r.defaults)(o,n),o},e.resolveTLSProfile=function(e){let t=null==e?void 0:e.tls;"string"==typeof t&&(t={profile:t});const n=s.default[null==t?void 0:t.profile];return n&&(t=Object.assign({},n,t),delete t.profile,e=Object.assign({},e,{tls:t})),e},e.sample=function(e,t=0){const n=e.length;return t>=n?null:e[t+Math.floor(Math.random()*(n-t))]},e.shuffle=function(e){let t=e.length;for(;t>0;){const n=Math.floor(Math.random()*t);t--,[e[t],e[n]]=[e[n],e[t]]}return e},e.CONNECTION_CLOSED_ERROR_MSG="Connection is closed.",e.zipMap=function(e,t){const n=new Map;return e.forEach((e,i)=>{n.set(e,t[i])}),n};let u=null;e.getPackageMeta=async function(){if(u)return u;try{const e=(0,n.resolve)(__dirname,"..","..","package.json"),i=await t.promises.readFile(e,"utf8"),r=JSON.parse(i);return u={version:r.version},u}catch(e){return u={version:"error-fetching-version"},u}}}(bm)),bm}function Dm(){if(Nm)return mm;Nm=1,Object.defineProperty(mm,"__esModule",{value:!0});const e=Qd(),t=fm(),n=nm(),i=Tm();class r{constructor(e,t=[],n={},i){if(this.name=e,this.inTransaction=!1,this.isResolved=!1,this.transformed=!1,this.replyEncoding=n.replyEncoding,this.errorStack=n.errorStack,this.args=t.flat(),this.callback=i,this.initPromise(),n.keyPrefix){const e=n.keyPrefix instanceof Buffer;let t=e?n.keyPrefix:null;this._iterateKeys(i=>i instanceof Buffer?(null===t&&(t=Buffer.from(n.keyPrefix)),Buffer.concat([t,i])):e?Buffer.concat([n.keyPrefix,Buffer.from(String(i))]):n.keyPrefix+i)}n.readOnly&&(this.isReadOnly=!0)}static checkFlag(e,t){return!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(r.FLAGS).reduce((e,t)=>(e[t]={},r.FLAGS[t].forEach(n=>{e[t][n]=!0}),e),{})),this.flagMap}getSlot(){if(void 0===this.slot){const e=this.getKeys()[0];this.slot=null==e?null:t(e)}return this.slot}getKeys(){return this._iterateKeys()}toWritable(e){let t;const n="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){const e=new a;e.push(n);for(let t=0;t<this.args.length;++t){const n=this.args[t];n instanceof Buffer?0===n.length?e.push("$0\r\n\r\n"):(e.push("$"+n.length+"\r\n"),e.push(n),e.push("\r\n")):e.push("$"+Buffer.byteLength(n)+"\r\n"+n+"\r\n")}t=e.toBuffer()}else{t=n;for(let e=0;e<this.args.length;++e){const n=this.args[e];t+="$"+Buffer.byteLength(n)+"\r\n"+n+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){const t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,i.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,i.convertBufferToString)(e,this.replyEncoding));const t=r._transformer.reply[this.name];return t&&(e=t(e)),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isResolved||this.reject(new Error("Command timed out"))},e))}initPromise(){const e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;const e=r._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.errorStack?this.reject=e=>{t((0,i.optimizeErrorStack)(e,this.errorStack.stack,__dirname))}:this.reject=t});this.promise=(0,n.default)(e,this.callback)}_iterateKeys(t=e=>e){if(void 0===this.keys&&(this.keys=[],(0,e.exists)(this.name))){const n=(0,e.getKeyIndexes)(this.name,this.args);for(const e of n)this.args[e]=t(this.args[e]),this.keys.push(this.args[e])}return this.keys}_convertValue(e){return t=>{try{const n=this._commandTimeoutTimer;n&&(clearTimeout(n),delete this._commandTimeoutTimer),e(this.transformReply(t)),this.isResolved=!0}catch(e){this.reject(e)}return this.promise}}}mm.default=r,r.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"]},r._transformer={argument:{},reply:{}};const o=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,i.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,i.convertObjectToArray)(e[0])}return e},s=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,i.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,i.convertObjectToArray)(e[1]))}return e};r.setArgumentTransformer("mset",o),r.setArgumentTransformer("msetnx",o),r.setArgumentTransformer("hset",s),r.setArgumentTransformer("hmset",s),r.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){const t={};for(let n=0;n<e.length;n+=2){const i=e[n],r=e[n+1];i in t?Object.defineProperty(t,i,{value:r,configurable:!0,enumerable:!0,writable:!0}):t[i]=r}return t}return e});class a{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){const e=Buffer.allocUnsafe(this.length);let t=0;for(const n of this.items){const i=Buffer.byteLength(n);Buffer.isBuffer(n)?n.copy(e,t):e.write(n,t,i),t+=i}return e}}return mm}var Am,Cm={};var Um,Pm={};function jm(){if(Um)return Pm;Um=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=E;let t=class extends e.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);const e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}};return Pm.default=t,Pm}var Rm,Zm={},Lm={},Mm={},Fm={};var Bm,Jm,Vm,Gm,Wm={};function Km(){if(Jm)return Mm;Jm=1,Object.defineProperty(Mm,"__esModule",{value:!0});const e=Qd(),t=(Rm||(Rm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeWithAutoPipelining=e.getFirstValueInFlattenedArray=e.shouldUseAutoPipelining=e.notAllowedAutoPipelineCommands=e.kCallbacks=e.kExec=void 0;const t=Sm(),n=fm(),i=nm();function r(t,n){if(t._runningAutoPipelines.has(n))return;if(!t._autoPipelines.has(n))return;t._runningAutoPipelines.add(n);const i=t._autoPipelines.get(n);t._autoPipelines.delete(n);const o=i[e.kCallbacks];i[e.kCallbacks]=null,i.exec(function(e,i){if(t._runningAutoPipelines.delete(n),e)for(let t=0;t<o.length;t++)process.nextTick(o[t],e);else for(let e=0;e<o.length;e++)process.nextTick(o[e],...i[e]);t._autoPipelines.has(n)&&r(t,n)})}function o(e){for(let n=0;n<e.length;n++){const i=e[n];if("string"==typeof i)return i;if(Array.isArray(i)||(0,t.isArguments)(i)){if(0===i.length)continue;return i[0]}const r=[i].flat();if(r.length>0)return r[0]}}e.kExec=Symbol("exec"),e.kCallbacks=Symbol("callbacks"),e.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client"],e.shouldUseAutoPipelining=function(t,n,i){return n&&t.options.enableAutoPipelining&&!t.isPipeline&&!e.notAllowedAutoPipelineCommands.includes(i)&&!t.options.autoPipeliningIgnoredCommands.includes(i)},e.getFirstValueInFlattenedArray=o,e.executeWithAutoPipelining=function s(a,u,c,l,d){if(a.isCluster&&!a.slots.length)return"wait"===a.status&&a.connect().catch(t.noop),(0,i.default)(new Promise(function(e,t){a.delayUntilReady(n=>{n?t(n):s(a,u,c,l,null).then(e,t)})}),d);const m=a.options.keyPrefix||"",p=a.isCluster?a.slots[n(`${m}${o(l)}`)].join(","):"main";if(!a._autoPipelines.has(p)){const t=a.pipeline();t[e.kExec]=!1,t[e.kCallbacks]=[],a._autoPipelines.set(p,t)}const f=a._autoPipelines.get(p);f[e.kExec]||(f[e.kExec]=!0,setImmediate(r,a,p));const h=new Promise(function(t,n){f[e.kCallbacks].push(function(e,i){e?n(e):t(i)}),"call"===u&&l.unshift(c),f[u](...l)});return(0,i.default)(h,d)}}(Fm)),Fm),n=Dm(),i=function(){if(Bm)return Wm;Bm=1,Object.defineProperty(Wm,"__esModule",{value:!0});const e=v,t=Dm(),n=nm();return Wm.default=class{constructor(n,i=null,r="",o=!1){this.lua=n,this.numberOfKeys=i,this.keyPrefix=r,this.readOnly=o,this.sha=(0,e.createHash)("sha1").update(n).digest("hex");const s=this.sha,a=new WeakSet;this.Command=class extends t.default{toWritable(e){const t=this.reject;return this.reject=n=>{-1!==n.message.indexOf("NOSCRIPT")&&a.delete(e),t.call(this,n)},a.has(e)?"eval"===this.name&&(this.name="evalsha",this.args[0]=s):(a.add(e),this.name="eval",this.args[0]=n),super.toWritable(e)}}}execute(e,t,i,r){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(i.keyPrefix=this.keyPrefix),this.readOnly&&(i.readOnly=!0);const o=new this.Command("evalsha",[this.sha,...t],i);return o.promise=o.promise.catch(n=>{if(-1===n.message.indexOf("NOSCRIPT"))throw n;const r=new this.Command("evalsha",[this.sha,...t],i);return(e.isPipeline?e.redis:e).sendCommand(r)}),(0,n.default)(o.promise,r),e.sendCommand(o)}},Wm}();let r=class{constructor(){this.options={},this.scriptsSet={},this.addedBuiltinSet=new Set}getBuiltinCommands(){return o.slice(0)}createBuiltinCommand(e){return{string:s(null,e,"utf8"),buffer:s(null,e,null)}}addBuiltinCommand(e){this.addedBuiltinSet.add(e),this[e]=s(e,e,"utf8"),this[e+"Buffer"]=s(e+"Buffer",e,null)}defineCommand(e,t){const n=new i.default(t.lua,t.numberOfKeys,this.options.keyPrefix,t.readOnly);this.scriptsSet[e]=n,this[e]=a(e,e,n,"utf8"),this[e+"Buffer"]=a(e+"Buffer",e,n,null)}sendCommand(e,t,n){throw new Error('"sendCommand" is not implemented')}};const o=e.list.filter(e=>"monitor"!==e);function s(e,i,r){return void 0===r&&(r=i,i=null),function(...o){const s=i||o.shift();let a=o[o.length-1];"function"==typeof a?o.pop():a=void 0;const u={errorStack:this.options.showFriendlyErrorStack?new Error:void 0,keyPrefix:this.options.keyPrefix,replyEncoding:r};return(0,t.shouldUseAutoPipelining)(this,e,s)?(0,t.executeWithAutoPipelining)(this,e,s,o,a):this.sendCommand(new n.default(s,o,u,a))}}function a(e,n,i,r){return function(...o){const s="function"==typeof o[o.length-1]?o.pop():void 0,a={replyEncoding:r};return this.options.showFriendlyErrorStack&&(a.errorStack=new Error),(0,t.shouldUseAutoPipelining)(this,e,n)?(0,t.executeWithAutoPipelining)(this,e,n,o,s):i.execute(this,o,a,s)}}return o.push("sentinel"),o.forEach(function(e){r.prototype[e]=s(e,e,"utf8"),r.prototype[e+"Buffer"]=s(e+"Buffer",e,null)}),r.prototype.call=s("call","utf8"),r.prototype.callBuffer=s("callBuffer",null),r.prototype.send_command=r.prototype.call,Mm.default=r,Mm}function qm(){if(Vm)return Lm;Vm=1,Object.defineProperty(Lm,"__esModule",{value:!0});const e=fm(),t=Qd(),n=nm(),i=$,r=Dm(),o=Tm(),s=Km();let a=class extends s.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{const n=e.scriptsSet[t];this._shaToScript[n.sha]=n,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});const t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,n){if("exec"===this._queue[n].name&&Array.isArray(e[1])){const t=e[1].length;for(let i=0;i<t;i++){if(e[1][i]instanceof Error)continue;const r=this._queue[n-(t-i)];try{e[1][i]=r.transformReply(e[1][i])}catch(t){e[1][i]=t}}}if(this._result[n]=e,--this.replyPending)return;if(this.isCluster){let e,n=!0;for(let i=0;i<this._result.length;++i){const r=this._result[i][0],o=this._queue[i];if(r){if("exec"===o.name&&"EXECABORT Transaction discarded because of previous errors."===r.message)continue;if(e){if(e.name!==r.name||e.message!==r.message){n=!1;break}}else e={name:r.name,message:r.message}}else if(!o.inTransaction){if(!((0,t.exists)(o.name)&&(0,t.hasFlag)(o.name,"readonly"))){n=!1;break}}}if(e&&n){const t=this,n=e.message.split(" "),i=this._queue;let o=!1;this._queue=[];for(let e=0;e<i.length;++e){if(!("ASK"!==n[0]||o||"asking"===i[e].name||i[e-1]&&"asking"===i[e-1].name)){const e=new r.default("asking");e.ignore=!0,this.sendCommand(e)}i[e].initPromise(),this.sendCommand(i[e]),o=i[e].inTransaction}let s=!0;void 0===this.leftRedirections&&(this.leftRedirections={});const a=function(){t.exec()},u=this.redis;if(u.handleError(e,this.leftRedirections,{moved:function(e,i){t.preferKey=i,u.slots[n[1]]=[i],u._groupsBySlot[n[1]]=u._groupsIds[u.slots[n[1]].join(";")],u.refreshSlotsCache(),t.exec()},ask:function(e,n){t.preferKey=n,t.exec()},tryagain:a,clusterDown:a,connectionClosed:a,maxRedirections:()=>{s=!1},defaults:()=>{s=!1}}),s)return}}let i=0;for(let e=0;e<this._queue.length-i;++e)this._queue[e+i].ignore&&(i+=1),this._result[e]=this._result[e+i];this.resolve(this._result.slice(0,this._result.length-i))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);const t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,n,i;for(let r=0;r<e.length;++r)t=e[r],n=t[0],i=t.slice(1),this[n].apply(this,i);return this}};Lm.default=a;const u=a.prototype.multi;a.prototype.multi=function(){return this._transactions+=1,u.apply(this,arguments)};const c=a.prototype.execBuffer;return a.prototype.execBuffer=(0,i.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),c.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),a.prototype.exec=function(t){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(o.noop),t&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,n.default)(this.promise,t)),this.redis.delayUntilReady(e=>{e?this.reject(e):this.exec(t)}),this.promise;if(this._transactions>0)return this._transactions-=1,c.apply(this,arguments);let i;if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,n.default)(this.promise,t)),this._queue.length||this.resolve([]),this.isCluster){const t=[];for(let n=0;n<this._queue.length;n++){const i=this._queue[n].getKeys();if(i.length&&t.push(i[0]),i.length&&e.generateMulti(i)<0)return this.reject(new Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(t.length){if(i=function(t,n){const i=e(n[0]),r=t._groupsBySlot[i];for(let i=1;i<n.length;i++)if(t._groupsBySlot[e(n[i])]!==r)return-1;return i}(this.redis,t),i<0)return this.reject(new Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else i=16384*Math.random()|0}const r=this;return function(){let e,t=r.replyPending=r._queue.length;r.isCluster&&(e={slot:i,redis:r.redis.connectionPool.nodes.all[r.preferKey]});let n,o="";const s={isPipeline:!0,destination:r.isCluster?e:{redis:r.redis},write(e){"string"!=typeof e?(n||(n=[]),o&&(n.push(Buffer.from(o,"utf8")),o=""),n.push(e)):o+=e,--t||(n?(o&&n.push(Buffer.from(o,"utf8")),s.destination.redis.stream.write(Buffer.concat(n))):s.destination.redis.stream.write(o),t=r._queue.length,o="",n=void 0)}};for(let t=0;t<r._queue.length;++t)r.redis.sendCommand(r._queue[t],s,e);r.promise}(),this.promise},Lm}function Hm(){if(Gm)return Zm;Gm=1,Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.addTransactionSupport=void 0;const e=Tm(),t=nm(),n=qm();return Zm.addTransactionSupport=function(i){i.pipeline=function(e){const t=new n.default(this);return Array.isArray(e)&&t.addBatch(e),t};const{multi:r}=i;i.multi=function(i,o){if(void 0!==o||Array.isArray(i)||(o=i,i=null),o&&!1===o.pipeline)return r.call(this);const s=new n.default(this);s.multi(),Array.isArray(i)&&s.addBatch(i);const a=s.exec;s.exec=function(n){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(e.noop),(0,t.default)(new Promise((e,t)=>{this.redis.delayUntilReady(n=>{n?t(n):this.exec(s).then(e,t)})}),n);if(this._transactions>0&&a.call(s),this.nodeifiedPromise)return a.call(s);const i=a.call(s);return(0,t.default)(i.then(function(t){const n=t[t.length-1];if(void 0===n)throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");if(n[0]){n[0].previousErrors=[];for(let e=0;e<t.length-1;++e)t[e][0]&&n[0].previousErrors.push(t[e][0]);throw n[0]}return(0,e.wrapMultiResult)(n[1])}),n)};const{execBuffer:u}=s;return s.execBuffer=function(e){return this._transactions>0&&u.call(s),s.exec(e)},s};const{exec:o}=i;i.exec=function(n){return(0,t.default)(o.call(this).then(function(t){return Array.isArray(t)&&(t=(0,e.wrapMultiResult)(t)),t}),n)}},Zm}var Qm,Ym={};function Xm(){if(Qm)return Ym;return Qm=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.default=function(e,t){Object.getOwnPropertyNames(t.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})},Ym}var ep,tp={};var np,ip,rp={},op={};function sp(){if(np)return op;np=1,Object.defineProperty(op,"__esModule",{value:!0}),op.getConnectionName=op.weightSrvRecords=op.groupSrvRecords=op.getUniqueHostnamesFromOptions=op.normalizeNodeOptions=op.nodeKeyToRedisOptions=op.getNodeKey=void 0;const e=Tm(),t=N;return op.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},op.nodeKeyToRedisOptions=function(e){const t=e.lastIndexOf(":");if(-1===t)throw new Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},op.normalizeNodeOptions=function(t){return t.map(t=>{const n={};if("object"==typeof t)Object.assign(n,t);else if("string"==typeof t)Object.assign(n,(0,e.parseURL)(t));else{if("number"!=typeof t)throw new Error("Invalid argument "+t);n.port=t}return"string"==typeof n.port&&(n.port=parseInt(n.port,10)),delete n.db,n.port||(n.port=6379),n.host||(n.host="127.0.0.1"),(0,e.resolveTLSProfile)(n)})},op.getUniqueHostnamesFromOptions=function(e){const n={};return e.forEach(e=>{n[e.host]=!0}),Object.keys(n).filter(e=>!(0,t.isIP)(e))},op.groupSrvRecords=function(e){const t={};for(const n of e)t.hasOwnProperty(n.priority)?(t[n.priority].totalWeight+=n.weight,t[n.priority].records.push(n)):t[n.priority]={totalWeight:n.weight,records:[n]};return t},op.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();const t=Math.floor(Math.random()*(e.totalWeight+e.records.length));let n=0;for(const[i,r]of e.records.entries())if(n+=1+r.weight,n>t)return e.totalWeight-=r.weight,e.records.splice(i,1),r},op.getConnectionName=function(e,t){const n=`ioredis-cluster(${e})`;return t?`${n}:${t}`:n},op}function ap(){if(ip)return rp;ip=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=sp(),t=Tm(),n=of(),i=(0,t.Debug)("cluster:subscriber");return rp.default=class{constructor(t,n,r=!1){this.connectionPool=t,this.emitter=n,this.isSharded=r,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(i("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):i("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(t,n)=>{this.started&&this.subscriber&&(0,e.getNodeKey)(this.subscriber.options)===n&&(i("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(i("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),i("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){const r=this.lastActiveSubscriber;r&&(r.off("end",this.onSubscriberEnd),r.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());const o=(0,t.sample)(this.connectionPool.getNodes());if(!o)return i("selecting subscriber failed since there is no node discovered in the cluster yet"),void(this.subscriber=null);const{options:s}=o;i("selected a subscriber %s:%s",s.host,s.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new n.default({port:s.port,host:s.host,username:s.username,password:s.password,enableReadyCheck:!0,connectionName:(0,e.getConnectionName)(a,s.connectionName),lazyConnect:!0,tls:s.tls,retryStrategy:null}),this.subscriber.on("error",t.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);const u={subscribe:[],psubscribe:[],ssubscribe:[]};if(r){const e=r.condition||r.prevCondition;e&&e.subscriber&&(u.subscribe=e.subscriber.channels("subscribe"),u.psubscribe=e.subscriber.channels("psubscribe"),u.ssubscribe=e.subscriber.channels("ssubscribe"))}if(u.subscribe.length||u.psubscribe.length||u.ssubscribe.length){let e=0;for(const t of["subscribe","psubscribe","ssubscribe"]){const n=u[t];if(0!=n.length)if(i("%s %d channels",t,n.length),"ssubscribe"===t)for(const r of n)e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{i("failed to ssubscribe to channel: %s",r)});else e+=1,this.subscriber[t](n).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{i("failed to %s %d channels",t,n.length)})}}else this.lastActiveSubscriber=this.subscriber;for(const e of["message","messageBuffer"])this.subscriber.on(e,(t,n)=>{this.emitter.emit(e,t,n)});for(const e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,n,i)=>{this.emitter.emit(e,t,n,i)});if(1==this.isSharded)for(const e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,n)=>{this.emitter.emit(e,t,n)})}},rp}var up,cp={};function lp(){if(up)return cp;up=1,Object.defineProperty(cp,"__esModule",{value:!0});const e=y,t=Tm(),n=sp(),i=of(),r=(0,t.Debug)("cluster:connectionPool");let o=class extends e.EventEmitter{constructor(e){super(),this.redisOptions=e,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){const t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){const n=Object.keys(this.nodes[e]),i=(0,t.sample)(n);return this.nodes[e][i]}addMasterNode(e){const t=(0,n.getNodeKey)(e.options),i=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=i,this.nodes.master[t]=i,!0)}createRedisFromOptions(e,n){return new i.default((0,t.defaults)({retryStrategy:null,enableOfflineQueue:!0,readOnly:n},e,this.redisOptions,{lazyConnect:!0}))}findOrCreate(e,i=!1){const o=(0,n.getNodeKey)(e);let s;return i=Boolean(i),this.specifiedOptions[o]?Object.assign(e,this.specifiedOptions[o]):this.specifiedOptions[o]=e,this.nodes.all[o]?(s=this.nodes.all[o],s.options.readOnly!==i&&(s.options.readOnly=i,r("Change role of %s to %s",o,i?"slave":"master"),s[i?"readonly":"readwrite"]().catch(t.noop),i?(delete this.nodes.master[o],this.nodes.slave[o]=s):(delete this.nodes.slave[o],this.nodes.master[o]=s))):(r("Connecting to %s as %s",o,i?"slave":"master"),s=this.createRedisFromOptions(e,i),this.nodes.all[o]=s,this.nodes[i?"slave":"master"][o]=s,s.once("end",()=>{this.removeNode(o),this.emit("-node",s,o),Object.keys(this.nodes.all).length||this.emit("drain")}),this.emit("+node",s,o),s.on("error",function(e){this.emit("nodeError",e,o)})),s}reset(e){r("Reset with %O",e);const t={};e.forEach(e=>{const i=(0,n.getNodeKey)(e);e.readOnly&&t[i]||(t[i]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(r("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{const n=t[e];this.findOrCreate(n,n.readOnly)})}removeNode(e){const{nodes:t}=this;t.all[e]&&(r("Remove %s from the pool",e),delete t.all[e]),delete t.master[e],delete t.slave[e]}};return cp.default=o,cp}var dp,mp,pp,fp={};function hp(){if(mp)return dp;function e(e,t){t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=new Array(4))}return mp=1,e.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var n=this.size();if(!(t>=n||t<-n))return t<0&&(t+=n),t=this._head+t&this._capacityMask,this._list[t]}},e.prototype.get=function(e){return this.peekAt(e)},e.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},e.prototype.peekFront=function(){return this.peek()},e.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(e.prototype,"length",{get:function(){return this.size()}}),e.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.unshift=function(e){if(0===arguments.length)return this.size();var t=this._list.length;return this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},e.prototype.push=function(e){if(0===arguments.length)return this.size();var t=this._tail;return this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var n=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),n}},e.prototype.removeOne=function(e){var t=e;if(t===(0|t)&&this._head!==this._tail){var n=this.size(),i=this._list.length;if(!(t>=n||t<-n)){t<0&&(t+=n),t=this._head+t&this._capacityMask;var r,o=this._list[t];if(e<n/2){for(r=e;r>0;r--)this._list[t]=this._list[t=t-1+i&this._capacityMask];this._list[t]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(r=n-1-e;r>0;r--)this._list[t]=this._list[t=t+1+i&this._capacityMask];this._list[t]=void 0,this._tail=this._tail-1+i&this._capacityMask}return o}}},e.prototype.remove=function(e,t){var n,i=e,r=t;if(i===(0|i)&&this._head!==this._tail){var o=this.size(),s=this._list.length;if(!(i>=o||i<-o||t<1)){if(i<0&&(i+=o),1===t||!t)return(n=new Array(1))[0]=this.removeOne(i),n;if(0===i&&i+t>=o)return n=this.toArray(),this.clear(),n;var a;for(i+t>o&&(t=o-i),n=new Array(t),a=0;a<t;a++)n[a]=this._list[this._head+i+a&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===o){for(this._tail=this._tail-t+s&this._capacityMask,a=t;a>0;a--)this._list[i=i+1+s&this._capacityMask]=void 0;return n}if(0===e){for(this._head=this._head+t+s&this._capacityMask,a=t-1;a>0;a--)this._list[i=i+1+s&this._capacityMask]=void 0;return n}if(i<o/2){for(this._head=this._head+e+t+s&this._capacityMask,a=e;a>0;a--)this.unshift(this._list[i=i-1+s&this._capacityMask]);for(i=this._head-1+s&this._capacityMask;r>0;)this._list[i=i-1+s&this._capacityMask]=void 0,r--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+s&this._capacityMask,a=o-(t+e);a>0;a--)this.push(this._list[i++]);for(i=this._tail;r>0;)this._list[i=i+1+s&this._capacityMask]=void 0,r--}return this._head<2&&this._tail>1e4&&this._tail<=s>>>2&&this._shrinkArray(),n}}},e.prototype.splice=function(e,t){var n=e;if(n===(0|n)){var i=this.size();if(n<0&&(n+=i),!(n>i)){if(arguments.length>2){var r,o,s,a=arguments.length,u=this._list.length,c=2;if(!i||n<i/2){for(o=new Array(n),r=0;r<n;r++)o[r]=this._list[this._head+r&this._capacityMask];for(0===t?(s=[],n>0&&(this._head=this._head+n+u&this._capacityMask)):(s=this.remove(n,t),this._head=this._head+n+u&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(r=n;r>0;r--)this.unshift(o[r-1])}else{var l=(o=new Array(i-(n+t))).length;for(r=0;r<l;r++)o[r]=this._list[this._head+n+t+r&this._capacityMask];for(0===t?(s=[],n!=i&&(this._tail=this._head+n+u&this._capacityMask)):(s=this.remove(n,t),this._tail=this._tail-l+u&this._capacityMask);c<a;)this.push(arguments[c++]);for(r=0;r<l;r++)this.push(o[r])}return s}return this.remove(n,t)}}},e.prototype.clear=function(){this._list=new Array(this._list.length),this._head=0,this._tail=0},e.prototype.isEmpty=function(){return this._head===this._tail},e.prototype.toArray=function(){return this._copyArray(!1)},e.prototype._fromArray=function(e){var t=e.length,n=this._nextPowerOf2(t);this._list=new Array(n),this._capacityMask=n-1,this._tail=t;for(var i=0;i<t;i++)this._list[i]=e[i]},e.prototype._copyArray=function(e,t){var n=this._list,i=n.length,r=this.length;if((t|=r)==r&&this._head<this._tail)return this._list.slice(this._head,this._tail);var o,s=new Array(t),a=0;if(e||this._head>this._tail){for(o=this._head;o<i;o++)s[a++]=n[o];for(o=0;o<this._tail;o++)s[a++]=n[o]}else for(o=this._head;o<this._tail;o++)s[a++]=n[o];return s},e.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},e.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},e.prototype._nextPowerOf2=function(e){var t=1<<Math.log(e)/Math.log(2)+1;return Math.max(t,4)},dp=e}var gp,vp,yp={};function _p(){if(vp)return cm;vp=1,Object.defineProperty(cm,"__esModule",{value:!0});const e=Qd(),t=y,n=lm(),i=nm(),r=Dm(),o=function(){if(Am)return Cm;Am=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=lm();let t=class extends e.RedisError{constructor(e,t){super(e),this.lastNodeError=t,Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}};return Cm.default=t,t.defaultMessage="Failed to refresh slots cache.",Cm}(),s=of(),a=jm(),u=Hm(),c=Tm(),l=Xm(),d=Km(),m=function(){if(ep)return tp;ep=1,Object.defineProperty(tp,"__esModule",{value:!0}),tp.DEFAULT_CLUSTER_OPTIONS=void 0;const e=O;return tp.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:e.resolveSrv,dnsLookup:e.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1},tp}(),p=ap(),f=lp(),h=function(){if(pp)return fp;pp=1,Object.defineProperty(fp,"__esModule",{value:!0});const e=Tm(),t=hp(),n=(0,e.Debug)("delayqueue");return fp.default=class{constructor(){this.queues={},this.timeouts={}}push(e,n,i){const r=i.callback||process.nextTick;this.queues[e]||(this.queues[e]=new t),this.queues[e].push(n),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{r(()=>{this.timeouts[e]=null,this.execute(e)})},i.timeout))}execute(e){const t=this.queues[e];if(!t)return;const{length:i}=t;if(i)for(n("send %d commands in %s queue",i,e),this.queues[e]=null;t.length>0;)t.shift()()}},fp}(),g=sp(),v=hp(),_=function(){if(gp)return yp;gp=1,Object.defineProperty(yp,"__esModule",{value:!0});const e=Tm(),t=ap(),n=lp(),i=sp(),r=fm(),o=(0,e.Debug)("cluster:subscriberGroup");return yp.default=class{constructor(e,t){this.cluster=e,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,e.on("+node",e=>{this._addSubscriber(e)}),e.on("-node",e=>{this._removeSubscriber(e)}),e.on("refresh",()=>{this._refreshSlots(e)}),e.on("forceRefresh",()=>{t()})}getResponsibleSubscriber(e){const t=this.clusterSlots[e][0];return this.shardedSubscribers.get(t)}addChannels(e){const t=r(e[0]);e.forEach(e=>{if(r(e)!=t)return-1});const n=this.channels.get(t);return n?this.channels.set(t,n.concat(e)):this.channels.set(t,e),[...this.channels.values()].flatMap(e=>e).length}removeChannels(e){const t=r(e[0]);e.forEach(e=>{if(r(e)!=t)return-1});const n=this.channels.get(t);if(n){const i=n.filter(t=>!e.includes(t));this.channels.set(t,i)}return[...this.channels.values()].flatMap(e=>e).length}stop(){for(const e of this.shardedSubscribers.values())e.stop()}start(){for(const e of this.shardedSubscribers.values())e.isStarted()||e.start()}_addSubscriber(e){const r=new n.default(e.options);if(r.addMasterNode(e)){const n=new t.default(r,this.cluster,!0),o=(0,i.getNodeKey)(e.options);return this.shardedSubscribers.set(o,n),n.start(),this._resubscribe(),this.cluster.emit("+subscriber"),n}return null}_removeSubscriber(e){const t=(0,i.getNodeKey)(e.options),n=this.shardedSubscribers.get(t);return n&&(n.stop(),this.shardedSubscribers.delete(t),this._resubscribe(),this.cluster.emit("-subscriber")),this.shardedSubscribers}_refreshSlots(e){if(!this._slotsAreEqual(e.slots)){o("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.slots.length;t++){const n=e.slots[t][0];this.subscriberToSlotsIndex.has(n)||this.subscriberToSlotsIndex.set(n,[]),this.subscriberToSlotsIndex.get(n).push(Number(t))}return this._resubscribe(),this.clusterSlots=JSON.parse(JSON.stringify(e.slots)),this.cluster.emit("subscribersReady"),!0}return o("Nothing to refresh because the new cluster map is equal to the previous one."),!1}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{const n=this.subscriberToSlotsIndex.get(t);n&&(e.associateSlotRange(n),n.forEach(t=>{const n=e.getInstance(),i=this.channels.get(t);i&&i.length>0&&n&&(n.ssubscribe(i),n.on("ready",()=>{n.ssubscribe(i)}))}))})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}},yp}(),b=(0,c.Debug)("cluster"),$=new WeakSet;class k extends d.default{constructor(e,n={}){if(super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new h.default,this.offlineQueue=new v,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,t.EventEmitter.call(this),this.startupNodes=e,this.options=(0,c.defaults)({},n,m.DEFAULT_CLUSTER_OPTIONS,this.options),1==this.options.shardedSubscribers&&(this.shardedSubscribers=new _.default(this,this.refreshSlotsCache.bind(this))),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw new Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');this.connectionPool=new f.default(this.options.redisOptions),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new p.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{b("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(new Error("Redis is already connecting/connected"));const i=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(r=>{if(this.connectionEpoch!==i)return b("discard connecting after resolving startup nodes because epoch not match: %d != %d",i,this.connectionEpoch),void t(new n.RedisError("Connection is discarded because a new connection is made"));if("connecting"!==this.status)return b("discard connecting after resolving startup nodes because the status changed to %s",this.status),void t(new n.RedisError("Connection is aborted"));this.connectionPool.reset(r);const a=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()};let u;const c=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",u),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(b("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):a()}):a()};u=()=>{const e=new Error("None of startup nodes is available");this.removeListener("refresh",c),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",c),this.once("close",u),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===o.default.defaultMessage&&(s.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start()}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){const t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,b("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){const t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){const t=(0,i.default)(Promise.resolve("OK"),e);return setImmediate(function(){this.setStatus("close"),this.handleCloseEvent()}.bind(this)),t}return(0,i.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===c.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t={}){const n=e.length>0?e:this.startupNodes.slice(0),i=Object.assign({},this.options,t);return new k(n,i)}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw new Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(const t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;const t=this,n=e=>{this.isRefreshing=!1;for(const t of this._refreshSlotsCacheCallbacks)t(e);this._refreshSlotsCacheCallbacks=[]},i=(0,c.shuffle)(this.connectionPool.getNodes());let r=null;!function e(s){if(s===i.length){const e=new o.default(o.default.defaultMessage,r);return n(e)}const a=i[s],u=`${a.options.host}:${a.options.port}`;b("getting slot cache from %s",u),t.getInfoFromNode(a,function(i){switch(t.status){case"close":case"end":return n(new Error("Cluster is disconnected."));case"disconnecting":return n(new Error("Cluster is disconnecting."))}i?(t.emit("node error",i,u),r=i,e(s+1)):(t.emit("refresh"),n())})}(0)}sendCommand(t,i,o){if("wait"===this.status&&this.connect().catch(c.noop),"end"===this.status)return t.reject(new Error(c.CONNECTION_CLOSED_ERROR_MSG)),t.promise;let s=this.options.scaleReads;if("master"!==s){t.isReadOnly||(0,e.exists)(t.name)&&(0,e.hasFlag)(t.name,"readonly")||(s="master")}let a=o?o.slot:t.getSlot();const u={},l=this;if(!o&&!$.has(t)){$.add(t);const e=t.reject;t.reject=function(n){const i=d.bind(null,!0);l.handleError(n,u,{moved:function(e,n){b("command %s is moved to %s",t.name,n),a=Number(e),l.slots[e]?l.slots[e][0]=n:l.slots[e]=[n],l._groupsBySlot[e]=l._groupsIds[l.slots[e].join(";")],l.connectionPool.findOrCreate(l.natMapper(n)),d(),b("refreshing slot caches... (triggered by MOVED error)"),l.refreshSlotsCache()},ask:function(e,n){b("command %s is required to ask %s:%s",t.name,n);const i=l.natMapper(n);l.connectionPool.findOrCreate(i),d(!1,`${i.host}:${i.port}`)},tryagain:i,clusterDown:i,connectionClosed:i,maxRedirections:function(n){e.call(t,n)},defaults:function(){e.call(t,n)}})}}function d(e,u){if("end"===l.status)return void t.reject(new n.AbortError("Cluster is ended."));let d;if("ready"===l.status||"cluster"===t.name){if(o&&o.redis)d=o.redis;else if(r.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.name)||r.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.name)){if(1!=l.options.shardedSubscribers||"ssubscribe"!=t.name&&"sunsubscribe"!=t.name)d=l.subscriber.getInstance();else{const e=l.shardedSubscribers.getResponsibleSubscriber(a);let i=-1;"ssubscribe"==t.name&&(i=l.shardedSubscribers.addChannels(t.getKeys())),"sunsubscribe"==t.name&&(i=l.shardedSubscribers.removeChannels(t.getKeys())),-1!==i?d=e.getInstance():t.reject(new n.AbortError("Can't add or remove the given channels. Are they in the same slot?"))}if(!d)return void t.reject(new n.AbortError("No subscriber for the cluster"))}else{if(!e){if("number"==typeof a&&l.slots[a]){const e=l.slots[a];if("function"==typeof s){const n=e.map(function(e){return l.connectionPool.getInstanceByKey(e)});d=s(n,t),Array.isArray(d)&&(d=(0,c.sample)(d)),d||(d=n[0])}else{let t;t="all"===s?(0,c.sample)(e):"slave"===s&&e.length>1?(0,c.sample)(e,1):e[0],d=l.connectionPool.getInstanceByKey(t)}}u&&(d=l.connectionPool.getInstanceByKey(u),d.asking())}d||(d=("function"==typeof s?null:l.connectionPool.getSampleInstance(s))||l.connectionPool.getSampleInstance("all"))}o&&!o.redis&&(o.redis=d)}d?d.sendCommand(t,i):l.options.enableOfflineQueue?l.offlineQueue.push({command:t,stream:i,node:o}):t.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false"))}return d(),t.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,n){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void n.maxRedirections(new Error("Too many Cluster redirections. Last error: "+e));const i=e.message.split(" ");if("MOVED"===i[0]){const e=this.options.retryDelayOnMoved;e&&"number"==typeof e?this.delayQueue.push("moved",n.moved.bind(null,i[1],i[2]),{timeout:e}):n.moved(i[1],i[2])}else"ASK"===i[0]?n.ask(i[1],i[2]):"TRYAGAIN"===i[0]?this.delayQueue.push("tryagain",n.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===i[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",n.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===c.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",n.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):n.defaults()}resetOfflineQueue(){this.offlineQueue=new v}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;const e=()=>{this.slotsTimer=setTimeout(()=>{b('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){b("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){let t;e&&b("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(t=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof t?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,b("Cluster is disconnected. Retrying after %dms",t),this.connect().catch(function(e){b("Got error %s when reconnecting. Ignoring...",e)})},t)):(this.setStatus("end"),this.flushQueue(new Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){b("send %d commands in offline queue",this.offlineQueue.length);const e=this.offlineQueue;let t;for(this.resetOfflineQueue();t=e.shift();)this.sendCommand(t.command,t.stream,t.node)}}natMapper(e){const t="string"==typeof e?e:`${e.host}:${e.port}`;let n=null;return this.options.natMap&&"function"==typeof this.options.natMap?n=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(n=this.options.natMap[t]),n?(b("NAT mapping %s -> %O",t,n),Object.assign({},n)):"string"==typeof e?(0,g.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(new Error("Node is disconnected"));const n=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,connectionName:(0,g.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});n.on("error",c.noop),n.cluster("SLOTS",(0,c.timeout)((e,i)=>{if(n.disconnect(),e)return b("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status)return b("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",i.length,this.status),void t();const r=[];b("cluster slots result count: %d",i.length);for(let e=0;e<i.length;++e){const t=i[e],n=t[0],o=t[1],s=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;const n=this.natMapper({host:t[e][0],port:t[e][1]});n.readOnly=2!==e,r.push(n),s.push(n.host+":"+n.port)}b("cluster slots result [%d]: slots %d~%d served by %s",e,n,o,s);for(let e=n;e<=o;e++)this.slots[e]=s}this._groupsIds=Object.create(null);let o=0;for(let e=0;e<16384;e++){const t=(this.slots[e]||[]).join(";");t.length?(this._groupsIds[t]||(this._groupsIds[t]=++o),this._groupsBySlot[e]=this._groupsIds[t]):this._groupsBySlot[e]=void 0}this.connectionPool.reset(r),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(const t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,n)=>{if(t)return e(t);if("string"!=typeof n)return e();let i;const r=n.split("\r\n");for(let e=0;e<r.length;++e){const t=r[e].split(":");if("cluster_state"===t[0]){i=t[1];break}}"fail"===i?(b("cluster state not ok (%s)",i),e(null,i)):e()})}resolveSrv(e){return new Promise((t,n)=>{this.options.resolveSrv(e,(e,i)=>{if(e)return n(e);const r=this,o=(0,g.groupSrvRecords)(i),s=Object.keys(o).sort((e,t)=>parseInt(e)-parseInt(t));!function e(i){if(!s.length)return n(i);const a=s[0],u=o[a],c=(0,g.weightSrvRecords)(u);u.records.length||s.shift(),r.dnsLookup(c.name).then(e=>t({host:e,port:c.port}),e)}()})})}dnsLookup(e){return new Promise((t,n)=>{this.options.dnsLookup(e,(i,r)=>{i?(b("failed to resolve hostname %s to IP: %s",e,i.message),n(i)):(b("resolved hostname %s to IP %s",e,r),t(r))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw new Error("`startupNodes` should contain at least one node.");const e=(0,g.normalizeNodeOptions)(this.startupNodes),t=(0,g.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;const n=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),i=(0,c.zipMap)(t,n);return e.map(e=>{const t=i.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:n={}}){return new a.default({objectMode:!0,key:t,redis:this,command:e,...n})}}return(0,l.default)(k,t.EventEmitter),(0,u.addTransactionSupport)(k.prototype),cm.default=k,cm}var bp,$p,kp={},wp={},Sp={};function Ip(){if(bp)return Sp;bp=1,Object.defineProperty(Sp,"__esModule",{value:!0});const e=(0,Tm().Debug)("AbstractConnector");return Sp.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){const t=this.stream,n=setTimeout(()=>{e("stream %s:%s still open, destroying it",t.remoteAddress,t.remotePort),t.destroy()},this.disconnectTimeout);t.on("close",()=>clearTimeout(n)),t.end()}}},Sp}var xp,Ep={},Op={};var Np,zp,Tp,Dp={};function Ap(){if(zp)return Ep;zp=1,Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.SentinelIterator=void 0;const e=N,t=Tm(),n=z,i=function(){if(xp)return Op;function e(e,t){return(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379)}return xp=1,Object.defineProperty(Op,"__esModule",{value:!0}),Op.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){const e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(t){for(let n=0;n<this.sentinels.length;n++)if(e(t,this.sentinels[n]))return!1;return this.sentinels.push(t),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}},Op}();Ep.SentinelIterator=i.default;const r=Ip(),o=of(),s=function(){if(Np)return Dp;Np=1,Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.FailoverDetector=void 0;const e=(0,Tm().Debug)("FailoverDetector"),t="+switch-master";return Dp.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){this.isDisconnected=!0;for(const e of this.sentinels)e.client.disconnect()}async subscribe(){e("Starting FailoverDetector");const n=[];for(const i of this.sentinels){const r=i.client.subscribe(t).catch(t=>{e("Failed to subscribe to failover messages on sentinel %s:%s (%s)",i.address.host||"127.0.0.1",i.address.port||26739,t.message)});n.push(r),i.client.on("message",e=>{this.isDisconnected||e!==t||this.disconnect()})}await Promise.all(n)}disconnect(){this.isDisconnected=!0,e("Failover detected, disconnecting"),this.connector.disconnect()}},Dp}(),a=(0,t.Debug)("SentinelConnector");let u=class extends r.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw new Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw new Error("Requires the name of master.");this.sentinelIterator=new i.default(this.options.sentinels)}check(e){const t=!e.role||this.options.role===e.role;return t||(a("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(i){let r;this.connecting=!0,this.retryAttempts=0;const o=async()=>{const s=this.sentinelIterator.next();if(s.done){this.sentinelIterator.reset(!1);const e="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null;let t="number"!=typeof e?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${e}ms.`;r&&(t+=` Last error: ${r.message}`),a(t);const n=new Error(t);if("number"==typeof e)return i("error",n),await new Promise(t=>setTimeout(t,e)),o();throw n}let u=null,c=null;try{u=await this.resolve(s.value)}catch(e){c=e}if(!this.connecting)throw new Error(t.CONNECTION_CLOSED_ERROR_MSG);const l=s.value.host+":"+s.value.port;if(u)return a("resolved: %s:%s from sentinel %s",u.host,u.port,l),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(u,this.options.tls),this.stream=(0,n.connect)(u),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,e.createConnection)(u),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{const e=c?"failed to connect to sentinel "+l+" because "+c.message:"connected to sentinel "+l+" successfully, but got an invalid reply: "+u;return a(e),i("sentinelError",new Error(e)),c&&(r=c),o()}};return o()}async updateSentinels(e){if(!this.options.updateSentinels)return;const n=await e.sentinel("sentinels",this.options.name);Array.isArray(n)&&(n.map(t.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){const t=this.sentinelNatResolve(c(e));this.sentinelIterator.add(t)&&a("adding sentinel %s:%s",t.host,t.port)}}),a("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){const t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){const n=await e.sentinel("slaves",this.options.name);if(!Array.isArray(n))return null;const i=n.map(t.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,n){if(0===e.length)return null;let i;if("function"==typeof n)i=n(e);else if(null!==n&&"object"==typeof n){const t=Array.isArray(n)?n:[n];t.sort((e,t)=>(e.prio||(e.prio=1),t.prio||(t.prio=1),e.prio<t.prio?-1:e.prio>t.prio?1:0));for(let n=0;n<t.length;n++){for(let r=0;r<e.length;r++){const o=e[r];if(o.ip===t[n].ip&&o.port===t[n].port){i=o;break}}if(i)break}}i||(i=(0,t.sample)(e));return c(i)}(i,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;const t=`${e.host}:${e.port}`;let n=e;return"function"==typeof this.options.natMap?n=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(n=this.options.natMap[t]||e),n}connectToSentinel(e,t){return new o.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){const t=this.connectToSentinel(e);t.on("error",l);try{return"slave"===this.options.role?await this.resolveSlave(t):await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){var e;if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);const t=[];for(;t.length<this.options.sentinelMaxConnections;){const{done:e,value:n}=this.sentinelIterator.next();if(e)break;const i=this.connectToSentinel(n,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy});i.on("reconnecting",()=>{var e;null===(e=this.emitter)||void 0===e||e.emit("sentinelReconnecting")}),t.push({address:n,client:i})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new s.FailoverDetector(this,t),await this.failoverDetector.subscribe(),null===(e=this.emitter)||void 0===e||e.emit("failoverSubscribed")}};function c(e){return{host:e.ip,port:Number(e.port)}}function l(){}return Ep.default=u,Ep}function Cp(){if(Tp)return kp;Tp=1,Object.defineProperty(kp,"__esModule",{value:!0}),kp.SentinelConnector=kp.StandaloneConnector=void 0;const e=function(){if($p)return wp;$p=1,Object.defineProperty(wp,"__esModule",{value:!0});const e=N,t=z,n=Tm(),i=Ip();let r=class extends i.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(i){const{options:r}=this;let o;return this.connecting=!0,"path"in r&&r.path?o={path:r.path}:(o={},"port"in r&&null!=r.port&&(o.port=r.port),"host"in r&&null!=r.host&&(o.host=r.host),"family"in r&&null!=r.family&&(o.family=r.family)),r.tls&&Object.assign(o,r.tls),new Promise((i,s)=>{process.nextTick(()=>{if(this.connecting){try{r.tls?this.stream=(0,t.connect)(o):this.stream=(0,e.createConnection)(o)}catch(e){return void s(e)}this.stream.once("error",e=>{this.firstError=e}),i(this.stream)}else s(new Error(n.CONNECTION_CLOSED_ERROR_MSG))})})}};return wp.default=r,wp}();kp.StandaloneConnector=e.default;const t=Ap();return kp.SentinelConnector=t.default,kp}var Up,Pp,jp={},Rp={},Zp={};function Lp(){if(Pp)return Rp;Pp=1,Object.defineProperty(Rp,"__esModule",{value:!0}),Rp.MaxRetriesPerRequestError=void 0;const e=function(){if(Up)return Zp;Up=1,Object.defineProperty(Zp,"__esModule",{value:!0});const e=lm();let t=class extends e.AbortError{constructor(e){super(`Reached the max retries per request limit (which is ${e}). Refer to "maxRetriesPerRequest" option for details.`),Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}};return Zp.default=t,Zp}();return Rp.MaxRetriesPerRequestError=e.default,Rp}var Mp,Fp,Bp,Jp,Vp={};function Gp(){if(Fp)return Mp;Fp=1;const e=T.Buffer,t=new(0,D.StringDecoder),n=lm(),i=n.ReplyError,r=n.ParserError;var o=e.allocUnsafe(32768),s=0,a=null,u=0,c=0;function l(e){const t=e.offset,n=e.buffer,i=n.length-1;for(var r=t;r<i;)if(13===n[r++])return e.offset=r+1,!0===e.optionReturnBuffers?e.buffer.slice(t,r-1):e.buffer.toString("utf8",t,r-1)}function d(e){const t=e.buffer.length-1;for(var n=e.offset,i=0;n<t;){const t=e.buffer[n++];if(13===t)return e.offset=n+1,i;i=10*i+(t-48)}}function m(e,t,n){e.arrayCache.push(t),e.arrayPos.push(n)}function p(e){const t=e.arrayCache.pop();var n=e.arrayPos.pop();if(e.arrayCache.length){const i=p(e);if(void 0===i)return void m(e,t,n);t[n++]=i}return f(e,t,n)}function f(e,t,n){const i=e.buffer.length;for(;n<t.length;){const r=e.offset;if(e.offset>=i)return void m(e,t,n);const o=h(e,e.buffer[e.offset++]);if(void 0===o)return e.arrayCache.length||e.bufferCache.length||(e.offset=r),void m(e,t,n);t[n]=o,n++}return t}function h(e,t){switch(t){case 36:return function(e){const t=d(e);if(void 0===t)return;if(t<0)return null;const n=e.offset+t;if(n+2>e.buffer.length)return e.bigStrSize=n+2,e.totalChunkSize=e.buffer.length,void e.bufferCache.push(e.buffer);const i=e.offset;return e.offset=n+2,!0===e.optionReturnBuffers?e.buffer.slice(i,n):e.buffer.toString("utf8",i,n)}(e);case 43:return l(e);case 42:return function(e){const t=d(e);if(void 0===t)return;return t<0?null:f(e,new Array(t),0)}(e);case 58:return function(e){return!0===e.optionStringNumbers?function(e){const t=e.buffer.length-1;var n=e.offset,i=0,r="";for(45===e.buffer[n]&&(r+="-",n++);n<t;){var o=e.buffer[n++];if(13===o)return e.offset=n+1,0!==i&&(r+=i),r;i>429496728?(r+=10*i+(o-48),i=0):48===o&&0===i?r+=0:i=10*i+(o-48)}}(e):function(e){const t=e.buffer.length-1;var n=e.offset,i=0,r=1;for(45===e.buffer[n]&&(r=-1,n++);n<t;){const t=e.buffer[n++];if(13===t)return e.offset=n+1,r*i;i=10*i+(t-48)}}(e)}(e);case 45:return function(e){var t=l(e);if(void 0!==t)return!0===e.optionReturnBuffers&&(t=t.toString()),new i(t)}(e);default:return function(e,t){const n=new r("Protocol error, got "+JSON.stringify(String.fromCharCode(t))+" as reply type byte",JSON.stringify(e.buffer),e.offset);e.buffer=null,e.returnFatalError(n)}(e,t)}}function g(){if(o.length>51200)if(1===u||c>2*u){const e=Math.floor(o.length/10),t=e<s?s:e;s=0,o=o.slice(t,o.length)}else c++,u--;else clearInterval(a),u=0,c=0,a=null}function v(t){const n=t.bufferCache,i=t.offset,r=t.bigStrSize-i-2;var c=n.length,l=t.bigStrSize-t.totalChunkSize;if(t.offset=l,l<=2){if(2===c)return n[0].slice(i,n[0].length+l-2);c--,l=n[n.length-2].length+l}!function(t){if(o.length<t+s){const n=t>78643200?2:3;s>116391936&&(s=52428800),o=e.allocUnsafe(t*n+s),s=0,u++,null===a&&(a=setInterval(g,50))}}(r);const d=s;n[0].copy(o,d,i,n[0].length),s+=n[0].length-i;for(var m=1;m<c-1;m++)n[m].copy(o,s),s+=n[m].length;return n[m].copy(o,s,0,l-2),s+=l-2,o.slice(d,s)}return Mp=class{constructor(e){if(!e)throw new TypeError("Options are mandatory.");if("function"!=typeof e.returnError||"function"!=typeof e.returnReply)throw new TypeError("The returnReply and returnError options have to be functions.");this.setReturnBuffers(!!e.returnBuffers),this.setStringNumbers(!!e.stringNumbers),this.returnError=e.returnError,this.returnFatalError=e.returnFatalError||e.returnError,this.returnReply=e.returnReply,this.reset()}reset(){this.offset=0,this.buffer=null,this.bigStrSize=0,this.totalChunkSize=0,this.bufferCache=[],this.arrayCache=[],this.arrayPos=[]}setReturnBuffers(e){if("boolean"!=typeof e)throw new TypeError("The returnBuffers argument has to be a boolean");this.optionReturnBuffers=e}setStringNumbers(e){if("boolean"!=typeof e)throw new TypeError("The stringNumbers argument has to be a boolean");this.optionStringNumbers=e}execute(n){if(null===this.buffer)this.buffer=n,this.offset=0;else if(0===this.bigStrSize){const t=this.buffer.length,i=t-this.offset,r=e.allocUnsafe(i+n.length);if(this.buffer.copy(r,0,this.offset,t),n.copy(r,i,0,n.length),this.buffer=r,this.offset=0,this.arrayCache.length){const e=p(this);if(void 0===e)return;this.returnReply(e)}}else{if(!(this.totalChunkSize+n.length>=this.bigStrSize))return this.bufferCache.push(n),void(this.totalChunkSize+=n.length);this.bufferCache.push(n);var i=this.optionReturnBuffers?v(this):function(e){const n=e.bufferCache,i=e.offset;var r=n.length,o=e.bigStrSize-e.totalChunkSize;if(e.offset=o,o<=2){if(2===r)return n[0].toString("utf8",i,n[0].length+o-2);r--,o=n[n.length-2].length+o}for(var s=t.write(n[0].slice(i)),a=1;a<r-1;a++)s+=t.write(n[a]);return s+t.end(n[a].slice(0,o-2))}(this);if(this.bigStrSize=0,this.bufferCache=[],this.buffer=n,this.arrayCache.length&&(this.arrayCache[0][this.arrayPos[0]++]=i,void 0===(i=p(this))))return;this.returnReply(i)}for(;this.offset<this.buffer.length;){const e=this.offset,t=this.buffer[this.offset++],n=h(this,t);if(void 0===n)return void(this.arrayCache.length||this.bufferCache.length||(this.offset=e));45===t?this.returnError(n):this.returnReply(n)}this.buffer=null}},Mp}var Wp,Kp,qp,Hp={};function Qp(){if(Kp)return Vp;Kp=1,Object.defineProperty(Vp,"__esModule",{value:!0});const e=Dm(),t=Tm(),n=Jp?Bp:(Jp=1,Bp=Gp()),i=function(){if(Wp)return Hp;function e(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}return Wp=1,Object.defineProperty(Hp,"__esModule",{value:!0}),Hp.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(t,n){this.set[e(t)][n]=!0}del(t,n){delete this.set[e(t)][n]}channels(t){return Object.keys(this.set[e(t)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}},Hp}(),r=(0,t.Debug)("dataHandler");Vp.default=class{constructor(e,t){this.redis=e;const i=new n({stringNumbers:t.stringNumbers,returnBuffers:!0,returnError:e=>{this.returnError(e)},returnFatalError:e=>{this.returnFatalError(e)},returnReply:e=>{this.returnReply(e)}});e.stream.prependListener("data",e=>{i.execute(e)}),e.stream.resume()}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){const t=this.shiftCommand(e);t&&(e.command={name:t.command.name,args:t.command.args},"ssubscribe"==t.command.name&&e.message.includes("MOVED")?this.redis.emit("moved"):this.redis.handleReconnection(e,t))}returnReply(t){if(this.handleMonitorReply(t))return;if(this.handleSubscriberReply(t))return;const n=this.shiftCommand(t);n&&(e.default.checkFlag("ENTER_SUBSCRIBER_MODE",n.command.name)?(this.redis.condition.subscriber=new i.default,this.redis.condition.subscriber.add(n.command.name,t[1].toString()),s(n.command,t[2])||this.redis.commandQueue.unshift(n)):e.default.checkFlag("EXIT_SUBSCRIBER_MODE",n.command.name)?a(n.command,t[2])||this.redis.commandQueue.unshift(n):n.command.resolve(t))}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;const t=Array.isArray(e)?e[0].toString():null;switch(r('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{const t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{const n=e[1].toString();this.redis.condition.subscriber.add(t,n);const i=this.shiftCommand(e);if(!i)return;s(i.command,e[2])||this.redis.commandQueue.unshift(i);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{const n=e[1]?e[1].toString():null;n&&this.redis.condition.subscriber.del(t,n);const i=e[2];0===Number(i)&&(this.redis.condition.subscriber=!1);const r=this.shiftCommand(e);if(!r)return;a(r.command,i)||this.redis.commandQueue.unshift(r);break}default:{const t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;const t=e.toString();if("OK"===t)return!1;const n=t.indexOf(" "),i=t.slice(0,n),r=t.indexOf('"'),o=t.slice(r+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),s=t.slice(n+2,r-2).split(" ");return this.redis.emit("monitor",i,o,s[1],s[0]),!0}shiftCommand(e){const t=this.redis.commandQueue.shift();if(!t){const t=new Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};const o=new WeakMap;function s(e,t){let n=o.has(e)?o.get(e):e.args.length;return n-=1,n<=0?(e.resolve(t),o.delete(e),!0):(o.set(e,n),!1)}function a(e,t){let n=o.has(e)?o.get(e):e.args.length;return 0===n?0===Number(t)&&(o.delete(e),e.resolve(t),!0):(n-=1,n<=0?(e.resolve(t),!0):(o.set(e,n),!1))}return Vp}function Yp(){return qp||(qp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.readyHandler=e.errorHandler=e.closeHandler=e.connectHandler=void 0;const t=lm(),n=Dm(),i=Lp(),r=Tm(),o=Qp(),s=(0,r.Debug)("connection");function a(e){const n=new t.AbortError("Command aborted due to connection close");return n.command={name:e.name,args:e.args},n}e.connectHandler=function(t){return function(){var n;t.setStatus("connect"),t.resetCommandQueue();let i=!1;const{connectionEpoch:a}=t;t.condition.auth&&t.auth(t.condition.auth,function(e){a===t.connectionEpoch&&e&&(-1!==e.message.indexOf("no password is set")?console.warn("[WARN] Redis server does not require a password, but a password was supplied."):-1!==e.message.indexOf("without any password configured for the default user")?console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"):-1!==e.message.indexOf("wrong number of arguments for 'auth' command")?console.warn("[ERROR] The server returned \"wrong number of arguments for 'auth' command\". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under."):(i=!0,t.recoverFromFatalError(e,e)))}),t.condition.select&&t.select(t.condition.select).catch(e=>{t.silentEmit("error",e)}),new o.default(t,{stringNumbers:t.options.stringNumbers});const u=[];t.options.connectionName&&(s("set the connection name [%s]",t.options.connectionName),u.push(t.client("setname",t.options.connectionName).catch(r.noop))),t.options.disableClientInfo||(s("set the client info"),u.push((0,r.getPackageMeta)().then(e=>t.client("SETINFO","LIB-VER",e.version).catch(r.noop)).catch(r.noop)),u.push(t.client("SETINFO","LIB-NAME",(null===(n=t.options)||void 0===n?void 0:n.clientInfoTag)?`ioredis(${t.options.clientInfoTag})`:"ioredis").catch(r.noop))),Promise.all(u).catch(r.noop).finally(()=>{t.options.enableReadyCheck||e.readyHandler(t)(),t.options.enableReadyCheck&&t._readyCheck(function(n,r){a===t.connectionEpoch&&(n?i||t.recoverFromFatalError(new Error("Ready check failed: "+n.message),n):t.connector.check(r)?e.readyHandler(t)():t.disconnect(!0))})})}},e.closeHandler=function(e){return function(){const n=e.status;if(e.setStatus("close"),e.commandQueue.length&&function(e){var t;let n=0;for(let i=0;i<e.length;){const r=null===(t=e.peekAt(i))||void 0===t?void 0:t.command,o=r.pipelineIndex;void 0!==o&&0!==o||(n=0),void 0===o||o===n++?i++:(e.remove(i,1),r.reject(a(r)))}}(e.commandQueue),e.offlineQueue.length&&function(e){var t;for(let n=0;n<e.length;){const i=null===(t=e.peekAt(n))||void 0===t?void 0:t.command;if("multi"===i.name)break;if("exec"===i.name){e.remove(n,1),i.reject(a(i));break}i.inTransaction?(e.remove(n,1),i.reject(a(i))):n++}}(e.offlineQueue),"ready"===n&&(e.prevCondition||(e.prevCondition=e.condition),e.commandQueue.length&&(e.prevCommandQueue=e.commandQueue)),e.manuallyClosing)return e.manuallyClosing=!1,s("skip reconnecting since the connection is manually closed."),t();if("function"!=typeof e.options.retryStrategy)return s("skip reconnecting because `retryStrategy` is not a function"),t();const o=e.options.retryStrategy(++e.retryAttempts);if("number"!=typeof o)return s("skip reconnecting because `retryStrategy` doesn't return a number"),t();s("reconnect in %sms",o),e.setStatus("reconnecting",o),e.reconnectTimeout=setTimeout(function(){e.reconnectTimeout=null,e.connect().catch(r.noop)},o);const{maxRetriesPerRequest:u}=e.options;if("number"==typeof u)if(u<0)s("maxRetriesPerRequest is negative, ignoring...");else{0===e.retryAttempts%(u+1)&&(s("reach maxRetriesPerRequest limitation, flushing command queue..."),e.flushQueue(new i.MaxRetriesPerRequestError(u)))}};function t(){e.setStatus("end"),e.flushQueue(new Error(r.CONNECTION_CLOSED_ERROR_MSG))}},e.errorHandler=function(e){return function(t){s("error: %s",t),e.silentEmit("error",t)}},e.readyHandler=function(e){return function(){if(e.setStatus("ready"),e.retryAttempts=0,e.options.monitor){e.call("monitor").then(()=>e.setStatus("monitoring"),t=>e.emit("error",t));const{sendCommand:t}=e;return e.sendCommand=function(i){return n.default.checkFlag("VALID_IN_MONITOR_MODE",i.name)?t.call(e,i):(i.reject(new Error("Connection is in monitoring mode, can't process commands.")),i.promise)},void e.once("close",function(){delete e.sendCommand})}const t=e.prevCondition?e.prevCondition.select:e.condition.select;if(e.options.readOnly&&(s("set the connection to readonly mode"),e.readonly().catch(r.noop)),e.prevCondition){const n=e.prevCondition;if(e.prevCondition=null,n.subscriber&&e.options.autoResubscribe){e.condition.select!==t&&(s("connect to db [%d]",t),e.select(t));const i=n.subscriber.channels("subscribe");i.length&&(s("subscribe %d channels",i.length),e.subscribe(i));const r=n.subscriber.channels("psubscribe");r.length&&(s("psubscribe %d channels",r.length),e.psubscribe(r));const o=n.subscriber.channels("ssubscribe");if(o.length){s("ssubscribe %s",o.length);for(const t of o)e.ssubscribe(t)}}}if(e.prevCommandQueue)if(e.options.autoResendUnfulfilledCommands)for(s("resend %d unfulfilled commands",e.prevCommandQueue.length);e.prevCommandQueue.length>0;){const t=e.prevCommandQueue.shift();t.select!==e.condition.select&&"select"!==t.command.name&&e.select(t.select),e.sendCommand(t.command,t.stream)}else e.prevCommandQueue=null;if(e.offlineQueue.length){s("send %d commands in offline queue",e.offlineQueue.length);const t=e.offlineQueue;for(e.resetOfflineQueue();t.length>0;){const n=t.shift();n.select!==e.condition.select&&"select"!==n.command.name&&e.select(n.select),e.sendCommand(n.command,n.stream)}}e.condition.select!==t&&(s("connect to db [%d]",t),e.select(t))}}}(jp)),jp}var Xp,ef,tf,nf,rf={};function of(){if(ef)return Kd;ef=1,Object.defineProperty(Kd,"__esModule",{value:!0});const e=Qd(),t=y,n=nm(),i=_p(),r=Dm(),o=Cp(),s=Ap(),a=Yp(),u=(Xp||(Xp=1,Object.defineProperty(rf,"__esModule",{value:!0}),rf.DEFAULT_REDIS_OPTIONS=void 0,rf.DEFAULT_REDIS_OPTIONS={port:6379,host:"localhost",family:0,connectTimeout:1e4,disconnectTimeout:2e3,retryStrategy:function(e){return Math.min(50*e,2e3)},keepAlive:0,noDelay:!0,connectionName:null,disableClientInfo:!1,clientInfoTag:void 0,sentinels:null,name:null,role:"master",sentinelRetryStrategy:function(e){return Math.min(10*e,1e3)},sentinelReconnectStrategy:function(){return 6e4},natMap:null,enableTLSForSentinelMode:!1,updateSentinels:!0,failoverDetector:!1,username:null,password:null,db:0,enableOfflineQueue:!0,enableReadyCheck:!0,autoResubscribe:!0,autoResendUnfulfilledCommands:!0,lazyConnect:!1,keyPrefix:"",reconnectOnError:null,readOnly:!1,stringNumbers:!1,maxRetriesPerRequest:20,maxLoadingRetryTime:1e4,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],sentinelMaxConnections:10}),rf),c=jm(),l=Hm(),d=Tm(),m=Xm(),p=Km(),f=Sm(),h=hp(),g=(0,d.Debug)("redis");let v=class i extends p.default{constructor(e,n,i){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,n,i),t.EventEmitter.call(this),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){const e=new s.default(this.options);e.emitter=this,this.connector=e}else this.connector=new o.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(f.noop)}static createClient(...e){return new i(...e)}get autoPipelineQueueSize(){let e=0;for(const t of this._autoPipelines.values())e+=t.length;return e}connect(e){const t=new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(new Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");const{options:i}=this;this.condition={select:i.db,auth:i.username?[i.username,i.password]:i.password,subscriber:!1};const r=this;(0,n.default)(this.connector.connect(function(e,t){r.silentEmit(e,t)}),function(n,o){if(n)return r.flushQueue(n),r.silentEmit("error",n),t(n),void r.setStatus("end");let s=i.tls?"secureConnect":"connect";if("sentinels"in i&&i.sentinels&&!i.enableTLSForSentinelMode&&(s="connect"),r.stream=o,i.noDelay&&o.setNoDelay(!0),"number"==typeof i.keepAlive&&(o.connecting?o.once(s,()=>{o.setKeepAlive(!0,i.keepAlive)}):o.setKeepAlive(!0,i.keepAlive)),o.connecting){if(o.once(s,a.connectHandler(r)),i.connectTimeout){let e=!1;o.setTimeout(i.connectTimeout,function(){if(e)return;o.setTimeout(0),o.destroy();const t=new Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",a.errorHandler(r)(t)}),o.once(s,function(){e=!0,o.setTimeout(0)})}}else if(o.destroyed){const e=r.connector.firstError;e&&process.nextTick(()=>{a.errorHandler(r)(e)}),process.nextTick(a.closeHandler(r))}else process.nextTick(a.connectHandler(r));o.destroyed||(o.once("error",a.errorHandler(r)),o.once("close",a.closeHandler(r)));const u=function(){r.removeListener("close",c),e()};var c=function(){r.removeListener("ready",u),t(new Error(d.CONNECTION_CLOSED_ERROR_MSG))};r.once("ready",u),r.once("close",c)})});return(0,n.default)(t,e)}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?a.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new i({...this.options,...e})}get mode(){var e;return this.options.monitor?"monitor":(null===(e=this.condition)||void 0===e?void 0:e.subscriber)?"subscriber":"normal"}monitor(e){const t=this.duplicate({monitor:!0,lazyConnect:!1});return(0,n.default)(new Promise(function(e,n){t.once("error",n),t.once("monitoring",function(){e(t)})}),e)}sendCommand(t,n){var i,o;if("wait"===this.status&&this.connect().catch(f.noop),"end"===this.status)return t.reject(new Error(d.CONNECTION_CLOSED_ERROR_MSG)),t.promise;if((null===(i=this.condition)||void 0===i?void 0:i.subscriber)&&!r.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",t.name))return t.reject(new Error("Connection in subscriber mode, only subscriber commands may be used")),t.promise;"number"==typeof this.options.commandTimeout&&t.setTimeout(this.options.commandTimeout);let s="ready"===this.status||!n&&"connect"===this.status&&(0,e.exists)(t.name)&&((0,e.hasFlag)(t.name,"loading")||r.default.checkFlag("HANDSHAKE_COMMANDS",t.name));if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(s=!1):s=!1,s)g.enabled&&g("write command[%s]: %d -> %s(%o)",this._getDescription(),null===(o=this.condition)||void 0===o?void 0:o.select,t.name,t.args),n?"isPipeline"in n&&n.isPipeline?n.write(t.toWritable(n.destination.redis.stream)):n.write(t.toWritable(n)):this.stream.write(t.toWritable(this.stream)),this.commandQueue.push({command:t,stream:n,select:this.condition.select}),r.default.checkFlag("WILL_DISCONNECT",t.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return t.reject(new Error("Stream isn't writeable and enableOfflineQueue options is false")),t.promise;if("quit"===t.name&&0===this.offlineQueue.length)return this.disconnect(),t.resolve(Buffer.from("OK")),t.promise;g.enabled&&g("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,t.name,t.args),this.offlineQueue.push({command:t,stream:n,select:this.condition.select})}if("select"===t.name&&(0,d.isInt)(t.args[0])){const e=parseInt(t.args[0],10);this.condition.select!==e&&(this.condition.select=e,this.emit("select",e),g("switch to db [%d]",this.condition.select))}return t.promise}setSocketTimeout(){this.socketTimeoutTimer=setTimeout(()=>{this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),this.stream.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let n;if("error"===e){if(n=t,"end"===this.status)return;if(this.manuallyClosing&&n instanceof Error&&(n.message===d.CONNECTION_CLOSED_ERROR_MSG||"connect"===n.syscall||"read"===n.syscall))return}return this.listeners(e).length>0?this.emit.apply(this,arguments):(n&&n instanceof Error&&console.error("[ioredis] Unhandled error event:",n.stack),!1)}recoverFromFatalError(e,t,n){this.flushQueue(t,n),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){var n;let i=!1;switch(this.options.reconnectOnError&&!r.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)&&(i=this.options.reconnectOnError(e)),i){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),(null===(n=this.condition)||void 0===n?void 0:n.select)!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new h}resetOfflineQueue(){this.offlineQueue=new h}parseOptions(...e){const t={};let n=!1;for(let i=0;i<e.length;++i){const r=e[i];if(null!=r)if("object"==typeof r)(0,f.defaults)(t,r);else if("string"==typeof r)(0,f.defaults)(t,(0,d.parseURL)(r)),r.startsWith("rediss://")&&(n=!0);else{if("number"!=typeof r)throw new Error("Invalid argument "+r);t.port=r}}n&&(0,f.defaults)(t,{tls:!0}),(0,f.defaults)(t,i.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),this.options=(0,d.resolveTLSProfile)(t)}setStatus(e,t){g.enabled&&g("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:n={}}){return new c.default({objectMode:!0,key:t,redis:this,command:e,...n})}flushQueue(e,t){let n;if((t=(0,f.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;n=this.offlineQueue.shift();)n.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");n=this.commandQueue.shift();)n.command.reject(e)}_readyCheck(e){const t=this;this.info(function(n,i){if(n)return n.message&&n.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${n.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(n);if("string"!=typeof i)return e(null,i);const r={},o=i.split("\r\n");for(let e=0;e<o.length;++e){const[t,...n]=o[e].split(":"),i=n.join(":");i&&(r[t]=i)}if(r.loading&&"0"!==r.loading){const n=1e3*(r.loading_eta_seconds||1),i=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<n?t.options.maxLoadingRetryTime:n;g("Redis server still loading, trying again in "+i+"ms"),setTimeout(function(){t._readyCheck(e)},i)}else e(null,r)}).catch(f.noop)}};return v.Cluster=i.default,v.Command=r.default,v.defaultOptions=u.DEFAULT_REDIS_OPTIONS,(0,m.default)(v,t.EventEmitter),(0,l.addTransactionSupport)(v.prototype),Kd.default=v,Kd}tf||(tf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.print=t.ReplyError=t.SentinelIterator=t.SentinelConnector=t.AbstractConnector=t.Pipeline=t.ScanStream=t.Command=t.Cluster=t.Redis=t.default=void 0,t=e.exports=of().default;var n=of();Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}});var i=of();Object.defineProperty(t,"Redis",{enumerable:!0,get:function(){return i.default}});var r=_p();Object.defineProperty(t,"Cluster",{enumerable:!0,get:function(){return r.default}});var o=Dm();Object.defineProperty(t,"Command",{enumerable:!0,get:function(){return o.default}});var s=jm();Object.defineProperty(t,"ScanStream",{enumerable:!0,get:function(){return s.default}});var a=qm();Object.defineProperty(t,"Pipeline",{enumerable:!0,get:function(){return a.default}});var u=Ip();Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return u.default}});var c=Ap();Object.defineProperty(t,"SentinelConnector",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SentinelIterator",{enumerable:!0,get:function(){return c.SentinelIterator}}),t.ReplyError=lm().ReplyError,Object.defineProperty(t,"Promise",{get:()=>(console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."),Promise),set(e){console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.")}}),t.print=function(e,t){e?console.log("Error: "+e):console.log("Reply: "+t)}}(Wd,Wd.exports));const sf=Object.freeze({status:"aborted"});function af(e,t,n){function i(n,i){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:i,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,i);const r=s.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class o extends r{}function s(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const uf=Symbol("zod_brand");class cf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class lf extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(nf=globalThis).__zod_globalConfig??(nf.__zod_globalConfig={});const df=globalThis.__zod_globalConfig;function mf(e){return e&&Object.assign(df,e),df}function pf(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function ff(e,t="|"){return e.map(e=>Pf(e)).join(t)}function hf(e,t){return"bigint"==typeof t?t.toString():t}function gf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function vf(e){return null==e}function yf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function _f(e,t){const n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}const bf=Symbol("evaluating");function $f(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==bf)return void 0===i&&(i=bf,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function kf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function wf(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Sf(e){return JSON.stringify(e)}function If(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const xf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ef(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Of=gf(()=>{if(df.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Nf(e){if(!1===Ef(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Ef(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function zf(e){return Nf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Tf=new Set(["string","number","symbol"]),Df=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Af(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cf(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Uf(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Pf(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function jf(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const Rf={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]},Zf={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Lf(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Cf(e,wf(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return kf(this,"shape",e),e},checks:[]}))}function Mf(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=wf(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return kf(this,"shape",i),i},checks:[]});return Cf(e,r)}function Ff(e,t){if(!Nf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return kf(this,"shape",n),n}});return Cf(e,i)}function Bf(e,t){if(!Nf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return kf(this,"shape",n),n}});return Cf(e,n)}function Jf(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return kf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Cf(e,n)}function Vf(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=wf(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return kf(this,"shape",r),r},checks:[]});return Cf(t,r)}function Gf(e,t,n){const i=wf(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return kf(this,"shape",r),r}});return Cf(t,i)}function Wf(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Kf(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function qf(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Hf(e){return"string"==typeof e?e:e?.message}function Qf(e,t,n){const i=e.message?e.message:Hf(e.inst?._zod.def?.error?.(e))??Hf(t?.error?.(e))??Hf(n.customError?.(e))??Hf(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:s,...a}=e;return a.path??(a.path=[]),a.message=i,t?.reportInput&&(a.input=s),a}function Yf(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Xf(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eh(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function th(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function nh(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function ih(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var rh=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Zf,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:Rf,aborted:Wf,allowsEval:Of,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:kf,base64ToUint8Array:nh,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return nh(t+"=".repeat((4-t.length%4)%4))},cached:gf,captureStackTrace:xf,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:yf,clone:Cf,cloneDef:function(e){return wf(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:$f,esc:Sf,escapeRegex:Af,explicitlyAborted:Kf,extend:Ff,finalizeIssue:Qf,floatSafeRemainder:_f,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:pf,getLengthableOrigin:Xf,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:Yf,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:Ef,isPlainObject:Nf,issue:th,joinValues:ff,jsonStringifyReplacer:hf,merge:Jf,mergeDefs:wf,normalizeParams:Uf,nullish:vf,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:Mf,optionalKeys:jf,parsedType:eh,partial:Vf,pick:Lf,prefixIssues:qf,primitiveTypes:Df,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:Tf,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:Gf,safeExtend:Bf,shallowClone:zf,slugify:If,stringifyPrimitive:Pf,uint8ArrayToBase64:ih,uint8ArrayToBase64url:function(e){return ih(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:Hf});const oh=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sh=af("$ZodError",oh),ah=af("$ZodError",oh,{Parent:Error});function uh(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function ch(e,t=e=>e.message){const n={_errors:[]},i=(e,r=[])=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>i({issues:e},[...r,...o.path]));else if("invalid_key"===o.code)i({issues:o.issues},[...r,...o.path]);else if("invalid_element"===o.code)i({issues:o.issues},[...r,...o.path]);else{const e=[...r,...o.path];if(0===e.length)n._errors.push(t(o));else{let i=n,r=0;for(;r<e.length;){const n=e[r];r===e.length-1?(i[n]=i[n]||{_errors:[]},i[n]._errors.push(t(o))):i[n]=i[n]||{_errors:[]},i=i[n],r++}}}};return i(e),n}function lh(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,s;for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>i({issues:e},[...r,...a.path]));else if("invalid_key"===a.code)i({issues:a.issues},[...r,...a.path]);else if("invalid_element"===a.code)i({issues:a.issues},[...r,...a.path]);else{const e=[...r,...a.path];if(0===e.length){n.errors.push(t(a));continue}let i=n,u=0;for(;u<e.length;){const n=e[u],r=u===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(s=i.items)[n]??(s[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(a)),u++}}};return i(e),n}function dh(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function mh(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${dh(e.path)}`);return t.join("\n")}const ph=e=>(t,n,i,r)=>{const o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new cf;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>Qf(e,o,mf())));throw xf(t,r?.callee),t}return s.value},fh=ph(ah),hh=e=>async(t,n,i,r)=>{const o=i?{...i,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>Qf(e,o,mf())));throw xf(t,r?.callee),t}return s.value},gh=hh(ah),vh=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new cf;return o.issues.length?{success:!1,error:new(e??sh)(o.issues.map(e=>Qf(e,r,mf())))}:{success:!0,data:o.value}},yh=vh(ah),_h=e=>async(t,n,i)=>{const r=i?{...i,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>Qf(e,r,mf())))}:{success:!0,data:o.value}},bh=_h(ah),$h=e=>(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return ph(e)(t,n,r)},kh=$h(ah),wh=e=>(t,n,i)=>ph(e)(t,n,i),Sh=wh(ah),Ih=e=>async(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return hh(e)(t,n,r)},xh=Ih(ah),Eh=e=>async(t,n,i)=>hh(e)(t,n,i),Oh=Eh(ah),Nh=e=>(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return vh(e)(t,n,r)},zh=Nh(ah),Th=e=>(t,n,i)=>vh(e)(t,n,i),Dh=Th(ah),Ah=e=>async(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return _h(e)(t,n,r)},Ch=Ah(ah),Uh=e=>async(t,n,i)=>_h(e)(t,n,i),Ph=Uh(ah),jh=/^[cC][0-9a-z]{6,}$/,Rh=/^[0-9a-z]+$/,Zh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lh=/^[0-9a-vA-V]{20}$/,Mh=/^[A-Za-z0-9]{27}$/,Fh=/^[a-zA-Z0-9_-]{21}$/,Bh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Jh=/^([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})$/,Vh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Gh=Vh(4),Wh=Vh(6),Kh=Vh(7),qh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hh=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Qh=Hh;function Yh(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Xh=/^(?:(?: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])$/,eg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tg=e=>{const t=Af(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ng=/^((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])$/,ig=/^(([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])$/,rg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,og=/^[A-Za-z0-9_-]*$/,sg=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ag=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ug=/^https?$/,cg=/^\+[1-9]\d{6,14}$/,lg="(?:(?:\\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])))",dg=new RegExp(`^${lg}$`);function mg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pg(e){return new RegExp(`^${mg(e)}$`)}function fg(e){const t=mg({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${lg}T(?:${i})$`)}const hg=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),gg=/^-?\d+n?$/,vg=/^-?\d+$/,yg=/^-?\d+(?:\.\d+)?$/,_g=/^(?:true|false)$/i,bg=/^null$/i,$g=/^undefined$/i,kg=/^[^A-Z]*$/,wg=/^[^a-z]*$/,Sg=/^[0-9a-fA-F]*$/;function Ig(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function xg(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Eg=Ig(22,"=="),Og=xg(22),Ng=Ig(27,"="),zg=xg(27),Tg=Ig(43,"="),Dg=xg(43),Ag=Ig(64,""),Cg=xg(64),Ug=Ig(86,"=="),Pg=xg(86);var jg=Object.freeze({__proto__:null,base64:rg,base64url:og,bigint:gg,boolean:_g,browserEmail:/^[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])?)*$/,cidrv4:ng,cidrv6:ig,cuid:jh,cuid2:Rh,date:dg,datetime:fg,domain:ag,duration:Bh,e164:cg,email:qh,emoji:Yh,extendedDuration:/^[-+]?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)?)??$/,guid:Jh,hex:Sg,hostname:sg,html5Email:/^[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])?)*$/,httpProtocol:ug,idnEmail:Qh,integer:vg,ipv4:Xh,ipv6:eg,ksuid:Mh,lowercase:kg,mac:tg,md5_base64:Eg,md5_base64url:Og,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Fh,null:bg,number:yg,rfc5322Email:/^(([^<>()\[\]\\.,;:\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,}))$/,sha1_base64:Ng,sha1_base64url:zg,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Tg,sha256_base64url:Dg,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Ag,sha384_base64url:Cg,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Ug,sha512_base64url:Pg,sha512_hex:/^[0-9a-fA-F]{128}$/,string:hg,time:pg,ulid:Zh,undefined:$g,unicodeEmail:Hh,uppercase:wg,uuid:Vh,uuid4:Gh,uuid6:Wh,uuid7:Kh,xid:Lh});const Rg=af("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Zg={number:"number",bigint:"bigint",object:"date"},Lg=af("$ZodCheckLessThan",(e,t)=>{Rg.init(e,t);const n=Zg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mg=af("$ZodCheckGreaterThan",(e,t)=>{Rg.init(e,t);const n=Zg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fg=af("$ZodCheckMultipleOf",(e,t)=>{Rg.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===_f(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Bg=af("$ZodCheckNumberFormat",(e,t)=>{Rg.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Rf[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=vg)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Jg=af("$ZodCheckBigIntFormat",(e,t)=>{Rg.init(e,t);const[n,i]=Zf[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Vg=af("$ZodCheckMaxSize",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:Yf(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Gg=af("$ZodCheckMinSize",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:Yf(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Wg=af("$ZodCheckSizeEquals",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:Yf(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Kg=af("$ZodCheckMaxLength",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=Xf(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qg=af("$ZodCheckMinLength",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=Xf(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hg=af("$ZodCheckLengthEquals",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=Xf(i),s=r>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qg=af("$ZodCheckStringFormat",(e,t)=>{var n,i;Rg.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Yg=af("$ZodCheckRegex",(e,t)=>{Qg.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Xg=af("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kg),Qg.init(e,t)}),ev=af("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=wg),Qg.init(e,t)}),tv=af("$ZodCheckIncludes",(e,t)=>{Rg.init(e,t);const n=Af(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),nv=af("$ZodCheckStartsWith",(e,t)=>{Rg.init(e,t);const n=new RegExp(`^${Af(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),iv=af("$ZodCheckEndsWith",(e,t)=>{Rg.init(e,t);const n=new RegExp(`.*${Af(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function rv(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues))}const ov=af("$ZodCheckProperty",(e,t)=>{Rg.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>rv(n,e,t.property));rv(n,e,t.property)}}),sv=af("$ZodCheckMimeType",(e,t)=>{Rg.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),av=af("$ZodCheckOverwrite",(e,t)=>{Rg.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class uv{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const cv={major:4,minor:4,patch:3},lv=af("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cv;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=Wf(e);for(const o of t){if(o._zod.def.when){if(Kf(e))continue;if(!o._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new cf;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=Wf(e,t)))});else{if(e.issues.length===t)continue;r||(r=Wf(e,t))}}return i?i.then(()=>e):e},n=(n,r,o)=>{if(Wf(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new cf;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new cf;return s.then(e=>t(e,i,o))}return t(s,i,o)}}$f(e,"~standard",()=>({validate:t=>{try{const n=yh(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return bh(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),dv=af("$ZodString",(e,t)=>{lv.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hg(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),mv=af("$ZodStringFormat",(e,t)=>{Qg.init(e,t),dv.init(e,t)}),pv=af("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Jh),mv.init(e,t)}),fv=af("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Vh(e))}else t.pattern??(t.pattern=Vh());mv.init(e,t)}),hv=af("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qh),mv.init(e,t)}),gv=af("$ZodURL",(e,t)=>{mv.init(e,t),e._zod.check=n=>{try{const i=n.value.trim();if(!t.normalize&&t.protocol?.source===ug.source&&!/^https?:\/\//i.test(i))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});const r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vv=af("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Yh()),mv.init(e,t)}),yv=af("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fh),mv.init(e,t)}),_v=af("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jh),mv.init(e,t)}),bv=af("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Rh),mv.init(e,t)}),$v=af("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Zh),mv.init(e,t)}),kv=af("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Lh),mv.init(e,t)}),wv=af("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mh),mv.init(e,t)}),Sv=af("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fg(t)),mv.init(e,t)}),Iv=af("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=dg),mv.init(e,t)}),xv=af("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=pg(t)),mv.init(e,t)}),Ev=af("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Bh),mv.init(e,t)}),Ov=af("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Xh),mv.init(e,t),e._zod.bag.format="ipv4"}),Nv=af("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=eg),mv.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),zv=af("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=tg(t.delimiter)),mv.init(e,t),e._zod.bag.format="mac"}),Tv=af("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ng),mv.init(e,t)}),Dv=af("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ig),mv.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Av(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Cv=af("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rg),mv.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Av(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Uv(e){if(!og.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Av(t.padEnd(4*Math.ceil(t.length/4),"="))}const Pv=af("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=og),mv.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Uv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jv=af("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cg),mv.init(e,t)});function Rv(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Zv=af("$ZodJWT",(e,t)=>{mv.init(e,t),e._zod.check=n=>{Rv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Lv=af("$ZodCustomStringFormat",(e,t)=>{mv.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Mv=af("$ZodNumber",(e,t)=>{lv.init(e,t),e._zod.pattern=e._zod.bag.pattern??yg,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Fv=af("$ZodNumberFormat",(e,t)=>{Bg.init(e,t),Mv.init(e,t)}),Bv=af("$ZodBoolean",(e,t)=>{lv.init(e,t),e._zod.pattern=_g,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Jv=af("$ZodBigInt",(e,t)=>{lv.init(e,t),e._zod.pattern=gg,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Vv=af("$ZodBigIntFormat",(e,t)=>{Jg.init(e,t),Jv.init(e,t)}),Gv=af("$ZodSymbol",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),Wv=af("$ZodUndefined",(e,t)=>{lv.init(e,t),e._zod.pattern=$g,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Kv=af("$ZodNull",(e,t)=>{lv.init(e,t),e._zod.pattern=bg,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),qv=af("$ZodAny",(e,t)=>{lv.init(e,t),e._zod.parse=e=>e}),Hv=af("$ZodUnknown",(e,t)=>{lv.init(e,t),e._zod.parse=e=>e}),Qv=af("$ZodNever",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Yv=af("$ZodVoid",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),Xv=af("$ZodDate",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function ey(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues)),t.value[n]=e.value}const ty=af("$ZodArray",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const s=r[e],a=t.element._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(t=>ey(t,n,e))):ey(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function ny(e,t,n,i,r,o){const s=n in i;if(e.issues.length){if(r&&o&&!s)return;t.issues.push(...qf(n,e.issues))}s||r?void 0===e.value?s&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}function iy(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=jf(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ry(e,t,n,i,r,o){const s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type,l="optional"===u.optin,d="optional"===u.optout;for(const r in t){if("__proto__"===r)continue;if(a.has(r))continue;if("never"===c){s.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>ny(e,n,r,t,l,d))):ny(o,n,r,t,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const oy=af("$ZodObject",(e,t)=>{lv.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=gf(()=>iy(t));$f(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=Ef,o=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=i.value);const a=t.value;if(!r(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const i=c[e],r="optional"===i._zod.optin,o="optional"===i._zod.optout,s=i._zod.run({value:a[e],issues:[]},n);s instanceof Promise?u.push(s.then(n=>ny(n,t,e,a,r,o))):ny(s,t,e,a,r,o)}return o?ry(u,a,t,n,i.value,e):u.length?Promise.all(u).then(()=>t):t}}),sy=af("$ZodObjectJIT",(e,t)=>{oy.init(e,t);const n=e._zod.parse,i=gf(()=>iy(t));let r;const o=Ef,s=!df.jitless,a=s&&Of.value,u=t.catchall;let c;e._zod.parse=(l,d)=>{c??(c=i.value);const m=l.value;return o(m)?s&&a&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new uv(["shape","payload","ctx"]),n=i.value,r=e=>{const t=Sf(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let s=0;for(const e of n.keys)o[e]="key_"+s++;t.write("const newResult = {};");for(const i of n.keys){const n=o[i],s=Sf(i),a=e[i],u="optional"===a?._zod?.optin,c="optional"===a?._zod?.optout;t.write(`const ${n} = ${r(i)};`),u&&c?t.write(`\n if (${n}.issues.length) {\n if (${s} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):u?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${s} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${s}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${s}] = undefined;\n } else {\n newResult[${s}] = ${n}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=r(l,d),u?ry([],m,l,d,c,e):l):n(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),l)}});function ay(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!Wf(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qf(e,i,mf())))}),t)}const uy=af("$ZodUnion",(e,t)=>{lv.init(e,t),$f(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),$f(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),$f(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),$f(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>yf(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:i.value,issues:[]},r);if(t instanceof Promise)s.push(t),o=!0;else{if(0===t.issues.length)return t;s.push(t)}}return o?Promise.all(s).then(t=>ay(t,i,e,r)):ay(s,i,e,r)}});function cy(e,t,n,i){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qf(e,i,mf())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const ly=af("$ZodXor",(e,t)=>{uy.init(e,t),t.inclusive=!1;const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:i.value,issues:[]},r);t instanceof Promise?(s.push(t),o=!0):s.push(t)}return o?Promise.all(s).then(t=>cy(t,i,e,r)):cy(s,i,e,r)}}),dy=af("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,uy.init(e,t);const n=e._zod.parse;$f(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=gf(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const s=r.value;if(!Ef(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback||"backward"===o.direction?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:s,path:[t.discriminator],inst:e}),r)}}),my=af("$ZodIntersection",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>fy(e,t,n)):fy(e,r,o)}});function py(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Nf(e)&&Nf(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=py(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=py(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fy(e,t,n){const i=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)i.has(e)||i.set(e,{}),i.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);const o=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),Wf(e))return e;const s=py(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const hy=af("$ZodTuple",(e,t)=>{lv.init(e,t);const n=t.items;e._zod.parse=(i,r)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const s=[],a=gy(n,"optin"),u=gy(n,"optout");if(!t.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}const c=new Array(n.length);for(let e=0;e<n.length;e++){const t=n[e]._zod.run({value:o[e],issues:[]},r);t instanceof Promise?s.push(t.then(t=>{c[e]=t})):c[e]=t}if(t.rest){let e=n.length-1;const a=o.slice(n.length);for(const n of a){e++;const o=t.rest._zod.run({value:n,issues:[]},r);o instanceof Promise?s.push(o.then(t=>vy(t,i,e))):vy(o,i,e)}}return s.length?Promise.all(s).then(()=>yy(c,i,n,o,u)):yy(c,i,n,o,u)}});function gy(e,t){for(let n=e.length-1;n>=0;n--)if("optional"!==e[n]._zod[t])return n+1;return 0}function vy(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues)),t.value[n]=e.value}function yy(e,t,n,i,r){for(let o=0;o<n.length;o++){const n=e[o],s=o<i.length;if(n.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...qf(o,n.issues))}t.value[o]=n.value}for(let e=t.value.length-1;e>=i.length&&("optional"===n[e]._zod.optout&&void 0===t.value[e]);e--)t.value.length=e;return t}const _y=af("$ZodRecord",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Nf(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const u of s)if("string"==typeof u||"number"==typeof u||"symbol"==typeof u){a.add("number"==typeof u?u.toString():u);const s=t.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>Qf(e,i,mf())),input:u,path:[u],inst:e});continue}const c=s.value,l=t.valueType._zod.run({value:r[u],issues:[]},i);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...qf(u,e.issues)),n.value[c]=e.value})):(l.issues.length&&n.issues.push(...qf(u,l.issues)),n.value[c]=l.value)}let u;for(const e in r)a.has(e)||(u=u??[],u.push(e));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(const s of Reflect.ownKeys(r)){if("__proto__"===s)continue;if(!Object.prototype.propertyIsEnumerable.call(r,s))continue;let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof s&&yg.test(s)&&a.issues.length){const e=t.keyType._zod.run({value:Number(s),issues:[]},i);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Qf(e,i,mf())),input:s,path:[s],inst:e});continue}const u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&n.issues.push(...qf(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...qf(s,u.issues)),n.value[a.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),by=af("$ZodMap",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[s,a]of r){const u=t.keyType._zod.run({value:s,issues:[]},i),c=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([t,o])=>{$y(t,o,n,s,r,e,i)})):$y(u,c,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function $y(e,t,n,i,r,o,s){e.issues.length&&(Tf.has(typeof i)?n.issues.push(...qf(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>Qf(e,s,mf()))})),t.issues.length&&(Tf.has(typeof i)?n.issues.push(...qf(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>Qf(e,s,mf()))})),n.value.set(e.value,t.value)}const ky=af("$ZodSet",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>wy(e,n))):wy(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function wy(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Sy=af("$ZodEnum",(e,t)=>{lv.init(e,t);const n=pf(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>Tf.has(typeof e)).map(e=>"string"==typeof e?Af(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),Iy=af("$ZodLiteral",(e,t)=>{if(lv.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?Af(e):e?Af(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,r)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),xy=af("$ZodFile",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),Ey=af("$ZodTransform",(e,t)=>{lv.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new lf(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n.fallback=!0,n))}if(r instanceof Promise)throw new cf;return n.value=r,n.fallback=!0,n}});function Oy(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ny=af("$ZodOptional",(e,t)=>{lv.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$f(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$f(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${yf(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=e.value,r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Oy(e,i)):Oy(r,i)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),zy=af("$ZodExactOptional",(e,t)=>{Ny.init(e,t),$f(e._zod,"values",()=>t.innerType._zod.values),$f(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ty=af("$ZodNullable",(e,t)=>{lv.init(e,t),$f(e._zod,"optin",()=>t.innerType._zod.optin),$f(e._zod,"optout",()=>t.innerType._zod.optout),$f(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${yf(e.source)}|null)$`):void 0}),$f(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Dy=af("$ZodDefault",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Ay(e,t)):Ay(i,t)}});function Ay(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Cy=af("$ZodPrefault",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Uy=af("$ZodNonOptional",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>Py(t,e)):Py(r,e)}});function Py(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const jy=af("$ZodSuccess",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new lf("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Ry=af("$ZodCatch",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"optout",()=>t.innerType._zod.optout),$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>Qf(e,n,mf()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>Qf(e,n,mf()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Zy=af("$ZodNaN",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Ly=af("$ZodPipe",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>t.in._zod.values),$f(e._zod,"optin",()=>t.in._zod.optin),$f(e._zod,"optout",()=>t.out._zod.optout),$f(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>My(e,t.in,n)):My(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>My(e,t.out,n)):My(i,t.out,n)}});function My(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Fy=af("$ZodCodec",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>t.in._zod.values),$f(e._zod,"optin",()=>t.in._zod.optin),$f(e._zod,"optout",()=>t.out._zod.optout),$f(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>By(e,t,n)):By(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>By(e,t,n)):By(i,t,n)}}});function By(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Jy(e,i,t.out,n)):Jy(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Jy(e,i,t.in,n)):Jy(e,i,t.in,n)}}function Jy(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Vy=af("$ZodPreprocess",(e,t)=>{Ly.init(e,t)}),Gy=af("$ZodReadonly",(e,t)=>{lv.init(e,t),$f(e._zod,"propValues",()=>t.innerType._zod.propValues),$f(e._zod,"values",()=>t.innerType._zod.values),$f(e._zod,"optin",()=>t.innerType?._zod?.optin),$f(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Wy):Wy(i)}});function Wy(e){return e.value=Object.freeze(e.value),e}const Ky=af("$ZodTemplateLiteral",(e,t)=>{lv.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!Df.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(Af(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),qy=af("$ZodFunction",(e,t)=>(lv.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?fh(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?fh(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await gh(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await gh(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new hy({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Hy=af("$ZodPromise",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Qy=af("$ZodLazy",(e,t)=>{lv.init(e,t),$f(e._zod,"innerType",()=>{const e=t;return e._cachedInner||(e._cachedInner=t.getter()),e._cachedInner}),$f(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),$f(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),$f(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),$f(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Yy=af("$ZodCustom",(e,t)=>{Rg.init(e,t),lv.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>Xy(t,n,i,e));Xy(r,n,i,e)}});function Xy(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(th(e))}}const e_=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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:"مدخل"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${Pf(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${ff(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const t_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${Pf(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function n_(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const i_=()=>{const e={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 t(t){return e[t]??null}const n={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:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${Pf(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=n_(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=n_(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const r_=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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:"вход"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${Pf(e.values[0])}`:`Невалидна опция: очаквано едно от ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const o_=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${Pf(e.values[0])}`:`Opció invàlida: s'esperava una de ${ff(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const s_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${Pf(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${ff(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const a_=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${Pf(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For stor: forventede ${o??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For lille: forventede ${o} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const u_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${Pf(e.values[0])}`:`Ungültige Option: erwartet eine von ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const c_=()=>{const e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(t){return e[t]??null}const n={regex:"είσοδος",email:"διεύθυνση 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",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return"string"==typeof e.expected&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${r}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${r}`}case"invalid_value":return 1===e.values.length?`Μη έγκυρη είσοδος: αναμενόταν ${Pf(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Πολύ μεγάλο: αναμενόταν ${e.origin??"τιμή"} να έχει ${n}${e.maximum.toString()} ${i.unit??"στοιχεία"}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??"τιμή"} να είναι ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${i.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:"ends_with"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:"includes"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:"regex"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case"unrecognized_keys":return`Άγνωστ${e.keys.length>1?"α":"ο"} κλειδ${e.keys.length>1?"ιά":"ί"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${e.origin}`;case"invalid_union":default:return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${e.origin}`}}};const l_=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Pf(e.values[0])}`:`Invalid option: expected one of ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":if(e.options&&Array.isArray(e.options)&&e.options.length>0){return`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(" | ")}`}return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}};function d_(){return{localeError:l_()}}const m_=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${Pf(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const p_=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${Pf(e.values[0])}`:`Opción inválida: se esperaba una de ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[e.origin]??e.origin}`}}};const f_=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${r} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${Pf(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${ff(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${ff(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const h_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${Pf(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${ff(e.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"}}};const g_=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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"},i={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${Pf(e.values[0])} attendu`:`Option invalide : une valeur parmi ${ff(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin);return r?`Trop grand : ${i[e.origin]??"valeur"} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??"élément(s)"}`:`Trop grand : ${i[e.origin]??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin);return r?`Trop petit : ${i[e.origin]??"valeur"} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${i[e.origin]??"valeur"} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${ff(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const v_=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${Pf(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${ff(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const y_=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,i=t=>{const i=n(t);return i?i.label:t??e.unknown.label},r=e=>`ה${i(e)}`,o=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},s=e=>e?t[e]??null:null,a={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},u={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=u[n??""]??i(n),o=eh(t.input),s=u[o]??e[o]?.label??o;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${s}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${s}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${Pf(t.values[0])}`;const e=t.values.map(e=>Pf(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=s(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?"<=":"<",a=o(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${a} ${i}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${a} ${i}${t.maximum.toString()}`}case"too_small":{const e=s(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const i="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${i} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${i} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?">=":">",a=o(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${a} ${i}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${a} ${i}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=a[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${ff(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const __=()=>{const e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(t){return e[t]??null}const n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${r}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${r}`}case"invalid_value":return 1===e.values.length?`Neispravna vrijednost: očekivano ${Pf(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Preveliko: očekivano da ${o??"vrijednost"} ima ${n}${e.maximum.toString()} ${r.unit??"elemenata"}`:`Preveliko: očekivano da ${o??"vrijednost"} bude ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Premalo: očekivano da ${o} ima ${n}${e.minimum.toString()} ${r.unit}`:`Premalo: očekivano da ${o} bude ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neispravan tekst: mora započinjati s "${t.prefix}"`:"ends_with"===t.format?`Neispravan tekst: mora završavati s "${t.suffix}"`:"includes"===t.format?`Neispravan tekst: mora sadržavati "${t.includes}"`:"regex"===t.format?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case"unrecognized_keys":return`Neprepoznat${e.keys.length>1?"i ključevi":" ključ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[e.origin]??e.origin}`}}};const b_=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${Pf(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function $_(e,t,n){return 1===Math.abs(e)?t:n}function k_(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const w_=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={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:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${Pf(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=$_(Number(e.maximum),i.unit.one,i.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${k_(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${k_(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=$_(Number(e.minimum),i.unit.one,i.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${k_(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${k_(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${ff(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${k_(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${k_(e.origin)}-ում`}}};const S_=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${Pf(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const I_=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${Pf(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const x_=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${Pf(e.values[0])}`:`Opzione non valida: atteso uno tra ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const E_=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${Pf(e.values[0])}が期待されました`:`無効な選択: ${ff(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${ff(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const O_=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${Pf(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${ff(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${ff(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const N_=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Pf(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${ff(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function z_(){return{localeError:N_()}}const T_=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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:"입력"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${Pf(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${ff(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${ff(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const D_=e=>e.charAt(0).toUpperCase()+e.slice(1);function A_(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const C_=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${Pf(e.values[0])}`:`Privalo būti vienas iš ${ff(e.values,"|")} pasirinkimų`;case"too_big":{const n=i[e.origin]??e.origin,r=t(e.origin,A_(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${D_(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${D_(n??e.origin??"reikšmė")} turi būti ${o} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=i[e.origin]??e.origin,r=t(e.origin,A_(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${D_(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${D_(n??e.origin??"reikšmė")} turi būti ${o} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${ff(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=i[e.origin]??e.origin;return`${D_(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const U_=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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:"внес"},i={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Pf(e.values[0])}`:`Грешана опција: се очекува една ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const P_=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${Pf(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ff(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const j_=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${Pf(e.values[0])}`:`Ongeldige optie: verwacht één van ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return i?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return i?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const R_=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${Pf(e.values[0])}`:`Ugyldig valg: forventet en av ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Z_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${Pf(e.values[0])}`:`Fâsit tercih: mûteberler ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const L_=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${Pf(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${ff(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const M_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${Pf(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const F_=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${Pf(e.values[0])}`:`Opção inválida: esperada uma das ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};const B_=()=>{const e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function t(t){return e[t]??null}const n={regex:"intrare",email:"adresă de 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:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input);return`Intrare invalidă: așteptat ${t}, primit ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Intrare invalidă: așteptat ${Pf(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Prea mare: așteptat ca ${e.origin??"valoarea"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemente"}`:`Prea mare: așteptat ca ${e.origin??"valoarea"} să fie ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Prea mic: așteptat ca ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:"ends_with"===t.format?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:"includes"===t.format?`Șir invalid: trebuie să includă "${t.includes}"`:"regex"===t.format?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${ff(e.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${e.origin}`;case"invalid_union":default:return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${e.origin}`}}};function J_(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const V_=()=>{const e={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 t(t){return e[t]??null}const n={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:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${Pf(e.values[0])}`:`Неверный вариант: ожидалось одно из ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=J_(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=J_(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const G_=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${Pf(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const W_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${Pf(e.values[0])}`:`Ogiltigt val: förväntade en av ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const K_=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Pf(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${ff(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const q_=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${Pf(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${ff(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const H_=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${Pf(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const Q_=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${Pf(e.values[0])}`:`Неправильна опція: очікується одне з ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Y_(){return{localeError:Q_()}}const X_=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${Pf(e.values[0])} متوقع تھا`:`غلط آپشن: ${ff(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${ff(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const eb=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function t(t){return e[t]??null}const n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${Pf(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const tb=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${Pf(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${ff(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const nb=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${Pf(e.values[0])}`:`无效选项:期望以下之一 ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const ib=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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:"輸入"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${Pf(e.values[0])}`:`無效的選項:預期為以下其中之一 ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${ff(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const rb=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${Pf(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${ff(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var ob,sb=Object.freeze({__proto__:null,ar:function(){return{localeError:e_()}},az:function(){return{localeError:t_()}},be:function(){return{localeError:i_()}},bg:function(){return{localeError:r_()}},ca:function(){return{localeError:o_()}},cs:function(){return{localeError:s_()}},da:function(){return{localeError:a_()}},de:function(){return{localeError:u_()}},el:function(){return{localeError:c_()}},en:d_,eo:function(){return{localeError:m_()}},es:function(){return{localeError:p_()}},fa:function(){return{localeError:f_()}},fi:function(){return{localeError:h_()}},fr:function(){return{localeError:g_()}},frCA:function(){return{localeError:v_()}},he:function(){return{localeError:y_()}},hr:function(){return{localeError:__()}},hu:function(){return{localeError:b_()}},hy:function(){return{localeError:w_()}},id:function(){return{localeError:S_()}},is:function(){return{localeError:I_()}},it:function(){return{localeError:x_()}},ja:function(){return{localeError:E_()}},ka:function(){return{localeError:O_()}},kh:function(){return z_()},km:z_,ko:function(){return{localeError:T_()}},lt:function(){return{localeError:C_()}},mk:function(){return{localeError:U_()}},ms:function(){return{localeError:P_()}},nl:function(){return{localeError:j_()}},no:function(){return{localeError:R_()}},ota:function(){return{localeError:Z_()}},pl:function(){return{localeError:M_()}},ps:function(){return{localeError:L_()}},pt:function(){return{localeError:F_()}},ro:function(){return{localeError:B_()}},ru:function(){return{localeError:V_()}},sl:function(){return{localeError:G_()}},sv:function(){return{localeError:W_()}},ta:function(){return{localeError:K_()}},th:function(){return{localeError:q_()}},tr:function(){return{localeError:H_()}},ua:function(){return Y_()},uk:Y_,ur:function(){return{localeError:X_()}},uz:function(){return{localeError:eb()}},vi:function(){return{localeError:tb()}},yo:function(){return{localeError:rb()}},zhCN:function(){return{localeError:nb()}},zhTW:function(){return{localeError:ib()}}});const ab=Symbol("ZodOutput"),ub=Symbol("ZodInput");class cb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function lb(){return new cb}(ob=globalThis).__zod_globalRegistry??(ob.__zod_globalRegistry=lb());const db=globalThis.__zod_globalRegistry;function mb(e,t){return new e({type:"string",...Uf(t)})}function pb(e,t){return new e({type:"string",coerce:!0,...Uf(t)})}function fb(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Uf(t)})}function hb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Uf(t)})}function gb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Uf(t)})}function vb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Uf(t)})}function yb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Uf(t)})}function _b(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Uf(t)})}function bb(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Uf(t)})}function $b(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Uf(t)})}function kb(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Uf(t)})}function wb(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Uf(t)})}function Sb(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Uf(t)})}function Ib(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Uf(t)})}function xb(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Uf(t)})}function Eb(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Uf(t)})}function Ob(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Uf(t)})}function Nb(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Uf(t)})}function zb(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Uf(t)})}function Tb(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Uf(t)})}function Db(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Uf(t)})}function Ab(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Uf(t)})}function Cb(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Uf(t)})}function Ub(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Uf(t)})}function Pb(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Uf(t)})}const jb={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Rb(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Uf(t)})}function Zb(e,t){return new e({type:"string",format:"date",check:"string_format",...Uf(t)})}function Lb(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Uf(t)})}function Mb(e,t){return new e({type:"string",format:"duration",check:"string_format",...Uf(t)})}function Fb(e,t){return new e({type:"number",checks:[],...Uf(t)})}function Bb(e,t){return new e({type:"number",coerce:!0,checks:[],...Uf(t)})}function Jb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Uf(t)})}function Vb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Uf(t)})}function Gb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Uf(t)})}function Wb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Uf(t)})}function Kb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Uf(t)})}function qb(e,t){return new e({type:"boolean",...Uf(t)})}function Hb(e,t){return new e({type:"boolean",coerce:!0,...Uf(t)})}function Qb(e,t){return new e({type:"bigint",...Uf(t)})}function Yb(e,t){return new e({type:"bigint",coerce:!0,...Uf(t)})}function Xb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Uf(t)})}function e$(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Uf(t)})}function t$(e,t){return new e({type:"symbol",...Uf(t)})}function n$(e,t){return new e({type:"undefined",...Uf(t)})}function i$(e,t){return new e({type:"null",...Uf(t)})}function r$(e){return new e({type:"any"})}function o$(e){return new e({type:"unknown"})}function s$(e,t){return new e({type:"never",...Uf(t)})}function a$(e,t){return new e({type:"void",...Uf(t)})}function u$(e,t){return new e({type:"date",...Uf(t)})}function c$(e,t){return new e({type:"date",coerce:!0,...Uf(t)})}function l$(e,t){return new e({type:"nan",...Uf(t)})}function d$(e,t){return new Lg({check:"less_than",...Uf(t),value:e,inclusive:!1})}function m$(e,t){return new Lg({check:"less_than",...Uf(t),value:e,inclusive:!0})}function p$(e,t){return new Mg({check:"greater_than",...Uf(t),value:e,inclusive:!1})}function f$(e,t){return new Mg({check:"greater_than",...Uf(t),value:e,inclusive:!0})}function h$(e){return p$(0,e)}function g$(e){return d$(0,e)}function v$(e){return m$(0,e)}function y$(e){return f$(0,e)}function _$(e,t){return new Fg({check:"multiple_of",...Uf(t),value:e})}function b$(e,t){return new Vg({check:"max_size",...Uf(t),maximum:e})}function $$(e,t){return new Gg({check:"min_size",...Uf(t),minimum:e})}function k$(e,t){return new Wg({check:"size_equals",...Uf(t),size:e})}function w$(e,t){return new Kg({check:"max_length",...Uf(t),maximum:e})}function S$(e,t){return new qg({check:"min_length",...Uf(t),minimum:e})}function I$(e,t){return new Hg({check:"length_equals",...Uf(t),length:e})}function x$(e,t){return new Yg({check:"string_format",format:"regex",...Uf(t),pattern:e})}function E$(e){return new Xg({check:"string_format",format:"lowercase",...Uf(e)})}function O$(e){return new ev({check:"string_format",format:"uppercase",...Uf(e)})}function N$(e,t){return new tv({check:"string_format",format:"includes",...Uf(t),includes:e})}function z$(e,t){return new nv({check:"string_format",format:"starts_with",...Uf(t),prefix:e})}function T$(e,t){return new iv({check:"string_format",format:"ends_with",...Uf(t),suffix:e})}function D$(e,t,n){return new ov({check:"property",property:e,schema:t,...Uf(n)})}function A$(e,t){return new sv({check:"mime_type",mime:e,...Uf(t)})}function C$(e){return new av({check:"overwrite",tx:e})}function U$(e){return C$(t=>t.normalize(e))}function P$(){return C$(e=>e.trim())}function j$(){return C$(e=>e.toLowerCase())}function R$(){return C$(e=>e.toUpperCase())}function Z$(){return C$(e=>If(e))}function L$(e,t,n){return new e({type:"array",element:t,...Uf(n)})}function M$(e,t){return new e({type:"file",...Uf(t)})}function F$(e,t,n){const i=Uf(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function B$(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Uf(n)})}function J$(e,t){const n=V$(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(th(e,t.value,n._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=t.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),t.issues.push(th(i))}},e(t.value,t)),t);return n}function V$(e,t){const n=new Rg({check:"custom",...Uf(t)});return n._zod.check=e,n}function G$(e){const t=new Rg({check:"describe"});return t._zod.onattach=[t=>{const n=db.get(t)??{};db.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function W$(e){const t=new Rg({check:"meta"});return t._zod.onattach=[t=>{const n=db.get(t)??{};db.add(t,{...n,...e})}],t._zod.check=()=>{},t}function K$(e,t){const n=Uf(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),s=new Set(r),a=e.Codec??Fy,u=e.Boolean??Bv,c=new a({type:"pipe",in:new(e.String??dv)({type:"string",error:n.error}),out:new u({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!s.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function q$(e,t,n,i={}){const r=Uf(i),o={...Uf(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}function H$(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??db,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Q$(e,t,n={path:[],schemaPath:[]}){var i;const r=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const i={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,i);else{const n=s.schema,o=t.processors[r.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);o(e,t,n,i)}const o=e._zod.parent;o&&(s.ref||(s.ref=o),Q$(o,t,i),t.seen.get(o).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===t.io&&ek(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function Y$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=i.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const i=t[1],{ref:r,defId:o}=(t=>{const i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${i}/${o}`}}if(t[1]===n)return{ref:"#"};const r=`#/${i}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}})(t);i.def={...i.schema},o&&(i.defId=o);const s=i.schema;for(const e in s)delete s[e];s.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const i=n[1];if(t===n[0]){r(n);continue}if(e.external){const i=e.external.registry.get(n[0])?.id;if(t!==n[0]&&i){r(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?r(n):(i.cycle||i.count>1&&"ref"===e.reused)&&r(n)}}function X$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,o={...r},s=n.ref;if(n.ref=null,s){i(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,a):(r.allOf=r.allOf??[],r.allOf.push(a)),Object.assign(r,o);if(t._zod.parent===s)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in o||delete r[e]);if(a.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const a=t._zod.parent;if(a&&a!==s){i(a);const t=e.seen.get(a);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())i(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const o=e.metadataRegistry.get(t)?.id;void 0!==o&&r.id===o&&delete r.id;const s=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,s[e.defId]=e.def)}e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?r.$defs=s:r.definitions=s);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:nk(t,"input",e.processors),output:nk(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function ek(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return ek(i.element,n);if("set"===i.type)return ek(i.valueType,n);if("lazy"===i.type)return ek(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return ek(i.innerType,n);if("intersection"===i.type)return ek(i.left,n)||ek(i.right,n);if("record"===i.type||"map"===i.type)return ek(i.keyType,n)||ek(i.valueType,n);if("pipe"===i.type)return!!e._zod.traits.has("$ZodCodec")||(ek(i.in,n)||ek(i.out,n));if("object"===i.type){for(const e in i.shape)if(ek(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(ek(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(ek(e,n))return!0;return!(!i.rest||!ek(i.rest,n))}return!1}const tk=(e,t={})=>n=>{const i=H$({...n,processors:t});return Q$(e,i),Y$(i,e),X$(i,e)},nk=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},s=H$({...r??{},target:o,io:t,processors:n});return Q$(e,s),Y$(s,e),X$(s,e)},ik={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rk=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof s&&(r.maxLength=s),a&&(r.format=ik[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),c&&(r.contentEncoding=c),u&&u.size>0){const e=[...u];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ok=(e,t,n,i)=>{const r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";const d="number"==typeof l&&l>=(o??Number.NEGATIVE_INFINITY),m="number"==typeof c&&c<=(s??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;d?p?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof o&&(r.minimum=o),m?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:"number"==typeof s&&(r.maximum=s),"number"==typeof u&&(r.multipleOf=u)},sk=(e,t,n,i)=>{n.type="boolean"},ak=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},uk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},ck=(e,t,n,i)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},lk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},dk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},mk=(e,t,n,i)=>{n.not={}},pk=(e,t,n,i)=>{},fk=(e,t,n,i)=>{},hk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},gk=(e,t,n,i)=>{const r=pf(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},vk=(e,t,n,i)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o},yk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},_k=(e,t,n,i)=>{const r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},bk=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;void 0!==s&&(o.minLength=s),void 0!==a&&(o.maxLength=a),u?1===u.length?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(e=>({contentMediaType:e}))):Object.assign(r,o)},$k=(e,t,n,i)=>{n.type="boolean"},kk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},wk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},Sk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},Ik=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},xk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},Ek=(e,t,n,i)=>{const r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(r.minItems=s),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=Q$(o.element,t,{...i,path:[...i.path,"items"]})},Ok=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object",r.properties={};const s=o.shape;for(const e in s)r.properties[e]=Q$(s[e],t,{...i,path:[...i.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(r.required=Array.from(u)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Q$(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},Nk=(e,t,n,i)=>{const r=e._zod.def,o=!1===r.inclusive,s=r.options.map((e,n)=>Q$(e,t,{...i,path:[...i.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=s:n.anyOf=s},zk=(e,t,n,i)=>{const r=e._zod.def,o=Q$(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=Q$(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},Tk=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="array";const s="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",u=o.items.map((e,n)=>Q$(e,t,{...i,path:[...i.path,s,n]})),c=o.rest?Q$(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=u,c&&(r.items=c)):"openapi-3.0"===t.target?(r.items={anyOf:u},c&&r.items.anyOf.push(c),r.minItems=u.length,c||(r.maxItems=u.length)):(r.items=u,c&&(r.additionalItems=c));const{minimum:l,maximum:d}=e._zod.bag;"number"==typeof l&&(r.minItems=l),"number"==typeof d&&(r.maxItems=d)},Dk=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object";const s=o.keyType,a=s._zod.bag,u=a?.patterns;if("loose"===o.mode&&u&&u.size>0){const e=Q$(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of u)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=Q$(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Q$(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=s._zod.values;if(c){const e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},Ak=(e,t,n,i)=>{const r=e._zod.def,o=Q$(r.innerType,t,i),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Ck=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Uk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Pk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},jk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);let o;t.seen.get(e).ref=r.innerType;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Rk=(e,t,n,i)=>{const r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s="input"===t.io?o?r.out:r.in:r.out;Q$(s,t,i);t.seen.get(e).ref=s},Zk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Lk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Mk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Fk=(e,t,n,i)=>{const r=e._zod.innerType;Q$(r,t,i);t.seen.get(e).ref=r},Bk={string:rk,number:ok,boolean:sk,bigint:ak,symbol:uk,null:ck,undefined:lk,void:dk,never:mk,any:pk,unknown:fk,date:hk,enum:gk,literal:vk,nan:yk,template_literal:_k,file:bk,success:$k,custom:kk,function:wk,transform:Sk,map:Ik,set:xk,array:Ek,object:Ok,union:Nk,intersection:zk,tuple:Tk,record:Dk,nullable:Ak,nonoptional:Ck,default:Uk,prefault:Pk,catch:jk,pipe:Rk,readonly:Zk,promise:Lk,optional:Mk,lazy:Fk};function Jk(e,t){if("_idmap"in e){const n=e,i=H$({...t,processors:Bk}),r={};for(const e of n._idmap.entries()){const[t,n]=e;Q$(n,i)}const o={},s={registry:n,uri:t?.uri,defs:r};i.external=s;for(const e of n._idmap.entries()){const[t,n]=e;Y$(i,n),o[t]=X$(i,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===i.target?"$defs":"definitions";o.__shared={[e]:r}}return{schemas:o}}const n=H$({...t,processors:Bk});return Q$(e,n),Y$(n,e),X$(n,e)}var Vk=Object.freeze({__proto__:null}),Gk=Object.freeze({__proto__:null,$ZodAny:qv,$ZodArray:ty,$ZodAsyncError:cf,$ZodBase64:Cv,$ZodBase64URL:Pv,$ZodBigInt:Jv,$ZodBigIntFormat:Vv,$ZodBoolean:Bv,$ZodCIDRv4:Tv,$ZodCIDRv6:Dv,$ZodCUID:_v,$ZodCUID2:bv,$ZodCatch:Ry,$ZodCheck:Rg,$ZodCheckBigIntFormat:Jg,$ZodCheckEndsWith:iv,$ZodCheckGreaterThan:Mg,$ZodCheckIncludes:tv,$ZodCheckLengthEquals:Hg,$ZodCheckLessThan:Lg,$ZodCheckLowerCase:Xg,$ZodCheckMaxLength:Kg,$ZodCheckMaxSize:Vg,$ZodCheckMimeType:sv,$ZodCheckMinLength:qg,$ZodCheckMinSize:Gg,$ZodCheckMultipleOf:Fg,$ZodCheckNumberFormat:Bg,$ZodCheckOverwrite:av,$ZodCheckProperty:ov,$ZodCheckRegex:Yg,$ZodCheckSizeEquals:Wg,$ZodCheckStartsWith:nv,$ZodCheckStringFormat:Qg,$ZodCheckUpperCase:ev,$ZodCodec:Fy,$ZodCustom:Yy,$ZodCustomStringFormat:Lv,$ZodDate:Xv,$ZodDefault:Dy,$ZodDiscriminatedUnion:dy,$ZodE164:jv,$ZodEmail:hv,$ZodEmoji:vv,$ZodEncodeError:lf,$ZodEnum:Sy,$ZodError:sh,$ZodExactOptional:zy,$ZodFile:xy,$ZodFunction:qy,$ZodGUID:pv,$ZodIPv4:Ov,$ZodIPv6:Nv,$ZodISODate:Iv,$ZodISODateTime:Sv,$ZodISODuration:Ev,$ZodISOTime:xv,$ZodIntersection:my,$ZodJWT:Zv,$ZodKSUID:wv,$ZodLazy:Qy,$ZodLiteral:Iy,$ZodMAC:zv,$ZodMap:by,$ZodNaN:Zy,$ZodNanoID:yv,$ZodNever:Qv,$ZodNonOptional:Uy,$ZodNull:Kv,$ZodNullable:Ty,$ZodNumber:Mv,$ZodNumberFormat:Fv,$ZodObject:oy,$ZodObjectJIT:sy,$ZodOptional:Ny,$ZodPipe:Ly,$ZodPrefault:Cy,$ZodPreprocess:Vy,$ZodPromise:Hy,$ZodReadonly:Gy,$ZodRealError:ah,$ZodRecord:_y,$ZodRegistry:cb,$ZodSet:ky,$ZodString:dv,$ZodStringFormat:mv,$ZodSuccess:jy,$ZodSymbol:Gv,$ZodTemplateLiteral:Ky,$ZodTransform:Ey,$ZodTuple:hy,$ZodType:lv,$ZodULID:$v,$ZodURL:gv,$ZodUUID:fv,$ZodUndefined:Wv,$ZodUnion:uy,$ZodUnknown:Hv,$ZodVoid:Yv,$ZodXID:kv,$ZodXor:ly,$brand:uf,$constructor:af,$input:ub,$output:ab,Doc:uv,JSONSchema:Vk,JSONSchemaGenerator:class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=H$({processors:Bk,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Q$(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Y$(this.ctx,e);const n=X$(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:sf,TimePrecision:jb,_any:r$,_array:L$,_base64:Ab,_base64url:Cb,_bigint:Qb,_boolean:qb,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:V$,_cidrv4:Tb,_cidrv6:Db,_coercedBigint:Yb,_coercedBoolean:Hb,_coercedDate:c$,_coercedNumber:Bb,_coercedString:pb,_cuid:wb,_cuid2:Sb,_custom:F$,_date:u$,_decode:wh,_decodeAsync:Eh,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():zf(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...Uf(i)})},_e164:Ub,_email:fb,_emoji:$b,_encode:$h,_encodeAsync:Ih,_endsWith:T$,_enum:function(e,t,n){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...Uf(n)})},_file:M$,_float32:Vb,_float64:Gb,_gt:p$,_gte:f$,_guid:hb,_includes:N$,_int:Jb,_int32:Wb,_int64:Xb,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:Ob,_ipv6:Nb,_isoDate:Zb,_isoDateTime:Rb,_isoDuration:Mb,_isoTime:Lb,_jwt:Pb,_ksuid:Eb,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:I$,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Uf(n)})},_lowercase:E$,_lt:d$,_lte:m$,_mac:zb,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...Uf(i)})},_max:m$,_maxLength:w$,_maxSize:b$,_mime:A$,_min:f$,_minLength:S$,_minSize:$$,_multipleOf:_$,_nan:l$,_nanoid:kb,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...Uf(n)})},_negative:g$,_never:s$,_nonnegative:y$,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...Uf(n)})},_nonpositive:v$,_normalize:U$,_null:i$,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Fb,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:C$,_parse:ph,_parseAsync:hh,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:h$,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:D$,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...Uf(i)})},_refine:B$,_regex:x$,_safeDecode:Th,_safeDecodeAsync:Uh,_safeEncode:Nh,_safeEncodeAsync:Ah,_safeParse:vh,_safeParseAsync:_h,_set:function(e,t,n){return new e({type:"set",valueType:t,...Uf(n)})},_size:k$,_slugify:Z$,_startsWith:z$,_string:mb,_stringFormat:q$,_stringbool:K$,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:J$,_symbol:t$,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...Uf(n)})},_toLowerCase:j$,_toUpperCase:R$,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:P$,_tuple:function(e,t,n,i){const r=n instanceof lv;return new e({type:"tuple",items:t,rest:r?n:null,...Uf(r?i:n)})},_uint32:Kb,_uint64:e$,_ulid:Ib,_undefined:n$,_union:function(e,t,n){return new e({type:"union",options:t,...Uf(n)})},_unknown:o$,_uppercase:O$,_url:bb,_uuid:gb,_uuidv4:vb,_uuidv6:yb,_uuidv7:_b,_void:a$,_xid:xb,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Uf(n)})},clone:Cf,config:mf,createStandardJSONSchemaMethod:nk,createToJSONSchemaMethod:tk,decode:Sh,decodeAsync:Oh,describe:G$,encode:kh,encodeAsync:xh,extractDefs:Y$,finalize:X$,flattenError:uh,formatError:ch,globalConfig:df,globalRegistry:db,initializeContext:H$,isValidBase64:Av,isValidBase64URL:Uv,isValidJWT:Rv,locales:sb,meta:W$,parse:fh,parseAsync:gh,prettifyError:mh,process:Q$,regexes:jg,registry:lb,safeDecode:Dh,safeDecodeAsync:Ph,safeEncode:zh,safeEncodeAsync:Ch,safeParse:yh,safeParseAsync:bh,toDotPath:dh,toJSONSchema:Jk,treeifyError:lh,util:rh,version:cv}),Wk=Object.freeze({__proto__:null,endsWith:T$,gt:p$,gte:f$,includes:N$,length:I$,lowercase:E$,lt:d$,lte:m$,maxLength:w$,maxSize:b$,mime:A$,minLength:S$,minSize:$$,multipleOf:_$,negative:g$,nonnegative:y$,nonpositive:v$,normalize:U$,overwrite:C$,positive:h$,property:D$,regex:x$,size:k$,slugify:Z$,startsWith:z$,toLowerCase:j$,toUpperCase:R$,trim:P$,uppercase:O$});const Kk=af("ZodISODateTime",(e,t)=>{Sv.init(e,t),Sw.init(e,t)});function qk(e){return Rb(Kk,e)}const Hk=af("ZodISODate",(e,t)=>{Iv.init(e,t),Sw.init(e,t)});function Qk(e){return Zb(Hk,e)}const Yk=af("ZodISOTime",(e,t)=>{xv.init(e,t),Sw.init(e,t)});function Xk(e){return Lb(Yk,e)}const ew=af("ZodISODuration",(e,t)=>{Ev.init(e,t),Sw.init(e,t)});function tw(e){return Mb(ew,e)}var nw=Object.freeze({__proto__:null,ZodISODate:Hk,ZodISODateTime:Kk,ZodISODuration:ew,ZodISOTime:Yk,date:Qk,datetime:qk,duration:tw,time:Xk});const iw=(e,t)=>{sh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ch(e,t)},flatten:{value:t=>uh(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,hf,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,hf,2)}},isEmpty:{get:()=>0===e.issues.length}})},rw=af("ZodError",iw),ow=af("ZodError",iw,{Parent:Error}),sw=ph(ow),aw=hh(ow),uw=vh(ow),cw=_h(ow),lw=$h(ow),dw=wh(ow),mw=Ih(ow),pw=Eh(ow),fw=Nh(ow),hw=Th(ow),gw=Ah(ow),vw=Uh(ow),yw=new WeakMap;function _w(e,t,n){const i=Object.getPrototypeOf(e);let r=yw.get(i);if(r||(r=new Set,yw.set(i,r)),!r.has(t)){r.add(t);for(const e in n){const t=n[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const bw=af("ZodType",(e,t)=>(lv.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nk(e,"input"),output:nk(e,"output")}}),e.toJSONSchema=tk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>sw(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>uw(e,t,n),e.parseAsync=async(t,n)=>aw(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>cw(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>lw(e,t,n),e.decode=(t,n)=>dw(e,t,n),e.encodeAsync=async(t,n)=>mw(e,t,n),e.decodeAsync=async(t,n)=>pw(e,t,n),e.safeEncode=(t,n)=>fw(e,t,n),e.safeDecode=(t,n)=>hw(e,t,n),e.safeEncodeAsync=async(t,n)=>gw(e,t,n),e.safeDecodeAsync=async(t,n)=>vw(e,t,n),_w(e,"ZodType",{check(...e){const t=this.def;return this.clone(wf(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Cf(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(hx(e,t))},superRefine(e,t){return this.check(gx(e,t))},overwrite(e){return this.check(C$(e))},optional(){return DI(this)},exactOptional(){return CI(this)},nullable(){return PI(this)},nullish(){return DI(PI(this))},nonoptional(e){return BI(this,e)},array(){return YS(this)},or(e){return oI([this,e])},and(e){return dI(this,e)},transform(e){return QI(this,zI(e))},default(e){return ZI(this,e)},prefault(e){return MI(this,e)},catch(e){return WI(this,e)},pipe(e){return QI(this,e)},readonly(){return ix(this)},describe(e){const t=this.clone();return db.add(t,{description:e}),t},meta(...e){if(0===e.length)return db.get(this);const t=this.clone();return db.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>db.get(e)?.description,configurable:!0}),e)),$w=af("_ZodString",(e,t)=>{dv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>rk(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_w(e,"_ZodString",{regex(...e){return this.check(x$(...e))},includes(...e){return this.check(N$(...e))},startsWith(...e){return this.check(z$(...e))},endsWith(...e){return this.check(T$(...e))},min(...e){return this.check(S$(...e))},max(...e){return this.check(w$(...e))},length(...e){return this.check(I$(...e))},nonempty(...e){return this.check(S$(1,...e))},lowercase(e){return this.check(E$(e))},uppercase(e){return this.check(O$(e))},trim(){return this.check(P$())},normalize(...e){return this.check(U$(...e))},toLowerCase(){return this.check(j$())},toUpperCase(){return this.check(R$())},slugify(){return this.check(Z$())}})}),kw=af("ZodString",(e,t)=>{dv.init(e,t),$w.init(e,t),e.email=t=>e.check(fb(Iw,t)),e.url=t=>e.check(bb(Cw,t)),e.jwt=t=>e.check(Pb(pS,t)),e.emoji=t=>e.check($b(jw,t)),e.guid=t=>e.check(hb(Ew,t)),e.uuid=t=>e.check(gb(Nw,t)),e.uuidv4=t=>e.check(vb(Nw,t)),e.uuidv6=t=>e.check(yb(Nw,t)),e.uuidv7=t=>e.check(_b(Nw,t)),e.nanoid=t=>e.check(kb(Zw,t)),e.guid=t=>e.check(hb(Ew,t)),e.cuid=t=>e.check(wb(Mw,t)),e.cuid2=t=>e.check(Sb(Bw,t)),e.ulid=t=>e.check(Ib(Vw,t)),e.base64=t=>e.check(Ab(aS,t)),e.base64url=t=>e.check(Cb(cS,t)),e.xid=t=>e.check(xb(Ww,t)),e.ksuid=t=>e.check(Eb(qw,t)),e.ipv4=t=>e.check(Ob(Qw,t)),e.ipv6=t=>e.check(Nb(tS,t)),e.cidrv4=t=>e.check(Tb(iS,t)),e.cidrv6=t=>e.check(Db(oS,t)),e.e164=t=>e.check(Ub(dS,t)),e.datetime=t=>e.check(qk(t)),e.date=t=>e.check(Qk(t)),e.time=t=>e.check(Xk(t)),e.duration=t=>e.check(tw(t))});function ww(e){return mb(kw,e)}const Sw=af("ZodStringFormat",(e,t)=>{mv.init(e,t),$w.init(e,t)}),Iw=af("ZodEmail",(e,t)=>{hv.init(e,t),Sw.init(e,t)});function xw(e){return fb(Iw,e)}const Ew=af("ZodGUID",(e,t)=>{pv.init(e,t),Sw.init(e,t)});function Ow(e){return hb(Ew,e)}const Nw=af("ZodUUID",(e,t)=>{fv.init(e,t),Sw.init(e,t)});function zw(e){return gb(Nw,e)}function Tw(e){return vb(Nw,e)}function Dw(e){return yb(Nw,e)}function Aw(e){return _b(Nw,e)}const Cw=af("ZodURL",(e,t)=>{gv.init(e,t),Sw.init(e,t)});function Uw(e){return bb(Cw,e)}function Pw(e){return bb(Cw,{protocol:ug,hostname:ag,...Uf(e)})}const jw=af("ZodEmoji",(e,t)=>{vv.init(e,t),Sw.init(e,t)});function Rw(e){return $b(jw,e)}const Zw=af("ZodNanoID",(e,t)=>{yv.init(e,t),Sw.init(e,t)});function Lw(e){return kb(Zw,e)}const Mw=af("ZodCUID",(e,t)=>{_v.init(e,t),Sw.init(e,t)});function Fw(e){return wb(Mw,e)}const Bw=af("ZodCUID2",(e,t)=>{bv.init(e,t),Sw.init(e,t)});function Jw(e){return Sb(Bw,e)}const Vw=af("ZodULID",(e,t)=>{$v.init(e,t),Sw.init(e,t)});function Gw(e){return Ib(Vw,e)}const Ww=af("ZodXID",(e,t)=>{kv.init(e,t),Sw.init(e,t)});function Kw(e){return xb(Ww,e)}const qw=af("ZodKSUID",(e,t)=>{wv.init(e,t),Sw.init(e,t)});function Hw(e){return Eb(qw,e)}const Qw=af("ZodIPv4",(e,t)=>{Ov.init(e,t),Sw.init(e,t)});function Yw(e){return Ob(Qw,e)}const Xw=af("ZodMAC",(e,t)=>{zv.init(e,t),Sw.init(e,t)});function eS(e){return zb(Xw,e)}const tS=af("ZodIPv6",(e,t)=>{Nv.init(e,t),Sw.init(e,t)});function nS(e){return Nb(tS,e)}const iS=af("ZodCIDRv4",(e,t)=>{Tv.init(e,t),Sw.init(e,t)});function rS(e){return Tb(iS,e)}const oS=af("ZodCIDRv6",(e,t)=>{Dv.init(e,t),Sw.init(e,t)});function sS(e){return Db(oS,e)}const aS=af("ZodBase64",(e,t)=>{Cv.init(e,t),Sw.init(e,t)});function uS(e){return Ab(aS,e)}const cS=af("ZodBase64URL",(e,t)=>{Pv.init(e,t),Sw.init(e,t)});function lS(e){return Cb(cS,e)}const dS=af("ZodE164",(e,t)=>{jv.init(e,t),Sw.init(e,t)});function mS(e){return Ub(dS,e)}const pS=af("ZodJWT",(e,t)=>{Zv.init(e,t),Sw.init(e,t)});function fS(e){return Pb(pS,e)}const hS=af("ZodCustomStringFormat",(e,t)=>{Lv.init(e,t),Sw.init(e,t)});function gS(e,t,n={}){return q$(hS,e,t,n)}function vS(e){return q$(hS,"hostname",sg,e)}function yS(e){return q$(hS,"hex",Sg,e)}function _S(e,t){const n=`${e}_${t?.enc??"hex"}`,i=jg[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return q$(hS,n,i,t)}const bS=af("ZodNumber",(e,t)=>{Mv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ok(e,t,n),_w(e,"ZodNumber",{gt(e,t){return this.check(p$(e,t))},gte(e,t){return this.check(f$(e,t))},min(e,t){return this.check(f$(e,t))},lt(e,t){return this.check(d$(e,t))},lte(e,t){return this.check(m$(e,t))},max(e,t){return this.check(m$(e,t))},int(e){return this.check(wS(e))},safe(e){return this.check(wS(e))},positive(e){return this.check(p$(0,e))},nonnegative(e){return this.check(f$(0,e))},negative(e){return this.check(d$(0,e))},nonpositive(e){return this.check(m$(0,e))},multipleOf(e,t){return this.check(_$(e,t))},step(e,t){return this.check(_$(e,t))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function $S(e){return Fb(bS,e)}const kS=af("ZodNumberFormat",(e,t)=>{Fv.init(e,t),bS.init(e,t)});function wS(e){return Jb(kS,e)}function SS(e){return Vb(kS,e)}function IS(e){return Gb(kS,e)}function xS(e){return Wb(kS,e)}function ES(e){return Kb(kS,e)}const OS=af("ZodBoolean",(e,t)=>{Bv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>sk(0,0,t)});function NS(e){return qb(OS,e)}const zS=af("ZodBigInt",(e,t)=>{Jv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ak(0,e),e.gte=(t,n)=>e.check(f$(t,n)),e.min=(t,n)=>e.check(f$(t,n)),e.gt=(t,n)=>e.check(p$(t,n)),e.gte=(t,n)=>e.check(f$(t,n)),e.min=(t,n)=>e.check(f$(t,n)),e.lt=(t,n)=>e.check(d$(t,n)),e.lte=(t,n)=>e.check(m$(t,n)),e.max=(t,n)=>e.check(m$(t,n)),e.positive=t=>e.check(p$(BigInt(0),t)),e.negative=t=>e.check(d$(BigInt(0),t)),e.nonpositive=t=>e.check(m$(BigInt(0),t)),e.nonnegative=t=>e.check(f$(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(_$(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function TS(e){return Qb(zS,e)}const DS=af("ZodBigIntFormat",(e,t)=>{Vv.init(e,t),zS.init(e,t)});function AS(e){return Xb(DS,e)}function CS(e){return e$(DS,e)}const US=af("ZodSymbol",(e,t)=>{Gv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>uk(0,e)});function PS(e){return t$(US,e)}const jS=af("ZodUndefined",(e,t)=>{Wv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>lk(0,e)});function RS(e){return n$(jS,e)}const ZS=af("ZodNull",(e,t)=>{Kv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ck(0,e,t)});function LS(e){return i$(ZS,e)}const MS=af("ZodAny",(e,t)=>{qv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function FS(){return r$(MS)}const BS=af("ZodUnknown",(e,t)=>{Hv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function JS(){return o$(BS)}const VS=af("ZodNever",(e,t)=>{Qv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>mk(0,0,t)});function GS(e){return s$(VS,e)}const WS=af("ZodVoid",(e,t)=>{Yv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>dk(0,e)});function KS(e){return a$(WS,e)}const qS=af("ZodDate",(e,t)=>{Xv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hk(0,e),e.min=(t,n)=>e.check(f$(t,n)),e.max=(t,n)=>e.check(m$(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function HS(e){return u$(qS,e)}const QS=af("ZodArray",(e,t)=>{ty.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ek(e,t,n,i),e.element=t.element,_w(e,"ZodArray",{min(e,t){return this.check(S$(e,t))},nonempty(e){return this.check(S$(1,e))},max(e,t){return this.check(w$(e,t))},length(e,t){return this.check(I$(e,t))},unwrap(){return this.element}})});function YS(e,t){return L$(QS,e,t)}function XS(e){const t=e._zod.def.shape;return wI(Object.keys(t))}const eI=af("ZodObject",(e,t)=>{sy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ok(e,t,n,i),$f(e,"shape",()=>t.shape),_w(e,"ZodObject",{keyof(){return wI(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:JS()})},loose(){return this.clone({...this._zod.def,catchall:JS()})},strict(){return this.clone({...this._zod.def,catchall:GS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ff(this,e)},safeExtend(e){return Bf(this,e)},merge(e){return Jf(this,e)},pick(e){return Lf(this,e)},omit(e){return Mf(this,e)},partial(...e){return Vf(TI,this,e[0])},required(...e){return Gf(FI,this,e[0])}})});function tI(e,t){const n={type:"object",shape:e??{},...Uf(t)};return new eI(n)}function nI(e,t){return new eI({type:"object",shape:e,catchall:GS(),...Uf(t)})}function iI(e,t){return new eI({type:"object",shape:e,catchall:JS(),...Uf(t)})}const rI=af("ZodUnion",(e,t)=>{uy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Nk(e,t,n,i),e.options=t.options});function oI(e,t){return new rI({type:"union",options:e,...Uf(t)})}const sI=af("ZodXor",(e,t)=>{rI.init(e,t),ly.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Nk(e,t,n,i),e.options=t.options});function aI(e,t){return new sI({type:"union",options:e,inclusive:!1,...Uf(t)})}const uI=af("ZodDiscriminatedUnion",(e,t)=>{rI.init(e,t),dy.init(e,t)});function cI(e,t,n){return new uI({type:"union",options:t,discriminator:e,...Uf(n)})}const lI=af("ZodIntersection",(e,t)=>{my.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zk(e,t,n,i)});function dI(e,t){return new lI({type:"intersection",left:e,right:t})}const mI=af("ZodTuple",(e,t)=>{hy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Tk(e,t,n,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function pI(e,t,n){const i=t instanceof lv;return new mI({type:"tuple",items:e,rest:i?t:null,...Uf(i?n:t)})}const fI=af("ZodRecord",(e,t)=>{_y.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Dk(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function hI(e,t,n){return t&&t._zod?new fI({type:"record",keyType:e,valueType:t,...Uf(n)}):new fI({type:"record",keyType:ww(),valueType:e,...Uf(t)})}function gI(e,t,n){const i=Cf(e);return i._zod.values=void 0,new fI({type:"record",keyType:i,valueType:t,...Uf(n)})}function vI(e,t,n){return new fI({type:"record",keyType:e,valueType:t,mode:"loose",...Uf(n)})}const yI=af("ZodMap",(e,t)=>{by.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ik(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check($$(...t)),e.nonempty=t=>e.check($$(1,t)),e.max=(...t)=>e.check(b$(...t)),e.size=(...t)=>e.check(k$(...t))});function _I(e,t,n){return new yI({type:"map",keyType:e,valueType:t,...Uf(n)})}const bI=af("ZodSet",(e,t)=>{ky.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>xk(0,e),e.min=(...t)=>e.check($$(...t)),e.nonempty=t=>e.check($$(1,t)),e.max=(...t)=>e.check(b$(...t)),e.size=(...t)=>e.check(k$(...t))});function $I(e,t){return new bI({type:"set",valueType:e,...Uf(t)})}const kI=af("ZodEnum",(e,t)=>{Sy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>gk(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new kI({...t,checks:[],...Uf(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new kI({...t,checks:[],...Uf(i),entries:r})}});function wI(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new kI({type:"enum",entries:n,...Uf(t)})}function SI(e,t){return new kI({type:"enum",entries:e,...Uf(t)})}const II=af("ZodLiteral",(e,t)=>{Iy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>vk(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xI(e,t){return new II({type:"literal",values:Array.isArray(e)?e:[e],...Uf(t)})}const EI=af("ZodFile",(e,t)=>{xy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bk(e,0,n),e.min=(t,n)=>e.check($$(t,n)),e.max=(t,n)=>e.check(b$(t,n)),e.mime=(t,n)=>e.check(A$(Array.isArray(t)?t:[t],n))});function OI(e){return M$(EI,e)}const NI=af("ZodTransform",(e,t)=>{Ey.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Sk(0,e),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new lf(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(th(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(th(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function zI(e){return new NI({type:"transform",transform:e})}const TI=af("ZodOptional",(e,t)=>{Ny.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Mk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function DI(e){return new TI({type:"optional",innerType:e})}const AI=af("ZodExactOptional",(e,t)=>{zy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Mk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function CI(e){return new AI({type:"optional",innerType:e})}const UI=af("ZodNullable",(e,t)=>{Ty.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ak(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function PI(e){return new UI({type:"nullable",innerType:e})}function jI(e){return DI(PI(e))}const RI=af("ZodDefault",(e,t)=>{Dy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Uk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ZI(e,t){return new RI({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():zf(t)}})}const LI=af("ZodPrefault",(e,t)=>{Cy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Pk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function MI(e,t){return new LI({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():zf(t)}})}const FI=af("ZodNonOptional",(e,t)=>{Uy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ck(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function BI(e,t){return new FI({type:"nonoptional",innerType:e,...Uf(t)})}const JI=af("ZodSuccess",(e,t)=>{jy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>$k(0,0,t),e.unwrap=()=>e._zod.def.innerType});function VI(e){return new JI({type:"success",innerType:e})}const GI=af("ZodCatch",(e,t)=>{Ry.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>jk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function WI(e,t){return new GI({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const KI=af("ZodNaN",(e,t)=>{Zy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>yk(0,e)});function qI(e){return l$(KI,e)}const HI=af("ZodPipe",(e,t)=>{Ly.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Rk(e,t,0,i),e.in=t.in,e.out=t.out});function QI(e,t){return new HI({type:"pipe",in:e,out:t})}const YI=af("ZodCodec",(e,t)=>{HI.init(e,t),Fy.init(e,t)});function XI(e,t,n){return new YI({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function ex(e){const t=e._zod.def;return new YI({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const tx=af("ZodPreprocess",(e,t)=>{HI.init(e,t),Vy.init(e,t)}),nx=af("ZodReadonly",(e,t)=>{Gy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Zk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function ix(e){return new nx({type:"readonly",innerType:e})}const rx=af("ZodTemplateLiteral",(e,t)=>{Ky.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>_k(e,0,n)});function ox(e,t){return new rx({type:"template_literal",parts:e,...Uf(t)})}const sx=af("ZodLazy",(e,t)=>{Qy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Fk(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function ax(e){return new sx({type:"lazy",getter:e})}const ux=af("ZodPromise",(e,t)=>{Hy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Lk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function cx(e){return new ux({type:"promise",innerType:e})}const lx=af("ZodFunction",(e,t)=>{qy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>wk(0,e)});function dx(e){return new lx({type:"function",input:Array.isArray(e?.input)?pI(e?.input):e?.input??YS(JS()),output:e?.output??JS()})}const mx=af("ZodCustom",(e,t)=>{Yy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>kk(0,e)});function px(e){const t=new Rg({check:"custom"});return t._zod.check=e,t}function fx(e,t){return F$(mx,e??(()=>!0),t)}function hx(e,t={}){return B$(mx,e,t)}function gx(e,t){return J$(e,t)}const vx=G$,yx=W$;function _x(e,t={}){const n=new mx({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...Uf(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const bx=(...e)=>K$({Codec:YI,Boolean:OS,String:kw},...e);function $x(e){const t=ax(()=>oI([ww(e),$S(),NS(),LS(),YS(t),hI(ww(),t)]));return t}function kx(e,t){return new tx({type:"pipe",in:zI(e),out:t})}var wx;wx||(wx={});const Sx={...Object.freeze({__proto__:null,ZodAny:MS,ZodArray:QS,ZodBase64:aS,ZodBase64URL:cS,ZodBigInt:zS,ZodBigIntFormat:DS,ZodBoolean:OS,ZodCIDRv4:iS,ZodCIDRv6:oS,ZodCUID:Mw,ZodCUID2:Bw,ZodCatch:GI,ZodCodec:YI,ZodCustom:mx,ZodCustomStringFormat:hS,ZodDate:qS,ZodDefault:RI,ZodDiscriminatedUnion:uI,ZodE164:dS,ZodEmail:Iw,ZodEmoji:jw,ZodEnum:kI,ZodExactOptional:AI,ZodFile:EI,ZodFunction:lx,ZodGUID:Ew,ZodIPv4:Qw,ZodIPv6:tS,ZodIntersection:lI,ZodJWT:pS,ZodKSUID:qw,ZodLazy:sx,ZodLiteral:II,ZodMAC:Xw,ZodMap:yI,ZodNaN:KI,ZodNanoID:Zw,ZodNever:VS,ZodNonOptional:FI,ZodNull:ZS,ZodNullable:UI,ZodNumber:bS,ZodNumberFormat:kS,ZodObject:eI,ZodOptional:TI,ZodPipe:HI,ZodPrefault:LI,ZodPreprocess:tx,ZodPromise:ux,ZodReadonly:nx,ZodRecord:fI,ZodSet:bI,ZodString:kw,ZodStringFormat:Sw,ZodSuccess:JI,ZodSymbol:US,ZodTemplateLiteral:rx,ZodTransform:NI,ZodTuple:mI,ZodType:bw,ZodULID:Vw,ZodURL:Cw,ZodUUID:Nw,ZodUndefined:jS,ZodUnion:rI,ZodUnknown:BS,ZodVoid:WS,ZodXID:Ww,ZodXor:sI,_ZodString:$w,_default:ZI,_function:dx,any:FS,array:YS,base64:uS,base64url:lS,bigint:TS,boolean:NS,catch:WI,check:px,cidrv4:rS,cidrv6:sS,codec:XI,cuid:Fw,cuid2:Jw,custom:fx,date:HS,describe:vx,discriminatedUnion:cI,e164:mS,email:xw,emoji:Rw,enum:wI,exactOptional:CI,file:OI,float32:SS,float64:IS,function:dx,guid:Ow,hash:_S,hex:yS,hostname:vS,httpUrl:Pw,instanceof:_x,int:wS,int32:xS,int64:AS,intersection:dI,invertCodec:ex,ipv4:Yw,ipv6:nS,json:$x,jwt:fS,keyof:XS,ksuid:Hw,lazy:ax,literal:xI,looseObject:iI,looseRecord:vI,mac:eS,map:_I,meta:yx,nan:qI,nanoid:Lw,nativeEnum:SI,never:GS,nonoptional:BI,null:LS,nullable:PI,nullish:jI,number:$S,object:tI,optional:DI,partialRecord:gI,pipe:QI,prefault:MI,preprocess:kx,promise:cx,readonly:ix,record:hI,refine:hx,set:$I,strictObject:nI,string:ww,stringFormat:gS,stringbool:bx,success:VI,superRefine:gx,symbol:PS,templateLiteral:ox,transform:zI,tuple:pI,uint32:ES,uint64:CS,ulid:Gw,undefined:RS,union:oI,unknown:JS,url:Uw,uuid:zw,uuidv4:Tw,uuidv6:Dw,uuidv7:Aw,void:KS,xid:Kw,xor:aI}),...Wk,iso:nw},Ix=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function xx(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return Sx.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Sx.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const i=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const i="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===i){const i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}(n,t),r=Ex(i,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return Sx.null();if(0===n.length)return Sx.never();if(1===n.length)return Sx.literal(n[0]);if(n.every(e=>"string"==typeof e))return Sx.enum(n);const i=n.map(e=>Sx.literal(e));return i.length<2?i[0]:Sx.union([i[0],i[1],...i.slice(2)])}if(void 0!==e.const)return Sx.literal(e.const);const n=e.type;if(Array.isArray(n)){const i=n.map(n=>xx({...e,type:n},t));return 0===i.length?Sx.never():1===i.length?i[0]:Sx.union(i)}if(!n)return Sx.any();let i;switch(n){case"string":{let t=Sx.string();if(e.format){const n=e.format;"email"===n?t=t.check(Sx.email()):"uri"===n||"uri-reference"===n?t=t.check(Sx.url()):"uuid"===n||"guid"===n?t=t.check(Sx.uuid()):"date-time"===n?t=t.check(Sx.iso.datetime()):"date"===n?t=t.check(Sx.iso.date()):"time"===n?t=t.check(Sx.iso.time()):"duration"===n?t=t.check(Sx.iso.duration()):"ipv4"===n?t=t.check(Sx.ipv4()):"ipv6"===n?t=t.check(Sx.ipv6()):"mac"===n?t=t.check(Sx.mac()):"cidr"===n?t=t.check(Sx.cidrv4()):"cidr-v6"===n?t=t.check(Sx.cidrv6()):"base64"===n?t=t.check(Sx.base64()):"base64url"===n?t=t.check(Sx.base64url()):"e164"===n?t=t.check(Sx.e164()):"jwt"===n?t=t.check(Sx.jwt()):"emoji"===n?t=t.check(Sx.emoji()):"nanoid"===n?t=t.check(Sx.nanoid()):"cuid"===n?t=t.check(Sx.cuid()):"cuid2"===n?t=t.check(Sx.cuid2()):"ulid"===n?t=t.check(Sx.ulid()):"xid"===n?t=t.check(Sx.xid()):"ksuid"===n&&(t=t.check(Sx.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t="integer"===n?Sx.number().int():Sx.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":i=Sx.boolean();break;case"null":i=Sx.null();break;case"object":{const n={},r=e.properties||{},o=new Set(e.required||[]);for(const[e,i]of Object.entries(r)){const r=Ex(i,t);n[e]=o.has(e)?r:r.optional()}if(e.propertyNames){const r=Ex(e.propertyNames,t),o=e.additionalProperties&&"object"==typeof e.additionalProperties?Ex(e.additionalProperties,t):Sx.any();if(0===Object.keys(n).length){i=Sx.record(r,o);break}const s=Sx.object(n).passthrough(),a=Sx.looseRecord(r,o);i=Sx.intersection(s,a);break}if(e.patternProperties){const r=e.patternProperties,o=Object.keys(r),s=[];for(const e of o){const n=Ex(r[e],t),i=Sx.string().regex(new RegExp(e));s.push(Sx.looseRecord(i,n))}const a=[];if(Object.keys(n).length>0&&a.push(Sx.object(n).passthrough()),a.push(...s),0===a.length)i=Sx.object({}).passthrough();else if(1===a.length)i=a[0];else{let e=Sx.intersection(a[0],a[1]);for(let t=2;t<a.length;t++)e=Sx.intersection(e,a[t]);i=e}break}const s=Sx.object(n);i=!1===e.additionalProperties?s.strict():"object"==typeof e.additionalProperties?s.catchall(Ex(e.additionalProperties,t)):s.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const o=n.map(e=>Ex(e,t)),s=r&&"object"==typeof r&&!Array.isArray(r)?Ex(r,t):void 0;i=s?Sx.tuple(o).rest(s):Sx.tuple(o),"number"==typeof e.minItems&&(i=i.check(Sx.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(Sx.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>Ex(e,t)),o=e.additionalItems&&"object"==typeof e.additionalItems?Ex(e.additionalItems,t):void 0;i=o?Sx.tuple(n).rest(o):Sx.tuple(n),"number"==typeof e.minItems&&(i=i.check(Sx.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(Sx.maxLength(e.maxItems)))}else if(void 0!==r){const n=Ex(r,t);let o=Sx.array(n);"number"==typeof e.minItems&&(o=o.min(e.minItems)),"number"==typeof e.maxItems&&(o=o.max(e.maxItems)),i=o}else i=Sx.array(Sx.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function Ex(e,t){if("boolean"==typeof e)return e?Sx.any():Sx.never();let n=xx(e,t);const i=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>Ex(e,t)),o=Sx.union(r);n=i?Sx.intersection(n,o):o}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>Ex(e,t)),o=Sx.xor(r);n=i?Sx.intersection(n,o):o}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=i?n:Sx.any();else{let r=i?n:Ex(e.allOf[0],t);for(let n=i?0:1;n<e.allOf.length;n++)r=Sx.intersection(r,Ex(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=Sx.nullable(n)),!0===e.readOnly&&(n=Sx.readonly(n)),void 0!==e.default&&(n=n.default(e.default));const r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of o)t in e&&(r[t]=e[t]);const s=["contentEncoding","contentMediaType","contentSchema"];for(const t of s)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))Ix.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function Ox(e){return pb(kw,e)}var Nx=Object.freeze({__proto__:null,bigint:function(e){return Yb(zS,e)},boolean:function(e){return Hb(OS,e)},date:function(e){return c$(qS,e)},number:function(e){return Bb(bS,e)},string:Ox});mf(d_());var zx=Object.freeze({__proto__:null,$brand:uf,$input:ub,$output:ab,NEVER:sf,TimePrecision:jb,ZodAny:MS,ZodArray:QS,ZodBase64:aS,ZodBase64URL:cS,ZodBigInt:zS,ZodBigIntFormat:DS,ZodBoolean:OS,ZodCIDRv4:iS,ZodCIDRv6:oS,ZodCUID:Mw,ZodCUID2:Bw,ZodCatch:GI,ZodCodec:YI,ZodCustom:mx,ZodCustomStringFormat:hS,ZodDate:qS,ZodDefault:RI,ZodDiscriminatedUnion:uI,ZodE164:dS,ZodEmail:Iw,ZodEmoji:jw,ZodEnum:kI,ZodError:rw,ZodExactOptional:AI,ZodFile:EI,get ZodFirstPartyTypeKind(){return wx},ZodFunction:lx,ZodGUID:Ew,ZodIPv4:Qw,ZodIPv6:tS,ZodISODate:Hk,ZodISODateTime:Kk,ZodISODuration:ew,ZodISOTime:Yk,ZodIntersection:lI,ZodIssueCode:{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"},ZodJWT:pS,ZodKSUID:qw,ZodLazy:sx,ZodLiteral:II,ZodMAC:Xw,ZodMap:yI,ZodNaN:KI,ZodNanoID:Zw,ZodNever:VS,ZodNonOptional:FI,ZodNull:ZS,ZodNullable:UI,ZodNumber:bS,ZodNumberFormat:kS,ZodObject:eI,ZodOptional:TI,ZodPipe:HI,ZodPrefault:LI,ZodPreprocess:tx,ZodPromise:ux,ZodReadonly:nx,ZodRealError:ow,ZodRecord:fI,ZodSet:bI,ZodString:kw,ZodStringFormat:Sw,ZodSuccess:JI,ZodSymbol:US,ZodTemplateLiteral:rx,ZodTransform:NI,ZodTuple:mI,ZodType:bw,ZodULID:Vw,ZodURL:Cw,ZodUUID:Nw,ZodUndefined:jS,ZodUnion:rI,ZodUnknown:BS,ZodVoid:WS,ZodXID:Ww,ZodXor:sI,_ZodString:$w,_default:ZI,_function:dx,any:FS,array:YS,base64:uS,base64url:lS,bigint:TS,boolean:NS,catch:WI,check:px,cidrv4:rS,cidrv6:sS,clone:Cf,codec:XI,coerce:Nx,config:mf,core:Gk,cuid:Fw,cuid2:Jw,custom:fx,date:HS,decode:dw,decodeAsync:pw,describe:vx,discriminatedUnion:cI,e164:mS,email:xw,emoji:Rw,encode:lw,encodeAsync:mw,endsWith:T$,enum:wI,exactOptional:CI,file:OI,flattenError:uh,float32:SS,float64:IS,formatError:ch,fromJSONSchema:function(e,t){if("boolean"==typeof e)return e?Sx.any():Sx.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}const i=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(n,t?.defaultTarget);return Ex(n,{version:i,defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??db})},function:dx,getErrorMap:function(){return mf().customError},globalRegistry:db,gt:p$,gte:f$,guid:Ow,hash:_S,hex:yS,hostname:vS,httpUrl:Pw,includes:N$,instanceof:_x,int:wS,int32:xS,int64:AS,intersection:dI,invertCodec:ex,ipv4:Yw,ipv6:nS,iso:nw,json:$x,jwt:fS,keyof:XS,ksuid:Hw,lazy:ax,length:I$,literal:xI,locales:sb,looseObject:iI,looseRecord:vI,lowercase:E$,lt:d$,lte:m$,mac:eS,map:_I,maxLength:w$,maxSize:b$,meta:yx,mime:A$,minLength:S$,minSize:$$,multipleOf:_$,nan:qI,nanoid:Lw,nativeEnum:SI,negative:g$,never:GS,nonnegative:y$,nonoptional:BI,nonpositive:v$,normalize:U$,null:LS,nullable:PI,nullish:jI,number:$S,object:tI,optional:DI,overwrite:C$,parse:sw,parseAsync:aw,partialRecord:gI,pipe:QI,positive:h$,prefault:MI,preprocess:kx,prettifyError:mh,promise:cx,property:D$,readonly:ix,record:hI,refine:hx,regex:x$,regexes:jg,registry:lb,safeDecode:hw,safeDecodeAsync:vw,safeEncode:fw,safeEncodeAsync:gw,safeParse:uw,safeParseAsync:cw,set:$I,setErrorMap:function(e){mf({customError:e})},size:k$,slugify:Z$,startsWith:z$,strictObject:nI,string:ww,stringFormat:gS,stringbool:bx,success:VI,superRefine:gx,symbol:PS,templateLiteral:ox,toJSONSchema:Jk,toLowerCase:j$,toUpperCase:R$,transform:zI,treeifyError:lh,trim:P$,tuple:pI,uint32:ES,uint64:CS,ulid:Gw,undefined:RS,union:oI,unknown:JS,uppercase:O$,url:Uw,util:rh,uuid:zw,uuidv4:Tw,uuidv6:Dw,uuidv7:Aw,void:KS,xid:Kw,xor:aI});rc({app:fu(),api:fu()});const Tx=rc({request:Sc(rc({urls:nc(fu()),methods:nc(sc([_c("GET"),_c("POST"),_c("PATCH"),_c("PUT"),_c("DELETE")]))})),log:Sc(rc({})),sleep:Sc(rc({}))});Sc(rc({enabled:Mu(),requestedScopes:Tx}));const Dx=fu(),Ax=fu().meta({$ref:"FamilyName"}),Cx=fu().meta({$ref:"FontWeight"}),Ux=fu(),Px=fu(),jx=fu(),Rx=fu(),Zx=fu(),Lx=sc([fu(),_c("thin"),_c("medium"),_c("thick")]),Mx=rc({columnGap:sc([Ux,Px]).optional(),rowGap:sc([Ux,Px]).optional(),field:rc({label:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),input:rc({background:Dx.optional(),backgroundSubdued:Dx.optional(),foreground:Dx.optional(),foregroundSubdued:Dx.optional(),borderColor:Dx.optional(),borderColorHover:Dx.optional(),focusRingColor:Dx.optional(),boxShadow:jx.optional(),height:Zx.optional(),padding:sc([Ux,Px]).optional()}).optional()}).optional()}).optional(),Fx=rc({borderRadius:sc([Ux,Px]).optional(),borderWidth:Lx.optional(),foreground:Dx.optional(),foregroundSubdued:Dx.optional(),foregroundAccent:Dx.optional(),background:Dx.optional(),backgroundNormal:Dx.optional(),backgroundAccent:Dx.optional(),backgroundSubdued:Dx.optional(),borderColor:Dx.optional(),borderColorAccent:Dx.optional(),borderColorSubdued:Dx.optional(),primary:Dx.optional(),primaryBackground:Dx.optional(),primarySubdued:Dx.optional(),primaryAccent:Dx.optional(),secondary:Dx.optional(),secondaryBackground:Dx.optional(),secondarySubdued:Dx.optional(),secondaryAccent:Dx.optional(),success:Dx.optional(),successBackground:Dx.optional(),successSubdued:Dx.optional(),successAccent:Dx.optional(),warning:Dx.optional(),warningBackground:Dx.optional(),warningSubdued:Dx.optional(),warningAccent:Dx.optional(),danger:Dx.optional(),dangerBackground:Dx.optional(),dangerSubdued:Dx.optional(),dangerAccent:Dx.optional(),fonts:rc({display:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),title:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),sans:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),serif:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),monospace:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional()}).optional(),shell:rc({background:Dx.optional(),backgroundAccent:Dx.optional(),borderWidth:Lx.optional(),borderColor:Dx.optional()}).optional(),navigation:rc({project:rc({foreground:Dx.optional(),fontFamily:Ax.optional()}).optional(),modules:rc({background:Dx.optional(),borderWidth:Lx.optional(),borderColor:Dx.optional(),button:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional()}).optional()}).optional(),list:rc({icon:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional()}).optional(),foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional(),fontFamily:Ax.optional(),divider:rc({borderColor:Dx.optional(),borderWidth:Lx.optional()})}).optional()}).optional(),header:rc({title:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional()}).optional(),form:Mx,sidebar:rc({background:Dx.optional(),foreground:Dx.optional(),fontFamily:Ax.optional(),borderWidth:Lx.optional(),borderColor:Dx.optional(),section:rc({borderWidth:Lx.optional(),borderColor:Dx.optional(),active:rc({borderWidth:Lx.optional(),borderColor:Dx.optional()}).optional(),toggle:rc({icon:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional()}).optional(),foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional(),fontFamily:Ax.optional()}).optional(),form:Mx}).optional()}).optional(),public:rc({background:Dx.optional(),foreground:Dx.optional(),foregroundAccent:Dx.optional(),art:rc({background:Dx.optional(),primary:Dx.optional(),secondary:Dx.optional(),speed:Rx.optional()}).optional(),form:Mx}).optional(),popover:rc({menu:rc({background:Dx.optional(),borderRadius:sc([Ux,Px]).optional(),boxShadow:jx.optional()}).optional()}).optional(),banner:rc({background:Dx.optional(),padding:sc([Ux,Px]).optional(),borderRadius:sc([Ux,Px]).optional(),avatar:rc({background:Dx.optional(),foreground:Dx.optional(),borderRadius:sc([Ux,Px]).optional()}).optional(),headline:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),title:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),subtitle:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),art:rc({foreground:Dx.optional()}).optional()}).optional()});rc({id:fu(),name:fu(),appearance:sc([_c("light"),_c("dark")]),rules:Fx});const Bx=sc([fu(),ju()]);rc({type:fu(),uid:Bx.optional()}).passthrough();const Jx="collab",Vx={JOIN:"join",LEAVE:"leave",UPDATE:"update",UPDATE_ALL:"updateAll",FOCUS:"focus",DISCARD:"discard"},Gx=Xc.object({type:Xc.literal(Jx),room:Xc.string()});Xc.discriminatedUnion("action",[Xc.object({type:Xc.literal(Jx),action:Xc.literal(Vx.JOIN),collection:Xc.string(),item:Xc.union([Xc.string(),Xc.number()]).nullable(),version:Xc.string().nullable(),color:Xc.enum(["purple","pink","blue","green","yellow","orange","red"]).nullable().optional(),initialChanges:Xc.record(Xc.string(),Xc.any()).optional()}),Gx.extend({action:Xc.literal(Vx.LEAVE)}),Gx.extend({action:Xc.literal(Vx.UPDATE),field:Xc.string(),changes:Xc.unknown().optional()}),Gx.extend({action:Xc.literal(Vx.UPDATE_ALL),changes:Xc.record(Xc.string(),Xc.any()).optional()}),Gx.extend({action:Xc.literal(Vx.FOCUS),field:Xc.string().nullable()}),Gx.extend({action:Xc.literal(Vx.DISCARD)})]);const Wx=e=>{const t=e??3e4;if(!function(e){return function(e){return"number"==typeof e}(e)&&Number.isFinite(e)}(t)||t<=0)throw new RangeError("Lock leaseMs must be a finite positive number");return t},Kx=()=>function(e,t=Il){return void 0===e?bl():yl(e,t)}(),qx=new Map;const Hx=Symbol("extension-options-builder"),Qx=Symbol("extension-options-config");function Yx(e){const t=Object.freeze([...e.dependencies??[]]);return Object.freeze({[Qx]:Object.freeze({dependencies:t,name:e.name,refine:e.refine,shape:e.shape})})}const Xx=e=>e.string().trim().min(1),eE=e=>Xx(e).refine(e=>{try{const t=new URL(e);return"redis:"===t.protocol||"rediss:"===t.protocol}catch{return!1}},"must be a valid redis:// or rediss:// URL"),tE=eE(zx),nE=e=>{const t=Xx(e),n=t.refine(e=>!/\s/u.test(e),"must not contain whitespace"),i=e.coerce.number().int().min(1).max(65535);return{REDIS_ENABLED:e.boolean().default(!1),REDIS:eE(e).optional(),REDIS_HOST:n.optional(),REDIS_PORT:i.optional(),REDIS_USERNAME:t.optional(),REDIS_PASSWORD:t.optional()}},iE=tI(nE(zx)),rE=Yx({name:"redisConfig",shape:nE});const oE=e=>({CACHE_ENABLED:e.boolean().default(!1),CACHE_STORE:e.enum(["memory","redis"]).optional()}),sE=(e,t)=>{const n=[e.REDIS_HOST,e.REDIS_PORT,e.REDIS_USERNAME,e.REDIS_PASSWORD],i=n.some(e=>void 0!==e),r=n.every(e=>void 0!==e);i&&!r&&t.addIssue({code:"custom",path:["REDIS_HOST"],message:"REDIS_HOST, REDIS_PORT, REDIS_USERNAME, and REDIS_PASSWORD are required together"}),!e.REDIS_ENABLED||e.REDIS||r||t.addIssue({code:"custom",path:["REDIS"],message:"REDIS or all Redis component values are required when REDIS_ENABLED is true"}),"redis"!==e.CACHE_STORE||e.REDIS||r||t.addIssue({code:"custom",path:["CACHE_STORE"],message:"Redis configuration is required when CACHE_STORE is redis"}),"redis"!==e.CACHE_STORE||e.REDIS||e.REDIS_ENABLED||t.addIssue({code:"custom",path:["REDIS_ENABLED"],message:"must be true when CACHE_STORE is redis and REDIS is not supplied"})};tI(oE(zx)).extend(iE.shape).superRefine(sE),Yx({dependencies:[rE],name:"cacheConfig",refine:sE,shape:oE});const aE=ww().trim().min(1),uE=e=>({DIRECTUS_EXTENSIONS_AI_PROVIDER:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_AI_MODEL:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_AI_API_KEY:e.preprocess(e=>"string"==typeof e&&""===e.trim()?void 0:e,e.string().trim().min(1).optional()),DIRECTUS_EXTENSIONS_AI_BASE_URL:e.url().optional()});tI({ai_openai_api_key:aE.nullish(),ai_anthropic_api_key:aE.nullish(),ai_google_api_key:aE.nullish(),ai_openai_compatible_api_key:aE.nullish(),ai_openai_compatible_base_url:Uw().nullish()}),tI(uE(zx)),tI({provider:aE,model:aE,apiKey:aE,baseURL:Uw().optional()}),Yx({name:"aiConfig",shape:uE});const cE=e=>{const t=e.string().trim().min(1),n=e.coerce.number().int().min(1).max(65535);return{EMAIL_VERIFY_SETUP:e.boolean().default(!0),EMAIL_TRANSPORT:e.enum(["sendmail","smtp","mailgun","ses"]).default("sendmail"),EMAIL_FROM:t.default("no-reply@example.com"),EMAIL_TEMPLATES_PATH:t.default("./templates"),EMAIL_SENDMAIL_NEW_LINE:e.enum(["unix","windows"]).default("unix"),EMAIL_SENDMAIL_PATH:t.default("/usr/sbin/sendmail"),EMAIL_SMTP_HOST:t.optional(),EMAIL_SMTP_PORT:n.optional(),EMAIL_SMTP_USER:t.optional(),EMAIL_SMTP_PASSWORD:t.optional(),EMAIL_SMTP_POOL:e.boolean().optional(),EMAIL_SMTP_SECURE:e.boolean().optional(),EMAIL_SMTP_IGNORE_TLS:e.boolean().optional(),EMAIL_SMTP_NAME:t.optional(),EMAIL_MAILGUN_API_KEY:t.optional(),EMAIL_MAILGUN_DOMAIN:t.optional(),EMAIL_MAILGUN_HOST:t.default("api.mailgun.net"),EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID:t.optional(),EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY:t.optional(),EMAIL_SES_REGION:t.optional()}},lE=(e,t)=>{if("smtp"===e.EMAIL_TRANSPORT&&(e.EMAIL_SMTP_HOST||t.addIssue({code:"custom",path:["EMAIL_SMTP_HOST"],message:"is required for smtp"})),"mailgun"===e.EMAIL_TRANSPORT)for(const n of["EMAIL_MAILGUN_API_KEY","EMAIL_MAILGUN_DOMAIN"])e[n]||t.addIssue({code:"custom",path:[n],message:"is required for mailgun"});if("ses"===e.EMAIL_TRANSPORT)for(const n of["EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID","EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY","EMAIL_SES_REGION"])e[n]||t.addIssue({code:"custom",path:[n],message:"is required for ses"})};tI(cE(zx)).superRefine(lE);const dE=Yx({name:"emailConfig",shape:cE});Yx({dependencies:[dE],name:"requiredEmailConfig",refine:lE,shape:()=>({})});const mE=e=>e.enum(["memory","redis"]),pE=e=>({SYNCHRONIZATION_STORE:mE(e).default("memory")});mE(zx);const fE=tI(pE(zx)).extend(iE.shape),hE=Yx({dependencies:[rE],name:"synchronizationConfig",shape:pE}),gE=e=>e.enum(["memory","redis","fs"]),vE=e=>e.enum(["memory","redis"]);gE(zx),vE(zx);const yE=e=>({DIRECTUS_EXTENSION_ID:e.string().optional(),DIRECTUS_EXTENSIONS_SCHEMA_CHANGES_ENABLED:e.boolean().default(!0),DIRECTUS_EXTENSIONS_DATA_SEED_ENABLED:e.boolean().default(!0),DIRECTUS_EXTENSIONS_LOCK_PROVIDER:gE(e).optional(),DIRECTUS_EXTENSIONS_LOCK_REDIS_URL:tE.optional(),DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_RATE_LIMITER_STORE:vE(e).optional()}),_E=(e,t)=>{let n;try{n=function(e,t="memory"){if(e.REDIS?.trim())return e.REDIS.trim();if(!e.REDIS_ENABLED&&"redis"!==t)return;if([e.REDIS_HOST,e.REDIS_PORT,e.REDIS_USERNAME,e.REDIS_PASSWORD].some(e=>void 0===e))throw new Error("REDIS_HOST, REDIS_PORT, REDIS_USERNAME, and REDIS_PASSWORD are required to construct a Redis connection");const{REDIS_HOST:n,REDIS_PORT:i,REDIS_USERNAME:r,REDIS_PASSWORD:o}=e;if(void 0===n||void 0===i||void 0===r||void 0===o)throw new Error("Redis components are incomplete");return`redis://${encodeURIComponent(r)}:${encodeURIComponent(o)}@${n}:${i}`}({REDIS:"string"==typeof e.REDIS?e.REDIS:void 0,REDIS_ENABLED:!0===e.REDIS_ENABLED,REDIS_HOST:"string"==typeof e.REDIS_HOST?e.REDIS_HOST:void 0,REDIS_PASSWORD:"string"==typeof e.REDIS_PASSWORD?e.REDIS_PASSWORD:void 0,REDIS_PORT:"number"==typeof e.REDIS_PORT?e.REDIS_PORT:void 0,REDIS_USERNAME:"string"==typeof e.REDIS_USERNAME?e.REDIS_USERNAME:void 0},"redis"===e.SYNCHRONIZATION_STORE?"redis":"memory")}catch{n=void 0}"redis"!==(e.DIRECTUS_EXTENSIONS_LOCK_PROVIDER??e.SYNCHRONIZATION_STORE)||e.DIRECTUS_EXTENSIONS_LOCK_REDIS_URL||n||t.addIssue({code:"custom",path:["DIRECTUS_EXTENSIONS_LOCK_REDIS_URL"],message:"DIRECTUS_EXTENSIONS_LOCK_REDIS_URL or resolved Redis configuration is required when DIRECTUS_EXTENSIONS_LOCK_PROVIDER is redis"}),"fs"!==e.DIRECTUS_EXTENSIONS_LOCK_PROVIDER||e.DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY||t.addIssue({code:"custom",path:["DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY"],message:"is required when DIRECTUS_EXTENSIONS_LOCK_PROVIDER is fs"}),"redis"!==(e.DIRECTUS_EXTENSIONS_RATE_LIMITER_STORE??e.SYNCHRONIZATION_STORE)||n||t.addIssue({code:"custom",path:["REDIS"],message:"Redis configuration is required when the effective rate limiter store is redis"})};tI({...yE(zx),...fE.shape}).superRefine(_E),Yx({dependencies:[hE],name:"directusStartupConfig",refine:_E,shape:yE}),function(e={}){const t=(e=>{if(void 0!==e.now&&!Sl(e.now))throw new TypeError("Lock now must be a function");if(void 0!==e.tokenFactory&&!Sl(e.tokenFactory))throw new TypeError("Lock tokenFactory must be a function");const t=e.providerId?.trim()??"default";if(!wl(t))throw new TypeError("Lock providerId must not be blank");return void 0!==e.defaultLeaseMs&&Wx(e.defaultLeaseMs),{defaultLeaseMs:e.defaultLeaseMs,now:e.now??Date.now,providerId:t,tokenFactory:e.tokenFactory??Kx}})(e),n=qx.get(t.providerId)??new Map;qx.set(t.providerId,n)}();const bE=wI(["create","read","update","delete","share"]),$E=tI({collection:ww().trim().min(1),action:bE,permissions:fx(e=>null===e||$l(e),{message:"Expected a permission filter object or null"}).nullable().default(null),validation:fx(e=>null===e||$l(e),{message:"Expected a validation filter object or null"}).nullable().default(null),presets:fx(e=>null===e||$l(e),{message:"Expected presets or null"}).nullable().default(null),fields:YS(ww()).nullable().default(null)}),kE=tI({id:ww().trim().min(1),name:ww().trim().min(1),icon:ww(),description:ww().nullable(),enforce_tfa:NS().nullable(),ip_access:YS(ww()).nullable(),app_access:NS(),admin_access:NS(),permissions:YS($E)});tI({policies:YS(kE)});const wE=iI({field:ww(),type:fx(kl),collection:ww().optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()}),SE=iI({collection:ww(),fields:YS(wE).optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()}),IE=iI({collection:ww().optional(),field:ww().optional(),related_collection:ww().nullable().optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()});function xE(e,t,n){const i=function(e){return Hx in e?e[Hx](zx):e}(t).safeParse(e);if(i.success)return i.data;throw n.info(i.error instanceof rw?mh(i.error):String(i.error)),new Error("Invalid extension options ☝. Exiting.")}tI({collections:YS(SE),fields:YS(wE),relations:YS(IE)}),tI({id:zw(),navigation_label:ww().trim().min(1),body:ww(),icon:ww().trim().min(1).nullable().default(null),archived:NS().default(!1)});const EE={INSERT_MISSING:"insert-missing",INSERT_UPDATE:"insert-update",FULL_IDEMPOTENT:"full-idempotent"},OE="system",NE="core";function zE(e,t){return e.filter(e=>(0===t.includeCollections.length||t.includeCollections.includes(e))&&!t.excludeCollections.includes(e))}const TE=ww().regex(/^(0|-?[1-9]\d*)$/u);function DE(e){if("uuid"===e)return zw().refine(e=>e===e.toLowerCase(),{error:"Management requires canonical lowercase UUIDs"});if("integer"===e)return wS();if("bigInteger"===e)return TE;if("string"===e)return ww().min(1);throw new Error(`Unsupported management key type: ${e??"missing"}`)}const AE=nI({type:xI("id-range"),min:wS().optional(),max:wS().optional()}).refine(e=>void 0!==e.min||void 0!==e.max,{error:"Provide at least one ID bound"}).refine(e=>void 0===e.min||void 0===e.max||e.min<e.max,{error:"min must be less than max"}).meta({anyOf:[{required:["min"]},{required:["max"]}],description:"Managed integer IDs: safe-integer min inclusive, max exclusive. Supply at least one bound; min must be less than max when both are set."}),CE=ww().regex(/^[A-Za-z_][A-Za-z0-9_]*$/u),UE=nI({type:xI("relation"),field:CE,collection:CE}),PE=nI({type:xI("manifest")}),jE=cI("type",[AE,UE,PE]),RE=oI([ww().min(1),wS()]),ZE=cI("type",[AE,UE.extend({ids:YS(RE)}),PE.extend({ids:YS(RE)})]),LE=iI({}),ME=oI([wS(),TE]);function FE(e,t,n,i="id",r=!0){if(void 0===n)return;const o=ZE.safeParse(n);if(!o.success)throw new Error(`Invalid management for collection "${e}": ${o.error.message}`);if("manifest"===o.data.type){const n=new Set(o.data.ids);for(const[r,o]of t.entries()){const t=LE.safeParse(o),s=RE.safeParse(t.success?t.data[i]:void 0);if(!s.success||!n.has(s.data))throw new Error(`Seed record ${r+1} for collection "${e}" requires an explicit ID inside the managed manifest selection`)}return o.data}if("relation"===o.data.type){const{field:n,ids:s}=o.data,a=new Set(s),u=new Set;for(const[o,s]of t.entries()){const t=LE.safeParse(s),c=RE.safeParse(t.success?t.data[i]:void 0),l=t.success?t.data[n]:void 0,d=RE.safeParse(l),m=r&&t.success&&c.success&&!0===t.data.__isUpdateOnly&&void 0===l&&u.has(c.data);if(!(c.success&&(m||d.success&&a.has(d.data))))throw new Error(`Seed record ${o+1} for collection "${e}" requires an explicit ID and scalar ${n} inside the managed relation selection`);d.success&&a.has(d.data)&&u.add(c.data)}return o.data}const{min:s,max:a}=o.data;for(const[n,r]of t.entries()){const t=LE.safeParse(r),o=ME.safeParse(t.success?t.data[i]:void 0);if(!o.success)throw new Error(`Seed record ${n+1} for collection "${e}" requires a safe integer number or canonical decimal string ID for id-range management`);const u=BigInt(o.data);if(void 0!==s&&u<BigInt(s)||void 0!==a&&u>=BigInt(a))throw new Error(`Seed record ${n+1} for collection "${e}" has ID ${u} outside managed ID range [${s??"-infinity"}, ${a??"infinity"})`)}return o.data}function BE(e,t="id"){return[...void 0===e.min?[]:[{[t]:{_gte:e.min}}],...void 0===e.max?[]:[{[t]:{_lt:e.max}}]]}function JE(e,t="id"){if("id-range"===e.type)return BE(e,t);if(0===e.ids.length)throw new Error(`Empty managed ${e.type} selection must not be queried`);const n="manifest"===e.type?t:e.field;return[{[n]:{_in:e.ids}}]}const VE=ww().min(1),GE=YS(VE),WE=oI([ww(),$S(),NS(),LS()]),KE=oI([ww(),$S()]),qE=nI({_eq:WE.optional(),_neq:WE.optional(),_lt:KE.optional(),_lte:KE.optional(),_gt:KE.optional(),_gte:KE.optional(),_in:YS(KE).optional(),_nin:YS(KE).optional(),_null:NS().optional(),_nnull:NS().optional(),_contains:ww().optional(),_ncontains:ww().optional(),_icontains:ww().optional(),_starts_with:ww().optional(),_nstarts_with:ww().optional(),_istarts_with:ww().optional(),_nistarts_with:ww().optional(),_ends_with:ww().optional(),_nends_with:ww().optional(),_iends_with:ww().optional(),_niends_with:ww().optional(),_between:YS(KE).length(2).optional(),_nbetween:YS(KE).length(2).optional(),_empty:NS().optional(),_nempty:NS().optional(),_intersects:oI([ww(),hI(ww(),$x())]).optional(),_nintersects:oI([ww(),hI(ww(),$x())]).optional(),_intersects_bbox:oI([ww(),hI(ww(),$x())]).optional(),_nintersects_bbox:oI([ww(),hI(ww(),$x())]).optional()}).refine(e=>Object.values(e).filter(e=>void 0!==e).length<=1,{error:"Use _and with one operator per field predicate"}).meta({maxProperties:1}),HE=nI({...qE.shape,get _json(){return XE.optional()}}).refine(e=>Object.values(e).filter(e=>void 0!==e).length<=1,{error:"Use _and with one operator per field predicate"}).meta({maxProperties:1}),QE=["_and","_or","_some","_none"],YE=ax(()=>tI({_and:YS(YE).optional(),_or:YS(YE).optional()}).catchall(oI([HE,YE])).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&!QE.includes(e));n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:QE}]}})),XE=ax(()=>tI({_and:YS(XE).optional(),_or:YS(XE).optional()}).catchall(qE).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&"_and"!==e&&"_or"!==e);n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:["_and","_or"]}]}})),eO=nI({avg:GE.optional(),avgDistinct:GE.optional(),count:GE.optional(),countDistinct:GE.optional(),min:GE.optional(),max:GE.optional(),sum:GE.optional(),sumDistinct:GE.optional()}),tO=nI({_alias:hI(ww(),ww()).nullish(),_fields:GE.nullish(),_sort:GE.nullish(),_filter:YE.nullish(),_limit:wS().min(-1).nullish(),_offset:wS().nonnegative().nullish(),_page:wS().positive().nullish(),_search:ww().nullish(),_group:GE.nullish(),_aggregate:eO.nullish()}),nO=ax(()=>hI(VE.regex(/^[^_]/u),iO)),iO=ax(()=>tI(tO.shape).catchall(iO).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&!Object.hasOwn(tO.shape,e));n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:Object.keys(tO.shape)}]}})),rO=nI({operationMode:wI(EE).optional(),fields:GE.nullish(),filter:YE.nullish(),sort:GE.nullish(),deep:nO.nullish(),management:jE.nullish()}),oO=nI({collection:VE,...rO.shape,operationMode:wI(EE),management:jE.optional()}),sO=ww().regex(/^(?!directus_|__proto__$)[A-Za-z_][A-Za-z0-9_]*$/u),aO=nI({...rO.shape,operationMode:wI(EE),management:jE.nullish()}),uO=nI({collection:sO,...aO.shape,management:jE.optional()}),cO=[{collection:"directus_policies",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","icon","description","ip_access","enforce_tfa","admin_access","app_access"]},{collection:"directus_roles",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","icon","description","parent"]},{collection:"directus_users",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","avatar","first_name","last_name","title","description","email","status","provider","role","email_notifications","tags","language"]},{collection:"directus_access",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","policy","role","sort","user"]},{collection:"directus_presets",operationMode:"insert-update",filter:{user:{_null:!0}},sort:["-role","id"],fields:["id","bookmark","user","role","collection","search","layout","layout_query","layout_options","refresh_interval","filter","icon","color"]},{collection:"directus_permissions",operationMode:"full-idempotent",management:{type:"relation",field:"policy",collection:"directus_policies"},filter:null,fields:["id","collection","action","permissions","validation","presets","fields","policy"]},{collection:"directus_folders",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","parent","type"],sort:["-parent"]},{collection:"directus_files",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","filename_disk","filename_download","description","title","type","folder"]},{collection:"directus_dashboards",operationMode:"full-idempotent",filter:null,fields:["id","name","note","icon","color"]},{collection:"directus_panels",operationMode:"full-idempotent",filter:null,fields:["id","dashboard","name","icon","color","show_header","note","type","position_x","position_y","width","height","options"]},{collection:"directus_flows",operationMode:"full-idempotent",filter:null,fields:["id","name","icon","color","description","status","trigger","accountability","options","operation","folder"]},{collection:"directus_operations",operationMode:"full-idempotent",filter:null,fields:["id","name","key","type","position_x","position_y","options","resolve","reject","flow"]},{collection:"directus_settings",operationMode:"insert-update",filter:null,fields:["*"]},{collection:"directus_translations",operationMode:"full-idempotent",filter:null,fields:["id","language","key","value"],sort:["key","language"]}],lO=cO.map(e=>e.collection),dO=["directus_extensions"],mO=kx(e=>void 0===e||Array.isArray(e)?e:[e],YS(ww().trim().min(1)).default([])),pO=tI({SEEDER_ENABLED:NS().default(!0),SEEDER_CONFIG_PATH:ww().trim().min(1).optional(),SEEDER_SCOPE:ww().toLowerCase().pipe(xI(OE)).default(OE),SEEDER_INCLUDE:mO,SEEDER_EXCLUDE:mO,SEEDER_CONTINUE_ON_ERROR:NS().default(!1),SEEDER_BATCH_SIZE:$S().int().positive().default(50),SEEDER_ENABLE_FULL_IDEMPOTENT:NS().default(!1),SEEDER_JSON_ONLY:NS().default(!1),SEEDER_AUTO_EXTRACT_SYSTEM:NS().default(!1),SEEDER_AUTO_EXTRACT_CORE:NS().default(!1),SEEDER_AUTO_EXTRACT_INCLUDE:mO.pipe(YS(oI([wI(lO),sO])).min(1)).optional(),SEEDER_JSON_INDENT:wI(["tab","space"],{error:"SEEDER_JSON_INDENT must be tab or space"}).default("tab"),SEEDER_JSON_INDENT_SIZE:$S().int().min(1).max(10).default(2),SEEDER_SEEDS_DIR:ww().trim().min(1).default("/directus/seeds"),SEEDER_ASSETS_DIR:ww().trim().min(1).default("/directus/seeds/system/assets"),DEPLOYMENT_ENV:ww().optional(),DEFAULT_EMAIL:ww().default("admin@example.com"),DEFAULT_PASSWORD:ww().default("p4ssw0rd!"),STORAGE_LOCATIONS:mO.prefault(["local"]).refine(e=>e.length>0,{error:"STORAGE_LOCATIONS must contain at least one location"})}),fO=cI("type",[jE.options[0],jE.options[1].extend({collection:wI(cO.map(({collection:e})=>e).filter(e=>"directus_extensions"!==e))}),jE.options[2]]),hO=nI({...rO.shape,management:fO.nullish()}),gO=nI({...oO.shape,management:fO.optional()}),vO=wI(cO.map(({collection:e})=>e)),yO=nI({$schema:ww().optional(),$comment:ww().optional(),core:nI({collections:JS().refine(e=>null===e||"object"!=typeof e||!Object.hasOwn(e,"__proto__"),{error:"Reserved core collection name: __proto__"}).pipe(hI(sO,aO)),order:YS(sO).refine(e=>new Set(e).size===e.length,{error:"core.order must not contain duplicate collections"}).meta({uniqueItems:!0,description:"Priority prefix; omitted collections follow in declaration order."}).optional()}).superRefine((e,t)=>{for(const n of e.order??[])Object.hasOwn(e.collections,n)||t.addIssue({code:"custom",path:["order"],message:`Unknown core collection: "${n}"`})}).optional(),system:nI({collections:gI(vO,hO).optional(),order:YS(vO).refine(e=>new Set(e).size===e.length,{error:"system.order must not contain duplicate collections"}).meta({uniqueItems:!0,description:"Priority prefix; omitted collections follow in their built-in order. This does not select collections."}).optional()}).optional()});function _O(e){const t=yO.safeParse(e);if(!t.success)throw new Error(`Invalid Seeder configuration: ${t.error.message}`);const n=t.data.system,i=t.data.core,r=i?.order??[],o=Object.entries(i?.collections??{}).map(([e,t])=>{const{management:n,...i}=t;return{collection:e,...i,...null==n?{}:{management:n}}}),s=n?.order??[],a=YS(gO).safeParse(cO);if(!a.success)throw new Error(`Invalid Seeder system defaults: ${a.error.message}`);const u=a.data.map(e=>{const t={...e,...n?.collections?.[e.collection]};return null===t.management&&delete t.management,t}),c=YS(gO).safeParse(u);if(!c.success)throw new Error(`Invalid effective Seeder configuration: ${c.error.message}`);return{coreCollections:[...r.flatMap(e=>o.filter(({collection:t})=>t===e)),...o.filter(({collection:e})=>!r.includes(e))],systemCollections:[...s.flatMap(e=>c.data.filter(({collection:t})=>t===e)),...c.data.filter(({collection:e})=>!s.includes(e))],systemFieldOverrides:Object.entries(n?.collections??{}).filter(([,e])=>void 0!==e?.fields).map(([e])=>e)}}function bO(e){if("system"===e.dataScope)return function(e){const t=YS(gO).safeParse(e.systemCollections??cO);if(!t.success)throw new Error(`Invalid effective Seeder configuration: ${t.error.message}`);return t.data}(e);const t=YS(uO).safeParse(e.coreCollections??[]);if(!t.success)throw new Error(`Invalid effective Seeder core configuration: ${t.error.message}`);return t.data}function $O(e,t={}){const n=function(e){if(void 0===e)return _O({});const t=m.resolve(e);try{return _O(JSON.parse(A(t,"utf8")))}catch(e){throw new Error(`Failed to load Seeder configuration "${t}": ${e instanceof Error?e.message:"Unknown error"}`,{cause:e})}}(e.SEEDER_CONFIG_PATH);if(void 0!==e.SEEDER_AUTO_EXTRACT_INCLUDE){const t=YS(wI([...n.systemCollections,...n.coreCollections].map(({collection:e})=>e))).min(1).safeParse(e.SEEDER_AUTO_EXTRACT_INCLUDE);if(!t.success)throw new Error(`Invalid SEEDER_AUTO_EXTRACT_INCLUDE: ${t.error.message}`)}return{coreCollections:n.coreCollections.map(e=>({...e,...void 0===t.operationMode?{}:{operationMode:t.operationMode}})),systemFieldOverrides:n.systemFieldOverrides,systemCollections:n.systemCollections.map(e=>({...e,...void 0===t.operationMode?{}:{operationMode:t.operationMode}})),dataScope:t.dataScope??e.SEEDER_SCOPE,includeCollections:t.includeCollections??e.SEEDER_INCLUDE,excludeCollections:t.excludeCollections??e.SEEDER_EXCLUDE,continueOnError:t.continueOnError??e.SEEDER_CONTINUE_ON_ERROR,batchSize:t.batchSize??e.SEEDER_BATCH_SIZE,enableFullIdempotent:t.enableFullIdempotent??e.SEEDER_ENABLE_FULL_IDEMPOTENT,skipClean:t.skipClean??!1,jsonOnly:t.jsonOnly??e.SEEDER_JSON_ONLY,jsonIndent:"tab"===e.SEEDER_JSON_INDENT?"\t":e.SEEDER_JSON_INDENT_SIZE}}var kO,wO,SO={},IO={},xO={};function EO(){if(kO)return xO;kO=1;class e extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}return xO.CommanderError=e,xO.InvalidArgumentError=class extends e{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},xO}function OO(){if(wO)return IO;wO=1;const{InvalidArgumentError:e}=EO();return IO.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},IO.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"},IO}var NO={};const zO=L(import.meta.url);const TO=L(import.meta.url);const DO=L(import.meta.url);const AO=L(import.meta.url);const CO=L(import.meta.url);var UO,PO={};function jO(){if(UO)return PO;UO=1;const{humanReadableArgName:e}=OO();function t(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,"")}return PO.Help=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){const t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){const i=n.short&&e._findOption(n.short),r=n.long&&e._findOption(n.long);i||r?n.long&&!r?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description)):t.push(n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(t){const n=t.registeredArguments.map(t=>e(t)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return 0===t.length?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){const i=new Map;return e.forEach(e=>{const t=n(e);i.has(t)||i.set(t,[])}),t.forEach(e=>{const t=n(e);i.has(t)||i.set(t,[]),i.get(t).push(e)}),i}formatHelp(e,t){const n=t.padWidth(e,t),i=t.helpWidth??80;function r(e,i){return t.formatItem(e,n,i,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""];const s=t.commandDescription(e);s.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(s),i),""]));const a=t.visibleArguments(e).map(e=>r(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));o=o.concat(this.formatItemList("Arguments:",a,t));const u=this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??"Options:");if(u.forEach((e,n)=>{const i=e.map(e=>r(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));o=o.concat(this.formatItemList(n,i,t))}),t.showGlobalOptions){const n=t.visibleGlobalOptions(e).map(e=>r(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));o=o.concat(this.formatItemList("Global Options:",n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||"Commands:").forEach((e,n)=>{const i=e.map(e=>r(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));o=o.concat(this.formatItemList(n,i,t))}),o.join("\n")}displayWidth(e){return t(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"[command]"===e?this.styleSubcommandText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleCommandText(e)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleSubcommandText(e)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,i){const r=" ".repeat(2);if(!n)return r+e;const o=e.padEnd(t+e.length-i.displayWidth(e)),s=(this.helpWidth??80)-t-2-2;let a;if(s<this.minWidthToWrap||i.preformatted(n))a=n;else{a=i.boxWrap(n,s).replace(/\n/g,"\n"+" ".repeat(t+2))}return r+o+" ".repeat(2)+a.replace(/\n/g,`\n${r}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;const n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,r=[];return n.forEach(e=>{const n=e.match(i);if(null===n)return void r.push("");let o=[n.shift()],s=this.displayWidth(o[0]);n.forEach(e=>{const n=this.displayWidth(e);if(s+n<=t)return o.push(e),void(s+=n);r.push(o.join(""));const i=e.trimStart();o=[i],s=this.displayWidth(i)}),r.push(o.join(""))}),r.join("\n")}},PO.stripColor=t,PO}var RO,ZO={};function LO(){if(RO)return ZO;RO=1;const{InvalidArgumentError:e}=EO();function t(e){return e.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}return ZO.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=function(e){let t,n;const i=/^-[^-]$/,r=/^--[^-]/,o=e.split(/[ |,]+/).concat("guard");i.test(o[0])&&(t=o.shift());r.test(o[0])&&(n=o.shift());!t&&i.test(o[0])&&(t=o.shift());!t&&r.test(o[0])&&(t=n,n=o.shift());if(o[0].startsWith("-")){const t=o[0],n=`option creation failed due to '${t}' in option flags '${e}'`;if(/^-[^-][^-]/.test(t))throw new Error(`${n}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(i.test(t))throw new Error(`${n}\n- too many short flags`);if(r.test(t))throw new Error(`${n}\n- too many long flags`);throw new Error(`${n}\n- unrecognised flag format`)}if(void 0===t&&void 0===n)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?t(this.name().replace(/^no-/,"")):t(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ZO.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const i=this.negativeOptions.get(n).presetArg,r=void 0!==i&&i;return t.negate===(r===e)}},ZO}var MO,FO,BO,JO={};function VO(){if(MO)return JO;MO=1;return JO.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map(e=>e.slice(2)));let i=[],r=3;return t.forEach(t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let o=1;o=e[r-1]===t[i-1]?0:1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+o),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[e.length][t.length]}(e,t),o=Math.max(e.length,t.length);(o-n)/o>.4&&(n<r?(r=n,i=[t]):n===r&&i.push(t))}),i.sort((e,t)=>e.localeCompare(t)),n&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(", ")}?)`:1===i.length?`\n(Did you mean ${i[0]}?)`:""},JO}function GO(){if(FO)return NO;FO=1;const e=zO("node:events").EventEmitter,t=TO("node:child_process"),n=DO("node:path"),i=AO("node:fs"),r=CO("node:process"),{Argument:o,humanReadableArgName:s}=OO(),{CommanderError:a}=EO(),{Help:u,stripColor:c}=jO(),{Option:l,DualOptions:d}=LO(),{suggestSimilar:m}=VO();class p extends e{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>r.stdout.write(e),writeErr:e=>r.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>r.stdout.isTTY?r.stdout.columns:void 0,getErrHelpWidth:()=>r.stderr.isTTY?r.stderr.columns:void 0,getOutHasColors:()=>h()??(r.stdout.isTTY&&r.stdout.hasColors?.()),getErrHasColors:()=>h()??(r.stderr.isTTY&&r.stderr.hasColors?.()),stripColor:e=>c(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,r=n;"object"==typeof i&&null!==i&&(r=i,i=null),r=r||{};const[,o,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!r.noHelp&&!r.hidden),a._executableFile=r.executableFile||null,s&&a.arguments(s),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new p(e)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new o(e,t)}argument(e,t,n,i){const r=this.createArgument(e,t);return"function"==typeof n?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;const n=e??"help [command]",[,i,r]=n.match(/([^ ]+) *(.*)/),o=t??"display help for command",s=this.createCommand(i);return s.helpOption(!1),r&&s.arguments(r),o&&s.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=s,(e||t)&&this._initCommandGroup(s),this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new a(e,t,n)),r.exit(e)}action(e){return this._actionHandler=t=>{const n=this.registeredArguments.length,i=t.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),e.apply(this,i)},this}createOption(e,t){return new l(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(e){if("commander.invalidArgument"===e.code){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'\n- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){const i=t(this._findCommand(n)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");const i=(t,i,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const o=this.getOptionValue(n);null!==t&&e.parseArg?t=this._callParseArg(e,t,o,i):null!==t&&e.variadic&&(t=e._collectValue(t,o)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,r)};return this.on("option:"+t,t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;i(t,n,"cli")}),e.envVar&&this.on("optionEnv:"+t,t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;i(t,n,"env")}),this}_optionEx(e,t,n,i,r){if("object"==typeof t&&t instanceof l)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),"function"==typeof i)o.default(r).argParser(i);else if(i instanceof RegExp){const e=i;i=(t,n)=>{const i=e.exec(t);return i?i[0]:n},o.default(r).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{void 0!==n.getOptionValueSource(e)&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){r.versions?.electron&&(t.from="electron");const e=r.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let n;switch(void 0===e&&(e=r.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":r.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){null===this._savedState?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error("Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties");this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(i.existsSync(e))return;throw new Error(`'${e}' does not exist\n - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`)}_executeSubCommand(e,o){o=o.slice();let s=!1;const u=[".js",".ts",".tsx",".mjs",".cjs"];function c(e,t){const r=n.resolve(e,t);if(i.existsSync(r))return r;if(u.includes(n.extname(t)))return;const o=u.find(e=>i.existsSync(`${r}${e}`));return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let l,d=e._executableFile||`${this._name}-${e._name}`,m=this._executableDir||"";if(this._scriptPath){let e;try{e=i.realpathSync(this._scriptPath)}catch{e=this._scriptPath}m=n.resolve(n.dirname(e),m)}if(m){let t=c(m,d);if(!t&&!e._executableFile&&this._scriptPath){const i=n.basename(this._scriptPath,n.extname(this._scriptPath));i!==this._name&&(t=c(m,`${i}-${e._name}`))}d=t||d}if(s=u.includes(n.extname(d)),"win32"!==r.platform?s?(o.unshift(d),o=f(r.execArgv).concat(o),l=t.spawn(r.argv[0],o,{stdio:"inherit"})):l=t.spawn(d,o,{stdio:"inherit"}):(this._checkForMissingExecutable(d,m,e._name),o.unshift(d),o=f(r.execArgv).concat(o),l=t.spawn(r.execPath,o,{stdio:"inherit"})),!l.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(e=>{r.on(e,()=>{!1===l.killed&&null===l.exitCode&&l.kill(e)})})}const p=this._exitCallback;l.on("close",e=>{e=e??1,p?p(new a(e,"commander.executeSubCommandAsync","(close)")):r.exit(e)}),l.on("error",t=>{if("ENOENT"===t.code)this._checkForMissingExecutable(d,m,e._name);else if("EACCES"===t.code)throw new Error(`'${d}' not executable`);if(p){const e=new a(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else r.exit(1)}),this.runningCommand=l}_dispatchSubcommand(e,t,n){const i=this._findCommand(e);let r;return i||this.help({error:!0}),i._prepareForParse(),r=this._chainOrCallSubCommandHook(r,i,"preSubcommand"),r=this._chainOrCall(r,()=>{if(!i._executableHandler)return i._parseCommand(t,n);this._executeSubCommand(i,t.concat(n))}),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let i=t;if(null!==t&&e.parseArg){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,n,r)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach((n,i)=>{let r=n.defaultValue;n.variadic?i<this.args.length?(r=this.args.slice(i),n.parseArg&&(r=r.reduce((t,i)=>e(n,i,t),n.defaultValue))):void 0===r&&(r=[]):i<this.args.length&&(r=this.args[i],n.parseArg&&(r=e(n,r,n.defaultValue))),t[i]=r}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&"function"==typeof e.then?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e;const i=[];return this._getCommandAndAncestors().reverse().filter(e=>void 0!==e._lifeCycleHooks[t]).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{i.push({hookedCommand:e,callback:t})})}),"postAction"===t&&i.reverse(),i.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach(e=>{i=this._chainOrCall(i,()=>e(this,t))}),i}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let n;return i(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(r,e,t)})),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent?.listenerCount(r))i(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}),t=e.filter(e=>e.conflictsWith.length>0);t.forEach(t=>{const n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const t=[],n=[];let i=t;function r(e){return e.length>1&&"-"===e[0]}const o=e=>!!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)&&!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e)));let s=null,a=null,u=0;for(;u<e.length||a;){const c=a??e[u++];if(a=null,"--"===c){i===n&&i.push(c),i.push(...e.slice(u));break}if(!s||r(c)&&!o(c)){if(s=null,r(c)){const t=this._findOption(c);if(t){if(t.required){const n=e[u++];void 0===n&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;u<e.length&&(!r(e[u])||o(e[u]))&&(n=e[u++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(c.length>2&&"-"===c[0]&&"-"!==c[1]){const e=this._findOption(`-${c[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,c.slice(2)):(this.emit(`option:${e.name()}`),a=`-${c.slice(2)}`);continue}}if(/^--[^=]+=/.test(c)){const e=c.indexOf("="),t=this._findOption(c.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,c.slice(e+1));continue}}if(i!==t||!r(c)||0===this.commands.length&&o(c)||(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(c)){t.push(c),n.push(...e.slice(u));break}if(this._getHelpCommand()&&c===this._getHelpCommand().name()){t.push(c,...e.slice(u));break}if(this._defaultCommandName){n.push(c,...e.slice(u));break}}if(this._passThroughOptions){i.push(c,...e.slice(u));break}i.push(c)}else this.emit(`option:${s.name()}`,c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in r.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,r.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new d(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter(n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")})})}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),i=this.options.find(e=>e.negate&&t===e.attributeName()),r=this.options.find(e=>!e.negate&&t===e.attributeName());return i&&(void 0===i.presetArg&&!1===n||void 0!==i.presetArg&&n===i.presetArg)?i:r||e},i=e=>{const t=n(e),i=t.attributeName();return"env"===this.getOptionValueSource(i)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{const e=i.createHelp().visibleOptions(i).filter(e=>e.long).map(e=>e.long);n=n.concat(e),i=i.parent}while(i&&!i._enablePositionalOptions);t=m(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=1===t?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)}),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const t=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map(e=>s(e));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}helpGroup(e){return void 0===e?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return void 0===e?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return void 0===e?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=n.basename(e,n.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});const i=t.formatHelp(this,t);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){const t=!!(e=e||{}).error;let n,i,r;t?(n=e=>this._outputConfiguration.writeErr(e),i=this._outputConfiguration.getErrHasColors(),r=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),i=this._outputConfiguration.getOutHasColors(),r=this._outputConfiguration.getOutHelpWidth());return{error:t,write:e=>(i||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:i,helpWidth:r}}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let r=this.helpInformation({error:n.error});if(t&&(r=t(r),"string"!=typeof r&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(r),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(e=>e.emit("afterAllHelp",i))}helpOption(e,t){return"boolean"==typeof e?(e?(null===this._helpOption&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(r.exitCode??0);0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const i=`${e}Help`;return this.on(i,e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function f(e){return e.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n,i="127.0.0.1",r="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],i=n[3],r=n[4]),t&&"0"!==r?`${t}=${i}:${parseInt(r)+1}`:e})}function h(){return!r.env.NO_COLOR&&"0"!==r.env.FORCE_COLOR&&"false"!==r.env.FORCE_COLOR&&(!(!r.env.FORCE_COLOR&&void 0===r.env.CLICOLOR_FORCE)||void 0)}return NO.Command=p,NO.useColor=h,NO}var WO=function(){if(BO)return SO;BO=1;const{Argument:e}=OO(),{Command:t}=GO(),{CommanderError:n,InvalidArgumentError:i}=EO(),{Help:r}=jO(),{Option:o}=LO();return SO.program=new t,SO.createCommand=e=>new t(e),SO.createOption=(e,t)=>new o(e,t),SO.createArgument=(t,n)=>new e(t,n),SO.Command=t,SO.Option=o,SO.Argument=e,SO.Help=r,SO.CommanderError=n,SO.InvalidArgumentError=i,SO.InvalidOptionArgumentError=i,SO}(),KO=J(WO);const{program:qO,createCommand:HO,createArgument:QO,createOption:YO,CommanderError:XO,InvalidArgumentError:eN,InvalidOptionArgumentError:tN,Command:nN,Argument:iN,Option:rN,Help:oN}=KO;async function sN(e){let t=m.parse(e).root;if(e===t)throw new Error(`Unsafe extraction directory: ${e}`);for(const n of e.slice(t.length).split(m.sep)){t=m.join(t,n);try{const e=await i(t);if(e.isSymbolicLink()||!e.isDirectory())throw new Error(`Extraction directory must not traverse symlinks or files: ${t}`)}catch(n){if(n instanceof Error&&"code"in n&&"ENOENT"===n.code){const n=m.dirname(t);return m.join(await r(n),m.relative(n,e))}throw n}}return r(e)}async function aN(e){await sN(e),await a(e,{recursive:!0}),await sN(e)}async function uN(e,t){await aN(m.dirname(e));const n=await u(e,C.O_WRONLY|C.O_CREAT|C.O_NOFOLLOW|C.O_NONBLOCK);try{const i=await n.stat();if(!i.isFile()||1!==i.nlink)throw new Error(`Extraction output must be a regular file with one link: ${e}`);await n.truncate(0),await n.writeFile(t)}finally{await n.close()}}async function cN(e){try{const t=await i(e);if(!t.isFile()||1!==t.nlink)throw new Error(`Extraction output must be a regular file with one link: ${e}`)}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return;throw e}}function lN(e,t="system"){return{seedsFolder:m.join(e.SEEDER_SEEDS_DIR,t),assetsFolder:e.SEEDER_ASSETS_DIR}}var dN=Object.defineProperty,mN=(e,t,n)=>((e,t,n)=>t in e?dN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);const pN="bulk-operation";class fN extends Error{constructor(e){super(`Process lock already exists: ${e}`),mN(this,"lockName"),this.name="ProcessLockAlreadyExistsError",this.lockName=e}}const hN=e=>e instanceof Error&&"code"in e,gN=(t={})=>{const{lockName:i=pN}=t,r=yN(i),o=n();vN(t);try{U(r,o,{flag:"wx"})}catch(e){if(hN(e)&&"EEXIST"===e.code)throw new fN(i);throw e}let s=!1;const a=()=>{if(s)return!1;s=!0,e.off("exit",u);try{return A(r,"utf8")===o&&(R(r,{force:!0}),!0)}catch(e){if(hN(e)&&"ENOENT"===e.code)return!1;throw e}},u=()=>{try{a()}catch(e){console.error("Failed to release process lock on exit",e)}};return e.once("exit",u),{path:r,release:a}},vN=(e={})=>{const{lockName:t=pN,maxLockAge:n=3e5}=e,i=yN(t);if(!P(i))return!1;return Date.now()-j(i).mtimeMs>n&&(R(i,{recursive:!0,force:!0}),!0)},yN=e=>p(M(),`directus-lock-${e}.flag`);function _N(e,t){const n=t.collections?.[e],i=n?.primary,r=i?n?.fields?.[i]:void 0;if("string"!=typeof i||!i||!r||r.alias)throw new Error(`Collection "${e}" requires a scalar primary key in the live schema`);try{DE(r.type)}catch(t){throw new Error(`Unsupported primary key "${e}.${i}": ${r.type}`,{cause:t})}return i}function bN(e,t){const n=_N(e,t);return DE(t.collections[e]?.fields[n]?.type)}function $N(e,t,n){const i=_N(e,n),r=bN(e,n),o=iI({}),s=new Set;for(const[n,a]of t.entries()){const t=o.safeParse(a),u=r.safeParse(t.success?t.data[i]:void 0);if(!u.success)throw new Error(`Invalid seed primary key "${e}.${i}" at row ${n+1}`,{cause:u.error});if(s.has(u.data))throw new Error(`Duplicate seed primary key "${e}.${i}" at row ${n+1}`);s.add(u.data)}}async function kN(e,t,n){let i;try{i=await async function(e){await sN(m.resolve(m.dirname(e)));const t=await u(e,C.O_RDONLY|C.O_NOFOLLOW|C.O_NONBLOCK);try{const n=await t.stat();if(!n.isFile()||1!==n.nlink)throw new Error(`Manifest input must be a regular file with one link: ${e}`);return await t.readFile("utf8")}finally{await t.close()}}(e)}catch(e){if(n&&e instanceof Error&&"code"in e&&"ENOENT"===e.code)return[];throw e}const r=JSON.parse(i);return YS(t).parse(r)}async function wN(e,t,n){const i=m.join(t,`${e}.managed-ids.json`);try{return await kN(i,bN(e,n),!1)}catch(t){throw new Error(`Failed to resolve manifest management for collection "${e}" from "${i}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function SN(e,t,n){const i=_N(e,n),r=bN(e,n),o=iI({});return t.map((t,n)=>{const s=o.safeParse(t);if(!s.success)throw new Error(`Invalid manifest-managed seed ID for collection "${e}" at row ${n+1}: ${s.error.message}`);const a=r.safeParse(s.data[i]);if(!a.success)throw new Error(`Invalid manifest-managed seed ID for collection "${e}" at row ${n+1}: ${a.error.message}`);return a.data})}async function IN(e,t,i,r,o){const a=m.join(i,`${e}.managed-ids.json`);try{const i=SN(e,t,r),l=await kN(a,bN(e,r),!0),d=[...new Set([...l,...i])].sort((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e<t?-1:e>t?1:0);await async function(e,t){const i=m.resolve(m.dirname(e));await aN(i),await cN(e);const r=m.join(i,`.${m.basename(e)}.${n()}.tmp`),o=await u(r,C.O_WRONLY|C.O_CREAT|C.O_EXCL|C.O_NOFOLLOW);try{try{await o.writeFile(t)}finally{await o.close()}await sN(i),await cN(e),await c(r,e)}catch(e){try{await s(r)}catch(t){if(!(t instanceof Error&&"code"in t&&"ENOENT"===t.code))throw new AggregateError([e,t],`Failed to clean manifest temporary file: ${r}`)}throw e}}(a,`${JSON.stringify(d,null,o)}\n`)}catch(t){throw new Error(`Failed to update manifest management for collection "${e}" at "${a}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function xN(e,t=0){const n=t>0?" ".repeat(t):"",i=void 0!==e.duration?`${e.duration.toFixed(2)} ms`:"in progress";return[`${n}${e.operation}: ${i}`,...e.children.map(e=>xN(e,t+1))].join("\n")}function EN(){const e={operations:[],currentOperation:null,operationStack:[]};return{startOperation(t){const n={operation:t,startTime:F.now(),children:[]};return e.currentOperation?(e.operationStack.push(e.currentOperation),e.currentOperation.children.push(n)):e.operations.push(n),e.currentOperation=n,n},endOperation(){if(!e.currentOperation)throw new Error("No operation to end");const t=F.now();e.currentOperation.endTime=t,e.currentOperation.duration=t-e.currentOperation.startTime;const n=e.currentOperation;return e.currentOperation=e.operationStack.length>0?e.operationStack.pop()??null:null,n},getOperations:()=>e.operations,getCurrentOperation:()=>e.currentOperation,async track(e,t){this.startOperation(e);try{return await t()}finally{this.endOperation()}},trackSync(e,t){this.startOperation(e);try{return t()}finally{this.endOperation()}},formatPerformanceData(t=0){const n=[];for(const i of e.operations)n.push(xN(i,t));return n.join("\n")},outputFormatPerformanceData(e){if(!e)return;e.info("🚀 Performance data 🚀");const t=this.formatPerformanceData().split("\n");for(const[n,i]of t.entries())0===n?e.info(i):e.debug(i)}}}const ON=YS(JS());function NN(e){if(null==e)throw new TypeError("Cannot read properties of a null or undefined seed item");return $l(e)?e:Object.fromEntries(Object.entries(e))}function zN(e,t){const n=NN(e)[t];if(null!=n){if("string"!=typeof n)throw new TypeError(`${t}.toLowerCase is not a function`);return n}}const TN=iI({id:ww(),filename_disk:ww().min(1).refine(e=>"."!==e&&".."!==e&&!/[\\/\0]/u.test(e),{error:"Asset filename_disk must be a single filename inside the assets directory"})}),DN=async(e,t,n)=>{const{logger:i,services:r,getSchema:o,database:s}=n,a=await o(),u=new r.AssetsService({schema:a,knex:s}),c=m.join(t,e.filename_disk);i.trace(`📥 Downloading file: ${e.filename_disk}`);try{const{stream:t}=await u.getAsset(e.id),n=await(async e=>new Promise((t,n)=>{const i=[];e.on("data",e=>i.push(e)),e.on("end",()=>t(Buffer.concat(i))),e.on("error",e=>n(e))}))(t);return await uN(c,n),i.trace(`✅ Downloaded file: ${e.filename_disk}`),!0}catch(t){const n=t instanceof Error?t.message:"Unknown error";return i.error(`❌ Failed to download file ${e.filename_disk}: ${n}`),i.error(t),!1}},AN=[{collection:"directus_folders",field:"type",legacyValue:"files"},{collection:"directus_flows",field:"folder",legacyValue:null}];function CN(e,t,n){const i=e.fields??["*"];return n?.includes(e.collection)?i:i.filter(n=>!AN.some(i=>i.collection===e.collection&&i.field===n&&!t.collections[i.collection]?.fields[n]))}function UN(e,t){return{collectionName:e,getData:t}}const PN=Ox(),jN=/\[dev]/i,RN=["developer","user"],ZN=["directus_extensions"],LN=["directus_operations","directus_policies","directus_users","directus_flows"],MN=e=>LN.includes(e),FN=e=>{const t=new Map,n=(e=>{const t=new Map;return e.forEach(e=>{if(!NN(e).id)return;const n=new Set,i=NN(e).reject;i&&"string"==typeof i&&n.add(i);const r=NN(e).resolve;r&&"string"==typeof r&&n.add(r),t.set(NN(e).id,n)}),t})(e),i=new Set,r=new Set,o=[];e.forEach(e=>{NN(e).id&&t.set(NN(e).id,e)});const s=e=>{if(!NN(e).id)return;if(i.has(NN(e).id))return;if(r.has(NN(e).id))return void console.warn(`Circular dependency detected for operation ${PN.parse(NN(e).id)}`);r.add(NN(e).id);const a=n.get(NN(e).id)??new Set;0===a.size?o.unshift(e):(a.forEach(e=>{const n=t.get(e);n&&s(n)}),o.push(e)),r.delete(NN(e).id),i.add(NN(e).id)};return e.forEach(e=>s(e)),o},BN=(e,t)=>{const n=e.find(e=>e.collection===t);return n?.data??[]},JN=(e,t)=>{const n=BN(e,"directus_policies");return UN("directus_policies",()=>n.map(e=>((e,t)=>({...NN(e),enforce_tfa:!0===NN(e).enforce_tfa||"production"===t.DEPLOYMENT_ENV&&(!0===NN(e).admin_access||!0===NN(e).app_access)}))(e,t)))},VN=(e,t)=>{const n=BN(e,"directus_users");return UN("directus_users",()=>n.map(e=>(e=>{const t="super user"===zN(e,"title")?.toLowerCase(),n="admin"===zN(e,"first_name")?.toLowerCase()&&RN.includes(zN(e,"last_name")?.toLowerCase()??"");return t||n})(e)?((e,t)=>({...NN(e),email:t.DEFAULT_EMAIL,password:t.DEFAULT_PASSWORD,status:"development"===t.DEPLOYMENT_ENV?"active":"suspended"}))(e,t):e))},GN=(e,t)=>!!e&&("development"!==t.DEPLOYMENT_ENV&&jN.test(PN.parse(e))),WN=(e,t)=>{const n=[];return e.filter(e=>MN(e.collection)).forEach(i=>{switch(i.collection){case"directus_flows":{const i=BN(e,"directus_flows"),r=i.filter(e=>!GN(NN(e).name,t)),o=i.length-r.length;o>0&&console.log(`Filtered ${o} development-only flow(s) for ${t.DEPLOYMENT_ENV??"unknown"} environment`),n.push(UN("directus_flows",()=>r));break}case"directus_operations":{const i=BN(e,"directus_operations"),r=BN(e,"directus_flows"),o=new Set(r.filter(e=>GN(NN(e).name,t)).map(e=>NN(e).id).filter(e=>"string"==typeof e)),s=i.filter(e=>!o.has(NN(e).flow)),a=i.length-s.length;a>0&&console.log(`Filtered ${a} operation(s) belonging to development-only flows`);const[u,c]=(e=>{const t=new Map;return[e.map(e=>{if(!NN(e).id)return e;const n={};if("resolve"in NN(e)){const t=NN(e).resolve;"string"==typeof t?n.resolve=t:null===NN(e).resolve&&(n.resolve=null)}if("reject"in NN(e)){const t=NN(e).reject;"string"==typeof t?n.reject=t:null===NN(e).reject&&(n.reject=null)}return("string"==typeof n.resolve||"string"==typeof n.reject)&&t.set(NN(e).id,n),{...NN(e),resolve:null,reject:null}}),t]})(s);if(n.push(UN("directus_operations",()=>u)),c.size>0){const e=(e=>{const t=[];return e.forEach((e,n)=>{t.push({id:n,resolve:e.resolve??null,reject:e.reject??null,__isUpdateOnly:!0})}),t})(c);n.push(UN("directus_operations",()=>e))}break}case"directus_policies":n.push(JN(e,t));break;case"directus_users":n.push(VN(e,t))}}),n},KN=e=>e.filter(e=>!(e=>ZN.includes(e))(e.collection)&&!MN(e.collection)).map(e=>UN(e.collection,()=>e.data)),qN=(e,t,n)=>{const i=[...WN(e,t),...KN(e)];return i.filter(e=>n.includes(e.collectionName)).sort((e,t)=>lO.indexOf(e.collectionName)-lO.indexOf(t.collectionName))},HN=(e,t)=>{const n=((e,t)=>{const n={directus_users:["password"],directus_settings:["license_key","license_token"]};return n[e]?t.map(t=>{const i={...NN(t)};for(const t of n[e]??[])delete i[t];return i}):t})(e,t);return"directus_operations"===e&&Array.isArray(n)&&n.length>0?FN(n):n},QN="-".repeat(60),YN=e=>{if(!e.context)throw new Error("Context is required for extraction operations");if(!e.folders?.seeds)throw new Error("Seeds folder path is required");if(!e.folders?.assets)throw new Error("Assets folder path is required")},XN=(e,t,n=lO)=>{let i=[...n].filter(e=>!dO.includes(e));return e&&e.length>0&&(i=i.filter(t=>e.includes(t))),t&&t.length>0&&(i=i.filter(e=>!t.includes(e))),i},ez=e=>{e.info(QN)},tz=(e,t="id")=>{const{filter:n,management:i}=e;return"id-range"!==i?.type?n:{_and:[...n?[n]:[],...BE(i,t)]}};function nz(e,t){const n=_N(e.collection,t),i=e.fields??["*"];if(!i.includes("*")&&!i.includes(n))throw new Error(`Core extraction fields for collection "${e.collection}" must include primary key "${n}" or "*"`);if("id-range"===e.management?.type&&!["integer","bigInteger"].includes(t.collections[e.collection]?.fields[n]?.type??""))throw new Error(`id-range management for collection "${e.collection}" requires a numeric integer primary key`);return n}const iz=async(e,t,n,i,r,o)=>{const{logger:s,services:a,getSchema:u,database:c}=n,l=e.collection;try{s.info(`📦 Extracting collection: ${l}`);const n=await u(),d="core"===o?nz(e,n):"id",p=new a.ItemsService(l,{schema:n,knex:c}),f={limit:-1,fields:"system"===o?CN(e,n,r):e.fields??["*"],filter:tz(e,d),sort:e.sort??null,deep:e.deep??null};let h=ON.parse(await p.readByQuery(f));"system"===o?h=HN(l,h):$N(l,h,n);const g=((e,t)=>m.join(e,`${t}.json`))(t,l);return await uN(g,`${JSON.stringify(h,null,i)}\n`),"manifest"===e.management?.type&&await IN(l,h,t,n,i),s.info(`✅ Extracted ${h.length} items from ${l}`),s.trace(`📄 File written to: ${g}`),!0}catch(e){const t=e instanceof Error?e.message:"Unknown error";return s.error(`❌ Failed to extract collection ${l}: ${t}`),s.error(e),!1}};async function rz(e){YN(e);const t=bO(e);if("core"===e.dataScope){const n=XN(e.includeCollections,e.excludeCollections,t.map(({collection:e})=>e)),i=await e.context.getSchema();for(const e of t.filter(({collection:e})=>n.includes(e)))nz(e,i)}const n=e.jsonOnly||"core"===e.dataScope;if(!n){const t=await sN(m.resolve(e.folders.seeds,"..","system"===e.dataScope?"core":"system")),n=await sN(m.resolve(e.folders.assets));if(t===n||t.startsWith(`${n}${m.sep}`))throw new Error("Extraction directories conflict: assets must not equal or contain the other seed scope")}let i;try{i=await async function(e,t,n){await sN(m.dirname(m.resolve(e.seeds)));const i=await sN(m.resolve(e.seeds)),r=await sN(m.resolve(e.assets));if(i===r||i.startsWith(`${r}${m.sep}`))throw new Error("Extraction directories conflict: assets must not equal or contain seeds");if(await aN(i),t||await aN(r),!n)for(const e of t?[i]:[i,r]){await sN(e);for(const t of await o(e,{withFileTypes:!0}))t.isFile()&&(e===r||t.name.endsWith(".json")&&!t.name.endsWith(".managed-ids.json"))&&await s(m.join(e,t.name))}return{seeds:i,assets:r}}(e.folders,n,e.skipClean)}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to prepare extraction output directories: ${t}`,{cause:e})}const r={...e,folders:i};await(async e=>{YN(e);const{logger:t}=e.context,{includeCollections:n,excludeCollections:i,folders:r}=e,o=bO(e),s=XN(n,i,o.map(({collection:e})=>e));t.info(`📋 Extracting ${s.length} collections: ${s.join(", ")}`),t.trace(`📁 Seeds folder path: ${r.seeds}`);try{let n=0,i=0;for(const a of o.filter(({collection:e})=>s.includes(e))){const o=a.collection,s=EN();await s.track(`Extract ${o}`,async()=>await iz(a,r.seeds,e.context,e.jsonIndent,e.systemFieldOverrides,e.dataScope))?n++:i++,s.outputFormatPerformanceData(t),ez(t)}if(t.info(`🎯 Collection extraction complete: ${n} succeeded, ${i} failed`),i>0)throw new Error(`Failed to extract ${i} collection(s)`)}catch(e){const n=e instanceof Error?e.message:"Unknown error";throw t.error(`❌ Failed to extract seeds: ${n}`),t.error(e),e}})(r),n||await(async(e,t)=>{const{logger:n,getSchema:i,services:r,database:o}=e;n.info("-".repeat(60)),n.info("📁 Extracting asset files...");const s=EN();try{await s.track("Asset extraction",async()=>{const s=await i(),a=new r.FilesService({schema:s,knex:o});n.trace("📋 Fetching directus_files data");const u=ON.parse(await a.readByQuery({limit:-1,fields:["*"]}));if(0===u.length)return void n.info("📋 No files found in directus_files collection");n.info(`📋 Found ${u.length} files in directus_files, starting asset extraction...`);const c={success:[],failed:[]};for(const n of u){const i=TN.parse(n);await DN(i,t,e)?c.success.push(i.filename_disk):c.failed.push(i.filename_disk)}if(n.info(`📋 Asset extraction complete: ${c.success.length} succeeded, ${c.failed.length} failed`),c.failed.length>0)throw n.warn("⚠️ Failed files:"),c.failed.forEach(e=>n.warn(` - ${e}`)),new Error(`Failed to extract ${c.failed.length} asset(s)`)})}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw n.error(`❌ Failed to extract assets: ${t}`),n.error(e),e}s.outputFormatPerformanceData(n),n.info("-".repeat(60))})(r.context,r.folders.assets)}function oz(){return B.createInterface({input:e.stdin,output:e.stdout})}function sz(t){return t||Boolean(e.env.CI)||Boolean(e.env.CONTINUOUS_INTEGRATION)||Boolean(e.env.BUILD_NUMBER)||Boolean(e.env.GITHUB_ACTIONS)||!(e.stdin.isTTY&&e.stdout.isTTY)}function az(e){return{getItems:()=>Promise.resolve([]),createItems:()=>Promise.resolve([]),upsertItems:()=>Promise.resolve([]),deleteItems:()=>Promise.resolve([]),...e}}const uz=iI({filename_disk:ww().min(1)});async function cz(e,t,n,i){const r=NN(n);if(!r.filename_disk)throw new Error("filename_disk is required for file import");const o=uz.parse(r),{assetsFolder:s}=lN(i),a=m.join(m.resolve(s),o.filename_disk);await l(a);const u=Z(a);return e.uploadOne(u,{...r,storage:r.storage??t},r.id)}async function lz(e){const t=await e.getSchema(),n=new e.services.FilesService({schema:t}),[i]=e.env.STORAGE_LOCATIONS;if(!i)throw new Error("STORAGE_LOCATIONS must contain at least one location");const r=async t=>{const r=[];for(const o of t)r.push(await cz(n,i,o,e.env));return r};return az({getItems:e=>n.readByQuery(e??{}),createItems:r,upsertItems:r,deleteItems:async e=>{const t=[];for(const i of e)t.push(await n.deleteOne(i));return t}})}async function dz(e,t){const n=await t.getSchema(),i=new t.services.ItemsService(e,{schema:n}),r=i;return az({getItems:e=>i.readByQuery(e??{}),createItems:e=>r.createMany(e),upsertItems:e=>r.upsertMany(e),deleteItems:e=>i.deleteMany(e)})}const mz=YS(oI([ww(),$S()]));async function pz(e,t,n){const i=function(e,t){return{collectionName:e,created:0,updated:0,deleted:0,skipped:0,total:t,duration:0}}(e,t.length),r=performance.now();try{await n(i)}catch(e){i.error=e instanceof Error?e.message:"Unknown error"}const o=performance.now();return i.duration=o-r,i}async function fz(e,t,n,i,r=!1,o="id",s=!0){const a=e.map(e=>NN(e)[o]).filter(e=>null!=e);if(0===a.length){const n=await t.createItems(e);return void(i.created+=n.length)}if(r){const r=await n.track("Find existing items for counting",()=>t.getItems({filter:{[o]:{_in:a}},fields:[o],limit:-1})),s=new Set(r.map(e=>"object"==typeof e&&null!==e&&o in e?NN(e)[o]:e));await n.track(`Upsert ${e.length} items`,()=>t.upsertItems(e));const u=e.filter(e=>void 0!==NN(e)[o]&&!s.has(NN(e)[o])).length,c=e.length-u;return i.created+=u,void(i.updated+=c)}const u=await n.track("Find existing items",()=>t.getItems({filter:{[o]:{_in:a}},fields:[o],limit:-1})),c=new Set(u.map(e=>"object"==typeof e&&null!==e&&o in e?NN(e)[o]:e)),l=e.filter(e=>void 0!==NN(e)[o]&&!c.has(NN(e)[o])),d=[],m=[];for(const e of l){const t=NN(e);if(s&&"__isUpdateOnly"in t&&!0===t.__isUpdateOnly){const{__isUpdateOnly:e,...n}=t;m.push(n)}else d.push(e)}if(d.length>0){const e=await n.track(`Create ${d.length} items`,()=>t.createItems(d));i.created+=e.length}if(m.length>0){const e=await n.track(`Update ${m.length} items (pass 2)`,()=>t.upsertItems(m));i.updated+=e.length}i.skipped+=e.length-l.length}function hz(e,t){const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n}function gz(e,t=50){if(e===EE.INSERT_MISSING)return function(e=50){return{seedCollection:async(t,n,i,r,o,s="id",a=!0)=>{const u=n;return pz(t,n,async n=>{const o=hz(u,e);for(const e of o)await r.track(`Process batch of ${e.length} items for ${t}`,async()=>{await fz(e,i,r,n,!1,s,a)})})}}}(t);if(e===EE.INSERT_UPDATE)return function(e=50){return{seedCollection:async(t,n,i,r,o,s="id",a=!0)=>{const u=n;return pz(t,n,async n=>{const o=hz(u,e);for(const e of o)await r.track(`Process batch of ${e.length} items for ${t}`,async()=>{await fz(e,i,r,n,!0,s,a)})})}}}(t);if(e===EE.FULL_IDEMPOTENT)return function(e=50){return{seedCollection:async(t,n,i,r,o,s="id",a=!0)=>{const u=n;return pz(t,n,async c=>{const l=FE(t,n,o,s,a);if(l&&"id-range"!==l.type&&0===l.ids.length)return;const d=new Set(u.map(e=>NN(e)[s]).filter(e=>null!=e)),m=hz(u,e);for(const e of m)await r.track(`Process batch of ${e.length} items for ${t}`,async()=>{await fz(e,i,r,c,!0,s,a)});await r.track(" Delete extra items",async()=>{const t=(await i.getItems({fields:[s],filter:void 0===l?{[s]:{_nin:[...d]}}:{_and:[...JE(l,s),...0===d.size?[]:[{[s]:{_nin:[...d]}}]]},limit:-1})).map(e=>"object"==typeof e&&null!==e&&s in e?NN(e)[s]:e);if(t.length>0){const n=hz(t,e);for(const e of n){const t=await r.track(`Delete ${e.length} items`,()=>i.deleteItems(mz.parse(e)));c.deleted+=t.length}}})})}}}(t);throw new Error(`Unknown operation mode: ${String(e)}`)}async function vz(e,t,n,i){if("id-range"===t.type)return t;if("manifest"===t.type)return{...t,ids:await wN(e,n,i)};const r=m.join(n,`${t.collection}.json`);try{const n=i.collections[e],o=i.collections[t.collection];_N(e,i);const s=_N(t.collection,i),a=n?.fields[t.field],u=i.relations.find(n=>n.collection===e&&n.field===t.field),c=o?.fields[s]?.type,l=a?.type===c||["uuid","string"].includes(a?.type??"")&&["uuid","string"].includes(c??"")||["integer","bigInteger"].includes(a?.type??"")&&["integer","bigInteger"].includes(c??"");if(!a||a.alias||!l||u?.related_collection!==t.collection||!u.schema||u.schema.foreign_key_table!==t.collection||u.schema.foreign_key_column!==s||u.schema.table!==e||u.schema.column!==t.field)throw new Error(`Management field "${e}.${t.field}" must be a direct scalar relation to "${t.collection}.${s}" with scalar primary keys`);const m=DE(a.type),p=bN(t.collection,i),f=JSON.parse(await d(r,"utf8")),h=ON.parse(f).map((e,t)=>{try{const t=iI({}).parse(e),n=p.parse(t[s]);return"integer"===c&&"bigInteger"===a.type?m.parse(String(n)):"bigInteger"===c&&"integer"===a.type?m.parse(Number(n)):m.parse(n)}catch(e){throw new Error(`Invalid related seed ID at row ${t+1}`,{cause:e})}});if(new Set(h).size!==h.length)throw new Error("Duplicate related seed IDs");return{...t,ids:h}}catch(t){throw new Error(`Failed to resolve relation management for collection "${e}" from "${r}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function yz(e,t,n){const i=_N(e,n),r=bN(e,n);for(const[n,o]of t.entries())try{const e=iI({}).parse(o);r.parse(e[i])}catch(t){throw new Error(`Invalid relation-managed seed ID for collection "${e}" at row ${n+1}`,{cause:t})}}function _z(e,t){const n=e.get(t);if(void 0===n)throw new Error(`Missing resolved primary key for collection "${t}"`);return n}async function bz(e,t,n,i=!1){const{logger:r,env:o}=e,s=EN(),a=[];r.info(`Starting ${t.dataScope} data seeding`);const u=bO(t);if(null===n||0===n.length){const{seedsFolder:e}=lN(o,t.dataScope);return r.warn(`No selected ${t.dataScope} seed files found in "${e}"; skipping seeding`),null}const c=function(e){return{collections:e,getSeedData(){const t=new Map;for(const n of e){const e=n.collectionName,i=n.getData(),r=t.get(e);t.set(e,r?[...r,...i]:i)}return Object.fromEntries(t)}}}([...n]);return await s.track(`${t.dataScope} data seeding`,async()=>{try{let n=await s.track("Get seed data",()=>Promise.resolve(c.getSeedData()));return"system"===t.dataScope&&("directus_folders"in n||"directus_flows"in n)&&(n=function(e,t){const n={...e};for(const{collection:i,field:r,legacyValue:o}of AN){if(t.collections[i]?.fields[r])continue;const s=e[i];s&&(n[i]=s.map((e,t)=>{if(!$l(e)||(n=e,s=r,!Object.hasOwn(n,s)))return e;var n,s;if(e[r]!==o)throw new Error(`Cannot import ${i}.json processed row ${t+1}: target schema lacks ${i}.${r}; this value cannot be represented safely. Use a Directus version with Flow-folder support.`);const a={...e};return delete a[r],a}))}return n}(n,await e.getSchema())),await async function(e,t,n,i,r,o,s="",a=!1){const{logger:u}=n,c=zE(Object.keys(e),t),l=i.map(({collection:e})=>e),d=new Map,m=new Map,p=t.dataScope===OE,f=p?void 0:await n.getSchema();if(!p&&!f)throw new Error("Core import requires a live collection schema");for(const r of c){const o=i.find(e=>e.collection===r);if(!o)throw new Error(`Missing configuration for collection "${r}"`);m.set(r,f?_N(r,f):"id"),f&&$N(r,e[r]??[],f);const s=o.operationMode;if(a&&s!==EE.FULL_IDEMPOTENT)throw new Error(`--full-reset requires full-idempotent mode for collection "${r}"`);if(s!==EE.FULL_IDEMPOTENT)continue;if(!t.enableFullIdempotent)throw new Error("full-idempotent mode is disabled for safety. Set SEEDER_ENABLE_FULL_IDEMPOTENT=true to enable this destructive operation.");if(a)continue;if(f&&"id-range"===o.management?.type){const e=_N(r,f),t=f.collections[r]?.fields[e]?.type;if("integer"!==t&&"bigInteger"!==t)throw new Error(`id-range management for collection "${r}" requires a numeric primary key`)}let u;const c=e[r]??[];if(f||"id-range"!==o.management?.type||$N(r,c,await n.getSchema()),"relation"===o.management?.type||"manifest"===o.management?.type){const e=f??await n.getSchema();m.set(r,_N(r,e)),u=await vz(r,o.management,lN(n.env,t.dataScope).seedsFolder,e),"manifest"===o.management.type?SN(r,c,e):yz(r,c,e)}else u=o.management;u=FE(r,c,u,_z(m,r),p),u&&d.set(r,u)}for(const t of c){const i=d.get(t),r=e[t]??[];if("relation"!==i?.type||0===r.length)continue;const o=_z(m,t),s=await dz(t,n),a=r.map(e=>NN(e)[o]);FE(t,await s.getItems({fields:[o,i.field],filter:{[o]:{_in:a}},limit:-1}),i,o,p)}t.includeCollections&&t.includeCollections.length>0&&u.info(`Including collections: ${t.includeCollections.join(", ")}`),t.excludeCollections&&t.excludeCollections.length>0&&u.info(`Excluding collections: ${t.excludeCollections.join(", ")}`),c.sort((e,t)=>{const n=l.indexOf(e),i=l.indexOf(t);return-1===n&&-1===i?0:-1===n?1:-1===i?-1:n-i});const h=s?`${s} `:"";u.info(`Seeding ${c.length} ${h}collections: ${c.join(", ")}`);for(const s of c){const a=e[s]??[],c=i.find(e=>e.collection===s);if(!c)throw new Error(`Missing configuration for collection "${s}"`);const l=gz(c.operationMode,t.batchSize);let f;u.debug(`Seeding collection: ${s} (${a.length} items)`);try{const e="directus_files"===s?await lz(n):await dz(s,n);f=await l.seedCollection(s,a,e,r,d.get(s),_z(m,s),p)}catch(e){f={collectionName:s,created:0,updated:0,deleted:0,skipped:0,total:a.length,duration:0,error:e instanceof Error?e.message:"Unknown error"}}if(o.push(f),void 0!==f.error){if(u.error(`Error seeding collection ${s}: ${f.error}`),!t.continueOnError)break}else u.info(`Seeded ${s}: ${f.created} created, ${f.updated} updated, ${f.deleted} deleted, ${f.skipped} skipped, ${f.duration.toFixed(2)} ms`)}return o}(n,t,e,u,s,a,t.dataScope,i),a}catch(e){const n=e instanceof Error?e.message:"Unknown error";throw r.error(`Error seeding ${t.dataScope} data: ${n}`),e}}),s.outputFormatPerformanceData(r),a}const $z=ON.superRefine((e,t)=>{for(const[n,i]of e.entries())null!==i&&"object"==typeof i&&"password"in i&&"string"==typeof i.password&&/^\*+$/.test(i.password)&&t.addIssue({code:"custom",path:[n,"password"],message:"Masked passwords are not allowed; omit password to preserve it or provide an explicit password"})}),kz=(e,t)=>{const n=JSON.parse(t);if(i=n,!ON.safeParse(i).success)throw new Error(`Expected a JSON array for collection "${e}"`);var i;return"directus_users"===e&&$z.parse(n),n},wz=async(e,t,n=lO)=>{try{if(!(await l(e)).isDirectory())throw new Error(`Seed path is not a directory: "${e}"`)}catch(t){if(t instanceof Error&&"code"in t&&"ENOENT"===t.code)throw new Error(`Seed directory does not exist: "${e}"`,{cause:t});const n=t instanceof Error?t.message:"Unknown directory error";throw new Error(`Failed to inspect seed directory "${e}": ${n}`,{cause:t})}const i=[];let r=!1;for(const o of n){const n=m.join(e,`${o}.json`),s=t.includes(o);try{const e=await d(n,"utf-8");if(r=!0,!s)continue;const t=kz(o,e);i.push({collection:o,data:t})}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)continue;if(!s){r=!0;continue}const t=e instanceof Error?e.message:"Unknown file error";throw new Error(`Failed to load seed file "${n}" for collection "${o}": ${t}`,{cause:e})}}return r?i:null},Sz=(t,n,i=OE)=>{const{logger:r,env:o,services:s,getSchema:a}=n;t.command(i).description(`Seed Directus with configured ${i} data`).option("-m, --mode <mode>","Operation mode: insert-missing, insert-update, full-idempotent").option("-i, --include <collections...>","Space-separated collection names to include").option("-e, --exclude <collections...>","Space-separated collection names to exclude").option("--full-reset","Synchronize entire selected collections, ignoring management boundaries (requires full-idempotent)").option("-f, --force","Skip confirmation prompts for destructive operations").option("-y, --yes","Skip confirmation prompts for destructive operations (alias for --force)").action(async t=>{const u=tI({mode:wI(EE).optional(),include:YS(ww()).optional(),exclude:YS(ww()).optional(),fullReset:NS().optional(),force:NS().optional(),yes:NS().optional()}).parse(t);let c,l=0;try{c=gN(),r.info(`🌱 Seeding Directus with ${i} data using Directus Seeder...`);const t=$O(o,{operationMode:u.mode,dataScope:i,includeCollections:u.include,excludeCollections:u.exclude}),d=bO(t),m=zE(d.map(({collection:e})=>e),t),p=await(async(e,t=lO,n="system")=>{try{const{seedsFolder:i}=lN(e,n);if("core"===n){const e=await wz(i,t,t);return e?.map(({collection:e,data:t})=>UN(e,()=>t))??null}const r=((e,t)=>e.includes("directus_operations")&&"development"!==t.DEPLOYMENT_ENV?[...e,"directus_flows"]:e)(t,e),o=await wz(i,r);return null===o?null:qN(o,e,t)}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw console.error(`Failed to create data providers: ${t}`),new Error(`Data provider creation failed: ${t}`)}})(o,m,i),f=d.filter(({collection:e})=>p?.some(t=>t.collectionName===e)),h=f.map(e=>e.operationMode);if(u.fullReset){const e=f.find(e=>e.operationMode!==EE.FULL_IDEMPOTENT);if(e)throw new Error(`--full-reset requires full-idempotent mode for collection "${e.collection}". Use --mode full-idempotent to override collection modes.`)}const g=h.includes(EE.FULL_IDEMPOTENT);if(g&&!t.enableFullIdempotent)return r.error("full-idempotent mode is disabled for safety. Set SEEDER_ENABLE_FULL_IDEMPOTENT=true to enable this destructive operation."),void(l=1);const v=(u.force??!1)||(u.yes??!1);if(!sz(v))if(!g&&h.includes(EE.INSERT_UPDATE)){const t=await async function(t,n=!1,i){const r=oz();return new Promise(o=>{const s=n?"(Y/n)":"(y/N)";r.question(`${t} ${s}: `,e=>{if(r.close(),""===e.trim())return o(n);const t=e.toLowerCase().trim();return o("y"===t||"yes"===t)}),r.once("SIGINT",()=>{e.stdout.write("\n"),i?i.info("Operation cancelled by user"):e.stdout.write("Operation cancelled by user\n"),r.close(),e.exit(0)})})}("⚠️ WARNING: insert-update mode will OVERWRITE existing records\nThis will update existing data to match your seed files.\nAny manual changes to seeded records will be lost.\nContinue?",!1,r);if(!t)return r.info("Operation cancelled by user"),void(l=0)}else if(g){const t=await async function(t,n,i){const r=oz();return new Promise(o=>{r.question(`${t} `,e=>(r.close(),o(e.trim()===n))),r.once("SIGINT",()=>{e.stdout.write("\n"),i?i.info("Operation cancelled by user"):e.stdout.write("Operation cancelled by user\n"),r.close(),e.exit(0)})})}("🚨 DANGER: full-idempotent mode will DELETE records not in seed data\n"+(u.fullReset?"--full-reset ignores management boundaries: the ENTIRE selected collection can be affected, including unmanaged records.\n":"")+"This operation is DESTRUCTIVE and CANNOT BE UNDONE.\nRecords in your database that are not in seed files will be permanently deleted.\nType 'DELETE' to confirm this destructive operation:","DELETE",r);if(!t)return r.info("Operation cancelled by user"),void(l=0)}const y=await bz(n,t,p,u.fullReset);if(y?.some(e=>void 0!==e.error)&&(r.error(`❌ ${"system"===i?"System":"Core"} data seeding failed; see collection errors above`),l=1),null!==y){const e=await a(),t=new s.UtilsService({schema:e,accountability:{role:null,roles:[],user:null,admin:!0,app:!1,ip:null}});await t.clearCache({system:!0})}}catch(e){const t=e instanceof Error?e.message:"Unknown error";r.error(`❌ Failed to seed ${i} data: ${t}`),r.error(e),l=1}finally{c?.release()&&r.trace("🧹 Released process lock"),e.exit(l)}})},Iz=e=>{const{debounceId:t,task:i,onSkip:r,logger:o,debounceTime:s=15e3,maxLockAge:a=3e5}=e,u=function(e){return e??{info:console.log,warn:console.warn,error:console.error,debug:console.debug,trace:console.trace}}(o),c=p(M(),`directus-debounce-${t}.lock`);let l=null,d=!1,m=!1;const f=()=>{try{return A(c,"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return;throw e}},h=async()=>{if(m||d)return;const e=j(c,{throwIfNoEntry:!1});if(!e)return;const n=Date.now()-e.mtimeMs,o=s-n;if(o>0)return u.trace?.(`🪝 ${t}: debounce extended by another process → waiting ${o}ms`),void(l=setTimeout(()=>{h()},o));const p=f();if(void 0===p)return;let g;try{if(((e={})=>{const{lockName:t=pN,maxLockAge:n=3e5}=e,i=yN(t);return!!P(i)&&!(Date.now()-j(i).mtimeMs>n&&(R(i,{recursive:!0,force:!0}),1))})({maxLockAge:a}))return u.info(`🪝 Bulk operation active, skipping ${t}`),void r?.();try{g=gN({maxLockAge:a})}catch(e){if(e instanceof fN)return u.info(`🪝 Bulk operation became active, skipping ${t}`),void r?.();throw e}d=!0,u.info(`🪝 Running auto task: ${t}`),await i(),u.info(`🪝 Completed auto task: ${t}`)}catch(e){const n=e instanceof Error?e.message:"Unknown error";u.error(`🪝 Error in auto task [${t}]: ${n}`)}finally{g?.release(),d=!1;const e=f();void 0!==e&&(e===p?R(c,{force:!0}):m||(l&&clearTimeout(l),l=setTimeout(()=>{h()},0)))}},g=()=>{if(m)return;const e=j(c,{throwIfNoEntry:!1});if(e){Date.now()-e.mtimeMs>a?u.warn(`🪝 ${t}: resetting stale debounce lock`):u.trace?.(`🪝 ${t}: event within debounce window → extending delay`)}U(c,n()),u.info(`🪝 ${t}: debounce lock updated`),l&&clearTimeout(l),l=setTimeout(()=>{h()},s),u.info(`🪝 ${t}: scheduled after ${s/1e3}s`)};return g.dispose=()=>{m=!0,l&&clearTimeout(l),l=null},g};const xz=e=>"development"===e,Ez=(t,n)=>{const{init:i,action:r}=t,o=function(e,t,n){const i=`${e.toUpperCase()}_ENABLED`;return{start:()=>n.info(`🔌 Loading extension ${e}`),end:()=>n.info(`✅ Extension ${e} Loaded`),isEnabled:()=>!1!==t[i]&&"false"!==t[i]||(n.info(`⛔️ Extension ${e} is disabled via its "${i}" environment variable. Skipping setup...`),!1)}}("seeder",n.env,n.logger);if(o.start(),!o.isEnabled())return;const s=xE(n.env,pO,n.logger),a={...n,env:s},u=xz(s.DEPLOYMENT_ENV);i("cli.after",t=>{const n=t.program;if(!n)throw new TypeError("Directus CLI program is missing");const i=n.command("seed").description("Directus Seeder commands for system and application data");Sz(i,a),Sz(i,a,NE),function(t,n){t.command("config").description("Show system and core collection configuration as JSON without seeding or extraction").option("--defaults","Show built-in defaults without consumer or environment overrides").option("--collection <collection>","Show only the named collection").action(async t=>{let i=0;try{const i=tI({defaults:NS().optional(),collection:ww().optional()}).parse(t),r=$O(i.defaults?pO.parse({}):n.env),o={system:bO({...r,dataScope:"system"}),core:bO({...r,dataScope:"core"})};if(void 0!==i.collection&&!Object.values(o).flat().some(({collection:e})=>e===i.collection))throw new Error(`Unknown Seeder collection: "${i.collection}"`);const s=Object.fromEntries(Object.entries(o).map(([e,t])=>{const n=t.filter(({collection:e})=>void 0===i.collection||e===i.collection);return[e,{order:n.map(({collection:e})=>e),collections:Object.fromEntries(n.map(({collection:e,...t})=>[e,t]))}]}));await new Promise((t,n)=>{e.stdout.write(`${JSON.stringify(s,null,2)}\n`,"utf8",e=>{e?n(e):t()})})}catch(e){console.error(`Failed to inspect Seeder configuration: ${e instanceof Error?e.message:"Unknown error"}`),i=1}finally{e.exit(i)}})}(i,a),u&&((t,n)=>{const{logger:i,env:r}=n;t.command("extract").description("Extract seed data from the current Directus instance").addOption(new rN("--scope <scope>","Data scope to extract").choices(["system","core","both"]).default("system")).option("-i, --include <collections...>","Space-separated collection names to include").option("-e, --exclude <collections...>","Space-separated collection names to exclude").option("--skip-clean","Keep existing output before extracting selected data").addOption(new rN("--json-only","Extract JSON without processing binary assets").conflicts("assets")).addOption(new rN("-a, --assets","Extract binary assets, overriding SEEDER_JSON_ONLY").conflicts("jsonOnly")).action(async t=>{const o=tI({scope:wI(["system","core","both"]),include:YS(ww()).optional(),exclude:YS(ww()).optional(),skipClean:NS().optional(),jsonOnly:NS().optional(),assets:NS().optional()}).parse(t);let s,a=0;try{s=gN(),i.info("🌱 Extracting seed data from Directus using Directus Seeder...");const e=$O(r,{includeCollections:o.include,excludeCollections:o.exclude,skipClean:o.skipClean,jsonOnly:!o.assets&&o.jsonOnly}),t="both"===o.scope?["system","core"]:[o.scope];for(const i of t){const{seedsFolder:t,assetsFolder:o}=lN(r,i);await rz({...e,dataScope:i,folders:{seeds:t,assets:o},context:n})}i.info("✅ Seed data successfully extracted!"),a=0}catch(e){const t=e instanceof Error?e.message:"Unknown error";i.error(`❌ Failed to extract seed data: ${t}`),i.error(e),a=1}finally{s?.release()&&i.trace("🧹 Released process lock"),e.exit(a)}})})(i,a)});if("seed"===e.argv[2]&&"config"===e.argv[3]||u||!s.SEEDER_AUTO_EXTRACT_INCLUDE||$O(s),u&&"seed"!==e.argv[2]){const e=function(e,t){const{logger:n,env:i}=t,r=i.SEEDER_AUTO_EXTRACT_INCLUDE,o=$O(i),s=["system","core"].filter(e=>"system"===e?i.SEEDER_AUTO_EXTRACT_SYSTEM:i.SEEDER_AUTO_EXTRACT_CORE).map(e=>({...o,dataScope:e,jsonOnly:"core"===e||i.SEEDER_JSON_ONLY||void 0!==r&&!r.includes("directus_files"),...void 0===r?{}:{includeCollections:r,excludeCollections:[],skipClean:!0}})),a=new Set,u=Iz({debounceId:"seed-extract",logger:n,debounceTime:15e3,maxLockAge:3e5,onSkip:()=>a.clear(),task:async()=>{const e=new Set(a);a.clear();for(const r of s.filter(({dataScope:t})=>e.has(t))){const{seedsFolder:e,assetsFolder:o}=lN(i,r.dataScope);try{await rz({...r,folders:{seeds:e,assets:o},context:t}),n.info(`✅ ${r.dataScope} seed data successfully extracted!`)}catch(e){n.error(`[directus-seeder-hook] ❌ Error during ${r.dataScope} auto-extract: ${e instanceof Error?e.message:"Unknown error"}`)}}}});for(const t of s){const i=XN(t.includeCollections,t.excludeCollections,bO(t).map(({collection:e})=>e)),r=["create","update","delete"].flatMap(e=>i.map(n=>"system"===t.dataScope?`${n.slice(9)}.${e}`:`${n}.items.${e}`));for(const n of r)e(n,e=>{"users.update"===n&&Object.keys(NN(e.payload??{})).every(e=>"last_page"===e)||(a.add(t.dataScope),u())});n.info(`[directus-seeder-hook] ✅ Auto-extract ${t.dataScope} hook registered for events: ${r.join(", ")}`)}return u.dispose}(r,a);r("server.stop",e),r("extensions.unload",e)}o.end()};var Oz=Ez;export{Oz as default,xz as isExtractionAvailable,Ez as registerSeeder};
|
|
1
|
+
import e from"node:process";import{createHash as t,randomUUID as n}from"node:crypto";import{lstat as i,realpath as r,readdir as o,unlink as s,mkdir as a,open as u,rename as c,stat as l,readFile as d}from"node:fs/promises";import m,{join as p}from"node:path";import{promisify as f}from"node:util";import{gzip as h,gunzip as g}from"node:zlib";import"node:buffer";import v from"crypto";import y from"events";import _ from"cluster";import b from"assert";import $ from"util";import k from"fs";import w from"path";import S from"url";import I from"tty";import x from"os";import E from"stream";import O from"dns";import N from"net";import z from"tls";import T from"buffer";import D from"string_decoder";import{readFileSync as A,constants as C,writeFileSync as U,existsSync as P,statSync as j,rmSync as R,createReadStream as L}from"node:fs";import{createRequire as Z}from"node:module";import{tmpdir as M}from"node:os";import{performance as F}from"node:perf_hooks";import*as B from"node:readline";function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const V=["interface","display","layout","module","panel","theme"],G=["hook","endpoint"],W=["operation"];var K,q,H,Q,Y,X={exports:{}},ee={exports:{}};function te(){if(q)return K;q=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return K=function(a,u){u=u||{};var c=typeof a;if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*r;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(r){var o=Math.abs(r);if(o>=i)return s(r,o,i,"day");if(o>=n)return s(r,o,n,"hour");if(o>=t)return s(r,o,t,"minute");if(o>=e)return s(r,o,e,"second");return r+" ms"}(a):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},K}function ne(){if(Q)return H;return Q=1,H=function(e){function t(e){let i,r,o,s=null;function a(...e){if(!a.enabled)return;const n=a,r=Number(new Date),o=r-(i||r);n.diff=o,n.prev=i,n.curr=r,i=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(i,r)=>{if("%%"===i)return"%";s++;const o=t.formatters[r];if("function"==typeof o){const t=e[s];i=o.call(n,t),e.splice(s,1),s--}return i}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function i(e,t){let n=0,i=0,r=-1,o=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(r=i,o=n,i++):(n++,i++);else{if(-1===r)return!1;i=r+1,o++,n=o}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=te(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},H}var ie,re,oe,se,ae,ue,ce={exports:{}};function le(){return re?ie:(re=1,ie=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return-1!==i&&(-1===r||i<r)})}function de(){return ae||(ae=1,function(e,t){const n=I,i=$;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let i=0;i<n.length;i++)e.inspectOpts[n[i]]=t.inspectOpts[n[i]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:i,useColors:r}=this;if(r){const t=this.color,r="[3"+(t<8?t:"8;5;"+t),o=` ${r};1m${i} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(r+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+i+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(se)return oe;se=1;const e=x,t=I,n=le(),{env:i}=process;let r;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(t,o){if(0===r)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===r)return 0;const s=r||0;if("dumb"===i.TERM)return s;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||"codeship"===i.CI_NAME?1:s;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:s}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?r=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(r=1),"FORCE_COLOR"in i&&(r="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),oe={supportsColor:function(e){return o(s(e,e&&e.isTTY))},stdout:o(s(!0,t.isatty(1))),stderr:o(s(!0,t.isatty(2)))},oe}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[n]=i,e},{}),e.exports=ne()(t);const{formatters:r}=e.exports;r.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(ce,ce.exports)),ce.exports}function me(){return ue||(ue=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?X.exports=(Y||(Y=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=ne()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ee,ee.exports)),ee.exports):X.exports=de()),X.exports}const pe=Object.freeze({status:"aborted"});function fe(e,t,n){function i(n,i){var r;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(r=n._zod).traits??(r.traits=new Set),n._zod.traits.add(e),t(n,i);for(const e in s.prototype)e in n||Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=i}const r=n?.Parent??Object;class o extends r{}function s(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const he=Symbol("zod_brand");let ge=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ve=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};const ye={};function _e(e){return e&&Object.assign(ye,e),ye}function be(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function $e(e,t="|"){return e.map(e=>Fe(e)).join(t)}function ke(e,t){return"bigint"==typeof t?t.toString():t}function we(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Se(e){return null==e}function Ie(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function xe(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let r=(i.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const o=n>r?n:r;return Number.parseInt(e.toFixed(o).replace(".",""))%Number.parseInt(t.toFixed(o).replace(".",""))/10**o}const Ee=Symbol("evaluating");function Oe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Ee)return void 0===i&&(i=Ee,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ne(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ze(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Te(e){return JSON.stringify(e)}const De="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ae(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Ce=we(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Ue(e){if(!1===Ae(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Ae(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Pe(e){return Ue(e)?{...e}:Array.isArray(e)?[...e]:e}const je=new Set(["string","number","symbol"]),Re=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ze(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Me(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Fe(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function Be(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const Je={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]},Ve={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ge(e,t){const n=e._zod.def;return Ze(e,ze(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return Ne(this,"shape",e),e},checks:[]}))}function We(e,t){const n=e._zod.def,i=ze(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return Ne(this,"shape",i),i},checks:[]});return Ze(e,i)}function Ke(e,t){if(!Ue(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ne(this,"shape",n),n},checks:[]});return Ze(e,i)}function qe(e,t){if(!Ue(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return Ne(this,"shape",n),n},checks:e._zod.def.checks};return Ze(e,n)}function He(e,t){const n=ze(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ne(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ze(e,n)}function Qe(e,t,n){const i=ze(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return Ne(this,"shape",r),r},checks:[]});return Ze(t,i)}function Ye(e,t,n){const i=ze(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return Ne(this,"shape",r),r},checks:[]});return Ze(t,i)}function Xe(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function et(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tt(e){return"string"==typeof e?e:e?.message}function nt(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const r=tt(e.inst?._zod.def?.error?.(e))??tt(t?.error?.(e))??tt(n.customError?.(e))??tt(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function it(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function rt(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ot(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function st(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function at(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var ut=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Ve,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:Je,aborted:Xe,allowsEval:Ce,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error},assertNotEqual:function(e){return e},assignProp:Ne,base64ToUint8Array:st,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return st(t+"=".repeat((4-t.length%4)%4))},cached:we,captureStackTrace:De,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:Ie,clone:Ze,cloneDef:function(e){return ze(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:Oe,esc:Te,escapeRegex:Le,extend:Ke,finalizeIssue:nt,floatSafeRemainder:xe,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:be,getLengthableOrigin:rt,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:it,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:Ae,isPlainObject:Ue,issue:ot,joinValues:$e,jsonStringifyReplacer:ke,merge:He,mergeDefs:ze,normalizeParams:Me,nullish:Se,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:We,optionalKeys:Be,partial:Qe,pick:Ge,prefixIssues:et,primitiveTypes:Re,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:je,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:Ye,safeExtend:qe,shallowClone:Pe,stringifyPrimitive:Fe,uint8ArrayToBase64:at,uint8ArrayToBase64url:function(e){return at(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:tt});const ct=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ke,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lt=fe("$ZodError",ct),dt=fe("$ZodError",ct,{Parent:Error});function mt(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function pt(e,t=e=>e.message){const n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>i({issues:e}));else if("invalid_key"===r.code)i({issues:r.issues});else if("invalid_element"===r.code)i({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(e),n}function ft(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,s;for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>i({issues:e},a.path));else if("invalid_key"===a.code)i({issues:a.issues},a.path);else if("invalid_element"===a.code)i({issues:a.issues},a.path);else{const e=[...r,...a.path];if(0===e.length){n.errors.push(t(a));continue}let i=n,u=0;for(;u<e.length;){const n=e[u],r=u===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(s=i.items)[n]??(s[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(a)),u++}}};return i(e),n}function ht(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function gt(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ht(e.path)}`);return t.join("\n")}const vt=e=>(t,n,i,r)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ge;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>nt(e,o,_e())));throw De(t,r?.callee),t}return s.value},yt=vt(dt),_t=e=>async(t,n,i,r)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>nt(e,o,_e())));throw De(t,r?.callee),t}return s.value},bt=_t(dt),$t=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new ge;return o.issues.length?{success:!1,error:new(e??lt)(o.issues.map(e=>nt(e,r,_e())))}:{success:!0,data:o.value}},kt=$t(dt),wt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>nt(e,r,_e())))}:{success:!0,data:o.value}},St=wt(dt),It=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vt(e)(t,n,r)},xt=It(dt),Et=e=>(t,n,i)=>vt(e)(t,n,i),Ot=Et(dt),Nt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _t(e)(t,n,r)},zt=Nt(dt),Tt=e=>async(t,n,i)=>_t(e)(t,n,i),Dt=Tt(dt),At=e=>(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return $t(e)(t,n,r)},Ct=At(dt),Ut=e=>(t,n,i)=>$t(e)(t,n,i),Pt=Ut(dt),jt=e=>async(t,n,i)=>{const r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return wt(e)(t,n,r)},Rt=jt(dt),Lt=e=>async(t,n,i)=>wt(e)(t,n,i),Zt=Lt(dt),Mt=/^[cC][^\s-]{8,}$/,Ft=/^[0-9a-z]+$/,Bt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Jt=/^[0-9a-vA-V]{20}$/,Vt=/^[A-Za-z0-9]{27}$/,Gt=/^[a-zA-Z0-9_-]{21}$/,Wt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kt=/^([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})$/,qt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=qt(4),Qt=qt(6),Yt=qt(7),Xt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,en=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,tn=en;function nn(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const rn=/^(?:(?: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])$/,on=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sn=/^((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])$/,an=/^(([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])$/,un=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cn=/^[A-Za-z0-9_-]*$/,ln=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,dn=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,mn=/^\+(?:[0-9]){6,14}[0-9]$/,pn="(?:(?:\\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])))",fn=new RegExp(`^${pn}$`);function hn(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gn(e){return new RegExp(`^${hn(e)}$`)}function vn(e){const t=hn({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${pn}T(?:${i})$`)}const yn=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),_n=/^-?\d+n?$/,bn=/^-?\d+$/,$n=/^-?\d+(?:\.\d+)?/,kn=/^(?:true|false)$/i,wn=/^null$/i,Sn=/^undefined$/i,In=/^[^A-Z]*$/,xn=/^[^a-z]*$/,En=/^[0-9a-fA-F]*$/;function On(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Nn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const zn=On(22,"=="),Tn=Nn(22),Dn=On(27,"="),An=Nn(27),Cn=On(43,"="),Un=Nn(43),Pn=On(64,""),jn=Nn(64),Rn=On(86,"=="),Ln=Nn(86);var Zn=Object.freeze({__proto__:null,base64:un,base64url:cn,bigint:_n,boolean:kn,browserEmail:/^[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])?)*$/,cidrv4:sn,cidrv6:an,cuid:Mt,cuid2:Ft,date:fn,datetime:vn,domain:dn,duration:Wt,e164:mn,email:Xt,emoji:nn,extendedDuration:/^[-+]?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)?)??$/,guid:Kt,hex:En,hostname:ln,html5Email:/^[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])?)*$/,idnEmail:tn,integer:bn,ipv4:rn,ipv6:on,ksuid:Vt,lowercase:In,md5_base64:zn,md5_base64url:Tn,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Gt,null:wn,number:$n,rfc5322Email:/^(([^<>()\[\]\\.,;:\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,}))$/,sha1_base64:Dn,sha1_base64url:An,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Cn,sha256_base64url:Un,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Pn,sha384_base64url:jn,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Rn,sha512_base64url:Ln,sha512_hex:/^[0-9a-fA-F]{128}$/,string:yn,time:gn,ulid:Bt,undefined:Sn,unicodeEmail:en,uppercase:xn,uuid:qt,uuid4:Ht,uuid6:Qt,uuid7:Yt,xid:Jt});const Mn=fe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Fn={number:"number",bigint:"bigint",object:"date"},Bn=fe("$ZodCheckLessThan",(e,t)=>{Mn.init(e,t);const n=Fn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jn=fe("$ZodCheckGreaterThan",(e,t)=>{Mn.init(e,t);const n=Fn[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vn=fe("$ZodCheckMultipleOf",(e,t)=>{Mn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===xe(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Gn=fe("$ZodCheckNumberFormat",(e,t)=>{Mn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Je[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=bn)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}))}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}}),Wn=fe("$ZodCheckBigIntFormat",(e,t)=>{Mn.init(e,t);const[n,i]=Ve[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Kn=fe("$ZodCheckMaxSize",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:it(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qn=fe("$ZodCheckMinSize",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:it(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hn=fe("$ZodCheckSizeEquals",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:it(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qn=fe("$ZodCheckMaxLength",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=rt(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Yn=fe("$ZodCheckMinLength",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=rt(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Xn=fe("$ZodCheckLengthEquals",(e,t)=>{var n;Mn.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Se(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=rt(i),s=r>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ei=fe("$ZodCheckStringFormat",(e,t)=>{var n,i;Mn.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),ti=fe("$ZodCheckRegex",(e,t)=>{ei.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ni=fe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=In),ei.init(e,t)}),ii=fe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=xn),ei.init(e,t)}),ri=fe("$ZodCheckIncludes",(e,t)=>{Mn.init(e,t);const n=Le(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),oi=fe("$ZodCheckStartsWith",(e,t)=>{Mn.init(e,t);const n=new RegExp(`^${Le(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),si=fe("$ZodCheckEndsWith",(e,t)=>{Mn.init(e,t);const n=new RegExp(`.*${Le(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function ai(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues))}const ui=fe("$ZodCheckProperty",(e,t)=>{Mn.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>ai(n,e,t.property));ai(n,e,t.property)}}),ci=fe("$ZodCheckMimeType",(e,t)=>{Mn.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),li=fe("$ZodCheckOverwrite",(e,t)=>{Mn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});let di=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}};const mi={major:4,minor:1,patch:12},pi=fe("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mi;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=Xe(e);for(const o of t){if(o._zod.def.when){if(!o._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new ge;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=Xe(e,t)))});else{if(e.issues.length===t)continue;r||(r=Xe(e,t))}}return i?i.then(()=>e):e},n=(n,r,o)=>{if(Xe(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new ge;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new ge;return s.then(e=>t(e,i,o))}return t(s,i,o)}}e["~standard"]={validate:t=>{try{const n=kt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return St(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),fi=fe("$ZodString",(e,t)=>{pi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yn(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),hi=fe("$ZodStringFormat",(e,t)=>{ei.init(e,t),fi.init(e,t)}),gi=fe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Kt),hi.init(e,t)}),vi=fe("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qt(e))}else t.pattern??(t.pattern=qt());hi.init(e,t)}),yi=fe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Xt),hi.init(e,t)}),_i=fe("$ZodURL",(e,t)=>{hi.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ln.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),bi=fe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nn()),hi.init(e,t)}),$i=fe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Gt),hi.init(e,t)}),ki=fe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Mt),hi.init(e,t)}),wi=fe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ft),hi.init(e,t)}),Si=fe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bt),hi.init(e,t)}),Ii=fe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Jt),hi.init(e,t)}),xi=fe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Vt),hi.init(e,t)}),Ei=fe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vn(t)),hi.init(e,t)}),Oi=fe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=fn),hi.init(e,t)}),Ni=fe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=gn(t)),hi.init(e,t)}),zi=fe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Wt),hi.init(e,t)}),Ti=fe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=rn),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Di=fe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=on),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ai=fe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sn),hi.init(e,t)}),Ci=fe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=an),hi.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Ui(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Pi=fe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=un),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Ui(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function ji(e){if(!cn.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ui(t.padEnd(4*Math.ceil(t.length/4),"="))}const Ri=fe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cn),hi.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{ji(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Li=fe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mn),hi.init(e,t)});function Zi(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Mi=fe("$ZodJWT",(e,t)=>{hi.init(e,t),e._zod.check=n=>{Zi(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fi=fe("$ZodCustomStringFormat",(e,t)=>{hi.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Bi=fe("$ZodNumber",(e,t)=>{pi.init(e,t),e._zod.pattern=e._zod.bag.pattern??$n,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Ji=fe("$ZodNumber",(e,t)=>{Gn.init(e,t),Bi.init(e,t)}),Vi=fe("$ZodBoolean",(e,t)=>{pi.init(e,t),e._zod.pattern=kn,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Gi=fe("$ZodBigInt",(e,t)=>{pi.init(e,t),e._zod.pattern=_n,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Wi=fe("$ZodBigInt",(e,t)=>{Wn.init(e,t),Gi.init(e,t)}),Ki=fe("$ZodSymbol",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),qi=fe("$ZodUndefined",(e,t)=>{pi.init(e,t),e._zod.pattern=Sn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Hi=fe("$ZodNull",(e,t)=>{pi.init(e,t),e._zod.pattern=wn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),Qi=fe("$ZodAny",(e,t)=>{pi.init(e,t),e._zod.parse=e=>e}),Yi=fe("$ZodUnknown",(e,t)=>{pi.init(e,t),e._zod.parse=e=>e}),Xi=fe("$ZodNever",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),er=fe("$ZodVoid",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),tr=fe("$ZodDate",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function nr(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues)),t.value[n]=e.value}const ir=fe("$ZodArray",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const s=r[e],a=t.element._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(t=>nr(t,n,e))):nr(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function rr(e,t,n,i){e.issues.length&&t.issues.push(...et(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function or(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=Be(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function sr(e,t,n,i,r,o){const s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type;for(const r of Object.keys(t)){if(a.has(r))continue;if("never"===c){s.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>rr(e,n,r,t))):rr(o,n,r,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const ar=fe("$ZodObject",(e,t)=>{pi.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=we(()=>or(t));Oe(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=Ae,o=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=i.value);const a=t.value;if(!r(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const i=c[e]._zod.run({value:a[e],issues:[]},n);i instanceof Promise?u.push(i.then(n=>rr(n,t,e,a))):rr(i,t,e,a)}return o?sr(u,a,t,n,i.value,e):u.length?Promise.all(u).then(()=>t):t}}),ur=fe("$ZodObjectJIT",(e,t)=>{ar.init(e,t);const n=e._zod.parse,i=we(()=>or(t));let r;const o=Ae,s=!ye.jitless,a=s&&Ce.value,u=t.catchall;let c;e._zod.parse=(l,d)=>{c??(c=i.value);const m=l.value;return o(m)?s&&a&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new di(["shape","payload","ctx"]),n=i.value,r=e=>{const t=Te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let s=0;for(const e of n.keys)o[e]="key_"+s++;t.write("const newResult = {};");for(const e of n.keys){const n=o[e],i=Te(e);t.write(`const ${n} = ${r(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=r(l,d),u?sr([],m,l,d,c,e):l):n(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),l)}});function cr(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!Xe(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>nt(e,i,_e())))}),t)}const lr=fe("$ZodUnion",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>Ie(e.source)).join("|")})$`)}});const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then(t=>cr(t,r,e,o)):cr(a,r,e,o)}}),dr=fe("$ZodDiscriminatedUnion",(e,t)=>{lr.init(e,t);const n=e._zod.parse;Oe(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=we(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const s=r.value;if(!Ae(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),mr=fe("$ZodIntersection",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>fr(e,t,n)):fr(e,r,o)}});function pr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Ue(e)&&Ue(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=pr(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=pr(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Xe(e))return e;const i=pr(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const hr=fe("$ZodTuple",(e,t)=>{pi.init(e,t);const n=t.items,i=n.length-[...n].reverse().findIndex(e=>"optional"!==e._zod.optin);e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const a=[];if(!t.rest){const t=s.length>n.length,o=s.length<i-1;if(t||o)return r.issues.push({...t?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),r}let u=-1;for(const e of n){if(u++,u>=s.length&&u>=i)continue;const t=e._zod.run({value:s[u],issues:[]},o);t instanceof Promise?a.push(t.then(e=>gr(e,r,u))):gr(t,r,u)}if(t.rest){const e=s.slice(n.length);for(const n of e){u++;const e=t.rest._zod.run({value:n,issues:[]},o);e instanceof Promise?a.push(e.then(e=>gr(e,r,u))):gr(e,r,u)}}return a.length?Promise.all(a).then(()=>r):r}});function gr(e,t,n){e.issues.length&&t.issues.push(...et(n,e.issues)),t.value[n]=e.value}const vr=fe("$ZodRecord",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Ue(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const s=t.valueType._zod.run({value:r[e],issues:[]},i);s instanceof Promise?o.push(s.then(t=>{t.issues.length&&n.issues.push(...et(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...et(e,s.issues)),n.value[e]=s.value)}let a;for(const e in r)s.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:a})}else{n.value={};for(const s of Reflect.ownKeys(r)){if("__proto__"===s)continue;const a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>nt(e,i,_e())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}const u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&n.issues.push(...et(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...et(s,u.issues)),n.value[a.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),yr=fe("$ZodMap",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[s,a]of r){const u=t.keyType._zod.run({value:s,issues:[]},i),c=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([t,o])=>{_r(t,o,n,s,r,e,i)})):_r(u,c,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function _r(e,t,n,i,r,o,s){e.issues.length&&(je.has(typeof i)?n.issues.push(...et(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>nt(e,s,_e()))})),t.issues.length&&(je.has(typeof i)?n.issues.push(...et(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>nt(e,s,_e()))})),n.value.set(e.value,t.value)}const br=fe("$ZodSet",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>$r(e,n))):$r(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function $r(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const kr=fe("$ZodEnum",(e,t)=>{pi.init(e,t);const n=be(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>je.has(typeof e)).map(e=>"string"==typeof e?Le(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),wr=fe("$ZodLiteral",(e,t)=>{if(pi.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?Le(e):e?Le(e.toString()):String(e)).join("|")})$`),e._zod.parse=(n,i)=>{const r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),Sr=fe("$ZodFile",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),Ir=fe("$ZodTransform",(e,t)=>{pi.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new ve(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new ge;return n.value=r,n}});function xr(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Er=fe("$ZodOptional",(e,t)=>{pi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ie(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>xr(t,e.value)):xr(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),Or=fe("$ZodNullable",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ie(e.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Nr=fe("$ZodDefault",(e,t)=>{pi.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>zr(e,t)):zr(i,t)}});function zr(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Tr=fe("$ZodPrefault",(e,t)=>{pi.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Dr=fe("$ZodNonOptional",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>Ar(t,e)):Ar(r,e)}});function Ar(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Cr=fe("$ZodSuccess",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new ve("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Ur=fe("$ZodCatch",(e,t)=>{pi.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>nt(e,n,_e()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>nt(e,n,_e()))},input:e.value}),e.issues=[]),e)}}),Pr=fe("$ZodNaN",(e,t)=>{pi.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),jr=fe("$ZodPipe",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Rr(e,t.in,n)):Rr(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Rr(e,t.out,n)):Rr(i,t.out,n)}});function Rr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Lr=fe("$ZodCodec",(e,t)=>{pi.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>Zr(e,t,n)):Zr(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>Zr(e,t,n)):Zr(i,t,n)}}});function Zr(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Mr(e,i,t.out,n)):Mr(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Mr(e,i,t.in,n)):Mr(e,i,t.in,n)}}function Mr(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Fr=fe("$ZodReadonly",(e,t)=>{pi.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Br):Br(i)}});function Br(e){return e.value=Object.freeze(e.value),e}const Jr=fe("$ZodTemplateLiteral",(e,t)=>{pi.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!Re.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(Le(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Vr=fe("$ZodFunction",(e,t)=>(pi.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?yt(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?yt(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await bt(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await bt(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new hr({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Gr=fe("$ZodPromise",(e,t)=>{pi.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Wr=fe("$ZodLazy",(e,t)=>{pi.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Kr=fe("$ZodCustom",(e,t)=>{Mn.init(e,t),pi.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>qr(t,n,i,e));qr(r,n,i,e)}});function qr(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(ot(e))}}const Hr=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${Fe(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${$e(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Qr=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${Fe(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Yr(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const Xr=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":if(Array.isArray(e))return"масіў";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${Fe(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Yr(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Yr(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const eo=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Невалиден вход: очакван ${e.expected}, получен ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${Fe(e.values[0])}`:`Невалидна опция: очаквано едно от ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const to=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${Fe(e.values[0])}`:`Opció invàlida: s'esperava una de ${$e(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const no=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"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(e))return"pole";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${Fe(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${$e(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const io=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function n(t){return e[t]??null}function i(e){return t[e]??e}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Ugyldigt input: forventede ${i(e.expected)}, fik ${i((e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tal";case"object":return Array.isArray(e)?"liste":null===e?"null":Object.getPrototypeOf(e)!==Object.prototype&&e.constructor?e.constructor.name:"objekt"}return t})(e.input))}`;case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${Fe(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${$e(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=n(e.origin),o=i(e.origin);return r?`For stor: forventede ${o??"value"} ${r.verb} ${t} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=n(e.origin),o=i(e.origin);return r?`For lille: forventede ${o} ${r.verb} ${t} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${r[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const ro=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":if(Array.isArray(e))return"Array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${Fe(e.values[0])}`:`Ungültige Option: erwartet eine von ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const oo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Invalid input: expected ${e.expected}, received ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Fe(e.values[0])}`:`Invalid option: expected one of ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function so(){return{localeError:oo()}}const ao=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${e.expected}, riceviĝis ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":if(Array.isArray(e))return"tabelo";if(null===e)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${Fe(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const uo=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(t){return e[t]??null}function i(e){return t[e]??e}const r={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 e=>{switch(e.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(e.expected)}, recibido ${i((e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":return Array.isArray(e)?"array":null===e?"null":Object.getPrototypeOf(e)!==Object.prototype?e.constructor.name:"object"}return t})(e.input))}`;case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${Fe(e.values[0])}`:`Opción inválida: se esperaba una de ${$e(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=n(e.origin),o=i(e.origin);return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${t}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=n(e.origin),o=i(e.origin);return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${t}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${r[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(e.origin)}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(e.origin)}`}}};const co=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"آرایه";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} دریافت شد`;case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${Fe(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${$e(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${$e(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const lo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${Fe(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${$e(e.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"}}};const mo=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Entrée invalide : ${e.expected} attendu, ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":if(Array.isArray(e))return"tableau";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} reçu`;case"invalid_value":return 1===e.values.length?`Entrée invalide : ${Fe(e.values[0])} attendu`:`Option invalide : une valeur parmi ${$e(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Trop grand : ${e.origin??"valeur"} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Trop petit : ${e.origin} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${$e(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const po=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Entrée invalide : attendu ${e.expected}, reçu ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${Fe(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${$e(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const fo=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`קלט לא תקין: צריך ${e.expected}, התקבל ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`קלט לא תקין: צריך ${Fe(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`גדול מדי: ${e.origin??"value"} צריך להיות ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`גדול מדי: ${e.origin??"value"} צריך להיות ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()} ${i.unit}`:`קטן מדי: ${e.origin} צריך להיות ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:"ends_with"===t.format?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:"includes"===t.format?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:"regex"===t.format?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${n[t.format]??e.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case"unrecognized_keys":return`מפתח${e.keys.length>1?"ות":""} לא מזוה${e.keys.length>1?"ים":"ה"}: ${$e(e.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${e.origin}`;case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${e.origin}`}}};const ho=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":if(Array.isArray(e))return"tömb";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${Fe(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};const go=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input tidak valid: diharapkan ${e.expected}, diterima ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${Fe(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const vo=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return e=>{switch(e.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":if(Array.isArray(e))return"fylki";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} þar sem á að vera ${e.expected}`;case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${Fe(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const yo=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input non valido: atteso ${e.expected}, ricevuto ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":if(Array.isArray(e))return"vettore";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${Fe(e.values[0])}`:`Opzione non valida: atteso uno tra ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const _o=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`無効な入力: ${e.expected}が期待されましたが、${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":if(Array.isArray(e))return"配列";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}が入力されました`;case"invalid_value":return 1===e.values.length?`無効な入力: ${Fe(e.values[0])}が期待されました`:`無効な選択: ${$e(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${$e(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const bo=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return e=>{switch(e.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${e.expected}, მიღებული ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":if(Array.isArray(e))return"მასივი";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t})(e.input)}`;case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${Fe(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${$e(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${$e(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const $o=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":if(Array.isArray(e))return"អារេ (Array)";if(null===e)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Fe(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${$e(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function ko(){return{localeError:$o()}}const wo=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}입니다`;case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${Fe(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${$e(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${$e(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const So=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return void 0===t?"nežinomas objektas":null===t?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Io=e=>e.charAt(0).toUpperCase()+e.slice(1);function xo(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const Eo=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return e=>{switch(e.code){case"invalid_type":return`Gautas tipas ${i=e.input,So(typeof i,i)}, o tikėtasi - ${So(e.expected)}`;case"invalid_value":return 1===e.values.length?`Privalo būti ${Fe(e.values[0])}`:`Privalo būti vienas iš ${$e(e.values,"|")} pasirinkimų`;case"too_big":{const n=So(e.origin),i=t(e.origin,xo(Number(e.maximum)),e.inclusive??!1,"smaller");if(i?.verb)return`${Io(n??e.origin??"reikšmė")} ${i.verb} ${e.maximum.toString()} ${i.unit??"elementų"}`;const r=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Io(n??e.origin??"reikšmė")} turi būti ${r} ${e.maximum.toString()} ${i?.unit}`}case"too_small":{const n=So(e.origin),i=t(e.origin,xo(Number(e.minimum)),e.inclusive??!1,"bigger");if(i?.verb)return`${Io(n??e.origin??"reikšmė")} ${i.verb} ${e.minimum.toString()} ${i.unit??"elementų"}`;const r=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Io(n??e.origin??"reikšmė")} turi būti ${r} ${e.minimum.toString()} ${i?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${$e(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=So(e.origin);return`${Io(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}var i}};const Oo=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Грешен внес: се очекува ${e.expected}, примено ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":if(Array.isArray(e))return"низа";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Fe(e.values[0])}`:`Грешана опција: се очекува една ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const No=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Input tidak sah: dijangka ${e.expected}, diterima ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${Fe(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${$e(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const zo=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ongeldige invoer: verwacht ${e.expected}, ontving ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${Fe(e.values[0])}`:`Ongeldige optie: verwacht één van ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Te lang: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} bevat`:`Te lang: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const To=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ugyldig input: forventet ${e.expected}, fikk ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${Fe(e.values[0])}`:`Ugyldig valg: forventet en av ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Do=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Fâsit giren: umulan ${e.expected}, alınan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":if(Array.isArray(e))return"saf";if(null===e)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${Fe(e.values[0])}`:`Fâsit tercih: mûteberler ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Ao=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ناسم ورودي: باید ${e.expected} وای, مګر ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"ارې";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} ترلاسه شو`;case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${Fe(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${$e(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Co=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":if(Array.isArray(e))return"tablica";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${Fe(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Uo=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Tipo inválido: esperado ${e.expected}, recebido ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"array";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${Fe(e.values[0])}`:`Opção inválida: esperada uma das ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Po(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const jo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Неверный ввод: ожидалось ${e.expected}, получено ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"массив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${Fe(e.values[0])}`:`Неверный вариант: ожидалось одно из ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=Po(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=Po(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const Ro=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":if(Array.isArray(e))return"tabela";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${Fe(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const Lo=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${e.expected}, fick ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":if(Array.isArray(e))return"lista";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${Fe(e.values[0])}`:`Ogiltigt val: förväntade en av ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${$e(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Zo=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":if(Array.isArray(e))return"அணி";if(null===e)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Fe(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${$e(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Mo=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":if(Array.isArray(e))return"อาร์เรย์ (Array)";if(null===e)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${Fe(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${$e(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Fo=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Geçersiz değer: beklenen ${e.expected}, alınan ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${Fe(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const Bo=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${Fe(e.values[0])}`:`Неправильна опція: очікується одне з ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${$e(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Jo(){return{localeError:Bo()}}const Vo=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`غلط ان پٹ: ${e.expected} متوقع تھا، ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":if(Array.isArray(e))return"آرے";if(null===e)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)} موصول ہوا`;case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${Fe(e.values[0])} متوقع تھا`:`غلط آپشن: ${$e(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${$e(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Go=()=>{const e={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 t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":if(Array.isArray(e))return"mảng";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${Fe(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${$e(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const Wo=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`无效输入:期望 ${e.expected},实际接收 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":if(Array.isArray(e))return"数组";if(null===e)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`无效输入:期望 ${Fe(e.values[0])}`:`无效选项:期望以下之一 ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${$e(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Ko=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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 e=>{switch(e.code){case"invalid_type":return`無效的輸入值:預期為 ${e.expected},但收到 ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${Fe(e.values[0])}`:`無效的選項:預期為以下其中之一 ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${$e(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const qo=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return e=>{switch(e.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${e.expected}, àmọ̀ a rí ${(e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nọ́mbà";case"object":if(Array.isArray(e))return"akopọ";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(e.input)}`;case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${Fe(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${$e(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${$e(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Ho=Object.freeze({__proto__:null,ar:function(){return{localeError:Hr()}},az:function(){return{localeError:Qr()}},be:function(){return{localeError:Xr()}},bg:function(){return{localeError:eo()}},ca:function(){return{localeError:to()}},cs:function(){return{localeError:no()}},da:function(){return{localeError:io()}},de:function(){return{localeError:ro()}},en:so,eo:function(){return{localeError:ao()}},es:function(){return{localeError:uo()}},fa:function(){return{localeError:co()}},fi:function(){return{localeError:lo()}},fr:function(){return{localeError:mo()}},frCA:function(){return{localeError:po()}},he:function(){return{localeError:fo()}},hu:function(){return{localeError:ho()}},id:function(){return{localeError:go()}},is:function(){return{localeError:vo()}},it:function(){return{localeError:yo()}},ja:function(){return{localeError:_o()}},ka:function(){return{localeError:bo()}},kh:function(){return ko()},km:ko,ko:function(){return{localeError:wo()}},lt:function(){return{localeError:Eo()}},mk:function(){return{localeError:Oo()}},ms:function(){return{localeError:No()}},nl:function(){return{localeError:zo()}},no:function(){return{localeError:To()}},ota:function(){return{localeError:Do()}},pl:function(){return{localeError:Co()}},ps:function(){return{localeError:Ao()}},pt:function(){return{localeError:Uo()}},ru:function(){return{localeError:jo()}},sl:function(){return{localeError:Ro()}},sv:function(){return{localeError:Lo()}},ta:function(){return{localeError:Zo()}},th:function(){return{localeError:Mo()}},tr:function(){return{localeError:Fo()}},ua:function(){return Jo()},uk:Jo,ur:function(){return{localeError:Vo()}},vi:function(){return{localeError:Go()}},yo:function(){return{localeError:qo()}},zhCN:function(){return{localeError:Wo()}},zhTW:function(){return{localeError:Ko()}}});const Qo=Symbol("ZodOutput"),Yo=Symbol("ZodInput");let Xo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function es(){return new Xo}const ts=es();function ns(e,t){return new e({type:"string",...Me(t)})}function is(e,t){return new e({type:"string",coerce:!0,...Me(t)})}function rs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function os(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function ss(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function as(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}function us(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}function cs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}function ls(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}function ds(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}function ms(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}function ps(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}function fs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}function hs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}function gs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}function vs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}function ys(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}function _s(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}function bs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}function $s(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}function ks(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}function ws(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}function Ss(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}function Is(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}const xs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Es(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(t)})}function Os(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}function Ns(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(t)})}function zs(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}function Ts(e,t){return new e({type:"number",checks:[],...Me(t)})}function Ds(e,t){return new e({type:"number",coerce:!0,checks:[],...Me(t)})}function As(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}function Cs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Me(t)})}function Us(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Me(t)})}function Ps(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Me(t)})}function js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Me(t)})}function Rs(e,t){return new e({type:"boolean",...Me(t)})}function Ls(e,t){return new e({type:"boolean",coerce:!0,...Me(t)})}function Zs(e,t){return new e({type:"bigint",...Me(t)})}function Ms(e,t){return new e({type:"bigint",coerce:!0,...Me(t)})}function Fs(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Me(t)})}function Bs(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Me(t)})}function Js(e,t){return new e({type:"symbol",...Me(t)})}function Vs(e,t){return new e({type:"undefined",...Me(t)})}function Gs(e,t){return new e({type:"null",...Me(t)})}function Ws(e){return new e({type:"any"})}function Ks(e){return new e({type:"unknown"})}function qs(e,t){return new e({type:"never",...Me(t)})}function Hs(e,t){return new e({type:"void",...Me(t)})}function Qs(e,t){return new e({type:"date",...Me(t)})}function Ys(e,t){return new e({type:"date",coerce:!0,...Me(t)})}function Xs(e,t){return new e({type:"nan",...Me(t)})}function ea(e,t){return new Bn({check:"less_than",...Me(t),value:e,inclusive:!1})}function ta(e,t){return new Bn({check:"less_than",...Me(t),value:e,inclusive:!0})}function na(e,t){return new Jn({check:"greater_than",...Me(t),value:e,inclusive:!1})}function ia(e,t){return new Jn({check:"greater_than",...Me(t),value:e,inclusive:!0})}function ra(e){return na(0,e)}function oa(e){return ea(0,e)}function sa(e){return ta(0,e)}function aa(e){return ia(0,e)}function ua(e,t){return new Vn({check:"multiple_of",...Me(t),value:e})}function ca(e,t){return new Kn({check:"max_size",...Me(t),maximum:e})}function la(e,t){return new qn({check:"min_size",...Me(t),minimum:e})}function da(e,t){return new Hn({check:"size_equals",...Me(t),size:e})}function ma(e,t){return new Qn({check:"max_length",...Me(t),maximum:e})}function pa(e,t){return new Yn({check:"min_length",...Me(t),minimum:e})}function fa(e,t){return new Xn({check:"length_equals",...Me(t),length:e})}function ha(e,t){return new ti({check:"string_format",format:"regex",...Me(t),pattern:e})}function ga(e){return new ni({check:"string_format",format:"lowercase",...Me(e)})}function va(e){return new ii({check:"string_format",format:"uppercase",...Me(e)})}function ya(e,t){return new ri({check:"string_format",format:"includes",...Me(t),includes:e})}function _a(e,t){return new oi({check:"string_format",format:"starts_with",...Me(t),prefix:e})}function ba(e,t){return new si({check:"string_format",format:"ends_with",...Me(t),suffix:e})}function $a(e,t,n){return new ui({check:"property",property:e,schema:t,...Me(n)})}function ka(e,t){return new ci({check:"mime_type",mime:e,...Me(t)})}function wa(e){return new li({check:"overwrite",tx:e})}function Sa(e){return wa(t=>t.normalize(e))}function Ia(){return wa(e=>e.trim())}function xa(){return wa(e=>e.toLowerCase())}function Ea(){return wa(e=>e.toUpperCase())}function Oa(e,t,n){return new e({type:"array",element:t,...Me(n)})}function Na(e,t){return new e({type:"file",...Me(t)})}function za(e,t,n){const i=Me(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function Ta(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Me(n)})}function Da(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(ot(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(ot(i))}},e(n.value,n)));return t}function Aa(e,t){const n=new Mn({check:"custom",...Me(t)});return n._zod.check=e,n}function Ca(e,t){const n=Me(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),s=new Set(r),a=e.Codec??Lr,u=e.Boolean??Vi,c=new a({type:"pipe",in:new(e.String??fi)({type:"string",error:n.error}),out:new u({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!s.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function Ua(e,t,n,i={}){const r=Me(i),o={...Me(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}let Pa=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??ts,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,t={path:[],schemaPath:[]}){var n;const i=e._zod.def,r={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(e);if(o){o.count++;return t.schemaPath.includes(e)&&(o.cycle=t.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const n={...t,schemaPath:[...t.schemaPath,e],path:t.path},o=e._zod.parent;if(o)s.ref=o,this.process(o,n),this.seen.get(o).isParent=!0;else{const t=s.schema;switch(i.type){case"string":{const n=t;n.type="string";const{minimum:i,maximum:o,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof o&&(n.maxLength=o),a&&(n.format=r[a]??a,""===n.format&&delete n.format),c&&(n.contentEncoding=c),u&&u.size>0){const e=[...u];1===e.length?n.pattern=e[0].source:e.length>1&&(s.schema.allOf=[...e.map(e=>({..."draft-7"===this.target||"draft-4"===this.target||"openapi-3.0"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{const n=t,{minimum:i,maximum:r,format:o,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:u}=e._zod.bag;"string"==typeof o&&o.includes("int")?n.type="integer":n.type="number","number"==typeof u&&("draft-4"===this.target||"openapi-3.0"===this.target?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),"number"==typeof i&&(n.minimum=i,"number"==typeof u&&"draft-4"!==this.target&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof a&&("draft-4"===this.target||"openapi-3.0"===this.target?(n.maximum=a,n.exclusiveMaximum=!0):n.exclusiveMaximum=a),"number"==typeof r&&(n.maximum=r,"number"==typeof a&&"draft-4"!==this.target&&(a<=r?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof s&&(n.multipleOf=s);break}case"boolean":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":"openapi-3.0"===this.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":t.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":{const r=t,{minimum:o,maximum:s}=e._zod.bag;"number"==typeof o&&(r.minItems=o),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=this.process(i.element,{...n,path:[...n.path,"items"]});break}case"object":{const e=t;e.type="object",e.properties={};const r=i.shape;for(const t in r)e.properties[t]=this.process(r[t],{...n,path:[...n.path,"properties",t]});const o=new Set(Object.keys(r)),s=new Set([...o].filter(e=>{const t=i.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));s.size>0&&(e.required=Array.from(s)),"never"===i.catchall?._zod.def.type?e.additionalProperties=!1:i.catchall?i.catchall&&(e.additionalProperties=this.process(i.catchall,{...n,path:[...n.path,"additionalProperties"]})):"output"===this.io&&(e.additionalProperties=!1);break}case"union":{const e=t,r=i.options.map((e,t)=>this.process(e,{...n,path:[...n.path,"anyOf",t]}));e.anyOf=r;break}case"intersection":{const e=t,r=this.process(i.left,{...n,path:[...n.path,"allOf",0]}),o=this.process(i.right,{...n,path:[...n.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,a=[...s(r)?r.allOf:[r],...s(o)?o.allOf:[o]];e.allOf=a;break}case"tuple":{const r=t;r.type="array";const o="draft-2020-12"===this.target?"prefixItems":"items",s="draft-2020-12"===this.target||"openapi-3.0"===this.target?"items":"additionalItems",a=i.items.map((e,t)=>this.process(e,{...n,path:[...n.path,o,t]})),u=i.rest?this.process(i.rest,{...n,path:[...n.path,s,..."openapi-3.0"===this.target?[i.items.length]:[]]}):null;"draft-2020-12"===this.target?(r.prefixItems=a,u&&(r.items=u)):"openapi-3.0"===this.target?(r.items={anyOf:a},u&&r.items.anyOf.push(u),r.minItems=a.length,u||(r.maxItems=a.length)):(r.items=a,u&&(r.additionalItems=u));const{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l);break}case"record":{const e=t;e.type="object","draft-7"!==this.target&&"draft-2020-12"!==this.target||(e.propertyNames=this.process(i.keyType,{...n,path:[...n.path,"propertyNames"]})),e.additionalProperties=this.process(i.valueType,{...n,path:[...n.path,"additionalProperties"]});break}case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":{const e=t,n=be(i.entries);n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),e.enum=n;break}case"literal":{const e=t,n=[];for(const e of i.values)if(void 0===e){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(e))}else n.push(e);if(0===n.length);else if(1===n.length){const t=n[0];e.type=null===t?"null":typeof t,"draft-4"===this.target||"openapi-3.0"===this.target?e.enum=[t]:e.const=t}else n.every(e=>"number"==typeof e)&&(e.type="number"),n.every(e=>"string"==typeof e)&&(e.type="string"),n.every(e=>"boolean"==typeof e)&&(e.type="string"),n.every(e=>null===e)&&(e.type="null"),e.enum=n;break}case"file":{const n=t,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:r,maximum:o,mime:s}=e._zod.bag;void 0!==r&&(i.minLength=r),void 0!==o&&(i.maxLength=o),s?1===s.length?(i.contentMediaType=s[0],Object.assign(n,i)):n.anyOf=s.map(e=>({...i,contentMediaType:e})):Object.assign(n,i);break}case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":{const e=this.process(i.innerType,n);"openapi-3.0"===this.target?(s.ref=i.innerType,t.nullable=!0):t.anyOf=[e,{type:"null"}];break}case"nonoptional":case"promise":case"optional":this.process(i.innerType,n),s.ref=i.innerType;break;case"success":t.type="boolean";break;case"default":this.process(i.innerType,n),s.ref=i.innerType,t.default=JSON.parse(JSON.stringify(i.defaultValue));break;case"prefault":this.process(i.innerType,n),s.ref=i.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break;case"catch":{let e;this.process(i.innerType,n),s.ref=i.innerType;try{e=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{const n=t,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source;break}case"pipe":{const e="input"===this.io?"transform"===i.in._zod.def.type?i.out:i.in:i.out;this.process(e,n),s.ref=e;break}case"readonly":this.process(i.innerType,n),s.ref=i.innerType,t.readOnly=!0;break;case"lazy":{const t=e._zod.innerType;this.process(t,n),s.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema");break;case"function":if("throw"===this.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")}}}const u=this.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===this.io&&Ra(e)&&(delete s.schema.examples,delete s.schema.default),"input"===this.io&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault;return this.seen.get(e).schema}emit(e,t){const n={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},i=this.seen.get(e);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=e=>{const t="draft-2020-12"===this.target?"$defs":"definitions";if(n.external){const i=n.external.registry.get(e[0])?.id,r=n.external.uri??(e=>e);if(i)return{ref:r(i)};const o=e[1].defId??e[1].schema.id??"schema"+this.counter++;return e[1].defId=o,{defId:o,ref:`${r("__shared")}#/${t}/${o}`}}if(e[1]===i)return{ref:"#"};const r=`#/${t}/`,o=e[1].schema.id??"__schema"+this.counter++;return{defId:o,ref:r+o}},o=e=>{if(e[1].schema.$ref)return;const t=e[1],{ref:n,defId:i}=r(e);t.def={...t.schema},i&&(t.defId=i);const o=t.schema;for(const e in o)delete o[e];o.$ref=n};if("throw"===n.cycles)for(const e of this.seen.entries()){const t=e[1];if(t.cycle)throw new Error(`Cycle detected: #/${t.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const t of this.seen.entries()){const i=t[1];if(e===t[0]){o(t);continue}if(n.external){const i=n.external.registry.get(t[0])?.id;if(e!==t[0]&&i){o(t);continue}}const r=this.metadataRegistry.get(t[0])?.id;r?o(t):(i.cycle||i.count>1&&"ref"===n.reused)&&o(t)}const s=(e,t)=>{const n=this.seen.get(e),i=n.def??n.schema,r={...i};if(null===n.ref)return;const o=n.ref;if(n.ref=null,o){s(o,t);const e=this.seen.get(o).schema;!e.$ref||"draft-7"!==t.target&&"draft-4"!==t.target&&"openapi-3.0"!==t.target?(Object.assign(i,e),Object.assign(i,r)):(i.allOf=i.allOf??[],i.allOf.push(e))}n.isParent||this.override({zodSchema:e,jsonSchema:i,path:n.path??[]})};for(const e of[...this.seen.entries()].reverse())s(e[0],{target:this.target});const a={};if("draft-2020-12"===this.target?a.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?a.$schema="http://json-schema.org/draft-07/schema#":"draft-4"===this.target?a.$schema="http://json-schema.org/draft-04/schema#":"openapi-3.0"===this.target||console.warn(`Invalid target: ${this.target}`),n.external?.uri){const t=n.external.registry.get(e)?.id;if(!t)throw new Error("Schema is missing an `id` property");a.$id=n.external.uri(t)}Object.assign(a,i.def);const u=n.external?.defs??{};for(const e of this.seen.entries()){const t=e[1];t.def&&t.defId&&(u[t.defId]=t.def)}n.external||Object.keys(u).length>0&&("draft-2020-12"===this.target?a.$defs=u:a.definitions=u);try{return JSON.parse(JSON.stringify(a))}catch(e){throw new Error("Error converting schema to JSON.")}}};function ja(e,t){if(e instanceof Xo){const n=new Pa(t),i={};for(const t of e._idmap.entries()){const[e,i]=t;n.process(i)}const r={},o={registry:e,uri:t?.uri,defs:i};for(const i of e._idmap.entries()){const[e,s]=i;r[e]=n.emit(s,{...t,external:o})}if(Object.keys(i).length>0){const e="draft-2020-12"===n.target?"$defs":"definitions";r.__shared={[e]:i}}return{schemas:r}}const n=new Pa(t);return n.process(e),n.emit(e,t)}function Ra(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.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":case"custom":case"success":case"catch":case"function":return!1;case"array":return Ra(i.element,n);case"object":for(const e in i.shape)if(Ra(i.shape[e],n))return!0;return!1;case"union":for(const e of i.options)if(Ra(e,n))return!0;return!1;case"intersection":return Ra(i.left,n)||Ra(i.right,n);case"tuple":for(const e of i.items)if(Ra(e,n))return!0;return!(!i.rest||!Ra(i.rest,n));case"record":case"map":return Ra(i.keyType,n)||Ra(i.valueType,n);case"set":return Ra(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return Ra(i.innerType,n);case"lazy":return Ra(i.getter(),n);case"transform":return!0;case"pipe":return Ra(i.in,n)||Ra(i.out,n)}throw new Error(`Unknown schema type: ${i.type}`)}var La=Object.freeze({__proto__:null}),Za=Object.freeze({__proto__:null,$ZodAny:Qi,$ZodArray:ir,$ZodAsyncError:ge,$ZodBase64:Pi,$ZodBase64URL:Ri,$ZodBigInt:Gi,$ZodBigIntFormat:Wi,$ZodBoolean:Vi,$ZodCIDRv4:Ai,$ZodCIDRv6:Ci,$ZodCUID:ki,$ZodCUID2:wi,$ZodCatch:Ur,$ZodCheck:Mn,$ZodCheckBigIntFormat:Wn,$ZodCheckEndsWith:si,$ZodCheckGreaterThan:Jn,$ZodCheckIncludes:ri,$ZodCheckLengthEquals:Xn,$ZodCheckLessThan:Bn,$ZodCheckLowerCase:ni,$ZodCheckMaxLength:Qn,$ZodCheckMaxSize:Kn,$ZodCheckMimeType:ci,$ZodCheckMinLength:Yn,$ZodCheckMinSize:qn,$ZodCheckMultipleOf:Vn,$ZodCheckNumberFormat:Gn,$ZodCheckOverwrite:li,$ZodCheckProperty:ui,$ZodCheckRegex:ti,$ZodCheckSizeEquals:Hn,$ZodCheckStartsWith:oi,$ZodCheckStringFormat:ei,$ZodCheckUpperCase:ii,$ZodCodec:Lr,$ZodCustom:Kr,$ZodCustomStringFormat:Fi,$ZodDate:tr,$ZodDefault:Nr,$ZodDiscriminatedUnion:dr,$ZodE164:Li,$ZodEmail:yi,$ZodEmoji:bi,$ZodEncodeError:ve,$ZodEnum:kr,$ZodError:lt,$ZodFile:Sr,$ZodFunction:Vr,$ZodGUID:gi,$ZodIPv4:Ti,$ZodIPv6:Di,$ZodISODate:Oi,$ZodISODateTime:Ei,$ZodISODuration:zi,$ZodISOTime:Ni,$ZodIntersection:mr,$ZodJWT:Mi,$ZodKSUID:xi,$ZodLazy:Wr,$ZodLiteral:wr,$ZodMap:yr,$ZodNaN:Pr,$ZodNanoID:$i,$ZodNever:Xi,$ZodNonOptional:Dr,$ZodNull:Hi,$ZodNullable:Or,$ZodNumber:Bi,$ZodNumberFormat:Ji,$ZodObject:ar,$ZodObjectJIT:ur,$ZodOptional:Er,$ZodPipe:jr,$ZodPrefault:Tr,$ZodPromise:Gr,$ZodReadonly:Fr,$ZodRealError:dt,$ZodRecord:vr,$ZodRegistry:Xo,$ZodSet:br,$ZodString:fi,$ZodStringFormat:hi,$ZodSuccess:Cr,$ZodSymbol:Ki,$ZodTemplateLiteral:Jr,$ZodTransform:Ir,$ZodTuple:hr,$ZodType:pi,$ZodULID:Si,$ZodURL:_i,$ZodUUID:vi,$ZodUndefined:qi,$ZodUnion:lr,$ZodUnknown:Yi,$ZodVoid:er,$ZodXID:Ii,$brand:he,$constructor:fe,$input:Yo,$output:Qo,Doc:di,JSONSchema:La,JSONSchemaGenerator:Pa,NEVER:pe,TimePrecision:xs,_any:Ws,_array:Oa,_base64:ks,_base64url:ws,_bigint:Zs,_boolean:Rs,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:bs,_cidrv6:$s,_coercedBigint:Ms,_coercedBoolean:Ls,_coercedDate:Ys,_coercedNumber:Ds,_coercedString:is,_cuid:ps,_cuid2:fs,_custom:za,_date:Qs,_decode:Et,_decodeAsync:Tt,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():Pe(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...Me(i)})},_e164:Ss,_email:rs,_emoji:ds,_encode:It,_encodeAsync:Nt,_endsWith:ba,_enum:function(e,t,n){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...Me(n)})},_file:Na,_float32:Cs,_float64:Us,_gt:na,_gte:ia,_guid:os,_includes:ya,_int:As,_int32:Ps,_int64:Fs,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:ys,_ipv6:_s,_isoDate:Os,_isoDateTime:Es,_isoDuration:zs,_isoTime:Ns,_jwt:Is,_ksuid:vs,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:fa,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Me(n)})},_lowercase:ga,_lt:ea,_lte:ta,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...Me(i)})},_max:ta,_maxLength:ma,_maxSize:ca,_mime:ka,_min:ia,_minLength:pa,_minSize:la,_multipleOf:ua,_nan:Xs,_nanoid:ms,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...Me(n)})},_negative:oa,_never:qs,_nonnegative:aa,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...Me(n)})},_nonpositive:sa,_normalize:Sa,_null:Gs,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Ts,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:wa,_parse:vt,_parseAsync:_t,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:ra,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:$a,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...Me(i)})},_refine:Ta,_regex:ha,_safeDecode:Ut,_safeDecodeAsync:Lt,_safeEncode:At,_safeEncodeAsync:jt,_safeParse:$t,_safeParseAsync:wt,_set:function(e,t,n){return new e({type:"set",valueType:t,...Me(n)})},_size:da,_startsWith:_a,_string:ns,_stringFormat:Ua,_stringbool:Ca,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Da,_symbol:Js,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...Me(n)})},_toLowerCase:xa,_toUpperCase:Ea,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Ia,_tuple:function(e,t,n,i){const r=n instanceof pi;return new e({type:"tuple",items:t,rest:r?n:null,...Me(r?i:n)})},_uint32:js,_uint64:Bs,_ulid:hs,_undefined:Vs,_union:function(e,t,n){return new e({type:"union",options:t,...Me(n)})},_unknown:Ks,_uppercase:va,_url:ls,_uuid:ss,_uuidv4:as,_uuidv6:us,_uuidv7:cs,_void:Hs,_xid:gs,clone:Ze,config:_e,decode:Ot,decodeAsync:Dt,encode:xt,encodeAsync:zt,flattenError:mt,formatError:pt,globalConfig:ye,globalRegistry:ts,isValidBase64:Ui,isValidBase64URL:ji,isValidJWT:Zi,locales:Ho,parse:yt,parseAsync:bt,prettifyError:gt,regexes:Zn,registry:es,safeDecode:Pt,safeDecodeAsync:Zt,safeEncode:Ct,safeEncodeAsync:Rt,safeParse:kt,safeParseAsync:St,toDotPath:ht,toJSONSchema:ja,treeifyError:ft,util:ut,version:mi});const Ma=fe("ZodISODateTime",(e,t)=>{Ei.init(e,t),hu.init(e,t)});function Fa(e){return Es(Ma,e)}const Ba=fe("ZodISODate",(e,t)=>{Oi.init(e,t),hu.init(e,t)});function Ja(e){return Os(Ba,e)}const Va=fe("ZodISOTime",(e,t)=>{Ni.init(e,t),hu.init(e,t)});function Ga(e){return Ns(Va,e)}const Wa=fe("ZodISODuration",(e,t)=>{zi.init(e,t),hu.init(e,t)});function Ka(e){return zs(Wa,e)}var qa=Object.freeze({__proto__:null,ZodISODate:Ba,ZodISODateTime:Ma,ZodISODuration:Wa,ZodISOTime:Va,date:Ja,datetime:Fa,duration:Ka,time:Ga});const Ha=(e,t)=>{lt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>pt(e,t)},flatten:{value:t=>mt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ke,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ke,2)}},isEmpty:{get:()=>0===e.issues.length}})},Qa=fe("ZodError",Ha),Ya=fe("ZodError",Ha,{Parent:Error}),Xa=vt(Ya),eu=_t(Ya),tu=$t(Ya),nu=wt(Ya),iu=It(Ya),ru=Et(Ya),ou=Nt(Ya),su=Tt(Ya),au=At(Ya),uu=Ut(Ya),cu=jt(Ya),lu=Lt(Ya),du=fe("ZodType",(e,t)=>(pi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ze(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Ze(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Xa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>tu(e,t,n),e.parseAsync=async(t,n)=>eu(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>nu(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>iu(e,t,n),e.decode=(t,n)=>ru(e,t,n),e.encodeAsync=async(t,n)=>ou(e,t,n),e.decodeAsync=async(t,n)=>su(e,t,n),e.safeEncode=(t,n)=>au(e,t,n),e.safeDecode=(t,n)=>uu(e,t,n),e.safeEncodeAsync=async(t,n)=>cu(e,t,n),e.safeDecodeAsync=async(t,n)=>lu(e,t,n),e.refine=(t,n)=>e.check(qc(t,n)),e.superRefine=t=>e.check(Hc(t)),e.overwrite=t=>e.check(wa(t)),e.optional=()=>Sc(e),e.nullable=()=>xc(e),e.nullish=()=>Sc(xc(e)),e.nonoptional=t=>Dc(e,t),e.array=()=>nc(e),e.or=t=>sc([e,t]),e.and=t=>cc(e,t),e.transform=t=>Rc(e,kc(t)),e.default=t=>Oc(e,t),e.prefault=t=>zc(e,t),e.catch=t=>Uc(e,t),e.pipe=t=>Rc(e,t),e.readonly=()=>Mc(e),e.describe=t=>{const n=e.clone();return ts.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ts.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ts.get(e);const n=e.clone();return ts.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),mu=fe("_ZodString",(e,t)=>{fi.init(e,t),du.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ha(...t)),e.includes=(...t)=>e.check(ya(...t)),e.startsWith=(...t)=>e.check(_a(...t)),e.endsWith=(...t)=>e.check(ba(...t)),e.min=(...t)=>e.check(pa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(fa(...t)),e.nonempty=(...t)=>e.check(pa(1,...t)),e.lowercase=t=>e.check(ga(t)),e.uppercase=t=>e.check(va(t)),e.trim=()=>e.check(Ia()),e.normalize=(...t)=>e.check(Sa(...t)),e.toLowerCase=()=>e.check(xa()),e.toUpperCase=()=>e.check(Ea())}),pu=fe("ZodString",(e,t)=>{fi.init(e,t),mu.init(e,t),e.email=t=>e.check(rs(gu,t)),e.url=t=>e.check(ls(_u,t)),e.jwt=t=>e.check(Is(Cu,t)),e.emoji=t=>e.check(ds(bu,t)),e.guid=t=>e.check(os(vu,t)),e.uuid=t=>e.check(ss(yu,t)),e.uuidv4=t=>e.check(as(yu,t)),e.uuidv6=t=>e.check(us(yu,t)),e.uuidv7=t=>e.check(cs(yu,t)),e.nanoid=t=>e.check(ms($u,t)),e.guid=t=>e.check(os(vu,t)),e.cuid=t=>e.check(ps(ku,t)),e.cuid2=t=>e.check(fs(wu,t)),e.ulid=t=>e.check(hs(Su,t)),e.base64=t=>e.check(ks(Tu,t)),e.base64url=t=>e.check(ws(Du,t)),e.xid=t=>e.check(gs(Iu,t)),e.ksuid=t=>e.check(vs(xu,t)),e.ipv4=t=>e.check(ys(Eu,t)),e.ipv6=t=>e.check(_s(Ou,t)),e.cidrv4=t=>e.check(bs(Nu,t)),e.cidrv6=t=>e.check($s(zu,t)),e.e164=t=>e.check(Ss(Au,t)),e.datetime=t=>e.check(Fa(t)),e.date=t=>e.check(Ja(t)),e.time=t=>e.check(Ga(t)),e.duration=t=>e.check(Ka(t))});function fu(e){return ns(pu,e)}const hu=fe("ZodStringFormat",(e,t)=>{hi.init(e,t),mu.init(e,t)}),gu=fe("ZodEmail",(e,t)=>{yi.init(e,t),hu.init(e,t)});const vu=fe("ZodGUID",(e,t)=>{gi.init(e,t),hu.init(e,t)});const yu=fe("ZodUUID",(e,t)=>{vi.init(e,t),hu.init(e,t)});const _u=fe("ZodURL",(e,t)=>{_i.init(e,t),hu.init(e,t)});const bu=fe("ZodEmoji",(e,t)=>{bi.init(e,t),hu.init(e,t)});const $u=fe("ZodNanoID",(e,t)=>{$i.init(e,t),hu.init(e,t)});const ku=fe("ZodCUID",(e,t)=>{ki.init(e,t),hu.init(e,t)});const wu=fe("ZodCUID2",(e,t)=>{wi.init(e,t),hu.init(e,t)});const Su=fe("ZodULID",(e,t)=>{Si.init(e,t),hu.init(e,t)});const Iu=fe("ZodXID",(e,t)=>{Ii.init(e,t),hu.init(e,t)});const xu=fe("ZodKSUID",(e,t)=>{xi.init(e,t),hu.init(e,t)});const Eu=fe("ZodIPv4",(e,t)=>{Ti.init(e,t),hu.init(e,t)});const Ou=fe("ZodIPv6",(e,t)=>{Di.init(e,t),hu.init(e,t)});const Nu=fe("ZodCIDRv4",(e,t)=>{Ai.init(e,t),hu.init(e,t)});const zu=fe("ZodCIDRv6",(e,t)=>{Ci.init(e,t),hu.init(e,t)});const Tu=fe("ZodBase64",(e,t)=>{Pi.init(e,t),hu.init(e,t)});const Du=fe("ZodBase64URL",(e,t)=>{Ri.init(e,t),hu.init(e,t)});const Au=fe("ZodE164",(e,t)=>{Li.init(e,t),hu.init(e,t)});const Cu=fe("ZodJWT",(e,t)=>{Mi.init(e,t),hu.init(e,t)});const Uu=fe("ZodCustomStringFormat",(e,t)=>{Fi.init(e,t),hu.init(e,t)});const Pu=fe("ZodNumber",(e,t)=>{Bi.init(e,t),du.init(e,t),e.gt=(t,n)=>e.check(na(t,n)),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.lt=(t,n)=>e.check(ea(t,n)),e.lte=(t,n)=>e.check(ta(t,n)),e.max=(t,n)=>e.check(ta(t,n)),e.int=t=>e.check(Lu(t)),e.safe=t=>e.check(Lu(t)),e.positive=t=>e.check(na(0,t)),e.nonnegative=t=>e.check(ia(0,t)),e.negative=t=>e.check(ea(0,t)),e.nonpositive=t=>e.check(ta(0,t)),e.multipleOf=(t,n)=>e.check(ua(t,n)),e.step=(t,n)=>e.check(ua(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ju(e){return Ts(Pu,e)}const Ru=fe("ZodNumberFormat",(e,t)=>{Ji.init(e,t),Pu.init(e,t)});function Lu(e){return As(Ru,e)}const Zu=fe("ZodBoolean",(e,t)=>{Vi.init(e,t),du.init(e,t)});function Mu(e){return Rs(Zu,e)}const Fu=fe("ZodBigInt",(e,t)=>{Gi.init(e,t),du.init(e,t),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.gt=(t,n)=>e.check(na(t,n)),e.gte=(t,n)=>e.check(ia(t,n)),e.min=(t,n)=>e.check(ia(t,n)),e.lt=(t,n)=>e.check(ea(t,n)),e.lte=(t,n)=>e.check(ta(t,n)),e.max=(t,n)=>e.check(ta(t,n)),e.positive=t=>e.check(na(BigInt(0),t)),e.negative=t=>e.check(ea(BigInt(0),t)),e.nonpositive=t=>e.check(ta(BigInt(0),t)),e.nonnegative=t=>e.check(ia(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(ua(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});const Bu=fe("ZodBigIntFormat",(e,t)=>{Wi.init(e,t),Fu.init(e,t)});const Ju=fe("ZodSymbol",(e,t)=>{Ki.init(e,t),du.init(e,t)});const Vu=fe("ZodUndefined",(e,t)=>{qi.init(e,t),du.init(e,t)});const Gu=fe("ZodNull",(e,t)=>{Hi.init(e,t),du.init(e,t)});function Wu(e){return Gs(Gu,e)}const Ku=fe("ZodAny",(e,t)=>{Qi.init(e,t),du.init(e,t)});const qu=fe("ZodUnknown",(e,t)=>{Yi.init(e,t),du.init(e,t)});function Hu(){return Ks(qu)}const Qu=fe("ZodNever",(e,t)=>{Xi.init(e,t),du.init(e,t)});function Yu(e){return qs(Qu,e)}const Xu=fe("ZodVoid",(e,t)=>{er.init(e,t),du.init(e,t)});const ec=fe("ZodDate",(e,t)=>{tr.init(e,t),du.init(e,t),e.min=(t,n)=>e.check(ia(t,n)),e.max=(t,n)=>e.check(ta(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});const tc=fe("ZodArray",(e,t)=>{ir.init(e,t),du.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(pa(t,n)),e.nonempty=t=>e.check(pa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(fa(t,n)),e.unwrap=()=>e.element});function nc(e,t){return Oa(tc,e,t)}const ic=fe("ZodObject",(e,t)=>{ur.init(e,t),du.init(e,t),Oe(e,"shape",()=>t.shape),e.keyof=()=>vc(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Hu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Hu()}),e.strict=()=>e.clone({...e._zod.def,catchall:Yu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ke(e,t),e.safeExtend=t=>qe(e,t),e.merge=t=>He(e,t),e.pick=t=>Ge(e,t),e.omit=t=>We(e,t),e.partial=(...t)=>Qe(wc,e,t[0]),e.required=(...t)=>Ye(Tc,e,t[0])});function rc(e,t){const n={type:"object",shape:e??{},...Me(t)};return new ic(n)}const oc=fe("ZodUnion",(e,t)=>{lr.init(e,t),du.init(e,t),e.options=t.options});function sc(e,t){return new oc({type:"union",options:e,...Me(t)})}const ac=fe("ZodDiscriminatedUnion",(e,t)=>{oc.init(e,t),dr.init(e,t)});const uc=fe("ZodIntersection",(e,t)=>{mr.init(e,t),du.init(e,t)});function cc(e,t){return new uc({type:"intersection",left:e,right:t})}const lc=fe("ZodTuple",(e,t)=>{hr.init(e,t),du.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function dc(e,t,n){const i=t instanceof pi;return new lc({type:"tuple",items:e,rest:i?t:null,...Me(i?n:t)})}const mc=fe("ZodRecord",(e,t)=>{vr.init(e,t),du.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function pc(e,t,n){return new mc({type:"record",keyType:e,valueType:t,...Me(n)})}const fc=fe("ZodMap",(e,t)=>{yr.init(e,t),du.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});const hc=fe("ZodSet",(e,t)=>{br.init(e,t),du.init(e,t),e.min=(...t)=>e.check(la(...t)),e.nonempty=t=>e.check(la(1,t)),e.max=(...t)=>e.check(ca(...t)),e.size=(...t)=>e.check(da(...t))});const gc=fe("ZodEnum",(e,t)=>{kr.init(e,t),du.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new gc({...t,checks:[],...Me(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new gc({...t,checks:[],...Me(i),entries:r})}});function vc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new gc({type:"enum",entries:n,...Me(t)})}const yc=fe("ZodLiteral",(e,t)=>{wr.init(e,t),du.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function _c(e,t){return new yc({type:"literal",values:Array.isArray(e)?e:[e],...Me(t)})}const bc=fe("ZodFile",(e,t)=>{Sr.init(e,t),du.init(e,t),e.min=(t,n)=>e.check(la(t,n)),e.max=(t,n)=>e.check(ca(t,n)),e.mime=(t,n)=>e.check(ka(Array.isArray(t)?t:[t],n))});const $c=fe("ZodTransform",(e,t)=>{Ir.init(e,t),du.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new ve(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(ot(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(ot(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function kc(e){return new $c({type:"transform",transform:e})}const wc=fe("ZodOptional",(e,t)=>{Er.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Sc(e){return new wc({type:"optional",innerType:e})}const Ic=fe("ZodNullable",(e,t)=>{Or.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new Ic({type:"nullable",innerType:e})}const Ec=fe("ZodDefault",(e,t)=>{Nr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Oc(e,t){return new Ec({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():Pe(t)}})}const Nc=fe("ZodPrefault",(e,t)=>{Tr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function zc(e,t){return new Nc({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():Pe(t)}})}const Tc=fe("ZodNonOptional",(e,t)=>{Dr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dc(e,t){return new Tc({type:"nonoptional",innerType:e,...Me(t)})}const Ac=fe("ZodSuccess",(e,t)=>{Cr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Cc=fe("ZodCatch",(e,t)=>{Ur.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Uc(e,t){return new Cc({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Pc=fe("ZodNaN",(e,t)=>{Pr.init(e,t),du.init(e,t)});const jc=fe("ZodPipe",(e,t)=>{jr.init(e,t),du.init(e,t),e.in=t.in,e.out=t.out});function Rc(e,t){return new jc({type:"pipe",in:e,out:t})}const Lc=fe("ZodCodec",(e,t)=>{jc.init(e,t),Lr.init(e,t)});const Zc=fe("ZodReadonly",(e,t)=>{Fr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mc(e){return new Zc({type:"readonly",innerType:e})}const Fc=fe("ZodTemplateLiteral",(e,t)=>{Jr.init(e,t),du.init(e,t)});const Bc=fe("ZodLazy",(e,t)=>{Wr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Jc(e){return new Bc({type:"lazy",getter:e})}const Vc=fe("ZodPromise",(e,t)=>{Gr.init(e,t),du.init(e,t),e.unwrap=()=>e._zod.def.innerType});const Gc=fe("ZodFunction",(e,t)=>{Vr.init(e,t),du.init(e,t)});function Wc(e){return new Gc({type:"function",input:Array.isArray(e?.input)?dc(e?.input):e?.input??nc(Hu()),output:e?.output??Hu()})}const Kc=fe("ZodCustom",(e,t)=>{Kr.init(e,t),du.init(e,t)});function qc(e,t={}){return Ta(Kc,e,t)}function Hc(e){return Da(e)}var Qc;Qc||(Qc={});var Yc=Object.freeze({__proto__:null,bigint:function(e){return Ms(Fu,e)},boolean:function(e){return Ls(Zu,e)},date:function(e){return Ys(ec,e)},number:function(e){return Ds(Pu,e)},string:function(e){return is(pu,e)}});_e(so());var Xc=Object.freeze({__proto__:null,$brand:he,$input:Yo,$output:Qo,NEVER:pe,TimePrecision:xs,ZodAny:Ku,ZodArray:tc,ZodBase64:Tu,ZodBase64URL:Du,ZodBigInt:Fu,ZodBigIntFormat:Bu,ZodBoolean:Zu,ZodCIDRv4:Nu,ZodCIDRv6:zu,ZodCUID:ku,ZodCUID2:wu,ZodCatch:Cc,ZodCodec:Lc,ZodCustom:Kc,ZodCustomStringFormat:Uu,ZodDate:ec,ZodDefault:Ec,ZodDiscriminatedUnion:ac,ZodE164:Au,ZodEmail:gu,ZodEmoji:bu,ZodEnum:gc,ZodError:Qa,ZodFile:bc,get ZodFirstPartyTypeKind(){return Qc},ZodFunction:Gc,ZodGUID:vu,ZodIPv4:Eu,ZodIPv6:Ou,ZodISODate:Ba,ZodISODateTime:Ma,ZodISODuration:Wa,ZodISOTime:Va,ZodIntersection:uc,ZodIssueCode:{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"},ZodJWT:Cu,ZodKSUID:xu,ZodLazy:Bc,ZodLiteral:yc,ZodMap:fc,ZodNaN:Pc,ZodNanoID:$u,ZodNever:Qu,ZodNonOptional:Tc,ZodNull:Gu,ZodNullable:Ic,ZodNumber:Pu,ZodNumberFormat:Ru,ZodObject:ic,ZodOptional:wc,ZodPipe:jc,ZodPrefault:Nc,ZodPromise:Vc,ZodReadonly:Zc,ZodRealError:Ya,ZodRecord:mc,ZodSet:hc,ZodString:pu,ZodStringFormat:hu,ZodSuccess:Ac,ZodSymbol:Ju,ZodTemplateLiteral:Fc,ZodTransform:$c,ZodTuple:lc,ZodType:du,ZodULID:Su,ZodURL:_u,ZodUUID:yu,ZodUndefined:Vu,ZodUnion:oc,ZodUnknown:qu,ZodVoid:Xu,ZodXID:Iu,_ZodString:mu,_default:Oc,_function:Wc,any:function(){return Ws(Ku)},array:nc,base64:function(e){return ks(Tu,e)},base64url:function(e){return ws(Du,e)},bigint:function(e){return Zs(Fu,e)},boolean:Mu,catch:Uc,check:function(e){const t=new Mn({check:"custom"});return t._zod.check=e,t},cidrv4:function(e){return bs(Nu,e)},cidrv6:function(e){return $s(zu,e)},clone:Ze,codec:function(e,t,n){return new Lc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})},coerce:Yc,config:_e,core:Za,cuid:function(e){return ps(ku,e)},cuid2:function(e){return fs(wu,e)},custom:function(e,t){return za(Kc,e??(()=>!0),t)},date:function(e){return Qs(ec,e)},decode:ru,decodeAsync:su,discriminatedUnion:function(e,t,n){return new ac({type:"union",options:t,discriminator:e,...Me(n)})},e164:function(e){return Ss(Au,e)},email:function(e){return rs(gu,e)},emoji:function(e){return ds(bu,e)},encode:iu,encodeAsync:ou,endsWith:ba,enum:vc,file:function(e){return Na(bc,e)},flattenError:mt,float32:function(e){return Cs(Ru,e)},float64:function(e){return Us(Ru,e)},formatError:pt,function:Wc,getErrorMap:function(){return _e().customError},globalRegistry:ts,gt:na,gte:ia,guid:function(e){return os(vu,e)},hash:function(e,t){const n=`${e}_${t?.enc??"hex"}`,i=Zn[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ua(Uu,n,i,t)},hex:function(e){return Ua(Uu,"hex",En,e)},hostname:function(e){return Ua(Uu,"hostname",ln,e)},httpUrl:function(e){return ls(_u,{protocol:/^https?$/,hostname:dn,...Me(e)})},includes:ya,instanceof:function(e,t={error:`Input not instance of ${e.name}`}){const n=new Kc({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...Me(t)});return n._zod.bag.Class=e,n},int:Lu,int32:function(e){return Ps(Ru,e)},int64:function(e){return Fs(Bu,e)},intersection:cc,ipv4:function(e){return ys(Eu,e)},ipv6:function(e){return _s(Ou,e)},iso:qa,json:function(e){const t=Jc(()=>sc([fu(e),ju(),Mu(),Wu(),nc(t),pc(fu(),t)]));return t},jwt:function(e){return Is(Cu,e)},keyof:function(e){const t=e._zod.def.shape;return vc(Object.keys(t))},ksuid:function(e){return vs(xu,e)},lazy:Jc,length:fa,literal:_c,locales:Ho,looseObject:function(e,t){return new ic({type:"object",shape:e,catchall:Hu(),...Me(t)})},lowercase:ga,lt:ea,lte:ta,map:function(e,t,n){return new fc({type:"map",keyType:e,valueType:t,...Me(n)})},maxLength:ma,maxSize:ca,mime:ka,minLength:pa,minSize:la,multipleOf:ua,nan:function(e){return Xs(Pc,e)},nanoid:function(e){return ms($u,e)},nativeEnum:function(e,t){return new gc({type:"enum",entries:e,...Me(t)})},negative:oa,never:Yu,nonnegative:aa,nonoptional:Dc,nonpositive:sa,normalize:Sa,null:Wu,nullable:xc,nullish:function(e){return Sc(xc(e))},number:ju,object:rc,optional:Sc,overwrite:wa,parse:Xa,parseAsync:eu,partialRecord:function(e,t,n){const i=Ze(e);return i._zod.values=void 0,new mc({type:"record",keyType:i,valueType:t,...Me(n)})},pipe:Rc,positive:ra,prefault:zc,preprocess:function(e,t){return Rc(kc(e),t)},prettifyError:gt,promise:function(e){return new Vc({type:"promise",innerType:e})},property:$a,readonly:Mc,record:pc,refine:qc,regex:ha,regexes:Zn,registry:es,safeDecode:uu,safeDecodeAsync:lu,safeEncode:au,safeEncodeAsync:cu,safeParse:tu,safeParseAsync:nu,set:function(e,t){return new hc({type:"set",valueType:e,...Me(t)})},setErrorMap:function(e){_e({customError:e})},size:da,startsWith:_a,strictObject:function(e,t){return new ic({type:"object",shape:e,catchall:Yu(),...Me(t)})},string:fu,stringFormat:function(e,t,n={}){return Ua(Uu,e,t,n)},stringbool:(...e)=>Ca({Codec:Lc,Boolean:Zu,String:pu},...e),success:function(e){return new Ac({type:"success",innerType:e})},superRefine:Hc,symbol:function(e){return Js(Ju,e)},templateLiteral:function(e,t){return new Fc({type:"template_literal",parts:e,...Me(t)})},toJSONSchema:ja,toLowerCase:xa,toUpperCase:Ea,transform:kc,treeifyError:ft,trim:Ia,tuple:dc,uint32:function(e){return js(Ru,e)},uint64:function(e){return Bs(Bu,e)},ulid:function(e){return hs(Su,e)},undefined:function(e){return Vs(Vu,e)},union:sc,unknown:Hu,uppercase:va,url:function(e){return ls(_u,e)},util:ut,uuid:function(e){return ss(yu,e)},uuidv4:function(e){return as(yu,e)},uuidv6:function(e){return us(yu,e)},uuidv7:function(e){return cs(yu,e)},void:function(e){return Hs(Xu,e)},xid:function(e){return gs(Iu,e)}});const el="directus:extension",tl=rc({app:fu(),api:fu()}),nl=rc({request:Sc(rc({urls:nc(fu()),methods:nc(sc([_c("GET"),_c("POST"),_c("PATCH"),_c("PUT"),_c("DELETE")]))})),log:Sc(rc({})),sleep:Sc(rc({}))}),il=Sc(rc({enabled:Mu(),requestedScopes:nl})),rl=sc([rc({type:vc(G),name:fu(),source:fu()}),rc({type:vc(V),name:fu(),source:fu()}),rc({type:vc(W),name:fu(),source:tl})]),ol=rc({host:fu(),hidden:Mu().optional()}),sl=rc({type:vc(V),path:fu(),source:fu()}),al=rc({type:vc(G),path:fu(),source:fu(),sandbox:il}),ul=rc({type:vc(W),path:tl,source:tl,sandbox:il}),cl=rc({type:_c("bundle"),partial:Mu().optional(),path:tl,entries:nc(rl)});nc(rl);const ll=ol.and(sc([sl,al,ul,cl]));rc({name:fu(),version:fu(),type:sc([_c("module"),_c("commonjs")]).optional(),description:fu().optional(),icon:fu().optional(),dependencies:pc(fu(),fu()).optional(),devDependencies:pc(fu(),fu()).optional(),[el]:ll});var dl=/^(?:[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 ml(e){if(!function(e){return"string"==typeof e&&dl.test(e)}(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)}const pl=[];for(let e=0;e<256;++e)pl.push((e+256).toString(16).slice(1));function fl(e,t=0){return(pl[e[t+0]]+pl[e[t+1]]+pl[e[t+2]]+pl[e[t+3]]+"-"+pl[e[t+4]]+pl[e[t+5]]+"-"+pl[e[t+6]]+pl[e[t+7]]+"-"+pl[e[t+8]]+pl[e[t+9]]+"-"+pl[e[t+10]]+pl[e[t+11]]+pl[e[t+12]]+pl[e[t+13]]+pl[e[t+14]]+pl[e[t+15]]).toLowerCase()}const hl=new Uint8Array(16);function gl(e,t,n,i,r,o){const s="string"==typeof n?function(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}(n):n,a="string"==typeof i?ml(i):i;if("string"==typeof i&&(i=ml(i)),16!==i?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+s.length);if(u.set(a),u.set(s,a.length),u=t(u),u[6]=15&u[6]|e,u[8]=63&u[8]|128,r){if(o??=0,o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let e=0;e<16;++e)r[o+e]=u[e];return r}return fl(u)}function vl(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),t("sha1").update(e).digest()}function yl(e,t,n,i){return gl(80,vl,e,t,n,i)}yl.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",yl.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";const _l={};function bl(e,t,n){let i;{const e=Date.now(),r=crypto.getRandomValues(hl);!function(e,t,n){e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++)}(_l,e,r),i=function(e,t,n,i,r=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(i){if(r<0||r+16>i.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`)}else i=new Uint8Array(16),r=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],i[r++]=t/1099511627776&255,i[r++]=t/4294967296&255,i[r++]=t/16777216&255,i[r++]=t/65536&255,i[r++]=t/256&255,i[r++]=255&t,i[r++]=112|n>>>28&15,i[r++]=n>>>20&255,i[r++]=128|n>>>14&63,i[r++]=n>>>6&255,i[r++]=n<<2&255|3&e[10],i[r++]=e[11],i[r++]=e[12],i[r++]=e[13],i[r++]=e[14],i[r++]=e[15],i}(r,_l.msecs,_l.seq,t,n)}return t??fl(i)}function $l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function kl(e){return"string"==typeof e}function wl(e){return kl(e)&&e.trim().length>0}function Sl(e){return"function"==typeof e}const Il=yl.URL;var xl,El,Ol,Nl,zl,Tl,Dl,Al,Cl,Ul,Pl,jl,Rl,Ll,Zl,Ml,Fl,Bl,Jl,Vl,Gl,Wl,Kl,ql,Hl,Ql,Yl,Xl,ed,td,nd,id,rd,od,sd,ad,ud,cd,ld,dd,md,pd,fd,hd,gd,vd,yd,_d,bd,$d,kd,wd,Sd,Id,xd,Ed,Od,Nd,zd,Td,Dd,Ad,Cd={},Ud={};function Pd(){return Nl?Ol:(Nl=1,Ol=class{constructor(e={}){this.points=e.points,this.duration=e.duration,this.blockDuration=e.blockDuration,this.execEvenly=e.execEvenly,this.execEvenlyMinDelayMs=e.execEvenlyMinDelayMs,this.keyPrefix=e.keyPrefix}get points(){return this._points}set points(e){this._points=e>=0?e:4}get duration(){return this._duration}set duration(e){this._duration=void 0===e?1:e}get msDuration(){return 1e3*this.duration}get blockDuration(){return this._blockDuration}set blockDuration(e){this._blockDuration=void 0===e?0:e}get msBlockDuration(){return 1e3*this.blockDuration}get execEvenly(){return this._execEvenly}set execEvenly(e){this._execEvenly=void 0!==e&&Boolean(e)}get execEvenlyMinDelayMs(){return this._execEvenlyMinDelayMs}set execEvenlyMinDelayMs(e){this._execEvenlyMinDelayMs=void 0===e?Math.ceil(this.msDuration/this.points):e}get keyPrefix(){return this._keyPrefix}set keyPrefix(e){if(void 0===e&&(e="rlflx"),"string"!=typeof e)throw new Error("keyPrefix must be string");this._keyPrefix=e}_getKeySecDuration(e={}){return e&&e.customDuration>=0?e.customDuration:this.duration}getKey(e){return this.keyPrefix.length>0?`${this.keyPrefix}:${e}`:e}parseKey(e){return e.substring(this.keyPrefix.length)}consume(){throw new Error("You have to implement the method 'consume'!")}penalty(){throw new Error("You have to implement the method 'penalty'!")}reward(){throw new Error("You have to implement the method 'reward'!")}get(){throw new Error("You have to implement the method 'get'!")}set(){throw new Error("You have to implement the method 'set'!")}block(){throw new Error("You have to implement the method 'block'!")}delete(){throw new Error("You have to implement the method 'delete'!")}})}function jd(){if(Al)return Dl;Al=1;const e=(Tl||(Tl=1,zl=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const e=Date.now();Object.keys(this._keys).forEach(t=>{this._keys[t]<=e&&delete this._keys[t]}),this._addedKeysAmount=Object.keys(this._keys).length}add(e,t){this.addMs(e,1e3*t)}addMs(e,t){this._keys[e]=Date.now()+t,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(e){const t=this._keys[e];if(t&&t>=Date.now()){this.collectExpired();const e=Date.now();return t>=e?t-e:0}return 0}delete(e){e?delete this._keys[e]:Object.keys(this._keys).forEach(e=>{delete this._keys[e]})}}),zl);return Dl=e}function Rd(){return Ul||(Ul=1,Cl=class{constructor(e,t,n,i){this.remainingPoints=void 0===e?0:e,this.msBeforeNext=void 0===t?0:t,this.consumedPoints=void 0===n?0:n,this.isFirstInDuration=void 0!==i&&i}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(e){return this._msBeforeNext=e,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(e){return this._remainingPoints=e,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(e){return this._consumedPoints=e,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(e){this._isFirstInDuration=Boolean(e)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}}),Cl}function Ld(){if(jl)return Pl;jl=1;const e=Pd(),t=jd(),n=Rd();return Pl=class extends e{constructor(e={}){super(e),this.inMemoryBlockOnConsumed=e.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=e.inMemoryBlockDuration,this.insuranceLimiter=e.insuranceLimiter,this._inMemoryBlockedKeys=new t}get client(){return this._client}set client(e){if(void 0===e)throw new Error("storeClient is not set");this._client=e}_afterConsume(e,t,n,i,r,o={}){const s=this._getRateLimiterRes(n,i,r);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&s.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(n,s.msBeforeNext),s.consumedPoints>this.points?t(s):e(s);if(s.consumedPoints>this.points){let e=Promise.resolve();this.blockDuration>0&&s.consumedPoints<=this.points+i&&(s.msBeforeNext=this.msBlockDuration,e=this._block(n,s.consumedPoints,this.msBlockDuration,o)),this.inMemoryBlockOnConsumed>0&&s.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(n,this.inMemoryBlockDuration),s.msBeforeNext=this.msInMemoryBlockDuration),e.then(()=>{t(s)}).catch(e=>{t(e)})}else if(this.execEvenly&&s.msBeforeNext>0&&!s.isFirstInDuration){let t=Math.ceil(s.msBeforeNext/(s.remainingPoints+2));t<this.execEvenlyMinDelayMs&&(t=s.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(e,t,s)}else e(s)}_handleError(t,n,i,r,o,s=!1,a={}){this.insuranceLimiter instanceof e?this.insuranceLimiter[n](o,s,a).then(e=>{i(e)}).catch(e=>{r(e)}):r(t)}getInMemoryBlockMsBeforeExpire(e){return this.inMemoryBlockOnConsumed>0?this._inMemoryBlockedKeys.msBeforeExpire(e):0}get inMemoryBlockOnConsumed(){return this._inMemoryBlockOnConsumed}set inMemoryBlockOnConsumed(e){if(this._inMemoryBlockOnConsumed=e?parseInt(e):0,this.inMemoryBlockOnConsumed>0&&this.points>this.inMemoryBlockOnConsumed)throw new Error('inMemoryBlockOnConsumed option must be greater or equal "points" option')}get inMemoryBlockDuration(){return this._inMemoryBlockDuration}set inMemoryBlockDuration(e){if(this._inMemoryBlockDuration=e?parseInt(e):0,this.inMemoryBlockDuration>0&&0===this.inMemoryBlockOnConsumed)throw new Error("inMemoryBlockOnConsumed option must be set up")}get msInMemoryBlockDuration(){return 1e3*this._inMemoryBlockDuration}get insuranceLimiter(){return this._insuranceLimiter}set insuranceLimiter(t){if(void 0!==t&&!(t instanceof e))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=t,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(e,t,n={}){const i=1e3*t;return this._block(this.getKey(e),this.points+1,i,n)}set(e,t,n,i={}){const r=1e3*(n>=0?n:this.duration);return this._block(this.getKey(e),t,r,i)}consume(e,t=1,i={}){return new Promise((r,o)=>{const s=this.getKey(e),a=this.getInMemoryBlockMsBeforeExpire(s);if(a>0)return o(new n(0,a));this._upsert(s,t,1e3*this._getKeySecDuration(i),!1,i).then(e=>{this._afterConsume(r,o,s,t,e)}).catch(n=>{this._handleError(n,"consume",r,o,e,t,i)})})}penalty(e,t=1,n={}){const i=this.getKey(e);return new Promise((r,o)=>{this._upsert(i,t,1e3*this._getKeySecDuration(n),!1,n).then(e=>{r(this._getRateLimiterRes(i,t,e))}).catch(i=>{this._handleError(i,"penalty",r,o,e,t,n)})})}reward(e,t=1,n={}){const i=this.getKey(e);return new Promise((r,o)=>{this._upsert(i,-t,1e3*this._getKeySecDuration(n),!1,n).then(e=>{r(this._getRateLimiterRes(i,-t,e))}).catch(i=>{this._handleError(i,"reward",r,o,e,t,n)})})}get(e,t={}){const n=this.getKey(e);return new Promise((i,r)=>{this._get(n,t).then(e=>{i(null==e?null:this._getRateLimiterRes(n,0,e))}).catch(n=>{this._handleError(n,"get",i,r,e,t)})})}delete(e,t={}){const n=this.getKey(e);return new Promise((i,r)=>{this._delete(n,t).then(e=>{this._inMemoryBlockedKeys.delete(n),i(e)}).catch(n=>{this._handleError(n,"delete",i,r,e,t)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(e,t,n){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(e,t,i,r={}){return new Promise((o,s)=>{this._upsert(e,t,i,!0,r).then(()=>{o(new n(0,i>0?i:-1,t))}).catch(t=>{this._handleError(t,"block",o,s,this.parseKey(e),i/1e3,r)})})}_get(e,t={}){throw new Error("You have to implement the method '_get'!")}_delete(e,t={}){throw new Error("You have to implement the method '_delete'!")}_upsert(e,t,n,i=!1,r={}){throw new Error("You have to implement the method '_upsert'!")}}}function Zd(){if(ql)return Kl;ql=1;const e=Wl?Gl:(Wl=1,Gl=class{constructor(e,t,n=null){this.value=e,this.expiresAt=t,this.timeoutId=n}get value(){return this._value}set value(e){this._value=parseInt(e)}get expiresAt(){return this._expiresAt}set expiresAt(e){e instanceof Date||!Number.isInteger(e)||(e=new Date(e)),this._expiresAt=e}get timeoutId(){return this._timeoutId}set timeoutId(e){this._timeoutId=e}}),t=Rd();return Kl=class{constructor(){this._storage={}}incrby(e,n,i){if(this._storage[e]){const r=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return!this._storage[e].expiresAt||r>0?(this._storage[e].value=this._storage[e].value+n,new t(0,r,this._storage[e].value,!1)):this.set(e,n,i)}return this.set(e,n,i)}set(n,i,r){const o=1e3*r;return this._storage[n]&&this._storage[n].timeoutId&&clearTimeout(this._storage[n].timeoutId),this._storage[n]=new e(i,o>0?new Date(Date.now()+o):null),o>0&&(this._storage[n].timeoutId=setTimeout(()=>{delete this._storage[n]},o),this._storage[n].timeoutId.unref&&this._storage[n].timeoutId.unref()),new t(0,0===o?-1:o,this._storage[n].value,!0)}get(e){if(this._storage[e]){const n=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return new t(0,n,this._storage[e].value,!1)}return null}delete(e){return!!this._storage[e]&&(this._storage[e].timeoutId&&clearTimeout(this._storage[e].timeoutId),delete this._storage[e],!0)}}}function Md(){if(Ql)return Hl;Ql=1;const e=Pd(),t=Zd(),n=Rd();return Hl=class extends e{constructor(e={}){super(e),this._memoryStorage=new t}consume(e,t=1,n={}){return new Promise((i,r)=>{const o=this.getKey(e),s=this._getKeySecDuration(n);let a=this._memoryStorage.incrby(o,t,s);if(a.remainingPoints=Math.max(this.points-a.consumedPoints,0),a.consumedPoints>this.points)this.blockDuration>0&&a.consumedPoints<=this.points+t&&(a=this._memoryStorage.set(o,a.consumedPoints,this.blockDuration)),r(a);else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let e=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));e<this.execEvenlyMinDelayMs&&(e=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(i,e,a)}else i(a)})}penalty(e,t=1,n={}){const i=this.getKey(e);return new Promise(e=>{const r=this._getKeySecDuration(n),o=this._memoryStorage.incrby(i,t,r);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)})}reward(e,t=1,n={}){const i=this.getKey(e);return new Promise(e=>{const r=this._getKeySecDuration(n),o=this._memoryStorage.incrby(i,-t,r);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)})}block(e,t){const i=1e3*t,r=this.points+1;return this._memoryStorage.set(this.getKey(e),r,t),Promise.resolve(new n(0,0===i?-1:i,r))}set(e,t,i){const r=1e3*(i>=0?i:this.duration);return this._memoryStorage.set(this.getKey(e),t,i),Promise.resolve(new n(0,0===r?-1:r,t))}get(e){const t=this._memoryStorage.get(this.getKey(e));return null!==t&&(t.remainingPoints=Math.max(this.points-t.consumedPoints,0)),Promise.resolve(t)}delete(e){return Promise.resolve(this._memoryStorage.delete(this.getKey(e)))}}}function Fd(){if(Xl)return Yl;Xl=1;const e=_,t=v,n=Pd(),i=Md(),r=Rd(),o="rate_limiter_flexible";let s=null;const a=function(e,t,n,i){let r;r=null===i||!0===i||!1===i?i:{remainingPoints:i.remainingPoints,msBeforeNext:i.msBeforeNext,consumedPoints:i.consumedPoints,isFirstInDuration:i.isFirstInDuration},e.send({channel:o,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:r})},u=function(e){setTimeout(()=>{this._initiated?process.send(e):void 0!==this._promises[e.promiseId]&&u.call(this,e)},30)},c=function(e,t,n,i,r){const s={channel:o,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:i,opts:r}};this._initiated?process.send(s):u.call(this,s)},l=function(e,t){if(!t||t.channel!==o||void 0===this._rateLimiters[t.keyPrefix])return!1;let n;switch(t.func){case"consume":n=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":n=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":n=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":n=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":n=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":n=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}n&&n.then(n=>{a(e,t,"resolve",n)}).catch(n=>{a(e,t,"reject",n)})},d=function(e){if(!e||e.channel!==o||e.keyPrefix!==this.keyPrefix)return!1;if(this._promises[e.promiseId]){let t;switch(clearTimeout(this._promises[e.promiseId].timeoutId),t=null===e.data||!0===e.data||!1===e.data?e.data:new r(e.data.remainingPoints,e.data.msBeforeNext,e.data.consumedPoints,e.data.isFirstInDuration),e.type){case"resolve":this._promises[e.promiseId].resolve(t);break;case"reject":this._promises[e.promiseId].reject(t);break;default:throw new Error(`RateLimiterCluster: no such message type '${e.type}'`)}delete this._promises[e.promiseId]}},m=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},p=function(e,n){const i=process.hrtime();let r=i[0].toString()+i[1].toString();return void 0!==this._promises[r]&&(r+=t.randomBytes(12).toString("base64")),this._promises[r]={resolve:e,reject:n,timeoutId:setTimeout(()=>{delete this._promises[r],n(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},r};return Yl={RateLimiterClusterMaster:class{constructor(){if(s)return s;this._rateLimiters={},e.setMaxListeners(0),e.on("message",(e,t)=>{t&&t.channel===o&&"init"===t.type?(void 0===this._rateLimiters[t.opts.keyPrefix]&&(this._rateLimiters[t.opts.keyPrefix]=new i(t.opts)),e.send({channel:o,type:"init",keyPrefix:t.opts.keyPrefix})):l.call(this,e,t)}),s=this}},RateLimiterClusterMasterPM2:class{constructor(e){if(s)return s;this._rateLimiters={},e.launchBus((t,n)=>{n.on("process:msg",t=>{const n=t.raw;if(n&&n.channel===o&&"init"===n.type)void 0===this._rateLimiters[n.opts.keyPrefix]&&(this._rateLimiters[n.opts.keyPrefix]=new i(n.opts)),e.sendDataToProcessId(t.process.pm_id,{data:{},topic:o,channel:o,type:"init",keyPrefix:n.opts.keyPrefix},(e,t)=>{e&&console.log(e,t)});else{l.call(this,{send:n=>{const i=n;i.topic=o,void 0===i.data&&(i.data={}),e.sendDataToProcessId(t.process.pm_id,i,(e,t)=>{e&&console.log(e,t)})}},n)}})}),s=this}},RateLimiterCluster:class extends n{get timeoutMs(){return this._timeoutMs}set timeoutMs(e){this._timeoutMs=void 0===e?5e3:Math.abs(parseInt(e))}constructor(e={}){super(e),process.setMaxListeners(0),this.timeoutMs=e.timeoutMs,this._initiated=!1,process.on("message",e=>{e&&e.channel===o&&"init"===e.type&&e.keyPrefix===this.keyPrefix?this._initiated=!0:d.call(this,e)}),process.send({channel:o,type:"init",opts:m.call(this)}),this._promises={}}consume(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"consume",o,e,t,n)})}penalty(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"penalty",o,e,t,n)})}reward(e,t=1,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"reward",o,e,t,n)})}block(e,t,n={}){return new Promise((i,r)=>{const o=p.call(this,i,r);c.call(this,"block",o,e,t,n)})}get(e,t={}){return new Promise((n,i)=>{const r=p.call(this,n,i);c.call(this,"get",r,e,t)})}delete(e,t={}){return new Promise((n,i)=>{const r=p.call(this,n,i);c.call(this,"delete",r,e,t)})}}}}function Bd(){if(cd)return ud;cd=1;const e=ad?sd:(ad=1,sd=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="CustomError",this.message=e,t&&(this.extra=t)}}),t=4294967295,n="limiter";ud=class{constructor(e,n={maxQueueSize:t}){this._queueLimiters={KEY_DEFAULT:new i(e,n)},this._limiterFlexible=e,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(e=n){return this._queueLimiters[e]?this._queueLimiters[e].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(e,t=n){return this._queueLimiters[t]||(this._queueLimiters[t]=new i(this._limiterFlexible,{key:t,maxQueueSize:this._maxQueueSize})),this._queueLimiters[t].removeTokens(e)}};class i{constructor(e,i={maxQueueSize:t,key:n}){this._key=i.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=e,this._maxQueueSize=i.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then(e=>null!==e?e.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((i,r)=>{t>n._limiterFlexible.points?r(new e(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`)):n._queue.length>0?n._queueRequest.call(n,i,r,t):n._limiterFlexible.consume(n._key,t).then(e=>{i(e.remainingPoints)}).catch(e=>{e instanceof Error?r(e):(n._queueRequest.call(n,i,r,t),null===n._waitTimeout&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),e.msBeforeNext)))})})}_queueRequest(t,n,i){const r=this;r._queue.length<r._maxQueueSize?r._queue.push({resolve:t,reject:n,tokens:i}):n(new e(`Number of requests reached it's maximum ${r._maxQueueSize}`))}_processFIFO(){const e=this;if(null!==e._waitTimeout&&(clearTimeout(e._waitTimeout),e._waitTimeout=null),0===e._queue.length)return;const t=e._queue.shift();e._limiterFlexible.consume(e._key,t.tokens).then(n=>{t.resolve(n.remainingPoints),e._processFIFO.call(e)}).catch(n=>{n instanceof Error?(t.reject(n),e._processFIFO.call(e)):(e._queue.unshift(t),null===e._waitTimeout&&(e._waitTimeout=setTimeout(e._processFIFO.bind(e),n.msBeforeNext)))})}}return ud}function Jd(){if(Nd)return Od;Nd=1;const e=Ld(),t=Rd(),n=Ed?xd:(Ed=1,xd=class extends Error{constructor(e){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="RateLimiterSetupError",this.message=e}});return Od=class extends e{constructor(e){if(super(e),!e.storeClient)throw new n('You need to set the option "storeClient" to an instance of class "Etcd3".');this.client=e.storeClient}_getRateLimiterRes(e,n,i){const r=new t;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.expire?Math.max(i.expire-Date.now(),0):-1,r}async _upsert(e,t,n,i=!1){const r=n>0?Date.now()+n:null;let o={points:t,expire:r};if(i)await this.client.put(e).value(JSON.stringify(o));else{const n=await this._get(e);o={points:(null!==n?n.points:0)+t,expire:r},await this.client.put(e).value(JSON.stringify(o))}return o}async _get(e){return this.client.get(e).string().then(e=>null!==e?JSON.parse(e):null)}async _delete(e){return this.client.delete().key(e).then(e=>"1"===e.deleted)}},Od}function Vd(){if(Td)return zd;Td=1;const e=Id?Sd:(Id=1,Sd=class extends Error{constructor(e){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="RateLimiterEtcdTransactionFailedError",this.message=e}}),t=Jd();return zd=class extends t{async _upsert(t,n,i,r=!1){const o=i>0?Date.now()+i:null;let s,a={points:n,expire:o};if(r)await this.client.put(t).value(JSON.stringify(a));else{if(!await this.client.if(t,"Version","===","0").then(this.client.put(t).value(JSON.stringify(a))).commit().then(e=>!!e.succeeded)){let i=!1;for(let e=0;e<5&&(s=await this._get(t),a={points:s.points+n,expire:o},i=await this.client.if(t,"Value","===",JSON.stringify(s)).then(this.client.put(t).value(JSON.stringify(a))).commit().then(e=>!!e.succeeded),!i);e++);if(!i)throw new e("Could not set new value in a transaction.")}}return a}},zd}!function(){if(El)return Cd;El=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.Redlock=Cd.Lock=Cd.ExecutionError=Cd.ResourceLockedError=void 0;const e=v,t=y,n=function(){if(xl)return Ud;xl=1,Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.ensureCommands=void 0;const e='\n -- Protected call to execute SELECT command if supported\n redis.pcall("SELECT", tonumber(ARGV[1]))\n',t=`\n ${e}\n\n -- Return 0 if an entry already exists.\n for i, key in ipairs(KEYS) do\n if redis.call("exists", key) == 1 then\n return 0\n end\n end\n\n -- Create an entry for each provided key.\n for i, key in ipairs(KEYS) do\n redis.call("set", key, ARGV[2], "PX", ARGV[3])\n end\n\n -- Return the number of entries added.\n return #KEYS\n`,n=`\n ${e}\n\n -- Return 0 if an entry exists with a *different* lock value.\n for i, key in ipairs(KEYS) do\n if redis.call("get", key) ~= ARGV[2] then\n return 0\n end\n end\n\n -- Update the entry for each provided key.\n for i, key in ipairs(KEYS) do\n redis.call("set", key, ARGV[2], "PX", ARGV[3])\n end\n\n -- Return the number of entries updated.\n return #KEYS\n`,i=`\n ${e}\n\n local count = 0\n for i, key in ipairs(KEYS) do\n -- Only remove entries for *this* lock value.\n if redis.call("get", key) == ARGV[2] then\n redis.pcall("del", key)\n count = count + 1\n end\n end\n\n -- Return the number of entries removed.\n return count\n`;return Ud.ensureCommands=function(e){"function"!=typeof e.acquireLock&&(e.defineCommand("acquireLock",{lua:t}),e.defineCommand("extendLock",{lua:n}),e.defineCommand("releaseLock",{lua:i}))},Ud}(),i={driftFactor:.01,retryCount:10,retryDelay:200,retryJitter:100,automaticExtensionThreshold:500,db:0};Object.freeze(i);class r extends Error{message;constructor(e){super(),this.message=e,this.name="ResourceLockedError"}}Cd.ResourceLockedError=r;class o extends Error{message;attempts;constructor(e,t){super(),this.message=e,this.attempts=t,this.name="ExecutionError"}}Cd.ExecutionError=o;class s{redlock;resources;value;attempts;expiration;settings;constructor(e,t,n,i,r,o){this.redlock=e,this.resources=t,this.value=n,this.attempts=i,this.expiration=r,this.settings=o}async release(){return this.redlock.release(this)}async extend(e){return this.redlock.extend(this,e,this.settings)}}Cd.Lock=s;class a extends t.EventEmitter{clients;settings;constructor(e,t={}){if(super(),this.on("error",()=>{}),this.clients=new Set(e),0===this.clients.size)throw new Error("Redlock must be instantiated with at least one redis client.");this.settings={driftFactor:"number"==typeof t.driftFactor?t.driftFactor:i.driftFactor,retryCount:"number"==typeof t.retryCount?t.retryCount:i.retryCount,retryDelay:"number"==typeof t.retryDelay?t.retryDelay:i.retryDelay,retryJitter:"number"==typeof t.retryJitter?t.retryJitter:i.retryJitter,automaticExtensionThreshold:"number"==typeof t.automaticExtensionThreshold?t.automaticExtensionThreshold:i.automaticExtensionThreshold,db:"number"==typeof t.db&&Number.isInteger(t.db)&&t.db>=0&&t.db<=15?t.db:i.db}}_hash(t){return(0,e.createHash)("sha1").update(t).digest("hex")}_random(){return(0,e.randomBytes)(16).toString("hex")}async quit(){const e=[];for(const t of this.clients)e.push(t.quit());await Promise.all(e)}async acquire(e,t,n){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");const i=this._random();try{const{attempts:r,start:o}=await this._execute("acquireLock",e,[this.settings.db,i,t],n),a=Math.round((n?.driftFactor??this.settings.driftFactor)*t)+2;return new s(this,e,i,r,o+t-a,n)}catch(t){throw await this._execute("releaseLock",e,[this.settings.db,i],{retryCount:0}).catch(()=>{}),t}}async release(e,t){return e.expiration=0,this._execute("releaseLock",e.resources,[this.settings.db,e.value],t)}async extend(e,t,n){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");if(e.expiration<Date.now())throw new o("Cannot extend an already-expired lock.",[]);const{attempts:i,start:r}=await this._execute("extendLock",e.resources,[this.settings.db,e.value,t],n);e.expiration=0;const a=Math.round((n?.driftFactor??this.settings.driftFactor)*t)+2;return new s(this,e.resources,e.value,i,r+t-a,n)}async _execute(e,t,n,i){const r=i?{...this.settings,...i}:this.settings,s=-1===r.retryCount?1/0:r.retryCount+1,a=[];for(;a.length<s;){const{vote:i,stats:o,start:u}=await this._attemptOperation(e,t,n);if(a.push(o),"for"===i)return{attempts:a,start:u};a.length<s&&await new Promise(e=>{setTimeout(e,Math.max(0,r.retryDelay+Math.floor((2*Math.random()-1)*r.retryJitter)),void 0)})}throw new o("The operation was unable to achieve a quorum during its retry window.",a)}async _attemptOperation(e,t,n){const i=Date.now();return await new Promise(r=>{const o=[];for(const i of this.clients)o.push(this._attemptOperationOnClient(i,e,t,n));const s={membershipSize:o.length,quorumSize:Math.floor(o.length/2)+1,votesFor:new Set,votesAgainst:new Map};let a;const u=new Promise(e=>{a=()=>e(s)}),c=e=>{switch(e.vote){case"for":s.votesFor.add(e.client);break;case"against":s.votesAgainst.set(e.client,e.error)}s.votesFor.size===s.quorumSize&&r({vote:"for",stats:u,start:i}),s.votesAgainst.size===s.quorumSize&&r({vote:"against",stats:u,start:i}),s.votesFor.size+s.votesAgainst.size===s.membershipSize&&a()},l=e=>{throw e};for(const e of o)e.then(c,l)})}async _attemptOperationOnClient(e,t,i,o){try{(0,n.ensureCommands)(e);const s=await e[t](i.length,...i,...o);if("number"!=typeof s)throw new Error(`Unexpected result of type ${typeof s} returned from redis.`);const a=s;if(a!==i.length)throw new r(`The operation was applied to: ${a} of the ${i.length} requested resources.`);return{vote:"for",client:e,value:a}}catch(t){if(!(t instanceof Error))throw new Error(`Unexpected type ${typeof t} thrown with value: ${t}`);return this.emit("error",t),{vote:"against",client:e,error:t}}}async using(e,t,n,i){if(Math.floor(t)!==t)throw new Error("Duration must be an integer value in milliseconds.");const r=n&&"function"!=typeof n?{...this.settings,...n}:this.settings,o=i??n;if("function"!=typeof o)throw new Error("INVARIANT: routine is not a function.");if(r.automaticExtensionThreshold>t-100)throw new Error("A lock `duration` must be at least 100ms greater than the `automaticExtensionThreshold` setting.");const s=new AbortController,a=s.signal;function u(){l=setTimeout(()=>d=c(),m.lock.expiration-Date.now()-r.automaticExtensionThreshold)}async function c(){l=void 0;try{m.lock=await m.lock.extend(t),m.extensions+=1,u()}catch(e){if(!(e instanceof Error))throw new Error(`Unexpected thrown ${typeof e}: ${e}.`);if(m.lock.expiration>Date.now())return d=c();a.error=e instanceof Error?e:new Error(`${e}`),s.abort()}}let l,d;const m={lock:await this.acquire(e,t,r),extensions:0};u();try{return await o(a,m)}finally{l&&(clearTimeout(l),l=void 0),d&&await d.catch(()=>{}),await m.lock.release()}}}Cd.Redlock=a}(),function(){if(Ad)return Dd;Ad=1;const e=function(){if(Ll)return Rl;Ll=1;const e=Ld(),t=Rd();return Rl=class extends e{constructor(e){super(e),this.client=e.storeClient,this._rejectIfRedisNotReady=!!e.rejectIfRedisNotReady,this._incrTtlLuaScript=e.customIncrTtlLuaScript||"redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then redis.call('expire', KEYS[1], ARGV[2]) ttl = 1000 * ARGV[2] end return {consumed, ttl} ",this.useRedisPackage=e.useRedisPackage||"Commander"===this.client.constructor.name||!1,this.useRedis3AndLowerPackage=e.useRedis3AndLowerPackage,"function"==typeof this.client.defineCommand&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isRedisReady(){return!(this._rejectIfRedisNotReady&&(this.client.status&&"ready"!==this.client.status||"function"==typeof this.client.isReady&&!this.client.isReady()))}_getRateLimiterRes(e,n,i){let[r,o]=i;Array.isArray(r)&&([,r]=r,[,o]=o);const s=new t;return s.consumedPoints=parseInt(r),s.isFirstInDuration=s.consumedPoints===n,s.remainingPoints=Math.max(this.points-s.consumedPoints,0),s.msBeforeNext=o,s}async _upsert(e,t,n,i=!1){if("string"==typeof t){if(!RegExp("^[1-9][0-9]*$").test(t))throw new Error("Consuming string different than integer values is not supported by this package")}else if(!Number.isInteger(t))throw new Error("Consuming decimal number of points is not supported by this package");if(!this._isRedisReady())throw new Error("Redis connection is not ready");const r=Math.floor(n/1e3),o=this.client.multi();return i?(r>0?this.useRedisPackage||this.useRedis3AndLowerPackage?o.set(e,t,{EX:r}):o.set(e,t,"EX",r):o.set(e,t),this.useRedisPackage||this.useRedis3AndLowerPackage?o.pTTL(e).exec(!0):o.pttl(e).exec(!0)):r>0?this.useRedisPackage||this.useRedis3AndLowerPackage?this.useRedis3AndLowerPackage?new Promise((n,i)=>{const o=function(e,t){return e?i(e):n(t)};"function"==typeof this.client.rlflxIncr?this.client.rlflxIncr(e,t,r,this.points,this.duration,o):this.client.eval(this._incrTtlLuaScript,1,e,t,r,this.points,this.duration,o)}):this.client.eval(this._incrTtlLuaScript,{keys:[e],arguments:[String(t),String(r),String(this.points),String(this.duration)]}):this.client.rlflxIncr([e].concat([String(t),String(r),String(this.points),String(this.duration)])):this.useRedisPackage||this.useRedis3AndLowerPackage?o.incrBy(e,t).pTTL(e).exec(!0):o.incrby(e,t).pttl(e).exec(!0)}async _get(e){if(!this._isRedisReady())throw new Error("Redis connection is not ready");return this.useRedisPackage||this.useRedis3AndLowerPackage?this.client.multi().get(e).pTTL(e).exec(!0).then(e=>{const[t]=e;return null===t?null:e}):this.client.multi().get(e).pttl(e).exec().then(e=>{const[[,t]]=e;return null===t?null:e})}_delete(e){return this.client.del(e).then(e=>e>0)}},Rl}(),t=function(){if(Ml)return Zl;Ml=1;const e=Ld(),t=Rd();function n(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(void 0===t.topology){const{version:e}=t.options.metadata.driver;n=e.split("|",1)[0].split(".").map(e=>parseInt(e))}else{const{version:e}=t.topology.s.options.metadata.driver;n=e.split(".").map(e=>parseInt(e))}return{major:n[0],feature:n[1],patch:n[2]}}catch(e){return{major:0,feature:0,patch:0}}}class i extends e{constructor(e){super(e),this.dbName=e.dbName,this.tableName=e.tableName,this.indexKeyPrefix=e.indexKeyPrefix,e.mongo?this.client=e.mongo:this.client=e.storeClient,"function"==typeof this.client.then?this.client.then(e=>{this.client=e,this._initCollection(),this._driverVersion=n(this.client)}):(this._initCollection(),this._driverVersion=n(this.client))}get dbName(){return this._dbName}set dbName(e){this._dbName=void 0===e?i.getDbName():e}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get client(){return this._client}set client(e){if(void 0===e)throw new Error("mongo is not set");this._client=e}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(e){this._indexKeyPrefix=e||{}}_initCollection(){const e=("function"==typeof this.client.db?this.client.db(this.dbName):this.client).collection(this.tableName);e.createIndex({expire:-1},{expireAfterSeconds:0}),e.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=e}_getRateLimiterRes(e,n,i){const r=new t;let o;return o=void 0===i.value?i:i.value,r.isFirstInDuration=o.points===n,r.consumedPoints=o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,r}_upsert(e,t,n,i=!1,r={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=r.attrs||{};let s,a;i?(s={key:e},s=Object.assign(s,o),a={$set:{key:e,points:t,expire:n>0?new Date(Date.now()+n):null}},a.$set=Object.assign(a.$set,o)):(s={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:e},s=Object.assign(s,o),a={$setOnInsert:{key:e,expire:n>0?new Date(Date.now()+n):null},$inc:{points:t}},a.$setOnInsert=Object.assign(a.$setOnInsert,o));const u={upsert:!0};return this._driverVersion.major>=4||3===this._driverVersion.major&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?u.returnDocument="after":u.returnOriginal=!1,new Promise((r,c)=>{this._collection.findOneAndUpdate(s,a,u).then(e=>{r(e)}).catch(s=>{if(s&&11e3===s.code){const s=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:e},o),a={$set:Object.assign({key:e,points:t,expire:n>0?new Date(Date.now()+n):null},o)};this._collection.findOneAndUpdate(s,a,u).then(e=>{r(e)}).catch(o=>{o&&11e3===o.code?this._upsert(e,t,n,i).then(e=>r(e)).catch(e=>c(e)):c(o)})}else c(s)})})}_get(e,t={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const n=t.attrs||{},i=Object.assign({key:e,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},n);return this._collection.findOne(i)}_delete(e,t={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const n=t.attrs||{},i=Object.assign({key:e},n);return this._collection.deleteOne(i).then(e=>e.deletedCount>0)}}return Zl=i}(),n=function(){if(Bl)return Fl;Bl=1;const e=Ld(),t=Rd();return Fl=class extends e{constructor(e,t=null){super(e),this.client=e.storeClient,this.clientType=e.storeType,this.dbName=e.dbName,this.tableName=e.tableName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}clearExpired(e){return new Promise(t=>{this._getConnection().then(n=>{n.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,e],()=>{this._releaseConnection(n),t()})}).catch(()=>{t()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise((e,t)=>{this.client.getConnection((n,i)=>{if(n)return t(n);e(i)})});case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(e){switch(this.clientType){case"pool":return e.release();case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e);default:return!0}}_createDbAndTable(){return new Promise((e,t)=>{this._getConnection().then(n=>{n.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(n),t(i);n.query(this._getCreateTableStmt(),i=>{if(i)return this._releaseConnection(n),t(i);this._releaseConnection(n),e()})})}).catch(e=>{t(e)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS \`${this.dbName}\`.\`${this.tableName}\` (\`key\` VARCHAR(255) CHARACTER SET utf8 NOT NULL,\`points\` INT(9) NOT NULL default 0,\`expire\` BIGINT UNSIGNED,PRIMARY KEY (\`key\`)) ENGINE = INNODB;`}get clientType(){return this._clientType}set clientType(e){if(void 0===e)if("Connection"===this.client.constructor.name)e="connection";else if("Pool"===this.client.constructor.name)e="pool";else{if("Sequelize"!==this.client.constructor.name)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get dbName(){return this._dbName}set dbName(e){this._dbName=void 0===e?"rtlmtrflx":e}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout=void 0===e||Boolean(e)}_getRateLimiterRes(e,n,i){const r=new t,[o]=i;return r.isFirstInDuration=n===o.points,r.consumedPoints=r.isFirstInDuration?n:o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,r}_upsertTransaction(e,t,n,i,r){return new Promise((o,s)=>{e.query("BEGIN",a=>{if(a)return e.rollback(),s(a);const u=Date.now(),c=i>0?u+i:null;let l,d;r?(l="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = ?, \n expire = ?;",d=[this.dbName,this.tableName,t,n,c,n,c]):(l="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = IF(expire <= ?, ?, points + (?)), \n expire = IF(expire <= ?, ?, expire);",d=[this.dbName,this.tableName,t,n,c,u,n,n,u,c]),e.query(l,d,n=>{if(n)return e.rollback(),s(n);e.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,t],(t,n)=>{if(t)return e.rollback(),s(t);e.query("COMMIT",t=>{if(t)return e.rollback(),s(t);o(n)})})})})})}_upsert(e,t,n,i=!1){return this.tableCreated?new Promise((r,o)=>{this._getConnection().then(s=>{this._upsertTransaction(s,e,t,n,i).then(e=>{r(e),this._releaseConnection(s)}).catch(e=>{o(e),this._releaseConnection(s)})}).catch(e=>{o(e)})}):Promise.reject(Error("Table is not created yet"))}_get(e){return this.tableCreated?new Promise((t,n)=>{this._getConnection().then(i=>{i.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,e,Date.now()],(e,r)=>{e?n(e):0===r.length?t(null):t(r),this._releaseConnection(i)})}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?new Promise((t,n)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,e],(e,r)=>{e?n(e):t(r.affectedRows>0),this._releaseConnection(i)})}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}},Fl}(),i=function(){if(Vl)return Jl;Vl=1;const e=Ld(),t=Rd();return Jl=class extends e{constructor(e,t=null){super(e),this.client=e.storeClient,this.clientType=e.storeType,this.tableName=e.tableName,this.schemaName=e.schemaName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(e){return new Promise(t=>{const n={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[e]};this._query(n).then(()=>{t()}).catch(()=>{t()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":default:return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master)}}_releaseConnection(e){switch(this.clientType){case"pool":case"typeorm":default:return!0;case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e)}}_createTable(){return new Promise((e,t)=>{this._query({text:this._getCreateTableStmt()}).then(()=>{e()}).catch(n=>{"23505"===n.code?e():t(n)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS ${this._getTableIdentifier()} (\n key varchar(255) PRIMARY KEY,\n points integer NOT NULL DEFAULT 0,\n expire bigint\n );`}get clientType(){return this._clientType}set clientType(e){const t=this.client.constructor.name;if(void 0===e)if("Client"===t)e="client";else if("Pool"===t||"BoundPool"===t)e="pool";else{if("Sequelize"!==t)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?this.keyPrefix:e}get schemaName(){return this._schemaName}set schemaName(e){this._schemaName=e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout=void 0===e||Boolean(e)}_getRateLimiterRes(e,n,i){const r=new t,o=i.rows[0];return r.isFirstInDuration=n===o.points,r.consumedPoints=r.isFirstInDuration?n:o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,r}_query(e){const t={name:`${this.tableName.toLowerCase()}:${e.name}`,text:e.text,values:e.values};return new Promise((e,n)=>{this._getConnection().then(i=>{i.query(t).then(t=>{e(t),this._releaseConnection(i)}).catch(e=>{n(e),this._releaseConnection(i)})}).catch(e=>{n(e)})})}_upsert(e,t,n,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const r=n>0?Date.now()+n:null,o=i?" $3 ":` CASE\n WHEN ${this._getTableIdentifier()}.expire <= $4 THEN $3\n ELSE ${this._getTableIdentifier()}.expire\n END `;return this._query({name:i?"rlflx-upsert-force":"rlflx-upsert",text:`\n INSERT INTO ${this._getTableIdentifier()} VALUES ($1, $2, $3)\n ON CONFLICT(key) DO UPDATE SET\n points = CASE\n WHEN (${this._getTableIdentifier()}.expire <= $4 OR 1=${i?1:0}) THEN $2\n ELSE ${this._getTableIdentifier()}.points + ($2)\n END,\n expire = ${o}\n RETURNING points, expire;`,values:[e,t,r,Date.now()]})}_get(e){return this.tableCreated?new Promise((t,n)=>{this._query({name:"rlflx-get",text:`\n SELECT points, expire FROM ${this._getTableIdentifier()} WHERE key = $1 AND (expire > $2 OR expire IS NULL);`,values:[e,Date.now()]}).then(e=>{0===e.rowCount&&(e=null),t(e)}).catch(e=>{n(e)})}):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?this._query({name:"rlflx-delete",text:`DELETE FROM ${this._getTableIdentifier()} WHERE key = $1`,values:[e]}).then(e=>e.rowCount>0):Promise.reject(Error("Table is not created yet"))}},Jl}(),{RateLimiterClusterMaster:r,RateLimiterClusterMasterPM2:o,RateLimiterCluster:s}=Fd(),a=Md(),u=function(){if(td)return ed;td=1;const e=Ld(),t=Rd();return ed=class extends e{constructor(e){super(e),this.client=e.storeClient}_getRateLimiterRes(e,n,i){const r=new t;return r.consumedPoints=parseInt(i.consumedPoints),r.isFirstInDuration=i.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.msBeforeNext,r}_upsert(e,t,n,i=!1,r={}){return new Promise((o,s)=>{const a=Date.now(),u=Math.floor(n/1e3);i?this.client.set(e,t,u,n=>{n?s(n):this.client.set(`${e}_expire`,u>0?a+1e3*u:-1,u,()=>{o({consumedPoints:t,msBeforeNext:u>0?1e3*u:-1})})}):this.client.incr(e,t,(c,l)=>{c||!1===l?this.client.add(e,t,u,(c,l)=>{if(c||!l)if(void 0===r.attemptNumber||r.attemptNumber<3){const a=Object.assign({},r);a.attemptNumber=a.attemptNumber?a.attemptNumber+1:1,this._upsert(e,t,n,i,a).then(e=>o(e)).catch(e=>s(e))}else s(new Error("Can not add key"));else this.client.add(`${e}_expire`,u>0?a+1e3*u:-1,u,()=>{o({consumedPoints:t,msBeforeNext:u>0?1e3*u:-1})})}):this.client.get(`${e}_expire`,(e,t)=>{if(e)s(e);else{const e=!1===t?0:t,n={consumedPoints:l,msBeforeNext:e>=0?Math.max(e-a,0):-1};o(n)}})})})}_get(e){return new Promise((t,n)=>{const i=Date.now();this.client.get(e,(r,o)=>{o?this.client.get(`${e}_expire`,(e,r)=>{if(e)n(e);else{const e=!1===r?0:r,n={consumedPoints:o,msBeforeNext:e>=0?Math.max(e-i,0):-1};t(n)}}):t(null)})})}_delete(e){return new Promise((t,n)=>{this.client.del(e,(i,r)=>{i?n(i):!1===r?t(r):this.client.del(`${e}_expire`,e=>{e?n(e):t(r)})})})}}}(),c=function(){if(id)return nd;id=1;const e=Rd();return nd=class{constructor(e={}){this.limiter=e.limiter,this.blackList=e.blackList,this.whiteList=e.whiteList,this.isBlackListed=e.isBlackListed,this.isWhiteListed=e.isWhiteListed,this.runActionAnyway=e.runActionAnyway}get limiter(){return this._limiter}set limiter(e){if(void 0===e)throw new Error("limiter is not set");this._limiter=e}get runActionAnyway(){return this._runActionAnyway}set runActionAnyway(e){this._runActionAnyway=void 0!==e&&e}get blackList(){return this._blackList}set blackList(e){this._blackList=Array.isArray(e)?e:[]}get isBlackListed(){return this._isBlackListed}set isBlackListed(e){if(void 0===e&&(e=()=>!1),"function"!=typeof e)throw new Error("isBlackListed must be function");this._isBlackListed=e}get whiteList(){return this._whiteList}set whiteList(e){this._whiteList=Array.isArray(e)?e:[]}get isWhiteListed(){return this._isWhiteListed}set isWhiteListed(e){if(void 0===e&&(e=()=>!1),"function"!=typeof e)throw new Error("isWhiteListed must be function");this._isWhiteListed=e}isBlackListedSomewhere(e){return this.blackList.indexOf(e)>=0||this.isBlackListed(e)}isWhiteListedSomewhere(e){return this.whiteList.indexOf(e)>=0||this.isWhiteListed(e)}getBlackRes(){return new e(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new e(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(e,t=1){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.rejectBlack()),void 0===n?this.limiter.consume(e,t):(this.runActionAnyway&&this.limiter.consume(e,t).catch(()=>{}),n)}block(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.block(e,t):(this.runActionAnyway&&this.limiter.block(e,t).catch(()=>{}),n)}penalty(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.penalty(e,t):(this.runActionAnyway&&this.limiter.penalty(e,t).catch(()=>{}),n)}reward(e,t){let n;return this.isWhiteListedSomewhere(e)?n=this.resolveWhite():this.isBlackListedSomewhere(e)&&(n=this.resolveBlack()),void 0===n?this.limiter.reward(e,t):(this.runActionAnyway&&this.limiter.reward(e,t).catch(()=>{}),n)}get(e){let t;return this.isWhiteListedSomewhere(e)?t=this.resolveWhite():this.isBlackListedSomewhere(e)&&(t=this.resolveBlack()),void 0===t||this.runActionAnyway?this.limiter.get(e):t}delete(e){return this.limiter.delete(e)}}}(),l=function(){if(od)return rd;od=1;const e=Pd();return rd=class{constructor(...t){if(t.length<1)throw new Error("RateLimiterUnion: at least one limiter have to be passed");t.forEach(t=>{if(!(t instanceof e))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(e,t=1){return new Promise((n,i)=>{const r=[];this._limiters.forEach(n=>{r.push(n.consume(e,t).catch(e=>({rejected:!0,rej:e})))}),Promise.all(r).then(e=>{const t={};let r=!1;e.forEach(e=>{!0===e.rejected&&(r=!0)});for(let n=0;n<e.length;n++)r&&!0===e[n].rejected?t[this._limiters[n].keyPrefix]=e[n].rej:r||(t[this._limiters[n].keyPrefix]=e[n]);r?i(t):n(t)})})}}}(),d=Bd(),m=function(){if(dd)return ld;dd=1;const e=Rd();return ld=class{constructor(e,t){this._rateLimiter=e,this._burstLimiter=t}_combineRes(t,n){return t?new e(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,i={}){return this._rateLimiter.consume(t,n,i).catch(r=>r instanceof e?this._burstLimiter.consume(t,n,i).then(e=>Promise.resolve(this._combineRes(r,e))).catch(t=>t instanceof e?Promise.reject(this._combineRes(r,t)):Promise.reject(t)):Promise.reject(r))}get(e){return Promise.all([this._rateLimiter.get(e),this._burstLimiter.get(e)]).then(([e,t])=>this._combineRes(e,t))}get points(){return this._rateLimiter.points}}}(),p=Rd(),f=function(){if(pd)return md;pd=1;const e=Rd(),t=Ld();class n{constructor(e,t,n){this.key=e,this.points=t,this.expire=n}}return md=class extends t{constructor(e,t=null){super(e),this.client=e.storeClient,this.tableName=e.tableName,this.tableCreated=e.tableCreated,this.ttlManuallySet=e.ttlSet,this.tableCreated?this._setTTL().finally(()=>{"function"==typeof t&&t()}):this._createTable(e.dynamoTableOpts).then(e=>{this.tableCreated=!0,this._setTTL().finally(()=>{"function"==typeof t&&t()})}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}get tableName(){return this._tableName}set tableName(e){this._tableName=void 0===e?"node-rate-limiter-flexible":e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated=void 0!==e&&!!e}async _createTable(e){const t={TableName:this.tableName,AttributeDefinitions:[{AttributeName:"key",AttributeType:"S"}],KeySchema:[{AttributeName:"key",KeyType:"HASH"}],ProvisionedThroughput:{ReadCapacityUnits:e&&e.readCapacityUnits?e.readCapacityUnits:25,WriteCapacityUnits:e&&e.writeCapacityUnits?e.writeCapacityUnits:25}};try{return await this.client.createTable(t)}catch(e){if(e.__type&&e.__type.includes("ResourceInUseException"))return null;throw e}}async _get(e){if(!this.tableCreated)throw new Error("Table is not created yet");const t={TableName:this.tableName,Key:{key:{S:e}}},i=await this.client.getItem(t);return i.Item?new n(i.Item.key.S,Number(i.Item.points.N),Number(i.Item.expire.N)):null}async _delete(e){if(!this.tableCreated)throw new Error("Table is not created yet");const t={TableName:this.tableName,Key:{key:{S:e}},ConditionExpression:"attribute_exists(#k)",ExpressionAttributeNames:{"#k":"key"}};try{return 200===(await this._client.deleteItem(t)).$metadata.httpStatusCode}catch(e){if(e.__type&&e.__type.includes("ConditionalCheckFailedException"))return!1;throw e}}async _upsert(e,t,n,i=!1,r={}){if(!this.tableCreated)throw new Error("Table is not created yet");const o=Date.now(),s=o/1e3,a=n>0?(o+n)/1e3:-1;if(i)return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = :points, expire = :expire",ExpressionAttributeValues:{":points":{N:t.toString()},":expire":{N:a.toString()}},ReturnValues:"ALL_NEW"});try{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = :new_points, expire = :new_expire",ExpressionAttributeValues:{":new_points":{N:t.toString()},":new_expire":{N:a.toString()},":where_expire":{N:s.toString()}},ConditionExpression:"expire <= :where_expire OR attribute_not_exists(points)",ReturnValues:"ALL_NEW"})}catch(n){return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:e}},UpdateExpression:"SET points = points + :new_points",ExpressionAttributeValues:{":new_points":{N:t.toString()},":where_expire":{N:s.toString()}},ConditionExpression:"expire > :where_expire",ReturnValues:"ALL_NEW"})}}async _baseUpsert(e){if(!this.tableCreated)throw new Error("Table is not created yet");try{const t=await this.client.updateItem(e);return new n(t.Attributes.key.S,Number(t.Attributes.points.N),Number(t.Attributes.expire.N))}catch(e){throw e}}async _setTTL(){if(!this.tableCreated)throw new Error("Table is not created yet");try{if(await this._isTTLSet())return;const e={TableName:this.tableName,TimeToLiveSpecification:{AttributeName:"expire",Enabled:!0}};return await this.client.updateTimeToLive(e)}catch(e){throw e}}async _isTTLSet(){if(!this.tableCreated)throw new Error("Table is not created yet");if(this.ttlManuallySet)return!0;try{const e=await this.client.describeTimeToLive({TableName:this.tableName});return 200==e.$metadata.httpStatusCode&&"ENABLED"===e.TimeToLiveDescription.TimeToLiveStatus&&"expire"===e.TimeToLiveDescription.AttributeName}catch(e){throw e}}_getRateLimiterRes(t,n,i){const r=new e;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=-1!=i.expire?Math.max(1e3*i.expire-Date.now(),0):-1,r}}}(),h=function(){if(hd)return fd;hd=1;const e=Ld(),t=Rd();return fd=class extends e{constructor(e){if(super(e),this.modelName=e.tableName||"RateLimiterFlexible",this.prismaClient=e.storeClient,this.clearExpiredByTimeout=e.clearExpiredByTimeout||!0,!this.prismaClient)throw new Error("Prisma client is not provided");this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(e,n,i){const r=new t;let o=i;return r.isFirstInDuration=o.points===n,r.consumedPoints=o.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,r}_upsert(e,t,n,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const r=new Date,o=n>0?new Date(r.getTime()+n):null;return this.prismaClient.$transaction(async n=>{const s=await n[this.modelName].findFirst({where:{key:e}});if(s){const a=i||!s.expire||s.expire<=r||null===o;return n[this.modelName].update({where:{key:e},data:{points:a?t:s.points+t,...a&&{expire:o}}})}return n[this.modelName].create({data:{key:e,points:t,expire:o}})})}_get(e){return this.prismaClient?this.prismaClient[this.modelName].findFirst({where:{AND:[{key:e},{OR:[{expire:{gt:new Date}},{expire:null}]}]}}):Promise.reject(new Error("Prisma client is not established"))}_delete(e){return this.prismaClient?this.prismaClient[this.modelName].deleteMany({where:{key:e}}).then(e=>e.count>0):Promise.reject(new Error("Prisma client is not established"))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(async()=>{await this.prismaClient[this.modelName].deleteMany({where:{expire:{lt:new Date(Date.now()-36e5)}}}),this._clearExpiredHourAgo()},3e5),this._clearExpiredTimeoutId.unref()}}}(),g=function(){if(vd)return gd;vd=1;let e=null;class t extends Error{constructor(e){super(e),this.name="RateLimiterDrizzleError"}}function n(){if(e)return e;try{const{and:t,or:n,gt:i,lt:r,eq:o,isNull:s,sql:a}=require("drizzle-orm");return e={and:t,or:n,gt:i,lt:r,eq:o,isNull:s,sql:a},e}catch(e){throw new t("drizzle-orm is not installed. Please install drizzle-orm to use RateLimiterDrizzle.")}}const i=Ld(),r=Rd();return gd=class extends i{constructor(e){if(super(e),!e?.schema)throw new t("Drizzle schema is required");if(!e?.storeClient)throw new t("Drizzle client is required");this.schema=e.schema,this.drizzleClient=e.storeClient,this.clearExpiredByTimeout=e.clearExpiredByTimeout??!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(e,t,n){const i=new r;let o=n;return i.isFirstInDuration=o.points===t,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}async _upsert(e,i,r,o=!1){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{eq:s,sql:a}=n(),u=new Date,c=r>0?new Date(u.getTime()+r):null;return await this.drizzleClient.transaction(async t=>{const[n]=await t.select().from(this.schema).where(s(this.schema.key,e)).limit(1),r=o||!n?.expire||n?.expire<=u||null===c,[l]=await t.insert(this.schema).values({key:e,points:i,expire:c}).onConflictDoUpdate({target:this.schema.key,set:{points:r?i:a`${this.schema.points} + ${i}`,...r&&{expire:c}}}).returning();return l})}async _get(e){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{and:i,or:r,gt:o,eq:s,isNull:a}=n(),[u]=await this.drizzleClient.select().from(this.schema).where(i(s(this.schema.key,e),r(o(this.schema.expire,new Date),a(this.schema.expire)))).limit(1);return u||null}async _delete(e){if(!this.drizzleClient)return Promise.reject(new t("Drizzle client is not established"));const{eq:i}=n(),[r]=await this.drizzleClient.delete(this.schema).where(i(this.schema.key,e)).returning({key:this.schema.key});return!!r?.key}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId);const{lt:e}=n();this._clearExpiredTimeoutId=setTimeout(async()=>{try{await this.drizzleClient.delete(this.schema).where(e(this.schema.expire,new Date(Date.now()-36e5)))}catch(e){console.warn("Failed to clear expired records:",e)}this._clearExpiredHourAgo()},3e5),this._clearExpiredTimeoutId.unref()}},gd}(),v=function(){if(_d)return yd;_d=1;const e=Ld(),t=Rd();return yd=class extends e{constructor(e){super(e),this.client=e.storeClient,this._rejectIfValkeyNotReady=!!e.rejectIfValkeyNotReady,this._incrTtlLuaScript=e.customIncrTtlLuaScript||"\nserver.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX')\nlocal consumed = server.call('incrby', KEYS[1], ARGV[1])\nlocal ttl = server.call('pttl', KEYS[1])\nreturn {consumed, ttl}\n",this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isValkeyReady(){return!this._rejectIfValkeyNotReady||"ready"===this.client.status}_getRateLimiterRes(e,n,i){let r,o;Array.isArray(i[0])?[[,r],[,o]]=i:[r,o]=i;const s=new t;return s.consumedPoints=+r,s.isFirstInDuration=s.consumedPoints===n,s.remainingPoints=Math.max(this.points-s.consumedPoints,0),s.msBeforeNext=o,s}_upsert(e,t,n,i=!1){if(!this._isValkeyReady())throw new Error("Valkey connection is not ready");const r=Math.floor(n/1e3);if(i){const n=this.client.multi();return r>0?n.set(e,t,"EX",r):n.set(e,t),n.pttl(e).exec()}return r>0?this.client.rlflxIncr([e,String(t),String(r),String(this.points),String(this.duration)]):this.client.multi().incrby(e,t).pttl(e).exec()}_get(e){if(!this._isValkeyReady())throw new Error("Valkey connection is not ready");return this.client.multi().get(e).pttl(e).exec().then(e=>{const[[,t]]=e;return null===t?null:e})}_delete(e){return this.client.del(e).then(e=>e>0)}},yd}(),y=function(){if($d)return bd;$d=1;const e=Ld(),t=Rd(),n="local key = KEYS[1]\nlocal value = server.call('get', key)\nif value == nil then\n return value\nend\nlocal pttl = server.call('pttl', key)\nreturn {tonumber(value), pttl}";return bd=class extends e{constructor(e){super(e),this.client=e.storeClient,this._scriptLoaded=!1,this._getScriptLoaded=!1,this._rejectIfValkeyNotReady=!!e.rejectIfValkeyNotReady,this._luaScript=e.customFunction||"local key = KEYS[1]\nlocal pointsToConsume = tonumber(ARGV[1])\nif tonumber(ARGV[2]) > 0 then\n server.call('set', key, \"0\", 'EX', ARGV[2], 'NX')\n local consumed = server.call('incrby', key, pointsToConsume)\n local pttl = server.call('pttl', key)\n return {consumed, pttl}\nend\nlocal consumed = server.call('incrby', key, pointsToConsume)\nlocal pttl = server.call('pttl', key)\nreturn {consumed, pttl}",this._libraryName=e.customFunctionLibName||"ratelimiterflexible"}async _loadScripts(){if(this._scriptLoaded&&this._getScriptLoaded)return!0;if(!this.client)throw new Error("Valkey client is not set");const e=[];if(this._scriptLoaded)e.push(Promise.resolve(this._libraryName));else{const t=Buffer.from(`#!lua name=${this._libraryName}\n local function consume(KEYS, ARGV)\n ${this._luaScript.trim()}\n end\n server.register_function('consume', consume)`);e.push(this.client.functionLoad(t,{replace:!0}))}if(this._getScriptLoaded)e.push(Promise.resolve("ratelimiter_get"));else{const t=Buffer.from(`#!lua name=ratelimiter_get\n local function getValue(KEYS, ARGV)\n ${n.trim()}\n end\n server.register_function('getValue', getValue)`);e.push(this.client.functionLoad(t,{replace:!0}))}const t=await Promise.all(e);if(this._scriptLoaded=t[0]===this._libraryName,this._getScriptLoaded="ratelimiter_get"===t[1],!this._scriptLoaded||!this._getScriptLoaded)throw new Error("Valkey connection is not ready, scripts not loaded");return!0}async _upsert(e,t,n,i=!1,r={}){await this._loadScripts();const o=Math.floor(n/1e3);return i?o>0?(await this.client.set(e,String(t),{expiry:{type:"EX",count:o}}),[t,1e3*o]):(await this.client.set(e,String(t)),[t,-1]):await this.client.fcall("consume",[e],[String(t),String(o)])}async _get(e,t={}){await this._loadScripts();const n=await this.client.fcall("getValue",[e],[]);return n.length>0?n:null}async _delete(e,t={}){return await this.client.del([e])>0}_getRateLimiterRes(e,n,i){if(null===i)return null;const r=new t,[o,s]=i,a=Number(o);return r.isFirstInDuration=a===n,r.consumedPoints=a,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=s,r}async close(){if(this._scriptLoaded&&(await this.client.functionDelete(this._libraryName),this._scriptLoaded=!1),this._getScriptLoaded&&(await this.client.functionDelete("ratelimiter_get"),this._getScriptLoaded=!1),this.insuranceLimiter)try{await this.insuranceLimiter.close()}catch(e){}this.client=null,this._scriptLoaded=!1,this._getScriptLoaded=!1,this._rejectIfValkeyNotReady=!1,this._luaScript=null,this._libraryName=null,this.insuranceLimiter=null}},bd}(),_=function(){if(wd)return kd;wd=1;const e=Ld(),t=Rd();return kd=class extends e{_internalStoreType=null;constructor(e,t=null){super(e),this.client=e.storeClient,this.storeType=e.storeType||"sqlite3",this.tableName=e.tableName,this.tableCreated=e.tableCreated||!1,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this._validateStoreTypes(t),this._validateStoreClient(t),this._setInternalStoreType(t),this._validateTableName(t),this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"==typeof t&&t()}).catch(e=>{if("function"!=typeof t)throw e;t(e)})}_validateStoreTypes(e){const t=["sqlite3","better-sqlite3","knex"];if(!t.includes(this.storeType)){const n=new Error(`storeType must be one of: ${t.join(", ")}`);if("function"==typeof e)return e(n);throw n}}_validateStoreClient(e){if("sqlite3"===this.storeType){if("function"!=typeof this.client.run){const t=new Error("storeClient must be an instance of sqlite3.Database when storeType is 'sqlite3' or no storeType was provided");if("function"==typeof e)return e(t);throw t}}else if("better-sqlite3"===this.storeType){if("function"!=typeof this.client.prepare||void 0!==this.client.run){const t=new Error("storeClient must be an instance of better-sqlite3.Database when storeType is 'better-sqlite3'");if("function"==typeof e)return e(t);throw t}}else if("knex"===this.storeType&&"function"!=typeof this.client.raw){const t=new Error("storeClient must be an instance of Knex when storeType is 'knex'");if("function"==typeof e)return e(t);throw t}}_setInternalStoreType(e){if("knex"===this.storeType){const t=this.client.client.config.client;if("sqlite3"===t)this._internalStoreType="sqlite3";else{if("better-sqlite3"!==t){const t=new Error("Knex must be configured with 'sqlite3' or 'better-sqlite3' for RateLimiterSQLite");if("function"==typeof e)return e(t);throw t}this._internalStoreType="better-sqlite3"}}else this._internalStoreType=this.storeType}_validateTableName(e){if(!/^[A-Za-z0-9_]*$/.test(this.tableName)){const t=new Error("Table name must contain only letters and numbers");if("function"==typeof e)return e(t);throw t}}async _getConnection(){return"knex"===this.storeType?this.client.client.acquireConnection():this.client}_releaseConnection(e){"knex"===this.storeType&&this.client.client.releaseConnection(e)}async _createDbAndTable(){const e=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":await new Promise((t,n)=>{e.run(this._getCreateTableSQL(),e=>e?n(e):t())});break;case"better-sqlite3":e.prepare(this._getCreateTableSQL()).run();break;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(e)}}_getCreateTableSQL(){return`CREATE TABLE IF NOT EXISTS ${this.tableName} (\n key TEXT PRIMARY KEY,\n points INTEGER NOT NULL DEFAULT 0,\n expire INTEGER\n )`}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>this._clearExpiredHourAgo())},3e5),this._clearExpiredTimeoutId.unref()}async clearExpired(e){const t=`DELETE FROM ${this.tableName} WHERE expire < ?`,n=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":await new Promise((i,r)=>{n.run(t,[e],e=>e?r(e):i())});break;case"better-sqlite3":n.prepare(t).run(e);break;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(n)}}_getRateLimiterRes(e,n,i){const r=new t;return r.isFirstInDuration=n===i.points,r.consumedPoints=r.isFirstInDuration?n:i.points,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=i.expire?Math.max(i.expire-Date.now(),0):-1,r}async _upsertTransactionSQLite3(e,t,n){return await new Promise((i,r)=>{e.serialize(()=>{e.run("SAVEPOINT rate_limiter_trx;",o=>{if(o)return r(o);e.get(t,n,(t,n)=>{t?e.run("ROLLBACK TO SAVEPOINT rate_limiter_trx;",()=>r(t)):e.run("RELEASE SAVEPOINT rate_limiter_trx;",()=>i(n))})})})})}async _upsertTransactionBetterSQLite3(e,t,n){return e.transaction(()=>e.prepare(t).get(...n))()}async _upsertTransaction(e,t,n,i){const r=Date.now(),o=n>0?r+n:null,s=i?`INSERT OR REPLACE INTO ${this.tableName} (key, points, expire) VALUES (?, ?, ?) RETURNING points, expire`:`INSERT INTO ${this.tableName} (key, points, expire)\n VALUES (?, ?, ?)\n ON CONFLICT(key) DO UPDATE SET\n points = CASE WHEN expire IS NULL OR expire > ? THEN points + excluded.points ELSE excluded.points END,\n expire = CASE WHEN expire IS NULL OR expire > ? THEN expire ELSE excluded.expire END\n RETURNING points, expire`,a=i?[e,t,o]:[e,t,o,r,r],u=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return this._upsertTransactionSQLite3(u,s,a);case"better-sqlite3":return this._upsertTransactionBetterSQLite3(u,s,a);default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(u)}}_upsert(e,t,n,i=!1){return this.tableCreated?this._upsertTransaction(e,t,n,i):Promise.reject(new Error("Table is not created yet"))}async _get(e){const t=`SELECT points, expire FROM ${this.tableName} WHERE key = ? AND (expire > ? OR expire IS NULL)`,n=Date.now(),i=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return await new Promise((r,o)=>{i.get(t,[e,n],(e,t)=>e?o(e):r(t||null))});case"better-sqlite3":return i.prepare(t).get(e,n)||null;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(i)}}async _delete(e){if(!this.tableCreated)return Promise.reject(new Error("Table is not created yet"));const t=`DELETE FROM ${this.tableName} WHERE key = ?`,n=await this._getConnection();try{switch(this._internalStoreType){case"sqlite3":return await new Promise((i,r)=>{n.run(t,[e],function(e){e?r(e):i(this.changes>0)})});case"better-sqlite3":return n.prepare(t).run(e).changes>0;default:throw new Error("Unsupported internalStoreType")}}finally{this._releaseConnection(n)}}}}(),b=Vd(),$=Jd();Dd={RateLimiterRedis:e,RateLimiterMongo:t,RateLimiterMySQL:n,RateLimiterPostgres:i,RateLimiterMemory:a,RateLimiterMemcache:u,RateLimiterClusterMaster:r,RateLimiterClusterMasterPM2:o,RateLimiterCluster:s,RLWrapperBlackAndWhite:c,RateLimiterUnion:l,RateLimiterQueue:d,BurstyRateLimiter:m,RateLimiterRes:p,RateLimiterDynamo:f,RateLimiterPrisma:h,RateLimiterValkey:v,RateLimiterValkeyGlide:y,RateLimiterSQLite:_,RateLimiterEtcd:b,RateLimiterDrizzle:g,RateLimiterEtcdNonAtomic:$}}(),f(h),f(g),new TextEncoder,new TextDecoder;var Gd,Wd={exports:{}},Kd={},qd={},Hd={acl:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},append:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},asking:{arity:1,flags:["fast"],keyStart:0,keyStop:0,step:0},auth:{arity:-2,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},bgrewriteaof:{arity:1,flags:["admin","noscript","no_async_loading"],keyStart:0,keyStop:0,step:0},bgsave:{arity:-1,flags:["admin","noscript","no_async_loading"],keyStart:0,keyStop:0,step:0},bitcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},bitfield:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},bitfield_ro:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},bitop:{arity:-4,flags:["write","denyoom"],keyStart:2,keyStop:-1,step:1},bitpos:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},blmove:{arity:6,flags:["write","denyoom","noscript","blocking"],keyStart:1,keyStop:2,step:1},blmpop:{arity:-5,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},blpop:{arity:-3,flags:["write","noscript","blocking"],keyStart:1,keyStop:-2,step:1},brpop:{arity:-3,flags:["write","noscript","blocking"],keyStart:1,keyStop:-2,step:1},brpoplpush:{arity:4,flags:["write","denyoom","noscript","blocking"],keyStart:1,keyStop:2,step:1},bzmpop:{arity:-5,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},bzpopmax:{arity:-3,flags:["write","noscript","blocking","fast"],keyStart:1,keyStop:-2,step:1},bzpopmin:{arity:-3,flags:["write","noscript","blocking","fast"],keyStart:1,keyStop:-2,step:1},client:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},cluster:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},command:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},config:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},copy:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},dbsize:{arity:1,flags:["readonly","fast"],keyStart:0,keyStop:0,step:0},debug:{arity:-2,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},decr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},decrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},del:{arity:-2,flags:["write"],keyStart:1,keyStop:-1,step:1},discard:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},dump:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},echo:{arity:2,flags:["fast"],keyStart:0,keyStop:0,step:0},eval:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},eval_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},evalsha:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},evalsha_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},exec:{arity:1,flags:["noscript","loading","stale","skip_slowlog"],keyStart:0,keyStop:0,step:0},exists:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},expire:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},expireat:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},expiretime:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},failover:{arity:-1,flags:["admin","noscript","stale"],keyStart:0,keyStop:0,step:0},fcall:{arity:-3,flags:["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},fcall_ro:{arity:-3,flags:["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],keyStart:0,keyStop:0,step:0},flushall:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},flushdb:{arity:-1,flags:["write"],keyStart:0,keyStop:0,step:0},function:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},geoadd:{arity:-5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},geodist:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},geohash:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},geopos:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},georadius:{arity:-6,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},georadius_ro:{arity:-6,flags:["readonly"],keyStart:1,keyStop:1,step:1},georadiusbymember:{arity:-5,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},georadiusbymember_ro:{arity:-5,flags:["readonly"],keyStart:1,keyStop:1,step:1},geosearch:{arity:-7,flags:["readonly"],keyStart:1,keyStop:1,step:1},geosearchstore:{arity:-8,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},get:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getbit:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},getdel:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},getex:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},getrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},getset:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hdel:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hello:{arity:-1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},hexists:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hexpire:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hpexpire:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},hget:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hgetall:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hincrbyfloat:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hkeys:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmget:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hmset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hrandfield:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},hscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},hset:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hsetnx:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},hstrlen:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},hvals:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},incr:{arity:2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrby:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},incrbyfloat:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},info:{arity:-1,flags:["loading","stale"],keyStart:0,keyStop:0,step:0},keys:{arity:2,flags:["readonly"],keyStart:0,keyStop:0,step:0},lastsave:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},latency:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},lcs:{arity:-3,flags:["readonly"],keyStart:1,keyStop:2,step:1},lindex:{arity:3,flags:["readonly"],keyStart:1,keyStop:1,step:1},linsert:{arity:5,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},llen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},lmove:{arity:5,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},lmpop:{arity:-4,flags:["write","movablekeys"],keyStart:0,keyStop:0,step:0},lolwut:{arity:-1,flags:["readonly","fast"],keyStart:0,keyStop:0,step:0},lpop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},lpos:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},lpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},lrange:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},lrem:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},lset:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},ltrim:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},memory:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},mget:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},migrate:{arity:-6,flags:["write","movablekeys"],keyStart:3,keyStop:3,step:1},module:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},monitor:{arity:1,flags:["admin","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},move:{arity:3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},mset:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},msetnx:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:2},multi:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},object:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},persist:{arity:2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpire:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpireat:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},pexpiretime:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},pfadd:{arity:-2,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},pfcount:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},pfdebug:{arity:3,flags:["write","denyoom","admin"],keyStart:2,keyStop:2,step:1},pfmerge:{arity:-2,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},pfselftest:{arity:1,flags:["admin"],keyStart:0,keyStop:0,step:0},ping:{arity:-1,flags:["fast"],keyStart:0,keyStop:0,step:0},psetex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},psubscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},psync:{arity:-3,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},pttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},publish:{arity:3,flags:["pubsub","loading","stale","fast"],keyStart:0,keyStop:0,step:0},pubsub:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},punsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},quit:{arity:-1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},randomkey:{arity:1,flags:["readonly"],keyStart:0,keyStop:0,step:0},readonly:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},readwrite:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},rename:{arity:3,flags:["write"],keyStart:1,keyStop:2,step:1},renamenx:{arity:3,flags:["write","fast"],keyStart:1,keyStop:2,step:1},replconf:{arity:-1,flags:["admin","noscript","loading","stale","allow_busy"],keyStart:0,keyStop:0,step:0},replicaof:{arity:3,flags:["admin","noscript","stale","no_async_loading"],keyStart:0,keyStop:0,step:0},reset:{arity:1,flags:["noscript","loading","stale","fast","no_auth","allow_busy"],keyStart:0,keyStop:0,step:0},restore:{arity:-4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},"restore-asking":{arity:-4,flags:["write","denyoom","asking"],keyStart:1,keyStop:1,step:1},role:{arity:1,flags:["noscript","loading","stale","fast"],keyStart:0,keyStop:0,step:0},rpop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},rpoplpush:{arity:3,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},rpush:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},rpushx:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},sadd:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},save:{arity:1,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},scan:{arity:-2,flags:["readonly"],keyStart:0,keyStop:0,step:0},scard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},script:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},sdiff:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sdiffstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},select:{arity:2,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},set:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setbit:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setex:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},setnx:{arity:3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},setrange:{arity:4,flags:["write","denyoom"],keyStart:1,keyStop:1,step:1},shutdown:{arity:-1,flags:["admin","noscript","loading","stale","no_multi","allow_busy"],keyStart:0,keyStop:0,step:0},sinter:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sintercard:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},sinterstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},sismember:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},slaveof:{arity:3,flags:["admin","noscript","stale","no_async_loading"],keyStart:0,keyStop:0,step:0},slowlog:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},smembers:{arity:2,flags:["readonly"],keyStart:1,keyStop:1,step:1},smismember:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},smove:{arity:4,flags:["write","fast"],keyStart:1,keyStop:2,step:1},sort:{arity:-2,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},sort_ro:{arity:-2,flags:["readonly","movablekeys"],keyStart:1,keyStop:1,step:1},spop:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},spublish:{arity:3,flags:["pubsub","loading","stale","fast"],keyStart:1,keyStop:1,step:1},srandmember:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},srem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},sscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},ssubscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:1,keyStop:-1,step:1},strlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},subscribe:{arity:-2,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},substr:{arity:4,flags:["readonly"],keyStart:1,keyStop:1,step:1},sunion:{arity:-2,flags:["readonly"],keyStart:1,keyStop:-1,step:1},sunionstore:{arity:-3,flags:["write","denyoom"],keyStart:1,keyStop:-1,step:1},sunsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:1,keyStop:-1,step:1},swapdb:{arity:3,flags:["write","fast"],keyStart:0,keyStop:0,step:0},sync:{arity:1,flags:["admin","noscript","no_async_loading","no_multi"],keyStart:0,keyStop:0,step:0},time:{arity:1,flags:["loading","stale","fast"],keyStart:0,keyStop:0,step:0},touch:{arity:-2,flags:["readonly","fast"],keyStart:1,keyStop:-1,step:1},ttl:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},type:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},unlink:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:-1,step:1},unsubscribe:{arity:-1,flags:["pubsub","noscript","loading","stale"],keyStart:0,keyStop:0,step:0},unwatch:{arity:1,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:0,keyStop:0,step:0},wait:{arity:3,flags:["noscript"],keyStart:0,keyStop:0,step:0},watch:{arity:-2,flags:["noscript","loading","stale","fast","allow_busy"],keyStart:1,keyStop:-1,step:1},xack:{arity:-4,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xadd:{arity:-5,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},xautoclaim:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xclaim:{arity:-6,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xdel:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xdelex:{arity:-5,flags:["write","fast"],keyStart:1,keyStop:1,step:1},xgroup:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},xinfo:{arity:-2,flags:[],keyStart:0,keyStop:0,step:0},xlen:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},xpending:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},xrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},xread:{arity:-4,flags:["readonly","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},xreadgroup:{arity:-7,flags:["write","blocking","movablekeys"],keyStart:0,keyStop:0,step:0},xrevrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},xsetid:{arity:-3,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},xtrim:{arity:-4,flags:["write"],keyStart:1,keyStop:1,step:1},zadd:{arity:-4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zcard:{arity:2,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zdiff:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zdiffstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},zincrby:{arity:4,flags:["write","denyoom","fast"],keyStart:1,keyStop:1,step:1},zinter:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zintercard:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zinterstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1},zlexcount:{arity:4,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zmpop:{arity:-4,flags:["write","movablekeys"],keyStart:0,keyStop:0,step:0},zmscore:{arity:-3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zpopmax:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zpopmin:{arity:-2,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zrandmember:{arity:-2,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrangestore:{arity:-5,flags:["write","denyoom"],keyStart:1,keyStop:2,step:1},zrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zrem:{arity:-3,flags:["write","fast"],keyStart:1,keyStop:1,step:1},zremrangebylex:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyrank:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zremrangebyscore:{arity:4,flags:["write"],keyStart:1,keyStop:1,step:1},zrevrange:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebylex:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrangebyscore:{arity:-4,flags:["readonly"],keyStart:1,keyStop:1,step:1},zrevrank:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zscan:{arity:-3,flags:["readonly"],keyStart:1,keyStop:1,step:1},zscore:{arity:3,flags:["readonly","fast"],keyStart:1,keyStop:1,step:1},zunion:{arity:-3,flags:["readonly","movablekeys"],keyStart:0,keyStop:0,step:0},zunionstore:{arity:-4,flags:["write","denyoom","movablekeys"],keyStart:1,keyStop:1,step:1}};function Qd(){return Gd||(Gd=1,function(e){var t=qd&&qd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getKeyIndexes=e.hasFlag=e.exists=e.list=void 0;const n=t(Hd);e.list=Object.keys(n.default);const i={};function r(e){"string"!=typeof e&&(e=String(e));const t=e.indexOf("->");return-1===t?e.length:t}e.list.forEach(e=>{i[e]=n.default[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),e.exists=function(e){return Boolean(n.default[e])},e.hasFlag=function(e,t){if(!i[e])throw new Error("Unknown command "+e);return Boolean(i[e][t])},e.getKeyIndexes=function(e,t,i){const o=n.default[e];if(!o)throw new Error("Unknown command "+e);if(!Array.isArray(t))throw new Error("Expect args to be an array");const s=[],a=Boolean(i&&i.parseExternalKey),u=(e,t)=>{const n=[],i=Number(e[t]);for(let e=0;e<i;e++)n.push(e+t+1);return n},c=(e,t,n)=>{for(let i=t;i<e.length-1;i+=1)if(String(e[i]).toLowerCase()===n.toLowerCase())return i+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":s.push(0,...u(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":s.push(...u(t,1));break;case"sintercard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":s.push(...u(t,0));break;case"georadius":{s.push(0);const e=c(t,5,"STORE");e&&s.push(e);const n=c(t,5,"STOREDIST");n&&s.push(n);break}case"georadiusbymember":{s.push(0);const e=c(t,4,"STORE");e&&s.push(e);const n=c(t,4,"STOREDIST");n&&s.push(n);break}case"sort":case"sort_ro":s.push(0);for(let e=1;e<t.length-1;e++){let n=t[e];if("string"!=typeof n)continue;const i=n.toUpperCase();"GET"===i?(e+=1,n=t[e],"#"!==n&&(a?s.push([e,r(n)]):s.push(e))):"BY"===i?(e+=1,a?s.push([e,r(t[e])]):s.push(e)):"STORE"===i&&(e+=1,s.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){const n=t[e];if("string"==typeof n&&"KEYS"===n.toUpperCase()){for(let n=e+1;n<t.length;n++)s.push(n);break}}else s.push(2);break;case"xreadgroup":case"xread":for(let n="xread"===e?0:3;n<t.length-1;n++)if("STREAMS"===String(t[n]).toUpperCase()){for(let e=n+1;e<=n+(t.length-1-n)/2;e++)s.push(e);break}break;default:if(o.step>0){const e=o.keyStart-1,n=o.keyStop>0?o.keyStop:t.length+o.keyStop+1;for(let t=e;t<n;t+=o.step)s.push(t)}}return s}}(qd)),qd}var Yd,Xd,em={},tm={};function nm(){if(Xd)return em;Xd=1,Object.defineProperty(em,"__esModule",{value:!0});const e=(Yd||(Yd=1,function(e){let t;function n(n,i){try{const e=t;return t=null,e.apply(this,arguments)}catch(t){return e.errorObj.e=t,e.errorObj}}Object.defineProperty(e,"__esModule",{value:!0}),e.tryCatch=e.errorObj=void 0,e.errorObj={e:{}},e.tryCatch=function(e){return t=e,n}}(tm)),tm);function t(e){setTimeout(function(){throw e},0)}return em.default=function(n,i,r){return"function"==typeof i&&n.then(n=>{let o;o=void 0!==r&&Object(r).spread&&Array.isArray(n)?e.tryCatch(i).apply(void 0,[null].concat(n)):void 0===n?e.tryCatch(i)(null):e.tryCatch(i)(null,n),o===e.errorObj&&t(o.e)},n=>{if(!n){const e=new Error(n+"");Object.assign(e,{cause:n}),n=e}const r=e.tryCatch(i)(n);r===e.errorObj&&t(r.e)}),n},em}var im,rm,om,sm,am,um,cm={};function lm(){if(um)return am;um=1;const e=process.version.charCodeAt(1)<55&&46===process.version.charCodeAt(2)?function(){if(rm)return im;rm=1;const e=b,t=$;function n(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function i(t,n,i){e(n),e.strictEqual(typeof i,"number"),Object.defineProperty(this,"message",{value:t||"",configurable:!0,writable:!0});const r=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=r,this.offset=i,this.buffer=n}function r(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});const t=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=t}function o(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function s(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}return t.inherits(n,Error),Object.defineProperty(n.prototype,"name",{value:"RedisError",configurable:!0,writable:!0}),t.inherits(i,n),Object.defineProperty(i.prototype,"name",{value:"ParserError",configurable:!0,writable:!0}),t.inherits(r,n),Object.defineProperty(r.prototype,"name",{value:"ReplyError",configurable:!0,writable:!0}),t.inherits(o,n),Object.defineProperty(o.prototype,"name",{value:"AbortError",configurable:!0,writable:!0}),t.inherits(s,o),Object.defineProperty(s.prototype,"name",{value:"InterruptError",configurable:!0,writable:!0}),im={RedisError:n,ParserError:i,ReplyError:r,AbortError:o,InterruptError:s}}():function(){if(sm)return om;sm=1;const e=b;class t extends Error{get name(){return this.constructor.name}}class n extends t{get name(){return this.constructor.name}}return om={RedisError:t,ParserError:class extends t{constructor(t,n,i){e(n),e.strictEqual(typeof i,"number");const r=Error.stackTraceLimit;Error.stackTraceLimit=2,super(t),Error.stackTraceLimit=r,this.offset=i,this.buffer=n}get name(){return this.constructor.name}},ReplyError:class extends t{constructor(e){const t=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=t}get name(){return this.constructor.name}},AbortError:n,InterruptError:class extends n{get name(){return this.constructor.name}}}}();return am=e}var dm,mm={},pm={exports:{}};function fm(){if(dm)return pm.exports;dm=1;var e=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],t=pm.exports=function(t){for(var n,i=0,r=-1,o=0,s=0,a="string"==typeof t?function(e){for(var t,n=0,i=0,r=[],o=e.length;n<o;n++)(t=e.charCodeAt(n))<128?r[i++]=t:t<2048?(r[i++]=t>>6|192,r[i++]=63&t|128):55296==(64512&t)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++n)),r[i++]=t>>18|240,r[i++]=t>>12&63|128,r[i++]=t>>6&63|128,r[i++]=63&t|128):(r[i++]=t>>12|224,r[i++]=t>>6&63|128,r[i++]=63&t|128);return r}(t):t,u=a.length;i<u;){if(n=a[i++],-1===r)123===n&&(r=i);else if(125!==n)s=e[255&(n^s>>8)]^s<<8;else if(i-1!==r)return 16383&s;o=e[255&(n^o>>8)]^o<<8}return 16383&o};return pm.exports.generateMulti=function(e){for(var n=1,i=e.length,r=t(e[0]);n<i;)if(t(e[n++])!==r)return-1;return r},pm.exports}var hm,gm,vm,ym,_m,bm={},$m={};function km(){if(gm)return hm;gm=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",i="[object GeneratorFunction]",r=/^(?:0|[1-9]\d*)$/;function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var s=Object.prototype,a=s.hasOwnProperty,u=s.toString,c=s.propertyIsEnumerable,l=Math.max;function d(e,n){var i=y(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&_(e)}(e)&&a.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==t)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],r=i.length,o=!!r;for(var s in e)o&&("length"==s||g(s,r))||i.push(s);return i}function m(e,t,n,i){return void 0===e||v(e,s[n])&&!a.call(i,n)?t:e}function p(e,t,n){var i=e[t];a.call(e,t)&&v(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function f(e){if(!b(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,i,r=(n=(t=e)&&t.constructor,i="function"==typeof n&&n.prototype||s,t===i),o=[];for(var u in e)("constructor"!=u||!r&&a.call(e,u))&&o.push(u);return o}function h(e,t){return t=l(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,r=l(n.length-t,0),s=Array(r);++i<r;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=s,o(e,this,a)}}function g(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<n}function v(e,t){return e===t||e!=e&&t!=t}var y=Array.isArray;function _(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=b(e)?u.call(e):"";return t==n||t==i}(t)}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var $,k=($=function(e,t,n,i){!function(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],a=i?i(n[s],e[s],s,n,e):void 0;p(n,s,void 0===a?e[s]:a)}}(t,function(e){return _(e)?d(e):f(e)}(t),e,i)},h(function(e,t){var n=-1,i=t.length,r=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(r=$.length>3&&"function"==typeof r?(i--,r):void 0,o&&function(e,t,n){if(!b(n))return!1;var i=typeof t;return!!("number"==i?_(n)&&g(t,n.length):"string"==i&&t in n)&&v(n[t],e)}(t[0],t[1],o)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var s=t[n];s&&$(e,s,n,r)}return e})),w=h(function(e){return e.push(void 0,m),o(k,void 0,e)});return hm=w}function wm(){if(ym)return vm;ym=1;var e=9007199254740991,t="[object Function]",n="[object GeneratorFunction]",i=Object.prototype,r=i.hasOwnProperty,o=i.toString,s=i.propertyIsEnumerable;return vm=function(i){return function(i){return function(e){return!!e&&"object"==typeof e}(i)&&function(i){return null!=i&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(i.length)&&!function(e){var i=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?o.call(e):"";return i==t||i==n}(i)}(i)}(i)&&r.call(i,"callee")&&(!s.call(i,"callee")||"[object Arguments]"==o.call(i))},vm}function Sm(){if(_m)return $m;_m=1,Object.defineProperty($m,"__esModule",{value:!0}),$m.isArguments=$m.defaults=$m.noop=void 0;const e=km();$m.defaults=e;const t=wm();return $m.isArguments=t,$m.noop=function(){},$m}var Im,xm={};var Em,Om,Nm,zm={};function Tm(){return Om||(Om=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.noop=e.defaults=e.Debug=e.getPackageMeta=e.zipMap=e.CONNECTION_CLOSED_ERROR_MSG=e.shuffle=e.sample=e.resolveTLSProfile=e.parseURL=e.optimizeErrorStack=e.toArg=e.convertMapToArray=e.convertObjectToArray=e.timeout=e.packObject=e.isInt=e.wrapMultiResult=e.convertBufferToString=void 0;const t=k,n=w,i=S,r=Sm();Object.defineProperty(e,"defaults",{enumerable:!0,get:function(){return r.defaults}}),Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return r.noop}});const o=function(){if(Im)return xm;Im=1,Object.defineProperty(xm,"__esModule",{value:!0}),xm.genRedactedString=xm.getStringValue=xm.MAX_ARGUMENT_LENGTH=void 0;const e=me();function t(e){if(null!==e)switch(typeof e){case"boolean":case"number":return;case"object":if(Buffer.isBuffer(e))return e.toString("hex");if(Array.isArray(e))return e.join(",");try{return JSON.stringify(e)}catch(e){return}case"string":return e}}function n(e,t){const{length:n}=e;return n<=t?e:e.slice(0,t)+' ... <REDACTED full-length="'+n+'">'}return xm.MAX_ARGUMENT_LENGTH=200,xm.getStringValue=t,xm.genRedactedString=n,xm.default=function(i){const r=(0,e.default)(`ioredis:${i}`);function o(...e){if(r.enabled){for(let i=1;i<e.length;i++){const r=t(e[i]);"string"==typeof r&&r.length>200&&(e[i]=n(r,200))}return r.apply(null,e)}}return Object.defineProperties(o,{namespace:{get:()=>r.namespace},enabled:{get:()=>r.enabled},destroy:{get:()=>r.destroy},log:{get:()=>r.log,set(e){r.log=e}}}),o},xm}();e.Debug=o.default;const s=function(){if(Em)return zm;Em=1,Object.defineProperty(zm,"__esModule",{value:!0});const e="-----BEGIN CERTIFICATE-----\nMIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV\nBAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1\ndGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP\nJnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz\nrmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E\nQwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2\nBDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfhyCzRWMQ7Hn71u1eolRxwVxgi3\nTMn+/vTaFSqxKjgck6zuAYjBRPaHe7qLxHNr1So/Mc9nPy+3wHebFwbIcnUojwbp\n4nctkWbjb2cCAwEAAaNQME4wHQYDVR0OBBYEFP1whtcrydmW3ZJeuSoKZIKjze3w\nMB8GA1UdIwQYMBaAFP1whtcrydmW3ZJeuSoKZIKjze3wMAwGA1UdEwQFMAMBAf8w\nDQYJKoZIhvcNAQEFBQADggEBAG2erXhwRAa7+ZOBs0B6X57Hwyd1R4kfmXcs0rta\nlbPpvgULSiB+TCbf3EbhJnHGyvdCY1tvlffLjdA7HJ0PCOn+YYLBA0pTU/dyvrN6\nSu8NuS5yubnt9mb13nDGYo1rnt0YRfxN+8DM3fXIVr038A30UlPX2Ou1ExFJT0MZ\nuFKY6ZvLdI6/1cbgmguMlAhM+DhKyV6Sr5699LM3zqeI816pZmlREETYkGr91q7k\nBpXJu/dtHaGxg1ZGu6w/PCsYGUcECWENYD4VQPd8N32JjOfu6vEgoEAwfPP+3oGp\nZ4m3ewACcWOAenqflb+cQYC4PsF7qbXDmRaWrbKntOlZ3n0=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIGMTCCBBmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwajELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJzMS0w\nKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN\nMTgwMjI1MTUzNzM3WhcNMjgwMjIzMTUzNzM3WjBfMQswCQYDVQQGEwJVUzELMAkG\nA1UECAwCQ0ExEjAQBgNVBAoMCVJlZGlzTGFiczEvMC0GA1UEAwwmUkNQIEludGVy\nbWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA\nA4ICDwAwggIKAoICAQDf9dqbxc8Bq7Ctq9rWcxrGNKKHivqLAFpPq02yLPx6fsOv\nTq7GsDChAYBBc4v7Y2Ap9RD5Vs3dIhEANcnolf27QwrG9RMnnvzk8pCvp1o6zSU4\nVuOE1W66/O1/7e2rVxyrnTcP7UgK43zNIXu7+tiAqWsO92uSnuMoGPGpeaUm1jym\nhjWKtkAwDFSqvHY+XL5qDVBEjeUe+WHkYUg40cAXjusAqgm2hZt29c2wnVrxW25W\nP0meNlzHGFdA2AC5z54iRiqj57dTfBTkHoBczQxcyw6hhzxZQ4e5I5zOKjXXEhZN\nr0tA3YC14CTabKRus/JmZieyZzRgEy2oti64tmLYTqSlAD78pRL40VNoaSYetXLw\nhhNsXCHgWaY6d5bLOc/aIQMAV5oLvZQKvuXAF1IDmhPA+bZbpWipp0zagf1P1H3s\nUzsMdn2KM0ejzgotbtNlj5TcrVwpmvE3ktvUAuA+hi3FkVx1US+2Gsp5x4YOzJ7u\nP1WPk6ShF0JgnJH2ILdj6kttTWwFzH17keSFICWDfH/+kM+k7Y1v3EXMQXE7y0T9\nMjvJskz6d/nv+sQhY04xt64xFMGTnZjlJMzfQNi7zWFLTZnDD0lPowq7l3YiPoTT\nt5Xky83lu0KZsZBo0WlWaDG00gLVdtRgVbcuSWxpi5BdLb1kRab66JptWjxwXQID\nAQABo4HrMIHoMDoGA1UdHwQzMDEwL6AtoCuGKWh0dHBzOi8vcmwtY2Etc2VydmVy\nLnJlZGlzbGFicy5jb20vdjEvY3JsMEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcw\nAYYqaHR0cHM6Ly9ybC1jYS1zZXJ2ZXIucmVkaXNsYWJzLmNvbS92MS9vY3NwMB0G\nA1UdDgQWBBQHar5OKvQUpP2qWt6mckzToeCOHDAfBgNVHSMEGDAWgBQi42wH6hM4\nL2sujEvLM0/u8lRXTzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIB\nhjANBgkqhkiG9w0BAQsFAAOCAgEAirEn/iTsAKyhd+pu2W3Z5NjCko4NPU0EYUbr\nAP7+POK2rzjIrJO3nFYQ/LLuC7KCXG+2qwan2SAOGmqWst13Y+WHp44Kae0kaChW\nvcYLXXSoGQGC8QuFSNUdaeg3RbMDYFT04dOkqufeWVccoHVxyTSg9eD8LZuHn5jw\n7QDLiEECBmIJHk5Eeo2TAZrx4Yx6ufSUX5HeVjlAzqwtAqdt99uCJ/EL8bgpWbe+\nXoSpvUv0SEC1I1dCAhCKAvRlIOA6VBcmzg5Am12KzkqTul12/VEFIgzqu0Zy2Jbc\nAUPrYVu/+tOGXQaijy7YgwH8P8n3s7ZeUa1VABJHcxrxYduDDJBLZi+MjheUDaZ1\njQRHYevI2tlqeSBqdPKG4zBY5lS0GiAlmuze5oENt0P3XboHoZPHiqcK3VECgTVh\n/BkJcuudETSJcZDmQ8YfoKfBzRQNg2sv/hwvUv73Ss51Sco8GEt2lD8uEdib1Q6z\nzDT5lXJowSzOD5ZA9OGDjnSRL+2riNtKWKEqvtEG3VBJoBzu9GoxbAc7wIZLxmli\niF5a/Zf5X+UXD3s4TMmy6C4QZJpAA2egsSQCnraWO2ULhh7iXMysSkF/nzVfZn43\niqpaB8++9a37hWq14ZmOv0TJIDz//b2+KC4VFXWQ5W5QC6whsjT+OlG4p5ZYG0jo\n616pxqo=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIFujCCA6KgAwIBAgIJAJ1aTT1lu2ScMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV\nBAYTAlVTMQswCQYDVQQIDAJDQTELMAkGA1UEBwwCQ0ExEjAQBgNVBAoMCVJlZGlz\nTGFiczEtMCsGA1UEAwwkUmVkaXNMYWJzIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9y\naXR5MB4XDTE4MDIyNTE1MjA0MloXDTM4MDIyMDE1MjA0MlowajELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJz\nMS0wKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw\nggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDLEjXy7YrbN5Waau5cd6g1\nG5C2tMmeTpZ0duFAPxNU4oE3RHS5gGiok346fUXuUxbZ6QkuzeN2/2Z+RmRcJhQY\nDm0ZgdG4x59An1TJfnzKKoWj8ISmoHS/TGNBdFzXV7FYNLBuqZouqePI6ReC6Qhl\npp45huV32Q3a6IDrrvx7Wo5ZczEQeFNbCeCOQYNDdTmCyEkHqc2AGo8eoIlSTutT\nULOC7R5gzJVTS0e1hesQ7jmqHjbO+VQS1NAL4/5K6cuTEqUl+XhVhPdLWBXJQ5ag\n54qhX4v+ojLzeU1R/Vc6NjMvVtptWY6JihpgplprN0Yh2556ewcXMeturcKgXfGJ\nxeYzsjzXerEjrVocX5V8BNrg64NlifzTMKNOOv4fVZszq1SIHR8F9ROrqiOdh8iC\nJpUbLpXH9hWCSEO6VRMB2xJoKu3cgl63kF30s77x7wLFMEHiwsQRKxooE1UhgS9K\n2sO4TlQ1eWUvFvHSTVDQDlGQ6zu4qjbOpb3Q8bQwoK+ai2alkXVR4Ltxe9QlgYK3\nStsnPhruzZGA0wbXdpw0bnM+YdlEm5ffSTpNIfgHeaa7Dtb801FtA71ZlH7A6TaI\nSIQuUST9EKmv7xrJyx0W1pGoPOLw5T029aTjnICSLdtV9bLwysrLhIYG5bnPq78B\ncS+jZHFGzD7PUVGQD01nOQIDAQABo2MwYTAdBgNVHQ4EFgQUIuNsB+oTOC9rLoxL\nyzNP7vJUV08wHwYDVR0jBBgwFoAUIuNsB+oTOC9rLoxLyzNP7vJUV08wDwYDVR0T\nAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAHfg\nz5pMNUAKdMzK1aS1EDdK9yKz4qicILz5czSLj1mC7HKDRy8cVADUxEICis++CsCu\nrYOvyCVergHQLREcxPq4rc5Nq1uj6J6649NEeh4WazOOjL4ZfQ1jVznMbGy+fJm3\n3Hoelv6jWRG9iqeJZja7/1s6YC6bWymI/OY1e4wUKeNHAo+Vger7MlHV+RuabaX+\nhSJ8bJAM59NCM7AgMTQpJCncrcdLeceYniGy5Q/qt2b5mJkQVkIdy4TPGGB+AXDJ\nD0q3I/JDRkDUFNFdeW0js7fHdsvCR7O3tJy5zIgEV/o/BCkmJVtuwPYOrw/yOlKj\nTY/U7ATAx9VFF6/vYEOMYSmrZlFX+98L6nJtwDqfLB5VTltqZ4H/KBxGE3IRSt9l\nFXy40U+LnXzhhW+7VBAvyYX8GEXhHkKU8Gqk1xitrqfBXY74xKgyUSTolFSfFVgj\nmcM/X4K45bka+qpkj7Kfv/8D4j6aZekwhN2ly6hhC1SmQ8qjMjpG/mrWOSSHZFmf\nybu9iD2AYHeIOkshIl6xYIa++Q/00/vs46IzAbQyriOi0XxlSMMVtPx0Q3isp+ji\nn8Mq9eOuxYOEQ4of8twUkUDd528iwGtEdwf0Q01UyT84S62N8AySl1ZBKXJz6W4F\nUhWfa/HQYOAPDdEjNgnVwLI23b8t0TozyCWw7q8h\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIEjzCCA3egAwIBAgIQe55B/ALCKJDZtdNT8kD6hTANBgkqhkiG9w0BAQsFADBM\nMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xv\nYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0yMjAxMjYxMjAwMDBaFw0y\nNTAxMjYwMDAwMDBaMFgxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWdu\nIG52LXNhMS4wLAYDVQQDEyVHbG9iYWxTaWduIEF0bGFzIFIzIE9WIFRMUyBDQSAy\nMDIyIFEyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmGmg1LW9b7Lf\n8zDD83yBDTEkt+FOxKJZqF4veWc5KZsQj9HfnUS2e5nj/E+JImlGPsQuoiosLuXD\nBVBNAMcUFa11buFMGMeEMwiTmCXoXRrXQmH0qjpOfKgYc5gHG3BsRGaRrf7VR4eg\nofNMG9wUBw4/g/TT7+bQJdA4NfE7Y4d5gEryZiBGB/swaX6Jp/8MF4TgUmOWmalK\ndZCKyb4sPGQFRTtElk67F7vU+wdGcrcOx1tDcIB0ncjLPMnaFicagl+daWGsKqTh\ncounQb6QJtYHa91KvCfKWocMxQ7OIbB5UARLPmC4CJ1/f8YFm35ebfzAeULYdGXu\njE9CLor0OwIDAQABo4IBXzCCAVswDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQG\nCCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW\nBBSH5Zq7a7B/t95GfJWkDBpA8HHqdjAfBgNVHSMEGDAWgBSP8Et/qC5FJK5NUPpj\nmove4t0bvDB7BggrBgEFBQcBAQRvMG0wLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3Nw\nMi5nbG9iYWxzaWduLmNvbS9yb290cjMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9zZWN1\ncmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L3Jvb3QtcjMuY3J0MDYGA1UdHwQvMC0w\nK6ApoCeGJWh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5jb20vcm9vdC1yMy5jcmwwIQYD\nVR0gBBowGDAIBgZngQwBAgIwDAYKKwYBBAGgMgoBAjANBgkqhkiG9w0BAQsFAAOC\nAQEAKRic9/f+nmhQU/wz04APZLjgG5OgsuUOyUEZjKVhNGDwxGTvKhyXGGAMW2B/\n3bRi+aElpXwoxu3pL6fkElbX3B0BeS5LoDtxkyiVEBMZ8m+sXbocwlPyxrPbX6mY\n0rVIvnuUeBH8X0L5IwfpNVvKnBIilTbcebfHyXkPezGwz7E1yhUULjJFm2bt0SdX\ny+4X/WeiiYIv+fTVgZZgl+/2MKIsu/qdBJc3f3TvJ8nz+Eax1zgZmww+RSQWeOj3\n15Iw6Z5FX+NwzY/Ab+9PosR5UosSeq+9HhtaxZttXG1nVh+avYPGYddWmiMT90J5\nZgKnO/Fx2hBgTxhOTMYaD312kg==\n-----END CERTIFICATE-----\n\n-----BEGIN CERTIFICATE-----\nMIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G\nA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp\nZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4\nMTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG\nA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8\nRgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT\ngHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm\nKPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd\nQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ\nXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw\nDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o\nLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU\nRUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp\njjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK\n6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX\nmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs\nMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH\nWD9f\n-----END CERTIFICATE-----",t={RedisCloudFixed:{ca:e},RedisCloudFlexible:{ca:e}};return zm.default=t,zm}();function a(e){const t=parseFloat(e);return!isNaN(e)&&(0|t)===t}e.convertBufferToString=function e(t,n){if(t instanceof Buffer)return t.toString(n);if(Array.isArray(t)){const i=t.length,r=Array(i);for(let o=0;o<i;++o)r[o]=t[o]instanceof Buffer&&"utf8"===n?t[o].toString():e(t[o],n);return r}return t},e.wrapMultiResult=function(e){if(!e)return null;const t=[],n=e.length;for(let i=0;i<n;++i){const n=e[i];n instanceof Error?t.push([n]):t.push([null,n])}return t},e.isInt=a,e.packObject=function(e){const t={},n=e.length;for(let i=1;i<n;i+=2)t[e[i-1]]=e[i];return t},e.timeout=function(e,t){let n=null;const i=function(){n&&(clearTimeout(n),n=null,e.apply(this,arguments))};return n=setTimeout(i,t,new Error("timeout")),i},e.convertObjectToArray=function(e){const t=[],n=Object.keys(e);for(let i=0,r=n.length;i<r;i++)t.push(n[i],e[n[i]]);return t},e.convertMapToArray=function(e){const t=[];let n=0;return e.forEach(function(e,i){t[n]=i,t[n+1]=e,n+=2}),t},e.toArg=function(e){return null==e?"":String(e)},e.optimizeErrorStack=function(e,t,n){const i=t.split("\n");let r,o="";for(r=1;r<i.length&&-1!==i[r].indexOf(n);++r);for(let e=r;e<i.length;++e)o+="\n"+i[e];if(e.stack){const t=e.stack.indexOf("\n");e.stack=e.stack.slice(0,t)+o}return e},e.parseURL=function(e){if(a(e))return{port:e};let t=(0,i.parse)(e,!0,!0);t.slashes||"/"===e[0]||(e="//"+e,t=(0,i.parse)(e,!0,!0));const n=t.query||{},o={};if(t.auth){const e=t.auth.indexOf(":");o.username=-1===e?t.auth:t.auth.slice(0,e),o.password=-1===e?"":t.auth.slice(e+1)}if(t.pathname&&("redis:"===t.protocol||"rediss:"===t.protocol?t.pathname.length>1&&(o.db=t.pathname.slice(1)):o.path=t.pathname),t.host&&(o.host=t.hostname),t.port&&(o.port=t.port),"string"==typeof n.family){const e=Number.parseInt(n.family,10);Number.isNaN(e)||(o.family=e)}return(0,r.defaults)(o,n),o},e.resolveTLSProfile=function(e){let t=null==e?void 0:e.tls;"string"==typeof t&&(t={profile:t});const n=s.default[null==t?void 0:t.profile];return n&&(t=Object.assign({},n,t),delete t.profile,e=Object.assign({},e,{tls:t})),e},e.sample=function(e,t=0){const n=e.length;return t>=n?null:e[t+Math.floor(Math.random()*(n-t))]},e.shuffle=function(e){let t=e.length;for(;t>0;){const n=Math.floor(Math.random()*t);t--,[e[t],e[n]]=[e[n],e[t]]}return e},e.CONNECTION_CLOSED_ERROR_MSG="Connection is closed.",e.zipMap=function(e,t){const n=new Map;return e.forEach((e,i)=>{n.set(e,t[i])}),n};let u=null;e.getPackageMeta=async function(){if(u)return u;try{const e=(0,n.resolve)(__dirname,"..","..","package.json"),i=await t.promises.readFile(e,"utf8"),r=JSON.parse(i);return u={version:r.version},u}catch(e){return u={version:"error-fetching-version"},u}}}(bm)),bm}function Dm(){if(Nm)return mm;Nm=1,Object.defineProperty(mm,"__esModule",{value:!0});const e=Qd(),t=fm(),n=nm(),i=Tm();class r{constructor(e,t=[],n={},i){if(this.name=e,this.inTransaction=!1,this.isResolved=!1,this.transformed=!1,this.replyEncoding=n.replyEncoding,this.errorStack=n.errorStack,this.args=t.flat(),this.callback=i,this.initPromise(),n.keyPrefix){const e=n.keyPrefix instanceof Buffer;let t=e?n.keyPrefix:null;this._iterateKeys(i=>i instanceof Buffer?(null===t&&(t=Buffer.from(n.keyPrefix)),Buffer.concat([t,i])):e?Buffer.concat([n.keyPrefix,Buffer.from(String(i))]):n.keyPrefix+i)}n.readOnly&&(this.isReadOnly=!0)}static checkFlag(e,t){return!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(r.FLAGS).reduce((e,t)=>(e[t]={},r.FLAGS[t].forEach(n=>{e[t][n]=!0}),e),{})),this.flagMap}getSlot(){if(void 0===this.slot){const e=this.getKeys()[0];this.slot=null==e?null:t(e)}return this.slot}getKeys(){return this._iterateKeys()}toWritable(e){let t;const n="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){const e=new a;e.push(n);for(let t=0;t<this.args.length;++t){const n=this.args[t];n instanceof Buffer?0===n.length?e.push("$0\r\n\r\n"):(e.push("$"+n.length+"\r\n"),e.push(n),e.push("\r\n")):e.push("$"+Buffer.byteLength(n)+"\r\n"+n+"\r\n")}t=e.toBuffer()}else{t=n;for(let e=0;e<this.args.length;++e){const n=this.args[e];t+="$"+Buffer.byteLength(n)+"\r\n"+n+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){const t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,i.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,i.convertBufferToString)(e,this.replyEncoding));const t=r._transformer.reply[this.name];return t&&(e=t(e)),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isResolved||this.reject(new Error("Command timed out"))},e))}initPromise(){const e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;const e=r._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.errorStack?this.reject=e=>{t((0,i.optimizeErrorStack)(e,this.errorStack.stack,__dirname))}:this.reject=t});this.promise=(0,n.default)(e,this.callback)}_iterateKeys(t=e=>e){if(void 0===this.keys&&(this.keys=[],(0,e.exists)(this.name))){const n=(0,e.getKeyIndexes)(this.name,this.args);for(const e of n)this.args[e]=t(this.args[e]),this.keys.push(this.args[e])}return this.keys}_convertValue(e){return t=>{try{const n=this._commandTimeoutTimer;n&&(clearTimeout(n),delete this._commandTimeoutTimer),e(this.transformReply(t)),this.isResolved=!0}catch(e){this.reject(e)}return this.promise}}}mm.default=r,r.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"]},r._transformer={argument:{},reply:{}};const o=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,i.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,i.convertObjectToArray)(e[0])}return e},s=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,i.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,i.convertObjectToArray)(e[1]))}return e};r.setArgumentTransformer("mset",o),r.setArgumentTransformer("msetnx",o),r.setArgumentTransformer("hset",s),r.setArgumentTransformer("hmset",s),r.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){const t={};for(let n=0;n<e.length;n+=2){const i=e[n],r=e[n+1];i in t?Object.defineProperty(t,i,{value:r,configurable:!0,enumerable:!0,writable:!0}):t[i]=r}return t}return e});class a{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){const e=Buffer.allocUnsafe(this.length);let t=0;for(const n of this.items){const i=Buffer.byteLength(n);Buffer.isBuffer(n)?n.copy(e,t):e.write(n,t,i),t+=i}return e}}return mm}var Am,Cm={};var Um,Pm={};function jm(){if(Um)return Pm;Um=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=E;let t=class extends e.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);const e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}};return Pm.default=t,Pm}var Rm,Lm={},Zm={},Mm={},Fm={};var Bm,Jm,Vm,Gm,Wm={};function Km(){if(Jm)return Mm;Jm=1,Object.defineProperty(Mm,"__esModule",{value:!0});const e=Qd(),t=(Rm||(Rm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.executeWithAutoPipelining=e.getFirstValueInFlattenedArray=e.shouldUseAutoPipelining=e.notAllowedAutoPipelineCommands=e.kCallbacks=e.kExec=void 0;const t=Sm(),n=fm(),i=nm();function r(t,n){if(t._runningAutoPipelines.has(n))return;if(!t._autoPipelines.has(n))return;t._runningAutoPipelines.add(n);const i=t._autoPipelines.get(n);t._autoPipelines.delete(n);const o=i[e.kCallbacks];i[e.kCallbacks]=null,i.exec(function(e,i){if(t._runningAutoPipelines.delete(n),e)for(let t=0;t<o.length;t++)process.nextTick(o[t],e);else for(let e=0;e<o.length;e++)process.nextTick(o[e],...i[e]);t._autoPipelines.has(n)&&r(t,n)})}function o(e){for(let n=0;n<e.length;n++){const i=e[n];if("string"==typeof i)return i;if(Array.isArray(i)||(0,t.isArguments)(i)){if(0===i.length)continue;return i[0]}const r=[i].flat();if(r.length>0)return r[0]}}e.kExec=Symbol("exec"),e.kCallbacks=Symbol("callbacks"),e.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client"],e.shouldUseAutoPipelining=function(t,n,i){return n&&t.options.enableAutoPipelining&&!t.isPipeline&&!e.notAllowedAutoPipelineCommands.includes(i)&&!t.options.autoPipeliningIgnoredCommands.includes(i)},e.getFirstValueInFlattenedArray=o,e.executeWithAutoPipelining=function s(a,u,c,l,d){if(a.isCluster&&!a.slots.length)return"wait"===a.status&&a.connect().catch(t.noop),(0,i.default)(new Promise(function(e,t){a.delayUntilReady(n=>{n?t(n):s(a,u,c,l,null).then(e,t)})}),d);const m=a.options.keyPrefix||"",p=a.isCluster?a.slots[n(`${m}${o(l)}`)].join(","):"main";if(!a._autoPipelines.has(p)){const t=a.pipeline();t[e.kExec]=!1,t[e.kCallbacks]=[],a._autoPipelines.set(p,t)}const f=a._autoPipelines.get(p);f[e.kExec]||(f[e.kExec]=!0,setImmediate(r,a,p));const h=new Promise(function(t,n){f[e.kCallbacks].push(function(e,i){e?n(e):t(i)}),"call"===u&&l.unshift(c),f[u](...l)});return(0,i.default)(h,d)}}(Fm)),Fm),n=Dm(),i=function(){if(Bm)return Wm;Bm=1,Object.defineProperty(Wm,"__esModule",{value:!0});const e=v,t=Dm(),n=nm();return Wm.default=class{constructor(n,i=null,r="",o=!1){this.lua=n,this.numberOfKeys=i,this.keyPrefix=r,this.readOnly=o,this.sha=(0,e.createHash)("sha1").update(n).digest("hex");const s=this.sha,a=new WeakSet;this.Command=class extends t.default{toWritable(e){const t=this.reject;return this.reject=n=>{-1!==n.message.indexOf("NOSCRIPT")&&a.delete(e),t.call(this,n)},a.has(e)?"eval"===this.name&&(this.name="evalsha",this.args[0]=s):(a.add(e),this.name="eval",this.args[0]=n),super.toWritable(e)}}}execute(e,t,i,r){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(i.keyPrefix=this.keyPrefix),this.readOnly&&(i.readOnly=!0);const o=new this.Command("evalsha",[this.sha,...t],i);return o.promise=o.promise.catch(n=>{if(-1===n.message.indexOf("NOSCRIPT"))throw n;const r=new this.Command("evalsha",[this.sha,...t],i);return(e.isPipeline?e.redis:e).sendCommand(r)}),(0,n.default)(o.promise,r),e.sendCommand(o)}},Wm}();let r=class{constructor(){this.options={},this.scriptsSet={},this.addedBuiltinSet=new Set}getBuiltinCommands(){return o.slice(0)}createBuiltinCommand(e){return{string:s(null,e,"utf8"),buffer:s(null,e,null)}}addBuiltinCommand(e){this.addedBuiltinSet.add(e),this[e]=s(e,e,"utf8"),this[e+"Buffer"]=s(e+"Buffer",e,null)}defineCommand(e,t){const n=new i.default(t.lua,t.numberOfKeys,this.options.keyPrefix,t.readOnly);this.scriptsSet[e]=n,this[e]=a(e,e,n,"utf8"),this[e+"Buffer"]=a(e+"Buffer",e,n,null)}sendCommand(e,t,n){throw new Error('"sendCommand" is not implemented')}};const o=e.list.filter(e=>"monitor"!==e);function s(e,i,r){return void 0===r&&(r=i,i=null),function(...o){const s=i||o.shift();let a=o[o.length-1];"function"==typeof a?o.pop():a=void 0;const u={errorStack:this.options.showFriendlyErrorStack?new Error:void 0,keyPrefix:this.options.keyPrefix,replyEncoding:r};return(0,t.shouldUseAutoPipelining)(this,e,s)?(0,t.executeWithAutoPipelining)(this,e,s,o,a):this.sendCommand(new n.default(s,o,u,a))}}function a(e,n,i,r){return function(...o){const s="function"==typeof o[o.length-1]?o.pop():void 0,a={replyEncoding:r};return this.options.showFriendlyErrorStack&&(a.errorStack=new Error),(0,t.shouldUseAutoPipelining)(this,e,n)?(0,t.executeWithAutoPipelining)(this,e,n,o,s):i.execute(this,o,a,s)}}return o.push("sentinel"),o.forEach(function(e){r.prototype[e]=s(e,e,"utf8"),r.prototype[e+"Buffer"]=s(e+"Buffer",e,null)}),r.prototype.call=s("call","utf8"),r.prototype.callBuffer=s("callBuffer",null),r.prototype.send_command=r.prototype.call,Mm.default=r,Mm}function qm(){if(Vm)return Zm;Vm=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=fm(),t=Qd(),n=nm(),i=$,r=Dm(),o=Tm(),s=Km();let a=class extends s.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{const n=e.scriptsSet[t];this._shaToScript[n.sha]=n,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});const t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,n){if("exec"===this._queue[n].name&&Array.isArray(e[1])){const t=e[1].length;for(let i=0;i<t;i++){if(e[1][i]instanceof Error)continue;const r=this._queue[n-(t-i)];try{e[1][i]=r.transformReply(e[1][i])}catch(t){e[1][i]=t}}}if(this._result[n]=e,--this.replyPending)return;if(this.isCluster){let e,n=!0;for(let i=0;i<this._result.length;++i){const r=this._result[i][0],o=this._queue[i];if(r){if("exec"===o.name&&"EXECABORT Transaction discarded because of previous errors."===r.message)continue;if(e){if(e.name!==r.name||e.message!==r.message){n=!1;break}}else e={name:r.name,message:r.message}}else if(!o.inTransaction){if(!((0,t.exists)(o.name)&&(0,t.hasFlag)(o.name,"readonly"))){n=!1;break}}}if(e&&n){const t=this,n=e.message.split(" "),i=this._queue;let o=!1;this._queue=[];for(let e=0;e<i.length;++e){if(!("ASK"!==n[0]||o||"asking"===i[e].name||i[e-1]&&"asking"===i[e-1].name)){const e=new r.default("asking");e.ignore=!0,this.sendCommand(e)}i[e].initPromise(),this.sendCommand(i[e]),o=i[e].inTransaction}let s=!0;void 0===this.leftRedirections&&(this.leftRedirections={});const a=function(){t.exec()},u=this.redis;if(u.handleError(e,this.leftRedirections,{moved:function(e,i){t.preferKey=i,u.slots[n[1]]=[i],u._groupsBySlot[n[1]]=u._groupsIds[u.slots[n[1]].join(";")],u.refreshSlotsCache(),t.exec()},ask:function(e,n){t.preferKey=n,t.exec()},tryagain:a,clusterDown:a,connectionClosed:a,maxRedirections:()=>{s=!1},defaults:()=>{s=!1}}),s)return}}let i=0;for(let e=0;e<this._queue.length-i;++e)this._queue[e+i].ignore&&(i+=1),this._result[e]=this._result[e+i];this.resolve(this._result.slice(0,this._result.length-i))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);const t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,n,i;for(let r=0;r<e.length;++r)t=e[r],n=t[0],i=t.slice(1),this[n].apply(this,i);return this}};Zm.default=a;const u=a.prototype.multi;a.prototype.multi=function(){return this._transactions+=1,u.apply(this,arguments)};const c=a.prototype.execBuffer;return a.prototype.execBuffer=(0,i.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),c.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),a.prototype.exec=function(t){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(o.noop),t&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,n.default)(this.promise,t)),this.redis.delayUntilReady(e=>{e?this.reject(e):this.exec(t)}),this.promise;if(this._transactions>0)return this._transactions-=1,c.apply(this,arguments);let i;if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,n.default)(this.promise,t)),this._queue.length||this.resolve([]),this.isCluster){const t=[];for(let n=0;n<this._queue.length;n++){const i=this._queue[n].getKeys();if(i.length&&t.push(i[0]),i.length&&e.generateMulti(i)<0)return this.reject(new Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(t.length){if(i=function(t,n){const i=e(n[0]),r=t._groupsBySlot[i];for(let i=1;i<n.length;i++)if(t._groupsBySlot[e(n[i])]!==r)return-1;return i}(this.redis,t),i<0)return this.reject(new Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else i=16384*Math.random()|0}const r=this;return function(){let e,t=r.replyPending=r._queue.length;r.isCluster&&(e={slot:i,redis:r.redis.connectionPool.nodes.all[r.preferKey]});let n,o="";const s={isPipeline:!0,destination:r.isCluster?e:{redis:r.redis},write(e){"string"!=typeof e?(n||(n=[]),o&&(n.push(Buffer.from(o,"utf8")),o=""),n.push(e)):o+=e,--t||(n?(o&&n.push(Buffer.from(o,"utf8")),s.destination.redis.stream.write(Buffer.concat(n))):s.destination.redis.stream.write(o),t=r._queue.length,o="",n=void 0)}};for(let t=0;t<r._queue.length;++t)r.redis.sendCommand(r._queue[t],s,e);r.promise}(),this.promise},Zm}function Hm(){if(Gm)return Lm;Gm=1,Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.addTransactionSupport=void 0;const e=Tm(),t=nm(),n=qm();return Lm.addTransactionSupport=function(i){i.pipeline=function(e){const t=new n.default(this);return Array.isArray(e)&&t.addBatch(e),t};const{multi:r}=i;i.multi=function(i,o){if(void 0!==o||Array.isArray(i)||(o=i,i=null),o&&!1===o.pipeline)return r.call(this);const s=new n.default(this);s.multi(),Array.isArray(i)&&s.addBatch(i);const a=s.exec;s.exec=function(n){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(e.noop),(0,t.default)(new Promise((e,t)=>{this.redis.delayUntilReady(n=>{n?t(n):this.exec(s).then(e,t)})}),n);if(this._transactions>0&&a.call(s),this.nodeifiedPromise)return a.call(s);const i=a.call(s);return(0,t.default)(i.then(function(t){const n=t[t.length-1];if(void 0===n)throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");if(n[0]){n[0].previousErrors=[];for(let e=0;e<t.length-1;++e)t[e][0]&&n[0].previousErrors.push(t[e][0]);throw n[0]}return(0,e.wrapMultiResult)(n[1])}),n)};const{execBuffer:u}=s;return s.execBuffer=function(e){return this._transactions>0&&u.call(s),s.exec(e)},s};const{exec:o}=i;i.exec=function(n){return(0,t.default)(o.call(this).then(function(t){return Array.isArray(t)&&(t=(0,e.wrapMultiResult)(t)),t}),n)}},Lm}var Qm,Ym={};function Xm(){if(Qm)return Ym;return Qm=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.default=function(e,t){Object.getOwnPropertyNames(t.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t.prototype,n))})},Ym}var ep,tp={};var np,ip,rp={},op={};function sp(){if(np)return op;np=1,Object.defineProperty(op,"__esModule",{value:!0}),op.getConnectionName=op.weightSrvRecords=op.groupSrvRecords=op.getUniqueHostnamesFromOptions=op.normalizeNodeOptions=op.nodeKeyToRedisOptions=op.getNodeKey=void 0;const e=Tm(),t=N;return op.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},op.nodeKeyToRedisOptions=function(e){const t=e.lastIndexOf(":");if(-1===t)throw new Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},op.normalizeNodeOptions=function(t){return t.map(t=>{const n={};if("object"==typeof t)Object.assign(n,t);else if("string"==typeof t)Object.assign(n,(0,e.parseURL)(t));else{if("number"!=typeof t)throw new Error("Invalid argument "+t);n.port=t}return"string"==typeof n.port&&(n.port=parseInt(n.port,10)),delete n.db,n.port||(n.port=6379),n.host||(n.host="127.0.0.1"),(0,e.resolveTLSProfile)(n)})},op.getUniqueHostnamesFromOptions=function(e){const n={};return e.forEach(e=>{n[e.host]=!0}),Object.keys(n).filter(e=>!(0,t.isIP)(e))},op.groupSrvRecords=function(e){const t={};for(const n of e)t.hasOwnProperty(n.priority)?(t[n.priority].totalWeight+=n.weight,t[n.priority].records.push(n)):t[n.priority]={totalWeight:n.weight,records:[n]};return t},op.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();const t=Math.floor(Math.random()*(e.totalWeight+e.records.length));let n=0;for(const[i,r]of e.records.entries())if(n+=1+r.weight,n>t)return e.totalWeight-=r.weight,e.records.splice(i,1),r},op.getConnectionName=function(e,t){const n=`ioredis-cluster(${e})`;return t?`${n}:${t}`:n},op}function ap(){if(ip)return rp;ip=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=sp(),t=Tm(),n=of(),i=(0,t.Debug)("cluster:subscriber");return rp.default=class{constructor(t,n,r=!1){this.connectionPool=t,this.emitter=n,this.isSharded=r,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(i("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):i("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(t,n)=>{this.started&&this.subscriber&&(0,e.getNodeKey)(this.subscriber.options)===n&&(i("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(i("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),i("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){const r=this.lastActiveSubscriber;r&&(r.off("end",this.onSubscriberEnd),r.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());const o=(0,t.sample)(this.connectionPool.getNodes());if(!o)return i("selecting subscriber failed since there is no node discovered in the cluster yet"),void(this.subscriber=null);const{options:s}=o;i("selected a subscriber %s:%s",s.host,s.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new n.default({port:s.port,host:s.host,username:s.username,password:s.password,enableReadyCheck:!0,connectionName:(0,e.getConnectionName)(a,s.connectionName),lazyConnect:!0,tls:s.tls,retryStrategy:null}),this.subscriber.on("error",t.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);const u={subscribe:[],psubscribe:[],ssubscribe:[]};if(r){const e=r.condition||r.prevCondition;e&&e.subscriber&&(u.subscribe=e.subscriber.channels("subscribe"),u.psubscribe=e.subscriber.channels("psubscribe"),u.ssubscribe=e.subscriber.channels("ssubscribe"))}if(u.subscribe.length||u.psubscribe.length||u.ssubscribe.length){let e=0;for(const t of["subscribe","psubscribe","ssubscribe"]){const n=u[t];if(0!=n.length)if(i("%s %d channels",t,n.length),"ssubscribe"===t)for(const r of n)e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{i("failed to ssubscribe to channel: %s",r)});else e+=1,this.subscriber[t](n).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{i("failed to %s %d channels",t,n.length)})}}else this.lastActiveSubscriber=this.subscriber;for(const e of["message","messageBuffer"])this.subscriber.on(e,(t,n)=>{this.emitter.emit(e,t,n)});for(const e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,n,i)=>{this.emitter.emit(e,t,n,i)});if(1==this.isSharded)for(const e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,n)=>{this.emitter.emit(e,t,n)})}},rp}var up,cp={};function lp(){if(up)return cp;up=1,Object.defineProperty(cp,"__esModule",{value:!0});const e=y,t=Tm(),n=sp(),i=of(),r=(0,t.Debug)("cluster:connectionPool");let o=class extends e.EventEmitter{constructor(e){super(),this.redisOptions=e,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){const t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){const n=Object.keys(this.nodes[e]),i=(0,t.sample)(n);return this.nodes[e][i]}addMasterNode(e){const t=(0,n.getNodeKey)(e.options),i=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=i,this.nodes.master[t]=i,!0)}createRedisFromOptions(e,n){return new i.default((0,t.defaults)({retryStrategy:null,enableOfflineQueue:!0,readOnly:n},e,this.redisOptions,{lazyConnect:!0}))}findOrCreate(e,i=!1){const o=(0,n.getNodeKey)(e);let s;return i=Boolean(i),this.specifiedOptions[o]?Object.assign(e,this.specifiedOptions[o]):this.specifiedOptions[o]=e,this.nodes.all[o]?(s=this.nodes.all[o],s.options.readOnly!==i&&(s.options.readOnly=i,r("Change role of %s to %s",o,i?"slave":"master"),s[i?"readonly":"readwrite"]().catch(t.noop),i?(delete this.nodes.master[o],this.nodes.slave[o]=s):(delete this.nodes.slave[o],this.nodes.master[o]=s))):(r("Connecting to %s as %s",o,i?"slave":"master"),s=this.createRedisFromOptions(e,i),this.nodes.all[o]=s,this.nodes[i?"slave":"master"][o]=s,s.once("end",()=>{this.removeNode(o),this.emit("-node",s,o),Object.keys(this.nodes.all).length||this.emit("drain")}),this.emit("+node",s,o),s.on("error",function(e){this.emit("nodeError",e,o)})),s}reset(e){r("Reset with %O",e);const t={};e.forEach(e=>{const i=(0,n.getNodeKey)(e);e.readOnly&&t[i]||(t[i]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(r("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{const n=t[e];this.findOrCreate(n,n.readOnly)})}removeNode(e){const{nodes:t}=this;t.all[e]&&(r("Remove %s from the pool",e),delete t.all[e]),delete t.master[e],delete t.slave[e]}};return cp.default=o,cp}var dp,mp,pp,fp={};function hp(){if(mp)return dp;function e(e,t){t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=new Array(4))}return mp=1,e.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var n=this.size();if(!(t>=n||t<-n))return t<0&&(t+=n),t=this._head+t&this._capacityMask,this._list[t]}},e.prototype.get=function(e){return this.peekAt(e)},e.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},e.prototype.peekFront=function(){return this.peek()},e.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(e.prototype,"length",{get:function(){return this.size()}}),e.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.unshift=function(e){if(0===arguments.length)return this.size();var t=this._list.length;return this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},e.prototype.push=function(e){if(0===arguments.length)return this.size();var t=this._tail;return this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},e.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var n=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),n}},e.prototype.removeOne=function(e){var t=e;if(t===(0|t)&&this._head!==this._tail){var n=this.size(),i=this._list.length;if(!(t>=n||t<-n)){t<0&&(t+=n),t=this._head+t&this._capacityMask;var r,o=this._list[t];if(e<n/2){for(r=e;r>0;r--)this._list[t]=this._list[t=t-1+i&this._capacityMask];this._list[t]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(r=n-1-e;r>0;r--)this._list[t]=this._list[t=t+1+i&this._capacityMask];this._list[t]=void 0,this._tail=this._tail-1+i&this._capacityMask}return o}}},e.prototype.remove=function(e,t){var n,i=e,r=t;if(i===(0|i)&&this._head!==this._tail){var o=this.size(),s=this._list.length;if(!(i>=o||i<-o||t<1)){if(i<0&&(i+=o),1===t||!t)return(n=new Array(1))[0]=this.removeOne(i),n;if(0===i&&i+t>=o)return n=this.toArray(),this.clear(),n;var a;for(i+t>o&&(t=o-i),n=new Array(t),a=0;a<t;a++)n[a]=this._list[this._head+i+a&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===o){for(this._tail=this._tail-t+s&this._capacityMask,a=t;a>0;a--)this._list[i=i+1+s&this._capacityMask]=void 0;return n}if(0===e){for(this._head=this._head+t+s&this._capacityMask,a=t-1;a>0;a--)this._list[i=i+1+s&this._capacityMask]=void 0;return n}if(i<o/2){for(this._head=this._head+e+t+s&this._capacityMask,a=e;a>0;a--)this.unshift(this._list[i=i-1+s&this._capacityMask]);for(i=this._head-1+s&this._capacityMask;r>0;)this._list[i=i-1+s&this._capacityMask]=void 0,r--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+s&this._capacityMask,a=o-(t+e);a>0;a--)this.push(this._list[i++]);for(i=this._tail;r>0;)this._list[i=i+1+s&this._capacityMask]=void 0,r--}return this._head<2&&this._tail>1e4&&this._tail<=s>>>2&&this._shrinkArray(),n}}},e.prototype.splice=function(e,t){var n=e;if(n===(0|n)){var i=this.size();if(n<0&&(n+=i),!(n>i)){if(arguments.length>2){var r,o,s,a=arguments.length,u=this._list.length,c=2;if(!i||n<i/2){for(o=new Array(n),r=0;r<n;r++)o[r]=this._list[this._head+r&this._capacityMask];for(0===t?(s=[],n>0&&(this._head=this._head+n+u&this._capacityMask)):(s=this.remove(n,t),this._head=this._head+n+u&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(r=n;r>0;r--)this.unshift(o[r-1])}else{var l=(o=new Array(i-(n+t))).length;for(r=0;r<l;r++)o[r]=this._list[this._head+n+t+r&this._capacityMask];for(0===t?(s=[],n!=i&&(this._tail=this._head+n+u&this._capacityMask)):(s=this.remove(n,t),this._tail=this._tail-l+u&this._capacityMask);c<a;)this.push(arguments[c++]);for(r=0;r<l;r++)this.push(o[r])}return s}return this.remove(n,t)}}},e.prototype.clear=function(){this._list=new Array(this._list.length),this._head=0,this._tail=0},e.prototype.isEmpty=function(){return this._head===this._tail},e.prototype.toArray=function(){return this._copyArray(!1)},e.prototype._fromArray=function(e){var t=e.length,n=this._nextPowerOf2(t);this._list=new Array(n),this._capacityMask=n-1,this._tail=t;for(var i=0;i<t;i++)this._list[i]=e[i]},e.prototype._copyArray=function(e,t){var n=this._list,i=n.length,r=this.length;if((t|=r)==r&&this._head<this._tail)return this._list.slice(this._head,this._tail);var o,s=new Array(t),a=0;if(e||this._head>this._tail){for(o=this._head;o<i;o++)s[a++]=n[o];for(o=0;o<this._tail;o++)s[a++]=n[o]}else for(o=this._head;o<this._tail;o++)s[a++]=n[o];return s},e.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},e.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},e.prototype._nextPowerOf2=function(e){var t=1<<Math.log(e)/Math.log(2)+1;return Math.max(t,4)},dp=e}var gp,vp,yp={};function _p(){if(vp)return cm;vp=1,Object.defineProperty(cm,"__esModule",{value:!0});const e=Qd(),t=y,n=lm(),i=nm(),r=Dm(),o=function(){if(Am)return Cm;Am=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=lm();let t=class extends e.RedisError{constructor(e,t){super(e),this.lastNodeError=t,Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}};return Cm.default=t,t.defaultMessage="Failed to refresh slots cache.",Cm}(),s=of(),a=jm(),u=Hm(),c=Tm(),l=Xm(),d=Km(),m=function(){if(ep)return tp;ep=1,Object.defineProperty(tp,"__esModule",{value:!0}),tp.DEFAULT_CLUSTER_OPTIONS=void 0;const e=O;return tp.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:e.resolveSrv,dnsLookup:e.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1},tp}(),p=ap(),f=lp(),h=function(){if(pp)return fp;pp=1,Object.defineProperty(fp,"__esModule",{value:!0});const e=Tm(),t=hp(),n=(0,e.Debug)("delayqueue");return fp.default=class{constructor(){this.queues={},this.timeouts={}}push(e,n,i){const r=i.callback||process.nextTick;this.queues[e]||(this.queues[e]=new t),this.queues[e].push(n),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{r(()=>{this.timeouts[e]=null,this.execute(e)})},i.timeout))}execute(e){const t=this.queues[e];if(!t)return;const{length:i}=t;if(i)for(n("send %d commands in %s queue",i,e),this.queues[e]=null;t.length>0;)t.shift()()}},fp}(),g=sp(),v=hp(),_=function(){if(gp)return yp;gp=1,Object.defineProperty(yp,"__esModule",{value:!0});const e=Tm(),t=ap(),n=lp(),i=sp(),r=fm(),o=(0,e.Debug)("cluster:subscriberGroup");return yp.default=class{constructor(e,t){this.cluster=e,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,e.on("+node",e=>{this._addSubscriber(e)}),e.on("-node",e=>{this._removeSubscriber(e)}),e.on("refresh",()=>{this._refreshSlots(e)}),e.on("forceRefresh",()=>{t()})}getResponsibleSubscriber(e){const t=this.clusterSlots[e][0];return this.shardedSubscribers.get(t)}addChannels(e){const t=r(e[0]);e.forEach(e=>{if(r(e)!=t)return-1});const n=this.channels.get(t);return n?this.channels.set(t,n.concat(e)):this.channels.set(t,e),[...this.channels.values()].flatMap(e=>e).length}removeChannels(e){const t=r(e[0]);e.forEach(e=>{if(r(e)!=t)return-1});const n=this.channels.get(t);if(n){const i=n.filter(t=>!e.includes(t));this.channels.set(t,i)}return[...this.channels.values()].flatMap(e=>e).length}stop(){for(const e of this.shardedSubscribers.values())e.stop()}start(){for(const e of this.shardedSubscribers.values())e.isStarted()||e.start()}_addSubscriber(e){const r=new n.default(e.options);if(r.addMasterNode(e)){const n=new t.default(r,this.cluster,!0),o=(0,i.getNodeKey)(e.options);return this.shardedSubscribers.set(o,n),n.start(),this._resubscribe(),this.cluster.emit("+subscriber"),n}return null}_removeSubscriber(e){const t=(0,i.getNodeKey)(e.options),n=this.shardedSubscribers.get(t);return n&&(n.stop(),this.shardedSubscribers.delete(t),this._resubscribe(),this.cluster.emit("-subscriber")),this.shardedSubscribers}_refreshSlots(e){if(!this._slotsAreEqual(e.slots)){o("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.slots.length;t++){const n=e.slots[t][0];this.subscriberToSlotsIndex.has(n)||this.subscriberToSlotsIndex.set(n,[]),this.subscriberToSlotsIndex.get(n).push(Number(t))}return this._resubscribe(),this.clusterSlots=JSON.parse(JSON.stringify(e.slots)),this.cluster.emit("subscribersReady"),!0}return o("Nothing to refresh because the new cluster map is equal to the previous one."),!1}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{const n=this.subscriberToSlotsIndex.get(t);n&&(e.associateSlotRange(n),n.forEach(t=>{const n=e.getInstance(),i=this.channels.get(t);i&&i.length>0&&n&&(n.ssubscribe(i),n.on("ready",()=>{n.ssubscribe(i)}))}))})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}},yp}(),b=(0,c.Debug)("cluster"),$=new WeakSet;class k extends d.default{constructor(e,n={}){if(super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new h.default,this.offlineQueue=new v,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,t.EventEmitter.call(this),this.startupNodes=e,this.options=(0,c.defaults)({},n,m.DEFAULT_CLUSTER_OPTIONS,this.options),1==this.options.shardedSubscribers&&(this.shardedSubscribers=new _.default(this,this.refreshSlotsCache.bind(this))),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw new Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');this.connectionPool=new f.default(this.options.redisOptions),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new p.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{b("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(new Error("Redis is already connecting/connected"));const i=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(r=>{if(this.connectionEpoch!==i)return b("discard connecting after resolving startup nodes because epoch not match: %d != %d",i,this.connectionEpoch),void t(new n.RedisError("Connection is discarded because a new connection is made"));if("connecting"!==this.status)return b("discard connecting after resolving startup nodes because the status changed to %s",this.status),void t(new n.RedisError("Connection is aborted"));this.connectionPool.reset(r);const a=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()};let u;const c=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",u),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(b("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):a()}):a()};u=()=>{const e=new Error("None of startup nodes is available");this.removeListener("refresh",c),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",c),this.once("close",u),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===o.default.defaultMessage&&(s.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start()}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){const t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,b("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){const t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){const t=(0,i.default)(Promise.resolve("OK"),e);return setImmediate(function(){this.setStatus("close"),this.handleCloseEvent()}.bind(this)),t}return(0,i.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===c.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t={}){const n=e.length>0?e:this.startupNodes.slice(0),i=Object.assign({},this.options,t);return new k(n,i)}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw new Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(const t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;const t=this,n=e=>{this.isRefreshing=!1;for(const t of this._refreshSlotsCacheCallbacks)t(e);this._refreshSlotsCacheCallbacks=[]},i=(0,c.shuffle)(this.connectionPool.getNodes());let r=null;!function e(s){if(s===i.length){const e=new o.default(o.default.defaultMessage,r);return n(e)}const a=i[s],u=`${a.options.host}:${a.options.port}`;b("getting slot cache from %s",u),t.getInfoFromNode(a,function(i){switch(t.status){case"close":case"end":return n(new Error("Cluster is disconnected."));case"disconnecting":return n(new Error("Cluster is disconnecting."))}i?(t.emit("node error",i,u),r=i,e(s+1)):(t.emit("refresh"),n())})}(0)}sendCommand(t,i,o){if("wait"===this.status&&this.connect().catch(c.noop),"end"===this.status)return t.reject(new Error(c.CONNECTION_CLOSED_ERROR_MSG)),t.promise;let s=this.options.scaleReads;if("master"!==s){t.isReadOnly||(0,e.exists)(t.name)&&(0,e.hasFlag)(t.name,"readonly")||(s="master")}let a=o?o.slot:t.getSlot();const u={},l=this;if(!o&&!$.has(t)){$.add(t);const e=t.reject;t.reject=function(n){const i=d.bind(null,!0);l.handleError(n,u,{moved:function(e,n){b("command %s is moved to %s",t.name,n),a=Number(e),l.slots[e]?l.slots[e][0]=n:l.slots[e]=[n],l._groupsBySlot[e]=l._groupsIds[l.slots[e].join(";")],l.connectionPool.findOrCreate(l.natMapper(n)),d(),b("refreshing slot caches... (triggered by MOVED error)"),l.refreshSlotsCache()},ask:function(e,n){b("command %s is required to ask %s:%s",t.name,n);const i=l.natMapper(n);l.connectionPool.findOrCreate(i),d(!1,`${i.host}:${i.port}`)},tryagain:i,clusterDown:i,connectionClosed:i,maxRedirections:function(n){e.call(t,n)},defaults:function(){e.call(t,n)}})}}function d(e,u){if("end"===l.status)return void t.reject(new n.AbortError("Cluster is ended."));let d;if("ready"===l.status||"cluster"===t.name){if(o&&o.redis)d=o.redis;else if(r.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.name)||r.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.name)){if(1!=l.options.shardedSubscribers||"ssubscribe"!=t.name&&"sunsubscribe"!=t.name)d=l.subscriber.getInstance();else{const e=l.shardedSubscribers.getResponsibleSubscriber(a);let i=-1;"ssubscribe"==t.name&&(i=l.shardedSubscribers.addChannels(t.getKeys())),"sunsubscribe"==t.name&&(i=l.shardedSubscribers.removeChannels(t.getKeys())),-1!==i?d=e.getInstance():t.reject(new n.AbortError("Can't add or remove the given channels. Are they in the same slot?"))}if(!d)return void t.reject(new n.AbortError("No subscriber for the cluster"))}else{if(!e){if("number"==typeof a&&l.slots[a]){const e=l.slots[a];if("function"==typeof s){const n=e.map(function(e){return l.connectionPool.getInstanceByKey(e)});d=s(n,t),Array.isArray(d)&&(d=(0,c.sample)(d)),d||(d=n[0])}else{let t;t="all"===s?(0,c.sample)(e):"slave"===s&&e.length>1?(0,c.sample)(e,1):e[0],d=l.connectionPool.getInstanceByKey(t)}}u&&(d=l.connectionPool.getInstanceByKey(u),d.asking())}d||(d=("function"==typeof s?null:l.connectionPool.getSampleInstance(s))||l.connectionPool.getSampleInstance("all"))}o&&!o.redis&&(o.redis=d)}d?d.sendCommand(t,i):l.options.enableOfflineQueue?l.offlineQueue.push({command:t,stream:i,node:o}):t.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false"))}return d(),t.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,n){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void n.maxRedirections(new Error("Too many Cluster redirections. Last error: "+e));const i=e.message.split(" ");if("MOVED"===i[0]){const e=this.options.retryDelayOnMoved;e&&"number"==typeof e?this.delayQueue.push("moved",n.moved.bind(null,i[1],i[2]),{timeout:e}):n.moved(i[1],i[2])}else"ASK"===i[0]?n.ask(i[1],i[2]):"TRYAGAIN"===i[0]?this.delayQueue.push("tryagain",n.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===i[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",n.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===c.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",n.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):n.defaults()}resetOfflineQueue(){this.offlineQueue=new v}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;const e=()=>{this.slotsTimer=setTimeout(()=>{b('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){b("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){let t;e&&b("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(t=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof t?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,b("Cluster is disconnected. Retrying after %dms",t),this.connect().catch(function(e){b("Got error %s when reconnecting. Ignoring...",e)})},t)):(this.setStatus("end"),this.flushQueue(new Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){b("send %d commands in offline queue",this.offlineQueue.length);const e=this.offlineQueue;let t;for(this.resetOfflineQueue();t=e.shift();)this.sendCommand(t.command,t.stream,t.node)}}natMapper(e){const t="string"==typeof e?e:`${e.host}:${e.port}`;let n=null;return this.options.natMap&&"function"==typeof this.options.natMap?n=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(n=this.options.natMap[t]),n?(b("NAT mapping %s -> %O",t,n),Object.assign({},n)):"string"==typeof e?(0,g.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(new Error("Node is disconnected"));const n=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,connectionName:(0,g.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});n.on("error",c.noop),n.cluster("SLOTS",(0,c.timeout)((e,i)=>{if(n.disconnect(),e)return b("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status)return b("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",i.length,this.status),void t();const r=[];b("cluster slots result count: %d",i.length);for(let e=0;e<i.length;++e){const t=i[e],n=t[0],o=t[1],s=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;const n=this.natMapper({host:t[e][0],port:t[e][1]});n.readOnly=2!==e,r.push(n),s.push(n.host+":"+n.port)}b("cluster slots result [%d]: slots %d~%d served by %s",e,n,o,s);for(let e=n;e<=o;e++)this.slots[e]=s}this._groupsIds=Object.create(null);let o=0;for(let e=0;e<16384;e++){const t=(this.slots[e]||[]).join(";");t.length?(this._groupsIds[t]||(this._groupsIds[t]=++o),this._groupsBySlot[e]=this._groupsIds[t]):this._groupsBySlot[e]=void 0}this.connectionPool.reset(r),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(const t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,n)=>{if(t)return e(t);if("string"!=typeof n)return e();let i;const r=n.split("\r\n");for(let e=0;e<r.length;++e){const t=r[e].split(":");if("cluster_state"===t[0]){i=t[1];break}}"fail"===i?(b("cluster state not ok (%s)",i),e(null,i)):e()})}resolveSrv(e){return new Promise((t,n)=>{this.options.resolveSrv(e,(e,i)=>{if(e)return n(e);const r=this,o=(0,g.groupSrvRecords)(i),s=Object.keys(o).sort((e,t)=>parseInt(e)-parseInt(t));!function e(i){if(!s.length)return n(i);const a=s[0],u=o[a],c=(0,g.weightSrvRecords)(u);u.records.length||s.shift(),r.dnsLookup(c.name).then(e=>t({host:e,port:c.port}),e)}()})})}dnsLookup(e){return new Promise((t,n)=>{this.options.dnsLookup(e,(i,r)=>{i?(b("failed to resolve hostname %s to IP: %s",e,i.message),n(i)):(b("resolved hostname %s to IP %s",e,r),t(r))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw new Error("`startupNodes` should contain at least one node.");const e=(0,g.normalizeNodeOptions)(this.startupNodes),t=(0,g.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;const n=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),i=(0,c.zipMap)(t,n);return e.map(e=>{const t=i.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:n={}}){return new a.default({objectMode:!0,key:t,redis:this,command:e,...n})}}return(0,l.default)(k,t.EventEmitter),(0,u.addTransactionSupport)(k.prototype),cm.default=k,cm}var bp,$p,kp={},wp={},Sp={};function Ip(){if(bp)return Sp;bp=1,Object.defineProperty(Sp,"__esModule",{value:!0});const e=(0,Tm().Debug)("AbstractConnector");return Sp.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){const t=this.stream,n=setTimeout(()=>{e("stream %s:%s still open, destroying it",t.remoteAddress,t.remotePort),t.destroy()},this.disconnectTimeout);t.on("close",()=>clearTimeout(n)),t.end()}}},Sp}var xp,Ep={},Op={};var Np,zp,Tp,Dp={};function Ap(){if(zp)return Ep;zp=1,Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.SentinelIterator=void 0;const e=N,t=Tm(),n=z,i=function(){if(xp)return Op;function e(e,t){return(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379)}return xp=1,Object.defineProperty(Op,"__esModule",{value:!0}),Op.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){const e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(t){for(let n=0;n<this.sentinels.length;n++)if(e(t,this.sentinels[n]))return!1;return this.sentinels.push(t),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}},Op}();Ep.SentinelIterator=i.default;const r=Ip(),o=of(),s=function(){if(Np)return Dp;Np=1,Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.FailoverDetector=void 0;const e=(0,Tm().Debug)("FailoverDetector"),t="+switch-master";return Dp.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){this.isDisconnected=!0;for(const e of this.sentinels)e.client.disconnect()}async subscribe(){e("Starting FailoverDetector");const n=[];for(const i of this.sentinels){const r=i.client.subscribe(t).catch(t=>{e("Failed to subscribe to failover messages on sentinel %s:%s (%s)",i.address.host||"127.0.0.1",i.address.port||26739,t.message)});n.push(r),i.client.on("message",e=>{this.isDisconnected||e!==t||this.disconnect()})}await Promise.all(n)}disconnect(){this.isDisconnected=!0,e("Failover detected, disconnecting"),this.connector.disconnect()}},Dp}(),a=(0,t.Debug)("SentinelConnector");let u=class extends r.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw new Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw new Error("Requires the name of master.");this.sentinelIterator=new i.default(this.options.sentinels)}check(e){const t=!e.role||this.options.role===e.role;return t||(a("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(i){let r;this.connecting=!0,this.retryAttempts=0;const o=async()=>{const s=this.sentinelIterator.next();if(s.done){this.sentinelIterator.reset(!1);const e="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null;let t="number"!=typeof e?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${e}ms.`;r&&(t+=` Last error: ${r.message}`),a(t);const n=new Error(t);if("number"==typeof e)return i("error",n),await new Promise(t=>setTimeout(t,e)),o();throw n}let u=null,c=null;try{u=await this.resolve(s.value)}catch(e){c=e}if(!this.connecting)throw new Error(t.CONNECTION_CLOSED_ERROR_MSG);const l=s.value.host+":"+s.value.port;if(u)return a("resolved: %s:%s from sentinel %s",u.host,u.port,l),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(u,this.options.tls),this.stream=(0,n.connect)(u),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,e.createConnection)(u),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{const e=c?"failed to connect to sentinel "+l+" because "+c.message:"connected to sentinel "+l+" successfully, but got an invalid reply: "+u;return a(e),i("sentinelError",new Error(e)),c&&(r=c),o()}};return o()}async updateSentinels(e){if(!this.options.updateSentinels)return;const n=await e.sentinel("sentinels",this.options.name);Array.isArray(n)&&(n.map(t.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){const t=this.sentinelNatResolve(c(e));this.sentinelIterator.add(t)&&a("adding sentinel %s:%s",t.host,t.port)}}),a("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){const t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){const n=await e.sentinel("slaves",this.options.name);if(!Array.isArray(n))return null;const i=n.map(t.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,n){if(0===e.length)return null;let i;if("function"==typeof n)i=n(e);else if(null!==n&&"object"==typeof n){const t=Array.isArray(n)?n:[n];t.sort((e,t)=>(e.prio||(e.prio=1),t.prio||(t.prio=1),e.prio<t.prio?-1:e.prio>t.prio?1:0));for(let n=0;n<t.length;n++){for(let r=0;r<e.length;r++){const o=e[r];if(o.ip===t[n].ip&&o.port===t[n].port){i=o;break}}if(i)break}}i||(i=(0,t.sample)(e));return c(i)}(i,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;const t=`${e.host}:${e.port}`;let n=e;return"function"==typeof this.options.natMap?n=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(n=this.options.natMap[t]||e),n}connectToSentinel(e,t){return new o.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){const t=this.connectToSentinel(e);t.on("error",l);try{return"slave"===this.options.role?await this.resolveSlave(t):await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){var e;if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);const t=[];for(;t.length<this.options.sentinelMaxConnections;){const{done:e,value:n}=this.sentinelIterator.next();if(e)break;const i=this.connectToSentinel(n,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy});i.on("reconnecting",()=>{var e;null===(e=this.emitter)||void 0===e||e.emit("sentinelReconnecting")}),t.push({address:n,client:i})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new s.FailoverDetector(this,t),await this.failoverDetector.subscribe(),null===(e=this.emitter)||void 0===e||e.emit("failoverSubscribed")}};function c(e){return{host:e.ip,port:Number(e.port)}}function l(){}return Ep.default=u,Ep}function Cp(){if(Tp)return kp;Tp=1,Object.defineProperty(kp,"__esModule",{value:!0}),kp.SentinelConnector=kp.StandaloneConnector=void 0;const e=function(){if($p)return wp;$p=1,Object.defineProperty(wp,"__esModule",{value:!0});const e=N,t=z,n=Tm(),i=Ip();let r=class extends i.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(i){const{options:r}=this;let o;return this.connecting=!0,"path"in r&&r.path?o={path:r.path}:(o={},"port"in r&&null!=r.port&&(o.port=r.port),"host"in r&&null!=r.host&&(o.host=r.host),"family"in r&&null!=r.family&&(o.family=r.family)),r.tls&&Object.assign(o,r.tls),new Promise((i,s)=>{process.nextTick(()=>{if(this.connecting){try{r.tls?this.stream=(0,t.connect)(o):this.stream=(0,e.createConnection)(o)}catch(e){return void s(e)}this.stream.once("error",e=>{this.firstError=e}),i(this.stream)}else s(new Error(n.CONNECTION_CLOSED_ERROR_MSG))})})}};return wp.default=r,wp}();kp.StandaloneConnector=e.default;const t=Ap();return kp.SentinelConnector=t.default,kp}var Up,Pp,jp={},Rp={},Lp={};function Zp(){if(Pp)return Rp;Pp=1,Object.defineProperty(Rp,"__esModule",{value:!0}),Rp.MaxRetriesPerRequestError=void 0;const e=function(){if(Up)return Lp;Up=1,Object.defineProperty(Lp,"__esModule",{value:!0});const e=lm();let t=class extends e.AbortError{constructor(e){super(`Reached the max retries per request limit (which is ${e}). Refer to "maxRetriesPerRequest" option for details.`),Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}};return Lp.default=t,Lp}();return Rp.MaxRetriesPerRequestError=e.default,Rp}var Mp,Fp,Bp,Jp,Vp={};function Gp(){if(Fp)return Mp;Fp=1;const e=T.Buffer,t=new(0,D.StringDecoder),n=lm(),i=n.ReplyError,r=n.ParserError;var o=e.allocUnsafe(32768),s=0,a=null,u=0,c=0;function l(e){const t=e.offset,n=e.buffer,i=n.length-1;for(var r=t;r<i;)if(13===n[r++])return e.offset=r+1,!0===e.optionReturnBuffers?e.buffer.slice(t,r-1):e.buffer.toString("utf8",t,r-1)}function d(e){const t=e.buffer.length-1;for(var n=e.offset,i=0;n<t;){const t=e.buffer[n++];if(13===t)return e.offset=n+1,i;i=10*i+(t-48)}}function m(e,t,n){e.arrayCache.push(t),e.arrayPos.push(n)}function p(e){const t=e.arrayCache.pop();var n=e.arrayPos.pop();if(e.arrayCache.length){const i=p(e);if(void 0===i)return void m(e,t,n);t[n++]=i}return f(e,t,n)}function f(e,t,n){const i=e.buffer.length;for(;n<t.length;){const r=e.offset;if(e.offset>=i)return void m(e,t,n);const o=h(e,e.buffer[e.offset++]);if(void 0===o)return e.arrayCache.length||e.bufferCache.length||(e.offset=r),void m(e,t,n);t[n]=o,n++}return t}function h(e,t){switch(t){case 36:return function(e){const t=d(e);if(void 0===t)return;if(t<0)return null;const n=e.offset+t;if(n+2>e.buffer.length)return e.bigStrSize=n+2,e.totalChunkSize=e.buffer.length,void e.bufferCache.push(e.buffer);const i=e.offset;return e.offset=n+2,!0===e.optionReturnBuffers?e.buffer.slice(i,n):e.buffer.toString("utf8",i,n)}(e);case 43:return l(e);case 42:return function(e){const t=d(e);if(void 0===t)return;return t<0?null:f(e,new Array(t),0)}(e);case 58:return function(e){return!0===e.optionStringNumbers?function(e){const t=e.buffer.length-1;var n=e.offset,i=0,r="";for(45===e.buffer[n]&&(r+="-",n++);n<t;){var o=e.buffer[n++];if(13===o)return e.offset=n+1,0!==i&&(r+=i),r;i>429496728?(r+=10*i+(o-48),i=0):48===o&&0===i?r+=0:i=10*i+(o-48)}}(e):function(e){const t=e.buffer.length-1;var n=e.offset,i=0,r=1;for(45===e.buffer[n]&&(r=-1,n++);n<t;){const t=e.buffer[n++];if(13===t)return e.offset=n+1,r*i;i=10*i+(t-48)}}(e)}(e);case 45:return function(e){var t=l(e);if(void 0!==t)return!0===e.optionReturnBuffers&&(t=t.toString()),new i(t)}(e);default:return function(e,t){const n=new r("Protocol error, got "+JSON.stringify(String.fromCharCode(t))+" as reply type byte",JSON.stringify(e.buffer),e.offset);e.buffer=null,e.returnFatalError(n)}(e,t)}}function g(){if(o.length>51200)if(1===u||c>2*u){const e=Math.floor(o.length/10),t=e<s?s:e;s=0,o=o.slice(t,o.length)}else c++,u--;else clearInterval(a),u=0,c=0,a=null}function v(t){const n=t.bufferCache,i=t.offset,r=t.bigStrSize-i-2;var c=n.length,l=t.bigStrSize-t.totalChunkSize;if(t.offset=l,l<=2){if(2===c)return n[0].slice(i,n[0].length+l-2);c--,l=n[n.length-2].length+l}!function(t){if(o.length<t+s){const n=t>78643200?2:3;s>116391936&&(s=52428800),o=e.allocUnsafe(t*n+s),s=0,u++,null===a&&(a=setInterval(g,50))}}(r);const d=s;n[0].copy(o,d,i,n[0].length),s+=n[0].length-i;for(var m=1;m<c-1;m++)n[m].copy(o,s),s+=n[m].length;return n[m].copy(o,s,0,l-2),s+=l-2,o.slice(d,s)}return Mp=class{constructor(e){if(!e)throw new TypeError("Options are mandatory.");if("function"!=typeof e.returnError||"function"!=typeof e.returnReply)throw new TypeError("The returnReply and returnError options have to be functions.");this.setReturnBuffers(!!e.returnBuffers),this.setStringNumbers(!!e.stringNumbers),this.returnError=e.returnError,this.returnFatalError=e.returnFatalError||e.returnError,this.returnReply=e.returnReply,this.reset()}reset(){this.offset=0,this.buffer=null,this.bigStrSize=0,this.totalChunkSize=0,this.bufferCache=[],this.arrayCache=[],this.arrayPos=[]}setReturnBuffers(e){if("boolean"!=typeof e)throw new TypeError("The returnBuffers argument has to be a boolean");this.optionReturnBuffers=e}setStringNumbers(e){if("boolean"!=typeof e)throw new TypeError("The stringNumbers argument has to be a boolean");this.optionStringNumbers=e}execute(n){if(null===this.buffer)this.buffer=n,this.offset=0;else if(0===this.bigStrSize){const t=this.buffer.length,i=t-this.offset,r=e.allocUnsafe(i+n.length);if(this.buffer.copy(r,0,this.offset,t),n.copy(r,i,0,n.length),this.buffer=r,this.offset=0,this.arrayCache.length){const e=p(this);if(void 0===e)return;this.returnReply(e)}}else{if(!(this.totalChunkSize+n.length>=this.bigStrSize))return this.bufferCache.push(n),void(this.totalChunkSize+=n.length);this.bufferCache.push(n);var i=this.optionReturnBuffers?v(this):function(e){const n=e.bufferCache,i=e.offset;var r=n.length,o=e.bigStrSize-e.totalChunkSize;if(e.offset=o,o<=2){if(2===r)return n[0].toString("utf8",i,n[0].length+o-2);r--,o=n[n.length-2].length+o}for(var s=t.write(n[0].slice(i)),a=1;a<r-1;a++)s+=t.write(n[a]);return s+t.end(n[a].slice(0,o-2))}(this);if(this.bigStrSize=0,this.bufferCache=[],this.buffer=n,this.arrayCache.length&&(this.arrayCache[0][this.arrayPos[0]++]=i,void 0===(i=p(this))))return;this.returnReply(i)}for(;this.offset<this.buffer.length;){const e=this.offset,t=this.buffer[this.offset++],n=h(this,t);if(void 0===n)return void(this.arrayCache.length||this.bufferCache.length||(this.offset=e));45===t?this.returnError(n):this.returnReply(n)}this.buffer=null}},Mp}var Wp,Kp,qp,Hp={};function Qp(){if(Kp)return Vp;Kp=1,Object.defineProperty(Vp,"__esModule",{value:!0});const e=Dm(),t=Tm(),n=Jp?Bp:(Jp=1,Bp=Gp()),i=function(){if(Wp)return Hp;function e(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}return Wp=1,Object.defineProperty(Hp,"__esModule",{value:!0}),Hp.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(t,n){this.set[e(t)][n]=!0}del(t,n){delete this.set[e(t)][n]}channels(t){return Object.keys(this.set[e(t)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}},Hp}(),r=(0,t.Debug)("dataHandler");Vp.default=class{constructor(e,t){this.redis=e;const i=new n({stringNumbers:t.stringNumbers,returnBuffers:!0,returnError:e=>{this.returnError(e)},returnFatalError:e=>{this.returnFatalError(e)},returnReply:e=>{this.returnReply(e)}});e.stream.prependListener("data",e=>{i.execute(e)}),e.stream.resume()}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){const t=this.shiftCommand(e);t&&(e.command={name:t.command.name,args:t.command.args},"ssubscribe"==t.command.name&&e.message.includes("MOVED")?this.redis.emit("moved"):this.redis.handleReconnection(e,t))}returnReply(t){if(this.handleMonitorReply(t))return;if(this.handleSubscriberReply(t))return;const n=this.shiftCommand(t);n&&(e.default.checkFlag("ENTER_SUBSCRIBER_MODE",n.command.name)?(this.redis.condition.subscriber=new i.default,this.redis.condition.subscriber.add(n.command.name,t[1].toString()),s(n.command,t[2])||this.redis.commandQueue.unshift(n)):e.default.checkFlag("EXIT_SUBSCRIBER_MODE",n.command.name)?a(n.command,t[2])||this.redis.commandQueue.unshift(n):n.command.resolve(t))}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;const t=Array.isArray(e)?e[0].toString():null;switch(r('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{const t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{const n=e[1].toString();this.redis.condition.subscriber.add(t,n);const i=this.shiftCommand(e);if(!i)return;s(i.command,e[2])||this.redis.commandQueue.unshift(i);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{const n=e[1]?e[1].toString():null;n&&this.redis.condition.subscriber.del(t,n);const i=e[2];0===Number(i)&&(this.redis.condition.subscriber=!1);const r=this.shiftCommand(e);if(!r)return;a(r.command,i)||this.redis.commandQueue.unshift(r);break}default:{const t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;const t=e.toString();if("OK"===t)return!1;const n=t.indexOf(" "),i=t.slice(0,n),r=t.indexOf('"'),o=t.slice(r+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),s=t.slice(n+2,r-2).split(" ");return this.redis.emit("monitor",i,o,s[1],s[0]),!0}shiftCommand(e){const t=this.redis.commandQueue.shift();if(!t){const t=new Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};const o=new WeakMap;function s(e,t){let n=o.has(e)?o.get(e):e.args.length;return n-=1,n<=0?(e.resolve(t),o.delete(e),!0):(o.set(e,n),!1)}function a(e,t){let n=o.has(e)?o.get(e):e.args.length;return 0===n?0===Number(t)&&(o.delete(e),e.resolve(t),!0):(n-=1,n<=0?(e.resolve(t),!0):(o.set(e,n),!1))}return Vp}function Yp(){return qp||(qp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.readyHandler=e.errorHandler=e.closeHandler=e.connectHandler=void 0;const t=lm(),n=Dm(),i=Zp(),r=Tm(),o=Qp(),s=(0,r.Debug)("connection");function a(e){const n=new t.AbortError("Command aborted due to connection close");return n.command={name:e.name,args:e.args},n}e.connectHandler=function(t){return function(){var n;t.setStatus("connect"),t.resetCommandQueue();let i=!1;const{connectionEpoch:a}=t;t.condition.auth&&t.auth(t.condition.auth,function(e){a===t.connectionEpoch&&e&&(-1!==e.message.indexOf("no password is set")?console.warn("[WARN] Redis server does not require a password, but a password was supplied."):-1!==e.message.indexOf("without any password configured for the default user")?console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"):-1!==e.message.indexOf("wrong number of arguments for 'auth' command")?console.warn("[ERROR] The server returned \"wrong number of arguments for 'auth' command\". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under."):(i=!0,t.recoverFromFatalError(e,e)))}),t.condition.select&&t.select(t.condition.select).catch(e=>{t.silentEmit("error",e)}),new o.default(t,{stringNumbers:t.options.stringNumbers});const u=[];t.options.connectionName&&(s("set the connection name [%s]",t.options.connectionName),u.push(t.client("setname",t.options.connectionName).catch(r.noop))),t.options.disableClientInfo||(s("set the client info"),u.push((0,r.getPackageMeta)().then(e=>t.client("SETINFO","LIB-VER",e.version).catch(r.noop)).catch(r.noop)),u.push(t.client("SETINFO","LIB-NAME",(null===(n=t.options)||void 0===n?void 0:n.clientInfoTag)?`ioredis(${t.options.clientInfoTag})`:"ioredis").catch(r.noop))),Promise.all(u).catch(r.noop).finally(()=>{t.options.enableReadyCheck||e.readyHandler(t)(),t.options.enableReadyCheck&&t._readyCheck(function(n,r){a===t.connectionEpoch&&(n?i||t.recoverFromFatalError(new Error("Ready check failed: "+n.message),n):t.connector.check(r)?e.readyHandler(t)():t.disconnect(!0))})})}},e.closeHandler=function(e){return function(){const n=e.status;if(e.setStatus("close"),e.commandQueue.length&&function(e){var t;let n=0;for(let i=0;i<e.length;){const r=null===(t=e.peekAt(i))||void 0===t?void 0:t.command,o=r.pipelineIndex;void 0!==o&&0!==o||(n=0),void 0===o||o===n++?i++:(e.remove(i,1),r.reject(a(r)))}}(e.commandQueue),e.offlineQueue.length&&function(e){var t;for(let n=0;n<e.length;){const i=null===(t=e.peekAt(n))||void 0===t?void 0:t.command;if("multi"===i.name)break;if("exec"===i.name){e.remove(n,1),i.reject(a(i));break}i.inTransaction?(e.remove(n,1),i.reject(a(i))):n++}}(e.offlineQueue),"ready"===n&&(e.prevCondition||(e.prevCondition=e.condition),e.commandQueue.length&&(e.prevCommandQueue=e.commandQueue)),e.manuallyClosing)return e.manuallyClosing=!1,s("skip reconnecting since the connection is manually closed."),t();if("function"!=typeof e.options.retryStrategy)return s("skip reconnecting because `retryStrategy` is not a function"),t();const o=e.options.retryStrategy(++e.retryAttempts);if("number"!=typeof o)return s("skip reconnecting because `retryStrategy` doesn't return a number"),t();s("reconnect in %sms",o),e.setStatus("reconnecting",o),e.reconnectTimeout=setTimeout(function(){e.reconnectTimeout=null,e.connect().catch(r.noop)},o);const{maxRetriesPerRequest:u}=e.options;if("number"==typeof u)if(u<0)s("maxRetriesPerRequest is negative, ignoring...");else{0===e.retryAttempts%(u+1)&&(s("reach maxRetriesPerRequest limitation, flushing command queue..."),e.flushQueue(new i.MaxRetriesPerRequestError(u)))}};function t(){e.setStatus("end"),e.flushQueue(new Error(r.CONNECTION_CLOSED_ERROR_MSG))}},e.errorHandler=function(e){return function(t){s("error: %s",t),e.silentEmit("error",t)}},e.readyHandler=function(e){return function(){if(e.setStatus("ready"),e.retryAttempts=0,e.options.monitor){e.call("monitor").then(()=>e.setStatus("monitoring"),t=>e.emit("error",t));const{sendCommand:t}=e;return e.sendCommand=function(i){return n.default.checkFlag("VALID_IN_MONITOR_MODE",i.name)?t.call(e,i):(i.reject(new Error("Connection is in monitoring mode, can't process commands.")),i.promise)},void e.once("close",function(){delete e.sendCommand})}const t=e.prevCondition?e.prevCondition.select:e.condition.select;if(e.options.readOnly&&(s("set the connection to readonly mode"),e.readonly().catch(r.noop)),e.prevCondition){const n=e.prevCondition;if(e.prevCondition=null,n.subscriber&&e.options.autoResubscribe){e.condition.select!==t&&(s("connect to db [%d]",t),e.select(t));const i=n.subscriber.channels("subscribe");i.length&&(s("subscribe %d channels",i.length),e.subscribe(i));const r=n.subscriber.channels("psubscribe");r.length&&(s("psubscribe %d channels",r.length),e.psubscribe(r));const o=n.subscriber.channels("ssubscribe");if(o.length){s("ssubscribe %s",o.length);for(const t of o)e.ssubscribe(t)}}}if(e.prevCommandQueue)if(e.options.autoResendUnfulfilledCommands)for(s("resend %d unfulfilled commands",e.prevCommandQueue.length);e.prevCommandQueue.length>0;){const t=e.prevCommandQueue.shift();t.select!==e.condition.select&&"select"!==t.command.name&&e.select(t.select),e.sendCommand(t.command,t.stream)}else e.prevCommandQueue=null;if(e.offlineQueue.length){s("send %d commands in offline queue",e.offlineQueue.length);const t=e.offlineQueue;for(e.resetOfflineQueue();t.length>0;){const n=t.shift();n.select!==e.condition.select&&"select"!==n.command.name&&e.select(n.select),e.sendCommand(n.command,n.stream)}}e.condition.select!==t&&(s("connect to db [%d]",t),e.select(t))}}}(jp)),jp}var Xp,ef,tf,nf,rf={};function of(){if(ef)return Kd;ef=1,Object.defineProperty(Kd,"__esModule",{value:!0});const e=Qd(),t=y,n=nm(),i=_p(),r=Dm(),o=Cp(),s=Ap(),a=Yp(),u=(Xp||(Xp=1,Object.defineProperty(rf,"__esModule",{value:!0}),rf.DEFAULT_REDIS_OPTIONS=void 0,rf.DEFAULT_REDIS_OPTIONS={port:6379,host:"localhost",family:0,connectTimeout:1e4,disconnectTimeout:2e3,retryStrategy:function(e){return Math.min(50*e,2e3)},keepAlive:0,noDelay:!0,connectionName:null,disableClientInfo:!1,clientInfoTag:void 0,sentinels:null,name:null,role:"master",sentinelRetryStrategy:function(e){return Math.min(10*e,1e3)},sentinelReconnectStrategy:function(){return 6e4},natMap:null,enableTLSForSentinelMode:!1,updateSentinels:!0,failoverDetector:!1,username:null,password:null,db:0,enableOfflineQueue:!0,enableReadyCheck:!0,autoResubscribe:!0,autoResendUnfulfilledCommands:!0,lazyConnect:!1,keyPrefix:"",reconnectOnError:null,readOnly:!1,stringNumbers:!1,maxRetriesPerRequest:20,maxLoadingRetryTime:1e4,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],sentinelMaxConnections:10}),rf),c=jm(),l=Hm(),d=Tm(),m=Xm(),p=Km(),f=Sm(),h=hp(),g=(0,d.Debug)("redis");let v=class i extends p.default{constructor(e,n,i){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,n,i),t.EventEmitter.call(this),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){const e=new s.default(this.options);e.emitter=this,this.connector=e}else this.connector=new o.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(f.noop)}static createClient(...e){return new i(...e)}get autoPipelineQueueSize(){let e=0;for(const t of this._autoPipelines.values())e+=t.length;return e}connect(e){const t=new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(new Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");const{options:i}=this;this.condition={select:i.db,auth:i.username?[i.username,i.password]:i.password,subscriber:!1};const r=this;(0,n.default)(this.connector.connect(function(e,t){r.silentEmit(e,t)}),function(n,o){if(n)return r.flushQueue(n),r.silentEmit("error",n),t(n),void r.setStatus("end");let s=i.tls?"secureConnect":"connect";if("sentinels"in i&&i.sentinels&&!i.enableTLSForSentinelMode&&(s="connect"),r.stream=o,i.noDelay&&o.setNoDelay(!0),"number"==typeof i.keepAlive&&(o.connecting?o.once(s,()=>{o.setKeepAlive(!0,i.keepAlive)}):o.setKeepAlive(!0,i.keepAlive)),o.connecting){if(o.once(s,a.connectHandler(r)),i.connectTimeout){let e=!1;o.setTimeout(i.connectTimeout,function(){if(e)return;o.setTimeout(0),o.destroy();const t=new Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",a.errorHandler(r)(t)}),o.once(s,function(){e=!0,o.setTimeout(0)})}}else if(o.destroyed){const e=r.connector.firstError;e&&process.nextTick(()=>{a.errorHandler(r)(e)}),process.nextTick(a.closeHandler(r))}else process.nextTick(a.connectHandler(r));o.destroyed||(o.once("error",a.errorHandler(r)),o.once("close",a.closeHandler(r)));const u=function(){r.removeListener("close",c),e()};var c=function(){r.removeListener("ready",u),t(new Error(d.CONNECTION_CLOSED_ERROR_MSG))};r.once("ready",u),r.once("close",c)})});return(0,n.default)(t,e)}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?a.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new i({...this.options,...e})}get mode(){var e;return this.options.monitor?"monitor":(null===(e=this.condition)||void 0===e?void 0:e.subscriber)?"subscriber":"normal"}monitor(e){const t=this.duplicate({monitor:!0,lazyConnect:!1});return(0,n.default)(new Promise(function(e,n){t.once("error",n),t.once("monitoring",function(){e(t)})}),e)}sendCommand(t,n){var i,o;if("wait"===this.status&&this.connect().catch(f.noop),"end"===this.status)return t.reject(new Error(d.CONNECTION_CLOSED_ERROR_MSG)),t.promise;if((null===(i=this.condition)||void 0===i?void 0:i.subscriber)&&!r.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",t.name))return t.reject(new Error("Connection in subscriber mode, only subscriber commands may be used")),t.promise;"number"==typeof this.options.commandTimeout&&t.setTimeout(this.options.commandTimeout);let s="ready"===this.status||!n&&"connect"===this.status&&(0,e.exists)(t.name)&&((0,e.hasFlag)(t.name,"loading")||r.default.checkFlag("HANDSHAKE_COMMANDS",t.name));if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(s=!1):s=!1,s)g.enabled&&g("write command[%s]: %d -> %s(%o)",this._getDescription(),null===(o=this.condition)||void 0===o?void 0:o.select,t.name,t.args),n?"isPipeline"in n&&n.isPipeline?n.write(t.toWritable(n.destination.redis.stream)):n.write(t.toWritable(n)):this.stream.write(t.toWritable(this.stream)),this.commandQueue.push({command:t,stream:n,select:this.condition.select}),r.default.checkFlag("WILL_DISCONNECT",t.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return t.reject(new Error("Stream isn't writeable and enableOfflineQueue options is false")),t.promise;if("quit"===t.name&&0===this.offlineQueue.length)return this.disconnect(),t.resolve(Buffer.from("OK")),t.promise;g.enabled&&g("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,t.name,t.args),this.offlineQueue.push({command:t,stream:n,select:this.condition.select})}if("select"===t.name&&(0,d.isInt)(t.args[0])){const e=parseInt(t.args[0],10);this.condition.select!==e&&(this.condition.select=e,this.emit("select",e),g("switch to db [%d]",this.condition.select))}return t.promise}setSocketTimeout(){this.socketTimeoutTimer=setTimeout(()=>{this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),this.stream.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let n;if("error"===e){if(n=t,"end"===this.status)return;if(this.manuallyClosing&&n instanceof Error&&(n.message===d.CONNECTION_CLOSED_ERROR_MSG||"connect"===n.syscall||"read"===n.syscall))return}return this.listeners(e).length>0?this.emit.apply(this,arguments):(n&&n instanceof Error&&console.error("[ioredis] Unhandled error event:",n.stack),!1)}recoverFromFatalError(e,t,n){this.flushQueue(t,n),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){var n;let i=!1;switch(this.options.reconnectOnError&&!r.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)&&(i=this.options.reconnectOnError(e)),i){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),(null===(n=this.condition)||void 0===n?void 0:n.select)!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new h}resetOfflineQueue(){this.offlineQueue=new h}parseOptions(...e){const t={};let n=!1;for(let i=0;i<e.length;++i){const r=e[i];if(null!=r)if("object"==typeof r)(0,f.defaults)(t,r);else if("string"==typeof r)(0,f.defaults)(t,(0,d.parseURL)(r)),r.startsWith("rediss://")&&(n=!0);else{if("number"!=typeof r)throw new Error("Invalid argument "+r);t.port=r}}n&&(0,f.defaults)(t,{tls:!0}),(0,f.defaults)(t,i.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),this.options=(0,d.resolveTLSProfile)(t)}setStatus(e,t){g.enabled&&g("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:n={}}){return new c.default({objectMode:!0,key:t,redis:this,command:e,...n})}flushQueue(e,t){let n;if((t=(0,f.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;n=this.offlineQueue.shift();)n.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");n=this.commandQueue.shift();)n.command.reject(e)}_readyCheck(e){const t=this;this.info(function(n,i){if(n)return n.message&&n.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${n.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(n);if("string"!=typeof i)return e(null,i);const r={},o=i.split("\r\n");for(let e=0;e<o.length;++e){const[t,...n]=o[e].split(":"),i=n.join(":");i&&(r[t]=i)}if(r.loading&&"0"!==r.loading){const n=1e3*(r.loading_eta_seconds||1),i=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<n?t.options.maxLoadingRetryTime:n;g("Redis server still loading, trying again in "+i+"ms"),setTimeout(function(){t._readyCheck(e)},i)}else e(null,r)}).catch(f.noop)}};return v.Cluster=i.default,v.Command=r.default,v.defaultOptions=u.DEFAULT_REDIS_OPTIONS,(0,m.default)(v,t.EventEmitter),(0,l.addTransactionSupport)(v.prototype),Kd.default=v,Kd}tf||(tf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.print=t.ReplyError=t.SentinelIterator=t.SentinelConnector=t.AbstractConnector=t.Pipeline=t.ScanStream=t.Command=t.Cluster=t.Redis=t.default=void 0,t=e.exports=of().default;var n=of();Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}});var i=of();Object.defineProperty(t,"Redis",{enumerable:!0,get:function(){return i.default}});var r=_p();Object.defineProperty(t,"Cluster",{enumerable:!0,get:function(){return r.default}});var o=Dm();Object.defineProperty(t,"Command",{enumerable:!0,get:function(){return o.default}});var s=jm();Object.defineProperty(t,"ScanStream",{enumerable:!0,get:function(){return s.default}});var a=qm();Object.defineProperty(t,"Pipeline",{enumerable:!0,get:function(){return a.default}});var u=Ip();Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return u.default}});var c=Ap();Object.defineProperty(t,"SentinelConnector",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SentinelIterator",{enumerable:!0,get:function(){return c.SentinelIterator}}),t.ReplyError=lm().ReplyError,Object.defineProperty(t,"Promise",{get:()=>(console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."),Promise),set(e){console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.")}}),t.print=function(e,t){e?console.log("Error: "+e):console.log("Reply: "+t)}}(Wd,Wd.exports));const sf=Object.freeze({status:"aborted"});function af(e,t,n){function i(n,i){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:i,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,i);const r=s.prototype,o=Object.keys(r);for(let e=0;e<o.length;e++){const t=o[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class o extends r{}function s(e){var t;const r=n?.Parent?new o:this;i(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(o,"name",{value:e}),Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const uf=Symbol("zod_brand");class cf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class lf extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(nf=globalThis).__zod_globalConfig??(nf.__zod_globalConfig={});const df=globalThis.__zod_globalConfig;function mf(e){return e&&Object.assign(df,e),df}function pf(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function ff(e,t="|"){return e.map(e=>Pf(e)).join(t)}function hf(e,t){return"bigint"==typeof t?t.toString():t}function gf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function vf(e){return null==e}function yf(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function _f(e,t){const n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}const bf=Symbol("evaluating");function $f(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==bf)return void 0===i&&(i=bf,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function kf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function wf(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Sf(e){return JSON.stringify(e)}function If(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const xf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ef(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Of=gf(()=>{if(df.jitless)return!1;if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Nf(e){if(!1===Ef(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Ef(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function zf(e){return Nf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Tf=new Set(["string","number","symbol"]),Df=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Af(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cf(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Uf(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function Pf(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function jf(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const Rf={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]},Lf={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Zf(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Cf(e,wf(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return kf(this,"shape",e),e},checks:[]}))}function Mf(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=wf(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return kf(this,"shape",i),i},checks:[]});return Cf(e,r)}function Ff(e,t){if(!Nf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return kf(this,"shape",n),n}});return Cf(e,i)}function Bf(e,t){if(!Nf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return kf(this,"shape",n),n}});return Cf(e,n)}function Jf(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=wf(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return kf(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Cf(e,n)}function Vf(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=wf(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)r[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return kf(this,"shape",r),r},checks:[]});return Cf(t,r)}function Gf(e,t,n){const i=wf(t._zod.def,{get shape(){const i=t._zod.def.shape,r={...i};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)r[t]=new e({type:"nonoptional",innerType:i[t]});return kf(this,"shape",r),r}});return Cf(t,i)}function Wf(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Kf(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!1===e.issues[n]?.continue)return!0;return!1}function qf(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Hf(e){return"string"==typeof e?e:e?.message}function Qf(e,t,n){const i=e.message?e.message:Hf(e.inst?._zod.def?.error?.(e))??Hf(t?.error?.(e))??Hf(n.customError?.(e))??Hf(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:s,...a}=e;return a.path??(a.path=[]),a.message=i,t?.reportInput&&(a.input=s),a}function Yf(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Xf(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eh(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function th(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}function nh(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function ih(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var rh=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:Lf,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:Rf,aborted:Wf,allowsEval:Of,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:kf,base64ToUint8Array:nh,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return nh(t+"=".repeat((4-t.length%4)%4))},cached:gf,captureStackTrace:xf,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:yf,clone:Cf,cloneDef:function(e){return wf(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,i,r)=>(t??(t=e()),Reflect.get(t,i,r)),set:(n,i,r,o)=>(t??(t=e()),Reflect.set(t,i,r,o)),has:(n,i)=>(t??(t=e()),Reflect.has(t,i)),deleteProperty:(n,i)=>(t??(t=e()),Reflect.deleteProperty(t,i)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,i)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)),defineProperty:(n,i,r)=>(t??(t=e()),Reflect.defineProperty(t,i,r))})},defineLazy:$f,esc:Sf,escapeRegex:Af,explicitlyAborted:Kf,extend:Ff,finalizeIssue:Qf,floatSafeRemainder:_f,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:pf,getLengthableOrigin:Xf,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:Yf,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:Ef,isPlainObject:Nf,issue:th,joinValues:ff,jsonStringifyReplacer:hf,merge:Jf,mergeDefs:wf,normalizeParams:Uf,nullish:vf,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:Mf,optionalKeys:jf,parsedType:eh,partial:Vf,pick:Zf,prefixIssues:qf,primitiveTypes:Df,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=e[i];return n})},propertyKeyTypes:Tf,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let i=0;i<e;i++)n+=t[Math.floor(26*Math.random())];return n},required:Gf,safeExtend:Bf,shallowClone:zf,slugify:If,stringifyPrimitive:Pf,uint8ArrayToBase64:ih,uint8ArrayToBase64url:function(e){return ih(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:Hf});const oh=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sh=af("$ZodError",oh),ah=af("$ZodError",oh,{Parent:Error});function uh(e,t=e=>e.message){const n={},i=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function ch(e,t=e=>e.message){const n={_errors:[]},i=(e,r=[])=>{for(const o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>i({issues:e},[...r,...o.path]));else if("invalid_key"===o.code)i({issues:o.issues},[...r,...o.path]);else if("invalid_element"===o.code)i({issues:o.issues},[...r,...o.path]);else{const e=[...r,...o.path];if(0===e.length)n._errors.push(t(o));else{let i=n,r=0;for(;r<e.length;){const n=e[r];r===e.length-1?(i[n]=i[n]||{_errors:[]},i[n]._errors.push(t(o))):i[n]=i[n]||{_errors:[]},i=i[n],r++}}}};return i(e),n}function lh(e,t=e=>e.message){const n={errors:[]},i=(e,r=[])=>{var o,s;for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>i({issues:e},[...r,...a.path]));else if("invalid_key"===a.code)i({issues:a.issues},[...r,...a.path]);else if("invalid_element"===a.code)i({issues:a.issues},[...r,...a.path]);else{const e=[...r,...a.path];if(0===e.length){n.errors.push(t(a));continue}let i=n,u=0;for(;u<e.length;){const n=e[u],r=u===e.length-1;"string"==typeof n?(i.properties??(i.properties={}),(o=i.properties)[n]??(o[n]={errors:[]}),i=i.properties[n]):(i.items??(i.items=[]),(s=i.items)[n]??(s[n]={errors:[]}),i=i.items[n]),r&&i.errors.push(t(a)),u++}}};return i(e),n}function dh(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function mh(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${dh(e.path)}`);return t.join("\n")}const ph=e=>(t,n,i,r)=>{const o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new cf;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>Qf(e,o,mf())));throw xf(t,r?.callee),t}return s.value},fh=ph(ah),hh=e=>async(t,n,i,r)=>{const o=i?{...i,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>Qf(e,o,mf())));throw xf(t,r?.callee),t}return s.value},gh=hh(ah),vh=e=>(t,n,i)=>{const r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new cf;return o.issues.length?{success:!1,error:new(e??sh)(o.issues.map(e=>Qf(e,r,mf())))}:{success:!0,data:o.value}},yh=vh(ah),_h=e=>async(t,n,i)=>{const r=i?{...i,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(e=>Qf(e,r,mf())))}:{success:!0,data:o.value}},bh=_h(ah),$h=e=>(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return ph(e)(t,n,r)},kh=$h(ah),wh=e=>(t,n,i)=>ph(e)(t,n,i),Sh=wh(ah),Ih=e=>async(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return hh(e)(t,n,r)},xh=Ih(ah),Eh=e=>async(t,n,i)=>hh(e)(t,n,i),Oh=Eh(ah),Nh=e=>(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return vh(e)(t,n,r)},zh=Nh(ah),Th=e=>(t,n,i)=>vh(e)(t,n,i),Dh=Th(ah),Ah=e=>async(t,n,i)=>{const r=i?{...i,direction:"backward"}:{direction:"backward"};return _h(e)(t,n,r)},Ch=Ah(ah),Uh=e=>async(t,n,i)=>_h(e)(t,n,i),Ph=Uh(ah),jh=/^[cC][0-9a-z]{6,}$/,Rh=/^[0-9a-z]+$/,Lh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zh=/^[0-9a-vA-V]{20}$/,Mh=/^[A-Za-z0-9]{27}$/,Fh=/^[a-zA-Z0-9_-]{21}$/,Bh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Jh=/^([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})$/,Vh=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Gh=Vh(4),Wh=Vh(6),Kh=Vh(7),qh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hh=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Qh=Hh;function Yh(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Xh=/^(?:(?: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])$/,eg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tg=e=>{const t=Af(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ng=/^((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])$/,ig=/^(([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])$/,rg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,og=/^[A-Za-z0-9_-]*$/,sg=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ag=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ug=/^https?$/,cg=/^\+[1-9]\d{6,14}$/,lg="(?:(?:\\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])))",dg=new RegExp(`^${lg}$`);function mg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pg(e){return new RegExp(`^${mg(e)}$`)}function fg(e){const t=mg({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${lg}T(?:${i})$`)}const hg=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),gg=/^-?\d+n?$/,vg=/^-?\d+$/,yg=/^-?\d+(?:\.\d+)?$/,_g=/^(?:true|false)$/i,bg=/^null$/i,$g=/^undefined$/i,kg=/^[^A-Z]*$/,wg=/^[^a-z]*$/,Sg=/^[0-9a-fA-F]*$/;function Ig(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function xg(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Eg=Ig(22,"=="),Og=xg(22),Ng=Ig(27,"="),zg=xg(27),Tg=Ig(43,"="),Dg=xg(43),Ag=Ig(64,""),Cg=xg(64),Ug=Ig(86,"=="),Pg=xg(86);var jg=Object.freeze({__proto__:null,base64:rg,base64url:og,bigint:gg,boolean:_g,browserEmail:/^[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])?)*$/,cidrv4:ng,cidrv6:ig,cuid:jh,cuid2:Rh,date:dg,datetime:fg,domain:ag,duration:Bh,e164:cg,email:qh,emoji:Yh,extendedDuration:/^[-+]?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)?)??$/,guid:Jh,hex:Sg,hostname:sg,html5Email:/^[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])?)*$/,httpProtocol:ug,idnEmail:Qh,integer:vg,ipv4:Xh,ipv6:eg,ksuid:Mh,lowercase:kg,mac:tg,md5_base64:Eg,md5_base64url:Og,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Fh,null:bg,number:yg,rfc5322Email:/^(([^<>()\[\]\\.,;:\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,}))$/,sha1_base64:Ng,sha1_base64url:zg,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:Tg,sha256_base64url:Dg,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Ag,sha384_base64url:Cg,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:Ug,sha512_base64url:Pg,sha512_hex:/^[0-9a-fA-F]{128}$/,string:hg,time:pg,ulid:Lh,undefined:$g,unicodeEmail:Hh,uppercase:wg,uuid:Vh,uuid4:Gh,uuid6:Wh,uuid7:Kh,xid:Zh});const Rg=af("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Lg={number:"number",bigint:"bigint",object:"date"},Zg=af("$ZodCheckLessThan",(e,t)=>{Rg.init(e,t);const n=Lg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Mg=af("$ZodCheckGreaterThan",(e,t)=>{Rg.init(e,t);const n=Lg[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fg=af("$ZodCheckMultipleOf",(e,t)=>{Rg.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===_f(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Bg=af("$ZodCheckNumberFormat",(e,t)=>{Rg.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Rf[t.format];e._zod.onattach.push(e=>{const i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o,n&&(i.pattern=vg)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Jg=af("$ZodCheckBigIntFormat",(e,t)=>{Rg.init(e,t);const[n,i]=Lf[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=i}),e._zod.check=r=>{const o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Vg=af("$ZodCheckMaxSize",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;i.size<=t.maximum||n.issues.push({origin:Yf(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Gg=af("$ZodCheckMinSize",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;i.size>=t.minimum||n.issues.push({origin:Yf(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Wg=af("$ZodCheckSizeEquals",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const i=n.value,r=i.size;if(r===t.size)return;const o=r>t.size;n.issues.push({origin:Yf(i),...o?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Kg=af("$ZodCheckMaxLength",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const r=Xf(i);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),qg=af("$ZodCheckMinLength",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const r=Xf(i);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Hg=af("$ZodCheckLengthEquals",(e,t)=>{var n;Rg.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!vf(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const i=n.value,r=i.length;if(r===t.length)return;const o=Xf(i),s=r>t.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qg=af("$ZodCheckStringFormat",(e,t)=>{var n,i;Rg.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Yg=af("$ZodCheckRegex",(e,t)=>{Qg.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Xg=af("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kg),Qg.init(e,t)}),ev=af("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=wg),Qg.init(e,t)}),tv=af("$ZodCheckIncludes",(e,t)=>{Rg.init(e,t);const n=Af(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),nv=af("$ZodCheckStartsWith",(e,t)=>{Rg.init(e,t);const n=new RegExp(`^${Af(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),iv=af("$ZodCheckEndsWith",(e,t)=>{Rg.init(e,t);const n=new RegExp(`.*${Af(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function rv(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues))}const ov=af("$ZodCheckProperty",(e,t)=>{Rg.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>rv(n,e,t.property));rv(n,e,t.property)}}),sv=af("$ZodCheckMimeType",(e,t)=>{Rg.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),av=af("$ZodCheckOverwrite",(e,t)=>{Rg.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class uv{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),i=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const cv={major:4,minor:4,patch:3},lv=af("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=cv;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let i,r=Wf(e);for(const o of t){if(o._zod.def.when){if(Kf(e))continue;if(!o._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=o._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new cf;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=Wf(e,t)))});else{if(e.issues.length===t)continue;r||(r=Wf(e,t))}}return i?i.then(()=>e):e},n=(n,r,o)=>{if(Wf(n))return n.aborted=!0,n;const s=t(r,i,o);if(s instanceof Promise){if(!1===o.async)throw new cf;return s.then(t=>e._zod.parse(t,o))}return e._zod.parse(s,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){const t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}const s=e._zod.parse(r,o);if(s instanceof Promise){if(!1===o.async)throw new cf;return s.then(e=>t(e,i,o))}return t(s,i,o)}}$f(e,"~standard",()=>({validate:t=>{try{const n=yh(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return bh(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),dv=af("$ZodString",(e,t)=>{lv.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hg(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),mv=af("$ZodStringFormat",(e,t)=>{Qg.init(e,t),dv.init(e,t)}),pv=af("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Jh),mv.init(e,t)}),fv=af("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Vh(e))}else t.pattern??(t.pattern=Vh());mv.init(e,t)}),hv=af("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qh),mv.init(e,t)}),gv=af("$ZodURL",(e,t)=>{mv.init(e,t),e._zod.check=n=>{try{const i=n.value.trim();if(!t.normalize&&t.protocol?.source===ug.source&&!/^https?:\/\//i.test(i))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});const r=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vv=af("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Yh()),mv.init(e,t)}),yv=af("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fh),mv.init(e,t)}),_v=af("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jh),mv.init(e,t)}),bv=af("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Rh),mv.init(e,t)}),$v=af("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Lh),mv.init(e,t)}),kv=af("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zh),mv.init(e,t)}),wv=af("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mh),mv.init(e,t)}),Sv=af("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fg(t)),mv.init(e,t)}),Iv=af("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=dg),mv.init(e,t)}),xv=af("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=pg(t)),mv.init(e,t)}),Ev=af("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Bh),mv.init(e,t)}),Ov=af("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Xh),mv.init(e,t),e._zod.bag.format="ipv4"}),Nv=af("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=eg),mv.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),zv=af("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=tg(t.delimiter)),mv.init(e,t),e._zod.bag.format="mac"}),Tv=af("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ng),mv.init(e,t)}),Dv=af("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ig),mv.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(2!==i.length)throw new Error;const[e,t]=i;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Av(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Cv=af("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rg),mv.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Av(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Uv(e){if(!og.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Av(t.padEnd(4*Math.ceil(t.length/4),"="))}const Pv=af("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=og),mv.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Uv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jv=af("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cg),mv.init(e,t)});function Rv(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const r=JSON.parse(atob(i));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Lv=af("$ZodJWT",(e,t)=>{mv.init(e,t),e._zod.check=n=>{Rv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Zv=af("$ZodCustomStringFormat",(e,t)=>{mv.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Mv=af("$ZodNumber",(e,t)=>{lv.init(e,t),e._zod.pattern=e._zod.bag.pattern??yg,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const o="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Fv=af("$ZodNumberFormat",(e,t)=>{Bg.init(e,t),Mv.init(e,t)}),Bv=af("$ZodBoolean",(e,t)=>{lv.init(e,t),e._zod.pattern=_g,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Jv=af("$ZodBigInt",(e,t)=>{lv.init(e,t),e._zod.pattern=gg,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Vv=af("$ZodBigIntFormat",(e,t)=>{Jg.init(e,t),Jv.init(e,t)}),Gv=af("$ZodSymbol",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return"symbol"==typeof i||t.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),t}}),Wv=af("$ZodUndefined",(e,t)=>{lv.init(e,t),e._zod.pattern=$g,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),t}}),Kv=af("$ZodNull",(e,t)=>{lv.init(e,t),e._zod.pattern=bg,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),qv=af("$ZodAny",(e,t)=>{lv.init(e,t),e._zod.parse=e=>e}),Hv=af("$ZodUnknown",(e,t)=>{lv.init(e,t),e._zod.parse=e=>e}),Qv=af("$ZodNever",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Yv=af("$ZodVoid",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return void 0===i||t.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),t}}),Xv=af("$ZodDate",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function ey(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues)),t.value[n]=e.value}const ty=af("$ZodArray",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const o=[];for(let e=0;e<r.length;e++){const s=r[e],a=t.element._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(t=>ey(t,n,e))):ey(a,n,e)}return o.length?Promise.all(o).then(()=>n):n}});function ny(e,t,n,i,r,o){const s=n in i;if(e.issues.length){if(r&&o&&!s)return;t.issues.push(...qf(n,e.issues))}s||r?void 0===e.value?s&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}function iy(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=jf(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ry(e,t,n,i,r,o){const s=[],a=r.keySet,u=r.catchall._zod,c=u.def.type,l="optional"===u.optin,d="optional"===u.optout;for(const r in t){if("__proto__"===r)continue;if(a.has(r))continue;if("never"===c){s.push(r);continue}const o=u.run({value:t[r],issues:[]},i);o instanceof Promise?e.push(o.then(e=>ny(e,n,r,t,l,d))):ny(o,n,r,t,l,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const oy=af("$ZodObject",(e,t)=>{lv.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const i=gf(()=>iy(t));$f(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n});const r=Ef,o=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=i.value);const a=t.value;if(!r(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const i=c[e],r="optional"===i._zod.optin,o="optional"===i._zod.optout,s=i._zod.run({value:a[e],issues:[]},n);s instanceof Promise?u.push(s.then(n=>ny(n,t,e,a,r,o))):ny(s,t,e,a,r,o)}return o?ry(u,a,t,n,i.value,e):u.length?Promise.all(u).then(()=>t):t}}),sy=af("$ZodObjectJIT",(e,t)=>{oy.init(e,t);const n=e._zod.parse,i=gf(()=>iy(t));let r;const o=Ef,s=!df.jitless,a=s&&Of.value,u=t.catchall;let c;e._zod.parse=(l,d)=>{c??(c=i.value);const m=l.value;return o(m)?s&&a&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new uv(["shape","payload","ctx"]),n=i.value,r=e=>{const t=Sf(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const o=Object.create(null);let s=0;for(const e of n.keys)o[e]="key_"+s++;t.write("const newResult = {};");for(const i of n.keys){const n=o[i],s=Sf(i),a=e[i],u="optional"===a?._zod?.optin,c="optional"===a?._zod?.optout;t.write(`const ${n} = ${r(i)};`),u&&c?t.write(`\n if (${n}.issues.length) {\n if (${s} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):u?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${s} in input) {\n newResult[${s}] = undefined;\n }\n } else {\n newResult[${s}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${s} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${s}, ...iss.path] : [${s}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${s}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${s}] = undefined;\n } else {\n newResult[${s}] = ${n}.value;\n }\n }\n\n `)}t.write("payload.value = newResult;"),t.write("return payload;");const a=t.compile();return(t,n)=>a(e,t,n)})(t.shape)),l=r(l,d),u?ry([],m,l,d,c,e):l):n(l,d):(l.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),l)}});function ay(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!Wf(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qf(e,i,mf())))}),t)}const uy=af("$ZodUnion",(e,t)=>{lv.init(e,t),$f(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),$f(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),$f(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),$f(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>yf(e.source)).join("|")})$`)}});const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:i.value,issues:[]},r);if(t instanceof Promise)s.push(t),o=!0;else{if(0===t.issues.length)return t;s.push(t)}}return o?Promise.all(s).then(t=>ay(t,i,e,r)):ay(s,i,e,r)}});function cy(e,t,n,i){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qf(e,i,mf())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const ly=af("$ZodXor",(e,t)=>{uy.init(e,t),t.inclusive=!1;const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:i.value,issues:[]},r);t instanceof Promise?(s.push(t),o=!0):s.push(t)}return o?Promise.all(s).then(t=>cy(t,i,e,r)):cy(s,i,e,r)}}),dy=af("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,uy.init(e,t);const n=e._zod.parse;$f(e._zod,"propValues",()=>{const e={};for(const n of t.options){const i=n._zod.propValues;if(!i||0===Object.keys(i).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(i)){e[t]||(e[t]=new Set);for(const i of n)e[t].add(i)}}return e});const i=gf(()=>{const e=t.options,n=new Map;for(const i of e){const e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,i)}}return n});e._zod.parse=(r,o)=>{const s=r.value;if(!Ef(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;const a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback||"backward"===o.direction?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:s,path:[t.discriminator],inst:e}),r)}}),my=af("$ZodIntersection",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,r=t.left._zod.run({value:i,issues:[]},n),o=t.right._zod.run({value:i,issues:[]},n);return r instanceof Promise||o instanceof Promise?Promise.all([r,o]).then(([t,n])=>fy(e,t,n)):fy(e,r,o)}});function py(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Nf(e)&&Nf(t)){const n=Object.keys(t),i=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of i){const i=py(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r[n]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const r=py(e[i],t[i]);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fy(e,t,n){const i=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)i.has(e)||i.set(e,{}),i.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);const o=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(o.length&&r&&e.issues.push({...r,keys:o}),Wf(e))return e;const s=py(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const hy=af("$ZodTuple",(e,t)=>{lv.init(e,t);const n=t.items;e._zod.parse=(i,r)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const s=[],a=gy(n,"optin"),u=gy(n,"optout");if(!t.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}const c=new Array(n.length);for(let e=0;e<n.length;e++){const t=n[e]._zod.run({value:o[e],issues:[]},r);t instanceof Promise?s.push(t.then(t=>{c[e]=t})):c[e]=t}if(t.rest){let e=n.length-1;const a=o.slice(n.length);for(const n of a){e++;const o=t.rest._zod.run({value:n,issues:[]},r);o instanceof Promise?s.push(o.then(t=>vy(t,i,e))):vy(o,i,e)}}return s.length?Promise.all(s).then(()=>yy(c,i,n,o,u)):yy(c,i,n,o,u)}});function gy(e,t){for(let n=e.length-1;n>=0;n--)if("optional"!==e[n]._zod[t])return n+1;return 0}function vy(e,t,n){e.issues.length&&t.issues.push(...qf(n,e.issues)),t.value[n]=e.value}function yy(e,t,n,i,r){for(let o=0;o<n.length;o++){const n=e[o],s=o<i.length;if(n.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...qf(o,n.issues))}t.value[o]=n.value}for(let e=t.value.length-1;e>=i.length&&("optional"===n[e]._zod.optout&&void 0===t.value[e]);e--)t.value.length=e;return t}const _y=af("$ZodRecord",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!Nf(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const o=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const u of s)if("string"==typeof u||"number"==typeof u||"symbol"==typeof u){a.add("number"==typeof u?u.toString():u);const s=t.keyType._zod.run({value:u,issues:[]},i);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>Qf(e,i,mf())),input:u,path:[u],inst:e});continue}const c=s.value,l=t.valueType._zod.run({value:r[u],issues:[]},i);l instanceof Promise?o.push(l.then(e=>{e.issues.length&&n.issues.push(...qf(u,e.issues)),n.value[c]=e.value})):(l.issues.length&&n.issues.push(...qf(u,l.issues)),n.value[c]=l.value)}let u;for(const e in r)a.has(e)||(u=u??[],u.push(e));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(const s of Reflect.ownKeys(r)){if("__proto__"===s)continue;if(!Object.prototype.propertyIsEnumerable.call(r,s))continue;let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof s&&yg.test(s)&&a.issues.length){const e=t.keyType._zod.run({value:Number(s),issues:[]},i);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(a=e)}if(a.issues.length){"loose"===t.mode?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Qf(e,i,mf())),input:s,path:[s],inst:e});continue}const u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&n.issues.push(...qf(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...qf(s,u.issues)),n.value[a.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),by=af("$ZodMap",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const o=[];n.value=new Map;for(const[s,a]of r){const u=t.keyType._zod.run({value:s,issues:[]},i),c=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([t,o])=>{$y(t,o,n,s,r,e,i)})):$y(u,c,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function $y(e,t,n,i,r,o,s){e.issues.length&&(Tf.has(typeof i)?n.issues.push(...qf(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(e=>Qf(e,s,mf()))})),t.issues.length&&(Tf.has(typeof i)?n.issues.push(...qf(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(e=>Qf(e,s,mf()))})),n.value.set(e.value,t.value)}const ky=af("$ZodSet",(e,t)=>{lv.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const o=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},i);r instanceof Promise?o.push(r.then(e=>wy(e,n))):wy(r,n)}return o.length?Promise.all(o).then(()=>n):n}});function wy(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Sy=af("$ZodEnum",(e,t)=>{lv.init(e,t);const n=pf(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(e=>Tf.has(typeof e)).map(e=>"string"==typeof e?Af(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),Iy=af("$ZodLiteral",(e,t)=>{if(lv.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?Af(e):e?Af(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,r)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),xy=af("$ZodFile",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>{const i=t.value;return i instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),t}}),Ey=af("$ZodTransform",(e,t)=>{lv.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new lf(e.constructor.name);const r=t.transform(n.value,n);if(i.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n.fallback=!0,n))}if(r instanceof Promise)throw new cf;return n.value=r,n.fallback=!0,n}});function Oy(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ny=af("$ZodOptional",(e,t)=>{lv.init(e,t),e._zod.optin="optional",e._zod.optout="optional",$f(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$f(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${yf(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=e.value,r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Oy(e,i)):Oy(r,i)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),zy=af("$ZodExactOptional",(e,t)=>{Ny.init(e,t),$f(e._zod,"values",()=>t.innerType._zod.values),$f(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ty=af("$ZodNullable",(e,t)=>{lv.init(e,t),$f(e._zod,"optin",()=>t.innerType._zod.optin),$f(e._zod,"optout",()=>t.innerType._zod.optout),$f(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${yf(e.source)}|null)$`):void 0}),$f(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),Dy=af("$ZodDefault",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Ay(e,t)):Ay(i,t)}});function Ay(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Cy=af("$ZodPrefault",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Uy=af("$ZodNonOptional",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,i)=>{const r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(t=>Py(t,e)):Py(r,e)}});function Py(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const jy=af("$ZodSuccess",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new lf("ZodSuccess");const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===i.issues.length,e)}}),Ry=af("$ZodCatch",(e,t)=>{lv.init(e,t),e._zod.optin="optional",$f(e._zod,"optout",()=>t.innerType._zod.optout),$f(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>Qf(e,n,mf()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>Qf(e,n,mf()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Ly=af("$ZodNaN",(e,t)=>{lv.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),Zy=af("$ZodPipe",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>t.in._zod.values),$f(e._zod,"optin",()=>t.in._zod.optin),$f(e._zod,"optout",()=>t.out._zod.optout),$f(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>My(e,t.in,n)):My(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>My(e,t.out,n)):My(i,t.out,n)}});function My(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Fy=af("$ZodCodec",(e,t)=>{lv.init(e,t),$f(e._zod,"values",()=>t.in._zod.values),$f(e._zod,"optin",()=>t.in._zod.optin),$f(e._zod,"optout",()=>t.out._zod.optout),$f(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const i=t.in._zod.run(e,n);return i instanceof Promise?i.then(e=>By(e,t,n)):By(i,t,n)}{const i=t.out._zod.run(e,n);return i instanceof Promise?i.then(e=>By(e,t,n)):By(i,t,n)}}});function By(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const i=t.transform(e.value,e);return i instanceof Promise?i.then(i=>Jy(e,i,t.out,n)):Jy(e,i,t.out,n)}{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(i=>Jy(e,i,t.in,n)):Jy(e,i,t.in,n)}}function Jy(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}const Vy=af("$ZodPreprocess",(e,t)=>{Zy.init(e,t)}),Gy=af("$ZodReadonly",(e,t)=>{lv.init(e,t),$f(e._zod,"propValues",()=>t.innerType._zod.propValues),$f(e._zod,"values",()=>t.innerType._zod.values),$f(e._zod,"optin",()=>t.innerType?._zod?.optin),$f(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(Wy):Wy(i)}});function Wy(e){return e.value=Object.freeze(e.value),e}const Ky=af("$ZodTemplateLiteral",(e,t)=>{lv.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const i=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,r))}else{if(null!==e&&!Df.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(Af(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,i)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),qy=af("$ZodFunction",(e,t)=>(lv.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const i=e._def.input?fh(e._def.input,n):n,r=Reflect.apply(t,this,i);return e._def.output?fh(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const i=e._def.input?await gh(e._def.input,n):n,r=await Reflect.apply(t,this,i);return e._def.output?await gh(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const i=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=i?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new hy({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Hy=af("$ZodPromise",(e,t)=>{lv.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Qy=af("$ZodLazy",(e,t)=>{lv.init(e,t),$f(e._zod,"innerType",()=>{const e=t;return e._cachedInner||(e._cachedInner=t.getter()),e._cachedInner}),$f(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),$f(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),$f(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),$f(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Yy=af("$ZodCustom",(e,t)=>{Rg.init(e,t),lv.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(t=>Xy(t,n,i,e));Xy(r,n,i,e)}});function Xy(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(th(e))}}const e_=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={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:"مدخل"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${Pf(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${i.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${i.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${ff(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const t_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${Pf(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${i.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function n_(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const i_=()=>{const e={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 t(t){return e[t]??null}const n={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:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${Pf(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=n_(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${i.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=n_(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${i.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const r_=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={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:"вход"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${Pf(e.values[0])}`:`Невалидна опция: очаквано едно от ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let i="Невалиден";return"emoji"===t.format&&(i="Невалидно"),"datetime"===t.format&&(i="Невалидно"),"date"===t.format&&(i="Невалидна"),"time"===t.format&&(i="Невалидно"),"duration"===t.format&&(i="Невалидна"),`${i} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const o_=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${Pf(e.values[0])}`:`Opció invàlida: s'esperava una de ${ff(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",i=t(e.origin);return i?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",i=t(e.origin);return i?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const s_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${Pf(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${i.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${ff(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const a_=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${Pf(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For stor: forventede ${o??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`For lille: forventede ${o} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${o} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const u_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${Pf(e.values[0])}`:`Ungültige Option: erwartet eine von ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const c_=()=>{const e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(t){return e[t]??null}const n={regex:"είσοδος",email:"διεύθυνση 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",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return"string"==typeof e.expected&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${r}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${r}`}case"invalid_value":return 1===e.values.length?`Μη έγκυρη είσοδος: αναμενόταν ${Pf(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Πολύ μεγάλο: αναμενόταν ${e.origin??"τιμή"} να έχει ${n}${e.maximum.toString()} ${i.unit??"στοιχεία"}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??"τιμή"} να είναι ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${i.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:"ends_with"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:"includes"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:"regex"===t.format?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case"unrecognized_keys":return`Άγνωστ${e.keys.length>1?"α":"ο"} κλειδ${e.keys.length>1?"ιά":"ί"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${e.origin}`;case"invalid_union":default:return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${e.origin}`}}};const l_=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input);return`Invalid input: expected ${t}, received ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Pf(e.values[0])}`:`Invalid option: expected one of ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${i.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":if(e.options&&Array.isArray(e.options)&&e.options.length>0){return`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(" | ")}`}return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`;default:return"Invalid input"}}};function d_(){return{localeError:l_()}}const m_=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${Pf(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const p_=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${Pf(e.values[0])}`:`Opción inválida: se esperaba una de ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${o} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[e.origin]??e.origin}`}}};const f_=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={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:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${r} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: میبایست ${Pf(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${ff(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${ff(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const h_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${Pf(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Liian suuri: ${i.subject} täytyy olla ${n}${e.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Liian pieni: ${i.subject} täytyy olla ${n}${e.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${ff(e.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"}}};const g_=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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"},i={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${Pf(e.values[0])} attendu`:`Option invalide : une valeur parmi ${ff(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin);return r?`Trop grand : ${i[e.origin]??"valeur"} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??"élément(s)"}`:`Trop grand : ${i[e.origin]??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin);return r?`Trop petit : ${i[e.origin]??"valeur"} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${i[e.origin]??"valeur"} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${ff(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const v_=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${Pf(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",i=t(e.origin);return i?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",i=t(e.origin);return i?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${ff(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const y_=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,i=t=>{const i=n(t);return i?i.label:t??e.unknown.label},r=e=>`ה${i(e)}`,o=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},s=e=>e?t[e]??null:null,a={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},u={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=u[n??""]??i(n),o=eh(t.input),s=u[o]??e[o]?.label??o;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${s}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${s}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${Pf(t.values[0])}`;const e=t.values.map(e=>Pf(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=s(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?"<=":"<",a=o(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${a} ${i}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${a} ${i}${t.maximum.toString()}`}case"too_small":{const e=s(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const i="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${i} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${i} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const i=t.inclusive?">=":">",a=o(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${a} ${i}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${a} ${i}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=a[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${ff(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const __=()=>{const e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(t){return e[t]??null}const n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${r}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${r}`}case"invalid_value":return 1===e.values.length?`Neispravna vrijednost: očekivano ${Pf(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Preveliko: očekivano da ${o??"vrijednost"} ima ${n}${e.maximum.toString()} ${r.unit??"elemenata"}`:`Preveliko: očekivano da ${o??"vrijednost"} bude ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),o=i[e.origin]??e.origin;return r?`Premalo: očekivano da ${o} ima ${n}${e.minimum.toString()} ${r.unit}`:`Premalo: očekivano da ${o} bude ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neispravan tekst: mora započinjati s "${t.prefix}"`:"ends_with"===t.format?`Neispravan tekst: mora završavati s "${t.suffix}"`:"includes"===t.format?`Neispravan tekst: mora sadržavati "${t.includes}"`:"regex"===t.format?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case"unrecognized_keys":return`Neprepoznat${e.keys.length>1?"i ključevi":" ključ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${i[e.origin]??e.origin}`;case"invalid_union":default:return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[e.origin]??e.origin}`}}};const b_=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${Pf(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${i.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${i.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function $_(e,t,n){return 1===Math.abs(e)?t:n}function k_(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const w_=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={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:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${Pf(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=$_(Number(e.maximum),i.unit.one,i.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${k_(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${k_(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=$_(Number(e.minimum),i.unit.one,i.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${k_(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${k_(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${ff(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${k_(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${k_(e.origin)}-ում`}}};const S_=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${Pf(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const I_=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${Pf(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const x_=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${Pf(e.values[0])}`:`Opzione non valida: atteso uno tra ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const E_=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={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:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${Pf(e.values[0])}が期待されました`:`無効な選択: ${ff(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",i=t(e.origin);return i?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${i.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",i=t(e.origin);return i?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${i.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${ff(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const O_=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${Pf(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${ff(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${ff(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const N_=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={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:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Pf(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${i.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${i.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${ff(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function z_(){return{localeError:N_()}}const T_=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={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:"입력"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${Pf(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${ff(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",i="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${i}`}case"too_small":{const n=e.inclusive?"이상":"초과",i="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),o=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${o} ${n}${i}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${i}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${ff(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const D_=e=>e.charAt(0).toUpperCase()+e.slice(1);function A_(e){const t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||0===n?"many":1===n?"one":"few"}const C_=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,i,r){const o=e[t]??null;return null===o?o:{unit:o.unit[n],verb:o.verb[r][i?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${Pf(e.values[0])}`:`Privalo būti vienas iš ${ff(e.values,"|")} pasirinkimų`;case"too_big":{const n=i[e.origin]??e.origin,r=t(e.origin,A_(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${D_(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${D_(n??e.origin??"reikšmė")} turi būti ${o} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=i[e.origin]??e.origin,r=t(e.origin,A_(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${D_(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const o=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${D_(n??e.origin??"reikšmė")} turi būti ${o} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${ff(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=i[e.origin]??e.origin;return`${D_(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const U_=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={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:"внес"},i={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${Pf(e.values[0])}`:`Грешана опција: се очекува една ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${i.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${i.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const P_=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${Pf(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Terlalu besar: dijangka ${e.origin??"nilai"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Terlalu kecil: dijangka ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ff(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const j_=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${Pf(e.values[0])}`:`Ongeldige optie: verwacht één van ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return i?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return i?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const R_=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${Pf(e.values[0])}`:`Ugyldig valg: forventet en av ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const L_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${Pf(e.values[0])}`:`Fâsit tercih: mûteberler ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${i.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${i.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Z_=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={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:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${Pf(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${ff(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${i.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${i.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const M_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${Pf(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${i.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${i.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const F_=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${Pf(e.values[0])}`:`Opção inválida: esperada uma das ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};const B_=()=>{const e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function t(t){return e[t]??null}const n={regex:"intrare",email:"adresă de 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:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input);return`Intrare invalidă: așteptat ${t}, primit ${i[n]??n}`}case"invalid_value":return 1===e.values.length?`Intrare invalidă: așteptat ${Pf(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Prea mare: așteptat ca ${e.origin??"valoarea"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"elemente"}`:`Prea mare: așteptat ca ${e.origin??"valoarea"} să fie ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Prea mic: așteptat ca ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:"ends_with"===t.format?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:"includes"===t.format?`Șir invalid: trebuie să includă "${t.includes}"`:"regex"===t.format?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${ff(e.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${e.origin}`;case"invalid_union":default:return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${e.origin}`}}};function J_(e,t,n,i){const r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:1===o?t:o>=2&&o<=4?n:i}const V_=()=>{const e={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 t(t){return e[t]??null}const n={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:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${Pf(e.values[0])}`:`Неверный вариант: ожидалось одно из ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);if(i){const t=J_(Number(e.maximum),i.unit.one,i.unit.few,i.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);if(i){const t=J_(Number(e.minimum),i.unit.one,i.unit.few,i.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const G_=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${Pf(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${i.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const W_=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${Pf(e.values[0])}`:`Ogiltigt val: förväntade en av ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${i.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${i.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${ff(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const K_=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Pf(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${ff(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${i.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const q_=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={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:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${Pf(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",i=t(e.origin);return i?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${i.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",i=t(e.origin);return i?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${i.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${ff(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const H_=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={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"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${Pf(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const Q_=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={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:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${Pf(e.values[0])}`:`Неправильна опція: очікується одне з ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Занадто велике: очікується, що ${e.origin??"значення"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Занадто мале: очікується, що ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function Y_(){return{localeError:Q_()}}const X_=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={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:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${Pf(e.values[0])} متوقع تھا`:`غلط آپشن: ${ff(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${i.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${i.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${ff(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const eb=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function t(t){return e[t]??null}const n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${Pf(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const tb=()=>{const e={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 t(t){return e[t]??null}const n={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"},i={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${Pf(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${i.verb} ${n}${e.maximum.toString()} ${i.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Quá nhỏ: mong đợi ${e.origin} ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${ff(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const nb=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={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:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${Pf(e.values[0])}`:`无效选项:期望以下之一 ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${i.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${i.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${ff(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const ib=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={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:"輸入"},i={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${Pf(e.values[0])}`:`無效的選項:預期為以下其中之一 ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${i.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${i.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${ff(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const rb=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=i[e.expected]??e.expected,n=eh(e.input),r=i[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${Pf(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${ff(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",i=t(e.origin);return i?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${i.verb} ${n}${e.maximum} ${i.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",i=t(e.origin);return i?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${i.verb} ${n}${e.minimum} ${i.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${ff(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var ob,sb=Object.freeze({__proto__:null,ar:function(){return{localeError:e_()}},az:function(){return{localeError:t_()}},be:function(){return{localeError:i_()}},bg:function(){return{localeError:r_()}},ca:function(){return{localeError:o_()}},cs:function(){return{localeError:s_()}},da:function(){return{localeError:a_()}},de:function(){return{localeError:u_()}},el:function(){return{localeError:c_()}},en:d_,eo:function(){return{localeError:m_()}},es:function(){return{localeError:p_()}},fa:function(){return{localeError:f_()}},fi:function(){return{localeError:h_()}},fr:function(){return{localeError:g_()}},frCA:function(){return{localeError:v_()}},he:function(){return{localeError:y_()}},hr:function(){return{localeError:__()}},hu:function(){return{localeError:b_()}},hy:function(){return{localeError:w_()}},id:function(){return{localeError:S_()}},is:function(){return{localeError:I_()}},it:function(){return{localeError:x_()}},ja:function(){return{localeError:E_()}},ka:function(){return{localeError:O_()}},kh:function(){return z_()},km:z_,ko:function(){return{localeError:T_()}},lt:function(){return{localeError:C_()}},mk:function(){return{localeError:U_()}},ms:function(){return{localeError:P_()}},nl:function(){return{localeError:j_()}},no:function(){return{localeError:R_()}},ota:function(){return{localeError:L_()}},pl:function(){return{localeError:M_()}},ps:function(){return{localeError:Z_()}},pt:function(){return{localeError:F_()}},ro:function(){return{localeError:B_()}},ru:function(){return{localeError:V_()}},sl:function(){return{localeError:G_()}},sv:function(){return{localeError:W_()}},ta:function(){return{localeError:K_()}},th:function(){return{localeError:q_()}},tr:function(){return{localeError:H_()}},ua:function(){return Y_()},uk:Y_,ur:function(){return{localeError:X_()}},uz:function(){return{localeError:eb()}},vi:function(){return{localeError:tb()}},yo:function(){return{localeError:rb()}},zhCN:function(){return{localeError:nb()}},zhTW:function(){return{localeError:ib()}}});const ab=Symbol("ZodOutput"),ub=Symbol("ZodInput");class cb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function lb(){return new cb}(ob=globalThis).__zod_globalRegistry??(ob.__zod_globalRegistry=lb());const db=globalThis.__zod_globalRegistry;function mb(e,t){return new e({type:"string",...Uf(t)})}function pb(e,t){return new e({type:"string",coerce:!0,...Uf(t)})}function fb(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Uf(t)})}function hb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Uf(t)})}function gb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Uf(t)})}function vb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Uf(t)})}function yb(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Uf(t)})}function _b(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Uf(t)})}function bb(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Uf(t)})}function $b(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Uf(t)})}function kb(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Uf(t)})}function wb(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Uf(t)})}function Sb(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Uf(t)})}function Ib(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Uf(t)})}function xb(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Uf(t)})}function Eb(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Uf(t)})}function Ob(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Uf(t)})}function Nb(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Uf(t)})}function zb(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Uf(t)})}function Tb(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Uf(t)})}function Db(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Uf(t)})}function Ab(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Uf(t)})}function Cb(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Uf(t)})}function Ub(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Uf(t)})}function Pb(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Uf(t)})}const jb={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Rb(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Uf(t)})}function Lb(e,t){return new e({type:"string",format:"date",check:"string_format",...Uf(t)})}function Zb(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Uf(t)})}function Mb(e,t){return new e({type:"string",format:"duration",check:"string_format",...Uf(t)})}function Fb(e,t){return new e({type:"number",checks:[],...Uf(t)})}function Bb(e,t){return new e({type:"number",coerce:!0,checks:[],...Uf(t)})}function Jb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Uf(t)})}function Vb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Uf(t)})}function Gb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Uf(t)})}function Wb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Uf(t)})}function Kb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Uf(t)})}function qb(e,t){return new e({type:"boolean",...Uf(t)})}function Hb(e,t){return new e({type:"boolean",coerce:!0,...Uf(t)})}function Qb(e,t){return new e({type:"bigint",...Uf(t)})}function Yb(e,t){return new e({type:"bigint",coerce:!0,...Uf(t)})}function Xb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Uf(t)})}function e$(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Uf(t)})}function t$(e,t){return new e({type:"symbol",...Uf(t)})}function n$(e,t){return new e({type:"undefined",...Uf(t)})}function i$(e,t){return new e({type:"null",...Uf(t)})}function r$(e){return new e({type:"any"})}function o$(e){return new e({type:"unknown"})}function s$(e,t){return new e({type:"never",...Uf(t)})}function a$(e,t){return new e({type:"void",...Uf(t)})}function u$(e,t){return new e({type:"date",...Uf(t)})}function c$(e,t){return new e({type:"date",coerce:!0,...Uf(t)})}function l$(e,t){return new e({type:"nan",...Uf(t)})}function d$(e,t){return new Zg({check:"less_than",...Uf(t),value:e,inclusive:!1})}function m$(e,t){return new Zg({check:"less_than",...Uf(t),value:e,inclusive:!0})}function p$(e,t){return new Mg({check:"greater_than",...Uf(t),value:e,inclusive:!1})}function f$(e,t){return new Mg({check:"greater_than",...Uf(t),value:e,inclusive:!0})}function h$(e){return p$(0,e)}function g$(e){return d$(0,e)}function v$(e){return m$(0,e)}function y$(e){return f$(0,e)}function _$(e,t){return new Fg({check:"multiple_of",...Uf(t),value:e})}function b$(e,t){return new Vg({check:"max_size",...Uf(t),maximum:e})}function $$(e,t){return new Gg({check:"min_size",...Uf(t),minimum:e})}function k$(e,t){return new Wg({check:"size_equals",...Uf(t),size:e})}function w$(e,t){return new Kg({check:"max_length",...Uf(t),maximum:e})}function S$(e,t){return new qg({check:"min_length",...Uf(t),minimum:e})}function I$(e,t){return new Hg({check:"length_equals",...Uf(t),length:e})}function x$(e,t){return new Yg({check:"string_format",format:"regex",...Uf(t),pattern:e})}function E$(e){return new Xg({check:"string_format",format:"lowercase",...Uf(e)})}function O$(e){return new ev({check:"string_format",format:"uppercase",...Uf(e)})}function N$(e,t){return new tv({check:"string_format",format:"includes",...Uf(t),includes:e})}function z$(e,t){return new nv({check:"string_format",format:"starts_with",...Uf(t),prefix:e})}function T$(e,t){return new iv({check:"string_format",format:"ends_with",...Uf(t),suffix:e})}function D$(e,t,n){return new ov({check:"property",property:e,schema:t,...Uf(n)})}function A$(e,t){return new sv({check:"mime_type",mime:e,...Uf(t)})}function C$(e){return new av({check:"overwrite",tx:e})}function U$(e){return C$(t=>t.normalize(e))}function P$(){return C$(e=>e.trim())}function j$(){return C$(e=>e.toLowerCase())}function R$(){return C$(e=>e.toUpperCase())}function L$(){return C$(e=>If(e))}function Z$(e,t,n){return new e({type:"array",element:t,...Uf(n)})}function M$(e,t){return new e({type:"file",...Uf(t)})}function F$(e,t,n){const i=Uf(n);i.abort??(i.abort=!0);return new e({type:"custom",check:"custom",fn:t,...i})}function B$(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Uf(n)})}function J$(e,t){const n=V$(t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(th(e,t.value,n._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=t.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),t.issues.push(th(i))}},e(t.value,t)),t);return n}function V$(e,t){const n=new Rg({check:"custom",...Uf(t)});return n._zod.check=e,n}function G$(e){const t=new Rg({check:"describe"});return t._zod.onattach=[t=>{const n=db.get(t)??{};db.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function W$(e){const t=new Rg({check:"meta"});return t._zod.onattach=[t=>{const n=db.get(t)??{};db.add(t,{...n,...e})}],t._zod.check=()=>{},t}function K$(e,t){const n=Uf(t);let i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(i=i.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const o=new Set(i),s=new Set(r),a=e.Codec??Fy,u=e.Boolean??Bv,c=new a({type:"pipe",in:new(e.String??dv)({type:"string",error:n.error}),out:new u({type:"boolean",error:n.error}),transform:(e,t)=>{let i=e;return"sensitive"!==n.case&&(i=i.toLowerCase()),!!o.has(i)||!s.has(i)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:t.value,inst:c,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?i[0]||"true":r[0]||"false",error:n.error});return c}function q$(e,t,n,i={}){const r=Uf(i),o={...Uf(i),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(o.pattern=n);return new e(o)}function H$(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??db,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Q$(e,t,n={path:[],schemaPath:[]}){var i;const r=e._zod.def,o=t.seen.get(e);if(o){o.count++;return n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema}const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const i={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,i);else{const n=s.schema,o=t.processors[r.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);o(e,t,n,i)}const o=e._zod.parent;o&&(s.ref||(s.ref=o),Q$(o,t,i),t.seen.get(o).isParent=!0)}const u=t.metadataRegistry.get(e);u&&Object.assign(s.schema,u),"input"===t.io&&ek(e)&&(delete s.schema.examples,delete s.schema.default),"input"===t.io&&"_prefault"in s.schema&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault;return t.seen.get(e).schema}function Y$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=i.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const i=t[1],{ref:r,defId:o}=(t=>{const i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const o=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=o,{defId:o,ref:`${r("__shared")}#/${i}/${o}`}}if(t[1]===n)return{ref:"#"};const r=`#/${i}/`,o=t[1].schema.id??"__schema"+e.counter++;return{defId:o,ref:r+o}})(t);i.def={...i.schema},o&&(i.defId=o);const s=i.schema;for(const e in s)delete s[e];s.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const i=n[1];if(t===n[0]){r(n);continue}if(e.external){const i=e.external.registry.get(n[0])?.id;if(t!==n[0]&&i){r(n);continue}}const o=e.metadataRegistry.get(n[0])?.id;o?r(n):(i.cycle||i.count>1&&"ref"===e.reused)&&r(n)}}function X$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,o={...r},s=n.ref;if(n.ref=null,s){i(s);const n=e.seen.get(s),a=n.schema;!a.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,a):(r.allOf=r.allOf??[],r.allOf.push(a)),Object.assign(r,o);if(t._zod.parent===s)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in o||delete r[e]);if(a.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const a=t._zod.parent;if(a&&a!==s){i(a);const t=e.seen.get(a);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())i(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const o=e.metadataRegistry.get(t)?.id;void 0!==o&&r.id===o&&delete r.id;const s=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,s[e.defId]=e.def)}e.external||Object.keys(s).length>0&&("draft-2020-12"===e.target?r.$defs=s:r.definitions=s);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:nk(t,"input",e.processors),output:nk(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function ek(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return ek(i.element,n);if("set"===i.type)return ek(i.valueType,n);if("lazy"===i.type)return ek(i.getter(),n);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return ek(i.innerType,n);if("intersection"===i.type)return ek(i.left,n)||ek(i.right,n);if("record"===i.type||"map"===i.type)return ek(i.keyType,n)||ek(i.valueType,n);if("pipe"===i.type)return!!e._zod.traits.has("$ZodCodec")||(ek(i.in,n)||ek(i.out,n));if("object"===i.type){for(const e in i.shape)if(ek(i.shape[e],n))return!0;return!1}if("union"===i.type){for(const e of i.options)if(ek(e,n))return!0;return!1}if("tuple"===i.type){for(const e of i.items)if(ek(e,n))return!0;return!(!i.rest||!ek(i.rest,n))}return!1}const tk=(e,t={})=>n=>{const i=H$({...n,processors:t});return Q$(e,i),Y$(i,e),X$(i,e)},nk=(e,t,n={})=>i=>{const{libraryOptions:r,target:o}=i??{},s=H$({...r??{},target:o,io:t,processors:n});return Q$(e,s),Y$(s,e),X$(s,e)},ik={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},rk=(e,t,n,i)=>{const r=n;r.type="string";const{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof s&&(r.maxLength=s),a&&(r.format=ik[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),c&&(r.contentEncoding=c),u&&u.size>0){const e=[...u];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ok=(e,t,n,i)=>{const r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";const d="number"==typeof l&&l>=(o??Number.NEGATIVE_INFINITY),m="number"==typeof c&&c<=(s??Number.POSITIVE_INFINITY),p="draft-04"===t.target||"openapi-3.0"===t.target;d?p?(r.minimum=l,r.exclusiveMinimum=!0):r.exclusiveMinimum=l:"number"==typeof o&&(r.minimum=o),m?p?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:"number"==typeof s&&(r.maximum=s),"number"==typeof u&&(r.multipleOf=u)},sk=(e,t,n,i)=>{n.type="boolean"},ak=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},uk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},ck=(e,t,n,i)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},lk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},dk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},mk=(e,t,n,i)=>{n.not={}},pk=(e,t,n,i)=>{},fk=(e,t,n,i)=>{},hk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},gk=(e,t,n,i)=>{const r=pf(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},vk=(e,t,n,i)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o},yk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},_k=(e,t,n,i)=>{const r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},bk=(e,t,n,i)=>{const r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;void 0!==s&&(o.minLength=s),void 0!==a&&(o.maxLength=a),u?1===u.length?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(e=>({contentMediaType:e}))):Object.assign(r,o)},$k=(e,t,n,i)=>{n.type="boolean"},kk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},wk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},Sk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},Ik=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},xk=(e,t,n,i)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},Ek=(e,t,n,i)=>{const r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(r.minItems=s),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=Q$(o.element,t,{...i,path:[...i.path,"items"]})},Ok=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object",r.properties={};const s=o.shape;for(const e in s)r.properties[e]=Q$(s[e],t,{...i,path:[...i.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter(e=>{const n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));u.size>0&&(r.required=Array.from(u)),"never"===o.catchall?._zod.def.type?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Q$(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},Nk=(e,t,n,i)=>{const r=e._zod.def,o=!1===r.inclusive,s=r.options.map((e,n)=>Q$(e,t,{...i,path:[...i.path,o?"oneOf":"anyOf",n]}));o?n.oneOf=s:n.anyOf=s},zk=(e,t,n,i)=>{const r=e._zod.def,o=Q$(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=Q$(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},Tk=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="array";const s="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",u=o.items.map((e,n)=>Q$(e,t,{...i,path:[...i.path,s,n]})),c=o.rest?Q$(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=u,c&&(r.items=c)):"openapi-3.0"===t.target?(r.items={anyOf:u},c&&r.items.anyOf.push(c),r.minItems=u.length,c||(r.maxItems=u.length)):(r.items=u,c&&(r.additionalItems=c));const{minimum:l,maximum:d}=e._zod.bag;"number"==typeof l&&(r.minItems=l),"number"==typeof d&&(r.maxItems=d)},Dk=(e,t,n,i)=>{const r=n,o=e._zod.def;r.type="object";const s=o.keyType,a=s._zod.bag,u=a?.patterns;if("loose"===o.mode&&u&&u.size>0){const e=Q$(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(const t of u)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=Q$(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Q$(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const c=s._zod.values;if(c){const e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},Ak=(e,t,n,i)=>{const r=e._zod.def,o=Q$(r.innerType,t,i),s=t.seen.get(e);"openapi-3.0"===t.target?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Ck=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Uk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Pk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},jk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);let o;t.seen.get(e).ref=r.innerType;try{o=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Rk=(e,t,n,i)=>{const r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s="input"===t.io?o?r.out:r.in:r.out;Q$(s,t,i);t.seen.get(e).ref=s},Lk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Zk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Mk=(e,t,n,i)=>{const r=e._zod.def;Q$(r.innerType,t,i);t.seen.get(e).ref=r.innerType},Fk=(e,t,n,i)=>{const r=e._zod.innerType;Q$(r,t,i);t.seen.get(e).ref=r},Bk={string:rk,number:ok,boolean:sk,bigint:ak,symbol:uk,null:ck,undefined:lk,void:dk,never:mk,any:pk,unknown:fk,date:hk,enum:gk,literal:vk,nan:yk,template_literal:_k,file:bk,success:$k,custom:kk,function:wk,transform:Sk,map:Ik,set:xk,array:Ek,object:Ok,union:Nk,intersection:zk,tuple:Tk,record:Dk,nullable:Ak,nonoptional:Ck,default:Uk,prefault:Pk,catch:jk,pipe:Rk,readonly:Lk,promise:Zk,optional:Mk,lazy:Fk};function Jk(e,t){if("_idmap"in e){const n=e,i=H$({...t,processors:Bk}),r={};for(const e of n._idmap.entries()){const[t,n]=e;Q$(n,i)}const o={},s={registry:n,uri:t?.uri,defs:r};i.external=s;for(const e of n._idmap.entries()){const[t,n]=e;Y$(i,n),o[t]=X$(i,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===i.target?"$defs":"definitions";o.__shared={[e]:r}}return{schemas:o}}const n=H$({...t,processors:Bk});return Q$(e,n),Y$(n,e),X$(n,e)}var Vk=Object.freeze({__proto__:null}),Gk=Object.freeze({__proto__:null,$ZodAny:qv,$ZodArray:ty,$ZodAsyncError:cf,$ZodBase64:Cv,$ZodBase64URL:Pv,$ZodBigInt:Jv,$ZodBigIntFormat:Vv,$ZodBoolean:Bv,$ZodCIDRv4:Tv,$ZodCIDRv6:Dv,$ZodCUID:_v,$ZodCUID2:bv,$ZodCatch:Ry,$ZodCheck:Rg,$ZodCheckBigIntFormat:Jg,$ZodCheckEndsWith:iv,$ZodCheckGreaterThan:Mg,$ZodCheckIncludes:tv,$ZodCheckLengthEquals:Hg,$ZodCheckLessThan:Zg,$ZodCheckLowerCase:Xg,$ZodCheckMaxLength:Kg,$ZodCheckMaxSize:Vg,$ZodCheckMimeType:sv,$ZodCheckMinLength:qg,$ZodCheckMinSize:Gg,$ZodCheckMultipleOf:Fg,$ZodCheckNumberFormat:Bg,$ZodCheckOverwrite:av,$ZodCheckProperty:ov,$ZodCheckRegex:Yg,$ZodCheckSizeEquals:Wg,$ZodCheckStartsWith:nv,$ZodCheckStringFormat:Qg,$ZodCheckUpperCase:ev,$ZodCodec:Fy,$ZodCustom:Yy,$ZodCustomStringFormat:Zv,$ZodDate:Xv,$ZodDefault:Dy,$ZodDiscriminatedUnion:dy,$ZodE164:jv,$ZodEmail:hv,$ZodEmoji:vv,$ZodEncodeError:lf,$ZodEnum:Sy,$ZodError:sh,$ZodExactOptional:zy,$ZodFile:xy,$ZodFunction:qy,$ZodGUID:pv,$ZodIPv4:Ov,$ZodIPv6:Nv,$ZodISODate:Iv,$ZodISODateTime:Sv,$ZodISODuration:Ev,$ZodISOTime:xv,$ZodIntersection:my,$ZodJWT:Lv,$ZodKSUID:wv,$ZodLazy:Qy,$ZodLiteral:Iy,$ZodMAC:zv,$ZodMap:by,$ZodNaN:Ly,$ZodNanoID:yv,$ZodNever:Qv,$ZodNonOptional:Uy,$ZodNull:Kv,$ZodNullable:Ty,$ZodNumber:Mv,$ZodNumberFormat:Fv,$ZodObject:oy,$ZodObjectJIT:sy,$ZodOptional:Ny,$ZodPipe:Zy,$ZodPrefault:Cy,$ZodPreprocess:Vy,$ZodPromise:Hy,$ZodReadonly:Gy,$ZodRealError:ah,$ZodRecord:_y,$ZodRegistry:cb,$ZodSet:ky,$ZodString:dv,$ZodStringFormat:mv,$ZodSuccess:jy,$ZodSymbol:Gv,$ZodTemplateLiteral:Ky,$ZodTransform:Ey,$ZodTuple:hy,$ZodType:lv,$ZodULID:$v,$ZodURL:gv,$ZodUUID:fv,$ZodUndefined:Wv,$ZodUnion:uy,$ZodUnknown:Hv,$ZodVoid:Yv,$ZodXID:kv,$ZodXor:ly,$brand:uf,$constructor:af,$input:ub,$output:ab,Doc:uv,JSONSchema:Vk,JSONSchemaGenerator:class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=H$({processors:Bk,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Q$(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Y$(this.ctx,e);const n=X$(this.ctx,e),{"~standard":i,...r}=n;return r}},NEVER:sf,TimePrecision:jb,_any:r$,_array:Z$,_base64:Ab,_base64url:Cb,_bigint:Qb,_boolean:qb,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:V$,_cidrv4:Tb,_cidrv6:Db,_coercedBigint:Yb,_coercedBoolean:Hb,_coercedDate:c$,_coercedNumber:Bb,_coercedString:pb,_cuid:wb,_cuid2:Sb,_custom:F$,_date:u$,_decode:wh,_decodeAsync:Eh,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():zf(n)}})},_discriminatedUnion:function(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...Uf(i)})},_e164:Ub,_email:fb,_emoji:$b,_encode:$h,_encodeAsync:Ih,_endsWith:T$,_enum:function(e,t,n){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...Uf(n)})},_file:M$,_float32:Vb,_float64:Gb,_gt:p$,_gte:f$,_guid:hb,_includes:N$,_int:Jb,_int32:Wb,_int64:Xb,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:Ob,_ipv6:Nb,_isoDate:Lb,_isoDateTime:Rb,_isoDuration:Mb,_isoTime:Zb,_jwt:Pb,_ksuid:Eb,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:I$,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Uf(n)})},_lowercase:E$,_lt:d$,_lte:m$,_mac:zb,_map:function(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...Uf(i)})},_max:m$,_maxLength:w$,_maxSize:b$,_mime:A$,_min:f$,_minLength:S$,_minSize:$$,_multipleOf:_$,_nan:l$,_nanoid:kb,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...Uf(n)})},_negative:g$,_never:s$,_nonnegative:y$,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...Uf(n)})},_nonpositive:v$,_normalize:U$,_null:i$,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Fb,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:C$,_parse:ph,_parseAsync:hh,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:h$,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:D$,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...Uf(i)})},_refine:B$,_regex:x$,_safeDecode:Th,_safeDecodeAsync:Uh,_safeEncode:Nh,_safeEncodeAsync:Ah,_safeParse:vh,_safeParseAsync:_h,_set:function(e,t,n){return new e({type:"set",valueType:t,...Uf(n)})},_size:k$,_slugify:L$,_startsWith:z$,_string:mb,_stringFormat:q$,_stringbool:K$,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:J$,_symbol:t$,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...Uf(n)})},_toLowerCase:j$,_toUpperCase:R$,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:P$,_tuple:function(e,t,n,i){const r=n instanceof lv;return new e({type:"tuple",items:t,rest:r?n:null,...Uf(r?i:n)})},_uint32:Kb,_uint64:e$,_ulid:Ib,_undefined:n$,_union:function(e,t,n){return new e({type:"union",options:t,...Uf(n)})},_unknown:o$,_uppercase:O$,_url:bb,_uuid:gb,_uuidv4:vb,_uuidv6:yb,_uuidv7:_b,_void:a$,_xid:xb,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Uf(n)})},clone:Cf,config:mf,createStandardJSONSchemaMethod:nk,createToJSONSchemaMethod:tk,decode:Sh,decodeAsync:Oh,describe:G$,encode:kh,encodeAsync:xh,extractDefs:Y$,finalize:X$,flattenError:uh,formatError:ch,globalConfig:df,globalRegistry:db,initializeContext:H$,isValidBase64:Av,isValidBase64URL:Uv,isValidJWT:Rv,locales:sb,meta:W$,parse:fh,parseAsync:gh,prettifyError:mh,process:Q$,regexes:jg,registry:lb,safeDecode:Dh,safeDecodeAsync:Ph,safeEncode:zh,safeEncodeAsync:Ch,safeParse:yh,safeParseAsync:bh,toDotPath:dh,toJSONSchema:Jk,treeifyError:lh,util:rh,version:cv}),Wk=Object.freeze({__proto__:null,endsWith:T$,gt:p$,gte:f$,includes:N$,length:I$,lowercase:E$,lt:d$,lte:m$,maxLength:w$,maxSize:b$,mime:A$,minLength:S$,minSize:$$,multipleOf:_$,negative:g$,nonnegative:y$,nonpositive:v$,normalize:U$,overwrite:C$,positive:h$,property:D$,regex:x$,size:k$,slugify:L$,startsWith:z$,toLowerCase:j$,toUpperCase:R$,trim:P$,uppercase:O$});const Kk=af("ZodISODateTime",(e,t)=>{Sv.init(e,t),Sw.init(e,t)});function qk(e){return Rb(Kk,e)}const Hk=af("ZodISODate",(e,t)=>{Iv.init(e,t),Sw.init(e,t)});function Qk(e){return Lb(Hk,e)}const Yk=af("ZodISOTime",(e,t)=>{xv.init(e,t),Sw.init(e,t)});function Xk(e){return Zb(Yk,e)}const ew=af("ZodISODuration",(e,t)=>{Ev.init(e,t),Sw.init(e,t)});function tw(e){return Mb(ew,e)}var nw=Object.freeze({__proto__:null,ZodISODate:Hk,ZodISODateTime:Kk,ZodISODuration:ew,ZodISOTime:Yk,date:Qk,datetime:qk,duration:tw,time:Xk});const iw=(e,t)=>{sh.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>ch(e,t)},flatten:{value:t=>uh(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,hf,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,hf,2)}},isEmpty:{get:()=>0===e.issues.length}})},rw=af("ZodError",iw),ow=af("ZodError",iw,{Parent:Error}),sw=ph(ow),aw=hh(ow),uw=vh(ow),cw=_h(ow),lw=$h(ow),dw=wh(ow),mw=Ih(ow),pw=Eh(ow),fw=Nh(ow),hw=Th(ow),gw=Ah(ow),vw=Uh(ow),yw=new WeakMap;function _w(e,t,n){const i=Object.getPrototypeOf(e);let r=yw.get(i);if(r||(r=new Set,yw.set(i,r)),!r.has(t)){r.add(t);for(const e in n){const t=n[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const bw=af("ZodType",(e,t)=>(lv.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:nk(e,"input"),output:nk(e,"output")}}),e.toJSONSchema=tk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>sw(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>uw(e,t,n),e.parseAsync=async(t,n)=>aw(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>cw(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>lw(e,t,n),e.decode=(t,n)=>dw(e,t,n),e.encodeAsync=async(t,n)=>mw(e,t,n),e.decodeAsync=async(t,n)=>pw(e,t,n),e.safeEncode=(t,n)=>fw(e,t,n),e.safeDecode=(t,n)=>hw(e,t,n),e.safeEncodeAsync=async(t,n)=>gw(e,t,n),e.safeDecodeAsync=async(t,n)=>vw(e,t,n),_w(e,"ZodType",{check(...e){const t=this.def;return this.clone(wf(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Cf(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(hx(e,t))},superRefine(e,t){return this.check(gx(e,t))},overwrite(e){return this.check(C$(e))},optional(){return DI(this)},exactOptional(){return CI(this)},nullable(){return PI(this)},nullish(){return DI(PI(this))},nonoptional(e){return BI(this,e)},array(){return YS(this)},or(e){return oI([this,e])},and(e){return dI(this,e)},transform(e){return QI(this,zI(e))},default(e){return LI(this,e)},prefault(e){return MI(this,e)},catch(e){return WI(this,e)},pipe(e){return QI(this,e)},readonly(){return ix(this)},describe(e){const t=this.clone();return db.add(t,{description:e}),t},meta(...e){if(0===e.length)return db.get(this);const t=this.clone();return db.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>db.get(e)?.description,configurable:!0}),e)),$w=af("_ZodString",(e,t)=>{dv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>rk(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_w(e,"_ZodString",{regex(...e){return this.check(x$(...e))},includes(...e){return this.check(N$(...e))},startsWith(...e){return this.check(z$(...e))},endsWith(...e){return this.check(T$(...e))},min(...e){return this.check(S$(...e))},max(...e){return this.check(w$(...e))},length(...e){return this.check(I$(...e))},nonempty(...e){return this.check(S$(1,...e))},lowercase(e){return this.check(E$(e))},uppercase(e){return this.check(O$(e))},trim(){return this.check(P$())},normalize(...e){return this.check(U$(...e))},toLowerCase(){return this.check(j$())},toUpperCase(){return this.check(R$())},slugify(){return this.check(L$())}})}),kw=af("ZodString",(e,t)=>{dv.init(e,t),$w.init(e,t),e.email=t=>e.check(fb(Iw,t)),e.url=t=>e.check(bb(Cw,t)),e.jwt=t=>e.check(Pb(pS,t)),e.emoji=t=>e.check($b(jw,t)),e.guid=t=>e.check(hb(Ew,t)),e.uuid=t=>e.check(gb(Nw,t)),e.uuidv4=t=>e.check(vb(Nw,t)),e.uuidv6=t=>e.check(yb(Nw,t)),e.uuidv7=t=>e.check(_b(Nw,t)),e.nanoid=t=>e.check(kb(Lw,t)),e.guid=t=>e.check(hb(Ew,t)),e.cuid=t=>e.check(wb(Mw,t)),e.cuid2=t=>e.check(Sb(Bw,t)),e.ulid=t=>e.check(Ib(Vw,t)),e.base64=t=>e.check(Ab(aS,t)),e.base64url=t=>e.check(Cb(cS,t)),e.xid=t=>e.check(xb(Ww,t)),e.ksuid=t=>e.check(Eb(qw,t)),e.ipv4=t=>e.check(Ob(Qw,t)),e.ipv6=t=>e.check(Nb(tS,t)),e.cidrv4=t=>e.check(Tb(iS,t)),e.cidrv6=t=>e.check(Db(oS,t)),e.e164=t=>e.check(Ub(dS,t)),e.datetime=t=>e.check(qk(t)),e.date=t=>e.check(Qk(t)),e.time=t=>e.check(Xk(t)),e.duration=t=>e.check(tw(t))});function ww(e){return mb(kw,e)}const Sw=af("ZodStringFormat",(e,t)=>{mv.init(e,t),$w.init(e,t)}),Iw=af("ZodEmail",(e,t)=>{hv.init(e,t),Sw.init(e,t)});function xw(e){return fb(Iw,e)}const Ew=af("ZodGUID",(e,t)=>{pv.init(e,t),Sw.init(e,t)});function Ow(e){return hb(Ew,e)}const Nw=af("ZodUUID",(e,t)=>{fv.init(e,t),Sw.init(e,t)});function zw(e){return gb(Nw,e)}function Tw(e){return vb(Nw,e)}function Dw(e){return yb(Nw,e)}function Aw(e){return _b(Nw,e)}const Cw=af("ZodURL",(e,t)=>{gv.init(e,t),Sw.init(e,t)});function Uw(e){return bb(Cw,e)}function Pw(e){return bb(Cw,{protocol:ug,hostname:ag,...Uf(e)})}const jw=af("ZodEmoji",(e,t)=>{vv.init(e,t),Sw.init(e,t)});function Rw(e){return $b(jw,e)}const Lw=af("ZodNanoID",(e,t)=>{yv.init(e,t),Sw.init(e,t)});function Zw(e){return kb(Lw,e)}const Mw=af("ZodCUID",(e,t)=>{_v.init(e,t),Sw.init(e,t)});function Fw(e){return wb(Mw,e)}const Bw=af("ZodCUID2",(e,t)=>{bv.init(e,t),Sw.init(e,t)});function Jw(e){return Sb(Bw,e)}const Vw=af("ZodULID",(e,t)=>{$v.init(e,t),Sw.init(e,t)});function Gw(e){return Ib(Vw,e)}const Ww=af("ZodXID",(e,t)=>{kv.init(e,t),Sw.init(e,t)});function Kw(e){return xb(Ww,e)}const qw=af("ZodKSUID",(e,t)=>{wv.init(e,t),Sw.init(e,t)});function Hw(e){return Eb(qw,e)}const Qw=af("ZodIPv4",(e,t)=>{Ov.init(e,t),Sw.init(e,t)});function Yw(e){return Ob(Qw,e)}const Xw=af("ZodMAC",(e,t)=>{zv.init(e,t),Sw.init(e,t)});function eS(e){return zb(Xw,e)}const tS=af("ZodIPv6",(e,t)=>{Nv.init(e,t),Sw.init(e,t)});function nS(e){return Nb(tS,e)}const iS=af("ZodCIDRv4",(e,t)=>{Tv.init(e,t),Sw.init(e,t)});function rS(e){return Tb(iS,e)}const oS=af("ZodCIDRv6",(e,t)=>{Dv.init(e,t),Sw.init(e,t)});function sS(e){return Db(oS,e)}const aS=af("ZodBase64",(e,t)=>{Cv.init(e,t),Sw.init(e,t)});function uS(e){return Ab(aS,e)}const cS=af("ZodBase64URL",(e,t)=>{Pv.init(e,t),Sw.init(e,t)});function lS(e){return Cb(cS,e)}const dS=af("ZodE164",(e,t)=>{jv.init(e,t),Sw.init(e,t)});function mS(e){return Ub(dS,e)}const pS=af("ZodJWT",(e,t)=>{Lv.init(e,t),Sw.init(e,t)});function fS(e){return Pb(pS,e)}const hS=af("ZodCustomStringFormat",(e,t)=>{Zv.init(e,t),Sw.init(e,t)});function gS(e,t,n={}){return q$(hS,e,t,n)}function vS(e){return q$(hS,"hostname",sg,e)}function yS(e){return q$(hS,"hex",Sg,e)}function _S(e,t){const n=`${e}_${t?.enc??"hex"}`,i=jg[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return q$(hS,n,i,t)}const bS=af("ZodNumber",(e,t)=>{Mv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>ok(e,t,n),_w(e,"ZodNumber",{gt(e,t){return this.check(p$(e,t))},gte(e,t){return this.check(f$(e,t))},min(e,t){return this.check(f$(e,t))},lt(e,t){return this.check(d$(e,t))},lte(e,t){return this.check(m$(e,t))},max(e,t){return this.check(m$(e,t))},int(e){return this.check(wS(e))},safe(e){return this.check(wS(e))},positive(e){return this.check(p$(0,e))},nonnegative(e){return this.check(f$(0,e))},negative(e){return this.check(d$(0,e))},nonpositive(e){return this.check(m$(0,e))},multipleOf(e,t){return this.check(_$(e,t))},step(e,t){return this.check(_$(e,t))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function $S(e){return Fb(bS,e)}const kS=af("ZodNumberFormat",(e,t)=>{Fv.init(e,t),bS.init(e,t)});function wS(e){return Jb(kS,e)}function SS(e){return Vb(kS,e)}function IS(e){return Gb(kS,e)}function xS(e){return Wb(kS,e)}function ES(e){return Kb(kS,e)}const OS=af("ZodBoolean",(e,t)=>{Bv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>sk(0,0,t)});function NS(e){return qb(OS,e)}const zS=af("ZodBigInt",(e,t)=>{Jv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ak(0,e),e.gte=(t,n)=>e.check(f$(t,n)),e.min=(t,n)=>e.check(f$(t,n)),e.gt=(t,n)=>e.check(p$(t,n)),e.gte=(t,n)=>e.check(f$(t,n)),e.min=(t,n)=>e.check(f$(t,n)),e.lt=(t,n)=>e.check(d$(t,n)),e.lte=(t,n)=>e.check(m$(t,n)),e.max=(t,n)=>e.check(m$(t,n)),e.positive=t=>e.check(p$(BigInt(0),t)),e.negative=t=>e.check(d$(BigInt(0),t)),e.nonpositive=t=>e.check(m$(BigInt(0),t)),e.nonnegative=t=>e.check(f$(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(_$(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function TS(e){return Qb(zS,e)}const DS=af("ZodBigIntFormat",(e,t)=>{Vv.init(e,t),zS.init(e,t)});function AS(e){return Xb(DS,e)}function CS(e){return e$(DS,e)}const US=af("ZodSymbol",(e,t)=>{Gv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>uk(0,e)});function PS(e){return t$(US,e)}const jS=af("ZodUndefined",(e,t)=>{Wv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>lk(0,e)});function RS(e){return n$(jS,e)}const LS=af("ZodNull",(e,t)=>{Kv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ck(0,e,t)});function ZS(e){return i$(LS,e)}const MS=af("ZodAny",(e,t)=>{qv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function FS(){return r$(MS)}const BS=af("ZodUnknown",(e,t)=>{Hv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function JS(){return o$(BS)}const VS=af("ZodNever",(e,t)=>{Qv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>mk(0,0,t)});function GS(e){return s$(VS,e)}const WS=af("ZodVoid",(e,t)=>{Yv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>dk(0,e)});function KS(e){return a$(WS,e)}const qS=af("ZodDate",(e,t)=>{Xv.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hk(0,e),e.min=(t,n)=>e.check(f$(t,n)),e.max=(t,n)=>e.check(m$(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function HS(e){return u$(qS,e)}const QS=af("ZodArray",(e,t)=>{ty.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ek(e,t,n,i),e.element=t.element,_w(e,"ZodArray",{min(e,t){return this.check(S$(e,t))},nonempty(e){return this.check(S$(1,e))},max(e,t){return this.check(w$(e,t))},length(e,t){return this.check(I$(e,t))},unwrap(){return this.element}})});function YS(e,t){return Z$(QS,e,t)}function XS(e){const t=e._zod.def.shape;return wI(Object.keys(t))}const eI=af("ZodObject",(e,t)=>{sy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ok(e,t,n,i),$f(e,"shape",()=>t.shape),_w(e,"ZodObject",{keyof(){return wI(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:JS()})},loose(){return this.clone({...this._zod.def,catchall:JS()})},strict(){return this.clone({...this._zod.def,catchall:GS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ff(this,e)},safeExtend(e){return Bf(this,e)},merge(e){return Jf(this,e)},pick(e){return Zf(this,e)},omit(e){return Mf(this,e)},partial(...e){return Vf(TI,this,e[0])},required(...e){return Gf(FI,this,e[0])}})});function tI(e,t){const n={type:"object",shape:e??{},...Uf(t)};return new eI(n)}function nI(e,t){return new eI({type:"object",shape:e,catchall:GS(),...Uf(t)})}function iI(e,t){return new eI({type:"object",shape:e,catchall:JS(),...Uf(t)})}const rI=af("ZodUnion",(e,t)=>{uy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Nk(e,t,n,i),e.options=t.options});function oI(e,t){return new rI({type:"union",options:e,...Uf(t)})}const sI=af("ZodXor",(e,t)=>{rI.init(e,t),ly.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Nk(e,t,n,i),e.options=t.options});function aI(e,t){return new sI({type:"union",options:e,inclusive:!1,...Uf(t)})}const uI=af("ZodDiscriminatedUnion",(e,t)=>{rI.init(e,t),dy.init(e,t)});function cI(e,t,n){return new uI({type:"union",options:t,discriminator:e,...Uf(n)})}const lI=af("ZodIntersection",(e,t)=>{my.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>zk(e,t,n,i)});function dI(e,t){return new lI({type:"intersection",left:e,right:t})}const mI=af("ZodTuple",(e,t)=>{hy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Tk(e,t,n,i),e.rest=t=>e.clone({...e._zod.def,rest:t})});function pI(e,t,n){const i=t instanceof lv;return new mI({type:"tuple",items:e,rest:i?t:null,...Uf(i?n:t)})}const fI=af("ZodRecord",(e,t)=>{_y.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Dk(e,t,n,i),e.keyType=t.keyType,e.valueType=t.valueType});function hI(e,t,n){return t&&t._zod?new fI({type:"record",keyType:e,valueType:t,...Uf(n)}):new fI({type:"record",keyType:ww(),valueType:e,...Uf(t)})}function gI(e,t,n){const i=Cf(e);return i._zod.values=void 0,new fI({type:"record",keyType:i,valueType:t,...Uf(n)})}function vI(e,t,n){return new fI({type:"record",keyType:e,valueType:t,mode:"loose",...Uf(n)})}const yI=af("ZodMap",(e,t)=>{by.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ik(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check($$(...t)),e.nonempty=t=>e.check($$(1,t)),e.max=(...t)=>e.check(b$(...t)),e.size=(...t)=>e.check(k$(...t))});function _I(e,t,n){return new yI({type:"map",keyType:e,valueType:t,...Uf(n)})}const bI=af("ZodSet",(e,t)=>{ky.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>xk(0,e),e.min=(...t)=>e.check($$(...t)),e.nonempty=t=>e.check($$(1,t)),e.max=(...t)=>e.check(b$(...t)),e.size=(...t)=>e.check(k$(...t))});function $I(e,t){return new bI({type:"set",valueType:e,...Uf(t)})}const kI=af("ZodEnum",(e,t)=>{Sy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>gk(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const r={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);r[i]=t.entries[i]}return new kI({...t,checks:[],...Uf(i),entries:r})},e.exclude=(e,i)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new kI({...t,checks:[],...Uf(i),entries:r})}});function wI(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new kI({type:"enum",entries:n,...Uf(t)})}function SI(e,t){return new kI({type:"enum",entries:e,...Uf(t)})}const II=af("ZodLiteral",(e,t)=>{Iy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>vk(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xI(e,t){return new II({type:"literal",values:Array.isArray(e)?e:[e],...Uf(t)})}const EI=af("ZodFile",(e,t)=>{xy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>bk(e,0,n),e.min=(t,n)=>e.check($$(t,n)),e.max=(t,n)=>e.check(b$(t,n)),e.mime=(t,n)=>e.check(A$(Array.isArray(t)?t:[t],n))});function OI(e){return M$(EI,e)}const NI=af("ZodTransform",(e,t)=>{Ey.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Sk(0,e),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new lf(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(th(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(th(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function zI(e){return new NI({type:"transform",transform:e})}const TI=af("ZodOptional",(e,t)=>{Ny.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Mk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function DI(e){return new TI({type:"optional",innerType:e})}const AI=af("ZodExactOptional",(e,t)=>{zy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Mk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function CI(e){return new AI({type:"optional",innerType:e})}const UI=af("ZodNullable",(e,t)=>{Ty.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ak(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function PI(e){return new UI({type:"nullable",innerType:e})}function jI(e){return DI(PI(e))}const RI=af("ZodDefault",(e,t)=>{Dy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Uk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function LI(e,t){return new RI({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():zf(t)}})}const ZI=af("ZodPrefault",(e,t)=>{Cy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Pk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function MI(e,t){return new ZI({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():zf(t)}})}const FI=af("ZodNonOptional",(e,t)=>{Uy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Ck(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function BI(e,t){return new FI({type:"nonoptional",innerType:e,...Uf(t)})}const JI=af("ZodSuccess",(e,t)=>{jy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>$k(0,0,t),e.unwrap=()=>e._zod.def.innerType});function VI(e){return new JI({type:"success",innerType:e})}const GI=af("ZodCatch",(e,t)=>{Ry.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>jk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function WI(e,t){return new GI({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const KI=af("ZodNaN",(e,t)=>{Ly.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>yk(0,e)});function qI(e){return l$(KI,e)}const HI=af("ZodPipe",(e,t)=>{Zy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Rk(e,t,0,i),e.in=t.in,e.out=t.out});function QI(e,t){return new HI({type:"pipe",in:e,out:t})}const YI=af("ZodCodec",(e,t)=>{HI.init(e,t),Fy.init(e,t)});function XI(e,t,n){return new YI({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function ex(e){const t=e._zod.def;return new YI({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const tx=af("ZodPreprocess",(e,t)=>{HI.init(e,t),Vy.init(e,t)}),nx=af("ZodReadonly",(e,t)=>{Gy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Lk(e,t,n,i),e.unwrap=()=>e._zod.def.innerType});function ix(e){return new nx({type:"readonly",innerType:e})}const rx=af("ZodTemplateLiteral",(e,t)=>{Ky.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>_k(e,0,n)});function ox(e,t){return new rx({type:"template_literal",parts:e,...Uf(t)})}const sx=af("ZodLazy",(e,t)=>{Qy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Fk(e,t,0,i),e.unwrap=()=>e._zod.def.getter()});function ax(e){return new sx({type:"lazy",getter:e})}const ux=af("ZodPromise",(e,t)=>{Hy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(t,n,i)=>Zk(e,t,0,i),e.unwrap=()=>e._zod.def.innerType});function cx(e){return new ux({type:"promise",innerType:e})}const lx=af("ZodFunction",(e,t)=>{qy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>wk(0,e)});function dx(e){return new lx({type:"function",input:Array.isArray(e?.input)?pI(e?.input):e?.input??YS(JS()),output:e?.output??JS()})}const mx=af("ZodCustom",(e,t)=>{Yy.init(e,t),bw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>kk(0,e)});function px(e){const t=new Rg({check:"custom"});return t._zod.check=e,t}function fx(e,t){return F$(mx,e??(()=>!0),t)}function hx(e,t={}){return B$(mx,e,t)}function gx(e,t){return J$(e,t)}const vx=G$,yx=W$;function _x(e,t={}){const n=new mx({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...Uf(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const bx=(...e)=>K$({Codec:YI,Boolean:OS,String:kw},...e);function $x(e){const t=ax(()=>oI([ww(e),$S(),NS(),ZS(),YS(t),hI(ww(),t)]));return t}function kx(e,t){return new tx({type:"pipe",in:zI(e),out:t})}var wx;wx||(wx={});const Sx={...Object.freeze({__proto__:null,ZodAny:MS,ZodArray:QS,ZodBase64:aS,ZodBase64URL:cS,ZodBigInt:zS,ZodBigIntFormat:DS,ZodBoolean:OS,ZodCIDRv4:iS,ZodCIDRv6:oS,ZodCUID:Mw,ZodCUID2:Bw,ZodCatch:GI,ZodCodec:YI,ZodCustom:mx,ZodCustomStringFormat:hS,ZodDate:qS,ZodDefault:RI,ZodDiscriminatedUnion:uI,ZodE164:dS,ZodEmail:Iw,ZodEmoji:jw,ZodEnum:kI,ZodExactOptional:AI,ZodFile:EI,ZodFunction:lx,ZodGUID:Ew,ZodIPv4:Qw,ZodIPv6:tS,ZodIntersection:lI,ZodJWT:pS,ZodKSUID:qw,ZodLazy:sx,ZodLiteral:II,ZodMAC:Xw,ZodMap:yI,ZodNaN:KI,ZodNanoID:Lw,ZodNever:VS,ZodNonOptional:FI,ZodNull:LS,ZodNullable:UI,ZodNumber:bS,ZodNumberFormat:kS,ZodObject:eI,ZodOptional:TI,ZodPipe:HI,ZodPrefault:ZI,ZodPreprocess:tx,ZodPromise:ux,ZodReadonly:nx,ZodRecord:fI,ZodSet:bI,ZodString:kw,ZodStringFormat:Sw,ZodSuccess:JI,ZodSymbol:US,ZodTemplateLiteral:rx,ZodTransform:NI,ZodTuple:mI,ZodType:bw,ZodULID:Vw,ZodURL:Cw,ZodUUID:Nw,ZodUndefined:jS,ZodUnion:rI,ZodUnknown:BS,ZodVoid:WS,ZodXID:Ww,ZodXor:sI,_ZodString:$w,_default:LI,_function:dx,any:FS,array:YS,base64:uS,base64url:lS,bigint:TS,boolean:NS,catch:WI,check:px,cidrv4:rS,cidrv6:sS,codec:XI,cuid:Fw,cuid2:Jw,custom:fx,date:HS,describe:vx,discriminatedUnion:cI,e164:mS,email:xw,emoji:Rw,enum:wI,exactOptional:CI,file:OI,float32:SS,float64:IS,function:dx,guid:Ow,hash:_S,hex:yS,hostname:vS,httpUrl:Pw,instanceof:_x,int:wS,int32:xS,int64:AS,intersection:dI,invertCodec:ex,ipv4:Yw,ipv6:nS,json:$x,jwt:fS,keyof:XS,ksuid:Hw,lazy:ax,literal:xI,looseObject:iI,looseRecord:vI,mac:eS,map:_I,meta:yx,nan:qI,nanoid:Zw,nativeEnum:SI,never:GS,nonoptional:BI,null:ZS,nullable:PI,nullish:jI,number:$S,object:tI,optional:DI,partialRecord:gI,pipe:QI,prefault:MI,preprocess:kx,promise:cx,readonly:ix,record:hI,refine:hx,set:$I,strictObject:nI,string:ww,stringFormat:gS,stringbool:bx,success:VI,superRefine:gx,symbol:PS,templateLiteral:ox,transform:zI,tuple:pI,uint32:ES,uint64:CS,ulid:Gw,undefined:RS,union:oI,unknown:JS,url:Uw,uuid:zw,uuidv4:Tw,uuidv6:Dw,uuidv7:Aw,void:KS,xid:Kw,xor:aI}),...Wk,iso:nw},Ix=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function xx(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return Sx.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Sx.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const i=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const i="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===i){const i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}(n,t),r=Ex(i,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return Sx.null();if(0===n.length)return Sx.never();if(1===n.length)return Sx.literal(n[0]);if(n.every(e=>"string"==typeof e))return Sx.enum(n);const i=n.map(e=>Sx.literal(e));return i.length<2?i[0]:Sx.union([i[0],i[1],...i.slice(2)])}if(void 0!==e.const)return Sx.literal(e.const);const n=e.type;if(Array.isArray(n)){const i=n.map(n=>xx({...e,type:n},t));return 0===i.length?Sx.never():1===i.length?i[0]:Sx.union(i)}if(!n)return Sx.any();let i;switch(n){case"string":{let t=Sx.string();if(e.format){const n=e.format;"email"===n?t=t.check(Sx.email()):"uri"===n||"uri-reference"===n?t=t.check(Sx.url()):"uuid"===n||"guid"===n?t=t.check(Sx.uuid()):"date-time"===n?t=t.check(Sx.iso.datetime()):"date"===n?t=t.check(Sx.iso.date()):"time"===n?t=t.check(Sx.iso.time()):"duration"===n?t=t.check(Sx.iso.duration()):"ipv4"===n?t=t.check(Sx.ipv4()):"ipv6"===n?t=t.check(Sx.ipv6()):"mac"===n?t=t.check(Sx.mac()):"cidr"===n?t=t.check(Sx.cidrv4()):"cidr-v6"===n?t=t.check(Sx.cidrv6()):"base64"===n?t=t.check(Sx.base64()):"base64url"===n?t=t.check(Sx.base64url()):"e164"===n?t=t.check(Sx.e164()):"jwt"===n?t=t.check(Sx.jwt()):"emoji"===n?t=t.check(Sx.emoji()):"nanoid"===n?t=t.check(Sx.nanoid()):"cuid"===n?t=t.check(Sx.cuid()):"cuid2"===n?t=t.check(Sx.cuid2()):"ulid"===n?t=t.check(Sx.ulid()):"xid"===n?t=t.check(Sx.xid()):"ksuid"===n&&(t=t.check(Sx.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t="integer"===n?Sx.number().int():Sx.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":i=Sx.boolean();break;case"null":i=Sx.null();break;case"object":{const n={},r=e.properties||{},o=new Set(e.required||[]);for(const[e,i]of Object.entries(r)){const r=Ex(i,t);n[e]=o.has(e)?r:r.optional()}if(e.propertyNames){const r=Ex(e.propertyNames,t),o=e.additionalProperties&&"object"==typeof e.additionalProperties?Ex(e.additionalProperties,t):Sx.any();if(0===Object.keys(n).length){i=Sx.record(r,o);break}const s=Sx.object(n).passthrough(),a=Sx.looseRecord(r,o);i=Sx.intersection(s,a);break}if(e.patternProperties){const r=e.patternProperties,o=Object.keys(r),s=[];for(const e of o){const n=Ex(r[e],t),i=Sx.string().regex(new RegExp(e));s.push(Sx.looseRecord(i,n))}const a=[];if(Object.keys(n).length>0&&a.push(Sx.object(n).passthrough()),a.push(...s),0===a.length)i=Sx.object({}).passthrough();else if(1===a.length)i=a[0];else{let e=Sx.intersection(a[0],a[1]);for(let t=2;t<a.length;t++)e=Sx.intersection(e,a[t]);i=e}break}const s=Sx.object(n);i=!1===e.additionalProperties?s.strict():"object"==typeof e.additionalProperties?s.catchall(Ex(e.additionalProperties,t)):s.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const o=n.map(e=>Ex(e,t)),s=r&&"object"==typeof r&&!Array.isArray(r)?Ex(r,t):void 0;i=s?Sx.tuple(o).rest(s):Sx.tuple(o),"number"==typeof e.minItems&&(i=i.check(Sx.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(Sx.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>Ex(e,t)),o=e.additionalItems&&"object"==typeof e.additionalItems?Ex(e.additionalItems,t):void 0;i=o?Sx.tuple(n).rest(o):Sx.tuple(n),"number"==typeof e.minItems&&(i=i.check(Sx.minLength(e.minItems))),"number"==typeof e.maxItems&&(i=i.check(Sx.maxLength(e.maxItems)))}else if(void 0!==r){const n=Ex(r,t);let o=Sx.array(n);"number"==typeof e.minItems&&(o=o.min(e.minItems)),"number"==typeof e.maxItems&&(o=o.max(e.maxItems)),i=o}else i=Sx.array(Sx.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function Ex(e,t){if("boolean"==typeof e)return e?Sx.any():Sx.never();let n=xx(e,t);const i=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>Ex(e,t)),o=Sx.union(r);n=i?Sx.intersection(n,o):o}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>Ex(e,t)),o=Sx.xor(r);n=i?Sx.intersection(n,o):o}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=i?n:Sx.any();else{let r=i?n:Ex(e.allOf[0],t);for(let n=i?0:1;n<e.allOf.length;n++)r=Sx.intersection(r,Ex(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=Sx.nullable(n)),!0===e.readOnly&&(n=Sx.readonly(n)),void 0!==e.default&&(n=n.default(e.default));const r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of o)t in e&&(r[t]=e[t]);const s=["contentEncoding","contentMediaType","contentSchema"];for(const t of s)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))Ix.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function Ox(e){return pb(kw,e)}var Nx=Object.freeze({__proto__:null,bigint:function(e){return Yb(zS,e)},boolean:function(e){return Hb(OS,e)},date:function(e){return c$(qS,e)},number:function(e){return Bb(bS,e)},string:Ox});mf(d_());var zx=Object.freeze({__proto__:null,$brand:uf,$input:ub,$output:ab,NEVER:sf,TimePrecision:jb,ZodAny:MS,ZodArray:QS,ZodBase64:aS,ZodBase64URL:cS,ZodBigInt:zS,ZodBigIntFormat:DS,ZodBoolean:OS,ZodCIDRv4:iS,ZodCIDRv6:oS,ZodCUID:Mw,ZodCUID2:Bw,ZodCatch:GI,ZodCodec:YI,ZodCustom:mx,ZodCustomStringFormat:hS,ZodDate:qS,ZodDefault:RI,ZodDiscriminatedUnion:uI,ZodE164:dS,ZodEmail:Iw,ZodEmoji:jw,ZodEnum:kI,ZodError:rw,ZodExactOptional:AI,ZodFile:EI,get ZodFirstPartyTypeKind(){return wx},ZodFunction:lx,ZodGUID:Ew,ZodIPv4:Qw,ZodIPv6:tS,ZodISODate:Hk,ZodISODateTime:Kk,ZodISODuration:ew,ZodISOTime:Yk,ZodIntersection:lI,ZodIssueCode:{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"},ZodJWT:pS,ZodKSUID:qw,ZodLazy:sx,ZodLiteral:II,ZodMAC:Xw,ZodMap:yI,ZodNaN:KI,ZodNanoID:Lw,ZodNever:VS,ZodNonOptional:FI,ZodNull:LS,ZodNullable:UI,ZodNumber:bS,ZodNumberFormat:kS,ZodObject:eI,ZodOptional:TI,ZodPipe:HI,ZodPrefault:ZI,ZodPreprocess:tx,ZodPromise:ux,ZodReadonly:nx,ZodRealError:ow,ZodRecord:fI,ZodSet:bI,ZodString:kw,ZodStringFormat:Sw,ZodSuccess:JI,ZodSymbol:US,ZodTemplateLiteral:rx,ZodTransform:NI,ZodTuple:mI,ZodType:bw,ZodULID:Vw,ZodURL:Cw,ZodUUID:Nw,ZodUndefined:jS,ZodUnion:rI,ZodUnknown:BS,ZodVoid:WS,ZodXID:Ww,ZodXor:sI,_ZodString:$w,_default:LI,_function:dx,any:FS,array:YS,base64:uS,base64url:lS,bigint:TS,boolean:NS,catch:WI,check:px,cidrv4:rS,cidrv6:sS,clone:Cf,codec:XI,coerce:Nx,config:mf,core:Gk,cuid:Fw,cuid2:Jw,custom:fx,date:HS,decode:dw,decodeAsync:pw,describe:vx,discriminatedUnion:cI,e164:mS,email:xw,emoji:Rw,encode:lw,encodeAsync:mw,endsWith:T$,enum:wI,exactOptional:CI,file:OI,flattenError:uh,float32:SS,float64:IS,formatError:ch,fromJSONSchema:function(e,t){if("boolean"==typeof e)return e?Sx.any():Sx.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}const i=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(n,t?.defaultTarget);return Ex(n,{version:i,defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??db})},function:dx,getErrorMap:function(){return mf().customError},globalRegistry:db,gt:p$,gte:f$,guid:Ow,hash:_S,hex:yS,hostname:vS,httpUrl:Pw,includes:N$,instanceof:_x,int:wS,int32:xS,int64:AS,intersection:dI,invertCodec:ex,ipv4:Yw,ipv6:nS,iso:nw,json:$x,jwt:fS,keyof:XS,ksuid:Hw,lazy:ax,length:I$,literal:xI,locales:sb,looseObject:iI,looseRecord:vI,lowercase:E$,lt:d$,lte:m$,mac:eS,map:_I,maxLength:w$,maxSize:b$,meta:yx,mime:A$,minLength:S$,minSize:$$,multipleOf:_$,nan:qI,nanoid:Zw,nativeEnum:SI,negative:g$,never:GS,nonnegative:y$,nonoptional:BI,nonpositive:v$,normalize:U$,null:ZS,nullable:PI,nullish:jI,number:$S,object:tI,optional:DI,overwrite:C$,parse:sw,parseAsync:aw,partialRecord:gI,pipe:QI,positive:h$,prefault:MI,preprocess:kx,prettifyError:mh,promise:cx,property:D$,readonly:ix,record:hI,refine:hx,regex:x$,regexes:jg,registry:lb,safeDecode:hw,safeDecodeAsync:vw,safeEncode:fw,safeEncodeAsync:gw,safeParse:uw,safeParseAsync:cw,set:$I,setErrorMap:function(e){mf({customError:e})},size:k$,slugify:L$,startsWith:z$,strictObject:nI,string:ww,stringFormat:gS,stringbool:bx,success:VI,superRefine:gx,symbol:PS,templateLiteral:ox,toJSONSchema:Jk,toLowerCase:j$,toUpperCase:R$,transform:zI,treeifyError:lh,trim:P$,tuple:pI,uint32:ES,uint64:CS,ulid:Gw,undefined:RS,union:oI,unknown:JS,uppercase:O$,url:Uw,util:rh,uuid:zw,uuidv4:Tw,uuidv6:Dw,uuidv7:Aw,void:KS,xid:Kw,xor:aI});rc({app:fu(),api:fu()});const Tx=rc({request:Sc(rc({urls:nc(fu()),methods:nc(sc([_c("GET"),_c("POST"),_c("PATCH"),_c("PUT"),_c("DELETE")]))})),log:Sc(rc({})),sleep:Sc(rc({}))});Sc(rc({enabled:Mu(),requestedScopes:Tx}));const Dx=fu(),Ax=fu().meta({$ref:"FamilyName"}),Cx=fu().meta({$ref:"FontWeight"}),Ux=fu(),Px=fu(),jx=fu(),Rx=fu(),Lx=fu(),Zx=sc([fu(),_c("thin"),_c("medium"),_c("thick")]),Mx=rc({columnGap:sc([Ux,Px]).optional(),rowGap:sc([Ux,Px]).optional(),field:rc({label:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),input:rc({background:Dx.optional(),backgroundSubdued:Dx.optional(),foreground:Dx.optional(),foregroundSubdued:Dx.optional(),borderColor:Dx.optional(),borderColorHover:Dx.optional(),focusRingColor:Dx.optional(),boxShadow:jx.optional(),height:Lx.optional(),padding:sc([Ux,Px]).optional()}).optional()}).optional()}).optional(),Fx=rc({borderRadius:sc([Ux,Px]).optional(),borderWidth:Zx.optional(),foreground:Dx.optional(),foregroundSubdued:Dx.optional(),foregroundAccent:Dx.optional(),background:Dx.optional(),backgroundNormal:Dx.optional(),backgroundAccent:Dx.optional(),backgroundSubdued:Dx.optional(),borderColor:Dx.optional(),borderColorAccent:Dx.optional(),borderColorSubdued:Dx.optional(),primary:Dx.optional(),primaryBackground:Dx.optional(),primarySubdued:Dx.optional(),primaryAccent:Dx.optional(),secondary:Dx.optional(),secondaryBackground:Dx.optional(),secondarySubdued:Dx.optional(),secondaryAccent:Dx.optional(),success:Dx.optional(),successBackground:Dx.optional(),successSubdued:Dx.optional(),successAccent:Dx.optional(),warning:Dx.optional(),warningBackground:Dx.optional(),warningSubdued:Dx.optional(),warningAccent:Dx.optional(),danger:Dx.optional(),dangerBackground:Dx.optional(),dangerSubdued:Dx.optional(),dangerAccent:Dx.optional(),fonts:rc({display:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),title:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),sans:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),serif:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),monospace:rc({fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional()}).optional(),shell:rc({background:Dx.optional(),backgroundAccent:Dx.optional(),borderWidth:Zx.optional(),borderColor:Dx.optional()}).optional(),navigation:rc({project:rc({foreground:Dx.optional(),fontFamily:Ax.optional()}).optional(),modules:rc({background:Dx.optional(),borderWidth:Zx.optional(),borderColor:Dx.optional(),button:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional()}).optional()}).optional(),list:rc({icon:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional()}).optional(),foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional(),fontFamily:Ax.optional(),divider:rc({borderColor:Dx.optional(),borderWidth:Zx.optional()})}).optional()}).optional(),header:rc({title:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional()}).optional(),form:Mx,sidebar:rc({background:Dx.optional(),foreground:Dx.optional(),fontFamily:Ax.optional(),borderWidth:Zx.optional(),borderColor:Dx.optional(),section:rc({borderWidth:Zx.optional(),borderColor:Dx.optional(),active:rc({borderWidth:Zx.optional(),borderColor:Dx.optional()}).optional(),toggle:rc({icon:rc({foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional()}).optional(),foreground:Dx.optional(),foregroundHover:Dx.optional(),foregroundActive:Dx.optional(),background:Dx.optional(),backgroundHover:Dx.optional(),backgroundActive:Dx.optional(),fontFamily:Ax.optional()}).optional(),form:Mx}).optional()}).optional(),public:rc({background:Dx.optional(),foreground:Dx.optional(),foregroundAccent:Dx.optional(),art:rc({background:Dx.optional(),primary:Dx.optional(),secondary:Dx.optional(),speed:Rx.optional()}).optional(),form:Mx}).optional(),popover:rc({menu:rc({background:Dx.optional(),borderRadius:sc([Ux,Px]).optional(),boxShadow:jx.optional()}).optional()}).optional(),banner:rc({background:Dx.optional(),padding:sc([Ux,Px]).optional(),borderRadius:sc([Ux,Px]).optional(),avatar:rc({background:Dx.optional(),foreground:Dx.optional(),borderRadius:sc([Ux,Px]).optional()}).optional(),headline:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),title:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),subtitle:rc({foreground:Dx.optional(),fontFamily:Ax.optional(),fontWeight:Cx.optional()}).optional(),art:rc({foreground:Dx.optional()}).optional()}).optional()});rc({id:fu(),name:fu(),appearance:sc([_c("light"),_c("dark")]),rules:Fx});const Bx=sc([fu(),ju()]);rc({type:fu(),uid:Bx.optional()}).passthrough();const Jx="collab",Vx={JOIN:"join",LEAVE:"leave",UPDATE:"update",UPDATE_ALL:"updateAll",FOCUS:"focus",DISCARD:"discard"},Gx=Xc.object({type:Xc.literal(Jx),room:Xc.string()});Xc.discriminatedUnion("action",[Xc.object({type:Xc.literal(Jx),action:Xc.literal(Vx.JOIN),collection:Xc.string(),item:Xc.union([Xc.string(),Xc.number()]).nullable(),version:Xc.string().nullable(),color:Xc.enum(["purple","pink","blue","green","yellow","orange","red"]).nullable().optional(),initialChanges:Xc.record(Xc.string(),Xc.any()).optional()}),Gx.extend({action:Xc.literal(Vx.LEAVE)}),Gx.extend({action:Xc.literal(Vx.UPDATE),field:Xc.string(),changes:Xc.unknown().optional()}),Gx.extend({action:Xc.literal(Vx.UPDATE_ALL),changes:Xc.record(Xc.string(),Xc.any()).optional()}),Gx.extend({action:Xc.literal(Vx.FOCUS),field:Xc.string().nullable()}),Gx.extend({action:Xc.literal(Vx.DISCARD)})]);const Wx=e=>{const t=e??3e4;if(!function(e){return function(e){return"number"==typeof e}(e)&&Number.isFinite(e)}(t)||t<=0)throw new RangeError("Lock leaseMs must be a finite positive number");return t},Kx=()=>function(e,t=Il){return void 0===e?bl():yl(e,t)}(),qx=new Map;const Hx=Symbol("extension-options-builder"),Qx=Symbol("extension-options-config");function Yx(e){const t=Object.freeze([...e.dependencies??[]]);return Object.freeze({[Qx]:Object.freeze({dependencies:t,name:e.name,refine:e.refine,shape:e.shape})})}const Xx=e=>e.string().trim().min(1),eE=e=>Xx(e).refine(e=>{try{const t=new URL(e);return"redis:"===t.protocol||"rediss:"===t.protocol}catch{return!1}},"must be a valid redis:// or rediss:// URL"),tE=eE(zx),nE=e=>{const t=Xx(e),n=t.refine(e=>!/\s/u.test(e),"must not contain whitespace"),i=e.coerce.number().int().min(1).max(65535);return{REDIS_ENABLED:e.boolean().default(!1),REDIS:eE(e).optional(),REDIS_HOST:n.optional(),REDIS_PORT:i.optional(),REDIS_USERNAME:t.optional(),REDIS_PASSWORD:t.optional()}},iE=tI(nE(zx)),rE=Yx({name:"redisConfig",shape:nE});const oE=e=>({CACHE_ENABLED:e.boolean().default(!1),CACHE_STORE:e.enum(["memory","redis"]).optional()}),sE=(e,t)=>{const n=[e.REDIS_HOST,e.REDIS_PORT,e.REDIS_USERNAME,e.REDIS_PASSWORD],i=n.some(e=>void 0!==e),r=n.every(e=>void 0!==e);i&&!r&&t.addIssue({code:"custom",path:["REDIS_HOST"],message:"REDIS_HOST, REDIS_PORT, REDIS_USERNAME, and REDIS_PASSWORD are required together"}),!e.REDIS_ENABLED||e.REDIS||r||t.addIssue({code:"custom",path:["REDIS"],message:"REDIS or all Redis component values are required when REDIS_ENABLED is true"}),"redis"!==e.CACHE_STORE||e.REDIS||r||t.addIssue({code:"custom",path:["CACHE_STORE"],message:"Redis configuration is required when CACHE_STORE is redis"}),"redis"!==e.CACHE_STORE||e.REDIS||e.REDIS_ENABLED||t.addIssue({code:"custom",path:["REDIS_ENABLED"],message:"must be true when CACHE_STORE is redis and REDIS is not supplied"})};tI(oE(zx)).extend(iE.shape).superRefine(sE),Yx({dependencies:[rE],name:"cacheConfig",refine:sE,shape:oE});const aE=ww().trim().min(1),uE=e=>({DIRECTUS_EXTENSIONS_AI_PROVIDER:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_AI_MODEL:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_AI_API_KEY:e.preprocess(e=>"string"==typeof e&&""===e.trim()?void 0:e,e.string().trim().min(1).optional()),DIRECTUS_EXTENSIONS_AI_BASE_URL:e.url().optional()});tI({ai_openai_api_key:aE.nullish(),ai_anthropic_api_key:aE.nullish(),ai_google_api_key:aE.nullish(),ai_openai_compatible_api_key:aE.nullish(),ai_openai_compatible_base_url:Uw().nullish()}),tI(uE(zx)),tI({provider:aE,model:aE,apiKey:aE,baseURL:Uw().optional()}),Yx({name:"aiConfig",shape:uE});const cE=e=>{const t=e.string().trim().min(1),n=e.coerce.number().int().min(1).max(65535);return{EMAIL_VERIFY_SETUP:e.boolean().default(!0),EMAIL_TRANSPORT:e.enum(["sendmail","smtp","mailgun","ses"]).default("sendmail"),EMAIL_FROM:t.default("no-reply@example.com"),EMAIL_TEMPLATES_PATH:t.default("./templates"),EMAIL_SENDMAIL_NEW_LINE:e.enum(["unix","windows"]).default("unix"),EMAIL_SENDMAIL_PATH:t.default("/usr/sbin/sendmail"),EMAIL_SMTP_HOST:t.optional(),EMAIL_SMTP_PORT:n.optional(),EMAIL_SMTP_USER:t.optional(),EMAIL_SMTP_PASSWORD:t.optional(),EMAIL_SMTP_POOL:e.boolean().optional(),EMAIL_SMTP_SECURE:e.boolean().optional(),EMAIL_SMTP_IGNORE_TLS:e.boolean().optional(),EMAIL_SMTP_NAME:t.optional(),EMAIL_MAILGUN_API_KEY:t.optional(),EMAIL_MAILGUN_DOMAIN:t.optional(),EMAIL_MAILGUN_HOST:t.default("api.mailgun.net"),EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID:t.optional(),EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY:t.optional(),EMAIL_SES_REGION:t.optional()}},lE=(e,t)=>{if("smtp"===e.EMAIL_TRANSPORT&&(e.EMAIL_SMTP_HOST||t.addIssue({code:"custom",path:["EMAIL_SMTP_HOST"],message:"is required for smtp"})),"mailgun"===e.EMAIL_TRANSPORT)for(const n of["EMAIL_MAILGUN_API_KEY","EMAIL_MAILGUN_DOMAIN"])e[n]||t.addIssue({code:"custom",path:[n],message:"is required for mailgun"});if("ses"===e.EMAIL_TRANSPORT)for(const n of["EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID","EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY","EMAIL_SES_REGION"])e[n]||t.addIssue({code:"custom",path:[n],message:"is required for ses"})};tI(cE(zx)).superRefine(lE);const dE=Yx({name:"emailConfig",shape:cE});Yx({dependencies:[dE],name:"requiredEmailConfig",refine:lE,shape:()=>({})});const mE=e=>e.enum(["memory","redis"]),pE=e=>({SYNCHRONIZATION_STORE:mE(e).default("memory")});mE(zx);const fE=tI(pE(zx)).extend(iE.shape),hE=Yx({dependencies:[rE],name:"synchronizationConfig",shape:pE}),gE=e=>e.enum(["memory","redis","fs"]),vE=e=>e.enum(["memory","redis"]);gE(zx),vE(zx);const yE=e=>({DIRECTUS_EXTENSION_ID:e.string().optional(),DIRECTUS_EXTENSIONS_SCHEMA_CHANGES_ENABLED:e.boolean().default(!0),DIRECTUS_EXTENSIONS_DATA_SEED_ENABLED:e.boolean().default(!0),DIRECTUS_EXTENSIONS_LOCK_PROVIDER:gE(e).optional(),DIRECTUS_EXTENSIONS_LOCK_REDIS_URL:tE.optional(),DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY:e.string().trim().min(1).optional(),DIRECTUS_EXTENSIONS_RATE_LIMITER_STORE:vE(e).optional()}),_E=(e,t)=>{let n;try{n=function(e,t="memory"){if(e.REDIS?.trim())return e.REDIS.trim();if(!e.REDIS_ENABLED&&"redis"!==t)return;if([e.REDIS_HOST,e.REDIS_PORT,e.REDIS_USERNAME,e.REDIS_PASSWORD].some(e=>void 0===e))throw new Error("REDIS_HOST, REDIS_PORT, REDIS_USERNAME, and REDIS_PASSWORD are required to construct a Redis connection");const{REDIS_HOST:n,REDIS_PORT:i,REDIS_USERNAME:r,REDIS_PASSWORD:o}=e;if(void 0===n||void 0===i||void 0===r||void 0===o)throw new Error("Redis components are incomplete");return`redis://${encodeURIComponent(r)}:${encodeURIComponent(o)}@${n}:${i}`}({REDIS:"string"==typeof e.REDIS?e.REDIS:void 0,REDIS_ENABLED:!0===e.REDIS_ENABLED,REDIS_HOST:"string"==typeof e.REDIS_HOST?e.REDIS_HOST:void 0,REDIS_PASSWORD:"string"==typeof e.REDIS_PASSWORD?e.REDIS_PASSWORD:void 0,REDIS_PORT:"number"==typeof e.REDIS_PORT?e.REDIS_PORT:void 0,REDIS_USERNAME:"string"==typeof e.REDIS_USERNAME?e.REDIS_USERNAME:void 0},"redis"===e.SYNCHRONIZATION_STORE?"redis":"memory")}catch{n=void 0}"redis"!==(e.DIRECTUS_EXTENSIONS_LOCK_PROVIDER??e.SYNCHRONIZATION_STORE)||e.DIRECTUS_EXTENSIONS_LOCK_REDIS_URL||n||t.addIssue({code:"custom",path:["DIRECTUS_EXTENSIONS_LOCK_REDIS_URL"],message:"DIRECTUS_EXTENSIONS_LOCK_REDIS_URL or resolved Redis configuration is required when DIRECTUS_EXTENSIONS_LOCK_PROVIDER is redis"}),"fs"!==e.DIRECTUS_EXTENSIONS_LOCK_PROVIDER||e.DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY||t.addIssue({code:"custom",path:["DIRECTUS_EXTENSIONS_LOCK_FS_DIRECTORY"],message:"is required when DIRECTUS_EXTENSIONS_LOCK_PROVIDER is fs"}),"redis"!==(e.DIRECTUS_EXTENSIONS_RATE_LIMITER_STORE??e.SYNCHRONIZATION_STORE)||n||t.addIssue({code:"custom",path:["REDIS"],message:"Redis configuration is required when the effective rate limiter store is redis"})};tI({...yE(zx),...fE.shape}).superRefine(_E),Yx({dependencies:[hE],name:"directusStartupConfig",refine:_E,shape:yE}),function(e={}){const t=(e=>{if(void 0!==e.now&&!Sl(e.now))throw new TypeError("Lock now must be a function");if(void 0!==e.tokenFactory&&!Sl(e.tokenFactory))throw new TypeError("Lock tokenFactory must be a function");const t=e.providerId?.trim()??"default";if(!wl(t))throw new TypeError("Lock providerId must not be blank");return void 0!==e.defaultLeaseMs&&Wx(e.defaultLeaseMs),{defaultLeaseMs:e.defaultLeaseMs,now:e.now??Date.now,providerId:t,tokenFactory:e.tokenFactory??Kx}})(e),n=qx.get(t.providerId)??new Map;qx.set(t.providerId,n)}();const bE=wI(["create","read","update","delete","share"]),$E=tI({collection:ww().trim().min(1),action:bE,permissions:fx(e=>null===e||$l(e),{message:"Expected a permission filter object or null"}).nullable().default(null),validation:fx(e=>null===e||$l(e),{message:"Expected a validation filter object or null"}).nullable().default(null),presets:fx(e=>null===e||$l(e),{message:"Expected presets or null"}).nullable().default(null),fields:YS(ww()).nullable().default(null)}),kE=tI({id:ww().trim().min(1),name:ww().trim().min(1),icon:ww(),description:ww().nullable(),enforce_tfa:NS().nullable(),ip_access:YS(ww()).nullable(),app_access:NS(),admin_access:NS(),permissions:YS($E)});tI({policies:YS(kE)});const wE=iI({field:ww(),type:fx(kl),collection:ww().optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()}),SE=iI({collection:ww(),fields:YS(wE).optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()}),IE=iI({collection:ww().optional(),field:ww().optional(),related_collection:ww().nullable().optional(),schema:fx($l).nullable().optional(),meta:fx($l).nullable().optional()});function xE(e,t,n){const i=function(e){return Hx in e?e[Hx](zx):e}(t).safeParse(e);if(i.success)return i.data;throw n.info(i.error instanceof rw?mh(i.error):String(i.error)),new Error("Invalid extension options ☝. Exiting.")}tI({collections:YS(SE),fields:YS(wE),relations:YS(IE)}),tI({id:zw(),navigation_label:ww().trim().min(1),body:ww(),icon:ww().trim().min(1).nullable().default(null),archived:NS().default(!1)});const EE={INSERT_MISSING:"insert-missing",INSERT_UPDATE:"insert-update",FULL_IDEMPOTENT:"full-idempotent"},OE="system",NE="core";function zE(e,t){return e.filter(e=>(0===t.includeCollections.length||t.includeCollections.includes(e))&&!t.excludeCollections.includes(e))}const TE=ww().regex(/^(0|-?[1-9]\d*)$/u);function DE(e){if("uuid"===e)return zw().refine(e=>e===e.toLowerCase(),{error:"Management requires canonical lowercase UUIDs"});if("integer"===e)return wS();if("bigInteger"===e)return TE;if("string"===e)return ww().min(1);throw new Error(`Unsupported management key type: ${e??"missing"}`)}const AE=nI({type:xI("id-range"),min:wS().optional(),max:wS().optional()}).refine(e=>void 0!==e.min||void 0!==e.max,{error:"Provide at least one ID bound"}).refine(e=>void 0===e.min||void 0===e.max||e.min<e.max,{error:"min must be less than max"}).meta({anyOf:[{required:["min"]},{required:["max"]}],description:"Managed integer IDs: safe-integer min inclusive, max exclusive. Supply at least one bound; min must be less than max when both are set."}),CE=ww().regex(/^[A-Za-z_][A-Za-z0-9_]*$/u),UE=nI({type:xI("relation"),field:CE,collection:CE}),PE=nI({type:xI("manifest")}),jE=cI("type",[AE,UE,PE]),RE=oI([ww().min(1),wS()]),LE=cI("type",[AE,UE.extend({ids:YS(RE)}),PE.extend({ids:YS(RE)})]),ZE=iI({}),ME=oI([wS(),TE]);function FE(e,t,n,i="id",r=!0){if(void 0===n)return;const o=LE.safeParse(n);if(!o.success)throw new Error(`Invalid management for collection "${e}": ${o.error.message}`);if("manifest"===o.data.type){const n=new Set(o.data.ids);for(const[r,o]of t.entries()){const t=ZE.safeParse(o),s=RE.safeParse(t.success?t.data[i]:void 0);if(!s.success||!n.has(s.data))throw new Error(`Seed record ${r+1} for collection "${e}" requires an explicit ID inside the managed manifest selection`)}return o.data}if("relation"===o.data.type){const{field:n,ids:s}=o.data,a=new Set(s),u=new Set;for(const[o,s]of t.entries()){const t=ZE.safeParse(s),c=RE.safeParse(t.success?t.data[i]:void 0),l=t.success?t.data[n]:void 0,d=RE.safeParse(l),m=r&&t.success&&c.success&&!0===t.data.__isUpdateOnly&&void 0===l&&u.has(c.data);if(!(c.success&&(m||d.success&&a.has(d.data))))throw new Error(`Seed record ${o+1} for collection "${e}" requires an explicit ID and scalar ${n} inside the managed relation selection`);d.success&&a.has(d.data)&&u.add(c.data)}return o.data}const{min:s,max:a}=o.data;for(const[n,r]of t.entries()){const t=ZE.safeParse(r),o=ME.safeParse(t.success?t.data[i]:void 0);if(!o.success)throw new Error(`Seed record ${n+1} for collection "${e}" requires a safe integer number or canonical decimal string ID for id-range management`);const u=BigInt(o.data);if(void 0!==s&&u<BigInt(s)||void 0!==a&&u>=BigInt(a))throw new Error(`Seed record ${n+1} for collection "${e}" has ID ${u} outside managed ID range [${s??"-infinity"}, ${a??"infinity"})`)}return o.data}function BE(e,t="id"){return[...void 0===e.min?[]:[{[t]:{_gte:e.min}}],...void 0===e.max?[]:[{[t]:{_lt:e.max}}]]}function JE(e,t="id"){if("id-range"===e.type)return BE(e,t);if(0===e.ids.length)throw new Error(`Empty managed ${e.type} selection must not be queried`);const n="manifest"===e.type?t:e.field;return[{[n]:{_in:e.ids}}]}const VE=ww().min(1),GE=YS(VE),WE=oI([ww(),$S(),NS(),ZS()]),KE=oI([ww(),$S()]),qE=nI({_eq:WE.optional(),_neq:WE.optional(),_lt:KE.optional(),_lte:KE.optional(),_gt:KE.optional(),_gte:KE.optional(),_in:YS(KE).optional(),_nin:YS(KE).optional(),_null:NS().optional(),_nnull:NS().optional(),_contains:ww().optional(),_ncontains:ww().optional(),_icontains:ww().optional(),_starts_with:ww().optional(),_nstarts_with:ww().optional(),_istarts_with:ww().optional(),_nistarts_with:ww().optional(),_ends_with:ww().optional(),_nends_with:ww().optional(),_iends_with:ww().optional(),_niends_with:ww().optional(),_between:YS(KE).length(2).optional(),_nbetween:YS(KE).length(2).optional(),_empty:NS().optional(),_nempty:NS().optional(),_intersects:oI([ww(),hI(ww(),$x())]).optional(),_nintersects:oI([ww(),hI(ww(),$x())]).optional(),_intersects_bbox:oI([ww(),hI(ww(),$x())]).optional(),_nintersects_bbox:oI([ww(),hI(ww(),$x())]).optional()}).refine(e=>Object.values(e).filter(e=>void 0!==e).length<=1,{error:"Use _and with one operator per field predicate"}).meta({maxProperties:1}),HE=nI({...qE.shape,get _json(){return XE.optional()}}).refine(e=>Object.values(e).filter(e=>void 0!==e).length<=1,{error:"Use _and with one operator per field predicate"}).meta({maxProperties:1}),QE=["_and","_or","_some","_none"],YE=ax(()=>tI({_and:YS(YE).optional(),_or:YS(YE).optional()}).catchall(oI([HE,YE])).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&!QE.includes(e));n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:QE}]}})),XE=ax(()=>tI({_and:YS(XE).optional(),_or:YS(XE).optional()}).catchall(qE).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&"_and"!==e&&"_or"!==e);n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:["_and","_or"]}]}})),eO=nI({avg:GE.optional(),avgDistinct:GE.optional(),count:GE.optional(),countDistinct:GE.optional(),min:GE.optional(),max:GE.optional(),sum:GE.optional(),sumDistinct:GE.optional()}),tO=nI({_alias:hI(ww(),ww()).nullish(),_fields:GE.nullish(),_sort:GE.nullish(),_filter:YE.nullish(),_limit:wS().min(-1).nullish(),_offset:wS().nonnegative().nullish(),_page:wS().positive().nullish(),_search:ww().nullish(),_group:GE.nullish(),_aggregate:eO.nullish()}),nO=ax(()=>hI(VE.regex(/^[^_]/u),iO)),iO=ax(()=>tI(tO.shape).catchall(iO).superRefine((e,t)=>{const n=Object.keys(e).filter(e=>e.startsWith("_")&&!Object.hasOwn(tO.shape,e));n.length>0&&t.addIssue({code:"unrecognized_keys",keys:n})}).meta({propertyNames:{anyOf:[{pattern:"^[^_]"},{enum:Object.keys(tO.shape)}]}})),rO=nI({operationMode:wI(EE).optional(),fields:GE.nullish(),filter:YE.nullish(),sort:GE.nullish(),deep:nO.nullish(),management:jE.nullish()}),oO=nI({collection:VE,...rO.shape,operationMode:wI(EE),management:jE.optional()}),sO=ww().regex(/^(?!directus_|__proto__$)[A-Za-z_][A-Za-z0-9_]*$/u),aO=nI({...rO.shape,operationMode:wI(EE),management:jE.nullish()}),uO=nI({collection:sO,...aO.shape,management:jE.optional()}),cO=[{collection:"directus_policies",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","icon","description","ip_access","enforce_tfa","admin_access","app_access"]},{collection:"directus_roles",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","icon","description","parent"]},{collection:"directus_users",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","avatar","first_name","last_name","title","description","email","status","provider","role","email_notifications","tags","language"]},{collection:"directus_access",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","policy","role","sort","user"]},{collection:"directus_presets",operationMode:"insert-update",filter:{user:{_null:!0}},sort:["-role","id"],fields:["id","bookmark","user","role","collection","search","layout","layout_query","layout_options","refresh_interval","filter","icon","color"]},{collection:"directus_permissions",operationMode:"full-idempotent",management:{type:"relation",field:"policy",collection:"directus_policies"},filter:null,fields:["id","collection","action","permissions","validation","presets","fields","policy"]},{collection:"directus_folders",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","name","parent","type"],sort:["-parent"]},{collection:"directus_files",operationMode:"full-idempotent",management:{type:"manifest"},filter:null,fields:["id","filename_disk","filename_download","description","title","type","folder"]},{collection:"directus_dashboards",operationMode:"full-idempotent",filter:null,fields:["id","name","note","icon","color"]},{collection:"directus_panels",operationMode:"full-idempotent",filter:null,fields:["id","dashboard","name","icon","color","show_header","note","type","position_x","position_y","width","height","options"]},{collection:"directus_flows",operationMode:"full-idempotent",filter:null,fields:["id","name","icon","color","description","status","trigger","accountability","options","operation","folder"]},{collection:"directus_operations",operationMode:"full-idempotent",filter:null,fields:["id","name","key","type","position_x","position_y","options","resolve","reject","flow"]},{collection:"directus_settings",operationMode:"insert-update",filter:null,fields:["*"]},{collection:"directus_translations",operationMode:"full-idempotent",filter:null,fields:["id","language","key","value"],sort:["key","language"]}],lO=cO.map(e=>e.collection),dO=["directus_extensions"],mO=kx(e=>void 0===e||Array.isArray(e)?e:[e],YS(ww().trim().min(1)).default([])),pO=tI({SEEDER_ENABLED:NS().default(!0),SEEDER_CONFIG_PATH:ww().trim().min(1).optional(),SEEDER_SCOPE:ww().toLowerCase().pipe(xI(OE)).default(OE),SEEDER_INCLUDE:mO,SEEDER_EXCLUDE:mO,SEEDER_CONTINUE_ON_ERROR:NS().default(!1),SEEDER_BATCH_SIZE:$S().int().positive().default(50),SEEDER_ENABLE_FULL_IDEMPOTENT:NS().default(!1),SEEDER_JSON_ONLY:NS().default(!1),SEEDER_AUTO_EXTRACT_SYSTEM:NS().default(!1),SEEDER_AUTO_EXTRACT_CORE:NS().default(!1),SEEDER_AUTO_EXTRACT_INCLUDE:mO.pipe(YS(oI([wI(lO),sO])).min(1)).optional(),SEEDER_JSON_INDENT:wI(["tab","space"],{error:"SEEDER_JSON_INDENT must be tab or space"}).default("tab"),SEEDER_JSON_INDENT_SIZE:$S().int().min(1).max(10).default(2),SEEDER_SEEDS_DIR:ww().trim().min(1).default("/directus/seeds"),SEEDER_ASSETS_DIR:ww().trim().min(1).default("/directus/seeds/system/assets"),DEPLOYMENT_ENV:ww().optional(),DEFAULT_EMAIL:ww().default("admin@example.com"),DEFAULT_PASSWORD:ww().default("p4ssw0rd!"),STORAGE_LOCATIONS:mO.prefault(["local"]).refine(e=>e.length>0,{error:"STORAGE_LOCATIONS must contain at least one location"})}),fO=cI("type",[jE.options[0],jE.options[1].extend({collection:wI(cO.map(({collection:e})=>e).filter(e=>"directus_extensions"!==e))}),jE.options[2]]),hO=nI({...rO.shape,management:fO.nullish()}),gO=nI({...oO.shape,management:fO.optional()}),vO=wI(cO.map(({collection:e})=>e)),yO=nI({$schema:ww().optional(),$comment:ww().optional(),core:nI({collections:JS().refine(e=>null===e||"object"!=typeof e||!Object.hasOwn(e,"__proto__"),{error:"Reserved core collection name: __proto__"}).pipe(hI(sO,aO)),order:YS(sO).refine(e=>new Set(e).size===e.length,{error:"core.order must not contain duplicate collections"}).meta({uniqueItems:!0,description:"Priority prefix; omitted collections follow in declaration order."}).optional()}).superRefine((e,t)=>{for(const n of e.order??[])Object.hasOwn(e.collections,n)||t.addIssue({code:"custom",path:["order"],message:`Unknown core collection: "${n}"`})}).optional(),system:nI({collections:gI(vO,hO).optional(),order:YS(vO).refine(e=>new Set(e).size===e.length,{error:"system.order must not contain duplicate collections"}).meta({uniqueItems:!0,description:"Priority prefix; omitted collections follow in their built-in order. This does not select collections."}).optional()}).optional()});function _O(e){const t=yO.safeParse(e);if(!t.success)throw new Error(`Invalid Seeder configuration: ${t.error.message}`);const n=t.data.system,i=t.data.core,r=i?.order??[],o=Object.entries(i?.collections??{}).map(([e,t])=>{const{management:n,...i}=t;return{collection:e,...i,...null==n?{}:{management:n}}}),s=n?.order??[],a=YS(gO).safeParse(cO);if(!a.success)throw new Error(`Invalid Seeder system defaults: ${a.error.message}`);const u=a.data.map(e=>{const t={...e,...n?.collections?.[e.collection]};return null===t.management&&delete t.management,t}),c=YS(gO).safeParse(u);if(!c.success)throw new Error(`Invalid effective Seeder configuration: ${c.error.message}`);return{coreCollections:[...r.flatMap(e=>o.filter(({collection:t})=>t===e)),...o.filter(({collection:e})=>!r.includes(e))],systemCollections:[...s.flatMap(e=>c.data.filter(({collection:t})=>t===e)),...c.data.filter(({collection:e})=>!s.includes(e))],systemFieldOverrides:Object.entries(n?.collections??{}).filter(([,e])=>void 0!==e?.fields).map(([e])=>e)}}function bO(e){if("system"===e.dataScope)return function(e){const t=YS(gO).safeParse(e.systemCollections??cO);if(!t.success)throw new Error(`Invalid effective Seeder configuration: ${t.error.message}`);return t.data}(e);const t=YS(uO).safeParse(e.coreCollections??[]);if(!t.success)throw new Error(`Invalid effective Seeder core configuration: ${t.error.message}`);return t.data}function $O(e,t={}){const n=function(e){if(void 0===e)return _O({});const t=m.resolve(e);try{return _O(JSON.parse(A(t,"utf8")))}catch(e){throw new Error(`Failed to load Seeder configuration "${t}": ${e instanceof Error?e.message:"Unknown error"}`,{cause:e})}}(e.SEEDER_CONFIG_PATH);if(void 0!==e.SEEDER_AUTO_EXTRACT_INCLUDE){const t=YS(wI([...n.systemCollections,...n.coreCollections].map(({collection:e})=>e))).min(1).safeParse(e.SEEDER_AUTO_EXTRACT_INCLUDE);if(!t.success)throw new Error(`Invalid SEEDER_AUTO_EXTRACT_INCLUDE: ${t.error.message}`)}return{coreCollections:n.coreCollections.map(e=>({...e,...void 0===t.operationMode?{}:{operationMode:t.operationMode}})),systemFieldOverrides:n.systemFieldOverrides,systemCollections:n.systemCollections.map(e=>({...e,...void 0===t.operationMode?{}:{operationMode:t.operationMode}})),dataScope:t.dataScope??e.SEEDER_SCOPE,includeCollections:t.includeCollections??e.SEEDER_INCLUDE,excludeCollections:t.excludeCollections??e.SEEDER_EXCLUDE,continueOnError:t.continueOnError??e.SEEDER_CONTINUE_ON_ERROR,batchSize:t.batchSize??e.SEEDER_BATCH_SIZE,enableFullIdempotent:t.enableFullIdempotent??e.SEEDER_ENABLE_FULL_IDEMPOTENT,skipClean:t.skipClean??!1,jsonOnly:t.jsonOnly??e.SEEDER_JSON_ONLY,jsonIndent:"tab"===e.SEEDER_JSON_INDENT?"\t":e.SEEDER_JSON_INDENT_SIZE}}var kO,wO,SO={},IO={},xO={};function EO(){if(kO)return xO;kO=1;class e extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}return xO.CommanderError=e,xO.InvalidArgumentError=class extends e{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},xO}function OO(){if(wO)return IO;wO=1;const{InvalidArgumentError:e}=EO();return IO.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},IO.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"},IO}var NO={};const zO=Z(import.meta.url);const TO=Z(import.meta.url);const DO=Z(import.meta.url);const AO=Z(import.meta.url);const CO=Z(import.meta.url);var UO,PO={};function jO(){if(UO)return PO;UO=1;const{humanReadableArgName:e}=OO();function t(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,"")}return PO.Help=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){const t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){const n=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){const t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){const i=n.short&&e._findOption(n.short),r=n.long&&e._findOption(n.long);i||r?n.long&&!r?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description)):t.push(n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let n=e.parent;n;n=n.parent){const e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(t){const n=t.registeredArguments.map(t=>e(t)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(n?" "+n:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return 0===t.length?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){const i=new Map;return e.forEach(e=>{const t=n(e);i.has(t)||i.set(t,[])}),t.forEach(e=>{const t=n(e);i.has(t)||i.set(t,[]),i.get(t).push(e)}),i}formatHelp(e,t){const n=t.padWidth(e,t),i=t.helpWidth??80;function r(e,i){return t.formatItem(e,n,i,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""];const s=t.commandDescription(e);s.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(s),i),""]));const a=t.visibleArguments(e).map(e=>r(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));o=o.concat(this.formatItemList("Arguments:",a,t));const u=this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??"Options:");if(u.forEach((e,n)=>{const i=e.map(e=>r(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));o=o.concat(this.formatItemList(n,i,t))}),t.showGlobalOptions){const n=t.visibleGlobalOptions(e).map(e=>r(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));o=o.concat(this.formatItemList("Global Options:",n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||"Commands:").forEach((e,n)=>{const i=e.map(e=>r(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));o=o.concat(this.formatItemList(n,i,t))}),o.join("\n")}displayWidth(e){return t(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"[command]"===e?this.styleSubcommandText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleCommandText(e)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(e=>"[options]"===e?this.styleOptionText(e):"["===e[0]||"<"===e[0]?this.styleArgumentText(e):this.styleSubcommandText(e)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,i){const r=" ".repeat(2);if(!n)return r+e;const o=e.padEnd(t+e.length-i.displayWidth(e)),s=(this.helpWidth??80)-t-2-2;let a;if(s<this.minWidthToWrap||i.preformatted(n))a=n;else{a=i.boxWrap(n,s).replace(/\n/g,"\n"+" ".repeat(t+2))}return r+o+" ".repeat(2)+a.replace(/\n/g,`\n${r}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;const n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,r=[];return n.forEach(e=>{const n=e.match(i);if(null===n)return void r.push("");let o=[n.shift()],s=this.displayWidth(o[0]);n.forEach(e=>{const n=this.displayWidth(e);if(s+n<=t)return o.push(e),void(s+=n);r.push(o.join(""));const i=e.trimStart();o=[i],s=this.displayWidth(i)}),r.push(o.join(""))}),r.join("\n")}},PO.stripColor=t,PO}var RO,LO={};function ZO(){if(RO)return LO;RO=1;const{InvalidArgumentError:e}=EO();function t(e){return e.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}return LO.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=function(e){let t,n;const i=/^-[^-]$/,r=/^--[^-]/,o=e.split(/[ |,]+/).concat("guard");i.test(o[0])&&(t=o.shift());r.test(o[0])&&(n=o.shift());!t&&i.test(o[0])&&(t=o.shift());!t&&r.test(o[0])&&(t=n,n=o.shift());if(o[0].startsWith("-")){const t=o[0],n=`option creation failed due to '${t}' in option flags '${e}'`;if(/^-[^-][^-]/.test(t))throw new Error(`${n}\n- a short flag is a single dash and a single character\n - either use a single dash and a single character (for a short flag)\n - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(i.test(t))throw new Error(`${n}\n- too many short flags`);if(r.test(t))throw new Error(`${n}\n- too many long flags`);throw new Error(`${n}\n- unrecognised flag format`)}if(void 0===t&&void 0===n)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?(t.push(e),t):[e]}choices(t){return this.argChoices=t.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new e(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?t(this.name().replace(/^no-/,"")):t(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},LO.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const i=this.negativeOptions.get(n).presetArg,r=void 0!==i&&i;return t.negate===(r===e)}},LO}var MO,FO,BO,JO={};function VO(){if(MO)return JO;MO=1;return JO.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map(e=>e.slice(2)));let i=[],r=3;return t.forEach(t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let i=1;i<=t.length;i++)for(let r=1;r<=e.length;r++){let o=1;o=e[r-1]===t[i-1]?0:1,n[r][i]=Math.min(n[r-1][i]+1,n[r][i-1]+1,n[r-1][i-1]+o),r>1&&i>1&&e[r-1]===t[i-2]&&e[r-2]===t[i-1]&&(n[r][i]=Math.min(n[r][i],n[r-2][i-2]+1))}return n[e.length][t.length]}(e,t),o=Math.max(e.length,t.length);(o-n)/o>.4&&(n<r?(r=n,i=[t]):n===r&&i.push(t))}),i.sort((e,t)=>e.localeCompare(t)),n&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(", ")}?)`:1===i.length?`\n(Did you mean ${i[0]}?)`:""},JO}function GO(){if(FO)return NO;FO=1;const e=zO("node:events").EventEmitter,t=TO("node:child_process"),n=DO("node:path"),i=AO("node:fs"),r=CO("node:process"),{Argument:o,humanReadableArgName:s}=OO(),{CommanderError:a}=EO(),{Help:u,stripColor:c}=jO(),{Option:l,DualOptions:d}=ZO(),{suggestSimilar:m}=VO();class p extends e{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>r.stdout.write(e),writeErr:e=>r.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>r.stdout.isTTY?r.stdout.columns:void 0,getErrHelpWidth:()=>r.stderr.isTTY?r.stderr.columns:void 0,getOutHasColors:()=>h()??(r.stdout.isTTY&&r.stdout.hasColors?.()),getErrHasColors:()=>h()??(r.stderr.isTTY&&r.stderr.hasColors?.()),stripColor:e=>c(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,r=n;"object"==typeof i&&null!==i&&(r=i,i=null),r=r||{};const[,o,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(o);return i&&(a.description(i),a._executableHandler=!0),r.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!r.noHelp&&!r.hidden),a._executableFile=r.executableFile||null,s&&a.arguments(s),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),i?this:a}createCommand(e){return new p(e)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new o(e,t)}argument(e,t,n,i){const r=this.createArgument(e,t);return"function"==typeof n?r.default(i).argParser(n):r.default(n),this.addArgument(r),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;const n=e??"help [command]",[,i,r]=n.match(/([^ ]+) *(.*)/),o=t??"display help for command",s=this.createCommand(i);return s.helpOption(!1),r&&s.arguments(r),o&&s.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=s,(e||t)&&this._initCommandGroup(s),this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new a(e,t,n)),r.exit(e)}action(e){return this._actionHandler=t=>{const n=this.registeredArguments.length,i=t.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),e.apply(this,i)},this}createOption(e,t){return new l(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(e){if("commander.invalidArgument"===e.code){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'\n- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){const i=t(this._findCommand(n)).join("|"),r=t(e).join("|");throw new Error(`cannot add command '${r}' as already have command '${i}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");const i=(t,i,r)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const o=this.getOptionValue(n);null!==t&&e.parseArg?t=this._callParseArg(e,t,o,i):null!==t&&e.variadic&&(t=e._collectValue(t,o)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,r)};return this.on("option:"+t,t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;i(t,n,"cli")}),e.envVar&&this.on("optionEnv:"+t,t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;i(t,n,"env")}),this}_optionEx(e,t,n,i,r){if("object"==typeof t&&t instanceof l)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),"function"==typeof i)o.default(r).argParser(i);else if(i instanceof RegExp){const e=i;i=(t,n)=>{const i=e.exec(t);return i?i[0]:n},o.default(r).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{void 0!==n.getOptionValueSource(e)&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){r.versions?.electron&&(t.from="electron");const e=r.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let n;switch(void 0===e&&(e=r.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":r.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){null===this._savedState?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error("Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties");this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(i.existsSync(e))return;throw new Error(`'${e}' does not exist\n - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`)}_executeSubCommand(e,o){o=o.slice();let s=!1;const u=[".js",".ts",".tsx",".mjs",".cjs"];function c(e,t){const r=n.resolve(e,t);if(i.existsSync(r))return r;if(u.includes(n.extname(t)))return;const o=u.find(e=>i.existsSync(`${r}${e}`));return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let l,d=e._executableFile||`${this._name}-${e._name}`,m=this._executableDir||"";if(this._scriptPath){let e;try{e=i.realpathSync(this._scriptPath)}catch{e=this._scriptPath}m=n.resolve(n.dirname(e),m)}if(m){let t=c(m,d);if(!t&&!e._executableFile&&this._scriptPath){const i=n.basename(this._scriptPath,n.extname(this._scriptPath));i!==this._name&&(t=c(m,`${i}-${e._name}`))}d=t||d}if(s=u.includes(n.extname(d)),"win32"!==r.platform?s?(o.unshift(d),o=f(r.execArgv).concat(o),l=t.spawn(r.argv[0],o,{stdio:"inherit"})):l=t.spawn(d,o,{stdio:"inherit"}):(this._checkForMissingExecutable(d,m,e._name),o.unshift(d),o=f(r.execArgv).concat(o),l=t.spawn(r.execPath,o,{stdio:"inherit"})),!l.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(e=>{r.on(e,()=>{!1===l.killed&&null===l.exitCode&&l.kill(e)})})}const p=this._exitCallback;l.on("close",e=>{e=e??1,p?p(new a(e,"commander.executeSubCommandAsync","(close)")):r.exit(e)}),l.on("error",t=>{if("ENOENT"===t.code)this._checkForMissingExecutable(d,m,e._name);else if("EACCES"===t.code)throw new Error(`'${d}' not executable`);if(p){const e=new a(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else r.exit(1)}),this.runningCommand=l}_dispatchSubcommand(e,t,n){const i=this._findCommand(e);let r;return i||this.help({error:!0}),i._prepareForParse(),r=this._chainOrCallSubCommandHook(r,i,"preSubcommand"),r=this._chainOrCall(r,()=>{if(!i._executableHandler)return i._parseCommand(t,n);this._executeSubCommand(i,t.concat(n))}),r}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let i=t;if(null!==t&&e.parseArg){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;i=this._callParseArg(e,t,n,r)}return i};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach((n,i)=>{let r=n.defaultValue;n.variadic?i<this.args.length?(r=this.args.slice(i),n.parseArg&&(r=r.reduce((t,i)=>e(n,i,t),n.defaultValue))):void 0===r&&(r=[]):i<this.args.length&&(r=this.args[i],n.parseArg&&(r=e(n,r,n.defaultValue))),t[i]=r}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&"function"==typeof e.then?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e;const i=[];return this._getCommandAndAncestors().reverse().filter(e=>void 0!==e._lifeCycleHooks[t]).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{i.push({hookedCommand:e,callback:t})})}),"postAction"===t&&i.reverse(),i.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach(e=>{i=this._chainOrCall(i,()=>e(this,t))}),i}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},r=`command:${this.name()}`;if(this._actionHandler){let n;return i(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(r,e,t)})),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent?.listenerCount(r))i(),this._processArguments(),this.parent.emit(r,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){const e=this.options.filter(e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}),t=e.filter(e=>e.conflictsWith.length>0);t.forEach(t=>{const n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){const t=[],n=[];let i=t;function r(e){return e.length>1&&"-"===e[0]}const o=e=>!!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)&&!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e)));let s=null,a=null,u=0;for(;u<e.length||a;){const c=a??e[u++];if(a=null,"--"===c){i===n&&i.push(c),i.push(...e.slice(u));break}if(!s||r(c)&&!o(c)){if(s=null,r(c)){const t=this._findOption(c);if(t){if(t.required){const n=e[u++];void 0===n&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;u<e.length&&(!r(e[u])||o(e[u]))&&(n=e[u++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(c.length>2&&"-"===c[0]&&"-"!==c[1]){const e=this._findOption(`-${c[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,c.slice(2)):(this.emit(`option:${e.name()}`),a=`-${c.slice(2)}`);continue}}if(/^--[^=]+=/.test(c)){const e=c.indexOf("="),t=this._findOption(c.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,c.slice(e+1));continue}}if(i!==t||!r(c)||0===this.commands.length&&o(c)||(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(c)){t.push(c),n.push(...e.slice(u));break}if(this._getHelpCommand()&&c===this._getHelpCommand().name()){t.push(c,...e.slice(u));break}if(this._defaultCommandName){n.push(c,...e.slice(u));break}}if(this._passThroughOptions){i.push(c,...e.slice(u));break}i.push(c)}else this.emit(`option:${s.name()}`,c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},i=n.exitCode||1,r=n.code||"commander.error";this._exit(i,r,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in r.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,r.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){const e=new d(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter(n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")})})}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),i=this.options.find(e=>e.negate&&t===e.attributeName()),r=this.options.find(e=>!e.negate&&t===e.attributeName());return i&&(void 0===i.presetArg&&!1===n||void 0!==i.presetArg&&n===i.presetArg)?i:r||e},i=e=>{const t=n(e),i=t.attributeName();return"env"===this.getOptionValueSource(i)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},r=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{const e=i.createHelp().visibleOptions(i).filter(e=>e.long).map(e=>e.long);n=n.concat(e),i=i.parent}while(i&&!i._enablePositionalOptions);t=m(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,n=1===t?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)}),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");const n=this.parent?._findCommand(e);if(n){const t=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this.registeredArguments.map(e=>s(e));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}helpGroup(e){return void 0===e?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return void 0===e?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return void 0===e?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=n.basename(e,n.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});const i=t.formatHelp(this,t);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){const t=!!(e=e||{}).error;let n,i,r;t?(n=e=>this._outputConfiguration.writeErr(e),i=this._outputConfiguration.getErrHasColors(),r=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),i=this._outputConfiguration.getOutHasColors(),r=this._outputConfiguration.getOutHelpWidth());return{error:t,write:e=>(i||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:i,helpWidth:r}}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let r=this.helpInformation({error:n.error});if(t&&(r=t(r),"string"!=typeof r&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(r),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(e=>e.emit("afterAllHelp",i))}helpOption(e,t){return"boolean"==typeof e?(e?(null===this._helpOption&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(r.exitCode??0);0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const i=`${e}Help`;return this.on(i,e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function f(e){return e.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n,i="127.0.0.1",r="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?r=n[3]:i=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],i=n[3],r=n[4]),t&&"0"!==r?`${t}=${i}:${parseInt(r)+1}`:e})}function h(){return!r.env.NO_COLOR&&"0"!==r.env.FORCE_COLOR&&"false"!==r.env.FORCE_COLOR&&(!(!r.env.FORCE_COLOR&&void 0===r.env.CLICOLOR_FORCE)||void 0)}return NO.Command=p,NO.useColor=h,NO}var WO=function(){if(BO)return SO;BO=1;const{Argument:e}=OO(),{Command:t}=GO(),{CommanderError:n,InvalidArgumentError:i}=EO(),{Help:r}=jO(),{Option:o}=ZO();return SO.program=new t,SO.createCommand=e=>new t(e),SO.createOption=(e,t)=>new o(e,t),SO.createArgument=(t,n)=>new e(t,n),SO.Command=t,SO.Option=o,SO.Argument=e,SO.Help=r,SO.CommanderError=n,SO.InvalidArgumentError=i,SO.InvalidOptionArgumentError=i,SO}(),KO=J(WO);const{program:qO,createCommand:HO,createArgument:QO,createOption:YO,CommanderError:XO,InvalidArgumentError:eN,InvalidOptionArgumentError:tN,Command:nN,Argument:iN,Option:rN,Help:oN}=KO;async function sN(e){let t=m.parse(e).root;if(e===t)throw new Error(`Unsafe extraction directory: ${e}`);for(const n of e.slice(t.length).split(m.sep)){t=m.join(t,n);try{const e=await i(t);if(e.isSymbolicLink()||!e.isDirectory())throw new Error(`Extraction directory must not traverse symlinks or files: ${t}`)}catch(n){if(n instanceof Error&&"code"in n&&"ENOENT"===n.code){const n=m.dirname(t);return m.join(await r(n),m.relative(n,e))}throw n}}return r(e)}async function aN(e){await sN(e),await a(e,{recursive:!0}),await sN(e)}async function uN(e,t){await aN(m.dirname(e));const n=await u(e,C.O_WRONLY|C.O_CREAT|C.O_NOFOLLOW|C.O_NONBLOCK);try{const i=await n.stat();if(!i.isFile()||1!==i.nlink)throw new Error(`Extraction output must be a regular file with one link: ${e}`);await n.truncate(0),await n.writeFile(t)}finally{await n.close()}}async function cN(e){try{const t=await i(e);if(!t.isFile()||1!==t.nlink)throw new Error(`Extraction output must be a regular file with one link: ${e}`)}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return;throw e}}function lN(e,t="system"){return{seedsFolder:m.join(e.SEEDER_SEEDS_DIR,t),assetsFolder:e.SEEDER_ASSETS_DIR}}var dN=Object.defineProperty,mN=(e,t,n)=>((e,t,n)=>t in e?dN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,t+"",n);const pN="bulk-operation";class fN extends Error{constructor(e){super(`Process lock already exists: ${e}`),mN(this,"lockName"),this.name="ProcessLockAlreadyExistsError",this.lockName=e}}const hN=e=>e instanceof Error&&"code"in e,gN=(t={})=>{const{lockName:i=pN}=t,r=yN(i),o=n();vN(t);try{U(r,o,{flag:"wx"})}catch(e){if(hN(e)&&"EEXIST"===e.code)throw new fN(i);throw e}let s=!1;const a=()=>{if(s)return!1;s=!0,e.off("exit",u);try{return A(r,"utf8")===o&&(R(r,{force:!0}),!0)}catch(e){if(hN(e)&&"ENOENT"===e.code)return!1;throw e}},u=()=>{try{a()}catch(e){console.error("Failed to release process lock on exit",e)}};return e.once("exit",u),{path:r,release:a}},vN=(e={})=>{const{lockName:t=pN,maxLockAge:n=3e5}=e,i=yN(t);if(!P(i))return!1;return Date.now()-j(i).mtimeMs>n&&(R(i,{recursive:!0,force:!0}),!0)},yN=e=>p(M(),`directus-lock-${e}.flag`);function _N(e,t){const n=t.collections?.[e],i=n?.primary,r=i?n?.fields?.[i]:void 0;if("string"!=typeof i||!i||!r||r.alias)throw new Error(`Collection "${e}" requires a scalar primary key in the live schema`);try{DE(r.type)}catch(t){throw new Error(`Unsupported primary key "${e}.${i}": ${r.type}`,{cause:t})}return i}function bN(e,t){const n=_N(e,t);return DE(t.collections[e]?.fields[n]?.type)}function $N(e,t,n){const i=_N(e,n),r=bN(e,n),o=iI({}),s=new Set;for(const[n,a]of t.entries()){const t=o.safeParse(a),u=r.safeParse(t.success?t.data[i]:void 0);if(!u.success)throw new Error(`Invalid seed primary key "${e}.${i}" at row ${n+1}`,{cause:u.error});if(s.has(u.data))throw new Error(`Duplicate seed primary key "${e}.${i}" at row ${n+1}`);s.add(u.data)}}async function kN(e,t,n){let i;try{i=await async function(e){await sN(m.resolve(m.dirname(e)));const t=await u(e,C.O_RDONLY|C.O_NOFOLLOW|C.O_NONBLOCK);try{const n=await t.stat();if(!n.isFile()||1!==n.nlink)throw new Error(`Manifest input must be a regular file with one link: ${e}`);return await t.readFile("utf8")}finally{await t.close()}}(e)}catch(e){if(n&&e instanceof Error&&"code"in e&&"ENOENT"===e.code)return[];throw e}const r=JSON.parse(i);return YS(t).parse(r)}async function wN(e,t,n){const i=m.join(t,`${e}.managed-ids.json`);try{return await kN(i,bN(e,n),!1)}catch(t){throw new Error(`Failed to resolve manifest management for collection "${e}" from "${i}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function SN(e,t,n){const i=_N(e,n),r=bN(e,n),o=iI({});return t.map((t,n)=>{const s=o.safeParse(t);if(!s.success)throw new Error(`Invalid manifest-managed seed ID for collection "${e}" at row ${n+1}: ${s.error.message}`);const a=r.safeParse(s.data[i]);if(!a.success)throw new Error(`Invalid manifest-managed seed ID for collection "${e}" at row ${n+1}: ${a.error.message}`);return a.data})}async function IN(e,t,i,r,o){const a=m.join(i,`${e}.managed-ids.json`);try{const i=SN(e,t,r),l=await kN(a,bN(e,r),!0),d=[...new Set([...l,...i])].sort((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e<t?-1:e>t?1:0);await async function(e,t){const i=m.resolve(m.dirname(e));await aN(i),await cN(e);const r=m.join(i,`.${m.basename(e)}.${n()}.tmp`),o=await u(r,C.O_WRONLY|C.O_CREAT|C.O_EXCL|C.O_NOFOLLOW);try{try{await o.writeFile(t)}finally{await o.close()}await sN(i),await cN(e),await c(r,e)}catch(e){try{await s(r)}catch(t){if(!(t instanceof Error&&"code"in t&&"ENOENT"===t.code))throw new AggregateError([e,t],`Failed to clean manifest temporary file: ${r}`)}throw e}}(a,`${JSON.stringify(d,null,o)}\n`)}catch(t){throw new Error(`Failed to update manifest management for collection "${e}" at "${a}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function xN(e,t=0){const n=t>0?" ".repeat(t):"",i=void 0!==e.duration?`${e.duration.toFixed(2)} ms`:"in progress";return[`${n}${e.operation}: ${i}`,...e.children.map(e=>xN(e,t+1))].join("\n")}function EN(){const e={operations:[],currentOperation:null,operationStack:[]};return{startOperation(t){const n={operation:t,startTime:F.now(),children:[]};return e.currentOperation?(e.operationStack.push(e.currentOperation),e.currentOperation.children.push(n)):e.operations.push(n),e.currentOperation=n,n},endOperation(){if(!e.currentOperation)throw new Error("No operation to end");const t=F.now();e.currentOperation.endTime=t,e.currentOperation.duration=t-e.currentOperation.startTime;const n=e.currentOperation;return e.currentOperation=e.operationStack.length>0?e.operationStack.pop()??null:null,n},getOperations:()=>e.operations,getCurrentOperation:()=>e.currentOperation,async track(e,t){this.startOperation(e);try{return await t()}finally{this.endOperation()}},trackSync(e,t){this.startOperation(e);try{return t()}finally{this.endOperation()}},formatPerformanceData(t=0){const n=[];for(const i of e.operations)n.push(xN(i,t));return n.join("\n")},outputFormatPerformanceData(e){if(!e)return;e.info("🚀 Performance data 🚀");const t=this.formatPerformanceData().split("\n");for(const[n,i]of t.entries())0===n?e.info(i):e.debug(i)}}}const ON=YS(JS());function NN(e){if(null==e)throw new TypeError("Cannot read properties of a null or undefined seed item");return $l(e)?e:Object.fromEntries(Object.entries(e))}function zN(e,t){const n=NN(e)[t];if(null!=n){if("string"!=typeof n)throw new TypeError(`${t}.toLowerCase is not a function`);return n}}const TN=iI({id:ww(),filename_disk:ww().min(1).refine(e=>"."!==e&&".."!==e&&!/[\\/\0]/u.test(e),{error:"Asset filename_disk must be a single filename inside the assets directory"})}),DN=async(e,t,n)=>{const{logger:i,services:r,getSchema:o,database:s}=n,a=await o(),u=new r.AssetsService({schema:a,knex:s}),c=m.join(t,e.filename_disk);i.trace(`📥 Downloading file: ${e.filename_disk}`);try{const{stream:t}=await u.getAsset(e.id),n=await(async e=>new Promise((t,n)=>{const i=[];e.on("data",e=>i.push(e)),e.on("end",()=>t(Buffer.concat(i))),e.on("error",e=>n(e))}))(t);return await uN(c,n),i.trace(`✅ Downloaded file: ${e.filename_disk}`),!0}catch(t){const n=t instanceof Error?t.message:"Unknown error";return i.error(`❌ Failed to download file ${e.filename_disk}: ${n}`),i.error(t),!1}},AN=[{collection:"directus_folders",field:"type",legacyValue:"files"},{collection:"directus_flows",field:"folder",legacyValue:null}];function CN(e,t,n){const i=e.fields??["*"];return n?.includes(e.collection)?i:i.filter(n=>!AN.some(i=>i.collection===e.collection&&i.field===n&&!t.collections[i.collection]?.fields[n]))}function UN(e,t){return{collectionName:e,getData:t}}const PN=Ox(),jN=/\[dev]/i,RN=["developer","user"],LN=["directus_extensions"],ZN=["directus_operations","directus_policies","directus_users","directus_flows"],MN=e=>ZN.includes(e),FN=e=>{const t=new Map,n=(e=>{const t=new Map;return e.forEach(e=>{if(!NN(e).id)return;const n=new Set,i=NN(e).reject;i&&"string"==typeof i&&n.add(i);const r=NN(e).resolve;r&&"string"==typeof r&&n.add(r),t.set(NN(e).id,n)}),t})(e),i=new Set,r=new Set,o=[];e.forEach(e=>{NN(e).id&&t.set(NN(e).id,e)});const s=e=>{if(!NN(e).id)return;if(i.has(NN(e).id))return;if(r.has(NN(e).id))return void console.warn(`Circular dependency detected for operation ${PN.parse(NN(e).id)}`);r.add(NN(e).id);const a=n.get(NN(e).id)??new Set;0===a.size?o.unshift(e):(a.forEach(e=>{const n=t.get(e);n&&s(n)}),o.push(e)),r.delete(NN(e).id),i.add(NN(e).id)};return e.forEach(e=>s(e)),o},BN=(e,t)=>{const n=e.find(e=>e.collection===t);return n?.data??[]},JN=(e,t)=>{const n=BN(e,"directus_policies");return UN("directus_policies",()=>n.map(e=>((e,t)=>({...NN(e),enforce_tfa:!0===NN(e).enforce_tfa||"production"===t.DEPLOYMENT_ENV&&(!0===NN(e).admin_access||!0===NN(e).app_access)}))(e,t)))},VN=(e,t)=>{const n=BN(e,"directus_users");return UN("directus_users",()=>n.map(e=>(e=>{const t="super user"===zN(e,"title")?.toLowerCase(),n="admin"===zN(e,"first_name")?.toLowerCase()&&RN.includes(zN(e,"last_name")?.toLowerCase()??"");return t||n})(e)?((e,t)=>({...NN(e),email:t.DEFAULT_EMAIL,password:t.DEFAULT_PASSWORD,status:"development"===t.DEPLOYMENT_ENV?"active":"suspended"}))(e,t):e))},GN=(e,t)=>!!e&&("development"!==t.DEPLOYMENT_ENV&&jN.test(PN.parse(e))),WN=(e,t)=>{const n=[];return e.filter(e=>MN(e.collection)).forEach(i=>{switch(i.collection){case"directus_flows":{const i=BN(e,"directus_flows"),r=i.filter(e=>!GN(NN(e).name,t)),o=i.length-r.length;o>0&&console.log(`Filtered ${o} development-only flow(s) for ${t.DEPLOYMENT_ENV??"unknown"} environment`),n.push(UN("directus_flows",()=>r));break}case"directus_operations":{const i=BN(e,"directus_operations"),r=BN(e,"directus_flows"),o=new Set(r.filter(e=>GN(NN(e).name,t)).map(e=>NN(e).id).filter(e=>"string"==typeof e)),s=i.filter(e=>!o.has(NN(e).flow)),a=i.length-s.length;a>0&&console.log(`Filtered ${a} operation(s) belonging to development-only flows`);const[u,c]=(e=>{const t=new Map;return[e.map(e=>{if(!NN(e).id)return e;const n={};if("resolve"in NN(e)){const t=NN(e).resolve;"string"==typeof t?n.resolve=t:null===NN(e).resolve&&(n.resolve=null)}if("reject"in NN(e)){const t=NN(e).reject;"string"==typeof t?n.reject=t:null===NN(e).reject&&(n.reject=null)}return("string"==typeof n.resolve||"string"==typeof n.reject)&&t.set(NN(e).id,n),{...NN(e),resolve:null,reject:null}}),t]})(s);if(n.push(UN("directus_operations",()=>u)),c.size>0){const e=(e=>{const t=[];return e.forEach((e,n)=>{t.push({id:n,resolve:e.resolve??null,reject:e.reject??null,__isUpdateOnly:!0})}),t})(c);n.push(UN("directus_operations",()=>e))}break}case"directus_policies":n.push(JN(e,t));break;case"directus_users":n.push(VN(e,t))}}),n},KN=e=>e.filter(e=>!(e=>LN.includes(e))(e.collection)&&!MN(e.collection)).map(e=>UN(e.collection,()=>e.data)),qN=(e,t,n)=>{const i=[...WN(e,t),...KN(e)];return i.filter(e=>n.includes(e.collectionName)).sort((e,t)=>lO.indexOf(e.collectionName)-lO.indexOf(t.collectionName))},HN=(e,t)=>{const n=((e,t)=>{const n={directus_users:["password"],directus_settings:["license_key","license_token"]};return n[e]?t.map(t=>{const i={...NN(t)};for(const t of n[e]??[])delete i[t];return i}):t})(e,t);return"directus_operations"===e&&Array.isArray(n)&&n.length>0?FN(n):n},QN="-".repeat(60),YN=e=>{if(!e.context)throw new Error("Context is required for extraction operations");if(!e.folders?.seeds)throw new Error("Seeds folder path is required");if(!e.folders?.assets)throw new Error("Assets folder path is required")},XN=(e,t,n=lO)=>{let i=[...n].filter(e=>!dO.includes(e));return e&&e.length>0&&(i=i.filter(t=>e.includes(t))),t&&t.length>0&&(i=i.filter(e=>!t.includes(e))),i},ez=e=>{e.info(QN)},tz=(e,t="id")=>{const{filter:n,management:i}=e;return"id-range"!==i?.type?n:{_and:[...n?[n]:[],...BE(i,t)]}};function nz(e,t){const n=_N(e.collection,t),i=e.fields??["*"];if(!i.includes("*")&&!i.includes(n))throw new Error(`Core extraction fields for collection "${e.collection}" must include primary key "${n}" or "*"`);if("id-range"===e.management?.type&&!["integer","bigInteger"].includes(t.collections[e.collection]?.fields[n]?.type??""))throw new Error(`id-range management for collection "${e.collection}" requires a numeric integer primary key`);return n}const iz=async(e,t,n,i,r,o)=>{const{logger:s,services:a,getSchema:u,database:c}=n,l=e.collection;try{s.info(`📦 Extracting collection: ${l}`);const n=await u(),d="core"===o?nz(e,n):"id",p=new a.ItemsService(l,{schema:n,knex:c}),f={limit:-1,fields:"system"===o?CN(e,n,r):e.fields??["*"],filter:tz(e,d),sort:e.sort??null,deep:e.deep??null};let h=ON.parse(await p.readByQuery(f));"system"===o?h=HN(l,h):$N(l,h,n);const g=((e,t)=>m.join(e,`${t}.json`))(t,l);return await uN(g,`${JSON.stringify(h,null,i)}\n`),"manifest"===e.management?.type&&await IN(l,h,t,n,i),s.info(`✅ Extracted ${h.length} items from ${l}`),s.trace(`📄 File written to: ${g}`),!0}catch(e){const t=e instanceof Error?e.message:"Unknown error";return s.error(`❌ Failed to extract collection ${l}: ${t}`),s.error(e),!1}};async function rz(e){YN(e);const t=bO(e);if("core"===e.dataScope){const n=XN(e.includeCollections,e.excludeCollections,t.map(({collection:e})=>e)),i=await e.context.getSchema();for(const e of t.filter(({collection:e})=>n.includes(e)))nz(e,i)}const n=e.jsonOnly||"core"===e.dataScope;if(!n){const t=await sN(m.resolve(e.folders.seeds,"..","system"===e.dataScope?"core":"system")),n=await sN(m.resolve(e.folders.assets));if(t===n||t.startsWith(`${n}${m.sep}`))throw new Error("Extraction directories conflict: assets must not equal or contain the other seed scope")}let i;try{i=await async function(e,t,n){await sN(m.dirname(m.resolve(e.seeds)));const i=await sN(m.resolve(e.seeds)),r=await sN(m.resolve(e.assets));if(i===r||i.startsWith(`${r}${m.sep}`))throw new Error("Extraction directories conflict: assets must not equal or contain seeds");if(await aN(i),t||await aN(r),!n)for(const e of t?[i]:[i,r]){await sN(e);for(const t of await o(e,{withFileTypes:!0}))t.isFile()&&(e===r||t.name.endsWith(".json")&&!t.name.endsWith(".managed-ids.json"))&&await s(m.join(e,t.name))}return{seeds:i,assets:r}}(e.folders,n,e.skipClean)}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw new Error(`Failed to prepare extraction output directories: ${t}`,{cause:e})}const r={...e,folders:i};await(async e=>{YN(e);const{logger:t}=e.context,{includeCollections:n,excludeCollections:i,folders:r}=e,o=bO(e),s=XN(n,i,o.map(({collection:e})=>e));t.info(`📋 Extracting ${s.length} collections: ${s.join(", ")}`),t.trace(`📁 Seeds folder path: ${r.seeds}`);try{let n=0,i=0;for(const a of o.filter(({collection:e})=>s.includes(e))){const o=a.collection,s=EN();await s.track(`Extract ${o}`,async()=>await iz(a,r.seeds,e.context,e.jsonIndent,e.systemFieldOverrides,e.dataScope))?n++:i++,s.outputFormatPerformanceData(t),ez(t)}if(t.info(`🎯 Collection extraction complete: ${n} succeeded, ${i} failed`),i>0)throw new Error(`Failed to extract ${i} collection(s)`)}catch(e){const n=e instanceof Error?e.message:"Unknown error";throw t.error(`❌ Failed to extract seeds: ${n}`),t.error(e),e}})(r),n||await(async(e,t)=>{const{logger:n,getSchema:i,services:r,database:o}=e;n.info("-".repeat(60)),n.info("📁 Extracting asset files...");const s=EN();try{await s.track("Asset extraction",async()=>{const s=await i(),a=new r.FilesService({schema:s,knex:o});n.trace("📋 Fetching directus_files data");const u=ON.parse(await a.readByQuery({limit:-1,fields:["*"]}));if(0===u.length)return void n.info("📋 No files found in directus_files collection");n.info(`📋 Found ${u.length} files in directus_files, starting asset extraction...`);const c={success:[],failed:[]};for(const n of u){const i=TN.parse(n);await DN(i,t,e)?c.success.push(i.filename_disk):c.failed.push(i.filename_disk)}if(n.info(`📋 Asset extraction complete: ${c.success.length} succeeded, ${c.failed.length} failed`),c.failed.length>0)throw n.warn("⚠️ Failed files:"),c.failed.forEach(e=>n.warn(` - ${e}`)),new Error(`Failed to extract ${c.failed.length} asset(s)`)})}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw n.error(`❌ Failed to extract assets: ${t}`),n.error(e),e}s.outputFormatPerformanceData(n),n.info("-".repeat(60))})(r.context,r.folders.assets)}function oz(){return B.createInterface({input:e.stdin,output:e.stdout})}function sz(t){return t||Boolean(e.env.CI)||Boolean(e.env.CONTINUOUS_INTEGRATION)||Boolean(e.env.BUILD_NUMBER)||Boolean(e.env.GITHUB_ACTIONS)||!(e.stdin.isTTY&&e.stdout.isTTY)}function az(e){return{getItems:()=>Promise.resolve([]),createItems:()=>Promise.resolve([]),upsertItems:()=>Promise.resolve([]),deleteItems:()=>Promise.resolve([]),...e}}const uz=iI({filename_disk:ww().min(1)});async function cz(e,t,n,i){const r=NN(n);if(!r.filename_disk)throw new Error("filename_disk is required for file import");const o=uz.parse(r),{assetsFolder:s}=lN(i),a=m.join(m.resolve(s),o.filename_disk);await l(a);const u=L(a);return e.uploadOne(u,{...r,storage:r.storage??t},r.id)}async function lz(e){const t=await e.getSchema(),n=new e.services.FilesService({schema:t}),[i]=e.env.STORAGE_LOCATIONS;if(!i)throw new Error("STORAGE_LOCATIONS must contain at least one location");const r=async t=>{const r=[];for(const o of t)r.push(await cz(n,i,o,e.env));return r};return az({getItems:e=>n.readByQuery(e??{}),createItems:r,upsertItems:r,deleteItems:async e=>{const t=[];for(const i of e)t.push(await n.deleteOne(i));return t}})}async function dz(e,t){const n=await t.getSchema(),i=new t.services.ItemsService(e,{schema:n}),r=i;return az({getItems:e=>i.readByQuery(e??{}),createItems:e=>r.createMany(e),upsertItems:e=>r.upsertMany(e),deleteItems:e=>i.deleteMany(e)})}async function mz(e){const t=await dz("directus_roles",e),n=new e.services.RolesService({schema:await e.getSchema()});return{...t,deleteItems:e=>n.deleteMany(e)}}const pz=YS(oI([ww(),$S()]));async function fz(e,t,n){const i=function(e,t){return{collectionName:e,created:0,updated:0,deleted:0,skipped:0,total:t,duration:0}}(e,t.length),r=performance.now();try{await n(i)}catch(e){i.error=e instanceof Error?e.message:"Unknown error"}const o=performance.now();return i.duration=o-r,i}async function hz(e,t,n,i,r=!1,o="id",s=!0){const a=e.map(e=>NN(e)[o]).filter(e=>null!=e);if(0===a.length){const n=await t.createItems(e);return void(i.created+=n.length)}if(r){const r=await n.track("Find existing items for counting",()=>t.getItems({filter:{[o]:{_in:a}},fields:[o],limit:-1})),s=new Set(r.map(e=>"object"==typeof e&&null!==e&&o in e?NN(e)[o]:e));await n.track(`Upsert ${e.length} items`,()=>t.upsertItems(e));const u=e.filter(e=>void 0!==NN(e)[o]&&!s.has(NN(e)[o])).length,c=e.length-u;return i.created+=u,void(i.updated+=c)}const u=await n.track("Find existing items",()=>t.getItems({filter:{[o]:{_in:a}},fields:[o],limit:-1})),c=new Set(u.map(e=>"object"==typeof e&&null!==e&&o in e?NN(e)[o]:e)),l=e.filter(e=>void 0!==NN(e)[o]&&!c.has(NN(e)[o])),d=[],m=[];for(const e of l){const t=NN(e);if(s&&"__isUpdateOnly"in t&&!0===t.__isUpdateOnly){const{__isUpdateOnly:e,...n}=t;m.push(n)}else d.push(e)}if(d.length>0){const e=await n.track(`Create ${d.length} items`,()=>t.createItems(d));i.created+=e.length}if(m.length>0){const e=await n.track(`Update ${m.length} items (pass 2)`,()=>t.upsertItems(m));i.updated+=e.length}i.skipped+=e.length-l.length}function gz(e,t){const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n}function vz(e,t=50,n){if(e===EE.INSERT_MISSING)return function(e=50){return{seedCollection:async(t,n,i,r,o,s="id",a=!0)=>{const u=n;return fz(t,n,async n=>{const o=gz(u,e);for(const e of o)await r.track(`Process batch of ${e.length} items for ${t}`,async()=>{await hz(e,i,r,n,!1,s,a)})})}}}(t);if(e===EE.INSERT_UPDATE)return function(e=50){return{seedCollection:async(t,n,i,r,o,s="id",a=!0)=>{const u=n;return fz(t,n,async n=>{const o=gz(u,e);for(const e of o)await r.track(`Process batch of ${e.length} items for ${t}`,async()=>{await hz(e,i,r,n,!0,s,a)})})}}}(t);if(e===EE.FULL_IDEMPOTENT)return function(e,t){return{seedCollection:async(n,i,r,o,s,a="id",u=!0)=>{const c=i;return fz(n,i,async l=>{const d=FE(n,i,s,a,u);if(d&&"id-range"!==d.type&&0===d.ids.length)return;const m=new Set(c.map(e=>NN(e)[a]).filter(e=>null!=e)),p=gz(c,e);for(const e of p)await o.track(`Process batch of ${e.length} items for ${n}`,async()=>{await hz(e,r,o,l,!0,a,u)});const f=t?" Find extra items":" Delete extra items";await o.track(f,async()=>{const n=(await r.getItems({fields:[a],filter:void 0===d?{[a]:{_nin:[...m]}}:{_and:[...JE(d,a),...0===m.size?[]:[{[a]:{_nin:[...m]}}]]},limit:-1})).map(e=>"object"==typeof e&&null!==e&&a in e?NN(e)[a]:e);if(0===n.length)return;const i=gz(n,e),s=async()=>{for(const e of i){const t=await o.track(`Delete ${e.length} items`,()=>r.deleteItems(pz.parse(e)));l.deleted+=t.length}};t?t({run:s,result:l}):await s()})})}}}(t,n);throw new Error(`Unknown operation mode: ${String(e)}`)}async function yz(e,t,n,i){if("id-range"===t.type)return t;if("manifest"===t.type)return{...t,ids:await wN(e,n,i)};const r=m.join(n,`${t.collection}.json`);try{const n=i.collections[e],o=i.collections[t.collection];_N(e,i);const s=_N(t.collection,i),a=n?.fields[t.field],u=i.relations.find(n=>n.collection===e&&n.field===t.field),c=o?.fields[s]?.type,l=a?.type===c||["uuid","string"].includes(a?.type??"")&&["uuid","string"].includes(c??"")||["integer","bigInteger"].includes(a?.type??"")&&["integer","bigInteger"].includes(c??"");if(!a||a.alias||!l||u?.related_collection!==t.collection||!u.schema||u.schema.foreign_key_table!==t.collection||u.schema.foreign_key_column!==s||u.schema.table!==e||u.schema.column!==t.field)throw new Error(`Management field "${e}.${t.field}" must be a direct scalar relation to "${t.collection}.${s}" with scalar primary keys`);const m=DE(a.type),p=bN(t.collection,i),f=JSON.parse(await d(r,"utf8")),h=ON.parse(f).map((e,t)=>{try{const t=iI({}).parse(e),n=p.parse(t[s]);return"integer"===c&&"bigInteger"===a.type?m.parse(String(n)):"bigInteger"===c&&"integer"===a.type?m.parse(Number(n)):m.parse(n)}catch(e){throw new Error(`Invalid related seed ID at row ${t+1}`,{cause:e})}});if(new Set(h).size!==h.length)throw new Error("Duplicate related seed IDs");return{...t,ids:h}}catch(t){throw new Error(`Failed to resolve relation management for collection "${e}" from "${r}": ${t instanceof Error?t.message:"Unknown error"}`,{cause:t})}}function _z(e,t,n){const i=_N(e,n),r=bN(e,n);for(const[n,o]of t.entries())try{const e=iI({}).parse(o);r.parse(e[i])}catch(t){throw new Error(`Invalid relation-managed seed ID for collection "${e}" at row ${n+1}`,{cause:t})}}function bz(e,t){const n=e.get(t);if(void 0===n)throw new Error(`Missing resolved primary key for collection "${t}"`);return n}function $z(e,t){const{collectionName:n,error:i,created:r,updated:o,deleted:s,skipped:a,duration:u}=t;void 0===i?e.info(`Seeded ${n}: ${r} created, ${o} updated, ${s} deleted, ${a} skipped, ${u.toFixed(2)} ms`):e.error(`Error seeding collection ${n}: ${i}`)}async function kz(e,t,n,i=!1){const{logger:r,env:o}=e,s=EN(),a=[];r.info(`Starting ${t.dataScope} data seeding`);const u=bO(t);if(null===n||0===n.length){const{seedsFolder:e}=lN(o,t.dataScope);return r.warn(`No selected ${t.dataScope} seed files found in "${e}"; skipping seeding`),null}const c=function(e){return{collections:e,getSeedData(){const t=new Map;for(const n of e){const e=n.collectionName,i=n.getData(),r=t.get(e);t.set(e,r?[...r,...i]:i)}return Object.fromEntries(t)}}}([...n]);return await s.track(`${t.dataScope} data seeding`,async()=>{try{let n=await s.track("Get seed data",()=>Promise.resolve(c.getSeedData()));return"system"===t.dataScope&&("directus_folders"in n||"directus_flows"in n)&&(n=function(e,t){const n={...e};for(const{collection:i,field:r,legacyValue:o}of AN){if(t.collections[i]?.fields[r])continue;const s=e[i];s&&(n[i]=s.map((e,t)=>{if(!$l(e)||(n=e,s=r,!Object.hasOwn(n,s)))return e;var n,s;if(e[r]!==o)throw new Error(`Cannot import ${i}.json processed row ${t+1}: target schema lacks ${i}.${r}; this value cannot be represented safely. Use a Directus version with Flow-folder support.`);const a={...e};return delete a[r],a}))}return n}(n,await e.getSchema())),await async function(e,t,n,i,r,o,s="",a=!1){const{logger:u}=n,c=zE(Object.keys(e),t),l=i.map(({collection:e})=>e),d=new Map,m=new Map,p=t.dataScope===OE,f=p?void 0:await n.getSchema();if(!p&&!f)throw new Error("Core import requires a live collection schema");for(const r of c){const o=i.find(e=>e.collection===r);if(!o)throw new Error(`Missing configuration for collection "${r}"`);m.set(r,f?_N(r,f):"id"),f&&$N(r,e[r]??[],f);const s=o.operationMode;if(a&&s!==EE.FULL_IDEMPOTENT)throw new Error(`--full-reset requires full-idempotent mode for collection "${r}"`);if(s!==EE.FULL_IDEMPOTENT)continue;if(!t.enableFullIdempotent)throw new Error("full-idempotent mode is disabled for safety. Set SEEDER_ENABLE_FULL_IDEMPOTENT=true to enable this destructive operation.");if(a)continue;if(f&&"id-range"===o.management?.type){const e=_N(r,f),t=f.collections[r]?.fields[e]?.type;if("integer"!==t&&"bigInteger"!==t)throw new Error(`id-range management for collection "${r}" requires a numeric primary key`)}let u;const c=e[r]??[];if(f||"id-range"!==o.management?.type||$N(r,c,await n.getSchema()),"relation"===o.management?.type||"manifest"===o.management?.type){const e=f??await n.getSchema();m.set(r,_N(r,e)),u=await yz(r,o.management,lN(n.env,t.dataScope).seedsFolder,e),"manifest"===o.management.type?SN(r,c,e):_z(r,c,e)}else u=o.management;u=FE(r,c,u,bz(m,r),p),u&&d.set(r,u)}for(const t of c){const i=d.get(t),r=e[t]??[];if("relation"!==i?.type||0===r.length)continue;const o=bz(m,t),s=await dz(t,n),a=r.map(e=>NN(e)[o]);FE(t,await s.getItems({fields:[o,i.field],filter:{[o]:{_in:a}},limit:-1}),i,o,p)}t.includeCollections&&t.includeCollections.length>0&&u.info(`Including collections: ${t.includeCollections.join(", ")}`),t.excludeCollections&&t.excludeCollections.length>0&&u.info(`Excluding collections: ${t.excludeCollections.join(", ")}`),c.sort((e,t)=>{const n=l.indexOf(e),i=l.indexOf(t);return-1===n&&-1===i?0:-1===n?1:-1===i?-1:n-i});const h=s?`${s} `:"";u.info(`Seeding ${c.length} ${h}collections: ${c.join(", ")}`);const g=p?c.filter(e=>["directus_roles","directus_users","directus_access"].includes(e)):[],v=g.filter(e=>"directus_roles"!==e),y=g.at(-1);let _;const b=async()=>{const e=_;if(!e)return!1;_=void 0;const{run:t,result:n}=e,i=v.find(e=>!o.some(({collectionName:t,error:n})=>t===e&&void 0===n));if(i)n.error=`Skipped deferred role deletion because ${i} did not seed successfully`;else{const e=performance.now();try{await t()}catch(e){n.error=e instanceof Error?e.message:"Unknown error"}n.duration+=performance.now()-e}return $z(u,n),void 0!==n.error};for(const s of c){const a=e[s]??[],c=i.find(e=>e.collection===s);if(!c)throw new Error(`Missing configuration for collection "${s}"`);const l=p&&"directus_roles"===s&&c.operationMode===EE.FULL_IDEMPOTENT,f=vz(c.operationMode,t.batchSize,l?e=>{_=e}:void 0);let h;u.debug(`Seeding collection: ${s} (${a.length} items)`);try{const e="directus_files"===s?await lz(n):l?await mz(n):await dz(s,n);h=await f.seedCollection(s,a,e,r,d.get(s),bz(m,s),p)}catch(e){h={collectionName:s,created:0,updated:0,deleted:0,skipped:0,total:a.length,duration:0,error:e instanceof Error?e.message:"Unknown error"}}if(o.push(h),_?.result!==h&&$z(u,h),void 0!==h.error&&!t.continueOnError)break;if(s===y&&await b()&&!t.continueOnError)break}return await b(),o}(n,t,e,u,s,a,t.dataScope,i),a}catch(e){const n=e instanceof Error?e.message:"Unknown error";throw r.error(`Error seeding ${t.dataScope} data: ${n}`),e}}),s.outputFormatPerformanceData(r),a}const wz=ON.superRefine((e,t)=>{for(const[n,i]of e.entries())null!==i&&"object"==typeof i&&"password"in i&&"string"==typeof i.password&&/^\*+$/.test(i.password)&&t.addIssue({code:"custom",path:[n,"password"],message:"Masked passwords are not allowed; omit password to preserve it or provide an explicit password"})}),Sz=(e,t)=>{const n=JSON.parse(t);if(i=n,!ON.safeParse(i).success)throw new Error(`Expected a JSON array for collection "${e}"`);var i;return"directus_users"===e&&wz.parse(n),n},Iz=async(e,t,n=lO)=>{try{if(!(await l(e)).isDirectory())throw new Error(`Seed path is not a directory: "${e}"`)}catch(t){if(t instanceof Error&&"code"in t&&"ENOENT"===t.code)throw new Error(`Seed directory does not exist: "${e}"`,{cause:t});const n=t instanceof Error?t.message:"Unknown directory error";throw new Error(`Failed to inspect seed directory "${e}": ${n}`,{cause:t})}const i=[];let r=!1;for(const o of n){const n=m.join(e,`${o}.json`),s=t.includes(o);try{const e=await d(n,"utf-8");if(r=!0,!s)continue;const t=Sz(o,e);i.push({collection:o,data:t})}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)continue;if(!s){r=!0;continue}const t=e instanceof Error?e.message:"Unknown file error";throw new Error(`Failed to load seed file "${n}" for collection "${o}": ${t}`,{cause:e})}}return r?i:null},xz=(t,n,i=OE)=>{const{logger:r,env:o,services:s,getSchema:a}=n;t.command(i).description(`Seed Directus with configured ${i} data`).option("-m, --mode <mode>","Operation mode: insert-missing, insert-update, full-idempotent").option("-i, --include <collections...>","Space-separated collection names to include").option("-e, --exclude <collections...>","Space-separated collection names to exclude").option("--full-reset","Synchronize entire selected collections, ignoring management boundaries (requires full-idempotent)").option("-f, --force","Skip confirmation prompts for destructive operations").option("-y, --yes","Skip confirmation prompts for destructive operations (alias for --force)").action(async t=>{const u=tI({mode:wI(EE).optional(),include:YS(ww()).optional(),exclude:YS(ww()).optional(),fullReset:NS().optional(),force:NS().optional(),yes:NS().optional()}).parse(t);let c,l=0;try{c=gN(),r.info(`🌱 Seeding Directus with ${i} data using Directus Seeder...`);const t=$O(o,{operationMode:u.mode,dataScope:i,includeCollections:u.include,excludeCollections:u.exclude}),d=bO(t),m=zE(d.map(({collection:e})=>e),t),p=await(async(e,t=lO,n="system")=>{try{const{seedsFolder:i}=lN(e,n);if("core"===n){const e=await Iz(i,t,t);return e?.map(({collection:e,data:t})=>UN(e,()=>t))??null}const r=((e,t)=>e.includes("directus_operations")&&"development"!==t.DEPLOYMENT_ENV?[...e,"directus_flows"]:e)(t,e),o=await Iz(i,r);return null===o?null:qN(o,e,t)}catch(e){const t=e instanceof Error?e.message:"Unknown error";throw console.error(`Failed to create data providers: ${t}`),new Error(`Data provider creation failed: ${t}`)}})(o,m,i),f=d.filter(({collection:e})=>p?.some(t=>t.collectionName===e)),h=f.map(e=>e.operationMode);if(u.fullReset){const e=f.find(e=>e.operationMode!==EE.FULL_IDEMPOTENT);if(e)throw new Error(`--full-reset requires full-idempotent mode for collection "${e.collection}". Use --mode full-idempotent to override collection modes.`)}const g=h.includes(EE.FULL_IDEMPOTENT);if(g&&!t.enableFullIdempotent)return r.error("full-idempotent mode is disabled for safety. Set SEEDER_ENABLE_FULL_IDEMPOTENT=true to enable this destructive operation."),void(l=1);const v=(u.force??!1)||(u.yes??!1);if(!sz(v))if(!g&&h.includes(EE.INSERT_UPDATE)){const t=await async function(t,n=!1,i){const r=oz();return new Promise(o=>{const s=n?"(Y/n)":"(y/N)";r.question(`${t} ${s}: `,e=>{if(r.close(),""===e.trim())return o(n);const t=e.toLowerCase().trim();return o("y"===t||"yes"===t)}),r.once("SIGINT",()=>{e.stdout.write("\n"),i?i.info("Operation cancelled by user"):e.stdout.write("Operation cancelled by user\n"),r.close(),e.exit(0)})})}("⚠️ WARNING: insert-update mode will OVERWRITE existing records\nThis will update existing data to match your seed files.\nAny manual changes to seeded records will be lost.\nContinue?",!1,r);if(!t)return r.info("Operation cancelled by user"),void(l=0)}else if(g){const t=await async function(t,n,i){const r=oz();return new Promise(o=>{r.question(`${t} `,e=>(r.close(),o(e.trim()===n))),r.once("SIGINT",()=>{e.stdout.write("\n"),i?i.info("Operation cancelled by user"):e.stdout.write("Operation cancelled by user\n"),r.close(),e.exit(0)})})}("🚨 DANGER: full-idempotent mode will DELETE records not in seed data\n"+(u.fullReset?"--full-reset ignores management boundaries: the ENTIRE selected collection can be affected, including unmanaged records.\n":"")+"This operation is DESTRUCTIVE and CANNOT BE UNDONE.\nRecords in your database that are not in seed files will be permanently deleted.\nType 'DELETE' to confirm this destructive operation:","DELETE",r);if(!t)return r.info("Operation cancelled by user"),void(l=0)}const y=await kz(n,t,p,u.fullReset);if(y?.some(e=>void 0!==e.error)&&(r.error(`❌ ${"system"===i?"System":"Core"} data seeding failed; see collection errors above`),l=1),null!==y){const e=await a(),t=new s.UtilsService({schema:e,accountability:{role:null,roles:[],user:null,admin:!0,app:!1,ip:null}});await t.clearCache({system:!0})}}catch(e){const t=e instanceof Error?e.message:"Unknown error";r.error(`❌ Failed to seed ${i} data: ${t}`),r.error(e),l=1}finally{c?.release()&&r.trace("🧹 Released process lock"),e.exit(l)}})},Ez=e=>{const{debounceId:t,task:i,onSkip:r,logger:o,debounceTime:s=15e3,maxLockAge:a=3e5}=e,u=function(e){return e??{info:console.log,warn:console.warn,error:console.error,debug:console.debug,trace:console.trace}}(o),c=p(M(),`directus-debounce-${t}.lock`);let l=null,d=!1,m=!1;const f=()=>{try{return A(c,"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return;throw e}},h=async()=>{if(m||d)return;const e=j(c,{throwIfNoEntry:!1});if(!e)return;const n=Date.now()-e.mtimeMs,o=s-n;if(o>0)return u.trace?.(`🪝 ${t}: debounce extended by another process → waiting ${o}ms`),void(l=setTimeout(()=>{h()},o));const p=f();if(void 0===p)return;let g;try{if(((e={})=>{const{lockName:t=pN,maxLockAge:n=3e5}=e,i=yN(t);return!!P(i)&&!(Date.now()-j(i).mtimeMs>n&&(R(i,{recursive:!0,force:!0}),1))})({maxLockAge:a}))return u.info(`🪝 Bulk operation active, skipping ${t}`),void r?.();try{g=gN({maxLockAge:a})}catch(e){if(e instanceof fN)return u.info(`🪝 Bulk operation became active, skipping ${t}`),void r?.();throw e}d=!0,u.info(`🪝 Running auto task: ${t}`),await i(),u.info(`🪝 Completed auto task: ${t}`)}catch(e){const n=e instanceof Error?e.message:"Unknown error";u.error(`🪝 Error in auto task [${t}]: ${n}`)}finally{g?.release(),d=!1;const e=f();void 0!==e&&(e===p?R(c,{force:!0}):m||(l&&clearTimeout(l),l=setTimeout(()=>{h()},0)))}},g=()=>{if(m)return;const e=j(c,{throwIfNoEntry:!1});if(e){Date.now()-e.mtimeMs>a?u.warn(`🪝 ${t}: resetting stale debounce lock`):u.trace?.(`🪝 ${t}: event within debounce window → extending delay`)}U(c,n()),u.info(`🪝 ${t}: debounce lock updated`),l&&clearTimeout(l),l=setTimeout(()=>{h()},s),u.info(`🪝 ${t}: scheduled after ${s/1e3}s`)};return g.dispose=()=>{m=!0,l&&clearTimeout(l),l=null},g};const Oz=e=>"development"===e,Nz=(t,n)=>{const{init:i,action:r}=t,o=function(e,t,n){const i=`${e.toUpperCase()}_ENABLED`;return{start:()=>n.info(`🔌 Loading extension ${e}`),end:()=>n.info(`✅ Extension ${e} Loaded`),isEnabled:()=>!1!==t[i]&&"false"!==t[i]||(n.info(`⛔️ Extension ${e} is disabled via its "${i}" environment variable. Skipping setup...`),!1)}}("seeder",n.env,n.logger);if(o.start(),!o.isEnabled())return;const s=xE(n.env,pO,n.logger),a={...n,env:s},u=Oz(s.DEPLOYMENT_ENV);i("cli.after",t=>{const n=t.program;if(!n)throw new TypeError("Directus CLI program is missing");const i=n.command("seed").description("Directus Seeder commands for system and application data");xz(i,a),xz(i,a,NE),function(t,n){t.command("config").description("Show system and core collection configuration as JSON without seeding or extraction").option("--defaults","Show built-in defaults without consumer or environment overrides").option("--collection <collection>","Show only the named collection").action(async t=>{let i=0;try{const i=tI({defaults:NS().optional(),collection:ww().optional()}).parse(t),r=$O(i.defaults?pO.parse({}):n.env),o={system:bO({...r,dataScope:"system"}),core:bO({...r,dataScope:"core"})};if(void 0!==i.collection&&!Object.values(o).flat().some(({collection:e})=>e===i.collection))throw new Error(`Unknown Seeder collection: "${i.collection}"`);const s=Object.fromEntries(Object.entries(o).map(([e,t])=>{const n=t.filter(({collection:e})=>void 0===i.collection||e===i.collection);return[e,{order:n.map(({collection:e})=>e),collections:Object.fromEntries(n.map(({collection:e,...t})=>[e,t]))}]}));await new Promise((t,n)=>{e.stdout.write(`${JSON.stringify(s,null,2)}\n`,"utf8",e=>{e?n(e):t()})})}catch(e){console.error(`Failed to inspect Seeder configuration: ${e instanceof Error?e.message:"Unknown error"}`),i=1}finally{e.exit(i)}})}(i,a),u&&((t,n)=>{const{logger:i,env:r}=n;t.command("extract").description("Extract seed data from the current Directus instance").addOption(new rN("--scope <scope>","Data scope to extract").choices(["system","core","both"]).default("system")).option("-i, --include <collections...>","Space-separated collection names to include").option("-e, --exclude <collections...>","Space-separated collection names to exclude").option("--skip-clean","Keep existing output before extracting selected data").addOption(new rN("--json-only","Extract JSON without processing binary assets").conflicts("assets")).addOption(new rN("-a, --assets","Extract binary assets, overriding SEEDER_JSON_ONLY").conflicts("jsonOnly")).action(async t=>{const o=tI({scope:wI(["system","core","both"]),include:YS(ww()).optional(),exclude:YS(ww()).optional(),skipClean:NS().optional(),jsonOnly:NS().optional(),assets:NS().optional()}).parse(t);let s,a=0;try{s=gN(),i.info("🌱 Extracting seed data from Directus using Directus Seeder...");const e=$O(r,{includeCollections:o.include,excludeCollections:o.exclude,skipClean:o.skipClean,jsonOnly:!o.assets&&o.jsonOnly}),t="both"===o.scope?["system","core"]:[o.scope];for(const i of t){const{seedsFolder:t,assetsFolder:o}=lN(r,i);await rz({...e,dataScope:i,folders:{seeds:t,assets:o},context:n})}i.info("✅ Seed data successfully extracted!"),a=0}catch(e){const t=e instanceof Error?e.message:"Unknown error";i.error(`❌ Failed to extract seed data: ${t}`),i.error(e),a=1}finally{s?.release()&&i.trace("🧹 Released process lock"),e.exit(a)}})})(i,a)});if("seed"===e.argv[2]&&"config"===e.argv[3]||u||!s.SEEDER_AUTO_EXTRACT_INCLUDE||$O(s),u&&"seed"!==e.argv[2]){const e=function(e,t){const{logger:n,env:i}=t,r=i.SEEDER_AUTO_EXTRACT_INCLUDE,o=$O(i),s=["system","core"].filter(e=>"system"===e?i.SEEDER_AUTO_EXTRACT_SYSTEM:i.SEEDER_AUTO_EXTRACT_CORE).map(e=>({...o,dataScope:e,jsonOnly:"core"===e||i.SEEDER_JSON_ONLY||void 0!==r&&!r.includes("directus_files"),...void 0===r?{}:{includeCollections:r,excludeCollections:[],skipClean:!0}})),a=new Set,u=Ez({debounceId:"seed-extract",logger:n,debounceTime:15e3,maxLockAge:3e5,onSkip:()=>a.clear(),task:async()=>{const e=new Set(a);a.clear();for(const r of s.filter(({dataScope:t})=>e.has(t))){const{seedsFolder:e,assetsFolder:o}=lN(i,r.dataScope);try{await rz({...r,folders:{seeds:e,assets:o},context:t}),n.info(`✅ ${r.dataScope} seed data successfully extracted!`)}catch(e){n.error(`[directus-seeder-hook] ❌ Error during ${r.dataScope} auto-extract: ${e instanceof Error?e.message:"Unknown error"}`)}}}});for(const t of s){const i=XN(t.includeCollections,t.excludeCollections,bO(t).map(({collection:e})=>e)),r=["create","update","delete"].flatMap(e=>i.map(n=>"system"===t.dataScope?`${n.slice(9)}.${e}`:`${n}.items.${e}`));for(const n of r)e(n,e=>{"users.update"===n&&Object.keys(NN(e.payload??{})).every(e=>"last_page"===e)||(a.add(t.dataScope),u())});n.info(`[directus-seeder-hook] ✅ Auto-extract ${t.dataScope} hook registered for events: ${r.join(", ")}`)}return u.dispose}(r,a);r("server.stop",e),r("extensions.unload",e)}o.end()};var zz=Nz;export{zz as default,Oz as isExtractionAvailable,Nz as registerSeeder};
|