allagents 1.20.1-next.34 → 1.21.0-next.35

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.
Files changed (2) hide show
  1. package/dist/index.js +34 -34
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ Did you mean ${ywe.default.italic(u)}?`}throw Error(c)}},i=(0,bwe.positional)({d
16
16
  `+o),e.push(n+"m+"+fb.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=lbe()+t+" "+e[0]}function lbe(){if(fq.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function ube(...e){return process.stderr.write(db.formatWithOptions(fq.inspectOpts,...e)+`
17
17
  `)}function pbe(e){if(e)process.env.DEBUG=e;else delete process.env.DEBUG}function dbe(){return process.env.DEBUG}function fbe(e){e.inspectOpts={};let t=Object.keys(fq.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=fq.inspectOpts[t[r]]}fb.exports=pR()(fq);var{formatters:dq}=fb.exports;dq.o=function(e){return this.inspectOpts.colors=this.useColors,db.inspect(e,this.inspectOpts).split(`
18
18
  `).map((t)=>t.trim()).join(" ")};dq.O=function(e){return this.inspectOpts.colors=this.useColors,db.inspect(e,this.inspectOpts)}});var mb=F(function(Wut,dR){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)dR.exports=pq();else dR.exports=gq()});var yq=F(function(bg){var kbe=bg&&bg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bg,"__esModule",{value:!0});bg.parse=$be;var Sbe=kbe(mb()),gb=(0,Sbe.default)("cmd-ts:parser");function $be(e,t){if(gb.enabled){let a={shortFlags:[...t.forceFlagShortNames],longFlags:[...t.forceFlagLongNames],shortOptions:[...t.forceOptionShortNames],longOptions:[...t.forceOptionLongNames]};gb("Registered:",JSON.stringify(a))}let r=[],i=0,n=!1;function o(){return e[i++]}function s(){return e[i]}while(i<e.length){let a=o();if(!a)break;if(a.type==="argumentDivider")continue;if(n){let c=a.raw,l=o();while(l&&(l===null||l===void 0?void 0:l.type)!=="argumentDivider")c+=l.raw,l=o();r.push({type:"positionalArgument",index:a.index,raw:c});continue}if(a.type==="char"){let c=a.raw,l=o();while(l&&(l===null||l===void 0?void 0:l.type)!=="argumentDivider")c+=l.raw,l=o();r.push({type:"positionalArgument",index:a.index,raw:c});continue}if(a.type==="longPrefix"){let c=o();if((c===null||c===void 0?void 0:c.type)==="argumentDivider"||!c){r.push({type:"forcePositional",index:a.index,raw:"--"}),n=!0;continue}let l="";while(c&&(c===null||c===void 0?void 0:c.raw)!=="="&&(c===null||c===void 0?void 0:c.type)!=="argumentDivider")l+=c.raw,c=o();let u=hq({key:l,delimiterToken:c,forceFlag:t.forceFlagLongNames,getToken:o,peekToken:s,forceOption:t.forceOptionLongNames}),p=`--${l}`;if(u)p+=u.raw;r.push({type:"longOption",key:l,index:a.index,raw:p,value:u});continue}if(a.type==="shortPrefix"){let c=[],l=o();if((l===null||l===void 0?void 0:l.type)==="argumentDivider"||!l){r.push({type:"positionalArgument",index:a.index,raw:"-"});continue}while(l&&(l===null||l===void 0?void 0:l.type)!=="argumentDivider"&&(l===null||l===void 0?void 0:l.raw)!=="=")c.push(l),l=o();let u=c.pop(),p=hq({key:u.raw,delimiterToken:l,forceFlag:t.forceFlagShortNames,forceOption:t.forceOptionShortNames,getToken:o,peekToken:s}),d=[];for(let h of c)d.push({type:"shortOption",index:h.index,raw:h.raw,key:h.raw});let f=u.raw;if(p)f+=p.raw;d.push({type:"shortOption",index:u.index,raw:f,value:p,key:u.raw});let m=`-${c.map((h)=>h.raw).join("")}${u.raw}`;if(p)m+=p.raw;let g={type:"shortOptions",index:a.index,raw:m,options:d};r.push(g);continue}i++}if(gb.enabled){let a=r.map((c)=>({[c.type]:c.raw}));gb("Parsed items:",JSON.stringify(a))}return r}function hq(e){var t;let{getToken:r,delimiterToken:i,forceFlag:n,key:o,forceOption:s}=e,c=!s.has(o)&&(n.has(o)||((t=e.peekToken())===null||t===void 0?void 0:t.type)!=="char");if(!i||i.raw!=="="&&c)return;let l=i.raw==="="?"=":" ",u=i.index,p=r();if(!p)return;let d="",f=p.index;while(p&&(p===null||p===void 0?void 0:p.type)!=="argumentDivider")d+=p.raw,p=r();return{type:"optionValue",index:i.index,delimiter:{type:"delimiter",raw:l,index:u},node:{type:"value",raw:d,index:f},raw:`${l}${d}`}}});var wq=F(function(vq){Object.defineProperty(vq,"__esModule",{value:!0});vq.tokenize=Pbe;var xbe=hg();function Pbe(e){let t=[],r=0,i=(n)=>{t.push(n),r+=n.raw.length};for(let[n,o]of(0,xbe.enumerate)(e)){let s=[...o];for(let a=0;a<s.length;a++)if(s[a]==="-"&&s[a+1]==="-")i({type:"longPrefix",raw:"--",index:r}),a++;else if(s[a]==="-")i({type:"shortPrefix",raw:"-",index:r});else i({type:"char",raw:s[a],index:r});if(n+1!==e.length)i({type:"argumentDivider",raw:" ",index:r})}return t}});var $q=F(function(Sq){Object.defineProperty(Sq,"__esModule",{value:!0});Sq.run=Ibe;Sq.runSafely=fR;Sq.dryRun=Abe;Sq.parse=Obe;var jp=xi(),bq=nR(),_be=sq(),Ebe=yq(),Rbe=wq();async function Ibe(e,t){let r=await fR(e,t);if((0,jp.isErr)(r))return r.error.run();return r.value}async function fR(e,t){let r=[],i=kq(e,t);try{let n=await e.run({nodes:i,visitedNodes:new Set,hotPath:r});if((0,jp.isErr)(n))throw new bq.Exit({message:(0,_be.errorBox)(i,n.error.errors,r),exitCode:1,into:"stderr"});return(0,jp.ok)(n.value)}catch(n){if(n instanceof bq.Exit)return(0,jp.err)(n);throw n}}async function Abe(e,t){let r=await fR(e,t);if((0,jp.isErr)(r))return(0,jp.err)(r.error.dryRun());return r}function Obe(e,t){let r=[],i=kq(e,t);return e.parse({nodes:i,visitedNodes:new Set,hotPath:r})}function kq(e,t){let s={forceFlagShortNames:new Set,forceFlagLongNames:new Set,forceOptionShortNames:new Set,forceOptionLongNames:new Set};e.register(s);let a=(0,Rbe.tokenize)(t);return(0,Ebe.parse)(a,s)}});var xq=F(function(Js){var jbe=Js&&Js.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Fbe=Js&&Js.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zbe=Js&&Js.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")jbe(r,t,i[n])}return Fbe(r,t),r}}();Object.defineProperty(Js,"__esModule",{value:!0});Js.restPositionals=Bbe;var hb=zbe(xi()),Ube=bl();function Lbe(e){return{helpTopics(){var t,r,i,n;return[{usage:`[...${(r=(t=e.displayName)!==null&&t!==void 0?t:e.type.displayName)!==null&&r!==void 0?r:"arg"}]`,category:"arguments",defaults:[],description:(n=(i=e.description)!==null&&i!==void 0?i:e.type.description)!==null&&n!==void 0?n:""}]},register(t){},async parse({nodes:t,visitedNodes:r}){let i=t.filter((s)=>s.type==="positionalArgument"&&!r.has(s)),n=[],o=[];for(let s of i){r.add(s);let a=await hb.safeAsync(e.type.from(s.raw));if(hb.isOk(a))n.push(a.value);else o.push({nodes:[s],message:a.error.message})}if(o.length>0)return hb.err({errors:o});return hb.ok(n)}}}function Bbe(e){return Lbe({type:Ube.string,...e})}});var Pq=F(function(Ys){var qbe=Ys&&Ys.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Vbe=Ys&&Ys.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Wbe=Ys&&Ys.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")qbe(r,t,i[n])}return Vbe(r,t),r}}();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.multiflag=Zbe;var Fp=Wbe(xi()),Hbe=ab(),Gbe=mg();function Zbe(e){return{helpTopics(){var t;let r=`--${e.long}`;if(e.short)r+=`, -${e.short}`;return[{category:"flags",usage:r,defaults:[],description:(t=e.description)!==null&&t!==void 0?t:"self explanatory"}]},register(t){if(t.forceFlagLongNames.add(e.long),e.short)t.forceFlagShortNames.add(e.short)},async parse({nodes:t,visitedNodes:r}){var i,n;let o=(0,Gbe.findOption)(t,{longNames:[e.long],shortNames:e.short?[e.short]:[]}).filter((l)=>!r.has(l));for(let l of o)r.add(l);let s=[],a=[];for(let l of o){let u=await Fp.safeAsync(Hbe.boolean.from((n=(i=l.value)===null||i===void 0?void 0:i.node.raw)!==null&&n!==void 0?n:"true"));if(Fp.isErr(u))a.push({nodes:[l],message:u.error.message});else s.push(u.value)}if(a.length>0)return Fp.err({errors:a});let c=await Fp.safeAsync(e.type.from(s));if(Fp.isErr(c))return Fp.err({errors:[{nodes:o,message:c.error.message}]});return c}}}});var _q=F(function(Po){var Kbe=Po&&Po.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Jbe=Po&&Po.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ybe=Po&&Po.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")Kbe(r,t,i[n])}return Jbe(r,t),r}}(),Xbe=Po&&Po.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Po,"__esModule",{value:!0});Po.multioption=eke;var Cq=Xbe((Gs(),Jo(Hs))),Ya=Ybe(xi()),Qbe=mg();function eke(e){return{helpTopics(){var t,r;let i=(t=e.type.displayName)!==null&&t!==void 0?t:"value",n=`--${e.long} <${i}>`;if(e.short)n+=`, -${e.short}=<${i}>`;let o=[];if(e.defaultValue)try{let s=e.defaultValue();if(e.defaultValueIsSerializable)o.push(`default: ${Cq.default.italic(s)}`);else o.push("[...optional]")}catch(s){}else if(e.type.defaultValue)try{let s=e.type.defaultValue();if(e.type.defaultValueIsSerializable)o.push(`default: ${Cq.default.italic(s)}`);else o.push("[...optional]")}catch(s){}else if(e.onMissing||e.type.onMissing)o.push("[...optional]");return[{category:"options",usage:n,defaults:o,description:(r=e.description)!==null&&r!==void 0?r:"self explanatory"}]},register(t){if(t.forceOptionLongNames.add(e.long),e.short)t.forceOptionShortNames.add(e.short)},async parse({nodes:t,visitedNodes:r}){var i;let n=(0,Qbe.findOption)(t,{longNames:[e.long],shortNames:e.short?[e.short]:[]}).filter((p)=>!r.has(p)),o=e.defaultValue||e.type.defaultValue,s=e.onMissing||e.type.onMissing;if(n.length===0&&o)try{let p=o();return Ya.ok(p)}catch(p){let d=`Failed to resolve default value for '--${e.long}': ${p.message}`;return Ya.err({errors:[{nodes:[],message:d}]})}else if(n.length===0&&s)try{let p=await s();return Ya.ok(p)}catch(p){let d=`Failed to get missing value for '--${e.long}': ${p.message}`;return Ya.err({errors:[{nodes:[],message:d}]})}for(let p of n)r.add(p);let a=[],c=[],l=[];for(let p of n){let d=(i=p.value)===null||i===void 0?void 0:i.node.raw;if(d===void 0){l.push(p);continue}a.push(d)}if(l.length>0)c.push({nodes:l,message:"Expected to get a value, found a flag"});if(c.length>0)return Ya.err({errors:c});let u=await Ya.safeAsync(e.type.from(a));if(Ya.isErr(u))return Ya.err({errors:[{nodes:n,message:u.error.message}]});return u}}}});var Iq=F(function(Xs){var tke=Xs&&Xs.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),rke=Xs&&Xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),nke=Xs&&Xs.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")tke(r,t,i[n])}return rke(r,t),r}}();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.union=ike;var Eq=nke(xi()),Rq=gg();function ike(e,{combineErrors:t=(r)=>r.join(`
19
- `)}={}){return{...Object.assign({},...e.map((i)=>(0,Rq.typeDef)(i))),async from(i){let n=[];for(let o of e){let s=await Eq.safeAsync((0,Rq.fromFn)(o)(i));if(Eq.isOk(s))return s.value;n.push(s.error.message)}throw Error(t(n))}}}});var Oq=F(function(Aq){Object.defineProperty(Aq,"__esModule",{value:!0});Aq.oneOf=ske;var oke=ur("node:util");function ske(e){let t=e.map((r)=>(0,oke.inspect)(r)).join(", ");return{async from(r){let i=e.find((n)=>n===r);if(!i)throw Error(`Invalid value '${r}'. Expected one of: ${t}`);return i},description:`One of ${t}`}}});var Dq=F(function(Qs){var cke=Qs&&Qs.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),lke=Qs&&Qs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uke=Qs&&Qs.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")cke(r,t,i[n])}return lke(r,t),r}}();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.rest=dke;var pke=uke(xi());function dke(e){return{helpTopics(){var t,r;return[{usage:`[...${(t=e===null||e===void 0?void 0:e.displayName)!==null&&t!==void 0?t:"arg"}]`,category:"arguments",defaults:[],description:(r=e===null||e===void 0?void 0:e.description)!==null&&r!==void 0?r:"catches the rest of the values"}]},register(){},async parse(t){let r=[...t.visitedNodes].map((s)=>t.nodes.indexOf(s)).filter((s)=>s>-1),i=[],n=Math.max(-1,...r),o=t.nodes.slice(n+1);for(let s of o)switch(s.type){case"positionalArgument":{i.push(s.raw),t.visitedNodes.add(s);break}case"longOption":{i.push(...mR(s)),t.visitedNodes.add(s);break}case"shortOption":{i.push(...mR(s)),t.visitedNodes.add(s);break}case"forcePositional":{i.push(s.raw),t.visitedNodes.add(s);break}case"shortOptions":{let a=s.options.at(-1);t.visitedNodes.add(s),i.push(...mR({...s,value:a===null||a===void 0?void 0:a.value}));break}}return pke.ok(i)}}}function mR(e){if(!e.value)return[e.raw];if(e.value.delimiter.raw===" ")return[e.raw.slice(0,e.value.index-e.index),e.value.node.raw];return[e.raw]}});var ts=F(function(je){var fke=je&&je.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),mke=je&&je.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))fke(t,e,r)};Object.defineProperty(je,"__esModule",{value:!0});je.rest=je.oneOf=je.union=je.multioption=je.multiflag=je.restPositionals=je.parse=je.run=je.runSafely=je.dryRun=je.positional=je.option=je.defaultHelpFormatter=je.resetHelpFormatter=je.setDefaultHelpFormatter=je.flag=je.command=je.binary=je.extendType=je.subcommands=void 0;var gke=Y9();Object.defineProperty(je,"subcommands",{enumerable:!0,get:function(){return gke.subcommands}});var hke=gg();Object.defineProperty(je,"extendType",{enumerable:!0,get:function(){return hke.extendType}});mke(bl(),je);var yke=Q9();Object.defineProperty(je,"binary",{enumerable:!0,get:function(){return yke.binary}});var vke=rq();Object.defineProperty(je,"command",{enumerable:!0,get:function(){return vke.command}});var wke=ab();Object.defineProperty(je,"flag",{enumerable:!0,get:function(){return wke.flag}});var gR=cb();Object.defineProperty(je,"setDefaultHelpFormatter",{enumerable:!0,get:function(){return gR.setDefaultHelpFormatter}});Object.defineProperty(je,"resetHelpFormatter",{enumerable:!0,get:function(){return gR.resetHelpFormatter}});Object.defineProperty(je,"defaultHelpFormatter",{enumerable:!0,get:function(){return gR.defaultHelpFormatter}});var bke=nq();Object.defineProperty(je,"option",{enumerable:!0,get:function(){return bke.option}});var kke=uR();Object.defineProperty(je,"positional",{enumerable:!0,get:function(){return kke.positional}});var yb=$q();Object.defineProperty(je,"dryRun",{enumerable:!0,get:function(){return yb.dryRun}});Object.defineProperty(je,"runSafely",{enumerable:!0,get:function(){return yb.runSafely}});Object.defineProperty(je,"run",{enumerable:!0,get:function(){return yb.run}});Object.defineProperty(je,"parse",{enumerable:!0,get:function(){return yb.parse}});var Ske=xq();Object.defineProperty(je,"restPositionals",{enumerable:!0,get:function(){return Ske.restPositionals}});var $ke=Pq();Object.defineProperty(je,"multiflag",{enumerable:!0,get:function(){return $ke.multiflag}});var xke=_q();Object.defineProperty(je,"multioption",{enumerable:!0,get:function(){return xke.multioption}});var Pke=Iq();Object.defineProperty(je,"union",{enumerable:!0,get:function(){return Pke.union}});var Cke=Oq();Object.defineProperty(je,"oneOf",{enumerable:!0,get:function(){return Cke.oneOf}});var _ke=Dq();Object.defineProperty(je,"rest",{enumerable:!0,get:function(){return _ke.rest}})});var Co;var kg=I(()=>{Co={name:"allagents",version:"1.20.1-next.34",packageManager:"bun@1.4.0",description:"CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",type:"module",bin:{allagents:"dist/index.js"},files:["dist"],scripts:{build:"bun run scripts/build-package.ts","package:check":"bun run scripts/check-package-size.ts","package:smoke":"bun run scripts/smoke-packed-package.mjs","docs:install":"bun install --cwd docs --frozen-lockfile","docs:build":"bun run docs:install && bun run --cwd docs build",dev:"bun run src/cli/index.ts",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage","test:e2e":"bun test tests/e2e","bench:update":"bun run scripts/benchmark-update-noop.ts","smoke:mcp-oauth":"bun run scripts/smoke-mcp-oauth.ts","dev:mcp-server":"bun run scripts/dev-mcp-server.ts","schema:generate":"bun run scripts/generate-workspace-schemas.ts","schema:check":"bun run scripts/generate-workspace-schemas.ts --check",typecheck:"tsc --noEmit",lint:"biome lint src","lint:fix":"biome lint --write src",format:"biome format --write src",check:"biome check src","check:fix":"biome check --write src",prepare:"bun run build",prepublishOnly:`test "$ALLOW_PUBLISH" = '1' || (echo 'ERROR: Use the GitHub Actions Publish workflow' && exit 1)`,"publish:latest":"bun run build && bun scripts/publish.ts latest","publish:next":"bun run build && bun scripts/publish.ts next","promote:latest":"bun scripts/tag-channel.ts latest"},keywords:["cli","ai","agents","workspace","plugins","multi-repo","claude","copilot","codex"],author:"",license:"MIT",repository:{type:"git",url:"git+https://github.com/allagentsdev/allagents.git"},homepage:"https://allagents.dev",devDependencies:{"@biomejs/biome":"^2.5.13","@clack/prompts":"^1.8.1","@modelcontextprotocol/sdk":"^1.30.0","@types/bun":"1.4.2","@types/js-yaml":"^4.0.9","@types/node":"^22.0.0","@types/picomatch":"^4.0.3",ajv:"8.20.0",chalk:"^6.0.0","cmd-ts":"^0.15.0",execa:"^10.0.1","gray-matter":"^4.0.3","js-yaml":"^5.4.1",json5:"^2.2.3",picomatch:"^4.0.3","read-cmd-shim":"^7.0.0","simple-git":"^4.0.2",tinyglobby:"^0.2.17",typescript:"^7.0.2",zod:"^4.6.5"},engines:{node:">=22.0.0",bun:">=1.0.0"}}});var Tq,Nq=(e)=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Mq=(e)=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var jq=I(()=>{Tq=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(t)=>{let r=0;e.lastIndex=0;while(e.test(t))r+=1;return t.length-r}})()});var Rke,Ike,Fq,Ake,zq,Oke,Dke,Tke,Uq=(e,t={},r={})=>{let i=t.limit??1/0,n=t.ellipsis??"",o=t?.ellipsisWidth??(n?Uq(n,Tke,r).width:0),s=0,a=r.controlWidth??0,c=r.tabWidth??8,l=r.emojiWidth??2,u=2,p=r.regularWidth??1,d=r.wideWidth??2,f=[[Oke,p],[Rke,0],[Ike,a],[Ake,c],[zq,l],[Fq,d]],m=0,g=0,h=e.length,y=0,v=!1,w=h,x=Math.max(0,i-o),b=0,k=0,A=0,N=0;e:while(!0){if(k>b||g>=h&&g>m){let C=e.slice(b,k)||e.slice(m,g);y=0;for(let P of C.replaceAll(Dke,"")){let E=P.codePointAt(0)||0;if(Nq(E))N=2;else if(Mq(E))N=d;else N=p;if(A+N>x)w=Math.min(w,Math.max(b,m)+y);if(A+N>i){v=!0;break e}y+=P.length,A+=N}b=k=0}if(g>=h)break e;for(let C=0,P=f.length;C<P;C++){let[E,O]=f[C];if(E.lastIndex=g,E.test(e)){if(y=E===Fq?Tq(e.slice(g,E.lastIndex)):E===zq?1:E.lastIndex-g,N=y*O,A+N>x)w=Math.min(w,g+Math.floor((x-A)/O));if(A+N>i){v=!0;break e}A+=N,b=m,k=g,g=m=E.lastIndex;continue e}}g+=1}return{width:v?x:A,index:v?w:h,truncated:v,ellipsed:v&&i>=o}},Lq;var Bq=I(()=>{jq();Rke=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Ike=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Fq=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Ake=/\t{1,1000}/y,zq=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Oke=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Dke=/\p{M}+/gu,Tke={limit:1/0,ellipsis:""},Lq=Uq});var Nke,Mke=(e,t={})=>Lq(e,Nke,t).width,Pr;var hR=I(()=>{Bq();Nke={limit:1/0,ellipsis:"",ellipsisWidth:0},Pr=Mke});function _o(e,t,r){return String(e).normalize().split(Lke).map((i)=>Uke(i,t,r)).join(`
19
+ `)}={}){return{...Object.assign({},...e.map((i)=>(0,Rq.typeDef)(i))),async from(i){let n=[];for(let o of e){let s=await Eq.safeAsync((0,Rq.fromFn)(o)(i));if(Eq.isOk(s))return s.value;n.push(s.error.message)}throw Error(t(n))}}}});var Oq=F(function(Aq){Object.defineProperty(Aq,"__esModule",{value:!0});Aq.oneOf=ske;var oke=ur("node:util");function ske(e){let t=e.map((r)=>(0,oke.inspect)(r)).join(", ");return{async from(r){let i=e.find((n)=>n===r);if(!i)throw Error(`Invalid value '${r}'. Expected one of: ${t}`);return i},description:`One of ${t}`}}});var Dq=F(function(Qs){var cke=Qs&&Qs.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),lke=Qs&&Qs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uke=Qs&&Qs.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n))i[i.length]=n;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),n=0;n<i.length;n++)if(i[n]!=="default")cke(r,t,i[n])}return lke(r,t),r}}();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.rest=dke;var pke=uke(xi());function dke(e){return{helpTopics(){var t,r;return[{usage:`[...${(t=e===null||e===void 0?void 0:e.displayName)!==null&&t!==void 0?t:"arg"}]`,category:"arguments",defaults:[],description:(r=e===null||e===void 0?void 0:e.description)!==null&&r!==void 0?r:"catches the rest of the values"}]},register(){},async parse(t){let r=[...t.visitedNodes].map((s)=>t.nodes.indexOf(s)).filter((s)=>s>-1),i=[],n=Math.max(-1,...r),o=t.nodes.slice(n+1);for(let s of o)switch(s.type){case"positionalArgument":{i.push(s.raw),t.visitedNodes.add(s);break}case"longOption":{i.push(...mR(s)),t.visitedNodes.add(s);break}case"shortOption":{i.push(...mR(s)),t.visitedNodes.add(s);break}case"forcePositional":{i.push(s.raw),t.visitedNodes.add(s);break}case"shortOptions":{let a=s.options.at(-1);t.visitedNodes.add(s),i.push(...mR({...s,value:a===null||a===void 0?void 0:a.value}));break}}return pke.ok(i)}}}function mR(e){if(!e.value)return[e.raw];if(e.value.delimiter.raw===" ")return[e.raw.slice(0,e.value.index-e.index),e.value.node.raw];return[e.raw]}});var ts=F(function(je){var fke=je&&je.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),mke=je&&je.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))fke(t,e,r)};Object.defineProperty(je,"__esModule",{value:!0});je.rest=je.oneOf=je.union=je.multioption=je.multiflag=je.restPositionals=je.parse=je.run=je.runSafely=je.dryRun=je.positional=je.option=je.defaultHelpFormatter=je.resetHelpFormatter=je.setDefaultHelpFormatter=je.flag=je.command=je.binary=je.extendType=je.subcommands=void 0;var gke=Y9();Object.defineProperty(je,"subcommands",{enumerable:!0,get:function(){return gke.subcommands}});var hke=gg();Object.defineProperty(je,"extendType",{enumerable:!0,get:function(){return hke.extendType}});mke(bl(),je);var yke=Q9();Object.defineProperty(je,"binary",{enumerable:!0,get:function(){return yke.binary}});var vke=rq();Object.defineProperty(je,"command",{enumerable:!0,get:function(){return vke.command}});var wke=ab();Object.defineProperty(je,"flag",{enumerable:!0,get:function(){return wke.flag}});var gR=cb();Object.defineProperty(je,"setDefaultHelpFormatter",{enumerable:!0,get:function(){return gR.setDefaultHelpFormatter}});Object.defineProperty(je,"resetHelpFormatter",{enumerable:!0,get:function(){return gR.resetHelpFormatter}});Object.defineProperty(je,"defaultHelpFormatter",{enumerable:!0,get:function(){return gR.defaultHelpFormatter}});var bke=nq();Object.defineProperty(je,"option",{enumerable:!0,get:function(){return bke.option}});var kke=uR();Object.defineProperty(je,"positional",{enumerable:!0,get:function(){return kke.positional}});var yb=$q();Object.defineProperty(je,"dryRun",{enumerable:!0,get:function(){return yb.dryRun}});Object.defineProperty(je,"runSafely",{enumerable:!0,get:function(){return yb.runSafely}});Object.defineProperty(je,"run",{enumerable:!0,get:function(){return yb.run}});Object.defineProperty(je,"parse",{enumerable:!0,get:function(){return yb.parse}});var Ske=xq();Object.defineProperty(je,"restPositionals",{enumerable:!0,get:function(){return Ske.restPositionals}});var $ke=Pq();Object.defineProperty(je,"multiflag",{enumerable:!0,get:function(){return $ke.multiflag}});var xke=_q();Object.defineProperty(je,"multioption",{enumerable:!0,get:function(){return xke.multioption}});var Pke=Iq();Object.defineProperty(je,"union",{enumerable:!0,get:function(){return Pke.union}});var Cke=Oq();Object.defineProperty(je,"oneOf",{enumerable:!0,get:function(){return Cke.oneOf}});var _ke=Dq();Object.defineProperty(je,"rest",{enumerable:!0,get:function(){return _ke.rest}})});var Co;var kg=I(()=>{Co={name:"allagents",version:"1.21.0-next.35",packageManager:"bun@1.4.0",description:"CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",type:"module",bin:{allagents:"dist/index.js"},files:["dist"],scripts:{build:"bun run scripts/build-package.ts","package:check":"bun run scripts/check-package-size.ts","package:smoke":"bun run scripts/smoke-packed-package.mjs","docs:install":"bun install --cwd docs --frozen-lockfile","docs:build":"bun run docs:install && bun run --cwd docs build",dev:"bun run src/cli/index.ts",test:"bun test","test:watch":"bun test --watch","test:coverage":"bun test --coverage","test:e2e":"bun test tests/e2e","bench:update":"bun run scripts/benchmark-update-noop.ts","smoke:mcp-oauth":"bun run scripts/smoke-mcp-oauth.ts","dev:mcp-server":"bun run scripts/dev-mcp-server.ts","schema:generate":"bun run scripts/generate-workspace-schemas.ts","schema:check":"bun run scripts/generate-workspace-schemas.ts --check",typecheck:"tsc --noEmit",lint:"biome lint src","lint:fix":"biome lint --write src",format:"biome format --write src",check:"biome check src","check:fix":"biome check --write src",prepare:"bun run build",prepublishOnly:`test "$ALLOW_PUBLISH" = '1' || (echo 'ERROR: Use the GitHub Actions Publish workflow' && exit 1)`,"publish:latest":"bun run build && bun scripts/publish.ts latest","publish:next":"bun run build && bun scripts/publish.ts next","promote:latest":"bun scripts/tag-channel.ts latest"},keywords:["cli","ai","agents","workspace","plugins","multi-repo","claude","copilot","codex"],author:"",license:"MIT",repository:{type:"git",url:"git+https://github.com/allagentsdev/allagents.git"},homepage:"https://allagents.dev",devDependencies:{"@biomejs/biome":"^2.5.13","@clack/prompts":"^1.8.1","@modelcontextprotocol/sdk":"^1.30.0","@types/bun":"1.4.2","@types/js-yaml":"^4.0.9","@types/node":"^22.0.0","@types/picomatch":"^4.0.3",ajv:"8.20.0",chalk:"^6.0.0","cmd-ts":"^0.15.0",execa:"^10.0.1","gray-matter":"^4.0.3","js-yaml":"^5.4.1",json5:"^2.2.3",picomatch:"^4.0.3","read-cmd-shim":"^7.0.0","simple-git":"^4.0.2",tinyglobby:"^0.2.17",typescript:"^7.0.2",zod:"^4.6.5"},engines:{node:">=22.0.0",bun:">=1.0.0"}}});var Tq,Nq=(e)=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Mq=(e)=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var jq=I(()=>{Tq=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return(t)=>{let r=0;e.lastIndex=0;while(e.test(t))r+=1;return t.length-r}})()});var Rke,Ike,Fq,Ake,zq,Oke,Dke,Tke,Uq=(e,t={},r={})=>{let i=t.limit??1/0,n=t.ellipsis??"",o=t?.ellipsisWidth??(n?Uq(n,Tke,r).width:0),s=0,a=r.controlWidth??0,c=r.tabWidth??8,l=r.emojiWidth??2,u=2,p=r.regularWidth??1,d=r.wideWidth??2,f=[[Oke,p],[Rke,0],[Ike,a],[Ake,c],[zq,l],[Fq,d]],m=0,g=0,h=e.length,y=0,v=!1,w=h,x=Math.max(0,i-o),b=0,k=0,A=0,N=0;e:while(!0){if(k>b||g>=h&&g>m){let C=e.slice(b,k)||e.slice(m,g);y=0;for(let P of C.replaceAll(Dke,"")){let E=P.codePointAt(0)||0;if(Nq(E))N=2;else if(Mq(E))N=d;else N=p;if(A+N>x)w=Math.min(w,Math.max(b,m)+y);if(A+N>i){v=!0;break e}y+=P.length,A+=N}b=k=0}if(g>=h)break e;for(let C=0,P=f.length;C<P;C++){let[E,O]=f[C];if(E.lastIndex=g,E.test(e)){if(y=E===Fq?Tq(e.slice(g,E.lastIndex)):E===zq?1:E.lastIndex-g,N=y*O,A+N>x)w=Math.min(w,g+Math.floor((x-A)/O));if(A+N>i){v=!0;break e}A+=N,b=m,k=g,g=m=E.lastIndex;continue e}}g+=1}return{width:v?x:A,index:v?w:h,truncated:v,ellipsed:v&&i>=o}},Lq;var Bq=I(()=>{jq();Rke=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Ike=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Fq=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Ake=/\t{1,1000}/y,zq=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Oke=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Dke=/\p{M}+/gu,Tke={limit:1/0,ellipsis:""},Lq=Uq});var Nke,Mke=(e,t={})=>Lq(e,Nke,t).width,Pr;var hR=I(()=>{Bq();Nke={limit:1/0,ellipsis:"",ellipsisWidth:0},Pr=Mke});function _o(e,t,r){return String(e).normalize().split(Lke).map((i)=>Uke(i,t,r)).join(`
20
20
  `)}var vb="\x1B",Gq="›",jke=39,vR="\x07",Zq="[",Fke="]",Kq="m",wR,qq,Vq=(e)=>{if(e>=30&&e<=37)return 39;if(e>=90&&e<=97)return 39;if(e>=40&&e<=47)return 49;if(e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0;return},Wq=(e)=>`${vb}${Zq}${e}${Kq}`,Hq=(e)=>`${vb}${wR}${e}${vR}`,yR=(e,t,r)=>{let i=t[Symbol.iterator](),n=!1,o=!1,s=e.at(-1),a=s===void 0?0:Pr(s),c=i.next(),l=i.next(),u=0;while(!c.done){let p=c.value,d=Pr(p);if(a+d<=r)e[e.length-1]+=p;else e.push(p),a=0;if(p===vb||p===Gq)n=!0,o=t.startsWith(wR,u+1);if(n){if(o){if(p===vR)n=!1,o=!1}else if(p===Kq)n=!1}else if(a+=d,a===r&&!l.done)e.push(""),a=0;c=l,l=i.next(),u+=p.length}if(s=e.at(-1),!a&&s!==void 0&&s.length&&e.length>1)e[e.length-2]+=e.pop()},zke=(e)=>{let t=e.split(" "),r=t.length;while(r){if(Pr(t[r-1]))break;r--}if(r===t.length)return e;return t.slice(0,r).join(" ")+t.slice(r).join("")},Uke=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,o,s=e.split(" "),a=[""],c=0;for(let p=0;p<s.length;p++){let d=s[p];if(r.trim!==!1){let m=a.at(-1)??"",g=m.trimStart();if(m.length!==g.length)a[a.length-1]=g,c=Pr(g)}if(p!==0){if(c>=t&&(r.wordWrap===!1||r.trim===!1))a.push(""),c=0;if(c||r.trim===!1)a[a.length-1]+=" ",c++}let f=Pr(d);if(r.hard&&f>t){let m=t-c,g=1+Math.floor((f-m-1)/t);if(Math.floor((f-1)/t)<g)a.push("");yR(a,d,t),c=Pr(a.at(-1)??"");continue}if(c+f>t&&c&&f){if(r.wordWrap===!1&&c<t){yR(a,d,t),c=Pr(a.at(-1)??"");continue}a.push(""),c=0}if(c+f>t&&r.wordWrap===!1){yR(a,d,t),c=Pr(a.at(-1)??"");continue}a[a.length-1]+=d,c+=f}if(r.trim!==!1)a=a.map((p)=>zke(p));let l=a.join(`
21
21
  `),u=!1;for(let p=0;p<l.length;p++){let d=l[p];if(i+=d,!u){if(u=d>="\uD800"&&d<="\uDBFF",u)continue}else u=!1;if(d===vb||d===Gq){qq.lastIndex=p+1;let m=qq.exec(l)?.groups;if(m?.code!==void 0){let g=Number.parseFloat(m.code);n=g===jke?void 0:g}else if(m?.uri!==void 0)o=m.uri.length===0?void 0:m.uri}if(l[p+1]===`
22
22
  `){if(o)i+=Hq("");let f=n?Vq(n):void 0;if(n&&f)i+=Wq(f)}else if(d===`
@@ -233,12 +233,12 @@ ${" ".repeat(e.indent*t)}`}function l0e(e,t,r,i,n,o){return{node:t,parent:r,leve
233
233
  `:" ";i+=`---${p}${u}
234
234
  `}else i+=ra(r,0,s.contents,null,{block:!0,compact:!0}).text+`
235
235
  `;if(n=s.explicitEnd||r.openEnded,n)i+=`...
236
- `}return i}function y0e(e,t){let r=String(e),i=String(t);if(r<i)return-1;if(r>i)return 1;return 0}function ze(e,t={}){let r={...h0e,...t},i=yxe(e,r.schema,{noRefs:r.noRefs,skipInvalid:r.skipInvalid});if(r.flowLevel>=0)T3(i,(n,o)=>{if(o.depth<r.flowLevel)return;if(n.kind==="sequence"||n.kind==="mapping")n.style=ii.FLOW;return eV});if(r.sortKeys){let n=r.sortKeys===!0?y0e:r.sortKeys;T3(i,(o)=>{if(o.kind!=="mapping")return;o.items.sort((s,a)=>n(s.key.kind==="scalar"?s.key.value:"",a.key.kind==="scalar"?a.key.value:""))})}return r.transform(i),g0e(i,{...lI(r,Object.keys(TI)),schema:r.schema})}var ft,ESe,RSe,ISe,ASe,OSe,DSe,TSe,NSe,MSe,jSe,FSe,zSe,USe,LSe,BSe,qSe,VSe,F3,GSe,ZSe,YSe,XSe,aI,t$e,r$e,z3,o$e,s$e,l$e,u$e,p$e,cI,bI,m$e,kI,y$e,v$e,SI,b$e,$I,xI,k$e,PI,Mb=class e{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){let r=x$e(t),i=[],n=S$e(),o=$$e();for(let u of r){if(u.nodeKind==="scalar"&&u.implicit){if(u.matchByTagPrefix)throw Error("Implicit scalar tags cannot match by tag prefix");i.push(u)}switch(u.nodeKind){case"scalar":if(u.matchByTagPrefix)o.scalar.push(u);else n.scalar[u.tagName]=u;break;case"sequence":if(u.matchByTagPrefix)o.sequence.push(u);else n.sequence[u.tagName]=u;break;case"mapping":if(u.matchByTagPrefix)o.mapping.push(u);else n.mapping[u.tagName]=u;break}}let s=i.filter((u)=>u.implicitFirstChars===null),a=new Set;for(let u of i)if(u.implicitFirstChars!==null)for(let p of u.implicitFirstChars)a.add(p);let c=new Map;for(let u of a)c.set(u,i.filter((p)=>p.implicitFirstChars===null||p.implicitFirstChars.indexOf(u)!==-1));let l=n.scalar["tag:yaml.org,2002:str"];if(!l)throw Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=r,this.implicitScalarTags=i,this.implicitScalarByFirstChar=c,this.implicitScalarAnyFirstChar=s,this.defaultScalarTag=l,this.defaultSequenceTag=n.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=n.mapping["tag:yaml.org,2002:map"],this.exact=n,this.prefix=o}lookupScalarTag(t){let r=this.exact.scalar[t];if(r)return r;for(let i of this.prefix.scalar)if(t.startsWith(i.tagName))return i}lookupSequenceTag(t){let r=this.exact.sequence[t];if(r)return r;for(let i of this.prefix.sequence)if(t.startsWith(i.tagName))return i}lookupMappingTag(t){let r=this.exact.mapping[t];if(r)return r;for(let i of this.prefix.mapping)if(t.startsWith(i.tagName))return i}resolveImplicitScalarTag(t){let r=this.implicitScalarByFirstChar.get(t.charAt(0))??this.implicitScalarAnyFirstChar;for(let n of r){let o=n.resolve(t,!1,n.tagName);if(o!==ft)return{value:o,tag:n}}let i=this.defaultScalarTag;return{value:i.resolve(t,!1,i.tagName),tag:i}}withTags(...t){let r=[];for(let i of t)r=r.concat(i);return new e([...this.tags,...r])}},CI,Ppt,_I,P$e,C$e,Cpt,_pt,_$e,ec,dr,Re,ii,Ci,R$e=-1,U3,L3,j$e,Bp=-1,F$e="tag:yaml.org,2002:merge",RI,ht=-1,H3,Wp=1,uI=2,G3=3,Ab=4,V$e,W$e,Z3,pI,K3,H$e,G$e,Z$e,II,fxe,Al,vxe,eV,N3,Cxe="[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]",_xe="[\\n\\r]",Exe="\\uFEFF",OI="[ \\t]",rV,Fb,nV="[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]",iV="[-?:,\\[\\]{}#&*!|>'\"%@`]",Rxe="[,\\[\\]{}]",mI,gI,Ixe,Axe,oV,sV,aV,cV,lV,uV,Oxe,Dxe,Txe,Nxe,Mxe,jxe,Fxe,zxe,Uxe,Lxe,Bxe,qxe,Vxe,Wxe,DI,i0e,Db=10,TI,h0e,Ept,Rpt,Ipt,Apt,Opt,Dpt,Tpt,Npt,Mpt,jpt,Fpt,zpt,Upt,Lpt,Bpt,qpt;var rs=I(()=>{/*! js-yaml 5.4.2 https://github.com/nodeca/js-yaml @license MIT */ft=Symbol("NOT_RESOLVED");ESe=Sn("tag:yaml.org,2002:str",{resolve:(e)=>e,identify:(e)=>typeof e==="string"}),RSe=["","~","null","Null","NULL"],ISe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:(e)=>{if(RSe.indexOf(e)!==-1)return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),ASe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>{if(e==="null"||t&&e==="")return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),OSe=["","~","null","Null","NULL"],DSe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:(e)=>{if(OSe.indexOf(e)!==-1)return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),TSe=["true","True","TRUE"],NSe=["false","False","FALSE"],MSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:(e)=>{if(TSe.indexOf(e)!==-1)return!0;if(NSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),jSe=["true"],FSe=["false"],zSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:(e)=>{if(jSe.indexOf(e)!==-1)return!0;if(FSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),USe=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],LSe=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],BSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:(e)=>{if(USe.indexOf(e)!==-1)return!0;if(LSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),qSe=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),VSe=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");F3=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:HSe,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),GSe=new RegExp("^-?(?:0|[1-9][0-9]*)$"),ZSe=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");YSe=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:JSe,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),XSe=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");aI=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:e$e,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),t$e=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r$e=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");z3=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:n$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:i$e}),o$e=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),s$e=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");l$e=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:a$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:c$e}),u$e=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),p$e=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");cI=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:d$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:f$e}),bI=Sn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>{if(e==="<<"||t&&e==="")return"<<";return ft},identify:()=>!1}),m$e=/^[A-Za-z0-9+/]*={0,2}$/;kI=Sn("tag:yaml.org,2002:binary",{resolve:g$e,identify:(e)=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:h$e}),y$e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),v$e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");SI=Sn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:w$e,identify:(e)=>e instanceof Date,represent:(e)=>e.toISOString()}),b$e=wI("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});$I=wI("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let r;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";r=t.keys().next().value}else if(Nb(t)){let i=Object.keys(t);if(i.length!==1)return"cannot resolve an ordered map item";r=i[0]}else return"cannot resolve an ordered map item";if(e.seen.has(r))return"duplicate key in ordered map";return e.seen.add(r),e.list.push(t),""},finalize:(e)=>e.list,identify:()=>!1}),xI=wI("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map){if(t.size!==1)return"cannot resolve a pairs item";return e.push(t.entries().next().value),""}if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";let r=t,i=Object.keys(r);if(i.length!==1)return"cannot resolve a pairs item";return e.push([i[0],r[i[0]]]),""},identify:()=>!1}),k$e=Tb("tag:yaml.org,2002:map",{create:()=>({}),identify:Nb,represent:(e)=>{let t=new Map;for(let r of Object.keys(e))t.set(r,e[r]);return t},addPair:(e,t,r)=>{if(t!==null&&typeof t==="object")return"object-based map does not support complex keys";let i=String(t);if(i==="__proto__")Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[i]=r;return""},has:(e,t)=>{if(t!==null&&typeof t==="object")return!1;return Object.prototype.hasOwnProperty.call(e,String(t))},keys:(e)=>Object.keys(e),get:(e,t)=>{let r=String(t);if(!Object.prototype.hasOwnProperty.call(e,r))return null;return e[r]}}),PI=Tb("tag:yaml.org,2002:set",{create:()=>new Set,identify:(e)=>e instanceof Set,represent:(e)=>{let t=new Map;for(let r of e)t.set(r,null);return t},addPair:(e,t,r)=>{if(r!==null)return"cannot resolve a set item";return e.add(t),""},has:(e,t)=>e.has(t),keys:(e)=>e.keys(),get:()=>null});CI=new Mb([ESe,b$e,k$e]),Ppt=new Mb([...CI.tags,ASe,zSe,YSe,l$e]),_I=new Mb([...CI.tags,ISe,MSe,F3,z3]),P$e=new Mb([...CI.tags,DSe,BSe,aI,cI,SI,bI,kI,$I,xI,PI]),C$e=P$e.withTags({...aI,resolve:(e,t,r)=>{let i=aI.resolve(e,t,r);return i===ft?F3.resolve(e,t,r):i}},{...cI,resolve:(e,t,r)=>{let i=cI.resolve(e,t,r);return i===ft?z3.resolve(e,t,r):i}}),Cpt=Tb("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,r)=>(e.set(t,r),""),has:(e,t)=>e.has(t),keys:(e)=>e.keys(),get:(e,t)=>e.get(t),identify:(e)=>e instanceof Map||Nb(e),represent:(e)=>{if(e instanceof Map)return e;let t=new Map,r=e;for(let i of Object.keys(r))t.set(i,r[i]);return t}});_pt=Tb("tag:yaml.org,2002:map",{create:()=>({}),identify:Nb,represent:(e)=>{let t=new Map;for(let r of Object.keys(e))t.set(r,e[r]);return t},addPair:(e,t,r)=>{let i=$3(t);if(i===null)return"nested arrays are not supported inside keys";if(i==="__proto__")Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[i]=r;return""},has:(e,t)=>{let r=$3(t);return r!==null&&Object.prototype.hasOwnProperty.call(e,r)},keys:(e)=>Object.keys(e),get:(e,t)=>{let r=String(t);if(!Object.prototype.hasOwnProperty.call(e,r))return null;return e[r]}}),_$e={maxLength:79,indent:1,linesBefore:3,linesAfter:2};ec=class e extends Error{reason;mark;constructor(t,r){super();if(this.name="YAMLException",this.reason=t,this.mark=r,this.message=x3(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${x3(this,t)}`}static throwAt(t,r,i,n=""){let o=0,s=0;for(let c=0;c<r;c++){let l=t.charCodeAt(c);if(l===10)o++,s=c+1;else if(l===13){if(o++,t.charCodeAt(c+1)===10)c++;s=c+1}}let a={name:n,buffer:t,position:r,line:o,column:r-s};throw a.snippet=E$e(a),new e(i,a)}},dr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},Re={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},ii={BLOCK:1,FLOW:2},Ci={CLIP:1,STRIP:2,KEEP:3};U3=Array(256),L3=Array(256);for(let e=0;e<256;e++)U3[e]=P3(e)?1:0,L3[e]=P3(e);j$e=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});RI={filename:"",schema:_I,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};H3=Object.prototype.hasOwnProperty,V$e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,W$e=/[,\[\]{}]/,Z3=/^(?:!|!!|![0-9A-Za-z-]+!)$/,pI=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,K3=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,H$e=new RegExp(`^(?:${pI})*$`),G$e=new RegExp(`^(?:${K3})+$`),Z$e=new RegExp(`^(?:!(?:${pI})*|${K3}(?:${pI})*)$`),II={filename:"",maxDepth:100};fxe={...II,...RI};Al=Symbol("INVALID");vxe=Symbol("visit:break"),eV=Symbol("visit:skip");N3={applyQuoteFlowKeysOption:wxe,doubleQuoteForInvisibles:bxe,doubleQuoteWhitespaceOnly:kxe,applyForceQuotesOption:Sxe,tryLongOrMultilineAsBlock:$xe,quoteInvalidPlain:xxe,fallbackToDoubleQuoted:Pxe};rV=`(?:(?!(?:${_xe}|${Exe}))${Cxe})`,Fb=`(?:(?!${OI})${rV})`,mI=Fb,gI=`(?:(?!${Rxe})${Fb})`,Ixe=`(?:(?:(?!${iV})${Fb})|[?:-](?=${mI}))`,Axe=`(?:(?:(?!${iV})${Fb})|[?:-](?=${gI}))`,oV=`(?:(?:(?![:#])${mI})|:(?=${mI}))#*`,sV=`(?:(?:(?![:#])${gI})|:(?=${gI}))#*`,aV=`(?:${OI}*${oV})*`,cV=`(?:${OI}*${sV})*`,lV=`${Ixe}#*${aV}`,uV=`${Axe}#*${cV}`,Oxe=lV,Dxe=uV,Txe=`\\n+${oV}${aV}`,Nxe=`\\n+${sV}${cV}`,Mxe=`${lV}(?:${Txe})*`,jxe=`${uV}(?:${Nxe})*`,Fxe=new RegExp(`^(?:${Mxe})$`,"u"),zxe=new RegExp(`^(?:${jxe})$`,"u"),Uxe=new RegExp(`^(?:${Oxe})$`,"u"),Lxe=new RegExp(`^(?:${Dxe})$`,"u"),Bxe=new RegExp(`^(?:${nV})*$`,"u"),qxe=new RegExp(`^(?:${nV}|\\n)*$`,"u"),Vxe=new RegExp(`^(?:${rV}|\\n)*$`,"u"),Wxe=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/,DI=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;i0e=/["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;TI={indent:2,seqNoIndent:!1,seqInlineFirst:!0,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,scalarStyleRules:Object.keys(N3).map((e)=>Reflect.get(N3,e)),tagBeforeAnchor:!1};h0e={...TI,schema:C$e,skipInvalid:!1,noRefs:!1,flowLevel:-1,sortKeys:!1,transform:()=>{}};Ept=dr.DOCUMENT,Rpt=dr.SEQUENCE,Ipt=dr.MAPPING,Apt=dr.SCALAR,Opt=dr.ALIAS,Dpt=dr.POP,Tpt=Re.PLAIN,Npt=Re.SINGLE_QUOTED,Mpt=Re.DOUBLE_QUOTED,jpt=Re.LITERAL_BLOCK,Fpt=Re.FOLDED_BLOCK,zpt=ii.BLOCK,Upt=ii.FLOW,Lpt=Ci.CLIP,Bpt=Ci.STRIP,qpt=Ci.KEEP});var q={};vn(q,{BIGINT_FORMAT_RANGES:()=>Ng,CONSTANT_CATCH:()=>qb,Class:()=>SV,NUMBER_FORMAT_RANGES:()=>Tg,aborted:()=>zn,allowsEval:()=>FI,assert:()=>S0e,assertEqual:()=>v0e,assertIs:()=>b0e,assertNever:()=>k0e,assertNotEqual:()=>w0e,assignProp:()=>cn,attachSchema:()=>Bb,base64ToUint8Array:()=>bV,base64urlToUint8Array:()=>L0e,cached:()=>Yp,captureStackTrace:()=>Ub,cleanEnum:()=>U0e,cleanRegex:()=>ia,clone:()=>$t,cloneDef:()=>P0e,codePointLength:()=>Fl,constantCatch:()=>qI,createTransparentProxy:()=>A0e,defineLazy:()=>MI,defineLazyInternal:()=>Ge,derived:()=>W0e,esc:()=>Fn,escapeRegex:()=>to,explicitlyAborted:()=>LI,extend:()=>T0e,finalizeIssue:()=>si,floatSafeRemainder:()=>Ag,getElementAtPath:()=>C0e,getEnumValues:()=>Kp,getLengthableOrigin:()=>jg,getParsedType:()=>I0e,getSizableOrigin:()=>Mg,hexToUint8Array:()=>q0e,hide:()=>Fg,installLazyProp:()=>K0e,isObject:()=>jl,isPlainObject:()=>eo,issue:()=>Qp,joinValues:()=>j,jsonStringifyReplacer:()=>Jp,members:()=>BI,merge:()=>M0e,mergeDefs:()=>Io,normalizeParams:()=>te,nullish:()=>zb,numKeys:()=>R0e,objectClone:()=>$0e,omit:()=>D0e,optionalKeys:()=>UI,own:()=>rc,parsedType:()=>W,partial:()=>j0e,pick:()=>O0e,prefixIssues:()=>oi,primitiveTypes:()=>zI,promiseAllObject:()=>_0e,propertyKeyTypes:()=>Dg,randomString:()=>E0e,rawShape:()=>Xp,required:()=>F0e,safeExtend:()=>N0e,shallowClone:()=>Og,slugify:()=>jI,stringifyPrimitive:()=>V,toZod:()=>Ig,uint8ArrayToBase64:()=>kV,uint8ArrayToBase64url:()=>B0e,uint8ArrayToHex:()=>V0e,unwrapMessage:()=>Zp});function v0e(e){return e}function w0e(e){return e}function Ig(){return(e)=>e}function b0e(e){}function k0e(e){throw Error("Unexpected value in exhaustive check")}function S0e(e){}function Kp(e){let t=Object.values(e).filter((i)=>typeof i==="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function j(e,t="|"){return e.map((r)=>V(r)).join(t)}function Jp(e,t){if(typeof t==="bigint")return t.toString();return t}class hV{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;if(e!==void 0)this._value=e(),this._getter=void 0;return this._value}}function Yp(e){return new hV(e)}function zb(e){return e===null||e===void 0}function ia(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Ag(e,t){let r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-i)<n)return 0;return r-i}function MI(e,t,r){let i=void 0;Object.defineProperty(e,t,{get(){if(i===gV)return;if(i===void 0)i=gV,i=r();return i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function $0e(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Xp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function na(e){return Xp(e._zod.def)??e._zod.def.shape}function yV(e,t,r){Object.defineProperty(e,t,{get(){let i=r();return cn(this,t,i),i},enumerable:!0,configurable:!0})}function vV(e,t,r){if(t in e)cn(e,t,r);else e[t]=r}function Ml(e,t,r,i){let n=na(t);for(let o of r){let s=Object.getOwnPropertyDescriptor(n,o);if(!s.enumerable)continue;if(s.get)yV(e,o,()=>{let a=t._zod.def.shape[o];return i?i(a,o):a});else vV(e,o,i?i(s.value,o):s.value)}}function x0e(e,t){for(let r of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,r);if(!i.enumerable)continue;if(i.get)yV(e,r,()=>t[r]);else vV(e,r,i.value)}}function Io(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function P0e(e){return Io(e._zod.def)}function C0e(e,t){if(!t)return e;return t.reduce((r,i)=>r?.[i],e)}function _0e(e){let t=Object.keys(e),r=t.map((i)=>e[i]);return Promise.all(r).then((i)=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function E0e(e=10){let r="";for(let i=0;i<e;i++)r+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return r}function Fn(e){return JSON.stringify(e)}function jI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function jl(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function eo(e){if(jl(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(jl(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function Og(e){if(eo(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function R0e(e){let t=0;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))t++;return t}function to(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(e,t,r){let i=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)i._zod.parent=e;return i}function te(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function A0e(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function V(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function UI(e){return Object.keys(e).filter((t)=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function O0e(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return Ml(o,e,Lb(e,t)),$t(e,Io(r,{shape:o,checks:[]}))}function Lb(e,t){let r=na(e),i=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw Error(`Unrecognized key: "${String(n)}"`);if(t[n])i.push(n)}return i}function D0e(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Lb(e,t)),s={};return Ml(s,e,Reflect.ownKeys(na(e)).filter((a)=>!o.has(a))),$t(e,Io(r,{shape:s,checks:[]}))}function T0e(e,t){if(!eo(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=na(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return $t(e,Io(e._zod.def,{shape:wV(e,t)}))}function wV(e,t){let r={};return Ml(r,e,Reflect.ownKeys(na(e))),x0e(r,t),r}function N0e(e,t){if(!eo(t))throw Error("Invalid input to safeExtend: expected a plain object");return $t(e,Io(e._zod.def,{shape:wV(e,t)}))}function M0e(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Ml(r,e,Reflect.ownKeys(na(e))),Ml(r,t,Reflect.ownKeys(na(t)));let i=Io(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return $t(e,i)}function j0e(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let a=r?new Set(Lb(t,r)):void 0,c={};return Ml(c,t,Reflect.ownKeys(na(t)),e&&((l,u)=>a&&!a.has(u)?l:new e({type:"optional",innerType:l}))),$t(t,Io(t._zod.def,{shape:c,checks:[]}))}function F0e(e,t,r){let i=r?new Set(Lb(t,r)):void 0,n={};return Ml(n,t,Reflect.ownKeys(na(t)),(o,s)=>i&&!i.has(s)?o:new e({type:"nonoptional",innerType:o})),$t(t,Io(t._zod.def,{shape:n}))}function zn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function LI(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function oi(e,t){return t.map((r)=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Zp(e){return typeof e==="string"?e:e?.message}function Bb(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function si(e,t,r){var i;let n=e.inst?._zod?.traits;if(n?.has("$ZodType"))if(n.has("$ZodCheck"))(i=e).schema??(i.schema=e.inst);else e.schema=e.inst;let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:Zp(e.inst?._zod.def?.error?.(e))??Zp(o?.(e))??Zp(t?.error?.(e))??Zp(r.customError?.(e))??Zp(r.localeError?.(e))??"Invalid input",a={};for(let c of Object.keys(e)){if(c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__")continue;a[c]=e[c]}if(a.path??(a.path=[]),a.message=s,t?.reportInput)a.input=e.input;return a}function Mg(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Fl(e){let t=e.length;if(!z0e.test(e))return t;let r=t;for(let i=0;i<t-1;i++)if((e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320)r--,i++;return r}function jg(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function W(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Qp(...e){let[t,r,i]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:i};return{...t}}function U0e(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function bV(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function kV(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function L0e(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return bV(t+r)}function B0e(e){return kV(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function q0e(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function V0e(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,"0")).join("")}class SV{constructor(...e){}}function BI(e,t){for(let r in t){let i=Object.getOwnPropertyDescriptor(t,r);if(i.get)Object.defineProperty(e,r,{...i,enumerable:!1});else H0e(e,r,i.value)}}function rc(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function Fg(e,t,r){return rc(e,t,r,!1)}function W0e(e,t){for(let r in e){let i=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return rc(this,r,i(this))},set(n){rc(this,r,n)}})}return t}function H0e(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:rc(this,t,r.bind(this))},set(i){rc(this,t,i)}})}function G0e(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}function Ge(e,t,r){let i=Object.getPrototypeOf(e._zod);if(t in i&&NI!==e._zod){NI=void 0;return}NI=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,Z0e);let n=tc;tc=!1;try{let o=r(this);if(tc)delete this[t];else Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o});return tc=tc||n,o}catch(o){throw delete this[t],tc=tc||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function K0e(e,t,r,i){let n=G0e(e,t);if(!n)return;Object.defineProperty(n,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}function qI(e){let t=()=>e;return t[qb]=!0,t}var gV,Ub,FI,I0e=(e)=>{let 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":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},Dg,zI,Tg,Ng,z0e,NI,tc=!1,Z0e,qb="~constantCatch";var se=I(()=>{nc();gV=Symbol("evaluating");Ub="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};FI=Yp(()=>{if(Yr.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});Dg=new Set(["string","number","symbol"]),zI=new Set(["string","number","bigint","boolean","symbol","undefined"]);Tg=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),Ng={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};z0e=/[\uD800-\uDBFF]/;Z0e={configurable:!0,get(){tc=!0;return}}});function J0e(e){let t=xV;if(t){let r=t.stackTraceLimit;if(typeof r==="number"){try{t.stackTraceLimit=0}catch{return xV=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function M(e,t,r,i){let n={};function o(d){this.def=d,this.constr=p,this.traits=new Set}o.prototype=n;let s=r,a=s&&new WeakSet;function c(d,f){if(!d._zod){VI.value=new o(f);try{Object.defineProperty(d,"_zod",VI)}finally{VI.value=void 0}}else if(d._zod.traits.has(e))return;if(d._zod.traits.add(e),t(d,f),a){let g=Object.getPrototypeOf(d),h=d._zod.constr.prototype,y=g;while(y&&y!==h)y=Object.getPrototypeOf(y);let v=y??g;if(!a.has(v))a.add(v),BI(v,s)}let m=p.prototype;for(let g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(!(g in d))d[g]=m[g].bind(d)}}let l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function p(d){let f=i?.Parent?J0e(u):this;c(f,d);let m=f._zod.deferred;if(m){for(let h of m)h();f._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;if(g)g(f);return f}return Object.defineProperty(p,"init",{value:c}),Object.defineProperty(p,Symbol.hasInstance,{value:(d)=>{if(i?.Parent&&d instanceof i.Parent)return!0;return d?._zod?.traits?.has(e)}}),Object.defineProperty(p,"name",{value:e}),p}function fr(e){if(e)Object.assign(Yr,e);return Yr}var $V,zg,VI,xV,WI,_i,zl,Yr;var nc=I(()=>{se();zg=Object.freeze({status:"aborted"}),VI={value:void 0,enumerable:!1},xV="captureStackTrace"in Error?Error:null;WI=Symbol("zod_brand");_i=class _i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};zl=class zl extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};($V=globalThis).__zod_globalConfig??($V.__zod_globalConfig={});Yr=globalThis.__zod_globalConfig});function Y0e(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Jp,2)),e.message}function X0e(e){this._zod.message=e}function ePe(e,t,r){if(!Object.prototype.hasOwnProperty.call(e,t))if(t==="__proto__")Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0});else e[t]=r();return e[t]}function Ug(e,t=(r)=>r.message){let r={},i=[];for(let n of e.issues)if(n.path.length>0)ePe(r,n.path[0],()=>[]).push(t(n));else i.push(t(n));return{formErrors:i,fieldErrors:r}}function Lg(e,t=(r)=>r.message){let r={_errors:[]},i=(n,o=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>i({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l],p=l===a.length-1;if(u==="_errors"){if(p)c._errors.push(t(s));l++;continue}if(!Object.prototype.hasOwnProperty.call(c,u))Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let d=c[u];if(p)d._errors.push(t(s));c=d,l++}}}};return i(e),r}function KI(e,t=(r)=>r.message){let r={errors:[]},i=(n,o=[])=>{var s;for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((c)=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0){r.errors.push(t(a));continue}let l=r,u=0;while(u<c.length){let p=c[u],d=u===c.length-1;if(typeof p==="string"){if(l.properties??(l.properties={}),!Object.prototype.hasOwnProperty.call(l.properties,p))Object.defineProperty(l.properties,p,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0});l=l.properties[p]}else l.items??(l.items=[]),(s=l.items)[p]??(s[p]={errors:[]}),l=l.items[p];if(d)l.errors.push(t(a));u++}}};return i(e),r}function _V(e){let t=[],r=e.map((i)=>typeof i==="object"?i.key:i);for(let i of r)if(typeof i==="number")t.push(`[${i}]`);else if(typeof i==="symbol")t.push(`[${JSON.stringify(String(i))}]`);else if(/[^\w$]/.test(i))t.push(`[${JSON.stringify(i)}]`);else{if(t.length)t.push(".");t.push(i)}return t.join("")}function JI(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)if(t.push(`✖ ${i.message}`),i.path?.length)t.push(` → at ${_V(i.path)}`);return t.join(`
236
+ `}return i}function y0e(e,t){let r=String(e),i=String(t);if(r<i)return-1;if(r>i)return 1;return 0}function ze(e,t={}){let r={...h0e,...t},i=yxe(e,r.schema,{noRefs:r.noRefs,skipInvalid:r.skipInvalid});if(r.flowLevel>=0)T3(i,(n,o)=>{if(o.depth<r.flowLevel)return;if(n.kind==="sequence"||n.kind==="mapping")n.style=ii.FLOW;return eV});if(r.sortKeys){let n=r.sortKeys===!0?y0e:r.sortKeys;T3(i,(o)=>{if(o.kind!=="mapping")return;o.items.sort((s,a)=>n(s.key.kind==="scalar"?s.key.value:"",a.key.kind==="scalar"?a.key.value:""))})}return r.transform(i),g0e(i,{...lI(r,Object.keys(TI)),schema:r.schema})}var ft,ESe,RSe,ISe,ASe,OSe,DSe,TSe,NSe,MSe,jSe,FSe,zSe,USe,LSe,BSe,qSe,VSe,F3,GSe,ZSe,YSe,XSe,aI,t$e,r$e,z3,o$e,s$e,l$e,u$e,p$e,cI,bI,m$e,kI,y$e,v$e,SI,b$e,$I,xI,k$e,PI,Mb=class e{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){let r=x$e(t),i=[],n=S$e(),o=$$e();for(let u of r){if(u.nodeKind==="scalar"&&u.implicit){if(u.matchByTagPrefix)throw Error("Implicit scalar tags cannot match by tag prefix");i.push(u)}switch(u.nodeKind){case"scalar":if(u.matchByTagPrefix)o.scalar.push(u);else n.scalar[u.tagName]=u;break;case"sequence":if(u.matchByTagPrefix)o.sequence.push(u);else n.sequence[u.tagName]=u;break;case"mapping":if(u.matchByTagPrefix)o.mapping.push(u);else n.mapping[u.tagName]=u;break}}let s=i.filter((u)=>u.implicitFirstChars===null),a=new Set;for(let u of i)if(u.implicitFirstChars!==null)for(let p of u.implicitFirstChars)a.add(p);let c=new Map;for(let u of a)c.set(u,i.filter((p)=>p.implicitFirstChars===null||p.implicitFirstChars.indexOf(u)!==-1));let l=n.scalar["tag:yaml.org,2002:str"];if(!l)throw Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=r,this.implicitScalarTags=i,this.implicitScalarByFirstChar=c,this.implicitScalarAnyFirstChar=s,this.defaultScalarTag=l,this.defaultSequenceTag=n.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=n.mapping["tag:yaml.org,2002:map"],this.exact=n,this.prefix=o}lookupScalarTag(t){let r=this.exact.scalar[t];if(r)return r;for(let i of this.prefix.scalar)if(t.startsWith(i.tagName))return i}lookupSequenceTag(t){let r=this.exact.sequence[t];if(r)return r;for(let i of this.prefix.sequence)if(t.startsWith(i.tagName))return i}lookupMappingTag(t){let r=this.exact.mapping[t];if(r)return r;for(let i of this.prefix.mapping)if(t.startsWith(i.tagName))return i}resolveImplicitScalarTag(t){let r=this.implicitScalarByFirstChar.get(t.charAt(0))??this.implicitScalarAnyFirstChar;for(let n of r){let o=n.resolve(t,!1,n.tagName);if(o!==ft)return{value:o,tag:n}}let i=this.defaultScalarTag;return{value:i.resolve(t,!1,i.tagName),tag:i}}withTags(...t){let r=[];for(let i of t)r=r.concat(i);return new e([...this.tags,...r])}},CI,Ppt,_I,P$e,C$e,Cpt,_pt,_$e,ec,dr,Re,ii,Ci,R$e=-1,U3,L3,j$e,Bp=-1,F$e="tag:yaml.org,2002:merge",RI,ht=-1,H3,Wp=1,uI=2,G3=3,Ab=4,V$e,W$e,Z3,pI,K3,H$e,G$e,Z$e,II,fxe,Al,vxe,eV,N3,Cxe="[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]",_xe="[\\n\\r]",Exe="\\uFEFF",OI="[ \\t]",rV,Fb,nV="[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]",iV="[-?:,\\[\\]{}#&*!|>'\"%@`]",Rxe="[,\\[\\]{}]",mI,gI,Ixe,Axe,oV,sV,aV,cV,lV,uV,Oxe,Dxe,Txe,Nxe,Mxe,jxe,Fxe,zxe,Uxe,Lxe,Bxe,qxe,Vxe,Wxe,DI,i0e,Db=10,TI,h0e,Ept,Rpt,Ipt,Apt,Opt,Dpt,Tpt,Npt,Mpt,jpt,Fpt,zpt,Upt,Lpt,Bpt,qpt;var rs=I(()=>{/*! js-yaml 5.4.2 https://github.com/nodeca/js-yaml @license MIT */ft=Symbol("NOT_RESOLVED");ESe=Sn("tag:yaml.org,2002:str",{resolve:(e)=>e,identify:(e)=>typeof e==="string"}),RSe=["","~","null","Null","NULL"],ISe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:(e)=>{if(RSe.indexOf(e)!==-1)return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),ASe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>{if(e==="null"||t&&e==="")return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),OSe=["","~","null","Null","NULL"],DSe=Sn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:(e)=>{if(OSe.indexOf(e)!==-1)return null;return ft},identify:(e)=>e===null,represent:()=>"null"}),TSe=["true","True","TRUE"],NSe=["false","False","FALSE"],MSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:(e)=>{if(TSe.indexOf(e)!==-1)return!0;if(NSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),jSe=["true"],FSe=["false"],zSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:(e)=>{if(jSe.indexOf(e)!==-1)return!0;if(FSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),USe=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],LSe=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],BSe=Sn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:(e)=>{if(USe.indexOf(e)!==-1)return!0;if(LSe.indexOf(e)!==-1)return!1;return ft},identify:(e)=>Object.prototype.toString.call(e)==="[object Boolean]",represent:(e)=>e?"true":"false"}),qSe=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),VSe=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");F3=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:HSe,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),GSe=new RegExp("^-?(?:0|[1-9][0-9]*)$"),ZSe=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");YSe=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:JSe,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),XSe=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");aI=Sn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:e$e,identify:(e)=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:(e)=>e.toString(10)}),t$e=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r$e=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");z3=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:n$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:i$e}),o$e=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),s$e=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");l$e=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:a$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:c$e}),u$e=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),p$e=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");cI=Sn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:d$e,identify:(e)=>typeof e==="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:f$e}),bI=Sn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>{if(e==="<<"||t&&e==="")return"<<";return ft},identify:()=>!1}),m$e=/^[A-Za-z0-9+/]*={0,2}$/;kI=Sn("tag:yaml.org,2002:binary",{resolve:g$e,identify:(e)=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:h$e}),y$e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),v$e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");SI=Sn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:w$e,identify:(e)=>e instanceof Date,represent:(e)=>e.toISOString()}),b$e=wI("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});$I=wI("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let r;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";r=t.keys().next().value}else if(Nb(t)){let i=Object.keys(t);if(i.length!==1)return"cannot resolve an ordered map item";r=i[0]}else return"cannot resolve an ordered map item";if(e.seen.has(r))return"duplicate key in ordered map";return e.seen.add(r),e.list.push(t),""},finalize:(e)=>e.list,identify:()=>!1}),xI=wI("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map){if(t.size!==1)return"cannot resolve a pairs item";return e.push(t.entries().next().value),""}if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";let r=t,i=Object.keys(r);if(i.length!==1)return"cannot resolve a pairs item";return e.push([i[0],r[i[0]]]),""},identify:()=>!1}),k$e=Tb("tag:yaml.org,2002:map",{create:()=>({}),identify:Nb,represent:(e)=>{let t=new Map;for(let r of Object.keys(e))t.set(r,e[r]);return t},addPair:(e,t,r)=>{if(t!==null&&typeof t==="object")return"object-based map does not support complex keys";let i=String(t);if(i==="__proto__")Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[i]=r;return""},has:(e,t)=>{if(t!==null&&typeof t==="object")return!1;return Object.prototype.hasOwnProperty.call(e,String(t))},keys:(e)=>Object.keys(e),get:(e,t)=>{let r=String(t);if(!Object.prototype.hasOwnProperty.call(e,r))return null;return e[r]}}),PI=Tb("tag:yaml.org,2002:set",{create:()=>new Set,identify:(e)=>e instanceof Set,represent:(e)=>{let t=new Map;for(let r of e)t.set(r,null);return t},addPair:(e,t,r)=>{if(r!==null)return"cannot resolve a set item";return e.add(t),""},has:(e,t)=>e.has(t),keys:(e)=>e.keys(),get:()=>null});CI=new Mb([ESe,b$e,k$e]),Ppt=new Mb([...CI.tags,ASe,zSe,YSe,l$e]),_I=new Mb([...CI.tags,ISe,MSe,F3,z3]),P$e=new Mb([...CI.tags,DSe,BSe,aI,cI,SI,bI,kI,$I,xI,PI]),C$e=P$e.withTags({...aI,resolve:(e,t,r)=>{let i=aI.resolve(e,t,r);return i===ft?F3.resolve(e,t,r):i}},{...cI,resolve:(e,t,r)=>{let i=cI.resolve(e,t,r);return i===ft?z3.resolve(e,t,r):i}}),Cpt=Tb("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,r)=>(e.set(t,r),""),has:(e,t)=>e.has(t),keys:(e)=>e.keys(),get:(e,t)=>e.get(t),identify:(e)=>e instanceof Map||Nb(e),represent:(e)=>{if(e instanceof Map)return e;let t=new Map,r=e;for(let i of Object.keys(r))t.set(i,r[i]);return t}});_pt=Tb("tag:yaml.org,2002:map",{create:()=>({}),identify:Nb,represent:(e)=>{let t=new Map;for(let r of Object.keys(e))t.set(r,e[r]);return t},addPair:(e,t,r)=>{let i=$3(t);if(i===null)return"nested arrays are not supported inside keys";if(i==="__proto__")Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[i]=r;return""},has:(e,t)=>{let r=$3(t);return r!==null&&Object.prototype.hasOwnProperty.call(e,r)},keys:(e)=>Object.keys(e),get:(e,t)=>{let r=String(t);if(!Object.prototype.hasOwnProperty.call(e,r))return null;return e[r]}}),_$e={maxLength:79,indent:1,linesBefore:3,linesAfter:2};ec=class e extends Error{reason;mark;constructor(t,r){super();if(this.name="YAMLException",this.reason=t,this.mark=r,this.message=x3(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${x3(this,t)}`}static throwAt(t,r,i,n=""){let o=0,s=0;for(let c=0;c<r;c++){let l=t.charCodeAt(c);if(l===10)o++,s=c+1;else if(l===13){if(o++,t.charCodeAt(c+1)===10)c++;s=c+1}}let a={name:n,buffer:t,position:r,line:o,column:r-s};throw a.snippet=E$e(a),new e(i,a)}},dr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},Re={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},ii={BLOCK:1,FLOW:2},Ci={CLIP:1,STRIP:2,KEEP:3};U3=Array(256),L3=Array(256);for(let e=0;e<256;e++)U3[e]=P3(e)?1:0,L3[e]=P3(e);j$e=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});RI={filename:"",schema:_I,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};H3=Object.prototype.hasOwnProperty,V$e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,W$e=/[,\[\]{}]/,Z3=/^(?:!|!!|![0-9A-Za-z-]+!)$/,pI=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,K3=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,H$e=new RegExp(`^(?:${pI})*$`),G$e=new RegExp(`^(?:${K3})+$`),Z$e=new RegExp(`^(?:!(?:${pI})*|${K3}(?:${pI})*)$`),II={filename:"",maxDepth:100};fxe={...II,...RI};Al=Symbol("INVALID");vxe=Symbol("visit:break"),eV=Symbol("visit:skip");N3={applyQuoteFlowKeysOption:wxe,doubleQuoteForInvisibles:bxe,doubleQuoteWhitespaceOnly:kxe,applyForceQuotesOption:Sxe,tryLongOrMultilineAsBlock:$xe,quoteInvalidPlain:xxe,fallbackToDoubleQuoted:Pxe};rV=`(?:(?!(?:${_xe}|${Exe}))${Cxe})`,Fb=`(?:(?!${OI})${rV})`,mI=Fb,gI=`(?:(?!${Rxe})${Fb})`,Ixe=`(?:(?:(?!${iV})${Fb})|[?:-](?=${mI}))`,Axe=`(?:(?:(?!${iV})${Fb})|[?:-](?=${gI}))`,oV=`(?:(?:(?![:#])${mI})|:(?=${mI}))#*`,sV=`(?:(?:(?![:#])${gI})|:(?=${gI}))#*`,aV=`(?:${OI}*${oV})*`,cV=`(?:${OI}*${sV})*`,lV=`${Ixe}#*${aV}`,uV=`${Axe}#*${cV}`,Oxe=lV,Dxe=uV,Txe=`\\n+${oV}${aV}`,Nxe=`\\n+${sV}${cV}`,Mxe=`${lV}(?:${Txe})*`,jxe=`${uV}(?:${Nxe})*`,Fxe=new RegExp(`^(?:${Mxe})$`,"u"),zxe=new RegExp(`^(?:${jxe})$`,"u"),Uxe=new RegExp(`^(?:${Oxe})$`,"u"),Lxe=new RegExp(`^(?:${Dxe})$`,"u"),Bxe=new RegExp(`^(?:${nV})*$`,"u"),qxe=new RegExp(`^(?:${nV}|\\n)*$`,"u"),Vxe=new RegExp(`^(?:${rV}|\\n)*$`,"u"),Wxe=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/,DI=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;i0e=/["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;TI={indent:2,seqNoIndent:!1,seqInlineFirst:!0,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,scalarStyleRules:Object.keys(N3).map((e)=>Reflect.get(N3,e)),tagBeforeAnchor:!1};h0e={...TI,schema:C$e,skipInvalid:!1,noRefs:!1,flowLevel:-1,sortKeys:!1,transform:()=>{}};Ept=dr.DOCUMENT,Rpt=dr.SEQUENCE,Ipt=dr.MAPPING,Apt=dr.SCALAR,Opt=dr.ALIAS,Dpt=dr.POP,Tpt=Re.PLAIN,Npt=Re.SINGLE_QUOTED,Mpt=Re.DOUBLE_QUOTED,jpt=Re.LITERAL_BLOCK,Fpt=Re.FOLDED_BLOCK,zpt=ii.BLOCK,Upt=ii.FLOW,Lpt=Ci.CLIP,Bpt=Ci.STRIP,qpt=Ci.KEEP});var q={};vn(q,{BIGINT_FORMAT_RANGES:()=>Ng,CONSTANT_CATCH:()=>qb,Class:()=>SV,NUMBER_FORMAT_RANGES:()=>Tg,aborted:()=>zn,allowsEval:()=>FI,assert:()=>S0e,assertEqual:()=>v0e,assertIs:()=>b0e,assertNever:()=>k0e,assertNotEqual:()=>w0e,assignProp:()=>cn,attachSchema:()=>Bb,base64ToUint8Array:()=>bV,base64urlToUint8Array:()=>L0e,cached:()=>Yp,captureStackTrace:()=>Ub,cleanEnum:()=>U0e,cleanRegex:()=>ia,clone:()=>$t,cloneDef:()=>P0e,codePointLength:()=>Fl,constantCatch:()=>qI,createTransparentProxy:()=>A0e,defineLazy:()=>MI,defineLazyInternal:()=>Ze,derived:()=>W0e,esc:()=>Fn,escapeRegex:()=>to,explicitlyAborted:()=>LI,extend:()=>T0e,finalizeIssue:()=>si,floatSafeRemainder:()=>Ag,getElementAtPath:()=>C0e,getEnumValues:()=>Kp,getLengthableOrigin:()=>jg,getParsedType:()=>I0e,getSizableOrigin:()=>Mg,hexToUint8Array:()=>q0e,hide:()=>Fg,installLazyProp:()=>K0e,isObject:()=>jl,isPlainObject:()=>eo,issue:()=>Qp,joinValues:()=>j,jsonStringifyReplacer:()=>Jp,members:()=>BI,merge:()=>M0e,mergeDefs:()=>Io,normalizeParams:()=>te,nullish:()=>zb,numKeys:()=>R0e,objectClone:()=>$0e,omit:()=>D0e,optionalKeys:()=>UI,own:()=>rc,parsedType:()=>W,partial:()=>j0e,pick:()=>O0e,prefixIssues:()=>oi,primitiveTypes:()=>zI,promiseAllObject:()=>_0e,propertyKeyTypes:()=>Dg,randomString:()=>E0e,rawShape:()=>Xp,required:()=>F0e,safeExtend:()=>N0e,shallowClone:()=>Og,slugify:()=>jI,stringifyPrimitive:()=>V,toZod:()=>Ig,uint8ArrayToBase64:()=>kV,uint8ArrayToBase64url:()=>B0e,uint8ArrayToHex:()=>V0e,unwrapMessage:()=>Zp});function v0e(e){return e}function w0e(e){return e}function Ig(){return(e)=>e}function b0e(e){}function k0e(e){throw Error("Unexpected value in exhaustive check")}function S0e(e){}function Kp(e){let t=Object.values(e).filter((i)=>typeof i==="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function j(e,t="|"){return e.map((r)=>V(r)).join(t)}function Jp(e,t){if(typeof t==="bigint")return t.toString();return t}class hV{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;if(e!==void 0)this._value=e(),this._getter=void 0;return this._value}}function Yp(e){return new hV(e)}function zb(e){return e===null||e===void 0}function ia(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Ag(e,t){let r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-i)<n)return 0;return r-i}function MI(e,t,r){let i=void 0;Object.defineProperty(e,t,{get(){if(i===gV)return;if(i===void 0)i=gV,i=r();return i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function $0e(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Xp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function na(e){return Xp(e._zod.def)??e._zod.def.shape}function yV(e,t,r){Object.defineProperty(e,t,{get(){let i=r();return cn(this,t,i),i},enumerable:!0,configurable:!0})}function vV(e,t,r){if(t in e)cn(e,t,r);else e[t]=r}function Ml(e,t,r,i){let n=na(t);for(let o of r){let s=Object.getOwnPropertyDescriptor(n,o);if(!s.enumerable)continue;if(s.get)yV(e,o,()=>{let a=t._zod.def.shape[o];return i?i(a,o):a});else vV(e,o,i?i(s.value,o):s.value)}}function x0e(e,t){for(let r of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,r);if(!i.enumerable)continue;if(i.get)yV(e,r,()=>t[r]);else vV(e,r,i.value)}}function Io(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function P0e(e){return Io(e._zod.def)}function C0e(e,t){if(!t)return e;return t.reduce((r,i)=>r?.[i],e)}function _0e(e){let t=Object.keys(e),r=t.map((i)=>e[i]);return Promise.all(r).then((i)=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function E0e(e=10){let r="";for(let i=0;i<e;i++)r+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return r}function Fn(e){return JSON.stringify(e)}function jI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function jl(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function eo(e){if(jl(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(jl(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function Og(e){if(eo(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function R0e(e){let t=0;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))t++;return t}function to(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(e,t,r){let i=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)i._zod.parent=e;return i}function te(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function A0e(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function V(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function UI(e){return Object.keys(e).filter((t)=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function O0e(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return Ml(o,e,Lb(e,t)),$t(e,Io(r,{shape:o,checks:[]}))}function Lb(e,t){let r=na(e),i=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw Error(`Unrecognized key: "${String(n)}"`);if(t[n])i.push(n)}return i}function D0e(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Lb(e,t)),s={};return Ml(s,e,Reflect.ownKeys(na(e)).filter((a)=>!o.has(a))),$t(e,Io(r,{shape:s,checks:[]}))}function T0e(e,t){if(!eo(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=na(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return $t(e,Io(e._zod.def,{shape:wV(e,t)}))}function wV(e,t){let r={};return Ml(r,e,Reflect.ownKeys(na(e))),x0e(r,t),r}function N0e(e,t){if(!eo(t))throw Error("Invalid input to safeExtend: expected a plain object");return $t(e,Io(e._zod.def,{shape:wV(e,t)}))}function M0e(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Ml(r,e,Reflect.ownKeys(na(e))),Ml(r,t,Reflect.ownKeys(na(t)));let i=Io(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return $t(e,i)}function j0e(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let a=r?new Set(Lb(t,r)):void 0,c={};return Ml(c,t,Reflect.ownKeys(na(t)),e&&((l,u)=>a&&!a.has(u)?l:new e({type:"optional",innerType:l}))),$t(t,Io(t._zod.def,{shape:c,checks:[]}))}function F0e(e,t,r){let i=r?new Set(Lb(t,r)):void 0,n={};return Ml(n,t,Reflect.ownKeys(na(t)),(o,s)=>i&&!i.has(s)?o:new e({type:"nonoptional",innerType:o})),$t(t,Io(t._zod.def,{shape:n}))}function zn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function LI(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function oi(e,t){return t.map((r)=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Zp(e){return typeof e==="string"?e:e?.message}function Bb(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function si(e,t,r){var i;let n=e.inst?._zod?.traits;if(n?.has("$ZodType"))if(n.has("$ZodCheck"))(i=e).schema??(i.schema=e.inst);else e.schema=e.inst;let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:Zp(e.inst?._zod.def?.error?.(e))??Zp(o?.(e))??Zp(t?.error?.(e))??Zp(r.customError?.(e))??Zp(r.localeError?.(e))??"Invalid input",a={};for(let c of Object.keys(e)){if(c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__")continue;a[c]=e[c]}if(a.path??(a.path=[]),a.message=s,t?.reportInput)a.input=e.input;return a}function Mg(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Fl(e){let t=e.length;if(!z0e.test(e))return t;let r=t;for(let i=0;i<t-1;i++)if((e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320)r--,i++;return r}function jg(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function W(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Qp(...e){let[t,r,i]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:i};return{...t}}function U0e(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map((t)=>t[1])}function bV(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function kV(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function L0e(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return bV(t+r)}function B0e(e){return kV(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function q0e(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function V0e(e){return Array.from(e).map((t)=>t.toString(16).padStart(2,"0")).join("")}class SV{constructor(...e){}}function BI(e,t){for(let r in t){let i=Object.getOwnPropertyDescriptor(t,r);if(i.get)Object.defineProperty(e,r,{...i,enumerable:!1});else H0e(e,r,i.value)}}function rc(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function Fg(e,t,r){return rc(e,t,r,!1)}function W0e(e,t){for(let r in e){let i=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return rc(this,r,i(this))},set(n){rc(this,r,n)}})}return t}function H0e(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:rc(this,t,r.bind(this))},set(i){rc(this,t,i)}})}function G0e(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}function Ze(e,t,r){let i=Object.getPrototypeOf(e._zod);if(t in i&&NI!==e._zod){NI=void 0;return}NI=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,Z0e);let n=tc;tc=!1;try{let o=r(this);if(tc)delete this[t];else Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o});return tc=tc||n,o}catch(o){throw delete this[t],tc=tc||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function K0e(e,t,r,i){let n=G0e(e,t);if(!n)return;Object.defineProperty(n,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}function qI(e){let t=()=>e;return t[qb]=!0,t}var gV,Ub,FI,I0e=(e)=>{let 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":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},Dg,zI,Tg,Ng,z0e,NI,tc=!1,Z0e,qb="~constantCatch";var se=I(()=>{nc();gV=Symbol("evaluating");Ub="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};FI=Yp(()=>{if(Yr.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});Dg=new Set(["string","number","symbol"]),zI=new Set(["string","number","bigint","boolean","symbol","undefined"]);Tg=(()=>({safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),Ng={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};z0e=/[\uD800-\uDBFF]/;Z0e={configurable:!0,get(){tc=!0;return}}});function J0e(e){let t=xV;if(t){let r=t.stackTraceLimit;if(typeof r==="number"){try{t.stackTraceLimit=0}catch{return xV=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function M(e,t,r,i){let n={};function o(d){this.def=d,this.constr=p,this.traits=new Set}o.prototype=n;let s=r,a=s&&new WeakSet;function c(d,f){if(!d._zod){VI.value=new o(f);try{Object.defineProperty(d,"_zod",VI)}finally{VI.value=void 0}}else if(d._zod.traits.has(e))return;if(d._zod.traits.add(e),t(d,f),a){let g=Object.getPrototypeOf(d),h=d._zod.constr.prototype,y=g;while(y&&y!==h)y=Object.getPrototypeOf(y);let v=y??g;if(!a.has(v))a.add(v),BI(v,s)}let m=p.prototype;for(let g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(!(g in d))d[g]=m[g].bind(d)}}let l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function p(d){let f=i?.Parent?J0e(u):this;c(f,d);let m=f._zod.deferred;if(m){for(let h of m)h();f._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;if(g)g(f);return f}return Object.defineProperty(p,"init",{value:c}),Object.defineProperty(p,Symbol.hasInstance,{value:(d)=>{if(i?.Parent&&d instanceof i.Parent)return!0;return d?._zod?.traits?.has(e)}}),Object.defineProperty(p,"name",{value:e}),p}function fr(e){if(e)Object.assign(Yr,e);return Yr}var $V,zg,VI,xV,WI,_i,zl,Yr;var nc=I(()=>{se();zg=Object.freeze({status:"aborted"}),VI={value:void 0,enumerable:!1},xV="captureStackTrace"in Error?Error:null;WI=Symbol("zod_brand");_i=class _i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};zl=class zl extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}};($V=globalThis).__zod_globalConfig??($V.__zod_globalConfig={});Yr=globalThis.__zod_globalConfig});function Y0e(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Jp,2)),e.message}function X0e(e){this._zod.message=e}function ePe(e,t,r){if(!Object.prototype.hasOwnProperty.call(e,t))if(t==="__proto__")Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0});else e[t]=r();return e[t]}function Ug(e,t=(r)=>r.message){let r={},i=[];for(let n of e.issues)if(n.path.length>0)ePe(r,n.path[0],()=>[]).push(t(n));else i.push(t(n));return{formErrors:i,fieldErrors:r}}function Lg(e,t=(r)=>r.message){let r={_errors:[]},i=(n,o=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>i({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let u=a[l],p=l===a.length-1;if(u==="_errors"){if(p)c._errors.push(t(s));l++;continue}if(!Object.prototype.hasOwnProperty.call(c,u))Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let d=c[u];if(p)d._errors.push(t(s));c=d,l++}}}};return i(e),r}function KI(e,t=(r)=>r.message){let r={errors:[]},i=(n,o=[])=>{var s;for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((c)=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0){r.errors.push(t(a));continue}let l=r,u=0;while(u<c.length){let p=c[u],d=u===c.length-1;if(typeof p==="string"){if(l.properties??(l.properties={}),!Object.prototype.hasOwnProperty.call(l.properties,p))Object.defineProperty(l.properties,p,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0});l=l.properties[p]}else l.items??(l.items=[]),(s=l.items)[p]??(s[p]={errors:[]}),l=l.items[p];if(d)l.errors.push(t(a));u++}}};return i(e),r}function _V(e){let t=[],r=e.map((i)=>typeof i==="object"?i.key:i);for(let i of r)if(typeof i==="number")t.push(`[${i}]`);else if(typeof i==="symbol")t.push(`[${JSON.stringify(String(i))}]`);else if(/[^\w$]/.test(i))t.push(`[${JSON.stringify(i)}]`);else{if(t.length)t.push(".");t.push(i)}return t.join("")}function JI(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)if(t.push(`✖ ${i.message}`),i.path?.length)t.push(` → at ${_V(i.path)}`);return t.join(`
237
237
  `)}var Q0e,GI,PV,CV=(e,t)=>{e.name="$ZodError",GI.value=t,Object.defineProperty(e,"issues",GI),GI.value=void 0,Object.defineProperty(e,"message",Q0e);let r=Object.getPrototypeOf(e);if(!PV.has(r))PV.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}})},ZI,ai;var YI=I(()=>{nc();se();Q0e={get:Y0e,set:X0e,enumerable:!0,configurable:!0},GI={value:void 0,enumerable:!1},PV=new WeakSet([Object.prototype,Error.prototype]),ZI=M("$ZodError",CV),ai=M("$ZodError",CV,void 0,{Parent:Error})});function Vb(e,t){return{callee:t?.callee??e,Err:t?.Err}}function EV(e,t,r){let i;return{success:!1,get error(){if(!i)i=new e(t.map((n)=>si(n,r,fr()))),t=void 0,r=void 0;return i},set error(n){i=n,t=void 0,r=void 0}}}function iPe(e,t,r){let i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,o;if(n)i[nPe]=!0,o=n({value:t,issues:[]},i);else o=e._zod.run({value:t,issues:[]},i);if(o instanceof Promise)throw new _i;return o.issues.length===0}var ed=(e)=>{let t=(r,i,n,o)=>{let s=n?{...n,async:!1}:{async:!1},a=r._zod.run({value:i,issues:[]},s);if(a instanceof Promise)throw new _i;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map((l)=>si(l,s,fr())));throw Ub(c,o?.callee??t),c}return a.value};return t},Bg,td=(e)=>{let t=async(r,i,n,o)=>{let s=n?{...n,async:!0}:{async:!0},a=r._zod.run({value:i,issues:[]},s);if(a instanceof Promise)a=await a;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map((l)=>si(l,s,fr())));throw Ub(c,o?.callee??t),c}return a.value};return t},qg,rd=(e)=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new _i;return o.issues.length?EV(e,o.issues,n):{success:!0,data:o.value}},Wb,nd=(e)=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)o=await o;return o.issues.length?EV(e,o.issues,n):{success:!0,data:o.value}},XI,rPe,nPe,id=(e,t,r)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==rPe)return!0;if(i.definite===!0&&r===void 0)return!1}return iPe(e,t,r)},od=async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},i);if(n instanceof Promise)n=await n;return n.issues.length===0},Hb=(e)=>{let t=ed(e),r=(i,n,o,s)=>{let a=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,n,a,Vb(r,s))};return r},RV,Gb=(e)=>{let t=ed(e),r=(i,n,o,s)=>t(i,n,o,Vb(r,s));return r},IV,Zb=(e)=>{let t=td(e),r=async(i,n,o,s)=>{let a=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,n,a,Vb(r,s))};return r},AV,Kb=(e)=>{let t=td(e),r=async(i,n,o,s)=>await t(i,n,o,Vb(r,s));return r},OV,Jb=(e)=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return rd(e)(t,r,n)},DV,Yb=(e)=>(t,r,i)=>rd(e)(t,r,i),TV,Xb=(e)=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return nd(e)(t,r,n)},NV,Qb=(e)=>async(t,r,i)=>nd(e)(t,r,i),MV;var QI=I(()=>{nc();YI();se();Bg=ed(ai),qg=td(ai),Wb=rd(ai);XI=nd(ai),rPe=Symbol.for("zod.compile.invalid"),nPe=Symbol.for("zod.compile.fallback");RV=Hb(ai),IV=Gb(ai),AV=Zb(ai),OV=Kb(ai),DV=Jb(ai),TV=Yb(ai),NV=Xb(ai),MV=Qb(ai)});var ro={};vn(ro,{anyString:()=>CA,base64:()=>yA,base64url:()=>vA,bigint:()=>EA,boolean:()=>RA,browserEmail:()=>dPe,cidrv4:()=>gA,cidrv6:()=>hA,creditCard:()=>ek,cuid:()=>tA,cuid2:()=>rA,currencyCode:()=>SA,date:()=>$A,datetime:()=>PA,domain:()=>bA,duration:()=>cA,e164:()=>kA,email:()=>uA,emoji:()=>pA,extendedDuration:()=>oPe,guid:()=>lA,hex:()=>TA,hostname:()=>wA,html5Email:()=>lPe,httpProtocol:()=>Vg,iban:()=>tk,idnEmail:()=>pPe,integer:()=>Wg,ipv4:()=>dA,ipv6:()=>fA,ksuid:()=>oA,lowercase:()=>OA,mac:()=>mA,md5_base64:()=>hPe,md5_base64url:()=>yPe,md5_hex:()=>gPe,nanoid:()=>sA,nanoidOfLength:()=>aA,null:()=>IA,number:()=>ns,rfc5322Email:()=>uPe,sha1_base64:()=>wPe,sha1_base64url:()=>bPe,sha1_hex:()=>vPe,sha256_base64:()=>SPe,sha256_base64url:()=>$Pe,sha256_hex:()=>kPe,sha384_base64:()=>PPe,sha384_base64url:()=>CPe,sha384_hex:()=>xPe,sha512_base64:()=>EPe,sha512_base64url:()=>RPe,sha512_hex:()=>_Pe,string:()=>_A,time:()=>xA,ulid:()=>nA,undefined:()=>AA,unicodeEmail:()=>jV,uppercase:()=>DA,uuid:()=>Ul,uuid4:()=>sPe,uuid6:()=>aPe,uuid7:()=>cPe,xid:()=>iA});function aA(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function pA(){return new RegExp(fPe,"u")}function mPe(e){return new RegExp(`^${e}$`)}function eA(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function xA(e){return new RegExp(`^${eA(e)}$`)}function PA(e){let t=["Z"];if(e.offset)t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${eA({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${eA({precision:e.precision})}`:r;return new RegExp(`^${FV}T(?:${i})$`)}function Hg(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gg(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var tA,rA,nA,iA,oA,sA,cA,oPe,lA,Ul=(e)=>{if(!e)return/^([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)$/;return 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})$`)},sPe,aPe,cPe,uA,lPe,uPe,jV,pPe,dPe,fPe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$",dA,fA,mA=(e)=>{let t=to(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},gA,hA,yA,vA,wA,bA,Vg,kA,ek,SA,tk,FV="(?:(?:\\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])))",$A,CA,_A=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},EA,Wg,ns,RA,IA,AA,OA,DA,TA,gPe,hPe,yPe,vPe,wPe,bPe,kPe,SPe,$Pe,xPe,PPe,CPe,_Pe,EPe,RPe;var Ll=I(()=>{se();tA=/^[cC][0-9a-z]{6,}$/,rA=/^[0-9a-z]+$/,nA=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,iA=/^[0-9a-vA-V]{20}$/,oA=/^[A-Za-z0-9]{27}$/,sA=/^[a-zA-Z0-9_-]{21}$/;cA=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oPe=/^[-+]?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)?)??$/,lA=/^([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})$/,sPe=Ul(4),aPe=Ul(6),cPe=Ul(7),uA=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lPe=/^[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])?)*$/,uPe=/^(([^<>()\[\]\\.,;:\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,}))$/,jV=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,pPe=jV,dPe=/^[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])?)*$/;dA=/^(?:(?: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])$/,fA=/^(([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}|:))$/,gA=/^((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])$/,hA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vA=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,wA=/^(?=.{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])?)*\.?$/,bA=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Vg=/^https?$/,kA=/^\+[1-9]\d{6,14}$/,ek=/^\d(?:[ -]?\d){11,18}$/,SA=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,tk=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;$A=mPe(FV);CA=/^[\s\S]{0,}$/,EA=/^-?\d+n?$/,Wg=/^-?\d+$/,ns=/^-?\d+(?:\.\d+)?$/,RA=/^(?:true|false)$/i,IA=/^null$/i,AA=/^undefined$/i,OA=/^[^A-Z]*$/,DA=/^[^a-z]*$/,TA=/^[0-9a-fA-F]*$/;gPe=/^[0-9a-fA-F]{32}$/,hPe=Hg(22,"=="),yPe=Gg(22),vPe=/^[0-9a-fA-F]{40}$/,wPe=Hg(27,"="),bPe=Gg(27),kPe=/^[0-9a-fA-F]{64}$/,SPe=Hg(43,"="),$Pe=Gg(43),xPe=/^[0-9a-fA-F]{96}$/,PPe=Hg(64,""),CPe=Gg(64),_Pe=/^[0-9a-fA-F]{128}$/,EPe=Hg(86,"=="),RPe=Gg(86)});function nk(e,t,r){if(e.issues.length)t.issues.push(...oi(r,e.issues))}var jt,NA=(e)=>{let t=e.value;return!zb(t)&&t.size!==void 0},MA=(e)=>{let t=e.value;return!zb(t)&&t.length!==void 0},rk,ik,ok,jA,FA,zA,UA,LA,BA,qA,VA,WA,sd,HA,GA,ZA,KA,JA,YA,XA,QA,eO,tO;var sk=I(()=>{nc();Ll();se();jt=M("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rk={number:"number",bigint:"bigint",object:"date"},ik=M("$ZodCheckLessThan",(e,t)=>{jt.init(e,t);let r=rk[typeof t.value];e._zod.check=(i)=>{if(t.inclusive?i.value<=t.value:i.value<t.value)return;i.issues.push({origin:rk[typeof i.value]??r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ok=M("$ZodCheckGreaterThan",(e,t)=>{jt.init(e,t);let r=rk[typeof t.value];e._zod.check=(i)=>{if(t.inclusive?i.value>=t.value:i.value>t.value)return;i.issues.push({origin:rk[typeof i.value]??r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jA=M("$ZodCheckMultipleOf",(e,t)=>{jt.init(e,t),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Ag(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),FA=M("$ZodCheckNumberFormat",(e,t)=>{jt.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Tg[t.format];e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(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});else 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});return}}if(a<n)s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(a>o)s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),zA=M("$ZodCheckBigIntFormat",(e,t)=>{jt.init(e,t);let[r,i]=Ng[t.format];e._zod.check=(n)=>{let o=n.value;if(o<r)n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort});if(o>i)n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),UA=M("$ZodCheckMaxSize",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=NA),e._zod.check=(i)=>{let n=i.value;if(n.size<=t.maximum)return;i.issues.push({origin:Mg(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),LA=M("$ZodCheckMinSize",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=NA),e._zod.check=(i)=>{let n=i.value;if(n.size>=t.minimum)return;i.issues.push({origin:Mg(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),BA=M("$ZodCheckSizeEquals",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=NA),e._zod.check=(i)=>{let n=i.value,o=n.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:Mg(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),qA=M("$ZodCheckMaxLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=MA),e._zod.check=(i)=>{let n=i.value,o=n.length;if((typeof n==="string"&&o>t.maximum?Fl(n):o)<=t.maximum)return;let a=jg(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),VA=M("$ZodCheckMinLength",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=MA),e._zod.check=(i)=>{let n=i.value,o=n.length;if((typeof n==="string"&&o>=t.minimum&&o<t.minimum*2?Fl(n):o)>=t.minimum)return;let a=jg(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),WA=M("$ZodCheckLengthEquals",(e,t)=>{var r;jt.init(e,t),(r=e._zod.def).when??(r.when=MA),e._zod.check=(i)=>{let n=i.value,o=n.length,s=typeof n==="string"&&o>=t.length&&o<=t.length*2?Fl(n):o;if(s===t.length)return;let a=jg(n),c=s>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),sd=M("$ZodCheckStringFormat",(e,t)=>{var r,i;if(jt.init(e,t),t.pattern)(r=e._zod).check??(r.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;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})});else(i=e._zod).check??(i.check=()=>{})}),HA=M("$ZodCheckRegex",(e,t)=>{sd.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),GA=M("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=OA),sd.init(e,t)}),ZA=M("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=DA),sd.init(e,t)}),KA=M("$ZodCheckIncludes",(e,t)=>{jt.init(e,t);let r=to(t.includes),i=new RegExp(typeof t.position==="number"?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=(n)=>{if(n.value.includes(t.includes,t.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),JA=M("$ZodCheckStartsWith",(e,t)=>{jt.init(e,t);let r=new RegExp(`^${to(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=(i)=>{if(i.value.startsWith(t.prefix))return;i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),YA=M("$ZodCheckEndsWith",(e,t)=>{jt.init(e,t);let r=new RegExp(`.*${to(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=(i)=>{if(i.value.endsWith(t.suffix))return;i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});XA=M("$ZodCheckProperty",(e,t)=>{jt.init(e,t),e._zod.check=(r)=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then((n)=>nk(n,r,t.property));nk(i,r,t.property);return}}),QA=M("$ZodCheckProperties",(e,t)=>{jt.init(e,t),Fg(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=(i)=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map((s)=>[s,t.shape[s]]));let n=i.value,o;for(let[s,a]of r){let c=a._zod.run({value:n[s],issues:[]},{});if(c instanceof Promise)o??(o=[]),o.push(c.then((l)=>nk(l,i,s)));else nk(c,i,s)}if(o)return Promise.all(o).then(()=>{return});return}}),eO=M("$ZodCheckMimeType",(e,t)=>{jt.init(e,t);let r=new Set(t.mime);e._zod.check=(i)=>{if(r.has(i.value.type))return;i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),tO=M("$ZodCheckOverwrite",(e,t)=>{jt.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}})});class ad{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
238
238
  `).filter((o)=>o),i=Math.min(...r.map((o)=>o.length-o.trimStart().length)),n=r.map((o)=>o.slice(i)).map((o)=>" ".repeat(this.indent*2)+o);for(let o of n)this.content.push(o)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
239
239
  ${t.join(`
240
240
  `)}
241
- };`)(...Object.values(this.closed))}}var rO;var nO=I(()=>{rO={major:4,minor:6,patch:5}});async function IPe(e,t){let r={async:!0};return tW(await e._zod.run({value:t,issues:[]},r),r)}function pk(e){return{validate:(t)=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return tW(i,r)}catch(i){}return IPe(e,t)},vendor:"zod",version:1}}function lO(e){try{if(typeof URL<"u"&&typeof URL.canParse==="function")return URL.canParse(e);return new URL(e),!0}catch{return!1}}function dk(e,t){if(!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t))return lO(e)||Zg;return rW(e,t)}function rW(e,t){if(!t.normalize&&t.protocol?.source===Vg.source&&!/^https?:\/\//i.test(e))return cO;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse==="function")return r.parse(e)??Zg}return new URL(e)}catch{return Zg}}function Kg(e){return e.replace(APe,"")}function fk(e,t){return t.lastIndex=0,t.test(e.hostname)}function mk(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}function Jg(e){if(!OPe.test(e))return!1;return lO(`http://[${e}]`)}function gk(e){let t=e.split("/");if(t.length!==2)return!1;let[r,i]=t;if(!i)return!1;let n=Number(i);if(`${n}`!==i)return!1;if(n<0||n>128)return!1;return Jg(r)}function Yg(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}}function yk(e){if(!Xg.test(e))return!1;let t=e.replace(/[-_]/g,(i)=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Yg(r)}function TPe(e){let t=e.length,r=1,i=0;while(t){let n=e.charCodeAt(--t)-48;r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function vk(e){if(!ek.test(e))return!1;return TPe(e.replace(DPe,""))}function NPe(e){let t=0,r=e.length;for(let i=4;i<r;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let i=0;i<4;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}return t===1}function wk(e){if(!tk.test(e))return!1;return NPe(e)}function bk(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(t&&(!("alg"in n)||n.alg!==t))return!1;return!0}catch{return!1}}function UV(e,t,r){if(e.issues.length)t.issues.push(...oi(r,e.issues));t.value[r]=e.value}function uk(e,t,r,i,n,o){let s=r in i,a=o==="optional";if(!s&&a&&n==="optional")return;if(e.issues.length){if(n!==void 0&&a&&!s)return;t.issues.push(...oi(r,e.issues))}if(!s&&n===void 0){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s||n==="defaulted"&&!a)t.value[r]=void 0}else t.value[r]=e.value}function nW(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:MPe,n=i.length?[...t,...i]:t;for(let s of n)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let o=UI(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function iW(e,t,r,i,n,o,s){let a=[],c=n.keySet,l=n.catchall._zod,u=l.def.type,p=l.optin,d=l.optout,f=0;for(let m in t){if(s&&r.issues.length!==f){if(zn(r,f))break;f=r.issues.length}if(c.has(m))continue;if(m==="__proto__"){if(u==="never")a.push(m);continue}if(u==="never"){a.push(m);continue}let g=l.run({value:t[m],issues:[]},i);if(g instanceof Promise)e.push(g.then((h)=>uk(h,r,m,t,p,d)));else uk(g,r,m,t,p,d)}if(a.length)r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0});if(!e.length)return r;return Promise.all(e).then(()=>r)}function LV(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter((o)=>!zn(o));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>si(s,i,fr())))}),t}function BV(e,t,r,i){let n=[];for(let o=0;o<e.length;o++)if(e[o].issues.length===0)n.push(o);if(n.length===1)return t.value=e[n[0]].value,t;if(n.length===0)t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>si(s,i,fr())))});else t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n});return t}function GO(e,t){let r=e._zod,i=r.bag.optionsMap;if(!i)i=sW(r.def),r.bag.optionsMap=i;let n=i.get(t);if(n===null)throw Error(`Ambiguous discriminator value "${String(t)}"`);return n}function sW(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of i)if(t.has(n)){if(n!==void 0)throw Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}function cd(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(eo(e)&&eo(t)){let r=Object.keys(t),i=Object.keys(e).filter((o)=>r.indexOf(o)!==-1),n={...e,...t};if(Object.prototype.hasOwnProperty.call(n,"__proto__"))delete n.__proto__;for(let o of i){if(o==="__proto__")continue;let s=cd(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],s=cd(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qV(e,t,r){let i=new Map,n,o=new Map,s=(l,u)=>{let p;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),p=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let d=String(l.path[0]);if(!o.has(d))o.set(d,l);p=[d]}else return!1;for(let d of p){if(!i.has(d))i.set(d,{});i.get(d)[u]=!0}return!0};for(let l of t.issues)if(!s(l,"l"))e.issues.push(l);for(let l of r.issues)if(!s(l,"r"))e.issues.push(l);let a=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(a.length){let l=n?a.filter((u)=>n.keys.includes(u)):[];if(l.length)e.issues.push({...n,keys:l});for(let u of a)if(!l.includes(u)&&o.has(u))e.issues.push(o.get(u))}let c=cd(t.value,r.value);if(!c.valid){if(zn(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function VV(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function WV(e,t,r){if(e.issues.length)t.issues.push(...oi(r,e.issues));t.value[r]=e.value}function HV(e,t,r,i,n){for(let o=0;o<r.length;o++){let s=e[o],a=o<i.length;if(!a&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(s.issues.length){if(!a&&o>=n){t.value.length=o;break}t.issues.push(...oi(o,s.issues))}t.value[o]=s.value}for(let o=t.value.length-1;o>=i.length;o--)if(r[o]._zod.optout==="optional"&&t.value[o]===void 0)t.value.length=o;else break;return t}function GV(e,t,r,i,n,o,s){if(e.issues.length)if(Dg.has(typeof i))r.issues.push(...oi(i,e.issues));else r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map((a)=>si(a,s,fr()))});if(t.issues.length)if(Dg.has(typeof i))r.issues.push(...oi(i,t.issues));else r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map((a)=>si(a,s,fr()))});r.value.set(e.value,t.value)}function ZV(e,t){if(e.issues.length)t.issues.push(...e.issues);t.value.add(e.value)}function KV(e,t){return e.value=t.issues.length?void 0:t.value,e}function JV(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}function YV(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}function XV(e,t,r,i){if(!t.issues.length){if(e.value=t.value,t.memo)e.memo=!0;return e}return e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map((n)=>si(n,i,fr()))},input:e.value}),e}function ak(e,t,r){if(e.issues.some((i)=>i.code!=="unrecognized_keys"))return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues},r)}function ck(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);if(n instanceof Promise)return n.then((o)=>lk(e,o,t.out,r));return lk(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);if(n instanceof Promise)return n.then((o)=>lk(e,o,t.in,r));return lk(e,n,t.in,r)}}function lk(e,t,r,i){if(e.issues.length)return e.aborted=!0,e;return r._zod.run({value:t,issues:e.issues},i)}function QV(e){if(!e.memo)e.value=Object.freeze(e.value);return e}function jPe(e){let t=e._zod.def,r=t.pattern,i=!!t.format?.includes("int"),n,o;for(let a of t.checks??[]){let c=a._zod.def;if(c.pattern)r=c.pattern;i||(i=!!c.format?.includes("int"));let l=c.minimum??c.length,u=c.maximum??c.length;if(l!==void 0&&(n===void 0||l>n))n=l;if(u!==void 0&&(o===void 0||u<o))o=u}if(r)return r.source;if(n!==void 0&&o!==void 0&&n>o)return"(?!)";if(n!==void 0||o!==void 0)return _A({minimum:n,maximum:o}).source;let s=e._zod.pattern;return(i&&s===ns?Wg:s)?.source}function iO(e){let t=e._zod.def,r=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let n=i._zod.pattern?.source,o=iO(i);if(r&&n&&o&&o!==n)return r.replace(ia(n),()=>ia(o));return r}if(t.options){let n=t.options.map(iO);if(n.every(Boolean))return`^(${n.map((o)=>ia(o)).join("|")})$`}return jPe(e)}function eW(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};if(i._zod.def.params)n.params=i._zod.def.params;t.issues.push(Qp(n))}}var Ue,tW=(e,t)=>e.issues.length?{issues:e.issues.map((r)=>si(r,t,fr()))}:{value:e.value},Bl,xt,oO,sO,aO,cO=1,Zg=2,APe,uO,pO,dO,fO,mO,gO,hO,yO,vO,wO,bO,kO,SO,OPe,$O,xO,PO,CO,hk,_O,Xg,EO,RO,DPe,IO,AO,OO,DO,kk,TO,Qg,Sk,NO,MO,jO,FO,zO,UO,LO,BO,qO,VO,MPe,oW,WO,eh,HO,ZO,KO,$k,JO,YO,XO,QO,eD,tD,rD,xk,nD,iD,oD,sD,aD,cD,lD,uD,Pk,th,pD,dD,fD,mD,gD,rh,hD;var ld=I(()=>{sk();nc();QI();Ll();se();nO();se();Ue=M("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rO;let i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of n)for(let s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(a,c,l)=>{if(a.memo)return a;let u=zn(a),p;for(let d of c){if(d._zod.def.when){if(LI(a))continue;if(!d._zod.def.when(a))continue}else if(u)continue;let f=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&l?.async===!1)throw new _i;if(p||m instanceof Promise)p=(p??Promise.resolve()).then(async()=>{if(await m,a.issues.length===f)return;if(Bb(a.issues,f,e),!u)u=zn(a,f)});else{if(a.issues.length===f)continue;if(Bb(a.issues,f,e),!u)u=zn(a,f)}}if(p)return p.then(()=>a);return a},s=(a,c,l)=>{if(zn(a))return a.aborted=!0,a;let u=o(c,n,l);if(u instanceof Promise){if(l.async===!1)throw new _i;return u.then((p)=>e._zod.parse(p,l))}return e._zod.parse(u,l)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});if(u instanceof Promise)return u.then((p)=>s(p,a,c));return s(u,a,c)}let l=e._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new _i;return l.then((u)=>o(u,n,c))}return o(l,n,c)}}},{get "~standard"(){return Fg(this,"~standard",pk(this))},set "~standard"(e){rc(this,"~standard",e)}});Bl=M("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=t.pattern??CA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),xt=M("$ZodStringFormat",(e,t)=>{sd.init(e,t),Bl.init(e,t)}),oO=M("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lA),xt.init(e,t)}),sO=M("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ul(i))}else t.pattern??(t.pattern=Ul());xt.init(e,t)}),aO=M("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uA),xt.init(e,t)});APe=/[\t\n\r]/g;uO=M("$ZodURL",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{try{let i=r.value.trim(),n=dk(i,t);if(n===cO){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Zg){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=Kg(i);return}if(t.hostname&&!fk(n,t.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort});if(t.protocol&&!mk(n,t.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort});r.value=t.normalize?n.href:Kg(i);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),pO=M("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pA()),xt.init(e,t)}),dO=M("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?sA:aA(t.length)),xt.init(e,t)}),fO=M("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tA),xt.init(e,t)}),mO=M("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rA),xt.init(e,t)}),gO=M("$ZodULID",(e,t)=>{t.pattern??(t.pattern=nA),xt.init(e,t)}),hO=M("$ZodXID",(e,t)=>{t.pattern??(t.pattern=iA),xt.init(e,t)}),yO=M("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oA),xt.init(e,t)}),vO=M("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=PA(t)),xt.init(e,t)}),wO=M("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$A),xt.init(e,t)}),bO=M("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=xA(t)),xt.init(e,t)}),kO=M("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cA),xt.init(e,t)}),SO=M("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dA),xt.init(e,t)}),OPe=/^[0-9a-fA-F:.]+$/;$O=M("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fA),xt.init(e,t),e._zod.check=(r)=>{if(!Jg(r.value))r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),xO=M("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=mA(t.delimiter)),xt.init(e,t)}),PO=M("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gA),xt.init(e,t)});CO=M("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hA),xt.init(e,t),e._zod.check=(r)=>{if(!gk(r.value))r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});hk=/^[0-9a-zA-Z+/]*={0,2}$/,_O=M("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=hk),xt.init(e,t),e._zod.check=(r)=>{if(Yg(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Xg=/^[A-Za-z0-9_-]*$/;EO=M("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Xg),xt.init(e,t),e._zod.check=(r)=>{if(yk(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),RO=M("$ZodE164",(e,t)=>{t.pattern??(t.pattern=kA),xt.init(e,t)}),DPe=/[- ]/g;IO=M("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=ek),xt.init(e,t),e._zod.check=(r)=>{if(vk(r.value))return;r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});AO=M("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=tk),xt.init(e,t),e._zod.check=(r)=>{if(wk(r.value))return;r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});OO=M("$ZodJWT",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{if(bk(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),DO=M("$ZodCustomStringFormat",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{if(t.fn(r.value))return;r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),kk=M("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=ns,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?String(n):void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),TO=M("$ZodNumberFormat",(e,t)=>{FA.init(e,t),kk.init(e,t)}),Qg=M("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=RA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(o){}let n=r.value;if(typeof n==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Sk=M("$ZodBigInt",(e,t)=>{Ue.init(e,t),e._zod.pattern=EA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(n){}if(typeof r.value==="bigint")return r;return r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),NO=M("$ZodBigIntFormat",(e,t)=>{zA.init(e,t),Sk.init(e,t)}),MO=M("$ZodSymbol",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n==="symbol")return r;return r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),jO=M("$ZodUndefined",(e,t)=>{Ue.init(e,t),e._zod.pattern=AA,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n>"u")return r;return r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),FO=M("$ZodNull",(e,t)=>{Ue.init(e,t),e._zod.pattern=IA,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;if(n===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),zO=M("$ZodAny",(e,t)=>{Ue.init(e,t),e._zod.parse=(r)=>r}),UO=M("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=(r)=>r}),LO=M("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),BO=M("$ZodVoid",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n>"u")return r;return r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),qO=M("$ZodDate",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(a){}let n=r.value,o=n instanceof Date;if(o&&!Number.isNaN(n.getTime()))return r;return r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});VO=M("$ZodArray",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);let s=[],a=n?.abortEarly;for(let c=0;c<o.length;c++){let l=o[c],u=t.element._zod.run({value:l,issues:[]},n);if(u instanceof Promise)s.push(u.then((p)=>UV(p,i,c)));else if(UV(u,i,c),a&&u.issues.length!==0&&zn(u))break}if(s.length)return Promise.all(s).then(()=>i);return i}});MPe=[];oW=M("$ZodObject",(e,t)=>{Ue.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let l=()=>{let u={...i};return Object.defineProperty(t,"shape",{value:u}),l.raw=u,u};l.raw=i,Object.defineProperty(t,"shape",{get:l})}let n=Yp(()=>nW(t));Ge(e,"propValues",(l)=>{let u=l.def.shape,p={};for(let d in u){let f=u[d]._zod;if(f.values){if(!Object.prototype.hasOwnProperty.call(p,d))cn(p,d,new Set);for(let m of f.values)p[d].add(m);if(f.optin!==void 0)p[d].add(void 0)}}return p});let o=jl,s=t.catchall,a,c=Yr.memoizer;c?.attach(e),e._zod.parse=(l,u)=>{a??(a=n.value);let p=l.value;if(!o(p))return l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l;l.value=c?c.alloc(e,l,{},u):{};let d=[],f=a.shape,m=u?.abortEarly,g=l.issues.length;for(let h of a.allKeys){if(m&&l.issues.length!==g){if(zn(l,g))break;g=l.issues.length}if(h==="__proto__")continue;let y=f[h],v=y._zod.optin,w=y._zod.optout,x=y._zod.run({value:p[h],issues:[]},u);if(x instanceof Promise)d.push(x.then((b)=>uk(b,l,h,p,v,w)));else uk(x,l,h,p,v,w)}if(!s)return d.length?Promise.all(d).then(()=>l):l;return iW(d,p,l,u,n.value,e,m===!0)}}),WO=M("$ZodObjectJIT",(e,t)=>{oW.init(e,t);let r=e._zod.parse,i=Yp(()=>nW(t)),n=Yr.memoizer,o=(f)=>{let m=i.value,g=m.symbolKeys,h=new ad(["payload","ctx"],{shape:f,inst:e,memo:n,syms:g}),y=(b)=>`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`,v=(b,k)=>`
241
+ };`)(...Object.values(this.closed))}}var rO;var nO=I(()=>{rO={major:4,minor:6,patch:5}});async function IPe(e,t){let r={async:!0};return tW(await e._zod.run({value:t,issues:[]},r),r)}function pk(e){return{validate:(t)=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return tW(i,r)}catch(i){}return IPe(e,t)},vendor:"zod",version:1}}function lO(e){try{if(typeof URL<"u"&&typeof URL.canParse==="function")return URL.canParse(e);return new URL(e),!0}catch{return!1}}function dk(e,t){if(!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t))return lO(e)||Zg;return rW(e,t)}function rW(e,t){if(!t.normalize&&t.protocol?.source===Vg.source&&!/^https?:\/\//i.test(e))return cO;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse==="function")return r.parse(e)??Zg}return new URL(e)}catch{return Zg}}function Kg(e){return e.replace(APe,"")}function fk(e,t){return t.lastIndex=0,t.test(e.hostname)}function mk(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}function Jg(e){if(!OPe.test(e))return!1;return lO(`http://[${e}]`)}function gk(e){let t=e.split("/");if(t.length!==2)return!1;let[r,i]=t;if(!i)return!1;let n=Number(i);if(`${n}`!==i)return!1;if(n<0||n>128)return!1;return Jg(r)}function Yg(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}}function yk(e){if(!Xg.test(e))return!1;let t=e.replace(/[-_]/g,(i)=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Yg(r)}function TPe(e){let t=e.length,r=1,i=0;while(t){let n=e.charCodeAt(--t)-48;r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function vk(e){if(!ek.test(e))return!1;return TPe(e.replace(DPe,""))}function NPe(e){let t=0,r=e.length;for(let i=4;i<r;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let i=0;i<4;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}return t===1}function wk(e){if(!tk.test(e))return!1;return NPe(e)}function bk(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(t&&(!("alg"in n)||n.alg!==t))return!1;return!0}catch{return!1}}function UV(e,t,r){if(e.issues.length)t.issues.push(...oi(r,e.issues));t.value[r]=e.value}function uk(e,t,r,i,n,o){let s=r in i,a=o==="optional";if(!s&&a&&n==="optional")return;if(e.issues.length){if(n!==void 0&&a&&!s)return;t.issues.push(...oi(r,e.issues))}if(!s&&n===void 0){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s||n==="defaulted"&&!a)t.value[r]=void 0}else t.value[r]=e.value}function nW(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:MPe,n=i.length?[...t,...i]:t;for(let s of n)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let o=UI(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function iW(e,t,r,i,n,o,s){let a=[],c=n.keySet,l=n.catchall._zod,u=l.def.type,p=l.optin,d=l.optout,f=0;for(let m in t){if(s&&r.issues.length!==f){if(zn(r,f))break;f=r.issues.length}if(c.has(m))continue;if(m==="__proto__"){if(u==="never")a.push(m);continue}if(u==="never"){a.push(m);continue}let g=l.run({value:t[m],issues:[]},i);if(g instanceof Promise)e.push(g.then((h)=>uk(h,r,m,t,p,d)));else uk(g,r,m,t,p,d)}if(a.length)r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o,continue:!0});if(!e.length)return r;return Promise.all(e).then(()=>r)}function LV(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter((o)=>!zn(o));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>si(s,i,fr())))}),t}function BV(e,t,r,i){let n=[];for(let o=0;o<e.length;o++)if(e[o].issues.length===0)n.push(o);if(n.length===1)return t.value=e[n[0]].value,t;if(n.length===0)t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((o)=>o.issues.map((s)=>si(s,i,fr())))});else t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n});return t}function GO(e,t){let r=e._zod,i=r.bag.optionsMap;if(!i)i=sW(r.def),r.bag.optionsMap=i;let n=i.get(t);if(n===null)throw Error(`Ambiguous discriminator value "${String(t)}"`);return n}function sW(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of i)if(t.has(n)){if(n!==void 0)throw Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}function cd(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(eo(e)&&eo(t)){let r=Object.keys(t),i=Object.keys(e).filter((o)=>r.indexOf(o)!==-1),n={...e,...t};if(Object.prototype.hasOwnProperty.call(n,"__proto__"))delete n.__proto__;for(let o of i){if(o==="__proto__")continue;let s=cd(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],s=cd(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function qV(e,t,r){let i=new Map,n,o=new Map,s=(l,u)=>{let p;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),p=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let d=String(l.path[0]);if(!o.has(d))o.set(d,l);p=[d]}else return!1;for(let d of p){if(!i.has(d))i.set(d,{});i.get(d)[u]=!0}return!0};for(let l of t.issues)if(!s(l,"l"))e.issues.push(l);for(let l of r.issues)if(!s(l,"r"))e.issues.push(l);let a=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(a.length){let l=n?a.filter((u)=>n.keys.includes(u)):[];if(l.length)e.issues.push({...n,keys:l});for(let u of a)if(!l.includes(u)&&o.has(u))e.issues.push(o.get(u))}let c=cd(t.value,r.value);if(!c.valid){if(zn(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function VV(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function WV(e,t,r){if(e.issues.length)t.issues.push(...oi(r,e.issues));t.value[r]=e.value}function HV(e,t,r,i,n){for(let o=0;o<r.length;o++){let s=e[o],a=o<i.length;if(!a&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(s.issues.length){if(!a&&o>=n){t.value.length=o;break}t.issues.push(...oi(o,s.issues))}t.value[o]=s.value}for(let o=t.value.length-1;o>=i.length;o--)if(r[o]._zod.optout==="optional"&&t.value[o]===void 0)t.value.length=o;else break;return t}function GV(e,t,r,i,n,o,s){if(e.issues.length)if(Dg.has(typeof i))r.issues.push(...oi(i,e.issues));else r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map((a)=>si(a,s,fr()))});if(t.issues.length)if(Dg.has(typeof i))r.issues.push(...oi(i,t.issues));else r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map((a)=>si(a,s,fr()))});r.value.set(e.value,t.value)}function ZV(e,t){if(e.issues.length)t.issues.push(...e.issues);t.value.add(e.value)}function KV(e,t){return e.value=t.issues.length?void 0:t.value,e}function JV(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}function YV(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}function XV(e,t,r,i){if(!t.issues.length){if(e.value=t.value,t.memo)e.memo=!0;return e}return e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map((n)=>si(n,i,fr()))},input:e.value}),e}function ak(e,t,r){if(e.issues.some((i)=>i.code!=="unrecognized_keys"))return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues},r)}function ck(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);if(n instanceof Promise)return n.then((o)=>lk(e,o,t.out,r));return lk(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);if(n instanceof Promise)return n.then((o)=>lk(e,o,t.in,r));return lk(e,n,t.in,r)}}function lk(e,t,r,i){if(e.issues.length)return e.aborted=!0,e;return r._zod.run({value:t,issues:e.issues},i)}function QV(e){if(!e.memo)e.value=Object.freeze(e.value);return e}function jPe(e){let t=e._zod.def,r=t.pattern,i=!!t.format?.includes("int"),n,o;for(let a of t.checks??[]){let c=a._zod.def;if(c.pattern)r=c.pattern;i||(i=!!c.format?.includes("int"));let l=c.minimum??c.length,u=c.maximum??c.length;if(l!==void 0&&(n===void 0||l>n))n=l;if(u!==void 0&&(o===void 0||u<o))o=u}if(r)return r.source;if(n!==void 0&&o!==void 0&&n>o)return"(?!)";if(n!==void 0||o!==void 0)return _A({minimum:n,maximum:o}).source;let s=e._zod.pattern;return(i&&s===ns?Wg:s)?.source}function iO(e){let t=e._zod.def,r=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let n=i._zod.pattern?.source,o=iO(i);if(r&&n&&o&&o!==n)return r.replace(ia(n),()=>ia(o));return r}if(t.options){let n=t.options.map(iO);if(n.every(Boolean))return`^(${n.map((o)=>ia(o)).join("|")})$`}return jPe(e)}function eW(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};if(i._zod.def.params)n.params=i._zod.def.params;t.issues.push(Qp(n))}}var Ue,tW=(e,t)=>e.issues.length?{issues:e.issues.map((r)=>si(r,t,fr()))}:{value:e.value},Bl,xt,oO,sO,aO,cO=1,Zg=2,APe,uO,pO,dO,fO,mO,gO,hO,yO,vO,wO,bO,kO,SO,OPe,$O,xO,PO,CO,hk,_O,Xg,EO,RO,DPe,IO,AO,OO,DO,kk,TO,Qg,Sk,NO,MO,jO,FO,zO,UO,LO,BO,qO,VO,MPe,oW,WO,eh,HO,ZO,KO,$k,JO,YO,XO,QO,eD,tD,rD,xk,nD,iD,oD,sD,aD,cD,lD,uD,Pk,th,pD,dD,fD,mD,gD,rh,hD;var ld=I(()=>{sk();nc();QI();Ll();se();nO();se();Ue=M("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rO;let i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of n)for(let s of o._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(a,c,l)=>{if(a.memo)return a;let u=zn(a),p;for(let d of c){if(d._zod.def.when){if(LI(a))continue;if(!d._zod.def.when(a))continue}else if(u)continue;let f=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&l?.async===!1)throw new _i;if(p||m instanceof Promise)p=(p??Promise.resolve()).then(async()=>{if(await m,a.issues.length===f)return;if(Bb(a.issues,f,e),!u)u=zn(a,f)});else{if(a.issues.length===f)continue;if(Bb(a.issues,f,e),!u)u=zn(a,f)}}if(p)return p.then(()=>a);return a},s=(a,c,l)=>{if(zn(a))return a.aborted=!0,a;let u=o(c,n,l);if(u instanceof Promise){if(l.async===!1)throw new _i;return u.then((p)=>e._zod.parse(p,l))}return e._zod.parse(u,l)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});if(u instanceof Promise)return u.then((p)=>s(p,a,c));return s(u,a,c)}let l=e._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new _i;return l.then((u)=>o(u,n,c))}return o(l,n,c)}}},{get "~standard"(){return Fg(this,"~standard",pk(this))},set "~standard"(e){rc(this,"~standard",e)}});Bl=M("$ZodString",(e,t)=>{Ue.init(e,t),e._zod.pattern=t.pattern??CA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),xt=M("$ZodStringFormat",(e,t)=>{sd.init(e,t),Bl.init(e,t)}),oO=M("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lA),xt.init(e,t)}),sO=M("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ul(i))}else t.pattern??(t.pattern=Ul());xt.init(e,t)}),aO=M("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uA),xt.init(e,t)});APe=/[\t\n\r]/g;uO=M("$ZodURL",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{try{let i=r.value.trim(),n=dk(i,t);if(n===cO){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Zg){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=Kg(i);return}if(t.hostname&&!fk(n,t.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort});if(t.protocol&&!mk(n,t.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort});r.value=t.normalize?n.href:Kg(i);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),pO=M("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pA()),xt.init(e,t)}),dO=M("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?sA:aA(t.length)),xt.init(e,t)}),fO=M("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tA),xt.init(e,t)}),mO=M("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rA),xt.init(e,t)}),gO=M("$ZodULID",(e,t)=>{t.pattern??(t.pattern=nA),xt.init(e,t)}),hO=M("$ZodXID",(e,t)=>{t.pattern??(t.pattern=iA),xt.init(e,t)}),yO=M("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oA),xt.init(e,t)}),vO=M("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=PA(t)),xt.init(e,t)}),wO=M("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=$A),xt.init(e,t)}),bO=M("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=xA(t)),xt.init(e,t)}),kO=M("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cA),xt.init(e,t)}),SO=M("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dA),xt.init(e,t)}),OPe=/^[0-9a-fA-F:.]+$/;$O=M("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fA),xt.init(e,t),e._zod.check=(r)=>{if(!Jg(r.value))r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),xO=M("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=mA(t.delimiter)),xt.init(e,t)}),PO=M("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=gA),xt.init(e,t)});CO=M("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hA),xt.init(e,t),e._zod.check=(r)=>{if(!gk(r.value))r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});hk=/^[0-9a-zA-Z+/]*={0,2}$/,_O=M("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=hk),xt.init(e,t),e._zod.check=(r)=>{if(Yg(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Xg=/^[A-Za-z0-9_-]*$/;EO=M("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Xg),xt.init(e,t),e._zod.check=(r)=>{if(yk(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),RO=M("$ZodE164",(e,t)=>{t.pattern??(t.pattern=kA),xt.init(e,t)}),DPe=/[- ]/g;IO=M("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=ek),xt.init(e,t),e._zod.check=(r)=>{if(vk(r.value))return;r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});AO=M("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=tk),xt.init(e,t),e._zod.check=(r)=>{if(wk(r.value))return;r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});OO=M("$ZodJWT",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{if(bk(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),DO=M("$ZodCustomStringFormat",(e,t)=>{xt.init(e,t),e._zod.check=(r)=>{if(t.fn(r.value))return;r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),kk=M("$ZodNumber",(e,t)=>{Ue.init(e,t),e._zod.pattern=ns,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?String(n):void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),TO=M("$ZodNumberFormat",(e,t)=>{FA.init(e,t),kk.init(e,t)}),Qg=M("$ZodBoolean",(e,t)=>{Ue.init(e,t),e._zod.pattern=RA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(o){}let n=r.value;if(typeof n==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Sk=M("$ZodBigInt",(e,t)=>{Ue.init(e,t),e._zod.pattern=EA,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(n){}if(typeof r.value==="bigint")return r;return r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),NO=M("$ZodBigIntFormat",(e,t)=>{zA.init(e,t),Sk.init(e,t)}),MO=M("$ZodSymbol",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n==="symbol")return r;return r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),jO=M("$ZodUndefined",(e,t)=>{Ue.init(e,t),e._zod.pattern=AA,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n>"u")return r;return r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),FO=M("$ZodNull",(e,t)=>{Ue.init(e,t),e._zod.pattern=IA,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;if(n===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),zO=M("$ZodAny",(e,t)=>{Ue.init(e,t),e._zod.parse=(r)=>r}),UO=M("$ZodUnknown",(e,t)=>{Ue.init(e,t),e._zod.parse=(r)=>r}),LO=M("$ZodNever",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),BO=M("$ZodVoid",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(typeof n>"u")return r;return r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),qO=M("$ZodDate",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(a){}let n=r.value,o=n instanceof Date;if(o&&!Number.isNaN(n.getTime()))return r;return r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});VO=M("$ZodArray",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);let s=[],a=n?.abortEarly;for(let c=0;c<o.length;c++){let l=o[c],u=t.element._zod.run({value:l,issues:[]},n);if(u instanceof Promise)s.push(u.then((p)=>UV(p,i,c)));else if(UV(u,i,c),a&&u.issues.length!==0&&zn(u))break}if(s.length)return Promise.all(s).then(()=>i);return i}});MPe=[];oW=M("$ZodObject",(e,t)=>{Ue.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let l=()=>{let u={...i};return Object.defineProperty(t,"shape",{value:u}),l.raw=u,u};l.raw=i,Object.defineProperty(t,"shape",{get:l})}let n=Yp(()=>nW(t));Ze(e,"propValues",(l)=>{let u=l.def.shape,p={};for(let d in u){let f=u[d]._zod;if(f.values){if(!Object.prototype.hasOwnProperty.call(p,d))cn(p,d,new Set);for(let m of f.values)p[d].add(m);if(f.optin!==void 0)p[d].add(void 0)}}return p});let o=jl,s=t.catchall,a,c=Yr.memoizer;c?.attach(e),e._zod.parse=(l,u)=>{a??(a=n.value);let p=l.value;if(!o(p))return l.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),l;l.value=c?c.alloc(e,l,{},u):{};let d=[],f=a.shape,m=u?.abortEarly,g=l.issues.length;for(let h of a.allKeys){if(m&&l.issues.length!==g){if(zn(l,g))break;g=l.issues.length}if(h==="__proto__")continue;let y=f[h],v=y._zod.optin,w=y._zod.optout,x=y._zod.run({value:p[h],issues:[]},u);if(x instanceof Promise)d.push(x.then((b)=>uk(b,l,h,p,v,w)));else uk(x,l,h,p,v,w)}if(!s)return d.length?Promise.all(d).then(()=>l):l;return iW(d,p,l,u,n.value,e,m===!0)}}),WO=M("$ZodObjectJIT",(e,t)=>{oW.init(e,t);let r=e._zod.parse,i=Yp(()=>nW(t)),n=Yr.memoizer,o=(f)=>{let m=i.value,g=m.symbolKeys,h=new ad(["payload","ctx"],{shape:f,inst:e,memo:n,syms:g}),y=(b)=>`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`,v=(b,k)=>`
242
242
  let ${b}_ab = false;
243
243
  for (let i = 0; i < ${b}.issues.length; i++) {
244
244
  const iss = ${b}.issues[i];
@@ -288,17 +288,17 @@ ${t.join(`
288
288
  if (${k}.value !== undefined || ${N}) {
289
289
  newResult[${A}] = ${k}.value;
290
290
  }
291
- `)}return h.write("payload.value = newResult;"),h.write("return payload;"),h.compile()},s,a=jl,c=!Yr.jitless,u=c&&FI.value,p=t.catchall,d;e._zod.parse=(f,m)=>{d??(d=i.value);let g=f.value;if(!a(g))return f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f;if(c&&u&&m?.async===!1&&m.jitless!==!0){if(!s)s=o(t.shape);if(f=s(f,m),!p)return f;return iW([],g,f,m,d,e,m?.abortEarly===!0)}return r(f,m)}});eh=M("$ZodUnion",(e,t)=>{Ue.init(e,t),Ge(e,"optin",(i)=>i.def.options.some((n)=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some((n)=>n._zod.optin!==void 0)?"optional":void 0),Ge(e,"optout",(i)=>i.def.options.some((n)=>n._zod.optout==="optional")?"optional":void 0),Ge(e,"values",(i)=>{if(i.def.options.every((n)=>n._zod.values))return new Set(i.def.options.flatMap((n)=>Array.from(n._zod.values)));return}),Ge(e,"pattern",(i)=>{if(i.def.options.every((n)=>n._zod.pattern)){let n=i.def.options.map((o)=>o._zod.pattern);return new RegExp(`^(${n.map((o)=>ia(o.source)).join("|")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,s=[];for(let a of t.options){let c=a._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!o)return LV(s,i,e,n);return Promise.all(s).then((a)=>LV(a,i,e,n))}});HO=M("$ZodXor",(e,t)=>{eh.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,s=[];for(let a of t.options){let c=a._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)s.push(c),o=!0;else s.push(c)}if(!o)return BV(s,i,e,n);return Promise.all(s).then((a)=>BV(a,i,e,n))}});ZO=M("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,eh.init(e,t);let r=e._zod.parse;Ge(e,"propValues",(n)=>{let o={},s=0;for(let a of n.def.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw Error(`Invalid discriminated union option at index "${n.def.options.indexOf(a)}"`);if(c[n.def.discriminator]?.has(void 0))s++;for(let[l,u]of Object.entries(c)){if(!Object.prototype.hasOwnProperty.call(o,l))cn(o,l,new Set);for(let p of u)o[l].add(p)}}if(!n.def.unionFallback&&s>1)o[n.def.discriminator]?.delete(void 0);return o}),t.options.forEach((n,o)=>{let s=Xp(n._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw Error(`Invalid discriminated union option at index "${o}"`)});let i=Yp(()=>sW(t));e._zod.parse=(n,o)=>{let s=n.value;if(!jl(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=s?.[t.discriminator],c=i.value.get(a);if(c&&(a!==void 0||o.direction!=="backward"))return c._zod.run(n,o);if(t.unionFallback||o.direction==="backward")return r(n,o);return n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter((l)=>i.value.get(l)!==null),input:s,path:[t.discriminator],inst:e}),n}}),KO=M("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);if(o instanceof Promise||s instanceof Promise)return Promise.all([o,s]).then(([c,l])=>qV(r,c,l));return qV(r,o,s)}});$k=M("$ZodTuple",(e,t)=>{Ue.init(e,t);let r=t.items,i=Yr.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];let a=[],c=VV(r,"optin"),l=VV(r,"optout");if(!t.rest){if(s.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),n;if(s.length>r.length)n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:s,inst:e,origin:"array"})}let u=Array(r.length),p=t.rest?o?.abortEarly:void 0,d=!1;for(let f=0;f<r.length;f++){let m=r[f]._zod.run({value:s[f],issues:[]},o);if(m instanceof Promise)a.push(m.then((g)=>{u[f]=g}));else if(u[f]=m,p&&!d&&m.issues.length)d=zn(m)}if(t.rest&&!d){let f=r.length-1,m=s.slice(r.length),g=n.issues.length;for(let h of m){if(p&&n.issues.length!==g){if(zn(n,g))break;g=n.issues.length}f++;let y=t.rest._zod.run({value:h,issues:[]},o);if(y instanceof Promise)a.push(y.then((v)=>WV(v,n,f)));else WV(y,n,f)}}if(a.length)return Promise.all(a).then(()=>HV(u,n,r,s,l));return HV(u,n,r,s,l)}});JO=M("$ZodRecord",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!eo(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let s=[],a=t.keyType._zod.values;if(a&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};let c=new Set;for(let u of a)if(typeof u==="string"||typeof u==="number"||typeof u==="symbol"){if(c.add(typeof u==="number"?u.toString():u),u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(p.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map((m)=>si(m,n,fr())),input:u,path:[u],inst:e});continue}let d=p.value;if(d==="__proto__")continue;let f=t.valueType._zod.run({value:o[u],issues:[]},n);if(f instanceof Promise)s.push(f.then((m)=>{if(m.issues.length)i.issues.push(...oi(u,m.issues));i.value[d]=m.value}));else{if(f.issues.length)i.issues.push(...oi(u,f.issues));i.value[d]=f.value}}let l;for(let u in o)if(!c.has(u))if(t.mode==="loose"){if(u==="__proto__")continue;i.value[u]=o[u]}else l=l??[],l.push(u);if(l&&l.length>0)i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(let l of Reflect.ownKeys(o)){if(l==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(o,l))continue;let u=t.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof l==="string"&&ns.test(l)&&u.issues.length){let m=t.keyType._zod.run({value:Number(l),issues:[]},n);if(m instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(m.issues.length===0)u=m}if(u.issues.length){if(t.mode==="loose")i.value[l]=o[l];else if(a)c=c??[],c.push(l);else i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((m)=>si(m,n,fr())),input:l,path:[l],inst:e});continue}let d=u.value;if(d==="__proto__")continue;let f=t.valueType._zod.run({value:o[l],issues:[]},n);if(f instanceof Promise)s.push(f.then((m)=>{if(m.issues.length)i.issues.push(...oi(l,m.issues));i.value[d]=m.value}));else{if(f.issues.length)i.issues.push(...oi(l,f.issues));i.value[d]=f.value}}if(c&&c.length>0)i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}if(s.length)return Promise.all(s).then(()=>i);return i}}),YO=M("$ZodMap",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let s=[];i.value=r?r.alloc(e,i,new Map,n):new Map;let a=n?.abortEarly,c=i.issues.length;for(let[l,u]of o){if(a&&i.issues.length!==c){if(zn(i,c))break;c=i.issues.length}let p=t.keyType._zod.run({value:l,issues:[]},n),d=t.valueType._zod.run({value:u,issues:[]},n);if(p instanceof Promise||d instanceof Promise)s.push(Promise.all([p,d]).then(([f,m])=>{GV(f,m,i,l,o,e,n)}));else GV(p,d,i,l,o,e,n)}if(s.length)return Promise.all(s).then(()=>i);return i}});XO=M("$ZodSet",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let s=[];i.value=r?r.alloc(e,i,new Set,n):new Set;let a=n?.abortEarly,c=i.issues.length;for(let l of o){if(a&&i.issues.length!==c){if(zn(i,c))break;c=i.issues.length}let u=t.valueType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)s.push(u.then((p)=>ZV(p,i)));else ZV(u,i)}if(s.length)return Promise.all(s).then(()=>i);return i}});QO=M("$ZodEnum",(e,t)=>{Ue.init(e,t);let r=Kp(t.entries),i=new Set(r);e._zod.values=i,Ge(e,"pattern",(n)=>{let o=Kp(n.def.entries).filter((s)=>Dg.has(typeof s));return new RegExp(o.length?`^(${o.map((s)=>to(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let s=n.value;if(i.has(s))return n;return n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),eD=M("$ZodLiteral",(e,t)=>{Ue.init(e,t);let r=new Set(t.values);e._zod.values=r,Ge(e,"pattern",(i)=>{let n=i.def.values;return new RegExp(n.length?`^(${n.map((o)=>typeof o==="string"?to(o):o?to(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,n)=>{let o=i.value;if(r.has(o))return i;return i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),tD=M("$ZodFile",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(n instanceof File)return r;return r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),rD=M("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Yr.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r));if(n instanceof Promise)throw new _i;return r.value=n,r}});xk=M("$ZodOptional",(e,t)=>{Ue.init(e,t),Ge(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Ge(e,"values",(r)=>{let i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),Ge(e,"pattern",(r)=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ia(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},i);if(n instanceof Promise)return n.then((o)=>KV(r,o));return KV(r,n)}return t.innerType._zod.run(r,i)}}),nD=M("$ZodExactOptional",(e,t)=>{xk.init(e,t),Ge(e,"values",(r)=>r.def.innerType._zod.values),Ge(e,"pattern",(r)=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),iD=M("$ZodNullable",(e,t)=>{Ue.init(e,t),Ge(e,"optin",(r)=>r.def.innerType._zod.optin),Ge(e,"optout",(r)=>r.def.innerType._zod.optout),Ge(e,"pattern",(r)=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ia(i.source)}|null)$`):void 0}),Ge(e,"values",(r)=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>{if(r.value===null)return r;return t.innerType._zod.run(r,i)}}),oD=M("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="defaulted",Ge(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>JV(o,t));return JV(n,t)}});sD=M("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="defaulted",Ge(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,i)}}),aD=M("$ZodNonOptional",(e,t)=>{Ue.init(e,t),Ge(e,"values",(r)=>{let i=r.def.innerType._zod.values;return i?new Set([...i].filter((n)=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>YV(o,e));return YV(n,e)}});cD=M("$ZodSuccess",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl("ZodSuccess");let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>(r.value=o.issues.length===0,r));return r.value=n.issues.length===0,r}});lD=M("$ZodCatch",(e,t)=>{Ue.init(e,t),Ge(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ge(e,"optout",(r)=>r.def.innerType._zod.optout),Ge(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run({value:r.value,issues:[]},i);if(n instanceof Promise)return n.then((o)=>XV(r,o,t,i));return XV(r,n,t,i)}}),uD=M("$ZodNaN",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(typeof r.value!=="number"||!Number.isNaN(r.value))return r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r;return r}}),Pk=M("$ZodPipe",(e,t)=>{Ue.init(e,t),Ge(e,"values",(r)=>r.def.in._zod.values),Ge(e,"optin",(r)=>r.def.in._zod.optin),Ge(e,"optout",(r)=>r.def.out._zod.optout),Ge(e,"propValues",(r)=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ak(s,t.in,i));return ak(o,t.in,i)}let n=t.in._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>ak(o,t.out,i));return ak(n,t.out,i)}});th=M("$ZodCodec",(e,t)=>{Ue.init(e,t),Ge(e,"values",(r)=>r.def.in._zod.values),Ge(e,"optin",(r)=>r.def.in._zod.optin),Ge(e,"optout",(r)=>r.def.out._zod.optout),Ge(e,"propValues",(r)=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ck(s,t,i));return ck(o,t,i)}else{let o=t.out._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ck(s,t,i));return ck(o,t,i)}}});pD=M("$ZodPreprocess",(e,t)=>{Pk.init(e,t)}),dD=M("$ZodReadonly",(e,t)=>{Ue.init(e,t),Ge(e,"propValues",(r)=>r.def.innerType._zod.propValues),Ge(e,"values",(r)=>r.def.innerType._zod.values),Ge(e,"optin",(r)=>r.def.innerType?._zod?.optin),Ge(e,"optout",(r)=>r.def.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then(QV);return QV(n)}});fD=M("$ZodTemplateLiteral",(e,t)=>{Ue.init(e,t);let r=[];for(let i of t.parts)if(typeof i==="object"&&i!==null){let n=iO(i);if(!n)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);r.push(ia(n))}else if(i===null||zI.has(typeof i))r.push(to(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>{if(typeof i.value!=="string")return i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(i.value))return i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i;return i}}),mD=M("$ZodFunction",(e,t)=>(Ue.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=(r)=>{if(typeof r!=="function")throw Error("implement() must be called with a function");return Object.defineProperty(function(...i){let n=e._def.input?Bg(e._def.input,i):i,o=Reflect.apply(r,this,n);if(e._def.output)return Bg(e._def.output,o);return o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=(r)=>{if(typeof r!=="function")throw Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let n=e._def.input?await qg(e._def.input,i):i,o=await Reflect.apply(r,this,n);if(e._def.output)return await qg(e._def.output,o);return o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,i)=>{if(typeof r.value!=="function")return r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r;if(e._def.output&&e._def.output._zod.def.type==="promise")r.value=e.implementAsync(r.value);else r.value=e.implement(r.value);return r},e.input=(...r)=>{let i=e.constructor;if(Array.isArray(r[0]))return new i({type:"function",input:new $k({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output});return new i({type:"function",input:r[0],output:e._def.output})},e.output=(r)=>new e.constructor({type:"function",input:e._def.input,output:r}),e)),gD=M("$ZodPromise",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then((n)=>t.innerType._zod.run({value:n,issues:[]},i))}),rh=M("$ZodLazy",(e,t)=>{Ue.init(e,t),MI(e._zod,"innerType",()=>{let r=t;if(!r._cachedInner)r._cachedInner=t.getter();return r._cachedInner}),Ge(e,"pattern",(r)=>r.innerType?._zod?.pattern),Ge(e,"propValues",(r)=>r.innerType?._zod?.propValues),Ge(e,"optin",(r)=>r.innerType?._zod?.optin??void 0),Ge(e,"optout",(r)=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),hD=M("$ZodCustom",(e,t)=>{jt.init(e,t),Ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=(r)=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then((o)=>eW(o,r,i,e));eW(n,r,i,e);return}})});function lW(e){return e!==null&&typeof e==="object"}function yD(e){return e.map((t)=>t.path?{...t,path:t.path.slice()}:{...t})}function ih(e,t,r){let i=uW.get(e);if(i!==void 0)return i?nh:ud;if(t.has(e))return nh;t.add(e);let n=ud,o=(u)=>{if(n!==nh&&u?._zod){let p=ih(u,t,r);if(p>n)n=p}},s=(u,p)=>{let d=ud;for(let f of Reflect.ownKeys(u)){let m=Object.getOwnPropertyDescriptor(u,f);if(p&&!m.enumerable)continue;let g=m.get?Ek:m.value?._zod?ih(m.value,t,r):ud;if(g>d)d=g}return d},a=(u)=>{if(u>n)n=u},c=e._zod.def,l=c.type;switch(l){case"object":{let u=Xp(c);a(u?s(u,!0):Ek),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let u of c.items)o(u);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let u of c.options)o(u);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let u=c._cachedInner??(r?e._zod.innerType:void 0);a(u?ih(u,t,!1):Ek);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in c){let p=Object.getOwnPropertyDescriptor(c,u);if(!p||p.get)continue;let d=p.value;if(!d||typeof d!=="object")continue;if(d._zod)o(d);else if(Array.isArray(d))for(let f of d)o(f)}}return t.delete(e),FPe(e,n)}function FPe(e,t){if(t!==Ek)uW.set(e,t===nh);return t}function Rk(e){return ih(e,new Set,!0)!==ud}function zPe(e,t){let r=e.buckets.get(t);if(!r)r=new WeakMap,e.buckets.set(t,r);return r}function oh(){return UPe}function Ik(e,t){let r=e[vD]?.backEdges;return r!==void 0&&lW(t)&&r.has(t)}var wD,vD="~memo",cW,uW,ud=0,Ek=1,nh=2,Ck,_k,UPe;var bD=I(()=>{se();wD=class wD extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}};cW=[];uW=new WeakMap;_k=[],UPe={alloc(e,t,r){let i=Ck;if(!i)return r;Ck=void 0;let n={value:r,issues:null};return i.set(t.value,n),_k.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&Ik(o,n.value))throw new wD;return r(n,o)};if(e._zod.parse=i,e._zod.run===r)e._zod.run=i})},attach(e){var t;let r,i=!1,n,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,a=(c,l)=>{if(r===void 0){let y=ih(e,new Set,!1);if(y===ud){if(e._zod.parse=s,e._zod.run===a)e._zod.run=s;return s(c,l)}if(y===nh||i)r=!0;else i=!0}let u=c.value;if(!lW(u))return s(c,l);let p=l[vD];if(!p)p={buckets:new WeakMap,backEdges:void 0},l[vD]=p;let d;if(n===l)d=o;else d=zPe(p,e),n=l,o=d;let f=d.get(u);if(f){if(c.value=f.value,f.issues){if(f.issues.length)c.issues.push(...yD(f.issues))}else c.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(f.value);return c}Ck=d;let m=_k.length,g=s(c,l);Ck=void 0;let h=_k.length>m?_k.pop():void 0;if(g instanceof Promise)return g.then((y)=>{if(h)h.issues=y.issues.length?yD(y.issues):cW;return y});if(h)h.issues=g.issues.length?yD(g.issues):cW;return g};if(e._zod.parse=a,e._zod.run===s)e._zod.run=a})}}});function kD(){return{localeError:LPe()}}var LPe=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"},map:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}let r={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",mac:"عنوان MAC",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",credit_card:"رقم بطاقة الائتمان",currency_code:"رمز العملة",iban:"IBAN",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${a}`;return`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${a}`}case"invalid_value":if(n.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${V(n.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${s.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${s.unit}`;return`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`;if(o.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`;if(o.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`;if(o.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`;return`${r[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${j(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};var pW=I(()=>{se()});function SD(){return{localeError:BPe()}}var BPe=()=>{let 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"},map:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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",credit_card:"kredit kartı nömrəsi",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${a}`;return`Yanlış dəyər: gözlənilən ${o}, daxil olan ${a}`}case"invalid_value":if(n.values.length===1)return`Yanlış dəyər: gözlənilən ${V(n.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`;if(o.format==="ends_with")return`Yanlış mətn: "${o.suffix}" ilə bitməlidir`;if(o.format==="includes")return`Yanlış mətn: "${o.includes}" daxil olmalıdır`;if(o.format==="regex")return`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var dW=I(()=>{se()});function fW(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;if(s>=11&&s<=19)return i;if(o===1)return t;if(o>=2&&o<=4)return r;return i}function $D(){return{localeError:qPe()}}var qPe=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},map:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}let r={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 адрас",mac:"MAC адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",credit_card:"нумар крэдытнай карты",currency_code:"код валюты",iban:"IBAN",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${a}`;return`Няправільны ўвод: чакаўся ${o}, атрымана ${a}`}case"invalid_value":if(n.values.length===1)return`Няправільны ўвод: чакалася ${V(n.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=fW(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=fW(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${o.prefix}"`;if(o.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${o.suffix}"`;if(o.format==="includes")return`Няправільны радок: павінен змяшчаць "${o.includes}"`;if(o.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`;return`Няправільны ${r[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};var mW=I(()=>{se()});function xD(){return{localeError:VPe()}}var VPe=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"},map:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}let r={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 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",credit_card:"номер на кредитна карта",currency_code:"код на валута",iban:"IBAN",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Невалиден вход: очакван instanceof ${n.expected}, получен ${a}`;return`Невалиден вход: очакван ${o}, получен ${a}`}case"invalid_value":if(n.values.length===1)return`Невалиден вход: очакван ${V(n.values[0])}`;return`Невалидна опция: очаквано едно от ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${o}${n.maximum.toString()} ${s.unit??"елемента"}`;return`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Твърде малко: очаква се ${n.origin} да съдържа ${o}${n.minimum.toString()} ${s.unit}`;return`Твърде малко: очаква се ${n.origin} да бъде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let s="Невалиден";if(o.format==="emoji")s="Невалидно";if(o.format==="datetime")s="Невалидно";if(o.format==="date")s="Невалидна";if(o.format==="time")s="Невалидно";if(o.format==="duration")s="Невалидна";return`${s} ${r[o.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};var gW=I(()=>{se()});function PD(){return{localeError:WPe()}}var WPe=()=>{let e={string:{unit:"অক্ষর",verb:"থাকতে হবে"},file:{unit:"বাইট",verb:"থাকতে হবে"},array:{unit:"আইটেম",verb:"থাকতে হবে"},set:{unit:"আইটেম",verb:"থাকতে হবে"},map:{unit:"এন্ট্রি",verb:"থাকতে হবে"}};function t(n){return e[n]??null}let r={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 ঠিকানা",mac:"MAC ঠিকানা",cidrv4:"IPv4 রেঞ্জ",cidrv6:"IPv6 রেঞ্জ",base64:"base64-এনকোডেড স্ট্রিং",base64url:"base64url-এনকোডেড স্ট্রিং",json_string:"JSON স্ট্রিং",e164:"E.164 নম্বর",credit_card:"ক্রেডিট কার্ড নম্বর",currency_code:"মুদ্রা কোড",iban:"IBAN",jwt:"JWT",template_literal:"ইনপুট"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`অবৈধ ইনপুট: প্রত্যাশিত ${o}, প্রাপ্ত ${a}`}case"invalid_value":if(n.values.length===1)return`অবৈধ ইনপুট: প্রত্যাশিত ${V(n.values[0])}`;return`অবৈধ অপশন: ${j(n.values," | ")} এর মধ্যে একটি প্রত্যাশিত`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`অনেক বড়: ${n.origin??"মান"} ${o}${n.maximum.toString()} ${s.unit??"এলিমেন্ট"} হতে হবে`;return`অনেক বড়: ${n.origin??"মান"} ${o}${n.maximum.toString()} হতে হবে`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`অনেক ছোট: ${n.origin} ${o}${n.minimum.toString()} ${s.unit} হতে হবে`;return`অনেক ছোট: ${n.origin} ${o}${n.minimum.toString()} হতে হবে`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`অবৈধ স্ট্রিং: "${o.prefix}" দিয়ে শুরু হতে হবে`;if(o.format==="ends_with")return`অবৈধ স্ট্রিং: "${o.suffix}" দিয়ে শেষ হতে হবে`;if(o.format==="includes")return`অবৈধ স্ট্রিং: "${o.includes}" অন্তর্ভুক্ত থাকতে হবে`;if(o.format==="regex")return`অবৈধ স্ট্রিং: ${o.pattern} প্যাটার্ন মিলতে হবে`;return`অবৈধ ${r[o.format]??n.format}`}case"not_multiple_of":return`অবৈধ নম্বর: ${n.divisor} এর গুণিতক হতে হবে`;case"unrecognized_keys":return`অচেনা কী${n.keys.length>1?"গুলো":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} এ অবৈধ কী`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"অবৈধ ইনপুট";case"invalid_element":return`${n.origin} এ অবৈধ মান`;default:return"অবৈধ ইনপুট"}}};var hW=I(()=>{se()});function CD(){return{localeError:HPe()}}var HPe=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={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",mac:"adreça MAC",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",credit_card:"número de targeta de crèdit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`;return`Tipus invàlid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":if(n.values.length===1)return`Valor invàlid: s'esperava ${V(n.values[0])}`;return`Opció invàlida: s'esperava una de ${j(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a màxim":"menys de",s=t(n.origin);if(s)return`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${s.unit??"elements"}`;return`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a mínim":"més de",s=t(n.origin);if(s)return`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${s.unit}`;return`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Format invàlid: ha de començar amb "${o.prefix}"`;if(o.format==="ends_with")return`Format invàlid: ha d'acabar amb "${o.suffix}"`;if(o.format==="includes")return`Format invàlid: ha d'incloure "${o.includes}"`;if(o.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${o.pattern}`;return`Format invàlid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};var yW=I(()=>{se()});function _D(){return{localeError:GPe()}}var GPe=()=>{let e={string:{unit:"پیت",verb:"بێت"},file:{unit:"بایت",verb:"بێت"},array:{unit:"دانە",verb:"بێت"},set:{unit:"دانە",verb:"بێت"},map:{unit:"دانە",verb:"بێت"}};function t(n){return e[n]??null}let r={regex:"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",mac:"ناونیشانی MAC",cidrv4:"مەودای IPv4",cidrv6:"مەودای IPv6",base64:"دەقی base64",base64url:"دەقی base64url",json_string:"دەقی JSON",e164:"ژمارەی E.164",credit_card:"ژمارەی کارتی کرێدیت",currency_code:"کۆدی دراو",iban:"IBAN",jwt:"JWT",template_literal:"تێکردە"},i={nan:"NaN",string:"نووسین",number:"ژمارە",boolean:"boolean",array:"array",object:"object",date:"ڕێکەوت",integer:"ژمارە",float:"ژمارە",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s,c=["ا","و","ۆ","وو","ە","ی","ێ"].some((u)=>a.endsWith(u))?"یە":"ە",l=/^[a-zA-Z]+$/.test(a);if(s==="null"||s==="undefined")return"داواکراوە";return`چاوەڕوانکراوە ${o} بێت، بەڵام ${a}${l?"":c}`}case"invalid_value":if(n.values.length===1)return`بەهاکە نادرووستە: چاوەڕوانکراوە ${V(n.values[0])} بێت`;return`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${j(n.values,"|")}`;case"too_big":{let o=t(n.origin);if(o)return`پێویستە بە لایەنی زۆرەوە ${n.maximum.toString()} ${o.unit} ${o.verb}`;return`پێویستە بە لایەنی زۆرەوە ${n.maximum.toString()} بێت`}case"too_small":{let o=t(n.origin);if(o)return`پێویستە بە لایەنی کەمەوە ${n.minimum.toString()} ${o.unit} ${o.verb}`;return`پێویستە بە لایەنی کەمەوە ${n.minimum.toString()} بێت`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`دەقی نادروست: پێویستە دەستپێبکات بە "${o.prefix}"`;if(o.format==="ends_with")return`دەقی نادروست: پێویستە کۆتاییبێت بە "${o.suffix}"`;if(o.format==="includes")return`دەقی نادروست: پێویستە "${o.includes}" لەخۆبگرێت`;if(o.format==="regex")return`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${o.pattern} بگونجێت`;return`بەهای ${r[o.format]??n.format} نادروستە`}case"not_multiple_of":return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${n.divisor}`;case"unrecognized_keys":return`کلیلی نەناسراو: ${j(n.keys,", ")}`;case"invalid_key":return`کلیلی نادروست لە ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"یەکگرتنی نادروست";case"invalid_element":return`${n.origin} بەهاکە نادروستە`;default:return"تێکردەی نادروست"}}};var vW=I(()=>{se()});function ED(){return{localeError:ZPe()}}var ZPe=()=>{let 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"},map:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"číslo kreditní karty",currency_code:"kód měny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${a}`;return`Neplatný vstup: očekáváno ${o}, obdrženo ${a}`}case"invalid_value":if(n.values.length===1)return`Neplatný vstup: očekáváno ${V(n.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neplatný řetězec: musí začínat na "${o.prefix}"`;if(o.format==="ends_with")return`Neplatný řetězec: musí končit na "${o.suffix}"`;if(o.format==="includes")return`Neplatný řetězec: musí obsahovat "${o.includes}"`;if(o.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`;return`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${j(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};var wW=I(()=>{se()});function RD(){return{localeError:KPe()}}var KPe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let 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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`;return`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig værdi: forventede ${V(n.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`;return`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`;return`For lille: forventede ${a} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: skal starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: skal ende med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: skal indeholde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: skal matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};var bW=I(()=>{se()});function ID(){return{localeError:JPe()}}var JPe=()=>{let 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"},map:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={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",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"Währungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`;return`Ungültige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":if(n.values.length===1)return`Ungültige Eingabe: erwartet ${V(n.values[0])}`;return`Ungültige Option: erwartet eine von ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`;return`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ungültiger String: muss mit "${o.prefix}" beginnen`;if(o.format==="ends_with")return`Ungültiger String: muss mit "${o.suffix}" enden`;if(o.format==="includes")return`Ungültiger String: muss "${o.includes}" enthalten`;if(o.format==="regex")return`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`;return`Ungültig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};var kW=I(()=>{se()});function AD(){return{localeError:YPe()}}var YPe=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(n){return e[n]??null}let r={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",credit_card:"αριθμός πιστωτικής κάρτας",currency_code:"κωδικός νομίσματος",iban:"IBAN",jwt:"JWT",template_literal:"είσοδος"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(typeof n.expected==="string"&&/^[A-Z]/.test(n.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${n.expected}, λήφθηκε ${a}`;return`Μη έγκυρη είσοδος: αναμενόταν ${o}, λήφθηκε ${a}`}case"invalid_value":if(n.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${V(n.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Πολύ μεγάλο: αναμενόταν ${n.origin??"τιμή"} να έχει ${o}${n.maximum.toString()} ${s.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${n.origin??"τιμή"} να είναι ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Πολύ μικρό: αναμενόταν ${n.origin} να έχει ${o}${n.minimum.toString()} ${s.unit}`;return`Πολύ μικρό: αναμενόταν ${n.origin} να είναι ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${o.prefix}"`;if(o.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${o.suffix}"`;if(o.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${o.includes}"`;if(o.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${o.pattern}`;return`Μη έγκυρο: ${r[o.format]??n.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${n.divisor}`;case"unrecognized_keys":return`Άγνωστ${n.keys.length>1?"α":"ο"} κλειδ${n.keys.length>1?"ιά":"ί"}: ${j(n.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${n.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${n.origin}`;default:return"Μη έγκυρη είσοδος"}}};var SW=I(()=>{se()});function sh(){return{localeError:XPe()}}var XPe=()=>{let 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(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,s){if(o==="number"&&typeof s==="number"&&!Number.isFinite(s))return String(s);return i[o]??o}return(o)=>{switch(o.code){case"invalid_type":{let s=n(o.expected),a=W(o.input),c=n(a,o.input);return`Invalid input: expected ${s}, received ${c}`}case"invalid_value":if(o.values.length===1)return`Invalid input: expected ${V(o.values[0])}`;return`Invalid option: expected one of ${j(o.values,"|")}`;case"too_big":{let s=o.exact?"exactly ":o.inclusive?"<=":"<",a=t(o.origin);if(a)return`Too big: expected ${o.origin??"value"} to have ${s}${o.maximum.toString()} ${a.unit??"elements"}`;return`Too big: expected ${o.origin??"value"} to be ${s}${o.maximum.toString()}`}case"too_small":{let s=o.exact?"exactly ":o.inclusive?">=":">",a=t(o.origin);if(a)return`Too small: expected ${o.origin} to have ${s}${o.minimum.toString()} ${a.unit}`;return`Too small: expected ${o.origin} to be ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;if(s.format==="starts_with")return`Invalid string: must start with "${s.prefix}"`;if(s.format==="ends_with")return`Invalid string: must end with "${s.suffix}"`;if(s.format==="includes")return`Invalid string: must include "${s.includes}"`;if(s.format==="regex")return`Invalid string: must match pattern ${s.pattern}`;return`Invalid ${r[s.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":if(o.options&&Array.isArray(o.options)&&o.options.length>0)return`Invalid discriminator value. Expected ${o.options.map((a)=>`'${a}'`).join(" | ")}`;if(o.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};var OD=I(()=>{se()});function DD(){return{localeError:QPe()}}var QPe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${a}`;return`Nevalida enigo: atendiĝis ${o}, riceviĝis ${a}`}case"invalid_value":if(n.values.length===1)return`Nevalida enigo: atendiĝis ${V(n.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Tro malgranda: atendiĝis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`;return`Tro malgranda: atendiĝis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`;if(o.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`;if(o.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${o.includes}"`;if(o.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`;return`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};var $W=I(()=>{se()});function TD(){return{localeError:eCe()}}var eCe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let 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",mac:"dirección MAC",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",credit_card:"número de tarjeta de crédito",currency_code:"código de moneda",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${a}`;return`Entrada inválida: se esperaba ${o}, recibido ${a}`}case"invalid_value":if(n.values.length===1)return`Entrada inválida: se esperaba ${V(n.values[0])}`;return`Opción inválida: se esperaba una de ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Demasiado pequeño: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`;return`Demasiado pequeño: se esperaba que ${a} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Cadena inválida: debe comenzar con "${o.prefix}"`;if(o.format==="ends_with")return`Cadena inválida: debe terminar en "${o.suffix}"`;if(o.format==="includes")return`Cadena inválida: debe incluir "${o.includes}"`;if(o.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${o.pattern}`;return`Inválido ${r[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};var xW=I(()=>{se()});function ND(){return{localeError:tCe()}}var tCe=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"},map:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}let r={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 آدرس",mac:"MAC آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",credit_card:"شماره کارت اعتباری",currency_code:"کد ارز",iban:"IBAN",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ورودی نامعتبر: می‌بایست instanceof ${n.expected} می‌بود، ${a} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${o} می‌بود، ${a} دریافت شد`}case"invalid_value":if(n.values.length===1)return`ورودی نامعتبر: می‌بایست ${V(n.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${j(n.values,"|")} می‌بود`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} باشد`;return`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`رشته نامعتبر: باید با "${o.prefix}" شروع شود`;if(o.format==="ends_with")return`رشته نامعتبر: باید با "${o.suffix}" تمام شود`;if(o.format==="includes")return`رشته نامعتبر: باید شامل "${o.includes}" باشد`;if(o.format==="regex")return`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`;return`${r[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${j(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};var PW=I(()=>{se()});function MD(){return{localeError:rCe()}}var rCe=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}let r={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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`;return`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":if(n.values.length===1)return`Virheellinen syöte: täytyy olla ${V(n.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim();return`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim();return`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${o.prefix}"`;if(o.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${o.suffix}"`;if(o.format==="includes")return`Virheellinen syöte: täytyy sisältää "${o.includes}"`;if(o.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`;return`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var CW=I(()=>{se()});function jD(){return{localeError:nCe()}}var nCe=()=>{let 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(n){return e[n]??null}let r={regex:"expression régulière",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne de caractères encodée en base64",base64url:"chaîne de caractères encodée en base64url",json_string:"chaîne de caractères JSON",e164:"numéro au format E.164",credit_card:"numéro de carte de crédit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},i={string:"chaîne de caractères",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:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrée invalide : instance de ${n.expected} attendu, ${a} reçu`;return`Entrée invalide : ${o} attendu, ${a} reçu`}case"invalid_value":if(n.values.length===1)return`Entrée invalide : ${V(n.values[0])} attendu`;return`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Trop grand : ${i[n.origin]??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"élément(s)"}`;return`Trop grand : ${i[n.origin]??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Trop petit : ${i[n.origin]??"valeur"} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Trop petit : ${i[n.origin]??"valeur"} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chaîne de caractères invalide : doit commencer par "${o.prefix}"`;if(o.format==="ends_with")return`Chaîne de caractères invalide : doit se terminer par "${o.suffix}"`;if(o.format==="includes")return`Chaîne de caractères invalide : doit inclure "${o.includes}"`;if(o.format==="regex")return`Chaîne de caractères invalide : doit correspondre au motif ${o.pattern}`;return`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};var _W=I(()=>{se()});function FD(){return{localeError:iCe()}}var iCe=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"},map:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}let r={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",mac:"adresse MAC",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",credit_card:"numéro de carte de crédit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrée invalide : attendu instanceof ${n.expected}, reçu ${a}`;return`Entrée invalide : attendu ${o}, reçu ${a}`}case"invalid_value":if(n.values.length===1)return`Entrée invalide : attendu ${V(n.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"≤":"<",s=t(n.origin);if(s)return`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`;return`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"≥":">",s=t(n.origin);if(s)return`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`;return`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chaîne invalide : doit commencer par "${o.prefix}"`;if(o.format==="ends_with")return`Chaîne invalide : doit se terminer par "${o.suffix}"`;if(o.format==="includes")return`Chaîne invalide : doit inclure "${o.includes}"`;if(o.format==="regex")return`Chaîne invalide : doit correspondre au motif ${o.pattern}`;return`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};var EW=I(()=>{se()});function zD(){return{localeError:oCe()}}var oCe=()=>{let e={string:{unit:"અક્ષર",verb:"હોવા જોઈએ"},file:{unit:"બાયટ",verb:"હોવા જોઈએ"},array:{unit:"આઇટમ",verb:"હોવા જોઈએ"},set:{unit:"આઇટમ",verb:"હોવા જોઈએ"},map:{unit:"એન્ટ્રી",verb:"હોવા જોઈએ"}};function t(n){return e[n]??null}let r={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 એડ્રેસ",mac:"MAC એડ્રેસ",cidrv4:"IPv4 શ્રેણી",cidrv6:"IPv6 શ્રેણી",base64:"base64-એન્કોડેડ સ્ટ્રિંગ",base64url:"base64url-એન્કોડેડ સ્ટ્રિંગ",json_string:"JSON સ્ટ્રિંગ",e164:"E.164 નંબર",credit_card:"ક્રેડિટ કાર્ડ નંબર",currency_code:"ચલણ કોડ",iban:"IBAN",jwt:"JWT",template_literal:"ઇનપુટ"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`અમાન્ય ઇનપુટ: અપેક્ષિત ${o}, પ્રાપ્ત ${a}`}case"invalid_value":if(n.values.length===1)return`અમાન્ય ઇનપુટ: અપેક્ષિત ${V(n.values[0])}`;return`અમાન્ય વિકલ્પ: ${j(n.values," | ")} માધ્યમથી એક અપેક્ષિત`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ખૂબ મોટું: ${n.origin??"મૂલ્ય"} ${o}${n.maximum.toString()} ${s.unit??"એલિમેન્ટ"} હોવા જોઈએ`;return`ખૂબ મોટું: ${n.origin??"મૂલ્ય"} ${o}${n.maximum.toString()} હોવું જોઈએ`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ખૂબ નાનું: ${n.origin} ${o}${n.minimum.toString()} ${s.unit} હોવા જોઈએ`;return`ખૂબ નાનું: ${n.origin} ${o}${n.minimum.toString()} હોવું જોઈએ`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`અમાન્ય સ્ટ્રિંગ: "${o.prefix}" થી શરૂ થવું જોઈએ`;if(o.format==="ends_with")return`અમાન્ય સ્ટ્રિંગ: "${o.suffix}" પર સમાપ્ત થવું જોઈએ`;if(o.format==="includes")return`અમાન્ય સ્ટ્રિંગ: "${o.includes}" શામેલ હોવું જોઈએ`;if(o.format==="regex")return`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${o.pattern} સાથે મેળ ખાવું જોઈએ`;return`અમાન્ય ${r[o.format]??n.format}`}case"not_multiple_of":return`અમાન્ય નંબર: ${n.divisor} નો ગુણાંક હોવો જોઈએ`;case"unrecognized_keys":return`ઓળખી શકાતા નહીં તે કી${n.keys.length>1?"ઓ":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} માં અમાન્ય કી`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"અમાન્ય ઇનપુટ";case"invalid_element":return`${n.origin} માં અમાન્ય મૂલ્ય`;default:return"અમાન્ય ઇનપુટ"}}};var RW=I(()=>{se()});function UD(){return{localeError:sCe()}}var sCe=()=>{let 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:"גדול"}},r=(l)=>l?e[l]:void 0,i=(l)=>{let u=r(l);if(u)return u.label;return l??e.unknown.label},n=(l)=>`ה${i(l)}`,o=(l)=>(r(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",s=(l)=>{if(!l)return null;return t[l]??null},a={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",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"},mac:{label:"כתובת MAC",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"},credit_card:{label:"מספר כרטיס אשראי",gender:"m"},currency_code:{label:"קוד מטבע",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"קלט",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return(l)=>{switch(l.code){case"invalid_type":{let u=l.expected,p=c[u??""]??i(u),d=W(l.input),f=c[d]??e[d]?.label??d;if(/^[A-Z]/.test(l.expected))return`קלט לא תקין: צריך להיות instanceof ${l.expected}, התקבל ${f}`;return`קלט לא תקין: צריך להיות ${p}, התקבל ${f}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${V(l.values[0])}`;let u=l.values.map((f)=>V(f));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${u[0]} או ${u[1]}`;let p=u[u.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${u.slice(0,-1).join(", ")} או ${p}`}case"too_big":{let u=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"ארוך"} מדי: ${p} צריכה להכיל ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){let m=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${p} צריך להיות ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"צריכה":"צריך",g=l.inclusive?`${l.maximum} ${u?.unit??""} או פחות`:`פחות מ-${l.maximum} ${u?.unit??""}`;return`גדול מדי: ${p} ${m} להכיל ${g}`.trim()}let d=l.inclusive?"<=":"<",f=o(l.origin??"value");if(u?.unit)return`${u.longLabel} מדי: ${p} ${f} ${d}${l.maximum.toString()} ${u.unit}`;return`${u?.longLabel??"גדול"} מדי: ${p} ${f} ${d}${l.maximum.toString()}`}case"too_small":{let u=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"קצר"} מדי: ${p} צריכה להכיל ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){let m=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${p} צריך להיות ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){let h=l.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${p} ${m} להכיל ${h}`}let g=l.inclusive?`${l.minimum} ${u?.unit??""} או יותר`:`יותר מ-${l.minimum} ${u?.unit??""}`;return`קטן מדי: ${p} ${m} להכיל ${g}`.trim()}let d=l.inclusive?">=":">",f=o(l.origin??"value");if(u?.unit)return`${u.shortLabel} מדי: ${p} ${f} ${d}${l.minimum.toString()} ${u.unit}`;return`${u?.shortLabel??"קטן"} מדי: ${p} ${f} ${d}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${u.prefix}"`;if(u.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${u.suffix}"`;if(u.format==="includes")return`המחרוזת חייבת לכלול "${u.includes}"`;if(u.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${u.pattern}`;let p=a[u.format],d=p?.label??u.format,m=(p?.gender??"m")==="f"?"תקינה":"תקין";return`${d} לא ${m}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${j(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(l.origin??"array")}`;default:return"קלט לא תקין"}}};var IW=I(()=>{se()});function LD(){return{localeError:aCe()}}var aCe=()=>{let e={string:{unit:"अक्षर",verb:"रखने के लिए"},file:{unit:"बाइट्स",verb:"रखने के लिए"},array:{unit:"तत्व",verb:"रखने के लिए"},set:{unit:"तत्व",verb:"रखने के लिए"},map:{unit:"प्रविष्टियाँ",verb:"रखने के लिए"}};function t(n){return e[n]??null}let r={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 पता",mac:"MAC पता",cidrv4:"IPv4 श्रेणी",cidrv6:"IPv6 श्रेणी",base64:"Base64-एन्कोडेड स्ट्रिंग",base64url:"Base64URL-एन्कोडेड स्ट्रिंग",json_string:"JSON स्ट्रिंग",e164:"E.164 संख्या",credit_card:"क्रेडिट कार्ड संख्या",currency_code:"मुद्रा कोड",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`अमान्य इनपुट: अपेक्षित ${o}, प्राप्त ${a}`}case"invalid_value":if(n.values.length===1)return`अमान्य इनपुट: अपेक्षित ${V(n.values[0])}`;return`अमान्य विकल्प: अपेक्षित मानों में से एक ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`बहुत बड़ा: अपेक्षित था कि ${n.origin??"मान"} में ${o}${n.maximum} ${s.unit} हों`;return`बहुत बड़ा: अपेक्षित था कि ${n.origin??"मान"} ${o}${n.maximum} हो`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`बहुत छोटा: अपेक्षित था कि ${n.origin} में ${o}${n.minimum} ${s.unit} हों`;return`बहुत छोटा: अपेक्षित था कि ${n.origin} ${o}${n.minimum} हो`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`अमान्य स्ट्रिंग: "${o.prefix}" से शुरू होना चाहिए`;if(o.format==="ends_with")return`अमान्य स्ट्रिंग: "${o.suffix}" पर समाप्त होना चाहिए`;if(o.format==="includes")return`अमान्य स्ट्रिंग: इसमें "${o.includes}" शामिल होना चाहिए`;if(o.format==="regex")return`अमान्य स्ट्रिंग: पैटर्न ${o.pattern} से मेल खाना चाहिए`;return`अमान्य ${r[o.format]??n.format}`}case"not_multiple_of":return`अमान्य संख्या: यह ${n.divisor} का गुणज होना चाहिए`;case"unrecognized_keys":return`अपरिचित कुंजी${n.keys.length>1?"याँ":""}: ${j(n.keys,", ")}`;case"invalid_key":return`अमान्य कुंजी: ${n.origin} में`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${n.origin} में`;default:return"अमान्य इनपुट"}}};var AW=I(()=>{se()});function BD(){return{localeError:cCe()}}var cCe=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={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",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neispravan unos: očekuje se instanceof ${n.expected}, a primljeno je ${a}`;return`Neispravan unos: očekuje se ${o}, a primljeno je ${a}`}case"invalid_value":if(n.values.length===1)return`Neispravna vrijednost: očekivano ${V(n.values[0])}`;return`Neispravna opcija: očekivano jedno od ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Preveliko: očekivano da ${a??"vrijednost"} ima ${o}${n.maximum.toString()} ${s.unit??"elemenata"}`;return`Preveliko: očekivano da ${a??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Premalo: očekivano da ${a} ima ${o}${n.minimum.toString()} ${s.unit}`;return`Premalo: očekivano da ${a} bude ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neispravan tekst: mora započinjati s "${o.prefix}"`;if(o.format==="ends_with")return`Neispravan tekst: mora završavati s "${o.suffix}"`;if(o.format==="includes")return`Neispravan tekst: mora sadržavati "${o.includes}"`;if(o.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`;return`Neispravna ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i ključevi":" ključ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};var OW=I(()=>{se()});function qD(){return{localeError:lCe()}}var lCe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"hitelkártyaszám",currency_code:"pénznemkód",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${a}`;return`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${a}`}case"invalid_value":if(n.values.length===1)return`Érvénytelen bemenet: a várt érték ${V(n.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${s.unit}`;return`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`;if(o.format==="ends_with")return`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`;if(o.format==="includes")return`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`;if(o.format==="regex")return`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`;return`Érvénytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};var DW=I(()=>{se()});function TW(e,t,r){return Math.abs(e)===1?t:r}function pd(e){if(!e)return"";let t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}function VD(){return{localeError:uCe()}}var uCe=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},map:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}let r={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 հասցե",mac:"MAC հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",credit_card:"կրեդիտ քարտի համար",currency_code:"արժույթի կոդ",iban:"IBAN",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${a}`;return`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${a}`}case"invalid_value":if(n.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${V(n.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=TW(a,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pd(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${c}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pd(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=TW(a,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pd(n.origin)} կունենա ${o}${n.minimum.toString()} ${c}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pd(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`;if(o.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`;if(o.format==="includes")return`Սխալ տող․ պետք է պարունակի "${o.includes}"`;if(o.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`;return`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${j(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${pd(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${pd(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};var NW=I(()=>{se()});function WD(){return{localeError:pCe()}}var pCe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`;return`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":if(n.values.length===1)return`Input tidak valid: diharapkan ${V(n.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`;return`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`String tidak valid: harus dimulai dengan "${o.prefix}"`;if(o.format==="ends_with")return`String tidak valid: harus berakhir dengan "${o.suffix}"`;if(o.format==="includes")return`String tidak valid: harus menyertakan "${o.includes}"`;if(o.format==="regex")return`String tidak valid: harus sesuai pola ${o.pattern}`;return`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};var MW=I(()=>{se()});function HD(){return{localeError:dCe()}}var dCe=()=>{let 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"},map:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}let r={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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",credit_card:"kreditkortanúmer",currency_code:"gjaldmiðilskóði",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera instanceof ${n.expected}`;return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera ${o}`}case"invalid_value":if(n.values.length===1)return`Rangt gildi: gert ráð fyrir ${V(n.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`;return`Of lítið: gert er ráð fyrir að ${n.origin} sé ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ógildur strengur: verður að byrja á "${o.prefix}"`;if(o.format==="ends_with")return`Ógildur strengur: verður að enda á "${o.suffix}"`;if(o.format==="includes")return`Ógildur strengur: verður að innihalda "${o.includes}"`;if(o.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`;return`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${j(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};var jW=I(()=>{se()});function GD(){return{localeError:fCe()}}var fCe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`;return`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":if(n.values.length===1)return`Input non valido: atteso ${V(n.values[0])}`;return`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`;return`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`;return`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Stringa non valida: deve iniziare con "${o.prefix}"`;if(o.format==="ends_with")return`Stringa non valida: deve terminare con "${o.suffix}"`;if(o.format==="includes")return`Stringa non valida: deve includere "${o.includes}"`;if(o.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${o.pattern}`;return`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};var FW=I(()=>{se()});function ZD(){return{localeError:mCe()}}var mCe=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"},map:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}let r={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アドレス",mac:"MACアドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",credit_card:"クレジットカード番号",currency_code:"通貨コード",iban:"IBAN",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`無効な入力: instanceof ${n.expected}が期待されましたが、${a}が入力されました`;return`無効な入力: ${o}が期待されましたが、${a}が入力されました`}case"invalid_value":if(n.values.length===1)return`無効な入力: ${V(n.values[0])}が期待されました`;return`無効な選択: ${j(n.values,"、")}のいずれかである必要があります`;case"too_big":{let o=n.inclusive?"以下である":"より小さい",s=t(n.origin);if(s)return`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${o}必要があります`;return`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{let o=n.inclusive?"以上である":"より大きい",s=t(n.origin);if(s)return`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${o}必要があります`;return`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`無効な文字列: "${o.prefix}"で始まる必要があります`;if(o.format==="ends_with")return`無効な文字列: "${o.suffix}"で終わる必要があります`;if(o.format==="includes")return`無効な文字列: "${o.includes}"を含む必要があります`;if(o.format==="regex")return`無効な文字列: パターン${o.pattern}に一致する必要があります`;return`無効な${r[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${j(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};var zW=I(()=>{se()});function KD(){return{localeError:gCe()}}var gCe=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},map:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}let r={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 მისამართი",mac:"MAC მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",credit_card:"საკრედიტო ბარათის ნომერი",currency_code:"ვალუტის კოდი",iban:"IBAN",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${a}`;return`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${a}`}case"invalid_value":if(n.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${V(n.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${j(n.values,"|")}-დან`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${o.prefix}"-ით`;if(o.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${o.suffix}"-ით`;if(o.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${o.includes}"-ს`;if(o.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`;return`არასწორი ${r[o.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${j(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};var UW=I(()=>{se()});function ah(){return{localeError:hCe()}}var hCe=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"},map:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}let r={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",mac:"អាសយដ្ឋាន MAC",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",credit_card:"លេខប័ណ្ណឥណទាន",currency_code:"កូដរូបិយប័ណ្ណ",iban:"IBAN",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${a}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${a}`}case"invalid_value":if(n.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${V(n.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`;return`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`;if(o.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`;if(o.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`;if(o.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`;return`មិនត្រឹមត្រូវ៖ ${r[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${j(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var JD=I(()=>{se()});function YD(){return ah()}var LW=I(()=>{JD()});function XD(){return{localeError:yCe()}}var yCe=()=>{let e={string:{unit:"ಅಕ್ಷರಗಳು",verb:"ಹೊಂದಲು"},file:{unit:"ಬೈಟ್‌ಗಳು",verb:"ಹೊಂದಲು"},array:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},set:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},map:{unit:"entries",verb:"ಹೊಂದಲು"}};function t(n){return e[n]??null}let r={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-encodedಸ್ಟ್ರಿಂಗ್",base64url:"base64url-encodedಸ್ಟ್ರಿಂಗ್",json_string:"JSONಸ್ಟ್ರಿಂಗ್",e164:"E.164 ಸಂಖ್ಯೆ",credit_card:"ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ",currency_code:"ಕರೆನ್ಸಿ ಕೋಡ್",iban:"IBAN",jwt:"JWT",template_literal:"ಇನ್ಪುಟ್"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${o}, ಸ್ವೀಕರಿಸಿದನು ${a}`}case"invalid_value":if(n.values.length===1)return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${V(n.values[0])}`;return`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin??"value"} ಹೊಂದಲು ${o}${n.maximum.toString()} ${s.unit??"ಅಂಶಗಳು"}`;return`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin??"value"} ಎಂದು ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin} ಹೊಂದಲು ${o}${n.minimum.toString()} ${s.unit}`;return`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin} ಎಂದು ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${o.prefix}"`;if(o.format==="ends_with")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${o.suffix}"`;if(o.format==="includes")return`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${o.includes}"`;if(o.format==="regex")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${o.pattern}`;return`ಅಮಾನ್ಯ ${r[o.format]??n.format}`}case"not_multiple_of":return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${n.divisor}`;case"unrecognized_keys":return`ಗುರುತಿಸಲಾಗದ ಕೀ ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್";case"invalid_element":return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${n.origin}`;default:return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್"}}};var BW=I(()=>{se()});function QD(){return{localeError:vCe()}}var vCe=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"},map:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}let r={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 주소",mac:"MAC 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",credit_card:"신용카드 번호",currency_code:"통화 코드",iban:"IBAN",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${a}입니다`;return`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${a}입니다`}case"invalid_value":if(n.values.length===1)return`잘못된 입력: 값은 ${V(n.values[0])} 이어야 합니다`;return`잘못된 옵션: ${j(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";if(a)return`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`;return`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";if(a)return`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${o}${s}`;return`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`;if(o.format==="ends_with")return`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`;if(o.format==="includes")return`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`;if(o.format==="regex")return`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${r[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${j(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};var qW=I(()=>{se()});function VW(e){let t=Math.abs(e),r=t%10,i=t%100;if(i>=11&&i<=19||r===0)return"many";if(r===1)return"one";return"few"}function eT(){return{localeError:wCe()}}var ch=(e)=>e.charAt(0).toUpperCase()+e.slice(1),wCe=()=>{let 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(n,o,s,a){let c=e[n]??null;if(c===null)return c;return{unit:c.unit[o],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={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",mac:"MAC 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",credit_card:"kredito kortelės numeris",currency_code:"valiutos kodas",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Gautas tipas ${a}, o tikėtasi - instanceof ${n.expected}`;return`Gautas tipas ${a}, o tikėtasi - ${o}`}case"invalid_value":if(n.values.length===1)return`Privalo būti ${V(n.values[0])}`;return`Privalo būti vienas iš ${j(n.values,"|")} pasirinkimų`;case"too_big":{let o=i[n.origin]??n.origin,s=t(n.origin,VW(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${ch(o??n.origin??"reikšmė")} ${s.verb} ${n.maximum.toString()} ${s.unit??"elementų"}`;let a=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${ch(o??n.origin??"reikšmė")} turi būti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=t(n.origin,VW(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${ch(o??n.origin??"reikšmė")} ${s.verb} ${n.minimum.toString()} ${s.unit??"elementų"}`;let a=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${ch(o??n.origin??"reikšmė")} turi būti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Eilutė privalo prasidėti "${o.prefix}"`;if(o.format==="ends_with")return`Eilutė privalo pasibaigti "${o.suffix}"`;if(o.format==="includes")return`Eilutė privalo įtraukti "${o.includes}"`;if(o.format==="regex")return`Eilutė privalo atitikti ${o.pattern}`;return`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${j(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${ch(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};var WW=I(()=>{se()});function tT(){return{localeError:bCe()}}var bCe=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"},map:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}let r={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 адреса",mac:"MAC адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",credit_card:"број на кредитна картичка",currency_code:"код на валута",iban:"IBAN",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Грешен внес: се очекува instanceof ${n.expected}, примено ${a}`;return`Грешен внес: се очекува ${o}, примено ${a}`}case"invalid_value":if(n.values.length===1)return`Invalid input: expected ${V(n.values[0])}`;return`Грешана опција: се очекува една ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${s.unit??"елементи"}`;return`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${s.unit}`;return`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неважечка низа: мора да започнува со "${o.prefix}"`;if(o.format==="ends_with")return`Неважечка низа: мора да завршува со "${o.suffix}"`;if(o.format==="includes")return`Неважечка низа: мора да вклучува "${o.includes}"`;if(o.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${o.pattern}`;return`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${j(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};var HW=I(()=>{se()});function rT(){return{localeError:kCe()}}var kCe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`;return`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":if(n.values.length===1)return`Input tidak sah: dijangka ${V(n.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`String tidak sah: mesti bermula dengan "${o.prefix}"`;if(o.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${o.suffix}"`;if(o.format==="includes")return`String tidak sah: mesti mengandungi "${o.includes}"`;if(o.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${o.pattern}`;return`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${j(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};var GW=I(()=>{se()});function nT(){return{localeError:SCe()}}var SCe=()=>{let e={string:{unit:"अक्षर",verb:"हुनुपर्छ"},file:{unit:"बाइट",verb:"हुनुपर्छ"},array:{unit:"तत्व",verb:"हुनुपर्छ"},set:{unit:"तत्व",verb:"हुनुपर्छ"},map:{unit:"प्रविष्टि",verb:"हुनुपर्छ"}};function t(n){return e[n]??null}let r={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 ठेगाना",mac:"MAC ठेगाना",cidrv4:"IPv4 दायरा",cidrv6:"IPv6 दायरा",base64:"base64-इन्कोड गरिएको स्ट्रिङ",base64url:"base64url-इन्कोड गरिएको स्ट्रिङ",json_string:"JSON स्ट्रिङ",e164:"E.164 नम्बर",credit_card:"क्रेडिट कार्ड नम्बर",currency_code:"मुद्रा कोड",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`अमान्य इनपुट: अपेक्षित ${o}, प्राप्त ${a}`}case"invalid_value":if(n.values.length===1)return`अमान्य इनपुट: अपेक्षित ${V(n.values[0])}`;return`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`धेरै ठूलो: ${n.origin??"मान"} मा ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`धेरै ठूलो: ${n.origin??"मान"} ${o}${n.maximum.toString()} हुनुपर्छ`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`धेरै सानो: ${n.origin} मा ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`धेरै सानो: ${n.origin} ${o}${n.minimum.toString()} हुनुपर्छ`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`अमान्य स्ट्रिङ: "${o.prefix}" बाट सुरु हुनुपर्छ`;if(o.format==="ends_with")return`अमान्य स्ट्रिङ: "${o.suffix}" मा समाप्त हुनुपर्छ`;if(o.format==="includes")return`अमान्य स्ट्रिङ: "${o.includes}" समावेश हुनुपर्छ`;if(o.format==="regex")return`अमान्य स्ट्रिङ: ढाँचा ${o.pattern} सँग मेल खानुपर्छ`;return`अमान्य ${r[o.format]??n.format}`}case"not_multiple_of":return`अमान्य संख्या: ${n.divisor} को गुणज हुनुपर्छ`;case"unrecognized_keys":return`अपरिचित कुञ्जी${n.keys.length>1?"हरू":""}: ${j(n.keys,", ")}`;case"invalid_key":return`अमान्य कुञ्जी: ${n.origin} मा`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${n.origin} मा`;default:return"अमान्य इनपुट"}}};var ZW=I(()=>{se()});function iT(){return{localeError:$Ce()}}var $Ce=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`;return`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":if(n.values.length===1)return`Ongeldige invoer: verwacht ${V(n.values[0])}`;return`Ongeldige optie: verwacht één van ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";if(s)return`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`;return`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";if(s)return`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ongeldige tekst: moet met "${o.prefix}" beginnen`;if(o.format==="ends_with")return`Ongeldige tekst: moet op "${o.suffix}" eindigen`;if(o.format==="includes")return`Ongeldige tekst: moet "${o.includes}" bevatten`;if(o.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`;return`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};var KW=I(()=>{se()});function oT(){return{localeError:xCe()}}var xCe=()=>{let e={string:{unit:"teikn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"element",verb:"å innehalde"},set:{unit:"element",verb:"å innehalde"},map:{unit:"element",verb:"å innehalde"}};function t(n){return e[n]??null}let r={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-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldig input: forventa instanceof ${n.expected}, fekk ${a}`;return`Ugyldig input: forventa ${o}, fekk ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig verdi: forventa ${V(n.values[0])}`;return`Ugyldig val: forventa eitt av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`For stor(t): forventa ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`For stor(t): forventa ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`For lite(n): forventa ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`;return`For lite(n): forventa ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: må starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: må slutte med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: må innehalde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: må matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: må vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende nøklar":"Ukjend nøkkel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};var JW=I(()=>{se()});function sT(){return{localeError:PCe()}}var PCe=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"},map:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}let r={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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`;return`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig verdi: forventet ${V(n.values[0])}`;return`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`;return`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`;return`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: må starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: må ende med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: må inneholde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: må matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};var YW=I(()=>{se()});function aT(){return{localeError:CCe()}}var CCe=()=>{let 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"},map:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}let r={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ı",mac:"MAC 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ı",credit_card:"i'tibâr kartı numarası",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Fâsit giren: umulan instanceof ${n.expected}, alınan ${a}`;return`Fâsit giren: umulan ${o}, alınan ${a}`}case"invalid_value":if(n.values.length===1)return`Fâsit giren: umulan ${V(n.values[0])}`;return`Fâsit tercih: mûteberler ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`;return`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Fâsit metin: "${o.prefix}" ile başlamalı.`;if(o.format==="ends_with")return`Fâsit metin: "${o.suffix}" ile bitmeli.`;if(o.format==="includes")return`Fâsit metin: "${o.includes}" ihtivâ etmeli.`;if(o.format==="regex")return`Fâsit metin: ${o.pattern} nakşına uymalı.`;return`Fâsit ${r[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var XW=I(()=>{se()});function cT(){return{localeError:_Ce()}}var _Ce=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"},map:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}let r={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 پته",mac:"د MAC پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",credit_card:"د کریډیټ کارت شمیره",currency_code:"د اسعارو کوډ",iban:"IBAN",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${a} ترلاسه شو`;return`ناسم ورودي: باید ${o} وای, مګر ${a} ترلاسه شو`}case"invalid_value":if(n.values.length===1)return`ناسم ورودي: باید ${V(n.values[0])} وای`;return`ناسم انتخاب: باید یو له ${j(n.values,"|")} څخه وای`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} ولري`;return`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ناسم متن: باید د "${o.prefix}" سره پیل شي`;if(o.format==="ends_with")return`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`;if(o.format==="includes")return`ناسم متن: باید "${o.includes}" ولري`;if(o.format==="regex")return`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`;return`${r[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${j(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};var QW=I(()=>{se()});function lT(){return{localeError:ECe()}}var ECe=()=>{let 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ć"},map:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}let r={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",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":if(n.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${V(n.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${s.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${s.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`;if(o.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`;if(o.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`;if(o.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`;return`Nieprawidłow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var eH=I(()=>{se()});function uT(){return{localeError:RCe()}}var RCe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(s){return e[s]??null}let r={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"o intervalo de endereços IPv4",cidrv6:"o intervalo de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",currency_code:"o código de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"número",articles:i.masculine},int:{name:"número inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"número bigint",articles:i.masculine},symbol:{name:"símbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor não opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"função",articles:i.feminine}};function o(s,a){let c=n[s]??{name:`valor "${s}"`,articles:i.masculine};return`${c.articles[a]} ${c.name}`}return(s)=>{switch(s.code){case"invalid_type":{let a=o(s.expected,"indefinite"),c=W(s.input),l=o(c,"indefinite");return`Entrada inválida: esperava ${a}, recebeu ${l}`}case"invalid_value":if(s.values.length===1)return`Entrada inválida: esperava ${V(s.values[0])}`;return`Opção inválida: esperava uma das seguintes opções: ${j(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=t(s.origin);if(c)return`Demasiado grande: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.maximum.toString()} ${c.unit??"elementos"}`;return`Demasiado grande: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=t(s.origin);if(c)return`Demasiado pequeno: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.minimum.toString()} ${c.unit??"elementos"}`;return`Demasiado pequeno: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.minimum.toString()}`}case"invalid_format":{let a=s;if(a.format==="starts_with")return`Texto inválido: deve começar por "${a.prefix}"`;if(a.format==="ends_with")return`Texto inválido: deve terminar em "${a.suffix}"`;if(a.format==="includes")return`Texto inválido: deve incluir "${a.includes}"`;if(a.format==="regex")return`Texto inválido: deve corresponder ao padrão ${a.pattern}`;return`Formato d${r[a.format]??s.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${s.divisor}`;case"unrecognized_keys":{let a=s.keys.length>1?"s":"";return`Chave${a} inválida${a}: ${j(s.keys,", ")}`}case"invalid_key":return`Entrada inválida n${o(s.origin,"definite")}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Valor de discriminação inválido. Esperava ${s.options.map((c)=>`'${c}'`).join(" | ")}`;return"Entrada inválida";case"invalid_element":return`Entrada inválida n${o(s.origin,"definite")}`;default:return"Entrada inválida"}}};var tH=I(()=>{se()});function pT(){return{localeError:ICe()}}var ICe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(s){return e[s]??null}let r={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"a faixa de endereços IPv4",cidrv6:"a faixa de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",currency_code:"o código de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"número",articles:i.masculine},int:{name:"número inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"número bigint",articles:i.masculine},symbol:{name:"símbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor não opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"função",articles:i.feminine}};function o(s,a){let c=n[s]??{name:`valor "${s}"`,articles:i.masculine};return`${c.articles[a]} ${c.name}`}return(s)=>{switch(s.code){case"invalid_type":{let a=o(s.expected,"indefinite"),c=W(s.input),l=o(c,"indefinite");return`Entrada inválida: esperava ${a}, recebeu ${l}`}case"invalid_value":if(s.values.length===1)return`Entrada inválida: esperava ${V(s.values[0])}`;return`Opção inválida: esperava uma das seguintes opções: ${j(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=t(s.origin);if(c)return`Grande demais: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.maximum.toString()} ${c.unit??"elementos"}`;return`Grande demais: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=t(s.origin);if(c)return`Pequeno demais: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.minimum.toString()} ${c.unit??"elementos"}`;return`Pequeno demais: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.minimum.toString()}`}case"invalid_format":{let a=s;if(a.format==="starts_with")return`Texto inválido: deve começar com "${a.prefix}"`;if(a.format==="ends_with")return`Texto inválido: deve terminar com "${a.suffix}"`;if(a.format==="includes")return`Texto inválido: deve incluir "${a.includes}"`;if(a.format==="regex")return`Texto inválido: deve corresponder ao padrão ${a.pattern}`;return`Formato d${r[a.format]??s.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${s.divisor}`;case"unrecognized_keys":{let a=s.keys.length>1?"s":"";return`Chave${a} inválida${a}: ${j(s.keys,", ")}`}case"invalid_key":return`Entrada inválida n${o(s.origin,"definite")}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Valor de discriminação inválido. Esperava ${s.options.map((c)=>`'${c}'`).join(" | ")}`;return"Entrada inválida";case"invalid_element":return`Entrada inválida n${o(s.origin,"definite")}`;default:return"Entrada inválida"}}};var rH=I(()=>{se()});function dT(){return{localeError:ACe()}}var ACe=()=>{let 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(n){return e[n]??null}let r={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",credit_card:"număr de card de credit",currency_code:"cod valutar",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Intrare invalidă: așteptat ${o}, primit ${a}`}case"invalid_value":if(n.values.length===1)return`Intrare invalidă: așteptat ${V(n.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Prea mare: așteptat ca ${n.origin??"valoarea"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemente"}`;return`Prea mare: așteptat ca ${n.origin??"valoarea"} să fie ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Prea mic: așteptat ca ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Prea mic: așteptat ca ${n.origin} să fie ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${o.prefix}"`;if(o.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${o.suffix}"`;if(o.format==="includes")return`Șir invalid: trebuie să includă "${o.includes}"`;if(o.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${o.pattern}`;return`Format invalid: ${r[o.format]??n.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${j(n.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${n.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${n.origin}`;default:return"Intrare invalidă"}}};var nH=I(()=>{se()});function iH(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;if(s>=11&&s<=19)return i;if(o===1)return t;if(o>=2&&o<=4)return r;return i}function fT(){return{localeError:OCe()}}var OCe=()=>{let 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:"иметь"},map:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}let r={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 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",credit_card:"номер кредитной карты",currency_code:"код валюты",iban:"IBAN",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${a}`;return`Неверный ввод: ожидалось ${o}, получено ${a}`}case"invalid_value":if(n.values.length===1)return`Неверный ввод: ожидалось ${V(n.values[0])}`;return`Неверный вариант: ожидалось одно из ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=iH(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=iH(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неверная строка: должна начинаться с "${o.prefix}"`;if(o.format==="ends_with")return`Неверная строка: должна заканчиваться на "${o.suffix}"`;if(o.format==="includes")return`Неверная строка: должна содержать "${o.includes}"`;if(o.format==="regex")return`Неверная строка: должна соответствовать шаблону ${o.pattern}`;return`Неверный ${r[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};var oH=I(()=>{se()});function mT(){return{localeError:DCe()}}var DCe=()=>{let e={string:{unit:"znakov",verb:"mať"},file:{unit:"bajtov",verb:"mať"},array:{unit:"prvkov",verb:"mať"},set:{unit:"prvkov",verb:"mať"},map:{unit:"položiek",verb:"mať"}};function t(n){return e[n]??null}let r={regex:"regulárny 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:"dátum a čas vo formáte ISO",date:"dátum vo formáte ISO",time:"čas vo formáte ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"reťazec zakódovaný vo formáte base64",base64url:"reťazec zakódovaný vo formáte base64url",json_string:"reťazec vo formáte JSON",e164:"číslo E.164",credit_card:"číslo kreditnej karty",currency_code:"kód meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"reťazec",function:"funkcia",array:"pole"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neplatný vstup: očakávané instanceof ${n.expected}, obdržané ${a}`;return`Neplatný vstup: očakávané ${o}, obdržané ${a}`}case"invalid_value":if(n.values.length===1)return`Neplatný vstup: očakávané ${V(n.values[0])}`;return`Neplatný vstup: očakávaná jedna z hodnôt ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Hodnota je príliš veľká: ${n.origin??"hodnota"} musí mať ${o}${n.maximum.toString()} ${s.unit??"prvkov"}`;return`Hodnota je príliš veľká: ${n.origin??"hodnota"} musí byť ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Hodnota je príliš malá: ${n.origin??"hodnota"} musí mať ${o}${n.minimum.toString()} ${s.unit??"prvkov"}`;return`Hodnota je príliš malá: ${n.origin??"hodnota"} musí byť ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neplatný reťazec: musí začínať na "${o.prefix}"`;if(o.format==="ends_with")return`Neplatný reťazec: musí končiť na "${o.suffix}"`;if(o.format==="includes")return`Neplatný reťazec: musí obsahovať "${o.includes}"`;if(o.format==="regex")return`Neplatný reťazec: musí zodpovedať vzoru ${o.pattern}`;return`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí byť násobkom ${n.divisor}`;case"unrecognized_keys":return`Neznáme klúče: ${j(n.keys,", ")}`;case"invalid_key":return`Neplatný klúč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};var sH=I(()=>{se()});function gT(){return{localeError:TCe()}}var TCe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",credit_card:"številka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${a}`;return`Neveljaven vnos: pričakovano ${o}, prejeto ${a}`}case"invalid_value":if(n.values.length===1)return`Neveljaven vnos: pričakovano ${V(n.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`;return`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neveljaven niz: mora se začeti z "${o.prefix}"`;if(o.format==="ends_with")return`Neveljaven niz: mora se končati z "${o.suffix}"`;if(o.format==="includes")return`Neveljaven niz: mora vsebovati "${o.includes}"`;if(o.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`;return`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};var aH=I(()=>{se()});function hT(){return{localeError:NCe()}}var NCe=()=>{let 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"},map:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}let r={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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${a}`;return`Ogiltig inmatning: förväntat ${o}, fick ${a}`}case"invalid_value":if(n.values.length===1)return`Ogiltig inmatning: förväntat ${V(n.values[0])}`;return`Ogiltigt val: förväntade en av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`;return`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ogiltig sträng: måste börja med "${o.prefix}"`;if(o.format==="ends_with")return`Ogiltig sträng: måste sluta med "${o.suffix}"`;if(o.format==="includes")return`Ogiltig sträng: måste innehålla "${o.includes}"`;if(o.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`;return`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};var cH=I(()=>{se()});function yT(){return{localeError:MCe()}}var MCe=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},map:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}let r={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 முகவரி",mac:"MAC முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",credit_card:"கடன் அட்டை எண்",currency_code:"நாணயக் குறியீடு",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${a}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${a}`}case"invalid_value":if(n.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${V(n.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${j(n.values,"|")} இல் ஒன்று`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`;if(o.format==="ends_with")return`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`;if(o.format==="includes")return`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`;if(o.format==="regex")return`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${r[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var lH=I(()=>{se()});function vT(){return{localeError:jCe()}}var jCe=()=>{let e={string:{unit:"аломат",verb:"дошта бошад"},file:{unit:"байт",verb:"дошта бошад"},array:{unit:"унсур",verb:"дошта бошад"},set:{unit:"унсур",verb:"дошта бошад"},map:{unit:"сабт",verb:"дошта бошад"}};function t(n){return e[n]??null}let r={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",mac:"суроғаи MAC",cidrv4:"маҳдудаи IPv4",cidrv6:"маҳдудаи IPv6",base64:"сатри дар формати base64",base64url:"сатри дар формати base64url",json_string:"сатри JSON",e164:"рақами E.164",credit_card:"рақами корти кредитӣ",currency_code:"рамзи асъор",iban:"IBAN",jwt:"JWT",template_literal:"вуруд"},i={nan:"NaN",number:"рақам",string:"сатр",array:"массив",object:"объект",date:"сана"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Вуруди нодуруст: ${o} интизор мерафт, ${a} гирифта шуд`}case"invalid_value":if(n.values.length===1)return`Вуруди нодуруст: ${V(n.values[0])} интизор мерафт`;return`Интихоби нодуруст: яке аз ${j(n.values,"|")} интизор мерафт`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Хеле калон: ${n.origin??"қимат"} бояд ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`Хеле калон: ${n.origin??"қимат"} бояд ${o}${n.maximum.toString()} бошад`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Хеле хурд: ${n.origin} бояд ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Хеле хурд: ${n.origin} бояд ${o}${n.minimum.toString()} бошад`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Сатри нодуруст: бояд бо "${o.prefix}" оғоз шавад`;if(o.format==="ends_with")return`Сатри нодуруст: бояд бо "${o.suffix}" анҷом ёбад`;if(o.format==="includes")return`Сатри нодуруст: бояд "${o.includes}"-ро дар бар гирад`;if(o.format==="regex")return`Сатри нодуруст: бояд ба намунаи ${o.pattern} мувофиқат кунад`;return`${r[o.format]??n.format}-и нодуруст`}case"not_multiple_of":return`Рақами нодуруст: бояд ба ${n.divisor} бе бақия тақсим шавад`;case"unrecognized_keys":return`Калид${n.keys.length>1?"ҳои":"и"} номаълум: ${j(n.keys,", ")}`;case"invalid_key":return`Калиди нодуруст дар ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Қимати нодурусти дискриминатор: ${n.options.map((s)=>`'${s}'`).join(" | ")} интизор мерафт`;return"Вуруди нодуруст";case"invalid_element":return`Қимати нодуруст дар ${n.origin}`;default:return"Вуруди нодуруст"}}};var uH=I(()=>{se()});function wT(){return{localeError:FCe()}}var FCe=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"},map:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}let r={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",mac:"ที่อยู่ MAC",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",credit_card:"หมายเลขบัตรเครดิต",currency_code:"รหัสสกุลเงิน",iban:"IBAN",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${a}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${a}`}case"invalid_value":if(n.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${V(n.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(n.origin);if(s)return`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${s.unit??"รายการ"}`;return`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"อย่างน้อย":"มากกว่า",s=t(n.origin);if(s)return`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${s.unit}`;return`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`;if(o.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`;if(o.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`;if(o.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`;return`รูปแบบไม่ถูกต้อง: ${r[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${j(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var pH=I(()=>{se()});function bT(){return{localeError:zCe()}}var zCe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"baýt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}let r={regex:"giriş",email:"e-poçta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen şifrlenen setir",base64url:"base64url bilen şifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartynyň nomeri",currency_code:"walýuta kody",iban:"IBAN",jwt:"JWT",template_literal:"şablon"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Nädogry baha: garaşylan ${o} ýerine ${a} alyndy`}case"invalid_value":if(n.values.length===1)return`Nädogry baha: ${V(n.values[0])} bolmaly`;return`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Has uly: garaşylýan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${s.unit??"element"}`;return`Has uly: garaşylýan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Has kiçi: garaşylýan ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`;return`Has kiçi: garaşylýan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nädogry setir: "${o.prefix}" bilen başlamaly`;if(o.format==="ends_with")return`Nädogry setir: "${o.suffix}" bilen gutarmaly`;if(o.format==="includes")return`Nädogry setir: "${o.includes}" saklamaly`;if(o.format==="regex")return`Nädogry setir: ${o.pattern} nusga laýyk bolmaly`;return`Nädogry ${r[o.format]??n.format}`}case"not_multiple_of":return`Nädogry san: ${n.divisor} bilen galyndysyz bölünmeli`;case"unrecognized_keys":return`Tanalmaýan açar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde nädogry açar`;case"invalid_union":return"Nädogry baha";case"invalid_element":return`${n.origin} içinde nädogry baha`;default:return"Nädogry baha"}}};var dH=I(()=>{se()});function kT(){return{localeError:UCe()}}var UCe=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"},map:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC 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ı",credit_card:"kredi kartı numarası",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${a}`;return`Geçersiz değer: beklenen ${o}, alınan ${a}`}case"invalid_value":if(n.values.length===1)return`Geçersiz değer: beklenen ${V(n.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()} ${s.unit??"öğe"}`;return`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Geçersiz metin: "${o.prefix}" ile başlamalı`;if(o.format==="ends_with")return`Geçersiz metin: "${o.suffix}" ile bitmeli`;if(o.format==="includes")return`Geçersiz metin: "${o.includes}" içermeli`;if(o.format==="regex")return`Geçersiz metin: ${o.pattern} desenine uymalı`;return`Geçersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var fH=I(()=>{se()});function lh(){return{localeError:LCe()}}var LCe=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"},map:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}let r={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",mac:"адреса MAC",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",credit_card:"номер кредитної картки",currency_code:"код валюти",iban:"IBAN",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${a}`;return`Неправильні вхідні дані: очікується ${o}, отримано ${a}`}case"invalid_value":if(n.values.length===1)return`Неправильні вхідні дані: очікується ${V(n.values[0])}`;return`Неправильна опція: очікується одне з ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"елементів"}`;return`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Занадто мале: очікується, що ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неправильний рядок: повинен починатися з "${o.prefix}"`;if(o.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`;if(o.format==="includes")return`Неправильний рядок: повинен містити "${o.includes}"`;if(o.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`;return`Неправильний ${r[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};var ST=I(()=>{se()});function $T(){return lh()}var mH=I(()=>{ST()});function xT(){return{localeError:BCe()}}var BCe=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"},map:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}let r={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 ایڈریس",mac:"ایم اے سی ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",credit_card:"کریڈٹ کارڈ نمبر",currency_code:"کرنسی کوڈ",iban:"IBAN",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${a} موصول ہوا`;return`غلط ان پٹ: ${o} متوقع تھا، ${a} موصول ہوا`}case"invalid_value":if(n.values.length===1)return`غلط ان پٹ: ${V(n.values[0])} متوقع تھا`;return`غلط آپشن: ${j(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`;if(o.format==="ends_with")return`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`;if(o.format==="includes")return`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`;if(o.format==="regex")return`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`;return`غلط ${r[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${j(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var gH=I(()=>{se()});function PT(){return{localeError:qCe()}}var qCe=()=>{let 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(n){return e[n]??null}let r={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",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`;return`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":if(n.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${V(n.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`;if(o.format==="ends_with")return`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`;if(o.format==="includes")return`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`;if(o.format==="regex")return`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};var hH=I(()=>{se()});function CT(){return{localeError:VCe()}}var VCe=()=>{let 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ó"},map:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}let r={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",mac:"địa chỉ MAC",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",credit_card:"số thẻ tín dụng",currency_code:"mã tiền tệ",iban:"IBAN",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${a}`;return`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${a}`}case"invalid_value":if(n.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${V(n.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"phần tử"}`;return`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`;if(o.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`;if(o.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`;if(o.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`;return`${r[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${j(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};var yH=I(()=>{se()});function _T(){return{localeError:WCe()}}var WCe=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"},map:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}let r={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地址",mac:"MAC地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",credit_card:"信用卡号",currency_code:"货币代码",iban:"IBAN",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`无效输入:期望 instanceof ${n.expected},实际接收 ${a}`;return`无效输入:期望 ${o},实际接收 ${a}`}case"invalid_value":if(n.values.length===1)return`无效输入:期望 ${V(n.values[0])}`;return`无效选项:期望以下之一 ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${s.unit??"个元素"}`;return`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`无效字符串:必须以 "${o.prefix}" 开头`;if(o.format==="ends_with")return`无效字符串:必须以 "${o.suffix}" 结尾`;if(o.format==="includes")return`无效字符串:必须包含 "${o.includes}"`;if(o.format==="regex")return`无效字符串:必须满足正则表达式 ${o.pattern}`;return`无效${r[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};var vH=I(()=>{se()});function ET(){return{localeError:HCe()}}var HCe=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"},map:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}let r={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 位址",mac:"MAC 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",credit_card:"信用卡號",currency_code:"貨幣代碼",iban:"IBAN",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${a}`;return`無效的輸入值:預期為 ${o},但收到 ${a}`}case"invalid_value":if(n.values.length===1)return`無效的輸入值:預期為 ${V(n.values[0])}`;return`無效的選項:預期為以下其中之一 ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${s.unit??"個元素"}`;return`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${s.unit}`;return`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`無效的字串:必須以 "${o.prefix}" 開頭`;if(o.format==="ends_with")return`無效的字串:必須以 "${o.suffix}" 結尾`;if(o.format==="includes")return`無效的字串:必須包含 "${o.includes}"`;if(o.format==="regex")return`無效的字串:必須符合格式 ${o.pattern}`;return`無效的 ${r[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${j(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};var wH=I(()=>{se()});function RT(){return{localeError:GCe()}}var GCe=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"},map:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}let r={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",mac:"àdírẹ́sì MAC",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",credit_card:"nọmba kaadi gbese",currency_code:"koodu owó",iban:"IBAN",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${a}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${a}`}case"invalid_value":if(n.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${V(n.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`;return`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`;if(o.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`;if(o.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`;if(o.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`;return`Aṣìṣe: ${r[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${j(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};var bH=I(()=>{se()});var dd={};vn(dd,{ar:()=>kD,az:()=>SD,be:()=>$D,bg:()=>xD,bn:()=>PD,ca:()=>CD,ckb:()=>_D,cs:()=>ED,da:()=>RD,de:()=>ID,el:()=>AD,en:()=>sh,eo:()=>DD,es:()=>TD,fa:()=>ND,fi:()=>MD,fr:()=>jD,frCA:()=>FD,gu:()=>zD,he:()=>UD,hi:()=>LD,hr:()=>BD,hu:()=>qD,hy:()=>VD,id:()=>WD,is:()=>HD,it:()=>GD,ja:()=>ZD,ka:()=>KD,kh:()=>YD,km:()=>ah,kn:()=>XD,ko:()=>QD,lt:()=>eT,mk:()=>tT,ms:()=>rT,ne:()=>nT,nl:()=>iT,nn:()=>oT,no:()=>sT,ota:()=>aT,pl:()=>lT,ps:()=>cT,pt:()=>uT,ptBR:()=>pT,ro:()=>dT,ru:()=>fT,sk:()=>mT,sl:()=>gT,sv:()=>hT,ta:()=>yT,tg:()=>vT,th:()=>wT,tk:()=>bT,tr:()=>kT,ua:()=>$T,uk:()=>lh,ur:()=>xT,uz:()=>PT,vi:()=>CT,yo:()=>RT,zhCN:()=>_T,zhTW:()=>ET});var Ak=I(()=>{pW();dW();mW();gW();hW();yW();vW();wW();bW();kW();SW();OD();$W();xW();PW();CW();_W();EW();RW();IW();AW();OW();DW();NW();MW();jW();FW();zW();UW();LW();JD();BW();qW();WW();HW();GW();ZW();KW();JW();YW();XW();QW();eH();tH();rH();nH();oH();sH();aH();cH();lH();uH();pH();dH();fH();mH();ST();gH();hH();yH();vH();wH();bH()});class OT{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r==="object"&&"id"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...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 Ok(){return new OT}var kH,IT,AT,ln;var uh=I(()=>{IT=Symbol("ZodOutput"),AT=Symbol("ZodInput");(kH=globalThis).__zod_globalRegistry??(kH.__zod_globalRegistry=Ok());ln=globalThis.__zod_globalRegistry});function KCe(e,t){try{return Tk(e,{assertOnly:!0})}catch{return t}}function MT(e,t){try{let r=Tk(e),i=Dk(e,r);return i._zod.bag.validator=KCe(e,r),i}catch(r){if(t?.strict)throw r;return e}}function Dk(e,t){if(Rk(e))throw new rt("a schema whose subtree contains a reference cycle");let r=$t(e),i=e._zod.run,n=i.__originalRun??i,o=(s,a)=>{if(a?.async||a?.direction==="backward"||a?.skipChecks||a?.[SH])return n(s,a);if(a&&Ik(a,s.value))return n(s,a);let c=t(s.value);if(c!==Un)return s.value=c,s;if(a)a[SH]=!0;return n(s,a)};if(o.__originalRun=n,r._zod.bag.fallbackRun=n,r._zod.bag.validator=t,r._zod.run=o,!i.__originalRun)JCe(r,e,t);return r}function JCe(e,t,r){let i=e,n=t;if(typeof n.safeParse==="function"){let o=n.safeParse;i.safeParse=(s,a)=>{let c=r(s);if(c!==Un)return{success:!0,data:c};return o(s,a)}}if(typeof n.parse==="function"){let o=n.parse;i.parse=(s,a)=>{let c=r(s);if(c!==Un)return c;return o(s,a)}}}function Tk(e,t){let r=!0;try{r=Rk(e)}catch{}if(r)throw new rt("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},n=new ad(["input"]),o=er(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);let s=["INVALID",...i.constants.keys()],a=[Un,...i.constants.values()],c=n.content.join(`
291
+ `)}return h.write("payload.value = newResult;"),h.write("return payload;"),h.compile()},s,a=jl,c=!Yr.jitless,u=c&&FI.value,p=t.catchall,d;e._zod.parse=(f,m)=>{d??(d=i.value);let g=f.value;if(!a(g))return f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f;if(c&&u&&m?.async===!1&&m.jitless!==!0){if(!s)s=o(t.shape);if(f=s(f,m),!p)return f;return iW([],g,f,m,d,e,m?.abortEarly===!0)}return r(f,m)}});eh=M("$ZodUnion",(e,t)=>{Ue.init(e,t),Ze(e,"optin",(i)=>i.def.options.some((n)=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some((n)=>n._zod.optin!==void 0)?"optional":void 0),Ze(e,"optout",(i)=>i.def.options.some((n)=>n._zod.optout==="optional")?"optional":void 0),Ze(e,"values",(i)=>{if(i.def.options.every((n)=>n._zod.values))return new Set(i.def.options.flatMap((n)=>Array.from(n._zod.values)));return}),Ze(e,"pattern",(i)=>{if(i.def.options.every((n)=>n._zod.pattern)){let n=i.def.options.map((o)=>o._zod.pattern);return new RegExp(`^(${n.map((o)=>ia(o.source)).join("|")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,s=[];for(let a of t.options){let c=a._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!o)return LV(s,i,e,n);return Promise.all(s).then((a)=>LV(a,i,e,n))}});HO=M("$ZodXor",(e,t)=>{eh.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,s=[];for(let a of t.options){let c=a._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)s.push(c),o=!0;else s.push(c)}if(!o)return BV(s,i,e,n);return Promise.all(s).then((a)=>BV(a,i,e,n))}});ZO=M("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,eh.init(e,t);let r=e._zod.parse;Ze(e,"propValues",(n)=>{let o={},s=0;for(let a of n.def.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw Error(`Invalid discriminated union option at index "${n.def.options.indexOf(a)}"`);if(c[n.def.discriminator]?.has(void 0))s++;for(let[l,u]of Object.entries(c)){if(!Object.prototype.hasOwnProperty.call(o,l))cn(o,l,new Set);for(let p of u)o[l].add(p)}}if(!n.def.unionFallback&&s>1)o[n.def.discriminator]?.delete(void 0);return o}),t.options.forEach((n,o)=>{let s=Xp(n._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw Error(`Invalid discriminated union option at index "${o}"`)});let i=Yp(()=>sW(t));e._zod.parse=(n,o)=>{let s=n.value;if(!jl(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=s?.[t.discriminator],c=i.value.get(a);if(c&&(a!==void 0||o.direction!=="backward"))return c._zod.run(n,o);if(t.unionFallback||o.direction==="backward")return r(n,o);return n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter((l)=>i.value.get(l)!==null),input:s,path:[t.discriminator],inst:e}),n}}),KO=M("$ZodIntersection",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);if(o instanceof Promise||s instanceof Promise)return Promise.all([o,s]).then(([c,l])=>qV(r,c,l));return qV(r,o,s)}});$k=M("$ZodTuple",(e,t)=>{Ue.init(e,t);let r=t.items,i=Yr.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];let a=[],c=VV(r,"optin"),l=VV(r,"optout");if(!t.rest){if(s.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),n;if(s.length>r.length)n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:s,inst:e,origin:"array"})}let u=Array(r.length),p=t.rest?o?.abortEarly:void 0,d=!1;for(let f=0;f<r.length;f++){let m=r[f]._zod.run({value:s[f],issues:[]},o);if(m instanceof Promise)a.push(m.then((g)=>{u[f]=g}));else if(u[f]=m,p&&!d&&m.issues.length)d=zn(m)}if(t.rest&&!d){let f=r.length-1,m=s.slice(r.length),g=n.issues.length;for(let h of m){if(p&&n.issues.length!==g){if(zn(n,g))break;g=n.issues.length}f++;let y=t.rest._zod.run({value:h,issues:[]},o);if(y instanceof Promise)a.push(y.then((v)=>WV(v,n,f)));else WV(y,n,f)}}if(a.length)return Promise.all(a).then(()=>HV(u,n,r,s,l));return HV(u,n,r,s,l)}});JO=M("$ZodRecord",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!eo(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let s=[],a=t.keyType._zod.values;if(a&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};let c=new Set;for(let u of a)if(typeof u==="string"||typeof u==="number"||typeof u==="symbol"){if(c.add(typeof u==="number"?u.toString():u),u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(p.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map((m)=>si(m,n,fr())),input:u,path:[u],inst:e});continue}let d=p.value;if(d==="__proto__")continue;let f=t.valueType._zod.run({value:o[u],issues:[]},n);if(f instanceof Promise)s.push(f.then((m)=>{if(m.issues.length)i.issues.push(...oi(u,m.issues));i.value[d]=m.value}));else{if(f.issues.length)i.issues.push(...oi(u,f.issues));i.value[d]=f.value}}let l;for(let u in o)if(!c.has(u))if(t.mode==="loose"){if(u==="__proto__")continue;i.value[u]=o[u]}else l=l??[],l.push(u);if(l&&l.length>0)i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(let l of Reflect.ownKeys(o)){if(l==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(o,l))continue;let u=t.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof l==="string"&&ns.test(l)&&u.issues.length){let m=t.keyType._zod.run({value:Number(l),issues:[]},n);if(m instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(m.issues.length===0)u=m}if(u.issues.length){if(t.mode==="loose")i.value[l]=o[l];else if(a)c=c??[],c.push(l);else i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((m)=>si(m,n,fr())),input:l,path:[l],inst:e});continue}let d=u.value;if(d==="__proto__")continue;let f=t.valueType._zod.run({value:o[l],issues:[]},n);if(f instanceof Promise)s.push(f.then((m)=>{if(m.issues.length)i.issues.push(...oi(l,m.issues));i.value[d]=m.value}));else{if(f.issues.length)i.issues.push(...oi(l,f.issues));i.value[d]=f.value}}if(c&&c.length>0)i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}if(s.length)return Promise.all(s).then(()=>i);return i}}),YO=M("$ZodMap",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let s=[];i.value=r?r.alloc(e,i,new Map,n):new Map;let a=n?.abortEarly,c=i.issues.length;for(let[l,u]of o){if(a&&i.issues.length!==c){if(zn(i,c))break;c=i.issues.length}let p=t.keyType._zod.run({value:l,issues:[]},n),d=t.valueType._zod.run({value:u,issues:[]},n);if(p instanceof Promise||d instanceof Promise)s.push(Promise.all([p,d]).then(([f,m])=>{GV(f,m,i,l,o,e,n)}));else GV(p,d,i,l,o,e,n)}if(s.length)return Promise.all(s).then(()=>i);return i}});XO=M("$ZodSet",(e,t)=>{Ue.init(e,t);let r=Yr.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let s=[];i.value=r?r.alloc(e,i,new Set,n):new Set;let a=n?.abortEarly,c=i.issues.length;for(let l of o){if(a&&i.issues.length!==c){if(zn(i,c))break;c=i.issues.length}let u=t.valueType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)s.push(u.then((p)=>ZV(p,i)));else ZV(u,i)}if(s.length)return Promise.all(s).then(()=>i);return i}});QO=M("$ZodEnum",(e,t)=>{Ue.init(e,t);let r=Kp(t.entries),i=new Set(r);e._zod.values=i,Ze(e,"pattern",(n)=>{let o=Kp(n.def.entries).filter((s)=>Dg.has(typeof s));return new RegExp(o.length?`^(${o.map((s)=>to(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let s=n.value;if(i.has(s))return n;return n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),eD=M("$ZodLiteral",(e,t)=>{Ue.init(e,t);let r=new Set(t.values);e._zod.values=r,Ze(e,"pattern",(i)=>{let n=i.def.values;return new RegExp(n.length?`^(${n.map((o)=>typeof o==="string"?to(o):o?to(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,n)=>{let o=i.value;if(r.has(o))return i;return i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),tD=M("$ZodFile",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(n instanceof File)return r;return r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),rD=M("$ZodTransform",(e,t)=>{Ue.init(e,t),e._zod.optin="optional",Yr.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r));if(n instanceof Promise)throw new _i;return r.value=n,r}});xk=M("$ZodOptional",(e,t)=>{Ue.init(e,t),Ze(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Ze(e,"values",(r)=>{let i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),Ze(e,"pattern",(r)=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ia(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},i);if(n instanceof Promise)return n.then((o)=>KV(r,o));return KV(r,n)}return t.innerType._zod.run(r,i)}}),nD=M("$ZodExactOptional",(e,t)=>{xk.init(e,t),Ze(e,"values",(r)=>r.def.innerType._zod.values),Ze(e,"pattern",(r)=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),iD=M("$ZodNullable",(e,t)=>{Ue.init(e,t),Ze(e,"optin",(r)=>r.def.innerType._zod.optin),Ze(e,"optout",(r)=>r.def.innerType._zod.optout),Ze(e,"pattern",(r)=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${ia(i.source)}|null)$`):void 0}),Ze(e,"values",(r)=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>{if(r.value===null)return r;return t.innerType._zod.run(r,i)}}),oD=M("$ZodDefault",(e,t)=>{Ue.init(e,t),e._zod.optin="defaulted",Ze(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>JV(o,t));return JV(n,t)}});sD=M("$ZodPrefault",(e,t)=>{Ue.init(e,t),e._zod.optin="defaulted",Ze(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,i)}}),aD=M("$ZodNonOptional",(e,t)=>{Ue.init(e,t),Ze(e,"values",(r)=>{let i=r.def.innerType._zod.values;return i?new Set([...i].filter((n)=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>YV(o,e));return YV(n,e)}});cD=M("$ZodSuccess",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl("ZodSuccess");let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>(r.value=o.issues.length===0,r));return r.value=n.issues.length===0,r}});lD=M("$ZodCatch",(e,t)=>{Ue.init(e,t),Ze(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ze(e,"optout",(r)=>r.def.innerType._zod.optout),Ze(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run({value:r.value,issues:[]},i);if(n instanceof Promise)return n.then((o)=>XV(r,o,t,i));return XV(r,n,t,i)}}),uD=M("$ZodNaN",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>{if(typeof r.value!=="number"||!Number.isNaN(r.value))return r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r;return r}}),Pk=M("$ZodPipe",(e,t)=>{Ue.init(e,t),Ze(e,"values",(r)=>r.def.in._zod.values),Ze(e,"optin",(r)=>r.def.in._zod.optin),Ze(e,"optout",(r)=>r.def.out._zod.optout),Ze(e,"propValues",(r)=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ak(s,t.in,i));return ak(o,t.in,i)}let n=t.in._zod.run(r,i);if(n instanceof Promise)return n.then((o)=>ak(o,t.out,i));return ak(n,t.out,i)}});th=M("$ZodCodec",(e,t)=>{Ue.init(e,t),Ze(e,"values",(r)=>r.def.in._zod.values),Ze(e,"optin",(r)=>r.def.in._zod.optin),Ze(e,"optout",(r)=>r.def.out._zod.optout),Ze(e,"propValues",(r)=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ck(s,t,i));return ck(o,t,i)}else{let o=t.out._zod.run(r,i);if(o instanceof Promise)return o.then((s)=>ck(s,t,i));return ck(o,t,i)}}});pD=M("$ZodPreprocess",(e,t)=>{Pk.init(e,t)}),dD=M("$ZodReadonly",(e,t)=>{Ue.init(e,t),Ze(e,"propValues",(r)=>r.def.innerType._zod.propValues),Ze(e,"values",(r)=>r.def.innerType._zod.values),Ze(e,"optin",(r)=>r.def.innerType?._zod?.optin),Ze(e,"optout",(r)=>r.def.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);if(n instanceof Promise)return n.then(QV);return QV(n)}});fD=M("$ZodTemplateLiteral",(e,t)=>{Ue.init(e,t);let r=[];for(let i of t.parts)if(typeof i==="object"&&i!==null){let n=iO(i);if(!n)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);r.push(ia(n))}else if(i===null||zI.has(typeof i))r.push(to(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>{if(typeof i.value!=="string")return i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(i.value))return i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i;return i}}),mD=M("$ZodFunction",(e,t)=>(Ue.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=(r)=>{if(typeof r!=="function")throw Error("implement() must be called with a function");return Object.defineProperty(function(...i){let n=e._def.input?Bg(e._def.input,i):i,o=Reflect.apply(r,this,n);if(e._def.output)return Bg(e._def.output,o);return o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=(r)=>{if(typeof r!=="function")throw Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let n=e._def.input?await qg(e._def.input,i):i,o=await Reflect.apply(r,this,n);if(e._def.output)return await qg(e._def.output,o);return o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,i)=>{if(typeof r.value!=="function")return r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r;if(e._def.output&&e._def.output._zod.def.type==="promise")r.value=e.implementAsync(r.value);else r.value=e.implement(r.value);return r},e.input=(...r)=>{let i=e.constructor;if(Array.isArray(r[0]))return new i({type:"function",input:new $k({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output});return new i({type:"function",input:r[0],output:e._def.output})},e.output=(r)=>new e.constructor({type:"function",input:e._def.input,output:r}),e)),gD=M("$ZodPromise",(e,t)=>{Ue.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then((n)=>t.innerType._zod.run({value:n,issues:[]},i))}),rh=M("$ZodLazy",(e,t)=>{Ue.init(e,t),MI(e._zod,"innerType",()=>{let r=t;if(!r._cachedInner)r._cachedInner=t.getter();return r._cachedInner}),Ze(e,"pattern",(r)=>r.innerType?._zod?.pattern),Ze(e,"propValues",(r)=>r.innerType?._zod?.propValues),Ze(e,"optin",(r)=>r.innerType?._zod?.optin??void 0),Ze(e,"optout",(r)=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),hD=M("$ZodCustom",(e,t)=>{jt.init(e,t),Ue.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=(r)=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then((o)=>eW(o,r,i,e));eW(n,r,i,e);return}})});function lW(e){return e!==null&&typeof e==="object"}function yD(e){return e.map((t)=>t.path?{...t,path:t.path.slice()}:{...t})}function ih(e,t,r){let i=uW.get(e);if(i!==void 0)return i?nh:ud;if(t.has(e))return nh;t.add(e);let n=ud,o=(u)=>{if(n!==nh&&u?._zod){let p=ih(u,t,r);if(p>n)n=p}},s=(u,p)=>{let d=ud;for(let f of Reflect.ownKeys(u)){let m=Object.getOwnPropertyDescriptor(u,f);if(p&&!m.enumerable)continue;let g=m.get?Ek:m.value?._zod?ih(m.value,t,r):ud;if(g>d)d=g}return d},a=(u)=>{if(u>n)n=u},c=e._zod.def,l=c.type;switch(l){case"object":{let u=Xp(c);a(u?s(u,!0):Ek),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let u of c.items)o(u);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let u of c.options)o(u);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let u=c._cachedInner??(r?e._zod.innerType:void 0);a(u?ih(u,t,!1):Ek);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in c){let p=Object.getOwnPropertyDescriptor(c,u);if(!p||p.get)continue;let d=p.value;if(!d||typeof d!=="object")continue;if(d._zod)o(d);else if(Array.isArray(d))for(let f of d)o(f)}}return t.delete(e),FPe(e,n)}function FPe(e,t){if(t!==Ek)uW.set(e,t===nh);return t}function Rk(e){return ih(e,new Set,!0)!==ud}function zPe(e,t){let r=e.buckets.get(t);if(!r)r=new WeakMap,e.buckets.set(t,r);return r}function oh(){return UPe}function Ik(e,t){let r=e[vD]?.backEdges;return r!==void 0&&lW(t)&&r.has(t)}var wD,vD="~memo",cW,uW,ud=0,Ek=1,nh=2,Ck,_k,UPe;var bD=I(()=>{se();wD=class wD extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}};cW=[];uW=new WeakMap;_k=[],UPe={alloc(e,t,r){let i=Ck;if(!i)return r;Ck=void 0;let n={value:r,issues:null};return i.set(t.value,n),_k.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&Ik(o,n.value))throw new wD;return r(n,o)};if(e._zod.parse=i,e._zod.run===r)e._zod.run=i})},attach(e){var t;let r,i=!1,n,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,a=(c,l)=>{if(r===void 0){let y=ih(e,new Set,!1);if(y===ud){if(e._zod.parse=s,e._zod.run===a)e._zod.run=s;return s(c,l)}if(y===nh||i)r=!0;else i=!0}let u=c.value;if(!lW(u))return s(c,l);let p=l[vD];if(!p)p={buckets:new WeakMap,backEdges:void 0},l[vD]=p;let d;if(n===l)d=o;else d=zPe(p,e),n=l,o=d;let f=d.get(u);if(f){if(c.value=f.value,f.issues){if(f.issues.length)c.issues.push(...yD(f.issues))}else c.memo=!0,p.backEdges??(p.backEdges=new WeakSet),p.backEdges.add(f.value);return c}Ck=d;let m=_k.length,g=s(c,l);Ck=void 0;let h=_k.length>m?_k.pop():void 0;if(g instanceof Promise)return g.then((y)=>{if(h)h.issues=y.issues.length?yD(y.issues):cW;return y});if(h)h.issues=g.issues.length?yD(g.issues):cW;return g};if(e._zod.parse=a,e._zod.run===s)e._zod.run=a})}}});function kD(){return{localeError:LPe()}}var LPe=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"},map:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}let r={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",mac:"عنوان MAC",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",credit_card:"رقم بطاقة الائتمان",currency_code:"رمز العملة",iban:"IBAN",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${a}`;return`مدخلات غير مقبولة: يفترض إدخال ${o}، ولكن تم إدخال ${a}`}case"invalid_value":if(n.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${V(n.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${s.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${s.unit}`;return`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`;if(o.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`;if(o.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`;if(o.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`;return`${r[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${j(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};var pW=I(()=>{se()});function SD(){return{localeError:BPe()}}var BPe=()=>{let 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"},map:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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",credit_card:"kredit kartı nömrəsi",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${a}`;return`Yanlış dəyər: gözlənilən ${o}, daxil olan ${a}`}case"invalid_value":if(n.values.length===1)return`Yanlış dəyər: gözlənilən ${V(n.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`;if(o.format==="ends_with")return`Yanlış mətn: "${o.suffix}" ilə bitməlidir`;if(o.format==="includes")return`Yanlış mətn: "${o.includes}" daxil olmalıdır`;if(o.format==="regex")return`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var dW=I(()=>{se()});function fW(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;if(s>=11&&s<=19)return i;if(o===1)return t;if(o>=2&&o<=4)return r;return i}function $D(){return{localeError:qPe()}}var qPe=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},map:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}let r={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 адрас",mac:"MAC адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",credit_card:"нумар крэдытнай карты",currency_code:"код валюты",iban:"IBAN",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${a}`;return`Няправільны ўвод: чакаўся ${o}, атрымана ${a}`}case"invalid_value":if(n.values.length===1)return`Няправільны ўвод: чакалася ${V(n.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=fW(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${o}${n.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=fW(a,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${o}${n.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${o.prefix}"`;if(o.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${o.suffix}"`;if(o.format==="includes")return`Няправільны радок: павінен змяшчаць "${o.includes}"`;if(o.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`;return`Няправільны ${r[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};var mW=I(()=>{se()});function xD(){return{localeError:VPe()}}var VPe=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"},map:{unit:"елемента",verb:"да съдържа"}};function t(n){return e[n]??null}let r={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 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",credit_card:"номер на кредитна карта",currency_code:"код на валута",iban:"IBAN",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Невалиден вход: очакван instanceof ${n.expected}, получен ${a}`;return`Невалиден вход: очакван ${o}, получен ${a}`}case"invalid_value":if(n.values.length===1)return`Невалиден вход: очакван ${V(n.values[0])}`;return`Невалидна опция: очаквано едно от ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${o}${n.maximum.toString()} ${s.unit??"елемента"}`;return`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Твърде малко: очаква се ${n.origin} да съдържа ${o}${n.minimum.toString()} ${s.unit}`;return`Твърде малко: очаква се ${n.origin} да бъде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Невалиден низ: трябва да започва с "${o.prefix}"`;if(o.format==="ends_with")return`Невалиден низ: трябва да завършва с "${o.suffix}"`;if(o.format==="includes")return`Невалиден низ: трябва да включва "${o.includes}"`;if(o.format==="regex")return`Невалиден низ: трябва да съвпада с ${o.pattern}`;let s="Невалиден";if(o.format==="emoji")s="Невалидно";if(o.format==="datetime")s="Невалидно";if(o.format==="date")s="Невалидна";if(o.format==="time")s="Невалидно";if(o.format==="duration")s="Невалидна";return`${s} ${r[o.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};var gW=I(()=>{se()});function PD(){return{localeError:WPe()}}var WPe=()=>{let e={string:{unit:"অক্ষর",verb:"থাকতে হবে"},file:{unit:"বাইট",verb:"থাকতে হবে"},array:{unit:"আইটেম",verb:"থাকতে হবে"},set:{unit:"আইটেম",verb:"থাকতে হবে"},map:{unit:"এন্ট্রি",verb:"থাকতে হবে"}};function t(n){return e[n]??null}let r={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 ঠিকানা",mac:"MAC ঠিকানা",cidrv4:"IPv4 রেঞ্জ",cidrv6:"IPv6 রেঞ্জ",base64:"base64-এনকোডেড স্ট্রিং",base64url:"base64url-এনকোডেড স্ট্রিং",json_string:"JSON স্ট্রিং",e164:"E.164 নম্বর",credit_card:"ক্রেডিট কার্ড নম্বর",currency_code:"মুদ্রা কোড",iban:"IBAN",jwt:"JWT",template_literal:"ইনপুট"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`অবৈধ ইনপুট: প্রত্যাশিত ${o}, প্রাপ্ত ${a}`}case"invalid_value":if(n.values.length===1)return`অবৈধ ইনপুট: প্রত্যাশিত ${V(n.values[0])}`;return`অবৈধ অপশন: ${j(n.values," | ")} এর মধ্যে একটি প্রত্যাশিত`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`অনেক বড়: ${n.origin??"মান"} ${o}${n.maximum.toString()} ${s.unit??"এলিমেন্ট"} হতে হবে`;return`অনেক বড়: ${n.origin??"মান"} ${o}${n.maximum.toString()} হতে হবে`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`অনেক ছোট: ${n.origin} ${o}${n.minimum.toString()} ${s.unit} হতে হবে`;return`অনেক ছোট: ${n.origin} ${o}${n.minimum.toString()} হতে হবে`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`অবৈধ স্ট্রিং: "${o.prefix}" দিয়ে শুরু হতে হবে`;if(o.format==="ends_with")return`অবৈধ স্ট্রিং: "${o.suffix}" দিয়ে শেষ হতে হবে`;if(o.format==="includes")return`অবৈধ স্ট্রিং: "${o.includes}" অন্তর্ভুক্ত থাকতে হবে`;if(o.format==="regex")return`অবৈধ স্ট্রিং: ${o.pattern} প্যাটার্ন মিলতে হবে`;return`অবৈধ ${r[o.format]??n.format}`}case"not_multiple_of":return`অবৈধ নম্বর: ${n.divisor} এর গুণিতক হতে হবে`;case"unrecognized_keys":return`অচেনা কী${n.keys.length>1?"গুলো":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} এ অবৈধ কী`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"অবৈধ ইনপুট";case"invalid_element":return`${n.origin} এ অবৈধ মান`;default:return"অবৈধ ইনপুট"}}};var hW=I(()=>{se()});function CD(){return{localeError:HPe()}}var HPe=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={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",mac:"adreça MAC",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",credit_card:"número de targeta de crèdit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`;return`Tipus invàlid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":if(n.values.length===1)return`Valor invàlid: s'esperava ${V(n.values[0])}`;return`Opció invàlida: s'esperava una de ${j(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a màxim":"menys de",s=t(n.origin);if(s)return`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${s.unit??"elements"}`;return`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a mínim":"més de",s=t(n.origin);if(s)return`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${s.unit}`;return`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Format invàlid: ha de començar amb "${o.prefix}"`;if(o.format==="ends_with")return`Format invàlid: ha d'acabar amb "${o.suffix}"`;if(o.format==="includes")return`Format invàlid: ha d'incloure "${o.includes}"`;if(o.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${o.pattern}`;return`Format invàlid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};var yW=I(()=>{se()});function _D(){return{localeError:GPe()}}var GPe=()=>{let e={string:{unit:"پیت",verb:"بێت"},file:{unit:"بایت",verb:"بێت"},array:{unit:"دانە",verb:"بێت"},set:{unit:"دانە",verb:"بێت"},map:{unit:"دانە",verb:"بێت"}};function t(n){return e[n]??null}let r={regex:"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",mac:"ناونیشانی MAC",cidrv4:"مەودای IPv4",cidrv6:"مەودای IPv6",base64:"دەقی base64",base64url:"دەقی base64url",json_string:"دەقی JSON",e164:"ژمارەی E.164",credit_card:"ژمارەی کارتی کرێدیت",currency_code:"کۆدی دراو",iban:"IBAN",jwt:"JWT",template_literal:"تێکردە"},i={nan:"NaN",string:"نووسین",number:"ژمارە",boolean:"boolean",array:"array",object:"object",date:"ڕێکەوت",integer:"ژمارە",float:"ژمارە",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s,c=["ا","و","ۆ","وو","ە","ی","ێ"].some((u)=>a.endsWith(u))?"یە":"ە",l=/^[a-zA-Z]+$/.test(a);if(s==="null"||s==="undefined")return"داواکراوە";return`چاوەڕوانکراوە ${o} بێت، بەڵام ${a}${l?"":c}`}case"invalid_value":if(n.values.length===1)return`بەهاکە نادرووستە: چاوەڕوانکراوە ${V(n.values[0])} بێت`;return`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${j(n.values,"|")}`;case"too_big":{let o=t(n.origin);if(o)return`پێویستە بە لایەنی زۆرەوە ${n.maximum.toString()} ${o.unit} ${o.verb}`;return`پێویستە بە لایەنی زۆرەوە ${n.maximum.toString()} بێت`}case"too_small":{let o=t(n.origin);if(o)return`پێویستە بە لایەنی کەمەوە ${n.minimum.toString()} ${o.unit} ${o.verb}`;return`پێویستە بە لایەنی کەمەوە ${n.minimum.toString()} بێت`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`دەقی نادروست: پێویستە دەستپێبکات بە "${o.prefix}"`;if(o.format==="ends_with")return`دەقی نادروست: پێویستە کۆتاییبێت بە "${o.suffix}"`;if(o.format==="includes")return`دەقی نادروست: پێویستە "${o.includes}" لەخۆبگرێت`;if(o.format==="regex")return`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${o.pattern} بگونجێت`;return`بەهای ${r[o.format]??n.format} نادروستە`}case"not_multiple_of":return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${n.divisor}`;case"unrecognized_keys":return`کلیلی نەناسراو: ${j(n.keys,", ")}`;case"invalid_key":return`کلیلی نادروست لە ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"یەکگرتنی نادروست";case"invalid_element":return`${n.origin} بەهاکە نادروستە`;default:return"تێکردەی نادروست"}}};var vW=I(()=>{se()});function ED(){return{localeError:ZPe()}}var ZPe=()=>{let 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"},map:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"číslo kreditní karty",currency_code:"kód měny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${a}`;return`Neplatný vstup: očekáváno ${o}, obdrženo ${a}`}case"invalid_value":if(n.values.length===1)return`Neplatný vstup: očekáváno ${V(n.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neplatný řetězec: musí začínat na "${o.prefix}"`;if(o.format==="ends_with")return`Neplatný řetězec: musí končit na "${o.suffix}"`;if(o.format==="includes")return`Neplatný řetězec: musí obsahovat "${o.includes}"`;if(o.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`;return`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${j(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};var wW=I(()=>{se()});function RD(){return{localeError:KPe()}}var KPe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let 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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`;return`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig værdi: forventede ${V(n.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`;return`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`;return`For lille: forventede ${a} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: skal starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: skal ende med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: skal indeholde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: skal matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};var bW=I(()=>{se()});function ID(){return{localeError:JPe()}}var JPe=()=>{let 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"},map:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={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",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"Währungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`;return`Ungültige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":if(n.values.length===1)return`Ungültige Eingabe: erwartet ${V(n.values[0])}`;return`Ungültige Option: erwartet eine von ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`;return`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ungültiger String: muss mit "${o.prefix}" beginnen`;if(o.format==="ends_with")return`Ungültiger String: muss mit "${o.suffix}" enden`;if(o.format==="includes")return`Ungültiger String: muss "${o.includes}" enthalten`;if(o.format==="regex")return`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`;return`Ungültig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};var kW=I(()=>{se()});function AD(){return{localeError:YPe()}}var YPe=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function t(n){return e[n]??null}let r={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",credit_card:"αριθμός πιστωτικής κάρτας",currency_code:"κωδικός νομίσματος",iban:"IBAN",jwt:"JWT",template_literal:"είσοδος"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(typeof n.expected==="string"&&/^[A-Z]/.test(n.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${n.expected}, λήφθηκε ${a}`;return`Μη έγκυρη είσοδος: αναμενόταν ${o}, λήφθηκε ${a}`}case"invalid_value":if(n.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${V(n.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Πολύ μεγάλο: αναμενόταν ${n.origin??"τιμή"} να έχει ${o}${n.maximum.toString()} ${s.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${n.origin??"τιμή"} να είναι ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Πολύ μικρό: αναμενόταν ${n.origin} να έχει ${o}${n.minimum.toString()} ${s.unit}`;return`Πολύ μικρό: αναμενόταν ${n.origin} να είναι ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${o.prefix}"`;if(o.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${o.suffix}"`;if(o.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${o.includes}"`;if(o.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${o.pattern}`;return`Μη έγκυρο: ${r[o.format]??n.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${n.divisor}`;case"unrecognized_keys":return`Άγνωστ${n.keys.length>1?"α":"ο"} κλειδ${n.keys.length>1?"ιά":"ί"}: ${j(n.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${n.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${n.origin}`;default:return"Μη έγκυρη είσοδος"}}};var SW=I(()=>{se()});function sh(){return{localeError:XPe()}}var XPe=()=>{let 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(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,s){if(o==="number"&&typeof s==="number"&&!Number.isFinite(s))return String(s);return i[o]??o}return(o)=>{switch(o.code){case"invalid_type":{let s=n(o.expected),a=W(o.input),c=n(a,o.input);return`Invalid input: expected ${s}, received ${c}`}case"invalid_value":if(o.values.length===1)return`Invalid input: expected ${V(o.values[0])}`;return`Invalid option: expected one of ${j(o.values,"|")}`;case"too_big":{let s=o.exact?"exactly ":o.inclusive?"<=":"<",a=t(o.origin);if(a)return`Too big: expected ${o.origin??"value"} to have ${s}${o.maximum.toString()} ${a.unit??"elements"}`;return`Too big: expected ${o.origin??"value"} to be ${s}${o.maximum.toString()}`}case"too_small":{let s=o.exact?"exactly ":o.inclusive?">=":">",a=t(o.origin);if(a)return`Too small: expected ${o.origin} to have ${s}${o.minimum.toString()} ${a.unit}`;return`Too small: expected ${o.origin} to be ${s}${o.minimum.toString()}`}case"invalid_format":{let s=o;if(s.format==="starts_with")return`Invalid string: must start with "${s.prefix}"`;if(s.format==="ends_with")return`Invalid string: must end with "${s.suffix}"`;if(s.format==="includes")return`Invalid string: must include "${s.includes}"`;if(s.format==="regex")return`Invalid string: must match pattern ${s.pattern}`;return`Invalid ${r[s.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":if(o.options&&Array.isArray(o.options)&&o.options.length>0)return`Invalid discriminator value. Expected ${o.options.map((a)=>`'${a}'`).join(" | ")}`;if(o.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};var OD=I(()=>{se()});function DD(){return{localeError:QPe()}}var QPe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${a}`;return`Nevalida enigo: atendiĝis ${o}, riceviĝis ${a}`}case"invalid_value":if(n.values.length===1)return`Nevalida enigo: atendiĝis ${V(n.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Tro malgranda: atendiĝis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`;return`Tro malgranda: atendiĝis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${o.prefix}"`;if(o.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${o.suffix}"`;if(o.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${o.includes}"`;if(o.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`;return`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};var $W=I(()=>{se()});function TD(){return{localeError:eCe()}}var eCe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let 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",mac:"dirección MAC",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",credit_card:"número de tarjeta de crédito",currency_code:"código de moneda",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${a}`;return`Entrada inválida: se esperaba ${o}, recibido ${a}`}case"invalid_value":if(n.values.length===1)return`Entrada inválida: se esperaba ${V(n.values[0])}`;return`Opción inválida: se esperaba una de ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Demasiado pequeño: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`;return`Demasiado pequeño: se esperaba que ${a} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Cadena inválida: debe comenzar con "${o.prefix}"`;if(o.format==="ends_with")return`Cadena inválida: debe terminar en "${o.suffix}"`;if(o.format==="includes")return`Cadena inválida: debe incluir "${o.includes}"`;if(o.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${o.pattern}`;return`Inválido ${r[o.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};var xW=I(()=>{se()});function ND(){return{localeError:tCe()}}var tCe=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"},map:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}let r={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 آدرس",mac:"MAC آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",credit_card:"شماره کارت اعتباری",currency_code:"کد ارز",iban:"IBAN",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ورودی نامعتبر: می‌بایست instanceof ${n.expected} می‌بود، ${a} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${o} می‌بود، ${a} دریافت شد`}case"invalid_value":if(n.values.length===1)return`ورودی نامعتبر: می‌بایست ${V(n.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${j(n.values,"|")} می‌بود`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} باشد`;return`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`رشته نامعتبر: باید با "${o.prefix}" شروع شود`;if(o.format==="ends_with")return`رشته نامعتبر: باید با "${o.suffix}" تمام شود`;if(o.format==="includes")return`رشته نامعتبر: باید شامل "${o.includes}" باشد`;if(o.format==="regex")return`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`;return`${r[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${j(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};var PW=I(()=>{se()});function MD(){return{localeError:rCe()}}var rCe=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}let r={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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`;return`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":if(n.values.length===1)return`Virheellinen syöte: täytyy olla ${V(n.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Liian suuri: ${s.subject} täytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim();return`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Liian pieni: ${s.subject} täytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim();return`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${o.prefix}"`;if(o.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${o.suffix}"`;if(o.format==="includes")return`Virheellinen syöte: täytyy sisältää "${o.includes}"`;if(o.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`;return`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var CW=I(()=>{se()});function jD(){return{localeError:nCe()}}var nCe=()=>{let 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(n){return e[n]??null}let r={regex:"expression régulière",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne de caractères encodée en base64",base64url:"chaîne de caractères encodée en base64url",json_string:"chaîne de caractères JSON",e164:"numéro au format E.164",credit_card:"numéro de carte de crédit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},i={string:"chaîne de caractères",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:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrée invalide : instance de ${n.expected} attendu, ${a} reçu`;return`Entrée invalide : ${o} attendu, ${a} reçu`}case"invalid_value":if(n.values.length===1)return`Entrée invalide : ${V(n.values[0])} attendu`;return`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Trop grand : ${i[n.origin]??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"élément(s)"}`;return`Trop grand : ${i[n.origin]??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Trop petit : ${i[n.origin]??"valeur"} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Trop petit : ${i[n.origin]??"valeur"} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chaîne de caractères invalide : doit commencer par "${o.prefix}"`;if(o.format==="ends_with")return`Chaîne de caractères invalide : doit se terminer par "${o.suffix}"`;if(o.format==="includes")return`Chaîne de caractères invalide : doit inclure "${o.includes}"`;if(o.format==="regex")return`Chaîne de caractères invalide : doit correspondre au motif ${o.pattern}`;return`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};var _W=I(()=>{se()});function FD(){return{localeError:iCe()}}var iCe=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"},map:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}let r={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",mac:"adresse MAC",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",credit_card:"numéro de carte de crédit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Entrée invalide : attendu instanceof ${n.expected}, reçu ${a}`;return`Entrée invalide : attendu ${o}, reçu ${a}`}case"invalid_value":if(n.values.length===1)return`Entrée invalide : attendu ${V(n.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"≤":"<",s=t(n.origin);if(s)return`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`;return`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"≥":">",s=t(n.origin);if(s)return`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`;return`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chaîne invalide : doit commencer par "${o.prefix}"`;if(o.format==="ends_with")return`Chaîne invalide : doit se terminer par "${o.suffix}"`;if(o.format==="includes")return`Chaîne invalide : doit inclure "${o.includes}"`;if(o.format==="regex")return`Chaîne invalide : doit correspondre au motif ${o.pattern}`;return`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};var EW=I(()=>{se()});function zD(){return{localeError:oCe()}}var oCe=()=>{let e={string:{unit:"અક્ષર",verb:"હોવા જોઈએ"},file:{unit:"બાયટ",verb:"હોવા જોઈએ"},array:{unit:"આઇટમ",verb:"હોવા જોઈએ"},set:{unit:"આઇટમ",verb:"હોવા જોઈએ"},map:{unit:"એન્ટ્રી",verb:"હોવા જોઈએ"}};function t(n){return e[n]??null}let r={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 એડ્રેસ",mac:"MAC એડ્રેસ",cidrv4:"IPv4 શ્રેણી",cidrv6:"IPv6 શ્રેણી",base64:"base64-એન્કોડેડ સ્ટ્રિંગ",base64url:"base64url-એન્કોડેડ સ્ટ્રિંગ",json_string:"JSON સ્ટ્રિંગ",e164:"E.164 નંબર",credit_card:"ક્રેડિટ કાર્ડ નંબર",currency_code:"ચલણ કોડ",iban:"IBAN",jwt:"JWT",template_literal:"ઇનપુટ"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`અમાન્ય ઇનપુટ: અપેક્ષિત ${o}, પ્રાપ્ત ${a}`}case"invalid_value":if(n.values.length===1)return`અમાન્ય ઇનપુટ: અપેક્ષિત ${V(n.values[0])}`;return`અમાન્ય વિકલ્પ: ${j(n.values," | ")} માધ્યમથી એક અપેક્ષિત`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ખૂબ મોટું: ${n.origin??"મૂલ્ય"} ${o}${n.maximum.toString()} ${s.unit??"એલિમેન્ટ"} હોવા જોઈએ`;return`ખૂબ મોટું: ${n.origin??"મૂલ્ય"} ${o}${n.maximum.toString()} હોવું જોઈએ`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ખૂબ નાનું: ${n.origin} ${o}${n.minimum.toString()} ${s.unit} હોવા જોઈએ`;return`ખૂબ નાનું: ${n.origin} ${o}${n.minimum.toString()} હોવું જોઈએ`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`અમાન્ય સ્ટ્રિંગ: "${o.prefix}" થી શરૂ થવું જોઈએ`;if(o.format==="ends_with")return`અમાન્ય સ્ટ્રિંગ: "${o.suffix}" પર સમાપ્ત થવું જોઈએ`;if(o.format==="includes")return`અમાન્ય સ્ટ્રિંગ: "${o.includes}" શામેલ હોવું જોઈએ`;if(o.format==="regex")return`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${o.pattern} સાથે મેળ ખાવું જોઈએ`;return`અમાન્ય ${r[o.format]??n.format}`}case"not_multiple_of":return`અમાન્ય નંબર: ${n.divisor} નો ગુણાંક હોવો જોઈએ`;case"unrecognized_keys":return`ઓળખી શકાતા નહીં તે કી${n.keys.length>1?"ઓ":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} માં અમાન્ય કી`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"અમાન્ય ઇનપુટ";case"invalid_element":return`${n.origin} માં અમાન્ય મૂલ્ય`;default:return"અમાન્ય ઇનપુટ"}}};var RW=I(()=>{se()});function UD(){return{localeError:sCe()}}var sCe=()=>{let 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:"גדול"}},r=(l)=>l?e[l]:void 0,i=(l)=>{let u=r(l);if(u)return u.label;return l??e.unknown.label},n=(l)=>`ה${i(l)}`,o=(l)=>(r(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",s=(l)=>{if(!l)return null;return t[l]??null},a={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",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"},mac:{label:"כתובת MAC",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"},credit_card:{label:"מספר כרטיס אשראי",gender:"m"},currency_code:{label:"קוד מטבע",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"קלט",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return(l)=>{switch(l.code){case"invalid_type":{let u=l.expected,p=c[u??""]??i(u),d=W(l.input),f=c[d]??e[d]?.label??d;if(/^[A-Z]/.test(l.expected))return`קלט לא תקין: צריך להיות instanceof ${l.expected}, התקבל ${f}`;return`קלט לא תקין: צריך להיות ${p}, התקבל ${f}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${V(l.values[0])}`;let u=l.values.map((f)=>V(f));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${u[0]} או ${u[1]}`;let p=u[u.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${u.slice(0,-1).join(", ")} או ${p}`}case"too_big":{let u=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"ארוך"} מדי: ${p} צריכה להכיל ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){let m=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${p} צריך להיות ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"צריכה":"צריך",g=l.inclusive?`${l.maximum} ${u?.unit??""} או פחות`:`פחות מ-${l.maximum} ${u?.unit??""}`;return`גדול מדי: ${p} ${m} להכיל ${g}`.trim()}let d=l.inclusive?"<=":"<",f=o(l.origin??"value");if(u?.unit)return`${u.longLabel} מדי: ${p} ${f} ${d}${l.maximum.toString()} ${u.unit}`;return`${u?.longLabel??"גדול"} מדי: ${p} ${f} ${d}${l.maximum.toString()}`}case"too_small":{let u=s(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"קצר"} מדי: ${p} צריכה להכיל ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){let m=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${p} צריך להיות ${m}`}if(l.origin==="array"||l.origin==="set"){let m=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){let h=l.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${p} ${m} להכיל ${h}`}let g=l.inclusive?`${l.minimum} ${u?.unit??""} או יותר`:`יותר מ-${l.minimum} ${u?.unit??""}`;return`קטן מדי: ${p} ${m} להכיל ${g}`.trim()}let d=l.inclusive?">=":">",f=o(l.origin??"value");if(u?.unit)return`${u.shortLabel} מדי: ${p} ${f} ${d}${l.minimum.toString()} ${u.unit}`;return`${u?.shortLabel??"קטן"} מדי: ${p} ${f} ${d}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${u.prefix}"`;if(u.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${u.suffix}"`;if(u.format==="includes")return`המחרוזת חייבת לכלול "${u.includes}"`;if(u.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${u.pattern}`;let p=a[u.format],d=p?.label??u.format,m=(p?.gender??"m")==="f"?"תקינה":"תקין";return`${d} לא ${m}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${j(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(l.origin??"array")}`;default:return"קלט לא תקין"}}};var IW=I(()=>{se()});function LD(){return{localeError:aCe()}}var aCe=()=>{let e={string:{unit:"अक्षर",verb:"रखने के लिए"},file:{unit:"बाइट्स",verb:"रखने के लिए"},array:{unit:"तत्व",verb:"रखने के लिए"},set:{unit:"तत्व",verb:"रखने के लिए"},map:{unit:"प्रविष्टियाँ",verb:"रखने के लिए"}};function t(n){return e[n]??null}let r={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 पता",mac:"MAC पता",cidrv4:"IPv4 श्रेणी",cidrv6:"IPv6 श्रेणी",base64:"Base64-एन्कोडेड स्ट्रिंग",base64url:"Base64URL-एन्कोडेड स्ट्रिंग",json_string:"JSON स्ट्रिंग",e164:"E.164 संख्या",credit_card:"क्रेडिट कार्ड संख्या",currency_code:"मुद्रा कोड",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`अमान्य इनपुट: अपेक्षित ${o}, प्राप्त ${a}`}case"invalid_value":if(n.values.length===1)return`अमान्य इनपुट: अपेक्षित ${V(n.values[0])}`;return`अमान्य विकल्प: अपेक्षित मानों में से एक ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`बहुत बड़ा: अपेक्षित था कि ${n.origin??"मान"} में ${o}${n.maximum} ${s.unit} हों`;return`बहुत बड़ा: अपेक्षित था कि ${n.origin??"मान"} ${o}${n.maximum} हो`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`बहुत छोटा: अपेक्षित था कि ${n.origin} में ${o}${n.minimum} ${s.unit} हों`;return`बहुत छोटा: अपेक्षित था कि ${n.origin} ${o}${n.minimum} हो`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`अमान्य स्ट्रिंग: "${o.prefix}" से शुरू होना चाहिए`;if(o.format==="ends_with")return`अमान्य स्ट्रिंग: "${o.suffix}" पर समाप्त होना चाहिए`;if(o.format==="includes")return`अमान्य स्ट्रिंग: इसमें "${o.includes}" शामिल होना चाहिए`;if(o.format==="regex")return`अमान्य स्ट्रिंग: पैटर्न ${o.pattern} से मेल खाना चाहिए`;return`अमान्य ${r[o.format]??n.format}`}case"not_multiple_of":return`अमान्य संख्या: यह ${n.divisor} का गुणज होना चाहिए`;case"unrecognized_keys":return`अपरिचित कुंजी${n.keys.length>1?"याँ":""}: ${j(n.keys,", ")}`;case"invalid_key":return`अमान्य कुंजी: ${n.origin} में`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${n.origin} में`;default:return"अमान्य इनपुट"}}};var AW=I(()=>{se()});function BD(){return{localeError:cCe()}}var cCe=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={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",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neispravan unos: očekuje se instanceof ${n.expected}, a primljeno je ${a}`;return`Neispravan unos: očekuje se ${o}, a primljeno je ${a}`}case"invalid_value":if(n.values.length===1)return`Neispravna vrijednost: očekivano ${V(n.values[0])}`;return`Neispravna opcija: očekivano jedno od ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Preveliko: očekivano da ${a??"vrijednost"} ima ${o}${n.maximum.toString()} ${s.unit??"elemenata"}`;return`Preveliko: očekivano da ${a??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;if(s)return`Premalo: očekivano da ${a} ima ${o}${n.minimum.toString()} ${s.unit}`;return`Premalo: očekivano da ${a} bude ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neispravan tekst: mora započinjati s "${o.prefix}"`;if(o.format==="ends_with")return`Neispravan tekst: mora završavati s "${o.suffix}"`;if(o.format==="includes")return`Neispravan tekst: mora sadržavati "${o.includes}"`;if(o.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`;return`Neispravna ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i ključevi":" ključ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};var OW=I(()=>{se()});function qD(){return{localeError:lCe()}}var lCe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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",credit_card:"hitelkártyaszám",currency_code:"pénznemkód",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${a}`;return`Érvénytelen bemenet: a várt érték ${o}, a kapott érték ${a}`}case"invalid_value":if(n.values.length===1)return`Érvénytelen bemenet: a várt érték ${V(n.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${s.unit}`;return`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`;if(o.format==="ends_with")return`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`;if(o.format==="includes")return`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`;if(o.format==="regex")return`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`;return`Érvénytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};var DW=I(()=>{se()});function TW(e,t,r){return Math.abs(e)===1?t:r}function pd(e){if(!e)return"";let t=["ա","ե","ը","ի","ո","ու","օ"],r=e[e.length-1];return e+(t.includes(r)?"ն":"ը")}function VD(){return{localeError:uCe()}}var uCe=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},map:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(n){return e[n]??null}let r={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 հասցե",mac:"MAC հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",credit_card:"կրեդիտ քարտի համար",currency_code:"արժույթի կոդ",iban:"IBAN",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${a}`;return`Սխալ մուտքագրում․ սպասվում էր ${o}, ստացվել է ${a}`}case"invalid_value":if(n.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${V(n.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=TW(a,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pd(n.origin??"արժեք")} կունենա ${o}${n.maximum.toString()} ${c}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${pd(n.origin??"արժեք")} լինի ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=TW(a,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pd(n.origin)} կունենա ${o}${n.minimum.toString()} ${c}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${pd(n.origin)} լինի ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${o.prefix}"-ով`;if(o.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${o.suffix}"-ով`;if(o.format==="includes")return`Սխալ տող․ պետք է պարունակի "${o.includes}"`;if(o.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${o.pattern} ձևաչափին`;return`Սխալ ${r[o.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${j(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${pd(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${pd(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};var NW=I(()=>{se()});function WD(){return{localeError:pCe()}}var pCe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`;return`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":if(n.values.length===1)return`Input tidak valid: diharapkan ${V(n.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`;return`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`String tidak valid: harus dimulai dengan "${o.prefix}"`;if(o.format==="ends_with")return`String tidak valid: harus berakhir dengan "${o.suffix}"`;if(o.format==="includes")return`String tidak valid: harus menyertakan "${o.includes}"`;if(o.format==="regex")return`String tidak valid: harus sesuai pola ${o.pattern}`;return`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};var MW=I(()=>{se()});function HD(){return{localeError:dCe()}}var dCe=()=>{let 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"},map:{unit:"hluti",verb:"að hafa"}};function t(n){return e[n]??null}let r={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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",credit_card:"kreditkortanúmer",currency_code:"gjaldmiðilskóði",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera instanceof ${n.expected}`;return`Rangt gildi: Þú slóst inn ${a} þar sem á að vera ${o}`}case"invalid_value":if(n.values.length===1)return`Rangt gildi: gert ráð fyrir ${V(n.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`;return`Of lítið: gert er ráð fyrir að ${n.origin} sé ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ógildur strengur: verður að byrja á "${o.prefix}"`;if(o.format==="ends_with")return`Ógildur strengur: verður að enda á "${o.suffix}"`;if(o.format==="includes")return`Ógildur strengur: verður að innihalda "${o.includes}"`;if(o.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${o.pattern}`;return`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${j(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};var jW=I(()=>{se()});function GD(){return{localeError:fCe()}}var fCe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`;return`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":if(n.values.length===1)return`Input non valido: atteso ${V(n.values[0])}`;return`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`;return`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`;return`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Stringa non valida: deve iniziare con "${o.prefix}"`;if(o.format==="ends_with")return`Stringa non valida: deve terminare con "${o.suffix}"`;if(o.format==="includes")return`Stringa non valida: deve includere "${o.includes}"`;if(o.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${o.pattern}`;return`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};var FW=I(()=>{se()});function ZD(){return{localeError:mCe()}}var mCe=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"},map:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}let r={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アドレス",mac:"MACアドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",credit_card:"クレジットカード番号",currency_code:"通貨コード",iban:"IBAN",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`無効な入力: instanceof ${n.expected}が期待されましたが、${a}が入力されました`;return`無効な入力: ${o}が期待されましたが、${a}が入力されました`}case"invalid_value":if(n.values.length===1)return`無効な入力: ${V(n.values[0])}が期待されました`;return`無効な選択: ${j(n.values,"、")}のいずれかである必要があります`;case"too_big":{let o=n.inclusive?"以下である":"より小さい",s=t(n.origin);if(s)return`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${o}必要があります`;return`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{let o=n.inclusive?"以上である":"より大きい",s=t(n.origin);if(s)return`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${o}必要があります`;return`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`無効な文字列: "${o.prefix}"で始まる必要があります`;if(o.format==="ends_with")return`無効な文字列: "${o.suffix}"で終わる必要があります`;if(o.format==="includes")return`無効な文字列: "${o.includes}"を含む必要があります`;if(o.format==="regex")return`無効な文字列: パターン${o.pattern}に一致する必要があります`;return`無効な${r[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${j(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};var zW=I(()=>{se()});function KD(){return{localeError:gCe()}}var gCe=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},map:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(n){return e[n]??null}let r={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 მისამართი",mac:"MAC მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",credit_card:"საკრედიტო ბარათის ნომერი",currency_code:"ვალუტის კოდი",iban:"IBAN",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${a}`;return`არასწორი შეყვანა: მოსალოდნელი ${o}, მიღებული ${a}`}case"invalid_value":if(n.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${V(n.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${j(n.values,"|")}-დან`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${o.prefix}"-ით`;if(o.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${o.suffix}"-ით`;if(o.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${o.includes}"-ს`;if(o.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${o.pattern}`;return`არასწორი ${r[o.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${j(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};var UW=I(()=>{se()});function ah(){return{localeError:hCe()}}var hCe=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"},map:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}let r={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",mac:"អាសយដ្ឋាន MAC",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",credit_card:"លេខប័ណ្ណឥណទាន",currency_code:"កូដរូបិយប័ណ្ណ",iban:"IBAN",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${a}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${o} ប៉ុន្តែទទួលបាន ${a}`}case"invalid_value":if(n.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${V(n.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`;return`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`;if(o.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`;if(o.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`;if(o.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`;return`មិនត្រឹមត្រូវ៖ ${r[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${j(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var JD=I(()=>{se()});function YD(){return ah()}var LW=I(()=>{JD()});function XD(){return{localeError:yCe()}}var yCe=()=>{let e={string:{unit:"ಅಕ್ಷರಗಳು",verb:"ಹೊಂದಲು"},file:{unit:"ಬೈಟ್‌ಗಳು",verb:"ಹೊಂದಲು"},array:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},set:{unit:"ವಸ್ತುಗಳು",verb:"ಹೊಂದಲು"},map:{unit:"entries",verb:"ಹೊಂದಲು"}};function t(n){return e[n]??null}let r={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-encodedಸ್ಟ್ರಿಂಗ್",base64url:"base64url-encodedಸ್ಟ್ರಿಂಗ್",json_string:"JSONಸ್ಟ್ರಿಂಗ್",e164:"E.164 ಸಂಖ್ಯೆ",credit_card:"ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ",currency_code:"ಕರೆನ್ಸಿ ಕೋಡ್",iban:"IBAN",jwt:"JWT",template_literal:"ಇನ್ಪುಟ್"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${o}, ಸ್ವೀಕರಿಸಿದನು ${a}`}case"invalid_value":if(n.values.length===1)return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${V(n.values[0])}`;return`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin??"value"} ಹೊಂದಲು ${o}${n.maximum.toString()} ${s.unit??"ಅಂಶಗಳು"}`;return`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin??"value"} ಎಂದು ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin} ಹೊಂದಲು ${o}${n.minimum.toString()} ${s.unit}`;return`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.origin} ಎಂದು ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${o.prefix}"`;if(o.format==="ends_with")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${o.suffix}"`;if(o.format==="includes")return`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${o.includes}"`;if(o.format==="regex")return`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${o.pattern}`;return`ಅಮಾನ್ಯ ${r[o.format]??n.format}`}case"not_multiple_of":return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${n.divisor}`;case"unrecognized_keys":return`ಗುರುತಿಸಲಾಗದ ಕೀ ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್";case"invalid_element":return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${n.origin}`;default:return"ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್"}}};var BW=I(()=>{se()});function QD(){return{localeError:vCe()}}var vCe=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"},map:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}let r={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 주소",mac:"MAC 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",credit_card:"신용카드 번호",currency_code:"통화 코드",iban:"IBAN",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${a}입니다`;return`잘못된 입력: 예상 타입은 ${o}, 받은 타입은 ${a}입니다`}case"invalid_value":if(n.values.length===1)return`잘못된 입력: 값은 ${V(n.values[0])} 이어야 합니다`;return`잘못된 옵션: ${j(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let o=n.inclusive?"이하":"미만",s=o==="미만"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";if(a)return`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${s}`;return`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"이상":"초과",s=o==="이상"?"이어야 합니다":"여야 합니다",a=t(n.origin),c=a?.unit??"요소";if(a)return`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${o}${s}`;return`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`;if(o.format==="ends_with")return`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`;if(o.format==="includes")return`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`;if(o.format==="regex")return`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${r[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${j(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};var qW=I(()=>{se()});function VW(e){let t=Math.abs(e),r=t%10,i=t%100;if(i>=11&&i<=19||r===0)return"many";if(r===1)return"one";return"few"}function eT(){return{localeError:wCe()}}var ch=(e)=>e.charAt(0).toUpperCase()+e.slice(1),wCe=()=>{let 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(n,o,s,a){let c=e[n]??null;if(c===null)return c;return{unit:c.unit[o],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let r={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",mac:"MAC 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",credit_card:"kredito kortelės numeris",currency_code:"valiutos kodas",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Gautas tipas ${a}, o tikėtasi - instanceof ${n.expected}`;return`Gautas tipas ${a}, o tikėtasi - ${o}`}case"invalid_value":if(n.values.length===1)return`Privalo būti ${V(n.values[0])}`;return`Privalo būti vienas iš ${j(n.values,"|")} pasirinkimų`;case"too_big":{let o=i[n.origin]??n.origin,s=t(n.origin,VW(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${ch(o??n.origin??"reikšmė")} ${s.verb} ${n.maximum.toString()} ${s.unit??"elementų"}`;let a=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${ch(o??n.origin??"reikšmė")} turi būti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=t(n.origin,VW(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${ch(o??n.origin??"reikšmė")} ${s.verb} ${n.minimum.toString()} ${s.unit??"elementų"}`;let a=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${ch(o??n.origin??"reikšmė")} turi būti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Eilutė privalo prasidėti "${o.prefix}"`;if(o.format==="ends_with")return`Eilutė privalo pasibaigti "${o.suffix}"`;if(o.format==="includes")return`Eilutė privalo įtraukti "${o.includes}"`;if(o.format==="regex")return`Eilutė privalo atitikti ${o.pattern}`;return`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${j(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${ch(o??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};var WW=I(()=>{se()});function tT(){return{localeError:bCe()}}var bCe=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"},map:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}let r={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 адреса",mac:"MAC адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",credit_card:"број на кредитна картичка",currency_code:"код на валута",iban:"IBAN",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Грешен внес: се очекува instanceof ${n.expected}, примено ${a}`;return`Грешен внес: се очекува ${o}, примено ${a}`}case"invalid_value":if(n.values.length===1)return`Invalid input: expected ${V(n.values[0])}`;return`Грешана опција: се очекува една ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${s.unit??"елементи"}`;return`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${s.unit}`;return`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неважечка низа: мора да започнува со "${o.prefix}"`;if(o.format==="ends_with")return`Неважечка низа: мора да завршува со "${o.suffix}"`;if(o.format==="includes")return`Неважечка низа: мора да вклучува "${o.includes}"`;if(o.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${o.pattern}`;return`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${j(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};var HW=I(()=>{se()});function rT(){return{localeError:kCe()}}var kCe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`;return`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":if(n.values.length===1)return`Input tidak sah: dijangka ${V(n.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`String tidak sah: mesti bermula dengan "${o.prefix}"`;if(o.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${o.suffix}"`;if(o.format==="includes")return`String tidak sah: mesti mengandungi "${o.includes}"`;if(o.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${o.pattern}`;return`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${j(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};var GW=I(()=>{se()});function nT(){return{localeError:SCe()}}var SCe=()=>{let e={string:{unit:"अक्षर",verb:"हुनुपर्छ"},file:{unit:"बाइट",verb:"हुनुपर्छ"},array:{unit:"तत्व",verb:"हुनुपर्छ"},set:{unit:"तत्व",verb:"हुनुपर्छ"},map:{unit:"प्रविष्टि",verb:"हुनुपर्छ"}};function t(n){return e[n]??null}let r={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 ठेगाना",mac:"MAC ठेगाना",cidrv4:"IPv4 दायरा",cidrv6:"IPv6 दायरा",base64:"base64-इन्कोड गरिएको स्ट्रिङ",base64url:"base64url-इन्कोड गरिएको स्ट्रिङ",json_string:"JSON स्ट्रिङ",e164:"E.164 नम्बर",credit_card:"क्रेडिट कार्ड नम्बर",currency_code:"मुद्रा कोड",iban:"IBAN",jwt:"JWT",template_literal:"इनपुट"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`अमान्य इनपुट: अपेक्षित ${o}, प्राप्त ${a}`}case"invalid_value":if(n.values.length===1)return`अमान्य इनपुट: अपेक्षित ${V(n.values[0])}`;return`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`धेरै ठूलो: ${n.origin??"मान"} मा ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`धेरै ठूलो: ${n.origin??"मान"} ${o}${n.maximum.toString()} हुनुपर्छ`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`धेरै सानो: ${n.origin} मा ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`धेरै सानो: ${n.origin} ${o}${n.minimum.toString()} हुनुपर्छ`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`अमान्य स्ट्रिङ: "${o.prefix}" बाट सुरु हुनुपर्छ`;if(o.format==="ends_with")return`अमान्य स्ट्रिङ: "${o.suffix}" मा समाप्त हुनुपर्छ`;if(o.format==="includes")return`अमान्य स्ट्रिङ: "${o.includes}" समावेश हुनुपर्छ`;if(o.format==="regex")return`अमान्य स्ट्रिङ: ढाँचा ${o.pattern} सँग मेल खानुपर्छ`;return`अमान्य ${r[o.format]??n.format}`}case"not_multiple_of":return`अमान्य संख्या: ${n.divisor} को गुणज हुनुपर्छ`;case"unrecognized_keys":return`अपरिचित कुञ्जी${n.keys.length>1?"हरू":""}: ${j(n.keys,", ")}`;case"invalid_key":return`अमान्य कुञ्जी: ${n.origin} मा`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${n.options.map((s)=>`'${s}'`).join(" | ")}`;return"अमान्य इनपुट";case"invalid_element":return`अमान्य मान: ${n.origin} मा`;default:return"अमान्य इनपुट"}}};var ZW=I(()=>{se()});function iT(){return{localeError:$Ce()}}var $Ce=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`;return`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":if(n.values.length===1)return`Ongeldige invoer: verwacht ${V(n.values[0])}`;return`Ongeldige optie: verwacht één van ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";if(s)return`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`;return`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";if(s)return`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ongeldige tekst: moet met "${o.prefix}" beginnen`;if(o.format==="ends_with")return`Ongeldige tekst: moet op "${o.suffix}" eindigen`;if(o.format==="includes")return`Ongeldige tekst: moet "${o.includes}" bevatten`;if(o.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`;return`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};var KW=I(()=>{se()});function oT(){return{localeError:xCe()}}var xCe=()=>{let e={string:{unit:"teikn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"element",verb:"å innehalde"},set:{unit:"element",verb:"å innehalde"},map:{unit:"element",verb:"å innehalde"}};function t(n){return e[n]??null}let r={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-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldig input: forventa instanceof ${n.expected}, fekk ${a}`;return`Ugyldig input: forventa ${o}, fekk ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig verdi: forventa ${V(n.values[0])}`;return`Ugyldig val: forventa eitt av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`For stor(t): forventa ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`For stor(t): forventa ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`For lite(n): forventa ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`;return`For lite(n): forventa ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: må starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: må slutte med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: må innehalde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: må matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: må vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende nøklar":"Ukjend nøkkel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};var JW=I(()=>{se()});function sT(){return{localeError:PCe()}}var PCe=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"},map:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}let r={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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`;return`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":if(n.values.length===1)return`Ugyldig verdi: forventet ${V(n.values[0])}`;return`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`;return`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${s.unit}`;return`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ugyldig streng: må starte med "${o.prefix}"`;if(o.format==="ends_with")return`Ugyldig streng: må ende med "${o.suffix}"`;if(o.format==="includes")return`Ugyldig streng: må inneholde "${o.includes}"`;if(o.format==="regex")return`Ugyldig streng: må matche mønsteret ${o.pattern}`;return`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};var YW=I(()=>{se()});function aT(){return{localeError:CCe()}}var CCe=()=>{let 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"},map:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}let r={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ı",mac:"MAC 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ı",credit_card:"i'tibâr kartı numarası",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Fâsit giren: umulan instanceof ${n.expected}, alınan ${a}`;return`Fâsit giren: umulan ${o}, alınan ${a}`}case"invalid_value":if(n.values.length===1)return`Fâsit giren: umulan ${V(n.values[0])}`;return`Fâsit tercih: mûteberler ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`;return`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Fâsit metin: "${o.prefix}" ile başlamalı.`;if(o.format==="ends_with")return`Fâsit metin: "${o.suffix}" ile bitmeli.`;if(o.format==="includes")return`Fâsit metin: "${o.includes}" ihtivâ etmeli.`;if(o.format==="regex")return`Fâsit metin: ${o.pattern} nakşına uymalı.`;return`Fâsit ${r[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var XW=I(()=>{se()});function cT(){return{localeError:_Ce()}}var _Ce=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"},map:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}let r={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 پته",mac:"د MAC پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",credit_card:"د کریډیټ کارت شمیره",currency_code:"د اسعارو کوډ",iban:"IBAN",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${a} ترلاسه شو`;return`ناسم ورودي: باید ${o} وای, مګر ${a} ترلاسه شو`}case"invalid_value":if(n.values.length===1)return`ناسم ورودي: باید ${V(n.values[0])} وای`;return`ناسم انتخاب: باید یو له ${j(n.values,"|")} څخه وای`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${s.unit} ولري`;return`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`ناسم متن: باید د "${o.prefix}" سره پیل شي`;if(o.format==="ends_with")return`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`;if(o.format==="includes")return`ناسم متن: باید "${o.includes}" ولري`;if(o.format==="regex")return`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`;return`${r[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${j(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};var QW=I(()=>{se()});function lT(){return{localeError:ECe()}}var ECe=()=>{let 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ć"},map:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}let r={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",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":if(n.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${V(n.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${s.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${s.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`;if(o.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`;if(o.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`;if(o.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`;return`Nieprawidłow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var eH=I(()=>{se()});function uT(){return{localeError:RCe()}}var RCe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(s){return e[s]??null}let r={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"o intervalo de endereços IPv4",cidrv6:"o intervalo de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",currency_code:"o código de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"número",articles:i.masculine},int:{name:"número inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"número bigint",articles:i.masculine},symbol:{name:"símbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor não opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"função",articles:i.feminine}};function o(s,a){let c=n[s]??{name:`valor "${s}"`,articles:i.masculine};return`${c.articles[a]} ${c.name}`}return(s)=>{switch(s.code){case"invalid_type":{let a=o(s.expected,"indefinite"),c=W(s.input),l=o(c,"indefinite");return`Entrada inválida: esperava ${a}, recebeu ${l}`}case"invalid_value":if(s.values.length===1)return`Entrada inválida: esperava ${V(s.values[0])}`;return`Opção inválida: esperava uma das seguintes opções: ${j(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=t(s.origin);if(c)return`Demasiado grande: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.maximum.toString()} ${c.unit??"elementos"}`;return`Demasiado grande: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=t(s.origin);if(c)return`Demasiado pequeno: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.minimum.toString()} ${c.unit??"elementos"}`;return`Demasiado pequeno: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.minimum.toString()}`}case"invalid_format":{let a=s;if(a.format==="starts_with")return`Texto inválido: deve começar por "${a.prefix}"`;if(a.format==="ends_with")return`Texto inválido: deve terminar em "${a.suffix}"`;if(a.format==="includes")return`Texto inválido: deve incluir "${a.includes}"`;if(a.format==="regex")return`Texto inválido: deve corresponder ao padrão ${a.pattern}`;return`Formato d${r[a.format]??s.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${s.divisor}`;case"unrecognized_keys":{let a=s.keys.length>1?"s":"";return`Chave${a} inválida${a}: ${j(s.keys,", ")}`}case"invalid_key":return`Entrada inválida n${o(s.origin,"definite")}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Valor de discriminação inválido. Esperava ${s.options.map((c)=>`'${c}'`).join(" | ")}`;return"Entrada inválida";case"invalid_element":return`Entrada inválida n${o(s.origin,"definite")}`;default:return"Entrada inválida"}}};var tH=I(()=>{se()});function pT(){return{localeError:ICe()}}var ICe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(s){return e[s]??null}let r={regex:"a entrada",email:"o endereço de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a duração ISO",ipv4:"o endereço IPv4",ipv6:"o endereço IPv6",mac:"o endereço MAC",cidrv4:"a faixa de endereços IPv4",cidrv6:"a faixa de endereços IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o número E.164",credit_card:"o número de cartão de crédito",currency_code:"o código de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"número",articles:i.masculine},int:{name:"número inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"número bigint",articles:i.masculine},symbol:{name:"símbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor não opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"função",articles:i.feminine}};function o(s,a){let c=n[s]??{name:`valor "${s}"`,articles:i.masculine};return`${c.articles[a]} ${c.name}`}return(s)=>{switch(s.code){case"invalid_type":{let a=o(s.expected,"indefinite"),c=W(s.input),l=o(c,"indefinite");return`Entrada inválida: esperava ${a}, recebeu ${l}`}case"invalid_value":if(s.values.length===1)return`Entrada inválida: esperava ${V(s.values[0])}`;return`Opção inválida: esperava uma das seguintes opções: ${j(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",c=t(s.origin);if(c)return`Grande demais: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.maximum.toString()} ${c.unit??"elementos"}`;return`Grande demais: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",c=t(s.origin);if(c)return`Pequeno demais: esperava que ${o(s.origin,"definite")} tivesse ${a} ${s.minimum.toString()} ${c.unit??"elementos"}`;return`Pequeno demais: esperava que ${o(s.origin,"definite")} fosse ${a} ${s.minimum.toString()}`}case"invalid_format":{let a=s;if(a.format==="starts_with")return`Texto inválido: deve começar com "${a.prefix}"`;if(a.format==="ends_with")return`Texto inválido: deve terminar com "${a.suffix}"`;if(a.format==="includes")return`Texto inválido: deve incluir "${a.includes}"`;if(a.format==="regex")return`Texto inválido: deve corresponder ao padrão ${a.pattern}`;return`Formato d${r[a.format]??s.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${s.divisor}`;case"unrecognized_keys":{let a=s.keys.length>1?"s":"";return`Chave${a} inválida${a}: ${j(s.keys,", ")}`}case"invalid_key":return`Entrada inválida n${o(s.origin,"definite")}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Valor de discriminação inválido. Esperava ${s.options.map((c)=>`'${c}'`).join(" | ")}`;return"Entrada inválida";case"invalid_element":return`Entrada inválida n${o(s.origin,"definite")}`;default:return"Entrada inválida"}}};var rH=I(()=>{se()});function dT(){return{localeError:ACe()}}var ACe=()=>{let 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(n){return e[n]??null}let r={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",credit_card:"număr de card de credit",currency_code:"cod valutar",iban:"IBAN",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(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Intrare invalidă: așteptat ${o}, primit ${a}`}case"invalid_value":if(n.values.length===1)return`Intrare invalidă: așteptat ${V(n.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Prea mare: așteptat ca ${n.origin??"valoarea"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemente"}`;return`Prea mare: așteptat ca ${n.origin??"valoarea"} să fie ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Prea mic: așteptat ca ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Prea mic: așteptat ca ${n.origin} să fie ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${o.prefix}"`;if(o.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${o.suffix}"`;if(o.format==="includes")return`Șir invalid: trebuie să includă "${o.includes}"`;if(o.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${o.pattern}`;return`Format invalid: ${r[o.format]??n.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${j(n.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${n.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${n.origin}`;default:return"Intrare invalidă"}}};var nH=I(()=>{se()});function iH(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;if(s>=11&&s<=19)return i;if(o===1)return t;if(o>=2&&o<=4)return r;return i}function fT(){return{localeError:OCe()}}var OCe=()=>{let 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:"иметь"},map:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}let r={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 адрес",mac:"MAC адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",credit_card:"номер кредитной карты",currency_code:"код валюты",iban:"IBAN",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${a}`;return`Неверный ввод: ожидалось ${o}, получено ${a}`}case"invalid_value":if(n.values.length===1)return`Неверный ввод: ожидалось ${V(n.values[0])}`;return`Неверный вариант: ожидалось одно из ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=iH(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=iH(a,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неверная строка: должна начинаться с "${o.prefix}"`;if(o.format==="ends_with")return`Неверная строка: должна заканчиваться на "${o.suffix}"`;if(o.format==="includes")return`Неверная строка: должна содержать "${o.includes}"`;if(o.format==="regex")return`Неверная строка: должна соответствовать шаблону ${o.pattern}`;return`Неверный ${r[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};var oH=I(()=>{se()});function mT(){return{localeError:DCe()}}var DCe=()=>{let e={string:{unit:"znakov",verb:"mať"},file:{unit:"bajtov",verb:"mať"},array:{unit:"prvkov",verb:"mať"},set:{unit:"prvkov",verb:"mať"},map:{unit:"položiek",verb:"mať"}};function t(n){return e[n]??null}let r={regex:"regulárny 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:"dátum a čas vo formáte ISO",date:"dátum vo formáte ISO",time:"čas vo formáte ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"reťazec zakódovaný vo formáte base64",base64url:"reťazec zakódovaný vo formáte base64url",json_string:"reťazec vo formáte JSON",e164:"číslo E.164",credit_card:"číslo kreditnej karty",currency_code:"kód meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"reťazec",function:"funkcia",array:"pole"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neplatný vstup: očakávané instanceof ${n.expected}, obdržané ${a}`;return`Neplatný vstup: očakávané ${o}, obdržané ${a}`}case"invalid_value":if(n.values.length===1)return`Neplatný vstup: očakávané ${V(n.values[0])}`;return`Neplatný vstup: očakávaná jedna z hodnôt ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Hodnota je príliš veľká: ${n.origin??"hodnota"} musí mať ${o}${n.maximum.toString()} ${s.unit??"prvkov"}`;return`Hodnota je príliš veľká: ${n.origin??"hodnota"} musí byť ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Hodnota je príliš malá: ${n.origin??"hodnota"} musí mať ${o}${n.minimum.toString()} ${s.unit??"prvkov"}`;return`Hodnota je príliš malá: ${n.origin??"hodnota"} musí byť ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neplatný reťazec: musí začínať na "${o.prefix}"`;if(o.format==="ends_with")return`Neplatný reťazec: musí končiť na "${o.suffix}"`;if(o.format==="includes")return`Neplatný reťazec: musí obsahovať "${o.includes}"`;if(o.format==="regex")return`Neplatný reťazec: musí zodpovedať vzoru ${o.pattern}`;return`Neplatný formát ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí byť násobkom ${n.divisor}`;case"unrecognized_keys":return`Neznáme klúče: ${j(n.keys,", ")}`;case"invalid_key":return`Neplatný klúč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};var sH=I(()=>{se()});function gT(){return{localeError:TCe()}}var TCe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",credit_card:"številka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${a}`;return`Neveljaven vnos: pričakovano ${o}, prejeto ${a}`}case"invalid_value":if(n.values.length===1)return`Neveljaven vnos: pričakovano ${V(n.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`;return`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Neveljaven niz: mora se začeti z "${o.prefix}"`;if(o.format==="ends_with")return`Neveljaven niz: mora se končati z "${o.suffix}"`;if(o.format==="includes")return`Neveljaven niz: mora vsebovati "${o.includes}"`;if(o.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`;return`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${j(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};var aH=I(()=>{se()});function hT(){return{localeError:NCe()}}var NCe=()=>{let 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"},map:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}let r={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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${a}`;return`Ogiltig inmatning: förväntat ${o}, fick ${a}`}case"invalid_value":if(n.values.length===1)return`Ogiltig inmatning: förväntat ${V(n.values[0])}`;return`Ogiltigt val: förväntade en av ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`;return`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`;return`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ogiltig sträng: måste börja med "${o.prefix}"`;if(o.format==="ends_with")return`Ogiltig sträng: måste sluta med "${o.suffix}"`;if(o.format==="includes")return`Ogiltig sträng: måste innehålla "${o.includes}"`;if(o.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`;return`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${j(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};var cH=I(()=>{se()});function yT(){return{localeError:MCe()}}var MCe=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},map:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}let r={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 முகவரி",mac:"MAC முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",credit_card:"கடன் அட்டை எண்",currency_code:"நாணயக் குறியீடு",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${a}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${o}, பெறப்பட்டது ${a}`}case"invalid_value":if(n.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${V(n.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${j(n.values,"|")} இல் ஒன்று`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`;if(o.format==="ends_with")return`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`;if(o.format==="includes")return`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`;if(o.format==="regex")return`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${r[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var lH=I(()=>{se()});function vT(){return{localeError:jCe()}}var jCe=()=>{let e={string:{unit:"аломат",verb:"дошта бошад"},file:{unit:"байт",verb:"дошта бошад"},array:{unit:"унсур",verb:"дошта бошад"},set:{unit:"унсур",verb:"дошта бошад"},map:{unit:"сабт",verb:"дошта бошад"}};function t(n){return e[n]??null}let r={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",mac:"суроғаи MAC",cidrv4:"маҳдудаи IPv4",cidrv6:"маҳдудаи IPv6",base64:"сатри дар формати base64",base64url:"сатри дар формати base64url",json_string:"сатри JSON",e164:"рақами E.164",credit_card:"рақами корти кредитӣ",currency_code:"рамзи асъор",iban:"IBAN",jwt:"JWT",template_literal:"вуруд"},i={nan:"NaN",number:"рақам",string:"сатр",array:"массив",object:"объект",date:"сана"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Вуруди нодуруст: ${o} интизор мерафт, ${a} гирифта шуд`}case"invalid_value":if(n.values.length===1)return`Вуруди нодуруст: ${V(n.values[0])} интизор мерафт`;return`Интихоби нодуруст: яке аз ${j(n.values,"|")} интизор мерафт`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Хеле калон: ${n.origin??"қимат"} бояд ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`Хеле калон: ${n.origin??"қимат"} бояд ${o}${n.maximum.toString()} бошад`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Хеле хурд: ${n.origin} бояд ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Хеле хурд: ${n.origin} бояд ${o}${n.minimum.toString()} бошад`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Сатри нодуруст: бояд бо "${o.prefix}" оғоз шавад`;if(o.format==="ends_with")return`Сатри нодуруст: бояд бо "${o.suffix}" анҷом ёбад`;if(o.format==="includes")return`Сатри нодуруст: бояд "${o.includes}"-ро дар бар гирад`;if(o.format==="regex")return`Сатри нодуруст: бояд ба намунаи ${o.pattern} мувофиқат кунад`;return`${r[o.format]??n.format}-и нодуруст`}case"not_multiple_of":return`Рақами нодуруст: бояд ба ${n.divisor} бе бақия тақсим шавад`;case"unrecognized_keys":return`Калид${n.keys.length>1?"ҳои":"и"} номаълум: ${j(n.keys,", ")}`;case"invalid_key":return`Калиди нодуруст дар ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0)return`Қимати нодурусти дискриминатор: ${n.options.map((s)=>`'${s}'`).join(" | ")} интизор мерафт`;return"Вуруди нодуруст";case"invalid_element":return`Қимати нодуруст дар ${n.origin}`;default:return"Вуруди нодуруст"}}};var uH=I(()=>{se()});function wT(){return{localeError:FCe()}}var FCe=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"},map:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}let r={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",mac:"ที่อยู่ MAC",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",credit_card:"หมายเลขบัตรเครดิต",currency_code:"รหัสสกุลเงิน",iban:"IBAN",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${a}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${o} แต่ได้รับ ${a}`}case"invalid_value":if(n.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${V(n.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(n.origin);if(s)return`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${s.unit??"รายการ"}`;return`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"อย่างน้อย":"มากกว่า",s=t(n.origin);if(s)return`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${s.unit}`;return`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`;if(o.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`;if(o.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`;if(o.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`;return`รูปแบบไม่ถูกต้อง: ${r[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${j(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var pH=I(()=>{se()});function bT(){return{localeError:zCe()}}var zCe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"baýt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}let r={regex:"giriş",email:"e-poçta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen şifrlenen setir",base64url:"base64url bilen şifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartynyň nomeri",currency_code:"walýuta kody",iban:"IBAN",jwt:"JWT",template_literal:"şablon"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;return`Nädogry baha: garaşylan ${o} ýerine ${a} alyndy`}case"invalid_value":if(n.values.length===1)return`Nädogry baha: ${V(n.values[0])} bolmaly`;return`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Has uly: garaşylýan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${s.unit??"element"}`;return`Has uly: garaşylýan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Has kiçi: garaşylýan ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`;return`Has kiçi: garaşylýan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Nädogry setir: "${o.prefix}" bilen başlamaly`;if(o.format==="ends_with")return`Nädogry setir: "${o.suffix}" bilen gutarmaly`;if(o.format==="includes")return`Nädogry setir: "${o.includes}" saklamaly`;if(o.format==="regex")return`Nädogry setir: ${o.pattern} nusga laýyk bolmaly`;return`Nädogry ${r[o.format]??n.format}`}case"not_multiple_of":return`Nädogry san: ${n.divisor} bilen galyndysyz bölünmeli`;case"unrecognized_keys":return`Tanalmaýan açar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde nädogry açar`;case"invalid_union":return"Nädogry baha";case"invalid_element":return`${n.origin} içinde nädogry baha`;default:return"Nädogry baha"}}};var dH=I(()=>{se()});function kT(){return{localeError:UCe()}}var UCe=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"},map:{unit:"öğe",verb:"olmalı"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC 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ı",credit_card:"kredi kartı numarası",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${a}`;return`Geçersiz değer: beklenen ${o}, alınan ${a}`}case"invalid_value":if(n.values.length===1)return`Geçersiz değer: beklenen ${V(n.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()} ${s.unit??"öğe"}`;return`Çok büyük: beklenen ${n.origin??"değer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`Çok küçük: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Geçersiz metin: "${o.prefix}" ile başlamalı`;if(o.format==="ends_with")return`Geçersiz metin: "${o.suffix}" ile bitmeli`;if(o.format==="includes")return`Geçersiz metin: "${o.includes}" içermeli`;if(o.format==="regex")return`Geçersiz metin: ${o.pattern} desenine uymalı`;return`Geçersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var fH=I(()=>{se()});function lh(){return{localeError:LCe()}}var LCe=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"},map:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}let r={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",mac:"адреса MAC",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",credit_card:"номер кредитної картки",currency_code:"код валюти",iban:"IBAN",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${a}`;return`Неправильні вхідні дані: очікується ${o}, отримано ${a}`}case"invalid_value":if(n.values.length===1)return`Неправильні вхідні дані: очікується ${V(n.values[0])}`;return`Неправильна опція: очікується одне з ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"елементів"}`;return`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Занадто мале: очікується, що ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Неправильний рядок: повинен починатися з "${o.prefix}"`;if(o.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`;if(o.format==="includes")return`Неправильний рядок: повинен містити "${o.includes}"`;if(o.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`;return`Неправильний ${r[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${j(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};var ST=I(()=>{se()});function $T(){return lh()}var mH=I(()=>{ST()});function xT(){return{localeError:BCe()}}var BCe=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"},map:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}let r={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 ایڈریس",mac:"ایم اے سی ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",credit_card:"کریڈٹ کارڈ نمبر",currency_code:"کرنسی کوڈ",iban:"IBAN",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${a} موصول ہوا`;return`غلط ان پٹ: ${o} متوقع تھا، ${a} موصول ہوا`}case"invalid_value":if(n.values.length===1)return`غلط ان پٹ: ${V(n.values[0])} متوقع تھا`;return`غلط آپشن: ${j(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`;if(o.format==="ends_with")return`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`;if(o.format==="includes")return`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`;if(o.format==="regex")return`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`;return`غلط ${r[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${j(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var gH=I(()=>{se()});function PT(){return{localeError:qCe()}}var qCe=()=>{let 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(n){return e[n]??null}let r={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",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`;return`Noto‘g‘ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":if(n.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${V(n.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`;return`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`;return`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Noto‘g‘ri satr: "${o.prefix}" bilan boshlanishi kerak`;if(o.format==="ends_with")return`Noto‘g‘ri satr: "${o.suffix}" bilan tugashi kerak`;if(o.format==="includes")return`Noto‘g‘ri satr: "${o.includes}" ni o‘z ichiga olishi kerak`;if(o.format==="regex")return`Noto‘g‘ri satr: ${o.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};var hH=I(()=>{se()});function CT(){return{localeError:VCe()}}var VCe=()=>{let 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ó"},map:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}let r={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",mac:"địa chỉ MAC",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",credit_card:"số thẻ tín dụng",currency_code:"mã tiền tệ",iban:"IBAN",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${a}`;return`Đầu vào không hợp lệ: mong đợi ${o}, nhận được ${a}`}case"invalid_value":if(n.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${V(n.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"phần tử"}`;return`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`;return`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`;if(o.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`;if(o.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`;if(o.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`;return`${r[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${j(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};var yH=I(()=>{se()});function _T(){return{localeError:WCe()}}var WCe=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"},map:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}let r={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地址",mac:"MAC地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",credit_card:"信用卡号",currency_code:"货币代码",iban:"IBAN",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`无效输入:期望 instanceof ${n.expected},实际接收 ${a}`;return`无效输入:期望 ${o},实际接收 ${a}`}case"invalid_value":if(n.values.length===1)return`无效输入:期望 ${V(n.values[0])}`;return`无效选项:期望以下之一 ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${s.unit??"个元素"}`;return`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`;return`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`无效字符串:必须以 "${o.prefix}" 开头`;if(o.format==="ends_with")return`无效字符串:必须以 "${o.suffix}" 结尾`;if(o.format==="includes")return`无效字符串:必须包含 "${o.includes}"`;if(o.format==="regex")return`无效字符串:必须满足正则表达式 ${o.pattern}`;return`无效${r[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${j(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};var vH=I(()=>{se()});function ET(){return{localeError:HCe()}}var HCe=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"},map:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}let r={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 位址",mac:"MAC 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",credit_card:"信用卡號",currency_code:"貨幣代碼",iban:"IBAN",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${a}`;return`無效的輸入值:預期為 ${o},但收到 ${a}`}case"invalid_value":if(n.values.length===1)return`無效的輸入值:預期為 ${V(n.values[0])}`;return`無效的選項:預期為以下其中之一 ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${s.unit??"個元素"}`;return`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${s.unit}`;return`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`無效的字串:必須以 "${o.prefix}" 開頭`;if(o.format==="ends_with")return`無效的字串:必須以 "${o.suffix}" 結尾`;if(o.format==="includes")return`無效的字串:必須包含 "${o.includes}"`;if(o.format==="regex")return`無效的字串:必須符合格式 ${o.pattern}`;return`無效的 ${r[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${j(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};var wH=I(()=>{se()});function RT(){return{localeError:GCe()}}var GCe=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"},map:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}let r={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",mac:"àdírẹ́sì MAC",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",credit_card:"nọmba kaadi gbese",currency_code:"koodu owó",iban:"IBAN",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(n)=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=W(n.input),a=i[s]??s;if(/^[A-Z]/.test(n.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${a}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${o}, àmọ̀ a rí ${a}`}case"invalid_value":if(n.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${V(n.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${j(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s)return`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`;return`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`;if(o.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`;if(o.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`;if(o.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`;return`Aṣìṣe: ${r[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${j(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};var bH=I(()=>{se()});var dd={};vn(dd,{ar:()=>kD,az:()=>SD,be:()=>$D,bg:()=>xD,bn:()=>PD,ca:()=>CD,ckb:()=>_D,cs:()=>ED,da:()=>RD,de:()=>ID,el:()=>AD,en:()=>sh,eo:()=>DD,es:()=>TD,fa:()=>ND,fi:()=>MD,fr:()=>jD,frCA:()=>FD,gu:()=>zD,he:()=>UD,hi:()=>LD,hr:()=>BD,hu:()=>qD,hy:()=>VD,id:()=>WD,is:()=>HD,it:()=>GD,ja:()=>ZD,ka:()=>KD,kh:()=>YD,km:()=>ah,kn:()=>XD,ko:()=>QD,lt:()=>eT,mk:()=>tT,ms:()=>rT,ne:()=>nT,nl:()=>iT,nn:()=>oT,no:()=>sT,ota:()=>aT,pl:()=>lT,ps:()=>cT,pt:()=>uT,ptBR:()=>pT,ro:()=>dT,ru:()=>fT,sk:()=>mT,sl:()=>gT,sv:()=>hT,ta:()=>yT,tg:()=>vT,th:()=>wT,tk:()=>bT,tr:()=>kT,ua:()=>$T,uk:()=>lh,ur:()=>xT,uz:()=>PT,vi:()=>CT,yo:()=>RT,zhCN:()=>_T,zhTW:()=>ET});var Ak=I(()=>{pW();dW();mW();gW();hW();yW();vW();wW();bW();kW();SW();OD();$W();xW();PW();CW();_W();EW();RW();IW();AW();OW();DW();NW();MW();jW();FW();zW();UW();LW();JD();BW();qW();WW();HW();GW();ZW();KW();JW();YW();XW();QW();eH();tH();rH();nH();oH();sH();aH();cH();lH();uH();pH();dH();fH();mH();ST();gH();hH();yH();vH();wH();bH()});class OT{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r==="object"&&"id"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...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 Ok(){return new OT}var kH,IT,AT,ln;var uh=I(()=>{IT=Symbol("ZodOutput"),AT=Symbol("ZodInput");(kH=globalThis).__zod_globalRegistry??(kH.__zod_globalRegistry=Ok());ln=globalThis.__zod_globalRegistry});function KCe(e,t){try{return Tk(e,{assertOnly:!0})}catch{return t}}function MT(e,t){try{let r=Tk(e),i=Dk(e,r);return i._zod.bag.validator=KCe(e,r),i}catch(r){if(t?.strict)throw r;return e}}function Dk(e,t){if(Rk(e))throw new rt("a schema whose subtree contains a reference cycle");let r=$t(e),i=e._zod.run,n=i.__originalRun??i,o=(s,a)=>{if(a?.async||a?.direction==="backward"||a?.skipChecks||a?.[SH])return n(s,a);if(a&&Ik(a,s.value))return n(s,a);let c=t(s.value);if(c!==Un)return s.value=c,s;if(a)a[SH]=!0;return n(s,a)};if(o.__originalRun=n,r._zod.bag.fallbackRun=n,r._zod.bag.validator=t,r._zod.run=o,!i.__originalRun)JCe(r,e,t);return r}function JCe(e,t,r){let i=e,n=t;if(typeof n.safeParse==="function"){let o=n.safeParse;i.safeParse=(s,a)=>{let c=r(s);if(c!==Un)return{success:!0,data:c};return o(s,a)}}if(typeof n.parse==="function"){let o=n.parse;i.parse=(s,a)=>{let c=r(s);if(c!==Un)return c;return o(s,a)}}}function Tk(e,t){let r=!0;try{r=Rk(e)}catch{}if(r)throw new rt("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},n=new ad(["input"]),o=er(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);let s=["INVALID",...i.constants.keys()],a=[Un,...i.constants.values()],c=n.content.join(`
292
292
  `),l=t?.debug?s.length>0?`// Constants: ${s.join(", ")}
293
293
  ${c}`:c:"",u=Function,p=`return (input) => {
294
294
  ${c}
295
295
  }`,d;try{d=new u(...s,p)(...a)}catch(f){throw new rt(`this schema (generated code failed to evaluate: ${f.message})`)}if(t?.debug)d.code=l;return d.definite=i.definite,d}function Oe(e,t){for(let[i,n]of e.constants)if(n===t)return i;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Wl(e,t){return e.definite=!1,Oe(e,t)}function Pe(e){return`v${e.varCounter++}`}function YCe(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then==="function")return Un;let i=r;return i.issues.length===0?i.value:Un}function $n(e,t,r,i,n=!0){let o=e.content.length,s=t.constants.size,a=t.constantCounter,c=t.varCounter;try{return er(e,t,r,i,n)}catch(l){if(!(l instanceof rt)||!l.islandable)throw l;if(e.content.length=o,t.constants.size>s){let u=Array.from(t.constants.keys()).slice(s);for(let p of u)t.constants.delete(p)}return t.constantCounter=a,t.varCounter=c,XCe(e,t,r,i)}}function XCe(e,t,r,i){t.definite=!1;let n=Oe(t,r),o=Oe(t,YCe),s=Pe(t);return e.write(`const ${s} = ${o}(${n}, ${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function e_e(e,t,r,i){let n=r._zod.def.checks;if(!n||n.length===0)return i;let o=i;for(let s of n){let a=s._zod.def;if(a.when&&!QCe.has(a.check))throw new rt('check with a custom "when" condition');switch(a.check){case"greater_than":t_e(e,t,a,o);break;case"less_than":r_e(e,t,a,o);break;case"multiple_of":n_e(e,t,a,o);break;case"number_format":EH(e,a,o);break;case"min_length":{let c=ql(a.minimum,"min_length"),l=DT(e,t,o,`${o}.length >= ${c} && ${o}.length < ${a.minimum*2}`);e.write(`if (${l} < ${c}) return INVALID;`);break}case"max_length":{let c=ql(a.maximum,"max_length"),l=DT(e,t,o,`${o}.length > ${c}`);e.write(`if (${l} > ${c}) return INVALID;`);break}case"length_equals":{let c=ql(a.length,"length_equals"),l=DT(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${a.length*2}`);e.write(`if (${l} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${ql(a.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${ql(a.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${ql(a.size,"size_equals")}) return INVALID;`);break;case"string_format":o=RH(e,t,a,o);break;case"custom":o=l_e(e,t,s,o);break;case"bigint_format":i_e(e,a,o);break;case"mime_type":o_e(e,t,a,o);break;case"property":a_e(e,t,a,o);break;case"properties":s_e(e,t,a,o);break;case"overwrite":{let c=Pe(t);c_e(e,t,s,o,c),o=c;break}default:throw new rt(`check type ${a.check}`)}}return o}function DT(e,t,r,i){let n=Oe(t,Fl),o=Pe(t);return e.write(`const ${o} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),o}function ql(e,t){if(typeof e!=="number"||!Number.isFinite(e))throw new rt(`${t} bound of type ${typeof e}`);return`${e}`}function _H(e,t){if(typeof t==="bigint")return`${t}n`;if(typeof t==="number"){if(Number.isNaN(t))throw new rt("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new rt("comparison check with Invalid Date bound");return Oe(e,t)}throw new rt(`comparison check bound of type ${typeof t}`)}function t_e(e,t,r,i){let n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${_H(t,r.value)}) return INVALID;`)}function r_e(e,t,r,i){let n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${_H(t,r.value)}) return INVALID;`)}function n_e(e,t,r,i){if(typeof r.value==="bigint"){if(r.value===BigInt(0))throw new rt("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{let n=Oe(t,Ag);e.write(`if (${n}(${i}, ${ql(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function EH(e,t,r){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new rt(`number format ${i}`)}}function i_e(e,t,r){let i=t.format;if(!i)return;switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new rt(`bigint format ${i}`)}}function o_e(e,t,r,i){let n=r.mime;if(n&&n.length>0){let o=Oe(t,new Set(n));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function s_e(e,t,r,i){if(r.when)throw new rt('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let n=r.shape;for(let o of Reflect.ownKeys(n)){let s=typeof o==="symbol"?Oe(t,o):Fn(o),a=Pe(t);e.write(`const ${a} = ${i}[${s}];`),$n(e,t,n[o],a,!1)}}function a_e(e,t,r,i){let n=`${i}[${JSON.stringify(r.property)}]`;er(e,t,r.schema,n)}function c_e(e,t,r,i,n){let o=r._zod.def.tx;if(!o)throw new rt("overwrite check without a transform function");if(Hl(o))throw new is("z.compile: async overwrite transforms are not supported");let s=Oe(t,o);e.write(`const ${n} = ${s}(${i});`)}function TT(){throw new _i}function jT(e){this.issues.push(e)}function l_e(e,t,r,i){let n=r._zod.def;if(n.fn){if(Hl(n.fn))throw new is("z.compile: async .refine() predicates are not supported");let o=Wl(t,n.fn),s=Oe(t,TT),a=Pe(t);return e.write(`const ${a} = ${o}(${i});`),e.write(`if (${a} instanceof Promise) ${s}();`),e.write(`if (!${a}) return INVALID;`),i}if(r._zod.check){if(Hl(r._zod.check))throw new is("z.compile: async .superRefine() / check functions are not supported");let o=r._zod.check,a=Wl(t,(l)=>{let u={value:l,issues:[],addIssue:jT};if(o(u)instanceof Promise)TT();return u.issues.length===0?u.value:Un}),c=Pe(t);return e.write(`const ${c} = ${a}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new rt("custom check without a predicate or check function")}function RH(e,t,r,i,n=!0){let o=r.format;if(o==="base64"){let l=Oe(t,Yg);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="base64url"){let l=Oe(t,yk);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="jwt"){let l=Oe(t,bk),u=Oe(t,r.alg??null);return e.write(`if (!${l}(${i}, ${u})) return INVALID;`),i}if(o==="ipv6"){let l=Oe(t,Jg);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="cidrv6"){let l=Oe(t,gk);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="credit_card"){let l=Oe(t,vk);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="iban"){let l=Oe(t,wk);return e.write(`if (!${l}(${i})) return INVALID;`),i}let s=r;if(o==="url"||o==="httpurl"||s.normalize||s.hostname!==void 0||s.protocol!==void 0){let l=Oe(t,dk),u=Oe(t,r),p=Pe(t),d=Pe(t);if(e.write(`const ${p} = ${i}.trim();`),e.write(`const ${d} = ${l}(${p}, ${u});`),e.write(`if (typeof ${d} === "number") return INVALID;`),s.hostname!==void 0){let g=Oe(t,fk);e.write(`if (!${g}(${d}, ${u}.hostname)) return INVALID;`)}if(s.protocol!==void 0){let g=Oe(t,mk);e.write(`if (!${g}(${d}, ${u}.protocol)) return INVALID;`)}if(!n)return null;let f=Pe(t),m=s.normalize?`${d}.href`:`${Oe(t,Kg)}(${p})`;return e.write(`const ${f} = ${m};`),f}let a=r.fn;if(a){if(Hl(a))throw new rt(`async string format ${o}`);let l=Oe(t,a);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(u_e.has(o)&&r.pattern){let l=Oe(t,r.pattern);return e.write(`${l}.lastIndex = 0;`),e.write(`if (!${l}.test(${i})) return INVALID;`),i}let c=r.format;switch(c){case"regex":throw new rt("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${Fn(r.includes)})) return INVALID;`);break;case"starts_with":{let l=r.prefix;e.write(`if (${i}.slice(0, ${l.length}) !== ${Fn(l)}) return INVALID;`);break}case"ends_with":{let l=r.suffix;e.write(`if (${i}.slice(-${l.length}) !== ${Fn(l)}) return INVALID;`);break}default:throw new rt(`string format ${c}`)}return i}function er(e,t,r,i,n=!0){let o=r._zod.def,s=o.type;if(o.coerce)throw new rt(`coercion (z.coerce.${s}())`);let a=n||!!o.checks?.length,c;switch(s){case"string":c=p_e(e,t,r,i,a);break;case"number":c=d_e(e,r,i);break;case"boolean":c=f_e(e,i);break;case"bigint":c=m_e(e,r,i);break;case"symbol":c=g_e(e,i);break;case"undefined":c=h_e(e,i);break;case"null":c=y_e(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=v_e(e,i);break;case"nan":c=w_e(e,i);break;case"date":c=b_e(e,i);break;case"object":c=k_e(e,t,r,i,a);break;case"optional":c=S_e(e,t,r,i,a);break;case"nullable":c=P_e(e,t,r,i,a);break;case"array":c=C_e(e,t,r,i,a);break;case"literal":c=__e(e,t,r,i);break;case"enum":c=E_e(e,t,r,i);break;case"readonly":{let l=xH(e,t,r,i),u=Pe(t);e.write(`const ${u} = Object.freeze(${l});`),c=u;break}case"success":xH(e,t,r,i),c="true";break;case"default":case"prefault":c=R_e(e,t,r,i);break;case"nonoptional":c=I_e(e,t,r,i);break;case"tuple":c=A_e(e,t,r,i);break;case"union":c=O_e(e,t,r,i);break;case"intersection":c=N_e(e,t,r,i);break;case"record":c=M_e(e,t,r,i);break;case"map":c=F_e(e,t,r,i);break;case"set":c=z_e(e,t,r,i);break;case"file":c=U_e(e,i);break;case"template_literal":c=L_e(e,t,r,i);break;case"lazy":c=B_e(e,t,r,i);break;case"pipe":c=q_e(e,t,r,i);break;case"custom":c=V_e(e,t,r,i);break;case"transform":c=G_e(e,t,r,i);break;case"catch":c=H_e(e,t,r,i);break;default:throw new rt(`schema type ${s}`)}if(c===null)return null;return e_e(e,t,r,c)}function p_e(e,t,r,i,n=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let o=r._zod.def;if(o.format===void 0)return i;return RH(e,t,o,i,n)}function d_e(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let i=t._zod.def;if(i.check==="number_format"&&i.format)EH(e,{format:i.format},r);return r}function f_e(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function m_e(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function g_e(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function h_e(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function y_e(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function v_e(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function w_e(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function b_e(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function k_e(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let s=o.shape,a=Object.keys(s),c=Object.getOwnPropertySymbols(s),l=c.length?[...a,...c]:a,u=(v)=>typeof v==="symbol"?Oe(t,v):Fn(v),p=(v)=>typeof v==="symbol"?`[${u(v)}]`:Fn(v),d=s;if(a.includes("__proto__"))throw new rt('object shape key "__proto__"');let f=new Map;for(let v of l){let w=d[v],x=u(v),b=Pe(t);if(e.write(`const ${b} = ${i}[${x}];`),w._zod.optin!==void 0){let k=Pe(t);if(e.write(`let ${k} = (() => {`),e.indented((A)=>{let N=$n(A,t,w,b);A.write(`return ${N};`)}),e.write("})();"),w._zod.optout==="optional")e.write(`if (${k} === INVALID) {`),e.indented((A)=>{A.write(`if (${x} in ${i}) return INVALID;`),A.write(`${k} = undefined;`)}),e.write("}");else e.write(`if (${k} === INVALID) return INVALID;`);f.set(v,k)}else{if(x_e(w))e.write(`if (!(${x} in ${i})) return INVALID;`);let k=$n(e,t,w,b,n);if(k!==null)f.set(v,k)}}let m=o.catchall,g="none";if(m){let v=m._zod.def.type;if(v==="never"){let w=a.map((x)=>`k !== ${Fn(x)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented((x)=>{x.write(`if (${w}) return INVALID;`)}),e.write("}")}else if((v==="unknown"||v==="any")&&!m._zod.def.checks?.length)g="passthrough";else g="schema"}let h=Pe(t),y=l.some((v)=>$H(d[v])||NT(d[v]));if(!n){if(g==="schema"){let v=a.length>0?Oe(t,new Set(a)):null;e.write(`for (const k in ${i}) {`),e.indented((w)=>{if(w.write('if (k === "__proto__") continue;'),v)w.write(`if (${v}.has(k)) continue;`);let x=Pe(t);w.write(`const ${x} = ${i}[k];`),$n(w,t,m,x,!1)}),e.write("}")}return null}if(!y){let v=l.map((w)=>`${p(w)}: ${f.get(w)}`).join(", ");e.write(`const ${h} = { ${v} };`)}else{e.write(`const ${h} = {};`);for(let v of l){let w=u(v),x=f.get(v);if(NT(d[v]))e.write(`if (${w} in ${i}) ${h}[${w}] = ${x};`);else if($H(d[v]))e.write(`if (${x} !== undefined || ${w} in ${i}) ${h}[${w}] = ${x};`);else e.write(`${h}[${w}] = ${x};`)}}if(g!=="none"){let v=a.length>0?Oe(t,new Set(a)):null;e.write(`for (const k in ${i}) {`),e.indented((w)=>{if(w.write('if (k === "__proto__") continue;'),v)w.write(`if (${v}.has(k)) continue;`);if(g==="passthrough")w.write(`${h}[k] = ${i}[k];`);else{let x=Pe(t);w.write(`const ${x} = ${i}[k];`);let b=$n(w,t,m,x);w.write(`${h}[k] = ${b};`)}}),e.write("}")}return h}function S_e(e,t,r,i,n=!0){let o=r._zod.def;if($_e(r))return er(e,t,o.innerType,i,n);if(o.innerType._zod.optin==="defaulted"){let a=Pe(t),c=Pe(t);return e.write(`let ${a};`),e.write(`if (${i} === undefined) {`),e.indented((l)=>{l.write(`const ${c} = (() => {`),l.indented((u)=>{let p=er(u,t,o.innerType,i);u.write(`return ${p};`)}),l.write("})();"),l.write(`if (${c} !== INVALID) ${a} = ${c};`)}),e.write("} else {"),e.indented((l)=>{let u=er(l,t,o.innerType,i);l.write(`${a} = ${u};`)}),e.write("}"),a}let s=n?Pe(t):null;if(s)e.write(`let ${s};`);return e.write(`if (${i} !== undefined) {`),e.indented((a)=>{let c=er(a,t,o.innerType,i,n);if(s&&c!==null)a.write(`${s} = ${c};`)}),e.write("}"),s}function $_e(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function x_e(e){return e._zod.optin===void 0&&Vl(e)}function Vl(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Vl(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Vl(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Vl):!0;case"intersection":if(!t.left||!t.right)return!0;return Vl(t.left)&&Vl(t.right);case"pipe":return t.in?Vl(t.in):!0;default:return!0}}function NT(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function $H(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&fd(e)}function fd(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?fd(t.innerType):!0;case"union":return t.options?t.options.some(fd):!0;case"intersection":return!t.left||!t.right||fd(t.left)||fd(t.right);case"pipe":return t.out?fd(t.out):!0;default:return!0}}function P_e(e,t,r,i,n=!0){let o=r._zod.def,s=n?Pe(t):null;if(s)e.write(`let ${s} = null;`);return e.write(`if (${i} !== null) {`),e.indented((a)=>{let c=er(a,t,o.innerType,i,n);if(s&&c!==null)a.write(`${s} = ${c};`)}),e.write("}"),s}function C_e(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=n?Pe(t):null,a=Pe(t),c=Pe(t);if(s)e.write(`const ${s} = new Array(${i}.length);`);return e.write(`for (let ${a} = 0; ${a} < ${i}.length; ${a}++) {`),e.indented((l)=>{l.write(`const ${c} = ${i}[${a}];`);let u=$n(l,t,o.element,c,n);if(s&&u!==null)l.write(`${s}[${a}] = ${u};`)}),e.write("}"),s}function __e(e,t,r,i){let o=r._zod.def.values;if(o.length!==1){let a=Oe(t,new Set(o));return e.write(`if (!${a}.has(${i})) return INVALID;`),i}let s=o[0];if(typeof s==="number"&&Number.isNaN(s)){let a=Oe(t,new Set(o));return e.write(`if (!${a}.has(${i})) return INVALID;`),i}if(typeof s==="string")e.write(`if (${i} !== ${Fn(s)}) return INVALID;`);else if(typeof s==="number"||typeof s==="boolean")e.write(`if (${i} !== ${s}) return INVALID;`);else if(s===null)e.write(`if (${i} !== null) return INVALID;`);else if(s===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof s==="bigint")e.write(`if (${i} !== ${s}n) return INVALID;`);else throw new rt(`literal type ${typeof s}`);return i}function E_e(e,t,r,i){let n=r._zod.values;if(!n)throw new rt("enum schema without enumerated values");let o=Oe(t,n);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function xH(e,t,r,i){let n=r._zod.def;return er(e,t,n.innerType,i)}function R_e(e,t,r,i){let n=r._zod.def,s=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!s)return er(e,t,n.innerType,i);let c=Oe(t,s),l=Pe(t);return e.write(`let ${l} = ${i};`),e.write(`if (${i} === undefined) ${l} = ${c}();`),er(e,t,n.innerType,l)}let a=Pe(t);if(s){let c=Oe(t,s),l=Oe(t,Og);e.write(`let ${a};`),e.write(`if (${i} === undefined) {`),e.indented((u)=>{u.write(`${a} = ${l}(${c}());`)}),e.write("} else {"),e.indented((u)=>{let p=er(u,t,n.innerType,i);u.write(`${a} = ${p} === undefined ? ${l}(${c}()) : ${p};`)}),e.write("}")}else e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented((c)=>{let l=er(c,t,n.innerType,i);c.write(`${a} = ${l};`)}),e.write("}");return a}function I_e(e,t,r,i){let n=r._zod.def,o=er(e,t,n.innerType,i),s=Pe(t);return e.write(`const ${s} = ${o};`),e.write(`if (${s} === undefined) return INVALID;`),s}function A_e(e,t,r,i){let n=r._zod.def,o=n.items,s=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let a=PH(o,"optin"),c=PH(o,"optout");if(s)e.write(`if (${i}.length < ${a}) return INVALID;`);else e.write(`if (${i}.length < ${a} || ${i}.length > ${o.length}) return INVALID;`);let l=Pe(t);e.write(`const ${l} = [];`);for(let u=0;u<o.length;u++){let p=o[u];if(u>=c)e.write(`if (${l}.length === ${u}) {`),e.indented((d)=>{d.write(`if (${u} < ${i}.length) {`),d.indented((f)=>{let m=Pe(t);f.write(`const ${m} = ${i}[${u}];`);let g=$n(f,t,p,m);f.write(`${l}[${u}] = ${g};`)}),d.write("} else {"),d.indented((f)=>{if(NT(p)){f.write(`${l}.length = ${u};`);return}let m=Pe(t),g=Pe(t);f.write(`const ${m} = undefined;`),f.write(`const ${g} = (() => {`),f.indented((h)=>{let y=$n(h,t,p,m);h.write(`return ${y};`)}),f.write("})();"),f.write(`if (${g} === INVALID || ${g} === undefined) ${l}.length = ${u};`),f.write(`else ${l}[${u}] = ${g};`)}),d.write("}")}),e.write("}");else{let d=Pe(t);e.write(`const ${d} = ${i}[${u}];`);let f=$n(e,t,p,d);e.write(`${l}[${u}] = ${f};`)}}if(s){let u=Pe(t),p=Pe(t);e.write(`for (let ${u} = ${o.length}; ${u} < ${i}.length; ${u}++) {`),e.indented((d)=>{d.write(`const ${p} = ${i}[${u}];`);let f=$n(d,t,s,p);d.write(`${l}[${u}] = ${f};`)}),e.write("}")}return l}function PH(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function O_e(e,t,r,i){let n=r._zod.def,o=n.options;if(n.discriminator)return D_e(e,t,n,i);if(n.inclusive===!1)throw new rt("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return er(e,t,o[0],i);if(o.every((c)=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap((u)=>u._zod.def.values)),l=Oe(t,c);return e.write(`if (!${l}.has(${i})) return INVALID;`),i}let a=Pe(t);e.write(`let ${a};`);for(let c=0;c<o.length;c++){let l=o[c];if(c===0)e.write(`${a} = (() => {`);else e.write(`if (${a} === INVALID) ${a} = (() => {`);e.indented((u)=>{let p=er(u,t,l,i);u.write(`return ${p};`)}),e.write("})();")}return e.write(`if (${a} === INVALID) return INVALID;`),a}function D_e(e,t,r,i){if(r.unionFallback)throw new rt("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;let n=Pe(t),o=Pe(t);e.write(`const ${n} = ${i}?.[${Fn(r.discriminator)}];`),e.write(`let ${o};`);let s=!0,a=new Set;for(let c of r.options){let l=c._zod.propValues?.[r.discriminator];if(!l||l.size===0)throw new rt("discriminated union option without static discriminator values");for(let d of l){if(a.has(d))throw new rt(`duplicate discriminator value ${String(d)}`);a.add(d)}let u=Array.from(l,(d)=>T_e(t,n,d)),p=s?"if":"else if";e.write(`${p} (${u.join(" || ")}) {`),e.indented((d)=>{let f=er(d,t,c,i);d.write(`${o} = ${f};`)}),e.write("}"),s=!1}return e.write("else { return INVALID; }"),o}function T_e(e,t,r){if(typeof r==="string")return`${t} === ${Fn(r)}`;if(typeof r==="number"){if(Number.isNaN(r))return`Number.isNaN(${t})`;return`${t} === ${r}`}if(typeof r==="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r==="bigint")return`${t} === ${r}n`;if(typeof r==="symbol"){let i=Oe(e,r);return`${t} === ${i}`}throw new rt(`literal discriminator value ${String(r)}`)}function N_e(e,t,r,i){let n=r._zod.def;t.definite=!1;let o=$n(e,t,n.left,i),s=$n(e,t,n.right,i),a=Oe(t,cd),c=Pe(t);return e.write(`const ${c} = ${a}(${o}, ${s});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function M_e(e,t,r,i){let n=r._zod.def,o=Oe(t,eo);e.write(`if (!${o}(${i})) return INVALID;`);let s=Pe(t),a=Pe(t),c=Pe(t);e.write(`const ${s} = {};`);let l=n,u=l.partial?void 0:n.keyType._zod.values;if(u){let f=[];for(let g of u){if(!(typeof g==="string"||typeof g==="number"||typeof g==="symbol"))throw new rt(`record key value ${String(g)}`);let h=typeof g==="number"?g.toString():g;if(h==="__proto__")throw new rt('record key "__proto__"');f.push(h);let y=Oe(t,g),v=er(e,t,n.keyType,y),w=Pe(t);e.write(`const ${w} = ${i}[${j_e(t,h)}];`);let x=$n(e,t,n.valueType,w);e.write(`${s}[${v}] = ${x};`)}let m=Oe(t,new Set(f));return e.write(`for (const ${a} in ${i}) {`),e.indented((g)=>{if(g.write(`if (${m}.has(${a})) continue;`),l.mode==="loose")g.write(`if (${a} !== "__proto__") ${s}[${a}] = ${i}[${a}];`);else g.write("return INVALID;")}),e.write("}"),s}let p=n.keyType._zod.def;if(!(p.type==="string"&&p.format===void 0&&!p.coerce&&(p.checks?.length??0)===0)){let f=n.mode==="loose",m=Tk(n.keyType);if(m.definite===!1)t.definite=!1;let g=Oe(t,m),h=Oe(t,ns),y=Pe(t);return CH(e,t,i,a,(v)=>{if(v.write(`let ${y} = ${g}(${a});`),v.write(`if (${y} === INVALID && typeof ${a} === "string" && ${h}.test(${a})) ${y} = ${g}(Number(${a}));`),f)v.write(`if (${y} === INVALID) { ${s}[${a}] = ${i}[${a}]; continue; }`);else v.write(`if (${y} === INVALID) return INVALID;`);v.write(`if (${y} === "__proto__") continue;`);let w=Pe(t);v.write(`const ${w} = ${i}[${a}];`);let x=$n(v,t,n.valueType,w);v.write(`${s}[${y}] = ${x};`)}),s}return CH(e,t,i,a,(f)=>{f.write(`const ${c} = ${i}[${a}];`);let m=$n(f,t,n.valueType,c);f.write(`${s}[${a}] = ${m};`)},"return INVALID;"),s}function CH(e,t,r,i,n,o){let s=Oe(t,Object.prototype.propertyIsEnumerable),a=Pe(t),c=Pe(t),l=Pe(t);e.write(`const ${a} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${l} = 0; ${l} < ${c}.length; ${l}++) {`),e.indented((u)=>{u.write(`const ${i} = ${c}[${l}];`),u.write(`if (${i} === "__proto__" || !${s}.call(${r}, ${i})) continue;`),n(u)}),e.write("}"),e.write(`for (let ${l} = 0; ${l} < ${a}.length; ${l}++) {`),e.indented((u)=>{if(u.write(`const ${i} = ${a}[${l}];`),u.write(`if (!${s}.call(${r}, ${i})) continue;`),o)u.write(o);else n(u)}),e.write("}")}function j_e(e,t){if(typeof t==="string")return Fn(t);return Oe(e,t)}function F_e(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`);let o=Pe(t),s=Pe(t),a=Pe(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${s}, ${a}] of ${i}) {`),e.indented((c)=>{let l=er(c,t,n.keyType,s),u=er(c,t,n.valueType,a);c.write(`${o}.set(${l}, ${u});`)}),e.write("}"),o}function z_e(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`);let o=Pe(t),s=Pe(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${s} of ${i}) {`),e.indented((a)=>{let c=er(a,t,n.valueType,s);a.write(`${o}.add(${c});`)}),e.write("}"),o}function U_e(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function L_e(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let n=r._zod.pattern;if(n){let o=Oe(t,n);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function B_e(e,t,r,i){let n=r._zod.def,o=Wl(t,n.getter),s=Oe(t,{parser:null});e.write(`if (!${s}.parser) {`),e.indented((c)=>{c.write(`const inner = ${o}();`),c.write(`${s}.parser = function(input) {`),c.indented((l)=>{l.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),l.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let a=Pe(t);return e.write(`const ${a} = ${s}.parser(${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}function q_e(e,t,r,i){let n=r._zod.def,o=er(e,t,n.in,i);if(n.transform){if(Hl(n.transform))throw new is("z.compile: async transforms in pipes are not supported");let s=n.transform,c=Wl(t,(u)=>{let p={value:u,issues:[],addIssue:jT},d=s(u,p);if(d instanceof Promise)return Un;return p.issues.length===0?d:Un}),l=Pe(t);return e.write(`const ${l} = ${c}(${o});`),e.write(`if (${l} === INVALID) return INVALID;`),er(e,t,n.out,l)}else return er(e,t,n.out,o)}function Hl(e){return typeof e==="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function V_e(e,t,r,i){let n=r._zod.def;if(n.fn){if(Hl(n.fn))throw new is("z.compile: async custom predicates are not supported");let o=Wl(t,n.fn),s=Oe(t,TT),a=Pe(t);e.write(`const ${a} = ${o}(${i});`),e.write(`if (${a} instanceof Promise) ${s}();`),e.write(`if (!${a}) return INVALID;`)}else throw new rt("custom schema without a predicate function");return i}function W_e(e,t,r){let i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then==="function")return Un;let n=i;if(n.issues.length===0)return n.value;return t()}function H_e(e,t,r,i){let n=r._zod.def;if(!n.catchValue[qb])throw new rt("catch with a callback (only a constant catch value compiles)",!1);let o=Pe(t);e.write(`let ${o} = (() => {`),e.indented((l)=>{let u=$n(l,t,n.innerType,i);l.write(`return ${u};`)}),e.write("})();");let s=Oe(t,n.innerType),a=Wl(t,n.catchValue),c=Oe(t,W_e);return e.write(`if (${o} === INVALID) {`),e.indented((l)=>{l.write(`${o} = ${c}(${s}, ${a}, ${i});`),l.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function G_e(e,t,r,i){let n=r._zod.def;if(n.transform){if(Hl(n.transform))throw new is("z.compile: async transforms are not supported");let o=n.transform,a=Wl(t,(l)=>{let u={value:l,issues:[],addIssue:jT},p=o(l,u);if(p instanceof Promise)return Un;return u.issues.length===0?p:Un}),c=Pe(t);return e.write(`const ${c} = ${a}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}var Un,SH,is,rt,QCe,u_e;var IH=I(()=>{nc();bD();Ll();ld();se();Un=Symbol.for("zod.compile.invalid"),SH=Symbol.for("zod.compile.fallback");is=class is extends Error{constructor(e="z.compile does not support async refinements, transforms, or checks"){super(e);this.name="ZodCompileAsyncError"}};rt=class rt extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`);this.name="ZodCompileUnsupportedError",this.islandable=t}};QCe=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);u_e=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"])});function Nk(e){if(e.checks)e.checks=[...e.checks];return e}function FT(e,t){return new e(Nk({type:"string",...te(t)}))}function zT(e,t){return new e(Nk({type:"string",coerce:!0,...te(t)}))}function Mk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...te(t)})}function jk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...te(t)})}function Fk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...te(t)})}function zk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(t)})}function Uk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(t)})}function Lk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(t)})}function ph(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...te(t)})}function Bk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...te(t)})}function qk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(t)})}function Vk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...te(t)})}function Wk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(t)})}function Hk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...te(t)})}function Gk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...te(t)})}function Zk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(t)})}function Kk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(t)})}function Jk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(t)})}function UT(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...te(t)})}function Yk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(t)})}function Xk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(t)})}function Qk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...te(t)})}function eS(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...te(t)})}function tS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...te(t)})}function LT(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...te(t)})}function BT(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...te(t)})}function rS(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...te(t)})}function dh(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(t)})}function fh(e,t){return new e({type:"string",format:"date",check:"string_format",...te(t)})}function mh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...te(t)})}function gh(e,t){return new e({type:"string",format:"duration",check:"string_format",...te(t)})}function VT(e,t){return new e(Nk({type:"number",checks:[],...te(t)}))}function WT(e,t){return new e(Nk({type:"number",coerce:!0,checks:[],...te(t)}))}function HT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...te(t)})}function GT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...te(t)})}function ZT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...te(t)})}function KT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...te(t)})}function JT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...te(t)})}function YT(e,t){return new e({type:"boolean",...te(t)})}function XT(e,t){return new e({type:"boolean",coerce:!0,...te(t)})}function QT(e,t){return new e({type:"bigint",...te(t)})}function eN(e,t){return new e({type:"bigint",coerce:!0,...te(t)})}function tN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...te(t)})}function rN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...te(t)})}function nN(e,t){return new e({type:"symbol",...te(t)})}function iN(e,t){return new e({type:"undefined",...te(t)})}function oN(e,t){return new e({type:"null",...te(t)})}function sN(e){return new e({type:"any"})}function aN(e){return new e({type:"unknown"})}function cN(e,t){return new e({type:"never",...te(t)})}function lN(e,t){return new e({type:"void",...te(t)})}function uN(e,t){return new e({type:"date",...te(t)})}function pN(e,t){return new e({type:"date",coerce:!0,...te(t)})}function dN(e,t){return new e({type:"nan",...te(t)})}function os(e,t){return new ik({check:"less_than",...te(t),value:e,inclusive:!1})}function Ei(e,t){return new ik({check:"less_than",...te(t),value:e,inclusive:!0})}function ss(e,t){return new ok({check:"greater_than",...te(t),value:e,inclusive:!1})}function Ri(e,t){return new ok({check:"greater_than",...te(t),value:e,inclusive:!0})}function nS(e){return ss(0,e)}function iS(e){return os(0,e)}function oS(e){return Ei(0,e)}function sS(e){return Ri(0,e)}function ic(e,t){return new jA({check:"multiple_of",...te(t),value:e})}function oc(e,t){return new UA({check:"max_size",...te(t),maximum:e})}function as(e,t){return new LA({check:"min_size",...te(t),minimum:e})}function Gl(e,t){return new BA({check:"size_equals",...te(t),size:e})}function Zl(e,t){return new qA({check:"max_length",...te(t),maximum:e})}function oa(e,t){return new VA({check:"min_length",...te(t),minimum:e})}function Kl(e,t){return new WA({check:"length_equals",...te(t),length:e})}function md(e,t){return new HA({check:"string_format",format:"regex",...te(t),pattern:e})}function gd(e){return new GA({check:"string_format",format:"lowercase",...te(e)})}function hd(e){return new ZA({check:"string_format",format:"uppercase",...te(e)})}function yd(e,t){return new KA({check:"string_format",format:"includes",...te(t),includes:e})}function vd(e,t){return new JA({check:"string_format",format:"starts_with",...te(t),prefix:e})}function wd(e,t){return new YA({check:"string_format",format:"ends_with",...te(t),suffix:e})}function aS(e,t,r){return new XA({check:"property",property:e,schema:t,...te(r)})}function bd(e,t){return new QA({check:"properties",shape:e,...te(t)})}function kd(e,t){return new eO({check:"mime_type",mime:e,...te(t)})}function Ao(e){return new tO({check:"overwrite",tx:e})}function Sd(e){return Ao((t)=>t.normalize(e))}function $d(){return Ao((e)=>e.trim())}function xd(){return Ao((e)=>e.toLowerCase())}function Pd(){return Ao((e)=>e.toUpperCase())}function Cd(){return Ao((e)=>jI(e))}function fN(e,t,r){return new e({type:"array",element:t,...te(r)})}function Z_e(e,t,r){return new e({type:"union",options:t,...te(r)})}function K_e(e,t,r){return new e({type:"union",options:t,inclusive:!1,...te(r)})}function J_e(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...te(i)})}function Y_e(e,t,r){return new e({type:"intersection",left:t,right:r})}function X_e(e,t,r,i){let n=r instanceof Ue;return new e({type:"tuple",items:t,rest:n?r:null,...te(n?i:r)})}function Q_e(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...te(i)})}function eEe(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...te(i)})}function tEe(e,t,r){return new e({type:"set",valueType:t,...te(r)})}function rEe(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map((n)=>[n,n])):t;return new e({type:"enum",entries:i,...te(r)})}function nEe(e,t,r){return new e({type:"enum",entries:t,...te(r)})}function iEe(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...te(r)})}function mN(e,t){return new e({type:"file",...te(t)})}function oEe(e,t){return new e({type:"transform",transform:t})}function sEe(e,t){return new e({type:"optional",innerType:t})}function aEe(e,t){return new e({type:"nullable",innerType:t})}function cEe(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r==="function"?r():Og(r)}})}function lEe(e,t,r){return new e({type:"nonoptional",innerType:t,...te(r)})}function uEe(e,t){return new e({type:"success",innerType:t})}function pEe(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r==="function"?r:qI(r)})}function dEe(e,t,r){return new e({type:"pipe",in:t,out:r})}function fEe(e,t){return new e({type:"readonly",innerType:t})}function mEe(e,t,r){return new e({type:"template_literal",parts:t,...te(r)})}function gEe(e,t){return new e({type:"lazy",getter:t})}function hEe(e,t){return new e({type:"promise",innerType:t})}function gN(e,t,r){let i=te(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function hN(e,t,r){return new e({type:"custom",check:"custom",fn:t,...te(r)})}function yN(e,t){let r=AH((i)=>(i.addIssue=(n)=>{if(typeof n==="string")i.issues.push(Qp(n,i.value,r._zod.def));else{let o=n;if(o.fatal)o.continue=!1;if(o.code??(o.code="custom"),!("input"in o))o.input=i.value;o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(Qp(o))}},e(i.value,i)),t);return r}function AH(e,t){let r=new jt({check:"custom",...te(t)});return r._zod.check=e,r}function vN(e){let t=new jt({check:"describe"});return t._zod.onattach=[(r)=>{let i=ln.get(r)??{};ln.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function wN(e){let t=new jt({check:"meta"});return t._zod.onattach=[(r)=>{let i=ln.get(r)??{};ln.add(r,{...i,...e})}],t._zod.check=()=>{},t}function bN(e,t){let r=te(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];if(r.case!=="sensitive")i=i.map((f)=>typeof f==="string"?f.toLowerCase():f),n=n.map((f)=>typeof f==="string"?f.toLowerCase():f);let o=new Set(i),s=new Set(n),a=e.Codec??th,c=e.Boolean??Qg,u=new(e.String??Bl)({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),d=new a({type:"pipe",in:u,out:p,transform:(f,m)=>{let g=f;if(r.case!=="sensitive")g=g.toLowerCase();if(o.has(g))return!0;else if(s.has(g))return!1;else return m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:m.value,inst:d,continue:!1}),{}},reverseTransform:(f,m)=>{if(f===!0)return i[0]||"true";else return n[0]||"false"},error:r.error});return d._zod.bag.truthy=i,d._zod.bag.falsy=n,d._zod.bag.case=r.case??"insensitive",d}function Jl(e,t,r,i={}){let n=te(i),o={check:"string_format",type:"string",format:t,fn:typeof r==="function"?r:(a)=>r.test(a),...n};if(r instanceof RegExp)o.pattern=r;return new e(o)}var qT;var OH=I(()=>{sk();uh();ld();se();qT={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function hh(e,...t){for(let r of t)for(let i of Reflect.ownKeys(r))if(Object.prototype.propertyIsEnumerable.call(r,i))cn(e,i,r[i]);return e}function sc(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??ln,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Fr(e,t,r,i,n){let o=typeof t.unrepresentable==="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw Error(n);return Object.assign(r,o),!0}function Pt(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o){if(o.count++,r.schemaPath.includes(e))o.cycle=r.path;return o.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{let d=s.schema,f=t.processors[n.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,d,u)}let p=e._zod.parent;if(p){if(!s.ref)s.ref=p;Pt(p,t,u),t.seen.get(p).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)hh(s.schema,c);if(t.io==="input"&&Ln(e))delete s.schema.examples,delete s.schema.default;if(t.io==="input"&&"_prefault"in s.schema)(i=s.schema).default??(i.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function DH(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function ac(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=i.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let n=(s)=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,d=e.external.uri??((m)=>m);if(p)return{ref:d(p)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${d("__shared")}#/${a}/${DH(f)}`}}let c="#",l=`${c}/${a}/`;if(s[1]===r&&!s[1].schema.id)return{ref:c};let u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+DH(u)}},o=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=n(s);if(a.def={...a.schema},l)a.defId=l;let u=a.schema;for(let p in u)delete u[p];u.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
296
296
 
297
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1){if(e.reused==="ref")o(s)}}if(e.external)e.sharedDefsExtractedFor=e.external}function MH(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let i of t){if(!i||typeof i!=="object")return;MH(i);let n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;let o=i.type;for(let s of Array.isArray(o)?o:[o]){if(typeof s!=="string")return;if(!r.includes(s))r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}function NH(e){let t=e.additionalProperties;if(t===void 0||t===!1||typeof t!=="object"||t===null)return null;return Object.keys(t).length?t:null}function kN(e){let t=[];for(let o of e){if(typeof o!=="object"||o.type!=="object")return null;for(let s in o)if(!jH.has(s))return null;t.push(o)}let r={},i=new Set;for(let o of t){for(let s in o.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let a=[];for(let l of t){let u=l.properties?.[s]??NH(l);if(u===null||u===void 0)continue;if(!a.some((p)=>JSON.stringify(p)===JSON.stringify(u)))a.push(u)}let c=a.length===1?a[0]:kN(a)??{allOf:a};cn(r,s,c)}for(let s of o.required??[])i.add(s)}let n={type:"object",properties:r};if(i.size)n.required=[...i];if(t.every((o)=>o.additionalProperties===!1))n.additionalProperties=!1;else{let o=[];for(let s of t){let a=NH(s);if(a&&!o.some((c)=>JSON.stringify(c)===JSON.stringify(a)))o.push(a)}if(o.length===1)n.additionalProperties=o[0];else if(o.length>1)n.additionalProperties={allOf:o}}return n}function yEe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of jH)if(n in e)return;let r=t.filter((n)=>TH.some((o)=>Array.isArray(n[o]))),i=null;if(!r.length)i=kN(t);else{let n=r[0],o=TH.find((c)=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;let s=t.filter((c)=>c!==n),a=n[o].map((c)=>kN([...s,c]));if(a.some((c)=>!c))return;i={[o]:a}}if(!i)return;delete e.allOf,hh(e,i)}function cc(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,u={...l},p=c.ref;if(c.ref=null,p){i(p);let f=e.seen.get(p),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(m);else hh(l,m);if(hh(l,u),a._zod.parent===p)for(let h in l){if(h==="$ref"||h==="allOf")continue;if(!(h in u))delete l[h]}if(m.$ref&&f.def)for(let h in l){if(h==="$ref"||h==="allOf")continue;if(h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h]))delete l[h]}}let d=a._zod.parent;if(d&&d!==p){i(d);let f=e.seen.get(d);if(f?.schema.$ref){if(l.$ref=f.schema.$ref,f.def)for(let m in l){if(m==="$ref"||m==="allOf")continue;if(m in f.def&&JSON.stringify(l[m])===JSON.stringify(f.def[m]))delete l[m]}}}e.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let a of[...e.seen.entries()].reverse())i(a[0]);if(e.target!=="openapi-3.0")for(let a of e.seen.entries())MH(a[1].def??a[1].schema);for(let a of e.deferred)a();if(e.intersections.length){let a=new Map;for(let c of e.seen.values())for(let l of[c.schema,c.def]){let u=l?.allOf;if(!Array.isArray(u))continue;let p=a.get(u);if(p)p.push(l);else a.set(u,[l])}for(let c of e.intersections)for(let l of a.get(c)??[])yEe(l)}}let n={};if(e.target==="draft-2020-12")n.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")n.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")n.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}hh(n,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;if(o!==void 0&&n.id===o)delete n.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;cn(s,c.defId,c.def)}}if(e.external)e.sharedEmitDoneFor=e.external;if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")n.$defs=s;else n.definitions=s;try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:_d(t,"input",e.processors),output:_d(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function Ln(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ln(i.element,r);if(i.type==="set")return Ln(i.valueType,r);if(i.type==="lazy")return Ln(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return Ln(i.innerType,r);if(i.type==="intersection")return Ln(i.left,r)||Ln(i.right,r);if(i.type==="record"||i.type==="map")return Ln(i.keyType,r)||Ln(i.valueType,r);if(i.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ln(i.in,r)||Ln(i.out,r)}if(i.type==="object"){for(let n in i.shape)if(Ln(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(Ln(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(Ln(n,r))return!0;if(i.rest&&Ln(i.rest,r))return!0;return!1}return!1}var jH,TH,SN=(e,t={})=>(r)=>{let i=sc({...r,processors:t});return Pt(e,i),ac(i,e),cc(i,e)},_d=(e,t,r={})=>(i)=>{let{libraryOptions:n,target:o}=i??{},s=sc({...n??{},target:o,io:t,processors:r});return Pt(e,s),ac(s,e),cc(s,e)};var yh=I(()=>{uh();se();jH=new Set(["type","properties","required","additionalProperties"]),TH=["oneOf","anyOf"]});function zr(e){let t={},r=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let o of i)vEe[o._zod.def.check]?.(t,o._zod.def);let n=e._zod.bag;if(n.minimum!==void 0)Ed(t,"minimum",n.minimum);if(n.exclusiveMinimum!==void 0)Ed(t,"exclusiveMinimum",n.exclusiveMinimum);if(n.maximum!==void 0)Rd(t,"maximum",n.maximum);if(n.exclusiveMaximum!==void 0)Rd(t,"exclusiveMaximum",n.exclusiveMaximum);if(n.multipleOf!==void 0)BH(t,n.multipleOf);if(n.format!==void 0){if(t.format??(t.format=n.format),n.format.includes("int"))t.isInt=!0}if(n.mime)VH(t,n.mime);for(let o of n.patterns??[])qH(t,o);return t}function vh(e){let t=e._zod.def;if(t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform"))return vh(t.out);if(t.type==="catch")return vh(t.innerType);return e._zod.optin}function $N(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let m=e.get(t)?.def;if(!m)return t;let g=$N(e,m,r);return g===m?t:g}for(let m of["anyOf","oneOf"]){let g=t[m];if(!Array.isArray(g))continue;let h=g.map((y)=>$N(e,y,r));if(h.some((y,v)=>y!==g[v]))t={...t,[m]:h}}let i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some((m)=>m==="number"||m==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some((m)=>typeof m==="number"))return t;let{minimum:s,maximum:a,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:p,id:d,...f}=t;if(f.enum)f.enum=f.enum.map((m)=>typeof m==="number"?String(m):m);else if(typeof f.const==="number")f.const=String(f.const);if(!n)return f;if(f.type="string",!o)f.pattern=(i.includes("number")?ns:Wg).source;return f}function kEe(e){let t=new Map;for(let i of e.seen.values())if(i.def&&!t.has(i.schema))t.set(i.schema,i);let r=new Map;for(let i of xN.get(e)??[]){let n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;let s=$N(t,o,new Set);if(s!==o)r.set(o,s)}if(!r.size)return;for(let i of e.seen.values())for(let n of[i.schema,i.def]){let o=n&&r.get(n.propertyNames);if(o)n.propertyNames=o}}function GH(e,t,r,i,n){let o=!1,s=JSON.stringify(e,(a,c)=>{if(typeof c!=="bigint")return c;return o=!0,null});if(!o)return JSON.parse(s);return Fr(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),tM}function pS(e,t){if("_idmap"in e){let i=e,n=sc({...t,processors:cS}),o={};for(let c of i._idmap.entries()){let[l,u]=c;Pt(u,n)}let s={},a={registry:i,uri:t?.uri,defs:o};n.external=a;for(let c of i._idmap.entries()){let[l,u]=c;ac(n,u),cn(s,l,cc(n,u))}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=sc({...t,processors:cS});return Pt(e,r),ac(r,e),cc(r,e)}var Ed=(e,t,r)=>{if(e[t]===void 0||r>e[t])e[t]=r},Rd=(e,t,r)=>{if(e[t]===void 0||r<e[t])e[t]=r},FH=(e,t)=>{Ed(e,"minimum",t),Rd(e,"maximum",t)},BH=(e,t)=>{if(e.multipleOf??(e.multipleOf=[]),!e.multipleOf.includes(t))e.multipleOf.push(t)},qH=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},VH=(e,t)=>{e.mime=e.mime?e.mime.filter((r)=>t.includes(r)):[...t]},WH=(e,t)=>{if(e.format=t,t.includes("int"))e.isInt=!0},zH=(e,t)=>Ed(e,"minimum",t.minimum),UH=(e,t)=>Rd(e,"maximum",t.maximum),LH=(e)=>(t,r)=>{WH(t,r.format);let[i,n]=e[r.format];Ed(t,"minimum",i),Rd(t,"maximum",n)},vEe,wEe,bEe,HH=(e)=>bEe.get(e)??e,PN=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l,laxFormat:u}=zr(e);if(typeof o==="number")n.minLength=o;if(typeof s==="number")n.maxLength=s;if(a){if(n.format=wEe[a]??a,n.format==="")delete n.format;if(a==="time"||u)delete n.format}if(l)n.contentEncoding=l;if(c&&c.size>0){let p=[...c].map(HH);if(p.length===1)n.pattern=p[0].source;else if(p.length>1)n.allOf=[...p.map((d)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))]}},CN=(e,t,r,i)=>{let n=r,{minimum:o,maximum:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zr(e);n.type=u?"integer":"number";let p=typeof l==="number"&&l>=(o??Number.NEGATIVE_INFINITY),d=typeof c==="number"&&c<=(s??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(p)if(f)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof o==="number")n.minimum=o;if(d)if(f)n.maximum=c,n.exclusiveMaximum=!0;else n.exclusiveMaximum=c;else if(typeof s==="number")n.maximum=s;if(a){let m=new Set;for(let y of a)if(Number.isFinite(y)&&y!==0)m.add(Math.abs(y));else Fr(e,t,n,i,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[g,...h]=m;if(g!==void 0)n.multipleOf=g;if(h.length)n.allOf=[...n.allOf??[],...h.map((y)=>({multipleOf:y}))]}},_N=(e,t,r,i)=>{r.type="boolean"},EN=(e,t,r,i)=>{Fr(e,t,r,i,"BigInt cannot be represented in JSON Schema")},RN=(e,t,r,i)=>{Fr(e,t,r,i,"Symbols cannot be represented in JSON Schema")},IN=(e,t,r,i)=>{if(t.target==="openapi-3.0")r.type="string",r.nullable=!0,r.enum=[null];else r.type="null"},AN=(e,t,r,i)=>{Fr(e,t,r,i,"Undefined cannot be represented in JSON Schema")},ON=(e,t,r,i)=>{Fr(e,t,r,i,"Void cannot be represented in JSON Schema")},DN=(e,t,r,i)=>{r.not={}},TN=(e,t,r,i)=>{},NN=(e,t,r,i)=>{},MN=(e,t,r,i)=>{Fr(e,t,r,i,"Date cannot be represented in JSON Schema")},jN=(e,t,r,i)=>{let n=e._zod.def,o=Kp(n.entries);if(o.length===0){r.not={};return}if(o.every((s)=>typeof s==="number"))r.type="number";if(o.every((s)=>typeof s==="string"))r.type="string";r.enum=o},FN=(e,t,r,i)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let o=[];for(let s of n.values)if(s===void 0){if(Fr(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s==="bigint"){if(Fr(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(s))}else o.push(s);if(o.length===0);else if(o.length===1){let s=o[0];if(r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")r.enum=[s];else r.const=s}else{if(o.every((s)=>typeof s==="number"))r.type="number";if(o.every((s)=>typeof s==="string"))r.type="string";if(o.every((s)=>typeof s==="boolean"))r.type="boolean";if(o.every((s)=>s===null))r.type="null";r.enum=o}},zN=(e,t,r,i)=>{Fr(e,t,r,i,"NaN cannot be represented in JSON Schema")},UN=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},LN=(e,t,r,i)=>{let n=r;n.type="string",n.format="binary",n.contentEncoding="binary";let{minimum:o,maximum:s,mime:a}=zr(e);if(o!==void 0)n.minLength=o;if(s!==void 0)n.maxLength=s;if(!a)return;if(a.length===0)n.not={};else if(a.length===1)n.contentMediaType=a[0];else n.anyOf=a.map((c)=>({contentMediaType:c}))},BN=(e,t,r,i)=>{r.type="boolean"},qN=(e,t,r,i)=>{Fr(e,t,r,i,"Custom types cannot be represented in JSON Schema")},VN=(e,t,r,i)=>{Fr(e,t,r,i,"Function types cannot be represented in JSON Schema")},WN=(e,t,r,i)=>{Fr(e,t,r,i,"Transforms cannot be represented in JSON Schema")},HN=(e,t,r,i)=>{Fr(e,t,r,i,"Map cannot be represented in JSON Schema")},GN=(e,t,r,i)=>{Fr(e,t,r,i,"Set cannot be represented in JSON Schema")},ZN=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:s,maximum:a}=zr(e);if(typeof s==="number")n.minItems=s;if(typeof a==="number")n.maxItems=a;n.type="array",n.items=Pt(o.element,t,{...i,path:[...i.path,"items"]})},KN=(e,t,r,i)=>{let n=r,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&Fr(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in s)cn(n.properties,l,Pt(s[l],t,{...i,path:[...i.path,"properties",l]}));let c=[];for(let l of Object.keys(s)){let u=o.shape[l];if(t.io==="input"?vh(u)===void 0:u._zod.optout===void 0)c.push(l)}if(c.length>0)n.required=c;if(o.catchall?._zod.def.type==="never")n.additionalProperties=!1;else if(!o.catchall){if(t.io==="output")n.additionalProperties=!1}else if(o.catchall)n.additionalProperties=Pt(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})},lS=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,s=n.options.map((a,c)=>Pt(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));if(o)r.oneOf=s;else r.anyOf=s},JN=(e,t,r,i)=>{let n=e._zod.def,o=Pt(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=Pt(n.right,t,{...i,path:[...i.path,"allOf",1]}),a=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},YN=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((g,h)=>Pt(g,t,{...i,path:[...i.path,s,h]})),l=o.rest?Pt(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,u=o.items.length;while(u>0){let g=o.items[u-1];if(!(t.io==="input"?vh(g)!==void 0:g._zod.optout==="optional"))break;u--}let p=o.items.length,d=!o.rest;if(t.target==="draft-2020-12"){if(n.prefixItems=c,d)n.items=!1;else if(l)n.items=l;if(u>0)n.minItems=u;if(d)n.maxItems=p}else if(t.target==="openapi-3.0"){if(n.items={anyOf:c},l)n.items.anyOf.push(l);if(u>0)n.minItems=u;if(d)n.maxItems=p}else{if(n.items=c,d)n.additionalItems=!1;else if(l)n.additionalItems=l;if(u>0)n.minItems=u;if(d)n.maxItems=p}let{minimum:f,maximum:m}=zr(e);if(typeof f==="number")n.minItems=f;if(typeof m==="number")n.maxItems=m},xN,XN=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let s=o.keyType,a=zr(s).patterns;if(o.mode==="loose"&&a&&a.size>0){let u=Pt(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let p of a)cn(n.patternProperties,HH(p).source,u)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Pt(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let u=xN.get(t);if(!u)u=[],xN.set(t,u),t.deferred.push(()=>kEe(t));u.push(e)}n.additionalProperties=Pt(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=s._zod.values,l=t.io==="input"&&vh(o.valueType)!==void 0;if(c&&!o.partial&&!l){let u=[...c].filter((p)=>typeof p==="string"||typeof p==="number");if(u.length>0)n.required=u.map(String)}},QN=(e,t,r,i)=>{let n=e._zod.def,o=Pt(n.innerType,t,i),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[o,{type:"null"}]},eM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},tM,rM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s=GH(n.defaultValue,e,t,r,i);if(s!==tM)r.default=s},nM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;let s=GH(n.defaultValue,e,t,r,i);if(s!==tM)r._prefault=s},iM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{Fr(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},oM=(e,t,r,i)=>{let n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?o?n.out:n.in:n.out;Pt(s,t,i);let a=t.seen.get(e);a.ref=s},sM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},aM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},uS=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},cM=(e,t,r,i)=>{let n=e._zod.innerType;Pt(n,t,i);let o=t.seen.get(e);o.ref=n},cS;var wh=I(()=>{Ll();ld();yh();se();vEe={greater_than:(e,t)=>Ed(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Rd(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>BH(e,t.value),number_format:LH(Tg),bigint_format:LH(Ng),min_length:zH,max_length:UH,length_equals:(e,t)=>FH(e,t.length),min_size:zH,max_size:UH,size_equals:(e,t)=>FH(e,t.size),string_format:(e,t)=>{if(WH(e,t.format),t.pattern)qH(e,t.pattern);if(t.format==="base64"||t.format==="base64url")e.contentEncoding=t.format;if(t.local||t.precision===-1)e.laxFormat=!0},mime_type:(e,t)=>VH(e,t.mime)};wEe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bEe=new Map([[hk,yA],[Xg,vA]]);xN=new WeakMap;tM=Symbol();cS={string:PN,number:CN,boolean:_N,bigint:EN,symbol:RN,null:IN,undefined:AN,void:ON,never:DN,any:TN,unknown:NN,date:MN,enum:jN,literal:FN,nan:zN,template_literal:UN,file:LN,success:BN,custom:qN,function:VN,transform:WN,map:HN,set:GN,array:ZN,object:KN,union:lS,intersection:JN,tuple:YN,record:XN,nullable:QN,nonoptional:eM,default:rM,prefault:nM,catch:iM,pipe:oM,readonly:sM,promise:aM,optional:uS,lazy:cM}});class lM{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";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=sc({processors:cS,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 Pt(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,ac(this.ctx,e);let r=cc(this.ctx,e),{"~standard":i,...n}=r;return n}}var ZH=I(()=>{wh();yh()});var KH={};var JH=()=>{};var cs={};vn(cs,{$ZodAny:()=>zO,$ZodArray:()=>VO,$ZodAsyncError:()=>_i,$ZodBase64:()=>_O,$ZodBase64URL:()=>EO,$ZodBigInt:()=>Sk,$ZodBigIntFormat:()=>NO,$ZodBoolean:()=>Qg,$ZodCIDRv4:()=>PO,$ZodCIDRv6:()=>CO,$ZodCUID:()=>fO,$ZodCUID2:()=>mO,$ZodCatch:()=>lD,$ZodCheck:()=>jt,$ZodCheckBigIntFormat:()=>zA,$ZodCheckEndsWith:()=>YA,$ZodCheckGreaterThan:()=>ok,$ZodCheckIncludes:()=>KA,$ZodCheckLengthEquals:()=>WA,$ZodCheckLessThan:()=>ik,$ZodCheckLowerCase:()=>GA,$ZodCheckMaxLength:()=>qA,$ZodCheckMaxSize:()=>UA,$ZodCheckMimeType:()=>eO,$ZodCheckMinLength:()=>VA,$ZodCheckMinSize:()=>LA,$ZodCheckMultipleOf:()=>jA,$ZodCheckNumberFormat:()=>FA,$ZodCheckOverwrite:()=>tO,$ZodCheckProperties:()=>QA,$ZodCheckProperty:()=>XA,$ZodCheckRegex:()=>HA,$ZodCheckSizeEquals:()=>BA,$ZodCheckStartsWith:()=>JA,$ZodCheckStringFormat:()=>sd,$ZodCheckUpperCase:()=>ZA,$ZodCodec:()=>th,$ZodCreditCard:()=>IO,$ZodCustom:()=>hD,$ZodCustomStringFormat:()=>DO,$ZodCyclicError:()=>wD,$ZodDate:()=>qO,$ZodDefault:()=>oD,$ZodDiscriminatedUnion:()=>ZO,$ZodE164:()=>RO,$ZodEmail:()=>aO,$ZodEmoji:()=>pO,$ZodEncodeError:()=>zl,$ZodEnum:()=>QO,$ZodError:()=>ZI,$ZodExactOptional:()=>nD,$ZodFile:()=>tD,$ZodFunction:()=>mD,$ZodGUID:()=>oO,$ZodIBAN:()=>AO,$ZodIPv4:()=>SO,$ZodIPv6:()=>$O,$ZodISODate:()=>wO,$ZodISODateTime:()=>vO,$ZodISODuration:()=>kO,$ZodISOTime:()=>bO,$ZodIntersection:()=>KO,$ZodJWT:()=>OO,$ZodKSUID:()=>yO,$ZodLazy:()=>rh,$ZodLiteral:()=>eD,$ZodMAC:()=>xO,$ZodMap:()=>YO,$ZodNaN:()=>uD,$ZodNanoID:()=>dO,$ZodNever:()=>LO,$ZodNonOptional:()=>aD,$ZodNull:()=>FO,$ZodNullable:()=>iD,$ZodNumber:()=>kk,$ZodNumberFormat:()=>TO,$ZodObject:()=>oW,$ZodObjectJIT:()=>WO,$ZodOptional:()=>xk,$ZodPipe:()=>Pk,$ZodPrefault:()=>sD,$ZodPreprocess:()=>pD,$ZodPromise:()=>gD,$ZodReadonly:()=>dD,$ZodRealError:()=>ai,$ZodRecord:()=>JO,$ZodRegistry:()=>OT,$ZodSet:()=>XO,$ZodString:()=>Bl,$ZodStringFormat:()=>xt,$ZodSuccess:()=>cD,$ZodSymbol:()=>MO,$ZodTemplateLiteral:()=>fD,$ZodTransform:()=>rD,$ZodTuple:()=>$k,$ZodType:()=>Ue,$ZodULID:()=>gO,$ZodURL:()=>uO,$ZodUUID:()=>sO,$ZodUndefined:()=>jO,$ZodUnion:()=>eh,$ZodUnknown:()=>UO,$ZodVoid:()=>BO,$ZodXID:()=>hO,$ZodXor:()=>HO,$brand:()=>WI,$constructor:()=>M,$input:()=>AT,$output:()=>IT,Doc:()=>ad,INVALID:()=>Un,JSONSchema:()=>KH,JSONSchemaGenerator:()=>lM,NEVER:()=>zg,TimePrecision:()=>qT,URL_BAD_FORMAT:()=>cO,URL_UNPARSEABLE:()=>Zg,ZodCompileAsyncError:()=>is,ZodCompileUnsupportedError:()=>rt,_any:()=>sN,_array:()=>fN,_base64:()=>Qk,_base64url:()=>eS,_bigint:()=>QT,_boolean:()=>YT,_catch:()=>pEe,_check:()=>AH,_cidrv4:()=>Yk,_cidrv6:()=>Xk,_coercedBigint:()=>eN,_coercedBoolean:()=>XT,_coercedDate:()=>pN,_coercedNumber:()=>WT,_coercedString:()=>zT,_creditCard:()=>LT,_cuid:()=>Vk,_cuid2:()=>Wk,_custom:()=>gN,_date:()=>uN,_decode:()=>Gb,_decodeAsync:()=>Kb,_default:()=>cEe,_discriminatedUnion:()=>J_e,_e164:()=>tS,_email:()=>Mk,_emoji:()=>Bk,_encode:()=>Hb,_encodeAsync:()=>Zb,_endsWith:()=>wd,_enum:()=>rEe,_file:()=>mN,_float32:()=>GT,_float64:()=>ZT,_gt:()=>ss,_gte:()=>Ri,_guid:()=>jk,_iban:()=>BT,_includes:()=>yd,_int:()=>HT,_int32:()=>KT,_int64:()=>tN,_intersection:()=>Y_e,_ipv4:()=>Kk,_ipv6:()=>Jk,_isoDate:()=>fh,_isoDateTime:()=>dh,_isoDuration:()=>gh,_isoTime:()=>mh,_jwt:()=>rS,_ksuid:()=>Zk,_lazy:()=>gEe,_length:()=>Kl,_literal:()=>iEe,_lowercase:()=>gd,_lt:()=>os,_lte:()=>Ei,_mac:()=>UT,_map:()=>eEe,_max:()=>Ei,_maxLength:()=>Zl,_maxSize:()=>oc,_mime:()=>kd,_min:()=>Ri,_minLength:()=>oa,_minSize:()=>as,_multipleOf:()=>ic,_nan:()=>dN,_nanoid:()=>qk,_nativeEnum:()=>nEe,_negative:()=>iS,_never:()=>cN,_nonnegative:()=>sS,_nonoptional:()=>lEe,_nonpositive:()=>oS,_normalize:()=>Sd,_null:()=>oN,_nullable:()=>aEe,_number:()=>VT,_optional:()=>sEe,_overwrite:()=>Ao,_parse:()=>ed,_parseAsync:()=>td,_pipe:()=>dEe,_positive:()=>nS,_promise:()=>hEe,_properties:()=>bd,_property:()=>aS,_readonly:()=>fEe,_record:()=>Q_e,_refine:()=>hN,_regex:()=>md,_safeDecode:()=>Yb,_safeDecodeAsync:()=>Qb,_safeEncode:()=>Jb,_safeEncodeAsync:()=>Xb,_safeParse:()=>rd,_safeParseAsync:()=>nd,_set:()=>tEe,_size:()=>Gl,_slugify:()=>Cd,_startsWith:()=>vd,_string:()=>FT,_stringFormat:()=>Jl,_stringbool:()=>bN,_success:()=>uEe,_superRefine:()=>yN,_symbol:()=>nN,_templateLiteral:()=>mEe,_toLowerCase:()=>xd,_toUpperCase:()=>Pd,_transform:()=>oEe,_trim:()=>$d,_tuple:()=>X_e,_uint32:()=>JT,_uint64:()=>rN,_ulid:()=>Hk,_undefined:()=>iN,_union:()=>Z_e,_unknown:()=>aN,_uppercase:()=>hd,_url:()=>ph,_uuid:()=>Fk,_uuidv4:()=>zk,_uuidv6:()=>Uk,_uuidv7:()=>Lk,_void:()=>lN,_xid:()=>Gk,_xor:()=>K_e,base64Charset:()=>hk,base64urlCharset:()=>Xg,canParseURL:()=>lO,clone:()=>$t,compile:()=>MT,compileFn:()=>Tk,config:()=>fr,createStandardJSONSchemaMethod:()=>_d,createToJSONSchemaMethod:()=>SN,decode:()=>IV,decodeAsync:()=>OV,describe:()=>vN,encode:()=>RV,encodeAsync:()=>AV,extractDefs:()=>ac,finalize:()=>cc,flattenError:()=>Ug,formatError:()=>Lg,getDiscriminatedOption:()=>GO,globalConfig:()=>Yr,globalRegistry:()=>ln,handleUnrepresentable:()=>Fr,initializeContext:()=>sc,isBackEdge:()=>Ik,isRecursiveSchema:()=>Rk,isValidBase64:()=>Yg,isValidBase64URL:()=>yk,isValidCIDRv6:()=>gk,isValidCreditCard:()=>vk,isValidIBAN:()=>wk,isValidIPv6:()=>Jg,isValidJWT:()=>bk,locales:()=>dd,memoizer:()=>oh,mergeValues:()=>cd,meta:()=>wN,parse:()=>Bg,parseAsync:()=>qg,parseURLObject:()=>rW,prettifyError:()=>JI,process:()=>Pt,processSchema:()=>Pt,regexes:()=>ro,registry:()=>Ok,safeDecode:()=>TV,safeDecodeAsync:()=>MV,safeEncode:()=>DV,safeEncodeAsync:()=>NV,safeParse:()=>Wb,safeParseAsync:()=>XI,standardProps:()=>pk,stripTabAndNewline:()=>Kg,toDotPath:()=>_V,toJSONSchema:()=>pS,toZod:()=>Ig,treeifyError:()=>KI,urlHostnameOk:()=>fk,urlProtocolOk:()=>mk,util:()=>q,validate:()=>id,validateAsync:()=>od,validateURL:()=>dk,version:()=>rO,withParser:()=>Dk});var Bn=I(()=>{se();se();Ll();Ak();wh();ZH();JH();nc();QI();YI();ld();bD();sk();nO();uh();IH();OH();yh()});var YH=I(()=>{Bn()});var XH=()=>{};var QH=()=>{};function bh(e,t){let r=typeof t==="function"?t:(s,a)=>{let c=t[s._zod.def.type];return c?c(s,a):s},i=new Map;function n(s){let a=i.get(s);if(a===eG)return new rh({type:"lazy",getter:()=>i.get(s)});if(a!==void 0)return a;i.set(s,eG);let c=o(s),l=r(c,c!==s);return i.set(s,l),l}function o(s){let a=s._zod.def,c=a.type;switch(c){case"object":{let l=a.shape,u=Object.keys(l),p=!1,d={};for(let m of u){let g=n(l[m]);if(g!==l[m])p=!0;d[m]=g}let f=a.catchall;if(a.catchall){if(f=n(a.catchall),f!==a.catchall)p=!0}return p?$t(s,{...a,shape:d,catchall:f}):s}case"array":{let l=n(a.element);return l===a.element?s:$t(s,{...a,element:l})}case"tuple":{let l=a.items,u=!1,p=[];for(let f of l){let m=n(f);if(m!==f)u=!0;p.push(m)}let d=a.rest;if(a.rest){if(d=n(a.rest),d!==a.rest)u=!0}return u?$t(s,{...a,items:p,rest:d}):s}case"record":case"map":{let l=n(a.keyType),u=n(a.valueType);return l===a.keyType&&u===a.valueType?s:$t(s,{...a,keyType:l,valueType:u})}case"set":{let l=n(a.valueType);return l===a.valueType?s:$t(s,{...a,valueType:l})}case"union":{let l=a.options,u=!1,p=[];for(let d of l){let f=n(d);if(f!==d)u=!0;p.push(f)}return u?$t(s,{...a,options:p}):s}case"intersection":{let l=n(a.left),u=n(a.right);return l===a.left&&u===a.right?s:$t(s,{...a,left:l,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let l=n(a.innerType);return l===a.innerType?s:$t(s,{...a,innerType:l})}case"pipe":{let l=n(a.in),u=n(a.out);return l===a.in&&u===a.out?s:$t(s,{...a,in:l,out:u})}case"function":{let l=n(a.input),u=n(a.output);return l===a.input&&u===a.output?s:$t(s,{...a,input:l,output:u})}case"lazy":{let l=a.getter,{_cachedInner:u,...p}=a;return $t(s,{...p,getter:()=>n(l())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return s;default:return s}}return n(e)}var eG;var uM=I(()=>{ld();se();eG=Symbol("z.visit/resolving")});var tG=()=>{};var rG=()=>{};var nG=I(()=>{Bn();Ak();tG();rG();YH();XH();QH()});var iG=I(()=>{nG()});function dS(e){return!!e._zod}function qn(e,t){if(dS(e))return Wb(e,t);return e.safeParse(t)}function Id(e){if(!e)return;let t;if(dS(e))t=e._zod?.def?.shape;else t=e.shape;if(!t)return;if(typeof t==="function")try{return t()}catch{return}return t}function Ad(e){if(dS(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let i=e.value;if(i!==void 0)return i;return}var kh=I(()=>{iG()});var fS={};vn(fS,{endsWith:()=>wd,gt:()=>ss,gte:()=>Ri,includes:()=>yd,length:()=>Kl,lowercase:()=>gd,lt:()=>os,lte:()=>Ei,maxLength:()=>Zl,maxSize:()=>oc,mime:()=>kd,minLength:()=>oa,minSize:()=>as,multipleOf:()=>ic,negative:()=>iS,nonnegative:()=>sS,nonpositive:()=>oS,normalize:()=>Sd,overwrite:()=>Ao,positive:()=>nS,properties:()=>bd,property:()=>aS,regex:()=>md,size:()=>Gl,slugify:()=>Cd,startsWith:()=>vd,toLowerCase:()=>xd,toUpperCase:()=>Pd,trim:()=>$d,uppercase:()=>hd});var mS=I(()=>{Bn()});function gS(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var oG,sG=(e,t)=>{ZI.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);if(oG.has(r))return;oG.add(r),gS(r,"format",(i)=>(n)=>Lg(i,n)),gS(r,"flatten",(i)=>(n)=>Ug(i,n)),gS(r,"addIssue",(i)=>(n)=>{i.issues.push(n),i.message=JSON.stringify(i.issues,Jp,2)}),gS(r,"addIssues",(i)=>(n)=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,Jp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},CEe,ci;var pM=I(()=>{Bn();Bn();se();oG=new WeakSet([Object.prototype,Error.prototype]);CEe=M("ZodError",sG),ci=M("ZodError",sG,void 0,{Parent:Error})});var dM,fM,mM,gM,hM,yM,vM,wM,bM,kM,SM,$M;var xM=I(()=>{Bn();pM();Bn();dM=ed(ci),fM=td(ci),mM=rd(ci),gM=nd(ci),hM=Hb(ci),yM=Gb(ci),vM=Zb(ci),wM=Kb(ci),bM=Jb(ci),kM=Yb(ci),SM=Xb(ci),$M=Qb(ci)});var zd={};vn(zd,{ZodAny:()=>AM,ZodArray:()=>NM,ZodBase64:()=>DS,ZodBase64URL:()=>TS,ZodBigInt:()=>jd,ZodBigIntFormat:()=>jS,ZodBoolean:()=>Md,ZodCIDRv4:()=>AS,ZodCIDRv6:()=>OS,ZodCUID:()=>xS,ZodCUID2:()=>PS,ZodCatch:()=>e1,ZodCodec:()=>Ah,ZodCreditCard:()=>CM,ZodCustom:()=>Oh,ZodCustomStringFormat:()=>Xl,ZodDate:()=>Ph,ZodDefault:()=>ZM,ZodDiscriminatedUnion:()=>jM,ZodE164:()=>NS,ZodEmail:()=>wS,ZodEmoji:()=>SS,ZodEnum:()=>Dd,ZodExactOptional:()=>LS,ZodFile:()=>VM,ZodFunction:()=>u1,ZodGUID:()=>bS,ZodIBAN:()=>_M,ZodIPv4:()=>RS,ZodIPv6:()=>IS,ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,ZodInstanceOf:()=>f1,ZodIntersection:()=>FM,ZodJWT:()=>MS,ZodKSUID:()=>ES,ZodLazy:()=>a1,ZodLiteral:()=>qM,ZodMAC:()=>PM,ZodMap:()=>LM,ZodNaN:()=>r1,ZodNanoID:()=>$S,ZodNever:()=>DM,ZodNonOptional:()=>BS,ZodNull:()=>IM,ZodNullable:()=>GM,ZodNumber:()=>Nd,ZodNumberFormat:()=>Ql,ZodObject:()=>Ch,ZodOptional:()=>Rh,ZodPipe:()=>Ih,ZodPrefault:()=>JM,ZodPreprocess:()=>n1,ZodPromise:()=>l1,ZodReadonly:()=>i1,ZodRecord:()=>Od,ZodSet:()=>BM,ZodString:()=>Td,ZodStringFormat:()=>It,ZodSuccess:()=>QM,ZodSymbol:()=>EM,ZodTemplateLiteral:()=>s1,ZodTransform:()=>WM,ZodTuple:()=>zM,ZodType:()=>He,ZodULID:()=>CS,ZodURL:()=>$h,ZodUUID:()=>ls,ZodUndefined:()=>RM,ZodUnion:()=>_h,ZodUnknown:()=>OM,ZodVoid:()=>TM,ZodXID:()=>_S,ZodXor:()=>MM,_ZodString:()=>vS,_default:()=>KM,_function:()=>u8,any:()=>FS,array:()=>oe,base64:()=>CG,base64url:()=>_G,bigint:()=>LG,boolean:()=>Ct,catch:()=>t1,check:()=>p8,cidrv4:()=>xG,cidrv6:()=>PG,codec:()=>s8,creditCard:()=>RG,cuid:()=>hG,cuid2:()=>yG,currencyCode:()=>NG,custom:()=>qS,date:()=>GG,describe:()=>d8,discriminatedUnion:()=>Eh,e164:()=>EG,email:()=>aG,emoji:()=>mG,enum:()=>un,exactOptional:()=>HM,file:()=>r8,float32:()=>jG,float64:()=>FG,function:()=>u8,guid:()=>cG,hash:()=>MG,hex:()=>TG,hostname:()=>DG,httpUrl:()=>fG,iban:()=>IG,instanceof:()=>m8,int:()=>hS,int32:()=>zG,int64:()=>BG,intersection:()=>Fd,invertCodec:()=>a8,ipv4:()=>kG,ipv6:()=>$G,json:()=>h8,jwt:()=>AG,keyof:()=>ZG,ksuid:()=>bG,lazy:()=>c1,literal:()=>ve,looseObject:()=>yr,looseRecord:()=>XG,mac:()=>SG,map:()=>QG,meta:()=>f8,nan:()=>o8,nanoid:()=>gG,nativeEnum:()=>t8,never:()=>zS,nonoptional:()=>XM,null:()=>xh,nullable:()=>Sh,nullish:()=>n8,number:()=>ot,object:()=>ce,optional:()=>Rt,partialRecord:()=>YG,pipe:()=>yS,prefault:()=>YM,preprocess:()=>Dh,promise:()=>l8,readonly:()=>o1,record:()=>At,refine:()=>p1,set:()=>e8,strictObject:()=>KG,string:()=>T,stringFormat:()=>OG,stringbool:()=>g8,success:()=>i8,superRefine:()=>d1,symbol:()=>VG,templateLiteral:()=>c8,transform:()=>US,tuple:()=>UM,uint32:()=>UG,uint64:()=>qG,ulid:()=>vG,undefined:()=>WG,union:()=>_t,unknown:()=>Ft,url:()=>kS,uuid:()=>lG,uuidv4:()=>uG,uuidv6:()=>pG,uuidv7:()=>dG,void:()=>HG,xid:()=>wG,xor:()=>JG});function EEe(){if(!Yr.localeError)fr(sh())}function Yl(){if(!Yr.memoizer)fr({memoizer:oh()})}function T(e){return FT(Td,e)}function aG(e){return Mk(wS,e)}function cG(e){return jk(bS,e)}function lG(e){return Fk(ls,e)}function uG(e){return zk(ls,e)}function pG(e){return Uk(ls,e)}function dG(e){return Lk(ls,e)}function kS(e){return ph($h,e)}function fG(e){return ph($h,{protocol:Vg,hostname:bA,...q.normalizeParams(e)})}function mG(e){return Bk(SS,e)}function gG(e){return qk($S,e)}function hG(e){return Vk(xS,e)}function yG(e){return Wk(PS,e)}function vG(e){return Hk(CS,e)}function wG(e){return Gk(_S,e)}function bG(e){return Zk(ES,e)}function kG(e){return Kk(RS,e)}function SG(e){return UT(PM,e)}function $G(e){return Jk(IS,e)}function xG(e){return Yk(AS,e)}function PG(e){return Xk(OS,e)}function CG(e){return Qk(DS,e)}function _G(e){return eS(TS,e)}function EG(e){return tS(NS,e)}function RG(e){return LT(CM,e)}function IG(e){return BT(_M,e)}function AG(e){return rS(MS,e)}function OG(e,t,r={}){return Jl(Xl,e,t,r)}function DG(e){return Jl(Xl,"hostname",wA,e)}function TG(e){return Jl(Xl,"hex",TA,e)}function NG(e){return Jl(Xl,"currency_code",SA,e)}function MG(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=ro[i];if(!n)throw Error(`Unrecognized hash format: ${i}`);return Jl(Xl,i,n,t)}function ot(e){return VT(Nd,e)}function hS(e){return HT(Ql,e)}function jG(e){return GT(Ql,e)}function FG(e){return ZT(Ql,e)}function zG(e){return KT(Ql,e)}function UG(e){return JT(Ql,e)}function Ct(e){return YT(Md,e)}function LG(e){return QT(jd,e)}function BG(e){return tN(jS,e)}function qG(e){return rN(jS,e)}function VG(e){return nN(EM,e)}function WG(e){return iN(RM,e)}function xh(e){return oN(IM,e)}function FS(){return sN(AM)}function Ft(){return aN(OM)}function zS(e){return cN(DM,e)}function HG(e){return lN(TM,e)}function GG(e){return uN(Ph,e)}function oe(e,t){return fN(NM,e,t)}function ZG(e){let t=e._zod.def.shape;return un(Object.keys(t))}function ce(e,t){let r={type:"object",shape:e??{},...q.normalizeParams(t)};return new Ch(r)}function KG(e,t){return new Ch({type:"object",shape:e,catchall:zS(),...q.normalizeParams(t)})}function yr(e,t){return new Ch({type:"object",shape:e,catchall:Ft(),...q.normalizeParams(t)})}function _t(e,t){return new _h({type:"union",options:e,...q.normalizeParams(t)})}function JG(e,t){return new MM({type:"union",options:e,inclusive:!1,...q.normalizeParams(t)})}function Eh(e,t,r){return new jM({type:"union",options:t,discriminator:e,...q.normalizeParams(r)})}function Fd(e,t){return new FM({type:"intersection",left:e,right:t})}function UM(e,t,r){let i=t instanceof Ue,n=i?r:t;return new zM({type:"tuple",items:e,rest:i?t:null,...q.normalizeParams(n)})}function At(e,t,r){if(!t||!t._zod)return new Od({type:"record",keyType:T(),valueType:e,...q.normalizeParams(t)});return new Od({type:"record",keyType:e,valueType:t,...q.normalizeParams(r)})}function YG(e,t,r){return new Od({type:"record",keyType:e,valueType:t,...q.normalizeParams(r),partial:!0})}function XG(e,t,r){return new Od({type:"record",keyType:e,valueType:t,mode:"loose",...q.normalizeParams(r)})}function QG(e,t,r){return new LM({type:"map",keyType:e,valueType:t,...q.normalizeParams(r)})}function e8(e,t){return new BM({type:"set",valueType:e,...q.normalizeParams(t)})}function un(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((i)=>[i,i])):e;return new Dd({type:"enum",entries:r,...q.normalizeParams(t)})}function t8(e,t){return new Dd({type:"enum",entries:e,...q.normalizeParams(t)})}function ve(e,t){return new qM({type:"literal",values:Array.isArray(e)?e:[e],...q.normalizeParams(t)})}function r8(e){return mN(VM,e)}function US(e){return new WM({type:"transform",transform:e})}function Rt(e){return new Rh({type:"optional",innerType:e})}function HM(e){return new LS({type:"optional",innerType:e})}function Sh(e){return new GM({type:"nullable",innerType:e})}function n8(e){return Rt(Sh(e))}function KM(e,t){return new ZM({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():q.shallowClone(t)}})}function YM(e,t){return new JM({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():q.shallowClone(t)}})}function XM(e,t){return new BS({type:"nonoptional",innerType:e,...q.normalizeParams(t)})}function i8(e){return new QM({type:"success",innerType:e})}function t1(e,t){return new e1({type:"catch",innerType:e,catchValue:typeof t==="function"?t:q.constantCatch(t)})}function o8(e){return dN(r1,e)}function yS(e,t){return new Ih({type:"pipe",in:e,out:t})}function s8(e,t,r){return new Ah({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function a8(e){let t=e._zod.def;return new Ah({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function o1(e){return new i1({type:"readonly",innerType:e})}function c8(e,t){return new s1({type:"template_literal",parts:e,...q.normalizeParams(t)})}function c1(e){return new a1({type:"lazy",getter:e})}function l8(e){return new l1({type:"promise",innerType:e})}function u8(e){return new u1({type:"function",input:Array.isArray(e?.input)?UM(e?.input):e?.input??oe(Ft()),output:e?.output??Ft()})}function p8(e){let t=new jt({check:"custom"});return t._zod.check=e,t}function qS(e,t){return gN(Oh,e??(()=>!0),t)}function p1(e,t={}){return hN(Oh,e,t)}function d1(e,t){return yN(e,t)}function m8(e,t={}){let r=new f1({type:"custom",check:"custom",fn:(i)=>i instanceof e,abort:!0,...q.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=(i)=>{if(!(i.value instanceof e))i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}function h8(e){let t=c1(()=>_t([T(e),ot(),Ct(),xh(),oe(t),At(T(),t)]));return t}function Dh(e,t){return new n1({type:"pipe",in:US(e),out:t})}var He,vS,Td,It,lc,uc,pc,dc,wS,bS,ls,$h,SS,$S,xS,PS,CS,_S,ES,RS,PM,IS,AS,OS,DS,TS,NS,CM,_M,MS,Xl,Nd,Ql,Md,jd,jS,EM,RM,IM,AM,OM,DM,TM,Ph,NM,Ch,_h,MM,jM,FM,zM,Od,LM,BM,Dd,qM,VM,WM,Rh,LS,GM,ZM,JM,BS,QM,e1,r1,Ih,Ah,n1,i1,s1,a1,l1,u1,Oh,d8,f8,f1,g8=(...e)=>bN({Codec:Ah,Boolean:Md,String:Td},...e);var fc=I(()=>{Bn();Bn();wh();Ll();yh();OD();mS();xM();He=M("ZodType",(e,t)=>(EEe(),Ue.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(q.mergeDefs(t,{checks:[...t.checks??[],...e.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return $t(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(p1(e,t))},superRefine(e,t){return this.check(d1(e,t))},overwrite(e){return this.check(Ao(e))},optional(){return Rt(this)},exactOptional(){return HM(this)},nullable(){return Sh(this)},nullish(){return Rt(Sh(this))},nonoptional(e){return XM(this,e)},array(){return oe(this)},or(e){return _t([this,e])},and(e){return Fd(this,e)},transform(e){return yS(this,US(e))},default(e){return KM(this,e)},prefault(e){return YM(this,e)},catch(e){return t1(this,e)},pipe(e){return yS(this,e)},readonly(){return o1(this)},describe(e){let t=this.clone();return ln.add(t,{description:e}),t},meta(...e){if(e.length===0)return ln.get(this);let t=this.clone();return ln.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get "~standard"(){return q.hide(this,"~standard",{...pk(this),jsonSchema:{input:_d(this,"input"),output:_d(this,"output")}})},set "~standard"(e){q.own(this,"~standard",e)},parse:function e(t,r){return dM(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await fM(this,t,r,{callee:e})},safeParse(e,t){return mM(this,e,t)},async safeParseAsync(e,t){return gM(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){q.own(this,"spa",e)},validate(e,t){return id(this,e,t)},validateAsync(e,t){return od(this,e,t)},encode:function e(t,r){return hM(this,t,r,{callee:e})},decode:function e(t,r){return yM(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await vM(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await wM(this,t,r,{callee:e})},safeEncode(e,t){return bM(this,e,t)},safeDecode(e,t){return kM(this,e,t)},async safeEncodeAsync(e,t){return SM(this,e,t)},async safeDecodeAsync(e,t){return $M(this,e,t)},toJSONSchema(e){return SN(this,{})(e)},get description(){return ln.get(this)?.description},get _def(){return this._zod.def}}),vS=M("_ZodString",(e,t)=>{Bl.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>PN(e,r,i,n)},q.derived({format:(e)=>zr(e).format??null,minLength:(e)=>zr(e).minimum??null,maxLength:(e)=>zr(e).maximum??null},{regex(...e){return this.check(md(...e))},includes(...e){return this.check(yd(...e))},startsWith(...e){return this.check(vd(...e))},endsWith(...e){return this.check(wd(...e))},min(...e){return this.check(oa(...e))},max(...e){return this.check(Zl(...e))},length(...e){return this.check(Kl(...e))},nonempty(...e){return this.check(oa(1,...e))},lowercase(e){return this.check(gd(e))},uppercase(e){return this.check(hd(e))},trim(){return this.check($d())},normalize(...e){return this.check(Sd(...e))},toLowerCase(){return this.check(xd())},toUpperCase(){return this.check(Pd())},slugify(){return this.check(Cd())}})),Td=M("ZodString",(e,t)=>{Bl.init(e,t),vS.init(e,t)},{email(e){return this.check(Mk(wS,e))},url(e){return this.check(ph($h,e))},jwt(e){return this.check(rS(MS,e))},emoji(e){return this.check(Bk(SS,e))},guid(e){return this.check(jk(bS,e))},uuid(e){return this.check(Fk(ls,e))},uuidv4(e){return this.check(zk(ls,e))},uuidv6(e){return this.check(Uk(ls,e))},uuidv7(e){return this.check(Lk(ls,e))},nanoid(e){return this.check(qk($S,e))},cuid(e){return this.check(Vk(xS,e))},cuid2(e){return this.check(Wk(PS,e))},ulid(e){return this.check(Hk(CS,e))},base64(e){return this.check(Qk(DS,e))},base64url(e){return this.check(eS(TS,e))},xid(e){return this.check(Gk(_S,e))},ksuid(e){return this.check(Zk(ES,e))},ipv4(e){return this.check(Kk(RS,e))},ipv6(e){return this.check(Jk(IS,e))},cidrv4(e){return this.check(Yk(AS,e))},cidrv6(e){return this.check(Xk(OS,e))},e164(e){return this.check(tS(NS,e))},datetime(e){return this.check(dh(lc,e))},date(e){return this.check(fh(uc,e))},time(e){return this.check(mh(pc,e))},duration(e){return this.check(gh(dc,e))}});It=M("ZodStringFormat",(e,t)=>{xt.init(e,t),vS.init(e,t)}),lc=M("ZodISODateTime",(e,t)=>{vO.init(e,t),It.init(e,t)}),uc=M("ZodISODate",(e,t)=>{wO.init(e,t),It.init(e,t)}),pc=M("ZodISOTime",(e,t)=>{bO.init(e,t),It.init(e,t)}),dc=M("ZodISODuration",(e,t)=>{kO.init(e,t),It.init(e,t)}),wS=M("ZodEmail",(e,t)=>{aO.init(e,t),It.init(e,t)});bS=M("ZodGUID",(e,t)=>{oO.init(e,t),It.init(e,t)});ls=M("ZodUUID",(e,t)=>{sO.init(e,t),It.init(e,t)});$h=M("ZodURL",(e,t)=>{uO.init(e,t),It.init(e,t)});SS=M("ZodEmoji",(e,t)=>{pO.init(e,t),It.init(e,t)});$S=M("ZodNanoID",(e,t)=>{dO.init(e,t),It.init(e,t)});xS=M("ZodCUID",(e,t)=>{fO.init(e,t),It.init(e,t)});PS=M("ZodCUID2",(e,t)=>{mO.init(e,t),It.init(e,t)});CS=M("ZodULID",(e,t)=>{gO.init(e,t),It.init(e,t)});_S=M("ZodXID",(e,t)=>{hO.init(e,t),It.init(e,t)});ES=M("ZodKSUID",(e,t)=>{yO.init(e,t),It.init(e,t)});RS=M("ZodIPv4",(e,t)=>{SO.init(e,t),It.init(e,t)});PM=M("ZodMAC",(e,t)=>{xO.init(e,t),It.init(e,t)});IS=M("ZodIPv6",(e,t)=>{$O.init(e,t),It.init(e,t)});AS=M("ZodCIDRv4",(e,t)=>{PO.init(e,t),It.init(e,t)});OS=M("ZodCIDRv6",(e,t)=>{CO.init(e,t),It.init(e,t)});DS=M("ZodBase64",(e,t)=>{_O.init(e,t),It.init(e,t)});TS=M("ZodBase64URL",(e,t)=>{EO.init(e,t),It.init(e,t)});NS=M("ZodE164",(e,t)=>{RO.init(e,t),It.init(e,t)});CM=M("ZodCreditCard",(e,t)=>{IO.init(e,t),It.init(e,t)});_M=M("ZodIBAN",(e,t)=>{AO.init(e,t),It.init(e,t)});MS=M("ZodJWT",(e,t)=>{OO.init(e,t),It.init(e,t)});Xl=M("ZodCustomStringFormat",(e,t)=>{DO.init(e,t),It.init(e,t)});Nd=M("ZodNumber",(e,t)=>{kk.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>CN(e,r,i,n),e.isFinite=!0},q.derived({minValue:(e)=>{let{minimum:t,exclusiveMinimum:r}=zr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:(e)=>{let{maximum:t,exclusiveMaximum:r}=zr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:(e)=>{let{isInt:t,multipleOf:r}=zr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:(e)=>zr(e).format??null},{gt(e,t){return this.check(ss(e,t))},gte(e,t){return this.check(Ri(e,t))},min(e,t){return this.check(Ri(e,t))},lt(e,t){return this.check(os(e,t))},lte(e,t){return this.check(Ei(e,t))},max(e,t){return this.check(Ei(e,t))},int(e){return this.check(hS(e))},safe(e){return this.check(hS(e))},positive(e){return this.check(ss(0,e))},nonnegative(e){return this.check(Ri(0,e))},negative(e){return this.check(os(0,e))},nonpositive(e){return this.check(Ei(0,e))},multipleOf(e,t){return this.check(ic(e,t))},step(e,t){return this.check(ic(e,t))},finite(){return this}}));Ql=M("ZodNumberFormat",(e,t)=>{TO.init(e,t),Nd.init(e,t)});Md=M("ZodBoolean",(e,t)=>{Qg.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_N(e,r,i,n)});jd=M("ZodBigInt",(e,t)=>{Sk.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>EN(e,r,i,n)},q.derived({minValue:(e)=>zr(e).minimum??null,maxValue:(e)=>zr(e).maximum??null,format:(e)=>zr(e).format??null},{gte(e,t){return this.check(Ri(e,t))},min(e,t){return this.check(Ri(e,t))},gt(e,t){return this.check(ss(e,t))},lt(e,t){return this.check(os(e,t))},lte(e,t){return this.check(Ei(e,t))},max(e,t){return this.check(Ei(e,t))},positive(e){return this.check(ss(BigInt(0),e))},negative(e){return this.check(os(BigInt(0),e))},nonpositive(e){return this.check(Ei(BigInt(0),e))},nonnegative(e){return this.check(Ri(BigInt(0),e))},multipleOf(e,t){return this.check(ic(e,t))}}));jS=M("ZodBigIntFormat",(e,t)=>{NO.init(e,t),jd.init(e,t)});EM=M("ZodSymbol",(e,t)=>{MO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>RN(e,r,i,n)});RM=M("ZodUndefined",(e,t)=>{jO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>AN(e,r,i,n)});IM=M("ZodNull",(e,t)=>{FO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>IN(e,r,i,n)});AM=M("ZodAny",(e,t)=>{zO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>TN(e,r,i,n)});OM=M("ZodUnknown",(e,t)=>{UO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>NN(e,r,i,n)});DM=M("ZodNever",(e,t)=>{LO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>DN(e,r,i,n)});TM=M("ZodVoid",(e,t)=>{BO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ON(e,r,i,n)});Ph=M("ZodDate",(e,t)=>{qO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>MN(e,r,i,n),e.min=(r,i)=>e.check(Ri(r,i)),e.max=(r,i)=>e.check(Ei(r,i))},q.derived({minDate:(e)=>{let{minimum:t}=zr(e);return t?new Date(t):null},maxDate:(e)=>{let{maximum:t}=zr(e);return t?new Date(t):null}},{}));NM=M("ZodArray",(e,t)=>{Yl(),VO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ZN(e,r,i,n),e.element=t.element},{min(e,t){return this.check(oa(e,t))},nonempty(e){return this.check(oa(1,e))},max(e,t){return this.check(Zl(e,t))},length(e,t){return this.check(Kl(e,t))},unwrap(){return this.element}});Ch=M("ZodObject",(e,t)=>{Yl(),WO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>KN(e,r,i,n),q.installLazyProp(e,"shape",(r)=>r._zod.def.shape,!1)},{keyof(){return un(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(q.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(q.mergeDefs(this._zod.def,{catchall:Ft()}))},loose(){return this.clone(q.mergeDefs(this._zod.def,{catchall:Ft()}))},strict(){return this.clone(q.mergeDefs(this._zod.def,{catchall:zS()}))},strip(){return this.clone(q.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return q.extend(this,e)},safeExtend(e){return q.safeExtend(this,e)},merge(e){return q.merge(this,e)},pick(e){return q.pick(this,e)},omit(e){return q.omit(this,e)},partial(...e){return q.partial(Rh,this,e[0])},exactPartial(...e){return q.partial(LS,this,e[0],"exactPartial")},required(...e){return q.required(BS,this,e[0])}});_h=M("ZodUnion",(e,t)=>{eh.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lS(e,r,i,n),e.options=t.options});MM=M("ZodXor",(e,t)=>{_h.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lS(e,r,i,n),e.options=t.options});jM=M("ZodDiscriminatedUnion",(e,t)=>{_h.init(e,t),ZO.init(e,t)});FM=M("ZodIntersection",(e,t)=>{KO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>JN(e,r,i,n)});zM=M("ZodTuple",(e,t)=>{Yl(),$k.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>YN(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map((t)=>new Rh({type:"optional",innerType:t}))})}});Od=M("ZodRecord",(e,t)=>{Yl(),JO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>XN(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});LM=M("ZodMap",(e,t)=>{Yl(),YO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>HN(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(as(...r)),e.nonempty=(r)=>e.check(as(1,r)),e.max=(...r)=>e.check(oc(...r)),e.size=(...r)=>e.check(Gl(...r))});BM=M("ZodSet",(e,t)=>{Yl(),XO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>GN(e,r,i,n),e.min=(...r)=>e.check(as(...r)),e.nonempty=(r)=>e.check(as(1,r)),e.max=(...r)=>e.check(oc(...r)),e.size=(...r)=>e.check(Gl(...r))});Dd=M("ZodEnum",(e,t)=>{QO.init(e,t),He.init(e,t),e._zod.processJSONSchema=(i,n,o)=>jN(e,i,n,o),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Dd({...t,checks:[],...q.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let s of i)if(r.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new Dd({...t,checks:[],...q.normalizeParams(n),entries:o})}});qM=M("ZodLiteral",(e,t)=>{eD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>FN(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});VM=M("ZodFile",(e,t)=>{tD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>LN(e,r,i,n),e.min=(r,i)=>e.check(as(r,i)),e.max=(r,i)=>e.check(oc(r,i)),e.mime=(r,i)=>e.check(kd(Array.isArray(r)?r:[r],i))});WM=M("ZodTransform",(e,t)=>{Yl(),rD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>WN(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl(e.constructor.name);r.addIssue=(o)=>{if(typeof o==="string")r.issues.push(q.issue(o,r.value,t));else{let s=o;if(s.fatal)s.continue=!1;if(s.code??(s.code="custom"),!("input"in s))s.input=r.value;s.inst??(s.inst=e),r.issues.push(q.issue(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((o)=>(r.value=o,r));return r.value=n,r}});Rh=M("ZodOptional",(e,t)=>{xk.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uS(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});LS=M("ZodExactOptional",(e,t)=>{nD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uS(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});GM=M("ZodNullable",(e,t)=>{iD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>QN(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});ZM=M("ZodDefault",(e,t)=>{oD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});JM=M("ZodPrefault",(e,t)=>{sD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});BS=M("ZodNonOptional",(e,t)=>{aD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>eM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});QM=M("ZodSuccess",(e,t)=>{cD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>BN(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});e1=M("ZodCatch",(e,t)=>{lD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>iM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});r1=M("ZodNaN",(e,t)=>{uD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zN(e,r,i,n)});Ih=M("ZodPipe",(e,t)=>{Pk.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>oM(e,r,i,n),e.in=t.in,e.out=t.out});Ah=M("ZodCodec",(e,t)=>{Ih.init(e,t),th.init(e,t)});n1=M("ZodPreprocess",(e,t)=>{Ih.init(e,t),pD.init(e,t)}),i1=M("ZodReadonly",(e,t)=>{dD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});s1=M("ZodTemplateLiteral",(e,t)=>{fD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>UN(e,r,i,n)});a1=M("ZodLazy",(e,t)=>{rh.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cM(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});l1=M("ZodPromise",(e,t)=>{gD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>aM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});u1=M("ZodFunction",(e,t)=>{mD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>VN(e,r,i,n)});Oh=M("ZodCustom",(e,t)=>{hD.init(e,t),He.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qN(e,r,i,n)});d8=vN,f8=wN,f1=M("ZodInstanceOf",(e,t)=>{Oh.init(e,t)},{properties(e,t){return this.check(bd(e,t))}})});function REe(e){fr({customError:e})}function IEe(){return fr().customError}var g1,m1;var y8=I(()=>{Bn();g1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function(e){})(m1||(m1={}))});var eu={};vn(eu,{ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,date:()=>OEe,datetime:()=>AEe,duration:()=>TEe,time:()=>DEe});function AEe(e){return dh(lc,e)}function OEe(e){return fh(uc,e)}function DEe(e){return mh(pc,e)}function TEe(e){return gh(dc,e)}var VS=I(()=>{Bn();fc();fc()});function MEe(e,t){let r=e.$schema;if(r==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(r==="http://json-schema.org/draft-07/schema#")return"draft-7";if(r==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function v8(e,t){return e.map((r,i)=>i<t?r:r.optional())}function jEe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function FEe(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1]===void 0?void 0:jEe(r[1]);if(!n||!t.defs[n])throw Error(`Reference not found: ${e}`);return t.defs[n]}throw Error(`Reference not found: ${e}`)}function zEe(e,t){return ue.transform((i)=>i).check((i)=>{let n=i.value;if(typeof n!=="object"||n===null||Array.isArray(n))return;let o=Object.getOwnPropertyNames(n);if(t.minProperties!==void 0&&o.length<t.minProperties)i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:n,inst:e,continue:!0});if(t.maxProperties!==void 0&&o.length>t.maxProperties)i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:n,inst:e,continue:!0});if(t.keySchema)for(let s of o){let a=t.keySchema.safeParse(s);if(a.success)continue;i.issues.push({code:"invalid_key",origin:"record",issues:a.error.issues,input:s,path:[s],continue:!0})}}).pipe(e)}function h1(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let i=String(e);return`${r[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let s of e){let a=h1(s,t);if(a===null)return null;o.push(a)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),n=[];for(let o of i){let s=h1(e[o],t);if(s===null)return null;n.push(`${o.length}:${o}=${s}`)}return`o${n.length}:{${n.join(",")}}`}finally{t.delete(e)}}function Th(e){if(typeof e!=="object"||e===null)return!1;if(Array.isArray(e))return e.some(Th);if(typeof e.$ref==="string")return!0;return Object.entries(e).some(([t,r])=>{if(UEe.has(t))return Th(r);if(!LEe.has(t)||typeof r!=="object"||r===null)return!1;return Object.values(r).some(Th)})}function w8(e){return e===1?"element":"elements"}function BEe(e,t){return ue.transform((i)=>i).check((i)=>{let n=i.value;if(!Array.isArray(n))return;if(t.uniqueItems===!0){let o=new Map;for(let s=0;s<n.length;s++){let a=h1(n[s],new Set);if(a===null)continue;let c=o.get(a);if(c===void 0){o.set(a,s);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${s} duplicates the one at index ${c}`,input:n,path:[s],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,s=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,a=0;for(let c of n)if(t.containsSchema.safeParse(c).success&&++a>=s)break;if(a<o)i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${w8(o)}; found ${a}`,input:n,continue:!0});if(t.maxContains!==void 0&&a>t.maxContains)i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${w8(t.maxContains)}`,input:n,continue:!0})}}).pipe(e)}function b8(e,t){if(e===!1)return;if(e===void 0||e===!0)return ue.any();return Vn(e,t)}function k8(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return ue.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ue.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=FEe(n,t),s=Vn(o,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ue.null();if(n.length===0)return ue.never();if(n.length===1)return ue.literal(n[0]);if(n.every((s)=>typeof s==="string"))return ue.enum(n);let o=n.map((s)=>ue.literal(s));if(o.length<2)return o[0];return ue.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ue.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map((o)=>{let s={...e,type:o};return k8(s,t)});if(n.length===0)return ue.never();if(n.length===1)return n[0];return ue.union(n)}if(!r)return ue.any();let i;switch(r){case"string":{let n=ue.string();if(e.format){let o=e.format;if(o==="email")n=n.check(ue.email());else if(o==="uri"||o==="uri-reference")n=n.check(ue.url());else if(o==="uuid"||o==="guid")n=n.check(ue.uuid());else if(o==="date-time")n=n.check(ue.iso.datetime({offset:!0}));else if(o==="date")n=n.check(ue.iso.date());else if(o==="time")n=n.check(ue.regex(qEe));else if(o==="duration")n=n.check(ue.iso.duration());else if(o==="hostname")n=n.check(ue.hostname());else if(o==="ipv4")n=n.check(ue.ipv4());else if(o==="ipv6")n=n.check(ue.ipv6());else if(o==="mac")n=n.check(ue.mac());else if(o==="cidr")n=n.check(ue.cidrv4());else if(o==="cidr-v6")n=n.check(ue.cidrv6());else if(o==="base64")n=n.check(ue.base64());else if(o==="base64url")n=n.check(ue.base64url());else if(o==="e164")n=n.check(ue.e164());else if(o==="credit_card")n=n.check(ue.creditCard());else if(o==="iban")n=n.check(ue.iban());else if(o==="jwt")n=n.check(ue.jwt());else if(o==="emoji")n=n.check(ue.emoji());else if(o==="nanoid")n=n.check(ue.nanoid());else if(o==="cuid")n=n.check(ue.cuid());else if(o==="cuid2")n=n.check(ue.cuid2());else if(o==="ulid")n=n.check(ue.ulid());else if(o==="xid")n=n.check(ue.xid());else if(o==="ksuid")n=n.check(ue.ksuid())}if(typeof e.minLength==="number")n=n.min(e.minLength);if(typeof e.maxLength==="number")n=n.max(e.maxLength);if(e.pattern)n=n.regex(new RegExp(e.pattern));i=n;break}case"number":case"integer":{let n=r==="integer"?ue.number().int():ue.number();if(typeof e.minimum==="number"&&e.exclusiveMinimum!==!0)n=n.min(e.minimum);if(typeof e.maximum==="number"&&e.exclusiveMaximum!==!0)n=n.max(e.maximum);if(typeof e.exclusiveMinimum==="number")n=n.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")n=n.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")n=n.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")n=n.lt(e.maximum);if(typeof e.multipleOf==="number")n=n.multipleOf(e.multipleOf);i=n;break}case"boolean":{i=ue.boolean();break}case"null":{i=ue.null();break}case"object":{let n={},o=e.properties||{},s=new Set(e.required||[]),a=typeof e.additionalProperties==="object"?Vn(e.additionalProperties,t):void 0;for(let[p,d]of Object.entries(o)){let f=Vn(d,t);cn(n,p,s.has(p)?f:f.optional())}if(e.patternProperties){let p=e.patternProperties,d=Object.keys(p),f=[];for(let g of d){let h=Vn(p[g],t),y=ue.string().regex(new RegExp(g));f.push(ue.looseRecord(y,h))}let m=[];if(Object.keys(n).length>0)m.push(ue.object(n).passthrough());if(m.push(...f),m.length===0)i=ue.object({}).passthrough();else if(m.length===1)i=m[0];else{let g=ue.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=ue.intersection(g,m[h]);i=g}if(e.additionalProperties===!1){let g=Object.keys(n),h=d.map((v)=>new RegExp(v)),y=i;i=i.check((v)=>{if(!eo(v.value))return;let w=[];for(let x of Object.keys(v.value)){if(g.includes(x))continue;if(h.some((b)=>b.test(x)))continue;w.push(x)}if(w.length)v.issues.push({code:"unrecognized_keys",keys:w,input:v.value,inst:y})})}}else{let p=ue.object(n);if(e.additionalProperties===!1)i=p.strict();else if(a)i=p.catchall(a);else i=p.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,l=typeof e.minProperties==="number"?e.minProperties:void 0,u=typeof e.maxProperties==="number"?e.maxProperties:void 0;if(c||l!==void 0||u!==void 0){let p;if(c){let d=typeof e.propertyNames==="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;p=Vn(d,t)}i=zEe(i,{keySchema:p,minProperties:l,maxProperties:u})}break}case"array":{let{prefixItems:n,items:o}=e;if(n&&Array.isArray(n)){let s=typeof e.minItems==="number"?e.minItems:0,a=n.map((p)=>Vn(p,t)),c=v8(a,s),l=!Array.isArray(o)?b8(o,t):void 0,u=ue.tuple(c);if(i=l?u.rest(l):u,typeof e.minItems==="number")i=i.check(ue.minLength(e.minItems));if(typeof e.maxItems==="number")i=i.check(ue.maxLength(e.maxItems))}else if(Array.isArray(o)){let s=typeof e.minItems==="number"?e.minItems:0,a=o.map((p)=>Vn(p,t)),c=v8(a,s),l=b8(e.additionalItems,t),u=ue.tuple(c);if(i=l?u.rest(l):u,typeof e.minItems==="number")i=i.check(ue.minLength(e.minItems));if(typeof e.maxItems==="number")i=i.check(ue.maxLength(e.maxItems))}else if(o!==void 0){let s=Vn(o,t),a=ue.array(s);if(typeof e.minItems==="number")a=a.min(e.minItems);if(typeof e.maxItems==="number")a=a.max(e.maxItems);i=a}else i=ue.array(ue.any());if(e.uniqueItems===!0||e.contains!==void 0)i=BEe(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Vn(e.contains,t):void 0,minContains:typeof e.minContains==="number"?e.minContains:void 0,maxContains:typeof e.maxContains==="number"?e.maxContains:void 0});break}default:throw Error(`Unsupported type: ${r}`)}return i}function Vn(e,t){if(typeof e==="boolean")return e?ue.any():ue.never();let r=k8(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map((l)=>Vn(l,t)),c=ue.union(a);r=i?ue.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map((l)=>Vn(l,t)),c=ue.xor(a);r=i?ue.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:ue.any();else{let a=i?r:Vn(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)a=ue.intersection(a,Vn(e.allOf[l],t));r=a}if(e.nullable===!0&&t.version==="openapi-3.0")r=ue.nullable(r);if(e.readOnly===!0)r=ue.readonly(r);if(e.default!==void 0)r=r.default(e.default);let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)if(a in e)n[a]=e[a];let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)if(a in e)n[a]=e[a];if(e.type==="object"&&e.$ref===void 0){if(e.propertyNames!==void 0&&!Th(e.propertyNames))n.propertyNames=e.propertyNames;for(let a of["minProperties","maxProperties"])if(e[a]!==void 0)n[a]=e[a]}if(e.type==="array"&&e.$ref===void 0){if(e.contains!==void 0&&!Th(e.contains))n.contains=e.contains;for(let a of["uniqueItems","minContains","maxContains"])if(e[a]!==void 0)n[a]=e[a]}for(let a of Object.keys(e))if(!NEe.has(a))cn(n,a,e[a]);if(Object.keys(n).length>0)t.registry.add(r,n);if(e.description)r=r.describe(e.description);return r}function S8(e,t){if(typeof e==="boolean")return e?ue.any():ue.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=MEe(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ln};return Vn(r,o)}var ue,NEe,UEe,LEe,qEe;var $8=I(()=>{uh();se();mS();VS();fc();ue={...zd,...fS,iso:eu},NEe=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"]);UEe=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),LEe=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);qEe=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/});function x8(e){return bh(e,{object:(t)=>t.partial(),union:(t)=>{let r=t._zod.def;return r.discriminator===void 0?t:_t(r.options)}})}var P8=I(()=>{uM();fc()});function VEe(e,t){if(!t?.length)return e;let r=e._zod.def;return $t(e,Io(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function C8(e){return VEe(e.out,e.checks)}function WEe(e){return e.in._zod.traits.has("$ZodTransform")?C8(e):e.in}function _8(e){return bh(e,{pipe:(t)=>WEe(t._zod.def),default:(t,r)=>r?Rt(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function E8(e){return bh(e,{pipe:(t)=>C8(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var R8=I(()=>{se();uM();fc()});var Nh={};vn(Nh,{bigint:()=>KEe,boolean:()=>ZEe,date:()=>JEe,number:()=>GEe,string:()=>HEe});function HEe(e){return zT(Td,e)}function GEe(e){return WT(Nd,e)}function ZEe(e){return XT(Md,e)}function KEe(e){return eN(jd,e)}function JEe(e){return pN(Ph,e)}var I8=I(()=>{Bn();fc()});var S={};vn(S,{$brand:()=>WI,$input:()=>AT,$output:()=>IT,INVALID:()=>Un,NEVER:()=>zg,TimePrecision:()=>qT,ZodAny:()=>AM,ZodArray:()=>NM,ZodBase64:()=>DS,ZodBase64URL:()=>TS,ZodBigInt:()=>jd,ZodBigIntFormat:()=>jS,ZodBoolean:()=>Md,ZodCIDRv4:()=>AS,ZodCIDRv6:()=>OS,ZodCUID:()=>xS,ZodCUID2:()=>PS,ZodCatch:()=>e1,ZodCodec:()=>Ah,ZodCompileAsyncError:()=>is,ZodCompileUnsupportedError:()=>rt,ZodCreditCard:()=>CM,ZodCustom:()=>Oh,ZodCustomStringFormat:()=>Xl,ZodDate:()=>Ph,ZodDefault:()=>ZM,ZodDiscriminatedUnion:()=>jM,ZodE164:()=>NS,ZodEmail:()=>wS,ZodEmoji:()=>SS,ZodEnum:()=>Dd,ZodError:()=>CEe,ZodExactOptional:()=>LS,ZodFile:()=>VM,ZodFirstPartyTypeKind:()=>m1,ZodFunction:()=>u1,ZodGUID:()=>bS,ZodIBAN:()=>_M,ZodIPv4:()=>RS,ZodIPv6:()=>IS,ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,ZodInstanceOf:()=>f1,ZodIntersection:()=>FM,ZodIssueCode:()=>g1,ZodJWT:()=>MS,ZodKSUID:()=>ES,ZodLazy:()=>a1,ZodLiteral:()=>qM,ZodMAC:()=>PM,ZodMap:()=>LM,ZodNaN:()=>r1,ZodNanoID:()=>$S,ZodNever:()=>DM,ZodNonOptional:()=>BS,ZodNull:()=>IM,ZodNullable:()=>GM,ZodNumber:()=>Nd,ZodNumberFormat:()=>Ql,ZodObject:()=>Ch,ZodOptional:()=>Rh,ZodPipe:()=>Ih,ZodPrefault:()=>JM,ZodPreprocess:()=>n1,ZodPromise:()=>l1,ZodReadonly:()=>i1,ZodRealError:()=>ci,ZodRecord:()=>Od,ZodSet:()=>BM,ZodString:()=>Td,ZodStringFormat:()=>It,ZodSuccess:()=>QM,ZodSymbol:()=>EM,ZodTemplateLiteral:()=>s1,ZodTransform:()=>WM,ZodTuple:()=>zM,ZodType:()=>He,ZodULID:()=>CS,ZodURL:()=>$h,ZodUUID:()=>ls,ZodUndefined:()=>RM,ZodUnion:()=>_h,ZodUnknown:()=>OM,ZodVoid:()=>TM,ZodXID:()=>_S,ZodXor:()=>MM,_ZodString:()=>vS,_default:()=>KM,_function:()=>u8,any:()=>FS,array:()=>oe,base64:()=>CG,base64url:()=>_G,bigint:()=>LG,boolean:()=>Ct,catch:()=>t1,check:()=>p8,cidrv4:()=>xG,cidrv6:()=>PG,clone:()=>$t,codec:()=>s8,coerce:()=>Nh,compile:()=>MT,config:()=>fr,core:()=>cs,creditCard:()=>RG,cuid:()=>hG,cuid2:()=>yG,currencyCode:()=>NG,custom:()=>qS,date:()=>GG,decode:()=>yM,decodeAsync:()=>wM,deepPartial:()=>x8,describe:()=>d8,discriminatedUnion:()=>Eh,e164:()=>EG,email:()=>aG,emoji:()=>mG,encode:()=>hM,encodeAsync:()=>vM,endsWith:()=>wd,enum:()=>un,exactOptional:()=>HM,file:()=>r8,flattenError:()=>Ug,float32:()=>jG,float64:()=>FG,formatError:()=>Lg,fromJSONSchema:()=>S8,function:()=>u8,getDiscriminatedOption:()=>GO,getErrorMap:()=>IEe,globalRegistry:()=>ln,gt:()=>ss,gte:()=>Ri,guid:()=>cG,hash:()=>MG,hex:()=>TG,hostname:()=>DG,httpUrl:()=>fG,iban:()=>IG,includes:()=>yd,input:()=>_8,instanceof:()=>m8,int:()=>hS,int32:()=>zG,int64:()=>BG,intersection:()=>Fd,invertCodec:()=>a8,ipv4:()=>kG,ipv6:()=>$G,iso:()=>eu,json:()=>h8,jwt:()=>AG,keyof:()=>ZG,ksuid:()=>bG,lazy:()=>c1,length:()=>Kl,literal:()=>ve,locales:()=>dd,looseObject:()=>yr,looseRecord:()=>XG,lowercase:()=>gd,lt:()=>os,lte:()=>Ei,mac:()=>SG,map:()=>QG,maxLength:()=>Zl,maxSize:()=>oc,memoizer:()=>oh,meta:()=>f8,mime:()=>kd,minLength:()=>oa,minSize:()=>as,multipleOf:()=>ic,nan:()=>o8,nanoid:()=>gG,nativeEnum:()=>t8,negative:()=>iS,never:()=>zS,nonnegative:()=>sS,nonoptional:()=>XM,nonpositive:()=>oS,normalize:()=>Sd,null:()=>xh,nullable:()=>Sh,nullish:()=>n8,number:()=>ot,object:()=>ce,optional:()=>Rt,output:()=>E8,overwrite:()=>Ao,parse:()=>dM,parseAsync:()=>fM,partialRecord:()=>YG,pipe:()=>yS,positive:()=>nS,prefault:()=>YM,preprocess:()=>Dh,prettifyError:()=>JI,promise:()=>l8,properties:()=>bd,property:()=>aS,readonly:()=>o1,record:()=>At,refine:()=>p1,regex:()=>md,regexes:()=>ro,registry:()=>Ok,safeDecode:()=>kM,safeDecodeAsync:()=>$M,safeEncode:()=>bM,safeEncodeAsync:()=>SM,safeParse:()=>mM,safeParseAsync:()=>gM,set:()=>e8,setErrorMap:()=>REe,size:()=>Gl,slugify:()=>Cd,startsWith:()=>vd,strictObject:()=>KG,string:()=>T,stringFormat:()=>OG,stringbool:()=>g8,success:()=>i8,superRefine:()=>d1,symbol:()=>VG,templateLiteral:()=>c8,toJSONSchema:()=>pS,toLowerCase:()=>xd,toUpperCase:()=>Pd,toZod:()=>Ig,transform:()=>US,treeifyError:()=>KI,trim:()=>$d,tuple:()=>UM,uint32:()=>UG,uint64:()=>qG,ulid:()=>vG,undefined:()=>WG,union:()=>_t,unknown:()=>Ft,uppercase:()=>hd,url:()=>kS,util:()=>q,uuid:()=>lG,uuidv4:()=>uG,uuidv6:()=>pG,uuidv7:()=>dG,validate:()=>id,validateAsync:()=>od,void:()=>HG,withParser:()=>Dk,xid:()=>wG,xor:()=>JG});var WS=I(()=>{Bn();Bn();wh();$8();P8();R8();Ak();VS();VS();I8();fc();mS();pM();xM();y8()});var A8=I(()=>{WS()});var y1=I(()=>{A8()});var mc="2025-11-25",GS,gc="io.modelcontextprotocol/related-task",ZS="2.0",Ur,D8,T8,Vgt,YEe,XEe,v1,Ii,Mh,N8=(e)=>Mh.safeParse(e).success,pn,no,io,dn,KS,M8,jh=(e)=>M8.safeParse(e).success,j8,F8=(e)=>j8.safeParse(e).success,w1,tu=(e)=>w1.safeParse(e).success,$e,b1,z8=(e)=>b1.safeParse(e).success,hc,Wgt,sa,QEe,JS,eRe,Fh,Ud,U8,tRe,rRe,nRe,iRe,oRe,sRe,k1,aRe,S1,YS,L8=(e)=>YS.safeParse(e).success,XS,cRe,lRe,QS,uRe,zh,Uh,pRe,Lh,aa,dRe,Bh,e$,t$,r$,Hgt,n$,i$,o$,B8,q8,V8,$1,W8,qh,Ld,H8,fRe,x1,P1,C1,_1,E1,mRe,R1,I1,A1,gRe,hRe,yRe,vRe,wRe,bRe,kRe,SRe,O1,D1,$Re,T1,N1,M1,j1,xRe,PRe,CRe,F1,_Re,z1,U1,ERe,RRe,G8,L1,B1,yc,Ggt,IRe,Vh,q1,Z8,Wh,ARe,V1,ORe,DRe,TRe,NRe,MRe,jRe,FRe,HS,zRe,URe,W1,ru,Hh,LRe,BRe,qRe,VRe,WRe,HRe,GRe,ZRe,KRe,JRe,YRe,XRe,QRe,eIe,tIe,H1,rIe,nIe,vc,iIe,oIe,sIe,aIe,G1,cIe,lIe,Z1,uIe,Zgt,Kgt,Jgt,Ygt,Xgt,Qgt,he,K8;var oo=I(()=>{y1();GS=[mc,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ur=qS((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),D8=_t([T(),ot().int()]),T8=T(),Vgt=yr({ttl:ot().optional(),pollInterval:ot().optional()}),YEe=ce({ttl:ot().optional()}),XEe=ce({taskId:T()}),v1=yr({progressToken:D8.optional(),[gc]:XEe.optional()}),Ii=ce({_meta:v1.optional()}),Mh=Ii.extend({task:YEe.optional()}),pn=ce({method:T(),params:Ii.loose().optional()}),no=ce({_meta:v1.optional()}),io=ce({method:T(),params:no.loose().optional()}),dn=yr({_meta:v1.optional()}),KS=_t([T(),ot().int()]),M8=ce({jsonrpc:ve(ZS),id:KS,...pn.shape}).strict(),j8=ce({jsonrpc:ve(ZS),...io.shape}).strict(),w1=ce({jsonrpc:ve(ZS),id:KS,result:dn}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})($e||($e={}));b1=ce({jsonrpc:ve(ZS),id:KS.optional(),error:ce({code:ot().int(),message:T(),data:Ft().optional()})}).strict(),hc=_t([M8,j8,w1,b1]),Wgt=_t([w1,b1]),sa=dn.strict(),QEe=no.extend({requestId:KS.optional(),reason:T().optional()}),JS=io.extend({method:ve("notifications/cancelled"),params:QEe}),eRe=ce({src:T(),mimeType:T().optional(),sizes:oe(T()).optional(),theme:un(["light","dark"]).optional()}),Fh=ce({icons:oe(eRe).optional()}),Ud=ce({name:T(),title:T().optional()}),U8=Ud.extend({...Ud.shape,...Fh.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),tRe=Fd(ce({applyDefaults:Ct().optional()}),At(T(),Ft())),rRe=Dh((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Fd(ce({form:tRe.optional(),url:Ur.optional()}),At(T(),Ft()).optional())),nRe=yr({list:Ur.optional(),cancel:Ur.optional(),requests:yr({sampling:yr({createMessage:Ur.optional()}).optional(),elicitation:yr({create:Ur.optional()}).optional()}).optional()}),iRe=yr({list:Ur.optional(),cancel:Ur.optional(),requests:yr({tools:yr({call:Ur.optional()}).optional()}).optional()}),oRe=ce({experimental:At(T(),Ur).optional(),sampling:ce({context:Ur.optional(),tools:Ur.optional()}).optional(),elicitation:rRe.optional(),roots:ce({listChanged:Ct().optional()}).optional(),tasks:nRe.optional(),extensions:At(T(),Ur).optional()}),sRe=Ii.extend({protocolVersion:T(),capabilities:oRe,clientInfo:U8}),k1=pn.extend({method:ve("initialize"),params:sRe}),aRe=ce({experimental:At(T(),Ur).optional(),logging:Ur.optional(),completions:Ur.optional(),prompts:ce({listChanged:Ct().optional()}).optional(),resources:ce({subscribe:Ct().optional(),listChanged:Ct().optional()}).optional(),tools:ce({listChanged:Ct().optional()}).optional(),tasks:iRe.optional(),extensions:At(T(),Ur).optional()}),S1=dn.extend({protocolVersion:T(),capabilities:aRe,serverInfo:U8,instructions:T().optional()}),YS=io.extend({method:ve("notifications/initialized"),params:no.optional()}),XS=pn.extend({method:ve("ping"),params:Ii.optional()}),cRe=ce({progress:ot(),total:Rt(ot()),message:Rt(T())}),lRe=ce({...no.shape,...cRe.shape,progressToken:D8}),QS=io.extend({method:ve("notifications/progress"),params:lRe}),uRe=Ii.extend({cursor:T8.optional()}),zh=pn.extend({params:uRe.optional()}),Uh=dn.extend({nextCursor:T8.optional()}),pRe=un(["working","input_required","completed","failed","cancelled"]),Lh=ce({taskId:T(),status:pRe,ttl:_t([ot(),xh()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:Rt(ot()),statusMessage:Rt(T())}),aa=dn.extend({task:Lh}),dRe=no.merge(Lh),Bh=io.extend({method:ve("notifications/tasks/status"),params:dRe}),e$=pn.extend({method:ve("tasks/get"),params:Ii.extend({taskId:T()})}),t$=dn.merge(Lh),r$=pn.extend({method:ve("tasks/result"),params:Ii.extend({taskId:T()})}),Hgt=dn.loose(),n$=zh.extend({method:ve("tasks/list")}),i$=Uh.extend({tasks:oe(Lh)}),o$=pn.extend({method:ve("tasks/cancel"),params:Ii.extend({taskId:T()})}),B8=dn.merge(Lh),q8=ce({uri:T(),mimeType:Rt(T()),_meta:At(T(),Ft()).optional()}),V8=q8.extend({text:T()}),$1=T().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),W8=q8.extend({blob:$1}),qh=un(["user","assistant"]),Ld=ce({audience:oe(qh).optional(),priority:ot().min(0).max(1).optional(),lastModified:eu.datetime({offset:!0}).optional()}),H8=ce({...Ud.shape,...Fh.shape,uri:T(),description:Rt(T()),mimeType:Rt(T()),size:Rt(ot()),annotations:Ld.optional(),_meta:Rt(yr({}))}),fRe=ce({...Ud.shape,...Fh.shape,uriTemplate:T(),description:Rt(T()),mimeType:Rt(T()),annotations:Ld.optional(),_meta:Rt(yr({}))}),x1=zh.extend({method:ve("resources/list")}),P1=Uh.extend({resources:oe(H8)}),C1=zh.extend({method:ve("resources/templates/list")}),_1=Uh.extend({resourceTemplates:oe(fRe)}),E1=Ii.extend({uri:T()}),mRe=E1,R1=pn.extend({method:ve("resources/read"),params:mRe}),I1=dn.extend({contents:oe(_t([V8,W8]))}),A1=io.extend({method:ve("notifications/resources/list_changed"),params:no.optional()}),gRe=E1,hRe=pn.extend({method:ve("resources/subscribe"),params:gRe}),yRe=E1,vRe=pn.extend({method:ve("resources/unsubscribe"),params:yRe}),wRe=no.extend({uri:T()}),bRe=io.extend({method:ve("notifications/resources/updated"),params:wRe}),kRe=ce({name:T(),description:Rt(T()),required:Rt(Ct())}),SRe=ce({...Ud.shape,...Fh.shape,description:Rt(T()),arguments:Rt(oe(kRe)),_meta:Rt(yr({}))}),O1=zh.extend({method:ve("prompts/list")}),D1=Uh.extend({prompts:oe(SRe)}),$Re=Ii.extend({name:T(),arguments:At(T(),T()).optional()}),T1=pn.extend({method:ve("prompts/get"),params:$Re}),N1=ce({type:ve("text"),text:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),M1=ce({type:ve("image"),data:$1,mimeType:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),j1=ce({type:ve("audio"),data:$1,mimeType:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),xRe=ce({type:ve("tool_use"),name:T(),id:T(),input:At(T(),Ft()),_meta:At(T(),Ft()).optional()}),PRe=ce({type:ve("resource"),resource:_t([V8,W8]),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),CRe=H8.extend({type:ve("resource_link")}),F1=_t([N1,M1,j1,CRe,PRe]),_Re=ce({role:qh,content:F1}),z1=dn.extend({description:T().optional(),messages:oe(_Re)}),U1=io.extend({method:ve("notifications/prompts/list_changed"),params:no.optional()}),ERe=ce({title:T().optional(),readOnlyHint:Ct().optional(),destructiveHint:Ct().optional(),idempotentHint:Ct().optional(),openWorldHint:Ct().optional()}),RRe=ce({taskSupport:un(["required","optional","forbidden"]).optional()}),G8=ce({...Ud.shape,...Fh.shape,description:T().optional(),inputSchema:ce({type:ve("object"),properties:At(T(),Ur).optional(),required:oe(T()).optional()}).catchall(Ft()),outputSchema:ce({type:ve("object"),properties:At(T(),Ur).optional(),required:oe(T()).optional()}).catchall(Ft()).optional(),annotations:ERe.optional(),execution:RRe.optional(),_meta:At(T(),Ft()).optional()}),L1=zh.extend({method:ve("tools/list")}),B1=Uh.extend({tools:oe(G8)}),yc=dn.extend({content:oe(F1).default([]),structuredContent:At(T(),Ft()).optional(),isError:Ct().optional()}),Ggt=yc.or(dn.extend({toolResult:Ft()})),IRe=Mh.extend({name:T(),arguments:At(T(),Ft()).optional()}),Vh=pn.extend({method:ve("tools/call"),params:IRe}),q1=io.extend({method:ve("notifications/tools/list_changed"),params:no.optional()}),Z8=ce({autoRefresh:Ct().default(!0),debounceMs:ot().int().nonnegative().default(300)}),Wh=un(["debug","info","notice","warning","error","critical","alert","emergency"]),ARe=Ii.extend({level:Wh}),V1=pn.extend({method:ve("logging/setLevel"),params:ARe}),ORe=no.extend({level:Wh,logger:T().optional(),data:Ft()}),DRe=io.extend({method:ve("notifications/message"),params:ORe}),TRe=ce({name:T().optional()}),NRe=ce({hints:oe(TRe).optional(),costPriority:ot().min(0).max(1).optional(),speedPriority:ot().min(0).max(1).optional(),intelligencePriority:ot().min(0).max(1).optional()}),MRe=ce({mode:un(["auto","required","none"]).optional()}),jRe=ce({type:ve("tool_result"),toolUseId:T().describe("The unique identifier for the corresponding tool call."),content:oe(F1).default([]),structuredContent:ce({}).loose().optional(),isError:Ct().optional(),_meta:At(T(),Ft()).optional()}),FRe=Eh("type",[N1,M1,j1]),HS=Eh("type",[N1,M1,j1,xRe,jRe]),zRe=ce({role:qh,content:_t([HS,oe(HS)]),_meta:At(T(),Ft()).optional()}),URe=Mh.extend({messages:oe(zRe),modelPreferences:NRe.optional(),systemPrompt:T().optional(),includeContext:un(["none","thisServer","allServers"]).optional(),temperature:ot().optional(),maxTokens:ot().int(),stopSequences:oe(T()).optional(),metadata:Ur.optional(),tools:oe(G8).optional(),toolChoice:MRe.optional()}),W1=pn.extend({method:ve("sampling/createMessage"),params:URe}),ru=dn.extend({model:T(),stopReason:Rt(un(["endTurn","stopSequence","maxTokens"]).or(T())),role:qh,content:FRe}),Hh=dn.extend({model:T(),stopReason:Rt(un(["endTurn","stopSequence","maxTokens","toolUse"]).or(T())),role:qh,content:_t([HS,oe(HS)])}),LRe=ce({type:ve("boolean"),title:T().optional(),description:T().optional(),default:Ct().optional()}),BRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),minLength:ot().optional(),maxLength:ot().optional(),format:un(["email","uri","date","date-time"]).optional(),default:T().optional()}),qRe=ce({type:un(["number","integer"]),title:T().optional(),description:T().optional(),minimum:ot().optional(),maximum:ot().optional(),default:ot().optional()}),VRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),enum:oe(T()),default:T().optional()}),WRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),oneOf:oe(ce({const:T(),title:T()})),default:T().optional()}),HRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),enum:oe(T()),enumNames:oe(T()).optional(),default:T().optional()}),GRe=_t([VRe,WRe]),ZRe=ce({type:ve("array"),title:T().optional(),description:T().optional(),minItems:ot().optional(),maxItems:ot().optional(),items:ce({type:ve("string"),enum:oe(T())}),default:oe(T()).optional()}),KRe=ce({type:ve("array"),title:T().optional(),description:T().optional(),minItems:ot().optional(),maxItems:ot().optional(),items:ce({anyOf:oe(ce({const:T(),title:T()}))}),default:oe(T()).optional()}),JRe=_t([ZRe,KRe]),YRe=_t([HRe,GRe,JRe]),XRe=_t([YRe,LRe,BRe,qRe]),QRe=Mh.extend({mode:ve("form").optional(),message:T(),requestedSchema:ce({type:ve("object"),properties:At(T(),XRe),required:oe(T()).optional()})}),eIe=Mh.extend({mode:ve("url"),message:T(),elicitationId:T(),url:T().url()}),tIe=_t([QRe,eIe]),H1=pn.extend({method:ve("elicitation/create"),params:tIe}),rIe=no.extend({elicitationId:T()}),nIe=io.extend({method:ve("notifications/elicitation/complete"),params:rIe}),vc=dn.extend({action:un(["accept","decline","cancel"]),content:Dh((e)=>e===null?void 0:e,At(T(),_t([T(),ot(),Ct(),oe(T())])).optional())}),iIe=ce({type:ve("ref/resource"),uri:T()}),oIe=ce({type:ve("ref/prompt"),name:T()}),sIe=Ii.extend({ref:_t([oIe,iIe]),argument:ce({name:T(),value:T()}),context:ce({arguments:At(T(),T()).optional()}).optional()}),aIe=pn.extend({method:ve("completion/complete"),params:sIe}),G1=dn.extend({completion:yr({values:oe(T()).max(100),total:Rt(ot().int()),hasMore:Rt(Ct())})}),cIe=ce({uri:T().startsWith("file://"),name:T().optional(),_meta:At(T(),Ft()).optional()}),lIe=pn.extend({method:ve("roots/list"),params:Ii.optional()}),Z1=dn.extend({roots:oe(cIe)}),uIe=io.extend({method:ve("notifications/roots/list_changed"),params:no.optional()}),Zgt=_t([XS,k1,aIe,V1,T1,O1,x1,C1,R1,hRe,vRe,Vh,L1,e$,r$,n$,o$]),Kgt=_t([JS,QS,YS,uIe,Bh]),Jgt=_t([sa,ru,Hh,vc,Z1,t$,i$,aa]),Ygt=_t([XS,W1,H1,lIe,e$,r$,n$,o$]),Xgt=_t([JS,QS,DRe,bRe,A1,q1,U1,Bh,nIe]),Qgt=_t([sa,S1,G1,z1,D1,P1,_1,I1,yc,B1,t$,i$,aa]);he=class he extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`);this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){if(e===$e.UrlElicitationRequired&&r){let i=r;if(i.elicitations)return new K8(i.elicitations,t)}return new he(e,t,r)}};K8=class K8 extends he{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super($e.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});function wc(e){return e==="completed"||e==="failed"||e==="cancelled"}var pIe;var s$=I(()=>{pIe=Symbol("Let zodToJsonSchema decide on which parser to use")});var K1=I(()=>{s$()});var so=()=>{};var J1=I(()=>{Cr()});var Y1=()=>{};var a$=I(()=>{Cr()});var X1=I(()=>{Cr()});var Q1=()=>{};var ej=I(()=>{Cr()});var tj=I(()=>{Cr();so()});var rj=I(()=>{Cr()});var Oht;var c$=I(()=>{Oht=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var l$=I(()=>{Cr();c$();a$();so()});var nj=I(()=>{Cr();l$();so()});var ij=I(()=>{so()});var u$=I(()=>{Cr()});var oj=I(()=>{Cr();u$()});var sj=()=>{};var aj=I(()=>{Cr()});var cj=I(()=>{Cr();so()});var lj=I(()=>{Cr()});var uj=I(()=>{Cr()});var pj=I(()=>{Cr()});var dj=I(()=>{Cr()});var fj=I(()=>{so()});var mj=I(()=>{so()});var gj=I(()=>{Cr()});var hj=I(()=>{so();J1();Y1();a$();X1();Q1();ej();tj();rj();nj();ij();oj();sj();aj();cj();lj();uj();l$();pj();c$();dj();fj();u$();mj();gj()});var Cr=I(()=>{s$();hj();so()});var J8=()=>{};var yj=I(()=>{Cr();K1();so()});var Y8=I(()=>{yj();s$();K1();Cr();J8();so();J1();Y1();a$();X1();Q1();ej();tj();rj();nj();ij();oj();sj();aj();cj();lj();uj();gj();l$();pj();c$();dj();fj();u$();mj();hj();yj()});function vj(e){let r=Id(e)?.method;if(!r)throw Error("Schema is missing a method literal");let i=Ad(r);if(typeof i!=="string")throw Error("Schema method literal must be a string");return i}function wj(e,t){let r=qn(e,t);if(!r.success)throw r.error;return r.data}var X8=I(()=>{kh();Y8()});class Zh{constructor(e){if(this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(JS,(t)=>{this._oncancel(t)}),this.setNotificationHandler(QS,(t)=>{this._onprogress(t)}),this.setRequestHandler(XS,(t)=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore)this.setRequestHandler(e$,async(t,r)=>{let i=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!i)throw new he($e.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(r$,async(t,r)=>{let i=async()=>{let n=t.params.taskId;if(this._taskMessageQueue){let s;while(s=await this._taskMessageQueue.dequeue(n,r.sessionId)){if(s.type==="response"||s.type==="error"){let a=s.message,c=a.id,l=this._requestResolvers.get(c);if(l)if(this._requestResolvers.delete(c),s.type==="response")l(a);else{let u=a,p=new he(u.error.code,u.error.message,u.error.data);l(p)}else{let u=s.type==="response"?"Response":"Error";this._onerror(Error(`${u} handler missing for request ${c}`))}continue}await this._transport?.send(s.message,{relatedRequestId:r.requestId})}}let o=await this._taskStore.getTask(n,r.sessionId);if(!o)throw new he($e.InvalidParams,`Task not found: ${n}`);if(!wc(o.status))return await this._waitForTaskUpdate(n,r.signal),await i();if(wc(o.status)){let s=await this._taskStore.getTaskResult(n,r.sessionId);return this._clearTaskQueue(n),{...s,_meta:{...s._meta,[gc]:{taskId:n}}}}return await i()};return await i()}),this.setRequestHandler(n$,async(t,r)=>{try{let{tasks:i,nextCursor:n}=await this._taskStore.listTasks(t.params?.cursor,r.sessionId);return{tasks:i,nextCursor:n,_meta:{}}}catch(i){throw new he($e.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(o$,async(t,r)=>{try{let i=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!i)throw new he($e.InvalidParams,`Task not found: ${t.params.taskId}`);if(wc(i.status))throw new he($e.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(t.params.taskId);let n=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!n)throw new he($e.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...n}}catch(i){if(i instanceof he)throw i;throw new he($e.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}})}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:n,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),he.fromError($e.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let r=this.transport?.onerror;this._transport.onerror=(n)=>{r?.(n),this._onerror(n)};let i=this._transport?.onmessage;this._transport.onmessage=(n,o)=>{if(i?.(n,o),tu(n)||z8(n))this._onresponse(n);else if(jh(n))this._onrequest(n,o);else if(F8(n))this._onnotification(n);else this._onerror(Error(`Unknown message type: ${JSON.stringify(n)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let r of this._timeoutInfo.values())clearTimeout(r.timeoutId);this._timeoutInfo.clear();for(let r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();let t=he.fromError($e.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let r of e.values())r(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;if(t===void 0)return;Promise.resolve().then(()=>t(e)).catch((r)=>this._onerror(Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,t){let r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,n=e.params?._meta?.[gc]?.taskId;if(r===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:$e.MethodNotFound,message:"Method not found"}};if(n&&this._taskMessageQueue)this._enqueueTaskMessage(n,{type:"error",message:l,timestamp:Date.now()},i?.sessionId).catch((u)=>this._onerror(Error(`Failed to enqueue error response: ${u}`)));else i?.send(l).catch((u)=>this._onerror(Error(`Failed to send an error response: ${u}`)));return}let o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);let s=N8(e.params)?e.params.task:void 0,a=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,c={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async(l)=>{if(o.signal.aborted)return;let u={relatedRequestId:e.id};if(n)u.relatedTask={taskId:n};await this.notification(l,u)},sendRequest:async(l,u,p)=>{if(o.signal.aborted)throw new he($e.ConnectionClosed,"Request was cancelled");let d={...p,relatedRequestId:e.id};if(n&&!d.relatedTask)d.relatedTask={taskId:n};let f=d.relatedTask?.taskId??n;if(f&&a)await a.updateTaskStatus(f,"input_required");return await this.request(l,u,d)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:n,taskStore:a,taskRequestedTtl:s?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(s)this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,c)).then(async(l)=>{if(o.signal.aborted)return;let u={result:l,jsonrpc:"2.0",id:e.id};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"response",message:u,timestamp:Date.now()},i?.sessionId);else await i?.send(u)},async(l)=>{if(o.signal.aborted)return;let u={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:$e.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"error",message:u,timestamp:Date.now()},i?.sessionId);else await i?.send(u)}).catch((l)=>this._onerror(Error(`Failed to send response: ${l}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(e.id)===o)this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),n=this._progressHandlers.get(i);if(!n){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&o&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(a){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(a);return}n(r)}_onresponse(e){let t=Number(e.id),r=this._requestResolvers.get(t);if(r){if(this._requestResolvers.delete(t),tu(e))r(e);else{let o=new he(e.error.code,e.error.message,e.error.data);r(o)}return}let i=this._responseHandlers.get(t);if(i===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let n=!1;if(tu(e)&&e.result&&typeof e.result==="object"){let o=e.result;if(o.task&&typeof o.task==="object"){let s=o.task;if(typeof s.taskId==="string")n=!0,this._taskProgressTokens.set(s.taskId,t)}}if(!n)this._progressHandlers.delete(t);if(tu(e))i(e);else{let o=he.fromError(e.error.code,e.error.message,e.error.data);i(o)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,r){let{task:i}=r??{};if(!i){try{yield{type:"result",result:await this.request(e,t,r)}}catch(o){yield{type:"error",error:o instanceof he?o:new he($e.InternalError,String(o))}}return}let n;try{let o=await this.request(e,aa,r);if(o.task)n=o.task.taskId,yield{type:"taskCreated",task:o.task};else throw new he($e.InternalError,"Task creation did not return a task");while(!0){let s=await this.getTask({taskId:n},r);if(yield{type:"taskStatus",task:s},wc(s.status)){if(s.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:n},t,r)};else if(s.status==="failed")yield{type:"error",error:new he($e.InternalError,`Task ${n} failed`)};else if(s.status==="cancelled")yield{type:"error",error:new he($e.InternalError,`Task ${n} was cancelled`)};return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:n},t,r)};return}let a=s.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((c)=>setTimeout(c,a)),r?.signal?.throwIfAborted()}}catch(o){yield{type:"error",error:o instanceof he?o:new he($e.InternalError,String(o))}}}request(e,t,r){let{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o,task:s,relatedTask:a}=r??{};return new Promise((c,l)=>{let u=(y)=>{l(y)};if(!this._transport){u(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod(e.method),s)this.assertTaskCapability(e.method)}catch(y){u(y);return}r?.signal?.throwIfAborted();let p=this._requestMessageId++,d={...e,jsonrpc:"2.0",id:p};if(r?.onprogress)this._progressHandlers.set(p,r.onprogress),d.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}};if(s)d.params={...d.params,task:s};if(a)d.params={...d.params,_meta:{...d.params?._meta||{},[gc]:a}};let f=(y)=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(y)}},{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o}).catch((w)=>this._onerror(Error(`Failed to send cancellation: ${w}`)));let v=y instanceof he?y:new he($e.RequestTimeout,String(y));l(v)};this._responseHandlers.set(p,(y)=>{if(r?.signal?.aborted)return;if(y instanceof Error)return l(y);try{let v=qn(t,y.result);if(!v.success)l(v.error);else c(v.data)}catch(v){l(v)}}),r?.signal?.addEventListener("abort",()=>{f(r?.signal?.reason)});let m=r?.timeout??yIe,g=()=>f(he.fromError($e.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(p,m,r?.maxTotalTimeout,g,r?.resetTimeoutOnProgress??!1);let h=a?.taskId;if(h){let y=(v)=>{let w=this._responseHandlers.get(p);if(w)w(v);else this._onerror(Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,y),this._enqueueTaskMessage(h,{type:"request",message:d,timestamp:Date.now()}).catch((v)=>{this._cleanupTimeout(p),l(v)})}else this._transport.send(d,{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o}).catch((y)=>{this._cleanupTimeout(p),l(y)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},t$,t)}async getTaskResult(e,t,r){return this.request({method:"tasks/result",params:e},t,r)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},i$,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},B8,t)}async notification(e,t){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability(e.method);let r=t?.relatedTask?.taskId;if(r){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[gc]:t.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};if(t?.relatedTask)s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[gc]:t.relatedTask}}};this._transport?.send(s,t).catch((a)=>this._onerror(a))});return}let o={...e,jsonrpc:"2.0"};if(t?.relatedTask)o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[gc]:t.relatedTask}}};await this._transport.send(o,t)}setRequestHandler(e,t){let r=vj(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,n)=>{let o=wj(e,i);return Promise.resolve(t(o,n))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let r=vj(e);this._notificationHandlers.set(r,(i)=>{let n=wj(e,i);return Promise.resolve(t(n))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);if(t!==void 0)this._progressHandlers.delete(t),this._taskProgressTokens.delete(e)}async _enqueueTaskMessage(e,t,r){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,r,i)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,t);for(let i of r)if(i.type==="request"&&jh(i.message)){let n=i.message.id,o=this._requestResolvers.get(n);if(o)o(new he($e.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n);else this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let r=this._options?.defaultTaskPollInterval??1000;try{let i=await this._taskStore?.getTask(e);if(i?.pollInterval)r=i.pollInterval}catch{}return new Promise((i,n)=>{if(t.aborted){n(new he($e.InvalidRequest,"Request cancelled"));return}let o=setTimeout(i,r);t.addEventListener("abort",()=>{clearTimeout(o),n(new he($e.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){let r=this._taskStore;if(!r)throw Error("No task store configured");return{createTask:async(i)=>{if(!e)throw Error("No request provided");return await r.createTask(i,e.id,{method:e.method,params:e.params},t)},getTask:async(i)=>{let n=await r.getTask(i,t);if(!n)throw new he($e.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(i,n,o)=>{await r.storeTaskResult(i,n,o,t);let s=await r.getTask(i,t);if(s){let a=Bh.parse({method:"notifications/tasks/status",params:s});if(await this.notification(a),wc(s.status))this._cleanupTaskProgressHandler(i)}},getTaskResult:(i)=>r.getTaskResult(i,t),updateTaskStatus:async(i,n,o)=>{let s=await r.getTask(i,t);if(!s)throw new he($e.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(wc(s.status))throw new he($e.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(i,n,o,t);let a=await r.getTask(i,t);if(a){let c=Bh.parse({method:"notifications/tasks/status",params:a});if(await this.notification(c),wc(a.status))this._cleanupTaskProgressHandler(i)}},listTasks:(i)=>r.listTasks(i,t)}}}function Q8(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function p$(e,t){let r={...e};for(let i in t){let n=i,o=t[n];if(o===void 0)continue;let s=r[n];if(Q8(s)&&Q8(o))r[n]={...s,...o};else r[n]=o}return r}var yIe=60000;var bj=I(()=>{kh();oo();X8()});var Jh=F(function(rZ){Object.defineProperty(rZ,"__esModule",{value:!0});rZ.regexpCode=rZ.getEsmExportName=rZ.getProperty=rZ.safeStringify=rZ.stringify=rZ.strConcat=rZ.addCodeArg=rZ.str=rZ._=rZ.nil=rZ._Code=rZ.Name=rZ.IDENTIFIER=rZ._CodeOrName=void 0;class d${}rZ._CodeOrName=d$;rZ.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Bd extends d${constructor(e){super();if(!rZ.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}rZ.Name=Bd;class Oo extends d${constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Bd)t[r.str]=(t[r.str]||0)+1;return t},{})}}rZ._Code=Oo;rZ.nil=new Oo("");function eZ(e,...t){let r=[e[0]],i=0;while(i<t.length)Sj(r,t[i]),r.push(e[++i]);return new Oo(r)}rZ._=eZ;var kj=new Oo("+");function tZ(e,...t){let r=[Kh(e[0])],i=0;while(i<t.length)r.push(kj),Sj(r,t[i]),r.push(kj,Kh(e[++i]));return vIe(r),new Oo(r)}rZ.str=tZ;function Sj(e,t){if(t instanceof Oo)e.push(...t._items);else if(t instanceof Bd)e.push(t);else e.push(kIe(t))}rZ.addCodeArg=Sj;function vIe(e){let t=1;while(t<e.length-1){if(e[t]===kj){let r=wIe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function wIe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Bd||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Bd))return`"${e}${t.slice(1)}`;return}function bIe(e,t){return t.emptyStr()?e:e.emptyStr()?t:tZ`${e}${t}`}rZ.strConcat=bIe;function kIe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Kh(Array.isArray(e)?e.join(","):e)}function SIe(e){return new Oo(Kh(e))}rZ.stringify=SIe;function Kh(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}rZ.safeStringify=Kh;function $Ie(e){return typeof e=="string"&&rZ.IDENTIFIER.test(e)?new Oo(`.${e}`):eZ`[${e}]`}rZ.getProperty=$Ie;function xIe(e){if(typeof e=="string"&&rZ.IDENTIFIER.test(e))return new Oo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}rZ.getEsmExportName=xIe;function PIe(e){return new Oo(e.toString())}rZ.regexpCode=PIe});var Cj=F(function(sZ){Object.defineProperty(sZ,"__esModule",{value:!0});sZ.ValueScope=sZ.ValueScopeName=sZ.Scope=sZ.varKinds=sZ.UsedValueState=void 0;var li=Jh();class iZ extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var m$;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(m$||(sZ.UsedValueState=m$={}));sZ.varKinds={const:new li.Name("const"),let:new li.Name("let"),var:new li.Name("var")};class xj{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof li.Name?e:this.name(e)}name(e){return new li.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}sZ.Scope=xj;class Pj extends li.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=li._`.${new li.Name(t)}[${r}]`}}sZ.ValueScopeName=Pj;var FIe=li._`\n`;class oZ extends xj{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?FIe:li.nil}}get(){return this._scope}name(e){return new Pj(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:n}=i,o=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[n];if(s){let l=s.get(o);if(l)return l}else s=this._values[n]=new Map;s.set(o,i);let a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return li._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(e,t,r={},i){let n=li.nil;for(let o in e){let s=e[o];if(!s)continue;let a=r[o]=r[o]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,m$.Started);let l=t(c);if(l){let u=this.opts.es5?sZ.varKinds.var:sZ.varKinds.const;n=li._`${n}${u} ${c} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(c))n=li._`${n}${l}${this.opts._n}`;else throw new iZ(c);a.set(c,m$.Completed)})}return n}}sZ.ValueScope=oZ});var Xe=F(function(ui){Object.defineProperty(ui,"__esModule",{value:!0});ui.or=ui.and=ui.not=ui.CodeGen=ui.operators=ui.varKinds=ui.ValueScopeName=ui.ValueScope=ui.Scope=ui.Name=ui.regexpCode=ui.stringify=ui.getProperty=ui.nil=ui.strConcat=ui.str=ui._=void 0;var ct=Jh(),Do=Cj(),bc=Jh();Object.defineProperty(ui,"_",{enumerable:!0,get:function(){return bc._}});Object.defineProperty(ui,"str",{enumerable:!0,get:function(){return bc.str}});Object.defineProperty(ui,"strConcat",{enumerable:!0,get:function(){return bc.strConcat}});Object.defineProperty(ui,"nil",{enumerable:!0,get:function(){return bc.nil}});Object.defineProperty(ui,"getProperty",{enumerable:!0,get:function(){return bc.getProperty}});Object.defineProperty(ui,"stringify",{enumerable:!0,get:function(){return bc.stringify}});Object.defineProperty(ui,"regexpCode",{enumerable:!0,get:function(){return bc.regexpCode}});Object.defineProperty(ui,"Name",{enumerable:!0,get:function(){return bc.Name}});var b$=Cj();Object.defineProperty(ui,"Scope",{enumerable:!0,get:function(){return b$.Scope}});Object.defineProperty(ui,"ValueScope",{enumerable:!0,get:function(){return b$.ValueScope}});Object.defineProperty(ui,"ValueScopeName",{enumerable:!0,get:function(){return b$.ValueScopeName}});Object.defineProperty(ui,"varKinds",{enumerable:!0,get:function(){return b$.varKinds}});ui.operators={GT:new ct._Code(">"),GTE:new ct._Code(">="),LT:new ct._Code("<"),LTE:new ct._Code("<="),EQ:new ct._Code("==="),NEQ:new ct._Code("!=="),NOT:new ct._Code("!"),OR:new ct._Code("||"),AND:new ct._Code("&&"),ADD:new ct._Code("+")};class kc{optimizeNodes(){return this}optimizeNames(e,t){return this}}class cZ extends kc{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?Do.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Vd(this.rhs,e,t);return this}get names(){return this.rhs instanceof ct._CodeOrName?this.rhs.names:{}}}class Rj extends kc{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof ct.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Vd(this.rhs,e,t),this}get names(){let e=this.lhs instanceof ct.Name?{}:{...this.lhs.names};return w$(e,this.rhs)}}class lZ extends Rj{constructor(e,t,r,i){super(e,r,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class uZ extends kc{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class pZ extends kc{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class dZ extends kc{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class fZ extends kc{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Vd(this.code,e,t),this}get names(){return this.code instanceof ct._CodeOrName?this.code.names:{}}}class k$ extends kc{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;while(i--){let n=r[i];if(n.optimizeNames(e,t))continue;BIe(e,n.names),r.splice(i,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>nu(e,t.names),{})}}class Sc extends k${render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class mZ extends k${}class Yh extends Sc{}Yh.kind="else";class la extends Sc{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Yh(r):r}if(t){if(e===!1)return t instanceof la?t:t.nodes;if(this.nodes.length)return this;return new la(wZ(e),t instanceof la?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Vd(this.condition,e,t),this}get names(){let e=super.names;if(w$(e,this.condition),this.else)nu(e,this.else.names);return e}}la.kind="if";class qd extends Sc{}qd.kind="for";class gZ extends qd{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Vd(this.iteration,e,t),this}get names(){return nu(super.names,this.iteration.names)}}class hZ extends qd{constructor(e,t,r,i){super();this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?Do.varKinds.var:this.varKind,{name:r,from:i,to:n}=this;return`for(${t} ${r}=${i}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){let e=w$(super.names,this.from);return w$(e,this.to)}}class _j extends qd{constructor(e,t,r,i){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Vd(this.iterable,e,t),this}get names(){return nu(super.names,this.iterable.names)}}class g$ extends Sc{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}g$.kind="func";class h$ extends k${render(e){return"return "+super.render(e)}}h$.kind="return";class yZ extends Sc{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)nu(e,this.catch.names);if(this.finally)nu(e,this.finally.names);return e}}class y$ extends Sc{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}y$.kind="catch";class v$ extends Sc{render(e){return"finally"+super.render(e)}}v$.kind="finally";class vZ{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
298
- `:""},this._extScope=e,this._scope=new Do.Scope({parent:e}),this._nodes=[new mZ]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let n=this._scope.toName(t);if(r!==void 0&&i)this._constants[n.str]=r;return this._leafNode(new cZ(e,n,r)),n}const(e,t,r){return this._def(Do.varKinds.const,e,t,r)}let(e,t,r){return this._def(Do.varKinds.let,e,t,r)}var(e,t,r){return this._def(Do.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Rj(e,t,r))}add(e,t){return this._leafNode(new lZ(e,ui.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==ct.nil)this._leafNode(new fZ(e));return this}object(...e){let t=["{"];for(let[r,i]of e){if(t.length>1)t.push(",");if(t.push(r),r!==i||this.opts.es5)t.push(":"),(0,ct.addCodeArg)(t,i)}return t.push("}"),new ct._Code(t)}if(e,t,r){if(this._blockNode(new la(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new la(e))}else(){return this._elseNode(new Yh)}endIf(){return this._endBlockNode(la,Yh)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new gZ(e),t)}forRange(e,t,r,i,n=this.opts.es5?Do.varKinds.var:Do.varKinds.let){let o=this._scope.toName(e);return this._for(new hZ(n,o,t,r),()=>i(o))}forOf(e,t,r,i=Do.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let o=t instanceof ct.Name?t:this.var("_arr",t);return this.forRange("_i",0,ct._`${o}.length`,(s)=>{this.var(n,ct._`${o}[${s}]`),r(n)})}return this._for(new _j("of",i,n,t),()=>r(n))}forIn(e,t,r,i=this.opts.es5?Do.varKinds.var:Do.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,ct._`Object.keys(${t})`,r);let n=this._scope.toName(e);return this._for(new _j("in",i,n,t),()=>r(n))}endFor(){return this._endBlockNode(qd)}label(e){return this._leafNode(new uZ(e))}break(e){return this._leafNode(new pZ(e))}return(e){let t=new h$;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(h$)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new yZ;if(this._blockNode(i),this.code(e),t){let n=this.name("e");this._currNode=i.catch=new y$(n),t(n)}if(r)this._currNode=i.finally=new v$,this.code(r);return this._endBlockNode(y$,v$)}throw(e){return this._leafNode(new dZ(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=ct.nil,r,i){if(this._blockNode(new g$(e,t,r)),i)this.code(i).endFunc();return this}endFunc(){return this._endBlockNode(g$)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof la))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}ui.CodeGen=vZ;function nu(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function w$(e,t){return t instanceof ct._CodeOrName?nu(e,t.names):e}function Vd(e,t,r){if(e instanceof ct.Name)return i(e);if(!n(e))return e;return new ct._Code(e._items.reduce((o,s)=>{if(s instanceof ct.Name)s=i(s);if(s instanceof ct._Code)o.push(...s._items);else o.push(s);return o},[]));function i(o){let s=r[o.str];if(s===void 0||t[o.str]!==1)return o;return delete t[o.str],s}function n(o){return o instanceof ct._Code&&o._items.some((s)=>s instanceof ct.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function BIe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function wZ(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:ct._`!${Ej(e)}`}ui.not=wZ;var qIe=bZ(ui.operators.AND);function VIe(...e){return e.reduce(qIe)}ui.and=VIe;var WIe=bZ(ui.operators.OR);function HIe(...e){return e.reduce(WIe)}ui.or=HIe;function bZ(e){return(t,r)=>t===ct.nil?r:r===ct.nil?t:ct._`${Ej(t)} ${e} ${Ej(r)}`}function Ej(e){return e instanceof ct.Name?e:ct._`(${e})`}});var pt=F(function(RZ){Object.defineProperty(RZ,"__esModule",{value:!0});RZ.checkStrictMode=RZ.getErrorPath=RZ.Type=RZ.useFunc=RZ.setEvaluated=RZ.evaluatedPropsToName=RZ.mergeEvaluated=RZ.eachItem=RZ.unescapeJsonPointer=RZ.escapeJsonPointer=RZ.escapeFragment=RZ.unescapeFragment=RZ.schemaRefOrVal=RZ.schemaHasRulesButRef=RZ.schemaHasRules=RZ.checkUnknownRules=RZ.alwaysValidSchema=RZ.toHash=void 0;var Lt=Xe(),JIe=Jh();function YIe(e){let t={};for(let r of e)t[r]=!0;return t}RZ.toHash=YIe;function XIe(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return xZ(e,t),!PZ(t,e.self.RULES.all)}RZ.alwaysValidSchema=XIe;function xZ(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let n=i.RULES.keywords;for(let o in t)if(!n[o])EZ(e,`unknown keyword: "${o}"`)}RZ.checkUnknownRules=xZ;function PZ(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}RZ.schemaHasRules=PZ;function QIe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}RZ.schemaHasRulesButRef=QIe;function eAe({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return Lt._`${r}`}return Lt._`${e}${t}${(0,Lt.getProperty)(i)}`}RZ.schemaRefOrVal=eAe;function tAe(e){return CZ(decodeURIComponent(e))}RZ.unescapeFragment=tAe;function rAe(e){return encodeURIComponent(Aj(e))}RZ.escapeFragment=rAe;function Aj(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}RZ.escapeJsonPointer=Aj;function CZ(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}RZ.unescapeJsonPointer=CZ;function nAe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}RZ.eachItem=nAe;function SZ({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,s,a)=>{let c=s===void 0?o:s instanceof Lt.Name?(o instanceof Lt.Name?e(n,o,s):t(n,o,s),s):o instanceof Lt.Name?(t(n,s,o),o):r(o,s);return a===Lt.Name&&!(c instanceof Lt.Name)?i(n,c):c}}RZ.mergeEvaluated={props:SZ({mergeNames:(e,t,r)=>e.if(Lt._`${r} !== true && ${t} !== undefined`,()=>{e.if(Lt._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,Lt._`${r} || {}`).code(Lt._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(Lt._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,Lt._`${r} || {}`),Oj(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_Z}),items:SZ({mergeNames:(e,t,r)=>e.if(Lt._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,Lt._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(Lt._`${r} !== true`,()=>e.assign(r,t===!0?!0:Lt._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function _Z(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",Lt._`{}`);if(t!==void 0)Oj(e,r,t);return r}RZ.evaluatedPropsToName=_Z;function Oj(e,t,r){Object.keys(r).forEach((i)=>e.assign(Lt._`${t}${(0,Lt.getProperty)(i)}`,!0))}RZ.setEvaluated=Oj;var $Z={};function iAe(e,t){return e.scopeValue("func",{ref:t,code:$Z[t.code]||($Z[t.code]=new JIe._Code(t.code))})}RZ.useFunc=iAe;var Ij;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ij||(RZ.Type=Ij={}));function oAe(e,t,r){if(e instanceof Lt.Name){let i=t===Ij.Num;return r?i?Lt._`"[" + ${e} + "]"`:Lt._`"['" + ${e} + "']"`:i?Lt._`"/" + ${e}`:Lt._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Lt.getProperty)(e).toString():"/"+Aj(e)}RZ.getErrorPath=oAe;function EZ(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}RZ.checkStrictMode=EZ});var ua=F(function(AZ){Object.defineProperty(AZ,"__esModule",{value:!0});var xn=Xe(),$Ae={data:new xn.Name("data"),valCxt:new xn.Name("valCxt"),instancePath:new xn.Name("instancePath"),parentData:new xn.Name("parentData"),parentDataProperty:new xn.Name("parentDataProperty"),rootData:new xn.Name("rootData"),dynamicAnchors:new xn.Name("dynamicAnchors"),vErrors:new xn.Name("vErrors"),errors:new xn.Name("errors"),this:new xn.Name("this"),self:new xn.Name("self"),scope:new xn.Name("scope"),json:new xn.Name("json"),jsonPos:new xn.Name("jsonPos"),jsonLen:new xn.Name("jsonLen"),jsonPart:new xn.Name("jsonPart")};AZ.default=$Ae});var Xh=F(function(NZ){Object.defineProperty(NZ,"__esModule",{value:!0});NZ.extendErrors=NZ.resetErrorsCount=NZ.reportExtraError=NZ.reportError=NZ.keyword$DataError=NZ.keywordError=void 0;var dt=Xe(),$$=pt(),Wn=ua();NZ.keywordError={message:({keyword:e})=>dt.str`must pass "${e}" keyword validation`};NZ.keyword$DataError={message:({keyword:e,schemaType:t})=>t?dt.str`"${e}" keyword must be ${t} ($data)`:dt.str`"${e}" keyword is invalid ($data)`};function PAe(e,t=NZ.keywordError,r,i){let{it:n}=e,{gen:o,compositeRule:s,allErrors:a}=n,c=TZ(e,t,r);if(i!==null&&i!==void 0?i:s||a)OZ(o,c);else DZ(n,dt._`[${c}]`)}NZ.reportError=PAe;function CAe(e,t=NZ.keywordError,r){let{it:i}=e,{gen:n,compositeRule:o,allErrors:s}=i,a=TZ(e,t,r);if(OZ(n,a),!(o||s))DZ(i,Wn.default.vErrors)}NZ.reportExtraError=CAe;function _Ae(e,t){e.assign(Wn.default.errors,t),e.if(dt._`${Wn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(dt._`${Wn.default.vErrors}.length`,t),()=>e.assign(Wn.default.vErrors,null)))}NZ.resetErrorsCount=_Ae;function EAe({gen:e,keyword:t,schemaValue:r,data:i,errsCount:n,it:o}){if(n===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,Wn.default.errors,(a)=>{if(e.const(s,dt._`${Wn.default.vErrors}[${a}]`),e.if(dt._`${s}.instancePath === undefined`,()=>e.assign(dt._`${s}.instancePath`,(0,dt.strConcat)(Wn.default.instancePath,o.errorPath))),e.assign(dt._`${s}.schemaPath`,dt.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(dt._`${s}.schema`,r),e.assign(dt._`${s}.data`,i)})}NZ.extendErrors=EAe;function OZ(e,t){let r=e.const("err",t);e.if(dt._`${Wn.default.vErrors} === null`,()=>e.assign(Wn.default.vErrors,dt._`[${r}]`),dt._`${Wn.default.vErrors}.push(${r})`),e.code(dt._`${Wn.default.errors}++`)}function DZ(e,t){let{gen:r,validateName:i,schemaEnv:n}=e;if(n.$async)r.throw(dt._`new ${e.ValidationError}(${t})`);else r.assign(dt._`${i}.errors`,t),r.return(!1)}var iu={keyword:new dt.Name("keyword"),schemaPath:new dt.Name("schemaPath"),params:new dt.Name("params"),propertyName:new dt.Name("propertyName"),message:new dt.Name("message"),schema:new dt.Name("schema"),parentSchema:new dt.Name("parentSchema")};function TZ(e,t,r){let{createErrors:i}=e.it;if(i===!1)return dt._`{}`;return RAe(e,t,r)}function RAe(e,t,r={}){let{gen:i,it:n}=e,o=[IAe(n,r),AAe(e,r)];return OAe(e,t,o),i.object(...o)}function IAe({errorPath:e},{instancePath:t}){let r=t?dt.str`${e}${(0,$$.getErrorPath)(t,$$.Type.Str)}`:e;return[Wn.default.instancePath,(0,dt.strConcat)(Wn.default.instancePath,r)]}function AAe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let n=i?t:dt.str`${t}/${e}`;if(r)n=dt.str`${n}${(0,$$.getErrorPath)(r,$$.Type.Str)}`;return[iu.schemaPath,n]}function OAe(e,{params:t,message:r},i){let{keyword:n,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:l,topSchemaRef:u,schemaPath:p}=a;if(i.push([iu.keyword,n],[iu.params,typeof t=="function"?t(e):t||dt._`{}`]),c.messages)i.push([iu.message,typeof r=="function"?r(e):r]);if(c.verbose)i.push([iu.schema,s],[iu.parentSchema,dt._`${u}${p}`],[Wn.default.data,o]);if(l)i.push([iu.propertyName,l])}});var UZ=F(function(FZ){Object.defineProperty(FZ,"__esModule",{value:!0});FZ.boolOrEmptySchema=FZ.topBoolOrEmptySchema=void 0;var jAe=Xh(),FAe=Xe(),zAe=ua(),UAe={message:"boolean schema is false"};function LAe(e){let{gen:t,schema:r,validateName:i}=e;if(r===!1)jZ(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(zAe.default.data);else t.assign(FAe._`${i}.errors`,null),t.return(!0)}FZ.topBoolOrEmptySchema=LAe;function BAe(e,t){let{gen:r,schema:i}=e;if(i===!1)r.var(t,!1),jZ(e);else r.var(t,!0)}FZ.boolOrEmptySchema=BAe;function jZ(e,t){let{gen:r,data:i}=e,n={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,jAe.reportError)(n,UAe,void 0,t)}});var Tj=F(function(LZ){Object.defineProperty(LZ,"__esModule",{value:!0});LZ.getRules=LZ.isJSONType=void 0;var VAe=["string","number","integer","boolean","null","object","array"],WAe=new Set(VAe);function HAe(e){return typeof e=="string"&&WAe.has(e)}LZ.isJSONType=HAe;function GAe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}LZ.getRules=GAe});var Nj=F(function(WZ){Object.defineProperty(WZ,"__esModule",{value:!0});WZ.shouldUseRule=WZ.shouldUseGroup=WZ.schemaHasRulesForType=void 0;function KAe({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&qZ(e,i)}WZ.schemaHasRulesForType=KAe;function qZ(e,t){return t.rules.some((r)=>VZ(e,r))}WZ.shouldUseGroup=qZ;function VZ(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((i)=>e[i]!==void 0))}WZ.shouldUseRule=VZ});var Qh=F(function(JZ){Object.defineProperty(JZ,"__esModule",{value:!0});JZ.reportTypeError=JZ.checkDataTypes=JZ.checkDataType=JZ.coerceAndCheckDataType=JZ.getJSONTypes=JZ.getSchemaTypes=JZ.DataType=void 0;var XAe=Tj(),QAe=Nj(),eOe=Xh(),Ze=Xe(),GZ=pt(),Wd;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Wd||(JZ.DataType=Wd={}));function tOe(e){let t=ZZ(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}JZ.getSchemaTypes=tOe;function ZZ(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(XAe.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}JZ.getJSONTypes=ZZ;function rOe(e,t){let{gen:r,data:i,opts:n}=e,o=nOe(t,n.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,QAe.schemaHasRulesForType)(e,t[0]));if(s){let a=jj(t,i,n.strictNumbers,Wd.Wrong);r.if(a,()=>{if(o.length)iOe(e,t,o);else Fj(e)})}return s}JZ.coerceAndCheckDataType=rOe;var KZ=new Set(["string","number","integer","boolean","null"]);function nOe(e,t){return t?e.filter((r)=>KZ.has(r)||t==="array"&&r==="array"):[]}function iOe(e,t,r){let{gen:i,data:n,opts:o}=e,s=i.let("dataType",Ze._`typeof ${n}`),a=i.let("coerced",Ze._`undefined`);if(o.coerceTypes==="array")i.if(Ze._`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,Ze._`${n}[0]`).assign(s,Ze._`typeof ${n}`).if(jj(t,n,o.strictNumbers),()=>i.assign(a,n)));i.if(Ze._`${a} !== undefined`);for(let l of r)if(KZ.has(l)||l==="array"&&o.coerceTypes==="array")c(l);i.else(),Fj(e),i.endIf(),i.if(Ze._`${a} !== undefined`,()=>{i.assign(n,a),oOe(e,a)});function c(l){switch(l){case"string":i.elseIf(Ze._`${s} == "number" || ${s} == "boolean"`).assign(a,Ze._`"" + ${n}`).elseIf(Ze._`${n} === null`).assign(a,Ze._`""`);return;case"number":i.elseIf(Ze._`${s} == "boolean" || ${n} === null
299
- || (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,Ze._`+${n}`);return;case"integer":i.elseIf(Ze._`${s} === "boolean" || ${n} === null
300
- || (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,Ze._`+${n}`);return;case"boolean":i.elseIf(Ze._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf(Ze._`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":i.elseIf(Ze._`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(a,null);return;case"array":i.elseIf(Ze._`${s} === "string" || ${s} === "number"
301
- || ${s} === "boolean" || ${n} === null`).assign(a,Ze._`[${n}]`)}}}function oOe({gen:e,parentData:t,parentDataProperty:r},i){e.if(Ze._`${t} !== undefined`,()=>e.assign(Ze._`${t}[${r}]`,i))}function Mj(e,t,r,i=Wd.Correct){let n=i===Wd.Correct?Ze.operators.EQ:Ze.operators.NEQ,o;switch(e){case"null":return Ze._`${t} ${n} null`;case"array":o=Ze._`Array.isArray(${t})`;break;case"object":o=Ze._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(Ze._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return Ze._`typeof ${t} ${n} ${e}`}return i===Wd.Correct?o:(0,Ze.not)(o);function s(a=Ze.nil){return(0,Ze.and)(Ze._`typeof ${t} == "number"`,a,r?Ze._`isFinite(${t})`:Ze.nil)}}JZ.checkDataType=Mj;function jj(e,t,r,i){if(e.length===1)return Mj(e[0],t,r,i);let n,o=(0,GZ.toHash)(e);if(o.array&&o.object){let s=Ze._`typeof ${t} != "object"`;n=o.null?s:Ze._`!${t} || ${s}`,delete o.null,delete o.array,delete o.object}else n=Ze.nil;if(o.number)delete o.integer;for(let s in o)n=(0,Ze.and)(n,Mj(s,t,r,i));return n}JZ.checkDataTypes=jj;var sOe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?Ze._`{type: ${e}}`:Ze._`{type: ${t}}`};function Fj(e){let t=aOe(e);(0,eOe.reportError)(t,sOe)}JZ.reportTypeError=Fj;function aOe(e){let{gen:t,data:r,schema:i}=e,n=(0,GZ.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}});var t5=F(function(QZ){Object.defineProperty(QZ,"__esModule",{value:!0});QZ.assignDefaults=void 0;var Hd=Xe(),mOe=pt();function gOe(e,t){let{properties:r,items:i}=e.schema;if(t==="object"&&r)for(let n in r)XZ(e,n,r[n].default);else if(t==="array"&&Array.isArray(i))i.forEach((n,o)=>XZ(e,o,n.default))}QZ.assignDefaults=gOe;function XZ(e,t,r){let{gen:i,compositeRule:n,data:o,opts:s}=e;if(r===void 0)return;let a=Hd._`${o}${(0,Hd.getProperty)(t)}`;if(n){(0,mOe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=Hd._`${a} === undefined`;if(s.useDefaults==="empty")c=Hd._`${c} || ${a} === null || ${a} === ""`;i.if(c,Hd._`${a} = ${(0,Hd.stringify)(r)}`)}});var ao=F(function(i5){Object.defineProperty(i5,"__esModule",{value:!0});i5.validateUnion=i5.validateArray=i5.usePattern=i5.callValidateCode=i5.schemaProperties=i5.allSchemaProperties=i5.noPropertyInData=i5.propertyInData=i5.isOwnProperty=i5.hasPropFunc=i5.reportMissingProp=i5.checkMissingProp=i5.checkReportMissingProp=void 0;var Wt=Xe(),zj=pt(),$c=ua(),hOe=pt();function yOe(e,t){let{gen:r,data:i,it:n}=e;r.if(Lj(r,i,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:Wt._`${t}`},!0),e.error()})}i5.checkReportMissingProp=yOe;function vOe({gen:e,data:t,it:{opts:r}},i,n){return(0,Wt.or)(...i.map((o)=>(0,Wt.and)(Lj(e,t,o,r.ownProperties),Wt._`${n} = ${o}`)))}i5.checkMissingProp=vOe;function wOe(e,t){e.setParams({missingProperty:t},!0),e.error()}i5.reportMissingProp=wOe;function r5(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Wt._`Object.prototype.hasOwnProperty`})}i5.hasPropFunc=r5;function Uj(e,t,r){return Wt._`${r5(e)}.call(${t}, ${r})`}i5.isOwnProperty=Uj;function bOe(e,t,r,i){let n=Wt._`${t}${(0,Wt.getProperty)(r)} !== undefined`;return i?Wt._`${n} && ${Uj(e,t,r)}`:n}i5.propertyInData=bOe;function Lj(e,t,r,i){let n=Wt._`${t}${(0,Wt.getProperty)(r)} === undefined`;return i?(0,Wt.or)(n,(0,Wt.not)(Uj(e,t,r))):n}i5.noPropertyInData=Lj;function n5(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}i5.allSchemaProperties=n5;function kOe(e,t){return n5(t).filter((r)=>!(0,zj.alwaysValidSchema)(e,t[r]))}i5.schemaProperties=kOe;function SOe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:o},it:s},a,c,l){let u=l?Wt._`${e}, ${t}, ${i}${n}`:t,p=[[$c.default.instancePath,(0,Wt.strConcat)($c.default.instancePath,o)],[$c.default.parentData,s.parentData],[$c.default.parentDataProperty,s.parentDataProperty],[$c.default.rootData,$c.default.rootData]];if(s.opts.dynamicRef)p.push([$c.default.dynamicAnchors,$c.default.dynamicAnchors]);let d=Wt._`${u}, ${r.object(...p)}`;return c!==Wt.nil?Wt._`${a}.call(${c}, ${d})`:Wt._`${a}(${d})`}i5.callValidateCode=SOe;var $Oe=Wt._`new RegExp`;function xOe({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:n}=t.code,o=n(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:Wt._`${n.code==="new RegExp"?$Oe:(0,hOe.useFunc)(e,n)}(${r}, ${i})`})}i5.usePattern=xOe;function POe(e){let{gen:t,data:r,keyword:i,it:n}=e,o=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(o,!0),s(()=>t.break()),o;function s(a){let c=t.const("len",Wt._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:i,dataProp:l,dataPropType:zj.Type.Num},o),t.if((0,Wt.not)(o),a)})}}i5.validateArray=POe;function COe(e){let{gen:t,schema:r,keyword:i,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,zj.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let u=e.subschema({keyword:i,schemaProp:l,compositeRule:!0},a);if(t.assign(s,Wt._`${s} || ${a}`),!e.mergeValidEvaluated(u,a))t.if((0,Wt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}i5.validateUnion=COe});var u5=F(function(c5){Object.defineProperty(c5,"__esModule",{value:!0});c5.validateKeywordUsage=c5.validSchemaType=c5.funcKeywordCode=c5.macroKeywordCode=void 0;var Hn=Xe(),ou=ua(),zOe=ao(),UOe=Xh();function LOe(e,t){let{gen:r,keyword:i,schema:n,parentSchema:o,it:s}=e,a=t.macro.call(s.self,n,o,s),c=a5(r,i,a);if(s.opts.validateSchema!==!1)s.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Hn.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}c5.macroKeywordCode=LOe;function BOe(e,t){var r;let{gen:i,keyword:n,schema:o,parentSchema:s,$data:a,it:c}=e;VOe(c,t);let l=!a&&t.compile?t.compile.call(c.self,o,s,c):t.validate,u=a5(i,n,l),p=i.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1){if(g(),t.modifying)s5(e);h(()=>e.error())}else{let y=t.async?f():m();if(t.modifying)s5(e);h(()=>qOe(e,y))}}function f(){let y=i.let("ruleErrs",null);return i.try(()=>g(Hn._`await `),(v)=>i.assign(p,!1).if(Hn._`${v} instanceof ${c.ValidationError}`,()=>i.assign(y,Hn._`${v}.errors`),()=>i.throw(v))),y}function m(){let y=Hn._`${u}.errors`;return i.assign(y,null),g(Hn.nil),y}function g(y=t.async?Hn._`await `:Hn.nil){let v=c.opts.passContext?ou.default.this:ou.default.self,w=!(("compile"in t)&&!a||t.schema===!1);i.assign(p,Hn._`${y}${(0,zOe.callValidateCode)(e,u,v,w)}`,t.modifying)}function h(y){var v;i.if((0,Hn.not)((v=t.valid)!==null&&v!==void 0?v:p),y)}}c5.funcKeywordCode=BOe;function s5(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,Hn._`${i.parentData}[${i.parentDataProperty}]`))}function qOe(e,t){let{gen:r}=e;r.if(Hn._`Array.isArray(${t})`,()=>{r.assign(ou.default.vErrors,Hn._`${ou.default.vErrors} === null ? ${t} : ${ou.default.vErrors}.concat(${t})`).assign(ou.default.errors,Hn._`${ou.default.vErrors}.length`),(0,UOe.extendErrors)(e)},()=>e.error())}function VOe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function a5(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Hn.stringify)(r)})}function WOe(e,t,r=!1){return!t.length||t.some((i)=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||r&&typeof e>"u")}c5.validSchemaType=WOe;function HOe({schema:e,opts:t,self:r,errSchemaPath:i},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw Error("ajv implementation error");let s=n.dependencies;if(s===null||s===void 0?void 0:s.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}c5.validateKeywordUsage=HOe});var m5=F(function(d5){Object.defineProperty(d5,"__esModule",{value:!0});d5.extendSubschemaMode=d5.extendSubschemaData=d5.getSubschema=void 0;var us=Xe(),p5=pt();function JOe(e,{keyword:t,schemaProp:r,schema:i,schemaPath:n,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&i!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:us._`${e.schemaPath}${(0,us.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:us._`${e.schemaPath}${(0,us.getProperty)(t)}${(0,us.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,p5.escapeFragment)(r)}`}}if(i!==void 0){if(n===void 0||o===void 0||s===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:n,topSchemaRef:s,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')}d5.getSubschema=JOe;function YOe(e,t,{dataProp:r,dataPropType:i,data:n,dataTypes:o,propertyName:s}){if(n!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:u,opts:p}=t,d=a.let("data",us._`${t.data}${(0,us.getProperty)(r)}`,!0);c(d),e.errorPath=us.str`${l}${(0,p5.getErrorPath)(r,i,p.jsPropertySyntax)}`,e.parentDataProperty=us._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(n!==void 0){let l=n instanceof us.Name?n:a.let("data",n,!0);if(c(l),s!==void 0)e.propertyName=s}if(o)e.dataTypes=o;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}d5.extendSubschemaData=YOe;function XOe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:o}){if(i!==void 0)e.compositeRule=i;if(n!==void 0)e.createErrors=n;if(o!==void 0)e.allErrors=o;e.jtdDiscriminator=t,e.jtdMetadata=r}d5.extendSubschemaMode=XOe});var Bj=F(function(rbt,g5){g5.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var y5=F(function(nbt,h5){var xc=h5.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};x$(t,i,n,e,"",e)};xc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};xc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};xc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};xc.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function x$(e,t,r,i,n,o,s,a,c,l){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,o,s,a,c,l);for(var u in i){var p=i[u];if(Array.isArray(p)){if(u in xc.arrayKeywords)for(var d=0;d<p.length;d++)x$(e,t,r,p[d],n+"/"+u+"/"+d,o,n,u,i,d)}else if(u in xc.propsKeywords){if(p&&typeof p=="object")for(var f in p)x$(e,t,r,p[f],n+"/"+u+"/"+tDe(f),o,n,u,i,f)}else if(u in xc.keywords||e.allKeys&&!(u in xc.skipKeywords))x$(e,t,r,p,n+"/"+u,o,n,u,i)}r(i,n,o,s,a,c,l)}}function tDe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ey=F(function(k5){Object.defineProperty(k5,"__esModule",{value:!0});k5.getSchemaRefs=k5.resolveUrl=k5.normalizeId=k5._getFullPath=k5.getFullPath=k5.inlineRef=void 0;var rDe=pt(),nDe=Bj(),iDe=y5(),oDe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sDe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!qj(e);if(!t)return!1;return v5(e)<=t}k5.inlineRef=sDe;var aDe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function qj(e){for(let t in e){if(aDe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(qj))return!0;if(typeof r=="object"&&qj(r))return!0}return!1}function v5(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,oDe.has(r))continue;if(typeof e[r]=="object")(0,rDe.eachItem)(e[r],(i)=>t+=v5(i));if(t===1/0)return 1/0}return t}function w5(e,t="",r){if(r!==!1)t=Gd(t);let i=e.parse(t);return b5(e,i)}k5.getFullPath=w5;function b5(e,t){return e.serialize(t).split("#")[0]+"#"}k5._getFullPath=b5;var cDe=/#\/?$/;function Gd(e){return e?e.replace(cDe,""):""}k5.normalizeId=Gd;function lDe(e,t,r){return r=Gd(r),e.resolve(t,r)}k5.resolveUrl=lDe;var uDe=/^[a-z_][-a-z0-9._]*$/i;function pDe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:i}=this.opts,n=Gd(e[r]||t),o={"":n},s=w5(i,n,!1),a={},c=new Set;return iDe(e,{allKeys:!0},(p,d,f,m)=>{if(m===void 0)return;let g=s+d,h=o[m];if(typeof p[r]=="string")h=y.call(this,p[r]);v.call(this,p.$anchor),v.call(this,p.$dynamicAnchor),o[d]=h;function y(w){let x=this.opts.uriResolver.resolve;if(w=Gd(h?x(h,w):w),c.has(w))throw u(w);c.add(w);let b=this.refs[w];if(typeof b=="string")b=this.refs[b];if(typeof b=="object")l(p,b.schema,w);else if(w!==Gd(g))if(w[0]==="#")l(p,a[w],w),a[w]=p;else this.refs[w]=g;return w}function v(w){if(typeof w=="string"){if(!uDe.test(w))throw Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),a;function l(p,d,f){if(d!==void 0&&!nDe(p,d))throw u(f)}function u(p){return Error(`reference "${p}" resolves to more than one schema`)}}k5.getSchemaRefs=pDe});var ny=F(function(j5){Object.defineProperty(j5,"__esModule",{value:!0});j5.getData=j5.KeywordCxt=j5.validateFunctionCode=void 0;var _5=UZ(),$5=Qh(),Wj=Nj(),P$=Qh(),yDe=t5(),ry=u5(),Vj=m5(),ke=Xe(),Le=ua(),vDe=ey(),pa=pt(),ty=Xh();function wDe(e){if(I5(e)){if(A5(e),R5(e)){SDe(e);return}}E5(e,()=>(0,_5.topBoolOrEmptySchema)(e))}j5.validateFunctionCode=wDe;function E5({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},o){if(n.code.es5)e.func(t,ke._`${Le.default.data}, ${Le.default.valCxt}`,i.$async,()=>{e.code(ke._`"use strict"; ${x5(r,n)}`),kDe(e,n),e.code(o)});else e.func(t,ke._`${Le.default.data}, ${bDe(n)}`,i.$async,()=>e.code(x5(r,n)).code(o))}function bDe(e){return ke._`{${Le.default.instancePath}="", ${Le.default.parentData}, ${Le.default.parentDataProperty}, ${Le.default.rootData}=${Le.default.data}${e.dynamicRef?ke._`, ${Le.default.dynamicAnchors}={}`:ke.nil}}={}`}function kDe(e,t){e.if(Le.default.valCxt,()=>{if(e.var(Le.default.instancePath,ke._`${Le.default.valCxt}.${Le.default.instancePath}`),e.var(Le.default.parentData,ke._`${Le.default.valCxt}.${Le.default.parentData}`),e.var(Le.default.parentDataProperty,ke._`${Le.default.valCxt}.${Le.default.parentDataProperty}`),e.var(Le.default.rootData,ke._`${Le.default.valCxt}.${Le.default.rootData}`),t.dynamicRef)e.var(Le.default.dynamicAnchors,ke._`${Le.default.valCxt}.${Le.default.dynamicAnchors}`)},()=>{if(e.var(Le.default.instancePath,ke._`""`),e.var(Le.default.parentData,ke._`undefined`),e.var(Le.default.parentDataProperty,ke._`undefined`),e.var(Le.default.rootData,Le.default.data),t.dynamicRef)e.var(Le.default.dynamicAnchors,ke._`{}`)})}function SDe(e){let{schema:t,opts:r,gen:i}=e;E5(e,()=>{if(r.$comment&&t.$comment)D5(e);if(_De(e),i.let(Le.default.vErrors,null),i.let(Le.default.errors,0),r.unevaluated)$De(e);O5(e),IDe(e)});return}function $De(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",ke._`${r}.evaluated`),t.if(ke._`${e.evaluated}.dynamicProps`,()=>t.assign(ke._`${e.evaluated}.props`,ke._`undefined`)),t.if(ke._`${e.evaluated}.dynamicItems`,()=>t.assign(ke._`${e.evaluated}.items`,ke._`undefined`))}function x5(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?ke._`/*# sourceURL=${r} */`:ke.nil}function xDe(e,t){if(I5(e)){if(A5(e),R5(e)){PDe(e,t);return}}(0,_5.boolOrEmptySchema)(e,t)}function R5({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function I5(e){return typeof e.schema!="boolean"}function PDe(e,t){let{schema:r,gen:i,opts:n}=e;if(n.$comment&&r.$comment)D5(e);EDe(e),RDe(e);let o=i.const("_errs",Le.default.errors);O5(e,o),i.var(t,ke._`${o} === ${Le.default.errors}`)}function A5(e){(0,pa.checkUnknownRules)(e),CDe(e)}function O5(e,t){if(e.opts.jtd)return P5(e,[],!1,t);let r=(0,$5.getSchemaTypes)(e.schema),i=(0,$5.coerceAndCheckDataType)(e,r);P5(e,r,!i,t)}function CDe(e){let{schema:t,errSchemaPath:r,opts:i,self:n}=e;if(t.$ref&&i.ignoreKeywordsWithRef&&(0,pa.schemaHasRulesButRef)(t,n.RULES))n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function _De(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,pa.checkStrictMode)(e,"default is ignored in the schema root")}function EDe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,vDe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function RDe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function D5({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){let o=r.$comment;if(n.$comment===!0)e.code(ke._`${Le.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let s=ke.str`${i}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(ke._`${Le.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function IDe(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:o}=e;if(r.$async)t.if(ke._`${Le.default.errors} === 0`,()=>t.return(Le.default.data),()=>t.throw(ke._`new ${n}(${Le.default.vErrors})`));else{if(t.assign(ke._`${i}.errors`,Le.default.vErrors),o.unevaluated)ADe(e);t.return(ke._`${Le.default.errors} === 0`)}}function ADe({gen:e,evaluated:t,props:r,items:i}){if(r instanceof ke.Name)e.assign(ke._`${t}.props`,r);if(i instanceof ke.Name)e.assign(ke._`${t}.items`,i)}function P5(e,t,r,i){let{gen:n,schema:o,data:s,allErrors:a,opts:c,self:l}=e,{RULES:u}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,pa.schemaHasRulesButRef)(o,u))){n.block(()=>N5(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)ODe(e,t);n.block(()=>{for(let d of u.rules)p(d);p(u.post)});function p(d){if(!(0,Wj.shouldUseGroup)(o,d))return;if(d.type){if(n.if((0,P$.checkDataType)(d.type,s,c.strictNumbers)),C5(e,d),t.length===1&&t[0]===d.type&&r)n.else(),(0,P$.reportTypeError)(e);n.endIf()}else C5(e,d);if(!a)n.if(ke._`${Le.default.errors} === ${i||0}`)}}function C5(e,t){let{gen:r,schema:i,opts:{useDefaults:n}}=e;if(n)(0,yDe.assignDefaults)(e,t.type);r.block(()=>{for(let o of t.rules)if((0,Wj.shouldUseRule)(i,o))N5(e,o.keyword,o.definition,t.type)})}function ODe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(DDe(e,t),!e.opts.allowUnionTypes)TDe(e,t);NDe(e,e.dataTypes)}function DDe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!T5(e.dataTypes,r))Hj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),jDe(e,t)}function TDe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))Hj(e,"use allowUnionTypes to allow union type keyword")}function NDe(e,t){let r=e.self.RULES.all;for(let i in r){let n=r[i];if(typeof n=="object"&&(0,Wj.shouldUseRule)(e.schema,n)){let{type:o}=n.definition;if(o.length&&!o.some((s)=>MDe(t,s)))Hj(e,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function MDe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function T5(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function jDe(e,t){let r=[];for(let i of e.dataTypes)if(T5(t,i))r.push(i);else if(t.includes("integer")&&i==="number")r.push("integer");e.dataTypes=r}function Hj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,pa.checkStrictMode)(e,t,e.opts.strictTypes)}class Gj{constructor(e,t,r){if((0,ry.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,pa.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",M5(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ry.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",Le.default.errors)}result(e,t,r){this.failResult((0,ke.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,ke.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(ke._`${t} !== undefined && (${(0,ke.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?ty.reportExtraError:ty.reportError)(this,this.def.error,t)}$dataError(){(0,ty.reportError)(this,this.def.$dataError||ty.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,ty.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=ke.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=ke.nil,t=ke.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:n,def:o}=this;if(r.if((0,ke.or)(ke._`${i} === undefined`,t)),e!==ke.nil)r.assign(e,!0);if(n.length||o.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==ke.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,ke.or)(o(),s());function o(){if(r.length){if(!(t instanceof ke.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return ke._`${(0,P$.checkDataTypes)(a,t,n.opts.strictNumbers,P$.DataType.Wrong)}`}return ke.nil}function s(){if(i.validateSchema){let a=e.scopeValue("validate$data",{ref:i.validateSchema});return ke._`!${a}(${t})`}return ke.nil}}subschema(e,t){let r=(0,Vj.getSubschema)(this.it,e);(0,Vj.extendSubschemaData)(r,this.it,e),(0,Vj.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return xDe(i,t),i}mergeEvaluated(e,t){let{it:r,gen:i}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=pa.mergeEvaluated.props(i,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=pa.mergeEvaluated.items(i,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(t,()=>this.mergeEvaluated(e,ke.Name)),!0}}j5.KeywordCxt=Gj;function N5(e,t,r,i){let n=new Gj(e,r,t);if("code"in r)r.code(n,i);else if(n.$data&&r.validate)(0,ry.funcKeywordCode)(n,r);else if("macro"in r)(0,ry.macroKeywordCode)(n,r);else if(r.compile||r.validate)(0,ry.funcKeywordCode)(n,r)}var FDe=/^\/(?:[^~]|~0|~1)*$/,zDe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function M5(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,o;if(e==="")return Le.default.rootData;if(e[0]==="/"){if(!FDe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);n=e,o=Le.default.rootData}else{let l=zDe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let u=+l[1];if(n=l[2],n==="#"){if(u>=t)throw Error(c("property/index",u));return i[t-u]}if(u>t)throw Error(c("data",u));if(o=r[t-u],!n)return o}let s=o,a=n.split("/");for(let l of a)if(l)o=ke._`${o}${(0,ke.getProperty)((0,pa.unescapeJsonPointer)(l))}`,s=ke._`${s} && ${o}`;return s;function c(l,u){return`Cannot access ${l} ${u} levels up, current level is ${t}`}}j5.getData=M5});var C$=F(function(U5){Object.defineProperty(U5,"__esModule",{value:!0});class z5 extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}U5.default=z5});var iy=F(function(B5){Object.defineProperty(B5,"__esModule",{value:!0});var Zj=ey();class L5 extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,Zj.resolveUrl)(e,t,r),this.missingSchema=(0,Zj.normalizeId)((0,Zj.getFullPath)(e,this.missingRef))}}B5.default=L5});var E$=F(function(W5){Object.defineProperty(W5,"__esModule",{value:!0});W5.resolveSchema=W5.getCompilingSchema=W5.resolveRef=W5.compileSchema=W5.SchemaEnv=void 0;var To=Xe(),VDe=C$(),su=ua(),No=ey(),q5=pt(),WDe=ny();class oy{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,No.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}W5.SchemaEnv=oy;function Jj(e){let t=V5.call(this,e);if(t)return t;let r=(0,No.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,s=new To.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o}),a;if(e.$async)a=s.scopeValue("Error",{ref:VDe.default,code:To._`require("ajv/dist/runtime/validation_error").default`});let c=s.scopeName("validate");e.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:su.default.data,parentData:su.default.parentData,parentDataProperty:su.default.parentDataProperty,dataNames:[su.default.data],dataPathArr:[To.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,To.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:To.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:To._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),(0,WDe.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();if(u=`${s.scopeRefs(su.default.scope)}return ${p}`,this.opts.code.process)u=this.opts.code.process(u,e);let f=Function(`${su.default.self}`,`${su.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async)f.$async=!0;if(this.opts.code.source===!0)f.source={validateName:c,validateCode:p,scopeValues:s._values};if(this.opts.unevaluated){let{props:m,items:g}=l;if(f.evaluated={props:m instanceof To.Name?void 0:m,items:g instanceof To.Name?void 0:g,dynamicProps:m instanceof To.Name,dynamicItems:g instanceof To.Name},f.source)f.source.evaluated=(0,To.stringify)(f.evaluated)}return e.validate=f,e}catch(p){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw p}finally{this._compilations.delete(e)}}W5.compileSchema=Jj;function HDe(e,t,r){var i;r=(0,No.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let o=KDe.call(this,e,r);if(o===void 0){let s=(i=e.localRefs)===null||i===void 0?void 0:i[r],{schemaId:a}=this.opts;if(s)o=new oy({schema:s,schemaId:a,root:e,baseId:t})}if(o===void 0)return;return e.refs[r]=GDe.call(this,o)}W5.resolveRef=HDe;function GDe(e){if((0,No.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:Jj.call(this,e)}function V5(e){for(let t of this._compilations)if(ZDe(t,e))return t}W5.getCompilingSchema=V5;function ZDe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function KDe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||_$.call(this,e,t)}function _$(e,t){let r=this.opts.uriResolver.parse(t),i=(0,No._getFullPath)(this.opts.uriResolver,r),n=(0,No.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return Kj.call(this,r,e);let o=(0,No.normalizeId)(i),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=_$.call(this,e,s);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return Kj.call(this,r,a)}if(typeof(s===null||s===void 0?void 0:s.schema)!=="object")return;if(!s.validate)Jj.call(this,s);if(o===(0,No.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];if(l)n=(0,No.resolveUrl)(this.opts.uriResolver,n,l);return new oy({schema:a,schemaId:c,root:e,baseId:n})}return Kj.call(this,r,s)}W5.resolveSchema=_$;var JDe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Kj(e,{baseId:t,schema:r,root:i}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,q5.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!JDe.has(a)&&l)t=(0,No.resolveUrl)(this.opts.uriResolver,t,l)}let o;if(typeof r!="boolean"&&r.$ref&&!(0,q5.schemaHasRulesButRef)(r,this.RULES)){let a=(0,No.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=_$.call(this,i,a)}let{schemaId:s}=this.opts;if(o=o||new oy({schema:r,schemaId:s,root:i,baseId:t}),o.schema!==o.root.schema)return o;return}});var G5=F(function(lbt,tTe){tTe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var rF=F(function(ubt,eK){var rTe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Xj=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),nTe=RegExp.prototype.test.bind(/^\d*$/u),au=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Qj=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),K5=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),eF=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),iTe=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),pi=Array(256);for(let t=0;t<256;t++)pi[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function Pn(e){if(e<2048)return pi[192|e>>6]+pi[128|e&63];if(e<65536)return pi[224|e>>12]+pi[128|e>>6&63]+pi[128|e&63];return pi[240|e>>18]+pi[128|e>>12&63]+pi[128|e>>6&63]+pi[128|e&63]}function oTe(e){let t="",r=0,i=0;for(i=0;i<e.length;i++){if(r=e[i].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(r=e[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}var sTe=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),aTe=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),cTe=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),lTe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function uTe(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(cTe(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&au(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Z5(e){let t=-1,r=0,i=-1,n=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(i===-1)i=a;if(n++,n>r)r=n,t=i}else i=-1,n=0;if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),s=e.slice(t+r).join(":");return o+"::"+s}function pTe(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(i.length===1&&i[0]==="")i.length=0}let n=r.concat(i),o=0;for(let a=0;a<n.length;a++){let c=n[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==n.length-1||t!==-1&&i.length===0||!Xj(c))return;o+=2;continue}if(!sTe(c))return;n[a]=parseInt(c,16).toString(16),o++}if(t===-1){if(o!==8)return;return Z5(n)}if(o>=8)return;let s=n.slice(0,r.length);for(let a=o;a<8;a++)s.push("0");for(let a=r.length;a<n.length;a++)s.push(n[a]);return Z5(s)}function Yj(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&aTe(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(dTe(i,":")<2)return{host:e,isIPV6:!1,error:t};let n="",o=i.indexOf("%");if(o!==-1){let a=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(n=i.slice(o+a),!uTe(n))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}let s=pTe(i);if(s===void 0)return{host:e,isIPV6:!1,error:!0};return{host:s+(n?"%"+n:""),escapedHost:s+(n?"%25"+n:""),isIPV6:!0}}function dTe(e,t){let r=0;for(let i=0;i<e.length;i++)if(e[i]===t)r++;return r}function fTe(e){let t=e,r=[],i=-1,n=0;while(n=t.length){if(n===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(n===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(n===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((i=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")}var mTe={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},gTe=/[@/?#:]/g,hTe=/[@/?#]/g;function J5(e,t){let r=t?hTe:gTe;return r.lastIndex=0,e.replace(r,(i)=>mTe[i])}function Y5(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){let n=e.slice(i+1,i+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(t&&Qj(s))r+=s;else r+="%"+o;i+=2;continue}}r+=e[i]}return r}function yTe(e){let t="";for(let r=0;r<e.length;r++){let i=e[r];if(i==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(s!=="."&&Qj(s))t+=s;else t+="%"+o;r+=2;continue}}if(K5(i))t+=i;else{let n=e.charCodeAt(r);if(n<128)t+=Q5(n)?i:pi[n];else if(n<55296||n>57343)t+=Pn(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=Pn(65536+(n-55296<<10)+(o-56320)),r++;else t+=Pn(65533)}else t+=Pn(65533)}}return t}function vTe(e,t=!1){let r="",i=t&&e[0]!=="/";for(let n=0;n<e.length;n++){let o=e[n];if(o==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(au(s)){r+="%"+s.toUpperCase(),n+=2;continue}}if(o==="/")i=!1;if(K5(o)&&(o!==":"||!i))r+=o;else{let s=e.charCodeAt(n);if(s<128)r+=pi[s];else if(s<55296||s>57343)r+=Pn(s);else if(s<=56319&&n+1<e.length){let a=e.charCodeAt(n+1);if(a>=56320&&a<=57343)r+=Pn(65536+(s-55296<<10)+(a-56320)),n++;else r+=Pn(65533)}else r+=Pn(65533)}}return r}function tF(e,t){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(n==="%"&&i+2<e.length){let o=e.slice(i+1,i+3);if(au(o)){r+="%"+o.toUpperCase(),i+=2;continue}}if(t(n))r+=n;else{let o=e.charCodeAt(i);if(o<128)r+=pi[o];else if(o<55296||o>57343)r+=Pn(o);else if(o<=56319&&i+1<e.length){let s=e.charCodeAt(i+1);if(s>=56320&&s<=57343)r+=Pn(65536+(o-55296<<10)+(s-56320)),i++;else r+=Pn(65533)}else r+=Pn(65533)}}return r}function X5(e){return tF(e,iTe)}function wTe(e){return tF(e,eF)}function bTe(e){return tF(e,eF)}function Q5(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function kTe(e){let t="";for(let r=0;r<e.length;r++){let i=e[r];if(i==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(Qj(s))t+=s;else t+="%"+o;r+=2;continue}}if(eF(i))t+=i;else{let n=e.charCodeAt(r);if(n<128)t+=Q5(n)?i:pi[n];else if(n<55296||n>57343)t+=Pn(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=Pn(65536+(n-55296<<10)+(o-56320)),r++;else t+=Pn(65533)}else t+=Pn(65533)}}return t}function STe(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(au(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function $Te(e){let t=[];if(e.userinfo!==void 0)t.push(X5(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!Xj(r)){let i=Yj(r);if(i.isIPV6!==!0&&i.isIPVFuture!==!0)r=Y5(r,!0),i=Yj(r);if(i.isIPV6===!0||i.isIPVFuture===!0)r=`[${i.escapedHost}]`;else r=J5(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!nTe(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}eK.exports={nonSimpleDomain:lTe,recomposeAuthority:$Te,reescapeHostDelimiters:J5,normalizePercentEncoding:Y5,normalizePathEncoding:yTe,serializePathEncoding:vTe,normalizeQueryFragmentEncoding:kTe,encodeUserinfo:X5,encodeQuery:wTe,encodeFragment:bTe,escapePreservingEscapes:STe,removeDotSegments:fTe,isIPv4:Xj,isUUID:rTe,normalizeIPv6:Yj,stringArrayToHexStripped:oTe}});var oK=F(function(pbt,iK){var{isUUID:xTe}=rF(),PTe=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,CTe=["http","https","ws","wss","urn","urn:uuid"];function _Te(e){return CTe.indexOf(e)!==-1}function nF(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function tK(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function rK(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function ETe(e){return e.secure=nF(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function RTe(e){if(e.port===(nF(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function ITe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(PTe);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${i}:${t.nid||e.nid}`,o=iF(n);if(e.path=void 0,o)e=o.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function ATe(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),n=`${r}:${t.nid||i}`,o=iF(n);if(o)e=o.serialize(e,t);let s=e,a=e.nss;return s.path=`${i||t.nid}:${a}`,t.skipEscape=!0,s}function OTe(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!xTe(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function DTe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var nK={scheme:"http",domainHost:!0,parse:tK,serialize:rK},TTe={scheme:"https",domainHost:nK.domainHost,parse:tK,serialize:rK},R$={scheme:"ws",domainHost:!0,parse:ETe,serialize:RTe},NTe={scheme:"wss",domainHost:R$.domainHost,parse:R$.parse,serialize:R$.serialize},MTe={scheme:"urn",parse:ITe,serialize:ATe,skipNormalize:!0},jTe={scheme:"urn:uuid",parse:OTe,serialize:DTe,skipNormalize:!0},I$={http:nK,https:TTe,ws:R$,wss:NTe,urn:MTe,"urn:uuid":jTe};Object.setPrototypeOf(I$,null);function iF(e){return e&&(I$[e]||I$[e.toLowerCase()])||void 0}iK.exports={wsIsSecure:nF,SCHEMES:I$,isValidSchemeName:_Te,getSchemeHandler:iF}});var yK=F(function(dbt,D$){var{normalizeIPv6:uK,removeDotSegments:ay,recomposeAuthority:FTe,normalizePercentEncoding:oF,normalizePathEncoding:zTe,serializePathEncoding:sK,normalizeQueryFragmentEncoding:aK,encodeQuery:UTe,encodeFragment:LTe,reescapeHostDelimiters:BTe,isIPv4:pK,nonSimpleDomain:qTe}=rF(),{SCHEMES:dK,getSchemeHandler:sF}=oK(),fK=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function cK(e){let t=unescape(String(e));if(!fK.test(t))throw TypeError("URI scheme is malformed.");return t}function VTe(e,t){if(typeof e==="string")e=XTe(e,t);else if(typeof e==="object")e=O$(cu(e,t),t);return e}function WTe(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=A$(e,i),{parsed:u,malformedAuthorityOrPort:p,malformedPercentEncoding:d,malformedSchemeSpecific:f,malformedHost:m,malformedScheme:g}=A$(t,i);if(o||p||s||d||a||f||c||m||l||g)throw Error(n.error||u.error||"URI is malformed.");let h=mK(n,u,i,!0),y=sF(r&&r.scheme||h.scheme),v=h.host,w=v!==void 0&&v!==""&&(pK(v)||uK(v).isIPV6);gK(h,r||{},y,w);let x=v&&v.indexOf("%")!==-1&&!/\P{ASCII}/u.test(v);if(h.error&&!x)throw Error(h.error);return i.skipEscape=!0,cu(h,i)}function mK(e,t,r,i){let n={};if(!i)e=O$(cu(e,r),r),t=O$(cu(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ay(t.path||""),n.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ay(t.path||""),n.query=t.query;else{if(!t.path)if(n.path=e.path,t.query!==void 0)n.query=t.query;else n.query=e.query;else{if(t.path[0]==="/")n.path=ay(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)n.path="/"+t.path;else if(!e.path)n.path=t.path;else n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;n.path=ay(n.path)}n.query=t.query}n.userinfo=e.userinfo,n.host=e.host,n.port=e.port}n.scheme=e.scheme}return n.fragment=t.fragment,n}function HTe(e,t,r){let i=lK(e,r),n=lK(t,r);return i!==void 0&&n!==void 0&&i===n}function cu(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),n=[];if(r.scheme)r.scheme=cK(r.scheme);let o=sF(i.scheme||r.scheme);if(o&&o.serialize)o.serialize(r,i);let s=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!i.skipEscape&&r.scheme===void 0&&!s;if(r.path!==void 0)if(!i.skipEscape)r.path=sK(r.path,a);else r.path=oF(r.path);if(i.reference!=="suffix"&&r.scheme)r.scheme=cK(r.scheme),n.push(r.scheme,":");let c=FTe(r);if(c!==void 0){if(i.reference!=="suffix")n.push("//");if(n.push(c),r.path&&r.path[0]!=="/")n.push("/")}if(r.path!==void 0){let l=r.path;if(!i.absolutePath&&(!o||!o.absolutePath))l=ay(l);if(a)l=sK(l,!0);if(c===void 0&&l[0]==="/"&&l[1]==="/")l="/%2F"+l.slice(2);n.push(l)}if(r.query!==void 0)n.push("?",UTe(r.query));if(r.fragment!==void 0)n.push("#",LTe(r.fragment));return n.join("")}var GTe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,ZTe=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,KTe=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function JTe(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function sy(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function aF(e){return e[0]==="["&&e[e.length-1]==="]"}function YTe(e){let t=e[4];return sy(e[3])||t!==void 0&&!aF(t)&&sy(t)||sy(e[6])||sy(e[7])||sy(e[8])}function gK(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!aF(e.host)&&(t.domainHost||r&&r.domainHost)&&i===!1&&qTe(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(n){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function A$(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,o=!1,s=!1,a=!1,c=!1,l=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let p=e.match(ZTe);if(p!==null&&p[1].indexOf("\\")!==-1)i.error="URI authority must not contain a literal backslash.",n=!0;let d=e.match(KTe);if(d!==null){let m=d[1],g=m.replace(/[\t\n\r]/g,"");if(g.length>=2){if(g.slice(0,2)!=="//")i.error=i.error||"URI authority must not contain a literal backslash.",n=!0;else if(m.length!==g.length)i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0}}let f=e.match(GTe);if(f){if(i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0){let h=unescape(i.scheme);if(fK.test(h))i.scheme=h.toLowerCase();else i.error=i.error||"URI scheme is malformed.",l=!0}if(o=YTe(f),o)i.error=i.error||"URI contains malformed percent-encoding.";if(isNaN(i.port))i.port=f[5];let m=JTe(i,f);if(m!==void 0)i.error=i.error||m,n=!0;if(i.host)if(pK(i.host)===!1){let y=aF(i.host),v=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,w=uK(i.host);if(u=w.isIPV6||w.isIPVFuture===!0,c=v&&(!y||w.error===!0),i.host=u?w.host:w.host.toLowerCase(),c)i.error=i.error||"URI host is malformed.",n=!0}else u=!0;if(i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path)i.reference="same-document";else if(i.scheme===void 0)i.reference="relative";else if(i.fragment===void 0)i.reference="absolute";else i.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==i.reference)i.error=i.error||"URI is not a "+r.reference+" reference.";let g=sF(r.scheme||i.scheme);if(!c)a=gK(i,r,g,u);if(e.indexOf("%")!==-1&&i.host!==void 0&&!c){let h=u?i.host:oF(i.host,!0);if(!u)h=oF(h.toLowerCase());i.host=BTe(h,u)}if(!g||g&&!g.skipNormalize){if(i.path)i.path=zTe(i.path);if(i.query)i.query=aK(i.query);if(i.fragment)i.fragment=aK(i.fragment)}if(g&&g.parse){if(g.parse(i,r),g===dK.urn&&i.nid===void 0)s=!0}}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function O$(e,t){return A$(e,t).parsed}function XTe(e,t){return hK(e,t).normalized}function hK(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=A$(e,t);return{normalized:i||n||o||s||a?e:cu(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function lK(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:cu(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=hK(r,t);return n||o||s||a||c?void 0:i}var cF={SCHEMES:dK,normalize:VTe,resolve:WTe,resolveComponent:mK,equal:HTe,serialize:cu,parse:O$};D$.exports=cF;D$.exports.default=cF;D$.exports.fastUri=cF});var bK=F(function(wK){Object.defineProperty(wK,"__esModule",{value:!0});var vK=yK();vK.code='require("ajv/dist/runtime/uri").default';wK.default=vK});var EK=F(function(da){Object.defineProperty(da,"__esModule",{value:!0});da.CodeGen=da.Name=da.nil=da.stringify=da.str=da._=da.KeywordCxt=void 0;var eNe=ny();Object.defineProperty(da,"KeywordCxt",{enumerable:!0,get:function(){return eNe.KeywordCxt}});var Zd=Xe();Object.defineProperty(da,"_",{enumerable:!0,get:function(){return Zd._}});Object.defineProperty(da,"str",{enumerable:!0,get:function(){return Zd.str}});Object.defineProperty(da,"stringify",{enumerable:!0,get:function(){return Zd.stringify}});Object.defineProperty(da,"nil",{enumerable:!0,get:function(){return Zd.nil}});Object.defineProperty(da,"Name",{enumerable:!0,get:function(){return Zd.Name}});Object.defineProperty(da,"CodeGen",{enumerable:!0,get:function(){return Zd.CodeGen}});var tNe=C$(),PK=iy(),rNe=Tj(),cy=E$(),nNe=Xe(),ly=ey(),T$=Qh(),uF=pt(),kK=G5(),iNe=bK(),CK=(e,t)=>new RegExp(e,t);CK.code="new RegExp";var oNe=["removeAdditional","useDefaults","coerceTypes"],sNe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),aNe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},cNe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},SK=200;function lNe(e){var t,r,i,n,o,s,a,c,l,u,p,d,f,m,g,h,y,v,w,x,b,k,A,N,C;let P=e.strict,E=(t=e.code)===null||t===void 0?void 0:t.optimize,O=E===!0||E===void 0?1:E||0,z=(i=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&i!==void 0?i:CK,_=(n=e.uriResolver)!==null&&n!==void 0?n:iNe.default;return{strictSchema:(s=(o=e.strictSchema)!==null&&o!==void 0?o:P)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:P)!==null&&c!==void 0?c:!0,strictTypes:(u=(l=e.strictTypes)!==null&&l!==void 0?l:P)!==null&&u!==void 0?u:"log",strictTuples:(d=(p=e.strictTuples)!==null&&p!==void 0?p:P)!==null&&d!==void 0?d:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:P)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:O,regExp:z}:{optimize:O,regExp:z},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:SK,loopEnum:(h=e.loopEnum)!==null&&h!==void 0?h:SK,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(x=e.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(b=e.addUsedSchema)!==null&&b!==void 0?b:!0,validateSchema:(k=e.validateSchema)!==null&&k!==void 0?k:!0,validateFormats:(A=e.validateFormats)!==null&&A!==void 0?A:!0,unicodeRegExp:(N=e.unicodeRegExp)!==null&&N!==void 0?N:!0,int32range:(C=e.int32range)!==null&&C!==void 0?C:!0,uriResolver:_}}class N${constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...lNe(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new nNe.ValueScope({scope:{},prefixes:sNe,es5:t,lines:r}),this.logger=gNe(e.logger);let i=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,rNe.getRules)(),$K.call(this,aNe,e,"NOT SUPPORTED"),$K.call(this,cNe,e,"DEPRECATED","warn"),this._metaOpts=fNe.call(this),e.formats)pNe.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)dNe.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);uNe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=kK;if(r==="id")i={...kK},i.id=i.$id,delete i.$id;if(t&&e)this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);if(!("$async"in r))this.errors=r.errors;return i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(l,u){await n.call(this,l.$schema);let p=this._addSchema(l,u);return p.validate||o.call(this,p)}async function n(l){if(l&&!this.getSchema(l))await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(u){if(!(u instanceof PK.default))throw u;return s.call(this,u),await a.call(this,u.missingSchema),o.call(this,l)}}function s({missingSchema:l,missingRef:u}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${u} cannot be resolved`)}async function a(l){let u=await c.call(this,l);if(!this.refs[l])await n.call(this,u.$schema);if(!this.refs[l])this.addSchema(u,l,t)}async function c(l){let u=this._loading[l];if(u)return u;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,r,i);return this}let n;if(typeof e==="object"){let{schemaId:o}=this.opts;if(n=e[o],n!==void 0&&typeof n!="string")throw Error(`schema ${o} must be string`)}return t=(0,ly.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw Error(n)}return i}getSchema(e){let t;while(typeof(t=xK.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,i=new cy.SchemaEnv({schema:{},schemaId:r});if(t=cy.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=xK.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,ly.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(yNe.call(this,r,t),!t)return(0,uF.eachItem)(r,(n)=>lF.call(this,n)),this;wNe.call(this,t);let i={...t,type:(0,T$.getJSONTypes)(t.type),schemaType:(0,T$.getJSONTypes)(t.schemaType)};return(0,uF.eachItem)(r,i.type.length===0?(n)=>lF.call(this,n,i):(n)=>i.type.forEach((o)=>lF.call(this,n,i,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let i=r.rules.findIndex((n)=>n.keyword===e);if(i>=0)r.rules.splice(i,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((i)=>`${r}${i.instancePath} ${i.message}`).reduce((i,n)=>i+t+n)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of t){let n=i.split("/").slice(1),o=e;for(let s of n)o=o[s];for(let s in r){let a=r[s];if(typeof a!="object")continue;let{$data:c}=a.definition,l=o[s];if(c&&l)o[s]=_K(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];if(!t||t.test(r)){if(typeof i=="string")delete e[r];else if(i&&!i.meta)this._cache.delete(i.schema),delete e[r]}}}_addSchema(e,t,r,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,ly.normalizeId)(o||r);let c=ly.getSchemaRefs.call(this,e,r);if(a=new cy.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),n&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(i)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else cy.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{cy.compileSchema.call(this,e)}finally{this.opts=t}}}N$.ValidationError=tNe.default;N$.MissingRefError=PK.default;da.default=N$;function $K(e,t,r,i="error"){for(let n in e){let o=n;if(o in t)this.logger[i](`${r}: option ${n}. ${e[o]}`)}}function xK(e){return e=(0,ly.normalizeId)(e),this.schemas[e]||this.refs[e]}function uNe(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function pNe(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function dNe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function fNe(){let e={...this.opts};for(let t of oNe)delete e[t];return e}var mNe={log(){},warn(){},error(){}};function gNe(e){if(e===!1)return mNe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var hNe=/^[a-z_$][a-z0-9_$:-]*$/i;function yNe(e,t){let{RULES:r}=this;if((0,uF.eachItem)(e,(i)=>{if(r.keywords[i])throw Error(`Keyword ${i} is already defined`);if(!hNe.test(i))throw Error(`Keyword ${i} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function lF(e,t,r){var i;let n=t===null||t===void 0?void 0:t.post;if(r&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=n?o.post:o.rules.find(({type:c})=>c===r);if(!s)s={type:r,rules:[]},o.rules.push(s);if(o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,T$.getJSONTypes)(t.type),schemaType:(0,T$.getJSONTypes)(t.schemaType)}};if(t.before)vNe.call(this,s,a,t.before);else s.rules.push(a);o.all[e]=a,(i=t.implements)===null||i===void 0||i.forEach((c)=>this.addKeyword(c))}function vNe(e,t,r){let i=e.rules.findIndex((n)=>n.keyword===r);if(i>=0)e.rules.splice(i,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function wNe(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=_K(t);e.validateSchema=this.compile(t,!0)}var bNe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _K(e){return{anyOf:[e,bNe]}}});var IK=F(function(RK){Object.defineProperty(RK,"__esModule",{value:!0});var $Ne={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};RK.default=$Ne});var MK=F(function(TK){Object.defineProperty(TK,"__esModule",{value:!0});TK.callRef=TK.getValidate=void 0;var PNe=iy(),AK=ao(),di=Xe(),Kd=ua(),OK=E$(),M$=pt(),CNe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:i}=e,{baseId:n,schemaEnv:o,validateName:s,opts:a,self:c}=i,{root:l}=o;if((r==="#"||r==="#/")&&n===l.baseId)return p();let u=OK.resolveRef.call(c,l,n,r);if(u===void 0)throw new PNe.default(i.opts.uriResolver,n,r);if(u instanceof OK.SchemaEnv)return d(u);return f(u);function p(){if(o===l)return j$(e,s,o,o.$async);let m=t.scopeValue("root",{ref:l});return j$(e,di._`${m}.validate`,l,l.$async)}function d(m){let g=DK(e,m);j$(e,g,m,m.$async)}function f(m){let g=t.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,di.stringify)(m)}:{ref:m}),h=t.name("valid"),y=e.subschema({schema:m,dataTypes:[],schemaPath:di.nil,topSchemaRef:g,errSchemaPath:r},h);e.mergeEvaluated(y),e.ok(h)}}};function DK(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):di._`${r.scopeValue("wrapper",{ref:t})}.validate`}TK.getValidate=DK;function j$(e,t,r,i){let{gen:n,it:o}=e,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Kd.default.this:di.nil;if(i)u();else p();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let m=n.let("valid");n.try(()=>{if(n.code(di._`await ${(0,AK.callValidateCode)(e,t,l)}`),f(t),!s)n.assign(m,!0)},(g)=>{if(n.if(di._`!(${g} instanceof ${o.ValidationError})`,()=>n.throw(g)),d(g),!s)n.assign(m,!1)}),e.ok(m)}function p(){e.result((0,AK.callValidateCode)(e,t,l),()=>f(t),()=>d(t))}function d(m){let g=di._`${m}.errors`;n.assign(Kd.default.vErrors,di._`${Kd.default.vErrors} === null ? ${g} : ${Kd.default.vErrors}.concat(${g})`),n.assign(Kd.default.errors,di._`${Kd.default.vErrors}.length`)}function f(m){var g;if(!o.opts.unevaluated)return;let h=(g=r===null||r===void 0?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(h&&!h.dynamicProps){if(h.props!==void 0)o.props=M$.mergeEvaluated.props(n,h.props,o.props)}else{let y=n.var("props",di._`${m}.evaluated.props`);o.props=M$.mergeEvaluated.props(n,y,o.props,di.Name)}if(o.items!==!0)if(h&&!h.dynamicItems){if(h.items!==void 0)o.items=M$.mergeEvaluated.items(n,h.items,o.items)}else{let y=n.var("items",di._`${m}.evaluated.items`);o.items=M$.mergeEvaluated.items(n,y,o.items,di.Name)}}}TK.callRef=j$;TK.default=CNe});var FK=F(function(jK){Object.defineProperty(jK,"__esModule",{value:!0});var RNe=IK(),INe=MK(),ANe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",RNe.default,INe.default];jK.default=ANe});var UK=F(function(zK){Object.defineProperty(zK,"__esModule",{value:!0});var F$=Xe(),Pc=F$.operators,z$={maximum:{okStr:"<=",ok:Pc.LTE,fail:Pc.GT},minimum:{okStr:">=",ok:Pc.GTE,fail:Pc.LT},exclusiveMaximum:{okStr:"<",ok:Pc.LT,fail:Pc.GTE},exclusiveMinimum:{okStr:">",ok:Pc.GT,fail:Pc.LTE}},DNe={message:({keyword:e,schemaCode:t})=>F$.str`must be ${z$[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>F$._`{comparison: ${z$[e].okStr}, limit: ${t}}`},TNe={keyword:Object.keys(z$),type:"number",schemaType:"number",$data:!0,error:DNe,code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data(F$._`${r} ${z$[t].fail} ${i} || isNaN(${r})`)}};zK.default=TNe});var BK=F(function(LK){Object.defineProperty(LK,"__esModule",{value:!0});var uy=Xe(),MNe={message:({schemaCode:e})=>uy.str`must be multiple of ${e}`,params:({schemaCode:e})=>uy._`{multipleOf: ${e}}`},jNe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:MNe,code(e){let{gen:t,data:r,schemaCode:i,it:n}=e,o=n.opts.multipleOfPrecision,s=t.let("res"),a=o?uy._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:uy._`${s} !== parseInt(${s})`;e.fail$data(uy._`(${i} === 0 || (${s} = ${r}/${i}, ${a}))`)}};LK.default=jNe});var WK=F(function(VK){Object.defineProperty(VK,"__esModule",{value:!0});function qK(e){let t=e.length,r=0,i=0,n;while(i<t)if(r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t){if(n=e.charCodeAt(i),(n&64512)===56320)i++}return r}VK.default=qK;qK.code='require("ajv/dist/runtime/ucs2length").default'});var GK=F(function(HK){Object.defineProperty(HK,"__esModule",{value:!0});var lu=Xe(),UNe=pt(),LNe=WK(),BNe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return lu.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>lu._`{limit: ${e}}`},qNe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:BNe,code(e){let{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?lu.operators.GT:lu.operators.LT,s=n.opts.unicode===!1?lu._`${r}.length`:lu._`${(0,UNe.useFunc)(e.gen,LNe.default)}(${r})`;e.fail$data(lu._`${s} ${o} ${i}`)}};HK.default=qNe});var KK=F(function(ZK){Object.defineProperty(ZK,"__esModule",{value:!0});var WNe=ao(),HNe=pt(),Jd=Xe(),GNe={message:({schemaCode:e})=>Jd.str`must match pattern "${e}"`,params:({schemaCode:e})=>Jd._`{pattern: ${e}}`},ZNe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GNe,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?Jd._`new RegExp`:(0,HNe.useFunc)(t,c),u=t.let("valid");t.try(()=>t.assign(u,Jd._`${l}(${o}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(Jd._`!${u}`)}else{let c=(0,WNe.usePattern)(e,n);e.fail$data(Jd._`!${c}.test(${r})`)}}};ZK.default=ZNe});var YK=F(function(JK){Object.defineProperty(JK,"__esModule",{value:!0});var py=Xe(),JNe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return py.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>py._`{limit: ${e}}`},YNe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:JNe,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?py.operators.GT:py.operators.LT;e.fail$data(py._`Object.keys(${r}).length ${n} ${i}`)}};JK.default=YNe});var QK=F(function(XK){Object.defineProperty(XK,"__esModule",{value:!0});var dy=ao(),fy=Xe(),QNe=pt(),eMe={message:({params:{missingProperty:e}})=>fy.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>fy._`{missingProperty: ${e}}`},tMe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:eMe,code(e){let{gen:t,schema:r,schemaCode:i,data:n,$data:o,it:s}=e,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors)l();else u();if(a.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let g of r)if((f===null||f===void 0?void 0:f[g])===void 0&&!m.has(g)){let h=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${g}" is not defined at "${h}" (strictRequired)`;(0,QNe.checkStrictMode)(s,y,s.opts.strictRequired)}}function l(){if(c||o)e.block$data(fy.nil,p);else for(let f of r)(0,dy.checkReportMissingProp)(e,f)}function u(){let f=t.let("missing");if(c||o){let m=t.let("valid",!0);e.block$data(m,()=>d(f,m)),e.ok(m)}else t.if((0,dy.checkMissingProp)(e,r,f)),(0,dy.reportMissingProp)(e,f),t.else()}function p(){t.forOf("prop",i,(f)=>{e.setParams({missingProperty:f}),t.if((0,dy.noPropertyInData)(t,n,f,a.ownProperties),()=>e.error())})}function d(f,m){e.setParams({missingProperty:f}),t.forOf(f,i,()=>{t.assign(m,(0,dy.propertyInData)(t,n,f,a.ownProperties)),t.if((0,fy.not)(m),()=>{e.error(),t.break()})},fy.nil)}}};XK.default=tMe});var t7=F(function(e7){Object.defineProperty(e7,"__esModule",{value:!0});var my=Xe(),nMe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return my.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>my._`{limit: ${e}}`},iMe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:nMe,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?my.operators.GT:my.operators.LT;e.fail$data(my._`${r}.length ${n} ${i}`)}};e7.default=iMe});var U$=F(function(n7){Object.defineProperty(n7,"__esModule",{value:!0});var r7=Bj();r7.code='require("ajv/dist/runtime/equal").default';n7.default=r7});var o7=F(function(i7){Object.defineProperty(i7,"__esModule",{value:!0});var pF=Qh(),mn=Xe(),aMe=pt(),cMe=U$(),lMe={message:({params:{i:e,j:t}})=>mn.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>mn._`{i: ${e}, j: ${t}}`},uMe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:lMe,code(e){let{gen:t,data:r,$data:i,schema:n,parentSchema:o,schemaCode:s,it:a}=e;if(!i&&!n)return;let c=t.let("valid"),l=o.items?(0,pF.getSchemaTypes)(o.items):[];e.block$data(c,u,mn._`${s} === false`),e.ok(c);function u(){let m=t.let("i",mn._`${r}.length`),g=t.let("j");e.setParams({i:m,j:g}),t.assign(c,!0),t.if(mn._`${m} > 1`,()=>(p()?d:f)(m,g))}function p(){return l.length>0&&!l.some((m)=>m==="object"||m==="array")}function d(m,g){let h=t.name("item"),y=(0,pF.checkDataTypes)(l,h,a.opts.strictNumbers,pF.DataType.Wrong),v=t.const("indices",mn._`{}`);t.for(mn._`;${m}--;`,()=>{if(t.let(h,mn._`${r}[${m}]`),t.if(y,mn._`continue`),l.length>1)t.if(mn._`typeof ${h} == "string"`,mn._`${h} += "_"`);t.if(mn._`typeof ${v}[${h}] == "number"`,()=>{t.assign(g,mn._`${v}[${h}]`),e.error(),t.assign(c,!1).break()}).code(mn._`${v}[${h}] = ${m}`)})}function f(m,g){let h=(0,aMe.useFunc)(t,cMe.default),y=t.name("outer");t.label(y).for(mn._`;${m}--;`,()=>t.for(mn._`${g} = ${m}; ${g}--;`,()=>t.if(mn._`${h}(${r}[${m}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};i7.default=uMe});var a7=F(function(s7){Object.defineProperty(s7,"__esModule",{value:!0});var dF=Xe(),dMe=pt(),fMe=U$(),mMe={message:"must be equal to constant",params:({schemaCode:e})=>dF._`{allowedValue: ${e}}`},gMe={keyword:"const",$data:!0,error:mMe,code(e){let{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;if(i||o&&typeof o=="object")e.fail$data(dF._`!${(0,dMe.useFunc)(t,fMe.default)}(${r}, ${n})`);else e.fail(dF._`${o} !== ${r}`)}};s7.default=gMe});var l7=F(function(c7){Object.defineProperty(c7,"__esModule",{value:!0});var gy=Xe(),yMe=pt(),vMe=U$(),wMe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>gy._`{allowedValues: ${e}}`},bMe={keyword:"enum",schemaType:"array",$data:!0,error:wMe,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:s}=e;if(!i&&n.length===0)throw Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,yMe.useFunc)(t,vMe.default),u;if(a||i)u=t.let("valid"),e.block$data(u,p);else{if(!Array.isArray(n))throw Error("ajv implementation error");let f=t.const("vSchema",o);u=(0,gy.or)(...n.map((m,g)=>d(f,g)))}e.pass(u);function p(){t.assign(u,!1),t.forOf("v",o,(f)=>t.if(gy._`${l()}(${r}, ${f})`,()=>t.assign(u,!0).break()))}function d(f,m){let g=n[m];return typeof g==="object"&&g!==null?gy._`${l()}(${r}, ${f}[${m}])`:gy._`${r} === ${g}`}}};c7.default=bMe});var p7=F(function(u7){Object.defineProperty(u7,"__esModule",{value:!0});var SMe=UK(),$Me=BK(),xMe=GK(),PMe=KK(),CMe=YK(),_Me=QK(),EMe=t7(),RMe=o7(),IMe=a7(),AMe=l7(),OMe=[SMe.default,$Me.default,xMe.default,PMe.default,CMe.default,_Me.default,EMe.default,RMe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},IMe.default,AMe.default];u7.default=OMe});var mF=F(function(f7){Object.defineProperty(f7,"__esModule",{value:!0});f7.validateAdditionalItems=void 0;var uu=Xe(),fF=pt(),TMe={message:({params:{len:e}})=>uu.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>uu._`{limit: ${e}}`},NMe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:TMe,code(e){let{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,fF.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}d7(e,i)}};function d7(e,t){let{gen:r,schema:i,data:n,keyword:o,it:s}=e;s.items=!0;let a=r.const("len",uu._`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass(uu._`${a} <= ${t.length}`);else if(typeof i=="object"&&!(0,fF.alwaysValidSchema)(s,i)){let l=r.var("valid",uu._`${a} <= ${t.length}`);r.if((0,uu.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:o,dataProp:u,dataPropType:fF.Type.Num},l),!s.allErrors)r.if((0,uu.not)(l),()=>r.break())})}}f7.validateAdditionalItems=d7;f7.default=NMe});var gF=F(function(y7){Object.defineProperty(y7,"__esModule",{value:!0});y7.validateTuple=void 0;var g7=Xe(),L$=pt(),jMe=ao(),FMe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return h7(e,"additionalItems",t);if(r.items=!0,(0,L$.alwaysValidSchema)(r,t))return;e.ok((0,jMe.validateArray)(e))}};function h7(e,t,r=e.schema){let{gen:i,parentSchema:n,data:o,keyword:s,it:a}=e;if(u(n),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=L$.mergeEvaluated.items(i,r.length,a.items);let c=i.name("valid"),l=i.const("len",g7._`${o}.length`);r.forEach((p,d)=>{if((0,L$.alwaysValidSchema)(a,p))return;i.if(g7._`${l} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c)});function u(p){let{opts:d,errSchemaPath:f}=a,m=r.length,g=m===p.minItems&&(m===p.maxItems||p[t]===!1);if(d.strictTuples&&!g){let h=`"${s}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,L$.checkStrictMode)(a,h,d.strictTuples)}}}y7.validateTuple=h7;y7.default=FMe});var b7=F(function(w7){Object.defineProperty(w7,"__esModule",{value:!0});var UMe=gF(),LMe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,UMe.validateTuple)(e,"items")};w7.default=LMe});var $7=F(function(S7){Object.defineProperty(S7,"__esModule",{value:!0});var k7=Xe(),qMe=pt(),VMe=ao(),WMe=mF(),HMe={message:({params:{len:e}})=>k7.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>k7._`{limit: ${e}}`},GMe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:HMe,code(e){let{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;if(i.items=!0,(0,qMe.alwaysValidSchema)(i,t))return;if(n)(0,WMe.validateAdditionalItems)(e,n);else e.ok((0,VMe.validateArray)(e))}};S7.default=GMe});var P7=F(function(x7){Object.defineProperty(x7,"__esModule",{value:!0});var co=Xe(),B$=pt(),KMe={message:({params:{min:e,max:t}})=>t===void 0?co.str`must contain at least ${e} valid item(s)`:co.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?co._`{minContains: ${e}}`:co._`{minContains: ${e}, maxContains: ${t}}`},JMe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:KMe,code(e){let{gen:t,schema:r,parentSchema:i,data:n,it:o}=e,s,a,{minContains:c,maxContains:l}=i;if(o.opts.next)s=c===void 0?1:c,a=l;else s=1;let u=t.const("len",co._`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,B$.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,B$.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,B$.alwaysValidSchema)(o,r)){let g=co._`${u} >= ${s}`;if(a!==void 0)g=co._`${g} && ${u} <= ${a}`;e.pass(g);return}o.items=!0;let p=t.name("valid");if(a===void 0&&s===1)f(p,()=>t.if(p,()=>t.break()));else if(s===0){if(t.let(p,!0),a!==void 0)t.if(co._`${n}.length > 0`,d)}else t.let(p,!1),d();e.result(p,()=>e.reset());function d(){let g=t.name("_valid"),h=t.let("count",0);f(g,()=>t.if(g,()=>m(h)))}function f(g,h){t.forRange("i",0,u,(y)=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:B$.Type.Num,compositeRule:!0},g),h()})}function m(g){if(t.code(co._`${g}++`),a===void 0)t.if(co._`${g} >= ${s}`,()=>t.assign(p,!0).break());else if(t.if(co._`${g} > ${a}`,()=>t.assign(p,!1).break()),s===1)t.assign(p,!0);else t.if(co._`${g} >= ${s}`,()=>t.assign(p,!0))}}};x7.default=JMe});var A7=F(function(E7){Object.defineProperty(E7,"__esModule",{value:!0});E7.validateSchemaDeps=E7.validatePropertyDeps=E7.error=void 0;var hF=Xe(),XMe=pt(),hy=ao();E7.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let i=t===1?"property":"properties";return hF.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>hF._`{property: ${e},
297
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1){if(e.reused==="ref")o(s)}}if(e.external)e.sharedDefsExtractedFor=e.external}function MH(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let i of t){if(!i||typeof i!=="object")return;MH(i);let n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;let o=i.type;for(let s of Array.isArray(o)?o:[o]){if(typeof s!=="string")return;if(!r.includes(s))r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}function NH(e){let t=e.additionalProperties;if(t===void 0||t===!1||typeof t!=="object"||t===null)return null;return Object.keys(t).length?t:null}function kN(e){let t=[];for(let o of e){if(typeof o!=="object"||o.type!=="object")return null;for(let s in o)if(!jH.has(s))return null;t.push(o)}let r={},i=new Set;for(let o of t){for(let s in o.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let a=[];for(let l of t){let u=l.properties?.[s]??NH(l);if(u===null||u===void 0)continue;if(!a.some((p)=>JSON.stringify(p)===JSON.stringify(u)))a.push(u)}let c=a.length===1?a[0]:kN(a)??{allOf:a};cn(r,s,c)}for(let s of o.required??[])i.add(s)}let n={type:"object",properties:r};if(i.size)n.required=[...i];if(t.every((o)=>o.additionalProperties===!1))n.additionalProperties=!1;else{let o=[];for(let s of t){let a=NH(s);if(a&&!o.some((c)=>JSON.stringify(c)===JSON.stringify(a)))o.push(a)}if(o.length===1)n.additionalProperties=o[0];else if(o.length>1)n.additionalProperties={allOf:o}}return n}function yEe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of jH)if(n in e)return;let r=t.filter((n)=>TH.some((o)=>Array.isArray(n[o]))),i=null;if(!r.length)i=kN(t);else{let n=r[0],o=TH.find((c)=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;let s=t.filter((c)=>c!==n),a=n[o].map((c)=>kN([...s,c]));if(a.some((c)=>!c))return;i={[o]:a}}if(!i)return;delete e.allOf,hh(e,i)}function cc(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,u={...l},p=c.ref;if(c.ref=null,p){i(p);let f=e.seen.get(p),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(m);else hh(l,m);if(hh(l,u),a._zod.parent===p)for(let h in l){if(h==="$ref"||h==="allOf")continue;if(!(h in u))delete l[h]}if(m.$ref&&f.def)for(let h in l){if(h==="$ref"||h==="allOf")continue;if(h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h]))delete l[h]}}let d=a._zod.parent;if(d&&d!==p){i(d);let f=e.seen.get(d);if(f?.schema.$ref){if(l.$ref=f.schema.$ref,f.def)for(let m in l){if(m==="$ref"||m==="allOf")continue;if(m in f.def&&JSON.stringify(l[m])===JSON.stringify(f.def[m]))delete l[m]}}}e.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let a of[...e.seen.entries()].reverse())i(a[0]);if(e.target!=="openapi-3.0")for(let a of e.seen.entries())MH(a[1].def??a[1].schema);for(let a of e.deferred)a();if(e.intersections.length){let a=new Map;for(let c of e.seen.values())for(let l of[c.schema,c.def]){let u=l?.allOf;if(!Array.isArray(u))continue;let p=a.get(u);if(p)p.push(l);else a.set(u,[l])}for(let c of e.intersections)for(let l of a.get(c)??[])yEe(l)}}let n={};if(e.target==="draft-2020-12")n.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")n.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")n.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}hh(n,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;if(o!==void 0&&n.id===o)delete n.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;cn(s,c.defId,c.def)}}if(e.external)e.sharedEmitDoneFor=e.external;if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")n.$defs=s;else n.definitions=s;try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:_d(t,"input",e.processors),output:_d(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function Ln(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ln(i.element,r);if(i.type==="set")return Ln(i.valueType,r);if(i.type==="lazy")return Ln(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return Ln(i.innerType,r);if(i.type==="intersection")return Ln(i.left,r)||Ln(i.right,r);if(i.type==="record"||i.type==="map")return Ln(i.keyType,r)||Ln(i.valueType,r);if(i.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ln(i.in,r)||Ln(i.out,r)}if(i.type==="object"){for(let n in i.shape)if(Ln(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(Ln(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(Ln(n,r))return!0;if(i.rest&&Ln(i.rest,r))return!0;return!1}return!1}var jH,TH,SN=(e,t={})=>(r)=>{let i=sc({...r,processors:t});return Pt(e,i),ac(i,e),cc(i,e)},_d=(e,t,r={})=>(i)=>{let{libraryOptions:n,target:o}=i??{},s=sc({...n??{},target:o,io:t,processors:r});return Pt(e,s),ac(s,e),cc(s,e)};var yh=I(()=>{uh();se();jH=new Set(["type","properties","required","additionalProperties"]),TH=["oneOf","anyOf"]});function zr(e){let t={},r=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let o of i)vEe[o._zod.def.check]?.(t,o._zod.def);let n=e._zod.bag;if(n.minimum!==void 0)Ed(t,"minimum",n.minimum);if(n.exclusiveMinimum!==void 0)Ed(t,"exclusiveMinimum",n.exclusiveMinimum);if(n.maximum!==void 0)Rd(t,"maximum",n.maximum);if(n.exclusiveMaximum!==void 0)Rd(t,"exclusiveMaximum",n.exclusiveMaximum);if(n.multipleOf!==void 0)BH(t,n.multipleOf);if(n.format!==void 0){if(t.format??(t.format=n.format),n.format.includes("int"))t.isInt=!0}if(n.mime)VH(t,n.mime);for(let o of n.patterns??[])qH(t,o);return t}function vh(e){let t=e._zod.def;if(t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform"))return vh(t.out);if(t.type==="catch")return vh(t.innerType);return e._zod.optin}function $N(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let m=e.get(t)?.def;if(!m)return t;let g=$N(e,m,r);return g===m?t:g}for(let m of["anyOf","oneOf"]){let g=t[m];if(!Array.isArray(g))continue;let h=g.map((y)=>$N(e,y,r));if(h.some((y,v)=>y!==g[v]))t={...t,[m]:h}}let i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some((m)=>m==="number"||m==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some((m)=>typeof m==="number"))return t;let{minimum:s,maximum:a,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:p,id:d,...f}=t;if(f.enum)f.enum=f.enum.map((m)=>typeof m==="number"?String(m):m);else if(typeof f.const==="number")f.const=String(f.const);if(!n)return f;if(f.type="string",!o)f.pattern=(i.includes("number")?ns:Wg).source;return f}function kEe(e){let t=new Map;for(let i of e.seen.values())if(i.def&&!t.has(i.schema))t.set(i.schema,i);let r=new Map;for(let i of xN.get(e)??[]){let n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;let s=$N(t,o,new Set);if(s!==o)r.set(o,s)}if(!r.size)return;for(let i of e.seen.values())for(let n of[i.schema,i.def]){let o=n&&r.get(n.propertyNames);if(o)n.propertyNames=o}}function GH(e,t,r,i,n){let o=!1,s=JSON.stringify(e,(a,c)=>{if(typeof c!=="bigint")return c;return o=!0,null});if(!o)return JSON.parse(s);return Fr(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),tM}function pS(e,t){if("_idmap"in e){let i=e,n=sc({...t,processors:cS}),o={};for(let c of i._idmap.entries()){let[l,u]=c;Pt(u,n)}let s={},a={registry:i,uri:t?.uri,defs:o};n.external=a;for(let c of i._idmap.entries()){let[l,u]=c;ac(n,u),cn(s,l,cc(n,u))}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:o}}return{schemas:s}}let r=sc({...t,processors:cS});return Pt(e,r),ac(r,e),cc(r,e)}var Ed=(e,t,r)=>{if(e[t]===void 0||r>e[t])e[t]=r},Rd=(e,t,r)=>{if(e[t]===void 0||r<e[t])e[t]=r},FH=(e,t)=>{Ed(e,"minimum",t),Rd(e,"maximum",t)},BH=(e,t)=>{if(e.multipleOf??(e.multipleOf=[]),!e.multipleOf.includes(t))e.multipleOf.push(t)},qH=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},VH=(e,t)=>{e.mime=e.mime?e.mime.filter((r)=>t.includes(r)):[...t]},WH=(e,t)=>{if(e.format=t,t.includes("int"))e.isInt=!0},zH=(e,t)=>Ed(e,"minimum",t.minimum),UH=(e,t)=>Rd(e,"maximum",t.maximum),LH=(e)=>(t,r)=>{WH(t,r.format);let[i,n]=e[r.format];Ed(t,"minimum",i),Rd(t,"maximum",n)},vEe,wEe,bEe,HH=(e)=>bEe.get(e)??e,PN=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:c,contentEncoding:l,laxFormat:u}=zr(e);if(typeof o==="number")n.minLength=o;if(typeof s==="number")n.maxLength=s;if(a){if(n.format=wEe[a]??a,n.format==="")delete n.format;if(a==="time"||u)delete n.format}if(l)n.contentEncoding=l;if(c&&c.size>0){let p=[...c].map(HH);if(p.length===1)n.pattern=p[0].source;else if(p.length>1)n.allOf=[...p.map((d)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))]}},CN=(e,t,r,i)=>{let n=r,{minimum:o,maximum:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=zr(e);n.type=u?"integer":"number";let p=typeof l==="number"&&l>=(o??Number.NEGATIVE_INFINITY),d=typeof c==="number"&&c<=(s??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(p)if(f)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof o==="number")n.minimum=o;if(d)if(f)n.maximum=c,n.exclusiveMaximum=!0;else n.exclusiveMaximum=c;else if(typeof s==="number")n.maximum=s;if(a){let m=new Set;for(let y of a)if(Number.isFinite(y)&&y!==0)m.add(Math.abs(y));else Fr(e,t,n,i,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[g,...h]=m;if(g!==void 0)n.multipleOf=g;if(h.length)n.allOf=[...n.allOf??[],...h.map((y)=>({multipleOf:y}))]}},_N=(e,t,r,i)=>{r.type="boolean"},EN=(e,t,r,i)=>{Fr(e,t,r,i,"BigInt cannot be represented in JSON Schema")},RN=(e,t,r,i)=>{Fr(e,t,r,i,"Symbols cannot be represented in JSON Schema")},IN=(e,t,r,i)=>{if(t.target==="openapi-3.0")r.type="string",r.nullable=!0,r.enum=[null];else r.type="null"},AN=(e,t,r,i)=>{Fr(e,t,r,i,"Undefined cannot be represented in JSON Schema")},ON=(e,t,r,i)=>{Fr(e,t,r,i,"Void cannot be represented in JSON Schema")},DN=(e,t,r,i)=>{r.not={}},TN=(e,t,r,i)=>{},NN=(e,t,r,i)=>{},MN=(e,t,r,i)=>{Fr(e,t,r,i,"Date cannot be represented in JSON Schema")},jN=(e,t,r,i)=>{let n=e._zod.def,o=Kp(n.entries);if(o.length===0){r.not={};return}if(o.every((s)=>typeof s==="number"))r.type="number";if(o.every((s)=>typeof s==="string"))r.type="string";r.enum=o},FN=(e,t,r,i)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let o=[];for(let s of n.values)if(s===void 0){if(Fr(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s==="bigint"){if(Fr(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(s))}else o.push(s);if(o.length===0);else if(o.length===1){let s=o[0];if(r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")r.enum=[s];else r.const=s}else{if(o.every((s)=>typeof s==="number"))r.type="number";if(o.every((s)=>typeof s==="string"))r.type="string";if(o.every((s)=>typeof s==="boolean"))r.type="boolean";if(o.every((s)=>s===null))r.type="null";r.enum=o}},zN=(e,t,r,i)=>{Fr(e,t,r,i,"NaN cannot be represented in JSON Schema")},UN=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},LN=(e,t,r,i)=>{let n=r;n.type="string",n.format="binary",n.contentEncoding="binary";let{minimum:o,maximum:s,mime:a}=zr(e);if(o!==void 0)n.minLength=o;if(s!==void 0)n.maxLength=s;if(!a)return;if(a.length===0)n.not={};else if(a.length===1)n.contentMediaType=a[0];else n.anyOf=a.map((c)=>({contentMediaType:c}))},BN=(e,t,r,i)=>{r.type="boolean"},qN=(e,t,r,i)=>{Fr(e,t,r,i,"Custom types cannot be represented in JSON Schema")},VN=(e,t,r,i)=>{Fr(e,t,r,i,"Function types cannot be represented in JSON Schema")},WN=(e,t,r,i)=>{Fr(e,t,r,i,"Transforms cannot be represented in JSON Schema")},HN=(e,t,r,i)=>{Fr(e,t,r,i,"Map cannot be represented in JSON Schema")},GN=(e,t,r,i)=>{Fr(e,t,r,i,"Set cannot be represented in JSON Schema")},ZN=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:s,maximum:a}=zr(e);if(typeof s==="number")n.minItems=s;if(typeof a==="number")n.maxItems=a;n.type="array",n.items=Pt(o.element,t,{...i,path:[...i.path,"items"]})},KN=(e,t,r,i)=>{let n=r,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&Fr(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in s)cn(n.properties,l,Pt(s[l],t,{...i,path:[...i.path,"properties",l]}));let c=[];for(let l of Object.keys(s)){let u=o.shape[l];if(t.io==="input"?vh(u)===void 0:u._zod.optout===void 0)c.push(l)}if(c.length>0)n.required=c;if(o.catchall?._zod.def.type==="never")n.additionalProperties=!1;else if(!o.catchall){if(t.io==="output")n.additionalProperties=!1}else if(o.catchall)n.additionalProperties=Pt(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})},lS=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,s=n.options.map((a,c)=>Pt(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));if(o)r.oneOf=s;else r.anyOf=s},JN=(e,t,r,i)=>{let n=e._zod.def,o=Pt(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=Pt(n.right,t,{...i,path:[...i.path,"allOf",1]}),a=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},YN=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((g,h)=>Pt(g,t,{...i,path:[...i.path,s,h]})),l=o.rest?Pt(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,u=o.items.length;while(u>0){let g=o.items[u-1];if(!(t.io==="input"?vh(g)!==void 0:g._zod.optout==="optional"))break;u--}let p=o.items.length,d=!o.rest;if(t.target==="draft-2020-12"){if(n.prefixItems=c,d)n.items=!1;else if(l)n.items=l;if(u>0)n.minItems=u;if(d)n.maxItems=p}else if(t.target==="openapi-3.0"){if(n.items={anyOf:c},l)n.items.anyOf.push(l);if(u>0)n.minItems=u;if(d)n.maxItems=p}else{if(n.items=c,d)n.additionalItems=!1;else if(l)n.additionalItems=l;if(u>0)n.minItems=u;if(d)n.maxItems=p}let{minimum:f,maximum:m}=zr(e);if(typeof f==="number")n.minItems=f;if(typeof m==="number")n.maxItems=m},xN,XN=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let s=o.keyType,a=zr(s).patterns;if(o.mode==="loose"&&a&&a.size>0){let u=Pt(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let p of a)cn(n.patternProperties,HH(p).source,u)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Pt(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let u=xN.get(t);if(!u)u=[],xN.set(t,u),t.deferred.push(()=>kEe(t));u.push(e)}n.additionalProperties=Pt(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=s._zod.values,l=t.io==="input"&&vh(o.valueType)!==void 0;if(c&&!o.partial&&!l){let u=[...c].filter((p)=>typeof p==="string"||typeof p==="number");if(u.length>0)n.required=u.map(String)}},QN=(e,t,r,i)=>{let n=e._zod.def,o=Pt(n.innerType,t,i),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[o,{type:"null"}]},eM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},tM,rM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s=GH(n.defaultValue,e,t,r,i);if(s!==tM)r.default=s},nM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;let s=GH(n.defaultValue,e,t,r,i);if(s!==tM)r._prefault=s},iM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{Fr(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},oM=(e,t,r,i)=>{let n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?o?n.out:n.in:n.out;Pt(s,t,i);let a=t.seen.get(e);a.ref=s},sM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},aM=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},uS=(e,t,r,i)=>{let n=e._zod.def;Pt(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},cM=(e,t,r,i)=>{let n=e._zod.innerType;Pt(n,t,i);let o=t.seen.get(e);o.ref=n},cS;var wh=I(()=>{Ll();ld();yh();se();vEe={greater_than:(e,t)=>Ed(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Rd(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>BH(e,t.value),number_format:LH(Tg),bigint_format:LH(Ng),min_length:zH,max_length:UH,length_equals:(e,t)=>FH(e,t.length),min_size:zH,max_size:UH,size_equals:(e,t)=>FH(e,t.size),string_format:(e,t)=>{if(WH(e,t.format),t.pattern)qH(e,t.pattern);if(t.format==="base64"||t.format==="base64url")e.contentEncoding=t.format;if(t.local||t.precision===-1)e.laxFormat=!0},mime_type:(e,t)=>VH(e,t.mime)};wEe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bEe=new Map([[hk,yA],[Xg,vA]]);xN=new WeakMap;tM=Symbol();cS={string:PN,number:CN,boolean:_N,bigint:EN,symbol:RN,null:IN,undefined:AN,void:ON,never:DN,any:TN,unknown:NN,date:MN,enum:jN,literal:FN,nan:zN,template_literal:UN,file:LN,success:BN,custom:qN,function:VN,transform:WN,map:HN,set:GN,array:ZN,object:KN,union:lS,intersection:JN,tuple:YN,record:XN,nullable:QN,nonoptional:eM,default:rM,prefault:nM,catch:iM,pipe:oM,readonly:sM,promise:aM,optional:uS,lazy:cM}});class lM{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";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=sc({processors:cS,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 Pt(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,ac(this.ctx,e);let r=cc(this.ctx,e),{"~standard":i,...n}=r;return n}}var ZH=I(()=>{wh();yh()});var KH={};var JH=()=>{};var cs={};vn(cs,{$ZodAny:()=>zO,$ZodArray:()=>VO,$ZodAsyncError:()=>_i,$ZodBase64:()=>_O,$ZodBase64URL:()=>EO,$ZodBigInt:()=>Sk,$ZodBigIntFormat:()=>NO,$ZodBoolean:()=>Qg,$ZodCIDRv4:()=>PO,$ZodCIDRv6:()=>CO,$ZodCUID:()=>fO,$ZodCUID2:()=>mO,$ZodCatch:()=>lD,$ZodCheck:()=>jt,$ZodCheckBigIntFormat:()=>zA,$ZodCheckEndsWith:()=>YA,$ZodCheckGreaterThan:()=>ok,$ZodCheckIncludes:()=>KA,$ZodCheckLengthEquals:()=>WA,$ZodCheckLessThan:()=>ik,$ZodCheckLowerCase:()=>GA,$ZodCheckMaxLength:()=>qA,$ZodCheckMaxSize:()=>UA,$ZodCheckMimeType:()=>eO,$ZodCheckMinLength:()=>VA,$ZodCheckMinSize:()=>LA,$ZodCheckMultipleOf:()=>jA,$ZodCheckNumberFormat:()=>FA,$ZodCheckOverwrite:()=>tO,$ZodCheckProperties:()=>QA,$ZodCheckProperty:()=>XA,$ZodCheckRegex:()=>HA,$ZodCheckSizeEquals:()=>BA,$ZodCheckStartsWith:()=>JA,$ZodCheckStringFormat:()=>sd,$ZodCheckUpperCase:()=>ZA,$ZodCodec:()=>th,$ZodCreditCard:()=>IO,$ZodCustom:()=>hD,$ZodCustomStringFormat:()=>DO,$ZodCyclicError:()=>wD,$ZodDate:()=>qO,$ZodDefault:()=>oD,$ZodDiscriminatedUnion:()=>ZO,$ZodE164:()=>RO,$ZodEmail:()=>aO,$ZodEmoji:()=>pO,$ZodEncodeError:()=>zl,$ZodEnum:()=>QO,$ZodError:()=>ZI,$ZodExactOptional:()=>nD,$ZodFile:()=>tD,$ZodFunction:()=>mD,$ZodGUID:()=>oO,$ZodIBAN:()=>AO,$ZodIPv4:()=>SO,$ZodIPv6:()=>$O,$ZodISODate:()=>wO,$ZodISODateTime:()=>vO,$ZodISODuration:()=>kO,$ZodISOTime:()=>bO,$ZodIntersection:()=>KO,$ZodJWT:()=>OO,$ZodKSUID:()=>yO,$ZodLazy:()=>rh,$ZodLiteral:()=>eD,$ZodMAC:()=>xO,$ZodMap:()=>YO,$ZodNaN:()=>uD,$ZodNanoID:()=>dO,$ZodNever:()=>LO,$ZodNonOptional:()=>aD,$ZodNull:()=>FO,$ZodNullable:()=>iD,$ZodNumber:()=>kk,$ZodNumberFormat:()=>TO,$ZodObject:()=>oW,$ZodObjectJIT:()=>WO,$ZodOptional:()=>xk,$ZodPipe:()=>Pk,$ZodPrefault:()=>sD,$ZodPreprocess:()=>pD,$ZodPromise:()=>gD,$ZodReadonly:()=>dD,$ZodRealError:()=>ai,$ZodRecord:()=>JO,$ZodRegistry:()=>OT,$ZodSet:()=>XO,$ZodString:()=>Bl,$ZodStringFormat:()=>xt,$ZodSuccess:()=>cD,$ZodSymbol:()=>MO,$ZodTemplateLiteral:()=>fD,$ZodTransform:()=>rD,$ZodTuple:()=>$k,$ZodType:()=>Ue,$ZodULID:()=>gO,$ZodURL:()=>uO,$ZodUUID:()=>sO,$ZodUndefined:()=>jO,$ZodUnion:()=>eh,$ZodUnknown:()=>UO,$ZodVoid:()=>BO,$ZodXID:()=>hO,$ZodXor:()=>HO,$brand:()=>WI,$constructor:()=>M,$input:()=>AT,$output:()=>IT,Doc:()=>ad,INVALID:()=>Un,JSONSchema:()=>KH,JSONSchemaGenerator:()=>lM,NEVER:()=>zg,TimePrecision:()=>qT,URL_BAD_FORMAT:()=>cO,URL_UNPARSEABLE:()=>Zg,ZodCompileAsyncError:()=>is,ZodCompileUnsupportedError:()=>rt,_any:()=>sN,_array:()=>fN,_base64:()=>Qk,_base64url:()=>eS,_bigint:()=>QT,_boolean:()=>YT,_catch:()=>pEe,_check:()=>AH,_cidrv4:()=>Yk,_cidrv6:()=>Xk,_coercedBigint:()=>eN,_coercedBoolean:()=>XT,_coercedDate:()=>pN,_coercedNumber:()=>WT,_coercedString:()=>zT,_creditCard:()=>LT,_cuid:()=>Vk,_cuid2:()=>Wk,_custom:()=>gN,_date:()=>uN,_decode:()=>Gb,_decodeAsync:()=>Kb,_default:()=>cEe,_discriminatedUnion:()=>J_e,_e164:()=>tS,_email:()=>Mk,_emoji:()=>Bk,_encode:()=>Hb,_encodeAsync:()=>Zb,_endsWith:()=>wd,_enum:()=>rEe,_file:()=>mN,_float32:()=>GT,_float64:()=>ZT,_gt:()=>ss,_gte:()=>Ri,_guid:()=>jk,_iban:()=>BT,_includes:()=>yd,_int:()=>HT,_int32:()=>KT,_int64:()=>tN,_intersection:()=>Y_e,_ipv4:()=>Kk,_ipv6:()=>Jk,_isoDate:()=>fh,_isoDateTime:()=>dh,_isoDuration:()=>gh,_isoTime:()=>mh,_jwt:()=>rS,_ksuid:()=>Zk,_lazy:()=>gEe,_length:()=>Kl,_literal:()=>iEe,_lowercase:()=>gd,_lt:()=>os,_lte:()=>Ei,_mac:()=>UT,_map:()=>eEe,_max:()=>Ei,_maxLength:()=>Zl,_maxSize:()=>oc,_mime:()=>kd,_min:()=>Ri,_minLength:()=>oa,_minSize:()=>as,_multipleOf:()=>ic,_nan:()=>dN,_nanoid:()=>qk,_nativeEnum:()=>nEe,_negative:()=>iS,_never:()=>cN,_nonnegative:()=>sS,_nonoptional:()=>lEe,_nonpositive:()=>oS,_normalize:()=>Sd,_null:()=>oN,_nullable:()=>aEe,_number:()=>VT,_optional:()=>sEe,_overwrite:()=>Ao,_parse:()=>ed,_parseAsync:()=>td,_pipe:()=>dEe,_positive:()=>nS,_promise:()=>hEe,_properties:()=>bd,_property:()=>aS,_readonly:()=>fEe,_record:()=>Q_e,_refine:()=>hN,_regex:()=>md,_safeDecode:()=>Yb,_safeDecodeAsync:()=>Qb,_safeEncode:()=>Jb,_safeEncodeAsync:()=>Xb,_safeParse:()=>rd,_safeParseAsync:()=>nd,_set:()=>tEe,_size:()=>Gl,_slugify:()=>Cd,_startsWith:()=>vd,_string:()=>FT,_stringFormat:()=>Jl,_stringbool:()=>bN,_success:()=>uEe,_superRefine:()=>yN,_symbol:()=>nN,_templateLiteral:()=>mEe,_toLowerCase:()=>xd,_toUpperCase:()=>Pd,_transform:()=>oEe,_trim:()=>$d,_tuple:()=>X_e,_uint32:()=>JT,_uint64:()=>rN,_ulid:()=>Hk,_undefined:()=>iN,_union:()=>Z_e,_unknown:()=>aN,_uppercase:()=>hd,_url:()=>ph,_uuid:()=>Fk,_uuidv4:()=>zk,_uuidv6:()=>Uk,_uuidv7:()=>Lk,_void:()=>lN,_xid:()=>Gk,_xor:()=>K_e,base64Charset:()=>hk,base64urlCharset:()=>Xg,canParseURL:()=>lO,clone:()=>$t,compile:()=>MT,compileFn:()=>Tk,config:()=>fr,createStandardJSONSchemaMethod:()=>_d,createToJSONSchemaMethod:()=>SN,decode:()=>IV,decodeAsync:()=>OV,describe:()=>vN,encode:()=>RV,encodeAsync:()=>AV,extractDefs:()=>ac,finalize:()=>cc,flattenError:()=>Ug,formatError:()=>Lg,getDiscriminatedOption:()=>GO,globalConfig:()=>Yr,globalRegistry:()=>ln,handleUnrepresentable:()=>Fr,initializeContext:()=>sc,isBackEdge:()=>Ik,isRecursiveSchema:()=>Rk,isValidBase64:()=>Yg,isValidBase64URL:()=>yk,isValidCIDRv6:()=>gk,isValidCreditCard:()=>vk,isValidIBAN:()=>wk,isValidIPv6:()=>Jg,isValidJWT:()=>bk,locales:()=>dd,memoizer:()=>oh,mergeValues:()=>cd,meta:()=>wN,parse:()=>Bg,parseAsync:()=>qg,parseURLObject:()=>rW,prettifyError:()=>JI,process:()=>Pt,processSchema:()=>Pt,regexes:()=>ro,registry:()=>Ok,safeDecode:()=>TV,safeDecodeAsync:()=>MV,safeEncode:()=>DV,safeEncodeAsync:()=>NV,safeParse:()=>Wb,safeParseAsync:()=>XI,standardProps:()=>pk,stripTabAndNewline:()=>Kg,toDotPath:()=>_V,toJSONSchema:()=>pS,toZod:()=>Ig,treeifyError:()=>KI,urlHostnameOk:()=>fk,urlProtocolOk:()=>mk,util:()=>q,validate:()=>id,validateAsync:()=>od,validateURL:()=>dk,version:()=>rO,withParser:()=>Dk});var Bn=I(()=>{se();se();Ll();Ak();wh();ZH();JH();nc();QI();YI();ld();bD();sk();nO();uh();IH();OH();yh()});var YH=I(()=>{Bn()});var XH=()=>{};var QH=()=>{};function bh(e,t){let r=typeof t==="function"?t:(s,a)=>{let c=t[s._zod.def.type];return c?c(s,a):s},i=new Map;function n(s){let a=i.get(s);if(a===eG)return new rh({type:"lazy",getter:()=>i.get(s)});if(a!==void 0)return a;i.set(s,eG);let c=o(s),l=r(c,c!==s);return i.set(s,l),l}function o(s){let a=s._zod.def,c=a.type;switch(c){case"object":{let l=a.shape,u=Object.keys(l),p=!1,d={};for(let m of u){let g=n(l[m]);if(g!==l[m])p=!0;d[m]=g}let f=a.catchall;if(a.catchall){if(f=n(a.catchall),f!==a.catchall)p=!0}return p?$t(s,{...a,shape:d,catchall:f}):s}case"array":{let l=n(a.element);return l===a.element?s:$t(s,{...a,element:l})}case"tuple":{let l=a.items,u=!1,p=[];for(let f of l){let m=n(f);if(m!==f)u=!0;p.push(m)}let d=a.rest;if(a.rest){if(d=n(a.rest),d!==a.rest)u=!0}return u?$t(s,{...a,items:p,rest:d}):s}case"record":case"map":{let l=n(a.keyType),u=n(a.valueType);return l===a.keyType&&u===a.valueType?s:$t(s,{...a,keyType:l,valueType:u})}case"set":{let l=n(a.valueType);return l===a.valueType?s:$t(s,{...a,valueType:l})}case"union":{let l=a.options,u=!1,p=[];for(let d of l){let f=n(d);if(f!==d)u=!0;p.push(f)}return u?$t(s,{...a,options:p}):s}case"intersection":{let l=n(a.left),u=n(a.right);return l===a.left&&u===a.right?s:$t(s,{...a,left:l,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let l=n(a.innerType);return l===a.innerType?s:$t(s,{...a,innerType:l})}case"pipe":{let l=n(a.in),u=n(a.out);return l===a.in&&u===a.out?s:$t(s,{...a,in:l,out:u})}case"function":{let l=n(a.input),u=n(a.output);return l===a.input&&u===a.output?s:$t(s,{...a,input:l,output:u})}case"lazy":{let l=a.getter,{_cachedInner:u,...p}=a;return $t(s,{...p,getter:()=>n(l())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return s;default:return s}}return n(e)}var eG;var uM=I(()=>{ld();se();eG=Symbol("z.visit/resolving")});var tG=()=>{};var rG=()=>{};var nG=I(()=>{Bn();Ak();tG();rG();YH();XH();QH()});var iG=I(()=>{nG()});function dS(e){return!!e._zod}function qn(e,t){if(dS(e))return Wb(e,t);return e.safeParse(t)}function Id(e){if(!e)return;let t;if(dS(e))t=e._zod?.def?.shape;else t=e.shape;if(!t)return;if(typeof t==="function")try{return t()}catch{return}return t}function Ad(e){if(dS(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let i=e.value;if(i!==void 0)return i;return}var kh=I(()=>{iG()});var fS={};vn(fS,{endsWith:()=>wd,gt:()=>ss,gte:()=>Ri,includes:()=>yd,length:()=>Kl,lowercase:()=>gd,lt:()=>os,lte:()=>Ei,maxLength:()=>Zl,maxSize:()=>oc,mime:()=>kd,minLength:()=>oa,minSize:()=>as,multipleOf:()=>ic,negative:()=>iS,nonnegative:()=>sS,nonpositive:()=>oS,normalize:()=>Sd,overwrite:()=>Ao,positive:()=>nS,properties:()=>bd,property:()=>aS,regex:()=>md,size:()=>Gl,slugify:()=>Cd,startsWith:()=>vd,toLowerCase:()=>xd,toUpperCase:()=>Pd,trim:()=>$d,uppercase:()=>hd});var mS=I(()=>{Bn()});function gS(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var oG,sG=(e,t)=>{ZI.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);if(oG.has(r))return;oG.add(r),gS(r,"format",(i)=>(n)=>Lg(i,n)),gS(r,"flatten",(i)=>(n)=>Ug(i,n)),gS(r,"addIssue",(i)=>(n)=>{i.issues.push(n),i.message=JSON.stringify(i.issues,Jp,2)}),gS(r,"addIssues",(i)=>(n)=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,Jp,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},CEe,ci;var pM=I(()=>{Bn();Bn();se();oG=new WeakSet([Object.prototype,Error.prototype]);CEe=M("ZodError",sG),ci=M("ZodError",sG,void 0,{Parent:Error})});var dM,fM,mM,gM,hM,yM,vM,wM,bM,kM,SM,$M;var xM=I(()=>{Bn();pM();Bn();dM=ed(ci),fM=td(ci),mM=rd(ci),gM=nd(ci),hM=Hb(ci),yM=Gb(ci),vM=Zb(ci),wM=Kb(ci),bM=Jb(ci),kM=Yb(ci),SM=Xb(ci),$M=Qb(ci)});var zd={};vn(zd,{ZodAny:()=>AM,ZodArray:()=>NM,ZodBase64:()=>DS,ZodBase64URL:()=>TS,ZodBigInt:()=>jd,ZodBigIntFormat:()=>jS,ZodBoolean:()=>Md,ZodCIDRv4:()=>AS,ZodCIDRv6:()=>OS,ZodCUID:()=>xS,ZodCUID2:()=>PS,ZodCatch:()=>e1,ZodCodec:()=>Ah,ZodCreditCard:()=>CM,ZodCustom:()=>Oh,ZodCustomStringFormat:()=>Xl,ZodDate:()=>Ph,ZodDefault:()=>ZM,ZodDiscriminatedUnion:()=>jM,ZodE164:()=>NS,ZodEmail:()=>wS,ZodEmoji:()=>SS,ZodEnum:()=>Dd,ZodExactOptional:()=>LS,ZodFile:()=>VM,ZodFunction:()=>u1,ZodGUID:()=>bS,ZodIBAN:()=>_M,ZodIPv4:()=>RS,ZodIPv6:()=>IS,ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,ZodInstanceOf:()=>f1,ZodIntersection:()=>FM,ZodJWT:()=>MS,ZodKSUID:()=>ES,ZodLazy:()=>a1,ZodLiteral:()=>qM,ZodMAC:()=>PM,ZodMap:()=>LM,ZodNaN:()=>r1,ZodNanoID:()=>$S,ZodNever:()=>DM,ZodNonOptional:()=>BS,ZodNull:()=>IM,ZodNullable:()=>GM,ZodNumber:()=>Nd,ZodNumberFormat:()=>Ql,ZodObject:()=>Ch,ZodOptional:()=>Rh,ZodPipe:()=>Ih,ZodPrefault:()=>JM,ZodPreprocess:()=>n1,ZodPromise:()=>l1,ZodReadonly:()=>i1,ZodRecord:()=>Od,ZodSet:()=>BM,ZodString:()=>Td,ZodStringFormat:()=>It,ZodSuccess:()=>QM,ZodSymbol:()=>EM,ZodTemplateLiteral:()=>s1,ZodTransform:()=>WM,ZodTuple:()=>zM,ZodType:()=>Ge,ZodULID:()=>CS,ZodURL:()=>$h,ZodUUID:()=>ls,ZodUndefined:()=>RM,ZodUnion:()=>_h,ZodUnknown:()=>OM,ZodVoid:()=>TM,ZodXID:()=>_S,ZodXor:()=>MM,_ZodString:()=>vS,_default:()=>KM,_function:()=>u8,any:()=>FS,array:()=>oe,base64:()=>CG,base64url:()=>_G,bigint:()=>LG,boolean:()=>Ct,catch:()=>t1,check:()=>p8,cidrv4:()=>xG,cidrv6:()=>PG,codec:()=>s8,creditCard:()=>RG,cuid:()=>hG,cuid2:()=>yG,currencyCode:()=>NG,custom:()=>qS,date:()=>GG,describe:()=>d8,discriminatedUnion:()=>Eh,e164:()=>EG,email:()=>aG,emoji:()=>mG,enum:()=>un,exactOptional:()=>HM,file:()=>r8,float32:()=>jG,float64:()=>FG,function:()=>u8,guid:()=>cG,hash:()=>MG,hex:()=>TG,hostname:()=>DG,httpUrl:()=>fG,iban:()=>IG,instanceof:()=>m8,int:()=>hS,int32:()=>zG,int64:()=>BG,intersection:()=>Fd,invertCodec:()=>a8,ipv4:()=>kG,ipv6:()=>$G,json:()=>h8,jwt:()=>AG,keyof:()=>ZG,ksuid:()=>bG,lazy:()=>c1,literal:()=>ve,looseObject:()=>yr,looseRecord:()=>XG,mac:()=>SG,map:()=>QG,meta:()=>f8,nan:()=>o8,nanoid:()=>gG,nativeEnum:()=>t8,never:()=>zS,nonoptional:()=>XM,null:()=>xh,nullable:()=>Sh,nullish:()=>n8,number:()=>ot,object:()=>ce,optional:()=>Rt,partialRecord:()=>YG,pipe:()=>yS,prefault:()=>YM,preprocess:()=>Dh,promise:()=>l8,readonly:()=>o1,record:()=>At,refine:()=>p1,set:()=>e8,strictObject:()=>KG,string:()=>T,stringFormat:()=>OG,stringbool:()=>g8,success:()=>i8,superRefine:()=>d1,symbol:()=>VG,templateLiteral:()=>c8,transform:()=>US,tuple:()=>UM,uint32:()=>UG,uint64:()=>qG,ulid:()=>vG,undefined:()=>WG,union:()=>_t,unknown:()=>Ft,url:()=>kS,uuid:()=>lG,uuidv4:()=>uG,uuidv6:()=>pG,uuidv7:()=>dG,void:()=>HG,xid:()=>wG,xor:()=>JG});function EEe(){if(!Yr.localeError)fr(sh())}function Yl(){if(!Yr.memoizer)fr({memoizer:oh()})}function T(e){return FT(Td,e)}function aG(e){return Mk(wS,e)}function cG(e){return jk(bS,e)}function lG(e){return Fk(ls,e)}function uG(e){return zk(ls,e)}function pG(e){return Uk(ls,e)}function dG(e){return Lk(ls,e)}function kS(e){return ph($h,e)}function fG(e){return ph($h,{protocol:Vg,hostname:bA,...q.normalizeParams(e)})}function mG(e){return Bk(SS,e)}function gG(e){return qk($S,e)}function hG(e){return Vk(xS,e)}function yG(e){return Wk(PS,e)}function vG(e){return Hk(CS,e)}function wG(e){return Gk(_S,e)}function bG(e){return Zk(ES,e)}function kG(e){return Kk(RS,e)}function SG(e){return UT(PM,e)}function $G(e){return Jk(IS,e)}function xG(e){return Yk(AS,e)}function PG(e){return Xk(OS,e)}function CG(e){return Qk(DS,e)}function _G(e){return eS(TS,e)}function EG(e){return tS(NS,e)}function RG(e){return LT(CM,e)}function IG(e){return BT(_M,e)}function AG(e){return rS(MS,e)}function OG(e,t,r={}){return Jl(Xl,e,t,r)}function DG(e){return Jl(Xl,"hostname",wA,e)}function TG(e){return Jl(Xl,"hex",TA,e)}function NG(e){return Jl(Xl,"currency_code",SA,e)}function MG(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=ro[i];if(!n)throw Error(`Unrecognized hash format: ${i}`);return Jl(Xl,i,n,t)}function ot(e){return VT(Nd,e)}function hS(e){return HT(Ql,e)}function jG(e){return GT(Ql,e)}function FG(e){return ZT(Ql,e)}function zG(e){return KT(Ql,e)}function UG(e){return JT(Ql,e)}function Ct(e){return YT(Md,e)}function LG(e){return QT(jd,e)}function BG(e){return tN(jS,e)}function qG(e){return rN(jS,e)}function VG(e){return nN(EM,e)}function WG(e){return iN(RM,e)}function xh(e){return oN(IM,e)}function FS(){return sN(AM)}function Ft(){return aN(OM)}function zS(e){return cN(DM,e)}function HG(e){return lN(TM,e)}function GG(e){return uN(Ph,e)}function oe(e,t){return fN(NM,e,t)}function ZG(e){let t=e._zod.def.shape;return un(Object.keys(t))}function ce(e,t){let r={type:"object",shape:e??{},...q.normalizeParams(t)};return new Ch(r)}function KG(e,t){return new Ch({type:"object",shape:e,catchall:zS(),...q.normalizeParams(t)})}function yr(e,t){return new Ch({type:"object",shape:e,catchall:Ft(),...q.normalizeParams(t)})}function _t(e,t){return new _h({type:"union",options:e,...q.normalizeParams(t)})}function JG(e,t){return new MM({type:"union",options:e,inclusive:!1,...q.normalizeParams(t)})}function Eh(e,t,r){return new jM({type:"union",options:t,discriminator:e,...q.normalizeParams(r)})}function Fd(e,t){return new FM({type:"intersection",left:e,right:t})}function UM(e,t,r){let i=t instanceof Ue,n=i?r:t;return new zM({type:"tuple",items:e,rest:i?t:null,...q.normalizeParams(n)})}function At(e,t,r){if(!t||!t._zod)return new Od({type:"record",keyType:T(),valueType:e,...q.normalizeParams(t)});return new Od({type:"record",keyType:e,valueType:t,...q.normalizeParams(r)})}function YG(e,t,r){return new Od({type:"record",keyType:e,valueType:t,...q.normalizeParams(r),partial:!0})}function XG(e,t,r){return new Od({type:"record",keyType:e,valueType:t,mode:"loose",...q.normalizeParams(r)})}function QG(e,t,r){return new LM({type:"map",keyType:e,valueType:t,...q.normalizeParams(r)})}function e8(e,t){return new BM({type:"set",valueType:e,...q.normalizeParams(t)})}function un(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((i)=>[i,i])):e;return new Dd({type:"enum",entries:r,...q.normalizeParams(t)})}function t8(e,t){return new Dd({type:"enum",entries:e,...q.normalizeParams(t)})}function ve(e,t){return new qM({type:"literal",values:Array.isArray(e)?e:[e],...q.normalizeParams(t)})}function r8(e){return mN(VM,e)}function US(e){return new WM({type:"transform",transform:e})}function Rt(e){return new Rh({type:"optional",innerType:e})}function HM(e){return new LS({type:"optional",innerType:e})}function Sh(e){return new GM({type:"nullable",innerType:e})}function n8(e){return Rt(Sh(e))}function KM(e,t){return new ZM({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():q.shallowClone(t)}})}function YM(e,t){return new JM({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():q.shallowClone(t)}})}function XM(e,t){return new BS({type:"nonoptional",innerType:e,...q.normalizeParams(t)})}function i8(e){return new QM({type:"success",innerType:e})}function t1(e,t){return new e1({type:"catch",innerType:e,catchValue:typeof t==="function"?t:q.constantCatch(t)})}function o8(e){return dN(r1,e)}function yS(e,t){return new Ih({type:"pipe",in:e,out:t})}function s8(e,t,r){return new Ah({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function a8(e){let t=e._zod.def;return new Ah({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function o1(e){return new i1({type:"readonly",innerType:e})}function c8(e,t){return new s1({type:"template_literal",parts:e,...q.normalizeParams(t)})}function c1(e){return new a1({type:"lazy",getter:e})}function l8(e){return new l1({type:"promise",innerType:e})}function u8(e){return new u1({type:"function",input:Array.isArray(e?.input)?UM(e?.input):e?.input??oe(Ft()),output:e?.output??Ft()})}function p8(e){let t=new jt({check:"custom"});return t._zod.check=e,t}function qS(e,t){return gN(Oh,e??(()=>!0),t)}function p1(e,t={}){return hN(Oh,e,t)}function d1(e,t){return yN(e,t)}function m8(e,t={}){let r=new f1({type:"custom",check:"custom",fn:(i)=>i instanceof e,abort:!0,...q.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=(i)=>{if(!(i.value instanceof e))i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}function h8(e){let t=c1(()=>_t([T(e),ot(),Ct(),xh(),oe(t),At(T(),t)]));return t}function Dh(e,t){return new n1({type:"pipe",in:US(e),out:t})}var Ge,vS,Td,It,lc,uc,pc,dc,wS,bS,ls,$h,SS,$S,xS,PS,CS,_S,ES,RS,PM,IS,AS,OS,DS,TS,NS,CM,_M,MS,Xl,Nd,Ql,Md,jd,jS,EM,RM,IM,AM,OM,DM,TM,Ph,NM,Ch,_h,MM,jM,FM,zM,Od,LM,BM,Dd,qM,VM,WM,Rh,LS,GM,ZM,JM,BS,QM,e1,r1,Ih,Ah,n1,i1,s1,a1,l1,u1,Oh,d8,f8,f1,g8=(...e)=>bN({Codec:Ah,Boolean:Md,String:Td},...e);var fc=I(()=>{Bn();Bn();wh();Ll();yh();OD();mS();xM();Ge=M("ZodType",(e,t)=>(EEe(),Ue.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(q.mergeDefs(t,{checks:[...t.checks??[],...e.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return $t(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(p1(e,t))},superRefine(e,t){return this.check(d1(e,t))},overwrite(e){return this.check(Ao(e))},optional(){return Rt(this)},exactOptional(){return HM(this)},nullable(){return Sh(this)},nullish(){return Rt(Sh(this))},nonoptional(e){return XM(this,e)},array(){return oe(this)},or(e){return _t([this,e])},and(e){return Fd(this,e)},transform(e){return yS(this,US(e))},default(e){return KM(this,e)},prefault(e){return YM(this,e)},catch(e){return t1(this,e)},pipe(e){return yS(this,e)},readonly(){return o1(this)},describe(e){let t=this.clone();return ln.add(t,{description:e}),t},meta(...e){if(e.length===0)return ln.get(this);let t=this.clone();return ln.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get "~standard"(){return q.hide(this,"~standard",{...pk(this),jsonSchema:{input:_d(this,"input"),output:_d(this,"output")}})},set "~standard"(e){q.own(this,"~standard",e)},parse:function e(t,r){return dM(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await fM(this,t,r,{callee:e})},safeParse(e,t){return mM(this,e,t)},async safeParseAsync(e,t){return gM(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){q.own(this,"spa",e)},validate(e,t){return id(this,e,t)},validateAsync(e,t){return od(this,e,t)},encode:function e(t,r){return hM(this,t,r,{callee:e})},decode:function e(t,r){return yM(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await vM(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await wM(this,t,r,{callee:e})},safeEncode(e,t){return bM(this,e,t)},safeDecode(e,t){return kM(this,e,t)},async safeEncodeAsync(e,t){return SM(this,e,t)},async safeDecodeAsync(e,t){return $M(this,e,t)},toJSONSchema(e){return SN(this,{})(e)},get description(){return ln.get(this)?.description},get _def(){return this._zod.def}}),vS=M("_ZodString",(e,t)=>{Bl.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>PN(e,r,i,n)},q.derived({format:(e)=>zr(e).format??null,minLength:(e)=>zr(e).minimum??null,maxLength:(e)=>zr(e).maximum??null},{regex(...e){return this.check(md(...e))},includes(...e){return this.check(yd(...e))},startsWith(...e){return this.check(vd(...e))},endsWith(...e){return this.check(wd(...e))},min(...e){return this.check(oa(...e))},max(...e){return this.check(Zl(...e))},length(...e){return this.check(Kl(...e))},nonempty(...e){return this.check(oa(1,...e))},lowercase(e){return this.check(gd(e))},uppercase(e){return this.check(hd(e))},trim(){return this.check($d())},normalize(...e){return this.check(Sd(...e))},toLowerCase(){return this.check(xd())},toUpperCase(){return this.check(Pd())},slugify(){return this.check(Cd())}})),Td=M("ZodString",(e,t)=>{Bl.init(e,t),vS.init(e,t)},{email(e){return this.check(Mk(wS,e))},url(e){return this.check(ph($h,e))},jwt(e){return this.check(rS(MS,e))},emoji(e){return this.check(Bk(SS,e))},guid(e){return this.check(jk(bS,e))},uuid(e){return this.check(Fk(ls,e))},uuidv4(e){return this.check(zk(ls,e))},uuidv6(e){return this.check(Uk(ls,e))},uuidv7(e){return this.check(Lk(ls,e))},nanoid(e){return this.check(qk($S,e))},cuid(e){return this.check(Vk(xS,e))},cuid2(e){return this.check(Wk(PS,e))},ulid(e){return this.check(Hk(CS,e))},base64(e){return this.check(Qk(DS,e))},base64url(e){return this.check(eS(TS,e))},xid(e){return this.check(Gk(_S,e))},ksuid(e){return this.check(Zk(ES,e))},ipv4(e){return this.check(Kk(RS,e))},ipv6(e){return this.check(Jk(IS,e))},cidrv4(e){return this.check(Yk(AS,e))},cidrv6(e){return this.check(Xk(OS,e))},e164(e){return this.check(tS(NS,e))},datetime(e){return this.check(dh(lc,e))},date(e){return this.check(fh(uc,e))},time(e){return this.check(mh(pc,e))},duration(e){return this.check(gh(dc,e))}});It=M("ZodStringFormat",(e,t)=>{xt.init(e,t),vS.init(e,t)}),lc=M("ZodISODateTime",(e,t)=>{vO.init(e,t),It.init(e,t)}),uc=M("ZodISODate",(e,t)=>{wO.init(e,t),It.init(e,t)}),pc=M("ZodISOTime",(e,t)=>{bO.init(e,t),It.init(e,t)}),dc=M("ZodISODuration",(e,t)=>{kO.init(e,t),It.init(e,t)}),wS=M("ZodEmail",(e,t)=>{aO.init(e,t),It.init(e,t)});bS=M("ZodGUID",(e,t)=>{oO.init(e,t),It.init(e,t)});ls=M("ZodUUID",(e,t)=>{sO.init(e,t),It.init(e,t)});$h=M("ZodURL",(e,t)=>{uO.init(e,t),It.init(e,t)});SS=M("ZodEmoji",(e,t)=>{pO.init(e,t),It.init(e,t)});$S=M("ZodNanoID",(e,t)=>{dO.init(e,t),It.init(e,t)});xS=M("ZodCUID",(e,t)=>{fO.init(e,t),It.init(e,t)});PS=M("ZodCUID2",(e,t)=>{mO.init(e,t),It.init(e,t)});CS=M("ZodULID",(e,t)=>{gO.init(e,t),It.init(e,t)});_S=M("ZodXID",(e,t)=>{hO.init(e,t),It.init(e,t)});ES=M("ZodKSUID",(e,t)=>{yO.init(e,t),It.init(e,t)});RS=M("ZodIPv4",(e,t)=>{SO.init(e,t),It.init(e,t)});PM=M("ZodMAC",(e,t)=>{xO.init(e,t),It.init(e,t)});IS=M("ZodIPv6",(e,t)=>{$O.init(e,t),It.init(e,t)});AS=M("ZodCIDRv4",(e,t)=>{PO.init(e,t),It.init(e,t)});OS=M("ZodCIDRv6",(e,t)=>{CO.init(e,t),It.init(e,t)});DS=M("ZodBase64",(e,t)=>{_O.init(e,t),It.init(e,t)});TS=M("ZodBase64URL",(e,t)=>{EO.init(e,t),It.init(e,t)});NS=M("ZodE164",(e,t)=>{RO.init(e,t),It.init(e,t)});CM=M("ZodCreditCard",(e,t)=>{IO.init(e,t),It.init(e,t)});_M=M("ZodIBAN",(e,t)=>{AO.init(e,t),It.init(e,t)});MS=M("ZodJWT",(e,t)=>{OO.init(e,t),It.init(e,t)});Xl=M("ZodCustomStringFormat",(e,t)=>{DO.init(e,t),It.init(e,t)});Nd=M("ZodNumber",(e,t)=>{kk.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>CN(e,r,i,n),e.isFinite=!0},q.derived({minValue:(e)=>{let{minimum:t,exclusiveMinimum:r}=zr(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:(e)=>{let{maximum:t,exclusiveMaximum:r}=zr(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:(e)=>{let{isInt:t,multipleOf:r}=zr(e);return!!t||!!r?.some(Number.isSafeInteger)},format:(e)=>zr(e).format??null},{gt(e,t){return this.check(ss(e,t))},gte(e,t){return this.check(Ri(e,t))},min(e,t){return this.check(Ri(e,t))},lt(e,t){return this.check(os(e,t))},lte(e,t){return this.check(Ei(e,t))},max(e,t){return this.check(Ei(e,t))},int(e){return this.check(hS(e))},safe(e){return this.check(hS(e))},positive(e){return this.check(ss(0,e))},nonnegative(e){return this.check(Ri(0,e))},negative(e){return this.check(os(0,e))},nonpositive(e){return this.check(Ei(0,e))},multipleOf(e,t){return this.check(ic(e,t))},step(e,t){return this.check(ic(e,t))},finite(){return this}}));Ql=M("ZodNumberFormat",(e,t)=>{TO.init(e,t),Nd.init(e,t)});Md=M("ZodBoolean",(e,t)=>{Qg.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_N(e,r,i,n)});jd=M("ZodBigInt",(e,t)=>{Sk.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>EN(e,r,i,n)},q.derived({minValue:(e)=>zr(e).minimum??null,maxValue:(e)=>zr(e).maximum??null,format:(e)=>zr(e).format??null},{gte(e,t){return this.check(Ri(e,t))},min(e,t){return this.check(Ri(e,t))},gt(e,t){return this.check(ss(e,t))},lt(e,t){return this.check(os(e,t))},lte(e,t){return this.check(Ei(e,t))},max(e,t){return this.check(Ei(e,t))},positive(e){return this.check(ss(BigInt(0),e))},negative(e){return this.check(os(BigInt(0),e))},nonpositive(e){return this.check(Ei(BigInt(0),e))},nonnegative(e){return this.check(Ri(BigInt(0),e))},multipleOf(e,t){return this.check(ic(e,t))}}));jS=M("ZodBigIntFormat",(e,t)=>{NO.init(e,t),jd.init(e,t)});EM=M("ZodSymbol",(e,t)=>{MO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>RN(e,r,i,n)});RM=M("ZodUndefined",(e,t)=>{jO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>AN(e,r,i,n)});IM=M("ZodNull",(e,t)=>{FO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>IN(e,r,i,n)});AM=M("ZodAny",(e,t)=>{zO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>TN(e,r,i,n)});OM=M("ZodUnknown",(e,t)=>{UO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>NN(e,r,i,n)});DM=M("ZodNever",(e,t)=>{LO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>DN(e,r,i,n)});TM=M("ZodVoid",(e,t)=>{BO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ON(e,r,i,n)});Ph=M("ZodDate",(e,t)=>{qO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>MN(e,r,i,n),e.min=(r,i)=>e.check(Ri(r,i)),e.max=(r,i)=>e.check(Ei(r,i))},q.derived({minDate:(e)=>{let{minimum:t}=zr(e);return t?new Date(t):null},maxDate:(e)=>{let{maximum:t}=zr(e);return t?new Date(t):null}},{}));NM=M("ZodArray",(e,t)=>{Yl(),VO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ZN(e,r,i,n),e.element=t.element},{min(e,t){return this.check(oa(e,t))},nonempty(e){return this.check(oa(1,e))},max(e,t){return this.check(Zl(e,t))},length(e,t){return this.check(Kl(e,t))},unwrap(){return this.element}});Ch=M("ZodObject",(e,t)=>{Yl(),WO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>KN(e,r,i,n),q.installLazyProp(e,"shape",(r)=>r._zod.def.shape,!1)},{keyof(){return un(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(q.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(q.mergeDefs(this._zod.def,{catchall:Ft()}))},loose(){return this.clone(q.mergeDefs(this._zod.def,{catchall:Ft()}))},strict(){return this.clone(q.mergeDefs(this._zod.def,{catchall:zS()}))},strip(){return this.clone(q.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return q.extend(this,e)},safeExtend(e){return q.safeExtend(this,e)},merge(e){return q.merge(this,e)},pick(e){return q.pick(this,e)},omit(e){return q.omit(this,e)},partial(...e){return q.partial(Rh,this,e[0])},exactPartial(...e){return q.partial(LS,this,e[0],"exactPartial")},required(...e){return q.required(BS,this,e[0])}});_h=M("ZodUnion",(e,t)=>{eh.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lS(e,r,i,n),e.options=t.options});MM=M("ZodXor",(e,t)=>{_h.init(e,t),HO.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lS(e,r,i,n),e.options=t.options});jM=M("ZodDiscriminatedUnion",(e,t)=>{_h.init(e,t),ZO.init(e,t)});FM=M("ZodIntersection",(e,t)=>{KO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>JN(e,r,i,n)});zM=M("ZodTuple",(e,t)=>{Yl(),$k.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>YN(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map((t)=>new Rh({type:"optional",innerType:t}))})}});Od=M("ZodRecord",(e,t)=>{Yl(),JO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>XN(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});LM=M("ZodMap",(e,t)=>{Yl(),YO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>HN(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(as(...r)),e.nonempty=(r)=>e.check(as(1,r)),e.max=(...r)=>e.check(oc(...r)),e.size=(...r)=>e.check(Gl(...r))});BM=M("ZodSet",(e,t)=>{Yl(),XO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>GN(e,r,i,n),e.min=(...r)=>e.check(as(...r)),e.nonempty=(r)=>e.check(as(1,r)),e.max=(...r)=>e.check(oc(...r)),e.size=(...r)=>e.check(Gl(...r))});Dd=M("ZodEnum",(e,t)=>{QO.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(i,n,o)=>jN(e,i,n,o),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Dd({...t,checks:[],...q.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let s of i)if(r.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new Dd({...t,checks:[],...q.normalizeParams(n),entries:o})}});qM=M("ZodLiteral",(e,t)=>{eD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>FN(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});VM=M("ZodFile",(e,t)=>{tD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>LN(e,r,i,n),e.min=(r,i)=>e.check(as(r,i)),e.max=(r,i)=>e.check(oc(r,i)),e.mime=(r,i)=>e.check(kd(Array.isArray(r)?r:[r],i))});WM=M("ZodTransform",(e,t)=>{Yl(),rD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>WN(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new zl(e.constructor.name);r.addIssue=(o)=>{if(typeof o==="string")r.issues.push(q.issue(o,r.value,t));else{let s=o;if(s.fatal)s.continue=!1;if(s.code??(s.code="custom"),!("input"in s))s.input=r.value;s.inst??(s.inst=e),r.issues.push(q.issue(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((o)=>(r.value=o,r));return r.value=n,r}});Rh=M("ZodOptional",(e,t)=>{xk.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uS(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});LS=M("ZodExactOptional",(e,t)=>{nD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uS(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});GM=M("ZodNullable",(e,t)=>{iD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>QN(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});ZM=M("ZodDefault",(e,t)=>{oD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});JM=M("ZodPrefault",(e,t)=>{sD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});BS=M("ZodNonOptional",(e,t)=>{aD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>eM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});QM=M("ZodSuccess",(e,t)=>{cD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>BN(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});e1=M("ZodCatch",(e,t)=>{lD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>iM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});r1=M("ZodNaN",(e,t)=>{uD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zN(e,r,i,n)});Ih=M("ZodPipe",(e,t)=>{Pk.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>oM(e,r,i,n),e.in=t.in,e.out=t.out});Ah=M("ZodCodec",(e,t)=>{Ih.init(e,t),th.init(e,t)});n1=M("ZodPreprocess",(e,t)=>{Ih.init(e,t),pD.init(e,t)}),i1=M("ZodReadonly",(e,t)=>{dD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});s1=M("ZodTemplateLiteral",(e,t)=>{fD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>UN(e,r,i,n)});a1=M("ZodLazy",(e,t)=>{rh.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cM(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});l1=M("ZodPromise",(e,t)=>{gD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>aM(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});u1=M("ZodFunction",(e,t)=>{mD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>VN(e,r,i,n)});Oh=M("ZodCustom",(e,t)=>{hD.init(e,t),Ge.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qN(e,r,i,n)});d8=vN,f8=wN,f1=M("ZodInstanceOf",(e,t)=>{Oh.init(e,t)},{properties(e,t){return this.check(bd(e,t))}})});function REe(e){fr({customError:e})}function IEe(){return fr().customError}var g1,m1;var y8=I(()=>{Bn();g1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function(e){})(m1||(m1={}))});var eu={};vn(eu,{ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,date:()=>OEe,datetime:()=>AEe,duration:()=>TEe,time:()=>DEe});function AEe(e){return dh(lc,e)}function OEe(e){return fh(uc,e)}function DEe(e){return mh(pc,e)}function TEe(e){return gh(dc,e)}var VS=I(()=>{Bn();fc();fc()});function MEe(e,t){let r=e.$schema;if(r==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(r==="http://json-schema.org/draft-07/schema#")return"draft-7";if(r==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function v8(e,t){return e.map((r,i)=>i<t?r:r.optional())}function jEe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function FEe(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1]===void 0?void 0:jEe(r[1]);if(!n||!t.defs[n])throw Error(`Reference not found: ${e}`);return t.defs[n]}throw Error(`Reference not found: ${e}`)}function zEe(e,t){return ue.transform((i)=>i).check((i)=>{let n=i.value;if(typeof n!=="object"||n===null||Array.isArray(n))return;let o=Object.getOwnPropertyNames(n);if(t.minProperties!==void 0&&o.length<t.minProperties)i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:n,inst:e,continue:!0});if(t.maxProperties!==void 0&&o.length>t.maxProperties)i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:n,inst:e,continue:!0});if(t.keySchema)for(let s of o){let a=t.keySchema.safeParse(s);if(a.success)continue;i.issues.push({code:"invalid_key",origin:"record",issues:a.error.issues,input:s,path:[s],continue:!0})}}).pipe(e)}function h1(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let i=String(e);return`${r[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let s of e){let a=h1(s,t);if(a===null)return null;o.push(a)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),n=[];for(let o of i){let s=h1(e[o],t);if(s===null)return null;n.push(`${o.length}:${o}=${s}`)}return`o${n.length}:{${n.join(",")}}`}finally{t.delete(e)}}function Th(e){if(typeof e!=="object"||e===null)return!1;if(Array.isArray(e))return e.some(Th);if(typeof e.$ref==="string")return!0;return Object.entries(e).some(([t,r])=>{if(UEe.has(t))return Th(r);if(!LEe.has(t)||typeof r!=="object"||r===null)return!1;return Object.values(r).some(Th)})}function w8(e){return e===1?"element":"elements"}function BEe(e,t){return ue.transform((i)=>i).check((i)=>{let n=i.value;if(!Array.isArray(n))return;if(t.uniqueItems===!0){let o=new Map;for(let s=0;s<n.length;s++){let a=h1(n[s],new Set);if(a===null)continue;let c=o.get(a);if(c===void 0){o.set(a,s);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${s} duplicates the one at index ${c}`,input:n,path:[s],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,s=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,a=0;for(let c of n)if(t.containsSchema.safeParse(c).success&&++a>=s)break;if(a<o)i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${w8(o)}; found ${a}`,input:n,continue:!0});if(t.maxContains!==void 0&&a>t.maxContains)i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${w8(t.maxContains)}`,input:n,continue:!0})}}).pipe(e)}function b8(e,t){if(e===!1)return;if(e===void 0||e===!0)return ue.any();return Vn(e,t)}function k8(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return ue.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ue.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=FEe(n,t),s=Vn(o,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ue.null();if(n.length===0)return ue.never();if(n.length===1)return ue.literal(n[0]);if(n.every((s)=>typeof s==="string"))return ue.enum(n);let o=n.map((s)=>ue.literal(s));if(o.length<2)return o[0];return ue.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ue.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map((o)=>{let s={...e,type:o};return k8(s,t)});if(n.length===0)return ue.never();if(n.length===1)return n[0];return ue.union(n)}if(!r)return ue.any();let i;switch(r){case"string":{let n=ue.string();if(e.format){let o=e.format;if(o==="email")n=n.check(ue.email());else if(o==="uri"||o==="uri-reference")n=n.check(ue.url());else if(o==="uuid"||o==="guid")n=n.check(ue.uuid());else if(o==="date-time")n=n.check(ue.iso.datetime({offset:!0}));else if(o==="date")n=n.check(ue.iso.date());else if(o==="time")n=n.check(ue.regex(qEe));else if(o==="duration")n=n.check(ue.iso.duration());else if(o==="hostname")n=n.check(ue.hostname());else if(o==="ipv4")n=n.check(ue.ipv4());else if(o==="ipv6")n=n.check(ue.ipv6());else if(o==="mac")n=n.check(ue.mac());else if(o==="cidr")n=n.check(ue.cidrv4());else if(o==="cidr-v6")n=n.check(ue.cidrv6());else if(o==="base64")n=n.check(ue.base64());else if(o==="base64url")n=n.check(ue.base64url());else if(o==="e164")n=n.check(ue.e164());else if(o==="credit_card")n=n.check(ue.creditCard());else if(o==="iban")n=n.check(ue.iban());else if(o==="jwt")n=n.check(ue.jwt());else if(o==="emoji")n=n.check(ue.emoji());else if(o==="nanoid")n=n.check(ue.nanoid());else if(o==="cuid")n=n.check(ue.cuid());else if(o==="cuid2")n=n.check(ue.cuid2());else if(o==="ulid")n=n.check(ue.ulid());else if(o==="xid")n=n.check(ue.xid());else if(o==="ksuid")n=n.check(ue.ksuid())}if(typeof e.minLength==="number")n=n.min(e.minLength);if(typeof e.maxLength==="number")n=n.max(e.maxLength);if(e.pattern)n=n.regex(new RegExp(e.pattern));i=n;break}case"number":case"integer":{let n=r==="integer"?ue.number().int():ue.number();if(typeof e.minimum==="number"&&e.exclusiveMinimum!==!0)n=n.min(e.minimum);if(typeof e.maximum==="number"&&e.exclusiveMaximum!==!0)n=n.max(e.maximum);if(typeof e.exclusiveMinimum==="number")n=n.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")n=n.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")n=n.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")n=n.lt(e.maximum);if(typeof e.multipleOf==="number")n=n.multipleOf(e.multipleOf);i=n;break}case"boolean":{i=ue.boolean();break}case"null":{i=ue.null();break}case"object":{let n={},o=e.properties||{},s=new Set(e.required||[]),a=typeof e.additionalProperties==="object"?Vn(e.additionalProperties,t):void 0;for(let[p,d]of Object.entries(o)){let f=Vn(d,t);cn(n,p,s.has(p)?f:f.optional())}if(e.patternProperties){let p=e.patternProperties,d=Object.keys(p),f=[];for(let g of d){let h=Vn(p[g],t),y=ue.string().regex(new RegExp(g));f.push(ue.looseRecord(y,h))}let m=[];if(Object.keys(n).length>0)m.push(ue.object(n).passthrough());if(m.push(...f),m.length===0)i=ue.object({}).passthrough();else if(m.length===1)i=m[0];else{let g=ue.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=ue.intersection(g,m[h]);i=g}if(e.additionalProperties===!1){let g=Object.keys(n),h=d.map((v)=>new RegExp(v)),y=i;i=i.check((v)=>{if(!eo(v.value))return;let w=[];for(let x of Object.keys(v.value)){if(g.includes(x))continue;if(h.some((b)=>b.test(x)))continue;w.push(x)}if(w.length)v.issues.push({code:"unrecognized_keys",keys:w,input:v.value,inst:y})})}}else{let p=ue.object(n);if(e.additionalProperties===!1)i=p.strict();else if(a)i=p.catchall(a);else i=p.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,l=typeof e.minProperties==="number"?e.minProperties:void 0,u=typeof e.maxProperties==="number"?e.maxProperties:void 0;if(c||l!==void 0||u!==void 0){let p;if(c){let d=typeof e.propertyNames==="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;p=Vn(d,t)}i=zEe(i,{keySchema:p,minProperties:l,maxProperties:u})}break}case"array":{let{prefixItems:n,items:o}=e;if(n&&Array.isArray(n)){let s=typeof e.minItems==="number"?e.minItems:0,a=n.map((p)=>Vn(p,t)),c=v8(a,s),l=!Array.isArray(o)?b8(o,t):void 0,u=ue.tuple(c);if(i=l?u.rest(l):u,typeof e.minItems==="number")i=i.check(ue.minLength(e.minItems));if(typeof e.maxItems==="number")i=i.check(ue.maxLength(e.maxItems))}else if(Array.isArray(o)){let s=typeof e.minItems==="number"?e.minItems:0,a=o.map((p)=>Vn(p,t)),c=v8(a,s),l=b8(e.additionalItems,t),u=ue.tuple(c);if(i=l?u.rest(l):u,typeof e.minItems==="number")i=i.check(ue.minLength(e.minItems));if(typeof e.maxItems==="number")i=i.check(ue.maxLength(e.maxItems))}else if(o!==void 0){let s=Vn(o,t),a=ue.array(s);if(typeof e.minItems==="number")a=a.min(e.minItems);if(typeof e.maxItems==="number")a=a.max(e.maxItems);i=a}else i=ue.array(ue.any());if(e.uniqueItems===!0||e.contains!==void 0)i=BEe(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Vn(e.contains,t):void 0,minContains:typeof e.minContains==="number"?e.minContains:void 0,maxContains:typeof e.maxContains==="number"?e.maxContains:void 0});break}default:throw Error(`Unsupported type: ${r}`)}return i}function Vn(e,t){if(typeof e==="boolean")return e?ue.any():ue.never();let r=k8(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map((l)=>Vn(l,t)),c=ue.union(a);r=i?ue.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map((l)=>Vn(l,t)),c=ue.xor(a);r=i?ue.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:ue.any();else{let a=i?r:Vn(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)a=ue.intersection(a,Vn(e.allOf[l],t));r=a}if(e.nullable===!0&&t.version==="openapi-3.0")r=ue.nullable(r);if(e.readOnly===!0)r=ue.readonly(r);if(e.default!==void 0)r=r.default(e.default);let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)if(a in e)n[a]=e[a];let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)if(a in e)n[a]=e[a];if(e.type==="object"&&e.$ref===void 0){if(e.propertyNames!==void 0&&!Th(e.propertyNames))n.propertyNames=e.propertyNames;for(let a of["minProperties","maxProperties"])if(e[a]!==void 0)n[a]=e[a]}if(e.type==="array"&&e.$ref===void 0){if(e.contains!==void 0&&!Th(e.contains))n.contains=e.contains;for(let a of["uniqueItems","minContains","maxContains"])if(e[a]!==void 0)n[a]=e[a]}for(let a of Object.keys(e))if(!NEe.has(a))cn(n,a,e[a]);if(Object.keys(n).length>0)t.registry.add(r,n);if(e.description)r=r.describe(e.description);return r}function S8(e,t){if(typeof e==="boolean")return e?ue.any():ue.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=MEe(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ln};return Vn(r,o)}var ue,NEe,UEe,LEe,qEe;var $8=I(()=>{uh();se();mS();VS();fc();ue={...zd,...fS,iso:eu},NEe=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"]);UEe=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),LEe=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);qEe=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/});function x8(e){return bh(e,{object:(t)=>t.partial(),union:(t)=>{let r=t._zod.def;return r.discriminator===void 0?t:_t(r.options)}})}var P8=I(()=>{uM();fc()});function VEe(e,t){if(!t?.length)return e;let r=e._zod.def;return $t(e,Io(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function C8(e){return VEe(e.out,e.checks)}function WEe(e){return e.in._zod.traits.has("$ZodTransform")?C8(e):e.in}function _8(e){return bh(e,{pipe:(t)=>WEe(t._zod.def),default:(t,r)=>r?Rt(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function E8(e){return bh(e,{pipe:(t)=>C8(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var R8=I(()=>{se();uM();fc()});var Nh={};vn(Nh,{bigint:()=>KEe,boolean:()=>ZEe,date:()=>JEe,number:()=>GEe,string:()=>HEe});function HEe(e){return zT(Td,e)}function GEe(e){return WT(Nd,e)}function ZEe(e){return XT(Md,e)}function KEe(e){return eN(jd,e)}function JEe(e){return pN(Ph,e)}var I8=I(()=>{Bn();fc()});var S={};vn(S,{$brand:()=>WI,$input:()=>AT,$output:()=>IT,INVALID:()=>Un,NEVER:()=>zg,TimePrecision:()=>qT,ZodAny:()=>AM,ZodArray:()=>NM,ZodBase64:()=>DS,ZodBase64URL:()=>TS,ZodBigInt:()=>jd,ZodBigIntFormat:()=>jS,ZodBoolean:()=>Md,ZodCIDRv4:()=>AS,ZodCIDRv6:()=>OS,ZodCUID:()=>xS,ZodCUID2:()=>PS,ZodCatch:()=>e1,ZodCodec:()=>Ah,ZodCompileAsyncError:()=>is,ZodCompileUnsupportedError:()=>rt,ZodCreditCard:()=>CM,ZodCustom:()=>Oh,ZodCustomStringFormat:()=>Xl,ZodDate:()=>Ph,ZodDefault:()=>ZM,ZodDiscriminatedUnion:()=>jM,ZodE164:()=>NS,ZodEmail:()=>wS,ZodEmoji:()=>SS,ZodEnum:()=>Dd,ZodError:()=>CEe,ZodExactOptional:()=>LS,ZodFile:()=>VM,ZodFirstPartyTypeKind:()=>m1,ZodFunction:()=>u1,ZodGUID:()=>bS,ZodIBAN:()=>_M,ZodIPv4:()=>RS,ZodIPv6:()=>IS,ZodISODate:()=>uc,ZodISODateTime:()=>lc,ZodISODuration:()=>dc,ZodISOTime:()=>pc,ZodInstanceOf:()=>f1,ZodIntersection:()=>FM,ZodIssueCode:()=>g1,ZodJWT:()=>MS,ZodKSUID:()=>ES,ZodLazy:()=>a1,ZodLiteral:()=>qM,ZodMAC:()=>PM,ZodMap:()=>LM,ZodNaN:()=>r1,ZodNanoID:()=>$S,ZodNever:()=>DM,ZodNonOptional:()=>BS,ZodNull:()=>IM,ZodNullable:()=>GM,ZodNumber:()=>Nd,ZodNumberFormat:()=>Ql,ZodObject:()=>Ch,ZodOptional:()=>Rh,ZodPipe:()=>Ih,ZodPrefault:()=>JM,ZodPreprocess:()=>n1,ZodPromise:()=>l1,ZodReadonly:()=>i1,ZodRealError:()=>ci,ZodRecord:()=>Od,ZodSet:()=>BM,ZodString:()=>Td,ZodStringFormat:()=>It,ZodSuccess:()=>QM,ZodSymbol:()=>EM,ZodTemplateLiteral:()=>s1,ZodTransform:()=>WM,ZodTuple:()=>zM,ZodType:()=>Ge,ZodULID:()=>CS,ZodURL:()=>$h,ZodUUID:()=>ls,ZodUndefined:()=>RM,ZodUnion:()=>_h,ZodUnknown:()=>OM,ZodVoid:()=>TM,ZodXID:()=>_S,ZodXor:()=>MM,_ZodString:()=>vS,_default:()=>KM,_function:()=>u8,any:()=>FS,array:()=>oe,base64:()=>CG,base64url:()=>_G,bigint:()=>LG,boolean:()=>Ct,catch:()=>t1,check:()=>p8,cidrv4:()=>xG,cidrv6:()=>PG,clone:()=>$t,codec:()=>s8,coerce:()=>Nh,compile:()=>MT,config:()=>fr,core:()=>cs,creditCard:()=>RG,cuid:()=>hG,cuid2:()=>yG,currencyCode:()=>NG,custom:()=>qS,date:()=>GG,decode:()=>yM,decodeAsync:()=>wM,deepPartial:()=>x8,describe:()=>d8,discriminatedUnion:()=>Eh,e164:()=>EG,email:()=>aG,emoji:()=>mG,encode:()=>hM,encodeAsync:()=>vM,endsWith:()=>wd,enum:()=>un,exactOptional:()=>HM,file:()=>r8,flattenError:()=>Ug,float32:()=>jG,float64:()=>FG,formatError:()=>Lg,fromJSONSchema:()=>S8,function:()=>u8,getDiscriminatedOption:()=>GO,getErrorMap:()=>IEe,globalRegistry:()=>ln,gt:()=>ss,gte:()=>Ri,guid:()=>cG,hash:()=>MG,hex:()=>TG,hostname:()=>DG,httpUrl:()=>fG,iban:()=>IG,includes:()=>yd,input:()=>_8,instanceof:()=>m8,int:()=>hS,int32:()=>zG,int64:()=>BG,intersection:()=>Fd,invertCodec:()=>a8,ipv4:()=>kG,ipv6:()=>$G,iso:()=>eu,json:()=>h8,jwt:()=>AG,keyof:()=>ZG,ksuid:()=>bG,lazy:()=>c1,length:()=>Kl,literal:()=>ve,locales:()=>dd,looseObject:()=>yr,looseRecord:()=>XG,lowercase:()=>gd,lt:()=>os,lte:()=>Ei,mac:()=>SG,map:()=>QG,maxLength:()=>Zl,maxSize:()=>oc,memoizer:()=>oh,meta:()=>f8,mime:()=>kd,minLength:()=>oa,minSize:()=>as,multipleOf:()=>ic,nan:()=>o8,nanoid:()=>gG,nativeEnum:()=>t8,negative:()=>iS,never:()=>zS,nonnegative:()=>sS,nonoptional:()=>XM,nonpositive:()=>oS,normalize:()=>Sd,null:()=>xh,nullable:()=>Sh,nullish:()=>n8,number:()=>ot,object:()=>ce,optional:()=>Rt,output:()=>E8,overwrite:()=>Ao,parse:()=>dM,parseAsync:()=>fM,partialRecord:()=>YG,pipe:()=>yS,positive:()=>nS,prefault:()=>YM,preprocess:()=>Dh,prettifyError:()=>JI,promise:()=>l8,properties:()=>bd,property:()=>aS,readonly:()=>o1,record:()=>At,refine:()=>p1,regex:()=>md,regexes:()=>ro,registry:()=>Ok,safeDecode:()=>kM,safeDecodeAsync:()=>$M,safeEncode:()=>bM,safeEncodeAsync:()=>SM,safeParse:()=>mM,safeParseAsync:()=>gM,set:()=>e8,setErrorMap:()=>REe,size:()=>Gl,slugify:()=>Cd,startsWith:()=>vd,strictObject:()=>KG,string:()=>T,stringFormat:()=>OG,stringbool:()=>g8,success:()=>i8,superRefine:()=>d1,symbol:()=>VG,templateLiteral:()=>c8,toJSONSchema:()=>pS,toLowerCase:()=>xd,toUpperCase:()=>Pd,toZod:()=>Ig,transform:()=>US,treeifyError:()=>KI,trim:()=>$d,tuple:()=>UM,uint32:()=>UG,uint64:()=>qG,ulid:()=>vG,undefined:()=>WG,union:()=>_t,unknown:()=>Ft,uppercase:()=>hd,url:()=>kS,util:()=>q,uuid:()=>lG,uuidv4:()=>uG,uuidv6:()=>pG,uuidv7:()=>dG,validate:()=>id,validateAsync:()=>od,void:()=>HG,withParser:()=>Dk,xid:()=>wG,xor:()=>JG});var WS=I(()=>{Bn();Bn();wh();$8();P8();R8();Ak();VS();VS();I8();fc();mS();pM();xM();y8()});var A8=I(()=>{WS()});var y1=I(()=>{A8()});var mc="2025-11-25",GS,gc="io.modelcontextprotocol/related-task",ZS="2.0",Ur,D8,T8,Vgt,YEe,XEe,v1,Ii,Mh,N8=(e)=>Mh.safeParse(e).success,pn,no,io,dn,KS,M8,jh=(e)=>M8.safeParse(e).success,j8,F8=(e)=>j8.safeParse(e).success,w1,tu=(e)=>w1.safeParse(e).success,$e,b1,z8=(e)=>b1.safeParse(e).success,hc,Wgt,sa,QEe,JS,eRe,Fh,Ud,U8,tRe,rRe,nRe,iRe,oRe,sRe,k1,aRe,S1,YS,L8=(e)=>YS.safeParse(e).success,XS,cRe,lRe,QS,uRe,zh,Uh,pRe,Lh,aa,dRe,Bh,e$,t$,r$,Hgt,n$,i$,o$,B8,q8,V8,$1,W8,qh,Ld,H8,fRe,x1,P1,C1,_1,E1,mRe,R1,I1,A1,gRe,hRe,yRe,vRe,wRe,bRe,kRe,SRe,O1,D1,$Re,T1,N1,M1,j1,xRe,PRe,CRe,F1,_Re,z1,U1,ERe,RRe,G8,L1,B1,yc,Ggt,IRe,Vh,q1,Z8,Wh,ARe,V1,ORe,DRe,TRe,NRe,MRe,jRe,FRe,HS,zRe,URe,W1,ru,Hh,LRe,BRe,qRe,VRe,WRe,HRe,GRe,ZRe,KRe,JRe,YRe,XRe,QRe,eIe,tIe,H1,rIe,nIe,vc,iIe,oIe,sIe,aIe,G1,cIe,lIe,Z1,uIe,Zgt,Kgt,Jgt,Ygt,Xgt,Qgt,he,K8;var oo=I(()=>{y1();GS=[mc,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ur=qS((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),D8=_t([T(),ot().int()]),T8=T(),Vgt=yr({ttl:ot().optional(),pollInterval:ot().optional()}),YEe=ce({ttl:ot().optional()}),XEe=ce({taskId:T()}),v1=yr({progressToken:D8.optional(),[gc]:XEe.optional()}),Ii=ce({_meta:v1.optional()}),Mh=Ii.extend({task:YEe.optional()}),pn=ce({method:T(),params:Ii.loose().optional()}),no=ce({_meta:v1.optional()}),io=ce({method:T(),params:no.loose().optional()}),dn=yr({_meta:v1.optional()}),KS=_t([T(),ot().int()]),M8=ce({jsonrpc:ve(ZS),id:KS,...pn.shape}).strict(),j8=ce({jsonrpc:ve(ZS),...io.shape}).strict(),w1=ce({jsonrpc:ve(ZS),id:KS,result:dn}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})($e||($e={}));b1=ce({jsonrpc:ve(ZS),id:KS.optional(),error:ce({code:ot().int(),message:T(),data:Ft().optional()})}).strict(),hc=_t([M8,j8,w1,b1]),Wgt=_t([w1,b1]),sa=dn.strict(),QEe=no.extend({requestId:KS.optional(),reason:T().optional()}),JS=io.extend({method:ve("notifications/cancelled"),params:QEe}),eRe=ce({src:T(),mimeType:T().optional(),sizes:oe(T()).optional(),theme:un(["light","dark"]).optional()}),Fh=ce({icons:oe(eRe).optional()}),Ud=ce({name:T(),title:T().optional()}),U8=Ud.extend({...Ud.shape,...Fh.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),tRe=Fd(ce({applyDefaults:Ct().optional()}),At(T(),Ft())),rRe=Dh((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Fd(ce({form:tRe.optional(),url:Ur.optional()}),At(T(),Ft()).optional())),nRe=yr({list:Ur.optional(),cancel:Ur.optional(),requests:yr({sampling:yr({createMessage:Ur.optional()}).optional(),elicitation:yr({create:Ur.optional()}).optional()}).optional()}),iRe=yr({list:Ur.optional(),cancel:Ur.optional(),requests:yr({tools:yr({call:Ur.optional()}).optional()}).optional()}),oRe=ce({experimental:At(T(),Ur).optional(),sampling:ce({context:Ur.optional(),tools:Ur.optional()}).optional(),elicitation:rRe.optional(),roots:ce({listChanged:Ct().optional()}).optional(),tasks:nRe.optional(),extensions:At(T(),Ur).optional()}),sRe=Ii.extend({protocolVersion:T(),capabilities:oRe,clientInfo:U8}),k1=pn.extend({method:ve("initialize"),params:sRe}),aRe=ce({experimental:At(T(),Ur).optional(),logging:Ur.optional(),completions:Ur.optional(),prompts:ce({listChanged:Ct().optional()}).optional(),resources:ce({subscribe:Ct().optional(),listChanged:Ct().optional()}).optional(),tools:ce({listChanged:Ct().optional()}).optional(),tasks:iRe.optional(),extensions:At(T(),Ur).optional()}),S1=dn.extend({protocolVersion:T(),capabilities:aRe,serverInfo:U8,instructions:T().optional()}),YS=io.extend({method:ve("notifications/initialized"),params:no.optional()}),XS=pn.extend({method:ve("ping"),params:Ii.optional()}),cRe=ce({progress:ot(),total:Rt(ot()),message:Rt(T())}),lRe=ce({...no.shape,...cRe.shape,progressToken:D8}),QS=io.extend({method:ve("notifications/progress"),params:lRe}),uRe=Ii.extend({cursor:T8.optional()}),zh=pn.extend({params:uRe.optional()}),Uh=dn.extend({nextCursor:T8.optional()}),pRe=un(["working","input_required","completed","failed","cancelled"]),Lh=ce({taskId:T(),status:pRe,ttl:_t([ot(),xh()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:Rt(ot()),statusMessage:Rt(T())}),aa=dn.extend({task:Lh}),dRe=no.merge(Lh),Bh=io.extend({method:ve("notifications/tasks/status"),params:dRe}),e$=pn.extend({method:ve("tasks/get"),params:Ii.extend({taskId:T()})}),t$=dn.merge(Lh),r$=pn.extend({method:ve("tasks/result"),params:Ii.extend({taskId:T()})}),Hgt=dn.loose(),n$=zh.extend({method:ve("tasks/list")}),i$=Uh.extend({tasks:oe(Lh)}),o$=pn.extend({method:ve("tasks/cancel"),params:Ii.extend({taskId:T()})}),B8=dn.merge(Lh),q8=ce({uri:T(),mimeType:Rt(T()),_meta:At(T(),Ft()).optional()}),V8=q8.extend({text:T()}),$1=T().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),W8=q8.extend({blob:$1}),qh=un(["user","assistant"]),Ld=ce({audience:oe(qh).optional(),priority:ot().min(0).max(1).optional(),lastModified:eu.datetime({offset:!0}).optional()}),H8=ce({...Ud.shape,...Fh.shape,uri:T(),description:Rt(T()),mimeType:Rt(T()),size:Rt(ot()),annotations:Ld.optional(),_meta:Rt(yr({}))}),fRe=ce({...Ud.shape,...Fh.shape,uriTemplate:T(),description:Rt(T()),mimeType:Rt(T()),annotations:Ld.optional(),_meta:Rt(yr({}))}),x1=zh.extend({method:ve("resources/list")}),P1=Uh.extend({resources:oe(H8)}),C1=zh.extend({method:ve("resources/templates/list")}),_1=Uh.extend({resourceTemplates:oe(fRe)}),E1=Ii.extend({uri:T()}),mRe=E1,R1=pn.extend({method:ve("resources/read"),params:mRe}),I1=dn.extend({contents:oe(_t([V8,W8]))}),A1=io.extend({method:ve("notifications/resources/list_changed"),params:no.optional()}),gRe=E1,hRe=pn.extend({method:ve("resources/subscribe"),params:gRe}),yRe=E1,vRe=pn.extend({method:ve("resources/unsubscribe"),params:yRe}),wRe=no.extend({uri:T()}),bRe=io.extend({method:ve("notifications/resources/updated"),params:wRe}),kRe=ce({name:T(),description:Rt(T()),required:Rt(Ct())}),SRe=ce({...Ud.shape,...Fh.shape,description:Rt(T()),arguments:Rt(oe(kRe)),_meta:Rt(yr({}))}),O1=zh.extend({method:ve("prompts/list")}),D1=Uh.extend({prompts:oe(SRe)}),$Re=Ii.extend({name:T(),arguments:At(T(),T()).optional()}),T1=pn.extend({method:ve("prompts/get"),params:$Re}),N1=ce({type:ve("text"),text:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),M1=ce({type:ve("image"),data:$1,mimeType:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),j1=ce({type:ve("audio"),data:$1,mimeType:T(),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),xRe=ce({type:ve("tool_use"),name:T(),id:T(),input:At(T(),Ft()),_meta:At(T(),Ft()).optional()}),PRe=ce({type:ve("resource"),resource:_t([V8,W8]),annotations:Ld.optional(),_meta:At(T(),Ft()).optional()}),CRe=H8.extend({type:ve("resource_link")}),F1=_t([N1,M1,j1,CRe,PRe]),_Re=ce({role:qh,content:F1}),z1=dn.extend({description:T().optional(),messages:oe(_Re)}),U1=io.extend({method:ve("notifications/prompts/list_changed"),params:no.optional()}),ERe=ce({title:T().optional(),readOnlyHint:Ct().optional(),destructiveHint:Ct().optional(),idempotentHint:Ct().optional(),openWorldHint:Ct().optional()}),RRe=ce({taskSupport:un(["required","optional","forbidden"]).optional()}),G8=ce({...Ud.shape,...Fh.shape,description:T().optional(),inputSchema:ce({type:ve("object"),properties:At(T(),Ur).optional(),required:oe(T()).optional()}).catchall(Ft()),outputSchema:ce({type:ve("object"),properties:At(T(),Ur).optional(),required:oe(T()).optional()}).catchall(Ft()).optional(),annotations:ERe.optional(),execution:RRe.optional(),_meta:At(T(),Ft()).optional()}),L1=zh.extend({method:ve("tools/list")}),B1=Uh.extend({tools:oe(G8)}),yc=dn.extend({content:oe(F1).default([]),structuredContent:At(T(),Ft()).optional(),isError:Ct().optional()}),Ggt=yc.or(dn.extend({toolResult:Ft()})),IRe=Mh.extend({name:T(),arguments:At(T(),Ft()).optional()}),Vh=pn.extend({method:ve("tools/call"),params:IRe}),q1=io.extend({method:ve("notifications/tools/list_changed"),params:no.optional()}),Z8=ce({autoRefresh:Ct().default(!0),debounceMs:ot().int().nonnegative().default(300)}),Wh=un(["debug","info","notice","warning","error","critical","alert","emergency"]),ARe=Ii.extend({level:Wh}),V1=pn.extend({method:ve("logging/setLevel"),params:ARe}),ORe=no.extend({level:Wh,logger:T().optional(),data:Ft()}),DRe=io.extend({method:ve("notifications/message"),params:ORe}),TRe=ce({name:T().optional()}),NRe=ce({hints:oe(TRe).optional(),costPriority:ot().min(0).max(1).optional(),speedPriority:ot().min(0).max(1).optional(),intelligencePriority:ot().min(0).max(1).optional()}),MRe=ce({mode:un(["auto","required","none"]).optional()}),jRe=ce({type:ve("tool_result"),toolUseId:T().describe("The unique identifier for the corresponding tool call."),content:oe(F1).default([]),structuredContent:ce({}).loose().optional(),isError:Ct().optional(),_meta:At(T(),Ft()).optional()}),FRe=Eh("type",[N1,M1,j1]),HS=Eh("type",[N1,M1,j1,xRe,jRe]),zRe=ce({role:qh,content:_t([HS,oe(HS)]),_meta:At(T(),Ft()).optional()}),URe=Mh.extend({messages:oe(zRe),modelPreferences:NRe.optional(),systemPrompt:T().optional(),includeContext:un(["none","thisServer","allServers"]).optional(),temperature:ot().optional(),maxTokens:ot().int(),stopSequences:oe(T()).optional(),metadata:Ur.optional(),tools:oe(G8).optional(),toolChoice:MRe.optional()}),W1=pn.extend({method:ve("sampling/createMessage"),params:URe}),ru=dn.extend({model:T(),stopReason:Rt(un(["endTurn","stopSequence","maxTokens"]).or(T())),role:qh,content:FRe}),Hh=dn.extend({model:T(),stopReason:Rt(un(["endTurn","stopSequence","maxTokens","toolUse"]).or(T())),role:qh,content:_t([HS,oe(HS)])}),LRe=ce({type:ve("boolean"),title:T().optional(),description:T().optional(),default:Ct().optional()}),BRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),minLength:ot().optional(),maxLength:ot().optional(),format:un(["email","uri","date","date-time"]).optional(),default:T().optional()}),qRe=ce({type:un(["number","integer"]),title:T().optional(),description:T().optional(),minimum:ot().optional(),maximum:ot().optional(),default:ot().optional()}),VRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),enum:oe(T()),default:T().optional()}),WRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),oneOf:oe(ce({const:T(),title:T()})),default:T().optional()}),HRe=ce({type:ve("string"),title:T().optional(),description:T().optional(),enum:oe(T()),enumNames:oe(T()).optional(),default:T().optional()}),GRe=_t([VRe,WRe]),ZRe=ce({type:ve("array"),title:T().optional(),description:T().optional(),minItems:ot().optional(),maxItems:ot().optional(),items:ce({type:ve("string"),enum:oe(T())}),default:oe(T()).optional()}),KRe=ce({type:ve("array"),title:T().optional(),description:T().optional(),minItems:ot().optional(),maxItems:ot().optional(),items:ce({anyOf:oe(ce({const:T(),title:T()}))}),default:oe(T()).optional()}),JRe=_t([ZRe,KRe]),YRe=_t([HRe,GRe,JRe]),XRe=_t([YRe,LRe,BRe,qRe]),QRe=Mh.extend({mode:ve("form").optional(),message:T(),requestedSchema:ce({type:ve("object"),properties:At(T(),XRe),required:oe(T()).optional()})}),eIe=Mh.extend({mode:ve("url"),message:T(),elicitationId:T(),url:T().url()}),tIe=_t([QRe,eIe]),H1=pn.extend({method:ve("elicitation/create"),params:tIe}),rIe=no.extend({elicitationId:T()}),nIe=io.extend({method:ve("notifications/elicitation/complete"),params:rIe}),vc=dn.extend({action:un(["accept","decline","cancel"]),content:Dh((e)=>e===null?void 0:e,At(T(),_t([T(),ot(),Ct(),oe(T())])).optional())}),iIe=ce({type:ve("ref/resource"),uri:T()}),oIe=ce({type:ve("ref/prompt"),name:T()}),sIe=Ii.extend({ref:_t([oIe,iIe]),argument:ce({name:T(),value:T()}),context:ce({arguments:At(T(),T()).optional()}).optional()}),aIe=pn.extend({method:ve("completion/complete"),params:sIe}),G1=dn.extend({completion:yr({values:oe(T()).max(100),total:Rt(ot().int()),hasMore:Rt(Ct())})}),cIe=ce({uri:T().startsWith("file://"),name:T().optional(),_meta:At(T(),Ft()).optional()}),lIe=pn.extend({method:ve("roots/list"),params:Ii.optional()}),Z1=dn.extend({roots:oe(cIe)}),uIe=io.extend({method:ve("notifications/roots/list_changed"),params:no.optional()}),Zgt=_t([XS,k1,aIe,V1,T1,O1,x1,C1,R1,hRe,vRe,Vh,L1,e$,r$,n$,o$]),Kgt=_t([JS,QS,YS,uIe,Bh]),Jgt=_t([sa,ru,Hh,vc,Z1,t$,i$,aa]),Ygt=_t([XS,W1,H1,lIe,e$,r$,n$,o$]),Xgt=_t([JS,QS,DRe,bRe,A1,q1,U1,Bh,nIe]),Qgt=_t([sa,S1,G1,z1,D1,P1,_1,I1,yc,B1,t$,i$,aa]);he=class he extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`);this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){if(e===$e.UrlElicitationRequired&&r){let i=r;if(i.elicitations)return new K8(i.elicitations,t)}return new he(e,t,r)}};K8=class K8 extends he{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super($e.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});function wc(e){return e==="completed"||e==="failed"||e==="cancelled"}var pIe;var s$=I(()=>{pIe=Symbol("Let zodToJsonSchema decide on which parser to use")});var K1=I(()=>{s$()});var so=()=>{};var J1=I(()=>{Cr()});var Y1=()=>{};var a$=I(()=>{Cr()});var X1=I(()=>{Cr()});var Q1=()=>{};var ej=I(()=>{Cr()});var tj=I(()=>{Cr();so()});var rj=I(()=>{Cr()});var Oht;var c$=I(()=>{Oht=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var l$=I(()=>{Cr();c$();a$();so()});var nj=I(()=>{Cr();l$();so()});var ij=I(()=>{so()});var u$=I(()=>{Cr()});var oj=I(()=>{Cr();u$()});var sj=()=>{};var aj=I(()=>{Cr()});var cj=I(()=>{Cr();so()});var lj=I(()=>{Cr()});var uj=I(()=>{Cr()});var pj=I(()=>{Cr()});var dj=I(()=>{Cr()});var fj=I(()=>{so()});var mj=I(()=>{so()});var gj=I(()=>{Cr()});var hj=I(()=>{so();J1();Y1();a$();X1();Q1();ej();tj();rj();nj();ij();oj();sj();aj();cj();lj();uj();l$();pj();c$();dj();fj();u$();mj();gj()});var Cr=I(()=>{s$();hj();so()});var J8=()=>{};var yj=I(()=>{Cr();K1();so()});var Y8=I(()=>{yj();s$();K1();Cr();J8();so();J1();Y1();a$();X1();Q1();ej();tj();rj();nj();ij();oj();sj();aj();cj();lj();uj();gj();l$();pj();c$();dj();fj();u$();mj();hj();yj()});function vj(e){let r=Id(e)?.method;if(!r)throw Error("Schema is missing a method literal");let i=Ad(r);if(typeof i!=="string")throw Error("Schema method literal must be a string");return i}function wj(e,t){let r=qn(e,t);if(!r.success)throw r.error;return r.data}var X8=I(()=>{kh();Y8()});class Zh{constructor(e){if(this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(JS,(t)=>{this._oncancel(t)}),this.setNotificationHandler(QS,(t)=>{this._onprogress(t)}),this.setRequestHandler(XS,(t)=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore)this.setRequestHandler(e$,async(t,r)=>{let i=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!i)throw new he($e.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(r$,async(t,r)=>{let i=async()=>{let n=t.params.taskId;if(this._taskMessageQueue){let s;while(s=await this._taskMessageQueue.dequeue(n,r.sessionId)){if(s.type==="response"||s.type==="error"){let a=s.message,c=a.id,l=this._requestResolvers.get(c);if(l)if(this._requestResolvers.delete(c),s.type==="response")l(a);else{let u=a,p=new he(u.error.code,u.error.message,u.error.data);l(p)}else{let u=s.type==="response"?"Response":"Error";this._onerror(Error(`${u} handler missing for request ${c}`))}continue}await this._transport?.send(s.message,{relatedRequestId:r.requestId})}}let o=await this._taskStore.getTask(n,r.sessionId);if(!o)throw new he($e.InvalidParams,`Task not found: ${n}`);if(!wc(o.status))return await this._waitForTaskUpdate(n,r.signal),await i();if(wc(o.status)){let s=await this._taskStore.getTaskResult(n,r.sessionId);return this._clearTaskQueue(n),{...s,_meta:{...s._meta,[gc]:{taskId:n}}}}return await i()};return await i()}),this.setRequestHandler(n$,async(t,r)=>{try{let{tasks:i,nextCursor:n}=await this._taskStore.listTasks(t.params?.cursor,r.sessionId);return{tasks:i,nextCursor:n,_meta:{}}}catch(i){throw new he($e.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(o$,async(t,r)=>{try{let i=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!i)throw new he($e.InvalidParams,`Task not found: ${t.params.taskId}`);if(wc(i.status))throw new he($e.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(t.params.taskId);let n=await this._taskStore.getTask(t.params.taskId,r.sessionId);if(!n)throw new he($e.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...n}}catch(i){if(i instanceof he)throw i;throw new he($e.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}})}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:n,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),he.fromError($e.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let r=this.transport?.onerror;this._transport.onerror=(n)=>{r?.(n),this._onerror(n)};let i=this._transport?.onmessage;this._transport.onmessage=(n,o)=>{if(i?.(n,o),tu(n)||z8(n))this._onresponse(n);else if(jh(n))this._onrequest(n,o);else if(F8(n))this._onnotification(n);else this._onerror(Error(`Unknown message type: ${JSON.stringify(n)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let r of this._timeoutInfo.values())clearTimeout(r.timeoutId);this._timeoutInfo.clear();for(let r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();let t=he.fromError($e.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let r of e.values())r(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;if(t===void 0)return;Promise.resolve().then(()=>t(e)).catch((r)=>this._onerror(Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,t){let r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,n=e.params?._meta?.[gc]?.taskId;if(r===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:$e.MethodNotFound,message:"Method not found"}};if(n&&this._taskMessageQueue)this._enqueueTaskMessage(n,{type:"error",message:l,timestamp:Date.now()},i?.sessionId).catch((u)=>this._onerror(Error(`Failed to enqueue error response: ${u}`)));else i?.send(l).catch((u)=>this._onerror(Error(`Failed to send an error response: ${u}`)));return}let o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);let s=N8(e.params)?e.params.task:void 0,a=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,c={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async(l)=>{if(o.signal.aborted)return;let u={relatedRequestId:e.id};if(n)u.relatedTask={taskId:n};await this.notification(l,u)},sendRequest:async(l,u,p)=>{if(o.signal.aborted)throw new he($e.ConnectionClosed,"Request was cancelled");let d={...p,relatedRequestId:e.id};if(n&&!d.relatedTask)d.relatedTask={taskId:n};let f=d.relatedTask?.taskId??n;if(f&&a)await a.updateTaskStatus(f,"input_required");return await this.request(l,u,d)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:n,taskStore:a,taskRequestedTtl:s?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(s)this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,c)).then(async(l)=>{if(o.signal.aborted)return;let u={result:l,jsonrpc:"2.0",id:e.id};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"response",message:u,timestamp:Date.now()},i?.sessionId);else await i?.send(u)},async(l)=>{if(o.signal.aborted)return;let u={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:$e.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};if(n&&this._taskMessageQueue)await this._enqueueTaskMessage(n,{type:"error",message:u,timestamp:Date.now()},i?.sessionId);else await i?.send(u)}).catch((l)=>this._onerror(Error(`Failed to send response: ${l}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(e.id)===o)this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),n=this._progressHandlers.get(i);if(!n){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&o&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(a){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(a);return}n(r)}_onresponse(e){let t=Number(e.id),r=this._requestResolvers.get(t);if(r){if(this._requestResolvers.delete(t),tu(e))r(e);else{let o=new he(e.error.code,e.error.message,e.error.data);r(o)}return}let i=this._responseHandlers.get(t);if(i===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let n=!1;if(tu(e)&&e.result&&typeof e.result==="object"){let o=e.result;if(o.task&&typeof o.task==="object"){let s=o.task;if(typeof s.taskId==="string")n=!0,this._taskProgressTokens.set(s.taskId,t)}}if(!n)this._progressHandlers.delete(t);if(tu(e))i(e);else{let o=he.fromError(e.error.code,e.error.message,e.error.data);i(o)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,r){let{task:i}=r??{};if(!i){try{yield{type:"result",result:await this.request(e,t,r)}}catch(o){yield{type:"error",error:o instanceof he?o:new he($e.InternalError,String(o))}}return}let n;try{let o=await this.request(e,aa,r);if(o.task)n=o.task.taskId,yield{type:"taskCreated",task:o.task};else throw new he($e.InternalError,"Task creation did not return a task");while(!0){let s=await this.getTask({taskId:n},r);if(yield{type:"taskStatus",task:s},wc(s.status)){if(s.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:n},t,r)};else if(s.status==="failed")yield{type:"error",error:new he($e.InternalError,`Task ${n} failed`)};else if(s.status==="cancelled")yield{type:"error",error:new he($e.InternalError,`Task ${n} was cancelled`)};return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:n},t,r)};return}let a=s.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((c)=>setTimeout(c,a)),r?.signal?.throwIfAborted()}}catch(o){yield{type:"error",error:o instanceof he?o:new he($e.InternalError,String(o))}}}request(e,t,r){let{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o,task:s,relatedTask:a}=r??{};return new Promise((c,l)=>{let u=(y)=>{l(y)};if(!this._transport){u(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod(e.method),s)this.assertTaskCapability(e.method)}catch(y){u(y);return}r?.signal?.throwIfAborted();let p=this._requestMessageId++,d={...e,jsonrpc:"2.0",id:p};if(r?.onprogress)this._progressHandlers.set(p,r.onprogress),d.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}};if(s)d.params={...d.params,task:s};if(a)d.params={...d.params,_meta:{...d.params?._meta||{},[gc]:a}};let f=(y)=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(y)}},{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o}).catch((w)=>this._onerror(Error(`Failed to send cancellation: ${w}`)));let v=y instanceof he?y:new he($e.RequestTimeout,String(y));l(v)};this._responseHandlers.set(p,(y)=>{if(r?.signal?.aborted)return;if(y instanceof Error)return l(y);try{let v=qn(t,y.result);if(!v.success)l(v.error);else c(v.data)}catch(v){l(v)}}),r?.signal?.addEventListener("abort",()=>{f(r?.signal?.reason)});let m=r?.timeout??yIe,g=()=>f(he.fromError($e.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(p,m,r?.maxTotalTimeout,g,r?.resetTimeoutOnProgress??!1);let h=a?.taskId;if(h){let y=(v)=>{let w=this._responseHandlers.get(p);if(w)w(v);else this._onerror(Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,y),this._enqueueTaskMessage(h,{type:"request",message:d,timestamp:Date.now()}).catch((v)=>{this._cleanupTimeout(p),l(v)})}else this._transport.send(d,{relatedRequestId:i,resumptionToken:n,onresumptiontoken:o}).catch((y)=>{this._cleanupTimeout(p),l(y)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},t$,t)}async getTaskResult(e,t,r){return this.request({method:"tasks/result",params:e},t,r)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},i$,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},B8,t)}async notification(e,t){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability(e.method);let r=t?.relatedTask?.taskId;if(r){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[gc]:t.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};if(t?.relatedTask)s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[gc]:t.relatedTask}}};this._transport?.send(s,t).catch((a)=>this._onerror(a))});return}let o={...e,jsonrpc:"2.0"};if(t?.relatedTask)o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[gc]:t.relatedTask}}};await this._transport.send(o,t)}setRequestHandler(e,t){let r=vj(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,n)=>{let o=wj(e,i);return Promise.resolve(t(o,n))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let r=vj(e);this._notificationHandlers.set(r,(i)=>{let n=wj(e,i);return Promise.resolve(t(n))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);if(t!==void 0)this._progressHandlers.delete(t),this._taskProgressTokens.delete(e)}async _enqueueTaskMessage(e,t,r){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,r,i)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,t);for(let i of r)if(i.type==="request"&&jh(i.message)){let n=i.message.id,o=this._requestResolvers.get(n);if(o)o(new he($e.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n);else this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let r=this._options?.defaultTaskPollInterval??1000;try{let i=await this._taskStore?.getTask(e);if(i?.pollInterval)r=i.pollInterval}catch{}return new Promise((i,n)=>{if(t.aborted){n(new he($e.InvalidRequest,"Request cancelled"));return}let o=setTimeout(i,r);t.addEventListener("abort",()=>{clearTimeout(o),n(new he($e.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){let r=this._taskStore;if(!r)throw Error("No task store configured");return{createTask:async(i)=>{if(!e)throw Error("No request provided");return await r.createTask(i,e.id,{method:e.method,params:e.params},t)},getTask:async(i)=>{let n=await r.getTask(i,t);if(!n)throw new he($e.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(i,n,o)=>{await r.storeTaskResult(i,n,o,t);let s=await r.getTask(i,t);if(s){let a=Bh.parse({method:"notifications/tasks/status",params:s});if(await this.notification(a),wc(s.status))this._cleanupTaskProgressHandler(i)}},getTaskResult:(i)=>r.getTaskResult(i,t),updateTaskStatus:async(i,n,o)=>{let s=await r.getTask(i,t);if(!s)throw new he($e.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(wc(s.status))throw new he($e.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(i,n,o,t);let a=await r.getTask(i,t);if(a){let c=Bh.parse({method:"notifications/tasks/status",params:a});if(await this.notification(c),wc(a.status))this._cleanupTaskProgressHandler(i)}},listTasks:(i)=>r.listTasks(i,t)}}}function Q8(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function p$(e,t){let r={...e};for(let i in t){let n=i,o=t[n];if(o===void 0)continue;let s=r[n];if(Q8(s)&&Q8(o))r[n]={...s,...o};else r[n]=o}return r}var yIe=60000;var bj=I(()=>{kh();oo();X8()});var Jh=F(function(rZ){Object.defineProperty(rZ,"__esModule",{value:!0});rZ.regexpCode=rZ.getEsmExportName=rZ.getProperty=rZ.safeStringify=rZ.stringify=rZ.strConcat=rZ.addCodeArg=rZ.str=rZ._=rZ.nil=rZ._Code=rZ.Name=rZ.IDENTIFIER=rZ._CodeOrName=void 0;class d${}rZ._CodeOrName=d$;rZ.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Bd extends d${constructor(e){super();if(!rZ.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}rZ.Name=Bd;class Oo extends d${constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof Bd)t[r.str]=(t[r.str]||0)+1;return t},{})}}rZ._Code=Oo;rZ.nil=new Oo("");function eZ(e,...t){let r=[e[0]],i=0;while(i<t.length)Sj(r,t[i]),r.push(e[++i]);return new Oo(r)}rZ._=eZ;var kj=new Oo("+");function tZ(e,...t){let r=[Kh(e[0])],i=0;while(i<t.length)r.push(kj),Sj(r,t[i]),r.push(kj,Kh(e[++i]));return vIe(r),new Oo(r)}rZ.str=tZ;function Sj(e,t){if(t instanceof Oo)e.push(...t._items);else if(t instanceof Bd)e.push(t);else e.push(kIe(t))}rZ.addCodeArg=Sj;function vIe(e){let t=1;while(t<e.length-1){if(e[t]===kj){let r=wIe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function wIe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof Bd||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Bd))return`"${e}${t.slice(1)}`;return}function bIe(e,t){return t.emptyStr()?e:e.emptyStr()?t:tZ`${e}${t}`}rZ.strConcat=bIe;function kIe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Kh(Array.isArray(e)?e.join(","):e)}function SIe(e){return new Oo(Kh(e))}rZ.stringify=SIe;function Kh(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}rZ.safeStringify=Kh;function $Ie(e){return typeof e=="string"&&rZ.IDENTIFIER.test(e)?new Oo(`.${e}`):eZ`[${e}]`}rZ.getProperty=$Ie;function xIe(e){if(typeof e=="string"&&rZ.IDENTIFIER.test(e))return new Oo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}rZ.getEsmExportName=xIe;function PIe(e){return new Oo(e.toString())}rZ.regexpCode=PIe});var Cj=F(function(sZ){Object.defineProperty(sZ,"__esModule",{value:!0});sZ.ValueScope=sZ.ValueScopeName=sZ.Scope=sZ.varKinds=sZ.UsedValueState=void 0;var li=Jh();class iZ extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var m$;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(m$||(sZ.UsedValueState=m$={}));sZ.varKinds={const:new li.Name("const"),let:new li.Name("let"),var:new li.Name("var")};class xj{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof li.Name?e:this.name(e)}name(e){return new li.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}sZ.Scope=xj;class Pj extends li.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=li._`.${new li.Name(t)}[${r}]`}}sZ.ValueScopeName=Pj;var FIe=li._`\n`;class oZ extends xj{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?FIe:li.nil}}get(){return this._scope}name(e){return new Pj(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:n}=i,o=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[n];if(s){let l=s.get(o);if(l)return l}else s=this._values[n]=new Map;s.set(o,i);let a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return li._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(e,t,r={},i){let n=li.nil;for(let o in e){let s=e[o];if(!s)continue;let a=r[o]=r[o]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,m$.Started);let l=t(c);if(l){let u=this.opts.es5?sZ.varKinds.var:sZ.varKinds.const;n=li._`${n}${u} ${c} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(c))n=li._`${n}${l}${this.opts._n}`;else throw new iZ(c);a.set(c,m$.Completed)})}return n}}sZ.ValueScope=oZ});var Xe=F(function(ui){Object.defineProperty(ui,"__esModule",{value:!0});ui.or=ui.and=ui.not=ui.CodeGen=ui.operators=ui.varKinds=ui.ValueScopeName=ui.ValueScope=ui.Scope=ui.Name=ui.regexpCode=ui.stringify=ui.getProperty=ui.nil=ui.strConcat=ui.str=ui._=void 0;var ct=Jh(),Do=Cj(),bc=Jh();Object.defineProperty(ui,"_",{enumerable:!0,get:function(){return bc._}});Object.defineProperty(ui,"str",{enumerable:!0,get:function(){return bc.str}});Object.defineProperty(ui,"strConcat",{enumerable:!0,get:function(){return bc.strConcat}});Object.defineProperty(ui,"nil",{enumerable:!0,get:function(){return bc.nil}});Object.defineProperty(ui,"getProperty",{enumerable:!0,get:function(){return bc.getProperty}});Object.defineProperty(ui,"stringify",{enumerable:!0,get:function(){return bc.stringify}});Object.defineProperty(ui,"regexpCode",{enumerable:!0,get:function(){return bc.regexpCode}});Object.defineProperty(ui,"Name",{enumerable:!0,get:function(){return bc.Name}});var b$=Cj();Object.defineProperty(ui,"Scope",{enumerable:!0,get:function(){return b$.Scope}});Object.defineProperty(ui,"ValueScope",{enumerable:!0,get:function(){return b$.ValueScope}});Object.defineProperty(ui,"ValueScopeName",{enumerable:!0,get:function(){return b$.ValueScopeName}});Object.defineProperty(ui,"varKinds",{enumerable:!0,get:function(){return b$.varKinds}});ui.operators={GT:new ct._Code(">"),GTE:new ct._Code(">="),LT:new ct._Code("<"),LTE:new ct._Code("<="),EQ:new ct._Code("==="),NEQ:new ct._Code("!=="),NOT:new ct._Code("!"),OR:new ct._Code("||"),AND:new ct._Code("&&"),ADD:new ct._Code("+")};class kc{optimizeNodes(){return this}optimizeNames(e,t){return this}}class cZ extends kc{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?Do.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=Vd(this.rhs,e,t);return this}get names(){return this.rhs instanceof ct._CodeOrName?this.rhs.names:{}}}class Rj extends kc{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof ct.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Vd(this.rhs,e,t),this}get names(){let e=this.lhs instanceof ct.Name?{}:{...this.lhs.names};return w$(e,this.rhs)}}class lZ extends Rj{constructor(e,t,r,i){super(e,r,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class uZ extends kc{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class pZ extends kc{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class dZ extends kc{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class fZ extends kc{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=Vd(this.code,e,t),this}get names(){return this.code instanceof ct._CodeOrName?this.code.names:{}}}class k$ extends kc{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;while(i--){let n=r[i];if(n.optimizeNames(e,t))continue;BIe(e,n.names),r.splice(i,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>nu(e,t.names),{})}}class Sc extends k${render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class mZ extends k${}class Yh extends Sc{}Yh.kind="else";class la extends Sc{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Yh(r):r}if(t){if(e===!1)return t instanceof la?t:t.nodes;if(this.nodes.length)return this;return new la(wZ(e),t instanceof la?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=Vd(this.condition,e,t),this}get names(){let e=super.names;if(w$(e,this.condition),this.else)nu(e,this.else.names);return e}}la.kind="if";class qd extends Sc{}qd.kind="for";class gZ extends qd{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=Vd(this.iteration,e,t),this}get names(){return nu(super.names,this.iteration.names)}}class hZ extends qd{constructor(e,t,r,i){super();this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?Do.varKinds.var:this.varKind,{name:r,from:i,to:n}=this;return`for(${t} ${r}=${i}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){let e=w$(super.names,this.from);return w$(e,this.to)}}class _j extends qd{constructor(e,t,r,i){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=Vd(this.iterable,e,t),this}get names(){return nu(super.names,this.iterable.names)}}class g$ extends Sc{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}g$.kind="func";class h$ extends k${render(e){return"return "+super.render(e)}}h$.kind="return";class yZ extends Sc{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)nu(e,this.catch.names);if(this.finally)nu(e,this.finally.names);return e}}class y$ extends Sc{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}y$.kind="catch";class v$ extends Sc{render(e){return"finally"+super.render(e)}}v$.kind="finally";class vZ{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
298
+ `:""},this._extScope=e,this._scope=new Do.Scope({parent:e}),this._nodes=[new mZ]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let n=this._scope.toName(t);if(r!==void 0&&i)this._constants[n.str]=r;return this._leafNode(new cZ(e,n,r)),n}const(e,t,r){return this._def(Do.varKinds.const,e,t,r)}let(e,t,r){return this._def(Do.varKinds.let,e,t,r)}var(e,t,r){return this._def(Do.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Rj(e,t,r))}add(e,t){return this._leafNode(new lZ(e,ui.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==ct.nil)this._leafNode(new fZ(e));return this}object(...e){let t=["{"];for(let[r,i]of e){if(t.length>1)t.push(",");if(t.push(r),r!==i||this.opts.es5)t.push(":"),(0,ct.addCodeArg)(t,i)}return t.push("}"),new ct._Code(t)}if(e,t,r){if(this._blockNode(new la(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new la(e))}else(){return this._elseNode(new Yh)}endIf(){return this._endBlockNode(la,Yh)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new gZ(e),t)}forRange(e,t,r,i,n=this.opts.es5?Do.varKinds.var:Do.varKinds.let){let o=this._scope.toName(e);return this._for(new hZ(n,o,t,r),()=>i(o))}forOf(e,t,r,i=Do.varKinds.const){let n=this._scope.toName(e);if(this.opts.es5){let o=t instanceof ct.Name?t:this.var("_arr",t);return this.forRange("_i",0,ct._`${o}.length`,(s)=>{this.var(n,ct._`${o}[${s}]`),r(n)})}return this._for(new _j("of",i,n,t),()=>r(n))}forIn(e,t,r,i=this.opts.es5?Do.varKinds.var:Do.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,ct._`Object.keys(${t})`,r);let n=this._scope.toName(e);return this._for(new _j("in",i,n,t),()=>r(n))}endFor(){return this._endBlockNode(qd)}label(e){return this._leafNode(new uZ(e))}break(e){return this._leafNode(new pZ(e))}return(e){let t=new h$;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(h$)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new yZ;if(this._blockNode(i),this.code(e),t){let n=this.name("e");this._currNode=i.catch=new y$(n),t(n)}if(r)this._currNode=i.finally=new v$,this.code(r);return this._endBlockNode(y$,v$)}throw(e){return this._leafNode(new dZ(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=ct.nil,r,i){if(this._blockNode(new g$(e,t,r)),i)this.code(i).endFunc();return this}endFunc(){return this._endBlockNode(g$)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof la))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}ui.CodeGen=vZ;function nu(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function w$(e,t){return t instanceof ct._CodeOrName?nu(e,t.names):e}function Vd(e,t,r){if(e instanceof ct.Name)return i(e);if(!n(e))return e;return new ct._Code(e._items.reduce((o,s)=>{if(s instanceof ct.Name)s=i(s);if(s instanceof ct._Code)o.push(...s._items);else o.push(s);return o},[]));function i(o){let s=r[o.str];if(s===void 0||t[o.str]!==1)return o;return delete t[o.str],s}function n(o){return o instanceof ct._Code&&o._items.some((s)=>s instanceof ct.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function BIe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function wZ(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:ct._`!${Ej(e)}`}ui.not=wZ;var qIe=bZ(ui.operators.AND);function VIe(...e){return e.reduce(qIe)}ui.and=VIe;var WIe=bZ(ui.operators.OR);function HIe(...e){return e.reduce(WIe)}ui.or=HIe;function bZ(e){return(t,r)=>t===ct.nil?r:r===ct.nil?t:ct._`${Ej(t)} ${e} ${Ej(r)}`}function Ej(e){return e instanceof ct.Name?e:ct._`(${e})`}});var pt=F(function(RZ){Object.defineProperty(RZ,"__esModule",{value:!0});RZ.checkStrictMode=RZ.getErrorPath=RZ.Type=RZ.useFunc=RZ.setEvaluated=RZ.evaluatedPropsToName=RZ.mergeEvaluated=RZ.eachItem=RZ.unescapeJsonPointer=RZ.escapeJsonPointer=RZ.escapeFragment=RZ.unescapeFragment=RZ.schemaRefOrVal=RZ.schemaHasRulesButRef=RZ.schemaHasRules=RZ.checkUnknownRules=RZ.alwaysValidSchema=RZ.toHash=void 0;var Lt=Xe(),JIe=Jh();function YIe(e){let t={};for(let r of e)t[r]=!0;return t}RZ.toHash=YIe;function XIe(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return xZ(e,t),!PZ(t,e.self.RULES.all)}RZ.alwaysValidSchema=XIe;function xZ(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let n=i.RULES.keywords;for(let o in t)if(!n[o])EZ(e,`unknown keyword: "${o}"`)}RZ.checkUnknownRules=xZ;function PZ(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}RZ.schemaHasRules=PZ;function QIe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}RZ.schemaHasRulesButRef=QIe;function eAe({topSchemaRef:e,schemaPath:t},r,i,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return Lt._`${r}`}return Lt._`${e}${t}${(0,Lt.getProperty)(i)}`}RZ.schemaRefOrVal=eAe;function tAe(e){return CZ(decodeURIComponent(e))}RZ.unescapeFragment=tAe;function rAe(e){return encodeURIComponent(Aj(e))}RZ.escapeFragment=rAe;function Aj(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}RZ.escapeJsonPointer=Aj;function CZ(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}RZ.unescapeJsonPointer=CZ;function nAe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}RZ.eachItem=nAe;function SZ({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(n,o,s,a)=>{let c=s===void 0?o:s instanceof Lt.Name?(o instanceof Lt.Name?e(n,o,s):t(n,o,s),s):o instanceof Lt.Name?(t(n,s,o),o):r(o,s);return a===Lt.Name&&!(c instanceof Lt.Name)?i(n,c):c}}RZ.mergeEvaluated={props:SZ({mergeNames:(e,t,r)=>e.if(Lt._`${r} !== true && ${t} !== undefined`,()=>{e.if(Lt._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,Lt._`${r} || {}`).code(Lt._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(Lt._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,Lt._`${r} || {}`),Oj(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_Z}),items:SZ({mergeNames:(e,t,r)=>e.if(Lt._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,Lt._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(Lt._`${r} !== true`,()=>e.assign(r,t===!0?!0:Lt._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function _Z(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",Lt._`{}`);if(t!==void 0)Oj(e,r,t);return r}RZ.evaluatedPropsToName=_Z;function Oj(e,t,r){Object.keys(r).forEach((i)=>e.assign(Lt._`${t}${(0,Lt.getProperty)(i)}`,!0))}RZ.setEvaluated=Oj;var $Z={};function iAe(e,t){return e.scopeValue("func",{ref:t,code:$Z[t.code]||($Z[t.code]=new JIe._Code(t.code))})}RZ.useFunc=iAe;var Ij;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Ij||(RZ.Type=Ij={}));function oAe(e,t,r){if(e instanceof Lt.Name){let i=t===Ij.Num;return r?i?Lt._`"[" + ${e} + "]"`:Lt._`"['" + ${e} + "']"`:i?Lt._`"/" + ${e}`:Lt._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Lt.getProperty)(e).toString():"/"+Aj(e)}RZ.getErrorPath=oAe;function EZ(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}RZ.checkStrictMode=EZ});var ua=F(function(AZ){Object.defineProperty(AZ,"__esModule",{value:!0});var xn=Xe(),$Ae={data:new xn.Name("data"),valCxt:new xn.Name("valCxt"),instancePath:new xn.Name("instancePath"),parentData:new xn.Name("parentData"),parentDataProperty:new xn.Name("parentDataProperty"),rootData:new xn.Name("rootData"),dynamicAnchors:new xn.Name("dynamicAnchors"),vErrors:new xn.Name("vErrors"),errors:new xn.Name("errors"),this:new xn.Name("this"),self:new xn.Name("self"),scope:new xn.Name("scope"),json:new xn.Name("json"),jsonPos:new xn.Name("jsonPos"),jsonLen:new xn.Name("jsonLen"),jsonPart:new xn.Name("jsonPart")};AZ.default=$Ae});var Xh=F(function(NZ){Object.defineProperty(NZ,"__esModule",{value:!0});NZ.extendErrors=NZ.resetErrorsCount=NZ.reportExtraError=NZ.reportError=NZ.keyword$DataError=NZ.keywordError=void 0;var dt=Xe(),$$=pt(),Wn=ua();NZ.keywordError={message:({keyword:e})=>dt.str`must pass "${e}" keyword validation`};NZ.keyword$DataError={message:({keyword:e,schemaType:t})=>t?dt.str`"${e}" keyword must be ${t} ($data)`:dt.str`"${e}" keyword is invalid ($data)`};function PAe(e,t=NZ.keywordError,r,i){let{it:n}=e,{gen:o,compositeRule:s,allErrors:a}=n,c=TZ(e,t,r);if(i!==null&&i!==void 0?i:s||a)OZ(o,c);else DZ(n,dt._`[${c}]`)}NZ.reportError=PAe;function CAe(e,t=NZ.keywordError,r){let{it:i}=e,{gen:n,compositeRule:o,allErrors:s}=i,a=TZ(e,t,r);if(OZ(n,a),!(o||s))DZ(i,Wn.default.vErrors)}NZ.reportExtraError=CAe;function _Ae(e,t){e.assign(Wn.default.errors,t),e.if(dt._`${Wn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(dt._`${Wn.default.vErrors}.length`,t),()=>e.assign(Wn.default.vErrors,null)))}NZ.resetErrorsCount=_Ae;function EAe({gen:e,keyword:t,schemaValue:r,data:i,errsCount:n,it:o}){if(n===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",n,Wn.default.errors,(a)=>{if(e.const(s,dt._`${Wn.default.vErrors}[${a}]`),e.if(dt._`${s}.instancePath === undefined`,()=>e.assign(dt._`${s}.instancePath`,(0,dt.strConcat)(Wn.default.instancePath,o.errorPath))),e.assign(dt._`${s}.schemaPath`,dt.str`${o.errSchemaPath}/${t}`),o.opts.verbose)e.assign(dt._`${s}.schema`,r),e.assign(dt._`${s}.data`,i)})}NZ.extendErrors=EAe;function OZ(e,t){let r=e.const("err",t);e.if(dt._`${Wn.default.vErrors} === null`,()=>e.assign(Wn.default.vErrors,dt._`[${r}]`),dt._`${Wn.default.vErrors}.push(${r})`),e.code(dt._`${Wn.default.errors}++`)}function DZ(e,t){let{gen:r,validateName:i,schemaEnv:n}=e;if(n.$async)r.throw(dt._`new ${e.ValidationError}(${t})`);else r.assign(dt._`${i}.errors`,t),r.return(!1)}var iu={keyword:new dt.Name("keyword"),schemaPath:new dt.Name("schemaPath"),params:new dt.Name("params"),propertyName:new dt.Name("propertyName"),message:new dt.Name("message"),schema:new dt.Name("schema"),parentSchema:new dt.Name("parentSchema")};function TZ(e,t,r){let{createErrors:i}=e.it;if(i===!1)return dt._`{}`;return RAe(e,t,r)}function RAe(e,t,r={}){let{gen:i,it:n}=e,o=[IAe(n,r),AAe(e,r)];return OAe(e,t,o),i.object(...o)}function IAe({errorPath:e},{instancePath:t}){let r=t?dt.str`${e}${(0,$$.getErrorPath)(t,$$.Type.Str)}`:e;return[Wn.default.instancePath,(0,dt.strConcat)(Wn.default.instancePath,r)]}function AAe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let n=i?t:dt.str`${t}/${e}`;if(r)n=dt.str`${n}${(0,$$.getErrorPath)(r,$$.Type.Str)}`;return[iu.schemaPath,n]}function OAe(e,{params:t,message:r},i){let{keyword:n,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:l,topSchemaRef:u,schemaPath:p}=a;if(i.push([iu.keyword,n],[iu.params,typeof t=="function"?t(e):t||dt._`{}`]),c.messages)i.push([iu.message,typeof r=="function"?r(e):r]);if(c.verbose)i.push([iu.schema,s],[iu.parentSchema,dt._`${u}${p}`],[Wn.default.data,o]);if(l)i.push([iu.propertyName,l])}});var UZ=F(function(FZ){Object.defineProperty(FZ,"__esModule",{value:!0});FZ.boolOrEmptySchema=FZ.topBoolOrEmptySchema=void 0;var jAe=Xh(),FAe=Xe(),zAe=ua(),UAe={message:"boolean schema is false"};function LAe(e){let{gen:t,schema:r,validateName:i}=e;if(r===!1)jZ(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(zAe.default.data);else t.assign(FAe._`${i}.errors`,null),t.return(!0)}FZ.topBoolOrEmptySchema=LAe;function BAe(e,t){let{gen:r,schema:i}=e;if(i===!1)r.var(t,!1),jZ(e);else r.var(t,!0)}FZ.boolOrEmptySchema=BAe;function jZ(e,t){let{gen:r,data:i}=e,n={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,jAe.reportError)(n,UAe,void 0,t)}});var Tj=F(function(LZ){Object.defineProperty(LZ,"__esModule",{value:!0});LZ.getRules=LZ.isJSONType=void 0;var VAe=["string","number","integer","boolean","null","object","array"],WAe=new Set(VAe);function HAe(e){return typeof e=="string"&&WAe.has(e)}LZ.isJSONType=HAe;function GAe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}LZ.getRules=GAe});var Nj=F(function(WZ){Object.defineProperty(WZ,"__esModule",{value:!0});WZ.shouldUseRule=WZ.shouldUseGroup=WZ.schemaHasRulesForType=void 0;function KAe({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&qZ(e,i)}WZ.schemaHasRulesForType=KAe;function qZ(e,t){return t.rules.some((r)=>VZ(e,r))}WZ.shouldUseGroup=qZ;function VZ(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((i)=>e[i]!==void 0))}WZ.shouldUseRule=VZ});var Qh=F(function(JZ){Object.defineProperty(JZ,"__esModule",{value:!0});JZ.reportTypeError=JZ.checkDataTypes=JZ.checkDataType=JZ.coerceAndCheckDataType=JZ.getJSONTypes=JZ.getSchemaTypes=JZ.DataType=void 0;var XAe=Tj(),QAe=Nj(),eOe=Xh(),Ke=Xe(),GZ=pt(),Wd;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Wd||(JZ.DataType=Wd={}));function tOe(e){let t=ZZ(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}JZ.getSchemaTypes=tOe;function ZZ(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(XAe.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}JZ.getJSONTypes=ZZ;function rOe(e,t){let{gen:r,data:i,opts:n}=e,o=nOe(t,n.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,QAe.schemaHasRulesForType)(e,t[0]));if(s){let a=jj(t,i,n.strictNumbers,Wd.Wrong);r.if(a,()=>{if(o.length)iOe(e,t,o);else Fj(e)})}return s}JZ.coerceAndCheckDataType=rOe;var KZ=new Set(["string","number","integer","boolean","null"]);function nOe(e,t){return t?e.filter((r)=>KZ.has(r)||t==="array"&&r==="array"):[]}function iOe(e,t,r){let{gen:i,data:n,opts:o}=e,s=i.let("dataType",Ke._`typeof ${n}`),a=i.let("coerced",Ke._`undefined`);if(o.coerceTypes==="array")i.if(Ke._`${s} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,Ke._`${n}[0]`).assign(s,Ke._`typeof ${n}`).if(jj(t,n,o.strictNumbers),()=>i.assign(a,n)));i.if(Ke._`${a} !== undefined`);for(let l of r)if(KZ.has(l)||l==="array"&&o.coerceTypes==="array")c(l);i.else(),Fj(e),i.endIf(),i.if(Ke._`${a} !== undefined`,()=>{i.assign(n,a),oOe(e,a)});function c(l){switch(l){case"string":i.elseIf(Ke._`${s} == "number" || ${s} == "boolean"`).assign(a,Ke._`"" + ${n}`).elseIf(Ke._`${n} === null`).assign(a,Ke._`""`);return;case"number":i.elseIf(Ke._`${s} == "boolean" || ${n} === null
299
+ || (${s} == "string" && ${n} && ${n} == +${n})`).assign(a,Ke._`+${n}`);return;case"integer":i.elseIf(Ke._`${s} === "boolean" || ${n} === null
300
+ || (${s} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,Ke._`+${n}`);return;case"boolean":i.elseIf(Ke._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf(Ke._`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":i.elseIf(Ke._`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(a,null);return;case"array":i.elseIf(Ke._`${s} === "string" || ${s} === "number"
301
+ || ${s} === "boolean" || ${n} === null`).assign(a,Ke._`[${n}]`)}}}function oOe({gen:e,parentData:t,parentDataProperty:r},i){e.if(Ke._`${t} !== undefined`,()=>e.assign(Ke._`${t}[${r}]`,i))}function Mj(e,t,r,i=Wd.Correct){let n=i===Wd.Correct?Ke.operators.EQ:Ke.operators.NEQ,o;switch(e){case"null":return Ke._`${t} ${n} null`;case"array":o=Ke._`Array.isArray(${t})`;break;case"object":o=Ke._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(Ke._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return Ke._`typeof ${t} ${n} ${e}`}return i===Wd.Correct?o:(0,Ke.not)(o);function s(a=Ke.nil){return(0,Ke.and)(Ke._`typeof ${t} == "number"`,a,r?Ke._`isFinite(${t})`:Ke.nil)}}JZ.checkDataType=Mj;function jj(e,t,r,i){if(e.length===1)return Mj(e[0],t,r,i);let n,o=(0,GZ.toHash)(e);if(o.array&&o.object){let s=Ke._`typeof ${t} != "object"`;n=o.null?s:Ke._`!${t} || ${s}`,delete o.null,delete o.array,delete o.object}else n=Ke.nil;if(o.number)delete o.integer;for(let s in o)n=(0,Ke.and)(n,Mj(s,t,r,i));return n}JZ.checkDataTypes=jj;var sOe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?Ke._`{type: ${e}}`:Ke._`{type: ${t}}`};function Fj(e){let t=aOe(e);(0,eOe.reportError)(t,sOe)}JZ.reportTypeError=Fj;function aOe(e){let{gen:t,data:r,schema:i}=e,n=(0,GZ.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}});var t5=F(function(QZ){Object.defineProperty(QZ,"__esModule",{value:!0});QZ.assignDefaults=void 0;var Hd=Xe(),mOe=pt();function gOe(e,t){let{properties:r,items:i}=e.schema;if(t==="object"&&r)for(let n in r)XZ(e,n,r[n].default);else if(t==="array"&&Array.isArray(i))i.forEach((n,o)=>XZ(e,o,n.default))}QZ.assignDefaults=gOe;function XZ(e,t,r){let{gen:i,compositeRule:n,data:o,opts:s}=e;if(r===void 0)return;let a=Hd._`${o}${(0,Hd.getProperty)(t)}`;if(n){(0,mOe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=Hd._`${a} === undefined`;if(s.useDefaults==="empty")c=Hd._`${c} || ${a} === null || ${a} === ""`;i.if(c,Hd._`${a} = ${(0,Hd.stringify)(r)}`)}});var ao=F(function(i5){Object.defineProperty(i5,"__esModule",{value:!0});i5.validateUnion=i5.validateArray=i5.usePattern=i5.callValidateCode=i5.schemaProperties=i5.allSchemaProperties=i5.noPropertyInData=i5.propertyInData=i5.isOwnProperty=i5.hasPropFunc=i5.reportMissingProp=i5.checkMissingProp=i5.checkReportMissingProp=void 0;var Wt=Xe(),zj=pt(),$c=ua(),hOe=pt();function yOe(e,t){let{gen:r,data:i,it:n}=e;r.if(Lj(r,i,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:Wt._`${t}`},!0),e.error()})}i5.checkReportMissingProp=yOe;function vOe({gen:e,data:t,it:{opts:r}},i,n){return(0,Wt.or)(...i.map((o)=>(0,Wt.and)(Lj(e,t,o,r.ownProperties),Wt._`${n} = ${o}`)))}i5.checkMissingProp=vOe;function wOe(e,t){e.setParams({missingProperty:t},!0),e.error()}i5.reportMissingProp=wOe;function r5(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Wt._`Object.prototype.hasOwnProperty`})}i5.hasPropFunc=r5;function Uj(e,t,r){return Wt._`${r5(e)}.call(${t}, ${r})`}i5.isOwnProperty=Uj;function bOe(e,t,r,i){let n=Wt._`${t}${(0,Wt.getProperty)(r)} !== undefined`;return i?Wt._`${n} && ${Uj(e,t,r)}`:n}i5.propertyInData=bOe;function Lj(e,t,r,i){let n=Wt._`${t}${(0,Wt.getProperty)(r)} === undefined`;return i?(0,Wt.or)(n,(0,Wt.not)(Uj(e,t,r))):n}i5.noPropertyInData=Lj;function n5(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}i5.allSchemaProperties=n5;function kOe(e,t){return n5(t).filter((r)=>!(0,zj.alwaysValidSchema)(e,t[r]))}i5.schemaProperties=kOe;function SOe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:o},it:s},a,c,l){let u=l?Wt._`${e}, ${t}, ${i}${n}`:t,p=[[$c.default.instancePath,(0,Wt.strConcat)($c.default.instancePath,o)],[$c.default.parentData,s.parentData],[$c.default.parentDataProperty,s.parentDataProperty],[$c.default.rootData,$c.default.rootData]];if(s.opts.dynamicRef)p.push([$c.default.dynamicAnchors,$c.default.dynamicAnchors]);let d=Wt._`${u}, ${r.object(...p)}`;return c!==Wt.nil?Wt._`${a}.call(${c}, ${d})`:Wt._`${a}(${d})`}i5.callValidateCode=SOe;var $Oe=Wt._`new RegExp`;function xOe({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:n}=t.code,o=n(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:Wt._`${n.code==="new RegExp"?$Oe:(0,hOe.useFunc)(e,n)}(${r}, ${i})`})}i5.usePattern=xOe;function POe(e){let{gen:t,data:r,keyword:i,it:n}=e,o=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(o,!0),s(()=>t.break()),o;function s(a){let c=t.const("len",Wt._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:i,dataProp:l,dataPropType:zj.Type.Num},o),t.if((0,Wt.not)(o),a)})}}i5.validateArray=POe;function COe(e){let{gen:t,schema:r,keyword:i,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,zj.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let u=e.subschema({keyword:i,schemaProp:l,compositeRule:!0},a);if(t.assign(s,Wt._`${s} || ${a}`),!e.mergeValidEvaluated(u,a))t.if((0,Wt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}i5.validateUnion=COe});var u5=F(function(c5){Object.defineProperty(c5,"__esModule",{value:!0});c5.validateKeywordUsage=c5.validSchemaType=c5.funcKeywordCode=c5.macroKeywordCode=void 0;var Hn=Xe(),ou=ua(),zOe=ao(),UOe=Xh();function LOe(e,t){let{gen:r,keyword:i,schema:n,parentSchema:o,it:s}=e,a=t.macro.call(s.self,n,o,s),c=a5(r,i,a);if(s.opts.validateSchema!==!1)s.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Hn.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}c5.macroKeywordCode=LOe;function BOe(e,t){var r;let{gen:i,keyword:n,schema:o,parentSchema:s,$data:a,it:c}=e;VOe(c,t);let l=!a&&t.compile?t.compile.call(c.self,o,s,c):t.validate,u=a5(i,n,l),p=i.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1){if(g(),t.modifying)s5(e);h(()=>e.error())}else{let y=t.async?f():m();if(t.modifying)s5(e);h(()=>qOe(e,y))}}function f(){let y=i.let("ruleErrs",null);return i.try(()=>g(Hn._`await `),(v)=>i.assign(p,!1).if(Hn._`${v} instanceof ${c.ValidationError}`,()=>i.assign(y,Hn._`${v}.errors`),()=>i.throw(v))),y}function m(){let y=Hn._`${u}.errors`;return i.assign(y,null),g(Hn.nil),y}function g(y=t.async?Hn._`await `:Hn.nil){let v=c.opts.passContext?ou.default.this:ou.default.self,w=!(("compile"in t)&&!a||t.schema===!1);i.assign(p,Hn._`${y}${(0,zOe.callValidateCode)(e,u,v,w)}`,t.modifying)}function h(y){var v;i.if((0,Hn.not)((v=t.valid)!==null&&v!==void 0?v:p),y)}}c5.funcKeywordCode=BOe;function s5(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,Hn._`${i.parentData}[${i.parentDataProperty}]`))}function qOe(e,t){let{gen:r}=e;r.if(Hn._`Array.isArray(${t})`,()=>{r.assign(ou.default.vErrors,Hn._`${ou.default.vErrors} === null ? ${t} : ${ou.default.vErrors}.concat(${t})`).assign(ou.default.errors,Hn._`${ou.default.vErrors}.length`),(0,UOe.extendErrors)(e)},()=>e.error())}function VOe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function a5(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Hn.stringify)(r)})}function WOe(e,t,r=!1){return!t.length||t.some((i)=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||r&&typeof e>"u")}c5.validSchemaType=WOe;function HOe({schema:e,opts:t,self:r,errSchemaPath:i},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw Error("ajv implementation error");let s=n.dependencies;if(s===null||s===void 0?void 0:s.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}c5.validateKeywordUsage=HOe});var m5=F(function(d5){Object.defineProperty(d5,"__esModule",{value:!0});d5.extendSubschemaMode=d5.extendSubschemaData=d5.getSubschema=void 0;var us=Xe(),p5=pt();function JOe(e,{keyword:t,schemaProp:r,schema:i,schemaPath:n,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&i!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:us._`${e.schemaPath}${(0,us.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:us._`${e.schemaPath}${(0,us.getProperty)(t)}${(0,us.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,p5.escapeFragment)(r)}`}}if(i!==void 0){if(n===void 0||o===void 0||s===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:n,topSchemaRef:s,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')}d5.getSubschema=JOe;function YOe(e,t,{dataProp:r,dataPropType:i,data:n,dataTypes:o,propertyName:s}){if(n!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:u,opts:p}=t,d=a.let("data",us._`${t.data}${(0,us.getProperty)(r)}`,!0);c(d),e.errorPath=us.str`${l}${(0,p5.getErrorPath)(r,i,p.jsPropertySyntax)}`,e.parentDataProperty=us._`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(n!==void 0){let l=n instanceof us.Name?n:a.let("data",n,!0);if(c(l),s!==void 0)e.propertyName=s}if(o)e.dataTypes=o;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}d5.extendSubschemaData=YOe;function XOe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:o}){if(i!==void 0)e.compositeRule=i;if(n!==void 0)e.createErrors=n;if(o!==void 0)e.allErrors=o;e.jtdDiscriminator=t,e.jtdMetadata=r}d5.extendSubschemaMode=XOe});var Bj=F(function(rbt,g5){g5.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var y5=F(function(nbt,h5){var xc=h5.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var i=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};x$(t,i,n,e,"",e)};xc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};xc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};xc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};xc.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function x$(e,t,r,i,n,o,s,a,c,l){if(i&&typeof i=="object"&&!Array.isArray(i)){t(i,n,o,s,a,c,l);for(var u in i){var p=i[u];if(Array.isArray(p)){if(u in xc.arrayKeywords)for(var d=0;d<p.length;d++)x$(e,t,r,p[d],n+"/"+u+"/"+d,o,n,u,i,d)}else if(u in xc.propsKeywords){if(p&&typeof p=="object")for(var f in p)x$(e,t,r,p[f],n+"/"+u+"/"+tDe(f),o,n,u,i,f)}else if(u in xc.keywords||e.allKeys&&!(u in xc.skipKeywords))x$(e,t,r,p,n+"/"+u,o,n,u,i)}r(i,n,o,s,a,c,l)}}function tDe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ey=F(function(k5){Object.defineProperty(k5,"__esModule",{value:!0});k5.getSchemaRefs=k5.resolveUrl=k5.normalizeId=k5._getFullPath=k5.getFullPath=k5.inlineRef=void 0;var rDe=pt(),nDe=Bj(),iDe=y5(),oDe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sDe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!qj(e);if(!t)return!1;return v5(e)<=t}k5.inlineRef=sDe;var aDe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function qj(e){for(let t in e){if(aDe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(qj))return!0;if(typeof r=="object"&&qj(r))return!0}return!1}function v5(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,oDe.has(r))continue;if(typeof e[r]=="object")(0,rDe.eachItem)(e[r],(i)=>t+=v5(i));if(t===1/0)return 1/0}return t}function w5(e,t="",r){if(r!==!1)t=Gd(t);let i=e.parse(t);return b5(e,i)}k5.getFullPath=w5;function b5(e,t){return e.serialize(t).split("#")[0]+"#"}k5._getFullPath=b5;var cDe=/#\/?$/;function Gd(e){return e?e.replace(cDe,""):""}k5.normalizeId=Gd;function lDe(e,t,r){return r=Gd(r),e.resolve(t,r)}k5.resolveUrl=lDe;var uDe=/^[a-z_][-a-z0-9._]*$/i;function pDe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:i}=this.opts,n=Gd(e[r]||t),o={"":n},s=w5(i,n,!1),a={},c=new Set;return iDe(e,{allKeys:!0},(p,d,f,m)=>{if(m===void 0)return;let g=s+d,h=o[m];if(typeof p[r]=="string")h=y.call(this,p[r]);v.call(this,p.$anchor),v.call(this,p.$dynamicAnchor),o[d]=h;function y(w){let x=this.opts.uriResolver.resolve;if(w=Gd(h?x(h,w):w),c.has(w))throw u(w);c.add(w);let b=this.refs[w];if(typeof b=="string")b=this.refs[b];if(typeof b=="object")l(p,b.schema,w);else if(w!==Gd(g))if(w[0]==="#")l(p,a[w],w),a[w]=p;else this.refs[w]=g;return w}function v(w){if(typeof w=="string"){if(!uDe.test(w))throw Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),a;function l(p,d,f){if(d!==void 0&&!nDe(p,d))throw u(f)}function u(p){return Error(`reference "${p}" resolves to more than one schema`)}}k5.getSchemaRefs=pDe});var ny=F(function(j5){Object.defineProperty(j5,"__esModule",{value:!0});j5.getData=j5.KeywordCxt=j5.validateFunctionCode=void 0;var _5=UZ(),$5=Qh(),Wj=Nj(),P$=Qh(),yDe=t5(),ry=u5(),Vj=m5(),ke=Xe(),Le=ua(),vDe=ey(),pa=pt(),ty=Xh();function wDe(e){if(I5(e)){if(A5(e),R5(e)){SDe(e);return}}E5(e,()=>(0,_5.topBoolOrEmptySchema)(e))}j5.validateFunctionCode=wDe;function E5({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},o){if(n.code.es5)e.func(t,ke._`${Le.default.data}, ${Le.default.valCxt}`,i.$async,()=>{e.code(ke._`"use strict"; ${x5(r,n)}`),kDe(e,n),e.code(o)});else e.func(t,ke._`${Le.default.data}, ${bDe(n)}`,i.$async,()=>e.code(x5(r,n)).code(o))}function bDe(e){return ke._`{${Le.default.instancePath}="", ${Le.default.parentData}, ${Le.default.parentDataProperty}, ${Le.default.rootData}=${Le.default.data}${e.dynamicRef?ke._`, ${Le.default.dynamicAnchors}={}`:ke.nil}}={}`}function kDe(e,t){e.if(Le.default.valCxt,()=>{if(e.var(Le.default.instancePath,ke._`${Le.default.valCxt}.${Le.default.instancePath}`),e.var(Le.default.parentData,ke._`${Le.default.valCxt}.${Le.default.parentData}`),e.var(Le.default.parentDataProperty,ke._`${Le.default.valCxt}.${Le.default.parentDataProperty}`),e.var(Le.default.rootData,ke._`${Le.default.valCxt}.${Le.default.rootData}`),t.dynamicRef)e.var(Le.default.dynamicAnchors,ke._`${Le.default.valCxt}.${Le.default.dynamicAnchors}`)},()=>{if(e.var(Le.default.instancePath,ke._`""`),e.var(Le.default.parentData,ke._`undefined`),e.var(Le.default.parentDataProperty,ke._`undefined`),e.var(Le.default.rootData,Le.default.data),t.dynamicRef)e.var(Le.default.dynamicAnchors,ke._`{}`)})}function SDe(e){let{schema:t,opts:r,gen:i}=e;E5(e,()=>{if(r.$comment&&t.$comment)D5(e);if(_De(e),i.let(Le.default.vErrors,null),i.let(Le.default.errors,0),r.unevaluated)$De(e);O5(e),IDe(e)});return}function $De(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",ke._`${r}.evaluated`),t.if(ke._`${e.evaluated}.dynamicProps`,()=>t.assign(ke._`${e.evaluated}.props`,ke._`undefined`)),t.if(ke._`${e.evaluated}.dynamicItems`,()=>t.assign(ke._`${e.evaluated}.items`,ke._`undefined`))}function x5(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?ke._`/*# sourceURL=${r} */`:ke.nil}function xDe(e,t){if(I5(e)){if(A5(e),R5(e)){PDe(e,t);return}}(0,_5.boolOrEmptySchema)(e,t)}function R5({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function I5(e){return typeof e.schema!="boolean"}function PDe(e,t){let{schema:r,gen:i,opts:n}=e;if(n.$comment&&r.$comment)D5(e);EDe(e),RDe(e);let o=i.const("_errs",Le.default.errors);O5(e,o),i.var(t,ke._`${o} === ${Le.default.errors}`)}function A5(e){(0,pa.checkUnknownRules)(e),CDe(e)}function O5(e,t){if(e.opts.jtd)return P5(e,[],!1,t);let r=(0,$5.getSchemaTypes)(e.schema),i=(0,$5.coerceAndCheckDataType)(e,r);P5(e,r,!i,t)}function CDe(e){let{schema:t,errSchemaPath:r,opts:i,self:n}=e;if(t.$ref&&i.ignoreKeywordsWithRef&&(0,pa.schemaHasRulesButRef)(t,n.RULES))n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function _De(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,pa.checkStrictMode)(e,"default is ignored in the schema root")}function EDe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,vDe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function RDe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function D5({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){let o=r.$comment;if(n.$comment===!0)e.code(ke._`${Le.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let s=ke.str`${i}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(ke._`${Le.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function IDe(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:o}=e;if(r.$async)t.if(ke._`${Le.default.errors} === 0`,()=>t.return(Le.default.data),()=>t.throw(ke._`new ${n}(${Le.default.vErrors})`));else{if(t.assign(ke._`${i}.errors`,Le.default.vErrors),o.unevaluated)ADe(e);t.return(ke._`${Le.default.errors} === 0`)}}function ADe({gen:e,evaluated:t,props:r,items:i}){if(r instanceof ke.Name)e.assign(ke._`${t}.props`,r);if(i instanceof ke.Name)e.assign(ke._`${t}.items`,i)}function P5(e,t,r,i){let{gen:n,schema:o,data:s,allErrors:a,opts:c,self:l}=e,{RULES:u}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,pa.schemaHasRulesButRef)(o,u))){n.block(()=>N5(e,"$ref",u.all.$ref.definition));return}if(!c.jtd)ODe(e,t);n.block(()=>{for(let d of u.rules)p(d);p(u.post)});function p(d){if(!(0,Wj.shouldUseGroup)(o,d))return;if(d.type){if(n.if((0,P$.checkDataType)(d.type,s,c.strictNumbers)),C5(e,d),t.length===1&&t[0]===d.type&&r)n.else(),(0,P$.reportTypeError)(e);n.endIf()}else C5(e,d);if(!a)n.if(ke._`${Le.default.errors} === ${i||0}`)}}function C5(e,t){let{gen:r,schema:i,opts:{useDefaults:n}}=e;if(n)(0,yDe.assignDefaults)(e,t.type);r.block(()=>{for(let o of t.rules)if((0,Wj.shouldUseRule)(i,o))N5(e,o.keyword,o.definition,t.type)})}function ODe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(DDe(e,t),!e.opts.allowUnionTypes)TDe(e,t);NDe(e,e.dataTypes)}function DDe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!T5(e.dataTypes,r))Hj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),jDe(e,t)}function TDe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))Hj(e,"use allowUnionTypes to allow union type keyword")}function NDe(e,t){let r=e.self.RULES.all;for(let i in r){let n=r[i];if(typeof n=="object"&&(0,Wj.shouldUseRule)(e.schema,n)){let{type:o}=n.definition;if(o.length&&!o.some((s)=>MDe(t,s)))Hj(e,`missing type "${o.join(",")}" for keyword "${i}"`)}}}function MDe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function T5(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function jDe(e,t){let r=[];for(let i of e.dataTypes)if(T5(t,i))r.push(i);else if(t.includes("integer")&&i==="number")r.push("integer");e.dataTypes=r}function Hj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,pa.checkStrictMode)(e,t,e.opts.strictTypes)}class Gj{constructor(e,t,r){if((0,ry.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,pa.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",M5(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ry.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",Le.default.errors)}result(e,t,r){this.failResult((0,ke.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,ke.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(ke._`${t} !== undefined && (${(0,ke.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?ty.reportExtraError:ty.reportError)(this,this.def.error,t)}$dataError(){(0,ty.reportError)(this,this.def.$dataError||ty.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,ty.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=ke.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=ke.nil,t=ke.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:n,def:o}=this;if(r.if((0,ke.or)(ke._`${i} === undefined`,t)),e!==ke.nil)r.assign(e,!0);if(n.length||o.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==ke.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,ke.or)(o(),s());function o(){if(r.length){if(!(t instanceof ke.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return ke._`${(0,P$.checkDataTypes)(a,t,n.opts.strictNumbers,P$.DataType.Wrong)}`}return ke.nil}function s(){if(i.validateSchema){let a=e.scopeValue("validate$data",{ref:i.validateSchema});return ke._`!${a}(${t})`}return ke.nil}}subschema(e,t){let r=(0,Vj.getSubschema)(this.it,e);(0,Vj.extendSubschemaData)(r,this.it,e),(0,Vj.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return xDe(i,t),i}mergeEvaluated(e,t){let{it:r,gen:i}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=pa.mergeEvaluated.props(i,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=pa.mergeEvaluated.items(i,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return i.if(t,()=>this.mergeEvaluated(e,ke.Name)),!0}}j5.KeywordCxt=Gj;function N5(e,t,r,i){let n=new Gj(e,r,t);if("code"in r)r.code(n,i);else if(n.$data&&r.validate)(0,ry.funcKeywordCode)(n,r);else if("macro"in r)(0,ry.macroKeywordCode)(n,r);else if(r.compile||r.validate)(0,ry.funcKeywordCode)(n,r)}var FDe=/^\/(?:[^~]|~0|~1)*$/,zDe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function M5(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,o;if(e==="")return Le.default.rootData;if(e[0]==="/"){if(!FDe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);n=e,o=Le.default.rootData}else{let l=zDe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let u=+l[1];if(n=l[2],n==="#"){if(u>=t)throw Error(c("property/index",u));return i[t-u]}if(u>t)throw Error(c("data",u));if(o=r[t-u],!n)return o}let s=o,a=n.split("/");for(let l of a)if(l)o=ke._`${o}${(0,ke.getProperty)((0,pa.unescapeJsonPointer)(l))}`,s=ke._`${s} && ${o}`;return s;function c(l,u){return`Cannot access ${l} ${u} levels up, current level is ${t}`}}j5.getData=M5});var C$=F(function(U5){Object.defineProperty(U5,"__esModule",{value:!0});class z5 extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}U5.default=z5});var iy=F(function(B5){Object.defineProperty(B5,"__esModule",{value:!0});var Zj=ey();class L5 extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,Zj.resolveUrl)(e,t,r),this.missingSchema=(0,Zj.normalizeId)((0,Zj.getFullPath)(e,this.missingRef))}}B5.default=L5});var E$=F(function(W5){Object.defineProperty(W5,"__esModule",{value:!0});W5.resolveSchema=W5.getCompilingSchema=W5.resolveRef=W5.compileSchema=W5.SchemaEnv=void 0;var To=Xe(),VDe=C$(),su=ua(),No=ey(),q5=pt(),WDe=ny();class oy{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,No.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}W5.SchemaEnv=oy;function Jj(e){let t=V5.call(this,e);if(t)return t;let r=(0,No.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:n}=this.opts.code,{ownProperties:o}=this.opts,s=new To.CodeGen(this.scope,{es5:i,lines:n,ownProperties:o}),a;if(e.$async)a=s.scopeValue("Error",{ref:VDe.default,code:To._`require("ajv/dist/runtime/validation_error").default`});let c=s.scopeName("validate");e.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:su.default.data,parentData:su.default.parentData,parentDataProperty:su.default.parentDataProperty,dataNames:[su.default.data],dataPathArr:[To.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,To.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:To.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:To._`""`,opts:this.opts,self:this},u;try{this._compilations.add(e),(0,WDe.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let p=s.toString();if(u=`${s.scopeRefs(su.default.scope)}return ${p}`,this.opts.code.process)u=this.opts.code.process(u,e);let f=Function(`${su.default.self}`,`${su.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async)f.$async=!0;if(this.opts.code.source===!0)f.source={validateName:c,validateCode:p,scopeValues:s._values};if(this.opts.unevaluated){let{props:m,items:g}=l;if(f.evaluated={props:m instanceof To.Name?void 0:m,items:g instanceof To.Name?void 0:g,dynamicProps:m instanceof To.Name,dynamicItems:g instanceof To.Name},f.source)f.source.evaluated=(0,To.stringify)(f.evaluated)}return e.validate=f,e}catch(p){if(delete e.validate,delete e.validateName,u)this.logger.error("Error compiling schema, function code:",u);throw p}finally{this._compilations.delete(e)}}W5.compileSchema=Jj;function HDe(e,t,r){var i;r=(0,No.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let o=KDe.call(this,e,r);if(o===void 0){let s=(i=e.localRefs)===null||i===void 0?void 0:i[r],{schemaId:a}=this.opts;if(s)o=new oy({schema:s,schemaId:a,root:e,baseId:t})}if(o===void 0)return;return e.refs[r]=GDe.call(this,o)}W5.resolveRef=HDe;function GDe(e){if((0,No.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:Jj.call(this,e)}function V5(e){for(let t of this._compilations)if(ZDe(t,e))return t}W5.getCompilingSchema=V5;function ZDe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function KDe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||_$.call(this,e,t)}function _$(e,t){let r=this.opts.uriResolver.parse(t),i=(0,No._getFullPath)(this.opts.uriResolver,r),n=(0,No.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return Kj.call(this,r,e);let o=(0,No.normalizeId)(i),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=_$.call(this,e,s);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return Kj.call(this,r,a)}if(typeof(s===null||s===void 0?void 0:s.schema)!=="object")return;if(!s.validate)Jj.call(this,s);if(o===(0,No.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];if(l)n=(0,No.resolveUrl)(this.opts.uriResolver,n,l);return new oy({schema:a,schemaId:c,root:e,baseId:n})}return Kj.call(this,r,s)}W5.resolveSchema=_$;var JDe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Kj(e,{baseId:t,schema:r,root:i}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,q5.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!JDe.has(a)&&l)t=(0,No.resolveUrl)(this.opts.uriResolver,t,l)}let o;if(typeof r!="boolean"&&r.$ref&&!(0,q5.schemaHasRulesButRef)(r,this.RULES)){let a=(0,No.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=_$.call(this,i,a)}let{schemaId:s}=this.opts;if(o=o||new oy({schema:r,schemaId:s,root:i,baseId:t}),o.schema!==o.root.schema)return o;return}});var G5=F(function(lbt,tTe){tTe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var rF=F(function(ubt,eK){var rTe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Xj=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),nTe=RegExp.prototype.test.bind(/^\d*$/u),au=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Qj=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),K5=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),eF=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),iTe=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),pi=Array(256);for(let t=0;t<256;t++)pi[t]="%"+"0123456789ABCDEF"[t>>4]+"0123456789ABCDEF"[t&15];function Pn(e){if(e<2048)return pi[192|e>>6]+pi[128|e&63];if(e<65536)return pi[224|e>>12]+pi[128|e>>6&63]+pi[128|e&63];return pi[240|e>>18]+pi[128|e>>12&63]+pi[128|e>>6&63]+pi[128|e&63]}function oTe(e){let t="",r=0,i=0;for(i=0;i<e.length;i++){if(r=e[i].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i<e.length;i++){if(r=e[i].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}var sTe=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),aTe=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),cTe=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),lTe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function uTe(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++){if(cTe(e[t]))continue;if(e[t]==="%"&&t+2<e.length&&au(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Z5(e){let t=-1,r=0,i=-1,n=0;for(let a=0;a<e.length;a++)if(e[a]==="0"){if(i===-1)i=a;if(n++,n>r)r=n,t=i}else i=-1,n=0;if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),s=e.slice(t+r).join(":");return o+"::"+s}function pTe(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),i=t===-1?[]:e.slice(t+2).split(":");if(t!==-1){if(r.length===1&&r[0]==="")r.length=0;if(i.length===1&&i[0]==="")i.length=0}let n=r.concat(i),o=0;for(let a=0;a<n.length;a++){let c=n[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==n.length-1||t!==-1&&i.length===0||!Xj(c))return;o+=2;continue}if(!sTe(c))return;n[a]=parseInt(c,16).toString(16),o++}if(t===-1){if(o!==8)return;return Z5(n)}if(o>=8)return;let s=n.slice(0,r.length);for(let a=o;a<8;a++)s.push("0");for(let a=r.length;a<n.length;a++)s.push(n[a]);return Z5(s)}function Yj(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let i=t?e.slice(1,-1):e;if(t&&aTe(i))return i=i.toLowerCase(),{host:`[${i}]`,escapedHost:i,isIPV6:!1,isIPVFuture:!0};if(dTe(i,":")<2)return{host:e,isIPV6:!1,error:t};let n="",o=i.indexOf("%");if(o!==-1){let a=i.slice(o,o+3).toLowerCase()==="%25"?3:1;if(n=i.slice(o+a),!uTe(n))return{host:e,isIPV6:!1,error:!0};i=i.slice(0,o)}let s=pTe(i);if(s===void 0)return{host:e,isIPV6:!1,error:!0};return{host:s+(n?"%"+n:""),escapedHost:s+(n?"%25"+n:""),isIPV6:!0}}function dTe(e,t){let r=0;for(let i=0;i<e.length;i++)if(e[i]===t)r++;return r}function fTe(e){let t=e,r=[],i=-1,n=0;while(n=t.length){if(n===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(n===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(n===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((i=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")}var mTe={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},gTe=/[@/?#:]/g,hTe=/[@/?#]/g;function J5(e,t){let r=t?hTe:gTe;return r.lastIndex=0,e.replace(r,(i)=>mTe[i])}function Y5(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let i=0;i<e.length;i++){if(e[i]==="%"&&i+2<e.length){let n=e.slice(i+1,i+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(t&&Qj(s))r+=s;else r+="%"+o;i+=2;continue}}r+=e[i]}return r}function yTe(e){let t="";for(let r=0;r<e.length;r++){let i=e[r];if(i==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(s!=="."&&Qj(s))t+=s;else t+="%"+o;r+=2;continue}}if(K5(i))t+=i;else{let n=e.charCodeAt(r);if(n<128)t+=Q5(n)?i:pi[n];else if(n<55296||n>57343)t+=Pn(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=Pn(65536+(n-55296<<10)+(o-56320)),r++;else t+=Pn(65533)}else t+=Pn(65533)}}return t}function vTe(e,t=!1){let r="",i=t&&e[0]!=="/";for(let n=0;n<e.length;n++){let o=e[n];if(o==="%"&&n+2<e.length){let s=e.slice(n+1,n+3);if(au(s)){r+="%"+s.toUpperCase(),n+=2;continue}}if(o==="/")i=!1;if(K5(o)&&(o!==":"||!i))r+=o;else{let s=e.charCodeAt(n);if(s<128)r+=pi[s];else if(s<55296||s>57343)r+=Pn(s);else if(s<=56319&&n+1<e.length){let a=e.charCodeAt(n+1);if(a>=56320&&a<=57343)r+=Pn(65536+(s-55296<<10)+(a-56320)),n++;else r+=Pn(65533)}else r+=Pn(65533)}}return r}function tF(e,t){let r="";for(let i=0;i<e.length;i++){let n=e[i];if(n==="%"&&i+2<e.length){let o=e.slice(i+1,i+3);if(au(o)){r+="%"+o.toUpperCase(),i+=2;continue}}if(t(n))r+=n;else{let o=e.charCodeAt(i);if(o<128)r+=pi[o];else if(o<55296||o>57343)r+=Pn(o);else if(o<=56319&&i+1<e.length){let s=e.charCodeAt(i+1);if(s>=56320&&s<=57343)r+=Pn(65536+(o-55296<<10)+(s-56320)),i++;else r+=Pn(65533)}else r+=Pn(65533)}}return r}function X5(e){return tF(e,iTe)}function wTe(e){return tF(e,eF)}function bTe(e){return tF(e,eF)}function Q5(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function kTe(e){let t="";for(let r=0;r<e.length;r++){let i=e[r];if(i==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(au(n)){let o=n.toUpperCase(),s=String.fromCharCode(parseInt(o,16));if(Qj(s))t+=s;else t+="%"+o;r+=2;continue}}if(eF(i))t+=i;else{let n=e.charCodeAt(r);if(n<128)t+=Q5(n)?i:pi[n];else if(n<55296||n>57343)t+=Pn(n);else if(n<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);if(o>=56320&&o<=57343)t+=Pn(65536+(n-55296<<10)+(o-56320)),r++;else t+=Pn(65533)}else t+=Pn(65533)}}return t}function STe(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(au(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function $Te(e){let t=[];if(e.userinfo!==void 0)t.push(X5(e.userinfo)),t.push("@");if(e.host!==void 0){let r=e.host;if(!Xj(r)){let i=Yj(r);if(i.isIPV6!==!0&&i.isIPVFuture!==!0)r=Y5(r,!0),i=Yj(r);if(i.isIPV6===!0||i.isIPVFuture===!0)r=`[${i.escapedHost}]`;else r=J5(r,!1)}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string"){let r=String(e.port);if(!nTe(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}eK.exports={nonSimpleDomain:lTe,recomposeAuthority:$Te,reescapeHostDelimiters:J5,normalizePercentEncoding:Y5,normalizePathEncoding:yTe,serializePathEncoding:vTe,normalizeQueryFragmentEncoding:kTe,encodeUserinfo:X5,encodeQuery:wTe,encodeFragment:bTe,escapePreservingEscapes:STe,removeDotSegments:fTe,isIPv4:Xj,isUUID:rTe,normalizeIPv6:Yj,stringArrayToHexStripped:oTe}});var oK=F(function(pbt,iK){var{isUUID:xTe}=rF(),PTe=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,CTe=["http","https","ws","wss","urn","urn:uuid"];function _Te(e){return CTe.indexOf(e)!==-1}function nF(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function tK(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function rK(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function ETe(e){return e.secure=nF(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function RTe(e){if(e.port===(nF(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function ITe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(PTe);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${i}:${t.nid||e.nid}`,o=iF(n);if(e.path=void 0,o)e=o.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function ATe(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),n=`${r}:${t.nid||i}`,o=iF(n);if(o)e=o.serialize(e,t);let s=e,a=e.nss;return s.path=`${i||t.nid}:${a}`,t.skipEscape=!0,s}function OTe(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!xTe(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function DTe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var nK={scheme:"http",domainHost:!0,parse:tK,serialize:rK},TTe={scheme:"https",domainHost:nK.domainHost,parse:tK,serialize:rK},R$={scheme:"ws",domainHost:!0,parse:ETe,serialize:RTe},NTe={scheme:"wss",domainHost:R$.domainHost,parse:R$.parse,serialize:R$.serialize},MTe={scheme:"urn",parse:ITe,serialize:ATe,skipNormalize:!0},jTe={scheme:"urn:uuid",parse:OTe,serialize:DTe,skipNormalize:!0},I$={http:nK,https:TTe,ws:R$,wss:NTe,urn:MTe,"urn:uuid":jTe};Object.setPrototypeOf(I$,null);function iF(e){return e&&(I$[e]||I$[e.toLowerCase()])||void 0}iK.exports={wsIsSecure:nF,SCHEMES:I$,isValidSchemeName:_Te,getSchemeHandler:iF}});var yK=F(function(dbt,D$){var{normalizeIPv6:uK,removeDotSegments:ay,recomposeAuthority:FTe,normalizePercentEncoding:oF,normalizePathEncoding:zTe,serializePathEncoding:sK,normalizeQueryFragmentEncoding:aK,encodeQuery:UTe,encodeFragment:LTe,reescapeHostDelimiters:BTe,isIPv4:pK,nonSimpleDomain:qTe}=rF(),{SCHEMES:dK,getSchemeHandler:sF}=oK(),fK=/^[A-Za-z][A-Za-z0-9+.-]*$/u;function cK(e){let t=unescape(String(e));if(!fK.test(t))throw TypeError("URI scheme is malformed.");return t}function VTe(e,t){if(typeof e==="string")e=XTe(e,t);else if(typeof e==="object")e=O$(cu(e,t),t);return e}function WTe(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=A$(e,i),{parsed:u,malformedAuthorityOrPort:p,malformedPercentEncoding:d,malformedSchemeSpecific:f,malformedHost:m,malformedScheme:g}=A$(t,i);if(o||p||s||d||a||f||c||m||l||g)throw Error(n.error||u.error||"URI is malformed.");let h=mK(n,u,i,!0),y=sF(r&&r.scheme||h.scheme),v=h.host,w=v!==void 0&&v!==""&&(pK(v)||uK(v).isIPV6);gK(h,r||{},y,w);let x=v&&v.indexOf("%")!==-1&&!/\P{ASCII}/u.test(v);if(h.error&&!x)throw Error(h.error);return i.skipEscape=!0,cu(h,i)}function mK(e,t,r,i){let n={};if(!i)e=O$(cu(e,r),r),t=O$(cu(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ay(t.path||""),n.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=ay(t.path||""),n.query=t.query;else{if(!t.path)if(n.path=e.path,t.query!==void 0)n.query=t.query;else n.query=e.query;else{if(t.path[0]==="/")n.path=ay(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)n.path="/"+t.path;else if(!e.path)n.path=t.path;else n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;n.path=ay(n.path)}n.query=t.query}n.userinfo=e.userinfo,n.host=e.host,n.port=e.port}n.scheme=e.scheme}return n.fragment=t.fragment,n}function HTe(e,t,r){let i=lK(e,r),n=lK(t,r);return i!==void 0&&n!==void 0&&i===n}function cu(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},t),n=[];if(r.scheme)r.scheme=cK(r.scheme);let o=sF(i.scheme||r.scheme);if(o&&o.serialize)o.serialize(r,i);let s=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!i.skipEscape&&r.scheme===void 0&&!s;if(r.path!==void 0)if(!i.skipEscape)r.path=sK(r.path,a);else r.path=oF(r.path);if(i.reference!=="suffix"&&r.scheme)r.scheme=cK(r.scheme),n.push(r.scheme,":");let c=FTe(r);if(c!==void 0){if(i.reference!=="suffix")n.push("//");if(n.push(c),r.path&&r.path[0]!=="/")n.push("/")}if(r.path!==void 0){let l=r.path;if(!i.absolutePath&&(!o||!o.absolutePath))l=ay(l);if(a)l=sK(l,!0);if(c===void 0&&l[0]==="/"&&l[1]==="/")l="/%2F"+l.slice(2);n.push(l)}if(r.query!==void 0)n.push("?",UTe(r.query));if(r.fragment!==void 0)n.push("#",LTe(r.fragment));return n.join("")}var GTe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,ZTe=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,KTe=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function JTe(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port==="number"&&(e.port<0||e.port>65535))return"URI port is malformed.";return}function sy(e){if(e===void 0)return!1;let t=e.indexOf("%");while(t!==-1){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function aF(e){return e[0]==="["&&e[e.length-1]==="]"}function YTe(e){let t=e[4];return sy(e[3])||t!==void 0&&!aF(t)&&sy(t)||sy(e[6])||sy(e[7])||sy(e[8])}function gK(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!aF(e.host)&&(t.domainHost||r&&r.domainHost)&&i===!1&&qTe(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(n){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+n,!0}return!1}function A$(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,o=!1,s=!1,a=!1,c=!1,l=!1,u=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let p=e.match(ZTe);if(p!==null&&p[1].indexOf("\\")!==-1)i.error="URI authority must not contain a literal backslash.",n=!0;let d=e.match(KTe);if(d!==null){let m=d[1],g=m.replace(/[\t\n\r]/g,"");if(g.length>=2){if(g.slice(0,2)!=="//")i.error=i.error||"URI authority must not contain a literal backslash.",n=!0;else if(m.length!==g.length)i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0}}let f=e.match(GTe);if(f){if(i.scheme=f[1],i.userinfo=f[3],i.host=f[4],i.port=parseInt(f[5],10),i.path=f[6]||"",i.query=f[7],i.fragment=f[8],i.scheme!==void 0){let h=unescape(i.scheme);if(fK.test(h))i.scheme=h.toLowerCase();else i.error=i.error||"URI scheme is malformed.",l=!0}if(o=YTe(f),o)i.error=i.error||"URI contains malformed percent-encoding.";if(isNaN(i.port))i.port=f[5];let m=JTe(i,f);if(m!==void 0)i.error=i.error||m,n=!0;if(i.host)if(pK(i.host)===!1){let y=aF(i.host),v=i.host.indexOf("[")!==-1||i.host.indexOf("]")!==-1,w=uK(i.host);if(u=w.isIPV6||w.isIPVFuture===!0,c=v&&(!y||w.error===!0),i.host=u?w.host:w.host.toLowerCase(),c)i.error=i.error||"URI host is malformed.",n=!0}else u=!0;if(i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path)i.reference="same-document";else if(i.scheme===void 0)i.reference="relative";else if(i.fragment===void 0)i.reference="absolute";else i.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==i.reference)i.error=i.error||"URI is not a "+r.reference+" reference.";let g=sF(r.scheme||i.scheme);if(!c)a=gK(i,r,g,u);if(e.indexOf("%")!==-1&&i.host!==void 0&&!c){let h=u?i.host:oF(i.host,!0);if(!u)h=oF(h.toLowerCase());i.host=BTe(h,u)}if(!g||g&&!g.skipNormalize){if(i.path)i.path=zTe(i.path);if(i.query)i.query=aK(i.query);if(i.fragment)i.fragment=aK(i.fragment)}if(g&&g.parse){if(g.parse(i,r),g===dK.urn&&i.nid===void 0)s=!0}}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function O$(e,t){return A$(e,t).parsed}function XTe(e,t){return hK(e,t).normalized}function hK(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=A$(e,t);return{normalized:i||n||o||s||a?e:cu(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function lK(e,t){if(typeof e!=="string"&&typeof e!=="object")return;let r;try{r=typeof e==="string"?e:cu(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:n,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=hK(r,t);return n||o||s||a||c?void 0:i}var cF={SCHEMES:dK,normalize:VTe,resolve:WTe,resolveComponent:mK,equal:HTe,serialize:cu,parse:O$};D$.exports=cF;D$.exports.default=cF;D$.exports.fastUri=cF});var bK=F(function(wK){Object.defineProperty(wK,"__esModule",{value:!0});var vK=yK();vK.code='require("ajv/dist/runtime/uri").default';wK.default=vK});var EK=F(function(da){Object.defineProperty(da,"__esModule",{value:!0});da.CodeGen=da.Name=da.nil=da.stringify=da.str=da._=da.KeywordCxt=void 0;var eNe=ny();Object.defineProperty(da,"KeywordCxt",{enumerable:!0,get:function(){return eNe.KeywordCxt}});var Zd=Xe();Object.defineProperty(da,"_",{enumerable:!0,get:function(){return Zd._}});Object.defineProperty(da,"str",{enumerable:!0,get:function(){return Zd.str}});Object.defineProperty(da,"stringify",{enumerable:!0,get:function(){return Zd.stringify}});Object.defineProperty(da,"nil",{enumerable:!0,get:function(){return Zd.nil}});Object.defineProperty(da,"Name",{enumerable:!0,get:function(){return Zd.Name}});Object.defineProperty(da,"CodeGen",{enumerable:!0,get:function(){return Zd.CodeGen}});var tNe=C$(),PK=iy(),rNe=Tj(),cy=E$(),nNe=Xe(),ly=ey(),T$=Qh(),uF=pt(),kK=G5(),iNe=bK(),CK=(e,t)=>new RegExp(e,t);CK.code="new RegExp";var oNe=["removeAdditional","useDefaults","coerceTypes"],sNe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),aNe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},cNe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},SK=200;function lNe(e){var t,r,i,n,o,s,a,c,l,u,p,d,f,m,g,h,y,v,w,x,b,k,A,N,C;let P=e.strict,E=(t=e.code)===null||t===void 0?void 0:t.optimize,O=E===!0||E===void 0?1:E||0,z=(i=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&i!==void 0?i:CK,_=(n=e.uriResolver)!==null&&n!==void 0?n:iNe.default;return{strictSchema:(s=(o=e.strictSchema)!==null&&o!==void 0?o:P)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:P)!==null&&c!==void 0?c:!0,strictTypes:(u=(l=e.strictTypes)!==null&&l!==void 0?l:P)!==null&&u!==void 0?u:"log",strictTuples:(d=(p=e.strictTuples)!==null&&p!==void 0?p:P)!==null&&d!==void 0?d:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:P)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:O,regExp:z}:{optimize:O,regExp:z},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:SK,loopEnum:(h=e.loopEnum)!==null&&h!==void 0?h:SK,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(x=e.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(b=e.addUsedSchema)!==null&&b!==void 0?b:!0,validateSchema:(k=e.validateSchema)!==null&&k!==void 0?k:!0,validateFormats:(A=e.validateFormats)!==null&&A!==void 0?A:!0,unicodeRegExp:(N=e.unicodeRegExp)!==null&&N!==void 0?N:!0,int32range:(C=e.int32range)!==null&&C!==void 0?C:!0,uriResolver:_}}class N${constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...lNe(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new nNe.ValueScope({scope:{},prefixes:sNe,es5:t,lines:r}),this.logger=gNe(e.logger);let i=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,rNe.getRules)(),$K.call(this,aNe,e,"NOT SUPPORTED"),$K.call(this,cNe,e,"DEPRECATED","warn"),this._metaOpts=fNe.call(this),e.formats)pNe.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)dNe.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);uNe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=kK;if(r==="id")i={...kK},i.id=i.$id,delete i.$id;if(t&&e)this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);if(!("$async"in r))this.errors=r.errors;return i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(l,u){await n.call(this,l.$schema);let p=this._addSchema(l,u);return p.validate||o.call(this,p)}async function n(l){if(l&&!this.getSchema(l))await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(u){if(!(u instanceof PK.default))throw u;return s.call(this,u),await a.call(this,u.missingSchema),o.call(this,l)}}function s({missingSchema:l,missingRef:u}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${u} cannot be resolved`)}async function a(l){let u=await c.call(this,l);if(!this.refs[l])await n.call(this,u.$schema);if(!this.refs[l])this.addSchema(u,l,t)}async function c(l){let u=this._loading[l];if(u)return u;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,r,i);return this}let n;if(typeof e==="object"){let{schemaId:o}=this.opts;if(n=e[o],n!==void 0&&typeof n!="string")throw Error(`schema ${o} must be string`)}return t=(0,ly.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let n="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(n);else throw Error(n)}return i}getSchema(e){let t;while(typeof(t=xK.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,i=new cy.SchemaEnv({schema:{},schemaId:r});if(t=cy.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=xK.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,ly.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(yNe.call(this,r,t),!t)return(0,uF.eachItem)(r,(n)=>lF.call(this,n)),this;wNe.call(this,t);let i={...t,type:(0,T$.getJSONTypes)(t.type),schemaType:(0,T$.getJSONTypes)(t.schemaType)};return(0,uF.eachItem)(r,i.type.length===0?(n)=>lF.call(this,n,i):(n)=>i.type.forEach((o)=>lF.call(this,n,i,o))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let i=r.rules.findIndex((n)=>n.keyword===e);if(i>=0)r.rules.splice(i,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((i)=>`${r}${i.instancePath} ${i.message}`).reduce((i,n)=>i+t+n)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of t){let n=i.split("/").slice(1),o=e;for(let s of n)o=o[s];for(let s in r){let a=r[s];if(typeof a!="object")continue;let{$data:c}=a.definition,l=o[s];if(c&&l)o[s]=_K(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];if(!t||t.test(r)){if(typeof i=="string")delete e[r];else if(i&&!i.meta)this._cache.delete(i.schema),delete e[r]}}}_addSchema(e,t,r,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,ly.normalizeId)(o||r);let c=ly.getSchemaRefs.call(this,e,r);if(a=new cy.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),n&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(i)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else cy.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{cy.compileSchema.call(this,e)}finally{this.opts=t}}}N$.ValidationError=tNe.default;N$.MissingRefError=PK.default;da.default=N$;function $K(e,t,r,i="error"){for(let n in e){let o=n;if(o in t)this.logger[i](`${r}: option ${n}. ${e[o]}`)}}function xK(e){return e=(0,ly.normalizeId)(e),this.schemas[e]||this.refs[e]}function uNe(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function pNe(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function dNe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function fNe(){let e={...this.opts};for(let t of oNe)delete e[t];return e}var mNe={log(){},warn(){},error(){}};function gNe(e){if(e===!1)return mNe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var hNe=/^[a-z_$][a-z0-9_$:-]*$/i;function yNe(e,t){let{RULES:r}=this;if((0,uF.eachItem)(e,(i)=>{if(r.keywords[i])throw Error(`Keyword ${i} is already defined`);if(!hNe.test(i))throw Error(`Keyword ${i} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function lF(e,t,r){var i;let n=t===null||t===void 0?void 0:t.post;if(r&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=n?o.post:o.rules.find(({type:c})=>c===r);if(!s)s={type:r,rules:[]},o.rules.push(s);if(o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,T$.getJSONTypes)(t.type),schemaType:(0,T$.getJSONTypes)(t.schemaType)}};if(t.before)vNe.call(this,s,a,t.before);else s.rules.push(a);o.all[e]=a,(i=t.implements)===null||i===void 0||i.forEach((c)=>this.addKeyword(c))}function vNe(e,t,r){let i=e.rules.findIndex((n)=>n.keyword===r);if(i>=0)e.rules.splice(i,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function wNe(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=_K(t);e.validateSchema=this.compile(t,!0)}var bNe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _K(e){return{anyOf:[e,bNe]}}});var IK=F(function(RK){Object.defineProperty(RK,"__esModule",{value:!0});var $Ne={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};RK.default=$Ne});var MK=F(function(TK){Object.defineProperty(TK,"__esModule",{value:!0});TK.callRef=TK.getValidate=void 0;var PNe=iy(),AK=ao(),di=Xe(),Kd=ua(),OK=E$(),M$=pt(),CNe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:i}=e,{baseId:n,schemaEnv:o,validateName:s,opts:a,self:c}=i,{root:l}=o;if((r==="#"||r==="#/")&&n===l.baseId)return p();let u=OK.resolveRef.call(c,l,n,r);if(u===void 0)throw new PNe.default(i.opts.uriResolver,n,r);if(u instanceof OK.SchemaEnv)return d(u);return f(u);function p(){if(o===l)return j$(e,s,o,o.$async);let m=t.scopeValue("root",{ref:l});return j$(e,di._`${m}.validate`,l,l.$async)}function d(m){let g=DK(e,m);j$(e,g,m,m.$async)}function f(m){let g=t.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,di.stringify)(m)}:{ref:m}),h=t.name("valid"),y=e.subschema({schema:m,dataTypes:[],schemaPath:di.nil,topSchemaRef:g,errSchemaPath:r},h);e.mergeEvaluated(y),e.ok(h)}}};function DK(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):di._`${r.scopeValue("wrapper",{ref:t})}.validate`}TK.getValidate=DK;function j$(e,t,r,i){let{gen:n,it:o}=e,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Kd.default.this:di.nil;if(i)u();else p();function u(){if(!a.$async)throw Error("async schema referenced by sync schema");let m=n.let("valid");n.try(()=>{if(n.code(di._`await ${(0,AK.callValidateCode)(e,t,l)}`),f(t),!s)n.assign(m,!0)},(g)=>{if(n.if(di._`!(${g} instanceof ${o.ValidationError})`,()=>n.throw(g)),d(g),!s)n.assign(m,!1)}),e.ok(m)}function p(){e.result((0,AK.callValidateCode)(e,t,l),()=>f(t),()=>d(t))}function d(m){let g=di._`${m}.errors`;n.assign(Kd.default.vErrors,di._`${Kd.default.vErrors} === null ? ${g} : ${Kd.default.vErrors}.concat(${g})`),n.assign(Kd.default.errors,di._`${Kd.default.vErrors}.length`)}function f(m){var g;if(!o.opts.unevaluated)return;let h=(g=r===null||r===void 0?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(h&&!h.dynamicProps){if(h.props!==void 0)o.props=M$.mergeEvaluated.props(n,h.props,o.props)}else{let y=n.var("props",di._`${m}.evaluated.props`);o.props=M$.mergeEvaluated.props(n,y,o.props,di.Name)}if(o.items!==!0)if(h&&!h.dynamicItems){if(h.items!==void 0)o.items=M$.mergeEvaluated.items(n,h.items,o.items)}else{let y=n.var("items",di._`${m}.evaluated.items`);o.items=M$.mergeEvaluated.items(n,y,o.items,di.Name)}}}TK.callRef=j$;TK.default=CNe});var FK=F(function(jK){Object.defineProperty(jK,"__esModule",{value:!0});var RNe=IK(),INe=MK(),ANe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",RNe.default,INe.default];jK.default=ANe});var UK=F(function(zK){Object.defineProperty(zK,"__esModule",{value:!0});var F$=Xe(),Pc=F$.operators,z$={maximum:{okStr:"<=",ok:Pc.LTE,fail:Pc.GT},minimum:{okStr:">=",ok:Pc.GTE,fail:Pc.LT},exclusiveMaximum:{okStr:"<",ok:Pc.LT,fail:Pc.GTE},exclusiveMinimum:{okStr:">",ok:Pc.GT,fail:Pc.LTE}},DNe={message:({keyword:e,schemaCode:t})=>F$.str`must be ${z$[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>F$._`{comparison: ${z$[e].okStr}, limit: ${t}}`},TNe={keyword:Object.keys(z$),type:"number",schemaType:"number",$data:!0,error:DNe,code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data(F$._`${r} ${z$[t].fail} ${i} || isNaN(${r})`)}};zK.default=TNe});var BK=F(function(LK){Object.defineProperty(LK,"__esModule",{value:!0});var uy=Xe(),MNe={message:({schemaCode:e})=>uy.str`must be multiple of ${e}`,params:({schemaCode:e})=>uy._`{multipleOf: ${e}}`},jNe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:MNe,code(e){let{gen:t,data:r,schemaCode:i,it:n}=e,o=n.opts.multipleOfPrecision,s=t.let("res"),a=o?uy._`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:uy._`${s} !== parseInt(${s})`;e.fail$data(uy._`(${i} === 0 || (${s} = ${r}/${i}, ${a}))`)}};LK.default=jNe});var WK=F(function(VK){Object.defineProperty(VK,"__esModule",{value:!0});function qK(e){let t=e.length,r=0,i=0,n;while(i<t)if(r++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t){if(n=e.charCodeAt(i),(n&64512)===56320)i++}return r}VK.default=qK;qK.code='require("ajv/dist/runtime/ucs2length").default'});var GK=F(function(HK){Object.defineProperty(HK,"__esModule",{value:!0});var lu=Xe(),UNe=pt(),LNe=WK(),BNe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return lu.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>lu._`{limit: ${e}}`},qNe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:BNe,code(e){let{keyword:t,data:r,schemaCode:i,it:n}=e,o=t==="maxLength"?lu.operators.GT:lu.operators.LT,s=n.opts.unicode===!1?lu._`${r}.length`:lu._`${(0,UNe.useFunc)(e.gen,LNe.default)}(${r})`;e.fail$data(lu._`${s} ${o} ${i}`)}};HK.default=qNe});var KK=F(function(ZK){Object.defineProperty(ZK,"__esModule",{value:!0});var WNe=ao(),HNe=pt(),Jd=Xe(),GNe={message:({schemaCode:e})=>Jd.str`must match pattern "${e}"`,params:({schemaCode:e})=>Jd._`{pattern: ${e}}`},ZNe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:GNe,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(i){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?Jd._`new RegExp`:(0,HNe.useFunc)(t,c),u=t.let("valid");t.try(()=>t.assign(u,Jd._`${l}(${o}, ${a}).test(${r})`),()=>t.assign(u,!1)),e.fail$data(Jd._`!${u}`)}else{let c=(0,WNe.usePattern)(e,n);e.fail$data(Jd._`!${c}.test(${r})`)}}};ZK.default=ZNe});var YK=F(function(JK){Object.defineProperty(JK,"__esModule",{value:!0});var py=Xe(),JNe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return py.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>py._`{limit: ${e}}`},YNe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:JNe,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxProperties"?py.operators.GT:py.operators.LT;e.fail$data(py._`Object.keys(${r}).length ${n} ${i}`)}};JK.default=YNe});var QK=F(function(XK){Object.defineProperty(XK,"__esModule",{value:!0});var dy=ao(),fy=Xe(),QNe=pt(),eMe={message:({params:{missingProperty:e}})=>fy.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>fy._`{missingProperty: ${e}}`},tMe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:eMe,code(e){let{gen:t,schema:r,schemaCode:i,data:n,$data:o,it:s}=e,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors)l();else u();if(a.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let g of r)if((f===null||f===void 0?void 0:f[g])===void 0&&!m.has(g)){let h=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${g}" is not defined at "${h}" (strictRequired)`;(0,QNe.checkStrictMode)(s,y,s.opts.strictRequired)}}function l(){if(c||o)e.block$data(fy.nil,p);else for(let f of r)(0,dy.checkReportMissingProp)(e,f)}function u(){let f=t.let("missing");if(c||o){let m=t.let("valid",!0);e.block$data(m,()=>d(f,m)),e.ok(m)}else t.if((0,dy.checkMissingProp)(e,r,f)),(0,dy.reportMissingProp)(e,f),t.else()}function p(){t.forOf("prop",i,(f)=>{e.setParams({missingProperty:f}),t.if((0,dy.noPropertyInData)(t,n,f,a.ownProperties),()=>e.error())})}function d(f,m){e.setParams({missingProperty:f}),t.forOf(f,i,()=>{t.assign(m,(0,dy.propertyInData)(t,n,f,a.ownProperties)),t.if((0,fy.not)(m),()=>{e.error(),t.break()})},fy.nil)}}};XK.default=tMe});var t7=F(function(e7){Object.defineProperty(e7,"__esModule",{value:!0});var my=Xe(),nMe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return my.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>my._`{limit: ${e}}`},iMe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:nMe,code(e){let{keyword:t,data:r,schemaCode:i}=e,n=t==="maxItems"?my.operators.GT:my.operators.LT;e.fail$data(my._`${r}.length ${n} ${i}`)}};e7.default=iMe});var U$=F(function(n7){Object.defineProperty(n7,"__esModule",{value:!0});var r7=Bj();r7.code='require("ajv/dist/runtime/equal").default';n7.default=r7});var o7=F(function(i7){Object.defineProperty(i7,"__esModule",{value:!0});var pF=Qh(),mn=Xe(),aMe=pt(),cMe=U$(),lMe={message:({params:{i:e,j:t}})=>mn.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>mn._`{i: ${e}, j: ${t}}`},uMe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:lMe,code(e){let{gen:t,data:r,$data:i,schema:n,parentSchema:o,schemaCode:s,it:a}=e;if(!i&&!n)return;let c=t.let("valid"),l=o.items?(0,pF.getSchemaTypes)(o.items):[];e.block$data(c,u,mn._`${s} === false`),e.ok(c);function u(){let m=t.let("i",mn._`${r}.length`),g=t.let("j");e.setParams({i:m,j:g}),t.assign(c,!0),t.if(mn._`${m} > 1`,()=>(p()?d:f)(m,g))}function p(){return l.length>0&&!l.some((m)=>m==="object"||m==="array")}function d(m,g){let h=t.name("item"),y=(0,pF.checkDataTypes)(l,h,a.opts.strictNumbers,pF.DataType.Wrong),v=t.const("indices",mn._`{}`);t.for(mn._`;${m}--;`,()=>{if(t.let(h,mn._`${r}[${m}]`),t.if(y,mn._`continue`),l.length>1)t.if(mn._`typeof ${h} == "string"`,mn._`${h} += "_"`);t.if(mn._`typeof ${v}[${h}] == "number"`,()=>{t.assign(g,mn._`${v}[${h}]`),e.error(),t.assign(c,!1).break()}).code(mn._`${v}[${h}] = ${m}`)})}function f(m,g){let h=(0,aMe.useFunc)(t,cMe.default),y=t.name("outer");t.label(y).for(mn._`;${m}--;`,()=>t.for(mn._`${g} = ${m}; ${g}--;`,()=>t.if(mn._`${h}(${r}[${m}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};i7.default=uMe});var a7=F(function(s7){Object.defineProperty(s7,"__esModule",{value:!0});var dF=Xe(),dMe=pt(),fMe=U$(),mMe={message:"must be equal to constant",params:({schemaCode:e})=>dF._`{allowedValue: ${e}}`},gMe={keyword:"const",$data:!0,error:mMe,code(e){let{gen:t,data:r,$data:i,schemaCode:n,schema:o}=e;if(i||o&&typeof o=="object")e.fail$data(dF._`!${(0,dMe.useFunc)(t,fMe.default)}(${r}, ${n})`);else e.fail(dF._`${o} !== ${r}`)}};s7.default=gMe});var l7=F(function(c7){Object.defineProperty(c7,"__esModule",{value:!0});var gy=Xe(),yMe=pt(),vMe=U$(),wMe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>gy._`{allowedValues: ${e}}`},bMe={keyword:"enum",schemaType:"array",$data:!0,error:wMe,code(e){let{gen:t,data:r,$data:i,schema:n,schemaCode:o,it:s}=e;if(!i&&n.length===0)throw Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,yMe.useFunc)(t,vMe.default),u;if(a||i)u=t.let("valid"),e.block$data(u,p);else{if(!Array.isArray(n))throw Error("ajv implementation error");let f=t.const("vSchema",o);u=(0,gy.or)(...n.map((m,g)=>d(f,g)))}e.pass(u);function p(){t.assign(u,!1),t.forOf("v",o,(f)=>t.if(gy._`${l()}(${r}, ${f})`,()=>t.assign(u,!0).break()))}function d(f,m){let g=n[m];return typeof g==="object"&&g!==null?gy._`${l()}(${r}, ${f}[${m}])`:gy._`${r} === ${g}`}}};c7.default=bMe});var p7=F(function(u7){Object.defineProperty(u7,"__esModule",{value:!0});var SMe=UK(),$Me=BK(),xMe=GK(),PMe=KK(),CMe=YK(),_Me=QK(),EMe=t7(),RMe=o7(),IMe=a7(),AMe=l7(),OMe=[SMe.default,$Me.default,xMe.default,PMe.default,CMe.default,_Me.default,EMe.default,RMe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},IMe.default,AMe.default];u7.default=OMe});var mF=F(function(f7){Object.defineProperty(f7,"__esModule",{value:!0});f7.validateAdditionalItems=void 0;var uu=Xe(),fF=pt(),TMe={message:({params:{len:e}})=>uu.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>uu._`{limit: ${e}}`},NMe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:TMe,code(e){let{parentSchema:t,it:r}=e,{items:i}=t;if(!Array.isArray(i)){(0,fF.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}d7(e,i)}};function d7(e,t){let{gen:r,schema:i,data:n,keyword:o,it:s}=e;s.items=!0;let a=r.const("len",uu._`${n}.length`);if(i===!1)e.setParams({len:t.length}),e.pass(uu._`${a} <= ${t.length}`);else if(typeof i=="object"&&!(0,fF.alwaysValidSchema)(s,i)){let l=r.var("valid",uu._`${a} <= ${t.length}`);r.if((0,uu.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(u)=>{if(e.subschema({keyword:o,dataProp:u,dataPropType:fF.Type.Num},l),!s.allErrors)r.if((0,uu.not)(l),()=>r.break())})}}f7.validateAdditionalItems=d7;f7.default=NMe});var gF=F(function(y7){Object.defineProperty(y7,"__esModule",{value:!0});y7.validateTuple=void 0;var g7=Xe(),L$=pt(),jMe=ao(),FMe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return h7(e,"additionalItems",t);if(r.items=!0,(0,L$.alwaysValidSchema)(r,t))return;e.ok((0,jMe.validateArray)(e))}};function h7(e,t,r=e.schema){let{gen:i,parentSchema:n,data:o,keyword:s,it:a}=e;if(u(n),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=L$.mergeEvaluated.items(i,r.length,a.items);let c=i.name("valid"),l=i.const("len",g7._`${o}.length`);r.forEach((p,d)=>{if((0,L$.alwaysValidSchema)(a,p))return;i.if(g7._`${l} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c)});function u(p){let{opts:d,errSchemaPath:f}=a,m=r.length,g=m===p.minItems&&(m===p.maxItems||p[t]===!1);if(d.strictTuples&&!g){let h=`"${s}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,L$.checkStrictMode)(a,h,d.strictTuples)}}}y7.validateTuple=h7;y7.default=FMe});var b7=F(function(w7){Object.defineProperty(w7,"__esModule",{value:!0});var UMe=gF(),LMe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,UMe.validateTuple)(e,"items")};w7.default=LMe});var $7=F(function(S7){Object.defineProperty(S7,"__esModule",{value:!0});var k7=Xe(),qMe=pt(),VMe=ao(),WMe=mF(),HMe={message:({params:{len:e}})=>k7.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>k7._`{limit: ${e}}`},GMe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:HMe,code(e){let{schema:t,parentSchema:r,it:i}=e,{prefixItems:n}=r;if(i.items=!0,(0,qMe.alwaysValidSchema)(i,t))return;if(n)(0,WMe.validateAdditionalItems)(e,n);else e.ok((0,VMe.validateArray)(e))}};S7.default=GMe});var P7=F(function(x7){Object.defineProperty(x7,"__esModule",{value:!0});var co=Xe(),B$=pt(),KMe={message:({params:{min:e,max:t}})=>t===void 0?co.str`must contain at least ${e} valid item(s)`:co.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?co._`{minContains: ${e}}`:co._`{minContains: ${e}, maxContains: ${t}}`},JMe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:KMe,code(e){let{gen:t,schema:r,parentSchema:i,data:n,it:o}=e,s,a,{minContains:c,maxContains:l}=i;if(o.opts.next)s=c===void 0?1:c,a=l;else s=1;let u=t.const("len",co._`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,B$.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,B$.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,B$.alwaysValidSchema)(o,r)){let g=co._`${u} >= ${s}`;if(a!==void 0)g=co._`${g} && ${u} <= ${a}`;e.pass(g);return}o.items=!0;let p=t.name("valid");if(a===void 0&&s===1)f(p,()=>t.if(p,()=>t.break()));else if(s===0){if(t.let(p,!0),a!==void 0)t.if(co._`${n}.length > 0`,d)}else t.let(p,!1),d();e.result(p,()=>e.reset());function d(){let g=t.name("_valid"),h=t.let("count",0);f(g,()=>t.if(g,()=>m(h)))}function f(g,h){t.forRange("i",0,u,(y)=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:B$.Type.Num,compositeRule:!0},g),h()})}function m(g){if(t.code(co._`${g}++`),a===void 0)t.if(co._`${g} >= ${s}`,()=>t.assign(p,!0).break());else if(t.if(co._`${g} > ${a}`,()=>t.assign(p,!1).break()),s===1)t.assign(p,!0);else t.if(co._`${g} >= ${s}`,()=>t.assign(p,!0))}}};x7.default=JMe});var A7=F(function(E7){Object.defineProperty(E7,"__esModule",{value:!0});E7.validateSchemaDeps=E7.validatePropertyDeps=E7.error=void 0;var hF=Xe(),XMe=pt(),hy=ao();E7.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let i=t===1?"property":"properties";return hF.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>hF._`{property: ${e},
302
302
  missingProperty: ${i},
303
303
  depsCount: ${t},
304
304
  deps: ${r}}`};var QMe={keyword:"dependencies",type:"object",schemaType:"object",error:E7.error,code(e){let[t,r]=e1e(e);C7(e,t),_7(e,r)}};function e1e({schema:e}){let t={},r={};for(let i in e){if(i==="__proto__")continue;let n=Array.isArray(e[i])?t:r;n[i]=e[i]}return[t,r]}function C7(e,t=e.schema){let{gen:r,data:i,it:n}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,hy.propertyInData)(r,i,s,n.opts.ownProperties);if(e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors)r.if(c,()=>{for(let l of a)(0,hy.checkReportMissingProp)(e,l)});else r.if(hF._`${c} && (${(0,hy.checkMissingProp)(e,a,o)})`),(0,hy.reportMissingProp)(e,o),r.else()}}E7.validatePropertyDeps=C7;function _7(e,t=e.schema){let{gen:r,data:i,keyword:n,it:o}=e,s=r.name("valid");for(let a in t){if((0,XMe.alwaysValidSchema)(o,t[a]))continue;r.if((0,hy.propertyInData)(r,i,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s)}}E7.validateSchemaDeps=_7;E7.default=QMe});var T7=F(function(D7){Object.defineProperty(D7,"__esModule",{value:!0});var O7=Xe(),n1e=pt(),i1e={message:"property name must be valid",params:({params:e})=>O7._`{propertyName: ${e.propertyName}}`},o1e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:i1e,code(e){let{gen:t,schema:r,data:i,it:n}=e;if((0,n1e.alwaysValidSchema)(n,r))return;let o=t.name("valid");t.forIn("key",i,(s)=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,O7.not)(o),()=>{if(e.error(!0),!n.allErrors)t.break()})}),e.ok(o)}};D7.default=o1e});var yF=F(function(N7){Object.defineProperty(N7,"__esModule",{value:!0});var q$=ao(),Mo=Xe(),a1e=ua(),V$=pt(),c1e={message:"must NOT have additional properties",params:({params:e})=>Mo._`{additionalProperty: ${e.additionalProperty}}`},l1e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:c1e,code(e){let{gen:t,schema:r,parentSchema:i,data:n,errsCount:o,it:s}=e;if(!o)throw Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,V$.alwaysValidSchema)(s,r))return;let l=(0,q$.allSchemaProperties)(i.properties),u=(0,q$.allSchemaProperties)(i.patternProperties);p(),e.ok(Mo._`${o} === ${a1e.default.errors}`);function p(){t.forIn("key",n,(h)=>{if(!l.length&&!u.length)m(h);else t.if(d(h),()=>m(h))})}function d(h){let y;if(l.length>8){let v=(0,V$.schemaRefOrVal)(s,i.properties,"properties");y=(0,q$.isOwnProperty)(t,v,h)}else if(l.length)y=(0,Mo.or)(...l.map((v)=>Mo._`${h} === ${v}`));else y=Mo.nil;if(u.length)y=(0,Mo.or)(y,...u.map((v)=>Mo._`${(0,q$.usePattern)(e,v)}.test(${h})`));return(0,Mo.not)(y)}function f(h){t.code(Mo._`delete ${n}[${h}]`)}function m(h){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(h);return}if(r===!1){if(e.setParams({additionalProperty:h}),e.error(),!a)t.break();return}if(typeof r=="object"&&!(0,V$.alwaysValidSchema)(s,r)){let y=t.name("valid");if(c.removeAdditional==="failing")g(h,y,!1),t.if((0,Mo.not)(y),()=>{e.reset(),f(h)});else if(g(h,y),!a)t.if((0,Mo.not)(y),()=>t.break())}}function g(h,y,v){let w={keyword:"additionalProperties",dataProp:h,dataPropType:V$.Type.Str};if(v===!1)Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(w,y)}}};N7.default=l1e});var z7=F(function(F7){Object.defineProperty(F7,"__esModule",{value:!0});var p1e=ny(),M7=ao(),vF=pt(),j7=yF(),d1e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:i,data:n,it:o}=e;if(o.opts.removeAdditional==="all"&&i.additionalProperties===void 0)j7.default.code(new p1e.KeywordCxt(o,j7.default,"additionalProperties"));let s=(0,M7.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);if(o.opts.unevaluated&&s.length&&o.props!==!0)o.props=vF.mergeEvaluated.props(t,(0,vF.toHash)(s),o.props);let a=s.filter((p)=>!(0,vF.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let c=t.name("valid");for(let p of a){if(l(p))u(p);else{if(t.if((0,M7.propertyInData)(t,n,p,o.opts.ownProperties)),u(p),!o.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(p),e.ok(c)}function l(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function u(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},c)}}};F7.default=d1e});var V7=F(function(q7){Object.defineProperty(q7,"__esModule",{value:!0});var U7=ao(),W$=Xe(),L7=pt(),B7=pt(),m1e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:i,parentSchema:n,it:o}=e,{opts:s}=o,a=(0,U7.allSchemaProperties)(r),c=a.filter((g)=>(0,L7.alwaysValidSchema)(o,r[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&n.properties,u=t.name("valid");if(o.props!==!0&&!(o.props instanceof W$.Name))o.props=(0,B7.evaluatedPropsToName)(t,o.props);let{props:p}=o;d();function d(){for(let g of a){if(l)f(g);if(o.allErrors)m(g);else t.var(u,!0),m(g),t.if(u)}}function f(g){for(let h in l)if(new RegExp(g).test(h))(0,L7.checkStrictMode)(o,`property ${h} matches pattern ${g} (use allowMatchingProperties)`)}function m(g){t.forIn("key",i,(h)=>{t.if(W$._`${(0,U7.usePattern)(e,g)}.test(${h})`,()=>{let y=c.includes(g);if(!y)e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:h,dataPropType:B7.Type.Str},u);if(o.opts.unevaluated&&p!==!0)t.assign(W$._`${p}[${h}]`,!0);else if(!y&&!o.allErrors)t.if((0,W$.not)(u),()=>t.break())})})}}};q7.default=m1e});var H7=F(function(W7){Object.defineProperty(W7,"__esModule",{value:!0});var h1e=pt(),y1e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,h1e.alwaysValidSchema)(i,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};W7.default=y1e});var Z7=F(function(G7){Object.defineProperty(G7,"__esModule",{value:!0});var w1e=ao(),b1e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:w1e.validateUnion,error:{message:"must match a schema in anyOf"}};G7.default=b1e});var J7=F(function(K7){Object.defineProperty(K7,"__esModule",{value:!0});var H$=Xe(),S1e=pt(),$1e={message:"must match exactly one schema in oneOf",params:({params:e})=>H$._`{passingSchemas: ${e.passing}}`},x1e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$1e,code(e){let{gen:t,schema:r,parentSchema:i,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(n.opts.discriminator&&i.discriminator)return;let o=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(s,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((u,p)=>{let d;if((0,S1e.alwaysValidSchema)(n,u))t.var(c,!0);else d=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},c);if(p>0)t.if(H$._`${c} && ${s}`).assign(s,!1).assign(a,H$._`[${a}, ${p}]`).else();t.if(c,()=>{if(t.assign(s,!0),t.assign(a,p),d)e.mergeEvaluated(d,H$.Name)})})}}};K7.default=x1e});var X7=F(function(Y7){Object.defineProperty(Y7,"__esModule",{value:!0});var C1e=pt(),_1e={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let n=t.name("valid");r.forEach((o,s)=>{if((0,C1e.alwaysValidSchema)(i,o))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};Y7.default=_1e});var rJ=F(function(tJ){Object.defineProperty(tJ,"__esModule",{value:!0});var G$=Xe(),eJ=pt(),R1e={message:({params:e})=>G$.str`must match "${e.ifClause}" schema`,params:({params:e})=>G$._`{failingKeyword: ${e.ifClause}}`},I1e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:R1e,code(e){let{gen:t,parentSchema:r,it:i}=e;if(r.then===void 0&&r.else===void 0)(0,eJ.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let n=Q7(i,"then"),o=Q7(i,"else");if(!n&&!o)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&o){let u=t.let("ifClause");e.setParams({ifClause:u}),t.if(a,l("then",u),l("else",u))}else if(n)t.if(a,l("then"));else t.if((0,G$.not)(a),l("else"));e.pass(s,()=>e.error(!0));function c(){let u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(u)}function l(u,p){return()=>{let d=e.subschema({keyword:u},a);if(t.assign(s,a),e.mergeValidEvaluated(d,s),p)t.assign(p,G$._`${u}`);else e.setParams({ifClause:u})}}}};function Q7(e,t){let r=e.schema[t];return r!==void 0&&!(0,eJ.alwaysValidSchema)(e,r)}tJ.default=I1e});var iJ=F(function(nJ){Object.defineProperty(nJ,"__esModule",{value:!0});var O1e=pt(),D1e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,O1e.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};nJ.default=D1e});var sJ=F(function(oJ){Object.defineProperty(oJ,"__esModule",{value:!0});var N1e=mF(),M1e=b7(),j1e=gF(),F1e=$7(),z1e=P7(),U1e=A7(),L1e=T7(),B1e=yF(),q1e=z7(),V1e=V7(),W1e=H7(),H1e=Z7(),G1e=J7(),Z1e=X7(),K1e=rJ(),J1e=iJ();function Y1e(e=!1){let t=[W1e.default,H1e.default,G1e.default,Z1e.default,K1e.default,J1e.default,L1e.default,B1e.default,U1e.default,q1e.default,V1e.default];if(e)t.push(M1e.default,F1e.default);else t.push(N1e.default,j1e.default);return t.push(z1e.default),t}oJ.default=Y1e});var cJ=F(function(aJ){Object.defineProperty(aJ,"__esModule",{value:!0});var vr=Xe(),Q1e={message:({schemaCode:e})=>vr.str`must match format "${e}"`,params:({schemaCode:e})=>vr._`{format: ${e}}`},eje={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Q1e,code(e,t){let{gen:r,data:i,$data:n,schema:o,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:u,self:p}=a;if(!c.validateFormats)return;if(n)d();else f();function d(){let m=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),g=r.const("fDef",vr._`${m}[${s}]`),h=r.let("fType"),y=r.let("format");r.if(vr._`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(h,vr._`${g}.type || "string"`).assign(y,vr._`${g}.validate`),()=>r.assign(h,vr._`"string"`).assign(y,g)),e.fail$data((0,vr.or)(v(),w()));function v(){if(c.strictSchema===!1)return vr.nil;return vr._`${s} && !${y}`}function w(){let x=u.$async?vr._`(${g}.async ? await ${y}(${i}) : ${y}(${i}))`:vr._`${y}(${i})`,b=vr._`(typeof ${y} == "function" ? ${x} : ${y}.test(${i}))`;return vr._`${y} && ${y} !== true && ${h} === ${t} && !${b}`}}function f(){let m=p.formats[o];if(!m){v();return}if(m===!0)return;let[g,h,y]=w(m);if(g===t)e.pass(x());function v(){if(c.strictSchema===!1){p.logger.warn(b());return}throw Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function w(b){let k=b instanceof RegExp?(0,vr.regexpCode)(b):c.code.formats?vr._`${c.code.formats}${(0,vr.getProperty)(o)}`:void 0,A=r.scopeValue("formats",{key:o,ref:b,code:k});if(typeof b=="object"&&!(b instanceof RegExp))return[b.type||"string",b.validate,vr._`${A}.validate`];return["string",b,A]}function x(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!u.$async)throw Error("async format in sync schema");return vr._`await ${y}(${i})`}return typeof h=="function"?vr._`${y}(${i})`:vr._`${y}.test(${i})`}}}};aJ.default=eje});var uJ=F(function(lJ){Object.defineProperty(lJ,"__esModule",{value:!0});var rje=cJ(),nje=[rje.default];lJ.default=nje});var fJ=F(function(pJ){Object.defineProperty(pJ,"__esModule",{value:!0});pJ.contentVocabulary=pJ.metadataVocabulary=void 0;pJ.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];pJ.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var hJ=F(function(gJ){Object.defineProperty(gJ,"__esModule",{value:!0});var sje=FK(),aje=p7(),cje=sJ(),lje=uJ(),mJ=fJ(),uje=[sje.default,aje.default,(0,cje.default)(),lje.default,mJ.metadataVocabulary,mJ.contentVocabulary];gJ.default=uje});var bJ=F(function(vJ){Object.defineProperty(vJ,"__esModule",{value:!0});vJ.DiscrError=void 0;var yJ;(function(e){e.Tag="tag",e.Mapping="mapping"})(yJ||(vJ.DiscrError=yJ={}))});var $J=F(function(SJ){Object.defineProperty(SJ,"__esModule",{value:!0});var Yd=Xe(),wF=bJ(),kJ=E$(),dje=iy(),fje=pt(),mje={message:({params:{discrError:e,tagName:t}})=>e===wF.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>Yd._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},gje={keyword:"discriminator",type:"object",schemaType:"object",error:mje,code(e){let{gen:t,data:r,schema:i,parentSchema:n,it:o}=e,{oneOf:s}=n;if(!o.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=i.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(i.mapping)throw Error("discriminator: mapping is not supported");if(!s)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",Yd._`${r}${(0,Yd.getProperty)(a)}`);t.if(Yd._`typeof ${l} == "string"`,()=>u(),()=>e.error(!1,{discrError:wF.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function u(){let f=d();t.if(!1);for(let m in f)t.elseIf(Yd._`${l} === ${m}`),t.assign(c,p(f[m]));t.else(),e.error(!1,{discrError:wF.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function p(f){let m=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:f},m);return e.mergeEvaluated(g,Yd.Name),m}function d(){var f;let m={},g=y(n),h=!0;for(let x=0;x<s.length;x++){let b=s[x];if((b===null||b===void 0?void 0:b.$ref)&&!(0,fje.schemaHasRulesButRef)(b,o.self.RULES)){let A=b.$ref;if(b=kJ.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,A),b instanceof kJ.SchemaEnv)b=b.schema;if(b===void 0)throw new dje.default(o.opts.uriResolver,o.baseId,A)}let k=(f=b===null||b===void 0?void 0:b.properties)===null||f===void 0?void 0:f[a];if(typeof k!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);h=h&&(g||y(b)),v(k,x)}if(!h)throw Error(`discriminator: "${a}" must be required`);return m;function y({required:x}){return Array.isArray(x)&&x.includes(a)}function v(x,b){if(x.const)w(x.const,b);else if(x.enum)for(let k of x.enum)w(k,b);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(x,b){if(typeof x!="string"||x in m)throw Error(`discriminator: "${a}" values must be unique strings`);m[x]=b}}}};SJ.default=gje});var xJ=F(function(skt,yje){yje.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var kF=F(function(fi,bF){Object.defineProperty(fi,"__esModule",{value:!0});fi.MissingRefError=fi.ValidationError=fi.CodeGen=fi.Name=fi.nil=fi.stringify=fi.str=fi._=fi.KeywordCxt=fi.Ajv=void 0;var vje=EK(),wje=hJ(),bje=$J(),PJ=xJ(),kje=["/properties"],Z$="http://json-schema.org/draft-07/schema";class yy extends vje.default{_addVocabularies(){if(super._addVocabularies(),wje.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(bje.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(PJ,kje):PJ;this.addMetaSchema(e,Z$,!1),this.refs["http://json-schema.org/schema"]=Z$}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Z$)?Z$:void 0)}}fi.Ajv=yy;bF.exports=fi=yy;bF.exports.Ajv=yy;Object.defineProperty(fi,"__esModule",{value:!0});fi.default=yy;var Sje=ny();Object.defineProperty(fi,"KeywordCxt",{enumerable:!0,get:function(){return Sje.KeywordCxt}});var Xd=Xe();Object.defineProperty(fi,"_",{enumerable:!0,get:function(){return Xd._}});Object.defineProperty(fi,"str",{enumerable:!0,get:function(){return Xd.str}});Object.defineProperty(fi,"stringify",{enumerable:!0,get:function(){return Xd.stringify}});Object.defineProperty(fi,"nil",{enumerable:!0,get:function(){return Xd.nil}});Object.defineProperty(fi,"Name",{enumerable:!0,get:function(){return Xd.Name}});Object.defineProperty(fi,"CodeGen",{enumerable:!0,get:function(){return Xd.CodeGen}});var $je=C$();Object.defineProperty(fi,"ValidationError",{enumerable:!0,get:function(){return $je.default}});var xje=iy();Object.defineProperty(fi,"MissingRefError",{enumerable:!0,get:function(){return xje.default}})});var NJ=F(function(DJ){Object.defineProperty(DJ,"__esModule",{value:!0});DJ.formatNames=DJ.fastFormats=DJ.fullFormats=void 0;function ps(e,t){return{validate:e,compare:t}}DJ.fullFormats={date:ps(RJ,PF),time:ps($F(!0),CF),"date-time":ps(CJ(!0),AJ),"iso-time":ps($F(),IJ),"iso-date-time":ps(CJ(),OJ),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Oje,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:zje,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Dje,int32:{type:"number",validate:Mje},int64:{type:"number",validate:jje},float:{type:"number",validate:EJ},double:{type:"number",validate:EJ},password:!0,binary:!0};DJ.fastFormats={...DJ.fullFormats,date:ps(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,PF),time:ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,CF),"date-time":ps(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,AJ),"iso-time":ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,IJ),"iso-date-time":ps(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,OJ),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};DJ.formatNames=Object.keys(DJ.fullFormats);function _je(e){return e%4===0&&(e%100!==0||e%400===0)}var Eje=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Rje=[0,31,28,31,30,31,30,31,31,30,31,30,31];function RJ(e){let t=Eje.exec(e);if(!t)return!1;let r=+t[1],i=+t[2],n=+t[3];return i>=1&&i<=12&&n>=1&&n<=(i===2&&_je(r)?29:Rje[i])}function PF(e,t){if(!(e&&t))return;if(e>t)return 1;if(e<t)return-1;return 0}var SF=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function $F(e){return function(r){let i=SF.exec(r);if(!i)return!1;let n=+i[1],o=+i[2],s=+i[3],a=i[4],c=i[5]==="-"?-1:1,l=+(i[6]||0),u=+(i[7]||0);if(l>23||u>59||e&&!a)return!1;if(n<=23&&o<=59&&s<60)return!0;let p=o-u*c,d=n-l*c-(p<0?1:0);return(d===23||d===-1)&&(p===59||p===-1)&&s<61}}function CF(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+t).valueOf();if(!(r&&i))return;return r-i}function IJ(e,t){if(!(e&&t))return;let r=SF.exec(e),i=SF.exec(t);if(!(r&&i))return;if(e=r[1]+r[2]+r[3],t=i[1]+i[2]+i[3],e>t)return 1;if(e<t)return-1;return 0}var xF=/t|\s/i;function CJ(e){let t=$F(e);return function(i){let n=i.split(xF);return n.length===2&&RJ(n[0])&&t(n[1])}}function AJ(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),i=new Date(t).valueOf();if(!(r&&i))return;return r-i}function OJ(e,t){if(!(e&&t))return;let[r,i]=e.split(xF),[n,o]=t.split(xF),s=PF(r,n);if(s===void 0)return;return s||CF(i,o)}var Ije=/\/|:/,Aje=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Oje(e){return Ije.test(e)&&Aje.test(e)}var _J=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Dje(e){return _J.lastIndex=0,_J.test(e)}var Tje=-2147483648,Nje=2147483647;function Mje(e){return Number.isInteger(e)&&e<=Nje&&e>=Tje}function jje(e){return Number.isInteger(e)}function EJ(){return!0}var Fje=/[^\\]\\Z/;function zje(e){if(Fje.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}});var jJ=F(function(MJ){Object.defineProperty(MJ,"__esModule",{value:!0});MJ.formatLimitDefinition=void 0;var Lje=kF(),jo=Xe(),Cc=jo.operators,K$={formatMaximum:{okStr:"<=",ok:Cc.LTE,fail:Cc.GT},formatMinimum:{okStr:">=",ok:Cc.GTE,fail:Cc.LT},formatExclusiveMaximum:{okStr:"<",ok:Cc.LT,fail:Cc.GTE},formatExclusiveMinimum:{okStr:">",ok:Cc.GT,fail:Cc.LTE}},Bje={message:({keyword:e,schemaCode:t})=>jo.str`should be ${K$[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>jo._`{comparison: ${K$[e].okStr}, limit: ${t}}`};MJ.formatLimitDefinition={keyword:Object.keys(K$),type:"string",schemaType:"string",$data:!0,error:Bje,code(e){let{gen:t,data:r,schemaCode:i,keyword:n,it:o}=e,{opts:s,self:a}=o;if(!s.validateFormats)return;let c=new Lje.KeywordCxt(o,a.RULES.all.format.definition,"format");if(c.$data)l();else u();function l(){let d=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),f=t.const("fmt",jo._`${d}[${c.schemaCode}]`);e.fail$data((0,jo.or)(jo._`typeof ${f} != "object"`,jo._`${f} instanceof RegExp`,jo._`typeof ${f}.compare != "function"`,p(f)))}function u(){let d=c.schema,f=a.formats[d];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw Error(`"${n}": format "${d}" does not define "compare" function`);let m=t.scopeValue("formats",{key:d,ref:f,code:s.code.formats?jo._`${s.code.formats}${(0,jo.getProperty)(d)}`:void 0});e.fail$data(p(m))}function p(d){return jo._`${d}.compare(${r}, ${i}) ${K$[n].fail} 0`}},dependencies:["format"]};var qje=(e)=>(e.addKeyword(MJ.formatLimitDefinition),e);MJ.default=qje});var LJ=F(function(vy,UJ){Object.defineProperty(vy,"__esModule",{value:!0});var Qd=NJ(),Wje=jJ(),RF=Xe(),FJ=new RF.Name("fullFormats"),Hje=new RF.Name("fastFormats"),IF=(e,t={keywords:!0})=>{if(Array.isArray(t))return zJ(e,t,Qd.fullFormats,FJ),e;let[r,i]=t.mode==="fast"?[Qd.fastFormats,Hje]:[Qd.fullFormats,FJ],n=t.formats||Qd.formatNames;if(zJ(e,n,r,i),t.keywords)(0,Wje.default)(e);return e};IF.get=(e,t="full")=>{let i=(t==="fast"?Qd.fastFormats:Qd.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i};function zJ(e,t,r,i){var n,o;(n=(o=e.opts.code).formats)!==null&&n!==void 0||(o.formats=RF._`require("ajv-formats/dist/formats").${i}`);for(let s of t)e.addFormat(s,r[s])}UJ.exports=vy=IF;Object.defineProperty(vy,"__esModule",{value:!0});vy.default=IF});function Gje(){let e=new BJ.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return qJ.default(e),e}class pu{constructor(e){this._ajv=e??Gje()}getValidator(e){let t="$id"in e&&typeof e.$id==="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return(r)=>{if(t(r))return{valid:!0,data:r,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}}var BJ,qJ;var J$=I(()=>{BJ=Ut(kF(),1),qJ=Ut(LJ(),1)});function Y$(e,t,r){if(!e)throw Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function X$(e,t,r){if(!e)throw Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}async function Jje(e){return(await NF).getRandomValues(new Uint8Array(e))}async function Yje(e){let r=Math.pow(2,8)-Math.pow(2,8)%66,i="";while(i.length<e){let n=await Jje(e-i.length);for(let o of n)if(o<r)i+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[o%66]}return i}async function Xje(e){return await Yje(e)}async function Qje(e){let t=await(await NF).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function MF(e){if(!e)e=43;if(e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await Xje(e),r=await Qje(t);return{code_verifier:t,code_challenge:r}}var NF;var WJ=I(()=>{NF=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then((e)=>e.webcrypto)});var gn,GJ,jF,eFe,ZJ,KJ,JJ,HJ,tFe,rFe,YJ,Tkt,Nkt;var FF=I(()=>{y1();gn=kS().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:g1.custom,message:"URL must be parseable",fatal:!0}),zg}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),GJ=yr({resource:T().url(),authorization_servers:oe(gn).optional(),jwks_uri:T().url().optional(),scopes_supported:oe(T()).optional(),bearer_methods_supported:oe(T()).optional(),resource_signing_alg_values_supported:oe(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:Ct().optional(),authorization_details_types_supported:oe(T()).optional(),dpop_signing_alg_values_supported:oe(T()).optional(),dpop_bound_access_tokens_required:Ct().optional()}),jF=yr({issuer:T(),authorization_endpoint:gn,token_endpoint:gn,registration_endpoint:gn.optional(),scopes_supported:oe(T()).optional(),response_types_supported:oe(T()),response_modes_supported:oe(T()).optional(),grant_types_supported:oe(T()).optional(),token_endpoint_auth_methods_supported:oe(T()).optional(),token_endpoint_auth_signing_alg_values_supported:oe(T()).optional(),service_documentation:gn.optional(),revocation_endpoint:gn.optional(),revocation_endpoint_auth_methods_supported:oe(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:oe(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:oe(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:oe(T()).optional(),code_challenge_methods_supported:oe(T()).optional(),client_id_metadata_document_supported:Ct().optional()}),eFe=yr({issuer:T(),authorization_endpoint:gn,token_endpoint:gn,userinfo_endpoint:gn.optional(),jwks_uri:gn,registration_endpoint:gn.optional(),scopes_supported:oe(T()).optional(),response_types_supported:oe(T()),response_modes_supported:oe(T()).optional(),grant_types_supported:oe(T()).optional(),acr_values_supported:oe(T()).optional(),subject_types_supported:oe(T()),id_token_signing_alg_values_supported:oe(T()),id_token_encryption_alg_values_supported:oe(T()).optional(),id_token_encryption_enc_values_supported:oe(T()).optional(),userinfo_signing_alg_values_supported:oe(T()).optional(),userinfo_encryption_alg_values_supported:oe(T()).optional(),userinfo_encryption_enc_values_supported:oe(T()).optional(),request_object_signing_alg_values_supported:oe(T()).optional(),request_object_encryption_alg_values_supported:oe(T()).optional(),request_object_encryption_enc_values_supported:oe(T()).optional(),token_endpoint_auth_methods_supported:oe(T()).optional(),token_endpoint_auth_signing_alg_values_supported:oe(T()).optional(),display_values_supported:oe(T()).optional(),claim_types_supported:oe(T()).optional(),claims_supported:oe(T()).optional(),service_documentation:T().optional(),claims_locales_supported:oe(T()).optional(),ui_locales_supported:oe(T()).optional(),claims_parameter_supported:Ct().optional(),request_parameter_supported:Ct().optional(),request_uri_parameter_supported:Ct().optional(),require_request_uri_registration:Ct().optional(),op_policy_uri:gn.optional(),op_tos_uri:gn.optional(),client_id_metadata_document_supported:Ct().optional()}),ZJ=ce({...eFe.shape,...jF.pick({code_challenge_methods_supported:!0}).shape}),KJ=ce({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:Nh.number().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),JJ=ce({error:T(),error_description:T().optional(),error_uri:T().optional()}),HJ=gn.optional().or(ve("").transform(()=>{return})),tFe=ce({redirect_uris:oe(gn),token_endpoint_auth_method:T().optional(),grant_types:oe(T()).optional(),response_types:oe(T()).optional(),client_name:T().optional(),client_uri:gn.optional(),logo_uri:HJ,scope:T().optional(),contacts:oe(T()).optional(),tos_uri:HJ,policy_uri:T().optional(),jwks_uri:gn.optional(),jwks:FS().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),rFe=ce({client_id:T(),client_secret:T().optional(),client_id_issued_at:ot().optional(),client_secret_expires_at:ot().optional(),issuer:T().optional().catch(void 0)}).strip(),YJ=tFe.merge(rFe),Tkt=ce({error:T(),error_description:T().optional()}).strip(),Nkt=ce({token:T(),token_type_hint:T().optional()}).strip()});function XJ(e){let t=typeof e==="string"?new URL(e):new URL(e.href);return t.hash="",t}function QJ({requestedResource:e,configuredResource:t}){let r=typeof e==="string"?new URL(e):new URL(e.href),i=typeof t==="string"?new URL(t):new URL(t.href);if(r.origin!==i.origin)return!1;if(r.pathname.length<i.pathname.length)return!1;let n=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",o=i.pathname.endsWith("/")?i.pathname:i.pathname+"/";return n.startsWith(o)}var _r,ex,ef,_c,tf,tx,rx,nx,Ec,ix,ox,sx,ax,cx,lx,rf,ux,px,eY;var zF=I(()=>{_r=class _r extends Error{constructor(e,t){super(e);this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};if(this.errorUri)e.error_uri=this.errorUri;return e}get errorCode(){return this.constructor.errorCode}};ex=class ex extends _r{};ex.errorCode="invalid_request";ef=class ef extends _r{};ef.errorCode="invalid_client";_c=class _c extends _r{};_c.errorCode="invalid_grant";tf=class tf extends _r{};tf.errorCode="unauthorized_client";tx=class tx extends _r{};tx.errorCode="unsupported_grant_type";rx=class rx extends _r{};rx.errorCode="invalid_scope";nx=class nx extends _r{};nx.errorCode="access_denied";Ec=class Ec extends _r{};Ec.errorCode="server_error";ix=class ix extends _r{};ix.errorCode="temporarily_unavailable";ox=class ox extends _r{};ox.errorCode="unsupported_response_type";sx=class sx extends _r{};sx.errorCode="unsupported_token_type";ax=class ax extends _r{};ax.errorCode="invalid_token";cx=class cx extends _r{};cx.errorCode="method_not_allowed";lx=class lx extends _r{};lx.errorCode="too_many_requests";rf=class rf extends _r{};rf.errorCode="invalid_client_metadata";ux=class ux extends _r{};ux.errorCode="insufficient_scope";px=class px extends _r{};px.errorCode="invalid_target";eY={[ex.errorCode]:ex,[ef.errorCode]:ef,[_c.errorCode]:_c,[tf.errorCode]:tf,[tx.errorCode]:tx,[rx.errorCode]:rx,[nx.errorCode]:nx,[Ec.errorCode]:Ec,[ix.errorCode]:ix,[ox.errorCode]:ox,[sx.errorCode]:sx,[ax.errorCode]:ax,[cx.errorCode]:cx,[lx.errorCode]:lx,[rf.errorCode]:rf,[ux.errorCode]:ux,[px.errorCode]:px}});function nFe(e){return["client_secret_basic","client_secret_post","none"].includes(e)}function iFe(e,t){let r=e.client_secret!==void 0;if("token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&nFe(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method)))return e.token_endpoint_auth_method;if(t.length===0)return r?"client_secret_basic":"none";if(r&&t.includes("client_secret_basic"))return"client_secret_basic";if(r&&t.includes("client_secret_post"))return"client_secret_post";if(t.includes("none"))return"none";return r?"client_secret_post":"none"}function oFe(e,t,r,i){let{client_id:n,client_secret:o}=t;switch(e){case"client_secret_basic":sFe(n,o,r);return;case"client_secret_post":aFe(n,o,i);return;case"none":cFe(n,i);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function sFe(e,t,r){if(!t)throw Error("client_secret_basic authentication requires a client_secret");let i=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${i}`)}function aFe(e,t,r){if(r.set("client_id",e),t)r.set("client_secret",t)}function cFe(e,t){t.set("client_id",e)}async function rY(e){let t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{let i=JJ.parse(JSON.parse(r)),{error:n,error_description:o,error_uri:s}=i;return new(eY[n]||Ec)(o||"",s)}catch(i){let n=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${i}. Raw body: ${r}`;return new Ec(n)}}function lFe(e,t){let[r,i]=[e,t];try{[r,i]=[new URL(e).href,new URL(t).href]}catch{}return r===i||r.endsWith("/")&&r.slice(0,-1)===i||i.endsWith("/")&&i.slice(0,-1)===r}function VF(e,t){if(!e)return;if(typeof e.issuer!=="string")return e.issuer==null?e:{...e,issuer:void 0};return lFe(e.issuer,t)?e:void 0}function nY(e,t){return Error(`OAuth client information is bound to authorization server ${e.issuer} and is not presented to ${t}. Clear the stored client information, or correct \`expectedIssuer\`, if the authorization server has moved.`)}async function wy(e,t){try{return await BF(e,t)}catch(r){if(r instanceof ef||r instanceof tf)return await e.invalidateCredentials?.("all"),await BF(e,t);else if(r instanceof _c)return await e.invalidateCredentials?.("tokens"),await BF(e,t);throw r}}async function BF(e,{serverUrl:t,authorizationCode:r,scope:i,resourceMetadataUrl:n,fetchFn:o}){let s=await e.discoveryState?.(),a,c,l,u=n;if(!u&&s?.resourceMetadataUrl)u=new URL(s.resourceMetadataUrl);if(s?.authorizationServerUrl){if(c=s.authorizationServerUrl,a=s.resourceMetadata,l=s.authorizationServerMetadata??await oY(c,{fetchFn:o}),!a)try{a=await iY(t,{resourceMetadataUrl:u},o)}catch{}if(l!==s.authorizationServerMetadata||a!==s.resourceMetadata)await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:l})}else{let C=await vFe(t,{resourceMetadataUrl:u,fetchFn:o});c=C.authorizationServerUrl,l=C.authorizationServerMetadata,a=C.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:l})}let p=String(c),d=await fFe(t,e,a),f=d&&a&&!e.validateResourceURL?a.resource:d,m=i||a?.scopes_supported?.join(" ")||e.clientMetadata.scope,g=await Promise.resolve(e.clientInformation()),h=VF(g,p),y=e.saveClientInformation!==void 0&&!!e.redirectUrl;if(g&&!h&&!y)throw nY(g,p);let v=h?.issuer==null?h:void 0,w=async()=>{try{if(v)await e.saveClientInformation?.({...v,issuer:p})}catch{}};if(!h){if(r!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let C=l?.client_id_metadata_document_supported===!0,P=e.clientMetadataUrl;if(P&&!dFe(P))throw new rf(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${P}`);if(C&&P)h={client_id:P,issuer:p},await e.saveClientInformation?.(h);else{if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");h={...await $Fe(c,{metadata:l,clientMetadata:e.clientMetadata,scope:m,fetchFn:o}),issuer:p},await e.saveClientInformation(h)}}let x=!e.redirectUrl;if(r!==void 0||x){let C=await SFe(e,c,{metadata:l,resource:f,authorizationCode:r,fetchFn:o});return await w(),await e.saveTokens({...C,issuer:p}),"AUTHORIZED"}let b=VF(await e.tokens(),p);if(b?.refresh_token&&b.issuer==null)console.warn("[mcp-sdk] stored OAuth tokens have no 'issuer' property (saved by an earlier version, or by a provider that does not keep it) and are used as-is; make sure your OAuthClientProvider stores what saveTokens() and saveClientInformation() receive unchanged.");if(b?.refresh_token)try{let C=await kFe(c,{metadata:l,clientInformation:h,refreshToken:b.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await w(),await e.saveTokens({...C,issuer:p}),"AUTHORIZED"}catch(C){if(!(C instanceof _r)||C instanceof Ec);else throw C}let k=e.state?await e.state():void 0,{authorizationUrl:A,codeVerifier:N}=await wFe(c,{metadata:l,clientInformation:h,state:k,redirectUrl:e.redirectUrl,scope:m,resource:f});return await e.saveCodeVerifier(N),await e.redirectToAuthorization(A),"REDIRECT"}function dFe(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function fFe(e,t,r){let i=XJ(e);if(t.validateResourceURL)return await t.validateResourceURL(i,r?.resource);if(!r)return;if(!QJ({requestedResource:i,configuredResource:r.resource}))throw Error(`Protected resource ${r.resource} does not match expected ${i} (or origin)`);return new URL(r.resource)}function WF(e){let t=e.headers.get("WWW-Authenticate");if(!t)return{};let[r,i]=t.split(" ");if(r.toLowerCase()!=="bearer"||!i)return{};let n=qF(e,"resource_metadata")||void 0,o;if(n)try{o=new URL(n)}catch{}let s=qF(e,"scope")||void 0,a=qF(e,"error")||void 0;return{resourceMetadataUrl:o,scope:s,error:a}}function qF(e,t){let r=e.headers.get("WWW-Authenticate");if(!r)return null;let i=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),n=r.match(i);if(n)return n[1]||n[2];return null}async function iY(e,t,r=fetch){let i=await hFe(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!i||i.status===404)throw await i?.body?.cancel(),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!i.ok)throw await i.body?.cancel(),Error(`HTTP ${i.status} trying to load well-known OAuth protected resource metadata.`);return GJ.parse(await i.json())}async function HF(e,t,r=fetch){try{return await r(e,{headers:t})}catch(i){if(i instanceof TypeError)if(t)return HF(e,void 0,r);else return;throw i}}function mFe(e,t="",r={}){if(t.endsWith("/"))t=t.slice(0,-1);return r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function tY(e,t,r=fetch){return await HF(e,{"MCP-Protocol-Version":t},r)}function gFe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function hFe(e,t,r,i){let n=new URL(e),o=i?.protocolVersion??mc,s;if(i?.metadataUrl)s=new URL(i.metadataUrl);else{let c=mFe(t,n.pathname);s=new URL(c,i?.metadataServerUrl??n),s.search=n.search}let a=await tY(s,o,r);if(!i?.metadataUrl&&gFe(a,n.pathname)){let c=new URL(`/.well-known/${t}`,n);a=await tY(c,o,r)}return a}function yFe(e){let t=typeof e==="string"?new URL(e):e,r=t.pathname!=="/",i=[];if(!r)return i.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),i.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),i;let n=t.pathname;if(n.endsWith("/"))n=n.slice(0,-1);return i.push({url:new URL(`/.well-known/oauth-authorization-server${n}`,t.origin),type:"oauth"}),i.push({url:new URL(`/.well-known/openid-configuration${n}`,t.origin),type:"oidc"}),i.push({url:new URL(`${n}/.well-known/openid-configuration`,t.origin),type:"oidc"}),i}async function oY(e,{fetchFn:t=fetch,protocolVersion:r=mc}={}){let i={"MCP-Protocol-Version":r,Accept:"application/json"},n=yFe(e);for(let{url:o,type:s}of n){let a=await HF(o,i,t);if(!a)continue;if(!a.ok){if(await a.body?.cancel(),a.status>=400&&a.status<500)continue;throw Error(`HTTP ${a.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${o}`)}if(s==="oauth")return jF.parse(await a.json());else return ZJ.parse(await a.json())}return}async function vFe(e,t){let r,i;try{if(r=await iY(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0)i=r.authorization_servers[0]}catch{}if(!i)i=String(new URL("/",e));let n=await oY(i,{fetchFn:t?.fetchFn});return{authorizationServerUrl:i,authorizationServerMetadata:n,resourceMetadata:r}}function sY(e){return typeof e==="string"?e:e.href}async function wFe(e,{metadata:t,clientInformation:r,redirectUrl:i,scope:n,state:o,resource:s}){let a;if(t){if(a=new URL(t.authorization_endpoint),!t.response_types_supported.includes(UF))throw Error(`Incompatible auth server: does not support response type ${UF}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(LF))throw Error(`Incompatible auth server: does not support code challenge method ${LF}`)}else a=new URL("/authorize",e);let c=await MF(),l=c.code_verifier,u=c.code_challenge;if(a.searchParams.set("response_type",UF),a.searchParams.set("client_id",r.client_id),a.searchParams.set("code_challenge",u),a.searchParams.set("code_challenge_method",LF),a.searchParams.set("redirect_uri",String(i)),o)a.searchParams.set("state",o);if(n)a.searchParams.set("scope",n);if(n?.includes("offline_access"))a.searchParams.append("prompt","consent");if(s)a.searchParams.set("resource",sY(s));return{authorizationUrl:a,codeVerifier:l}}function bFe(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function aY(e,{metadata:t,tokenRequestParams:r,clientInformation:i,addClientAuthentication:n,resource:o,fetchFn:s}){let a=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(o)r.set("resource",sY(o));if(n)await n(c,r,a,t);else if(i){let u=t?.token_endpoint_auth_methods_supported??[],p=iFe(i,u);oFe(p,i,c,r)}let l=await(s??fetch)(a,{method:"POST",headers:c,body:r});if(!l.ok)throw await rY(l);return uFe.parse(await l.json())}async function kFe(e,{metadata:t,clientInformation:r,refreshToken:i,resource:n,addClientAuthentication:o,fetchFn:s}){let a=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),c=await aY(e,{metadata:t,tokenRequestParams:a,clientInformation:r,addClientAuthentication:o,resource:n,fetchFn:s});return{refresh_token:i,...c}}async function SFe(e,t,{metadata:r,resource:i,authorizationCode:n,fetchFn:o}={}){let s=async()=>{let u=await e.clientInformation(),p=VF(u,String(t));if(u&&!p)throw nY(u,String(t));return p},a=await s(),c=e.clientMetadata.scope,l;if(e.prepareTokenRequest)l=await e.prepareTokenRequest(c);if(!l){if(!n)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");let u=await e.codeVerifier();l=bFe(n,u,e.redirectUrl)}return a??(a=await s()),aY(t,{metadata:r,tokenRequestParams:l,clientInformation:a,addClientAuthentication:e.addClientAuthentication,resource:i,fetchFn:o})}async function $Fe(e,{metadata:t,clientMetadata:r,scope:i,fetchFn:n}){let o;if(t){if(!t.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");o=new URL(t.registration_endpoint)}else o=new URL("/register",e);let s=await(n??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,...i!==void 0?{scope:i}:{}})});if(!s.ok)throw await rY(s);return pFe.parse(await s.json())}var lo,UF="code",LF="S256",uFe,pFe;var GF=I(()=>{WJ();oo();FF();FF();zF();lo=class lo extends Error{constructor(e){super(e??"Unauthorized")}};uFe=KJ.omit({issuer:!0}),pFe=YJ.omit({issuer:!0})});class ZF{constructor(e){this._client=e}async*callToolStream(e,t=yc,r){let i=this._client,n={...r,task:r?.task??(i.isToolTask(e.name)?{}:void 0)},o=i.requestStream({method:"tools/call",params:e},t,n),s=i.getToolOutputValidator(e.name);for await(let a of o){if(a.type==="result"&&s){let c=a.result;if(!c.structuredContent&&!c.isError){yield{type:"error",error:new he($e.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(c.structuredContent)try{let l=s(c.structuredContent);if(!l.valid){yield{type:"error",error:new he($e.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof he){yield{type:"error",error:l};return}yield{type:"error",error:new he($e.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield a}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,r){return this._client.getTaskResult({taskId:e},t,r)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,r){return this._client.requestStream(e,t,r)}}var cY=I(()=>{oo()});function dx(e,t){if(!e||t===null||typeof t!=="object")return;if(e.type==="object"&&e.properties&&typeof e.properties==="object"){let r=t,i=e.properties;for(let n of Object.keys(i)){let o=i[n];if(r[n]===void 0&&Object.prototype.hasOwnProperty.call(o,"default"))r[n]=o.default;if(r[n]!==void 0)dx(o,r[n])}}if(Array.isArray(e.anyOf)){for(let r of e.anyOf)if(typeof r!=="boolean")dx(r,t)}if(Array.isArray(e.oneOf)){for(let r of e.oneOf)if(typeof r!=="boolean")dx(r,t)}}function xFe(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}var by;var KF=I(()=>{bj();oo();J$();kh();cY();by=class by extends Zh{constructor(e,t){super(t);if(this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new pu,t?.listChanged)this._pendingListChangedConfig=t.listChanged}_setupListChangedHandlers(e){if(e.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools",q1,e.tools,async()=>(await this.listTools()).tools);if(e.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts",U1,e.prompts,async()=>(await this.listPrompts()).prompts);if(e.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources",A1,e.resources,async()=>(await this.listResources()).resources)}get experimental(){if(!this._experimental)this._experimental={tasks:new ZF(this)};return this._experimental}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=p$(this._capabilities,e)}setRequestHandler(e,t){let i=Id(e)?.method;if(!i)throw Error("Schema is missing a method literal");let n=Ad(i);if(typeof n!=="string")throw Error("Schema method literal must be a string");let o=n;if(o==="elicitation/create"){let s=async(a,c)=>{let l=qn(H1,a);if(!l.success){let y=l.error instanceof Error?l.error.message:String(l.error);throw new he($e.InvalidParams,`Invalid elicitation request: ${y}`)}let{params:u}=l.data;u.mode=u.mode??"form";let{supportsFormMode:p,supportsUrlMode:d}=xFe(this._capabilities.elicitation);if(u.mode==="form"&&!p)throw new he($e.InvalidParams,"Client does not support form-mode elicitation requests");if(u.mode==="url"&&!d)throw new he($e.InvalidParams,"Client does not support URL-mode elicitation requests");let f=await Promise.resolve(t(a,c));if(u.task){let y=qn(aa,f);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new he($e.InvalidParams,`Invalid task creation result: ${v}`)}return y.data}let m=qn(vc,f);if(!m.success){let y=m.error instanceof Error?m.error.message:String(m.error);throw new he($e.InvalidParams,`Invalid elicitation result: ${y}`)}let g=m.data,h=u.mode==="form"?u.requestedSchema:void 0;if(u.mode==="form"&&g.action==="accept"&&g.content&&h){if(this._capabilities.elicitation?.form?.applyDefaults)try{dx(h,g.content)}catch{}}return g};return super.setRequestHandler(e,s)}if(o==="sampling/createMessage"){let s=async(a,c)=>{let l=qn(W1,a);if(!l.success){let g=l.error instanceof Error?l.error.message:String(l.error);throw new he($e.InvalidParams,`Invalid sampling request: ${g}`)}let{params:u}=l.data,p=await Promise.resolve(t(a,c));if(u.task){let g=qn(aa,p);if(!g.success){let h=g.error instanceof Error?g.error.message:String(g.error);throw new he($e.InvalidParams,`Invalid task creation result: ${h}`)}return g.data}let f=u.tools||u.toolChoice?Hh:ru,m=qn(f,p);if(!m.success){let g=m.error instanceof Error?m.error.message:String(m.error);throw new he($e.InvalidParams,`Invalid sampling result: ${g}`)}return m.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId!==void 0)return;try{let r=await this.request({method:"initialize",params:{protocolVersion:mc,capabilities:this._capabilities,clientInfo:this._clientInfo}},S1,t);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);if(!GS.includes(r.protocolVersion))throw Error(`Server's protocol version is not supported: ${r.protocolVersion}`);if(this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,e.setProtocolVersion)e.setProtocolVersion(r.protocolVersion);if(this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig)this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(!this._capabilities)return;switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){Y$(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){if(!this._capabilities)return;X$(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},sa,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},G1,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},sa,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},z1,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},D1,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},P1,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},_1,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},I1,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},sa,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},sa,t)}async callTool(e,t=yc,r){if(this.isToolTaskRequired(e.name))throw new he($e.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let i=await this.request({method:"tools/call",params:e},t,r),n=this.getToolOutputValidator(e.name);if(n){if(!i.structuredContent&&!i.isError)throw new he($e.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{let o=n(i.structuredContent);if(!o.valid)throw new he($e.InvalidParams,`Structured content does not match the tool's output schema: ${o.errorMessage}`)}catch(o){if(o instanceof he)throw o;throw new he($e.InvalidParams,`Failed to validate structured content: ${o instanceof Error?o.message:String(o)}`)}}return i}isToolTask(e){if(!this._serverCapabilities?.tasks?.requests?.tools?.call)return!1;return this._cachedKnownTaskTools.has(e)}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let t of e){if(t.outputSchema){let i=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,i)}let r=t.execution?.taskSupport;if(r==="required"||r==="optional")this._cachedKnownTaskTools.add(t.name);if(r==="required")this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){let r=await this.request({method:"tools/list",params:e},B1,t);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(e,t,r,i){let n=Z8.safeParse(r);if(!n.success)throw Error(`Invalid ${e} listChanged options: ${n.error.message}`);if(typeof r.onChanged!=="function")throw Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:o,debounceMs:s}=n.data,{onChanged:a}=r,c=async()=>{if(!o){a(null,null);return}try{let u=await i();a(null,u)}catch(u){let p=u instanceof Error?u:Error(String(u));a(p,null)}},l=()=>{if(s){let u=this._listChangedDebounceTimers.get(e);if(u)clearTimeout(u);let p=setTimeout(c,s);this._listChangedDebounceTimers.set(e,p)}else c()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var dY=F(function(DFe){/*!
@@ -367,11 +367,11 @@ ${o.join(`
367
367
  Use fully qualified format: plugin@owner/repo`}}function Vt(e){if(jy(e))return!1;let t=e.lastIndexOf("@");if(t===-1||t===0||t===e.length-1)return!1;if(e.slice(0,t).includes("/"))return!1;return!0}function $6e(e){let t=new Set;for(let r of e){if(!Vt(r))continue;let i=vt(r);if(!i)continue;if(i.owner&&i.repo){t.add(`${i.owner}/${i.repo}`);continue}let n=Wy(i.marketplaceName);if(n?.type==="github")t.add(n.branch?i.marketplaceName:n.location)}return Array.from(t)}async function Hy(e){let t=$6e(e),r=[];for(let i of t){let n=await Mee(i);r.push({source:i,...n})}return r}async function x6e(e,t){if(mt(e)===mt(t))return{registry:await Br(e),overrides:[]};let[r,i]=await Promise.all([Br(e),Br(t)]),n={version:1,marketplaces:{...r.marketplaces}},o=[];for(let[s,a]of Object.entries(i.marketplaces)){if(Lo(n,s))o.push(s);aU(n,s,a)}return{registry:n,overrides:o}}async function h0(e,t){if(!ba(t))return[];let{overrides:r}=await x6e(e,t);return r}async function jee(e,t){if(mt(e)===mt(t)){let a=await Br(e);return{entries:Object.values(a.marketplaces).map((c)=>({...c,scope:"user"})).sort((c,l)=>c.name.localeCompare(l.name)),overrides:[]}}let[r,i]=await Promise.all([Br(e),Br(t)]),n=new Set(Object.keys(i.marketplaces)),o=[],s=[];for(let[a,c]of Object.entries(r.marketplaces))if(n.has(a))s.push(a);else o.push({...c,scope:"user"});for(let a of Object.values(i.marketplaces))o.push({...a,scope:"project"});return{entries:o.sort((a,c)=>a.name.localeCompare(c.name)),overrides:s}}async function Fee(e,t=tn(),r=Rr){if(Fi(e,t))return null;let n=e.path;if(!ba(n))return null;try{let s=await r(n).log({maxCount:1});if(!s.latest)return null;return{hash:s.latest.hash.slice(0,7),date:new Date(s.latest.date)}}catch{return null}}var y6e,v6e,qy,tU,rU;var hn=I(()=>{nt();Zz();va();gf();or();Uo();wa();y6e=new Map;v6e=new Map;qy=class qy extends Error{};tU=new Map,rU=new Set});import{randomUUID as P6e}from"node:crypto";import{existsSync as hi}from"node:fs";import{chmod as C6e,mkdir as zee,rename as _6e,rm as E6e,stat as R6e,writeFile as Yn}from"node:fs/promises";import{basename as I6e,dirname as A6e,join as nn}from"node:path";async function Cu(e,t){let r=ae(e),i=await xf(r,{...t&&{workspacePath:t}});if(!i.success)return{success:!1,error:i.error||"Unknown error"};let n=i.registeredAs?r.replace(/@[^@]+$/,`@${i.registeredAs}`):r;return{success:!0,declaration:typeof e==="string"?n:{...e,source:n},...i.registeredAs&&{registeredAs:i.registeredAs}}}async function pU(e,t,r,i={}){if(r==="project")ya(t,e);else vu(t,e);let n=A6e(e),o;try{o=(await R6e(e)).mode}catch(a){if(a.code!=="ENOENT")throw a}let s=nn(n,`.${I6e(e)}.${P6e()}.tmp`);try{if(await zee(n,{recursive:!0}),await Yn(s,ze(t,{lineWidth:-1}),{encoding:"utf-8",flag:"wx",...o!==void 0&&{mode:o}}),o!==void 0)await C6e(s,o);await i.beforeRename?.(s,e),await _6e(s,e)}finally{await E6e(s,{force:!0}).catch(()=>{})}}function O6e(e,t){return e.length===t.length&&e.every((r,i)=>r===t[i])}function Gy(e,t,r,i){let n=e&&typeof e!=="string"?e:void 0,o=typeof t!=="string"?t:void 0,s={...n??{},...o??{},source:r};if(o?.clients!==void 0&&!O6e(o.clients,Qr([...i])))return s;let{clients:a,...c}=s;return Object.keys(c).length===1?r:c}async function Lee(e,t=process.cwd()){try{await _u(t);let r=nn(t,Z,ee),i=await rr(r);return i.clients=e,await Yn(r,ze(i,{lineWidth:-1}),"utf-8"),{success:!0}}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}}async function _u(e,t){let r=nn(e,Z),i=nn(r,ee);if(hi(i))return;let n={repositories:[],plugins:[],clients:t??[...Uee]};await zee(r,{recursive:!0}),await Yn(i,ze(n,{lineWidth:-1}),"utf-8")}async function Zy(e,t=process.cwd(),r){return Bee(e,t,r)}async function Cf(e,t=process.cwd(),r={}){return Bee(e.declaration,t,!0,e.clients,e.sourceValidation,r)}async function Bee(e,t,r,i,n="standard",o){let s=ae(e),a=nn(t,Z,ee),c=o!==void 0&&!hi(a)?{repositories:[],plugins:[],clients:i?[...i]:[...Uee]}:void 0;if(o===void 0)await _u(t);if(n==="declaration")return uU(e,a,void 0,r,o,c);if(Vt(s)){let l=await Cu(e,t);if(!l.success)return l;return uU(l.declaration,a,l.registeredAs,r,o,c)}if(ye(s)){let l=ws(s);if(!l.valid)return{success:!1,error:l.error||"Invalid GitHub URL"};let u=await r0(s);if(!u.exists)return{success:!1,error:u.error||`GitHub URL not found: ${s}`}}else{let l=nn(t,s);if(!hi(l)&&!hi(s))return{success:!1,error:`Plugin not found at ${s}`};if(Mc(l)||Mc(s))return{success:!1,error:`Plugin source cannot be a filesystem root directory: ${s}`}}return uU(e,a,void 0,r,o,c)}async function uU(e,t,r,i,n,o){try{let s=o??await rr(t),a=ae(e),c=s.plugins.findIndex((f)=>ae(f)===a);if(c!==-1&&!i)return{success:!1,error:`Plugin already exists in .allagents/workspace.yaml: ${a}`};let l=-1;if(n!==void 0||!i){let f=await qr(a);if(f)for(let m=0;m<s.plugins.length;m++){if(m===c)continue;let g=s.plugins[m];if(!g)continue;let h=ae(g);if(await qr(h)!==f)continue;if(!i)return{success:!1,error:`Plugin duplicates existing entry '${h}': both resolve to ${f}`};l=m;break}}let u=n!==void 0?c!==-1?c:l:c,p=i&&u!==-1;if(n!==void 0){let f=Gy(u===-1?void 0:s.plugins[u],e,a,s.clients);if(u===-1)s.plugins.push(f);else s.plugins[u]=f;await pU(t,s,"project",n)}else{if(p)s.plugins.splice(u,1);s.plugins.push(e),await Yn(t,ze(s,{lineWidth:-1}),"utf-8")}let d={success:!0,normalizedPlugin:a};if(r)d.autoRegistered=r;if(p)d.replaced=!0;return d}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function _f(e,t=process.cwd()){let r=nn(t,Z,ee);if(!hi(r))return!1;try{let i=await rr(r);if(i.plugins.some((n)=>ae(n)===e))return!0;if(!Vt(e))return i.plugins.some((n)=>{let o=ae(n);return o.startsWith(`${e}@`)||o===e});return!1}catch{return!1}}async function Ef(e,t=process.cwd(),r){let i=nn(t,Z,ee);if(!hi(i))return{success:!1,error:`${Z}/${ee} not found in ${t}
368
368
  Run 'allagents workspace init <path>' to create a new workspace`};try{let n=await rr(i);if(r!==void 0){let c=n.plugins[r];if(!c||ae(c)!==e)return{success:!1,error:"Selected plugin declaration changed. Reopen Plugins before removing."}}let o=r??n.plugins.findIndex((c)=>ae(c)===e);if(o===-1&&Vt(e)===!1)o=n.plugins.findIndex((c)=>{let l=ae(c);return l.startsWith(`${e}@`)||l===e});if(o===-1){let c=await qr(e);if(c)for(let l=0;l<n.plugins.length;l++){let u=n.plugins[l];if(!u)continue;if(await qr(ae(u))===c){o=l;break}}}if(o===-1)return{success:!1,error:`Plugin not found in .allagents/workspace.yaml: ${e}`};let s=ae(n.plugins[o]);if(n.plugins.splice(o,1),!n.plugins.some((c)=>ae(c)===s))Ky(n,s),Yy(n,s);let a=ze(n,{lineWidth:-1});return await Yn(i,a,"utf-8"),{success:!0}}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}function Ky(e,t){if(!e.disabledSkills?.length)return;let r=zc(t);if(r.length===0)return;let i=r.map((n)=>`${n}:`);if(e.disabledSkills=e.disabledSkills.filter((n)=>!i.some((o)=>n.startsWith(o))),e.disabledSkills.length===0)e.disabledSkills=void 0}function zc(e){if(Vt(e)){let i=vt(e);if(!i)return[];let n=[i.plugin];if(i.marketplaceName&&i.marketplaceName!==i.plugin)n.push(i.marketplaceName);return n}if(ye(e)){let i=me(e);if(i){let n=[],o=`${i.owner}-${i.repo}`;if(o!==i.repo)n.push(o);if(i.subpath){let s=i.subpath.split("/").filter(Boolean).pop();if(s&&!n.includes(s))n.push(s)}if(!n.includes(i.repo))n.push(i.repo);if(!n.includes(o))n.push(o);return n}}let t=e.split(/[/\\]/).filter(Boolean),r=t[t.length-1];if(!r)return[];return[r.replace(/\.git$/,"")]}function Jn(e,t){return e.plugins.findIndex((r)=>zc(ae(r)).includes(t))}function yi(e,t){let r=e.plugins[t];if(r===void 0)throw Error(`Plugin entry at index ${t} not found`);if(typeof r==="string"){let i={source:r};return e.plugins[t]=i,i}return r}function dU(e,t,r,i){let n=i??e.plugins.findIndex((a)=>ae(a)===t),o=e.plugins[n];if(!o||ae(o)!==t)return{success:!1,error:`Plugin '${t}' not found in workspace config`};let s=yi(e,n);if(r.length>0)s.mcpServers={exclude:[...new Set(r)]};else delete s.mcpServers;return{success:!0}}function D6e(e){let t=[],r=new Set;for(let i of e){if(r.has(i))continue;r.add(i),t.push(i)}return t}function T6e(e,t){let r=`${e.owner}/${e.repo}`;if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("github.com/")){let i=`https://github.com/${r}`;if(!e.branch)return i;return e.subpath?`${i}/tree/${e.branch}/${e.subpath}`:`${i}/tree/${e.branch}`}if(!e.branch)return e.subpath?`${r}/${e.subpath}`:r;return e.subpath?`${r}@${e.branch}/${e.subpath}`:`${r}@${e.branch}`}function N6e(e,t){let r=me(e),i=me(t);if(!r||!i)return t;if(r.owner.toLowerCase()!==i.owner.toLowerCase()||r.repo.toLowerCase()!==i.repo.toLowerCase())return t;if(r.branch&&i.branch&&r.branch!==i.branch)return e;let n=r.subpath?.split("/").filter(Boolean)??[],o=i.subpath?.split("/").filter(Boolean)??[],s=[],a=Math.min(n.length,o.length);for(let c=0;c<a;c++){if(n[c]!==o[c])break;s.push(n[c])}return T6e({owner:r.owner,repo:r.repo,...r.branch||i.branch?{branch:r.branch??i.branch}:{},...s.length>0?{subpath:s.join("/")}:{}},e)}async function M6e(e,t){let r=await qr(t);if(!r)return-1;for(let i=0;i<e.plugins.length;i++){let n=e.plugins[i];if(!n)continue;if(await qr(ae(n))===r)return i}return-1}async function fU(e,t,r){let i=D6e(r),n=e.plugins.findIndex((c)=>ae(c)===t);if(n!==-1){let c=yi(e,n);return c.source=t,c.skills=i,{success:!0,normalizedPlugin:t}}let o=await M6e(e,t);if(o===-1)return e.plugins.push({source:t,skills:i}),{success:!0,normalizedPlugin:t};let s=yi(e,o),a=N6e(s.source,t);return s.source=a,s.skills=i,{success:!0,normalizedPlugin:a}}function Pf(e){let t=e.indexOf(":");if(t===-1)return null;return{pluginName:e.slice(0,t),skillName:e.slice(t+1)}}async function qee(e,t=process.cwd()){let r=nn(t,Z,ee);if(!hi(r))return{success:!1,error:`${Z}/${ee} not found in ${t}`};let i=Pf(e);if(!i)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:n,skillName:o}=i;try{let s=await rr(r),a=Jn(s,n);if(a===-1)return{success:!1,error:`Plugin '${n}' not found in workspace config`};let c=yi(s,a);if(Array.isArray(c.skills))return{success:!1,error:`Plugin '${n}' is in allowlist mode; use removeEnabledSkill to disable a skill`};let l=c.skills?.exclude??[];if(l.includes(o))return{success:!1,error:`Skill '${e}' is already disabled`};return c.skills={exclude:[...l,o]},await Yn(r,ze(s,{lineWidth:-1}),"utf-8"),{success:!0}}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function Rf(e,t=process.cwd()){let r=nn(t,Z,ee);if(!hi(r))return{success:!1,error:`${Z}/${ee} not found in ${t}`};let i=Pf(e);if(!i)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:n,skillName:o}=i;try{let s=await rr(r),a=Jn(s,n);if(a===-1)return{success:!1,error:`Plugin '${n}' not found in workspace config`};let c=s.plugins[a];if(!c)return{success:!1,error:`Plugin '${n}' not found in workspace config`};if(typeof c==="string"||!c.skills||Array.isArray(c.skills))return{success:!1,error:`Skill '${e}' is already enabled`};if(!c.skills.exclude.includes(o))return{success:!1,error:`Skill '${e}' is already enabled`};let l=c.skills.exclude.filter((u)=>u!==o);return c.skills=l.length>0?{exclude:l}:void 0,await Yn(r,ze(s,{lineWidth:-1}),"utf-8"),{success:!0}}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function Sa(e,t=process.cwd()){let r=nn(t,Z,ee);if(!hi(r))return{success:!1,error:`${Z}/${ee} not found in ${t}`};let i=Pf(e);if(!i)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:n,skillName:o}=i;try{let s=await rr(r),a=Jn(s,n);if(a===-1)return{success:!1,error:`Plugin '${n}' not found in workspace config`};let c=yi(s,a);if(c.skills&&!Array.isArray(c.skills))return{success:!1,error:`Plugin '${n}' is in blocklist mode; use removeDisabledSkill to enable a skill`};let l=c.skills??[];if(l.includes(o))return{success:!1,error:`Skill '${e}' is already enabled`};return c.skills=[...l,o],await Yn(r,ze(s,{lineWidth:-1}),"utf-8"),{success:!0}}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function Vee(e,t=process.cwd()){let r=nn(t,Z,ee);if(!hi(r))return{success:!1,error:`${Z}/${ee} not found in ${t}`};let i=Pf(e);if(!i)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:n,skillName:o}=i;try{let s=await rr(r),a=Jn(s,n);if(a===-1)return{success:!1,error:`Plugin '${n}' not found in workspace config`};let c=s.plugins[a];if(!c)return{success:!1,error:`Plugin '${n}' not found in workspace config`};if(typeof c==="string"||!c.skills||!Array.isArray(c.skills))return{success:!1,error:`Skill '${e}' is already disabled`};if(!c.skills.includes(o))return{success:!1,error:`Skill '${e}' is already disabled`};let l=c.skills.filter((u)=>u!==o);return c.skills=l,await Yn(r,ze(s,{lineWidth:-1}),"utf-8"),{success:!0}}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function Uc(e,t,r,i=process.cwd()){let n=nn(i,Z,ee);if(!hi(n))return{success:!1,error:`${Z}/${ee} not found in ${i}`};try{let o=await rr(n),s=Jn(o,e);if(s===-1)return{success:!1,error:`Plugin '${e}' not found in workspace config`};let a=yi(o,s);if(t==="allowlist")a.skills=[...r];else a.skills=r.length>0?{exclude:[...r]}:void 0;return await Yn(n,ze(o,{lineWidth:-1}),"utf-8"),{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function Wee(e,t,r=process.cwd(),i){let n=nn(r,Z,ee);if(!hi(n))return{success:!1,error:`${Z}/${ee} not found in ${r}`};try{let o=await rr(n),s=dU(o,e,t,i);if(!s.success)return s;return await Yn(n,ze(o,{lineWidth:-1}),"utf-8"),s}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function Jy(e,t,r=process.cwd()){await _u(r);let i=nn(r,Z,ee);if(!hi(i))return{success:!1,error:`${Z}/${ee} not found in ${r}`};try{let n=await rr(i),o=await fU(n,e,t);if(!o.success)return o;return await Yn(i,ze(n,{lineWidth:-1}),"utf-8"),o}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}function Yy(e,t){if(!e.enabledSkills?.length)return;let r=zc(t);if(r.length===0)return;let i=r.map((n)=>`${n}:`);if(e.enabledSkills=e.enabledSkills.filter((n)=>!i.some((o)=>n.startsWith(o))),e.enabledSkills.length===0)e.enabledSkills=void 0}async function qr(e){if(ye(e)){let t=me(e);return t?`${t.owner}/${t.repo}`.toLowerCase():null}if(Vt(e)){let t=vt(e);if(!t)return null;let r=await Pu(t.marketplaceName);if(!r)return null;if(Fi(r))return null;let i=await sr(r.path);if(!i.success)return null;let n=i.data.plugins.find((s)=>s.name===t.plugin);if(!n||typeof n.source==="string")return null;let o=me(n.source.url);return o?`${o.owner}/${o.repo}`.toLowerCase():null}return null}async function y0(e){let t=nn(e,Z,ee);if(!hi(t))return;let r;try{r=await rr(t)}catch{return}if(!r||r.version!==void 0&&r.version>=2)return;let i=r.enabledSkills??[],n=r.disabledSkills??[],o=new Map;for(let a of i){let c=Pf(a);if(!c)continue;let l=o.get(c.pluginName)??[];l.push(c.skillName),o.set(c.pluginName,l)}let s=new Map;for(let a of n){let c=Pf(a);if(!c)continue;let l=s.get(c.pluginName)??[];l.push(c.skillName),s.set(c.pluginName,l)}for(let[a,c]of o){let l=Jn(r,a);if(l===-1){console.warn(`[migrate v1→v2] No plugin found for '${a}', skipping`);continue}let u=yi(r,l);u.skills=c}for(let[a,c]of s){let l=Jn(r,a);if(l===-1){console.warn(`[migrate v1→v2] No plugin found for '${a}', skipping`);continue}let u=yi(r,l);if(!Array.isArray(u.skills))u.skills={exclude:c}}r.enabledSkills=void 0,r.disabledSkills=void 0,r.version=2;try{await Yn(t,ze(r,{lineWidth:-1}),"utf-8")}catch(a){console.warn(`[migrate v1→v2] Failed to write migrated config: ${a instanceof Error?a.message:String(a)}`)}}async function Hee(e,t=process.cwd()){if(e.remove.length===0&&e.add.length===0)return{success:!0};let r=nn(t,Z,ee);try{let i=await rr(r),n=new Set(e.remove);return i.repositories=i.repositories.filter((o)=>!n.has(o.path)),i.repositories.push(...e.add),await Yn(r,ze(i,{lineWidth:-1}),"utf-8"),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}}async function Gee(e,t=process.cwd()){let r=nn(t,Z,ee);try{let i=await rr(r);return i.repositories=e,await Yn(r,ze(i,{lineWidth:-1}),"utf-8"),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}}var Uee;var vi=I(()=>{rs();nt();it();va();Lr();or();hn();Uee=["universal"]});var oU={};vn(oU,{addUserDisabledSkill:()=>yU,addUserEnabledSkill:()=>Ss,addUserPlugin:()=>If,addUserPluginDeclaration:()=>U6e,addUserPluginForTarget:()=>Eu,ensureUserWorkspace:()=>Xn,getInstalledProjectPlugins:()=>Du,getInstalledUserPlugins:()=>Ou,getUserDisabledSkills:()=>L6e,getUserEnabledSkills:()=>B6e,getUserPluginsForMarketplace:()=>gU,getUserWorkspaceConfig:()=>bt,getUserWorkspaceConfigPath:()=>yt,hasUserPlugin:()=>Ru,isUserConfigPath:()=>wt,migrateUserWorkspaceSkillsV1toV2:()=>bU,removeUserDisabledSkill:()=>Au,removeUserEnabledSkill:()=>vU,removeUserPlugin:()=>Iu,removeUserPluginsForMarketplace:()=>z6e,setUserClients:()=>hU,setUserPluginMcpServersExcluded:()=>wU,setUserPluginSkillsMode:()=>$a,upsertUserGitHubPluginSourceAllowlist:()=>Af});import{existsSync as Lc}from"node:fs";import{mkdir as j6e,readFile as F6e,writeFile as zi}from"node:fs/promises";import{join as mU,resolve as Zee}from"node:path";function yt(){return mU(ka(),ee)}function wt(e){let t=mU(e,Z,ee),r=yt();return Zee(t)===Zee(r)}async function Xn(e){let t=yt();if(Lc(t))return;let r={repositories:[],plugins:[],clients:e?[...e]:[...Kee]};await j6e(ka(),{recursive:!0}),await zi(t,ze(r,{lineWidth:-1}),"utf-8")}async function bt(){let e=yt();if(!Lc(e))return null;let t=await Cn(e);return Sx.parse(t)}async function If(e,t){return Jee(e,t)}async function Eu(e,t={}){return Jee(e.declaration,!0,e.clients,e.sourceValidation,t)}async function Jee(e,t,r,i="standard",n){let o=ae(e),s=yt(),a=n!==void 0&&!Lc(s)?{repositories:[],plugins:[],clients:r?[...r]:[...Kee]}:void 0;if(n===void 0)await Xn();if(i==="declaration")return v0(e,s,void 0,t,n,a);if(Vt(o)){let c=await Cu(e);if(!c.success)return c;return v0(c.declaration,s,c.registeredAs,t,n,a)}if(ye(o)){let c=ws(o);if(!c.valid)return{success:!1,error:c.error||"Invalid GitHub URL"};let l=await r0(o);if(!l.exists)return{success:!1,error:l.error||`GitHub URL not found: ${o}`}}else{if(!Lc(o))return{success:!1,error:`Plugin not found at ${o}`};if(Mc(o))return{success:!1,error:`Plugin source cannot be a filesystem root directory: ${o}`}}return v0(e,s,void 0,t,n,a)}async function Ru(e){let t=await bt();if(!t)return!1;if(t.plugins.some((r)=>ae(r)===e))return!0;return t.plugins.some((r)=>{let i=ae(r);return i.startsWith(`${e}@`)||i===e})}async function Iu(e,t){await Xn();let r=yt();try{let i=await Cn(r);if(t!==void 0){let s=i.plugins[t];if(!s||ae(s)!==e)return{success:!1,error:"Selected plugin declaration changed. Reopen Plugins before removing."}}let n=t??i.plugins.findIndex((s)=>ae(s)===e);if(n===-1)n=i.plugins.findIndex((s)=>{let a=ae(s);return a.startsWith(`${e}@`)||a===e});if(n===-1){let s=await qr(e);if(s)for(let a=0;a<i.plugins.length;a++){let c=i.plugins[a];if(!c)continue;if(await qr(ae(c))===s){n=a;break}}}if(n===-1)return{success:!1,error:`Plugin not found in user config: ${e}`};let o=ae(i.plugins[n]);if(i.plugins.splice(n,1),!i.plugins.some((s)=>ae(s)===o))Ky(i,o),Yy(i,o);return await zi(r,ze(i,{lineWidth:-1}),"utf-8"),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}}async function gU(e){let t=await bt();if(!t)return[];return t.plugins.map((r)=>ae(r)).filter((r)=>vt(r)?.marketplaceName===e)}async function z6e(e){let t=yt();if(!Lc(t))return[];let r=await Cn(t),i=r.plugins.filter((n)=>vt(ae(n))?.marketplaceName===e);if(i.length===0)return[];return r.plugins=r.plugins.filter((n)=>!i.includes(n)),await zi(t,ze(r,{lineWidth:-1}),"utf-8"),i.map((n)=>ae(n))}async function v0(e,t,r,i,n,o){try{let s=o??await Cn(t),a=ae(e),c=s.plugins.findIndex((d)=>ae(d)===a);if(c!==-1&&!i)return{success:!1,error:`Plugin already exists in user config: ${a}`};let l=-1,u=await qr(a);if(u)for(let d=0;d<s.plugins.length;d++){if(d===c)continue;let f=s.plugins[d];if(!f)continue;if(await qr(ae(f))===u){l=d;break}}if(l!==-1&&!i)return{success:!1,error:`Plugin duplicates existing entry '${ae(s.plugins[l])}': both resolve to ${u}`};let p=-1;if(n!==void 0){p=c!==-1?c:l;let d=Gy(p===-1?void 0:s.plugins[p],e,a,s.clients);if(p===-1)s.plugins.push(d);else s.plugins[p]=d;await pU(t,s,"user",n)}else{if(c!==-1)s.plugins.splice(c,1);let d=c!==-1&&l>c?l-1:l;if(d!==-1)s.plugins.splice(d,1);s.plugins.push(e),await zi(t,ze(s,{lineWidth:-1}),"utf-8")}return{success:!0,...r&&{autoRegistered:r},normalizedPlugin:a,...i&&{replaced:n!==void 0?p!==-1:c!==-1}}}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}}async function U6e(e,t){return await Xn(),v0(e,yt(),void 0,t)}async function hU(e){await Xn();let t=yt();try{let r=await Cn(t);return r.clients=e,await zi(t,ze(r,{lineWidth:-1}),"utf-8"),{success:!0}}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}}function w0(e){let t=e.indexOf(":");if(t===-1)return null;return{pluginName:e.slice(0,t),skillName:e.slice(t+1)}}async function L6e(){let e=await bt();if(!e)return[];let t=[];for(let r of e.plugins){if(typeof r==="string"||!r.skills||Array.isArray(r.skills))continue;let i=zc(ae(r))[0];if(!i)continue;for(let n of r.skills.exclude)t.push(`${i}:${n}`)}for(let r of e.disabledSkills??[])if(!t.includes(r))t.push(r);return t}async function yU(e){await Xn();let t=yt(),r=w0(e);if(!r)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:i,skillName:n}=r;try{let o=await Cn(t),s=Jn(o,i);if(s===-1)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};let a=yi(o,s);if(Array.isArray(a.skills))return{success:!1,error:`Plugin '${i}' is in allowlist mode; use removeUserEnabledSkill to disable a skill`};let c=a.skills?.exclude??[];if(c.includes(n))return{success:!1,error:`Skill '${e}' is already disabled`};return a.skills={exclude:[...c,n]},await zi(t,ze(o,{lineWidth:-1}),"utf-8"),{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function Au(e){await Xn();let t=yt(),r=w0(e);if(!r)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:i,skillName:n}=r;try{let o=await Cn(t),s=Jn(o,i);if(s===-1)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};let a=o.plugins[s];if(!a)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};if(typeof a==="string"||!a.skills||Array.isArray(a.skills))return{success:!1,error:`Skill '${e}' is already enabled`};if(!a.skills.exclude.includes(n))return{success:!1,error:`Skill '${e}' is already enabled`};let c=a.skills.exclude.filter((l)=>l!==n);return a.skills=c.length>0?{exclude:c}:void 0,await zi(t,ze(o,{lineWidth:-1}),"utf-8"),{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function B6e(){let e=await bt();if(!e)return[];let t=[];for(let r of e.plugins){if(typeof r==="string"||!Array.isArray(r.skills))continue;let i=zc(ae(r))[0];if(!i)continue;for(let n of r.skills)t.push(`${i}:${n}`)}for(let r of e.enabledSkills??[])if(!t.includes(r))t.push(r);return t}async function Ss(e){await Xn();let t=yt(),r=w0(e);if(!r)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:i,skillName:n}=r;try{let o=await Cn(t),s=Jn(o,i);if(s===-1)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};let a=yi(o,s);if(a.skills&&!Array.isArray(a.skills))return{success:!1,error:`Plugin '${i}' is in blocklist mode; use removeUserDisabledSkill to enable a skill`};let c=a.skills??[];if(c.includes(n))return{success:!1,error:`Skill '${e}' is already enabled`};return a.skills=[...c,n],await zi(t,ze(o,{lineWidth:-1}),"utf-8"),{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function vU(e){await Xn();let t=yt(),r=w0(e);if(!r)return{success:!1,error:`Invalid skill key format: '${e}' (expected pluginName:skillName)`};let{pluginName:i,skillName:n}=r;try{let o=await Cn(t),s=Jn(o,i);if(s===-1)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};let a=o.plugins[s];if(!a)return{success:!1,error:`Plugin '${i}' not found in user workspace config`};if(typeof a==="string"||!a.skills||!Array.isArray(a.skills))return{success:!1,error:`Skill '${e}' is already disabled`};if(!a.skills.includes(n))return{success:!1,error:`Skill '${e}' is already disabled`};let c=a.skills.filter((l)=>l!==n);return a.skills=c,await zi(t,ze(o,{lineWidth:-1}),"utf-8"),{success:!0}}catch(o){return{success:!1,error:o instanceof Error?o.message:String(o)}}}async function $a(e,t,r){await Xn();let i=yt();try{let n=await Cn(i),o=Jn(n,e);if(o===-1)return{success:!1,error:`Plugin '${e}' not found in user workspace config`};let s=yi(n,o);if(t==="allowlist")s.skills=[...r];else s.skills=r.length>0?{exclude:[...r]}:void 0;return await zi(i,ze(n,{lineWidth:-1}),"utf-8"),{success:!0}}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}async function wU(e,t,r){let i=yt();if(!Lc(i))return{success:!1,error:`Plugin '${e}' not found in user workspace config`};try{let n=await Cn(i),o=dU(n,e,t,r);if(!o.success)return o;return await zi(i,ze(n,{lineWidth:-1}),"utf-8"),o}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}async function Af(e,t){await Xn();let r=yt();try{let i=await Cn(r),n=await fU(i,e,t);if(!n.success)return n;return await zi(r,ze(i,{lineWidth:-1}),"utf-8"),n}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}}function Yee(e,t){let r=ae(e),i=mi(e),n=Vt(r)?vt(r):null;if(n)return{spec:r,effectiveSpec:i,name:n.plugin,marketplace:n.marketplaceName,scope:t};return{spec:r,effectiveSpec:i,name:Fy(r),marketplace:"",scope:t}}async function Ou(){let e=await bt();if(!e)return[];let t=[];for(let r of e.plugins)t.push(Yee(r,"user"));return t}async function Du(e){if(wt(e))return[];let t=mU(e,Z,ee);if(!Lc(t))return[];try{let r=await F6e(t,"utf-8"),i=Oi(r),n=[];for(let o of i.plugins)n.push(Yee(o,"project"));return n}catch{return[]}}async function bU(){let e=yt();if(!Lc(e))return;let t=await Cn(e);if(!t||t.version!==void 0&&t.version>=2)return;let r=t.enabledSkills??[],i=t.disabledSkills??[],n=new Map;for(let s of r){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a),l=s.slice(a+1),u=n.get(c)??[];u.push(l),n.set(c,u)}let o=new Map;for(let s of i){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a),l=s.slice(a+1),u=o.get(c)??[];u.push(l),o.set(c,u)}for(let[s,a]of n){let c=Jn(t,s);if(c===-1){console.warn(`[migrate v1→v2] No user plugin found for '${s}', skipping`);continue}let l=yi(t,c);l.skills=a}for(let[s,a]of o){let c=Jn(t,s);if(c===-1){console.warn(`[migrate v1→v2] No user plugin found for '${s}', skipping`);continue}let l=yi(t,c);if(!Array.isArray(l.skills))l.skills={exclude:a}}t.enabledSkills=void 0,t.disabledSkills=void 0,t.version=2;try{await zi(e,ze(t,{lineWidth:-1}),"utf-8")}catch(s){console.warn(`[migrate v1→v2] Failed to write migrated user config: ${s instanceof Error?s.message:String(s)}`)}}var Kee;var Ir=I(()=>{rs();nt();it();or();cf();hn();hn();vi();Lr();Kee=["copilot","codex","cursor","opencode","gemini","vscode"]});import{randomUUID as tte}from"node:crypto";import{existsSync as b0}from"node:fs";import{lstat as kU,mkdir as Xee,readFile as q6e,rename as V6e,rm as Xy,writeFile as rte}from"node:fs/promises";import{basename as W6e,dirname as H6e,join as k0,resolve as Qee}from"node:path";function Qy(e){switch(e.kind){case"project":return"workspace.yaml";case"user":return"the user workspace";case"profile":return`profile '${e.name}'`}}async function Z6e(e){return q6e(k0(e,"owner"),"utf8").catch(()=>null)}async function nte(e,t){let r=`${e}.lock`,i=`${r}.break`,n=`${process.pid}:${tte()}`,o=Date.now()+G6e,s=!1;while(!s){let a=!1;try{await Xee(r,{mode:448}),a=!0,await rte(k0(r,"owner"),n,{encoding:"utf8",mode:384}),s=!0}catch(c){if(a)await Xy(r,{recursive:!0,force:!0}).catch(()=>{return});if(c.code!=="EEXIST")throw c;let l=await kU(r).catch(()=>null);if(l&&Date.now()-l.mtimeMs>ete){let u=!1;try{await Xee(i,{mode:448}),u=!0;let p=await kU(r).catch(()=>null);if(p&&Date.now()-p.mtimeMs>ete)await Xy(r,{recursive:!0,force:!0})}catch(p){if(p.code!=="EEXIST")throw p}finally{if(u)await Xy(i,{recursive:!0,force:!0}).catch(()=>{return})}if(Date.now()>=o)throw Error(`Timed out waiting to update ${e}`);await new Promise((p)=>setTimeout(p,25));continue}if(Date.now()>=o)throw Error(`Timed out waiting to update ${e}`);await new Promise((u)=>setTimeout(u,25))}}try{return await t()}finally{if(await Z6e(r)===n)await Xy(r,{recursive:!0,force:!0}).catch(()=>{return})}}function K6e(e){return k0(e,Z,ee)}function ite(e){let t=zt.safeParse(e);if(!t.success){let r=t.error.issues[0]?.message??"Invalid portable profile name";throw Error(`Invalid profile name '${e}': ${r}`)}return t.data}function S0(e){if(e.kind==="profile")ite(e.name)}function ev(e={}){if(e.scope!==void 0&&e.profile!==void 0)throw Error("--scope and --profile cannot be used together");if(e.scope!==void 0&&e.scope!=="project"&&e.scope!=="user")throw Error(`Invalid MCP scope '${String(e.scope)}'`);if(e.profile!==void 0)return{kind:"profile",name:ite(e.profile),configPath:yt()};if(e.scope==="user")return{kind:"user",configPath:yt()};let t=e.cwd??process.cwd();if(wt(t)){if(e.scope==="project")throw Error("--scope project cannot be used from the home directory because it aliases the user workspace; run from a project directory or use --scope user");return{kind:"user",configPath:yt()}}return{kind:"project",workspacePath:t,configPath:K6e(t)}}async function $0(e){return e.kind==="project"?rr(e.configPath):fX(e.configPath)}function x0(e,t){if(e.kind!=="profile")return t;let r=t.profiles?.[e.name];if(!r)throw Error(`Profile '${e.name}' is not declared`);return r}async function ote(e,t){if(e.kind==="project")ya(t,e.configPath);else vu(t,e.configPath);let r=await kU(e.configPath).catch((o)=>{if(o.code==="ENOENT")return null;throw o});if(r?.isSymbolicLink())throw Error(`Refusing to replace symbolic-link workspace config: ${e.configPath}`);if(r&&!r.isFile())throw Error(`Workspace config is not a regular file: ${e.configPath}`);let i=r?.mode??(e.kind==="project"?420:384),n=k0(H6e(e.configPath),`.${W6e(e.configPath)}.${process.pid}.${tte()}.tmp`);try{await rte(n,ze(t,{lineWidth:-1}),{encoding:"utf-8",mode:i}),await V6e(n,e.configPath)}finally{await Xy(n,{force:!0}).catch(()=>{return})}}async function J6e(e){if(e.kind==="project")await _u(e.workspacePath);else if(e.kind==="user"&&!b0(e.configPath)&&Qee(e.configPath)===Qee(yt()))await Xn()}function ste(e,t){let r=e.mcpProxy;if(!r)return;if(r.servers){if(delete r.servers[t],Object.keys(r.servers).length===0)delete r.servers}if((r.clients?.length??0)===0&&!r.servers)delete e.mcpProxy}function Y6e(e,t,r){if(r===void 0)return;if(r===!1){ste(e,t);return}let i=[...new Set(r.clients??["*"])];e.mcpProxy??={},e.mcpProxy.servers??={},e.mcpProxy.servers[t]={proxy:i}}function X6e(e,t){let r=e.kind==="profile"?Ai.safeParse(t):sz.safeParse(t);if(!r.success)return{valid:!1,error:`Invalid MCP server config:
369
369
  ${ha(r.error).map((n)=>` - ${n.path.join(".")}: ${n.message}`).join(`
370
- `)}`};return{valid:!0,data:r.data}}async function ate(e,t,r,i={}){try{S0(e);let n=X6e(e,r);if(!n.valid)return{success:!1,error:n.error};return await J6e(e),await nte(e.configPath,async()=>{let o=await $0(e),s=x0(e,o);if(s.mcpServers??={},s.mcpServers[t]&&!i.force)return{success:!1,error:`MCP server '${t}' already exists in workspace.yaml. Pass --force to replace it.`};return s.mcpServers[t]=n.data,Y6e(s,t,i.proxy),await ote(e,o),{success:!0,config:n.data}})}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}async function cte(e,t){try{if(S0(e),!b0(e.configPath))return{success:!1,error:`${Z}/${ee} not found`};return await nte(e.configPath,async()=>{let r=await $0(e),i=x0(e,r);if(!i.mcpServers||!(t in i.mcpServers))return{success:!1,error:`MCP server '${t}' not found in workspace.yaml`};if(delete i.mcpServers[t],Object.keys(i.mcpServers).length===0)delete i.mcpServers;return ste(i,t),await ote(e,r),{success:!0}})}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}}async function Tu(e,t){if(S0(e),!b0(e.configPath)){if(e.kind==="profile")throw Error(`Profile '${e.name}' is not declared`);return null}let r=await $0(e);return x0(e,r).mcpServers?.[t]??null}async function lte(e){if(S0(e),!b0(e.configPath)){if(e.kind==="profile")throw Error(`Profile '${e.name}' is not declared`);return{}}let t=await $0(e);return x0(e,t).mcpServers??{}}function ute(e){let{commandOrUrl:t,args:r,env:i,headers:n,clients:o}=e;if((e.transport??(/^https?:\/\//i.test(t)?"http":"stdio"))==="http"){if(!/^https?:\/\//i.test(t))return{error:`HTTP transport requires a URL starting with http:// or https:// (got '${t}')`};if(r&&r.length>0)return{error:"--arg is not supported for HTTP transport"};if(i&&Object.keys(i).length>0)return{error:"-e/--env is not supported for HTTP transport"};return{config:{type:"http",url:t,...n&&Object.keys(n).length>0&&{headers:n},...o&&o.length>0&&{clients:o}}}}if(e.transport==="stdio"&&/^https?:\/\//i.test(t))return{error:`stdio transport requires a command, not a URL (got '${t}')`};if(n&&Object.keys(n).length>0)return{error:"--header is not supported for stdio transport"};return{config:{type:"stdio",command:t,...r&&r.length>0&&{args:r},...i&&Object.keys(i).length>0&&{env:i},...o&&o.length>0&&{clients:o}}}}function tv(e,t){let r={};for(let i of e){let n=i.indexOf("=");if(n<=0)return{error:`Invalid ${t}: '${i}' (expected KEY=VALUE)`};let o=i.slice(0,n),s=i.slice(n+1);r[o]=s}return{values:r}}var G6e=5000,ete=30000;var rv=I(()=>{rs();nt();it();Lr();lf();Ir();vi()});var pte=F(function(Q6e,P0){Q6e.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Q6e.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;Q6e.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var $U=F(function(Zxt,dte){var SU=pte();dte.exports={isSpaceSeparator(e){return typeof e==="string"&&SU.Space_Separator.test(e)},isIdStartChar(e){return typeof e==="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||SU.ID_Start.test(e))},isIdContinueChar(e){return typeof e==="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||SU.ID_Continue.test(e))},isDigit(e){return typeof e==="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e==="string"&&/[0-9A-Fa-f]/.test(e)}}});var yte=F(function(Kxt,hte){var on=$U(),PU,Qn,Pa,_0,Bc,qo,sn,EU,iv;hte.exports=function(t,r){PU=String(t),Qn="start",Pa=[],_0=0,Bc=1,qo=0,sn=void 0,EU=void 0,iv=void 0;do sn=nBe(),sBe[Qn]();while(sn.type!=="eof");if(typeof r==="function")return CU({"":iv},"",r);return iv};function CU(e,t,r){let i=e[t];if(i!=null&&typeof i==="object")if(Array.isArray(i))for(let n=0;n<i.length;n++){let o=String(n),s=CU(i,o,r);if(s===void 0)delete i[o];else Object.defineProperty(i,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(let n in i){let o=CU(i,n,r);if(o===void 0)delete i[n];else Object.defineProperty(i,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,i)}var Qe,Ve,nv,xa,st;function nBe(){Qe="default",Ve="",nv=!1,xa=1;for(;;){st=Ca();let e=mte[Qe]();if(e)return e}}function Ca(){if(PU[_0])return String.fromCodePoint(PU.codePointAt(_0))}function G(){let e=Ca();if(e===`
370
+ `)}`};return{valid:!0,data:r.data}}async function ate(e,t,r,i={}){try{S0(e);let n=X6e(e,r);if(!n.valid)return{success:!1,error:n.error};return await J6e(e),await nte(e.configPath,async()=>{let o=await $0(e),s=x0(e,o);if(s.mcpServers??={},s.mcpServers[t]&&!i.force)return{success:!1,error:`MCP server '${t}' already exists in workspace.yaml. Pass --force to replace it.`};return s.mcpServers[t]=n.data,Y6e(s,t,i.proxy),await ote(e,o),{success:!0,config:n.data}})}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}async function cte(e,t){try{if(S0(e),!b0(e.configPath))return{success:!1,error:`${Z}/${ee} not found`};return await nte(e.configPath,async()=>{let r=await $0(e),i=x0(e,r);if(!i.mcpServers||!(t in i.mcpServers))return{success:!1,error:`MCP server '${t}' not found in workspace.yaml`};if(delete i.mcpServers[t],Object.keys(i.mcpServers).length===0)delete i.mcpServers;return ste(i,t),await ote(e,r),{success:!0}})}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}}async function Tu(e,t){if(S0(e),!b0(e.configPath)){if(e.kind==="profile")throw Error(`Profile '${e.name}' is not declared`);return null}let r=await $0(e);return x0(e,r).mcpServers?.[t]??null}async function lte(e){if(S0(e),!b0(e.configPath)){if(e.kind==="profile")throw Error(`Profile '${e.name}' is not declared`);return{}}let t=await $0(e);return x0(e,t).mcpServers??{}}function ute(e){let{commandOrUrl:t,args:r,env:i,headers:n,clients:o}=e;if((e.transport??(/^https?:\/\//i.test(t)?"http":"stdio"))==="http"){if(!/^https?:\/\//i.test(t))return{error:`HTTP transport requires a URL starting with http:// or https:// (got '${t}')`};if(r&&r.length>0)return{error:"--arg is not supported for HTTP transport"};if(i&&Object.keys(i).length>0)return{error:"-e/--env is not supported for HTTP transport"};return{config:{type:"http",url:t,...n&&Object.keys(n).length>0&&{headers:n},...o&&o.length>0&&{clients:o}}}}if(e.transport==="stdio"&&/^https?:\/\//i.test(t))return{error:`stdio transport requires a command, not a URL (got '${t}')`};if(n&&Object.keys(n).length>0)return{error:"--header is not supported for stdio transport"};return{config:{type:"stdio",command:t,...r&&r.length>0&&{args:r},...i&&Object.keys(i).length>0&&{env:i},...o&&o.length>0&&{clients:o}}}}function tv(e,t){let r={};for(let i of e){let n=i.indexOf("=");if(n<=0)return{error:`Invalid ${t}: '${i}' (expected KEY=VALUE)`};let o=i.slice(0,n),s=i.slice(n+1);r[o]=s}return{values:r}}var G6e=5000,ete=30000;var rv=I(()=>{rs();nt();it();Lr();lf();Ir();vi()});var pte=F(function(Q6e,P0){Q6e.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Q6e.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;Q6e.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var $U=F(function(Zxt,dte){var SU=pte();dte.exports={isSpaceSeparator(e){return typeof e==="string"&&SU.Space_Separator.test(e)},isIdStartChar(e){return typeof e==="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||SU.ID_Start.test(e))},isIdContinueChar(e){return typeof e==="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||SU.ID_Continue.test(e))},isDigit(e){return typeof e==="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e==="string"&&/[0-9A-Fa-f]/.test(e)}}});var yte=F(function(Kxt,hte){var on=$U(),PU,Qn,Pa,_0,Bc,qo,sn,EU,iv;hte.exports=function(t,r){PU=String(t),Qn="start",Pa=[],_0=0,Bc=1,qo=0,sn=void 0,EU=void 0,iv=void 0;do sn=nBe(),sBe[Qn]();while(sn.type!=="eof");if(typeof r==="function")return CU({"":iv},"",r);return iv};function CU(e,t,r){let i=e[t];if(i!=null&&typeof i==="object")if(Array.isArray(i))for(let n=0;n<i.length;n++){let o=String(n),s=CU(i,o,r);if(s===void 0)delete i[o];else Object.defineProperty(i,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(let n in i){let o=CU(i,n,r);if(o===void 0)delete i[n];else Object.defineProperty(i,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,i)}var Qe,We,nv,xa,st;function nBe(){Qe="default",We="",nv=!1,xa=1;for(;;){st=Ca();let e=mte[Qe]();if(e)return e}}function Ca(){if(PU[_0])return String.fromCodePoint(PU.codePointAt(_0))}function G(){let e=Ca();if(e===`
371
371
  `)Bc++,qo=0;else if(e)qo+=e.length;else qo++;if(e)_0+=e.length;return e}var mte={default(){switch(st){case"\t":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
372
372
  `:case"\r":case"\u2028":case"\u2029":G();return;case"/":G(),Qe="comment";return;case void 0:return G(),Gt("eof")}if(on.isSpaceSeparator(st)){G();return}return mte[Qn]()},comment(){switch(st){case"*":G(),Qe="multiLineComment";return;case"/":G(),Qe="singleLineComment";return}throw Zt(G())},multiLineComment(){switch(st){case"*":G(),Qe="multiLineCommentAsterisk";return;case void 0:throw Zt(G())}G()},multiLineCommentAsterisk(){switch(st){case"*":G();return;case"/":G(),Qe="default";return;case void 0:throw Zt(G())}G(),Qe="multiLineComment"},singleLineComment(){switch(st){case`
373
- `:case"\r":case"\u2028":case"\u2029":G(),Qe="default";return;case void 0:return G(),Gt("eof")}G()},value(){switch(st){case"{":case"[":return Gt("punctuator",G());case"n":return G(),Nu("ull"),Gt("null",null);case"t":return G(),Nu("rue"),Gt("boolean",!0);case"f":return G(),Nu("alse"),Gt("boolean",!1);case"-":case"+":if(G()==="-")xa=-1;Qe="sign";return;case".":Ve=G(),Qe="decimalPointLeading";return;case"0":Ve=G(),Qe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Ve=G(),Qe="decimalInteger";return;case"I":return G(),Nu("nfinity"),Gt("numeric",1/0);case"N":return G(),Nu("aN"),Gt("numeric",NaN);case'"':case"'":nv=G()==='"',Ve="",Qe="string";return}throw Zt(G())},identifierNameStartEscape(){if(st!=="u")throw Zt(G());G();let e=_U();switch(e){case"$":case"_":break;default:if(!on.isIdStartChar(e))throw fte();break}Ve+=e,Qe="identifierName"},identifierName(){switch(st){case"$":case"_":case"‌":case"‍":Ve+=G();return;case"\\":G(),Qe="identifierNameEscape";return}if(on.isIdContinueChar(st)){Ve+=G();return}return Gt("identifier",Ve)},identifierNameEscape(){if(st!=="u")throw Zt(G());G();let e=_U();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!on.isIdContinueChar(e))throw fte();break}Ve+=e,Qe="identifierName"},sign(){switch(st){case".":Ve=G(),Qe="decimalPointLeading";return;case"0":Ve=G(),Qe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Ve=G(),Qe="decimalInteger";return;case"I":return G(),Nu("nfinity"),Gt("numeric",xa*(1/0));case"N":return G(),Nu("aN"),Gt("numeric",NaN)}throw Zt(G())},zero(){switch(st){case".":Ve+=G(),Qe="decimalPoint";return;case"e":case"E":Ve+=G(),Qe="decimalExponent";return;case"x":case"X":Ve+=G(),Qe="hexadecimal";return}return Gt("numeric",xa*0)},decimalInteger(){switch(st){case".":Ve+=G(),Qe="decimalPoint";return;case"e":case"E":Ve+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){Ve+=G();return}return Gt("numeric",xa*Number(Ve))},decimalPointLeading(){if(on.isDigit(st)){Ve+=G(),Qe="decimalFraction";return}throw Zt(G())},decimalPoint(){switch(st){case"e":case"E":Ve+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){Ve+=G(),Qe="decimalFraction";return}return Gt("numeric",xa*Number(Ve))},decimalFraction(){switch(st){case"e":case"E":Ve+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){Ve+=G();return}return Gt("numeric",xa*Number(Ve))},decimalExponent(){switch(st){case"+":case"-":Ve+=G(),Qe="decimalExponentSign";return}if(on.isDigit(st)){Ve+=G(),Qe="decimalExponentInteger";return}throw Zt(G())},decimalExponentSign(){if(on.isDigit(st)){Ve+=G(),Qe="decimalExponentInteger";return}throw Zt(G())},decimalExponentInteger(){if(on.isDigit(st)){Ve+=G();return}return Gt("numeric",xa*Number(Ve))},hexadecimal(){if(on.isHexDigit(st)){Ve+=G(),Qe="hexadecimalInteger";return}throw Zt(G())},hexadecimalInteger(){if(on.isHexDigit(st)){Ve+=G();return}return Gt("numeric",xa*Number(Ve))},string(){switch(st){case"\\":G(),Ve+=iBe();return;case'"':if(nv)return G(),Gt("string",Ve);Ve+=G();return;case"'":if(!nv)return G(),Gt("string",Ve);Ve+=G();return;case`
374
- `:case"\r":throw Zt(G());case"\u2028":case"\u2029":aBe(st);break;case void 0:throw Zt(G())}Ve+=G()},start(){switch(st){case"{":case"[":return Gt("punctuator",G())}Qe="value"},beforePropertyName(){switch(st){case"$":case"_":Ve=G(),Qe="identifierName";return;case"\\":G(),Qe="identifierNameStartEscape";return;case"}":return Gt("punctuator",G());case'"':case"'":nv=G()==='"',Qe="string";return}if(on.isIdStartChar(st)){Ve+=G(),Qe="identifierName";return}throw Zt(G())},afterPropertyName(){if(st===":")return Gt("punctuator",G());throw Zt(G())},beforePropertyValue(){Qe="value"},afterPropertyValue(){switch(st){case",":case"}":return Gt("punctuator",G())}throw Zt(G())},beforeArrayValue(){if(st==="]")return Gt("punctuator",G());Qe="value"},afterArrayValue(){switch(st){case",":case"]":return Gt("punctuator",G())}throw Zt(G())},end(){throw Zt(G())}};function Gt(e,t){return{type:e,value:t,line:Bc,column:qo}}function Nu(e){for(let t of e){if(Ca()!==t)throw Zt(G());G()}}function iBe(){switch(Ca()){case"b":return G(),"\b";case"f":return G(),"\f";case"n":return G(),`
373
+ `:case"\r":case"\u2028":case"\u2029":G(),Qe="default";return;case void 0:return G(),Gt("eof")}G()},value(){switch(st){case"{":case"[":return Gt("punctuator",G());case"n":return G(),Nu("ull"),Gt("null",null);case"t":return G(),Nu("rue"),Gt("boolean",!0);case"f":return G(),Nu("alse"),Gt("boolean",!1);case"-":case"+":if(G()==="-")xa=-1;Qe="sign";return;case".":We=G(),Qe="decimalPointLeading";return;case"0":We=G(),Qe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":We=G(),Qe="decimalInteger";return;case"I":return G(),Nu("nfinity"),Gt("numeric",1/0);case"N":return G(),Nu("aN"),Gt("numeric",NaN);case'"':case"'":nv=G()==='"',We="",Qe="string";return}throw Zt(G())},identifierNameStartEscape(){if(st!=="u")throw Zt(G());G();let e=_U();switch(e){case"$":case"_":break;default:if(!on.isIdStartChar(e))throw fte();break}We+=e,Qe="identifierName"},identifierName(){switch(st){case"$":case"_":case"‌":case"‍":We+=G();return;case"\\":G(),Qe="identifierNameEscape";return}if(on.isIdContinueChar(st)){We+=G();return}return Gt("identifier",We)},identifierNameEscape(){if(st!=="u")throw Zt(G());G();let e=_U();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!on.isIdContinueChar(e))throw fte();break}We+=e,Qe="identifierName"},sign(){switch(st){case".":We=G(),Qe="decimalPointLeading";return;case"0":We=G(),Qe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":We=G(),Qe="decimalInteger";return;case"I":return G(),Nu("nfinity"),Gt("numeric",xa*(1/0));case"N":return G(),Nu("aN"),Gt("numeric",NaN)}throw Zt(G())},zero(){switch(st){case".":We+=G(),Qe="decimalPoint";return;case"e":case"E":We+=G(),Qe="decimalExponent";return;case"x":case"X":We+=G(),Qe="hexadecimal";return}return Gt("numeric",xa*0)},decimalInteger(){switch(st){case".":We+=G(),Qe="decimalPoint";return;case"e":case"E":We+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){We+=G();return}return Gt("numeric",xa*Number(We))},decimalPointLeading(){if(on.isDigit(st)){We+=G(),Qe="decimalFraction";return}throw Zt(G())},decimalPoint(){switch(st){case"e":case"E":We+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){We+=G(),Qe="decimalFraction";return}return Gt("numeric",xa*Number(We))},decimalFraction(){switch(st){case"e":case"E":We+=G(),Qe="decimalExponent";return}if(on.isDigit(st)){We+=G();return}return Gt("numeric",xa*Number(We))},decimalExponent(){switch(st){case"+":case"-":We+=G(),Qe="decimalExponentSign";return}if(on.isDigit(st)){We+=G(),Qe="decimalExponentInteger";return}throw Zt(G())},decimalExponentSign(){if(on.isDigit(st)){We+=G(),Qe="decimalExponentInteger";return}throw Zt(G())},decimalExponentInteger(){if(on.isDigit(st)){We+=G();return}return Gt("numeric",xa*Number(We))},hexadecimal(){if(on.isHexDigit(st)){We+=G(),Qe="hexadecimalInteger";return}throw Zt(G())},hexadecimalInteger(){if(on.isHexDigit(st)){We+=G();return}return Gt("numeric",xa*Number(We))},string(){switch(st){case"\\":G(),We+=iBe();return;case'"':if(nv)return G(),Gt("string",We);We+=G();return;case"'":if(!nv)return G(),Gt("string",We);We+=G();return;case`
374
+ `:case"\r":throw Zt(G());case"\u2028":case"\u2029":aBe(st);break;case void 0:throw Zt(G())}We+=G()},start(){switch(st){case"{":case"[":return Gt("punctuator",G())}Qe="value"},beforePropertyName(){switch(st){case"$":case"_":We=G(),Qe="identifierName";return;case"\\":G(),Qe="identifierNameStartEscape";return;case"}":return Gt("punctuator",G());case'"':case"'":nv=G()==='"',Qe="string";return}if(on.isIdStartChar(st)){We+=G(),Qe="identifierName";return}throw Zt(G())},afterPropertyName(){if(st===":")return Gt("punctuator",G());throw Zt(G())},beforePropertyValue(){Qe="value"},afterPropertyValue(){switch(st){case",":case"}":return Gt("punctuator",G())}throw Zt(G())},beforeArrayValue(){if(st==="]")return Gt("punctuator",G());Qe="value"},afterArrayValue(){switch(st){case",":case"]":return Gt("punctuator",G())}throw Zt(G())},end(){throw Zt(G())}};function Gt(e,t){return{type:e,value:t,line:Bc,column:qo}}function Nu(e){for(let t of e){if(Ca()!==t)throw Zt(G());G()}}function iBe(){switch(Ca()){case"b":return G(),"\b";case"f":return G(),"\f";case"n":return G(),`
375
375
  `;case"r":return G(),"\r";case"t":return G(),"\t";case"v":return G(),"\v";case"0":if(G(),on.isDigit(Ca()))throw Zt(G());return"\x00";case"x":return G(),oBe();case"u":return G(),_U();case`
376
376
  `:case"\u2028":case"\u2029":return G(),"";case"\r":if(G(),Ca()===`
377
377
  `)G();return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Zt(G());case void 0:throw Zt(G())}return G()}function oBe(){let e="",t=Ca();if(!on.isHexDigit(t))throw Zt(G());if(e+=G(),t=Ca(),!on.isHexDigit(t))throw Zt(G());return e+=G(),String.fromCodePoint(parseInt(e,16))}function _U(){let e="",t=4;while(t-- >0){let r=Ca();if(!on.isHexDigit(r))throw Zt(G());e+=G()}return String.fromCodePoint(parseInt(e,16))}var sBe={start(){if(sn.type==="eof")throw Mu();xU()},beforePropertyName(){switch(sn.type){case"identifier":case"string":EU=sn.value,Qn="afterPropertyName";return;case"punctuator":C0();return;case"eof":throw Mu()}},afterPropertyName(){if(sn.type==="eof")throw Mu();Qn="beforePropertyValue"},beforePropertyValue(){if(sn.type==="eof")throw Mu();xU()},beforeArrayValue(){if(sn.type==="eof")throw Mu();if(sn.type==="punctuator"&&sn.value==="]"){C0();return}xU()},afterPropertyValue(){if(sn.type==="eof")throw Mu();switch(sn.value){case",":Qn="beforePropertyName";return;case"}":C0()}},afterArrayValue(){if(sn.type==="eof")throw Mu();switch(sn.value){case",":Qn="beforeArrayValue";return;case"]":C0()}},end(){}};function xU(){let e;switch(sn.type){case"punctuator":switch(sn.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=sn.value;break}if(iv===void 0)iv=e;else{let t=Pa[Pa.length-1];if(Array.isArray(t))t.push(e);else Object.defineProperty(t,EU,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e==="object")if(Pa.push(e),Array.isArray(e))Qn="beforeArrayValue";else Qn="beforePropertyName";else{let t=Pa[Pa.length-1];if(t==null)Qn="end";else if(Array.isArray(t))Qn="afterArrayValue";else Qn="afterPropertyValue"}}function C0(){Pa.pop();let e=Pa[Pa.length-1];if(e==null)Qn="end";else if(Array.isArray(e))Qn="afterArrayValue";else Qn="afterPropertyValue"}function Zt(e){if(e===void 0)return E0(`JSON5: invalid end of input at ${Bc}:${qo}`);return E0(`JSON5: invalid character '${gte(e)}' at ${Bc}:${qo}`)}function Mu(){return E0(`JSON5: invalid end of input at ${Bc}:${qo}`)}function fte(){return qo-=5,E0(`JSON5: invalid identifier character at ${Bc}:${qo}`)}function aBe(e){console.warn(`JSON5: '${gte(e)}' in strings is not valid ECMAScript; consider escaping`)}function gte(e){let t={"'":"\\'",'"':"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\x00":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function E0(e){let t=SyntaxError(e);return t.lineNumber=Bc,t.columnNumber=qo,t}});var wte=F(function(Jxt,vte){var RU=$U();vte.exports=function(t,r,i){let n=[],o="",s,a,c="",l;if(r!=null&&typeof r==="object"&&!Array.isArray(r))i=r.space,l=r.quote,r=r.replacer;if(typeof r==="function")a=r;else if(Array.isArray(r)){s=[];for(let g of r){let h;if(typeof g==="string")h=g;else if(typeof g==="number"||g instanceof String||g instanceof Number)h=String(g);if(h!==void 0&&s.indexOf(h)<0)s.push(h)}}if(i instanceof Number)i=Number(i);else if(i instanceof String)i=String(i);if(typeof i==="number"){if(i>0)i=Math.min(10,Math.floor(i)),c=" ".substr(0,i)}else if(typeof i==="string")c=i.substr(0,10);return u("",{"":t});function u(g,h){let y=h[g];if(y!=null){if(typeof y.toJSON5==="function")y=y.toJSON5(g);else if(typeof y.toJSON==="function")y=y.toJSON(g)}if(a)y=a.call(h,g,y);if(y instanceof Number)y=Number(y);else if(y instanceof String)y=String(y);else if(y instanceof Boolean)y=y.valueOf();switch(y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y==="string")return p(y,!1);if(typeof y==="number")return String(y);if(typeof y==="object")return Array.isArray(y)?m(y):d(y);return}function p(g){let h={"'":0.1,'"':0.2},y={"'":"\\'",'"':"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\x00":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},v="";for(let x=0;x<g.length;x++){let b=g[x];switch(b){case"'":case'"':h[b]++,v+=b;continue;case"\x00":if(RU.isDigit(g[x+1])){v+="\\x00";continue}}if(y[b]){v+=y[b];continue}if(b<" "){let k=b.charCodeAt(0).toString(16);v+="\\x"+("00"+k).substring(k.length);continue}v+=b}let w=l||Object.keys(h).reduce((x,b)=>h[x]<h[b]?x:b);return v=v.replace(new RegExp(w,"g"),y[w]),w+v+w}function d(g){if(n.indexOf(g)>=0)throw TypeError("Converting circular structure to JSON5");n.push(g);let h=o;o=o+c;let y=s||Object.keys(g),v=[];for(let x of y){let b=u(x,g);if(b!==void 0){let k=f(x)+":";if(c!=="")k+=" ";k+=b,v.push(k)}}let w;if(v.length===0)w="{}";else{let x;if(c==="")x=v.join(","),w="{"+x+"}";else{let b=`,
@@ -576,7 +576,7 @@ Use "Manage marketplaces" to add one first.`,"Skills");return}let n=new Map;for(
576
576
  `)}async function aut(){XR(`${at.cyan("allagents")} v${Co.version}`);let e=await VE(Co.version);if(e)bn.info(e);let t=new n9,r=await i9(process.cwd(),t),i=!0;while(!0){if(i)de(sut(r),"Workspace"),i=!1;else bn.info(at.dim(`Workspace: ${out(r)}`));let n=await iut({message:"What would you like to do?",options:_ye(r)});if(Me(n)){YR("Cancelled");return}switch(n){case"sync":await Pye(r),t.invalidate();break;case"workspace":await $ye(r,t),t.invalidate();break;case"plugins":await mye(r,t);break;case"skills":await vye(r,t);break;case"clients":await Yhe(r,t);break;case"mcp":await iye(r,t);break;case"marketplace":await gye(r,t);break;case"exit":QR("Bye");return}r=await i9(process.cwd(),t)}}var iut;var Rye=I(()=>{Sb();jr();hw();kg();Jhe();r9();Xhe();oye();HE();wye();xye();Cye();({select:iut}=Qt);Ae.aliases.delete("escape")});kg();var GE=Ut(ts(),1);jr();rs();var pe=Ut(ts(),1);bj();oo();J$();kh();oo();class AF{constructor(e){this._server=e}requestStream(e,t,r){return this._server.requestStream(e,t,r)}createMessageStream(e,t){let r=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!r?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],n=Array.isArray(i.content)?i.content:[i.content],o=n.some((l)=>l.type==="tool_result"),s=e.messages.length>1?e.messages[e.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some((l)=>l.type==="tool_use");if(o){if(n.some((l)=>l.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!c)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let l=new Set(a.filter((p)=>p.type==="tool_use").map((p)=>p.id)),u=new Set(n.filter((p)=>p.type==="tool_result").map((p)=>p.toolUseId));if(l.size!==u.size||![...l].every((p)=>u.has(p)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},ru,t)}elicitInputStream(e,t){let r=this._server.getClientCapabilities(),i=e.mode??"form";switch(i){case"url":{if(!r?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!r?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let n=i==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:n},vc,t)}async getTask(e,t){return this._server.getTask({taskId:e},t)}async getTaskResult(e,t,r){return this._server.getTaskResult({taskId:e},t,r)}async listTasks(e,t){return this._server.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._server.cancelTask({taskId:e},t)}}class OF extends Zh{constructor(e,t){super(t);if(this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Wh.options.map((r,i)=>[r,i])),this.isMessageIgnored=(r,i)=>{let n=this._loggingLevels.get(i);return n?this.LOG_LEVEL_SEVERITY.get(r)<this.LOG_LEVEL_SEVERITY.get(n):!1},this._capabilities=t?.capabilities??{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new pu,this.setRequestHandler(k1,(r)=>this._oninitialize(r)),this.setNotificationHandler(YS,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(V1,async(r,i)=>{let n=i.sessionId||i.requestInfo?.headers["mcp-session-id"]||void 0,{level:o}=r.params,s=Wh.safeParse(o);if(s.success)this._loggingLevels.set(n,s.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new AF(this)};return this._experimental}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=p$(this._capabilities,e)}setRequestHandler(e,t){let i=Id(e)?.method;if(!i)throw Error("Schema is missing a method literal");let n=Ad(i);if(typeof n!=="string")throw Error("Schema method literal must be a string");if(n==="tools/call"){let s=async(a,c)=>{let l=qn(Vh,a);if(!l.success){let f=l.error instanceof Error?l.error.message:String(l.error);throw new he($e.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:u}=l.data,p=await Promise.resolve(t(a,c));if(u.task){let f=qn(aa,p);if(!f.success){let m=f.error instanceof Error?f.error.message:String(f.error);throw new he($e.InvalidParams,`Invalid task creation result: ${m}`)}return f.data}let d=qn(yc,p);if(!d.success){let f=d.error instanceof Error?d.error.message:String(d.error);throw new he($e.InvalidParams,`Invalid tools/call result: ${f}`)}return d.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,t)}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(!this._capabilities)return;switch(e){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){X$(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){if(!this._capabilities)return;Y$(this._capabilities.tasks?.requests,e,"Server")}async _oninitialize(e){let t=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:GS.includes(t)?t:mc,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},sa)}async createMessage(e,t){if(e.tools||e.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if(e.messages.length>0){let r=e.messages[e.messages.length-1],i=Array.isArray(r.content)?r.content:[r.content],n=i.some((c)=>c.type==="tool_result"),o=e.messages.length>1?e.messages[e.messages.length-2]:void 0,s=o?Array.isArray(o.content)?o.content:[o.content]:[],a=s.some((c)=>c.type==="tool_use");if(n){if(i.some((c)=>c.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!a)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(a){let c=new Set(s.filter((u)=>u.type==="tool_use").map((u)=>u.id)),l=new Set(i.filter((u)=>u.type==="tool_result").map((u)=>u.toolUseId));if(c.size!==l.size||![...c].every((u)=>l.has(u)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if(e.tools)return this.request({method:"sampling/createMessage",params:e},Hh,t);return this.request({method:"sampling/createMessage",params:e},ru,t)}async elicitInput(e,t){switch(e.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let i=e;return this.request({method:"elicitation/create",params:i},vc,t)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let i=e.mode==="form"?e:{...e,mode:"form"},n=await this.request({method:"elicitation/create",params:i},vc,t);if(n.action==="accept"&&n.content&&i.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(i.requestedSchema)(n.content);if(!s.valid)throw new he($e.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(o){if(o instanceof he)throw o;throw new he($e.InternalError,`Error validating elicitation response: ${o instanceof Error?o.message:String(o)}`)}return n}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this.request({method:"roots/list",params:e},Z1,t)}async sendLoggingMessage(e,t){if(this._capabilities.logging){if(!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}import VJ from"node:process";oo();var Zje=10485760;class Q${constructor(e){this._maxBufferSize=e?.maxBufferSize??Zje}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
577
577
  `);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),Kje(t)}clear(){this._buffer=void 0}}function Kje(e){return hc.parse(JSON.parse(e))}function DF(e){return JSON.stringify(e)+`
578
578
  `}class TF{constructor(e=VJ.stdin,t=VJ.stdout,r){this._stdin=e,this._stdout=t,this._started=!1,this._ondata=(i)=>{try{this._readBuffer.append(i),this.processReadBuffer()}catch(n){this.onerror?.(n),this.close().catch(()=>{})}},this._onerror=(i)=>{this.onerror?.(i)},this._readBuffer=new Q$({maxBufferSize:r?.maxBufferSize})}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send(e){return new Promise((t)=>{let r=DF(e);if(this._stdout.write(r))t();else this._stdout.once("drain",t)})}}oo();Ay();Ay();function Mze(e){if(!("content"in e))throw Error("MCP task-based tool results cannot be proxied over stdio");return{content:e.content,...e.structuredContent!==void 0&&{structuredContent:e.structuredContent},...e.isError!==void 0&&{isError:e.isError},...e._meta!==void 0&&{_meta:e._meta}}}async function uX(e,t={},r={}){let{client:i}=await Iy(e,{headers:t,...r}),n=new OF({name:"AllAgents",version:"1.0.0"},{capabilities:{tools:{},resources:{},prompts:{}}});n.setRequestHandler(L1,async(s)=>i.listTools(s.params)),n.setRequestHandler(Vh,async(s)=>Mze(await i.callTool(s.params))),n.setRequestHandler(x1,async(s)=>i.listResources(s.params)),n.setRequestHandler(R1,async(s)=>i.readResource(s.params)),n.setRequestHandler(C1,async(s)=>i.listResourceTemplates(s.params)),n.setRequestHandler(O1,async(s)=>i.listPrompts(s.params)),n.setRequestHandler(T1,async(s)=>i.getPrompt(s.params));let o=new TF;o.onerror=(s)=>{console.error(s.message)},await n.connect(o)}w4();rv();KF();oo();J$();Ay();import{createHash as JJe}from"node:crypto";import{spawn as HJe}from"node:child_process";import GJe from"node:process";import{PassThrough as ZJe}from"node:stream";var VJe=Ut(ole(),1);import sle from"node:process";var WJe=sle.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];function ale(){let e={};for(let t of WJe){let r=sle.env[t];if(r===void 0)continue;if(r.startsWith("()"))continue;e[t]=r}return e}oo();var KJe=8192,cle=2000;class ule{maxFrameBytes;buffer;length=0;constructor(e){this.maxFrameBytes=e;if(!Number.isSafeInteger(e)||e<1)throw Error("MCP stdio frame byte limit must be a positive safe integer");this.buffer=Buffer.allocUnsafe(Math.min(KJe,e))}consume(e,t){let r=0;while(r<e.length){let i=e.indexOf(10,r),n=i===-1?e.length:i+1;if(this.append(e.subarray(r,n)),r=n,i!==-1){let o=this.length-1;if(o>0&&this.buffer[o-1]===13)o-=1;let s=JSON.parse(this.buffer.subarray(0,o).toString("utf8")),a=hc.parse(s);this.length=0,t(a)}}}clear(){this.length=0}append(e){let t=this.length+e.length;if(t>this.maxFrameBytes)throw this.clear(),Error(`MCP stdio frame exceeds ${this.maxFrameBytes} bytes`);this.ensureCapacity(t),e.copy(this.buffer,this.length),this.length=t}ensureCapacity(e){if(e<=this.buffer.length)return;let t=Math.min(this.maxFrameBytes,Math.max(e,this.buffer.length*2)),r=Buffer.allocUnsafe(t);this.buffer.copy(r,0,0,this.length),this.buffer=r}}function lle(e,t){let{promise:r,resolve:i}=Promise.withResolvers(),n=!1,o=(a)=>{if(n)return;n=!0,clearTimeout(s),i(a)},s=setTimeout(()=>o(!1),t);return s.unref(),e.then(()=>o(!0)),r}class R4{server;onclose;onerror;onmessage;exited;started=!1;child;readBuffer;stderrStream;resolveExited;exitObserved=!1;startAttempted=!1;closePromise;constructor(e){this.server=e;this.readBuffer=new ule(e.maxBufferSize??10485760),this.stderrStream=e.stderr==="pipe"||e.stderr==="overlapped"?new ZJe:null;let t=Promise.withResolvers();this.exited=t.promise,this.resolveExited=t.resolve}get stderr(){return this.stderrStream??this.child?.stderr??null}get pid(){return this.child?.pid??null}async start(){if(this.startAttempted)throw Error("MCP stdio transport has already been started");this.startAttempted=!0;let{promise:e,resolve:t,reject:r}=Promise.withResolvers(),i=!1,n;try{n=HJe(this.server.command,this.server.args??[],{env:{...ale(),...this.server.env},stdio:["pipe","pipe",this.server.stderr??"inherit"],shell:!1,windowsHide:GJe.platform==="win32",...this.server.cwd===void 0?{}:{cwd:this.server.cwd}})}catch(o){return this.observeExit(),r(o),e}if(this.child=n,n.once("spawn",()=>{if(this.started=!0,i)return;i=!0,t()}),n.on("error",(o)=>{if(!i)i=!0,r(o);this.onerror?.(o)}),n.once("close",()=>{if(this.child===n)this.child=void 0;this.observeExit()}),n.stdin?.on("error",(o)=>this.onerror?.(o)),n.stdout?.on("data",(o)=>{try{this.readBuffer.consume(o,(s)=>this.onmessage?.(s))}catch(s){this.onerror?.(s instanceof Error?s:Error(String(s))),this.close().catch((a)=>{this.onerror?.(a instanceof Error?a:Error(String(a)))})}}),n.stdout?.on("error",(o)=>this.onerror?.(o)),this.stderrStream&&n.stderr)n.stderr.pipe(this.stderrStream);return e}close(){return this.closePromise??=this.closeOnce(),this.closePromise}async send(e,t){let r=this.child?.stdin;if(!r)throw Error("Not connected");let i=`${JSON.stringify(e)}
579
- `,{promise:n,resolve:o,reject:s}=Promise.withResolvers();return r.write(i,(a)=>{if(a)s(a);else o()}),n}async closeOnce(){let e=this.child;if(!e){this.readBuffer.clear(),this.observeExit();return}try{e.stdin?.end()}catch{}if(await lle(this.exited,cle)){this.readBuffer.clear();return}try{e.kill("SIGTERM")}catch{}if(await lle(this.exited,cle)){this.readBuffer.clear();return}try{e.kill("SIGKILL")}catch{}this.readBuffer.clear()}observeExit(){if(this.exitObserved)return;this.exitObserved=!0,this.resolveExited(),this.onclose?.()}}rv();var yle=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/,YJe=2000,XJe=1000,ple=100,dle=1e4,hC=16777216,vle=hC+65536,gC=hC,fle=64,mle=1e5,QJe=new pu;class I4 extends Error{constructor(e){super(`MCP authorization is required. Run \`${e}\` and try again.`);this.name="McpRuntimeAuthorizationError"}}class wle extends Error{constructor(e){super(`MCP operation timed out after ${e}ms`);this.name="McpRuntimeTimeoutError"}}class Cm extends Error{constructor(){super("MCP operation was cancelled");this.name="McpRuntimeCancelledError"}}function ble(e,t){let r=JSON.stringify(e);if(r===void 0)throw Error(`MCP ${t} could not be serialized`);if(Buffer.byteLength(r,"utf8")>hC)throw Error(`MCP ${t} exceeds ${hC} serialized bytes`)}function gle(e,t){let r=[{value:e,depth:1}],i=new Set,n=0;while(r.length>0){let o=r.pop();if(!o)break;if(n+=1,n>mle)throw Error(`MCP tool '${t}' schema exceeds ${mle} nodes`);if(o.depth>fle)throw Error(`MCP tool '${t}' schema exceeds depth ${fle}`);if(typeof o.value!=="object"||o.value===null)continue;if(i.has(o.value))throw Error(`MCP tool '${t}' schema contains a cycle`);i.add(o.value);let s=Array.isArray(o.value)?o.value:Object.values(o.value);for(let a=s.length-1;a>=0;a-=1)r.push({value:s[a],depth:o.depth+1})}}async function A4(e,t={}){let r=[],i=new Set,n=new Set,o,s=0,a=2,c=!0;while(c){if(s>=ple)throw Error(`MCP tool catalog exceeds ${ple} pages`);let l=await e.listTools(o===void 0?void 0:{cursor:o},t);ble(l,"tools/list page"),s+=1;for(let f of l.tools){if(i.has(f.name))throw Error(`MCP tool catalog contains duplicate tool '${f.name}'`);if(r.length>=dle)throw Error(`MCP tool catalog exceeds ${dle} tools`);if(gle(f.inputSchema,f.name),f.outputSchema)gle(f.outputSchema,f.name);let m=JSON.stringify(f),g=a+(r.length===0?0:1)+Buffer.byteLength(m,"utf8");if(g>gC)throw Error(`MCP tool catalog exceeds ${gC} serialized bytes`);a=g,i.add(f.name),r.push(f)}let u=l.nextCursor;if(u===void 0){c=!1;continue}let p=JJe("sha256").update(u).digest("hex");if(n.has(p))throw Error("MCP tool catalog repeated a pagination cursor");let d=a+Buffer.byteLength(u,"utf8");if(d>gC)throw Error(`MCP tool catalog exceeds ${gC} serialized bytes`);a=d,n.add(p),o=u}return r}function kle(e,t){let r=e.find((i)=>i.name===t);if(!r)throw Error(`MCP tool '${t}' was not found`);return r}async function Sle(e,t,r,i={}){if(t.execution?.taskSupport==="required")throw Error(`MCP tool '${t.name}' requires task-based execution and cannot be called synchronously`);let n=await e.callTool({name:t.name,arguments:r},void 0,i);if(ble(n,"tools/call result"),t.outputSchema){let o="structuredContent"in n?n.structuredContent:void 0,s="isError"in n&&n.isError===!0;if(o===void 0&&!s)throw new he($e.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(o!==void 0)try{let a=QJe.getValidator(t.outputSchema)(o);if(!a.valid)throw new he($e.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){if(a instanceof he)throw a;throw new he($e.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return n}function hle(e){if(/^[A-Za-z0-9_./:@+-]+$/.test(e))return e;return`'${e.replaceAll("'","'\\''")}'`}function $le(e,t){let r=["allagents","mcp","reauth"];if(e.kind==="user")r.push("--scope","user");else if(e.kind==="profile")r.push("--profile",hle(e.name));if(t.startsWith("-"))r.push("--");return r.push(hle(t)),r.join(" ")}function eYe(e,t,r){return{assertSafe(i){e.assertSafe(i)},sanitizeError(i){let n=_x(i),o=e.sanitizeError(i);return n?new I4($le(t,r)):o}}}function tYe(e,t){let r=new Set;return{values:Object.fromEntries(Object.entries(e).map(([n,o])=>{let s=yle.exec(o);if(!s)return[n,o];let a=s[1],c=t[a];if(c===void 0)throw Error(`MCP environment '${n}' references missing environment variable '${a}'`);return r.add(c),[n,c]})),credentialValues:r}}function rYe(e){for(let[t,r]of e.entries())if(yle.exec(r))throw Error(`MCP argument ${t+1} is an environment reference; pass credentials through the server environment instead`)}async function nYe(e,t){let{promise:r,resolve:i}=Promise.withResolvers(),n=!1,o=(a)=>{if(n)return;n=!0,clearTimeout(s),i(a)},s=setTimeout(()=>o(!1),t);return e.then(()=>o(!0)),r}async function iYe(e,t){let r=e.args??[];rYe(r);let i=tYe(e.env??{},t.environment??process.env),n=Px(i.credentialValues),o=new R4({command:e.command,args:r,env:i.values,stderr:"pipe",maxBufferSize:vle});o.stderr?.on("data",()=>{return});let s=new by({name:"AllAgents",version:"1.0.0"},{capabilities:{}}),a,c=()=>(a??=(async()=>{let l;try{await s.close()}catch(u){l=n.sanitizeError(u)}if(o.started){let u=t.stdioExitTimeoutMs??XJe;if(!await nYe(o.exited,u)){let p=Error(`MCP stdio child did not exit within ${u}ms after close`);if(l)throw AggregateError([l,p],"MCP stdio close failed and child exit was not observed");throw p}}if(l)throw l})(),a);try{await s.connect(o,t.signal===void 0?void 0:{signal:t.signal})}catch(l){let u=t.signal?.aborted?new Cm:n.sanitizeError(l);try{await c()}catch(p){throw AggregateError([u,n.sanitizeError(p)],"MCP stdio connection failed and its child could not be closed")}throw u}return{client:s,credentialGuard:n,close:c}}async function oYe(e,t){let r=await Tu(e,t);if(!r)throw Error(`MCP server '${t}' is not defined in ${Qy(e)}`);return r}async function sYe(e,t,r={}){if(r.signal?.aborted)throw new Cm;let i=await oYe(e,t);if(r.signal?.aborted)throw new Cm;if("command"in i)return iYe(i,r);try{let n=await Iy(i.url,{headers:i.headers??{},allowAuthorization:!1,maxResponseBytes:vle,...e.kind==="profile"?{profile:e.name}:{},...r.environment===void 0?{}:{environment:r.environment},...r.signal===void 0?{}:{signal:r.signal}}),o=eYe(n.credentialGuard,e,t),s;return{client:n.client,credentialGuard:o,close(){return s??=(async()=>{let a=r.httpCleanupTimeoutMs??YJe,c=n.transport.terminateSession().then(()=>{return}).catch((m)=>o.sanitizeError(m)),{promise:l,resolve:u}=Promise.withResolvers(),p=setTimeout(()=>u(Error(`Timed out terminating MCP HTTP session after ${a}ms`)),a),d=await Promise.race([c,l]);clearTimeout(p);let f;try{await n.close()}catch(m){f=o.sanitizeError(m)}if(d&&f)throw AggregateError([d,f],"MCP HTTP session termination and close both failed");if(d)throw d;if(f)throw f})(),s}}}catch(n){if(r.signal?.aborted)throw new Cm;if(_x(n))throw new I4($le(e,t));throw n}}async function aYe(e,t,r={}){let i=new AbortController,n,{promise:o,reject:s}=Promise.withResolvers(),a=()=>{if(i.signal.aborted)return;i.abort(),s(new Cm)};if(r.signal?.aborted)a();else r.signal?.addEventListener("abort",a,{once:!0});let c=r.timeoutMs;if(c!==void 0)n=setTimeout(()=>{if(i.signal.aborted)return;i.abort(),s(new wle(c))},c);let l;try{let p=i.signal.aborted?o:t({client:e.client,signal:i.signal}),d=await Promise.race([p,o]);e.credentialGuard.assertSafe(d),l={status:"fulfilled",value:d}}catch(p){l={status:"rejected",error:e.credentialGuard.sanitizeError(p)}}finally{clearTimeout(n),r.signal?.removeEventListener("abort",a)}let u;try{await e.close(),u={status:"fulfilled"}}catch(p){u={status:"rejected",error:e.credentialGuard.sanitizeError(p)}}return{operation:l,cleanup:u}}async function xle(e,t,r,i={}){let n=await sYe(e,t,i);return aYe(n,r,i)}it();var Cle={create:"created",update:"updated",remove:"removed",unchanged:"unchanged",reference:"referenced",retain:"retained"},_le={created:"+",updated:"~",removed:"-",unchanged:"=",referenced:">",retained:"!",failed:"x"};function Ele(e){return`${K(e.client)} ${K(e.kind)} ${K(e.identity)}`}function O4(e){return JSON.stringify([K(e.command),...e.args.map((t)=>K(t))])}function uYe(e){let t=Cle[e.action],r=[e.requestedRef?`requested=${K(e.requestedRef)}`:void 0,e.resolvedRef?`resolved=${K(e.resolvedRef)}`:void 0].filter((n)=>n!==void 0),i=[` ${_le[t]} ${t.padEnd(10)} ${Ele(e)}${r.length>0?` (${r.join(", ")})`:""}`];if(!e.detail)return i;if(e.detail.source)i.push(` source: ${K(e.detail.source)}`);if(e.detail.skills&&e.detail.skills.length>0)i.push(` skills: ${e.detail.skills.map((n)=>K(n)).join(", ")}`);for(let n of e.detail.commands??[])i.push(` command argv: ${O4(n)}`);for(let n of e.detail.mcpServers??[]){if(i.push(` MCP ${K(n.name)} (${K(n.transport)})${n.endpoint?` endpoint=${K(n.endpoint)}`:""}`),n.command)i.push(` command argv: ${O4(n.command)}`);i.push(` requested secrets: ${n.requestedSecrets.length>0?n.requestedSecrets.map((o)=>K(o)).join(", "):"none"}`)}return i}function pYe(e){return` ${_le[e.status]} ${e.status.padEnd(10)} ${Ele(e)}${e.error?`: ${K(e.error)}`:""}`}function Rle(e,t){if(t.length===0)return;e.push("Warnings:");for(let r of t)e.push(` ! ${K(r)}`)}function dYe(e){if(e.clients.length===0)return[];let t=["Clients:"];for(let r of e.clients)if(t.push(` ${K(r.client)}: ${K(r.mechanism)}`),t.push(` config root: ${K(r.root)}`),t.push(` agent root: ${K(r.agentRoot)}`),r.launcher){t.push(` launcher: ${K(r.launcher.name)}`),t.push(` command argv: ${O4(r.launcher.command)}`);for(let i of r.launcher.destinations)t.push(` destination: ${K(i)}`)}return t}function Ile(e){return e.map((t)=>({...t,clients:[...t.clients].sort((r,i)=>r.localeCompare(i)),launchers:[...t.launchers].sort((r,i)=>r.client.localeCompare(i.client)||r.name.localeCompare(i.name)||r.path.localeCompare(i.path))})).sort((t,r)=>t.profile.localeCompare(r.profile))}function vC(e){return{profile:e.profile,operation:e.operation,status:"planned",declarationDigest:e.declarationDigest,clients:e.clients,steps:e.steps.map((t)=>({client:t.client,kind:t.kind,identity:t.identity,status:Cle[t.action],...t.requestedRef?{requestedRef:t.requestedRef}:{},...t.resolvedRef?{resolvedRef:t.resolvedRef}:{},...t.detail?{detail:t.detail}:{}})),warnings:e.warnings}}function op(e){let t={profile:e.profile,operation:e.operation,status:e.status,steps:e.steps,warnings:e.warnings};if("declared"in e){if(t.declared=e.declared,t.installed=e.installed,t.clients=e.clients,t.launchers=e.launchers,e.declarationDigest)t.declarationDigest=e.declarationDigest;if(e.stateDigest)t.stateDigest=e.stateDigest}if(e.error)t.error=e.error;return t}function Ale(e){let t=Ile(e).map(op);return{profiles:t,total:t.length}}function Ole(e){let t=[`Profile ${K(e.profile)} ${K(e.operation)} plan`,`Declaration: ${K(e.declarationDigest)}`];if(t.push(...dYe(e)),e.steps.length===0)t.push(" = unchanged No resource changes");else for(let r of e.steps)t.push(...uYe(r));return Rle(t,e.warnings),t}function Dle(e){let t=Ile(e);if(t.length===0)return["No profiles found."];let r=[`Profiles (${t.length}):`];for(let i of t){if(r.push(` ${K(i.profile)}: ${K(i.status)}`),r.push(` Declared: ${i.declared?"yes":"no"}; Installed: ${i.installed?"yes":"no"}`),r.push(` Clients: ${i.clients.length>0?i.clients.map((n)=>K(n)).join(", "):"none"}`),i.launchers.length===0){r.push(" Launchers: none");continue}r.push(" Launchers:");for(let n of i.launchers)r.push(` ${K(n.client)} ${K(n.name)}: ${K(n.path)} (${n.onPath?"on PATH":"not on PATH"})`)}return r}function _m(e){let t=[`Profile ${K(e.profile)}: ${K(e.status)}`];if("declared"in e)t.push(` Declared: ${e.declared?"yes":"no"}`),t.push(` Installed: ${e.installed?"yes":"no"}`);for(let r of e.steps)t.push(pYe(r));if("launchers"in e&&e.launchers.length>0){t.push("Launcher PATH:");for(let r of e.launchers)t.push(` ${r.onPath?"+":"!"} ${K(r.name)} (${K(r.client)}): ${K(r.path)} ${r.onPath?"is on PATH":"is not on PATH"}`)}if(Rle(t,e.warnings),e.error)t.push(`Error: ${K(e.error)}`);return t}cl();var Nle=Ut(ts(),1);function We(e){let t=e.description;t+=`
579
+ `,{promise:n,resolve:o,reject:s}=Promise.withResolvers();return r.write(i,(a)=>{if(a)s(a);else o()}),n}async closeOnce(){let e=this.child;if(!e){this.readBuffer.clear(),this.observeExit();return}try{e.stdin?.end()}catch{}if(await lle(this.exited,cle)){this.readBuffer.clear();return}try{e.kill("SIGTERM")}catch{}if(await lle(this.exited,cle)){this.readBuffer.clear();return}try{e.kill("SIGKILL")}catch{}this.readBuffer.clear()}observeExit(){if(this.exitObserved)return;this.exitObserved=!0,this.resolveExited(),this.onclose?.()}}rv();var yle=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/,YJe=2000,XJe=1000,ple=100,dle=1e4,hC=16777216,vle=hC+65536,gC=hC,fle=64,mle=1e5,QJe=new pu;class I4 extends Error{constructor(e){super(`MCP authorization is required. Run \`${e}\` and try again.`);this.name="McpRuntimeAuthorizationError"}}class wle extends Error{constructor(e){super(`MCP operation timed out after ${e}ms`);this.name="McpRuntimeTimeoutError"}}class Cm extends Error{constructor(){super("MCP operation was cancelled");this.name="McpRuntimeCancelledError"}}function ble(e,t){let r=JSON.stringify(e);if(r===void 0)throw Error(`MCP ${t} could not be serialized`);if(Buffer.byteLength(r,"utf8")>hC)throw Error(`MCP ${t} exceeds ${hC} serialized bytes`)}function gle(e,t){let r=[{value:e,depth:1}],i=new Set,n=0;while(r.length>0){let o=r.pop();if(!o)break;if(n+=1,n>mle)throw Error(`MCP tool '${t}' schema exceeds ${mle} nodes`);if(o.depth>fle)throw Error(`MCP tool '${t}' schema exceeds depth ${fle}`);if(typeof o.value!=="object"||o.value===null)continue;if(i.has(o.value))throw Error(`MCP tool '${t}' schema contains a cycle`);i.add(o.value);let s=Array.isArray(o.value)?o.value:Object.values(o.value);for(let a=s.length-1;a>=0;a-=1)r.push({value:s[a],depth:o.depth+1})}}async function A4(e,t={}){let r=[],i=new Set,n=new Set,o,s=0,a=2,c=!0;while(c){if(s>=ple)throw Error(`MCP tool catalog exceeds ${ple} pages`);let l=await e.listTools(o===void 0?void 0:{cursor:o},t);ble(l,"tools/list page"),s+=1;for(let f of l.tools){if(i.has(f.name))throw Error(`MCP tool catalog contains duplicate tool '${f.name}'`);if(r.length>=dle)throw Error(`MCP tool catalog exceeds ${dle} tools`);if(gle(f.inputSchema,f.name),f.outputSchema)gle(f.outputSchema,f.name);let m=JSON.stringify(f),g=a+(r.length===0?0:1)+Buffer.byteLength(m,"utf8");if(g>gC)throw Error(`MCP tool catalog exceeds ${gC} serialized bytes`);a=g,i.add(f.name),r.push(f)}let u=l.nextCursor;if(u===void 0){c=!1;continue}let p=JJe("sha256").update(u).digest("hex");if(n.has(p))throw Error("MCP tool catalog repeated a pagination cursor");let d=a+Buffer.byteLength(u,"utf8");if(d>gC)throw Error(`MCP tool catalog exceeds ${gC} serialized bytes`);a=d,n.add(p),o=u}return r}function kle(e,t){let r=e.find((i)=>i.name===t);if(!r)throw Error(`MCP tool '${t}' was not found`);return r}async function Sle(e,t,r,i={}){if(t.execution?.taskSupport==="required")throw Error(`MCP tool '${t.name}' requires task-based execution and cannot be called synchronously`);let n=await e.callTool({name:t.name,arguments:r},void 0,i);if(ble(n,"tools/call result"),t.outputSchema){let o="structuredContent"in n?n.structuredContent:void 0,s="isError"in n&&n.isError===!0;if(o===void 0&&!s)throw new he($e.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(o!==void 0)try{let a=QJe.getValidator(t.outputSchema)(o);if(!a.valid)throw new he($e.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){if(a instanceof he)throw a;throw new he($e.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return n}function hle(e){if(/^[A-Za-z0-9_./:@+-]+$/.test(e))return e;return`'${e.replaceAll("'","'\\''")}'`}function $le(e,t){let r=["allagents","mcp","reauth"];if(e.kind==="user")r.push("--scope","user");else if(e.kind==="profile")r.push("--profile",hle(e.name));if(t.startsWith("-"))r.push("--");return r.push(hle(t)),r.join(" ")}function eYe(e,t,r){return{assertSafe(i){e.assertSafe(i)},sanitizeError(i){let n=_x(i),o=e.sanitizeError(i);return n?new I4($le(t,r)):o}}}function tYe(e,t){let r=new Set;return{values:Object.fromEntries(Object.entries(e).map(([n,o])=>{let s=yle.exec(o);if(!s)return[n,o];let a=s[1],c=t[a];if(c===void 0)throw Error(`MCP environment '${n}' references missing environment variable '${a}'`);return r.add(c),[n,c]})),credentialValues:r}}function rYe(e){for(let[t,r]of e.entries())if(yle.exec(r))throw Error(`MCP argument ${t+1} is an environment reference; pass credentials through the server environment instead`)}async function nYe(e,t){let{promise:r,resolve:i}=Promise.withResolvers(),n=!1,o=(a)=>{if(n)return;n=!0,clearTimeout(s),i(a)},s=setTimeout(()=>o(!1),t);return e.then(()=>o(!0)),r}async function iYe(e,t){let r=e.args??[];rYe(r);let i=tYe(e.env??{},t.environment??process.env),n=Px(i.credentialValues),o=new R4({command:e.command,args:r,env:i.values,stderr:"pipe",maxBufferSize:vle});o.stderr?.on("data",()=>{return});let s=new by({name:"AllAgents",version:"1.0.0"},{capabilities:{}}),a,c=()=>(a??=(async()=>{let l;try{await s.close()}catch(u){l=n.sanitizeError(u)}if(o.started){let u=t.stdioExitTimeoutMs??XJe;if(!await nYe(o.exited,u)){let p=Error(`MCP stdio child did not exit within ${u}ms after close`);if(l)throw AggregateError([l,p],"MCP stdio close failed and child exit was not observed");throw p}}if(l)throw l})(),a);try{await s.connect(o,t.signal===void 0?void 0:{signal:t.signal})}catch(l){let u=t.signal?.aborted?new Cm:n.sanitizeError(l);try{await c()}catch(p){throw AggregateError([u,n.sanitizeError(p)],"MCP stdio connection failed and its child could not be closed")}throw u}return{client:s,credentialGuard:n,close:c}}async function oYe(e,t){let r=await Tu(e,t);if(!r)throw Error(`MCP server '${t}' is not defined in ${Qy(e)}`);return r}async function sYe(e,t,r={}){if(r.signal?.aborted)throw new Cm;let i=await oYe(e,t);if(r.signal?.aborted)throw new Cm;if("command"in i)return iYe(i,r);try{let n=await Iy(i.url,{headers:i.headers??{},allowAuthorization:!1,maxResponseBytes:vle,...e.kind==="profile"?{profile:e.name}:{},...r.environment===void 0?{}:{environment:r.environment},...r.signal===void 0?{}:{signal:r.signal}}),o=eYe(n.credentialGuard,e,t),s;return{client:n.client,credentialGuard:o,close(){return s??=(async()=>{let a=r.httpCleanupTimeoutMs??YJe,c=n.transport.terminateSession().then(()=>{return}).catch((m)=>o.sanitizeError(m)),{promise:l,resolve:u}=Promise.withResolvers(),p=setTimeout(()=>u(Error(`Timed out terminating MCP HTTP session after ${a}ms`)),a),d=await Promise.race([c,l]);clearTimeout(p);let f;try{await n.close()}catch(m){f=o.sanitizeError(m)}if(d&&f)throw AggregateError([d,f],"MCP HTTP session termination and close both failed");if(d)throw d;if(f)throw f})(),s}}}catch(n){if(r.signal?.aborted)throw new Cm;if(_x(n))throw new I4($le(e,t));throw n}}async function aYe(e,t,r={}){let i=new AbortController,n,{promise:o,reject:s}=Promise.withResolvers(),a=()=>{if(i.signal.aborted)return;i.abort(),s(new Cm)};if(r.signal?.aborted)a();else r.signal?.addEventListener("abort",a,{once:!0});let c=r.timeoutMs;if(c!==void 0)n=setTimeout(()=>{if(i.signal.aborted)return;i.abort(),s(new wle(c))},c);let l;try{let p=i.signal.aborted?o:t({client:e.client,signal:i.signal}),d=await Promise.race([p,o]);e.credentialGuard.assertSafe(d),l={status:"fulfilled",value:d}}catch(p){l={status:"rejected",error:e.credentialGuard.sanitizeError(p)}}finally{clearTimeout(n),r.signal?.removeEventListener("abort",a)}let u;try{await e.close(),u={status:"fulfilled"}}catch(p){u={status:"rejected",error:e.credentialGuard.sanitizeError(p)}}return{operation:l,cleanup:u}}async function xle(e,t,r,i={}){let n=await sYe(e,t,i);return aYe(n,r,i)}it();var Cle={create:"created",update:"updated",remove:"removed",unchanged:"unchanged",reference:"referenced",retain:"retained"},_le={created:"+",updated:"~",removed:"-",unchanged:"=",referenced:">",retained:"!",failed:"x"};function Ele(e){return`${K(e.client)} ${K(e.kind)} ${K(e.identity)}`}function O4(e){return JSON.stringify([K(e.command),...e.args.map((t)=>K(t))])}function uYe(e){let t=Cle[e.action],r=[e.requestedRef?`requested=${K(e.requestedRef)}`:void 0,e.resolvedRef?`resolved=${K(e.resolvedRef)}`:void 0].filter((n)=>n!==void 0),i=[` ${_le[t]} ${t.padEnd(10)} ${Ele(e)}${r.length>0?` (${r.join(", ")})`:""}`];if(!e.detail)return i;if(e.detail.source)i.push(` source: ${K(e.detail.source)}`);if(e.detail.skills&&e.detail.skills.length>0)i.push(` skills: ${e.detail.skills.map((n)=>K(n)).join(", ")}`);for(let n of e.detail.commands??[])i.push(` command argv: ${O4(n)}`);for(let n of e.detail.mcpServers??[]){if(i.push(` MCP ${K(n.name)} (${K(n.transport)})${n.endpoint?` endpoint=${K(n.endpoint)}`:""}`),n.command)i.push(` command argv: ${O4(n.command)}`);i.push(` requested secrets: ${n.requestedSecrets.length>0?n.requestedSecrets.map((o)=>K(o)).join(", "):"none"}`)}return i}function pYe(e){return` ${_le[e.status]} ${e.status.padEnd(10)} ${Ele(e)}${e.error?`: ${K(e.error)}`:""}`}function Rle(e,t){if(t.length===0)return;e.push("Warnings:");for(let r of t)e.push(` ! ${K(r)}`)}function dYe(e){if(e.clients.length===0)return[];let t=["Clients:"];for(let r of e.clients)if(t.push(` ${K(r.client)}: ${K(r.mechanism)}`),t.push(` config root: ${K(r.root)}`),t.push(` agent root: ${K(r.agentRoot)}`),r.launcher){t.push(` launcher: ${K(r.launcher.name)}`),t.push(` command argv: ${O4(r.launcher.command)}`);for(let i of r.launcher.destinations)t.push(` destination: ${K(i)}`)}return t}function Ile(e){return e.map((t)=>({...t,clients:[...t.clients].sort((r,i)=>r.localeCompare(i)),launchers:[...t.launchers].sort((r,i)=>r.client.localeCompare(i.client)||r.name.localeCompare(i.name)||r.path.localeCompare(i.path))})).sort((t,r)=>t.profile.localeCompare(r.profile))}function vC(e){return{profile:e.profile,operation:e.operation,status:"planned",declarationDigest:e.declarationDigest,clients:e.clients,steps:e.steps.map((t)=>({client:t.client,kind:t.kind,identity:t.identity,status:Cle[t.action],...t.requestedRef?{requestedRef:t.requestedRef}:{},...t.resolvedRef?{resolvedRef:t.resolvedRef}:{},...t.detail?{detail:t.detail}:{}})),warnings:e.warnings}}function op(e){let t={profile:e.profile,operation:e.operation,status:e.status,steps:e.steps,warnings:e.warnings};if("declared"in e){if(t.declared=e.declared,t.installed=e.installed,t.clients=e.clients,t.launchers=e.launchers,e.declarationDigest)t.declarationDigest=e.declarationDigest;if(e.stateDigest)t.stateDigest=e.stateDigest}if(e.error)t.error=e.error;return t}function Ale(e){let t=Ile(e).map(op);return{profiles:t,total:t.length}}function Ole(e){let t=[`Profile ${K(e.profile)} ${K(e.operation)} plan`,`Declaration: ${K(e.declarationDigest)}`];if(t.push(...dYe(e)),e.steps.length===0)t.push(" = unchanged No resource changes");else for(let r of e.steps)t.push(...uYe(r));return Rle(t,e.warnings),t}function Dle(e){let t=Ile(e);if(t.length===0)return["No profiles found."];let r=[`Profiles (${t.length}):`];for(let i of t){if(r.push(` ${K(i.profile)}: ${K(i.status)}`),r.push(` Declared: ${i.declared?"yes":"no"}; Installed: ${i.installed?"yes":"no"}`),r.push(` Clients: ${i.clients.length>0?i.clients.map((n)=>K(n)).join(", "):"none"}`),i.launchers.length===0){r.push(" Launchers: none");continue}r.push(" Launchers:");for(let n of i.launchers)r.push(` ${K(n.client)} ${K(n.name)}: ${K(n.path)} (${n.onPath?"on PATH":"not on PATH"})`)}return r}function _m(e){let t=[`Profile ${K(e.profile)}: ${K(e.status)}`];if("declared"in e)t.push(` Declared: ${e.declared?"yes":"no"}`),t.push(` Installed: ${e.installed?"yes":"no"}`);for(let r of e.steps)t.push(pYe(r));if("launchers"in e&&e.launchers.length>0){t.push("Launcher PATH:");for(let r of e.launchers)t.push(` ${r.onPath?"+":"!"} ${K(r.name)} (${K(r.client)}): ${K(r.path)} ${r.onPath?"is on PATH":"is not on PATH"}`)}if(Rle(t,e.warnings),e.error)t.push(`Error: ${K(e.error)}`);return t}cl();var Nle=Ut(ts(),1);function He(e){let t=e.description;t+=`
580
580
 
581
581
  When to use: ${e.whenToUse}`,t+=`
582
582
 
@@ -588,13 +588,13 @@ Output: ${e.expectedOutput}`,t}function Dn(e,t=[]){let r=Nle.subcommands(e),i=r.
588
588
  `).filter((c)=>!K(c).startsWith(`- ${a} -`)).join(`
589
589
  `);return s},r}Wo();var PYe=/^[a-z][a-z0-9-]*$/,CYe=/^-?(?:0|[1-9]\d*)$/,_Ye=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/,Ble=/-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/y,EYe={h:!0,help:!0,input:!0,json:!0,jq:!0,profile:!0,project:!0,scope:!0,search:!0,server:!0,tool:!0,user:!0},RYe={["__proto__"]:!0,constructor:!0,prototype:!0},IYe=["$ref","allOf","anyOf","dependentSchemas","else","if","not","oneOf","patternProperties","then","unevaluatedProperties"];function nw(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function rw(e,t){return Object.hasOwn(e,t)}function Ns(e){return{mode:"input-only",reason:e}}function M4(e){return IYe.find((t)=>rw(e,t))}function kC(e){if(typeof e==="string")return"string";if(typeof e==="boolean")return"boolean";if(typeof e==="number"&&Number.isFinite(e))return Number.isSafeInteger(e)?"integer":"number";return}function qle(e){if(e==="string"||e==="number"||e==="integer"||e==="boolean")return e;return}function AYe(e,t,r){if(!nw(t))return`Property '${e}' is not an object schema`;let i=M4(t);if(i)return`Property '${e}' uses unsupported ${i}`;if(rw(t,"default"))return`Property '${e}' uses an unsupported default`;if(t.description!==void 0&&typeof t.description!=="string")return`Property '${e}' has a non-string description`;let n=t.description;if(t.type==="array"){if(!nw(t.items))return`Property '${e}' is not a homogeneous primitive array`;let s=M4(t.items);if(s)return`Property '${e}' array items use unsupported ${s}`;let a=qle(t.items.type);if(!a)return`Property '${e}' is not a homogeneous primitive array`;if(rw(t.items,"enum")){let c=t.items.enum;if(!Array.isArray(c)||c.length===0)return`Property '${e}' has an invalid item enum`;for(let l of c)if(kC(l)!==a&&!(a==="number"&&kC(l)==="integer"))return`Property '${e}' has a heterogeneous item enum`;return{name:e,propertyName:e,kind:"array",valueKind:a,required:r,...n===void 0?{}:{description:n},enumValues:c}}return{name:e,propertyName:e,kind:"array",valueKind:a,required:r,...n===void 0?{}:{description:n}}}let o=qle(t.type);if(!o)return`Property '${e}' has an unsupported type`;if(rw(t,"enum")){let s=t.enum;if(!Array.isArray(s)||s.length===0)return`Property '${e}' has an invalid enum`;for(let a of s)if(kC(a)!==o&&!(o==="number"&&kC(a)==="integer"))return`Property '${e}' has a heterogeneous enum`;return{name:e,propertyName:e,kind:"enum",valueKind:o,required:r,...n===void 0?{}:{description:n},enumValues:s}}return{name:e,propertyName:e,kind:o,valueKind:o,required:r,...n===void 0?{}:{description:n}}}function Vle(e){if(!nw(e)||e.type!=="object")return Ns("The input schema is not a top-level object");let t=M4(e);if(t)return Ns(`The input schema uses unsupported ${t}`);if(e.properties!==void 0&&!nw(e.properties))return Ns("The input schema properties are not an object");let r=e.properties??Object.create(null),i=e.required??[];if(!Array.isArray(i)||i.some((c)=>typeof c!=="string"))return Ns("The input schema required list is invalid");let n=new Set(i);if(n.size!==i.length)return Ns("The input schema required list contains duplicates");for(let c of n)if(!rw(r,c))return Ns(`Required property '${c}' is not declared`);let o=Object.keys(r);for(let c of o){if(!PYe.test(c))return Ns(`Property '${c}' is not a portable long option name`);if(EYe[c]||RYe[c])return Ns(`Property '${c}' is reserved`)}let s=[],a=new Set;for(let c of o){let l=AYe(c,r[c],n.has(c));if(typeof l==="string")return Ns(l);if(s.push(l),l.valueKind==="boolean"&&l.kind!=="array")a.add(`no-${l.name}`)}for(let c of o)if(a.has(c))return Ns(`Property '${c}' collides with a boolean no-* option`);return{mode:"generated",options:s}}function OYe(e,t,r){if(e==="string")return t;if(e==="boolean"){if(t==="true")return!0;if(t==="false")return!1;throw Error(`Invalid value for --${r}: expected true or false`)}if(e==="integer"){if(!CYe.test(t))throw Error(`Invalid value for --${r}: expected an integer`);let n=Number(t);if(!Number.isSafeInteger(n))throw Error(`Invalid value for --${r}: integer is outside the safe range`);return n}if(!_Ye.test(t))throw Error(`Invalid value for --${r}: expected a number`);let i=Number(t);if(!Number.isFinite(i))throw Error(`Invalid value for --${r}: expected a finite number`);return i}function DYe(e,t){let r=OYe(e.valueKind,t,e.name);if(e.enumValues&&!e.enumValues.some((i)=>Object.is(i,r)))throw Error(`Invalid value for --${e.name}: expected one of ${e.enumValues.map(String).join(", ")}`);return r}function TYe(e){let t=!1,r=!1;for(let i=0;i<e.length;){let n=e[i];if(t){if(r)r=!1;else if(n==="\\")r=!0;else if(n==='"')t=!1;i+=1;continue}if(n==='"'){t=!0,i+=1;continue}if(n==="-"||n!==void 0&&n>="0"&&n<="9"){Ble.lastIndex=i;let o=Ble.exec(e);if(o){let s=o[0],a=Number(s);if(!Number.isFinite(a))throw Error("JSON input contains a non-finite number");if(Number.isInteger(a)&&!Number.isSafeInteger(a))throw Error("JSON input contains an integer outside the safe range");i+=s.length;continue}}i+=1}}function NYe(e){TYe(e);let t;try{t=JSON.parse(e)}catch(r){let i=r instanceof Error?r.message:String(r);throw Error(`Invalid --input JSON: ${i}`)}if(!nw(t))throw Error("--input must be a JSON object");return t}function Wle(e,t){let r,i=[];for(let s=0;s<t.length;s+=1){let a=t[s];if(a==="--input"){if(r!==void 0)throw Error("--input may only be specified once");let c=t[s+1];if(c===void 0)throw Error("Missing value for --input");r=c,s+=1;continue}if(a?.startsWith("--input=")){if(r!==void 0)throw Error("--input may only be specified once");r=a.slice(8);continue}if(a!==void 0)i.push(a)}if(r!==void 0){if(i.length>0)throw Error("--input cannot be combined with generated tool options");return NYe(r)}if(e.mode==="input-only"){if(i.length>0)throw Error(`Unknown tool option '${i[0]}'`);throw Error(`This tool requires --input: ${e.reason}`)}let n=new Map(e.options.map((s)=>[s.name,s])),o=new Map;for(let s=0;s<i.length;s+=1){let a=i[s];if(a===void 0||!a.startsWith("--")||a==="--")throw Error(`Unknown tool option '${a??""}'`);let c=a.indexOf("="),l=a.slice(2,c===-1?void 0:c),u=n.get(l);if(!u)throw Error(`Unknown tool option '--${l}'`);let p;if(c!==-1)p=a.slice(c+1);else{let f=i[s+1];if(f===void 0)throw Error(`Missing value for --${l}`);if(f.startsWith("-"))throw Error(`Flag-looking values for --${l} require --${l}=value syntax`);p=f,s+=1}let d=DYe(u,p);if(u.kind==="array"){let f=o.get(u.propertyName);if(f===void 0)o.set(u.propertyName,[d]);else if(Array.isArray(f))f.push(d);else throw Error(`Option --${l} has conflicting values`)}else{if(o.has(u.propertyName))throw Error(`Option --${l} may only be specified once`);o.set(u.propertyName,d)}}for(let s of e.options)if(s.required&&!o.has(s.propertyName))throw Error(`Missing required option --${s.name}`);return Object.fromEntries(o)}var ll=[{flag:"--scope",type:"string",choices:["project","user"],description:"Declaration destination: 'project' (default) or ordinary 'user' configuration; cannot be combined with --profile"},{flag:"--profile",type:"string",description:"Named profile declaration destination; cannot be combined with --scope"}],ap={kind:"project | user | profile",name:"string?"},j4={mcpResults:"object?",sync:"object?"},SC={command:"mcp add",description:"Add an MCP server, authenticate, and sync it to clients",whenToUse:"When adding or replacing an MCP server in the current project, ordinary user configuration, or a declared profile. Agent and non-interactive use works for public servers or valid cached credentials; fresh OAuth consent requires a human rerun.",examples:["allagents mcp add deepwiki https://mcp.deepwiki.com/mcp","allagents mcp add my-server npx --arg=-y --arg=@my/mcp-server","allagents mcp add gh-api npx -e GH_TOKEN=abc123 --arg=-y --arg=@modelcontextprotocol/server-github","allagents mcp add deepwiki https://mcp.deepwiki.com/mcp --client claude,copilot --client codex","allagents mcp add personal npx --scope user","allagents mcp add trading https://example.com/mcp --profile markets","allagents --json mcp add trading https://example.com/mcp --profile markets"],expectedOutput:"Validates and adds the declaration to the selected project, user, or profile destination, authenticates HTTP servers when needed, records proxy routing atomically, and reconciles installed clients. JSON output redacts credential values. Declared-only profiles are not implicitly installed. Exit 0 on success, 1 on failure.",interaction:"conditional",positionals:[{name:"name",type:"string",required:!0,description:"Server name (unique within the selected destination)"},{name:"commandOrUrl",type:"string",required:!0,description:"HTTP URL (http://, https://) for http transport, or a command for stdio transport"}],options:[{flag:"--transport",type:"string",description:"Transport type: 'http' or 'stdio' (auto-detected from URL by default)"},{flag:"--arg",type:"string",description:"Argument to pass to the stdio command (repeatable)"},{flag:"--env",short:"-e",type:"string",description:"Environment variable KEY=VALUE for stdio transport (repeatable)"},{flag:"--header",type:"string",description:"HTTP header KEY=VALUE for http transport (repeatable)"},{flag:"--client",type:"string",description:"Client filter (repeatable; each value may be comma-separated; duplicates are removed in first-seen order)"},{flag:"--force",short:"-f",type:"boolean",description:"Replace an existing server with the same name"},...ll],outputSchema:{destination:ap,name:"string",config:"object",...j4}},$C={command:"mcp remove",description:"Remove an MCP server from a project, user, or profile destination",whenToUse:"When you no longer need an MCP server declaration in the selected destination",examples:["allagents mcp remove deepwiki","allagents mcp remove deepwiki --scope user","allagents mcp remove trading --profile markets","allagents --json mcp remove trading --profile markets"],expectedOutput:"Removes the server declaration and proxy intent from the selected destination, then reconciles that destination. Declared-only profiles remain uninstalled. Exit 0 on success, 1 if the server is not defined.",positionals:[{name:"name",type:"string",required:!0,description:"Server name to remove from the selected destination"}],options:[...ll],outputSchema:{destination:ap,name:"string",...j4}},xC={command:"mcp list",description:"List MCP servers declared in a project, user, or profile destination",whenToUse:"To inspect inline MCP declarations in exactly one selected destination without merging plugin-provided servers",examples:["allagents mcp list","allagents mcp list --scope user","allagents mcp list --profile markets","allagents --json mcp list --scope user"],expectedOutput:"Prints MCP declarations from the selected project, ordinary user, or named profile destination with transport, target, and client filter. Header, environment, URL credential, and sensitive query values are redacted in human and JSON output. Exit 0 on success.",options:[...ll],outputSchema:{destination:ap,servers:"record<string, redacted MCP server config>",total:"number"}},PC={command:"mcp get",description:"Show one MCP declaration from a project, user, or profile destination",whenToUse:"To inspect how one MCP server is declared in exactly one selected destination",examples:["allagents mcp get deepwiki","allagents mcp get deepwiki --scope user","allagents mcp get trading --profile markets","allagents --json mcp get trading --profile markets"],expectedOutput:"Prints the selected server declaration as YAML or structured JSON with header, environment, URL credential, and sensitive query values redacted. Exit 0 on success, 1 if it is not found in that destination.",positionals:[{name:"name",type:"string",required:!0,description:"Server name in the selected destination"}],options:[...ll],outputSchema:{destination:ap,name:"string",config:"redacted MCP server config"}},CC={command:"mcp reauth",description:"Reauthenticate a configured HTTP MCP server",whenToUse:"Human-operated only: use when an HTTP MCP server in a project, ordinary user, or named profile destination needs a fresh OAuth login. JSON and non-interactive execution are rejected.",examples:["allagents mcp reauth tradingview","allagents mcp reauth secure-api --scope user","allagents mcp reauth tradingview --profile markets"],expectedOutput:"Clears cached OAuth credentials owned by the selected destination, opens a browser for login, accepts a pasted callback URL when the browser is remote, and verifies the connection. Profile credentials remain isolated. Exit 0 on success, 1 on cancellation or failure.",positionals:[{name:"name",type:"string",required:!0,description:"HTTP MCP server name in the selected destination"}],options:[...ll],interaction:"required"},_C={command:"mcp update",description:"Reconcile MCP servers for one project, user, or profile destination",whenToUse:"After editing MCP declarations for a project, ordinary user configuration, or named profile. Project and user destinations run MCP-only reconciliation; installed profiles use the full profile ownership planner. To modify a server definition use 'mcp add --force'.",examples:["allagents mcp update","allagents mcp update --scope user","allagents mcp update --profile markets","allagents mcp update --offline","allagents --json mcp update --profile markets"],expectedOutput:"Reconciles the selected destination and prints client results. A declared-only profile is reported as not installed and is not implicitly installed. Exit 0 on success, 1 on failure.",options:[{flag:"--offline",type:"boolean",description:"Use cached plugins without fetching from remote"},...ll],outputSchema:{destination:ap,...j4}},iw={command:"mcp tools",description:"List tools exposed by an MCP server",whenToUse:"To discover the complete live tool catalog from one configured MCP server in exactly one selected destination",examples:["allagents mcp tools deepwiki","allagents mcp tools deepwiki --search docs","allagents --json mcp tools deepwiki --scope user","allagents --json mcp tools trading --profile markets","allagents mcp tools -- --option-looking-server"],expectedOutput:"Connects directly to the selected configured server, lists every tool page, then closes the connection before rendering. Human output prints one block per matching tool. JSON output preserves complete parsed tool records. Exit 0 for a catalog or empty result, 1 for an operational or cleanup failure, and 2 for invalid usage.",positionals:[{name:"server",type:"string",required:!0,description:"Configured MCP server name in the selected destination"}],options:[{flag:"--search",type:"string",description:"Case-insensitive substring filter over tool name, title, and description"},...ll],outputSchema:{destination:ap,server:"string",search:"string?",tools:"complete parsed MCP tool[]",total:"number"},jsonFields:["name","title","description","inputSchema","outputSchema","annotations","execution","icons","_meta"],skipUpdateCheck:!0},ow={command:"mcp call",description:"Call a tool exposed by an MCP server",whenToUse:"To inspect live help for, or synchronously invoke, one exact tool on one configured MCP server in exactly one selected destination",examples:["allagents mcp call deepwiki ask_question --help",`allagents mcp call deepwiki ask_question --input '{"question":"How?"}'`,"allagents mcp call catalog search --query docs --limit 5","allagents --json mcp call trading quote --profile markets --symbol AAPL","allagents mcp call --help -- --option-looking-server --option-looking-tool"],expectedOutput:"Discovers the current tool descriptor on the same direct connection used for an invocation. Fully qualified --help reports the live input contract without invoking. Calls preserve content order and complete parsed JSON results. Exit 0 on success, 1 for tool, operational, or cleanup failure, and 2 for invalid usage.",positionals:[{name:"server",type:"string",required:!0,description:"Configured MCP server name in the selected destination"},{name:"tool",type:"string",required:!0,description:"Exact case-sensitive live tool name"}],options:[{flag:"--input",type:"string",description:"Exact JSON object input; mutually exclusive with live generated tool options"},...ll],outputSchema:{destination:ap,server:"string",tool:"string",result:"complete parsed MCP call result (invocation only)?",descriptor:"complete parsed MCP tool descriptor (live help only)?",input:{mode:"generated | input-only",required:"string[]",options:"generated tool option[]?",reason:"string?"}},skipUpdateCheck:!0};var pl={scope:pe.option({type:pe.optional(pe.string),long:"scope",description:"Declaration scope: 'project' (default) or 'user'"}),profile:pe.option({type:pe.optional(pe.string),long:"profile",description:"Named profile declaration destination"})};function up(e,t){try{return ev({cwd:process.cwd(),...t.scope===void 0?{}:{scope:t.scope},...t.profile===void 0?{}:{profile:t.profile}})}catch(r){Gi(e,r instanceof Error?r.message:String(r))}}function lp(e){return e.kind==="profile"?{kind:"profile",name:e.name}:{kind:e.kind}}function Dm(e){switch(e.kind){case"project":return"workspace.yaml";case"user":return"the user workspace";case"profile":return`profile '${K(e.name)}'`}}function MYe(e){if(e.length===0)return;let t=[],r=new Set;for(let i of e)for(let n of i.split(",")){let o=n.trim();if(!o)throw Error("--client values cannot contain empty segments");let s=Xr.safeParse(o);if(!s.success)throw Error(`Invalid client '${o}'. Valid clients: ${ds.join(", ")}`);if(!r.has(s.data))r.add(s.data),t.push(s.data)}return t}var ul="[REDACTED]";function z4(e){let t=e.replace(/[^A-Za-z0-9]/g,"").toLowerCase();return t==="key"||/(?:authorization|auth|credentials?|password|passwd|secrets?|signature|tokens?|accesstoken|refreshtoken|apikey|accesskey|privatekey)$/.test(t)}function Zle(e){try{let t=new URL(e);if(t.username)t.username=ul;if(t.password)t.password=ul;for(let r of t.searchParams.keys())if(z4(r))t.searchParams.set(r,ul);return t.toString()}catch{return e}}function jYe(e){let t=!1;return e.map((r)=>{if(t)return t=!1,ul;let i=/^([^=]+)=(.*)$/.exec(r);if(i&&z4(i[1]))return`${i[1]}=${ul}`;if(/^Bearer\s+\S+/i.test(r))return`Bearer ${ul}`;if(/^https?:\/\//i.test(r))return Zle(r);if(r.startsWith("-")&&z4(r.replace(/^-+/,"")))t=!0;return r})}function U4(e){if("url"in e)return{...e,url:Zle(e.url),...e.headers&&{headers:Object.fromEntries(Object.keys(e.headers).map((t)=>[t,ul]))}};return{...e,...e.args&&{args:jYe(e.args)},...e.env&&{env:Object.fromEntries(Object.keys(e.env).map((t)=>[t,ul]))}}}function Gi(e,t){if(L())H({success:!1,command:e,error:t});else console.error(`Error: ${K(t)}`);process.exit(1)}function FYe(e,t,r,i,n,o,s){if(r&&r!=="http"&&r!=="stdio")Gi(e,`Invalid transport '${r}'. Expected 'http' or 'stdio'.`);let a=tv(n,"-e/--env");if("error"in a)Gi(e,a.error);let c=tv(o,"--header");if("error"in c)Gi(e,c.error);let l;try{l=MYe(s)}catch(d){Gi(e,d instanceof Error?d.message:String(d))}let u={commandOrUrl:t,args:i,env:a.values,headers:c.values};if(r)u.transport=r;if(l)u.clients=l;let p=ute(u);if("error"in p)Gi(e,p.error);return p.config}function Kle(){return{output:console.log,readCallback:async({redirectUrl:e,state:t,signal:r})=>{let i=await Cg({message:"Paste the OAuth callback URL if using another browser",signal:r,validate:(n)=>{if(!n)return"OAuth callback URL is required";try{hz(n,e,t);return}catch(o){return o instanceof Error?o.message:"Invalid OAuth callback URL"}}});if(Me(i))throw Error("OAuth authorization cancelled");return i}}}async function lw(e,t){try{return await t()}catch(r){Gi(e,r instanceof Error?r.message:String(r))}}async function zYe(e,t,r){try{return await Tu(t,r)}catch(i){Gi(e,i instanceof Error?i.message:String(i))}}function Jle(e){return e.result?op(e.result):{status:"not-installed"}}function UYe(e){for(let[t,r]of Object.entries(e.mcpResults)){if(!r)continue;let i=La(r,t);if(i.length>0){console.log("");for(let n of i)console.log(n)}}for(let t of e.warnings)console.log(` ⚠ ${t}`)}function Yle(e,t){if(!t.result){console.log(`Profile '${K(e.name)}' is not installed; skipped client reconciliation.`);return}console.log("");for(let r of _m(t.result))console.log(r)}function Xle(e,t,r,i,n){if(L()){H({success:!0,command:e,data:{...n,destination:lp(t),...r.kind==="mcp"?{mcpResults:r.result.mcpResults}:{sync:Jle(r)}}});return}if(console.log(i),r.kind==="mcp")UYe(r.result);else if(t.kind==="profile")Yle(t,r)}function LYe(e,t){let r=[`${e}:`],i="url"in t;if(r.push(` transport: ${i?"http":"stdio"}`),i){if(r.push(` url: ${t.url}`),t.headers&&Object.keys(t.headers).length>0){r.push(" headers:");for(let[n,o]of Object.entries(t.headers))r.push(` ${n}: ${o}`)}}else{if(r.push(` command: ${t.command}`),t.args&&t.args.length>0)r.push(` args: ${JSON.stringify(t.args)}`);if(t.env&&Object.keys(t.env).length>0){r.push(" env:");for(let[n,o]of Object.entries(t.env))r.push(` ${n}: ${o}`)}}if(t.clients&&t.clients.length>0)r.push(` clients: [${t.clients.join(", ")}]`);return r}class Tr extends Error{constructor(e){super(e);this.name="McpRuntimeUsageError"}}var BYe={runManagedOperation:(e,t,r,i)=>xle(e,t,r,i)};function qYe(e){let t=e.split(",").map((r)=>r.trim()).filter(Boolean);return t.length>0?t:void 0}function Qle(e){let t=0;while(t<e.length){let r=e[t];if(r==="--json"||r?.startsWith("--json=")){t+=1;continue}if(r==="--jq"){if(e[t+1]===void 0)return{index:t,legal:!1};t+=2;continue}break}return{index:t,legal:!0}}function RC(e){let t=Qle(e);if(!t.legal||e[t.index]!=="mcp")return;let r=e[t.index+1];return r==="tools"||r==="call"?r:void 0}function sw(e,t,r){let i=e[t+1];if(i===void 0)throw new Tr(`Missing value for ${r}`);return i}function F4(e,t,r,i){if(e[t]!==void 0)throw new Tr(`${i} may only be specified once`);e[t]=r}function Hle(e,t,r){let i=e[t];if(i==="--json")return r.json=!0,t;if(i?.startsWith("--json=")){r.json=!0;let n=qYe(i.slice(7));if(n===void 0)delete r.jsonFields;else r.jsonFields=n;return t}if(i==="--jq"){if(r.jqExpr!==void 0)throw new Tr("--jq may only be specified once");return r.jqExpr=sw(e,t,"--jq"),t+1}return}function eue(e){return{kind:e,help:!1,toolArguments:[],output:{json:!1}}}function tue(e,t){let r=RC(e);if(!r)throw new Tr("Not an MCP runtime command");let i=Qle(e),n=t??eue(r);for(let s=0;s<i.index;s+=1){let a=Hle(e,s,n.output);if(a===void 0)throw new Tr(`Unknown output option '${e[s]}'`);s=a}let o=!1;for(let s=i.index+2;s<e.length;s+=1){let a=e[s];if(a===void 0)continue;if(!o&&a==="--"){o=!0;continue}if(o){if(n.server===void 0){n.server=a;continue}if(r==="call"&&n.tool===void 0){n.tool=a;continue}throw new Tr(`Unexpected argument '${a}' for mcp ${r}`)}let c=Hle(e,s,n.output);if(c!==void 0){s=c;continue}if(a==="--help"||a==="-h"){n.help=!0;continue}if(a==="--scope"||a.startsWith("--scope=")){let l=a.startsWith("--scope="),u=l?a.slice(8):sw(e,s,"--scope");if(F4(n,"scope",u,"--scope"),!l)s+=1;continue}if(a==="--profile"||a.startsWith("--profile=")){let l=a.startsWith("--profile="),u=l?a.slice(10):sw(e,s,"--profile");if(F4(n,"profile",u,"--profile"),!l)s+=1;continue}if(r==="tools"&&(a==="--search"||a?.startsWith("--search="))){let l=a.startsWith("--search="),u=l?a.slice(9):sw(e,s,"--search");if(F4(n,"search",u,"--search"),!l)s+=1;continue}if(r==="call"&&(a==="--input"||a.startsWith("--input="))){if(n.toolArguments.push(a),a==="--input")n.toolArguments.push(sw(e,s,"--input")),s+=1;continue}if(!a.startsWith("-")){if(n.server===void 0){n.server=a;continue}if(r==="call"&&n.tool===void 0){n.tool=a;continue}if(r==="tools")throw new Tr(`Unexpected argument '${a}' for mcp tools`);n.toolArguments.push(a);continue}if(r==="tools")throw new Tr(`Unknown option '${a}' for mcp tools`);if(n.toolArguments.push(a),a.startsWith("--")&&!a.includes("=")){let l=e[s+1];if(l!==void 0)n.toolArguments.push(l),s+=1}}return n}function rue(e){if(!RC(e))return!1;try{let r=tue(e);if(!r.help)return!0;return r.kind==="call"&&r.server!==void 0&&r.tool!==void 0}catch{return!0}}function VYe(e){if(e.output.jqExpr!==void 0&&!e.output.json)throw new Tr("--jq requires --json");if(e.help&&e.output.jsonFields!==void 0)throw new Tr("--json=<fields> is not supported with --help; use --json");if(e.output.jsonFields===void 0)return;let t=e.kind==="tools"?iw:ow,r=tw(t),i=e.output.jsonFields.find((n)=>!r.includes(n));if(i)throw new Tr(`Unknown JSON field: "${i}". Available fields: ${[...r].sort().join(", ")}`)}function WYe(e){try{return ev({cwd:process.cwd(),...e.scope===void 0?{}:{scope:e.scope},...e.profile===void 0?{}:{profile:e.profile}})}catch(t){throw new Tr(t instanceof Error?t.message:String(t))}}function nue(e){return e==="SIGINT"?130:143}async function iue(e,t,r,i){let n=new AbortController,o,s=(l)=>{if(o!==void 0)process.exit(nue(l));o=l,n.abort()},a=()=>s("SIGINT"),c=()=>s("SIGTERM");process.once("SIGINT",a),process.once("SIGTERM",c);try{return{result:await i.runManagedOperation(e,t,r,{signal:n.signal}),...o===void 0?{}:{signal:o}}}catch(l){return{error:l instanceof Error?l:Error(String(l)),...o===void 0?{}:{signal:o}}}finally{process.removeListener("SIGINT",a),process.removeListener("SIGTERM",c)}}function L4(e,t,r,i){H({success:e,command:t,...r===void 0?{}:{data:r},...i===void 0?{}:{error:i}})}function cw(e,t,r){if(r)L4(!1,e,void 0,t.message);else console.error(`Error: ${K(t.message)}`)}function IC(e){return`MCP cleanup failed: ${e.message}`}function Om(e,t){if(t!==void 0)process.exitCode=nue(t);else if(e!==void 0)process.exitCode=e}function aw(e){return K(e.replace(/[\r\n]+/g," ")).trim()}function cp(e){let t=K(e);if(/^[A-Za-z0-9_./:@+-]+$/.test(t))return t;return`'${t.replaceAll("'","'\\''")}'`}function oue(e){if(e.kind==="project")return[];if(e.kind==="user")return["--scope","user"];return["--profile",cp(e.name)]}function HYe(e,t,r){let i=[t,r],n=oue(e);if(i.some((o)=>o.startsWith("-")))return["allagents","mcp","call",...n,"--help","--",...i.map(cp)].join(" ");return["allagents","mcp","call",cp(t),cp(r),"--help",...n].join(" ")}function GYe(e,t,r){let i=[t,r],n=oue(e);if(i.some((o)=>o.startsWith("-")))return["allagents","mcp","call",...n,"[options]","--",...i.map(cp)].join(" ");return["allagents","mcp","call",cp(t),cp(r),"[options]",...n].join(" ")}function EC(e){return JSON.stringify(e,null,2).split(`
590
590
  `).map((t)=>K(t)).join(`
591
- `)}function ZYe(e,t,r,i){if(r.length===0){if(i===void 0)console.log(`MCP server '${K(t)}' exposes no tools.`);else console.log(`No MCP tools matched '${K(i)}' on server '${K(t)}'.`);return}for(let[n,o]of r.entries()){if(console.log(K(o.name)),o.title!==void 0)console.log(` Title: ${aw(o.title)}`);if(o.description!==void 0)console.log(` Description: ${aw(o.description)}`);if(console.log(` Help: ${HYe(e,t,o.name)}`),n<r.length-1)console.log("")}}function sue(e){return e.inputSchema.required??[]}function KYe(e,t){let r=sue(e);return t.mode==="generated"?{mode:"generated",required:r,options:t.options}:{mode:"input-only",required:r,reason:t.reason}}function JYe(e){let t=e.kind==="enum"?e.enumValues?.map(String).join(" | ")??e.valueKind:e.valueKind;return e.kind==="array"?`${t} (repeatable)`:t}function YYe(e,t,r,i){if(console.log(`Usage: ${GYe(e,t,r.name)}`),console.log(""),console.log(`Tool: ${K(r.name)}`),r.title!==void 0)console.log(`Title: ${aw(r.title)}`);if(r.description!==void 0)console.log(`Description: ${aw(r.description)}`);let n=sue(r);if(console.log(`Required fields: ${n.length>0?n.map(K).join(", "):"none"}`),console.log("Input schema:"),console.log(EC(r.inputSchema)),console.log(""),console.log("Input options:"),console.log(" --input <json> Exact JSON object input"),i.mode==="input-only"){console.log(` Generated options unavailable: ${K(i.reason)}`);return}for(let o of i.options){let s=o.required?"required":"optional",a=o.description===void 0?"":` - ${aw(o.description)}`;console.log(` --${K(o.name)} <${K(JYe(o))}> (${s})${a}`)}}function XYe(e){if(!Array.isArray(e.content)){console.log(EC(e.toolResult));return}let t=e;for(let r of t.content)if(r.type==="text")console.log(K(r.text));else console.log(EC(r));if(t.structuredContent!==void 0)console.log("Structured content:"),console.log(EC(t.structuredContent))}async function QYe(e,t,r){let i=e.server;if(i===void 0)throw new Tr("Usage: allagents mcp tools <server> [options]");let n=await iue(t,i,({client:u,signal:p})=>A4(u,{signal:p}),r);if(n.error!==void 0){cw("mcp tools",n.error,e.output.json),Om(1,n.signal);return}let o=n.result;if(o.operation.status==="rejected"){if(cw("mcp tools",o.operation.error,e.output.json),o.cleanup.status==="rejected")console.error(`Error: ${K(IC(o.cleanup.error))}`);Om(o.operation.error instanceof Tr&&o.cleanup.status==="fulfilled"?2:1,n.signal);return}let s=e.search?.toLowerCase(),a=s===void 0?o.operation.value:o.operation.value.filter((u)=>u.name.toLowerCase().includes(s)||u.title?.toLowerCase().includes(s)===!0||u.description?.toLowerCase().includes(s)===!0),c={destination:lp(t),server:i,...e.search===void 0?{}:{search:e.search},tools:a,total:a.length},l=o.cleanup.status==="rejected"?IC(o.cleanup.error):void 0;if(e.output.json)L4(l===void 0,"mcp tools",c,l);else ZYe(t,i,a,e.search);if(l!==void 0)console.error(`Error: ${K(l)}`);Om(l===void 0?void 0:1,n.signal)}async function eXe(e,t,r){let{server:i,tool:n}=e;if(i===void 0||n===void 0)throw new Tr("Usage: allagents mcp call <server> <tool> [options]");let o=await iue(t,i,async({client:p,signal:d})=>{let f=await A4(p,{signal:d}),m=kle(f,n),g=Vle(m.inputSchema);if(e.help)return{kind:"help",tool:m,classification:g};let h;try{h=Wle(g,e.toolArguments)}catch(v){throw new Tr(v instanceof Error?v.message:String(v))}return{kind:"call",result:await Sle(p,m,h,{signal:d})}},r);if(o.error!==void 0){cw("mcp call",o.error,e.output.json),Om(1,o.signal);return}let s=o.result;if(s.operation.status==="rejected"){if(cw("mcp call",s.operation.error,e.output.json),s.cleanup.status==="rejected")console.error(`Error: ${K(IC(s.cleanup.error))}`);Om(s.operation.error instanceof Tr&&s.cleanup.status==="fulfilled"?2:1,o.signal);return}let a=s.operation.value,c=a.kind==="help"?{destination:lp(t),server:i,tool:n,descriptor:a.tool,input:KYe(a.tool,a.classification)}:{destination:lp(t),server:i,tool:n,result:a.result},l=s.cleanup.status==="rejected"?IC(s.cleanup.error):void 0,u=a.kind==="call"&&a.result.isError===!0;if(e.output.json)L4(!u&&l===void 0,"mcp call",c,l);else if(a.kind==="help")YYe(t,i,a.tool,a.classification);else XYe(a.result);if(l!==void 0)console.error(`Error: ${K(l)}`);Om(u||l!==void 0?1:void 0,o.signal)}function Gle(e){bC(e.json,{...e.jsonFields===void 0?{}:{fields:e.jsonFields},...e.jqExpr===void 0?{}:{jqExpr:e.jqExpr}})}async function AC(e,t=BYe){let r;try{let i=RC(e);if(!i)throw new Tr("Not an MCP runtime command");r=eue(i),r=tue(e,r),VYe(r),Gle(r.output);let n=WYe(r);if(r.kind==="tools")await QYe(r,n,t);else await eXe(r,n,t)}catch(i){let n=i instanceof Error?i:Error(String(i)),o=RC(e)==="tools"?"mcp tools":"mcp call",s=r?.output.json??!1;if(r!==void 0)Gle(r.output);cw(o,n,s),process.exitCode=n instanceof Tr?2:1}}var tXe=pe.command({name:"tools",description:We(iw),args:{server:pe.positional({type:pe.string,displayName:"server"}),search:pe.option({type:pe.optional(pe.string),long:"search",description:"Case-insensitive substring filter over tool name, title, and description"}),...pl},handler:async()=>AC(process.argv.slice(2))}),rXe=pe.command({name:"call",description:We(ow),args:{server:pe.positional({type:pe.string,displayName:"server"}),tool:pe.positional({type:pe.string,displayName:"tool"}),input:pe.option({type:pe.optional(pe.string),long:"input",description:"Exact JSON object input; mutually exclusive with generated tool options"}),...pl},handler:async()=>AC(process.argv.slice(2))}),nXe={name:pe.positional({type:pe.string,displayName:"name"}),commandOrUrl:pe.positional({type:pe.string,displayName:"commandOrUrl"}),transport:pe.option({type:pe.optional(pe.string),long:"transport",description:"Transport: 'http' or 'stdio' (auto-detected from URL if omitted)"}),args:pe.multioption({type:pe.array(pe.string),long:"arg",description:"Argument for stdio command (repeatable)"}),env:pe.multioption({type:pe.array(pe.string),long:"env",short:"e",description:"Environment variable KEY=VALUE (repeatable)"}),header:pe.multioption({type:pe.array(pe.string),long:"header",description:"HTTP header KEY=VALUE (repeatable)"}),client:pe.multioption({type:pe.array(pe.string),long:"client",description:"Client filter (repeatable; comma-separated values accepted)"})},iXe=pe.command({name:"add",description:We(SC),args:{...nXe,...pl,force:pe.flag({long:"force",short:"f",description:"Replace an existing server with the same name"})},handler:async({name:e,commandOrUrl:t,transport:r,args:i,env:n,header:o,client:s,force:a,scope:c,profile:l})=>{let u=up("mcp add",{scope:c,profile:l}),p=FYe("mcp add",t,r,i,n,o,s),d=!L()&&process.stdin.isTTY?Kle():void 0,f=await lw("mcp add",()=>uC({destination:u,name:e,config:p,force:a,...d?{authorization:d}:{}}));Xle("mcp add",u,f.sync,`✓ Added MCP server '${K(e)}' to ${Dm(u)}`,{name:e,config:U4(f.config)})}}),oXe=pe.command({name:"remove",description:We($C),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp remove",{scope:t,profile:r}),n=await lw("mcp remove",()=>pC(i,e));Xle("mcp remove",i,n,`✓ Removed MCP server '${K(e)}' from ${Dm(i)}`,{name:e})}}),sXe=pe.command({name:"reauth",description:We(CC),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp reauth",{scope:t,profile:r});if(L()||!process.stdin.isTTY)Gi("mcp reauth","OAuth login requires an interactive terminal");await lw("mcp reauth",()=>dC(i,e,Kle())),console.log(`✓ Reauthenticated MCP server '${K(e)}' in ${Dm(i)}`)}}),aXe=pe.command({name:"proxy",description:"Expose a remote HTTP MCP server locally over stdio",args:{serverUrl:pe.positional({type:pe.string,displayName:"serverUrl"}),header:pe.multioption({type:pe.array(pe.string),long:"header",description:"HTTP header KEY=VALUE (repeatable)"}),headerEnv:pe.multioption({type:pe.array(pe.string),long:"header-env",description:"HTTP header KEY=ENV_VAR reference (repeatable)"}),profile:pe.option({type:pe.optional(pe.string),long:"profile",description:"Profile-owned OAuth credential scope"})},handler:async({serverUrl:e,header:t,headerEnv:r,profile:i})=>{let n=tv(t,"--header");if("error"in n)Gi("mcp proxy",n.error);let o=tv(r,"--header-env");if("error"in o)Gi("mcp proxy",o.error);let s={};for(let[c,l]of Object.entries(o.values)){let p=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/.exec(l)?.[1]??l;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(p))Gi("mcp proxy",`Invalid environment variable '${l}' for header '${c}'`);s[c]=`\${${p}}`}let a=i===void 0?void 0:up("mcp proxy",{profile:i});await uX(e,{...n.values,...s},{...a?.kind==="profile"?{profile:a.name}:{}})}}),cXe=pe.command({name:"list",description:We(xC),args:pl,handler:async({scope:e,profile:t})=>{let r=up("mcp list",{scope:e,profile:t}),i=await lw("mcp list",()=>fC(r)),n=Object.keys(i),o=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,U4(a)]));if(L()){H({success:!0,command:"mcp list",data:{destination:lp(r),servers:o,total:n.length}});return}if(n.length===0){console.log(`No MCP servers defined in ${Dm(r)}.`),console.log(""),console.log("Add one with:"),console.log(" allagents mcp add <name> <commandOrUrl>");return}console.log(`MCP servers in ${Dm(r)} (${n.length}):`),console.log("");for(let s of n){let a=o[s];if(!a)continue;for(let c of LYe(s,a))console.log(` ${c}`);console.log("")}}}),lXe=pe.command({name:"get",description:We(PC),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp get",{scope:t,profile:r}),n=await zYe("mcp get",i,e);if(!n)Gi("mcp get",`MCP server '${e}' not found in ${Dm(i)}`);let o=U4(n);if(L()){H({success:!0,command:"mcp get",data:{destination:lp(i),name:e,config:o}});return}console.log(ze({[e]:o},{lineWidth:-1}).trimEnd())}}),uXe=pe.command({name:"update",description:We(_C),args:{offline:pe.flag({long:"offline",description:"Use cached plugins without fetching from remote"}),...pl},handler:async({offline:e,scope:t,profile:r})=>{let i=up("mcp update",{scope:t,profile:r}),n=await lw("mcp update",()=>$m(i,{offline:e}));if(L()){H({success:!0,command:"mcp update",data:{destination:lp(i),...n.kind==="mcp"?{mcpResults:n.result.mcpResults,warnings:n.result.warnings}:{sync:Jle(n)}}});return}if(n.kind==="profile"){if(i.kind==="profile")Yle(i,n);return}if(!Object.values(n.result.mcpResults).some((s)=>s&&(s.added>0||s.overwritten>0||s.removed>0||s.skipped>0)))console.log("No MCP server changes.");else for(let[s,a]of Object.entries(n.result.mcpResults)){if(!a)continue;let c=La(a,s);if(c.length>0){for(let l of c)console.log(l);console.log("")}}if(n.result.warnings.length>0){console.log("Warnings:");for(let s of n.result.warnings)console.log(` ⚠ ${s}`)}}}),aue=Dn({name:"mcp",description:"Manage MCP servers for AI clients",cmds:{add:iXe,reauth:sXe,tools:tXe,call:rXe,proxy:aXe,remove:oXe,list:cXe,get:lXe,update:uXe}},["proxy"]);hn();ki();Vc();vi();Ir();wa();OC();Oa();pp();va();Wo();H4();var ge=Ut(ts(),1);var TC={command:"plugin marketplace list",description:"List registered marketplaces",whenToUse:"To see which plugin marketplaces are currently registered on your system",examples:["allagents plugin marketplace list"],expectedOutput:"Shows each marketplace with source, path, and last updated date. If none registered, shows well-known marketplace suggestions.",outputSchema:{marketplaces:[{name:"string",source:{type:"string",location:"string"},path:"string",lastUpdated:"string | null"}]}},NC={command:"plugin marketplace add",description:"Add a marketplace from GitHub URL, owner/repo, local path, or well-known name",whenToUse:"To register a new marketplace so its plugins become available for installation",examples:["allagents plugin marketplace add official","allagents plugin marketplace add https://github.com/user/marketplace","allagents plugin marketplace add user/marketplace --name custom","allagents plugin marketplace add ../local-marketplace","allagents plugin marketplace add owner/repo --branch feat/v2 --name custom","allagents plugin marketplace add owner/repo --scope project"],expectedOutput:"Confirms the marketplace was added with its name and local path. Re-registering an existing marketplace replaces its source. Exit 1 if the source is invalid or unreachable.",positionals:[{name:"source",type:"string",required:!0,description:"GitHub URL, owner/repo, local path, or well-known marketplace name"}],options:[{flag:"--name",short:"-n",type:"string",description:"Custom name for the marketplace"},{flag:"--branch",short:"-b",type:"string",description:"Branch to checkout after cloning (requires --name)"},{flag:"--scope",short:"-s",type:"string",description:"Scope: user (default) or project"}],outputSchema:{marketplace:{name:"string",path:"string",replaced:"boolean | undefined"}}},MC={command:"plugin marketplace remove",description:"Remove a marketplace from registry (does not delete files)",whenToUse:"To unregister a marketplace you no longer need, without deleting its cached files",examples:["allagents plugin marketplace remove official","allagents plugin marketplace remove custom"],expectedOutput:"Confirms removal from registry and notes that files were not deleted. Exit 1 if marketplace not found.",positionals:[{name:"name",type:"string",required:!0,description:"Name of the marketplace to remove"}],outputSchema:{name:"string",path:"string"}},jC={command:"plugin marketplace update",description:"Update marketplace(s) from remote",whenToUse:"To pull the latest plugin definitions from remote marketplace repositories",examples:["allagents plugin marketplace update","allagents plugin marketplace update official"],expectedOutput:"Shows update status per marketplace. Exit 0 if all succeed, exit 1 if any fail.",positionals:[{name:"name",type:"string",required:!1,description:"Specific marketplace to update (updates all if omitted)"}],outputSchema:{results:[{name:"string",success:"boolean",error:"string | undefined"}],succeeded:"number",failed:"number"}},FC={command:"plugin marketplace browse",description:"Browse available plugins in a marketplace",whenToUse:"To discover and browse available plugins in a specific marketplace before installing",examples:["allagents plugin marketplace browse official","allagents plugin marketplace browse superpowers"],expectedOutput:"Lists all plugins in the marketplace with descriptions and install status. Shows total count.",positionals:[{name:"name",type:"string",required:!0,description:"Name of the marketplace to browse"}],outputSchema:{marketplace:"string",plugins:[{name:"string",description:"string | null",installed:"boolean",scope:"string | null"}],total:"number",installed:"number"}},zC={command:"plugin list",description:"List declared plugins with durable ownership and live state",whenToUse:"To distinguish configured files and Pi/OMP native resources from what is installed, disabled, missing, retained, or uncertain in each scope",examples:["allagents plugin list"],expectedOutput:"Merges declarations, AllAgents ownership/provenance, and exact live native observation. Native inspection failures retain partial results and exit 1.",outputSchema:{plugins:[{name:"string",spec:"string",marketplace:"string",scope:"string",kind:"string",clients:"string[] | undefined",nativeClients:"string[] | undefined",nativeResources:[{client:"string",scope:"user | project",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"string",phase:"inspection",changed:"boolean",declared:"boolean",ownership:"managed | referenced | uncertain | none",error:"string | undefined"}]}],total:"number"}},UC={command:"plugin validate",description:"Validate plugin structure at the given path",whenToUse:"When developing a plugin, to check that its structure conforms to the expected format",examples:["allagents plugin validate ./my-plugin","allagents plugin validate ../shared-plugins/eslint-config"],expectedOutput:"Reports validation results. Exit 0 if valid, exit 1 if structure errors are found.",positionals:[{name:"path",type:"string",required:!0,description:"Path to the plugin directory to validate"}],outputSchema:{path:"string",valid:"boolean",message:"string"}},LC={command:"plugin install",description:"Install a file plugin or ordinary Pi/OMP native resource with an explicit scope and client target.",whenToUse:"To review or explicitly select a plugin installation target before native preflight, declaration write, and sync",examples:["allagents plugin install my-plugin@official","allagents plugin install npm:pi-extension --scope user --client pi --yes","allagents plugin install my-plugin@official --scope project --client claude,codex"],expectedOutput:"Interactive human installs summarize and confirm the target; automation preserves the existing JSON and success output.",positionals:[{name:"plugin",type:"string",required:!0,description:"Plugin identifier (plugin@marketplace, GitHub URL, or local path)"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default) or "user"'},{flag:"--client",short:"-c",type:"string",description:"Comma-separated clients for this plugin"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts using configured or default scope and clients"},{flag:"--skill",type:"string",description:"Only enable a specific skill (repeatable)"}],outputSchema:{plugin:"string",scope:"string",autoRegistered:"string | null",replaced:"boolean | undefined",syncResult:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}]}}},BC={command:"plugin uninstall",description:"Remove a declaration and safely reconcile its scoped resources",whenToUse:"To remove a project/user declaration or retry retained native cleanup after the declaration is already absent",examples:["allagents plugin uninstall my-plugin@official","allagents plugin uninstall npm:pi-extension --scope user","allagents plugin uninstall my-plugin@official --scope user"],expectedOutput:"Reports declaration removal separately, removes only corroborated AllAgents-managed native resources in the selected scope, retains referenced/uncertain resources, and exits 1 on failed or unknown cleanup.",positionals:[{name:"plugin",type:"string",required:!0,description:"Plugin identifier to uninstall"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default) or "user"'}],outputSchema:{plugin:"string",scopes:["user | project"],declarations:[{scope:"user | project",action:"removed | absent | failed",error:"string | undefined"}],syncResults:{project:"sync result | undefined",user:"sync result | undefined"}}},qC={command:"plugin update",description:"Update only selected file and ordinary native resources",whenToUse:"To update one declared plugin or all selected-scope plugins while targeting each Pi/OMP adapter by exact identity and scope",examples:["allagents plugin update","allagents plugin update my-plugin@official","allagents plugin update npm:pi-extension --scope user","allagents plugin update --scope all"],expectedOutput:"On a TTY, checks each source without mutating it, reports the found update count, then prints a persistent source line before each applied update and its result as it settles; a source already current is reported as skipped. JSON and redirected output remain one-shot and batched. Reports per-scope sync/native outcomes and exits 1 if any pass fails.",positionals:[{name:"plugin",type:"string",required:!1,description:"Specific plugin to update (updates all if omitted)"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default), "user", or "all"'}],outputSchema:{results:[{plugin:"string",success:"boolean",action:"string",error:"string | undefined"}],updated:"number",skipped:"number",failed:"number",syncResults:{project:"sync result | undefined",user:"sync result | undefined"}}};hw();nt();hn();wa();X4();Oa();Vc();ki();Ir();vi();va();or();it();Lr();Jf();cl();var xe=Ut(ts(),1);import{existsSync as Spe}from"node:fs";import{readFile as $pe}from"node:fs/promises";import{join as d_}from"node:path";Wo();ZC();XC();var vw={command:"skill list",description:"List all skills from installed plugins",whenToUse:"To see available skills and their enabled/disabled status",examples:["allagents skill list","allagents skill list --scope user","allagents --json=name,plugin skill list"],expectedOutput:"Lists skills grouped by plugin with enabled/disabled status",options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'}],outputSchema:{skills:[{name:"string",plugin:"string",disabled:"boolean"}]},jsonFields:["name","plugin","disabled"]},ww={command:"skill remove",description:"Disable a skill (exclude from sync)",whenToUse:"To prevent a specific skill from being synced to your workspace",examples:["allagents skill remove brainstorming","allagents skill remove brainstorming --plugin superpowers","allagents skill remove brainstorming --scope user"],expectedOutput:"Confirms skill was disabled and runs sync",positionals:[{name:"skill",type:"string",required:!0,description:"Skill name to disable"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'},{flag:"--plugin",short:"-p",type:"string",description:"Plugin name (required if skill exists in multiple plugins)"}],outputSchema:{skill:"string",plugin:"string",syncResult:{copied:"number",failed:"number"}}},bw={command:"skill update",description:"Update installed skills and safely reconcile skills deleted upstream",whenToUse:"To refresh project or user skills while preserving local copies unless an interactive deletion is explicitly confirmed",examples:["allagents skill update","allagents skill update code-review glow-api","allagents skill update --scope user","allagents skill update --scope all","allagents skill update --yes","allagents --json skill update --scope project"],expectedOutput:"On a TTY, prints one persistent Updating line per source and its result as it settles without exposing internal phases; JSON and redirected output remain one-shot and batched. Reports updated, removed, retained, skipped, failed, or cancelled refresh units.",positionals:[{name:"skills",type:"string",required:!1,description:"Optional installed skill names or qualified subpaths to update"}],options:[{flag:"--scope",short:"-s",type:"string",description:"Scope: project, user, or all"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts (deleted-upstream skills are retained, not removed)"}],outputSchema:{scopes:["string"],results:[{id:"string",source:"string",status:"string",error:"string?"}],syncedScopes:["string"],skippedLocalSources:["string"],summary:{updated:"number",removed:"number",retained:"number",skipped:"number",failed:"number",cancelled:"number"}},jsonFields:["id","source","status","error"]},kw={command:"skill search",description:"Search GitHub for skills by querying SKILL.md files via the Code Search API. Results are ranked by relevance, with skill-name matches first. In TTY mode, shows a filter-as-you-type multi-select picker and offers to install the selected skills.",whenToUse:'To discover available skills from public GitHub repositories without leaving the CLI. Bridges "I want a skill that does X" → install.',examples:["allagents skill search terraform","allagents skill pr-search",'allagents skill "pr search"',"allagents skill search terraform --owner hashicorp","allagents skill search docs --page 2 --limit 10","allagents --json skill search docs --limit 5"],expectedOutput:"Skills ranked by relevance: repo, skill name, stars, description. In TTY mode, followed by a searchable multi-select install prompt.",positionals:[{name:"query",type:"string",required:!0,description:"Search query (≥2 characters)."}],options:[{flag:"--owner",type:"string",description:"Scope to a single GitHub owner (org or user)."},{flag:"--page",type:"string",description:"Result page (1-indexed, default 1)."},{flag:"--limit",type:"string",description:"Results per page (1–100, default 15)."}],outputSchema:{query:"string",items:[{name:"string",namespace:"string",repo:"string",path:"string",description:"string",sha:"string",stars:"number"}],total:"number",truncated:"boolean"}},Sw={command:"skill add",description:"Add a skill from a plugin, or re-enable a previously disabled skill",whenToUse:"To add a skill from a GitHub repo or marketplace plugin, or to re-enable a skill that was previously disabled",examples:["allagents skill add ReScienceLab/opc-skills","allagents skill add reddit --from ReScienceLab/opc-skills","allagents skill add reddit --from ReScienceLab/opc-skills --ref v2","allagents skill add NousResearch/hermes-agent --skill llm-wiki","allagents skill add NousResearch/hermes-agent --skill llm-wiki,dogfood","allagents skill add NousResearch/hermes-agent --list","allagents skill add NousResearch/hermes-agent --all","allagents skill add https://github.com/owner/repo/tree/main/skills/my-skill","allagents skill add brainstorming","allagents skill add brainstorming --plugin superpowers","allagents skill add --list --from rstackjs/agent-skills","allagents skill add --all --from rstackjs/agent-skills"],expectedOutput:"Confirms skill was enabled and runs sync",positionals:[{name:"skill-or-source",type:"string",required:!1,description:"A skill name (re-enable an installed skill, or pair with --from to install from a source); "+"a plugin source without subpath (owner/repo, gh:owner/repo, or https://github.com/owner/repo — "+"installs all skills from that repo without needing any flags); or a deep GitHub URL with a subpath pointing to a specific skill file."}],options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'},{flag:"--client",short:"-c",type:"string",description:"Comma-separated clients for this skill source"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts using configured or default scope and clients"},{flag:"--plugin",short:"-p",type:"string",description:"Plugin name (required if skill exists in multiple plugins)"},{flag:"--from",short:"-f",type:"string",description:"Plugin source (GitHub URL, owner/repo, or plugin@marketplace) to install the skill from. Omit when the positional is already a source."},{flag:"--skill",type:"string",description:"Comma-separated skill names to install when the positional is a plugin source (e.g., `skill add owner/repo --skill foo,bar`)."},{flag:"--ref",type:"string",description:"Git tag or branch to use for the source. Mutually exclusive with an inline @ref."},{flag:"--list",short:"-l",type:"boolean",description:"List skills available at the source without installing"},{flag:"--all",type:"boolean",description:"Install every skill from the source"}],outputSchema:{skill:"string",plugin:"string",syncResult:{copied:"number",failed:"number"},requestedRef:"string?"}};QC();s_();hw();or();var Zi=Ut(ts(),1);Wo();s_();class a_ extends Error{}function ype(e,t){let r=K(t);switch(e.status){case"updated":console.log(`${at.green("✓")} Updated ${r}`);break;case"removed":console.log(`${at.green("✓")} Removed deleted skills and updated ${r}`);break;case"retained":console.log(`${at.yellow("!")} Kept local copies and skipped updates for ${r}`);break;case"skipped":console.log(`${at.dim("–")} Skipped ${r}`);break;case"cancelled":console.log(`${at.yellow("!")} Update cancelled before changes`);break;case"failed":console.error(`${at.red("✗")} Failed ${r}${e.error?`: ${K(e.error)}`:""}`);break}}function MQe(e){let t=new Map;for(let i of e)for(let n of[...i.survivors,...i.deleted])t.set(n.name,(t.get(n.name)??0)+1);let r=new Map;for(let i of e)for(let n of[...i.survivors,...i.deleted]){let o=t.get(n.name)===1?n.name:`${n.name} (${n.scope}, ${En(n.source)}:${n.subpath})`;r.set(n,K(o))}return r}function c_(e,t){return t.get(e)??K(e.name)}function jQe(e,t){for(let r of e.survivors)console.log(`Updating ${c_(r,t)}…`);for(let r of e.deleted)console.log(`Removing ${c_(r,t)}…`)}function FQe(e,t,r){if(e.status==="updated"||e.status==="removed"){for(let i of t?.survivors??[])console.log(` ${at.green("✓")} Updated ${c_(i,r)}`);if(e.status==="removed")for(let i of t?.deleted??[])console.log(` ${at.green("✓")} Removed ${c_(i,r)}`);if((t?.survivors.length??0)+(t?.deleted.length??0)>0)return}ype(e,t?u6(t):e.id)}var vpe=Zi.command({name:"update",description:We(bw),args:{skills:Zi.restPositionals({type:Zi.string,displayName:"skills"}),scope:Zi.option({type:Zi.optional(Zi.string),long:"scope",short:"s",description:"Scope: project, user, or all"}),yes:Zi.flag({long:"yes",short:"y",description:"Run without prompts (deleted-upstream skills are retained)"})},handler:async({skills:e,scope:t,yes:r})=>{try{let i=process.cwd(),n=L(),o=Boolean(process.stdout.isTTY)&&!n,s=Boolean(process.stdout.isTTY&&process.stdin.isTTY)&&!n&&!r,a=t;if(a!==void 0&&!["project","user","all"].includes(a))throw new a_(`Invalid scope '${a}'. Expected project, user, or all.`);if(!a&&s){let b=await Promise.resolve().then(() => (jr(),Qt)),k=await b.select({message:"Update scope",options:[{value:"project",label:"Project"},{value:"user",label:"User"},{value:"all",label:"All"}],initialValue:dp(i)?"project":"user"});if(b.isCancel(k)){b.cancel("Skill update cancelled");return}a=k}a??=dp(i)?"project":"user";let c=spe(a);if(!n&&!o)console.log("Checking for skill updates…");let l=await i_(i,c),u=ape(l,c,e);if(u.length>0)throw new a_(`No enabled installed skill matched: ${u.join(", ")}`);let p=await fpe({workspacePath:i,scopes:c,...e.length>0&&{filters:e},...o&&{onUnitCheckStart:(b)=>console.log(`Checking skills from source: ${K(u6(b))}`)}},l),d=n_(p.plan);if(s){d={};let b=await Promise.resolve().then(() => (jr(),Qt));for(let k of p.plan.units){if(k.deleted.length===0)continue;let A=K(ml(k));if(k.blockedByOutOfScope){d[k.id]="retain",b.log.warn(`${A} also backs deleted skills outside the selected scope. Local copies will be kept and this source will not be updated. Rerun with --scope all to review them together.`);continue}let N=k.installations.filter((O)=>k.removedInstallationIds.includes(O.id)),C=N.length>0?`The following installed plugin entries were deleted from ${A} upstream:`:`The following skills from ${A} appear to have been deleted upstream:`,P=k.deleted.map((O)=>` • ${K(O.pluginName)}:${K(O.subpath)} (${K(O.scope)})`);b.log.warn(`${C}
591
+ `)}function ZYe(e,t,r,i){if(r.length===0){if(i===void 0)console.log(`MCP server '${K(t)}' exposes no tools.`);else console.log(`No MCP tools matched '${K(i)}' on server '${K(t)}'.`);return}for(let[n,o]of r.entries()){if(console.log(K(o.name)),o.title!==void 0)console.log(` Title: ${aw(o.title)}`);if(o.description!==void 0)console.log(` Description: ${aw(o.description)}`);if(console.log(` Help: ${HYe(e,t,o.name)}`),n<r.length-1)console.log("")}}function sue(e){return e.inputSchema.required??[]}function KYe(e,t){let r=sue(e);return t.mode==="generated"?{mode:"generated",required:r,options:t.options}:{mode:"input-only",required:r,reason:t.reason}}function JYe(e){let t=e.kind==="enum"?e.enumValues?.map(String).join(" | ")??e.valueKind:e.valueKind;return e.kind==="array"?`${t} (repeatable)`:t}function YYe(e,t,r,i){if(console.log(`Usage: ${GYe(e,t,r.name)}`),console.log(""),console.log(`Tool: ${K(r.name)}`),r.title!==void 0)console.log(`Title: ${aw(r.title)}`);if(r.description!==void 0)console.log(`Description: ${aw(r.description)}`);let n=sue(r);if(console.log(`Required fields: ${n.length>0?n.map(K).join(", "):"none"}`),console.log("Input schema:"),console.log(EC(r.inputSchema)),console.log(""),console.log("Input options:"),console.log(" --input <json> Exact JSON object input"),i.mode==="input-only"){console.log(` Generated options unavailable: ${K(i.reason)}`);return}for(let o of i.options){let s=o.required?"required":"optional",a=o.description===void 0?"":` - ${aw(o.description)}`;console.log(` --${K(o.name)} <${K(JYe(o))}> (${s})${a}`)}}function XYe(e){if(!Array.isArray(e.content)){console.log(EC(e.toolResult));return}let t=e;for(let r of t.content)if(r.type==="text")console.log(K(r.text));else console.log(EC(r));if(t.structuredContent!==void 0)console.log("Structured content:"),console.log(EC(t.structuredContent))}async function QYe(e,t,r){let i=e.server;if(i===void 0)throw new Tr("Usage: allagents mcp tools <server> [options]");let n=await iue(t,i,({client:u,signal:p})=>A4(u,{signal:p}),r);if(n.error!==void 0){cw("mcp tools",n.error,e.output.json),Om(1,n.signal);return}let o=n.result;if(o.operation.status==="rejected"){if(cw("mcp tools",o.operation.error,e.output.json),o.cleanup.status==="rejected")console.error(`Error: ${K(IC(o.cleanup.error))}`);Om(o.operation.error instanceof Tr&&o.cleanup.status==="fulfilled"?2:1,n.signal);return}let s=e.search?.toLowerCase(),a=s===void 0?o.operation.value:o.operation.value.filter((u)=>u.name.toLowerCase().includes(s)||u.title?.toLowerCase().includes(s)===!0||u.description?.toLowerCase().includes(s)===!0),c={destination:lp(t),server:i,...e.search===void 0?{}:{search:e.search},tools:a,total:a.length},l=o.cleanup.status==="rejected"?IC(o.cleanup.error):void 0;if(e.output.json)L4(l===void 0,"mcp tools",c,l);else ZYe(t,i,a,e.search);if(l!==void 0)console.error(`Error: ${K(l)}`);Om(l===void 0?void 0:1,n.signal)}async function eXe(e,t,r){let{server:i,tool:n}=e;if(i===void 0||n===void 0)throw new Tr("Usage: allagents mcp call <server> <tool> [options]");let o=await iue(t,i,async({client:p,signal:d})=>{let f=await A4(p,{signal:d}),m=kle(f,n),g=Vle(m.inputSchema);if(e.help)return{kind:"help",tool:m,classification:g};let h;try{h=Wle(g,e.toolArguments)}catch(v){throw new Tr(v instanceof Error?v.message:String(v))}return{kind:"call",result:await Sle(p,m,h,{signal:d})}},r);if(o.error!==void 0){cw("mcp call",o.error,e.output.json),Om(1,o.signal);return}let s=o.result;if(s.operation.status==="rejected"){if(cw("mcp call",s.operation.error,e.output.json),s.cleanup.status==="rejected")console.error(`Error: ${K(IC(s.cleanup.error))}`);Om(s.operation.error instanceof Tr&&s.cleanup.status==="fulfilled"?2:1,o.signal);return}let a=s.operation.value,c=a.kind==="help"?{destination:lp(t),server:i,tool:n,descriptor:a.tool,input:KYe(a.tool,a.classification)}:{destination:lp(t),server:i,tool:n,result:a.result},l=s.cleanup.status==="rejected"?IC(s.cleanup.error):void 0,u=a.kind==="call"&&a.result.isError===!0;if(e.output.json)L4(!u&&l===void 0,"mcp call",c,l);else if(a.kind==="help")YYe(t,i,a.tool,a.classification);else XYe(a.result);if(l!==void 0)console.error(`Error: ${K(l)}`);Om(u||l!==void 0?1:void 0,o.signal)}function Gle(e){bC(e.json,{...e.jsonFields===void 0?{}:{fields:e.jsonFields},...e.jqExpr===void 0?{}:{jqExpr:e.jqExpr}})}async function AC(e,t=BYe){let r;try{let i=RC(e);if(!i)throw new Tr("Not an MCP runtime command");r=eue(i),r=tue(e,r),VYe(r),Gle(r.output);let n=WYe(r);if(r.kind==="tools")await QYe(r,n,t);else await eXe(r,n,t)}catch(i){let n=i instanceof Error?i:Error(String(i)),o=RC(e)==="tools"?"mcp tools":"mcp call",s=r?.output.json??!1;if(r!==void 0)Gle(r.output);cw(o,n,s),process.exitCode=n instanceof Tr?2:1}}var tXe=pe.command({name:"tools",description:He(iw),args:{server:pe.positional({type:pe.string,displayName:"server"}),search:pe.option({type:pe.optional(pe.string),long:"search",description:"Case-insensitive substring filter over tool name, title, and description"}),...pl},handler:async()=>AC(process.argv.slice(2))}),rXe=pe.command({name:"call",description:He(ow),args:{server:pe.positional({type:pe.string,displayName:"server"}),tool:pe.positional({type:pe.string,displayName:"tool"}),input:pe.option({type:pe.optional(pe.string),long:"input",description:"Exact JSON object input; mutually exclusive with generated tool options"}),...pl},handler:async()=>AC(process.argv.slice(2))}),nXe={name:pe.positional({type:pe.string,displayName:"name"}),commandOrUrl:pe.positional({type:pe.string,displayName:"commandOrUrl"}),transport:pe.option({type:pe.optional(pe.string),long:"transport",description:"Transport: 'http' or 'stdio' (auto-detected from URL if omitted)"}),args:pe.multioption({type:pe.array(pe.string),long:"arg",description:"Argument for stdio command (repeatable)"}),env:pe.multioption({type:pe.array(pe.string),long:"env",short:"e",description:"Environment variable KEY=VALUE (repeatable)"}),header:pe.multioption({type:pe.array(pe.string),long:"header",description:"HTTP header KEY=VALUE (repeatable)"}),client:pe.multioption({type:pe.array(pe.string),long:"client",description:"Client filter (repeatable; comma-separated values accepted)"})},iXe=pe.command({name:"add",description:He(SC),args:{...nXe,...pl,force:pe.flag({long:"force",short:"f",description:"Replace an existing server with the same name"})},handler:async({name:e,commandOrUrl:t,transport:r,args:i,env:n,header:o,client:s,force:a,scope:c,profile:l})=>{let u=up("mcp add",{scope:c,profile:l}),p=FYe("mcp add",t,r,i,n,o,s),d=!L()&&process.stdin.isTTY?Kle():void 0,f=await lw("mcp add",()=>uC({destination:u,name:e,config:p,force:a,...d?{authorization:d}:{}}));Xle("mcp add",u,f.sync,`✓ Added MCP server '${K(e)}' to ${Dm(u)}`,{name:e,config:U4(f.config)})}}),oXe=pe.command({name:"remove",description:He($C),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp remove",{scope:t,profile:r}),n=await lw("mcp remove",()=>pC(i,e));Xle("mcp remove",i,n,`✓ Removed MCP server '${K(e)}' from ${Dm(i)}`,{name:e})}}),sXe=pe.command({name:"reauth",description:He(CC),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp reauth",{scope:t,profile:r});if(L()||!process.stdin.isTTY)Gi("mcp reauth","OAuth login requires an interactive terminal");await lw("mcp reauth",()=>dC(i,e,Kle())),console.log(`✓ Reauthenticated MCP server '${K(e)}' in ${Dm(i)}`)}}),aXe=pe.command({name:"proxy",description:"Expose a remote HTTP MCP server locally over stdio",args:{serverUrl:pe.positional({type:pe.string,displayName:"serverUrl"}),header:pe.multioption({type:pe.array(pe.string),long:"header",description:"HTTP header KEY=VALUE (repeatable)"}),headerEnv:pe.multioption({type:pe.array(pe.string),long:"header-env",description:"HTTP header KEY=ENV_VAR reference (repeatable)"}),profile:pe.option({type:pe.optional(pe.string),long:"profile",description:"Profile-owned OAuth credential scope"})},handler:async({serverUrl:e,header:t,headerEnv:r,profile:i})=>{let n=tv(t,"--header");if("error"in n)Gi("mcp proxy",n.error);let o=tv(r,"--header-env");if("error"in o)Gi("mcp proxy",o.error);let s={};for(let[c,l]of Object.entries(o.values)){let p=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/.exec(l)?.[1]??l;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(p))Gi("mcp proxy",`Invalid environment variable '${l}' for header '${c}'`);s[c]=`\${${p}}`}let a=i===void 0?void 0:up("mcp proxy",{profile:i});await uX(e,{...n.values,...s},{...a?.kind==="profile"?{profile:a.name}:{}})}}),cXe=pe.command({name:"list",description:He(xC),args:pl,handler:async({scope:e,profile:t})=>{let r=up("mcp list",{scope:e,profile:t}),i=await lw("mcp list",()=>fC(r)),n=Object.keys(i),o=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,U4(a)]));if(L()){H({success:!0,command:"mcp list",data:{destination:lp(r),servers:o,total:n.length}});return}if(n.length===0){console.log(`No MCP servers defined in ${Dm(r)}.`),console.log(""),console.log("Add one with:"),console.log(" allagents mcp add <name> <commandOrUrl>");return}console.log(`MCP servers in ${Dm(r)} (${n.length}):`),console.log("");for(let s of n){let a=o[s];if(!a)continue;for(let c of LYe(s,a))console.log(` ${c}`);console.log("")}}}),lXe=pe.command({name:"get",description:He(PC),args:{name:pe.positional({type:pe.string,displayName:"name"}),...pl},handler:async({name:e,scope:t,profile:r})=>{let i=up("mcp get",{scope:t,profile:r}),n=await zYe("mcp get",i,e);if(!n)Gi("mcp get",`MCP server '${e}' not found in ${Dm(i)}`);let o=U4(n);if(L()){H({success:!0,command:"mcp get",data:{destination:lp(i),name:e,config:o}});return}console.log(ze({[e]:o},{lineWidth:-1}).trimEnd())}}),uXe=pe.command({name:"update",description:He(_C),args:{offline:pe.flag({long:"offline",description:"Use cached plugins without fetching from remote"}),...pl},handler:async({offline:e,scope:t,profile:r})=>{let i=up("mcp update",{scope:t,profile:r}),n=await lw("mcp update",()=>$m(i,{offline:e}));if(L()){H({success:!0,command:"mcp update",data:{destination:lp(i),...n.kind==="mcp"?{mcpResults:n.result.mcpResults,warnings:n.result.warnings}:{sync:Jle(n)}}});return}if(n.kind==="profile"){if(i.kind==="profile")Yle(i,n);return}if(!Object.values(n.result.mcpResults).some((s)=>s&&(s.added>0||s.overwritten>0||s.removed>0||s.skipped>0)))console.log("No MCP server changes.");else for(let[s,a]of Object.entries(n.result.mcpResults)){if(!a)continue;let c=La(a,s);if(c.length>0){for(let l of c)console.log(l);console.log("")}}if(n.result.warnings.length>0){console.log("Warnings:");for(let s of n.result.warnings)console.log(` ⚠ ${s}`)}}}),aue=Dn({name:"mcp",description:"Manage MCP servers for AI clients",cmds:{add:iXe,reauth:sXe,tools:tXe,call:rXe,proxy:aXe,remove:oXe,list:cXe,get:lXe,update:uXe}},["proxy"]);hn();ki();Vc();vi();Ir();wa();OC();Oa();pp();va();Wo();H4();var ge=Ut(ts(),1);var TC={command:"plugin marketplace list",description:"List registered marketplaces",whenToUse:"To see which plugin marketplaces are currently registered on your system",examples:["allagents plugin marketplace list"],expectedOutput:"Shows each marketplace with source, path, and last updated date. If none registered, shows well-known marketplace suggestions.",outputSchema:{marketplaces:[{name:"string",source:{type:"string",location:"string"},path:"string",lastUpdated:"string | null"}]}},NC={command:"plugin marketplace add",description:"Add a marketplace from GitHub URL, owner/repo, local path, or well-known name",whenToUse:"To register a new marketplace so its plugins become available for installation",examples:["allagents plugin marketplace add official","allagents plugin marketplace add https://github.com/user/marketplace","allagents plugin marketplace add user/marketplace --name custom","allagents plugin marketplace add ../local-marketplace","allagents plugin marketplace add owner/repo --branch feat/v2 --name custom","allagents plugin marketplace add owner/repo --scope project"],expectedOutput:"Confirms the marketplace was added with its name and local path. Re-registering an existing marketplace replaces its source. Exit 1 if the source is invalid or unreachable.",positionals:[{name:"source",type:"string",required:!0,description:"GitHub URL, owner/repo, local path, or well-known marketplace name"}],options:[{flag:"--name",short:"-n",type:"string",description:"Custom name for the marketplace"},{flag:"--branch",short:"-b",type:"string",description:"Branch to checkout after cloning (requires --name)"},{flag:"--scope",short:"-s",type:"string",description:"Scope: user (default) or project"}],outputSchema:{marketplace:{name:"string",path:"string",replaced:"boolean | undefined"}}},MC={command:"plugin marketplace remove",description:"Remove a marketplace from registry (does not delete files)",whenToUse:"To unregister a marketplace you no longer need, without deleting its cached files",examples:["allagents plugin marketplace remove official","allagents plugin marketplace remove custom"],expectedOutput:"Confirms removal from registry and notes that files were not deleted. Exit 1 if marketplace not found.",positionals:[{name:"name",type:"string",required:!0,description:"Name of the marketplace to remove"}],outputSchema:{name:"string",path:"string"}},jC={command:"plugin marketplace update",description:"Update marketplace(s) from remote",whenToUse:"To pull the latest plugin definitions from remote marketplace repositories",examples:["allagents plugin marketplace update","allagents plugin marketplace update official"],expectedOutput:"Shows update status per marketplace. Exit 0 if all succeed, exit 1 if any fail.",positionals:[{name:"name",type:"string",required:!1,description:"Specific marketplace to update (updates all if omitted)"}],outputSchema:{results:[{name:"string",success:"boolean",error:"string | undefined"}],succeeded:"number",failed:"number"}},FC={command:"plugin marketplace browse",description:"Browse available plugins in a marketplace",whenToUse:"To discover and browse available plugins in a specific marketplace before installing",examples:["allagents plugin marketplace browse official","allagents plugin marketplace browse superpowers"],expectedOutput:"Lists all plugins in the marketplace with descriptions and install status. Shows total count.",positionals:[{name:"name",type:"string",required:!0,description:"Name of the marketplace to browse"}],outputSchema:{marketplace:"string",plugins:[{name:"string",description:"string | null",installed:"boolean",scope:"string | null"}],total:"number",installed:"number"}},zC={command:"plugin list",description:"List declared plugins with durable ownership and live state",whenToUse:"To distinguish configured files and Pi/OMP native resources from what is installed, disabled, missing, retained, or uncertain in each scope",examples:["allagents plugin list"],expectedOutput:"Merges declarations, AllAgents ownership/provenance, and exact live native observation. Native inspection failures retain partial results and exit 1.",outputSchema:{plugins:[{name:"string",spec:"string",marketplace:"string",scope:"string",kind:"string",clients:"string[] | undefined",nativeClients:"string[] | undefined",nativeResources:[{client:"string",scope:"user | project",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"string",phase:"inspection",changed:"boolean",declared:"boolean",ownership:"managed | referenced | uncertain | none",error:"string | undefined"}]}],total:"number"}},UC={command:"plugin validate",description:"Validate plugin structure at the given path",whenToUse:"When developing a plugin, to check that its structure conforms to the expected format",examples:["allagents plugin validate ./my-plugin","allagents plugin validate ../shared-plugins/eslint-config"],expectedOutput:"Reports validation results. Exit 0 if valid, exit 1 if structure errors are found.",positionals:[{name:"path",type:"string",required:!0,description:"Path to the plugin directory to validate"}],outputSchema:{path:"string",valid:"boolean",message:"string"}},LC={command:"plugin install",description:"Install a file plugin or ordinary Pi/OMP native resource with an explicit scope and client target.",whenToUse:"To review or explicitly select a plugin installation target before native preflight, declaration write, and sync",examples:["allagents plugin install my-plugin@official","allagents plugin install npm:pi-extension --scope user --client pi --yes","allagents plugin install my-plugin@official --scope project --client claude,codex"],expectedOutput:"Interactive human installs summarize and confirm the target; automation preserves the existing JSON and success output.",positionals:[{name:"plugin",type:"string",required:!0,description:"Plugin identifier (plugin@marketplace, GitHub URL, or local path)"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default) or "user"'},{flag:"--client",short:"-c",type:"string",description:"Comma-separated clients for this plugin"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts using configured or default scope and clients"},{flag:"--skill",type:"string",description:"Only enable a specific skill (repeatable)"}],outputSchema:{plugin:"string",scope:"string",autoRegistered:"string | null",replaced:"boolean | undefined",syncResult:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}]}}},BC={command:"plugin uninstall",description:"Remove a declaration and safely reconcile its scoped resources",whenToUse:"To remove a project/user declaration or retry retained native cleanup after the declaration is already absent",examples:["allagents plugin uninstall my-plugin@official","allagents plugin uninstall npm:pi-extension --scope user","allagents plugin uninstall my-plugin@official --scope user"],expectedOutput:"Reports declaration removal separately, removes only corroborated AllAgents-managed native resources in the selected scope, retains referenced/uncertain resources, and exits 1 on failed or unknown cleanup.",positionals:[{name:"plugin",type:"string",required:!0,description:"Plugin identifier to uninstall"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default) or "user"'}],outputSchema:{plugin:"string",scopes:["user | project"],declarations:[{scope:"user | project",action:"removed | absent | failed",error:"string | undefined"}],syncResults:{project:"sync result | undefined",user:"sync result | undefined"}}},qC={command:"plugin update",description:"Update only selected file and ordinary native resources",whenToUse:"To update one declared plugin or all selected-scope plugins while targeting each Pi/OMP adapter by exact identity and scope",examples:["allagents plugin update","allagents plugin update my-plugin@official","allagents plugin update npm:pi-extension --scope user","allagents plugin update --scope all"],expectedOutput:"On a TTY, checks each source without mutating it, reports the found update count, then prints a persistent source line before each applied update and its result as it settles; a source already current is reported as skipped. JSON and redirected output remain one-shot and batched. Reports per-scope sync/native outcomes and exits 1 if any pass fails.",positionals:[{name:"plugin",type:"string",required:!1,description:"Specific plugin to update (updates all if omitted)"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Installation scope: "project" (default), "user", or "all"'}],outputSchema:{results:[{plugin:"string",success:"boolean",action:"string",error:"string | undefined"}],updated:"number",skipped:"number",failed:"number",syncResults:{project:"sync result | undefined",user:"sync result | undefined"}}};hw();nt();hn();wa();X4();Oa();Vc();ki();Ir();vi();va();or();it();Lr();Jf();cl();var xe=Ut(ts(),1);import{existsSync as Spe}from"node:fs";import{readFile as $pe}from"node:fs/promises";import{join as d_}from"node:path";Wo();ZC();XC();var vw={command:"skill list",description:"List all skills from installed plugins",whenToUse:"To see available skills and their enabled/disabled status",examples:["allagents skill list","allagents skill list --scope user","allagents --json=name,plugin skill list"],expectedOutput:"Lists skills grouped by plugin with enabled/disabled status",options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'}],outputSchema:{skills:[{name:"string",plugin:"string",disabled:"boolean"}]},jsonFields:["name","plugin","disabled"]},ww={command:"skill remove",description:"Disable a skill (exclude from sync)",whenToUse:"To prevent a specific skill from being synced to your workspace",examples:["allagents skill remove brainstorming","allagents skill remove brainstorming --plugin superpowers","allagents skill remove brainstorming --scope user"],expectedOutput:"Confirms skill was disabled and runs sync",positionals:[{name:"skill",type:"string",required:!0,description:"Skill name to disable"}],options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'},{flag:"--plugin",short:"-p",type:"string",description:"Plugin name (required if skill exists in multiple plugins)"}],outputSchema:{skill:"string",plugin:"string",syncResult:{copied:"number",failed:"number"}}},bw={command:"skill update",description:"Update installed skills and safely reconcile skills deleted upstream",whenToUse:"To refresh project or user skills while preserving local copies unless an interactive deletion is explicitly confirmed",examples:["allagents skill update","allagents skill update code-review glow-api","allagents skill update --scope user","allagents skill update --scope all","allagents skill update --yes","allagents --json skill update --scope project"],expectedOutput:"On a TTY, prints one persistent Updating line per source and its result as it settles without exposing internal phases; JSON and redirected output remain one-shot and batched. Reports updated, removed, retained, skipped, failed, or cancelled refresh units.",positionals:[{name:"skills",type:"string",required:!1,description:"Optional installed skill names or qualified subpaths to update"}],options:[{flag:"--scope",short:"-s",type:"string",description:"Scope: project, user, or all"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts (deleted-upstream skills are retained, not removed)"}],outputSchema:{scopes:["string"],results:[{id:"string",source:"string",status:"string",error:"string?"}],syncedScopes:["string"],skippedLocalSources:["string"],summary:{updated:"number",removed:"number",retained:"number",skipped:"number",failed:"number",cancelled:"number"}},jsonFields:["id","source","status","error"]},kw={command:"skill search",description:"Search GitHub for skills by querying SKILL.md files via the Code Search API. Results are ranked by relevance, with skill-name matches first. In TTY mode, shows a filter-as-you-type multi-select picker and offers to install the selected skills.",whenToUse:'To discover available skills from public GitHub repositories without leaving the CLI. Bridges "I want a skill that does X" → install.',examples:["allagents skill search terraform","allagents skill pr-search",'allagents skill "pr search"',"allagents skill search terraform --owner hashicorp","allagents skill search docs --page 2 --limit 10","allagents --json skill search docs --limit 5"],expectedOutput:"Skills ranked by relevance: repo, skill name, stars, description. In TTY mode, followed by a searchable multi-select install prompt.",positionals:[{name:"query",type:"string",required:!0,description:"Search query (≥2 characters)."}],options:[{flag:"--owner",type:"string",description:"Scope to a single GitHub owner (org or user)."},{flag:"--page",type:"string",description:"Result page (1-indexed, default 1)."},{flag:"--limit",type:"string",description:"Results per page (1–100, default 15)."}],outputSchema:{query:"string",items:[{name:"string",namespace:"string",repo:"string",path:"string",description:"string",sha:"string",stars:"number"}],total:"number",truncated:"boolean"}},Sw={command:"skill add",description:"Add a skill from a plugin, or re-enable a previously disabled skill",whenToUse:"To add a skill from a GitHub repo or marketplace plugin, or to re-enable a skill that was previously disabled",examples:["allagents skill add ReScienceLab/opc-skills","allagents skill add reddit --from ReScienceLab/opc-skills","allagents skill add reddit --from ReScienceLab/opc-skills --ref v2","allagents skill add NousResearch/hermes-agent --skill llm-wiki","allagents skill add NousResearch/hermes-agent --skill llm-wiki,dogfood","allagents skill add NousResearch/hermes-agent --list","allagents skill add NousResearch/hermes-agent --all","allagents skill add https://github.com/owner/repo/tree/main/skills/my-skill","allagents skill add brainstorming","allagents skill add brainstorming --plugin superpowers","allagents skill add --list --from rstackjs/agent-skills","allagents skill add --all --from rstackjs/agent-skills"],expectedOutput:"Confirms skill was enabled and runs sync",positionals:[{name:"skill-or-source",type:"string",required:!1,description:"A skill name (re-enable an installed skill, or pair with --from to install from a source); "+"a plugin source without subpath (owner/repo, gh:owner/repo, or https://github.com/owner/repo — "+"installs all skills from that repo without needing any flags); or a deep GitHub URL with a subpath pointing to a specific skill file."}],options:[{flag:"--scope",short:"-s",type:"string",description:'Scope: "project" (default) or "user"'},{flag:"--client",short:"-c",type:"string",description:"Comma-separated clients for this skill source"},{flag:"--yes",short:"-y",type:"boolean",description:"Run without prompts using configured or default scope and clients"},{flag:"--plugin",short:"-p",type:"string",description:"Plugin name (required if skill exists in multiple plugins)"},{flag:"--from",short:"-f",type:"string",description:"Plugin source (GitHub URL, owner/repo, or plugin@marketplace) to install the skill from. Omit when the positional is already a source."},{flag:"--skill",type:"string",description:"Comma-separated skill names to install when the positional is a plugin source (e.g., `skill add owner/repo --skill foo,bar`)."},{flag:"--ref",type:"string",description:"Git tag or branch to use for the source. Mutually exclusive with an inline @ref."},{flag:"--list",short:"-l",type:"boolean",description:"List skills available at the source without installing"},{flag:"--all",type:"boolean",description:"Install every skill from the source"}],outputSchema:{skill:"string",plugin:"string",syncResult:{copied:"number",failed:"number"},requestedRef:"string?"}};QC();s_();hw();or();var Zi=Ut(ts(),1);Wo();s_();class a_ extends Error{}function ype(e,t){let r=K(t);switch(e.status){case"updated":console.log(`${at.green("✓")} Updated ${r}`);break;case"removed":console.log(`${at.green("✓")} Removed deleted skills and updated ${r}`);break;case"retained":console.log(`${at.yellow("!")} Kept local copies and skipped updates for ${r}`);break;case"skipped":console.log(`${at.dim("–")} Skipped ${r}`);break;case"cancelled":console.log(`${at.yellow("!")} Update cancelled before changes`);break;case"failed":console.error(`${at.red("✗")} Failed ${r}${e.error?`: ${K(e.error)}`:""}`);break}}function MQe(e){let t=new Map;for(let i of e)for(let n of[...i.survivors,...i.deleted])t.set(n.name,(t.get(n.name)??0)+1);let r=new Map;for(let i of e)for(let n of[...i.survivors,...i.deleted]){let o=t.get(n.name)===1?n.name:`${n.name} (${n.scope}, ${En(n.source)}:${n.subpath})`;r.set(n,K(o))}return r}function c_(e,t){return t.get(e)??K(e.name)}function jQe(e,t){for(let r of e.survivors)console.log(`Updating ${c_(r,t)}…`);for(let r of e.deleted)console.log(`Removing ${c_(r,t)}…`)}function FQe(e,t,r){if(e.status==="updated"||e.status==="removed"){for(let i of t?.survivors??[])console.log(` ${at.green("✓")} Updated ${c_(i,r)}`);if(e.status==="removed")for(let i of t?.deleted??[])console.log(` ${at.green("✓")} Removed ${c_(i,r)}`);if((t?.survivors.length??0)+(t?.deleted.length??0)>0)return}ype(e,t?u6(t):e.id)}var vpe=Zi.command({name:"update",description:He(bw),args:{skills:Zi.restPositionals({type:Zi.string,displayName:"skills"}),scope:Zi.option({type:Zi.optional(Zi.string),long:"scope",short:"s",description:"Scope: project, user, or all"}),yes:Zi.flag({long:"yes",short:"y",description:"Run without prompts (deleted-upstream skills are retained)"})},handler:async({skills:e,scope:t,yes:r})=>{try{let i=process.cwd(),n=L(),o=Boolean(process.stdout.isTTY)&&!n,s=Boolean(process.stdout.isTTY&&process.stdin.isTTY)&&!n&&!r,a=t;if(a!==void 0&&!["project","user","all"].includes(a))throw new a_(`Invalid scope '${a}'. Expected project, user, or all.`);if(!a&&s){let b=await Promise.resolve().then(() => (jr(),Qt)),k=await b.select({message:"Update scope",options:[{value:"project",label:"Project"},{value:"user",label:"User"},{value:"all",label:"All"}],initialValue:dp(i)?"project":"user"});if(b.isCancel(k)){b.cancel("Skill update cancelled");return}a=k}a??=dp(i)?"project":"user";let c=spe(a);if(!n&&!o)console.log("Checking for skill updates…");let l=await i_(i,c),u=ape(l,c,e);if(u.length>0)throw new a_(`No enabled installed skill matched: ${u.join(", ")}`);let p=await fpe({workspacePath:i,scopes:c,...e.length>0&&{filters:e},...o&&{onUnitCheckStart:(b)=>console.log(`Checking skills from source: ${K(u6(b))}`)}},l),d=n_(p.plan);if(s){d={};let b=await Promise.resolve().then(() => (jr(),Qt));for(let k of p.plan.units){if(k.deleted.length===0)continue;let A=K(ml(k));if(k.blockedByOutOfScope){d[k.id]="retain",b.log.warn(`${A} also backs deleted skills outside the selected scope. Local copies will be kept and this source will not be updated. Rerun with --scope all to review them together.`);continue}let N=k.installations.filter((O)=>k.removedInstallationIds.includes(O.id)),C=N.length>0?`The following installed plugin entries were deleted from ${A} upstream:`:`The following skills from ${A} appear to have been deleted upstream:`,P=k.deleted.map((O)=>` • ${K(O.pluginName)}:${K(O.subpath)} (${K(O.scope)})`);b.log.warn(`${C}
592
592
  ${P.join(`
593
- `)}`);let E=await b.confirm({message:N.length>0?`Remove ${N.length} local plugin entr${N.length===1?"y":"ies"} and update the surviving skills? No keeps the local copies and skips every update from this source.`:`Remove ${k.deleted.length} local skill cop${k.deleted.length===1?"y":"ies"} and update the surviving skills? No keeps them and skips every update from this source.`,initialValue:!1});if(b.isCancel(E)){d[k.id]="cancel";break}d[k.id]=E?"remove":"retain"}}let f=new Map,m=0;for(let b of p.plan.units)if(f.set(b.id,b),o)m+=b.survivors.length+b.deleted.length;let g=o?MQe(p.plan.units):new Map;if(o){for(let b of p.inventory.skippedLocalSources)console.log(`${at.dim("–")} Skipped local source ${K(b)}`);if(m>0)console.log(`Found ${m} skill update${m===1?"":"s"}.`),console.log()}let h=(b)=>{let k=f.get(b.id);return k?ml(k):b.id},y=await o_(p,d,i,o?{onUnitApplyStart:(b)=>jQe(b,g),onUnitResult:(b)=>FQe(b,f.get(b.id),g)}:{}),v=gpe(y),w=o?[]:y.units.map((b)=>({...b,source:h(b)}));if(n)H({success:y.success,command:"skill update",data:{scopes:c,results:w,syncedScopes:y.syncedScopes,skippedLocalSources:p.inventory.skippedLocalSources,summary:v}});else{if(!o)for(let b of p.inventory.skippedLocalSources)console.log(`${at.dim("–")} Skipped local source ${K(b)}`);if(!o)for(let b of w)ype(b,b.source);if(y.units.length===0)console.log("No skill updates found.");else if(y.success)console.log(`Done: ${v.updated} updated, ${v.removed} removed, ${v.retained} retained, ${v.skipped} skipped.`)}let x=hpe(y);if(x!==0)process.exit(x)}catch(i){let n=i instanceof Error?i.message:String(i),o=i instanceof a_?2:1;if(L())H({success:!1,command:"skill update",error:n});else console.error(`Error: ${K(n)}`);process.exit(o)}}});function xpe(e){if(wt(e))return"user";if(dp(e))return"project";return"user"}function l_(e,t,r){let i,n,o,s=JC(L()),a=()=>(n??=(async()=>{if(wt(e))return null;let l=d_(e,Z,ee);if(!Spe(l))return null;let u=await tr(l);return{clients:u.clients,plugins:u.plugins}})(),n),c=()=>(o??=(async()=>{let l=await bt();return l?{clients:l.clients,plugins:l.plugins}:null})(),o);return{workspacePath:e,options:r,payload:t,scopeState(l){return l==="user"?c():a()},resolve(l){return i??=Tm({workspacePath:e,declaration:l,action:"Install skills",payload:t,scopeStates:{project:a,user:c},environment:s,...YC(s)&&{prompts:jm()},...r.scope!==void 0&&{scope:r.scope},...r.clients!==void 0&&{clients:r.clients},...r.yes!==void 0&&{yes:r.yes},defaultScope:"project"}),i}}}function zQe(e,t){if(typeof t.prospectiveDeclaration!=="string"&&ae(t.prospectiveDeclaration)===e.source)return t.prospectiveDeclaration;if(t.disposition==="override")return{...e,clients:[...t.clients]};let{clients:r,...i}=e;return i}async function p6(e,t){if(!t)return!1;if(t.plugins?.some((i)=>ae(i)===e))return!0;let r=await qr(e);if(!r)return!1;for(let i of t.plugins??[])if(await qr(ae(i))===r)return!0;return!1}async function Cw(e,t){if(wt(t.workspacePath))return await p6(e,await t.scopeState("user"))?"user":null;let[r,i]=await Promise.all([t.scopeState("project").then((n)=>p6(e,n)).catch(()=>!1),t.scopeState("user").then((n)=>p6(e,n)).catch(()=>!1)]);if(r&&i)return t.options.scope==="user"?"user":"project";if(r)return"project";if(i)return"user";return null}function fp(e,t){return{scope:e,workspacePath:e==="user"?fe():t}}function Ppe(e,t){let r=[];if(e.has("user"))r.push(fp("user",t));if(e.has("project"))r.push(fp("project",t));return r}async function Cpe(e,t){let r=[];if(e.has("user"))r.push(await kt());if(e.has("project"))r.push(await gt(t));let[i,...n]=r;if(!i)throw Error("Cannot sync a skill install without an affected scope.");return n.reduce(Fv,i)}async function Lm(e,t){let r=await t.resolve(e);if(!r)return{status:"cancelled"};let i=zQe(e,r),n={declaration:i,clients:r.clients,...ye(i.source)&&{sourceValidation:"declaration"}},o=r.scope==="user"?await Eu(n):await Cf(n,t.workspacePath);if(!o.success)return{status:"failed",error:o.error??"Unknown error"};return{status:"installed",scope:r.scope,...o.normalizedPlugin&&{normalizedPlugin:o.normalizedPlugin}}}async function UQe(e){let{from:t,requestedRef:r,workspacePath:i,isUser:n}=e;if(!ye(t))return;let o=me(t);if(!o)return;let s=await Rn(t,{...o.branch&&{branch:o.branch}});if(!s.success||!s.resolvedSha)return;let a=n?fe():i,c=t0(`${o.owner}/${o.repo}`);await Jte(a,c,{pluginSpec:c,resolvedRef:s.resolvedRef??o.branch??"HEAD",resolvedSha:s.resolvedSha,...r&&{requestedRef:r}})}async function d6(e){let t=new Set;await Promise.all(e.locations.map((r)=>{let i=`${r.scope}:${r.workspacePath}`;if(t.has(i))return Promise.resolve();return t.add(i),UQe({from:e.from,requestedRef:e.requestedRef,workspacePath:r.workspacePath,isUser:r.scope==="user"})}))}function f6(){if(!L())console.log("Install cancelled. No changes made.")}function m6(e,t){if(!ye(e))return t;let r=me(e);return r?.subpath?d_(t,r.subpath):t}function LQe(e){let t=e.indexOf("/");if(t===-1)return;let r=e.indexOf("@",t);if(r===-1)return;let i=e.slice(r+1),n=i.indexOf("/"),o=n===-1?i:i.slice(0,n);return o.length>0?o:void 0}function BQe(e){if(!ye(e))return null;let t=me(e);if(!t)return null;if(t.subpath){let r=t.subpath.split("/").filter(Boolean);if(r.at(-1)==="SKILL.md"){let n=e.slice(0,-9),o=me(n);if(!o)return null;return{skill:r.at(-2)??t.repo,from:n,parsed:o}}let i=r.at(-1);if(!i)return null;return{skill:i,from:e,parsed:t}}return{skill:t.repo,from:e,parsed:t}}async function qQe(e,t,r,i=Rn){let n=await i(e,{...t.branch&&{branch:t.branch}});if(!n.success)return r;try{let o=await $pe(d_(n.cachePath,"SKILL.md"),"utf-8");return qi(o)?.name??r}catch{return r}}function wpe(e){let t=new Map;for(let r of e){let i={name:r.name,subpath:r.skillSubpath??r.name,disabled:r.disabled},n=t.get(r.pluginName);if(n)n.skills.push(i);else t.set(r.pluginName,{source:r.pluginSource,skills:[i]})}return t}var VQe=xe.command({name:"list",description:We(vw),args:{scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'})},handler:async({scope:e})=>{try{let t=process.cwd(),r=!wt(t)&&dp(t),i=e!=="project",n=e==="project"||!e&&r,o=i?await Gr(fe()):[],s=n?await Gr(t):[],a=new Set(o.map((l)=>`${l.pluginName}:${l.name}`)),c=s.filter((l)=>!a.has(`${l.pluginName}:${l.name}`));if(L()){let l=e==="user"?"user":e==="project"?"project":"all",u=[...o,...c];H({success:!0,command:"skill list",data:{scope:l,skills:u.map((p)=>({name:p.name,plugin:p.pluginName,disabled:p.disabled}))}});return}if(o.length===0&&c.length===0){console.log("No skills found. Install a plugin first with:"),console.log(" allagents plugin install <plugin>");return}if(o.length>0&&e!=="project"){console.log(`
593
+ `)}`);let E=await b.confirm({message:N.length>0?`Remove ${N.length} local plugin entr${N.length===1?"y":"ies"} and update the surviving skills? No keeps the local copies and skips every update from this source.`:`Remove ${k.deleted.length} local skill cop${k.deleted.length===1?"y":"ies"} and update the surviving skills? No keeps them and skips every update from this source.`,initialValue:!1});if(b.isCancel(E)){d[k.id]="cancel";break}d[k.id]=E?"remove":"retain"}}let f=new Map,m=0;for(let b of p.plan.units)if(f.set(b.id,b),o)m+=b.survivors.length+b.deleted.length;let g=o?MQe(p.plan.units):new Map;if(o){for(let b of p.inventory.skippedLocalSources)console.log(`${at.dim("–")} Skipped local source ${K(b)}`);if(m>0)console.log(`Found ${m} skill update${m===1?"":"s"}.`),console.log()}let h=(b)=>{let k=f.get(b.id);return k?ml(k):b.id},y=await o_(p,d,i,o?{onUnitApplyStart:(b)=>jQe(b,g),onUnitResult:(b)=>FQe(b,f.get(b.id),g)}:{}),v=gpe(y),w=o?[]:y.units.map((b)=>({...b,source:h(b)}));if(n)H({success:y.success,command:"skill update",data:{scopes:c,results:w,syncedScopes:y.syncedScopes,skippedLocalSources:p.inventory.skippedLocalSources,summary:v}});else{if(!o)for(let b of p.inventory.skippedLocalSources)console.log(`${at.dim("–")} Skipped local source ${K(b)}`);if(!o)for(let b of w)ype(b,b.source);if(y.units.length===0)console.log("No skill updates found.");else if(y.success)console.log(`Done: ${v.updated} updated, ${v.removed} removed, ${v.retained} retained, ${v.skipped} skipped.`)}let x=hpe(y);if(x!==0)process.exit(x)}catch(i){let n=i instanceof Error?i.message:String(i),o=i instanceof a_?2:1;if(L())H({success:!1,command:"skill update",error:n});else console.error(`Error: ${K(n)}`);process.exit(o)}}});function xpe(e){if(wt(e))return"user";if(dp(e))return"project";return"user"}function l_(e,t,r){let i,n,o,s=JC(L()),a=()=>(n??=(async()=>{if(wt(e))return null;let l=d_(e,Z,ee);if(!Spe(l))return null;let u=await tr(l);return{clients:u.clients,plugins:u.plugins}})(),n),c=()=>(o??=(async()=>{let l=await bt();return l?{clients:l.clients,plugins:l.plugins}:null})(),o);return{workspacePath:e,options:r,payload:t,scopeState(l){return l==="user"?c():a()},resolve(l){return i??=Tm({workspacePath:e,declaration:l,action:"Install skills",payload:t,scopeStates:{project:a,user:c},environment:s,...YC(s)&&{prompts:jm()},...r.scope!==void 0&&{scope:r.scope},...r.clients!==void 0&&{clients:r.clients},...r.yes!==void 0&&{yes:r.yes},defaultScope:"project"}),i}}}function zQe(e,t){if(typeof t.prospectiveDeclaration!=="string"&&ae(t.prospectiveDeclaration)===e.source)return t.prospectiveDeclaration;if(t.disposition==="override")return{...e,clients:[...t.clients]};let{clients:r,...i}=e;return i}async function p6(e,t){if(!t)return!1;if(t.plugins?.some((i)=>ae(i)===e))return!0;let r=await qr(e);if(!r)return!1;for(let i of t.plugins??[])if(await qr(ae(i))===r)return!0;return!1}async function Cw(e,t){if(wt(t.workspacePath))return await p6(e,await t.scopeState("user"))?"user":null;let[r,i]=await Promise.all([t.scopeState("project").then((n)=>p6(e,n)).catch(()=>!1),t.scopeState("user").then((n)=>p6(e,n)).catch(()=>!1)]);if(r&&i)return t.options.scope==="user"?"user":"project";if(r)return"project";if(i)return"user";return null}function fp(e,t){return{scope:e,workspacePath:e==="user"?fe():t}}function Ppe(e,t){let r=[];if(e.has("user"))r.push(fp("user",t));if(e.has("project"))r.push(fp("project",t));return r}async function Cpe(e,t){let r=[];if(e.has("user"))r.push(await kt());if(e.has("project"))r.push(await gt(t));let[i,...n]=r;if(!i)throw Error("Cannot sync a skill install without an affected scope.");return n.reduce(Fv,i)}async function Lm(e,t){let r=await t.resolve(e);if(!r)return{status:"cancelled"};let i=zQe(e,r),n={declaration:i,clients:r.clients,...ye(i.source)&&{sourceValidation:"declaration"}},o=r.scope==="user"?await Eu(n):await Cf(n,t.workspacePath);if(!o.success)return{status:"failed",error:o.error??"Unknown error"};return{status:"installed",scope:r.scope,...o.normalizedPlugin&&{normalizedPlugin:o.normalizedPlugin}}}async function UQe(e){let{from:t,requestedRef:r,workspacePath:i,isUser:n}=e;if(!ye(t))return;let o=me(t);if(!o)return;let s=await Rn(t,{...o.branch&&{branch:o.branch}});if(!s.success||!s.resolvedSha)return;let a=n?fe():i,c=t0(`${o.owner}/${o.repo}`);await Jte(a,c,{pluginSpec:c,resolvedRef:s.resolvedRef??o.branch??"HEAD",resolvedSha:s.resolvedSha,...r&&{requestedRef:r}})}async function d6(e){let t=new Set;await Promise.all(e.locations.map((r)=>{let i=`${r.scope}:${r.workspacePath}`;if(t.has(i))return Promise.resolve();return t.add(i),UQe({from:e.from,requestedRef:e.requestedRef,workspacePath:r.workspacePath,isUser:r.scope==="user"})}))}function f6(){if(!L())console.log("Install cancelled. No changes made.")}function m6(e,t){if(!ye(e))return t;let r=me(e);return r?.subpath?d_(t,r.subpath):t}function LQe(e){let t=e.indexOf("/");if(t===-1)return;let r=e.indexOf("@",t);if(r===-1)return;let i=e.slice(r+1),n=i.indexOf("/"),o=n===-1?i:i.slice(0,n);return o.length>0?o:void 0}function BQe(e){if(!ye(e))return null;let t=me(e);if(!t)return null;if(t.subpath){let r=t.subpath.split("/").filter(Boolean);if(r.at(-1)==="SKILL.md"){let n=e.slice(0,-9),o=me(n);if(!o)return null;return{skill:r.at(-2)??t.repo,from:n,parsed:o}}let i=r.at(-1);if(!i)return null;return{skill:i,from:e,parsed:t}}return{skill:t.repo,from:e,parsed:t}}async function qQe(e,t,r,i=Rn){let n=await i(e,{...t.branch&&{branch:t.branch}});if(!n.success)return r;try{let o=await $pe(d_(n.cachePath,"SKILL.md"),"utf-8");return qi(o)?.name??r}catch{return r}}function wpe(e){let t=new Map;for(let r of e){let i={name:r.name,subpath:r.skillSubpath??r.name,disabled:r.disabled},n=t.get(r.pluginName);if(n)n.skills.push(i);else t.set(r.pluginName,{source:r.pluginSource,skills:[i]})}return t}var VQe=xe.command({name:"list",description:He(vw),args:{scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'})},handler:async({scope:e})=>{try{let t=process.cwd(),r=!wt(t)&&dp(t),i=e!=="project",n=e==="project"||!e&&r,o=i?await Gr(fe()):[],s=n?await Gr(t):[],a=new Set(o.map((l)=>`${l.pluginName}:${l.name}`)),c=s.filter((l)=>!a.has(`${l.pluginName}:${l.name}`));if(L()){let l=e==="user"?"user":e==="project"?"project":"all",u=[...o,...c];H({success:!0,command:"skill list",data:{scope:l,skills:u.map((p)=>({name:p.name,plugin:p.pluginName,disabled:p.disabled}))}});return}if(o.length===0&&c.length===0){console.log("No skills found. Install a plugin first with:"),console.log(" allagents plugin install <plugin>");return}if(o.length>0&&e!=="project"){console.log(`
594
594
  ${at.whiteBright("User Skills:")}`);let l=wpe(o);for(let[u,p]of l){console.log(`
595
595
  ${at.hex("#89b4fa")(u)} (${En(p.source)}):`);for(let d of p.skills){let f=d.disabled?"✗":"✓",m=d.disabled?" (disabled)":"",g=d.subpath!==d.name?d.subpath:d.name;console.log(` ${f} ${g}${m}`)}}}if(c.length>0){console.log(`
596
596
  ${at.whiteBright("Project Skills:")}`);let l=wpe(c);for(let[u,p]of l){console.log(`
597
- ${at.hex("#89b4fa")(u)} (${En(p.source)}):`);for(let d of p.skills){let f=d.disabled?"✗":"✓",m=d.disabled?" (disabled)":"",g=d.subpath!==d.name?d.subpath:d.name;console.log(` ${f} ${g}${m}`)}}}console.log()}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"skill list",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),WQe=xe.command({name:"remove",description:We(ww),args:{skill:xe.positional({type:xe.string,displayName:"skill"}),scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'}),plugin:xe.option({type:xe.optional(xe.string),long:"plugin",short:"p",description:"Plugin name (required if skill exists in multiple plugins)"})},handler:async({skill:e,scope:t,plugin:r})=>{try{let i=t==="user"||!t&&xpe(process.cwd())==="user",n=i?fe():process.cwd(),o=await Gr(n),s=o.filter((u)=>u.name===e);if(s.length===0){let u=[...new Set(o.map((d)=>d.name))].join(", "),p=`Skill '${e}' not found in any installed plugin.
597
+ ${at.hex("#89b4fa")(u)} (${En(p.source)}):`);for(let d of p.skills){let f=d.disabled?"✗":"✓",m=d.disabled?" (disabled)":"",g=d.subpath!==d.name?d.subpath:d.name;console.log(` ${f} ${g}${m}`)}}}console.log()}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"skill list",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),WQe=xe.command({name:"remove",description:He(ww),args:{skill:xe.positional({type:xe.string,displayName:"skill"}),scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'}),plugin:xe.option({type:xe.optional(xe.string),long:"plugin",short:"p",description:"Plugin name (required if skill exists in multiple plugins)"})},handler:async({skill:e,scope:t,plugin:r})=>{try{let i=t==="user"||!t&&xpe(process.cwd())==="user",n=i?fe():process.cwd(),o=await Gr(n),s=o.filter((u)=>u.name===e);if(s.length===0){let u=[...new Set(o.map((d)=>d.name))].join(", "),p=`Skill '${e}' not found in any installed plugin.
598
598
 
599
599
  Available skills: ${u||"none"}`;if(L())H({success:!1,command:"skill remove",error:p}),process.exit(1);console.error(`Error: ${p}`),process.exit(1)}let a=s[0];if(!a)throw Error("Unexpected empty matches array");if(s.length>1){if(!r){let p=s.map((f)=>` - ${f.pluginName} (${f.pluginSource})`).join(`
600
600
  `),d=`'${e}' exists in multiple plugins:
@@ -606,7 +606,7 @@ Available skills: ${f.join(", ")||"none"}`};let m=`${d}@${u}`,g=o?await Cw(m,o):
606
606
 
607
607
  Available skills: ${n||"none"}`}}async function KQe(e){let{isUser:t,workspacePath:r}=e,{skill:i,from:n,sourcePath:o,targetContext:s}=e,a=await sP(o),c=ZQe(i,a);if("error"in c)return{success:!1,error:`${c.error}
608
608
 
609
- Tip: run \`allagents skill add --list --from ${n}\` to see all available skills.`};let l=c.canonical,u=ye(n)?gl(n):Kn(o);if(s){let d=await Cw(n,s);if(d){if(t=d==="user",r=t?fe():s.workspacePath,ye(n)){let g=[...await u_(n,r)];if(!g.includes(l))g.push(l);let h=t?await Af(n,g):await Jy(n,g,r);if(!h.success)return{success:!1,error:`Failed to update plugin '${n}': ${h.error??"Unknown error"}`};return xw({skill:l,pluginName:gl(h.normalizedPlugin??n),isUser:t,workspacePath:r})}return p_({skill:l,pluginName:u,isUser:t,workspacePath:r})}let f=await Lm({source:n,install:"file",skills:[l]},s);if(f.status==="cancelled")return{success:"cancelled"};if(f.status==="failed")return{success:!1,error:`Failed to install plugin '${n}': ${f.error}`};return t=f.scope==="user",r=t?fe():s.workspacePath,xw({skill:l,pluginName:gl(f.normalizedPlugin??u),isUser:t,workspacePath:r})}if(ye(n)){let f=[...await u_(n,r)];if(!f.includes(l))f.push(l);let m=t?await Af(n,f):await Jy(n,f,r);if(!m.success)return{success:!1,error:`Failed to update plugin '${n}': ${m.error??"Unknown error"}`};return xw({skill:l,pluginName:gl(m.normalizedPlugin??n),isUser:t,workspacePath:r})}let p=t?await If(n):await Zy(n,r);if(!p.success){if(!p.error?.includes("already exists")&&!p.error?.includes("duplicates existing"))return{success:!1,error:`Failed to install plugin '${n}': ${p.error??"Unknown error"}`};if(!L())console.log("Plugin already installed.")}return p_({skill:l,pluginName:u,isUser:t,workspacePath:r})}function gl(e){let t=ye(e)?me(e):null;if(t?.subpath){let r=t.subpath.split("/").filter(Boolean),i=r[r.length-1];if(i)return i}return Kn(e)}async function u_(e,t){let r=await qr(e);if(!r)return[];let i=[],n=await Gr(t);for(let o of n){if(o.disabled)continue;if(await qr(o.pluginSource)!==r)continue;if(!i.includes(o.name))i.push(o.name)}return i}async function p_(e){let{skill:t,pluginName:r,isUser:i,workspacePath:n}=e;if(((await Gr(n)).filter((c)=>c.pluginName===r)[0]?.pluginSkillsMode??"none")==="allowlist"){let c=`${r}:${t}`,l=i?await Ss(c):await Sa(c,n);if(!l.success){if(!l.error?.includes("already enabled"))return{success:!1,error:`Failed to enable skill: ${l.error??"Unknown error"}`}}}else{let c=i?await $a(r,"allowlist",[t]):await Uc(r,"allowlist",[t],n);if(!c.success)return{success:!1,error:`Failed to configure skill allowlist: ${c.error??"Unknown error"}`}}return xw({skill:t,pluginName:r,isUser:i,workspacePath:n})}async function xw(e){let{skill:t,pluginName:r,isUser:i,workspacePath:n}=e;if(!L())console.log(`✓ Enabled skill: ${t} (${r})`);let o=i?await kt():await gt(n);if(!o.success)return{success:!1,error:"Sync failed"};return{success:!0,pluginName:r,location:fp(i?"user":"project",i?fe():n),syncResult:{copied:o.totalCopied,failed:o.totalFailed}}}async function kpe(e,t){let r=await sP(e),i=[];for(let n of r){let o=d_(n.skillPath,"SKILL.md"),s="";try{let a=await $pe(o,"utf-8");s=qi(a)?.description??""}catch{}i.push({name:n.name,subpath:n.subpath,description:s,...t&&{pluginName:t}})}return i}async function Epe(e){let t=ye(e)?me(e):null,r=await Rn(e,{...t?.branch&&{branch:t.branch}});if(!r.success)return{success:!1,error:`Failed to fetch '${e}': ${r.error??"Unknown error"}`};let i=m6(e,r.cachePath),n=await sr(i);if(n.success){let s=[];for(let a of n.data.plugins){if(typeof a.source==="object")continue;let c=i0(a.source,i);if(!Spe(c))continue;let l=await kpe(c,a.name);s.push(...l)}return{success:!0,skills:s,isMarketplace:!0}}return{success:!0,skills:await kpe(i),isMarketplace:!1}}async function JQe(e){let{isUser:t,workspacePath:r}=e,{from:i,targetContext:n}=e;if(!(process.stdout.isTTY&&process.stdin.isTTY)||L()||n?.options.yes)return $w(e);let s=await Epe(i);if(!s.success)return{success:!1,error:s.error};if(s.skills.length===0)return{success:!1,error:`No skills found in '${i}'.`};if(s.skills.length===1)return $w(e);let a=await Promise.resolve().then(() => (jr(),Qt));if(s.isMarketplace){let w=s.skills.map((U)=>U.name),x={};for(let U of s.skills){let J=U.pluginName??"Other";if(!x[J])x[J]=[];x[J].push({label:U.name,value:U.name,...U.description?{hint:U.description}:{}})}let b=await a.groupMultiselect({message:`Select skills to install from ${at.bold(i)}`,options:x,initialValues:w,required:!1});if(a.isCancel(b)||b.length===0)return{success:"cancelled"};let k=b;if(k.length===w.length)return $w(e);let A=ye(i)?me(i):null,N=A?`${A.owner}/${A.repo}`:void 0,C=n?.workspacePath??r,P=await rn(A?.repo??i,N,n?C:t?void 0:r),E=P?.key??(A?.branch?`${A.repo}-${A.branch}`:A?.repo??Kn(i));if(!P){let U=t?"user":"project";if(n){let le=await n.resolve({source:i,install:"file",skills:k});if(!le)return{success:"cancelled"};U=le.scope}let J=await Pw({from:i,marketplaceName:E,scope:U,projectWorkspacePath:C});if(!J.success)return J;E=J.marketplaceName,P=await rn(E,N,U==="user"?void 0:C),t=U==="user",r=J.workspacePath}else t=P.scope==="user",r=t?fe():C;let O=await ks(E,t?void 0:r);if(O.plugins.length===0)return{success:!1,error:`No plugins found in marketplace '${E}'.`};let z=[];for(let U of O.plugins){let le=(U.skills?U.skills.map((ut)=>ut.split("/").pop()??"").filter(Boolean):await Aa(U.path)).filter((ut)=>k.includes(ut));if(le.length>0)z.push({pluginName:U.name,skills:le})}if(z.length===0)return{success:!1,error:"No matching skills found in marketplace plugins."};let _=await _pe({from:i,marketplaceName:E,registrationScope:P?.scope??(t?"user":"project"),selections:z,isUser:t,projectWorkspacePath:C,...n&&{targetContext:n}});if(_.success!==!0)return _;let{installed:D,changedScopes:B}=_;if(D.length===0)return{success:!1,error:"No matching skills found in marketplace plugins."};if(!L()){let U=D.reduce((J,le)=>J+le.skills.length,0);console.log(`✓ Enabled ${U} skill(s) across ${D.length} plugin(s)`)}let X=await Cpe(B,C);if(!X.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:D,syncResult:X,locations:Ppe(B,C)}}let c=s.skills.map((w)=>w.name),l=s.skills.map((w)=>({label:w.name,value:w.name,...w.description?{hint:w.description}:{}})),u=await a.autocompleteMultiselect({message:`Select skills to install from ${at.bold(i)}`,options:l,initialValues:c,placeholder:"Type to filter · Space to toggle · Enter to confirm",required:!1});if(a.isCancel(u)||u.length===0)return{success:"cancelled"};let p=u;if(p.length===c.length)return $w(e);let d=ye(i)?me(i):null,f=await Rn(i,{...d?.branch&&{branch:d.branch}});if(!f.success)return{success:!1,error:`Failed to fetch '${i}': ${f.error??"Unknown error"}`};let m=n?await Cw(i,n):null;if(m)t=m==="user",r=t?fe():n?.workspacePath??r;let h=[...m?await u_(i,r):[]];for(let w of p)if(!h.includes(w))h.push(w);let y;if(!m&&n){let w=await Lm({source:i,install:"file",skills:h},n);if(w.status==="cancelled")return{success:"cancelled"};if(w.status==="failed")return{success:!1,error:`Failed to configure skill allowlist: ${w.error}`};t=w.scope==="user",r=t?fe():n.workspacePath,y=gl(w.normalizedPlugin??i)}else{let w=t?await Af(i,h):await Jy(i,h,r);if(!w.success)return{success:!1,error:`Failed to configure skill allowlist: ${w.error??"Unknown error"}`};y=gl(w.normalizedPlugin??i)}console.log(`✓ Enabled ${p.length} skill(s) from ${y}: ${p.join(", ")}`);let v=t?await kt():await gt(r);if(!v.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:y,skills:h}],syncResult:v,locations:[fp(t?"user":"project",r)]}}async function $w(e){let{isUser:t,workspacePath:r}=e,{from:i,targetContext:n}=e;if(!L())console.log(`Installing all skills from ${i}...`);let o=ye(i)?me(i):null,s=await Rn(i,{...o?.branch&&{branch:o.branch}});if(!s.success)return{success:!1,error:`Failed to fetch '${i}': ${s.error??"Unknown error"}`};let a=m6(i,s.cachePath);if((await sr(a)).success)return YQe({from:i,isUser:t,workspacePath:r,cachedPath:s.cachePath,targetContext:n});let l=await Aa(a);if(l.length===0)return{success:!1,error:`No skills found in '${i}'.`};if(n){let m=await Cw(i,n);if(m)t=m==="user",r=t?fe():n.workspacePath;else{let g=await Lm({source:i,install:"file",skills:l},n);if(g.status==="cancelled")return{success:"cancelled"};if(g.status==="failed")return{success:!1,error:`Failed to install plugin '${i}': ${g.error}`};t=g.scope==="user",r=t?fe():n.workspacePath;let h=gl(g.normalizedPlugin??(ye(i)?i:Kn(a)));if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${h}: ${l.join(", ")}`);let y=t?await kt():await gt(r);if(!y.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:h,skills:l}],syncResult:y,locations:[fp(t?"user":"project",r)]}}}if(ye(i)){let g=[...await u_(i,r)];for(let w of l)if(!g.includes(w))g.push(w);let h=t?await Af(i,g):await Jy(i,g,r);if(!h.success)return{success:!1,error:`Failed to configure skill allowlist: ${h.error??"Unknown error"}`};let y=gl(h.normalizedPlugin??i);if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${y}: ${l.join(", ")}`);let v=t?await kt():await gt(r);if(!v.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:y,skills:g}],syncResult:v,locations:[fp(t?"user":"project",r)]}}let u=t?await If(i):await Zy(i,r);if(!u.success){if(!u.error?.includes("already exists")&&!u.error?.includes("duplicates existing"))return{success:!1,error:`Failed to install plugin '${i}': ${u.error??"Unknown error"}`};if(!L())console.log("Plugin already installed.")}let p=Kn(a),d=t?await $a(p,"allowlist",l):await Uc(p,"allowlist",l,r);if(!d.success)return{success:!1,error:`Failed to configure skill allowlist: ${d.error??"Unknown error"}`};if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${p}: ${l.join(", ")}`);let f=t?await kt():await gt(r);if(!f.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:p,skills:l}],syncResult:f,locations:[fp(t?"user":"project",r)]}}async function YQe(e){let{isUser:t,workspacePath:r}=e,{from:i,cachedPath:n,targetContext:o}=e,s=ye(i)?me(i):null,a=s?`${s.owner}/${s.repo}`:void 0,c=o?.workspacePath??r,l=await rn(s?.repo??i,a,o?c:t?void 0:r),u=l?.key??(s?.branch?`${s.repo}-${s.branch}`:s?.repo??Kn(i));if(!l){if(n)Ly(i,n);let y=t?"user":"project";if(o){let w=await o.resolve({source:i,install:"file"});if(!w)return{success:"cancelled"};y=w.scope}let v=await Pw({from:i,marketplaceName:u,scope:y,projectWorkspacePath:c});if(!v.success)return v;u=v.marketplaceName,l=await rn(u,a,y==="user"?void 0:c),t=y==="user",r=v.workspacePath}else t=l.scope==="user",r=t?fe():c;let p=await ks(u,t?void 0:r);if(p.plugins.length===0)return{success:!1,error:`No plugins found in marketplace '${u}'.`};let d=[];for(let y of p.plugins){let v=y.skills?y.skills.map((w)=>w.split("/").pop()??"").filter(Boolean):await Aa(y.path);if(v.length>0)d.push({pluginName:y.name,skills:v})}if(d.length===0)return{success:!1,error:`No skills found across plugins in marketplace '${u}'.`};let f=await _pe({from:i,marketplaceName:u,registrationScope:l?.scope??(t?"user":"project"),selections:d,isUser:t,projectWorkspacePath:c,...o&&{targetContext:o}});if(f.success!==!0)return f;let{installed:m,changedScopes:g}=f;if(m.length===0)return{success:!1,error:`No skills found across plugins in marketplace '${u}'.`};if(!L()){let y=m.reduce((v,w)=>v+w.skills.length,0);console.log(`✓ Enabled ${y} skill(s) across ${m.length} plugin(s)`)}let h=await Cpe(g,c);if(!h.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:m,syncResult:h,locations:Ppe(g,c)}}var XQe=xe.command({name:"add",description:We(Sw),args:{skill:xe.positional({type:xe.optional(xe.string),displayName:"skill-or-source"}),scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'}),client:xe.option({type:xe.optional(xe.string),long:"client",short:"c",description:"Comma-separated clients for this skill source"}),yes:xe.flag({long:"yes",short:"y",description:"Run without prompts using configured or default scope and clients"}),plugin:xe.option({type:xe.optional(xe.string),long:"plugin",short:"p",description:"Plugin name (required if skill exists in multiple plugins)"}),from:xe.option({type:xe.optional(xe.string),long:"from",short:"f",description:"Plugin source to install if the skill is not already available"}),skillFlag:xe.option({type:xe.optional(xe.string),long:"skill",description:"Comma-separated skill names to install when the positional argument is a plugin source (e.g., owner/repo --skill foo,bar)"}),ref:xe.option({type:xe.optional(xe.string),long:"ref",description:"Git ref to use for the plugin (tag or branch). Mutually exclusive with inline @ref in --from."}),list:xe.flag({long:"list",short:"l",description:"List available skills at --from without installing"}),all:xe.flag({long:"all",description:"Install every skill from --from"})},handler:async({skill:e,scope:t,client:r,yes:i,plugin:n,from:o,skillFlag:s,ref:a,list:c,all:l})=>{try{let u=GQe(e,s,c,l),p=[],d=!1;if(u.shape==="source"||u.shape==="source-auto"){if(o){if(L())H({success:!1,command:"skill add",error:"Cannot use --from when the positional argument is already a plugin source."}),process.exit(1);console.error("Error: Cannot use --from when the positional argument is already a plugin source."),process.exit(1)}if(o=e,e=void 0,u.shape==="source")p=u.skills;else d=!0}else if(s){if(L())H({success:!1,command:"skill add",error:"--skill requires the positional argument to be a plugin source (e.g., `skill add owner/repo --skill foo`). To install a known skill, pass the skill name as the positional."}),process.exit(1);console.error("Error: --skill requires the positional argument to be a plugin source (e.g., `skill add owner/repo --skill foo`). To install a known skill, pass the skill name as the positional."),process.exit(1)}let f;if(a||o){let C=o?LQe(o):void 0;if(a&&C){if(L())H({success:!1,command:"skill add",error:"Cannot combine inline @ref in --from with --ref. Use one or the other."}),process.exit(1);console.error("Error: Cannot combine inline @ref in --from with --ref. Use one or the other."),process.exit(1)}if(a&&o)o=`${o}@${a}`,f=a;else if(C)f=C;else if(a&&!o){if(L())H({success:!1,command:"skill add",error:"--ref requires --from to specify a plugin source."}),process.exit(1);console.error("Error: --ref requires --from to specify a plugin source."),process.exit(1)}}if(c){if(e){if(L())H({success:!1,command:"skill add",error:"Cannot combine a skill argument with --list. Use --list alone to discover available skills."}),process.exit(1);console.error("Error: Cannot combine a skill argument with --list. Use --list alone to discover available skills."),process.exit(1)}if(!o){if(L())H({success:!1,command:"skill add",error:"--list requires --from to specify a plugin source."}),process.exit(1);console.error("Error: --list requires --from to specify a plugin source."),process.exit(1)}if(l){if(L())H({success:!1,command:"skill add",error:"--list and --all cannot be used together."}),process.exit(1);console.error("Error: --list and --all cannot be used together."),process.exit(1)}let C=await Epe(o);if(!C.success){if(L())H({success:!1,command:"skill add",error:C.error}),process.exit(1);console.error(`Error: ${C.error}`),process.exit(1)}if(L()){H({success:!0,command:"skill add",data:{source:o,isMarketplace:C.isMarketplace,skills:C.skills.map((P)=>({name:P.name,...P.subpath!==P.name&&{path:P.subpath},description:P.description,...P.pluginName&&{plugin:P.pluginName}}))}});return}if(C.skills.length===0){console.log(`No skills found in ${o}.`);return}console.log(`
609
+ Tip: run \`allagents skill add --list --from ${n}\` to see all available skills.`};let l=c.canonical,u=ye(n)?gl(n):Kn(o);if(s){let d=await Cw(n,s);if(d){if(t=d==="user",r=t?fe():s.workspacePath,ye(n)){let g=[...await u_(n,r)];if(!g.includes(l))g.push(l);let h=t?await Af(n,g):await Jy(n,g,r);if(!h.success)return{success:!1,error:`Failed to update plugin '${n}': ${h.error??"Unknown error"}`};return xw({skill:l,pluginName:gl(h.normalizedPlugin??n),isUser:t,workspacePath:r})}return p_({skill:l,pluginName:u,isUser:t,workspacePath:r})}let f=await Lm({source:n,install:"file",skills:[l]},s);if(f.status==="cancelled")return{success:"cancelled"};if(f.status==="failed")return{success:!1,error:`Failed to install plugin '${n}': ${f.error}`};return t=f.scope==="user",r=t?fe():s.workspacePath,xw({skill:l,pluginName:gl(f.normalizedPlugin??u),isUser:t,workspacePath:r})}if(ye(n)){let f=[...await u_(n,r)];if(!f.includes(l))f.push(l);let m=t?await Af(n,f):await Jy(n,f,r);if(!m.success)return{success:!1,error:`Failed to update plugin '${n}': ${m.error??"Unknown error"}`};return xw({skill:l,pluginName:gl(m.normalizedPlugin??n),isUser:t,workspacePath:r})}let p=t?await If(n):await Zy(n,r);if(!p.success){if(!p.error?.includes("already exists")&&!p.error?.includes("duplicates existing"))return{success:!1,error:`Failed to install plugin '${n}': ${p.error??"Unknown error"}`};if(!L())console.log("Plugin already installed.")}return p_({skill:l,pluginName:u,isUser:t,workspacePath:r})}function gl(e){let t=ye(e)?me(e):null;if(t?.subpath){let r=t.subpath.split("/").filter(Boolean),i=r[r.length-1];if(i)return i}return Kn(e)}async function u_(e,t){let r=await qr(e);if(!r)return[];let i=[],n=await Gr(t);for(let o of n){if(o.disabled)continue;if(await qr(o.pluginSource)!==r)continue;if(!i.includes(o.name))i.push(o.name)}return i}async function p_(e){let{skill:t,pluginName:r,isUser:i,workspacePath:n}=e;if(((await Gr(n)).filter((c)=>c.pluginName===r)[0]?.pluginSkillsMode??"none")==="allowlist"){let c=`${r}:${t}`,l=i?await Ss(c):await Sa(c,n);if(!l.success){if(!l.error?.includes("already enabled"))return{success:!1,error:`Failed to enable skill: ${l.error??"Unknown error"}`}}}else{let c=i?await $a(r,"allowlist",[t]):await Uc(r,"allowlist",[t],n);if(!c.success)return{success:!1,error:`Failed to configure skill allowlist: ${c.error??"Unknown error"}`}}return xw({skill:t,pluginName:r,isUser:i,workspacePath:n})}async function xw(e){let{skill:t,pluginName:r,isUser:i,workspacePath:n}=e;if(!L())console.log(`✓ Enabled skill: ${t} (${r})`);let o=i?await kt():await gt(n);if(!o.success)return{success:!1,error:"Sync failed"};return{success:!0,pluginName:r,location:fp(i?"user":"project",i?fe():n),syncResult:{copied:o.totalCopied,failed:o.totalFailed}}}async function kpe(e,t){let r=await sP(e),i=[];for(let n of r){let o=d_(n.skillPath,"SKILL.md"),s="";try{let a=await $pe(o,"utf-8");s=qi(a)?.description??""}catch{}i.push({name:n.name,subpath:n.subpath,description:s,...t&&{pluginName:t}})}return i}async function Epe(e){let t=ye(e)?me(e):null,r=await Rn(e,{...t?.branch&&{branch:t.branch}});if(!r.success)return{success:!1,error:`Failed to fetch '${e}': ${r.error??"Unknown error"}`};let i=m6(e,r.cachePath),n=await sr(i);if(n.success){let s=[];for(let a of n.data.plugins){if(typeof a.source==="object")continue;let c=i0(a.source,i);if(!Spe(c))continue;let l=await kpe(c,a.name);s.push(...l)}return{success:!0,skills:s,isMarketplace:!0}}return{success:!0,skills:await kpe(i),isMarketplace:!1}}async function JQe(e){let{isUser:t,workspacePath:r}=e,{from:i,targetContext:n}=e;if(!(process.stdout.isTTY&&process.stdin.isTTY)||L()||n?.options.yes)return $w(e);let s=await Epe(i);if(!s.success)return{success:!1,error:s.error};if(s.skills.length===0)return{success:!1,error:`No skills found in '${i}'.`};if(s.skills.length===1)return $w(e);let a=await Promise.resolve().then(() => (jr(),Qt));if(s.isMarketplace){let w=s.skills.map((U)=>U.name),x={};for(let U of s.skills){let J=U.pluginName??"Other";if(!x[J])x[J]=[];x[J].push({label:U.name,value:U.name,...U.description?{hint:U.description}:{}})}let b=await a.groupMultiselect({message:`Select skills to install from ${at.bold(i)}`,options:x,initialValues:w,required:!1});if(a.isCancel(b)||b.length===0)return{success:"cancelled"};let k=b;if(k.length===w.length)return $w(e);let A=ye(i)?me(i):null,N=A?`${A.owner}/${A.repo}`:void 0,C=n?.workspacePath??r,P=await rn(A?.repo??i,N,n?C:t?void 0:r),E=P?.key??(A?.branch?`${A.repo}-${A.branch}`:A?.repo??Kn(i));if(!P){let U=t?"user":"project";if(n){let le=await n.resolve({source:i,install:"file",skills:k});if(!le)return{success:"cancelled"};U=le.scope}let J=await Pw({from:i,marketplaceName:E,scope:U,projectWorkspacePath:C});if(!J.success)return J;E=J.marketplaceName,P=await rn(E,N,U==="user"?void 0:C),t=U==="user",r=J.workspacePath}else t=P.scope==="user",r=t?fe():C;let O=await ks(E,t?void 0:r);if(O.plugins.length===0)return{success:!1,error:`No plugins found in marketplace '${E}'.`};let z=[];for(let U of O.plugins){let le=(U.skills?U.skills.map((ut)=>ut.split("/").pop()??"").filter(Boolean):await Aa(U.path)).filter((ut)=>k.includes(ut));if(le.length>0)z.push({pluginName:U.name,skills:le})}if(z.length===0)return{success:!1,error:"No matching skills found in marketplace plugins."};let _=await _pe({from:i,marketplaceName:E,registrationScope:P?.scope??(t?"user":"project"),selections:z,isUser:t,projectWorkspacePath:C,...n&&{targetContext:n}});if(_.success!==!0)return _;let{installed:D,changedScopes:B}=_;if(D.length===0)return{success:!1,error:"No matching skills found in marketplace plugins."};if(!L()){let U=D.reduce((J,le)=>J+le.skills.length,0);console.log(`✓ Enabled ${U} skill(s) across ${D.length} plugin(s)`)}let X=await Cpe(B,C);if(!X.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:D,syncResult:X,locations:Ppe(B,C)}}let c=s.skills.map((w)=>w.name),l=s.skills.map((w)=>({label:w.name,value:w.name,...w.description?{hint:w.description}:{}})),u=await a.autocompleteMultiselect({message:`Select skills to install from ${at.bold(i)}`,options:l,initialValues:c,placeholder:"Type to filter · Space to toggle · Enter to confirm",required:!1});if(a.isCancel(u)||u.length===0)return{success:"cancelled"};let p=u;if(p.length===c.length)return $w(e);let d=ye(i)?me(i):null,f=await Rn(i,{...d?.branch&&{branch:d.branch}});if(!f.success)return{success:!1,error:`Failed to fetch '${i}': ${f.error??"Unknown error"}`};let m=n?await Cw(i,n):null;if(m)t=m==="user",r=t?fe():n?.workspacePath??r;let h=[...m?await u_(i,r):[]];for(let w of p)if(!h.includes(w))h.push(w);let y;if(!m&&n){let w=await Lm({source:i,install:"file",skills:h},n);if(w.status==="cancelled")return{success:"cancelled"};if(w.status==="failed")return{success:!1,error:`Failed to configure skill allowlist: ${w.error}`};t=w.scope==="user",r=t?fe():n.workspacePath,y=gl(w.normalizedPlugin??i)}else{let w=t?await Af(i,h):await Jy(i,h,r);if(!w.success)return{success:!1,error:`Failed to configure skill allowlist: ${w.error??"Unknown error"}`};y=gl(w.normalizedPlugin??i)}console.log(`✓ Enabled ${p.length} skill(s) from ${y}: ${p.join(", ")}`);let v=t?await kt():await gt(r);if(!v.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:y,skills:h}],syncResult:v,locations:[fp(t?"user":"project",r)]}}async function $w(e){let{isUser:t,workspacePath:r}=e,{from:i,targetContext:n}=e;if(!L())console.log(`Installing all skills from ${i}...`);let o=ye(i)?me(i):null,s=await Rn(i,{...o?.branch&&{branch:o.branch}});if(!s.success)return{success:!1,error:`Failed to fetch '${i}': ${s.error??"Unknown error"}`};let a=m6(i,s.cachePath);if((await sr(a)).success)return YQe({from:i,isUser:t,workspacePath:r,cachedPath:s.cachePath,targetContext:n});let l=await Aa(a);if(l.length===0)return{success:!1,error:`No skills found in '${i}'.`};if(n){let m=await Cw(i,n);if(m)t=m==="user",r=t?fe():n.workspacePath;else{let g=await Lm({source:i,install:"file",skills:l},n);if(g.status==="cancelled")return{success:"cancelled"};if(g.status==="failed")return{success:!1,error:`Failed to install plugin '${i}': ${g.error}`};t=g.scope==="user",r=t?fe():n.workspacePath;let h=gl(g.normalizedPlugin??(ye(i)?i:Kn(a)));if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${h}: ${l.join(", ")}`);let y=t?await kt():await gt(r);if(!y.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:h,skills:l}],syncResult:y,locations:[fp(t?"user":"project",r)]}}}if(ye(i)){let g=[...await u_(i,r)];for(let w of l)if(!g.includes(w))g.push(w);let h=t?await Af(i,g):await Jy(i,g,r);if(!h.success)return{success:!1,error:`Failed to configure skill allowlist: ${h.error??"Unknown error"}`};let y=gl(h.normalizedPlugin??i);if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${y}: ${l.join(", ")}`);let v=t?await kt():await gt(r);if(!v.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:y,skills:g}],syncResult:v,locations:[fp(t?"user":"project",r)]}}let u=t?await If(i):await Zy(i,r);if(!u.success){if(!u.error?.includes("already exists")&&!u.error?.includes("duplicates existing"))return{success:!1,error:`Failed to install plugin '${i}': ${u.error??"Unknown error"}`};if(!L())console.log("Plugin already installed.")}let p=Kn(a),d=t?await $a(p,"allowlist",l):await Uc(p,"allowlist",l,r);if(!d.success)return{success:!1,error:`Failed to configure skill allowlist: ${d.error??"Unknown error"}`};if(!L())console.log(`✓ Enabled ${l.length} skill(s) from ${p}: ${l.join(", ")}`);let f=t?await kt():await gt(r);if(!f.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:[{pluginName:p,skills:l}],syncResult:f,locations:[fp(t?"user":"project",r)]}}async function YQe(e){let{isUser:t,workspacePath:r}=e,{from:i,cachedPath:n,targetContext:o}=e,s=ye(i)?me(i):null,a=s?`${s.owner}/${s.repo}`:void 0,c=o?.workspacePath??r,l=await rn(s?.repo??i,a,o?c:t?void 0:r),u=l?.key??(s?.branch?`${s.repo}-${s.branch}`:s?.repo??Kn(i));if(!l){if(n)Ly(i,n);let y=t?"user":"project";if(o){let w=await o.resolve({source:i,install:"file"});if(!w)return{success:"cancelled"};y=w.scope}let v=await Pw({from:i,marketplaceName:u,scope:y,projectWorkspacePath:c});if(!v.success)return v;u=v.marketplaceName,l=await rn(u,a,y==="user"?void 0:c),t=y==="user",r=v.workspacePath}else t=l.scope==="user",r=t?fe():c;let p=await ks(u,t?void 0:r);if(p.plugins.length===0)return{success:!1,error:`No plugins found in marketplace '${u}'.`};let d=[];for(let y of p.plugins){let v=y.skills?y.skills.map((w)=>w.split("/").pop()??"").filter(Boolean):await Aa(y.path);if(v.length>0)d.push({pluginName:y.name,skills:v})}if(d.length===0)return{success:!1,error:`No skills found across plugins in marketplace '${u}'.`};let f=await _pe({from:i,marketplaceName:u,registrationScope:l?.scope??(t?"user":"project"),selections:d,isUser:t,projectWorkspacePath:c,...o&&{targetContext:o}});if(f.success!==!0)return f;let{installed:m,changedScopes:g}=f;if(m.length===0)return{success:!1,error:`No skills found across plugins in marketplace '${u}'.`};if(!L()){let y=m.reduce((v,w)=>v+w.skills.length,0);console.log(`✓ Enabled ${y} skill(s) across ${m.length} plugin(s)`)}let h=await Cpe(g,c);if(!h.success)return{success:!1,error:"Sync failed"};return{success:!0,installed:m,syncResult:h,locations:Ppe(g,c)}}var XQe=xe.command({name:"add",description:He(Sw),args:{skill:xe.positional({type:xe.optional(xe.string),displayName:"skill-or-source"}),scope:xe.option({type:xe.optional(xe.string),long:"scope",short:"s",description:'Scope: "project" (default) or "user"'}),client:xe.option({type:xe.optional(xe.string),long:"client",short:"c",description:"Comma-separated clients for this skill source"}),yes:xe.flag({long:"yes",short:"y",description:"Run without prompts using configured or default scope and clients"}),plugin:xe.option({type:xe.optional(xe.string),long:"plugin",short:"p",description:"Plugin name (required if skill exists in multiple plugins)"}),from:xe.option({type:xe.optional(xe.string),long:"from",short:"f",description:"Plugin source to install if the skill is not already available"}),skillFlag:xe.option({type:xe.optional(xe.string),long:"skill",description:"Comma-separated skill names to install when the positional argument is a plugin source (e.g., owner/repo --skill foo,bar)"}),ref:xe.option({type:xe.optional(xe.string),long:"ref",description:"Git ref to use for the plugin (tag or branch). Mutually exclusive with inline @ref in --from."}),list:xe.flag({long:"list",short:"l",description:"List available skills at --from without installing"}),all:xe.flag({long:"all",description:"Install every skill from --from"})},handler:async({skill:e,scope:t,client:r,yes:i,plugin:n,from:o,skillFlag:s,ref:a,list:c,all:l})=>{try{let u=GQe(e,s,c,l),p=[],d=!1;if(u.shape==="source"||u.shape==="source-auto"){if(o){if(L())H({success:!1,command:"skill add",error:"Cannot use --from when the positional argument is already a plugin source."}),process.exit(1);console.error("Error: Cannot use --from when the positional argument is already a plugin source."),process.exit(1)}if(o=e,e=void 0,u.shape==="source")p=u.skills;else d=!0}else if(s){if(L())H({success:!1,command:"skill add",error:"--skill requires the positional argument to be a plugin source (e.g., `skill add owner/repo --skill foo`). To install a known skill, pass the skill name as the positional."}),process.exit(1);console.error("Error: --skill requires the positional argument to be a plugin source (e.g., `skill add owner/repo --skill foo`). To install a known skill, pass the skill name as the positional."),process.exit(1)}let f;if(a||o){let C=o?LQe(o):void 0;if(a&&C){if(L())H({success:!1,command:"skill add",error:"Cannot combine inline @ref in --from with --ref. Use one or the other."}),process.exit(1);console.error("Error: Cannot combine inline @ref in --from with --ref. Use one or the other."),process.exit(1)}if(a&&o)o=`${o}@${a}`,f=a;else if(C)f=C;else if(a&&!o){if(L())H({success:!1,command:"skill add",error:"--ref requires --from to specify a plugin source."}),process.exit(1);console.error("Error: --ref requires --from to specify a plugin source."),process.exit(1)}}if(c){if(e){if(L())H({success:!1,command:"skill add",error:"Cannot combine a skill argument with --list. Use --list alone to discover available skills."}),process.exit(1);console.error("Error: Cannot combine a skill argument with --list. Use --list alone to discover available skills."),process.exit(1)}if(!o){if(L())H({success:!1,command:"skill add",error:"--list requires --from to specify a plugin source."}),process.exit(1);console.error("Error: --list requires --from to specify a plugin source."),process.exit(1)}if(l){if(L())H({success:!1,command:"skill add",error:"--list and --all cannot be used together."}),process.exit(1);console.error("Error: --list and --all cannot be used together."),process.exit(1)}let C=await Epe(o);if(!C.success){if(L())H({success:!1,command:"skill add",error:C.error}),process.exit(1);console.error(`Error: ${C.error}`),process.exit(1)}if(L()){H({success:!0,command:"skill add",data:{source:o,isMarketplace:C.isMarketplace,skills:C.skills.map((P)=>({name:P.name,...P.subpath!==P.name&&{path:P.subpath},description:P.description,...P.pluginName&&{plugin:P.pluginName}}))}});return}if(C.skills.length===0){console.log(`No skills found in ${o}.`);return}console.log(`
610
610
  Available skills in ${o}:
611
611
  `);for(let P of C.skills){let E=P.subpath!==P.name?P.subpath:P.name,O=P.pluginName?`${E} ${at.gray(`(${P.pluginName})`)}`:E;if(console.log(` ${at.hex("#89b4fa")(O)}`),P.description)console.log(` ${P.description}`);console.log()}return}if(l||d){if(!o){if(L())H({success:!1,command:"skill add",error:"--all requires --from to specify a plugin source."}),process.exit(1);console.error("Error: --all requires --from to specify a plugin source."),process.exit(1)}if(e){if(L())H({success:!1,command:"skill add",error:"Cannot combine a skill argument with --all. Use --all alone to install every skill."}),process.exit(1);console.error("Error: Cannot combine a skill argument with --all. Use --all alone to install every skill."),process.exit(1)}let C=t==="user",P=C?fe():process.cwd(),E=l_(process.cwd(),`${o} (${d?"selected skills":"all skills"})`,{scope:t,clients:r,yes:i}),O=d?await JQe({from:o,isUser:C,workspacePath:P,targetContext:E}):await $w({from:o,isUser:C,workspacePath:P,targetContext:E});if(O.success==="cancelled"){f6();return}if(!O.success){if(L())H({success:!1,command:"skill add",error:O.error}),process.exit(1);console.error(`Error: ${O.error}`),process.exit(1)}if(await d6({from:o,requestedRef:f,locations:O.locations}),L()){H({success:!0,command:"skill add",data:{source:o,installed:O.installed,syncResult:{copied:O.syncResult.totalCopied,failed:O.syncResult.totalFailed},...f&&{requestedRef:f}}});return}for(let _ of wC(O.syncResult))console.log(_);let z=Rm(O.syncResult);if(z.length>0){console.log("");for(let _ of z)console.log(_)}return}if(p.length>0){if(!o){if(L())H({success:!1,command:"skill add",error:"--skill requires a plugin source positional argument."}),process.exit(1);console.error("Error: --skill requires a plugin source positional argument."),process.exit(1)}let C=t==="user",P=C?fe():process.cwd(),E=l_(process.cwd(),`${o}: ${p.join(", ")}`,{scope:t,clients:r,yes:i}),O=[],z=[],_=[];for(let B of p){let X=await bpe({skill:B,from:o,isUser:C,workspacePath:P,targetContext:E});if(X.success==="cancelled"){f6();return}if(X.success===!0)O.push({skill:B,plugin:X.pluginName,copied:X.syncResult.copied,failed:X.syncResult.failed}),z.push(X.location);else _.push({skill:B,error:X.error})}if(O.length>0)await d6({from:o,requestedRef:f,locations:z});let D=O.length===0;if(L()){if(H({success:!D,command:"skill add",data:{source:o,installed:O,failed:_,...f&&{requestedRef:f}},...D&&{error:_.map((B)=>`${B.skill}: ${B.error}`).join("; ")}}),D)process.exit(1);return}for(let B of _)console.error(`Error installing '${B.skill}': ${B.error}`);if(f&&O.length>0)console.log(`Using ref ${f}.`);if(D)process.exit(1);return}if(!e){if(L())H({success:!1,command:"skill add",error:"A skill name is required. Use --list to discover available skills or --all to install everything."}),process.exit(1);console.error("Error: A skill name is required. Use --list to discover available skills or --all to install everything."),process.exit(1)}let m=e,g=o,h=BQe(m);if(h){if(g){if(L())H({success:!1,command:"skill add",error:"Cannot use --from when the skill argument is a GitHub URL. The URL is used as the plugin source automatically."}),process.exit(1);console.error("Error: Cannot use --from when the skill argument is a GitHub URL. The URL is used as the plugin source automatically."),process.exit(1)}if(g=h.from,h.parsed&&!h.parsed.subpath)m=await qQe(m,h.parsed,h.skill);else m=h.skill}let y=Boolean(g),v=t==="user"||!t&&!y&&xpe(process.cwd())==="user",w=v?fe():process.cwd(),x=await Woe(m,w);if(x.length===0){if(g){let O=l_(process.cwd(),`${g}: ${m}`,{scope:t,clients:r,yes:i}),z=await bpe({skill:m,from:g,isUser:v,workspacePath:w,targetContext:O});if(z.success==="cancelled"){f6();return}if(!z.success){if(L())H({success:!1,command:"skill add",error:z.error}),process.exit(1);console.error(`Error: ${z.error}`),process.exit(1)}if(await d6({from:g,requestedRef:f,locations:[z.location]}),L()){H({success:!0,command:"skill add",data:{skill:m,plugin:z.pluginName,syncResult:z.syncResult,...f&&{requestedRef:f}}});return}if(f)console.log(`Using ref ${f}.`);return}let C=await Gr(w),P=[...new Set(C.map((O)=>O.name))].join(", "),E=`Skill '${m}' not found in any installed plugin.
612
612
 
@@ -617,27 +617,27 @@ ${P}
617
617
  Use --plugin to specify: allagents skill add ${m} --plugin <name>`;if(L())H({success:!1,command:"skill add",error:E}),process.exit(1);console.error(`Error: ${E}`),process.exit(1)}let C=x.find((P)=>P.pluginName===n);if(!C){let P=`Plugin '${n}' not found. Installed plugins: ${x.map((E)=>E.pluginName).join(", ")}`;if(L())H({success:!1,command:"skill add",error:P}),process.exit(1);console.error(`Error: ${P}`),process.exit(1)}b=C}if((await _s(w,v?"user":"project")).has(b.pluginSource))throw Error(Xf);if(!b.disabled){let C=`Skill '${m}' is already enabled.`;if(L())H({success:!1,command:"skill add",error:C}),process.exit(1);console.log(C);return}let k=`${b.pluginName}:${m}`,A=b.pluginSkillsMode==="blocklist"?v?await Au(k):await Rf(k,w):v?await Ss(k):await Sa(k,w);if(!A.success){if(L())H({success:!1,command:"skill add",error:A.error??"Unknown error"}),process.exit(1);console.error(`Error: ${A.error}`),process.exit(1)}if(!L())console.log(`✓ Enabled skill: ${m} (${b.pluginName})`);let N=v?await kt():await gt(w);if(L()){if(H({success:N.success,command:"skill add",data:{skill:m,plugin:b.pluginName,syncResult:{copied:N.totalCopied,failed:N.totalFailed}}}),!N.success)process.exit(1);return}}catch(u){if(u instanceof Error){if(L())H({success:!1,command:"skill add",error:u.message}),process.exit(1);console.error(`Error: ${u.message}`),process.exit(1)}throw u}}});function Rpe(e,t,r){return`Showing ${e} skill${e!==1?"s":""} matching "${t}"${r?" (truncated)":""}`}function QQe(e){return[e.stars>0?`★ ${e.stars}`:"",e.description??""].filter(Boolean).join(" ")}function eet(e,t,r){console.log(`
618
618
  ${Rpe(e.length,t,r)}
619
619
  `);for(let i of e){let n=i.repo.padEnd(30),o=qa(i).padEnd(24),s=i.stars>0?at.yellow(`★ ${i.stars}`):"",a=i.description?at.dim(i.description.length>60?`${i.description.slice(0,57)}...`:i.description):"",c=[s,a].filter(Boolean).join(" ");console.log(` ${at.cyan(n)} ${at.bold(o)} ${c}`)}console.log("")}async function tet(e){let t=await Promise.resolve().then(() => (jr(),Qt)),r=process.cwd(),i=[];for(let c of e){let{repo:l}=c,u=dp(r)?await _f(l,r):!1,p=await Ru(l);if(u||p){let d=p?"user":"project";t.log.info(`Plugin ${at.bold(l)} is already installed (${d} scope).`);continue}i.push(c)}let n=i[0];if(!n)return!1;let o=l_(r,i.map(({repo:c,skills:l})=>`${c}: ${l.join(", ")}`).join("; "),{}),s=await o.resolve({source:n.repo,install:"file",skills:n.skills});if(!s)return!1;let a=t.spinner();a.start(`Installing ${i.length===1?"plugin":"plugins"}...`);try{let c=[],l=[];for(let{repo:f,skills:m}of i){let g=await Lm({source:f,install:"file",skills:m},o);if(g.status==="cancelled")return!1;if(g.status==="failed"){l.push({repo:f,error:g.error});continue}c.push(f)}if(c.length===0){a.stop("Installation failed");for(let{repo:f,error:m}of l)t.log.error(`${at.bold(f)}: ${m}`);return!1}a.message("Syncing...");let u=s.scope==="project"?await gt(r):await kt();a.stop(c.length===1?"Installed and synced":"Installed plugins and synced");for(let{repo:f,error:m}of l)t.log.error(`${at.bold(f)}: ${m}`);let p=Ba(u),d=c.length>1?[...c,"",...p]:p;if(d.length>0)t.note(d.join(`
620
- `),c.length===1?`Installed: ${c[0]}`:`Installed: ${c.length} plugins`);return!0}catch(c){return a.stop("Installation failed"),t.log.error(c instanceof Error?c.message:String(c)),!1}}var ret=xe.command({name:"search",description:We(kw),args:{query:xe.restPositionals({type:xe.string,displayName:"query"}),owner:xe.option({type:xe.optional(xe.string),long:"owner",description:"Scope to a single GitHub owner (org or user)."}),page:xe.option({type:xe.optional(xe.string),long:"page",description:"Result page (1-indexed, default 1)."}),limit:xe.option({type:xe.optional(xe.string),long:"limit",description:"Results per page (1–100, default 15)."})},handler:async({query:e,owner:t,page:r,limit:i})=>{try{let n=e.join(" ").trim(),o={};if(t)o.owner=t;if(r!==void 0){let h=Number.parseInt(r,10);if(Number.isNaN(h)){if(L())H({success:!1,command:"skill search",error:"--page must be an integer."}),process.exit(2);console.error("Error: --page must be an integer."),process.exit(2)}o.page=h}if(i!==void 0){let h=Number.parseInt(i,10);if(Number.isNaN(h)){if(L())H({success:!1,command:"skill search",error:"--limit must be an integer."}),process.exit(2);console.error("Error: --limit must be an integer."),process.exit(2)}o.limit=h}let s=await GC(n,o);if(L()){H({success:!0,command:"skill search",data:s});return}if(s.items.length===0){console.log(`No skills found for "${n}".`);return}if(!(process.stdout.isTTY&&process.stdin.isTTY)){eet(s.items,n,s.truncated);return}let{autocompleteMultiselect:c,isCancel:l,log:u}=await Promise.resolve().then(() => (jr(),Qt));u.success(Rpe(s.items.length,n,s.truncated));let p=s.items.map((h)=>({label:`${qa(h)} ${at.dim(h.repo)}`,value:h.path,hint:QQe(h)})),d=await c({message:"Select skills to install",options:p,placeholder:"Type to filter...",required:!1});if(l(d))return;let f=new Set(d),m=new Map;for(let h of s.items){if(!f.has(h.path))continue;let y=m.get(h.repo);if(y)y.push(qa(h));else m.set(h.repo,[qa(h)])}let g=[...m].map(([h,y])=>({repo:h,skills:y}));if(g.length===0)return;await tet(g)}catch(n){if(n instanceof Ho){let o=n.kind==="validation"?2:1;if(L())H({success:!1,command:"skill search",error:n.message}),process.exit(o);console.error(`Error: ${n.message}`),process.exit(o)}if(n instanceof Error){if(L())H({success:!1,command:"skill search",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),f_=Dn({name:"skill",description:"Manage individual skills from plugins",cmds:{list:VQe,remove:WQe,add:XQe,search:ret,update:vpe}});cl();it();nt();or();Lr();ZC();XC();import{existsSync as _w}from"node:fs";import{join as mp}from"node:path";async function g6(e={},{announceWorkspace:t=!0,compactSuccess:r=!1}={}){if(!L()&&t)console.log(`
620
+ `),c.length===1?`Installed: ${c[0]}`:`Installed: ${c.length} plugins`);return!0}catch(c){return a.stop("Installation failed"),t.log.error(c instanceof Error?c.message:String(c)),!1}}var ret=xe.command({name:"search",description:He(kw),args:{query:xe.restPositionals({type:xe.string,displayName:"query"}),owner:xe.option({type:xe.optional(xe.string),long:"owner",description:"Scope to a single GitHub owner (org or user)."}),page:xe.option({type:xe.optional(xe.string),long:"page",description:"Result page (1-indexed, default 1)."}),limit:xe.option({type:xe.optional(xe.string),long:"limit",description:"Results per page (1–100, default 15)."})},handler:async({query:e,owner:t,page:r,limit:i})=>{try{let n=e.join(" ").trim(),o={};if(t)o.owner=t;if(r!==void 0){let h=Number.parseInt(r,10);if(Number.isNaN(h)){if(L())H({success:!1,command:"skill search",error:"--page must be an integer."}),process.exit(2);console.error("Error: --page must be an integer."),process.exit(2)}o.page=h}if(i!==void 0){let h=Number.parseInt(i,10);if(Number.isNaN(h)){if(L())H({success:!1,command:"skill search",error:"--limit must be an integer."}),process.exit(2);console.error("Error: --limit must be an integer."),process.exit(2)}o.limit=h}let s=await GC(n,o);if(L()){H({success:!0,command:"skill search",data:s});return}if(s.items.length===0){console.log(`No skills found for "${n}".`);return}if(!(process.stdout.isTTY&&process.stdin.isTTY)){eet(s.items,n,s.truncated);return}let{autocompleteMultiselect:c,isCancel:l,log:u}=await Promise.resolve().then(() => (jr(),Qt));u.success(Rpe(s.items.length,n,s.truncated));let p=s.items.map((h)=>({label:`${qa(h)} ${at.dim(h.repo)}`,value:h.path,hint:QQe(h)})),d=await c({message:"Select skills to install",options:p,placeholder:"Type to filter...",required:!1});if(l(d))return;let f=new Set(d),m=new Map;for(let h of s.items){if(!f.has(h.path))continue;let y=m.get(h.repo);if(y)y.push(qa(h));else m.set(h.repo,[qa(h)])}let g=[...m].map(([h,y])=>({repo:h,skills:y}));if(g.length===0)return;await tet(g)}catch(n){if(n instanceof Ho){let o=n.kind==="validation"?2:1;if(L())H({success:!1,command:"skill search",error:n.message}),process.exit(o);console.error(`Error: ${n.message}`),process.exit(o)}if(n instanceof Error){if(L())H({success:!1,command:"skill search",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),f_=Dn({name:"skill",description:"Manage individual skills from plugins",cmds:{list:VQe,remove:WQe,add:XQe,search:ret,update:vpe}});cl();it();nt();or();Lr();ZC();XC();import{existsSync as _w}from"node:fs";import{join as mp}from"node:path";async function g6(e={},{announceWorkspace:t=!0,compactSuccess:r=!1}={}){if(!L()&&t)console.log(`
621
621
  Updating workspace...
622
622
  `);let i=await gt(process.cwd(),e);if(!i.success&&i.error&&!L())console.error(`Sync error: ${i.error}`);let n=Am(i),o=i.success&&i.totalFailed===0;if(!L()&&(!r||!o||(i.warnings?.length??0)>0)){for(let s of i.pluginResults){if(console.log(sp(s)),s.error)console.log(` Error: ${s.error}`);for(let l of Em(s.copyResults))console.log(l);let a=s.copyResults.filter((l)=>l.action==="generated").length,c=s.copyResults.filter((l)=>l.action==="failed").length;if(a>0)console.log(` Generated: ${a} files`);if(c>0){console.log(` Failed: ${c} files`);for(let l of s.copyResults.filter((u)=>u.action==="failed"))console.log(` - ${l.destination}: ${l.error}`)}}if(i.mcpResults)for(let[s,a]of Object.entries(i.mcpResults)){if(!a)continue;let c=La(a,s);if(c.length>0){console.log("");for(let l of c)console.log(l)}}if(i.nativeResult){let s=Im(i.nativeResult);if(s.length>0){console.log(`
623
623
  native:`);for(let a of s)console.log(a)}}if(i.warnings&&i.warnings.length>0){console.log(`
624
624
  Warnings:`);for(let s of i.warnings)console.log(` ⚠ ${s}`)}}return{ok:o,syncData:n}}async function h6(e={},{compactSuccess:t=!1}={}){let r=await kt(e);if(!r.success&&r.error&&!L())console.error(`Sync error: ${r.error}`);let i=Am(r),n=r.success&&r.totalFailed===0;if(!L()&&(!t||!n||(r.warnings?.length??0)>0)){for(let o of r.pluginResults){if(console.log(sp(o)),o.error)console.log(` Error: ${o.error}`);for(let c of Em(o.copyResults))console.log(c);let s=o.copyResults.filter((c)=>c.action==="generated").length,a=o.copyResults.filter((c)=>c.action==="failed").length;if(s>0)console.log(` Generated: ${s} files`);if(a>0){console.log(` Failed: ${a} files`);for(let c of o.copyResults.filter((l)=>l.action==="failed"))console.log(` - ${c.destination}: ${c.error}`)}}if(r.mcpResults)for(let[o,s]of Object.entries(r.mcpResults)){if(!s)continue;let a=La(s,o);if(a.length>0){console.log("");for(let c of a)console.log(c)}}if(r.nativeResult){let o=Im(r.nativeResult);if(o.length>0){console.log(`
625
625
  native:`);for(let s of o)console.log(s)}}if(r.warnings&&r.warnings.length>0){console.log(`
626
- Warnings:`);for(let o of r.warnings)console.log(` ⚠ ${o}`)}}return{ok:n,syncData:i}}async function net(e,t){return((await In(t==="user"?fe():process.cwd()))?.nativeResources?.resources??[]).some((i)=>i.scope===t&&za(e,i.requestedIdentity,i.resolvedIdentity))}async function iet(e,t){let i=((t==="user"?await bt():_w(mp(process.cwd(),Z,ee))?await tr(mp(process.cwd(),Z,ee)):null)?.plugins??[]).map(ae).filter((n)=>za(e,n,n));if(i.length>1)throw Error(`Plugin target '${e}' is ambiguous: ${i.join(", ")}. Use an exact qualified declaration.`);return i[0]}var oet=ge.command({name:"list",description:We(TC),args:{scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Filter by scope: user or project"})},handler:async({scope:e})=>{try{if(e&&e!=="user"&&e!=="project"){let s=`Invalid scope '${e}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace list",error:s}),process.exit(1);console.error(`Error: ${s}`),process.exit(1)}let t=tn(),r=bs(process.cwd()),i=(s)=>Fee(s,s.scope==="project"?r:t),n,o=[];if(!e){let s=await jee(t,r);n=s.entries,o=s.overrides}else if(e==="user"){let s=await Br(t);n=Object.values(s.marketplaces).map((a)=>({...a,scope:"user"}))}else{let s=await Br(r);n=Object.values(s.marketplaces).map((a)=>({...a,scope:"project"}))}if(L()){let s=await Promise.all(n.map(async(a)=>{let c=await i(a);return{...a,...c&&{commitHash:c.hash,commitTimestamp:c.date.toISOString()}}}));H({success:!0,command:"plugin marketplace list",data:{marketplaces:s}});return}for(let s of o)console.warn(`Warning: Workspace marketplace '${s}' overrides user marketplace of the same name.`);if(n.length===0){console.log(`No marketplaces registered.
626
+ Warnings:`);for(let o of r.warnings)console.log(` ⚠ ${o}`)}}return{ok:n,syncData:i}}async function net(e,t){return((await In(t==="user"?fe():process.cwd()))?.nativeResources?.resources??[]).some((i)=>i.scope===t&&za(e,i.requestedIdentity,i.resolvedIdentity))}async function iet(e,t){let i=((t==="user"?await bt():_w(mp(process.cwd(),Z,ee))?await tr(mp(process.cwd(),Z,ee)):null)?.plugins??[]).map(ae).filter((n)=>za(e,n,n));if(i.length>1)throw Error(`Plugin target '${e}' is ambiguous: ${i.join(", ")}. Use an exact qualified declaration.`);return i[0]}var oet=ge.command({name:"list",description:He(TC),args:{scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Filter by scope: user or project"})},handler:async({scope:e})=>{try{if(e&&e!=="user"&&e!=="project"){let s=`Invalid scope '${e}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace list",error:s}),process.exit(1);console.error(`Error: ${s}`),process.exit(1)}let t=tn(),r=bs(process.cwd()),i=(s)=>Fee(s,s.scope==="project"?r:t),n,o=[];if(!e){let s=await jee(t,r);n=s.entries,o=s.overrides}else if(e==="user"){let s=await Br(t);n=Object.values(s.marketplaces).map((a)=>({...a,scope:"user"}))}else{let s=await Br(r);n=Object.values(s.marketplaces).map((a)=>({...a,scope:"project"}))}if(L()){let s=await Promise.all(n.map(async(a)=>{let c=await i(a);return{...a,...c&&{commitHash:c.hash,commitTimestamp:c.date.toISOString()}}}));H({success:!0,command:"plugin marketplace list",data:{marketplaces:s}});return}for(let s of o)console.warn(`Warning: Workspace marketplace '${s}' overrides user marketplace of the same name.`);if(n.length===0){console.log(`No marketplaces registered.
627
627
  `),console.log("Add a marketplace with:"),console.log(` allagents plugin marketplace add <source>
628
628
  `),console.log("Examples:"),console.log(" allagents plugin marketplace add owner/repo"),console.log(" allagents plugin marketplace add https://github.com/owner/repo");return}console.log(`Registered marketplaces:
629
- `);for(let s of n){let a;switch(s.source.type){case"github":a=`GitHub: ${s.source.location}`;break;case"git":a=`Git: ${s.source.location}`;break;default:a=`Local: ${s.source.location}`}console.log(` ❯ ${s.name} (${s.scope})`),console.log(` Source: ${a}`);let c=await i(s);if(c){let l=c.date.toISOString().replace("T"," ").slice(0,16);console.log(` Version: ${c.hash} (${l})`)}console.log()}console.log(`Total: ${n.length} marketplace(s)`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"plugin marketplace list",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),set=ge.command({name:"add",description:We(NC),args:{source:ge.positional({type:ge.string,displayName:"source"}),name:ge.option({type:ge.optional(ge.string),long:"name",short:"n",description:"Custom name for the marketplace"}),branch:ge.option({type:ge.optional(ge.string),long:"branch",short:"b",description:"Branch to checkout after cloning"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Scope: user (default) or project"})},handler:async({source:e,name:t,branch:r,scope:i})=>{try{let n=i??"user";if(n!=="user"&&n!=="project"){let s=`Invalid scope '${i}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace add",error:s}),process.exit(1);console.error(`Error: ${s}`),process.exit(1)}if(n==="project"){if(!_w(mp(process.cwd(),Z,ee))){if(L())H({success:!1,command:"plugin marketplace add",error:'No workspace found in current directory. Run "allagents workspace init" first.'}),process.exit(1);console.error('Error: No workspace found in current directory. Run "allagents workspace init" first.'),process.exit(1)}}if(!L())console.log(`Adding marketplace: ${e}...`);let o=await xu(e,t,r,{scope:n,workspacePath:process.cwd()});if(!o.success){if(L())H({success:!1,command:"plugin marketplace add",error:o.error??"Unknown error"}),process.exit(1);console.error(`
630
- Error: ${o.error}`),process.exit(1)}if(o.replaced&&!L())console.log(`Marketplace '${o.marketplace?.name}' already exists. Replacing with new source.`);if(L()){H({success:!0,command:"plugin marketplace add",data:{marketplace:{name:o.marketplace?.name,path:o.marketplace?.path,replaced:o.replaced}}});return}console.log(`✓ Marketplace '${o.marketplace?.name}' added`),console.log(` Path: ${o.marketplace?.path}`)}catch(n){if(n instanceof Error){if(L())H({success:!1,command:"plugin marketplace add",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),aet=ge.command({name:"remove",description:We(MC),args:{name:ge.positional({type:ge.string,displayName:"name"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Filter by scope: user or project (default: removes from both)"})},handler:async({name:e,scope:t})=>{try{if(t&&t!=="user"&&t!=="project"){let n=`Invalid scope '${t}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace remove",error:n}),process.exit(1);console.error(`Error: ${n}`),process.exit(1)}let i=await m0(e,{scope:t??"all",workspacePath:process.cwd()});if(!i.success){if(L())H({success:!1,command:"plugin marketplace remove",error:i.error??"Unknown error"}),process.exit(1);console.error(`Error: ${i.error}`),process.exit(1)}if(L()){H({success:!0,command:"plugin marketplace remove",data:{name:e,path:i.marketplace?.path,retainedUserPlugins:i.retainedUserPlugins??[],warnings:i.warnings??[]}});return}console.log(`✓ Marketplace '${e}' removed`);for(let n of i.warnings??[])console.warn(`Warning: ${n}`);if(i.retainedUserPlugins&&i.retainedUserPlugins.length>0){console.log(`
629
+ `);for(let s of n){let a;switch(s.source.type){case"github":a=`GitHub: ${s.source.location}`;break;case"git":a=`Git: ${s.source.location}`;break;default:a=`Local: ${s.source.location}`}console.log(` ❯ ${s.name} (${s.scope})`),console.log(` Source: ${a}`);let c=await i(s);if(c){let l=c.date.toISOString().replace("T"," ").slice(0,16);console.log(` Version: ${c.hash} (${l})`)}console.log()}console.log(`Total: ${n.length} marketplace(s)`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"plugin marketplace list",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),set=ge.command({name:"add",description:He(NC),args:{source:ge.positional({type:ge.string,displayName:"source"}),name:ge.option({type:ge.optional(ge.string),long:"name",short:"n",description:"Custom name for the marketplace"}),branch:ge.option({type:ge.optional(ge.string),long:"branch",short:"b",description:"Branch to checkout after cloning"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Scope: user (default) or project"})},handler:async({source:e,name:t,branch:r,scope:i})=>{try{let n=i??"user";if(n!=="user"&&n!=="project"){let s=`Invalid scope '${i}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace add",error:s}),process.exit(1);console.error(`Error: ${s}`),process.exit(1)}if(n==="project"){if(!_w(mp(process.cwd(),Z,ee))){if(L())H({success:!1,command:"plugin marketplace add",error:'No workspace found in current directory. Run "allagents workspace init" first.'}),process.exit(1);console.error('Error: No workspace found in current directory. Run "allagents workspace init" first.'),process.exit(1)}}if(!L())console.log(`Adding marketplace: ${e}...`);let o=await xu(e,t,r,{scope:n,workspacePath:process.cwd()});if(!o.success){if(L())H({success:!1,command:"plugin marketplace add",error:o.error??"Unknown error"}),process.exit(1);console.error(`
630
+ Error: ${o.error}`),process.exit(1)}if(o.replaced&&!L())console.log(`Marketplace '${o.marketplace?.name}' already exists. Replacing with new source.`);if(L()){H({success:!0,command:"plugin marketplace add",data:{marketplace:{name:o.marketplace?.name,path:o.marketplace?.path,replaced:o.replaced}}});return}console.log(`✓ Marketplace '${o.marketplace?.name}' added`),console.log(` Path: ${o.marketplace?.path}`)}catch(n){if(n instanceof Error){if(L())H({success:!1,command:"plugin marketplace add",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),aet=ge.command({name:"remove",description:He(MC),args:{name:ge.positional({type:ge.string,displayName:"name"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:"Filter by scope: user or project (default: removes from both)"})},handler:async({name:e,scope:t})=>{try{if(t&&t!=="user"&&t!=="project"){let n=`Invalid scope '${t}'. Must be 'user' or 'project'.`;if(L())H({success:!1,command:"plugin marketplace remove",error:n}),process.exit(1);console.error(`Error: ${n}`),process.exit(1)}let i=await m0(e,{scope:t??"all",workspacePath:process.cwd()});if(!i.success){if(L())H({success:!1,command:"plugin marketplace remove",error:i.error??"Unknown error"}),process.exit(1);console.error(`Error: ${i.error}`),process.exit(1)}if(L()){H({success:!0,command:"plugin marketplace remove",data:{name:e,path:i.marketplace?.path,retainedUserPlugins:i.retainedUserPlugins??[],warnings:i.warnings??[]}});return}console.log(`✓ Marketplace '${e}' removed`);for(let n of i.warnings??[])console.warn(`Warning: ${n}`);if(i.retainedUserPlugins&&i.retainedUserPlugins.length>0){console.log(`
631
631
  ⚠ ${i.retainedUserPlugins.length} plugin(s) still reference this marketplace:`);for(let n of i.retainedUserPlugins)console.log(` - ${n}`);console.log(`
632
- To remove them: allagents plugin remove <name>`)}}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin marketplace remove",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),cet=ge.command({name:"update",description:We(jC),args:{name:ge.positional({type:ge.optional(ge.string),displayName:"name"})},handler:async({name:e})=>{let t=new Ms;try{if(!L())console.log(e?`Updating marketplace: ${e}...`:"Updating all marketplaces..."),console.log();let r=await uo(e,process.cwd(),{},t);if(L()){let o=r.filter((a)=>a.success).length,s=r.filter((a)=>!a.success).length;if(H({success:s===0,command:"plugin marketplace update",data:{results:r.map((a)=>({name:a.name,success:a.success,...a.error&&{error:a.error}})),succeeded:o,failed:s},...s>0&&{error:`${s} marketplace(s) failed to update`}}),s>0)process.exit(1);return}if(r.length===0){console.log("No marketplaces to update.");return}let i=0,n=0;for(let o of r)if(o.success)console.log(`✓ ${o.name}`),i++;else console.log(`✗ ${o.name}: ${o.error}`),n++;if(console.log(),console.log(`Updated: ${i}, Failed: ${n}`),n>0)process.exit(1)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin marketplace update",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}finally{t.dispose()}}}),uet=ge.command({name:"browse",description:We(FC),args:{name:ge.positional({type:ge.string,displayName:"name"})},handler:async({name:e})=>{try{if(!await g0(e,void 0,process.cwd())){let u=`Marketplace '${e}' not found`;if(L())H({success:!1,command:"plugin marketplace browse",error:u}),process.exit(1);console.error(`Error: ${u}`),console.log(`
632
+ To remove them: allagents plugin remove <name>`)}}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin marketplace remove",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),cet=ge.command({name:"update",description:He(jC),args:{name:ge.positional({type:ge.optional(ge.string),displayName:"name"})},handler:async({name:e})=>{let t=new Ms;try{if(!L())console.log(e?`Updating marketplace: ${e}...`:"Updating all marketplaces..."),console.log();let r=await uo(e,process.cwd(),{},t);if(L()){let o=r.filter((a)=>a.success).length,s=r.filter((a)=>!a.success).length;if(H({success:s===0,command:"plugin marketplace update",data:{results:r.map((a)=>({name:a.name,success:a.success,...a.error&&{error:a.error}})),succeeded:o,failed:s},...s>0&&{error:`${s} marketplace(s) failed to update`}}),s>0)process.exit(1);return}if(r.length===0){console.log("No marketplaces to update.");return}let i=0,n=0;for(let o of r)if(o.success)console.log(`✓ ${o.name}`),i++;else console.log(`✗ ${o.name}: ${o.error}`),n++;if(console.log(),console.log(`Updated: ${i}, Failed: ${n}`),n>0)process.exit(1)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin marketplace update",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}finally{t.dispose()}}}),uet=ge.command({name:"browse",description:He(FC),args:{name:ge.positional({type:ge.string,displayName:"name"})},handler:async({name:e})=>{try{if(!await g0(e,void 0,process.cwd())){let u=`Marketplace '${e}' not found`;if(L())H({success:!1,command:"plugin marketplace browse",error:u}),process.exit(1);console.error(`Error: ${u}`),console.log(`
633
633
  To see registered marketplaces:`),console.log(" allagents plugin marketplace list"),process.exit(1)}let t=await ks(e,process.cwd()),r=await Ou(),i=await Du(process.cwd()),n=new Map,o=await Fc(),s=new Map;for(let u of o)if(u.source.type==="github"){let p=u.source.location.split("/");if(p.length>=2&&p[1])s.set(p[1],u.name)}let a=(u)=>s.get(u)??u;for(let u of r){let p=a(u.marketplace);n.set(`${u.name}@${p}`,u)}for(let u of i){let p=a(u.marketplace);n.set(`${u.name}@${p}`,u)}let c=t.plugins.map((u)=>{let p=`${u.name}@${e}`,d=n.get(p);return{name:u.name,description:u.description??null,installed:!!d,scope:d?.scope??null}}),l=c.filter((u)=>u.installed).length;if(L()){H({success:!0,command:"plugin marketplace browse",data:{marketplace:e,plugins:c,total:c.length,installed:l,...t.warnings.length>0&&{warnings:t.warnings}}});return}for(let u of t.warnings)console.log(` Warning: ${u}`);if(c.length===0){console.log(`No plugins found in "${e}" marketplace.`);return}console.log(`Plugins in "${e}" marketplace:
634
- `);for(let u of c){let p=u.installed?` (installed - ${u.scope})`:"";if(console.log(` ❯ ${u.name}${p}`),u.description)console.log(` ${u.description}`);console.log()}console.log(`Total: ${c.length} plugins (${l} installed)`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"plugin marketplace browse",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),pet=Dn({name:"marketplace",description:"Manage plugin marketplaces",cmds:{list:oet,browse:uet,add:set,remove:aet,update:cet}}),det=ge.command({name:"list",description:We(zC),args:{},handler:async()=>{try{let t=function(w,x){return`source:${x}:${w}`},r=function(w,x,b){return`marketplace:${b}:${w}@${x}`},e=new Map;async function i(w,x){if(!_w(w))return;try{let b=x==="user"?await fs(w):await tr(w),{plans:k}=Dr(b.plugins,b.clients,x);for(let A of k)e.set(t(A.source,x),A.clients)}catch{}}let n=mp(ka(),ee),o=mp(process.cwd(),Z,ee),s=wt(process.cwd());if(await i(n,"user"),!s)await i(o,"project");let a=await In(fe()),c=s?null:await In(process.cwd()),l=await Ou(),u=await Du(process.cwd()),p=[...l,...u],d=new Map,f=await go(process.cwd());for(let w of[...f.plugins,...f.userPlugins??[]])d.set(w.source,w.kind);let m=new Map;for(let w of p){let x=w.marketplace?r(w.name,w.marketplace,w.scope):t(w.effectiveSpec,w.scope),b=e.get(t(w.effectiveSpec,w.scope))??[],k=m.get(x);if(k){for(let A of b)if(!k.fileClients.includes(A))k.fileClients.push(A);continue}m.set(x,{spec:w.spec,effectiveSpec:w.effectiveSpec,name:w.name,marketplace:w.marketplace,scope:w.scope,kind:d.get(w.spec)??"plugin",fileClients:[...b],nativeClients:[],nativeResources:[]})}for(let[w,x]of[[a,"user"],[c,"project"]])for(let[b,k]of Object.entries(w?.nativePlugins??{}))for(let A of k){if(f.nativeResources.some((O)=>O.client===b&&O.scope===x&&za(A,O.requestedIdentity,O.resolvedIdentity)))continue;let C=vt(A),P=C?r(C.plugin,C.marketplaceName,x):t(A,x),E=m.get(P);if(E){if(!E.nativeClients.includes(b))E.nativeClients.push(b);continue}m.set(P,{spec:A,effectiveSpec:A,name:C?.plugin??Fy(A),marketplace:C?.marketplaceName??"",scope:x,kind:d.get(A)??"plugin",fileClients:[],nativeClients:[b],nativeResources:[]})}for(let w of f.nativeResources){let x=w.requestedIdentity,b=vt(w.resolvedIdentity)??vt(x),k=b?r(b.plugin,b.marketplaceName,w.scope):t(x,w.scope),A=m.get(k);if(A){if(!A.nativeClients.includes(w.client))A.nativeClients.push(w.client);A.nativeResources.push(w);continue}m.set(k,{spec:x,effectiveSpec:x,name:b?.plugin??Fy(x),marketplace:b?.marketplaceName??"",scope:w.scope,kind:d.get(x)??"plugin",fileClients:[],nativeClients:[w.client],nativeResources:[w]})}let g=[...m.values()];if(L()){if(H({success:f.success,command:"plugin list",data:{plugins:g.map((w)=>({name:w.name,spec:w.spec,marketplace:w.marketplace,scope:w.scope,kind:w.kind,...w.fileClients.length>0&&{clients:w.fileClients},...w.nativeClients.length>0&&{nativeClients:w.nativeClients},...w.nativeResources.length>0&&{nativeResources:w.nativeResources}})),total:g.length},...!f.success&&{error:f.error??"Native inspection failed"}}),!f.success)process.exit(1);return}if(g.length===0){if(console.log(`No plugins installed.
634
+ `);for(let u of c){let p=u.installed?` (installed - ${u.scope})`:"";if(console.log(` ❯ ${u.name}${p}`),u.description)console.log(` ${u.description}`);console.log()}console.log(`Total: ${c.length} plugins (${l} installed)`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"plugin marketplace browse",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),pet=Dn({name:"marketplace",description:"Manage plugin marketplaces",cmds:{list:oet,browse:uet,add:set,remove:aet,update:cet}}),det=ge.command({name:"list",description:He(zC),args:{},handler:async()=>{try{let t=function(w,x){return`source:${x}:${w}`},r=function(w,x,b){return`marketplace:${b}:${w}@${x}`},e=new Map;async function i(w,x){if(!_w(w))return;try{let b=x==="user"?await fs(w):await tr(w),{plans:k}=Dr(b.plugins,b.clients,x);for(let A of k)e.set(t(A.source,x),A.clients)}catch{}}let n=mp(ka(),ee),o=mp(process.cwd(),Z,ee),s=wt(process.cwd());if(await i(n,"user"),!s)await i(o,"project");let a=await In(fe()),c=s?null:await In(process.cwd()),l=await Ou(),u=await Du(process.cwd()),p=[...l,...u],d=new Map,f=await go(process.cwd());for(let w of[...f.plugins,...f.userPlugins??[]])d.set(w.source,w.kind);let m=new Map;for(let w of p){let x=w.marketplace?r(w.name,w.marketplace,w.scope):t(w.effectiveSpec,w.scope),b=e.get(t(w.effectiveSpec,w.scope))??[],k=m.get(x);if(k){for(let A of b)if(!k.fileClients.includes(A))k.fileClients.push(A);continue}m.set(x,{spec:w.spec,effectiveSpec:w.effectiveSpec,name:w.name,marketplace:w.marketplace,scope:w.scope,kind:d.get(w.spec)??"plugin",fileClients:[...b],nativeClients:[],nativeResources:[]})}for(let[w,x]of[[a,"user"],[c,"project"]])for(let[b,k]of Object.entries(w?.nativePlugins??{}))for(let A of k){if(f.nativeResources.some((O)=>O.client===b&&O.scope===x&&za(A,O.requestedIdentity,O.resolvedIdentity)))continue;let C=vt(A),P=C?r(C.plugin,C.marketplaceName,x):t(A,x),E=m.get(P);if(E){if(!E.nativeClients.includes(b))E.nativeClients.push(b);continue}m.set(P,{spec:A,effectiveSpec:A,name:C?.plugin??Fy(A),marketplace:C?.marketplaceName??"",scope:x,kind:d.get(A)??"plugin",fileClients:[],nativeClients:[b],nativeResources:[]})}for(let w of f.nativeResources){let x=w.requestedIdentity,b=vt(w.resolvedIdentity)??vt(x),k=b?r(b.plugin,b.marketplaceName,w.scope):t(x,w.scope),A=m.get(k);if(A){if(!A.nativeClients.includes(w.client))A.nativeClients.push(w.client);A.nativeResources.push(w);continue}m.set(k,{spec:x,effectiveSpec:x,name:b?.plugin??Fy(x),marketplace:b?.marketplaceName??"",scope:w.scope,kind:d.get(x)??"plugin",fileClients:[],nativeClients:[w.client],nativeResources:[w]})}let g=[...m.values()];if(L()){if(H({success:f.success,command:"plugin list",data:{plugins:g.map((w)=>({name:w.name,spec:w.spec,marketplace:w.marketplace,scope:w.scope,kind:w.kind,...w.fileClients.length>0&&{clients:w.fileClients},...w.nativeClients.length>0&&{nativeClients:w.nativeClients},...w.nativeResources.length>0&&{nativeResources:w.nativeResources}})),total:g.length},...!f.success&&{error:f.error??"Native inspection failed"}}),!f.success)process.exit(1);return}if(g.length===0){if(console.log(`No plugins installed.
635
635
  `),console.log("To discover available plugins:"),console.log(` allagents plugin marketplace browse <name>
636
636
  `),console.log("To see registered marketplaces:"),console.log(" allagents plugin marketplace list"),!f.success)console.error(`Error: ${f.error??"Native inspection failed"}`),process.exit(1);return}let h=g.filter((w)=>w.kind==="skill").length,y=g.length-h;console.log(`Plugins:
637
- `);for(let w of g){if(console.log(` ❯ ${w.marketplace?w.spec:w.name}`),console.log(` Type: ${w.kind}`),console.log(` Scope: ${w.scope}`),!w.marketplace)console.log(` Source: ${En(w.effectiveSpec)}`);if(w.fileClients.length>0||w.nativeClients.length>0){let b=[...w.nativeClients.map((k)=>`native ${k}`),...w.fileClients];console.log(` Clients: ${b.join(", ")}`)}for(let b of w.nativeResources)console.log(`${Qv(b)} declared=${String(b.declared)} ownership=${b.ownership}${b.transition?` transition=${b.transition}`:""}`);console.log("")}let v=[];if(y>0)v.push(`${y} plugin${y===1?"":"s"}`);if(h>0)v.push(`${h} skill${h===1?"":"s"}`);if(console.log(`Total: ${v.join(", ")}`),!f.success)console.error(`Error: ${f.error??"Native inspection failed"}`),process.exit(1)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"plugin list",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),fet=ge.command({name:"validate",description:We(UC),args:{path:ge.positional({type:ge.string,displayName:"path"})},handler:async({path:e})=>{if(L()){H({success:!0,command:"plugin validate",data:{path:e,valid:!1,message:"not yet implemented"}});return}console.log(`Validating plugin at: ${e}`),console.log("(validation not yet implemented)")}}),met=ge.command({name:"install",description:We(LC),args:{plugin:ge.positional({type:ge.string,displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default) or "user"'}),client:ge.option({type:ge.optional(ge.string),long:"client",short:"c",description:"Comma-separated clients for this plugin"}),yes:ge.flag({long:"yes",short:"y",description:"Run without prompts using configured or default scope and clients"}),skills:ge.multioption({type:ge.array(ge.string),long:"skill",description:"Only enable specific skills (can be repeated)"})},handler:async({plugin:e,scope:t,client:r,yes:i,skills:n})=>{try{let o=process.cwd(),s=mp(o,Z,ee),a=JC(L()),c=await Tm({workspacePath:o,declaration:e,action:"Install plugin",payload:e,scopeStates:{project:async()=>{if(wt(o)||!_w(s))return null;let k=await tr(s);return{clients:k.clients,plugins:k.plugins}},user:async()=>{let k=await bt();return k?{clients:k.clients,plugins:k.plugins}:null}},environment:a,...YC(a)&&{prompts:jm()},...t!==void 0&&{scope:t},...r!==void 0&&{clients:r},yes:i});if(!c){if(!L())console.log("Install cancelled. No changes made.");return}let l=c.scope==="user",u=c.selectedClientEntries,p=Vt(ae(c.prospectiveDeclaration)),d=c.prospectiveDeclaration,f;if(p){let k=await Cu(d,l?void 0:o);if(!k.success)throw Error(k.error);d=k.declaration,f=k.registeredAs}if(!l){let k=await h0(tn(),bs(o));for(let A of k)console.warn(`Warning: Workspace marketplace '${A}' overrides user marketplace of the same name.`)}let m=await tl(d,u,c.scope,o);if(m.length>0)throw Error(`Native preflight failed; workspace declaration was not changed: ${m.join("; ")}`);let g=Dr([d],u,c.scope).plans[0],h=!!g&&g.clients.length===0&&g.nativeClients.length>0,y={declaration:d,clients:c.clients,...(p||h)&&{sourceValidation:"declaration"}},v=l?await Eu(y):await Cf(y,o);if(!v.success){if(L())H({success:!1,command:"plugin install",error:v.error??"Unknown error"}),process.exit(1);console.error(`Error: ${v.error}`),process.exit(1)}if(f)v.autoRegistered??=f;let w=v.normalizedPlugin??e;if(n.length>0){let k=l?fe():process.cwd(),A=l?await kt():await gt(k);if(!A.success){let E=`Initial sync failed: ${A.error??"Unknown error"}`;if(L())H({success:!1,command:"plugin install",error:E}),process.exit(1);console.error(`Error: ${E}`),process.exit(1)}let N=await Gr(k),C=zc(w),P=N.filter((E)=>E.pluginSource===w||C.includes(E.pluginName));if(P.length===0){if(!L())console.error(`Warning: No skills found in plugin ${w}`)}else{let E=P[0]?.pluginName,O=P.map((_)=>_.name),z=n.filter((_)=>!O.includes(_));if(z.length>0){let _=`Unknown skills: ${z.join(", ")}. Available: ${O.join(", ")}`;if(L())H({success:!1,command:"plugin install",error:_}),process.exit(1);console.error(`Error: ${_}`),process.exit(1)}for(let _ of n){let D=`${E}:${_}`,B=l?await Ss(D):await Sa(D,k);if(!B.success&&!L())console.error(`Warning: ${B.error}`)}if(!L())console.log(`
637
+ `);for(let w of g){if(console.log(` ❯ ${w.marketplace?w.spec:w.name}`),console.log(` Type: ${w.kind}`),console.log(` Scope: ${w.scope}`),!w.marketplace)console.log(` Source: ${En(w.effectiveSpec)}`);if(w.fileClients.length>0||w.nativeClients.length>0){let b=[...w.nativeClients.map((k)=>`native ${k}`),...w.fileClients];console.log(` Clients: ${b.join(", ")}`)}for(let b of w.nativeResources)console.log(`${Qv(b)} declared=${String(b.declared)} ownership=${b.ownership}${b.transition?` transition=${b.transition}`:""}`);console.log("")}let v=[];if(y>0)v.push(`${y} plugin${y===1?"":"s"}`);if(h>0)v.push(`${h} skill${h===1?"":"s"}`);if(console.log(`Total: ${v.join(", ")}`),!f.success)console.error(`Error: ${f.error??"Native inspection failed"}`),process.exit(1)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"plugin list",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),fet=ge.command({name:"validate",description:He(UC),args:{path:ge.positional({type:ge.string,displayName:"path"})},handler:async({path:e})=>{if(L()){H({success:!0,command:"plugin validate",data:{path:e,valid:!1,message:"not yet implemented"}});return}console.log(`Validating plugin at: ${e}`),console.log("(validation not yet implemented)")}}),met=ge.command({name:"install",description:He(LC),args:{plugin:ge.positional({type:ge.string,displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default) or "user"'}),client:ge.option({type:ge.optional(ge.string),long:"client",short:"c",description:"Comma-separated clients for this plugin"}),yes:ge.flag({long:"yes",short:"y",description:"Run without prompts using configured or default scope and clients"}),skills:ge.multioption({type:ge.array(ge.string),long:"skill",description:"Only enable specific skills (can be repeated)"})},handler:async({plugin:e,scope:t,client:r,yes:i,skills:n})=>{try{let o=process.cwd(),s=mp(o,Z,ee),a=JC(L()),c=await Tm({workspacePath:o,declaration:e,action:"Install plugin",payload:e,scopeStates:{project:async()=>{if(wt(o)||!_w(s))return null;let k=await tr(s);return{clients:k.clients,plugins:k.plugins}},user:async()=>{let k=await bt();return k?{clients:k.clients,plugins:k.plugins}:null}},environment:a,...YC(a)&&{prompts:jm()},...t!==void 0&&{scope:t},...r!==void 0&&{clients:r},yes:i});if(!c){if(!L())console.log("Install cancelled. No changes made.");return}let l=c.scope==="user",u=c.selectedClientEntries,p=Vt(ae(c.prospectiveDeclaration)),d=c.prospectiveDeclaration,f;if(p){let k=await Cu(d,l?void 0:o);if(!k.success)throw Error(k.error);d=k.declaration,f=k.registeredAs}if(!l){let k=await h0(tn(),bs(o));for(let A of k)console.warn(`Warning: Workspace marketplace '${A}' overrides user marketplace of the same name.`)}let m=await tl(d,u,c.scope,o);if(m.length>0)throw Error(`Native preflight failed; workspace declaration was not changed: ${m.join("; ")}`);let g=Dr([d],u,c.scope).plans[0],h=!!g&&g.clients.length===0&&g.nativeClients.length>0,y={declaration:d,clients:c.clients,...(p||h)&&{sourceValidation:"declaration"}},v=l?await Eu(y):await Cf(y,o);if(!v.success){if(L())H({success:!1,command:"plugin install",error:v.error??"Unknown error"}),process.exit(1);console.error(`Error: ${v.error}`),process.exit(1)}if(f)v.autoRegistered??=f;let w=v.normalizedPlugin??e;if(n.length>0){let k=l?fe():process.cwd(),A=l?await kt():await gt(k);if(!A.success){let E=`Initial sync failed: ${A.error??"Unknown error"}`;if(L())H({success:!1,command:"plugin install",error:E}),process.exit(1);console.error(`Error: ${E}`),process.exit(1)}let N=await Gr(k),C=zc(w),P=N.filter((E)=>E.pluginSource===w||C.includes(E.pluginName));if(P.length===0){if(!L())console.error(`Warning: No skills found in plugin ${w}`)}else{let E=P[0]?.pluginName,O=P.map((_)=>_.name),z=n.filter((_)=>!O.includes(_));if(z.length>0){let _=`Unknown skills: ${z.join(", ")}. Available: ${O.join(", ")}`;if(L())H({success:!1,command:"plugin install",error:_}),process.exit(1);console.error(`Error: ${_}`),process.exit(1)}for(let _ of n){let D=`${E}:${_}`,B=l?await Ss(D):await Sa(D,k);if(!B.success&&!L())console.error(`Warning: ${B.error}`)}if(!L())console.log(`
638
638
  Enabled skills: ${n.join(", ")}`)}}if(v.replaced&&!L())console.log(`Plugin '${w}' already exists. Replacing with new source.`);if(!L()){if(v.autoRegistered)console.log(` Resolved marketplace: ${v.autoRegistered}`);console.log(`Installing plugin "${w}"...
639
639
  `)}let{ok:x,syncData:b}=l?await h6():await g6();if(!L()&&x)console.log(`
640
- ✔ Successfully installed plugin: ${w} (scope: ${l?"user":"project"})`);if(L()){if(H({success:x,command:"plugin install",data:{plugin:w,scope:l?"user":"project",autoRegistered:v.autoRegistered??null,...n.length>0&&{enabledSkills:n},replaced:v.replaced??!1,syncResult:b},...!x&&{error:"Sync completed with failures"}}),!x)process.exit(1);return}if(!x)process.exit(1)}catch(o){if(o instanceof Error){if(L())H({success:!1,command:"plugin install",error:o.message}),process.exit(1);console.error(`Error: ${o.message}`),process.exit(1)}throw o}}}),get=ge.command({name:"uninstall",description:We(BC),aliases:["remove"],args:{plugin:ge.positional({type:ge.string,displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default) or "user"'})},handler:async({plugin:e,scope:t})=>{try{if(t&&t!=="user"&&t!=="project")throw Error(`Invalid scope '${t}'. Must be 'user' or 'project'.`);let r=t==="user"?["user"]:t==="project"?["project"]:wt(process.cwd())?["user"]:["project","user"],i=[],n={},o=!1,s=!0;for(let a of r){let c=await iet(e,a),l=c!==void 0,u=c??e,p=await net(u,a);if(!l&&!p)continue;if(o=!0,l){let m=a==="user"?await Iu(u):await Ef(u);if(!m.success){if(s=!1,i.push({scope:a,action:"failed",error:m.error??"Declaration removal failed"}),!L())console.error(`✗ Declaration removal (${a}): ${m.error??"Unknown error"}`);continue}if(i.push({scope:a,action:"removed"}),!L())console.log(`✓ Declaration removed (${a} scope): ${e}`)}else if(i.push({scope:a,action:"absent"}),!L())console.log(`= Declaration already absent (${a} scope): ${e}`);let d={mode:"remove",targets:[u]},f=a==="user"?await h6({nativeSelection:d}):await g6({nativeSelection:d});if(n[a]=f.syncData,!f.ok)s=!1}if(!o){let a=`Plugin not found: ${e}`;if(L())H({success:!1,command:"plugin uninstall",error:a}),process.exit(1);console.error(`Error: ${a}`),process.exit(1)}if(L())H({success:s,command:"plugin uninstall",data:{plugin:e,scopes:i.map((a)=>a.scope),declarations:i,syncResults:n},...!s&&{error:"Declaration removal or native cleanup failed"}});if(!s)process.exit(1)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin uninstall",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),het=ge.command({name:"update",description:We(qC),args:{plugin:ge.positional({type:ge.optional(ge.string),displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default), "user", or "all"'})},handler:async({plugin:e,scope:t})=>{let r=new Ms,i=L(),n=Boolean(process.stdout.isTTY)&&!i;try{if(t&&t!=="user"&&t!=="project"&&t!=="all")throw Error(`Invalid scope '${t}'. Must be 'user', 'project', or 'all'.`);let o=t==="all",s=t==="user"||o,a=t==="project"||!t&&!o||o,c=[],l=(U,J)=>{if(!c.some((le)=>le.spec===U&&le.scope===J))c.push({spec:U,scope:J})};if(a&&!wt(process.cwd())){let U=await Du(process.cwd());for(let J of U)l(J.spec,"project")}if(s){let U=await Ou();for(let J of U)l(J.spec,"user")}let u={};if(a&&!wt(process.cwd())){let U=mp(process.cwd(),Z,ee);if(_w(U)){let J=await tr(U);u.project=J;for(let le of J.plugins)l(ae(le),"project")}}if(s){let U=await bt();if(U){u.user=U;for(let J of U.plugins)l(ae(J),"user")}}let p=e?c.filter(({spec:U})=>za(e,U,U)):c;if(e&&p.length===0){let U=`Plugin not found: ${e}`;if(i)H({success:!1,command:"plugin update",error:U}),process.exit(1);console.error(`Error: ${U}`),process.exit(1)}if(p.length===0){if(i){H({success:!0,command:"plugin update",data:{results:[],updated:0,skipped:0,failed:0}});return}console.log("No plugins to update.");return}let d=new Set;if(n){let U=new Map;for(let J of p){let le=K(En(J.spec)),ut=U.get(le)??new Set;ut.add(J.scope),U.set(le,ut)}for(let[J,le]of U)if(le.size>1)d.add(J)}let f=(U)=>`${U.scope}:${U.spec}`,m=(U)=>{let J=K(En(U.spec));return d.has(J)?`${J} (${U.scope})`:J},g=()=>{console.log(e?`Updating plugin: ${e}...`:"Updating plugins..."),console.log()},h=new Set,y=(U)=>{if(!n)return;let J=f(U);if(h.has(J))return;h.add(J),console.log(`Updating ${m(U)}...`)},v=(U)=>{let J=U==="project"?process.cwd():void 0;return{parsePluginSpec:vt,getMarketplaceRegistration:(le,ut)=>rn(le,ut,J),validateMarketplaceAccess:Fi,parseMarketplaceManifest:sr,updateMarketplace:(le)=>uo(le,J,{},r)}},w={project:v("project"),user:v("user")},x={project:[],user:[]},b=new Set,k=new Map;for(let U of p){let J=f(U);if(n)console.log(`Checking plugin source: ${m(U)}`);let le=u[U.scope];if(le){let ut=le.plugins.find((St)=>ae(St)===U.spec)??U.spec,Tt=Dr([ut],le.clients,U.scope).plans[0],Nt=await tl(ut,le.clients,U.scope,process.cwd());if(Nt.length>0)throw Error(`Native preflight failed before update: ${Nt.join("; ")}`);if((Tt?.nativeClients.length??0)>0){if(x[U.scope].push(U.spec),k.set(J,{plugin:U.spec,status:"available"}),Tt?.clients.length===0)b.add(J);continue}}k.set(J,await Xz(U.spec,w[U.scope],r))}let A=p.filter((U)=>k.get(f(U))?.status==="available").length;if(n&&A>0)console.log(`Found ${A} plugin update${A===1?"":"s"}.`),console.log();if(!i&&!n)g();let N=[],C=(U)=>{let J=U.success?U.action==="updated"?"✓":"-":"✗";if(console.log(`${J} ${U.plugin} (${U.action})`),U.error)console.log(` Error: ${U.error}`)},P=new Set;for(let U of p){let{spec:J,scope:le}=U,ut=f(U),Tt=k.get(ut),Nt;if(Tt?.status==="failed"){if(Nt={plugin:J,success:!1,action:"failed",...Tt.error&&{error:Tt.error}},n)C(Nt)}else if(Tt?.status==="up-to-date"){if(Nt={plugin:J,success:!0,action:"skipped"},n)C(Nt)}else if(b.has(ut))y(U),Nt={plugin:J,success:!0,action:"skipped"};else if(y(U),Nt=await Qz(J,w[le],r),n)C(Nt);if(Nt.success&&!b.has(ut)&&(Nt.action==="updated"||Tt?.status==="available"||Tt?.status==="up-to-date"||Tt?.status==="not-remote"&&!ye(J)))P.add(le);N.push(Nt)}let E=!0,O={},z={},_={project:p.filter((U)=>U.scope==="project").map((U)=>U.spec),user:p.filter((U)=>U.scope==="user").map((U)=>U.spec)};if(_.project.length>0&&(P.has("project")||x.project.length>0)){let{ok:U,syncData:J}=await g6({skipAgentFiles:!0,nativeSelection:{mode:"update",targets:_.project}},{announceWorkspace:!n,compactSuccess:n});if(O.project=J,!U)E=!1;z.project=J.nativeResources?.effects??[]}if(_.user.length>0&&(P.has("user")||x.user.length>0)){let{ok:U,syncData:J}=await h6({skipAgentFiles:!0,nativeSelection:{mode:"update",targets:_.user}},{compactSuccess:n});if(O.user=J,!U)E=!1;z.user=J.nativeResources?.effects??[]}for(let U=0;U<p.length;U++){let J=p[U];if(!J||!b.has(f(J)))continue;let le=pw(J.spec,z[J.scope]??[]);if(N[U]=le,n)C(le)}if(!i&&!n)for(let U of N)C(U);let D=N.filter((U)=>U.action==="updated").length,B=N.filter((U)=>U.action==="skipped").length,X=N.filter((U)=>U.action==="failed").length;if(i){if(H({success:X===0&&E,command:"plugin update",data:{results:N.map((U)=>({plugin:U.plugin,success:U.success,action:U.action,...U.error&&{error:U.error}})),updated:D,skipped:B,failed:X,...Object.keys(O).length>0&&{syncResults:O}},...(X>0||!E)&&{error:X>0?`${X} plugin(s) failed to update`:"Native update or sync failed"}}),X>0||!E)process.exit(1);return}if(console.log(),console.log(`Update complete: ${D} updated, ${B} skipped, ${X} failed`),X>0||!E)process.exit(1)}catch(o){if(o instanceof Error){if(i)H({success:!1,command:"plugin update",error:o.message}),process.exit(1);console.error(`Error: ${o.message}`),process.exit(1)}throw o}finally{r.dispose()}}}),Ipe=Dn({name:"plugin",description:"Manage plugins and marketplaces",cmds:{install:met,uninstall:get,update:het,marketplace:pet,list:det,validate:fet,skills:f_}});jr();lC();var lr=Ut(ts(),1);Wo();var Ape=["profile","operation","status","declarationDigest","clients","plan","steps","warnings","error"],Ope=["profile","operation","status","declared","installed","declarationDigest","stateDigest","clients","steps","launchers","warnings","error"],y6=[{name:"name",type:"string",required:!1,description:"Profile name. In an interactive terminal, omit to choose from the available profiles."}],Dpe=[{flag:"--yes",short:"-y",type:"boolean",description:"Apply the displayed plan without asking for confirmation."},{flag:"--dry-run",type:"boolean",description:"Display the plan without prompting or changing any files."},{flag:"--offline",type:"boolean",description:"Plan and apply using only locally available sources."}],v6=[{client:"string",mechanism:"string",root:"string",agentRoot:"string",launcher:{name:"string",command:{command:"string",args:["string"]},destinations:["string"]}}],w6=[{status:"created | updated | removed | unchanged | referenced | retained | failed",client:"string",kind:"string",identity:"string",requestedRef:"string?",resolvedRef:"string?",detail:{source:"string?",skills:["string"],commands:[{command:"string",args:["string"]}],mcpServers:[{name:"string",transport:"http | stdio",endpoint:"string?",command:{command:"string",args:["string"]},requestedSecrets:["string"]}]},error:"string?"}],Tpe={profile:"string",operation:"install | remove",status:"planned",declarationDigest:"string",clients:v6,steps:w6,warnings:["string"]},m_={command:"profile install",description:"Install a declared global agent profile",whenToUse:"When you want AllAgents to materialize one user profile, its client resources, and its launchers from the user workspace declaration",examples:["allagents profile install work","allagents profile install work --dry-run","allagents profile install work --yes --offline","allagents --json profile install work --yes"],expectedOutput:"Displays a redacted deterministic plan, asks before applying unless --yes is supplied, and reports each created, updated, unchanged, referenced, retained, or failed step.",positionals:y6,options:Dpe,outputSchema:{profile:"string",operation:"install",status:"string",declarationDigest:"string?",clients:v6,steps:w6,plan:Tpe,warnings:["string"],error:"string?"},jsonFields:Ape},Npe={profile:"string",operation:"status",status:"string",declared:"boolean",installed:"boolean",declarationDigest:"string?",stateDigest:"string?",clients:["string"],steps:[{status:"created | updated | removed | unchanged | referenced | retained | failed",client:"string?",kind:"string?",identity:"string?",error:"string?"}],launchers:[{client:"string",name:"string",path:"string",onPath:"boolean"}],warnings:["string"],error:"string?"},g_={command:"profile list",description:"List declared and installed global profiles",whenToUse:"When you need a read-only inventory of every declared or installed profile, its clients, and launcher PATH status",examples:["allagents profile list","allagents --json profile list"],expectedOutput:"Lists every declared and declaration-missing installed profile with overall state, clients, and launcher paths without changing user files.",outputSchema:{profiles:[Npe],total:"number"},jsonFields:Ope,skipUpdateCheck:!0},h_={command:"profile status",description:"Inspect declared and installed global profiles",whenToUse:"When you need detailed read-only profile state, per-resource status, or launcher PATH diagnostics",examples:["allagents profile status work","allagents profile status","allagents --json profile status work"],expectedOutput:"Reports declared and installed state, detailed resource statuses, warnings, and whether the profile launcher directory is available on PATH without changing user files.",positionals:y6,outputSchema:Npe,jsonFields:Ope},y_={command:"profile remove",description:"Remove an installed or declared global profile safely",whenToUse:"When you want AllAgents to remove resources and profile-owned OAuth credentials for one installed or declared user profile while retaining referenced resources",examples:["allagents profile remove work","allagents profile remove work --dry-run","allagents profile remove work --yes","allagents --json profile remove work --yes"],expectedOutput:"Displays a redacted deterministic removal plan, asks before applying unless --yes is supplied, removes profile-owned OAuth credentials even for a declared-only profile, and reports removed, retained, unchanged, or failed resources.",positionals:y6,options:Dpe,outputSchema:{profile:"string",operation:"remove",status:"string",declarationDigest:"string?",clients:v6,steps:w6,plan:Tpe,warnings:["string"],error:"string?"},jsonFields:Ape};var yet={planProfileOperation:Sm,applyProfilePlan:aC,getProfileStatus:cC,getProfileStatuses:v4},vet={isInteractive:()=>Boolean(process.stdin.isTTY&&process.stdout.isTTY)&&!L(),isJson:L,print:(e)=>console.log(e),printError:(e)=>console.error(e),printJson:H,selectProfile:async({message:e,options:t})=>{let r=await Il({message:e,options:t.map((i)=>({...i}))});return Me(r)?void 0:r},confirm:async({message:e})=>{let t=await Rl({message:e,initialValue:!1});return Me(t)?void 0:t},exit:(e)=>process.exit(e)};class gp extends Error{exitCode;data;constructor(e,t,r){super(e);this.exitCode=t;this.data=r}}function wet(e){return{...e.offline?{offline:!0}:{},...e.dryRun?{dryRun:!0}:{}}}function bet(e){switch(e){case"install":return"Select a declared profile to install";case"remove":return"Select an installed profile to remove";case"status":return"Select a profile to inspect"}}function ket(e,t){return t.filter((r)=>{switch(e){case"install":return r.declared;case"remove":return r.installed;case"status":return r.declared||r.installed}return!1}).sort((r,i)=>r.profile.localeCompare(i.profile))}async function zpe(e,t,r,i,n){if(t)return t;if(!i.isInteractive()||i.isJson())throw new gp(`profile name is required in non-interactive and JSON modes; pass a name to profile ${e}`,2);let o=ket(e,await r.getProfileStatuses(n));if(o.length===0)throw new gp(e==="install"?"No declared profiles are available to install":`No ${e==="remove"?"installed":"declared or installed"} profiles are available`,2);return i.selectProfile({message:bet(e),options:o.map((s)=>({value:s.profile,label:`${s.profile} (${s.status})`}))})}function Mpe(e,t){for(let r of Ole(e))t.print(r)}function Upe(e,t,r,i,n){if(r.isJson()){r.printJson({success:i,command:e,data:{...op(t),...n?{plan:vC(n)}:{}},...!i&&{error:t.error??`Profile ${t.profile} ${t.status}`}});return}for(let o of _m(t))r.print(o)}function jpe(e){return{profile:e.profile,operation:e.operation,status:"failed",steps:[],warnings:e.warnings,plan:vC(e)}}async function Fpe(e,t,r,i){let n=wet(t),o=await zpe(e,t.name,r,i,n);if(!o){if(!i.isJson())i.print(`Profile ${e} cancelled.`);return 0}let s=await r.planProfileOperation(o,e,n);if(t.dryRun){if(i.isJson())i.printJson({success:!0,command:`profile ${e}`,data:vC(s)});else Mpe(s,i),i.print("Dry run; no changes applied.");return 0}if(!i.isJson())Mpe(s,i);if(!t.yes){if(!i.isInteractive()||i.isJson())throw new gp(`profile ${e} requires confirmation; rerun with --yes in non-interactive and JSON modes`,2,jpe(s));if(await i.confirm({message:`${e==="install"?"Install":"Remove"} profile '${o}' using this plan?`})!==!0)return i.print(`Profile ${e} cancelled.`),0}let a;try{a=await r.applyProfilePlan(s,n)}catch(c){throw new gp(c instanceof Error?c.message:String(c),1,jpe(s))}return Upe(`profile ${e}`,a,i,a.success,s),a.success?0:1}async function $et(e,t){let r=await e.getProfileStatuses({}),i=r.filter((s)=>s.error!==void 0).map((s)=>s.profile).sort((s,a)=>s.localeCompare(a)),n=i.length===0,o=n?void 0:`Failed to inspect profiles: ${i.join(", ")}`;if(t.isJson())return t.printJson({success:n,command:"profile list",data:Ale(r),...o&&{error:o}}),n?0:1;for(let s of Dle(r))t.print(s);if(o)t.printError(`Error: ${K(o)}`);return n?0:1}async function xet(e,t,r){let i={},n=await zpe("status",e,t,r,i);if(!n){if(!r.isJson())r.print("Profile status cancelled.");return 0}let o=await t.getProfileStatus(n,i),s=o.error===void 0;return Upe("profile status",o,r,s),s?0:1}async function v_(e,t,r){let i=0;try{i=await r()}catch(n){let o=n instanceof Error?n.message:String(n);if(i=n instanceof gp?n.exitCode:1,t.isJson())t.printJson({success:!1,command:e,...n instanceof gp&&n.data?{data:{...n.data,error:o}}:{},error:o});else t.printError(`Error: ${K(o)}`)}if(i!==0)t.exit(i)}function Pet(e=yet,t=vet){let r=lr.command({name:"install",description:We(m_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"}),yes:lr.flag({long:"yes",short:"y",description:"Apply without asking for confirmation"}),dryRun:lr.flag({long:"dry-run",description:"Display the plan without making changes"}),offline:lr.flag({long:"offline",description:"Use only locally available sources"})},handler:(s)=>v_("profile install",t,()=>Fpe("install",s,e,t))}),i=lr.command({name:"list",description:We(g_),args:{},handler:()=>v_("profile list",t,()=>$et(e,t))}),n=lr.command({name:"status",description:We(h_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"})},handler:({name:s})=>v_("profile status",t,()=>xet(s,e,t))}),o=lr.command({name:"remove",description:We(y_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"}),yes:lr.flag({long:"yes",short:"y",description:"Apply without asking for confirmation"}),dryRun:lr.flag({long:"dry-run",description:"Display the plan without making changes"}),offline:lr.flag({long:"offline",description:"Use only locally available sources"})},handler:(s)=>v_("profile remove",t,()=>Fpe("remove",s,e,t))});return Dn({name:"profile",description:"Manage global Pi and OMP profiles",cmds:{install:r,list:i,status:n,remove:o}})}var Lpe=Pet();var Zw=Ut(ts(),1);function gr(e){if(typeof e!=="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}import{fileURLToPath as Cet}from"node:url";var Bm=(e,t)=>{let r=k6(_et(e));if(typeof r!=="string")throw TypeError(`${t} must be a string or a file URL: ${r}.`);return r},_et=(e)=>b6(e)?e.toString():e,b6=(e)=>typeof e!=="string"&&e&&Object.getPrototypeOf(e)===String.prototype,k6=(e)=>e instanceof URL?Cet(e):e;var w_=(e,t=[],r={})=>{let i=Bm(e,"First argument"),[n,o]=gr(t)?[[],t]:[t,r];if(!Array.isArray(n))throw TypeError(`Second argument must be either an array of arguments or an options object: ${n}`);if(n.some((c)=>typeof c==="object"&&c!==null))throw TypeError(`Second argument must be an array of strings: ${n}`);let s=n.map(String),a=s.find((c)=>c.includes("\x00"));if(a!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!gr(o))throw TypeError(`Last argument must be an options object: ${o}`);return[i,s,{__proto__:null,...o}]};import{ChildProcess as Tet}from"node:child_process";import{StringDecoder as Eet}from"node:string_decoder";var{toString:Bpe}=Object.prototype,qpe=(e)=>Bpe.call(e)==="[object ArrayBuffer]",Kr=(e)=>Bpe.call(e)==="[object Uint8Array]",Ha=(e)=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ret=new TextEncoder,Vpe=(e)=>Ret.encode(e),Iet=new TextDecoder,b_=(e)=>Iet.decode(e),Wpe=(e,t)=>Aet(e,t).join(""),Aet=(e,t)=>{if(t==="utf8"&&e.every((o)=>typeof o==="string"))return e;let r=new Eet(t),i=e.map((o)=>typeof o==="string"?Vpe(o):o).map((o)=>r.write(o)),n=r.end();return n===""?i:[...i,n]},Ew=(e)=>{if(e.length===1&&Kr(e[0]))return e[0];return S6(Oet(e))},Oet=(e)=>e.map((t)=>typeof t==="string"?Vpe(t):t),S6=(e)=>{let t=new Uint8Array(Det(e)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t},Det=(e)=>{let t=0;for(let r of e)t+=r.length;return t};var Kpe=(e)=>Array.isArray(e)&&Array.isArray(e.raw),Jpe=(e,t)=>{let r=[];for(let[o,s]of e.entries())r=Net({templates:e,expressions:t,tokens:r,index:o,template:s});if(r.length===0)throw TypeError("Template script must not be empty");let[i,...n]=r;return[i,n,{}]},Net=({templates:e,expressions:t,tokens:r,index:i,template:n})=>{if(n===void 0)throw TypeError(`Invalid backslash sequence: ${e.raw[i]}`);let{nextTokens:o,leadingWhitespaces:s,trailingWhitespaces:a}=Met(n,e.raw[i]),c=Gpe(r,o,s);if(i===t.length)return c;let l=t[i],u=Array.isArray(l)?l.map((p)=>Zpe(p)):[Zpe(l)];return Gpe(c,u,a)},Met=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],i=0,n=Hpe.has(t[0]);for(let s=0,a=0;s<e.length;s+=1,a+=1){let c=t[a];if(Hpe.has(c)){if(i!==s)r.push(e.slice(i,s));i=s+1}else if(c==="\\"){let l=t[a+1];if(l===`
640
+ ✔ Successfully installed plugin: ${w} (scope: ${l?"user":"project"})`);if(L()){if(H({success:x,command:"plugin install",data:{plugin:w,scope:l?"user":"project",autoRegistered:v.autoRegistered??null,...n.length>0&&{enabledSkills:n},replaced:v.replaced??!1,syncResult:b},...!x&&{error:"Sync completed with failures"}}),!x)process.exit(1);return}if(!x)process.exit(1)}catch(o){if(o instanceof Error){if(L())H({success:!1,command:"plugin install",error:o.message}),process.exit(1);console.error(`Error: ${o.message}`),process.exit(1)}throw o}}}),get=ge.command({name:"uninstall",description:He(BC),aliases:["remove"],args:{plugin:ge.positional({type:ge.string,displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default) or "user"'})},handler:async({plugin:e,scope:t})=>{try{if(t&&t!=="user"&&t!=="project")throw Error(`Invalid scope '${t}'. Must be 'user' or 'project'.`);let r=t==="user"?["user"]:t==="project"?["project"]:wt(process.cwd())?["user"]:["project","user"],i=[],n={},o=!1,s=!0;for(let a of r){let c=await iet(e,a),l=c!==void 0,u=c??e,p=await net(u,a);if(!l&&!p)continue;if(o=!0,l){let m=a==="user"?await Iu(u):await Ef(u);if(!m.success){if(s=!1,i.push({scope:a,action:"failed",error:m.error??"Declaration removal failed"}),!L())console.error(`✗ Declaration removal (${a}): ${m.error??"Unknown error"}`);continue}if(i.push({scope:a,action:"removed"}),!L())console.log(`✓ Declaration removed (${a} scope): ${e}`)}else if(i.push({scope:a,action:"absent"}),!L())console.log(`= Declaration already absent (${a} scope): ${e}`);let d={mode:"remove",targets:[u]},f=a==="user"?await h6({nativeSelection:d}):await g6({nativeSelection:d});if(n[a]=f.syncData,!f.ok)s=!1}if(!o){let a=`Plugin not found: ${e}`;if(L())H({success:!1,command:"plugin uninstall",error:a}),process.exit(1);console.error(`Error: ${a}`),process.exit(1)}if(L())H({success:s,command:"plugin uninstall",data:{plugin:e,scopes:i.map((a)=>a.scope),declarations:i,syncResults:n},...!s&&{error:"Declaration removal or native cleanup failed"}});if(!s)process.exit(1)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"plugin uninstall",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),het=ge.command({name:"update",description:He(qC),args:{plugin:ge.positional({type:ge.optional(ge.string),displayName:"plugin"}),scope:ge.option({type:ge.optional(ge.string),long:"scope",short:"s",description:'Installation scope: "project" (default), "user", or "all"'})},handler:async({plugin:e,scope:t})=>{let r=new Ms,i=L(),n=Boolean(process.stdout.isTTY)&&!i;try{if(t&&t!=="user"&&t!=="project"&&t!=="all")throw Error(`Invalid scope '${t}'. Must be 'user', 'project', or 'all'.`);let o=t==="all",s=t==="user"||o,a=t==="project"||!t&&!o||o,c=[],l=(U,J)=>{if(!c.some((le)=>le.spec===U&&le.scope===J))c.push({spec:U,scope:J})};if(a&&!wt(process.cwd())){let U=await Du(process.cwd());for(let J of U)l(J.spec,"project")}if(s){let U=await Ou();for(let J of U)l(J.spec,"user")}let u={};if(a&&!wt(process.cwd())){let U=mp(process.cwd(),Z,ee);if(_w(U)){let J=await tr(U);u.project=J;for(let le of J.plugins)l(ae(le),"project")}}if(s){let U=await bt();if(U){u.user=U;for(let J of U.plugins)l(ae(J),"user")}}let p=e?c.filter(({spec:U})=>za(e,U,U)):c;if(e&&p.length===0){let U=`Plugin not found: ${e}`;if(i)H({success:!1,command:"plugin update",error:U}),process.exit(1);console.error(`Error: ${U}`),process.exit(1)}if(p.length===0){if(i){H({success:!0,command:"plugin update",data:{results:[],updated:0,skipped:0,failed:0}});return}console.log("No plugins to update.");return}let d=new Set;if(n){let U=new Map;for(let J of p){let le=K(En(J.spec)),ut=U.get(le)??new Set;ut.add(J.scope),U.set(le,ut)}for(let[J,le]of U)if(le.size>1)d.add(J)}let f=(U)=>`${U.scope}:${U.spec}`,m=(U)=>{let J=K(En(U.spec));return d.has(J)?`${J} (${U.scope})`:J},g=()=>{console.log(e?`Updating plugin: ${e}...`:"Updating plugins..."),console.log()},h=new Set,y=(U)=>{if(!n)return;let J=f(U);if(h.has(J))return;h.add(J),console.log(`Updating ${m(U)}...`)},v=(U)=>{let J=U==="project"?process.cwd():void 0;return{parsePluginSpec:vt,getMarketplaceRegistration:(le,ut)=>rn(le,ut,J),validateMarketplaceAccess:Fi,parseMarketplaceManifest:sr,updateMarketplace:(le)=>uo(le,J,{},r)}},w={project:v("project"),user:v("user")},x={project:[],user:[]},b=new Set,k=new Map;for(let U of p){let J=f(U);if(n)console.log(`Checking plugin source: ${m(U)}`);let le=u[U.scope];if(le){let ut=le.plugins.find((St)=>ae(St)===U.spec)??U.spec,Tt=Dr([ut],le.clients,U.scope).plans[0],Nt=await tl(ut,le.clients,U.scope,process.cwd());if(Nt.length>0)throw Error(`Native preflight failed before update: ${Nt.join("; ")}`);if((Tt?.nativeClients.length??0)>0){if(x[U.scope].push(U.spec),k.set(J,{plugin:U.spec,status:"available"}),Tt?.clients.length===0)b.add(J);continue}}k.set(J,await Xz(U.spec,w[U.scope],r))}let A=p.filter((U)=>k.get(f(U))?.status==="available").length;if(n&&A>0)console.log(`Found ${A} plugin update${A===1?"":"s"}.`),console.log();if(!i&&!n)g();let N=[],C=(U)=>{let J=U.success?U.action==="updated"?"✓":"-":"✗";if(console.log(`${J} ${U.plugin} (${U.action})`),U.error)console.log(` Error: ${U.error}`)},P=new Set;for(let U of p){let{spec:J,scope:le}=U,ut=f(U),Tt=k.get(ut),Nt;if(Tt?.status==="failed"){if(Nt={plugin:J,success:!1,action:"failed",...Tt.error&&{error:Tt.error}},n)C(Nt)}else if(Tt?.status==="up-to-date"){if(Nt={plugin:J,success:!0,action:"skipped"},n)C(Nt)}else if(b.has(ut))y(U),Nt={plugin:J,success:!0,action:"skipped"};else if(y(U),Nt=await Qz(J,w[le],r),n)C(Nt);if(Nt.success&&!b.has(ut)&&(Nt.action==="updated"||Tt?.status==="available"||Tt?.status==="up-to-date"||Tt?.status==="not-remote"&&!ye(J)))P.add(le);N.push(Nt)}let E=!0,O={},z={},_={project:p.filter((U)=>U.scope==="project").map((U)=>U.spec),user:p.filter((U)=>U.scope==="user").map((U)=>U.spec)};if(_.project.length>0&&(P.has("project")||x.project.length>0)){let{ok:U,syncData:J}=await g6({skipAgentFiles:!0,nativeSelection:{mode:"update",targets:_.project}},{announceWorkspace:!n,compactSuccess:n});if(O.project=J,!U)E=!1;z.project=J.nativeResources?.effects??[]}if(_.user.length>0&&(P.has("user")||x.user.length>0)){let{ok:U,syncData:J}=await h6({skipAgentFiles:!0,nativeSelection:{mode:"update",targets:_.user}},{compactSuccess:n});if(O.user=J,!U)E=!1;z.user=J.nativeResources?.effects??[]}for(let U=0;U<p.length;U++){let J=p[U];if(!J||!b.has(f(J)))continue;let le=pw(J.spec,z[J.scope]??[]);if(N[U]=le,n)C(le)}if(!i&&!n)for(let U of N)C(U);let D=N.filter((U)=>U.action==="updated").length,B=N.filter((U)=>U.action==="skipped").length,X=N.filter((U)=>U.action==="failed").length;if(i){if(H({success:X===0&&E,command:"plugin update",data:{results:N.map((U)=>({plugin:U.plugin,success:U.success,action:U.action,...U.error&&{error:U.error}})),updated:D,skipped:B,failed:X,...Object.keys(O).length>0&&{syncResults:O}},...(X>0||!E)&&{error:X>0?`${X} plugin(s) failed to update`:"Native update or sync failed"}}),X>0||!E)process.exit(1);return}if(console.log(),console.log(`Update complete: ${D} updated, ${B} skipped, ${X} failed`),X>0||!E)process.exit(1)}catch(o){if(o instanceof Error){if(i)H({success:!1,command:"plugin update",error:o.message}),process.exit(1);console.error(`Error: ${o.message}`),process.exit(1)}throw o}finally{r.dispose()}}}),Ipe=Dn({name:"plugin",description:"Manage plugins and marketplaces",cmds:{install:met,uninstall:get,update:het,marketplace:pet,list:det,validate:fet,skills:f_}});jr();lC();var lr=Ut(ts(),1);Wo();var Ape=["profile","operation","status","declarationDigest","clients","plan","steps","warnings","error"],Ope=["profile","operation","status","declared","installed","declarationDigest","stateDigest","clients","steps","launchers","warnings","error"],y6=[{name:"name",type:"string",required:!1,description:"Profile name. In an interactive terminal, omit to choose from the available profiles."}],Dpe=[{flag:"--yes",short:"-y",type:"boolean",description:"Apply the displayed plan without asking for confirmation."},{flag:"--dry-run",type:"boolean",description:"Display the plan without prompting or changing any files."},{flag:"--offline",type:"boolean",description:"Plan and apply using only locally available sources."}],v6=[{client:"string",mechanism:"string",root:"string",agentRoot:"string",launcher:{name:"string",command:{command:"string",args:["string"]},destinations:["string"]}}],w6=[{status:"created | updated | removed | unchanged | referenced | retained | failed",client:"string",kind:"string",identity:"string",requestedRef:"string?",resolvedRef:"string?",detail:{source:"string?",skills:["string"],commands:[{command:"string",args:["string"]}],mcpServers:[{name:"string",transport:"http | stdio",endpoint:"string?",command:{command:"string",args:["string"]},requestedSecrets:["string"]}]},error:"string?"}],Tpe={profile:"string",operation:"install | remove",status:"planned",declarationDigest:"string",clients:v6,steps:w6,warnings:["string"]},m_={command:"profile install",description:"Install a declared global agent profile",whenToUse:"When you want AllAgents to materialize one user profile, its client resources, and its launchers from the user workspace declaration",examples:["allagents profile install work","allagents profile install work --dry-run","allagents profile install work --yes --offline","allagents --json profile install work --yes"],expectedOutput:"Displays a redacted deterministic plan, asks before applying unless --yes is supplied, and reports each created, updated, unchanged, referenced, retained, or failed step.",positionals:y6,options:Dpe,outputSchema:{profile:"string",operation:"install",status:"string",declarationDigest:"string?",clients:v6,steps:w6,plan:Tpe,warnings:["string"],error:"string?"},jsonFields:Ape},Npe={profile:"string",operation:"status",status:"string",declared:"boolean",installed:"boolean",declarationDigest:"string?",stateDigest:"string?",clients:["string"],steps:[{status:"created | updated | removed | unchanged | referenced | retained | failed",client:"string?",kind:"string?",identity:"string?",error:"string?"}],launchers:[{client:"string",name:"string",path:"string",onPath:"boolean"}],warnings:["string"],error:"string?"},g_={command:"profile list",description:"List declared and installed global profiles",whenToUse:"When you need a read-only inventory of every declared or installed profile, its clients, and launcher PATH status",examples:["allagents profile list","allagents --json profile list"],expectedOutput:"Lists every declared and declaration-missing installed profile with overall state, clients, and launcher paths without changing user files.",outputSchema:{profiles:[Npe],total:"number"},jsonFields:Ope,skipUpdateCheck:!0},h_={command:"profile status",description:"Inspect declared and installed global profiles",whenToUse:"When you need detailed read-only profile state, per-resource status, or launcher PATH diagnostics",examples:["allagents profile status work","allagents profile status","allagents --json profile status work"],expectedOutput:"Reports declared and installed state, detailed resource statuses, warnings, and whether the profile launcher directory is available on PATH without changing user files.",positionals:y6,outputSchema:Npe,jsonFields:Ope},y_={command:"profile remove",description:"Remove an installed or declared global profile safely",whenToUse:"When you want AllAgents to remove resources and profile-owned OAuth credentials for one installed or declared user profile while retaining referenced resources",examples:["allagents profile remove work","allagents profile remove work --dry-run","allagents profile remove work --yes","allagents --json profile remove work --yes"],expectedOutput:"Displays a redacted deterministic removal plan, asks before applying unless --yes is supplied, removes profile-owned OAuth credentials even for a declared-only profile, and reports removed, retained, unchanged, or failed resources.",positionals:y6,options:Dpe,outputSchema:{profile:"string",operation:"remove",status:"string",declarationDigest:"string?",clients:v6,steps:w6,plan:Tpe,warnings:["string"],error:"string?"},jsonFields:Ape};var yet={planProfileOperation:Sm,applyProfilePlan:aC,getProfileStatus:cC,getProfileStatuses:v4},vet={isInteractive:()=>Boolean(process.stdin.isTTY&&process.stdout.isTTY)&&!L(),isJson:L,print:(e)=>console.log(e),printError:(e)=>console.error(e),printJson:H,selectProfile:async({message:e,options:t})=>{let r=await Il({message:e,options:t.map((i)=>({...i}))});return Me(r)?void 0:r},confirm:async({message:e})=>{let t=await Rl({message:e,initialValue:!1});return Me(t)?void 0:t},exit:(e)=>process.exit(e)};class gp extends Error{exitCode;data;constructor(e,t,r){super(e);this.exitCode=t;this.data=r}}function wet(e){return{...e.offline?{offline:!0}:{},...e.dryRun?{dryRun:!0}:{}}}function bet(e){switch(e){case"install":return"Select a declared profile to install";case"remove":return"Select an installed profile to remove";case"status":return"Select a profile to inspect"}}function ket(e,t){return t.filter((r)=>{switch(e){case"install":return r.declared;case"remove":return r.installed;case"status":return r.declared||r.installed}return!1}).sort((r,i)=>r.profile.localeCompare(i.profile))}async function zpe(e,t,r,i,n){if(t)return t;if(!i.isInteractive()||i.isJson())throw new gp(`profile name is required in non-interactive and JSON modes; pass a name to profile ${e}`,2);let o=ket(e,await r.getProfileStatuses(n));if(o.length===0)throw new gp(e==="install"?"No declared profiles are available to install":`No ${e==="remove"?"installed":"declared or installed"} profiles are available`,2);return i.selectProfile({message:bet(e),options:o.map((s)=>({value:s.profile,label:`${s.profile} (${s.status})`}))})}function Mpe(e,t){for(let r of Ole(e))t.print(r)}function Upe(e,t,r,i,n){if(r.isJson()){r.printJson({success:i,command:e,data:{...op(t),...n?{plan:vC(n)}:{}},...!i&&{error:t.error??`Profile ${t.profile} ${t.status}`}});return}for(let o of _m(t))r.print(o)}function jpe(e){return{profile:e.profile,operation:e.operation,status:"failed",steps:[],warnings:e.warnings,plan:vC(e)}}async function Fpe(e,t,r,i){let n=wet(t),o=await zpe(e,t.name,r,i,n);if(!o){if(!i.isJson())i.print(`Profile ${e} cancelled.`);return 0}let s=await r.planProfileOperation(o,e,n);if(t.dryRun){if(i.isJson())i.printJson({success:!0,command:`profile ${e}`,data:vC(s)});else Mpe(s,i),i.print("Dry run; no changes applied.");return 0}if(!i.isJson())Mpe(s,i);if(!t.yes){if(!i.isInteractive()||i.isJson())throw new gp(`profile ${e} requires confirmation; rerun with --yes in non-interactive and JSON modes`,2,jpe(s));if(await i.confirm({message:`${e==="install"?"Install":"Remove"} profile '${o}' using this plan?`})!==!0)return i.print(`Profile ${e} cancelled.`),0}let a;try{a=await r.applyProfilePlan(s,n)}catch(c){throw new gp(c instanceof Error?c.message:String(c),1,jpe(s))}return Upe(`profile ${e}`,a,i,a.success,s),a.success?0:1}async function $et(e,t){let r=await e.getProfileStatuses({}),i=r.filter((s)=>s.error!==void 0).map((s)=>s.profile).sort((s,a)=>s.localeCompare(a)),n=i.length===0,o=n?void 0:`Failed to inspect profiles: ${i.join(", ")}`;if(t.isJson())return t.printJson({success:n,command:"profile list",data:Ale(r),...o&&{error:o}}),n?0:1;for(let s of Dle(r))t.print(s);if(o)t.printError(`Error: ${K(o)}`);return n?0:1}async function xet(e,t,r){let i={},n=await zpe("status",e,t,r,i);if(!n){if(!r.isJson())r.print("Profile status cancelled.");return 0}let o=await t.getProfileStatus(n,i),s=o.error===void 0;return Upe("profile status",o,r,s),s?0:1}async function v_(e,t,r){let i=0;try{i=await r()}catch(n){let o=n instanceof Error?n.message:String(n);if(i=n instanceof gp?n.exitCode:1,t.isJson())t.printJson({success:!1,command:e,...n instanceof gp&&n.data?{data:{...n.data,error:o}}:{},error:o});else t.printError(`Error: ${K(o)}`)}if(i!==0)t.exit(i)}function Pet(e=yet,t=vet){let r=lr.command({name:"install",description:He(m_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"}),yes:lr.flag({long:"yes",short:"y",description:"Apply without asking for confirmation"}),dryRun:lr.flag({long:"dry-run",description:"Display the plan without making changes"}),offline:lr.flag({long:"offline",description:"Use only locally available sources"})},handler:(s)=>v_("profile install",t,()=>Fpe("install",s,e,t))}),i=lr.command({name:"list",description:He(g_),args:{},handler:()=>v_("profile list",t,()=>$et(e,t))}),n=lr.command({name:"status",description:He(h_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"})},handler:({name:s})=>v_("profile status",t,()=>xet(s,e,t))}),o=lr.command({name:"remove",description:He(y_),args:{name:lr.positional({type:lr.optional(lr.string),displayName:"name"}),yes:lr.flag({long:"yes",short:"y",description:"Apply without asking for confirmation"}),dryRun:lr.flag({long:"dry-run",description:"Display the plan without making changes"}),offline:lr.flag({long:"offline",description:"Use only locally available sources"})},handler:(s)=>v_("profile remove",t,()=>Fpe("remove",s,e,t))});return Dn({name:"profile",description:"Manage global Pi and OMP profiles",cmds:{install:r,list:i,status:n,remove:o}})}var Lpe=Pet();var Zw=Ut(ts(),1);function gr(e){if(typeof e!=="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}import{fileURLToPath as Cet}from"node:url";var Bm=(e,t)=>{let r=k6(_et(e));if(typeof r!=="string")throw TypeError(`${t} must be a string or a file URL: ${r}.`);return r},_et=(e)=>b6(e)?e.toString():e,b6=(e)=>typeof e!=="string"&&e&&Object.getPrototypeOf(e)===String.prototype,k6=(e)=>e instanceof URL?Cet(e):e;var w_=(e,t=[],r={})=>{let i=Bm(e,"First argument"),[n,o]=gr(t)?[[],t]:[t,r];if(!Array.isArray(n))throw TypeError(`Second argument must be either an array of arguments or an options object: ${n}`);if(n.some((c)=>typeof c==="object"&&c!==null))throw TypeError(`Second argument must be an array of strings: ${n}`);let s=n.map(String),a=s.find((c)=>c.includes("\x00"));if(a!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!gr(o))throw TypeError(`Last argument must be an options object: ${o}`);return[i,s,{__proto__:null,...o}]};import{ChildProcess as Tet}from"node:child_process";import{StringDecoder as Eet}from"node:string_decoder";var{toString:Bpe}=Object.prototype,qpe=(e)=>Bpe.call(e)==="[object ArrayBuffer]",Kr=(e)=>Bpe.call(e)==="[object Uint8Array]",Ha=(e)=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ret=new TextEncoder,Vpe=(e)=>Ret.encode(e),Iet=new TextDecoder,b_=(e)=>Iet.decode(e),Wpe=(e,t)=>Aet(e,t).join(""),Aet=(e,t)=>{if(t==="utf8"&&e.every((o)=>typeof o==="string"))return e;let r=new Eet(t),i=e.map((o)=>typeof o==="string"?Vpe(o):o).map((o)=>r.write(o)),n=r.end();return n===""?i:[...i,n]},Ew=(e)=>{if(e.length===1&&Kr(e[0]))return e[0];return S6(Oet(e))},Oet=(e)=>e.map((t)=>typeof t==="string"?Vpe(t):t),S6=(e)=>{let t=new Uint8Array(Det(e)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t},Det=(e)=>{let t=0;for(let r of e)t+=r.length;return t};var Kpe=(e)=>Array.isArray(e)&&Array.isArray(e.raw),Jpe=(e,t)=>{let r=[];for(let[o,s]of e.entries())r=Net({templates:e,expressions:t,tokens:r,index:o,template:s});if(r.length===0)throw TypeError("Template script must not be empty");let[i,...n]=r;return[i,n,{}]},Net=({templates:e,expressions:t,tokens:r,index:i,template:n})=>{if(n===void 0)throw TypeError(`Invalid backslash sequence: ${e.raw[i]}`);let{nextTokens:o,leadingWhitespaces:s,trailingWhitespaces:a}=Met(n,e.raw[i]),c=Gpe(r,o,s);if(i===t.length)return c;let l=t[i],u=Array.isArray(l)?l.map((p)=>Zpe(p)):[Zpe(l)];return Gpe(c,u,a)},Met=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],i=0,n=Hpe.has(t[0]);for(let s=0,a=0;s<e.length;s+=1,a+=1){let c=t[a];if(Hpe.has(c)){if(i!==s)r.push(e.slice(i,s));i=s+1}else if(c==="\\"){let l=t[a+1];if(l===`
641
641
  `)s-=1,a+=1;else if(l==="u"&&t[a+2]==="{")a=t.indexOf("}",a+3);else a+=jet[l]??1}}let o=i===e.length;if(!o)r.push(e.slice(i));return{nextTokens:r,leadingWhitespaces:n,trailingWhitespaces:o}},Hpe=new Set([" ","\t","\r",`
642
642
  `]),jet={x:3,u:5},Gpe=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],Zpe=(e)=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(gr(e)&&(("stdout"in e)||("isMaxBuffer"in e)))return Fet(e);if(e instanceof Tet||Object.prototype.toString.call(e)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${t}" in template expression`)},Fet=({stdout:e})=>{if(typeof e==="string")return e;if(Kr(e))return b_(e);if(e===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof e}" stdout in template expression`)};import{spawnSync as Xot}from"node:child_process";import{debuglog as zet}from"node:util";import $6 from"node:process";var Go=(e)=>k_.includes(e),k_=[$6.stdin,$6.stdout,$6.stderr],yo=["stdin","stdout","stderr"],S_=(e)=>yo[e]??`stdio[${e}]`;var Xpe=(e)=>{let t={...e};for(let r of C6)t[r]=x6(e,r);return t},x6=(e,t)=>{let r=Uet(e),i=Array.from({length:r+1}),n=Let(e[t],i,t,r);return Het(n,t)},Uet=({stdio:e})=>Array.isArray(e)?Math.max(e.length,yo.length):yo.length,Let=(e,t,r,i)=>gr(e)?Bet(e,t,r,i):t.fill(e),Bet=(e,t,r,i)=>{for(let n of Object.keys(e).sort(qet))for(let o of Vet(n,r,i))t[o]=e[n];return t},qet=(e,t)=>Ype(e)<Ype(t)?1:-1,Ype=(e)=>{if(e==="stdout"||e==="stderr")return 0;return e==="all"?2:1},Vet=(e,t,r)=>{if(e==="ipc")return[r];let i=P6(e);if(i===void 0||i===0)throw TypeError(`"${t}.${e}" is invalid.
643
643
  It must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(i!=="all"&&i>=r)throw TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.
@@ -682,22 +682,22 @@ For example, you can use the \`pathToFileURL()\` method of the \`url\` core modu
682
682
  `,LF:`
683
683
  `,concatBytes:oB},wot=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},bot={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:wot};import{Buffer as kot}from"node:buffer";var Mme=(e,t)=>e?void 0:Sot.bind(void 0,t),Sot=function*(e,t){if(typeof t!=="string"&&!Kr(t)&&!kot.isBuffer(t))throw TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},jme=(e,t)=>e?$ot.bind(void 0,t):xot.bind(void 0,t),$ot=function*(e,t){Fme(e,t),yield t},xot=function*(e,t){if(Fme(e,t),typeof t!=="string"&&!Kr(t))throw TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},Fme=(e,t)=>{if(t===null||t===void 0)throw TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
684
684
  Instead, \`yield\` should either be called with a value, or not be called at all. For example:
685
- if (condition) { yield value; }`)};import{Buffer as Pot}from"node:buffer";import{StringDecoder as Cot}from"node:string_decoder";var mE=(e,t,r)=>{if(r)return;if(e)return{transform:_ot.bind(void 0,new TextEncoder)};let i=new Cot(t);return{transform:Eot.bind(void 0,i),final:Rot.bind(void 0,i)}},_ot=function*(e,t){if(Pot.isBuffer(t))yield Ha(t);else if(typeof t==="string")yield e.encode(t);else yield t},Eot=function*(e,t){yield Kr(t)?e.write(t):t},Rot=function*(e){let t=e.end();if(t!=="")yield t};import{callbackify as zme}from"node:util";var aB=zme(async(e,t,r,i)=>{t.currentIterable=e(...r);try{for await(let n of t.currentIterable)i.push(n)}finally{delete t.currentIterable}}),gE=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:i=Aot}=t[r];for await(let n of i(e))yield*gE(n,t,r+1)},Ume=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*Iot(r,Number(t),e)},Iot=async function*(e,t,r){if(e===void 0)return;for await(let i of e())yield*gE(i,r,t+1)},Lme=zme(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),Aot=function*(e){yield e};var cB=(e,t,r,i)=>{try{for(let n of e(...t))r.push(n);i()}catch(n){i(n)}},Bme=(e,t)=>[...t.flatMap((r)=>[...kp(r,e,0)]),...Lw(e)],kp=function*(e,t,r){if(r===t.length){yield e;return}let{transform:i=Dot}=t[r];for(let n of i(e))yield*kp(n,t,r+1)},Lw=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*Oot(r,Number(t),e)},Oot=function*(e,t,r){if(e===void 0)return;for(let i of e())yield*kp(i,r,t+1)},Dot=function*(e){yield e};var lB=({value:e,value:{transform:t,final:r,writableObjectMode:i,readableObjectMode:n},optionName:o},{encoding:s})=>{let a={},c=Vme(e,s,o),l=bp(t),u=bp(r),p=l?aB.bind(void 0,gE,a):cB.bind(void 0,kp),d=l||u?aB.bind(void 0,Ume,a):cB.bind(void 0,Lw),f=l||u?Lme.bind(void 0,a):void 0;return{stream:new Tot({writableObjectMode:i,writableHighWaterMark:qme(i),readableObjectMode:n,readableHighWaterMark:qme(n),transform(g,h,y){p([g,c,0],this,y)},flush(g){d([c],this,g)},destroy:f})}},hE=(e,t,r,i)=>{let n=t.filter(({type:s})=>s==="generator"),o=i?n.reverse():n;for(let{value:s,optionName:a}of o){let c=Vme(s,r,a);e=Bme(c,e)}return e},Vme=({transform:e,final:t,binary:r,writableObjectMode:i,readableObjectMode:n,preserveNewlines:o},s,a)=>{let c={};return[{transform:Mme(i,a)},mE(r,s,i),fE(r,o,i,c),{transform:e,final:t},{transform:jme(n,a)},Nme({binary:r,preserveNewlines:o,readableObjectMode:n,state:c})].filter(Boolean)};var Wme=(e,t)=>{for(let r of Not(e))Mot(e,r,t)},Not=(e)=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),Mot=(e,t,r)=>{let{stdioItems:i}=e[t],n=i.filter(({contents:a})=>a!==void 0);if(n.length===0)return;if(t!==0){let[{type:a,optionName:c}]=n;throw TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${vl[a]} with synchronous methods.`)}let s=n.map(({contents:a})=>a).map((a)=>jot(a,i));r.input=Ew(s)},jot=(e,t)=>{let r=hE(e,t,"utf8",!0);return Fot(r),Ew(r)},Fot=(e)=>{let t=e.find((r)=>typeof r!=="string"&&!Kr(r));if(t!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};import{writeFileSync as Bot,appendFileSync as qot}from"node:fs";var yE=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:i})=>i!=="all"&&Vm(r,i)&&!Ki.has(t)&&zot(i)&&(e.some(({type:n,value:o})=>n==="native"&&Uot.has(o))||e.every(({type:n})=>vo.has(n))),zot=(e)=>e===1||e===2,Uot=new Set(["pipe","overlapped"]),Hme=async(e,t,r,i)=>{for await(let n of e)if(!Lot(t))Zme(n,r,i)},Gme=(e,t,r)=>{for(let i of e)Zme(i,t,r)},Lot=(e)=>e._readableState.pipes.length>0,Zme=(e,t,r)=>{let i=E_(e);zs({type:"output",verboseMessage:i,fdNumber:t,verboseInfo:r})};var Kme=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:i,verboseInfo:n})=>{if(t===null)return{output:Array.from({length:3})};let o={},s=new Set;return{output:t.map((c,l)=>Vot({result:c,fileDescriptors:e,fdNumber:l,state:o,outputFiles:s,isMaxBuffer:i,verboseInfo:n},r)),...o}},Vot=({result:e,fileDescriptors:t,fdNumber:r,state:i,outputFiles:n,isMaxBuffer:o,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:p})=>{if(e===null)return;let d=Wfe(e,o,p),f=Ha(d),{stdioItems:m,objectMode:g}=t[r],h=Wot([f],m,c,i),{serializedResult:y,finalResult:v=y}=Hot({chunks:h,objectMode:g,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Got({serializedResult:y,fdNumber:r,state:i,verboseInfo:s,encoding:c,stdioItems:m,objectMode:g});let w=a[r]?v:void 0;try{if(i.error===void 0)Zot(y,m,n);return w}catch(x){return i.error=x,w}},Wot=(e,t,r,i)=>{try{return hE(e,t,r,!1)}catch(n){return i.error=n,e}},Hot=({chunks:e,objectMode:t,encoding:r,lines:i,stripFinalNewline:n,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ew(e)};let s=Wpe(e,r);if(i[o])return{serializedResult:s,finalResult:sB(s,!n[o],t)};return{serializedResult:s}},Got=({serializedResult:e,fdNumber:t,state:r,verboseInfo:i,encoding:n,stdioItems:o,objectMode:s})=>{if(!yE({stdioItems:o,encoding:n,verboseInfo:i,fdNumber:t}))return;let a=sB(e,!1,s);try{Gme(a,t,i)}catch(c){r.error??=c}},Zot=(e,t,r)=>{let i=t.filter(({type:n})=>lE.has(n));for(let{path:n,append:o}of i){let s=typeof n==="string"?n:n.toString();if(o||r.has(s))qot(n,e);else r.add(s),Bot(n,e)}};var Jme=([,e,t],r)=>{if(!r.all)return;if(e===void 0)return t;if(t===void 0)return e;if(Array.isArray(e))return Array.isArray(t)?[...e,...t]:[...e,Ja(t,r,"all")];if(Array.isArray(t))return[Ja(e,r,"all"),...t];if(Kr(e)&&Kr(t))return S6([e,t]);return`${e}${t}`};import{once as uB}from"node:events";var Yme=async(e,t)=>{let[r,i]=await Kot(e);return t.isForcefullyTerminated??=!1,[r,i]},Kot=async(e)=>{let[t,r]=await Promise.allSettled([uB(e,"spawn"),uB(e,"exit")]);if(t.status==="rejected")return[];return r.status==="rejected"?Xme(e):r.value},Xme=async(e)=>{try{return await uB(e,"exit")}catch{return Xme(e)}},Qme=async(e)=>{let[t,r]=await e;if(!Jot(t,r)&&pB(t,r))throw new Us;return[t,r]},Jot=(e,t)=>e===void 0&&t===void 0,pB=(e,t)=>e!==0||t!==null;var ege=({error:e,status:t,signal:r,output:i},{maxBuffer:n})=>{let o=Yot(e,t,r),s=o?.code==="ETIMEDOUT",a=Vfe(o,i,n);return{resultError:o,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Yot=(e,t,r)=>{if(e!==void 0)return e;return pB(t,r)?new Us:void 0};var tge=(e,t,r)=>{let{file:i,commandArguments:n,command:o,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Qot(e,t,r),p=rst({file:i,commandArguments:n,options:l,command:o,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return Qm(p,c,l)},Qot=(e,t,r)=>{let{command:i,escapedCommand:n,startTime:o,verboseInfo:s}=I_(e,t,r),a=est(r),{file:c,commandArguments:l,options:u}=J_(e,t,a);tst(u);let p=Ime(u,s);return{file:c,commandArguments:l,command:i,escapedCommand:n,startTime:o,verboseInfo:s,options:u,fileDescriptors:p}},est=(e)=>e.node&&!e.ipc?{...e,ipc:!1}:e,tst=({ipc:e,ipcInput:t,detached:r,cancelSignal:i,killDescendants:n})=>{if(t)Bw("ipcInput");if(e)Bw("ipc: true");if(r)Bw("detached: true");if(n)Bw("killDescendants: true");if(i)Bw("cancelSignal")},Bw=(e)=>{throw TypeError(`The "${e}" option cannot be used with synchronous methods.`)},rst=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,verboseInfo:o,fileDescriptors:s,startTime:a})=>{let c=nst({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:s,startTime:a});if(c.failed)return c;let{resultError:l,exitCode:u,signal:p,timedOut:d,isMaxBuffer:f}=ege(c,r),{output:m,error:g=l}=Kme({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:o}),h=m.map((v,w)=>Ja(v,r,w)),y=Ja(Jme(m,r),r,"all");return ost({error:g,exitCode:u,signal:p,timedOut:d,isMaxBuffer:f,stdio:h,all:y,options:r,command:i,escapedCommand:n,startTime:a})},nst=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:o,startTime:s})=>{try{Wme(o,r);let a=ist(r);return Xot(...Y_(e,t,a))}catch(a){return Xm({error:a,command:i,escapedCommand:n,fileDescriptors:o,options:r,startTime:s,isSync:!0})}},ist=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:oE(t)}),ost=({error:e,exitCode:t,signal:r,timedOut:i,isMaxBuffer:n,stdio:o,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>e===void 0?sE({command:c,escapedCommand:l,stdio:o,all:s,ipcOutput:[],options:a,startTime:u}):jw({error:e,command:c,escapedCommand:l,timedOut:i,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:n,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0});import{setMaxListeners as dct}from"node:events";import{spawn as fct}from"node:child_process";import sge from"node:process";import{once as dB,on as sst}from"node:events";var fB=Symbol("internalGetOneMessageOptions"),rge=({anyProcess:e,channel:t,isSubprocess:r,ipc:i},n={})=>{let{reference:o=!0,filter:s}=n,{signal:a}=n[fB]??{};return Wm({methodName:"getOneMessage",isSubprocess:r,ipc:i,isConnected:V_(e)}),ast({anyProcess:e,channel:t,isSubprocess:r,filter:s,reference:o,signal:a})},ast=async({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:n,signal:o})=>{U_(t,n);let s=yl(e,t,r),a=new AbortController;cst(o,a);try{return await Promise.race([lst(s,i,a),ust(s,r,a),pst(s,r,a)])}catch(c){throw Hm(e),c}finally{a.abort(),L_(t,n)}},cst=(e,t)=>{if(e===void 0)return;if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},lst=async(e,t,{signal:r})=>{if(t===void 0){let[i]=await dB(e,"message",{signal:r});return i}for await(let[i]of sst(e,"message",{signal:r}))if(t(i))return i},ust=async(e,t,{signal:r})=>{await dB(e,"disconnect",{signal:r}),Tde(t)},pst=async(e,t,{signal:r})=>{let[i]=await dB(e,"strict:error",{signal:r});throw z_(i,t)};import{once as ige,on as dst}from"node:events";var mB=Symbol("internalGetEachMessageOptions"),oge=(e,t={})=>{let{reference:r=!0}=t,{signal:i,shouldAwait:n=!e.isSubprocess}=t[mB]??{};return gB({...e,shouldAwait:n,reference:r,signal:i})},gB=({anyProcess:e,waitProcess:t=e,channel:r,isSubprocess:i,ipc:n,shouldAwait:o,reference:s,signal:a})=>{Wm({methodName:"getEachMessage",isSubprocess:i,ipc:n,isConnected:V_(e)}),U_(r,s);let c=yl(e,r,i),l=new AbortController,u={};return fst(a,l),mst(e,c,l),gst({ipcEmitter:c,isSubprocess:i,controller:l,state:u}),hst({anyProcess:e,waitProcess:t,channel:r,ipcEmitter:c,isSubprocess:i,shouldAwait:o,controller:l,state:u,reference:s})},fst=(e,t)=>{if(e===void 0)return;if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},mst=async(e,t,r)=>{try{await ige(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},gst=async({ipcEmitter:e,isSubprocess:t,controller:r,state:i})=>{try{let[n]=await ige(e,"strict:error",{signal:r.signal});i.error=z_(n,t),r.abort()}catch{}},hst=async function*({anyProcess:e,waitProcess:t,channel:r,ipcEmitter:i,isSubprocess:n,shouldAwait:o,controller:s,state:a,reference:c}){try{for await(let[l]of dst(i,"message",{signal:s.signal}))nge(a),yield l}catch{nge(a)}finally{if(s.abort(),L_(r,c),!n)Hm(e);if(o)await t}},nge=({error:e})=>{if(e)throw e};var age=(e,t,{ipc:r})=>{Object.assign(e,lge(t,!1,r,e))},cge=()=>{let e=sge,t=!0,r=sge.channel!==void 0;return{...lge(e,!0,r),getCancelSignal:afe.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:!0,ipc:r})}},lge=(e,t,r,i=e)=>({sendMessage:Gm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:rge.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:oge.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r,waitProcess:i})});import{ChildProcess as yst}from"node:child_process";import{PassThrough as vst,Readable as pge,Writable as dge,Duplex as fge}from"node:stream";var mge=({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:o,verboseInfo:s})=>{nB(i);let a=new yst,c=wst(a,i),l=Xm({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:o,isSync:!1}),u=$st(l,s,n);return{subprocess:a,promise:u,all:n.all?c:void 0,convertedStreams:{readable:gge,writable:hge,duplex:yge,readableStream:bst,writableStream:kst,transformStream:Sst,iterable:uge,[Symbol.asyncIterator]:uge}}},wst=(e,t)=>{let r=qw(),i=qw(),n=qw(),o=Array.from({length:t.length-3},qw),s=qw(),a=[r,i,n,...o];return Object.assign(e,{stdin:r,stdout:i,stderr:n,stdio:a}),s},qw=()=>{let e=new vst;return e.end(),e},gge=()=>new pge({read(){}}),hge=()=>new dge({write(){}}),yge=()=>new fge({read(){},write(){}}),bst=()=>pge.toWeb(gge()),kst=()=>dge.toWeb(hge()),Sst=()=>fge.toWeb(yge()),uge=async function*(){},$st=async(e,t,r)=>Qm(e,t,r);import{createReadStream as vge,createWriteStream as wge}from"node:fs";import{Buffer as xst}from"node:buffer";import{Readable as Vw,Writable as Pst,Duplex as Cst}from"node:stream";var kge=(e,t)=>dE(_st,e,t,!1),Ww=({type:e,optionName:t})=>{throw TypeError(`The \`${t}\` option cannot be ${vl[e]}.`)},bge={fileNumber:Ww,generator:lB,asyncGenerator:lB,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let i=t||r;return{stream:Cst.fromWeb(e,{objectMode:i})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},_st={input:{...bge,fileUrl:({value:e})=>({stream:vge(e)}),filePath:({value:{file:e}})=>({stream:vge(e)}),webStream:({value:e})=>({stream:Vw.fromWeb(e)}),iterable:({value:e})=>({stream:Vw.from(e)}),asyncIterable:({value:e})=>({stream:Vw.from(e)}),string:({value:e})=>({stream:Vw.from(e)}),uint8Array:({value:e})=>({stream:Vw.from(xst.from(e))})},output:{...bge,fileUrl:({value:e})=>({stream:wge(e)}),filePath:({value:{file:e,append:t}})=>({stream:wge(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Pst.fromWeb(e)}),iterable:Ww,asyncIterable:Ww,string:Ww,uint8Array:Ww}};import{on as Est,once as Sge}from"node:events";import{PassThrough as Rst,getDefaultHighWaterMark as Ist}from"node:stream";import{finished as Pge}from"node:stream/promises";function Sp(e){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);for(let n of e)hB(n);let t=e.some(({readableObjectMode:n})=>n),r=Ast(e,t),i=new Cge({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let n of e)i.add(n);return i}var Ast=(e,t)=>{if(e.length===0)return Ist(t);let r=e.filter(({readableObjectMode:i})=>i===t).map(({readableHighWaterMark:i})=>i);return Math.max(...r)};class Cge extends Rst{#t=new Set([]);#n=new Set([]);#e=new Set([]);#i;#s=Symbol("unpipe");#r=new WeakMap;add(e){if(hB(e),this.#t.has(e))return;this.#t.add(e),this.#i??=Ost(this,this.#t,this.#s);let t=Nst({passThroughStream:this,stream:e,streams:this.#t,ended:this.#n,aborted:this.#e,onFinished:this.#i,unpipeEvent:this.#s});this.#r.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(hB(e),!this.#t.has(e))return!1;let t=this.#r.get(e);if(t===void 0)return!1;return this.#r.delete(e),e.unpipe(this),await t,!0}}var Ost=async(e,t,r)=>{vE(e,$ge);let i=new AbortController;try{await Promise.race([Dst(e,i),Tst(e,t,r,i)])}finally{i.abort(),vE(e,-$ge)}},Dst=async(e,{signal:t})=>{try{await Pge(e,{signal:t,cleanup:!0})}catch(r){throw _ge(e,r),r}},Tst=async(e,t,r,{signal:i})=>{for await(let[n]of Est(e,"unpipe",{signal:i}))if(t.has(n))n.emit(r)},hB=(e)=>{if(typeof e?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Nst=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,onFinished:o,unpipeEvent:s})=>{vE(e,xge);let a=new AbortController;try{await Promise.race([Mst(o,t,a),jst({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:a}),Fst({stream:t,streams:r,ended:i,aborted:n,unpipeEvent:s,controller:a})])}finally{a.abort(),vE(e,-xge)}if(r.size>0&&r.size===i.size+n.size)if(i.size===0&&n.size>0)yB(e);else zst(e)},Mst=async(e,t,{signal:r})=>{try{if(await e,!r.aborted)yB(t)}catch(i){if(!r.aborted)_ge(t,i)}},jst=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:{signal:o}})=>{try{if(await Pge(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t))i.add(t)}catch(s){if(o.aborted||!r.has(t))return;if(Ege(s))n.add(t);else Rge(e,s)}},Fst=async({stream:e,streams:t,ended:r,aborted:i,unpipeEvent:n,controller:{signal:o}})=>{if(await Sge(e,n,{signal:o}),!e.readable)return Sge(o,"abort",{signal:o});t.delete(e),r.delete(e),i.delete(e)},zst=(e)=>{if(e.writable)e.end()},_ge=(e,t)=>{if(Ege(t))yB(e);else Rge(e,t)},Ege=(e)=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",yB=(e)=>{if(e.readable||e.writable)e.destroy()},Rge=(e,t)=>{if(!e.destroyed)e.once("error",Ust),e.destroy(t)},Ust=()=>{},vE=(e,t)=>{let r=e.getMaxListeners();if(r!==0&&r!==Number.POSITIVE_INFINITY)e.setMaxListeners(r+t)},$ge=2,xge=1;import{finished as Ige}from"node:stream/promises";var rg=(e,t)=>{e.pipe(t),Lst(e,t),Bst(e,t)},Lst=async(e,t)=>{if(Go(e)||Go(t))return;try{await Ige(e,{cleanup:!0,readable:!0,writable:!1})}catch{}vB(t)},vB=(e)=>{if(e.writable)e.end()},Bst=async(e,t)=>{if(Go(e)||Go(t))return;try{await Ige(t,{cleanup:!0,readable:!1,writable:!0})}catch{}wB(e)},wB=(e)=>{if(e.readable)e.destroy()};var Age=(e,t,r)=>{let i=new Map;for(let[n,{stdioItems:o,direction:s}]of Object.entries(t)){let a=o.filter(({type:l})=>vo.has(l));for(let{stream:l}of a)qst(e,l,s,n);let c=o.filter(({type:l})=>!vo.has(l));for(let{stream:l}of c)Wst({subprocess:e,stream:l,direction:s,fdNumber:n,pipeGroups:i,controller:r})}for(let[n,o]of i){let s=o.length===1?o[0]:Sp(o);rg(s,n)}},qst=(e,t,r,i)=>{if(r==="output")rg(e.stdio[i],t);else rg(t,e.stdio[i]);let n=Vst[i];if(n!==void 0)e[n]=t;e.stdio[i]=t},Vst=["stdin","stdout","stderr"],Wst=({subprocess:e,stream:t,direction:r,fdNumber:i,pipeGroups:n,controller:o})=>{if(t===void 0)return;Hst(t,o);let[s,a]=r==="output"?[t,e.stdio[i]]:[e.stdio[i],t],c=n.get(s)??[];n.set(s,[...c,a])},Hst=(e,{signal:t})=>{if(Go(e))yp(e,Gst,t)},Gst=2;import wE from"node:process";import{execFile as Zst}from"node:child_process";import Oge from"node:path/win32";var Dge=wE.platform==="win32",Tge=(e)=>e.killDescendants&&!Dge?{...e,detached:!0}:e,Nge=(e,{killDescendants:t})=>{if(!t)return e.kill.bind(e);return(Dge?Jst:Kst).bind(void 0,e)},Kst=(e,t)=>{if(e.pid===void 0)return!1;try{return wE.kill(-e.pid,t)}catch{return e.kill(t)}},Jst=(e,t)=>{if(e.pid===void 0)return!1;let r=Yst();if(r===void 0)return e.kill(t);return Zst(r,["/pid",`${e.pid}`,"/T","/F"],(i)=>{if(i)e.kill(t)}),!0},Yst=()=>{let e=[wE.env.SystemRoot,wE.env.windir].find((t)=>t&&Xst(t));return e===void 0?void 0:Oge.join(e,"System32","taskkill.exe")},Xst=(e)=>{let{root:t}=Oge.parse(e);return/^[a-z]:[/\\]/i.test(t)};import{addAbortListener as tat}from"node:events";var $p=[];$p.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")$p.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")$p.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var bE=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",bB=Symbol.for("signal-exit emitter"),kB=globalThis,Qst=Object.defineProperty.bind(Object);class Mge{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(kB[bB])return kB[bB];Qst(kB,bB,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let r=this.listeners[e],i=r.indexOf(t);if(i===-1)return;if(i===0&&r.length===1)r.length=0;else r.splice(i,1)}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let n of this.listeners[e])i=n(t,r)===!0||i;if(e==="exit")i=this.emit("afterExit",t,r)||i;return i}}class $B{}var eat=(e)=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}});class jge extends $B{onExit(){return()=>{}}load(){}unload(){}}class Fge extends $B{#t=SB.platform==="win32"?"SIGINT":"SIGHUP";#n=new Mge;#e;#i;#s;#r={};#o=!1;constructor(e){super();this.#e=e,this.#r={};for(let t of $p)this.#r[t]=()=>{let r=this.#e.listeners(t),{count:i}=this.#n,n=e;if(typeof n.__signal_exit_emitter__==="object"&&typeof n.__signal_exit_emitter__.count==="number")i+=n.__signal_exit_emitter__.count;if(r.length===i){this.unload();let o=this.#n.emit("exit",null,t),s=t==="SIGHUP"?this.#t:t;if(!o)e.kill(e.pid,s)}};this.#s=e.reallyExit,this.#i=e.emit}onExit(e,t){if(!bE(this.#e))return()=>{};if(this.#o===!1)this.load();let r=t?.alwaysLast?"afterExit":"exit";return this.#n.on(r,e),()=>{if(this.#n.removeListener(r,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0)this.unload()}}load(){if(this.#o)return;this.#o=!0,this.#n.count+=1;for(let e of $p)try{let t=this.#r[e];if(t)this.#e.on(e,t)}catch(t){}this.#e.emit=(e,...t)=>this.#u(e,...t),this.#e.reallyExit=(e)=>this.#a(e)}unload(){if(!this.#o)return;this.#o=!1,$p.forEach((e)=>{let t=this.#r[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,t)}catch(r){}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#s,this.#n.count-=1}#a(e){if(!bE(this.#e))return 0;return this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#s.call(this.#e,this.#e.exitCode)}#u(e,...t){let r=this.#i;if(e==="exit"&&bE(this.#e)){if(typeof t[0]==="number")this.#e.exitCode=t[0];let i=r.call(this.#e,e,...t);return this.#n.emit("exit",this.#e.exitCode,null),i}else return r.call(this.#e,e,...t)}}var SB=globalThis.process,{onExit:zge,load:y4t,unload:v4t}=eat(bE(SB)?new Fge(SB):new jge);var Uge=(e,{cleanup:t,detached:r},{signal:i})=>{if(!t||r)return;let n=zge(()=>{e()});tat(i,()=>{n()})};var kE=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Hw=(e,t,r)=>{let i=e[r];if(!i.has(t))i.set(t,[]);let n=i.get(t),o=Ls();return n.push(o),{resolve:o.resolve.bind(o),promises:n}},ng=async({resolve:e,promises:t},r)=>{e();let[i]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!i};import{on as rat}from"node:events";import{getDefaultHighWaterMark as nat}from"node:stream";var SE=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:i,encoding:n,preserveNewlines:o})=>{let s=new AbortController;return iat(t,s),Bge({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&i,encoding:n,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},iat=async(e,t)=>{try{await e}catch{}finally{t.abort()}},xB=({stream:e,onStreamEnd:t,lines:r,encoding:i,stripFinalNewline:n,allMixed:o})=>{let s=new AbortController;oat(t,s,e);let a=e.readableObjectMode&&!o;return Bge({stream:e,controller:s,binary:i==="buffer",shouldEncode:!a,encoding:i,shouldSplit:!a&&r,preserveNewlines:!n})},oat=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Bge=({stream:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s})=>{let a=rat(e,"data",{signal:t.signal,highWaterMark:Lge,highWatermark:Lge});return sat({onStdoutChunk:a,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s})},PB=nat(!0),Lge=PB,sat=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s}){let a=aat({binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s});try{for await(let[c]of e)yield*kp(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Lw(a)}},aat=({binary:e,shouldEncode:t,encoding:r,shouldSplit:i,preserveNewlines:n})=>[mE(e,r,!t),fE(e,n,!i,{})].filter(Boolean);var ig=(e,t,{from:r,binary:i=!1,preserveNewlines:n=!1}={})=>{let o=i||Ki.has(t),s=tg(e,r),a=SE({subprocessStdout:s,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:n});return cat(a,s,e)},cat=async function*(e,t,r){try{yield*e}finally{if(t.readable)t.destroy();await r}};import{Readable as gat}from"node:stream";import{callbackify as hat}from"node:util";import{finished as Vge}from"node:stream/promises";import{finished as lat}from"node:stream/promises";var Gw=async(e,t,r,{isSameDirection:i,stopOnExit:n=!1}={})=>{let o=uat(e,r),s=new AbortController;try{await Promise.race([...n?[r.exitPromise]:[],lat(e,{cleanup:!0,signal:s.signal})])}catch(a){if(!o.stdinCleanedUp)fat(a,t,r,i)}finally{s.abort()}},uat=(e,{originalStreams:t,subprocess:r})=>{let[i]=t,n={stdinCleanedUp:!1};if(e===i)pat(e,r,n);return n},pat=(e,t,r)=>{let{_destroy:i}=e;e._destroy=(...n)=>{dat(t,r),i.call(e,...n)}},dat=({exitCode:e,signalCode:t},r)=>{if(e!==null||t!==null)r.stdinCleanedUp=!0},fat=(e,t,r,i)=>{if(!mat(e,t,r,i))throw e},mat=(e,t,r,i=!0)=>{if(r.propagating)return qge(e)||og(e);return r.propagating=!0,CB(r,t)===i?qge(e):og(e)},CB=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",og=(e)=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",qge=(e)=>e?.code==="EPIPE";var _B=async(e)=>{if(e===void 0)return;try{await EB(e)}catch{}},Wge=async(e)=>{if(e===void 0)return;try{await RB(e)}catch{}},EB=async(e)=>{await Vge(e,{cleanup:!0,readable:!1,writable:!0})},RB=async(e)=>{await Vge(e,{cleanup:!0,readable:!0,writable:!1})},$E=async(e,t)=>{if(await e,t)throw t},xE=(e,t,r)=>{if(r&&!og(r))e.destroy(r);else if(t)e.destroy()};var PE=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,binary:n=!0,preserveNewlines:o=!0}={})=>{let s=n||Ki.has(r),{subprocessStdout:a,waitReadableDestroy:c}=IB(e,i,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:p}=AB(a,s),{read:d,onStdoutDataDone:f}=OB({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:o}),m=new gat({read:d,destroy:hat(TB.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:p,objectMode:u,encoding:l});return DB({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},IB=(e,t,r)=>{let i=tg(e,t),n=Hw(r,i,"readableDestroy");return{subprocessStdout:i,waitReadableDestroy:n}},AB=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},i)=>i?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:PB},OB=({subprocessStdout:e,subprocess:t,binary:r,encoding:i,preserveNewlines:n})=>{let o=Ls(),s=SE({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:i,preserveNewlines:n});return{read(){yat(this,s,o)},onStdoutDataDone:o}},yat=async(e,t,r)=>{try{let{value:i,done:n}=await t.next();if(n)r.resolve();else e.push(i)}catch{}},DB=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:i,subprocessStdin:n})=>{try{if(await RB(e),await i,await _B(n),await t,r.readable)r.push(null)}catch(o){await _B(n),Hge(r,await vat(i,o))}},vat=async(e,t)=>{if(t.code!=="ERR_STREAM_PREMATURE_CLOSE")return t;try{await e}catch(r){return r}return t},TB=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},i)=>{if(!await ng(r,t))return;Hge(e,i),await $E(t,i)},Hge=(e,t)=>{xE(e,e.readable,t)};import{Readable as wat,Writable as bat,Duplex as kat}from"node:stream";var CE=(e,t)=>wat.toWeb(e.readable(t)),Gge=(e,t)=>bat.toWeb(e.writable(t)),Zge=(e,t)=>kat.toWeb(e.duplex(t));var Jge=({source:e,sourcePromise:t,boundOptions:r,createNested:i},...n)=>{let o=R_(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=Sat(r,i,n),{sourceStream:p,sourceError:d}=xat(e,l),{options:f,fileDescriptors:m}=Bs.get(e);return{sourcePromise:t,sourceStream:p,sourceOptions:f,sourceError:d,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:o}},Sat=(e,t,r)=>{try{let{destination:i,pipeOptions:{from:n,to:o,unpipeSignal:s}={}}=$at(e,t,...r),a=pE(i,o);return{destination:i,destinationStream:a,from:n,unpipeSignal:s}}catch(i){return{destinationError:i}}},$at=(e,t,r,...i)=>{if(Array.isArray(r))return{destination:t(Kge,e)(r,...i),pipeOptions:e};if(typeof r==="string"||r instanceof URL||b6(r)){if(Object.keys(e).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[n,o,s]=w_(r,...i);return{destination:t(Kge)(n,o,s),pipeOptions:s}}if(Bs.has(r)){if(Object.keys(e).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:i[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Kge=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),xat=(e,t)=>{try{return{sourceStream:tg(e,t)}}catch(r){return{sourceError:r}}};var Xge=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i,fileDescriptors:n,sourceOptions:o,startTime:s})=>{let a=Pat({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i});if(a!==void 0)throw NB({error:a,fileDescriptors:n,sourceOptions:o,startTime:s})},Pat=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i})=>{if(t!==void 0&&i!==void 0)return i;if(i!==void 0)return wB(e),i;if(t!==void 0)return vB(r),t},NB=({error:e,fileDescriptors:t,sourceOptions:r,startTime:i})=>Xm({error:e,command:Yge,escapedCommand:Yge,fileDescriptors:t,options:r,startTime:i,isSync:!1}),Yge="source.pipe(destination)";var Qge=async(e)=>{let[{status:t,reason:r,value:i=r},{status:n,reason:o,value:s=o}]=await e;if(!s.pipedFrom.includes(i))s.pipedFrom.push(i);if(n==="rejected")throw s;if(t==="rejected")throw i;return s};import{finished as Cat}from"node:stream/promises";var ehe=(e,t,r)=>{let i=_E.has(t)?Eat(e,t):_at(e,t);return yp(e,Iat,r.signal),yp(t,Aat,r.signal),Rat(t),i},_at=(e,t)=>{let r=Sp([e]);return rg(r,t),_E.set(t,r),r},Eat=(e,t)=>{let r=_E.get(t);return r.add(e),r},Rat=async(e)=>{try{await Cat(e,{cleanup:!0,readable:!1,writable:!0})}catch{}_E.delete(e)},_E=new WeakMap,Iat=2,Aat=1;import{aborted as Oat}from"node:util";var the=(e,t)=>e===void 0?[]:[Dat(e,t)],Dat=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:i,sourceOptions:n,startTime:o})=>{await Oat(e,t),await r.remove(t);let s=Error("Pipe canceled by `unpipeSignal` option.");throw NB({error:s,fileDescriptors:i,sourceOptions:n,startTime:o})};var EE=(e,...t)=>{if(gr(t[0]))return EE.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...i}=Jge(e,...t),n=new AbortController,o=Hat({...i,destination:r,pipeFailureController:n});return o.pipe=EE.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),Tat(o,r,n.signal),o},Tat=(e,t,r)=>{if(t===void 0)return;Nat(e,t),zat(e,t,r)},Nat=(e,t)=>{let r=Bs.get(t);Bs.set(e,r),e.stdio=t.stdio,e.all=t.all;let{options:{encoding:i}}=r,n=kE();e[Symbol.asyncIterator]=ig.bind(void 0,e,i,{}),e.iterable=ig.bind(void 0,e,i),e.readable=jat.bind(void 0,e,{subprocess:e,concurrentStreams:n,encoding:i}),e.readableStream=CE.bind(void 0,e),Mat(e,t)},Mat=(e,t)=>{if(t.all===void 0){e.all=void 0;return}Object.defineProperty(e,"all",{get(){rhe(e,t.all);let r=e.readable({from:"all"});return rhe(e,r),r},enumerable:!0,configurable:!0})},rhe=(e,t)=>{Object.defineProperty(e,"all",{value:t,writable:!0,enumerable:!0,configurable:!0})},jat=(e,t,...r)=>{let i=PE(t,...r);return Fat(e,i),i},Fat=async(e,t)=>{try{await e}catch(r){t.destroy(r)}},zat=(e,t,r)=>{e.sendMessage=t.sendMessage,e.getOneMessage=Uat.bind(void 0,t,r),e.getEachMessage=qat.bind(void 0,e,t,r)},Uat=(e,t,...r)=>{let i=new AbortController,n=e.getOneMessage(...nhe(r,i.signal,fB));return Lat(t,n,i)},Lat=async(e,t,r)=>{try{return await Promise.race([t,Bat(e,r.signal)])}finally{r.abort()}},Bat=(e,t)=>new Promise((r,i)=>{if(e.aborted){i(e.reason);return}e.addEventListener("abort",()=>{i(e.reason)},{once:!0,signal:t})}),qat=(e,t,r,...i)=>{let n=new AbortController,o=t.getEachMessage(...nhe(i,n.signal,mB));return Wat(r,n),Vat(e,o,n)},Vat=async function*(e,t,r){try{yield*t}finally{r.abort(),await e}},nhe=(e,t,r)=>{if(e[0]===null)return e;let[i]=e;return[{...i,[r]:{signal:t,shouldAwait:!1}}]},Wat=(e,t)=>{if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},Hat=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:i,destination:n,destinationStream:o,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l,pipeFailureController:u})=>{let p=new AbortController;try{let d=Gat(e,n);Xge({sourceStream:t,sourceError:i,destinationStream:o,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});let f=ehe(t,o,p);return await Promise.race([Qge(d),...the(a,{sourceStream:t,mergedStream:f,sourceOptions:r,fileDescriptors:c,startTime:l})])}catch(d){throw u.abort(d),d}finally{p.abort()}},Gat=(e,t)=>Promise.allSettled([e,t]);import{setImmediate as Zat}from"node:timers/promises";var ihe=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,buffer:n,maxBuffer:o,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{let p=Kat({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:a,verboseInfo:l,streamInfo:u});if(!n){await Promise.all([Jat(e),p]);return}let d=iB(c,r),f=xB({stream:e,onStreamEnd:t,lines:s,encoding:i,stripFinalNewline:d,allMixed:a}),[m]=await Promise.all([Yat({stream:e,iterable:f,fdNumber:r,encoding:i,maxBuffer:o,lines:s}),p]);return m},Kat=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:n,verboseInfo:o,streamInfo:{fileDescriptors:s}})=>{if(!yE({stdioItems:s[r]?.stdioItems,encoding:i,verboseInfo:o,fdNumber:r}))return;let a=xB({stream:e,onStreamEnd:t,lines:!0,encoding:i,stripFinalNewline:!0,allMixed:n});await Hme(a,e,r,o)},Jat=async(e)=>{if(await Zat(),e.readableFlowing===null)e.resume()},Yat=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:i,encoding:n,maxBuffer:o,lines:s})=>{try{if(t||s)return await tE(r,{maxBuffer:o});if(n==="buffer")return new Uint8Array(await rE(r,{maxBuffer:o}));return await iE(r,{maxBuffer:o})}catch(a){return ohe(Lfe({error:a,stream:e,readableObjectMode:t,lines:s,encoding:n,fdNumber:i}))}},MB=async(e)=>{try{return await e}catch(t){return ohe(t)}},ohe=({bufferedData:e})=>qpe(e)?new Uint8Array(e):e;var she=({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:o,verboseInfo:s,streamInfo:a})=>e.stdio.map((c,l)=>jB({stream:c,fdNumber:l,encoding:t,buffer:r[l],maxBuffer:i[l],lines:n[l],allMixed:!1,stripFinalNewline:o,verboseInfo:s,streamInfo:a})),jB=async({stream:e,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:o,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;let u=Gw(e,t,l);if(CB(l,t)){await u;return}let[p]=await Promise.all([ihe({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:o,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return p};var ahe=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Sp([e,t].filter(Boolean)):void 0,che=({subprocess:e,all:t,encoding:r,buffer:i,maxBuffer:n,lines:o,stripFinalNewline:s,verboseInfo:a,streamInfo:c})=>jB({...Xat(e,t,i),fdNumber:"all",encoding:r,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Qat(e,t),stripFinalNewline:s,verboseInfo:a,streamInfo:c}),Xat=({stdout:e,stderr:t},r,[,i,n])=>{let o=i||n;if(!o)return{stream:r,buffer:o};if(!i)return{stream:t,buffer:o};if(!n)return{stream:e,buffer:o};return{stream:r,buffer:o}},Qat=({stdout:e,stderr:t},r)=>r&&e&&t&&e.readableObjectMode!==t.readableObjectMode;import{once as ect}from"node:events";var lhe=(e)=>Vm(e,"ipc"),uhe=(e,t)=>{let r=E_(e);zs({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var phe=async({subprocess:e,buffer:t,maxBuffer:r,ipc:i,ipcOutput:n,verboseInfo:o})=>{if(!i)return n;let s=lhe(o),a=Ga(t,"ipc"),c=Ga(r,"ipc");for await(let l of gB({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:i,shouldAwait:!1,reference:!0})){if(a)Bfe(e,n,c),n.push(l);if(s)uhe(l,o)}return n},dhe=async(e,t)=>(await Promise.allSettled([e]),t);var fhe=async({subprocess:e,kill:t,all:r,options:{encoding:i,buffer:n,maxBuffer:o,lines:s,timeoutDuration:a,cancelSignal:c,gracefulCancel:l,forceKillAfterDelay:u,stripFinalNewline:p,ipc:d,ipcInput:f},context:m,verboseInfo:g,fileDescriptors:h,originalStreams:y,onInternalError:v,controller:w})=>{let x=Yme(e,m),b={originalStreams:y,fileDescriptors:h,subprocess:e,exitPromise:x,propagating:!1},k=she({subprocess:e,encoding:i,buffer:n,maxBuffer:o,lines:s,stripFinalNewline:p,verboseInfo:g,streamInfo:b}),A=che({subprocess:e,all:r,encoding:i,buffer:n,maxBuffer:o,lines:s,stripFinalNewline:p,verboseInfo:g,streamInfo:b}),N=[],C=phe({subprocess:e,buffer:n,maxBuffer:o,ipc:d,ipcOutput:N,verboseInfo:g}),P=tct(y,e,b),E=rct(h,b);try{return await Promise.race([Promise.all([{},Qme(x),Promise.all(k),A,C,yfe(e,f,d),...P,...E]),v,nct(e,w),...dfe(t,a,m,w),...Dde({kill:t,cancelSignal:c,gracefulCancel:l,context:m,controller:w}),...ufe({subprocess:e,kill:t,cancelSignal:c,gracefulCancel:l,forceKillAfterDelay:u,context:m,controller:w})])}catch(O){return m.terminationReason??="other",Promise.all([{error:O},x,Promise.all(k.map((z)=>MB(z))),MB(A),dhe(C,N),Promise.allSettled(P),Promise.allSettled(E)])}},tct=(e,t,r)=>e.map((i,n)=>i===t.stdio[n]?void 0:Gw(i,n,r)),rct=(e,t)=>e.flatMap(({stdioItems:r},i)=>r.filter(({value:n,stream:o=n})=>Ko(o,{checkOpen:!1})&&!Go(o)).map(({type:n,value:o,stream:s=o})=>Gw(s,i,t,{isSameDirection:vo.has(n),stopOnExit:n==="native"}))),nct=async(e,{signal:t})=>{let[r]=await ect(e,"error",{signal:t});throw r};import{Writable as ict}from"node:stream";import{callbackify as mhe}from"node:util";var ghe=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:o}=FB(e,r,t),s=new ict({...zB(i,e,n),destroy:mhe(LB.bind(void 0,{subprocessStdin:i,subprocess:e,waitWritableFinal:n,waitWritableDestroy:o})),highWaterMark:i.writableHighWaterMark,objectMode:i.writableObjectMode});return UB(i,s,void 0,e),s},FB=(e,t,r)=>{let i=pE(e,t),n=Hw(r,i,"writableFinal"),o=Hw(r,i,"writableDestroy");return{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:o}},zB=(e,t,r)=>({write:oct.bind(void 0,e),final:mhe(sct.bind(void 0,e,t,r))}),oct=(e,t,r,i)=>{if(e.write(t,r))i();else e.once("drain",i)},sct=async(e,t,r)=>{if(!await ng(r,t))return;if(e.writable)e.end();await t},UB=async(e,t,r,i)=>{try{if(await EB(e),await i,t.writable)t.end()}catch(n){await Wge(r),hhe(t,await act(i,n))}},act=async(e,t)=>{if(!cct(t))return t;try{await e}catch(r){return r}return t},cct=(e)=>e===void 0||og(e),LB=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:i},n)=>{if(await ng(r,t),await ng(i,t))hhe(e,n),await $E(t,n)},hhe=(e,t)=>{xE(e,e.writable,t)};import{Duplex as lct}from"node:stream";import{callbackify as uct}from"node:util";var yhe=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,to:n,binary:o=!0,preserveNewlines:s=!0}={})=>{let a=o||Ki.has(r),{subprocessStdout:c,waitReadableDestroy:l}=IB(e,i,t),{subprocessStdin:u,waitWritableFinal:p,waitWritableDestroy:d}=FB(e,n,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:g}=AB(c,a),{read:h,onStdoutDataDone:y}=OB({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),v=new lct({read:h,...zB(u,e,p),destroy:uct(pct.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:p,waitWritableDestroy:d})),readableHighWaterMark:g,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return DB({subprocessStdout:c,onStdoutDataDone:y,readable:v,subprocess:e,subprocessStdin:u}),UB(u,v,c,e),v},pct=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:i,waitWritableFinal:n,waitWritableDestroy:o},s)=>{await Promise.all([TB({subprocessStdout:e,subprocess:r,waitReadableDestroy:i},s),LB({subprocessStdin:t,subprocess:r,waitWritableFinal:n,waitWritableDestroy:o},s)])};var vhe=(e,{encoding:t})=>{let r=kE();e.readable=PE.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=ghe.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=yhe.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.readableStream=CE.bind(void 0,e),e.writableStream=Gge.bind(void 0,e),e.transformStream=Zge.bind(void 0,e),e.iterable=ig.bind(void 0,e,t),e[Symbol.asyncIterator]=ig.bind(void 0,e,t,{})};var whe=(e,t)=>Object.assign(e,t);var bhe=(e,t,r,i)=>{let{file:n,commandArguments:o,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:p}=mct(e,t,r),{subprocess:d,promise:f,kill:m,all:g,convertedStreams:h}=hct({file:n,commandArguments:o,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:p}),y=yct({promise:f,nodeChildProcess:d,kill:m,all:g,convertedStreams:h,options:u});return y.pipe=EE.bind(void 0,{source:y,sourcePromise:f,boundOptions:{},createNested:i}),Bs.set(y,{options:u,fileDescriptors:p}),y},mct=(e,t,r)=>{let{command:i,escapedCommand:n,startTime:o,verboseInfo:s}=I_(e,t,r),{file:a,commandArguments:c,options:l}=J_(e,t,r),u=gct(l),p=kge(u,s);return{file:a,commandArguments:c,command:i,escapedCommand:n,startTime:o,verboseInfo:s,options:u,fileDescriptors:p}},gct=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},hct=({file:e,commandArguments:t,options:r,startTime:i,verboseInfo:n,command:o,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=fct(...Y_(e,t,Tge(r)))}catch(h){return mge({error:h,command:o,escapedCommand:s,fileDescriptors:a,options:r,startTime:i,verboseInfo:n})}let l=new AbortController;dct(1/0,l.signal);let u=[...c.stdio];Age(c,a,l),ife(c,r);let p={},d=Ls(),f=Ade.bind(void 0,{kill:Nge(c,r),options:r,onInternalError:d,context:p,controller:l});Uge(f,r,l);let m=ahe(c,r),g=wct({subprocess:c,kill:f,all:m,options:r,startTime:i,verboseInfo:n,fileDescriptors:a,originalStreams:u,command:o,escapedCommand:s,context:p,onInternalError:d,controller:l});return{subprocess:c,promise:g,kill:f,all:m}},yct=({promise:e,nodeChildProcess:t,kill:r,all:i,convertedStreams:n,options:o})=>{let s=whe(e,vct(t,i));if(s.kill=r??s.kill,n===void 0)vhe(s,o);else Object.assign(s,n);return age(s,t,o),s},vct=(e,t)=>({nodeChildProcess:e,pid:e.pid,stdin:e.stdin,stdout:e.stdout,stderr:e.stderr,stdio:e.stdio,all:t,kill:e.kill.bind(e)}),wct=async({subprocess:e,kill:t,all:r,options:i,startTime:n,verboseInfo:o,fileDescriptors:s,originalStreams:a,command:c,escapedCommand:l,context:u,onInternalError:p,controller:d})=>{let[f,[m,g],h,y,v]=await fhe({subprocess:e,kill:t,all:r,options:i,context:u,verboseInfo:o,fileDescriptors:s,originalStreams:a,onInternalError:p,controller:d});d.abort(),p.resolve();let w=h.map((k,A)=>Ja(k,i,A)),x=Ja(y,i,"all"),b=bct({errorInfo:f,exitCode:m,signal:g,stdio:w,all:x,ipcOutput:v,context:u,options:i,command:c,escapedCommand:l,startTime:n});return Qm(b,o,i)},bct=({errorInfo:e,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:o,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>("error"in e)?jw({error:e.error,command:c,escapedCommand:l,timedOut:s.terminationReason==="timeout",isCanceled:s.terminationReason==="cancel"||s.terminationReason==="gracefulCancel",isGracefullyCanceled:s.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof Za,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:o,options:a,startTime:u,isSync:!1}):sE({command:c,escapedCommand:l,stdio:i,all:n,ipcOutput:o,options:a,startTime:u});var RE=(e,t)=>{let r={__proto__:null,...e},i=Object.fromEntries(Object.entries(t).map(([n,o])=>[n,kct(n,r[n],o)]));return{...r,...i}},kct=(e,t,r)=>{if(Sct.has(e)&&gr(t)&&gr(r))return{...t,...r};return r},Sct=new Set(["env",...C6]);var sg=(e,t,r,i)=>{let n=(s,a,c)=>sg(s,a,r,c),o=(...s)=>$ct({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:i,createNested:n},...s);if(i!==void 0)i(o,n,t);return o},$ct=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:i,createNested:n},o,...s)=>{if(gr(o))return n(e,RE(r,o),i);let{file:a,commandArguments:c,options:l,isSync:u}=xct({mapArguments:e,firstArgument:o,nextArguments:s,deepOptions:t,boundOptions:r});return u?tge(a,c,l):bhe(a,c,l,n)},xct=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:i,boundOptions:n})=>{let o=Kpe(t)?Jpe(t,r):[t,...r],[s,a,c]=w_(...o),l=RE(RE(i,n),c),{options:u=l,isSync:p=!1}=e({options:l});return{file:s,commandArguments:a,options:u,isSync:p}};var khe=(e,t,r)=>{e.sync=t(Pct,r),e.s=e.sync},She=({options:e})=>$he(e),Pct=({options:e})=>({...$he(e),isSync:!0}),$he=(e)=>({options:{...Cct(e),...e}}),Cct=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},xhe={preferLocal:!0};var IE=sg(()=>({})),v9t=sg(()=>({isSync:!0})),w9t=sg(mfe),b9t=sg(She,{},xhe,khe),{sendMessage:k9t,getOneMessage:S9t,getEachMessage:$9t,getCancelSignal:x9t}=cge();Wo();var AE={command:"self update",description:"Update allagents to the latest version",whenToUse:"To upgrade allagents to the latest published version using your package manager",examples:["allagents self update","allagents self update --npm","allagents self update --bun"],expectedOutput:"Shows current version, runs the update, then shows the new version. Exit 1 if the update fails.",options:[{flag:"--npm",type:"boolean",description:"Force update using npm"},{flag:"--bun",type:"boolean",description:"Force update using bun"}],outputSchema:{previousVersion:"string",newVersion:"string",packageManager:"string"}};kg();function _ct(e){if(e.includes(".bun"))return"bun";return"npm"}function BB(){return _ct(process.argv[1]??"")}function Ect(){return Co.version}var Rct=Zw.command({name:"update",description:We(AE),args:{npm:Zw.flag({long:"npm",description:"Force update using npm"}),bun:Zw.flag({long:"bun",description:"Force update using bun"})},handler:async({npm:e,bun:t})=>{try{let r;if(e&&t){if(L())H({success:!1,command:"self update",error:"Cannot specify both --npm and --bun"}),process.exit(1);console.error("Error: Cannot specify both --npm and --bun"),process.exit(1)}if(e)r="npm";else if(t)r="bun";else r=BB();let i=Ect();if(!L())console.log(`Current version: ${i}`),console.log(`Updating allagents using ${r}...
685
+ if (condition) { yield value; }`)};import{Buffer as Pot}from"node:buffer";import{StringDecoder as Cot}from"node:string_decoder";var mE=(e,t,r)=>{if(r)return;if(e)return{transform:_ot.bind(void 0,new TextEncoder)};let i=new Cot(t);return{transform:Eot.bind(void 0,i),final:Rot.bind(void 0,i)}},_ot=function*(e,t){if(Pot.isBuffer(t))yield Ha(t);else if(typeof t==="string")yield e.encode(t);else yield t},Eot=function*(e,t){yield Kr(t)?e.write(t):t},Rot=function*(e){let t=e.end();if(t!=="")yield t};import{callbackify as zme}from"node:util";var aB=zme(async(e,t,r,i)=>{t.currentIterable=e(...r);try{for await(let n of t.currentIterable)i.push(n)}finally{delete t.currentIterable}}),gE=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:i=Aot}=t[r];for await(let n of i(e))yield*gE(n,t,r+1)},Ume=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*Iot(r,Number(t),e)},Iot=async function*(e,t,r){if(e===void 0)return;for await(let i of e())yield*gE(i,r,t+1)},Lme=zme(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),Aot=function*(e){yield e};var cB=(e,t,r,i)=>{try{for(let n of e(...t))r.push(n);i()}catch(n){i(n)}},Bme=(e,t)=>[...t.flatMap((r)=>[...kp(r,e,0)]),...Lw(e)],kp=function*(e,t,r){if(r===t.length){yield e;return}let{transform:i=Dot}=t[r];for(let n of i(e))yield*kp(n,t,r+1)},Lw=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*Oot(r,Number(t),e)},Oot=function*(e,t,r){if(e===void 0)return;for(let i of e())yield*kp(i,r,t+1)},Dot=function*(e){yield e};var lB=({value:e,value:{transform:t,final:r,writableObjectMode:i,readableObjectMode:n},optionName:o},{encoding:s})=>{let a={},c=Vme(e,s,o),l=bp(t),u=bp(r),p=l?aB.bind(void 0,gE,a):cB.bind(void 0,kp),d=l||u?aB.bind(void 0,Ume,a):cB.bind(void 0,Lw),f=l||u?Lme.bind(void 0,a):void 0;return{stream:new Tot({writableObjectMode:i,writableHighWaterMark:qme(i),readableObjectMode:n,readableHighWaterMark:qme(n),transform(g,h,y){p([g,c,0],this,y)},flush(g){d([c],this,g)},destroy:f})}},hE=(e,t,r,i)=>{let n=t.filter(({type:s})=>s==="generator"),o=i?n.reverse():n;for(let{value:s,optionName:a}of o){let c=Vme(s,r,a);e=Bme(c,e)}return e},Vme=({transform:e,final:t,binary:r,writableObjectMode:i,readableObjectMode:n,preserveNewlines:o},s,a)=>{let c={};return[{transform:Mme(i,a)},mE(r,s,i),fE(r,o,i,c),{transform:e,final:t},{transform:jme(n,a)},Nme({binary:r,preserveNewlines:o,readableObjectMode:n,state:c})].filter(Boolean)};var Wme=(e,t)=>{for(let r of Not(e))Mot(e,r,t)},Not=(e)=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),Mot=(e,t,r)=>{let{stdioItems:i}=e[t],n=i.filter(({contents:a})=>a!==void 0);if(n.length===0)return;if(t!==0){let[{type:a,optionName:c}]=n;throw TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${vl[a]} with synchronous methods.`)}let s=n.map(({contents:a})=>a).map((a)=>jot(a,i));r.input=Ew(s)},jot=(e,t)=>{let r=hE(e,t,"utf8",!0);return Fot(r),Ew(r)},Fot=(e)=>{let t=e.find((r)=>typeof r!=="string"&&!Kr(r));if(t!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};import{writeFileSync as Bot,appendFileSync as qot}from"node:fs";var yE=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:i})=>i!=="all"&&Vm(r,i)&&!Ki.has(t)&&zot(i)&&(e.some(({type:n,value:o})=>n==="native"&&Uot.has(o))||e.every(({type:n})=>vo.has(n))),zot=(e)=>e===1||e===2,Uot=new Set(["pipe","overlapped"]),Hme=async(e,t,r,i)=>{for await(let n of e)if(!Lot(t))Zme(n,r,i)},Gme=(e,t,r)=>{for(let i of e)Zme(i,t,r)},Lot=(e)=>e._readableState.pipes.length>0,Zme=(e,t,r)=>{let i=E_(e);zs({type:"output",verboseMessage:i,fdNumber:t,verboseInfo:r})};var Kme=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:i,verboseInfo:n})=>{if(t===null)return{output:Array.from({length:3})};let o={},s=new Set;return{output:t.map((c,l)=>Vot({result:c,fileDescriptors:e,fdNumber:l,state:o,outputFiles:s,isMaxBuffer:i,verboseInfo:n},r)),...o}},Vot=({result:e,fileDescriptors:t,fdNumber:r,state:i,outputFiles:n,isMaxBuffer:o,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:p})=>{if(e===null)return;let d=Wfe(e,o,p),f=Ha(d),{stdioItems:m,objectMode:g}=t[r],h=Wot([f],m,c,i),{serializedResult:y,finalResult:v=y}=Hot({chunks:h,objectMode:g,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Got({serializedResult:y,fdNumber:r,state:i,verboseInfo:s,encoding:c,stdioItems:m,objectMode:g});let w=a[r]?v:void 0;try{if(i.error===void 0)Zot(y,m,n);return w}catch(x){return i.error=x,w}},Wot=(e,t,r,i)=>{try{return hE(e,t,r,!1)}catch(n){return i.error=n,e}},Hot=({chunks:e,objectMode:t,encoding:r,lines:i,stripFinalNewline:n,fdNumber:o})=>{if(t)return{serializedResult:e};if(r==="buffer")return{serializedResult:Ew(e)};let s=Wpe(e,r);if(i[o])return{serializedResult:s,finalResult:sB(s,!n[o],t)};return{serializedResult:s}},Got=({serializedResult:e,fdNumber:t,state:r,verboseInfo:i,encoding:n,stdioItems:o,objectMode:s})=>{if(!yE({stdioItems:o,encoding:n,verboseInfo:i,fdNumber:t}))return;let a=sB(e,!1,s);try{Gme(a,t,i)}catch(c){r.error??=c}},Zot=(e,t,r)=>{let i=t.filter(({type:n})=>lE.has(n));for(let{path:n,append:o}of i){let s=typeof n==="string"?n:n.toString();if(o||r.has(s))qot(n,e);else r.add(s),Bot(n,e)}};var Jme=([,e,t],r)=>{if(!r.all)return;if(e===void 0)return t;if(t===void 0)return e;if(Array.isArray(e))return Array.isArray(t)?[...e,...t]:[...e,Ja(t,r,"all")];if(Array.isArray(t))return[Ja(e,r,"all"),...t];if(Kr(e)&&Kr(t))return S6([e,t]);return`${e}${t}`};import{once as uB}from"node:events";var Yme=async(e,t)=>{let[r,i]=await Kot(e);return t.isForcefullyTerminated??=!1,[r,i]},Kot=async(e)=>{let[t,r]=await Promise.allSettled([uB(e,"spawn"),uB(e,"exit")]);if(t.status==="rejected")return[];return r.status==="rejected"?Xme(e):r.value},Xme=async(e)=>{try{return await uB(e,"exit")}catch{return Xme(e)}},Qme=async(e)=>{let[t,r]=await e;if(!Jot(t,r)&&pB(t,r))throw new Us;return[t,r]},Jot=(e,t)=>e===void 0&&t===void 0,pB=(e,t)=>e!==0||t!==null;var ege=({error:e,status:t,signal:r,output:i},{maxBuffer:n})=>{let o=Yot(e,t,r),s=o?.code==="ETIMEDOUT",a=Vfe(o,i,n);return{resultError:o,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Yot=(e,t,r)=>{if(e!==void 0)return e;return pB(t,r)?new Us:void 0};var tge=(e,t,r)=>{let{file:i,commandArguments:n,command:o,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Qot(e,t,r),p=rst({file:i,commandArguments:n,options:l,command:o,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return Qm(p,c,l)},Qot=(e,t,r)=>{let{command:i,escapedCommand:n,startTime:o,verboseInfo:s}=I_(e,t,r),a=est(r),{file:c,commandArguments:l,options:u}=J_(e,t,a);tst(u);let p=Ime(u,s);return{file:c,commandArguments:l,command:i,escapedCommand:n,startTime:o,verboseInfo:s,options:u,fileDescriptors:p}},est=(e)=>e.node&&!e.ipc?{...e,ipc:!1}:e,tst=({ipc:e,ipcInput:t,detached:r,cancelSignal:i,killDescendants:n})=>{if(t)Bw("ipcInput");if(e)Bw("ipc: true");if(r)Bw("detached: true");if(n)Bw("killDescendants: true");if(i)Bw("cancelSignal")},Bw=(e)=>{throw TypeError(`The "${e}" option cannot be used with synchronous methods.`)},rst=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,verboseInfo:o,fileDescriptors:s,startTime:a})=>{let c=nst({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:s,startTime:a});if(c.failed)return c;let{resultError:l,exitCode:u,signal:p,timedOut:d,isMaxBuffer:f}=ege(c,r),{output:m,error:g=l}=Kme({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:f,verboseInfo:o}),h=m.map((v,w)=>Ja(v,r,w)),y=Ja(Jme(m,r),r,"all");return ost({error:g,exitCode:u,signal:p,timedOut:d,isMaxBuffer:f,stdio:h,all:y,options:r,command:i,escapedCommand:n,startTime:a})},nst=({file:e,commandArguments:t,options:r,command:i,escapedCommand:n,fileDescriptors:o,startTime:s})=>{try{Wme(o,r);let a=ist(r);return Xot(...Y_(e,t,a))}catch(a){return Xm({error:a,command:i,escapedCommand:n,fileDescriptors:o,options:r,startTime:s,isSync:!0})}},ist=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:oE(t)}),ost=({error:e,exitCode:t,signal:r,timedOut:i,isMaxBuffer:n,stdio:o,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>e===void 0?sE({command:c,escapedCommand:l,stdio:o,all:s,ipcOutput:[],options:a,startTime:u}):jw({error:e,command:c,escapedCommand:l,timedOut:i,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:n,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:o,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0});import{setMaxListeners as dct}from"node:events";import{spawn as fct}from"node:child_process";import sge from"node:process";import{once as dB,on as sst}from"node:events";var fB=Symbol("internalGetOneMessageOptions"),rge=({anyProcess:e,channel:t,isSubprocess:r,ipc:i},n={})=>{let{reference:o=!0,filter:s}=n,{signal:a}=n[fB]??{};return Wm({methodName:"getOneMessage",isSubprocess:r,ipc:i,isConnected:V_(e)}),ast({anyProcess:e,channel:t,isSubprocess:r,filter:s,reference:o,signal:a})},ast=async({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:n,signal:o})=>{U_(t,n);let s=yl(e,t,r),a=new AbortController;cst(o,a);try{return await Promise.race([lst(s,i,a),ust(s,r,a),pst(s,r,a)])}catch(c){throw Hm(e),c}finally{a.abort(),L_(t,n)}},cst=(e,t)=>{if(e===void 0)return;if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},lst=async(e,t,{signal:r})=>{if(t===void 0){let[i]=await dB(e,"message",{signal:r});return i}for await(let[i]of sst(e,"message",{signal:r}))if(t(i))return i},ust=async(e,t,{signal:r})=>{await dB(e,"disconnect",{signal:r}),Tde(t)},pst=async(e,t,{signal:r})=>{let[i]=await dB(e,"strict:error",{signal:r});throw z_(i,t)};import{once as ige,on as dst}from"node:events";var mB=Symbol("internalGetEachMessageOptions"),oge=(e,t={})=>{let{reference:r=!0}=t,{signal:i,shouldAwait:n=!e.isSubprocess}=t[mB]??{};return gB({...e,shouldAwait:n,reference:r,signal:i})},gB=({anyProcess:e,waitProcess:t=e,channel:r,isSubprocess:i,ipc:n,shouldAwait:o,reference:s,signal:a})=>{Wm({methodName:"getEachMessage",isSubprocess:i,ipc:n,isConnected:V_(e)}),U_(r,s);let c=yl(e,r,i),l=new AbortController,u={};return fst(a,l),mst(e,c,l),gst({ipcEmitter:c,isSubprocess:i,controller:l,state:u}),hst({anyProcess:e,waitProcess:t,channel:r,ipcEmitter:c,isSubprocess:i,shouldAwait:o,controller:l,state:u,reference:s})},fst=(e,t)=>{if(e===void 0)return;if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},mst=async(e,t,r)=>{try{await ige(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},gst=async({ipcEmitter:e,isSubprocess:t,controller:r,state:i})=>{try{let[n]=await ige(e,"strict:error",{signal:r.signal});i.error=z_(n,t),r.abort()}catch{}},hst=async function*({anyProcess:e,waitProcess:t,channel:r,ipcEmitter:i,isSubprocess:n,shouldAwait:o,controller:s,state:a,reference:c}){try{for await(let[l]of dst(i,"message",{signal:s.signal}))nge(a),yield l}catch{nge(a)}finally{if(s.abort(),L_(r,c),!n)Hm(e);if(o)await t}},nge=({error:e})=>{if(e)throw e};var age=(e,t,{ipc:r})=>{Object.assign(e,lge(t,!1,r,e))},cge=()=>{let e=sge,t=!0,r=sge.channel!==void 0;return{...lge(e,!0,r),getCancelSignal:afe.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:!0,ipc:r})}},lge=(e,t,r,i=e)=>({sendMessage:Gm.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:rge.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:oge.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r,waitProcess:i})});import{ChildProcess as yst}from"node:child_process";import{PassThrough as vst,Readable as pge,Writable as dge,Duplex as fge}from"node:stream";var mge=({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:o,verboseInfo:s})=>{nB(i);let a=new yst,c=wst(a,i),l=Xm({error:e,command:t,escapedCommand:r,fileDescriptors:i,options:n,startTime:o,isSync:!1}),u=$st(l,s,n);return{subprocess:a,promise:u,all:n.all?c:void 0,convertedStreams:{readable:gge,writable:hge,duplex:yge,readableStream:bst,writableStream:kst,transformStream:Sst,iterable:uge,[Symbol.asyncIterator]:uge}}},wst=(e,t)=>{let r=qw(),i=qw(),n=qw(),o=Array.from({length:t.length-3},qw),s=qw(),a=[r,i,n,...o];return Object.assign(e,{stdin:r,stdout:i,stderr:n,stdio:a}),s},qw=()=>{let e=new vst;return e.end(),e},gge=()=>new pge({read(){}}),hge=()=>new dge({write(){}}),yge=()=>new fge({read(){},write(){}}),bst=()=>pge.toWeb(gge()),kst=()=>dge.toWeb(hge()),Sst=()=>fge.toWeb(yge()),uge=async function*(){},$st=async(e,t,r)=>Qm(e,t,r);import{createReadStream as vge,createWriteStream as wge}from"node:fs";import{Buffer as xst}from"node:buffer";import{Readable as Vw,Writable as Pst,Duplex as Cst}from"node:stream";var kge=(e,t)=>dE(_st,e,t,!1),Ww=({type:e,optionName:t})=>{throw TypeError(`The \`${t}\` option cannot be ${vl[e]}.`)},bge={fileNumber:Ww,generator:lB,asyncGenerator:lB,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){let i=t||r;return{stream:Cst.fromWeb(e,{objectMode:i})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},_st={input:{...bge,fileUrl:({value:e})=>({stream:vge(e)}),filePath:({value:{file:e}})=>({stream:vge(e)}),webStream:({value:e})=>({stream:Vw.fromWeb(e)}),iterable:({value:e})=>({stream:Vw.from(e)}),asyncIterable:({value:e})=>({stream:Vw.from(e)}),string:({value:e})=>({stream:Vw.from(e)}),uint8Array:({value:e})=>({stream:Vw.from(xst.from(e))})},output:{...bge,fileUrl:({value:e})=>({stream:wge(e)}),filePath:({value:{file:e,append:t}})=>({stream:wge(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Pst.fromWeb(e)}),iterable:Ww,asyncIterable:Ww,string:Ww,uint8Array:Ww}};import{on as Est,once as Sge}from"node:events";import{PassThrough as Rst,getDefaultHighWaterMark as Ist}from"node:stream";import{finished as Pge}from"node:stream/promises";function Sp(e){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);for(let n of e)hB(n);let t=e.some(({readableObjectMode:n})=>n),r=Ast(e,t),i=new Cge({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let n of e)i.add(n);return i}var Ast=(e,t)=>{if(e.length===0)return Ist(t);let r=e.filter(({readableObjectMode:i})=>i===t).map(({readableHighWaterMark:i})=>i);return Math.max(...r)};class Cge extends Rst{#t=new Set([]);#n=new Set([]);#e=new Set([]);#i;#s=Symbol("unpipe");#r=new WeakMap;add(e){if(hB(e),this.#t.has(e))return;this.#t.add(e),this.#i??=Ost(this,this.#t,this.#s);let t=Nst({passThroughStream:this,stream:e,streams:this.#t,ended:this.#n,aborted:this.#e,onFinished:this.#i,unpipeEvent:this.#s});this.#r.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(hB(e),!this.#t.has(e))return!1;let t=this.#r.get(e);if(t===void 0)return!1;return this.#r.delete(e),e.unpipe(this),await t,!0}}var Ost=async(e,t,r)=>{vE(e,$ge);let i=new AbortController;try{await Promise.race([Dst(e,i),Tst(e,t,r,i)])}finally{i.abort(),vE(e,-$ge)}},Dst=async(e,{signal:t})=>{try{await Pge(e,{signal:t,cleanup:!0})}catch(r){throw _ge(e,r),r}},Tst=async(e,t,r,{signal:i})=>{for await(let[n]of Est(e,"unpipe",{signal:i}))if(t.has(n))n.emit(r)},hB=(e)=>{if(typeof e?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},Nst=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,onFinished:o,unpipeEvent:s})=>{vE(e,xge);let a=new AbortController;try{await Promise.race([Mst(o,t,a),jst({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:a}),Fst({stream:t,streams:r,ended:i,aborted:n,unpipeEvent:s,controller:a})])}finally{a.abort(),vE(e,-xge)}if(r.size>0&&r.size===i.size+n.size)if(i.size===0&&n.size>0)yB(e);else zst(e)},Mst=async(e,t,{signal:r})=>{try{if(await e,!r.aborted)yB(t)}catch(i){if(!r.aborted)_ge(t,i)}},jst=async({passThroughStream:e,stream:t,streams:r,ended:i,aborted:n,controller:{signal:o}})=>{try{if(await Pge(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t))i.add(t)}catch(s){if(o.aborted||!r.has(t))return;if(Ege(s))n.add(t);else Rge(e,s)}},Fst=async({stream:e,streams:t,ended:r,aborted:i,unpipeEvent:n,controller:{signal:o}})=>{if(await Sge(e,n,{signal:o}),!e.readable)return Sge(o,"abort",{signal:o});t.delete(e),r.delete(e),i.delete(e)},zst=(e)=>{if(e.writable)e.end()},_ge=(e,t)=>{if(Ege(t))yB(e);else Rge(e,t)},Ege=(e)=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",yB=(e)=>{if(e.readable||e.writable)e.destroy()},Rge=(e,t)=>{if(!e.destroyed)e.once("error",Ust),e.destroy(t)},Ust=()=>{},vE=(e,t)=>{let r=e.getMaxListeners();if(r!==0&&r!==Number.POSITIVE_INFINITY)e.setMaxListeners(r+t)},$ge=2,xge=1;import{finished as Ige}from"node:stream/promises";var rg=(e,t)=>{e.pipe(t),Lst(e,t),Bst(e,t)},Lst=async(e,t)=>{if(Go(e)||Go(t))return;try{await Ige(e,{cleanup:!0,readable:!0,writable:!1})}catch{}vB(t)},vB=(e)=>{if(e.writable)e.end()},Bst=async(e,t)=>{if(Go(e)||Go(t))return;try{await Ige(t,{cleanup:!0,readable:!1,writable:!0})}catch{}wB(e)},wB=(e)=>{if(e.readable)e.destroy()};var Age=(e,t,r)=>{let i=new Map;for(let[n,{stdioItems:o,direction:s}]of Object.entries(t)){let a=o.filter(({type:l})=>vo.has(l));for(let{stream:l}of a)qst(e,l,s,n);let c=o.filter(({type:l})=>!vo.has(l));for(let{stream:l}of c)Wst({subprocess:e,stream:l,direction:s,fdNumber:n,pipeGroups:i,controller:r})}for(let[n,o]of i){let s=o.length===1?o[0]:Sp(o);rg(s,n)}},qst=(e,t,r,i)=>{if(r==="output")rg(e.stdio[i],t);else rg(t,e.stdio[i]);let n=Vst[i];if(n!==void 0)e[n]=t;e.stdio[i]=t},Vst=["stdin","stdout","stderr"],Wst=({subprocess:e,stream:t,direction:r,fdNumber:i,pipeGroups:n,controller:o})=>{if(t===void 0)return;Hst(t,o);let[s,a]=r==="output"?[t,e.stdio[i]]:[e.stdio[i],t],c=n.get(s)??[];n.set(s,[...c,a])},Hst=(e,{signal:t})=>{if(Go(e))yp(e,Gst,t)},Gst=2;import wE from"node:process";import{execFile as Zst}from"node:child_process";import Oge from"node:path/win32";var Dge=wE.platform==="win32",Tge=(e)=>e.killDescendants&&!Dge?{...e,detached:!0}:e,Nge=(e,{killDescendants:t})=>{if(!t)return e.kill.bind(e);return(Dge?Jst:Kst).bind(void 0,e)},Kst=(e,t)=>{if(e.pid===void 0)return!1;try{return wE.kill(-e.pid,t)}catch{return e.kill(t)}},Jst=(e,t)=>{if(e.pid===void 0)return!1;let r=Yst();if(r===void 0)return e.kill(t);return Zst(r,["/pid",`${e.pid}`,"/T","/F"],(i)=>{if(i)e.kill(t)}),!0},Yst=()=>{let e=[wE.env.SystemRoot,wE.env.windir].find((t)=>t&&Xst(t));return e===void 0?void 0:Oge.join(e,"System32","taskkill.exe")},Xst=(e)=>{let{root:t}=Oge.parse(e);return/^[a-z]:[/\\]/i.test(t)};import{addAbortListener as tat}from"node:events";var $p=[];$p.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")$p.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")$p.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var bE=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",bB=Symbol.for("signal-exit emitter"),kB=globalThis,Qst=Object.defineProperty.bind(Object);class Mge{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(kB[bB])return kB[bB];Qst(kB,bB,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let r=this.listeners[e],i=r.indexOf(t);if(i===-1)return;if(i===0&&r.length===1)r.length=0;else r.splice(i,1)}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let i=!1;for(let n of this.listeners[e])i=n(t,r)===!0||i;if(e==="exit")i=this.emit("afterExit",t,r)||i;return i}}class $B{}var eat=(e)=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}});class jge extends $B{onExit(){return()=>{}}load(){}unload(){}}class Fge extends $B{#t=SB.platform==="win32"?"SIGINT":"SIGHUP";#n=new Mge;#e;#i;#s;#r={};#o=!1;constructor(e){super();this.#e=e,this.#r={};for(let t of $p)this.#r[t]=()=>{let r=this.#e.listeners(t),{count:i}=this.#n,n=e;if(typeof n.__signal_exit_emitter__==="object"&&typeof n.__signal_exit_emitter__.count==="number")i+=n.__signal_exit_emitter__.count;if(r.length===i){this.unload();let o=this.#n.emit("exit",null,t),s=t==="SIGHUP"?this.#t:t;if(!o)e.kill(e.pid,s)}};this.#s=e.reallyExit,this.#i=e.emit}onExit(e,t){if(!bE(this.#e))return()=>{};if(this.#o===!1)this.load();let r=t?.alwaysLast?"afterExit":"exit";return this.#n.on(r,e),()=>{if(this.#n.removeListener(r,e),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0)this.unload()}}load(){if(this.#o)return;this.#o=!0,this.#n.count+=1;for(let e of $p)try{let t=this.#r[e];if(t)this.#e.on(e,t)}catch(t){}this.#e.emit=(e,...t)=>this.#u(e,...t),this.#e.reallyExit=(e)=>this.#a(e)}unload(){if(!this.#o)return;this.#o=!1,$p.forEach((e)=>{let t=this.#r[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,t)}catch(r){}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#s,this.#n.count-=1}#a(e){if(!bE(this.#e))return 0;return this.#e.exitCode=e||0,this.#n.emit("exit",this.#e.exitCode,null),this.#s.call(this.#e,this.#e.exitCode)}#u(e,...t){let r=this.#i;if(e==="exit"&&bE(this.#e)){if(typeof t[0]==="number")this.#e.exitCode=t[0];let i=r.call(this.#e,e,...t);return this.#n.emit("exit",this.#e.exitCode,null),i}else return r.call(this.#e,e,...t)}}var SB=globalThis.process,{onExit:zge,load:y4t,unload:v4t}=eat(bE(SB)?new Fge(SB):new jge);var Uge=(e,{cleanup:t,detached:r},{signal:i})=>{if(!t||r)return;let n=zge(()=>{e()});tat(i,()=>{n()})};var kE=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Hw=(e,t,r)=>{let i=e[r];if(!i.has(t))i.set(t,[]);let n=i.get(t),o=Ls();return n.push(o),{resolve:o.resolve.bind(o),promises:n}},ng=async({resolve:e,promises:t},r)=>{e();let[i]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!i};import{on as rat}from"node:events";import{getDefaultHighWaterMark as nat}from"node:stream";var SE=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:i,encoding:n,preserveNewlines:o})=>{let s=new AbortController;return iat(t,s),Bge({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&i,encoding:n,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},iat=async(e,t)=>{try{await e}catch{}finally{t.abort()}},xB=({stream:e,onStreamEnd:t,lines:r,encoding:i,stripFinalNewline:n,allMixed:o})=>{let s=new AbortController;oat(t,s,e);let a=e.readableObjectMode&&!o;return Bge({stream:e,controller:s,binary:i==="buffer",shouldEncode:!a,encoding:i,shouldSplit:!a&&r,preserveNewlines:!n})},oat=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},Bge=({stream:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s})=>{let a=rat(e,"data",{signal:t.signal,highWaterMark:Lge,highWatermark:Lge});return sat({onStdoutChunk:a,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s})},PB=nat(!0),Lge=PB,sat=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s}){let a=aat({binary:r,shouldEncode:i,encoding:n,shouldSplit:o,preserveNewlines:s});try{for await(let[c]of e)yield*kp(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Lw(a)}},aat=({binary:e,shouldEncode:t,encoding:r,shouldSplit:i,preserveNewlines:n})=>[mE(e,r,!t),fE(e,n,!i,{})].filter(Boolean);var ig=(e,t,{from:r,binary:i=!1,preserveNewlines:n=!1}={})=>{let o=i||Ki.has(t),s=tg(e,r),a=SE({subprocessStdout:s,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:n});return cat(a,s,e)},cat=async function*(e,t,r){try{yield*e}finally{if(t.readable)t.destroy();await r}};import{Readable as gat}from"node:stream";import{callbackify as hat}from"node:util";import{finished as Vge}from"node:stream/promises";import{finished as lat}from"node:stream/promises";var Gw=async(e,t,r,{isSameDirection:i,stopOnExit:n=!1}={})=>{let o=uat(e,r),s=new AbortController;try{await Promise.race([...n?[r.exitPromise]:[],lat(e,{cleanup:!0,signal:s.signal})])}catch(a){if(!o.stdinCleanedUp)fat(a,t,r,i)}finally{s.abort()}},uat=(e,{originalStreams:t,subprocess:r})=>{let[i]=t,n={stdinCleanedUp:!1};if(e===i)pat(e,r,n);return n},pat=(e,t,r)=>{let{_destroy:i}=e;e._destroy=(...n)=>{dat(t,r),i.call(e,...n)}},dat=({exitCode:e,signalCode:t},r)=>{if(e!==null||t!==null)r.stdinCleanedUp=!0},fat=(e,t,r,i)=>{if(!mat(e,t,r,i))throw e},mat=(e,t,r,i=!0)=>{if(r.propagating)return qge(e)||og(e);return r.propagating=!0,CB(r,t)===i?qge(e):og(e)},CB=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",og=(e)=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",qge=(e)=>e?.code==="EPIPE";var _B=async(e)=>{if(e===void 0)return;try{await EB(e)}catch{}},Wge=async(e)=>{if(e===void 0)return;try{await RB(e)}catch{}},EB=async(e)=>{await Vge(e,{cleanup:!0,readable:!1,writable:!0})},RB=async(e)=>{await Vge(e,{cleanup:!0,readable:!0,writable:!1})},$E=async(e,t)=>{if(await e,t)throw t},xE=(e,t,r)=>{if(r&&!og(r))e.destroy(r);else if(t)e.destroy()};var PE=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,binary:n=!0,preserveNewlines:o=!0}={})=>{let s=n||Ki.has(r),{subprocessStdout:a,waitReadableDestroy:c}=IB(e,i,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:p}=AB(a,s),{read:d,onStdoutDataDone:f}=OB({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:o}),m=new gat({read:d,destroy:hat(TB.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:p,objectMode:u,encoding:l});return DB({subprocessStdout:a,onStdoutDataDone:f,readable:m,subprocess:e}),m},IB=(e,t,r)=>{let i=tg(e,t),n=Hw(r,i,"readableDestroy");return{subprocessStdout:i,waitReadableDestroy:n}},AB=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},i)=>i?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:PB},OB=({subprocessStdout:e,subprocess:t,binary:r,encoding:i,preserveNewlines:n})=>{let o=Ls(),s=SE({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:i,preserveNewlines:n});return{read(){yat(this,s,o)},onStdoutDataDone:o}},yat=async(e,t,r)=>{try{let{value:i,done:n}=await t.next();if(n)r.resolve();else e.push(i)}catch{}},DB=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:i,subprocessStdin:n})=>{try{if(await RB(e),await i,await _B(n),await t,r.readable)r.push(null)}catch(o){await _B(n),Hge(r,await vat(i,o))}},vat=async(e,t)=>{if(t.code!=="ERR_STREAM_PREMATURE_CLOSE")return t;try{await e}catch(r){return r}return t},TB=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},i)=>{if(!await ng(r,t))return;Hge(e,i),await $E(t,i)},Hge=(e,t)=>{xE(e,e.readable,t)};import{Readable as wat,Writable as bat,Duplex as kat}from"node:stream";var CE=(e,t)=>wat.toWeb(e.readable(t)),Gge=(e,t)=>bat.toWeb(e.writable(t)),Zge=(e,t)=>kat.toWeb(e.duplex(t));var Jge=({source:e,sourcePromise:t,boundOptions:r,createNested:i},...n)=>{let o=R_(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=Sat(r,i,n),{sourceStream:p,sourceError:d}=xat(e,l),{options:f,fileDescriptors:m}=Bs.get(e);return{sourcePromise:t,sourceStream:p,sourceOptions:f,sourceError:d,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:m,startTime:o}},Sat=(e,t,r)=>{try{let{destination:i,pipeOptions:{from:n,to:o,unpipeSignal:s}={}}=$at(e,t,...r),a=pE(i,o);return{destination:i,destinationStream:a,from:n,unpipeSignal:s}}catch(i){return{destinationError:i}}},$at=(e,t,r,...i)=>{if(Array.isArray(r))return{destination:t(Kge,e)(r,...i),pipeOptions:e};if(typeof r==="string"||r instanceof URL||b6(r)){if(Object.keys(e).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[n,o,s]=w_(r,...i);return{destination:t(Kge)(n,o,s),pipeOptions:s}}if(Bs.has(r)){if(Object.keys(e).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:i[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},Kge=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),xat=(e,t)=>{try{return{sourceStream:tg(e,t)}}catch(r){return{sourceError:r}}};var Xge=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i,fileDescriptors:n,sourceOptions:o,startTime:s})=>{let a=Pat({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i});if(a!==void 0)throw NB({error:a,fileDescriptors:n,sourceOptions:o,startTime:s})},Pat=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:i})=>{if(t!==void 0&&i!==void 0)return i;if(i!==void 0)return wB(e),i;if(t!==void 0)return vB(r),t},NB=({error:e,fileDescriptors:t,sourceOptions:r,startTime:i})=>Xm({error:e,command:Yge,escapedCommand:Yge,fileDescriptors:t,options:r,startTime:i,isSync:!1}),Yge="source.pipe(destination)";var Qge=async(e)=>{let[{status:t,reason:r,value:i=r},{status:n,reason:o,value:s=o}]=await e;if(!s.pipedFrom.includes(i))s.pipedFrom.push(i);if(n==="rejected")throw s;if(t==="rejected")throw i;return s};import{finished as Cat}from"node:stream/promises";var ehe=(e,t,r)=>{let i=_E.has(t)?Eat(e,t):_at(e,t);return yp(e,Iat,r.signal),yp(t,Aat,r.signal),Rat(t),i},_at=(e,t)=>{let r=Sp([e]);return rg(r,t),_E.set(t,r),r},Eat=(e,t)=>{let r=_E.get(t);return r.add(e),r},Rat=async(e)=>{try{await Cat(e,{cleanup:!0,readable:!1,writable:!0})}catch{}_E.delete(e)},_E=new WeakMap,Iat=2,Aat=1;import{aborted as Oat}from"node:util";var the=(e,t)=>e===void 0?[]:[Dat(e,t)],Dat=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:i,sourceOptions:n,startTime:o})=>{await Oat(e,t),await r.remove(t);let s=Error("Pipe canceled by `unpipeSignal` option.");throw NB({error:s,fileDescriptors:i,sourceOptions:n,startTime:o})};var EE=(e,...t)=>{if(gr(t[0]))return EE.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...i}=Jge(e,...t),n=new AbortController,o=Hat({...i,destination:r,pipeFailureController:n});return o.pipe=EE.bind(void 0,{...e,source:r,sourcePromise:o,boundOptions:{}}),Tat(o,r,n.signal),o},Tat=(e,t,r)=>{if(t===void 0)return;Nat(e,t),zat(e,t,r)},Nat=(e,t)=>{let r=Bs.get(t);Bs.set(e,r),e.stdio=t.stdio,e.all=t.all;let{options:{encoding:i}}=r,n=kE();e[Symbol.asyncIterator]=ig.bind(void 0,e,i,{}),e.iterable=ig.bind(void 0,e,i),e.readable=jat.bind(void 0,e,{subprocess:e,concurrentStreams:n,encoding:i}),e.readableStream=CE.bind(void 0,e),Mat(e,t)},Mat=(e,t)=>{if(t.all===void 0){e.all=void 0;return}Object.defineProperty(e,"all",{get(){rhe(e,t.all);let r=e.readable({from:"all"});return rhe(e,r),r},enumerable:!0,configurable:!0})},rhe=(e,t)=>{Object.defineProperty(e,"all",{value:t,writable:!0,enumerable:!0,configurable:!0})},jat=(e,t,...r)=>{let i=PE(t,...r);return Fat(e,i),i},Fat=async(e,t)=>{try{await e}catch(r){t.destroy(r)}},zat=(e,t,r)=>{e.sendMessage=t.sendMessage,e.getOneMessage=Uat.bind(void 0,t,r),e.getEachMessage=qat.bind(void 0,e,t,r)},Uat=(e,t,...r)=>{let i=new AbortController,n=e.getOneMessage(...nhe(r,i.signal,fB));return Lat(t,n,i)},Lat=async(e,t,r)=>{try{return await Promise.race([t,Bat(e,r.signal)])}finally{r.abort()}},Bat=(e,t)=>new Promise((r,i)=>{if(e.aborted){i(e.reason);return}e.addEventListener("abort",()=>{i(e.reason)},{once:!0,signal:t})}),qat=(e,t,r,...i)=>{let n=new AbortController,o=t.getEachMessage(...nhe(i,n.signal,mB));return Wat(r,n),Vat(e,o,n)},Vat=async function*(e,t,r){try{yield*t}finally{r.abort(),await e}},nhe=(e,t,r)=>{if(e[0]===null)return e;let[i]=e;return[{...i,[r]:{signal:t,shouldAwait:!1}}]},Wat=(e,t)=>{if(e.aborted){t.abort();return}e.addEventListener("abort",()=>{t.abort()},{once:!0,signal:t.signal})},Hat=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:i,destination:n,destinationStream:o,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l,pipeFailureController:u})=>{let p=new AbortController;try{let d=Gat(e,n);Xge({sourceStream:t,sourceError:i,destinationStream:o,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});let f=ehe(t,o,p);return await Promise.race([Qge(d),...the(a,{sourceStream:t,mergedStream:f,sourceOptions:r,fileDescriptors:c,startTime:l})])}catch(d){throw u.abort(d),d}finally{p.abort()}},Gat=(e,t)=>Promise.allSettled([e,t]);import{setImmediate as Zat}from"node:timers/promises";var ihe=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,buffer:n,maxBuffer:o,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{let p=Kat({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:a,verboseInfo:l,streamInfo:u});if(!n){await Promise.all([Jat(e),p]);return}let d=iB(c,r),f=xB({stream:e,onStreamEnd:t,lines:s,encoding:i,stripFinalNewline:d,allMixed:a}),[m]=await Promise.all([Yat({stream:e,iterable:f,fdNumber:r,encoding:i,maxBuffer:o,lines:s}),p]);return m},Kat=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:i,allMixed:n,verboseInfo:o,streamInfo:{fileDescriptors:s}})=>{if(!yE({stdioItems:s[r]?.stdioItems,encoding:i,verboseInfo:o,fdNumber:r}))return;let a=xB({stream:e,onStreamEnd:t,lines:!0,encoding:i,stripFinalNewline:!0,allMixed:n});await Hme(a,e,r,o)},Jat=async(e)=>{if(await Zat(),e.readableFlowing===null)e.resume()},Yat=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:i,encoding:n,maxBuffer:o,lines:s})=>{try{if(t||s)return await tE(r,{maxBuffer:o});if(n==="buffer")return new Uint8Array(await rE(r,{maxBuffer:o}));return await iE(r,{maxBuffer:o})}catch(a){return ohe(Lfe({error:a,stream:e,readableObjectMode:t,lines:s,encoding:n,fdNumber:i}))}},MB=async(e)=>{try{return await e}catch(t){return ohe(t)}},ohe=({bufferedData:e})=>qpe(e)?new Uint8Array(e):e;var she=({subprocess:e,encoding:t,buffer:r,maxBuffer:i,lines:n,stripFinalNewline:o,verboseInfo:s,streamInfo:a})=>e.stdio.map((c,l)=>jB({stream:c,fdNumber:l,encoding:t,buffer:r[l],maxBuffer:i[l],lines:n[l],allMixed:!1,stripFinalNewline:o,verboseInfo:s,streamInfo:a})),jB=async({stream:e,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:o,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;let u=Gw(e,t,l);if(CB(l,t)){await u;return}let[p]=await Promise.all([ihe({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:i,maxBuffer:n,lines:o,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return p};var ahe=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?Sp([e,t].filter(Boolean)):void 0,che=({subprocess:e,all:t,encoding:r,buffer:i,maxBuffer:n,lines:o,stripFinalNewline:s,verboseInfo:a,streamInfo:c})=>jB({...Xat(e,t,i),fdNumber:"all",encoding:r,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:Qat(e,t),stripFinalNewline:s,verboseInfo:a,streamInfo:c}),Xat=({stdout:e,stderr:t},r,[,i,n])=>{let o=i||n;if(!o)return{stream:r,buffer:o};if(!i)return{stream:t,buffer:o};if(!n)return{stream:e,buffer:o};return{stream:r,buffer:o}},Qat=({stdout:e,stderr:t},r)=>r&&e&&t&&e.readableObjectMode!==t.readableObjectMode;import{once as ect}from"node:events";var lhe=(e)=>Vm(e,"ipc"),uhe=(e,t)=>{let r=E_(e);zs({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var phe=async({subprocess:e,buffer:t,maxBuffer:r,ipc:i,ipcOutput:n,verboseInfo:o})=>{if(!i)return n;let s=lhe(o),a=Ga(t,"ipc"),c=Ga(r,"ipc");for await(let l of gB({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:i,shouldAwait:!1,reference:!0})){if(a)Bfe(e,n,c),n.push(l);if(s)uhe(l,o)}return n},dhe=async(e,t)=>(await Promise.allSettled([e]),t);var fhe=async({subprocess:e,kill:t,all:r,options:{encoding:i,buffer:n,maxBuffer:o,lines:s,timeoutDuration:a,cancelSignal:c,gracefulCancel:l,forceKillAfterDelay:u,stripFinalNewline:p,ipc:d,ipcInput:f},context:m,verboseInfo:g,fileDescriptors:h,originalStreams:y,onInternalError:v,controller:w})=>{let x=Yme(e,m),b={originalStreams:y,fileDescriptors:h,subprocess:e,exitPromise:x,propagating:!1},k=she({subprocess:e,encoding:i,buffer:n,maxBuffer:o,lines:s,stripFinalNewline:p,verboseInfo:g,streamInfo:b}),A=che({subprocess:e,all:r,encoding:i,buffer:n,maxBuffer:o,lines:s,stripFinalNewline:p,verboseInfo:g,streamInfo:b}),N=[],C=phe({subprocess:e,buffer:n,maxBuffer:o,ipc:d,ipcOutput:N,verboseInfo:g}),P=tct(y,e,b),E=rct(h,b);try{return await Promise.race([Promise.all([{},Qme(x),Promise.all(k),A,C,yfe(e,f,d),...P,...E]),v,nct(e,w),...dfe(t,a,m,w),...Dde({kill:t,cancelSignal:c,gracefulCancel:l,context:m,controller:w}),...ufe({subprocess:e,kill:t,cancelSignal:c,gracefulCancel:l,forceKillAfterDelay:u,context:m,controller:w})])}catch(O){return m.terminationReason??="other",Promise.all([{error:O},x,Promise.all(k.map((z)=>MB(z))),MB(A),dhe(C,N),Promise.allSettled(P),Promise.allSettled(E)])}},tct=(e,t,r)=>e.map((i,n)=>i===t.stdio[n]?void 0:Gw(i,n,r)),rct=(e,t)=>e.flatMap(({stdioItems:r},i)=>r.filter(({value:n,stream:o=n})=>Ko(o,{checkOpen:!1})&&!Go(o)).map(({type:n,value:o,stream:s=o})=>Gw(s,i,t,{isSameDirection:vo.has(n),stopOnExit:n==="native"}))),nct=async(e,{signal:t})=>{let[r]=await ect(e,"error",{signal:t});throw r};import{Writable as ict}from"node:stream";import{callbackify as mhe}from"node:util";var ghe=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:o}=FB(e,r,t),s=new ict({...zB(i,e,n),destroy:mhe(LB.bind(void 0,{subprocessStdin:i,subprocess:e,waitWritableFinal:n,waitWritableDestroy:o})),highWaterMark:i.writableHighWaterMark,objectMode:i.writableObjectMode});return UB(i,s,void 0,e),s},FB=(e,t,r)=>{let i=pE(e,t),n=Hw(r,i,"writableFinal"),o=Hw(r,i,"writableDestroy");return{subprocessStdin:i,waitWritableFinal:n,waitWritableDestroy:o}},zB=(e,t,r)=>({write:oct.bind(void 0,e),final:mhe(sct.bind(void 0,e,t,r))}),oct=(e,t,r,i)=>{if(e.write(t,r))i();else e.once("drain",i)},sct=async(e,t,r)=>{if(!await ng(r,t))return;if(e.writable)e.end();await t},UB=async(e,t,r,i)=>{try{if(await EB(e),await i,t.writable)t.end()}catch(n){await Wge(r),hhe(t,await act(i,n))}},act=async(e,t)=>{if(!cct(t))return t;try{await e}catch(r){return r}return t},cct=(e)=>e===void 0||og(e),LB=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:i},n)=>{if(await ng(r,t),await ng(i,t))hhe(e,n),await $E(t,n)},hhe=(e,t)=>{xE(e,e.writable,t)};import{Duplex as lct}from"node:stream";import{callbackify as uct}from"node:util";var yhe=({subprocess:e,concurrentStreams:t,encoding:r},{from:i,to:n,binary:o=!0,preserveNewlines:s=!0}={})=>{let a=o||Ki.has(r),{subprocessStdout:c,waitReadableDestroy:l}=IB(e,i,t),{subprocessStdin:u,waitWritableFinal:p,waitWritableDestroy:d}=FB(e,n,t),{readableEncoding:f,readableObjectMode:m,readableHighWaterMark:g}=AB(c,a),{read:h,onStdoutDataDone:y}=OB({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),v=new lct({read:h,...zB(u,e,p),destroy:uct(pct.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:p,waitWritableDestroy:d})),readableHighWaterMark:g,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:m,writableObjectMode:u.writableObjectMode,encoding:f});return DB({subprocessStdout:c,onStdoutDataDone:y,readable:v,subprocess:e,subprocessStdin:u}),UB(u,v,c,e),v},pct=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:i,waitWritableFinal:n,waitWritableDestroy:o},s)=>{await Promise.all([TB({subprocessStdout:e,subprocess:r,waitReadableDestroy:i},s),LB({subprocessStdin:t,subprocess:r,waitWritableFinal:n,waitWritableDestroy:o},s)])};var vhe=(e,{encoding:t})=>{let r=kE();e.readable=PE.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=ghe.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=yhe.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.readableStream=CE.bind(void 0,e),e.writableStream=Gge.bind(void 0,e),e.transformStream=Zge.bind(void 0,e),e.iterable=ig.bind(void 0,e,t),e[Symbol.asyncIterator]=ig.bind(void 0,e,t,{})};var whe=(e,t)=>Object.assign(e,t);var bhe=(e,t,r,i)=>{let{file:n,commandArguments:o,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:p}=mct(e,t,r),{subprocess:d,promise:f,kill:m,all:g,convertedStreams:h}=hct({file:n,commandArguments:o,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:p}),y=yct({promise:f,nodeChildProcess:d,kill:m,all:g,convertedStreams:h,options:u});return y.pipe=EE.bind(void 0,{source:y,sourcePromise:f,boundOptions:{},createNested:i}),Bs.set(y,{options:u,fileDescriptors:p}),y},mct=(e,t,r)=>{let{command:i,escapedCommand:n,startTime:o,verboseInfo:s}=I_(e,t,r),{file:a,commandArguments:c,options:l}=J_(e,t,r),u=gct(l),p=kge(u,s);return{file:a,commandArguments:c,command:i,escapedCommand:n,startTime:o,verboseInfo:s,options:u,fileDescriptors:p}},gct=({timeout:e,signal:t,...r})=>{if(t!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:e}},hct=({file:e,commandArguments:t,options:r,startTime:i,verboseInfo:n,command:o,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=fct(...Y_(e,t,Tge(r)))}catch(h){return mge({error:h,command:o,escapedCommand:s,fileDescriptors:a,options:r,startTime:i,verboseInfo:n})}let l=new AbortController;dct(1/0,l.signal);let u=[...c.stdio];Age(c,a,l),ife(c,r);let p={},d=Ls(),f=Ade.bind(void 0,{kill:Nge(c,r),options:r,onInternalError:d,context:p,controller:l});Uge(f,r,l);let m=ahe(c,r),g=wct({subprocess:c,kill:f,all:m,options:r,startTime:i,verboseInfo:n,fileDescriptors:a,originalStreams:u,command:o,escapedCommand:s,context:p,onInternalError:d,controller:l});return{subprocess:c,promise:g,kill:f,all:m}},yct=({promise:e,nodeChildProcess:t,kill:r,all:i,convertedStreams:n,options:o})=>{let s=whe(e,vct(t,i));if(s.kill=r??s.kill,n===void 0)vhe(s,o);else Object.assign(s,n);return age(s,t,o),s},vct=(e,t)=>({nodeChildProcess:e,pid:e.pid,stdin:e.stdin,stdout:e.stdout,stderr:e.stderr,stdio:e.stdio,all:t,kill:e.kill.bind(e)}),wct=async({subprocess:e,kill:t,all:r,options:i,startTime:n,verboseInfo:o,fileDescriptors:s,originalStreams:a,command:c,escapedCommand:l,context:u,onInternalError:p,controller:d})=>{let[f,[m,g],h,y,v]=await fhe({subprocess:e,kill:t,all:r,options:i,context:u,verboseInfo:o,fileDescriptors:s,originalStreams:a,onInternalError:p,controller:d});d.abort(),p.resolve();let w=h.map((k,A)=>Ja(k,i,A)),x=Ja(y,i,"all"),b=bct({errorInfo:f,exitCode:m,signal:g,stdio:w,all:x,ipcOutput:v,context:u,options:i,command:c,escapedCommand:l,startTime:n});return Qm(b,o,i)},bct=({errorInfo:e,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:o,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>("error"in e)?jw({error:e.error,command:c,escapedCommand:l,timedOut:s.terminationReason==="timeout",isCanceled:s.terminationReason==="cancel"||s.terminationReason==="gracefulCancel",isGracefullyCanceled:s.terminationReason==="gracefulCancel",isMaxBuffer:e.error instanceof Za,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:i,all:n,ipcOutput:o,options:a,startTime:u,isSync:!1}):sE({command:c,escapedCommand:l,stdio:i,all:n,ipcOutput:o,options:a,startTime:u});var RE=(e,t)=>{let r={__proto__:null,...e},i=Object.fromEntries(Object.entries(t).map(([n,o])=>[n,kct(n,r[n],o)]));return{...r,...i}},kct=(e,t,r)=>{if(Sct.has(e)&&gr(t)&&gr(r))return{...t,...r};return r},Sct=new Set(["env",...C6]);var sg=(e,t,r,i)=>{let n=(s,a,c)=>sg(s,a,r,c),o=(...s)=>$ct({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:i,createNested:n},...s);if(i!==void 0)i(o,n,t);return o},$ct=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:i,createNested:n},o,...s)=>{if(gr(o))return n(e,RE(r,o),i);let{file:a,commandArguments:c,options:l,isSync:u}=xct({mapArguments:e,firstArgument:o,nextArguments:s,deepOptions:t,boundOptions:r});return u?tge(a,c,l):bhe(a,c,l,n)},xct=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:i,boundOptions:n})=>{let o=Kpe(t)?Jpe(t,r):[t,...r],[s,a,c]=w_(...o),l=RE(RE(i,n),c),{options:u=l,isSync:p=!1}=e({options:l});return{file:s,commandArguments:a,options:u,isSync:p}};var khe=(e,t,r)=>{e.sync=t(Pct,r),e.s=e.sync},She=({options:e})=>$he(e),Pct=({options:e})=>({...$he(e),isSync:!0}),$he=(e)=>({options:{...Cct(e),...e}}),Cct=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},xhe={preferLocal:!0};var IE=sg(()=>({})),v9t=sg(()=>({isSync:!0})),w9t=sg(mfe),b9t=sg(She,{},xhe,khe),{sendMessage:k9t,getOneMessage:S9t,getEachMessage:$9t,getCancelSignal:x9t}=cge();Wo();var AE={command:"self update",description:"Update allagents to the latest version",whenToUse:"To upgrade allagents to the latest published version using your package manager",examples:["allagents self update","allagents self update --npm","allagents self update --bun"],expectedOutput:"Shows current version, runs the update, then shows the new version. Exit 1 if the update fails.",options:[{flag:"--npm",type:"boolean",description:"Force update using npm"},{flag:"--bun",type:"boolean",description:"Force update using bun"}],outputSchema:{previousVersion:"string",newVersion:"string",packageManager:"string"}};kg();function _ct(e){if(e.includes(".bun"))return"bun";return"npm"}function BB(){return _ct(process.argv[1]??"")}function Ect(){return Co.version}var Rct=Zw.command({name:"update",description:He(AE),args:{npm:Zw.flag({long:"npm",description:"Force update using npm"}),bun:Zw.flag({long:"bun",description:"Force update using bun"})},handler:async({npm:e,bun:t})=>{try{let r;if(e&&t){if(L())H({success:!1,command:"self update",error:"Cannot specify both --npm and --bun"}),process.exit(1);console.error("Error: Cannot specify both --npm and --bun"),process.exit(1)}if(e)r="npm";else if(t)r="bun";else r=BB();let i=Ect();if(!L())console.log(`Current version: ${i}`),console.log(`Updating allagents using ${r}...
686
686
  `);if((await IE(r,r==="npm"?["install","-g","allagents@latest"]:["add","-g","allagents@latest"],{stdio:L()?"pipe":"inherit"})).exitCode===0){let s;try{if(r==="npm"){let a=await IE("npm",["list","-g","allagents","--depth=0","--json"]);s=JSON.parse(a.stdout).dependencies?.allagents?.version}else s=(await IE("bun",["pm","ls","-g"])).stdout.match(/allagents@([\d.]+)/)?.[1]}catch{}if(L()){H({success:!0,command:"self update",data:{previousVersion:i,newVersion:s??"unknown",packageManager:r}});return}if(s)console.log(`
687
687
  Update complete: ${i} → ${s}`);else console.log(`
688
- Update complete.`)}}catch(r){if(r instanceof Error){if(L()){if(r.message.includes("ENOENT")||r.message.includes("not found")){let i=BB();H({success:!1,command:"self update",error:`${i} not found. Try using --${i==="npm"?"bun":"npm"} flag.`})}else H({success:!1,command:"self update",error:r.message});process.exit(1)}if(r.message.includes("ENOENT")||r.message.includes("not found")){let i=BB();console.error(`Error: ${i} not found. Try using --${i==="npm"?"bun":"npm"} flag.`)}else console.error(`Error: ${r.message}`);process.exit(1)}throw r}}}),Phe=Dn({name:"self",description:"Manage the allagents installation",cmds:{update:Rct}});wa();var Ke=Ut(ts(),1);import{existsSync as Fhe}from"node:fs";import{join as Zct,resolve as Kct}from"node:path";rs();nt();hn();Ir();it();Lr();import{writeFile as Che}from"node:fs/promises";import{existsSync as _he}from"node:fs";import{join as Ict}from"node:path";async function Act(e){if(!Vt(e))return!1;let t=vt(e);if(!t)return!1;return await Pu(t.marketplaceName)===null}async function Ehe(e){let t=[],r=[],i=[];for(let n of e){let o=ae(n);if(await Act(o))t.push(o);else r.push(o),i.push(n)}return{removed:t,kept:r,keptEntries:i}}async function Rhe(e){let t={removed:[],kept:[],keptEntries:[]},r=Ict(e,Z,ee);if(_he(r)&&!wt(e)){let s=await rr(r);if(t=await Ehe(s.plugins),t.removed.length>0)s.plugins=t.keptEntries,await Che(r,ze(s,{lineWidth:-1}),"utf-8")}let i={removed:[],kept:[],keptEntries:[]},n=yt(),o=_he(n)?await Cn(n):null;if(o){if(i=await Ehe(o.plugins),i.removed.length>0)o.plugins=i.keptEntries,await Che(n,ze(o,{lineWidth:-1}),"utf-8")}return{project:t,user:i}}pp();ki();lC();Ir();g2();nt();Lr();import{spawn as Oct}from"node:child_process";import{once as Dct}from"node:events";import{join as Tct,resolve as Nct}from"node:path";async function Mct(e,t,r){let i=Oct(e,{cwd:t,shell:!0,stdio:r?["inherit",process.stderr,process.stderr]:"inherit"}),[n,o]=await Dct(i,"close");return{exitCode:n,signal:o}}async function Ihe(e,t={}){let r=Nct(e),i=await tr(Tct(r,Z,ee)),n=[],o=t.jsonMode??!1,s=o?process.stderr:process.stdout;for(let a of i.setup??[]){let c=typeof a==="string"?a:a.run,l=jct(a);if(l!==null){s.write(`- Skipped: ${c} (${l})
688
+ Update complete.`)}}catch(r){if(r instanceof Error){if(L()){if(r.message.includes("ENOENT")||r.message.includes("not found")){let i=BB();H({success:!1,command:"self update",error:`${i} not found. Try using --${i==="npm"?"bun":"npm"} flag.`})}else H({success:!1,command:"self update",error:r.message});process.exit(1)}if(r.message.includes("ENOENT")||r.message.includes("not found")){let i=BB();console.error(`Error: ${i} not found. Try using --${i==="npm"?"bun":"npm"} flag.`)}else console.error(`Error: ${r.message}`);process.exit(1)}throw r}}}),Phe=Dn({name:"self",description:"Manage the allagents installation",cmds:{update:Rct}});wa();var Ve=Ut(ts(),1);import{existsSync as Fhe}from"node:fs";import{join as Zct,resolve as Kct}from"node:path";rs();nt();hn();Ir();it();Lr();import{writeFile as Che}from"node:fs/promises";import{existsSync as _he}from"node:fs";import{join as Ict}from"node:path";async function Act(e){if(!Vt(e))return!1;let t=vt(e);if(!t)return!1;return await Pu(t.marketplaceName)===null}async function Ehe(e){let t=[],r=[],i=[];for(let n of e){let o=ae(n);if(await Act(o))t.push(o);else r.push(o),i.push(n)}return{removed:t,kept:r,keptEntries:i}}async function Rhe(e){let t={removed:[],kept:[],keptEntries:[]},r=Ict(e,Z,ee);if(_he(r)&&!wt(e)){let s=await rr(r);if(t=await Ehe(s.plugins),t.removed.length>0)s.plugins=t.keptEntries,await Che(r,ze(s,{lineWidth:-1}),"utf-8")}let i={removed:[],kept:[],keptEntries:[]},n=yt(),o=_he(n)?await Cn(n):null;if(o){if(i=await Ehe(o.plugins),i.removed.length>0)o.plugins=i.keptEntries,await Che(n,ze(o,{lineWidth:-1}),"utf-8")}return{project:t,user:i}}pp();ki();lC();Ir();g2();nt();Lr();import{spawn as Oct}from"node:child_process";import{once as Dct}from"node:events";import{join as Tct,resolve as Nct}from"node:path";async function Mct(e,t,r){let i=Oct(e,{cwd:t,shell:!0,stdio:r?["inherit",process.stderr,process.stderr]:"inherit"}),[n,o]=await Dct(i,"close");return{exitCode:n,signal:o}}async function Ihe(e,t={}){let r=Nct(e),i=await tr(Tct(r,Z,ee)),n=[],o=t.jsonMode??!1,s=o?process.stderr:process.stdout;for(let a of i.setup??[]){let c=typeof a==="string"?a:a.run,l=jct(a);if(l!==null){s.write(`- Skipped: ${c} (${l})
689
689
  `),n.push({command:c,status:"skipped",exitCode:null,signal:null,reason:l});continue}s.write(`$ ${c}
690
- `);let u=await Mct(c,r,o),p=u.exitCode===0&&u.signal===null?"succeeded":"failed";if(n.push({command:c,status:p,...u,reason:null}),p==="failed")break}return{commands:n}}function jct(e){if(typeof e==="string")return null;if(e.platforms&&!e.platforms.includes(process.platform))return`platform ${process.platform} does not match ${e.platforms.join(", ")}`;if(e.architectures&&!e.architectures.includes(process.arch))return`architecture ${process.arch} does not match ${e.architectures.join(", ")}`;return null}ZB();it();or();cl();Wo();JB();var FE={command:"workspace repo add",description:"Add a repository to workspace config (auto-detects source from git remote)",whenToUse:"To register a repository in your multi-repo workspace without hand-editing YAML",examples:["allagents workspace repo add ../Glow",'allagents workspace repo add ../Glow --description "Main Glow application"'],expectedOutput:"Confirms the repository was added with its path and detected remote info. Exit 1 if path already exists.",positionals:[{name:"path",type:"string",required:!0,description:"Relative path to the repository"}],options:[{flag:"--description",short:"-d",type:"string",description:"Human-readable description of the repository"}],outputSchema:{path:"string",source:"string | null",repo:"string | null",description:"string | null"}},zE={command:"workspace repo remove",description:"Remove a repository from workspace config",whenToUse:"To remove a repository from your workspace.yaml",examples:["allagents workspace repo remove ../Glow"],expectedOutput:"Confirms the repository was removed. Exit 1 if not found.",positionals:[{name:"path",type:"string",required:!0,description:"Path of the repository to remove"}],outputSchema:{path:"string"}},UE={command:"workspace repo list",description:"List repositories in workspace config",whenToUse:"To see which repositories are configured in the workspace",examples:["allagents workspace repo list"],expectedOutput:"Lists each repository with path, source, repo, and description.",outputSchema:{repositories:[{path:"string",source:"string | null",repo:"string | null",description:"string | null"}],total:"number"}};var Kw={command:"init",description:"Create new workspace and sync plugins",whenToUse:"When starting a new project or adding allagents to an existing repo for the first time",examples:["allagents init","allagents init ./my-project","allagents init --from ../template-workspace/.allagents/workspace.yaml","allagents init --from myorg/templates","allagents init --client claude,copilot,cursor"],expectedOutput:"Creates .allagents/workspace.yaml and syncs plugins. Shows sync results per plugin. Exit 0 on success, exit 1 on failure.",positionals:[{name:"path",type:"string",required:!1,description:"Target directory for the workspace (defaults to current directory)"}],options:[{flag:"--from",type:"string",description:"Use a template path or discover workspace templates in a directory or GitHub repo"},{flag:"--client",type:"string",description:"Comma-separated list of clients (e.g., claude,copilot,cursor)"}],outputSchema:{path:"string",syncResult:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}]}}},LE={command:"workspace setup",description:"Run workspace setup commands for this platform",whenToUse:"After reviewing the setup commands in workspace.yaml and explicitly deciding to run commands matching this platform and architecture",examples:["allagents workspace setup"],expectedOutput:"Shows matching and skipped setup commands in declaration order. Exit 0 when every matching command succeeds, exit 1 on the first nonzero exit or signal.",outputSchema:{commands:[{command:"string",status:"succeeded | failed | skipped",exitCode:"number | null",signal:"string | null",reason:"string | null"}]}},xp={command:"update",description:"Reconcile ordinary resources and installed global profiles",whenToUse:"After modifying workspace.yaml, pulling shared config changes, or changing an installed global profile declaration",examples:["allagents update","allagents update --dry-run","allagents update --offline","allagents update --verbose","allagents update --profile work --profile review","allagents workspace update --profile work"],expectedOutput:"Attempts user workspace, installed declared profiles, and project workspace in order without stopping later passes after a failure. With --profile, validates and updates only selected profiles that are both installed and declared. Exit 1 after all applicable passes if any pass fails.",options:[{flag:"--offline",type:"boolean",description:"Use cached plugins without fetching latest from remote"},{flag:"--dry-run",short:"-n",type:"boolean",description:"Simulate sync without making changes"},{flag:"--verbose",short:"-v",type:"boolean",description:"Show informational sync messages"},{flag:"--profile",type:"string",description:"Update only this installed profile (repeatable)"}],outputSchema:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}],nativeResources:{success:"boolean",effects:[{client:"string",scope:"user | project",nativeScope:"string",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"string",phase:"string",changed:"boolean",error:"string | undefined"}]},profiles:[{profile:"string",operation:"update",status:"installed | removed | partial | failed",steps:[{client:"string",kind:"root | file | settings | mcp | native | marketplace | launcher",identity:"string",status:"created | updated | removed | unchanged | referenced | retained | failed",error:"string | undefined"}],warnings:["string"],error:"string | undefined"}]}},BE={command:"workspace prune",description:"Remove orphaned plugin references",whenToUse:"After removing a marketplace to clean up stale plugin references in workspace configs",examples:["allagents workspace prune"],expectedOutput:"Lists removed orphaned plugins from both project and user scopes. Exit 0 on success, exit 1 on error.",outputSchema:{project:{removed:["string"],kept:["string"]},user:{removed:["string"],kept:["string"]}}},Jw={command:"status",description:"Show declared, managed, and live plugin status",whenToUse:"To compare workspace declarations and AllAgents ownership with exact live Pi/OMP and file-resource state",examples:["allagents status","allagents workspace status"],expectedOutput:"Lists configured files plus native client/scope identities as installed, configured-missing, disabled, unusable, or unknown. Native inspection failures exit 1 without hiding other scope outcomes.",outputSchema:{plugins:[{source:"string",type:"string",kind:"string",available:"boolean"}],clients:["string"],nativeResources:[{client:"string",scope:"user | project",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"installed | configured-missing | disabled | unusable | unknown",phase:"inspection",changed:"boolean",declared:"boolean",ownership:"managed | referenced | uncertain | none",transition:"string | undefined",error:"string | undefined"}]}};function Jct(e){let t=[];for(let r of e.split(",").map((i)=>i.trim()).filter(Boolean)){let i=vx.safeParse(r);if(!i.success){let n=r.indexOf(":");if(n===-1)throw Error(`Invalid client(s): ${r}
690
+ `);let u=await Mct(c,r,o),p=u.exitCode===0&&u.signal===null?"succeeded":"failed";if(n.push({command:c,status:p,...u,reason:null}),p==="failed")break}return{commands:n}}function jct(e){if(typeof e==="string")return null;if(e.platforms&&!e.platforms.includes(process.platform))return`platform ${process.platform} does not match ${e.platforms.join(", ")}`;if(e.architectures&&!e.architectures.includes(process.arch))return`architecture ${process.arch} does not match ${e.architectures.join(", ")}`;return null}ZB();it();or();cl();Wo();JB();var FE={command:"workspace repo add",description:"Add a repository to workspace config (auto-detects source from git remote)",whenToUse:"To register a repository in your multi-repo workspace without hand-editing YAML",examples:["allagents workspace repo add ../Glow",'allagents workspace repo add ../Glow --description "Main Glow application"'],expectedOutput:"Confirms the repository was added with its path and detected remote info. Exit 1 if path already exists.",positionals:[{name:"path",type:"string",required:!0,description:"Relative path to the repository"}],options:[{flag:"--description",short:"-d",type:"string",description:"Human-readable description of the repository"}],outputSchema:{path:"string",source:"string | null",repo:"string | null",description:"string | null"}},zE={command:"workspace repo remove",description:"Remove a repository from workspace config",whenToUse:"To remove a repository from your workspace.yaml",examples:["allagents workspace repo remove ../Glow"],expectedOutput:"Confirms the repository was removed. Exit 1 if not found.",positionals:[{name:"path",type:"string",required:!0,description:"Path of the repository to remove"}],outputSchema:{path:"string"}},UE={command:"workspace repo list",description:"List repositories in workspace config",whenToUse:"To see which repositories are configured in the workspace",examples:["allagents workspace repo list"],expectedOutput:"Lists each repository with path, source, repo, and description.",outputSchema:{repositories:[{path:"string",source:"string | null",repo:"string | null",description:"string | null"}],total:"number"}};var Kw={command:"init",description:"Create new workspace and sync plugins",whenToUse:"When starting a new project or adding allagents to an existing repo for the first time",examples:["allagents init","allagents init ./my-project","allagents init --from ../template-workspace/.allagents/workspace.yaml","allagents init --from myorg/templates","allagents init --client claude,copilot,cursor"],expectedOutput:"Creates .allagents/workspace.yaml and syncs plugins. Shows sync results per plugin. Exit 0 on success, exit 1 on failure.",positionals:[{name:"path",type:"string",required:!1,description:"Target directory for the workspace (defaults to current directory)"}],options:[{flag:"--from",type:"string",description:"Use a template path or discover workspace templates in a directory or GitHub repo"},{flag:"--client",type:"string",description:"Comma-separated list of clients (e.g., claude,copilot,cursor)"}],outputSchema:{path:"string",syncResult:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}]}}},LE={command:"workspace setup",description:"Run workspace setup commands for this platform",whenToUse:"After reviewing the setup commands in workspace.yaml and explicitly deciding to run commands matching this platform and architecture",examples:["allagents workspace setup"],expectedOutput:"Shows matching and skipped setup commands in declaration order. Exit 0 when every matching command succeeds, exit 1 on the first nonzero exit or signal.",outputSchema:{commands:[{command:"string",status:"succeeded | failed | skipped",exitCode:"number | null",signal:"string | null",reason:"string | null"}]}},xp={command:"update",description:"Reconcile ordinary resources and installed global profiles",whenToUse:"After modifying workspace.yaml, pulling shared config changes, or changing an installed global profile declaration",examples:["allagents update","allagents update --dry-run","allagents update --offline","allagents update --verbose","allagents update --scope project","allagents workspace update --scope user","allagents update --profile work --profile review","allagents workspace update --profile work"],expectedOutput:"By default attempts user workspace, installed declared profiles, and project workspace in order without stopping later passes after a failure. --scope project selects only the current project; --scope user selects user workspace and installed profiles. With --profile, validates and updates only selected profiles that are both installed and declared; cannot combine with --scope. Exit 1 after all applicable passes if any pass fails.",options:[{flag:"--offline",type:"boolean",description:"Use cached plugins without fetching latest from remote"},{flag:"--dry-run",short:"-n",type:"boolean",description:"Simulate sync without making changes"},{flag:"--verbose",short:"-v",type:"boolean",description:"Show informational sync messages"},{flag:"--profile",type:"string",description:"Update only this installed profile (repeatable)"},{flag:"--scope",type:"string",description:"Reconciliation targets: project, user, or all (default); cannot combine with --profile"}],outputSchema:{copied:"number",generated:"number",failed:"number",skipped:"number",plugins:[{plugin:"string",success:"boolean",copied:"number",generated:"number",failed:"number"}],nativeResources:{success:"boolean",effects:[{client:"string",scope:"user | project",nativeScope:"string",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"string",phase:"string",changed:"boolean",error:"string | undefined"}]},profiles:[{profile:"string",operation:"update",status:"installed | removed | partial | failed",steps:[{client:"string",kind:"root | file | settings | mcp | native | marketplace | launcher",identity:"string",status:"created | updated | removed | unchanged | referenced | retained | failed",error:"string | undefined"}],warnings:["string"],error:"string | undefined"}]}},BE={command:"workspace prune",description:"Remove orphaned plugin references",whenToUse:"After removing a marketplace to clean up stale plugin references in workspace configs",examples:["allagents workspace prune"],expectedOutput:"Lists removed orphaned plugins from both project and user scopes. Exit 0 on success, exit 1 on error.",outputSchema:{project:{removed:["string"],kept:["string"]},user:{removed:["string"],kept:["string"]}}},Jw={command:"status",description:"Show declared, managed, and live plugin status",whenToUse:"To compare workspace declarations and AllAgents ownership with exact live Pi/OMP and file-resource state",examples:["allagents status","allagents workspace status"],expectedOutput:"Lists configured files plus native client/scope identities as installed, configured-missing, disabled, unusable, or unknown. Native inspection failures exit 1 without hiding other scope outcomes.",outputSchema:{plugins:[{source:"string",type:"string",kind:"string",available:"boolean"}],clients:["string"],nativeResources:[{client:"string",scope:"user | project",kind:"plugin | package",requestedIdentity:"string",resolvedIdentity:"string",root:"string",action:"installed | configured-missing | disabled | unusable | unknown",phase:"inspection",changed:"boolean",declared:"boolean",ownership:"managed | referenced | uncertain | none",transition:"string | undefined",error:"string | undefined"}]}};function Jct(e){let t=[];for(let r of e.split(",").map((i)=>i.trim()).filter(Boolean)){let i=vx.safeParse(r);if(!i.success){let n=r.indexOf(":");if(n===-1)throw Error(`Invalid client(s): ${r}
691
691
  Valid clients: ${ds.join(", ")}`);let o=r.slice(0,n),s=r.slice(n+1);if(!Xr.safeParse(o).success)throw Error(`Invalid client(s): ${o}
692
- Valid clients: ${ds.join(", ")}`);throw Error(`Invalid install mode '${s}' for client '${o}'. Valid modes: ${gu.options.join(", ")}`)}t.push(i.data)}return _y(t)}var XB=Ke.command({name:"init",description:We(Kw),args:{path:Ke.positional({type:Ke.optional(Ke.string),displayName:"path"}),from:Ke.option({type:Ke.optional(Ke.string),long:"from",description:"Use a template path or discover workspace templates in a directory or GitHub repo"}),client:Ke.option({type:Ke.optional(Ke.string),long:"client",short:"c",description:"Comma-separated clients with optional :mode (e.g., claude:native,copilot,cursor)"}),force:Ke.flag({long:"force",short:"f",description:"Overwrite existing workspace.yaml"})},handler:async({path:e,from:t,client:r,force:i})=>{try{let n=e??".",o=r?Jct(r):void 0,s=t?await jE(t):void 0;if(s===null)return;if(!o&&!t){let{promptForClients:c}=await Promise.resolve().then(() => (Mm(),Mue)),l=await c();if(l===null){if(L())H({success:!1,command:"workspace init",error:"Cancelled"});return}o=l}let a=await ME(n,{...s?{from:s.source}:{},...s?.prefetchedGitHub&&{prefetchedGitHub:s.prefetchedGitHub},...o?{clients:o}:{},...i?{force:i}:{}});if(L()){let c=a.syncResult?Am(a.syncResult):null;H({success:!0,command:"workspace init",data:{path:n,syncResult:c}});return}if(a.syncResult){let c=a.syncResult;if(c.pluginResults.length>0){console.log(`
693
- Plugin sync results:`);for(let l of c.pluginResults)if(console.log(` ${sp(l)}`),l.error)console.log(` Error: ${l.error}`)}console.log("");for(let l of Rm(c))console.log(l)}}catch(n){if(n instanceof Error){if(L())H({success:!1,command:"workspace init",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),Yct=Ke.command({name:"setup",description:We(LE),args:{},handler:async()=>{try{let e=await Ihe(process.cwd(),{jsonMode:L()}),t=e.commands.find(({status:r})=>r==="failed");if(t){let r=t.signal!==null?`Setup command terminated by signal ${t.signal}: ${t.command}`:`Setup command failed with exit code ${t.exitCode}: ${t.command}`;if(L())H({success:!1,command:"workspace setup",data:e,error:r});else console.error(`Error: ${r}`);process.exit(1)}if(L()){H({success:!0,command:"workspace setup",data:e});return}if(e.commands.length===0)console.log("No setup commands configured.");else{let r=e.commands.filter(({status:n})=>n!=="skipped").length,i=e.commands.length-r;console.log(`Setup complete. ${r} command(s) ran; ${i} skipped.`)}}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace setup",error:e.message});else console.error(`Error: ${e.message}`);process.exit(1)}throw e}}}),Xct={userConfigExists:()=>Fhe(yt()),projectConfigExists:(e)=>!wt(e)&&Fhe(Zct(e,".allagents","workspace.yaml")),ensureUserWorkspace:Xn,resetFetchCache:vf,syncUserWorkspace:kt,syncWorkspace:gt,updateInstalledProfiles:Yv,exit:(e)=>{process.exit(e)}};function YB(e){return e instanceof Error?e.message:String(e)}function Qct(e,t){if(t.dryRun&&e.purgedPaths&&e.purgedPaths.length>0){console.log("Would purge managed directories:");for(let i of e.purgedPaths){console.log(` ${i.client}:`);for(let n of i.paths)console.log(` - ${n}`)}console.log("")}if(e.managedRepoResults&&e.managedRepoResults.length>0){for(let i of Tle(e.managedRepoResults))console.log(i);console.log("")}for(let i of wC(e))console.log(i);console.log("");for(let i of e.pluginResults){if(console.log(sp(i)),i.error)console.log(` Error: ${i.error}`);for(let s of Em(i.copyResults))console.log(s);let n=i.copyResults.filter((s)=>s.action==="generated").length,o=i.copyResults.filter((s)=>s.action==="failed").length;if(n>0)console.log(` Generated: ${n} files`);if(o>0){console.log(` Failed: ${o} files`);for(let s of i.copyResults.filter((a)=>a.action==="failed"))console.log(` - ${s.destination}: ${s.error}`)}}if(e.warnings&&e.warnings.length>0){console.log(`
692
+ Valid clients: ${ds.join(", ")}`);throw Error(`Invalid install mode '${s}' for client '${o}'. Valid modes: ${gu.options.join(", ")}`)}t.push(i.data)}return _y(t)}var XB=Ve.command({name:"init",description:He(Kw),args:{path:Ve.positional({type:Ve.optional(Ve.string),displayName:"path"}),from:Ve.option({type:Ve.optional(Ve.string),long:"from",description:"Use a template path or discover workspace templates in a directory or GitHub repo"}),client:Ve.option({type:Ve.optional(Ve.string),long:"client",short:"c",description:"Comma-separated clients with optional :mode (e.g., claude:native,copilot,cursor)"}),force:Ve.flag({long:"force",short:"f",description:"Overwrite existing workspace.yaml"})},handler:async({path:e,from:t,client:r,force:i})=>{try{let n=e??".",o=r?Jct(r):void 0,s=t?await jE(t):void 0;if(s===null)return;if(!o&&!t){let{promptForClients:c}=await Promise.resolve().then(() => (Mm(),Mue)),l=await c();if(l===null){if(L())H({success:!1,command:"workspace init",error:"Cancelled"});return}o=l}let a=await ME(n,{...s?{from:s.source}:{},...s?.prefetchedGitHub&&{prefetchedGitHub:s.prefetchedGitHub},...o?{clients:o}:{},...i?{force:i}:{}});if(L()){let c=a.syncResult?Am(a.syncResult):null;H({success:!0,command:"workspace init",data:{path:n,syncResult:c}});return}if(a.syncResult){let c=a.syncResult;if(c.pluginResults.length>0){console.log(`
693
+ Plugin sync results:`);for(let l of c.pluginResults)if(console.log(` ${sp(l)}`),l.error)console.log(` Error: ${l.error}`)}console.log("");for(let l of Rm(c))console.log(l)}}catch(n){if(n instanceof Error){if(L())H({success:!1,command:"workspace init",error:n.message}),process.exit(1);console.error(`Error: ${n.message}`),process.exit(1)}throw n}}}),Yct=Ve.command({name:"setup",description:He(LE),args:{},handler:async()=>{try{let e=await Ihe(process.cwd(),{jsonMode:L()}),t=e.commands.find(({status:r})=>r==="failed");if(t){let r=t.signal!==null?`Setup command terminated by signal ${t.signal}: ${t.command}`:`Setup command failed with exit code ${t.exitCode}: ${t.command}`;if(L())H({success:!1,command:"workspace setup",data:e,error:r});else console.error(`Error: ${r}`);process.exit(1)}if(L()){H({success:!0,command:"workspace setup",data:e});return}if(e.commands.length===0)console.log("No setup commands configured.");else{let r=e.commands.filter(({status:n})=>n!=="skipped").length,i=e.commands.length-r;console.log(`Setup complete. ${r} command(s) ran; ${i} skipped.`)}}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace setup",error:e.message});else console.error(`Error: ${e.message}`);process.exit(1)}throw e}}}),Xct={userConfigExists:()=>Fhe(yt()),projectConfigExists:(e)=>!wt(e)&&Fhe(Zct(e,".allagents","workspace.yaml")),ensureUserWorkspace:Xn,resetFetchCache:vf,syncUserWorkspace:kt,syncWorkspace:gt,updateInstalledProfiles:Yv,exit:(e)=>{process.exit(e)}};function YB(e){return e instanceof Error?e.message:String(e)}function Qct(e,t){if(t.dryRun&&e.purgedPaths&&e.purgedPaths.length>0){console.log("Would purge managed directories:");for(let i of e.purgedPaths){console.log(` ${i.client}:`);for(let n of i.paths)console.log(` - ${n}`)}console.log("")}if(e.managedRepoResults&&e.managedRepoResults.length>0){for(let i of Tle(e.managedRepoResults))console.log(i);console.log("")}for(let i of wC(e))console.log(i);console.log("");for(let i of e.pluginResults){if(console.log(sp(i)),i.error)console.log(` Error: ${i.error}`);for(let s of Em(i.copyResults))console.log(s);let n=i.copyResults.filter((s)=>s.action==="generated").length,o=i.copyResults.filter((s)=>s.action==="failed").length;if(n>0)console.log(` Generated: ${n} files`);if(o>0){console.log(` Failed: ${o} files`);for(let s of i.copyResults.filter((a)=>a.action==="failed"))console.log(` - ${s.destination}: ${s.error}`)}}if(e.warnings&&e.warnings.length>0){console.log(`
694
694
  Warnings:`);for(let i of e.warnings)console.log(` ⚠ ${i}`)}if(t.verbose&&e.messages&&e.messages.length>0){console.log("");for(let i of e.messages)console.log(` ${i}`)}if(e.mcpResults)for(let[i,n]of Object.entries(e.mcpResults)){if(!n)continue;let o=La(n,i);if(o.length>0){console.log("");for(let s of o)console.log(s)}}if(e.nativeResult){let i=Im(e.nativeResult);if(i.length>0){console.log(`
695
- native:`);for(let n of i)console.log(n)}}let r=Rm(e);if(r.length>0){console.log("");for(let i of r)console.log(i)}if(process.env.ALLAGENTS_DEBUG?.includes("timing")&&e.timing){console.error("");let i=e.timing.totalMs;console.error(`[debug] Sync timing (total: ${zhe(i)})`),console.error(`[debug] ${"─".repeat(56)}`);for(let n of e.timing.steps){let o=i>0?(n.durationMs/i*100).toFixed(1):"0.0",s=n.detail?` [${n.detail}]`:"",a=n.label.padEnd(40),c=zhe(n.durationMs).padStart(8);console.error(`[debug] ${a} ${c} ${o.padStart(5)}%${s}`)}console.error(`[debug] ${"─".repeat(56)}`)}}async function elt(e,t=Xct){try{if(!L()&&e.dryRun)console.log(`Dry run mode - no changes will be made
696
- `);let r=[...new Set(e.profile)],i=r.length>0,n=!1,o=!1;if(!i){if(n=t.userConfigExists(),o=t.projectConfigExists(process.cwd()),!n&&!o){if(await t.ensureUserWorkspace(),L())H({success:!0,command:"workspace update",data:{message:"No plugins configured",profiles:[]}});else console.log("No plugins configured. Run `allagents plugin install <plugin>` to get started.");return}}let s=null,a=[],c=[];if(await t.resetFetchCache(),n)try{s=await t.syncUserWorkspace({offline:e.offline,dryRun:e.dryRun,force:e.force})}catch(f){c.push(`User workspace: ${YB(f)}`)}if(i||n)try{a=await t.updateInstalledProfiles(i?r:void 0,{offline:e.offline,dryRun:e.dryRun})}catch(f){c.push(`Profiles: ${YB(f)}`)}if(o)try{let f=await t.syncWorkspace(process.cwd(),{offline:e.offline,dryRun:e.dryRun,skipManaged:e.noManaged});s=s?Fv(s,f):f}catch(f){c.push(`Project workspace: ${YB(f)}`)}let l=s===null||s.success&&s.totalFailed===0,u=[...c,...s?.error?[s.error]:[]],p=c.length===0&&l&&a.every((f)=>f.success);if(L()){if(H({success:p,command:"workspace update",data:{...s?Am(s):{},profiles:a.map(op)},...!p&&{error:u.length>0?u.join("; "):"Sync completed with failures"}}),!p)t.exit(1);return}if(s)Qct(s,e);let d=s!==null;for(let f of a){if(d)console.log("");for(let m of _m(f))console.log(m);d=!0}if(!p&&u.length>0){if(s||a.length>0)console.error("");for(let f of u)console.error(`Error: ${f}`)}if(!p)t.exit(1)}catch(r){if(r instanceof Error){if(L()){H({success:!1,command:"workspace update",error:r.message}),t.exit(1);return}console.error(`Error: ${r.message}`),t.exit(1);return}throw r}}var QB=Ke.command({name:"update",aliases:["sync"],description:We(xp),args:{offline:Ke.flag({long:"offline",description:"Use cached plugins without fetching latest from remote"}),dryRun:Ke.flag({long:"dry-run",short:"n",description:"Simulate sync without making changes"}),force:Ke.flag({long:"force",short:"f",description:"Overwrite existing MCP server entries that differ from plugin config"}),verbose:Ke.flag({long:"verbose",short:"v",description:"Show informational sync messages"}),noManaged:Ke.flag({long:"no-managed",description:"Skip managed repository clone/pull operations"}),profile:Ke.multioption({type:Ke.array(Ke.string),long:"profile",description:"Update only this installed profile (repeatable)"})},handler:elt});function zhe(e){if(e<1000)return`${Math.round(e)}ms`;return`${(e/1000).toFixed(2)}s`}function Uhe(e){let t=e.available?"✓":"✗",r=[e.kind];if(e.type==="marketplace"){if(!e.available)r.push("not synced")}else if(e.type==="github")r.push(e.available?"cached":"not cached");else r.push(e.type);return`${t} ${En(e.source)} (${r.join(", ")})`}var e9=Ke.command({name:"status",description:We(Jw),args:{},handler:async()=>{try{let e=await go();if(L()){if(H({success:e.success,command:"workspace status",data:{plugins:e.plugins,userPlugins:e.userPlugins??[],clients:e.clients,nativeResources:e.nativeResources},...!e.success&&{error:e.error??"Native inspection failed"}}),!e.success)process.exit(1);return}if(console.log(`Project Plugins (${e.plugins.length}):`),e.plugins.length===0)console.log(" No plugins configured");else for(let t of e.plugins)console.log(` ${Uhe(t)}`);if(e.userPlugins)if(console.log(`
695
+ native:`);for(let n of i)console.log(n)}}let r=Rm(e);if(r.length>0){console.log("");for(let i of r)console.log(i)}if(process.env.ALLAGENTS_DEBUG?.includes("timing")&&e.timing){console.error("");let i=e.timing.totalMs;console.error(`[debug] Sync timing (total: ${zhe(i)})`),console.error(`[debug] ${"─".repeat(56)}`);for(let n of e.timing.steps){let o=i>0?(n.durationMs/i*100).toFixed(1):"0.0",s=n.detail?` [${n.detail}]`:"",a=n.label.padEnd(40),c=zhe(n.durationMs).padStart(8);console.error(`[debug] ${a} ${c} ${o.padStart(5)}%${s}`)}console.error(`[debug] ${"─".repeat(56)}`)}}async function elt(e,t=Xct){try{if(e.scope!==void 0&&!["project","user","all"].includes(e.scope))throw Error(`Invalid scope '${e.scope}'. Expected project, user, or all.`);let r=[...new Set(e.profile)],i=r.length>0;if(i&&e.scope!==void 0)throw Error("--scope and --profile cannot be combined.");if(!L()&&e.dryRun)console.log(`Dry run mode - no changes will be made
696
+ `);let n=!1,o=!1;if(!i){if(n=e.scope!=="project"&&t.userConfigExists(),o=e.scope!=="user"&&t.projectConfigExists(process.cwd()),e.scope==="project"&&!o)throw Error("No project workspace configured in the current directory. Run `allagents workspace init` to create one.");if(!n&&!o){if(await t.ensureUserWorkspace(),L())H({success:!0,command:"workspace update",data:{message:"No plugins configured",profiles:[]}});else console.log("No plugins configured. Run `allagents plugin install <plugin>` to get started.");return}}let s=null,a=[],c=[];if(await t.resetFetchCache(),n)try{s=await t.syncUserWorkspace({offline:e.offline,dryRun:e.dryRun,force:e.force})}catch(f){c.push(`User workspace: ${YB(f)}`)}if(i||n)try{a=await t.updateInstalledProfiles(i?r:void 0,{offline:e.offline,dryRun:e.dryRun})}catch(f){c.push(`Profiles: ${YB(f)}`)}if(o)try{let f=await t.syncWorkspace(process.cwd(),{offline:e.offline,dryRun:e.dryRun,skipManaged:e.noManaged});s=s?Fv(s,f):f}catch(f){c.push(`Project workspace: ${YB(f)}`)}let l=s===null||s.success&&s.totalFailed===0,u=[...c,...s?.error?[s.error]:[]],p=c.length===0&&l&&a.every((f)=>f.success);if(L()){if(H({success:p,command:"workspace update",data:{...s?Am(s):{},profiles:a.map(op)},...!p&&{error:u.length>0?u.join("; "):"Sync completed with failures"}}),!p)t.exit(1);return}if(s)Qct(s,e);let d=s!==null;for(let f of a){if(d)console.log("");for(let m of _m(f))console.log(m);d=!0}if(!p&&u.length>0){if(s||a.length>0)console.error("");for(let f of u)console.error(`Error: ${f}`)}if(!p)t.exit(1)}catch(r){if(r instanceof Error){if(L()){H({success:!1,command:"workspace update",error:r.message}),t.exit(1);return}console.error(`Error: ${r.message}`),t.exit(1);return}throw r}}var QB=Ve.command({name:"update",aliases:["sync"],description:He(xp),args:{offline:Ve.flag({long:"offline",description:"Use cached plugins without fetching latest from remote"}),dryRun:Ve.flag({long:"dry-run",short:"n",description:"Simulate sync without making changes"}),force:Ve.flag({long:"force",short:"f",description:"Overwrite existing MCP server entries that differ from plugin config"}),verbose:Ve.flag({long:"verbose",short:"v",description:"Show informational sync messages"}),noManaged:Ve.flag({long:"no-managed",description:"Skip managed repository clone/pull operations"}),scope:Ve.option({type:Ve.optional(Ve.string),long:"scope",description:"Reconcile project, user (including installed profiles), or all (default); cannot combine with --profile"}),profile:Ve.multioption({type:Ve.array(Ve.string),long:"profile",description:"Update only this installed profile (repeatable)"})},handler:elt});function zhe(e){if(e<1000)return`${Math.round(e)}ms`;return`${(e/1000).toFixed(2)}s`}function Uhe(e){let t=e.available?"✓":"✗",r=[e.kind];if(e.type==="marketplace"){if(!e.available)r.push("not synced")}else if(e.type==="github")r.push(e.available?"cached":"not cached");else r.push(e.type);return`${t} ${En(e.source)} (${r.join(", ")})`}var e9=Ve.command({name:"status",description:He(Jw),args:{},handler:async()=>{try{let e=await go();if(L()){if(H({success:e.success,command:"workspace status",data:{plugins:e.plugins,userPlugins:e.userPlugins??[],clients:e.clients,nativeResources:e.nativeResources},...!e.success&&{error:e.error??"Native inspection failed"}}),!e.success)process.exit(1);return}if(console.log(`Project Plugins (${e.plugins.length}):`),e.plugins.length===0)console.log(" No plugins configured");else for(let t of e.plugins)console.log(` ${Uhe(t)}`);if(e.userPlugins)if(console.log(`
697
697
  User Plugins (${e.userPlugins.length}):`),e.userPlugins.length===0)console.log(" No user plugins configured");else for(let t of e.userPlugins)console.log(` ${Uhe(t)}`);if(e.nativeResources.length>0){console.log(`
698
698
  Native Resources (${e.nativeResources.length}):`);for(let t of e.nativeResources)console.log(`${Qv(t)} declared=${String(t.declared)} ownership=${t.ownership}${t.transition?` transition=${t.transition}`:""}`)}if(console.log(`
699
- Clients (${e.clients.length}):`),e.clients.length===0)console.log(" No clients configured");else console.log(` ${e.clients.join(", ")}`);if(!e.success)console.error(`Error: ${e.error??"Native inspection failed"}`),process.exit(1)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace status",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),tlt=Ke.command({name:"prune",description:We(BE),args:{},handler:async()=>{try{let e=await Rhe(process.cwd());if(L()){H({success:!0,command:"workspace prune",data:e});return}let t=e.project.removed.length+e.user.removed.length;if(t===0){console.log("No orphaned plugins found.");return}if(e.project.removed.length>0){console.log(`Project plugins pruned (${e.project.removed.length}):`);for(let r of e.project.removed)console.log(` - ${r}`)}if(e.user.removed.length>0){console.log(`User plugins pruned (${e.user.removed.length}):`);for(let r of e.user.removed)console.log(` - ${r}`)}console.log(`
700
- ✓ Removed ${t} orphaned plugin(s)`)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace prune",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),rlt=Ke.command({name:"add",description:We(FE),args:{path:Ke.positional({type:Ke.string,displayName:"path"}),description:Ke.option({type:Ke.optional(Ke.string),long:"description",short:"d",description:"Repository description"})},handler:async({path:e,description:t})=>{try{let r=Kct(process.cwd(),e),i=await Kse(r),n=await Jse(e,{source:i?.source,repo:i?.repo,description:t});if(!n.success){if(L())H({success:!1,command:"workspace repo add",error:n.error??"Unknown error"}),process.exit(1);console.error(`Error: ${n.error}`),process.exit(1)}if(await jv(),L()){H({success:!0,command:"workspace repo add",data:{path:e,source:i?.source??null,repo:i?.repo??null,description:t??null}});return}if(console.log(`✓ Added repository: ${e}`),i)console.log(` Source: ${i.source} (${i.repo})`);if(t)console.log(` Description: ${t}`)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"workspace repo add",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),nlt=Ke.command({name:"remove",description:We(zE),args:{path:Ke.positional({type:Ke.string,displayName:"path"})},handler:async({path:e})=>{try{let t=await Yse(e);if(!t.success){if(L())H({success:!1,command:"workspace repo remove",error:t.error??"Unknown error"}),process.exit(1);console.error(`Error: ${t.error}`),process.exit(1)}if(await jv(),L()){H({success:!0,command:"workspace repo remove",data:{path:e}});return}console.log(`✓ Removed repository: ${e}`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"workspace repo remove",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),ilt=Ke.command({name:"list",description:We(UE),args:{},handler:async()=>{try{let e=await Xse();if(L()){H({success:!0,command:"workspace repo list",data:{repositories:e,total:e.length}});return}if(e.length===0){console.log(`No repositories configured.
699
+ Clients (${e.clients.length}):`),e.clients.length===0)console.log(" No clients configured");else console.log(` ${e.clients.join(", ")}`);if(!e.success)console.error(`Error: ${e.error??"Native inspection failed"}`),process.exit(1)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace status",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),tlt=Ve.command({name:"prune",description:He(BE),args:{},handler:async()=>{try{let e=await Rhe(process.cwd());if(L()){H({success:!0,command:"workspace prune",data:e});return}let t=e.project.removed.length+e.user.removed.length;if(t===0){console.log("No orphaned plugins found.");return}if(e.project.removed.length>0){console.log(`Project plugins pruned (${e.project.removed.length}):`);for(let r of e.project.removed)console.log(` - ${r}`)}if(e.user.removed.length>0){console.log(`User plugins pruned (${e.user.removed.length}):`);for(let r of e.user.removed)console.log(` - ${r}`)}console.log(`
700
+ ✓ Removed ${t} orphaned plugin(s)`)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace prune",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),rlt=Ve.command({name:"add",description:He(FE),args:{path:Ve.positional({type:Ve.string,displayName:"path"}),description:Ve.option({type:Ve.optional(Ve.string),long:"description",short:"d",description:"Repository description"})},handler:async({path:e,description:t})=>{try{let r=Kct(process.cwd(),e),i=await Kse(r),n=await Jse(e,{source:i?.source,repo:i?.repo,description:t});if(!n.success){if(L())H({success:!1,command:"workspace repo add",error:n.error??"Unknown error"}),process.exit(1);console.error(`Error: ${n.error}`),process.exit(1)}if(await jv(),L()){H({success:!0,command:"workspace repo add",data:{path:e,source:i?.source??null,repo:i?.repo??null,description:t??null}});return}if(console.log(`✓ Added repository: ${e}`),i)console.log(` Source: ${i.source} (${i.repo})`);if(t)console.log(` Description: ${t}`)}catch(r){if(r instanceof Error){if(L())H({success:!1,command:"workspace repo add",error:r.message}),process.exit(1);console.error(`Error: ${r.message}`),process.exit(1)}throw r}}}),nlt=Ve.command({name:"remove",description:He(zE),args:{path:Ve.positional({type:Ve.string,displayName:"path"})},handler:async({path:e})=>{try{let t=await Yse(e);if(!t.success){if(L())H({success:!1,command:"workspace repo remove",error:t.error??"Unknown error"}),process.exit(1);console.error(`Error: ${t.error}`),process.exit(1)}if(await jv(),L()){H({success:!0,command:"workspace repo remove",data:{path:e}});return}console.log(`✓ Removed repository: ${e}`)}catch(t){if(t instanceof Error){if(L())H({success:!1,command:"workspace repo remove",error:t.message}),process.exit(1);console.error(`Error: ${t.message}`),process.exit(1)}throw t}}}),ilt=Ve.command({name:"list",description:He(UE),args:{},handler:async()=>{try{let e=await Xse();if(L()){H({success:!0,command:"workspace repo list",data:{repositories:e,total:e.length}});return}if(e.length===0){console.log(`No repositories configured.
701
701
  `),console.log("Add a repository with:"),console.log(" allagents workspace repo add <path>");return}console.log(`Repositories:
702
702
  `);for(let t of e){if(console.log(` ${t.path}`),t.source&&t.repo)console.log(` Source: ${t.source} (${t.repo})`);if(t.description)console.log(` Description: ${t.description}`);console.log()}console.log(`Total: ${e.length} repository(ies)`)}catch(e){if(e instanceof Error){if(L())H({success:!1,command:"workspace repo list",error:e.message}),process.exit(1);console.error(`Error: ${e.message}`),process.exit(1)}throw e}}}),olt=Dn({name:"repo",description:"Manage workspace repositories",cmds:{add:rlt,remove:nlt,list:ilt}});var Lhe=Dn({name:"workspace",description:"Manage AI agent workspaces - initialize, sync, and configure plugins",cmds:{init:XB,setup:Yct,update:QB,status:e9,prune:tlt,repo:olt}});Wo();var slt=new Set(["list","remove","add","search","update"]);function alt(e){if(e.length===0)return e;return e[0]==="skills"?["skill",...e.slice(1)]:e}function clt(e){let t=e[0]??"";if(e.length===0)return!1;if(t.startsWith("-")||slt.has(t))return!1;return e.length>1||/[-\s]/.test(t)}function Bhe(e){let t=alt(e);if(t.length===0||t[0]!=="skill")return e;let[,...r]=t;if(r.length===0)return["skill"];if(!clt(r))return["skill",...r];return["skill","search",...r]}Wo();var qE=[{command:"init",meta:Kw},{command:"update",meta:xp},{command:"sync",meta:xp,alias:!0},{command:"status",meta:Jw},{command:"workspace init",meta:Kw},{command:"workspace setup",meta:LE},{command:"workspace update",meta:xp},{command:"workspace sync",meta:xp,alias:!0},{command:"workspace status",meta:Jw},{command:"workspace prune",meta:BE},{command:"workspace repo add",meta:FE},{command:"workspace repo remove",meta:zE},{command:"workspace repo list",meta:UE},{command:"mcp add",meta:SC},{command:"mcp reauth",meta:CC},{command:"mcp tools",meta:iw},{command:"mcp call",meta:ow},{command:"mcp remove",meta:$C},{command:"mcp list",meta:xC},{command:"mcp get",meta:PC},{command:"mcp update",meta:_C},{command:"plugin install",meta:LC},{command:"plugin uninstall",meta:BC},{command:"plugin update",meta:qC},{command:"plugin marketplace list",meta:TC},{command:"plugin marketplace add",meta:NC},{command:"plugin marketplace remove",meta:MC},{command:"plugin marketplace update",meta:jC},{command:"plugin marketplace browse",meta:FC},{command:"plugin list",meta:zC},{command:"plugin validate",meta:UC},{command:"plugin skills list",meta:vw},{command:"plugin skills add",meta:Sw},{command:"plugin skills remove",meta:ww},{command:"plugin skills search",meta:kw},{command:"plugin skills update",meta:bw},{command:"skill list",meta:vw},{command:"skill add",meta:Sw},{command:"skill remove",meta:ww},{command:"skill search",meta:kw},{command:"skill update",meta:bw},{command:"self update",meta:AE},{command:"profile install",meta:m_},{command:"profile list",meta:g_},{command:"profile status",meta:h_},{command:"profile remove",meta:y_}],Hhe={workspace:"Manage workspace lifecycle, synchronization, and repositories","workspace repo":"Manage repositories declared in the current workspace",mcp:"Manage MCP servers in project, user, and profile destinations",plugin:"Manage plugins, marketplaces, and plugin-scoped skills","plugin marketplace":"Manage plugin marketplace registrations and contents","plugin skills":"Manage skills through the plugin compatibility command path",skill:"Discover, install, configure, and update skills",self:"Manage the installed AllAgents CLI",profile:"Manage declared and installed global agent profiles"};function llt(e,t=e.command){let r={command:t,description:e.description,when_to_use:e.whenToUse,expected_output:e.expectedOutput,interaction:e.interaction??"none"};if(e.positionals&&e.positionals.length>0)r.positionals=e.positionals;if(e.options&&e.options.length>0)r.options=e.options;if(r.examples=e.examples,e.outputSchema)r.output_schema=e.outputSchema;return r.json_fields=[...tw(e)],r}function qhe(e){return`allagents ${e} --help --json`}function ult(e){let t=qE.find((r)=>r.command===e);if(t)return{command:e,kind:"command",description:t.meta.description,when_to_use:t.meta.whenToUse,help_command:qhe(e)};return{command:e,kind:"group",description:Hhe[e]??`Commands grouped under ${e}`,help_command:qhe(e)}}function Vhe(e){let t=e?`${e} `:"",r=new Set,i=[];for(let n of qE){if(n.alias)continue;if(!n.command.startsWith(t))continue;let s=n.command.slice(t.length).split(" ")[0];if(!s)continue;let a=e?`${e} ${s}`:s;if(r.has(a))continue;r.add(a),i.push(ult(a))}return i}function plt(e){let t;for(let r of qE)if((e===r.command||e.startsWith(`${r.command} `))&&(!t||r.command.length>t.command.length))t=r;return t}function Ghe(e){return plt(e)?.meta}function dlt(e){return(e[0]==="allagents"?e.slice(1):e).join(" ")}function flt(e,t){if(!e)return{name:"allagents",version:t,description:"CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",next:"Choose a command or group and run its help_command for the next level.",commands:Vhe("")};let r=qE.find((n)=>n.command===e);if(r)return llt(r.meta,r.command);let i=Vhe(e);if(i.length>0)return{name:e,description:Hhe[e]??`Commands grouped under ${e}`,next:"Choose a command or group and run its help_command for the next level.",commands:i};process.stderr.write(`Unknown command: ${e}
703
703
  `),process.exit(1)}function Whe(e,t){if(Fle())process.stderr.write(`Error: --json=<fields> is not supported with --help; use --json.