@intentius/chant 0.124.99 → 0.124.100

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 (40) hide show
  1. package/bin/chant +3 -3
  2. package/dist/cli/commands/carve-emit.js +2 -2
  3. package/dist/cli/commands/check-lexicon-plugin.d.ts +2 -2
  4. package/dist/cli/commands/check-lexicon-plugin.js +3 -3
  5. package/dist/cli/commands/check-lexicon.js +4 -4
  6. package/dist/cli/commands/init-lexicon/templates/project.d.ts +1 -1
  7. package/dist/cli/commands/init-lexicon/templates/project.js +4 -4
  8. package/dist/cli/commands/init.d.ts +13 -0
  9. package/dist/cli/commands/init.js +30 -2
  10. package/dist/cli/handlers/release.d.ts +8 -0
  11. package/dist/cli/handlers/release.js +34 -1
  12. package/dist/cli/main.js +5 -0
  13. package/dist/cli/parse-args.js +7 -0
  14. package/dist/cli/registry.d.ts +2 -0
  15. package/dist/codegen/pinned-upgrade.js +1 -1
  16. package/dist/components/capability-plugin.d.ts +1 -1
  17. package/dist/components/capability-plugin.js +1 -1
  18. package/dist/config.d.ts +8 -0
  19. package/dist/config.js +2 -0
  20. package/dist/dead-guards.d.ts +5 -1
  21. package/dist/dead-guards.js +34 -23
  22. package/dist/discovery/sandbox/driver.js +1 -1
  23. package/dist/discovery/specifier-resolve.js +1 -1
  24. package/dist/floor-table.d.ts +3 -1
  25. package/dist/floor-table.data.js +9 -3
  26. package/dist/floor-table.js +4 -3
  27. package/dist/module-source.d.ts +2 -2
  28. package/dist/module-source.js +8 -8
  29. package/dist/release-floors.d.ts +3 -1
  30. package/dist/release-floors.js +3 -1
  31. package/dist/ts-loader.d.ts +1 -1
  32. package/dist/ts-loader.js +6 -6
  33. package/dist/wave-runtime.mjs +8 -8
  34. package/dist/workspace/reason-codes.d.ts +4 -0
  35. package/dist/workspace/reason-codes.js +5 -0
  36. package/dist/workspace/release-changed.d.ts +108 -0
  37. package/dist/workspace/release-changed.js +454 -0
  38. package/dist/workspace/release-changed.schema.json +188 -0
  39. package/dist/workspace/search-contract.d.ts +1 -1
  40. package/package.json +26 -26
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- // @intentius/chant 0.124.99 wave-job runtime (#3896): run wave, run resume, approve, workspace points.
2
+ // @intentius/chant 0.124.100 wave-job runtime (#3896): run wave, run resume, approve, workspace points.
3
3
  import { createRequire as __chantCreateRequire } from "node:module";
4
4
  const require = __chantCreateRequire(import.meta.url);
5
5
  var CAe=Object.create;var HT=Object.defineProperty;var _Ae=Object.getOwnPropertyDescriptor;var IAe=Object.getOwnPropertyNames;var TAe=Object.getPrototypeOf,DAe=Object.prototype.hasOwnProperty;var x=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var ve=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},me=(e,t)=>{for(var n in t)HT(e,n,{get:t[n],enumerable:!0})},NAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of IAe(t))!DAe.call(e,o)&&o!==n&&HT(e,o,{get:()=>t[o],enumerable:!(r=_Ae(t,o))||r.enumerable});return e};var et=(e,t,n)=>(n=e!=null?CAe(TAe(e)):{},NAe(t||!e||!e.__esModule?HT(n,"default",{value:e,enumerable:!0}):n,e));function qT(e,t=new Set){let n=[];for(let r of e)if(r.startsWith("--")&&r.includes("=")){let o=r.indexOf("="),i=r.slice(0,o),s=r.slice(o+1);if(t.has(i))throw new Error(`${r} \u2014 ${i} is a boolean flag and does not take a value. Pass ${i} on its own.`);n.push(i,s)}else n.push(r);return n}var zT,VT=x(()=>{"use strict";zT=new Set(["build","lint","list","describe","import","audit","migrate","carve","init","update","doctor","dev","run","graph","vendor","lifecycle","lc","components","emulator","serve","operator","approve","workspace"])});function LAe(){return!process.env.NO_COLOR&&process.stdout.isTTY!==!1}function il(e,t){return LAe()?`${t}${e}${qa.reset}`:e}function be(e){let t=[];if(e.file){let n=e.file;e.line!==void 0&&(n+=`:${e.line}`,e.column!==void 0&&(n+=`:${e.column}`)),t.push(il(n,qa.cyan)),t.push(" - ")}return t.push(il("error",qa.red)),t.push(": "),t.push(e.message),e.hint&&(t.push(`
6
6
  `),t.push(il(e.hint,qa.gray))),t.join("")}function br(e){let t=[];if(e.file){let n=e.file;e.line!==void 0&&(n+=`:${e.line}`,e.column!==void 0&&(n+=`:${e.column}`)),t.push(il(n,qa.cyan)),t.push(" - ")}return t.push(il("warning",qa.yellow)),t.push(": "),t.push(e.message),e.hint&&(t.push(`
7
- `),t.push(il(e.hint,qa.gray))),t.join("")}function $y(e){return il(e,qa.green)}function Fn(e){return il(e,qa.gray)}var qa,ir=x(()=>{"use strict";qa={red:"\x1B[31m",yellow:"\x1B[33m",green:"\x1B[32m",cyan:"\x1B[36m",gray:"\x1B[90m",reset:"\x1B[0m",bold:"\x1B[1m"}});var dx,JT=x(()=>{"use strict";dx="0.124.99"});function K(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){let p=d[u];p in a||(a[p]=l[p].bind(a))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let l=n?.Parent?new i:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Sn(e){return e&&Object.assign(xy,e),xy}var ZT,ux,us,sl,xy,mf=x(()=>{ZT=Object.freeze({status:"aborted"});ux=Symbol("zod_brand"),us=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},sl=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},xy={}});var Ee={};me(Ee,{BIGINT_FORMAT_RANGES:()=>sD,Class:()=>QT,NUMBER_FORMAT_RANGES:()=>iD,aborted:()=>dl,allowsEval:()=>tD,assert:()=>UAe,assertEqual:()=>FAe,assertIs:()=>GAe,assertNever:()=>BAe,assertNotEqual:()=>WAe,assignProp:()=>cl,base64ToUint8Array:()=>I3,base64urlToUint8Array:()=>sCe,cached:()=>yf,captureStackTrace:()=>fx,cleanEnum:()=>iCe,cleanRegex:()=>Oy,clone:()=>Vr,cloneDef:()=>zAe,createTransparentProxy:()=>YAe,defineLazy:()=>ht,esc:()=>px,escapeRegex:()=>Ri,extend:()=>eCe,finalizeIssue:()=>Ro,floatSafeRemainder:()=>XT,getElementAtPath:()=>qAe,getEnumValues:()=>Ey,getLengthableOrigin:()=>Cy,getParsedType:()=>ZAe,getSizableOrigin:()=>Ay,hexToUint8Array:()=>cCe,isObject:()=>nu,isPlainObject:()=>ll,issue:()=>wf,joinValues:()=>ie,jsonStringifyReplacer:()=>hf,merge:()=>nCe,mergeDefs:()=>Va,normalizeParams:()=>Oe,nullish:()=>al,numKeys:()=>JAe,objectClone:()=>HAe,omit:()=>XAe,optionalKeys:()=>oD,parsedType:()=>Se,partial:()=>rCe,pick:()=>QAe,prefixIssues:()=>Yo,primitiveTypes:()=>rD,promiseAllObject:()=>VAe,propertyKeyTypes:()=>Py,randomString:()=>KAe,required:()=>oCe,safeExtend:()=>tCe,shallowClone:()=>nD,slugify:()=>eD,stringifyPrimitive:()=>Re,uint8ArrayToBase64:()=>T3,uint8ArrayToBase64url:()=>aCe,uint8ArrayToHex:()=>lCe,unwrapMessage:()=>Sy});function FAe(e){return e}function WAe(e){return e}function GAe(e){}function BAe(e){throw new Error("Unexpected value in exhaustive check")}function UAe(e){}function Ey(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ie(e,t="|"){return e.map(n=>Re(n)).join(t)}function hf(e,t){return typeof t=="bigint"?t.toString():t}function yf(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function al(e){return e==null}function Oy(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function XT(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){let c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}let i=n>o?n:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}function ht(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_3)return r===void 0&&(r=_3,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function HAe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Va(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function zAe(e){return Va(e._zod.def)}function qAe(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function VAe(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=r[i];return o})}function KAe(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function px(e){return JSON.stringify(e)}function eD(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function nu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ll(e){if(nu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(nu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function nD(e){return ll(e)?{...e}:Array.isArray(e)?[...e]:e}function JAe(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ri(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vr(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Oe(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 new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function YAe(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function Re(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function oD(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function QAe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Va(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return cl(this,"shape",s),s},checks:[]});return Vr(e,i)}function XAe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Va(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return cl(this,"shape",s),s},checks:[]});return Vr(e,i)}function eCe(e,t){if(!ll(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Va(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return cl(this,"shape",i),i}});return Vr(e,o)}function tCe(e,t){if(!ll(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Va(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return cl(this,"shape",r),r}});return Vr(e,n)}function nCe(e,t){let n=Va(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return cl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Vr(e,n)}function rCe(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Va(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return cl(this,"shape",c),c},checks:[]});return Vr(t,s)}function oCe(e,t,n){let r=Va(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return cl(this,"shape",i),i}});return Vr(t,r)}function dl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Yo(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Sy(e){return typeof e=="string"?e:e?.message}function Ro(e,t,n){let r={...e,path:e.path??[]};if(!e.message){let o=Sy(e.inst?._zod.def?.error?.(e))??Sy(t?.error?.(e))??Sy(n.customError?.(e))??Sy(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ay(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Cy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Se(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function wf(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function iCe(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function I3(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function T3(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function sCe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return I3(t+n)}function aCe(e){return T3(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function cCe(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function lCe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var _3,fx,tD,ZAe,Py,rD,iD,sD,QT,ze=x(()=>{_3=Symbol("evaluating");fx="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};tD=yf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});ZAe=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":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Py=new Set(["string","number","symbol"]),rD=new Set(["string","number","bigint","boolean","symbol","undefined"]);iD={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},sD={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};QT=class{constructor(...t){}}});function Iy(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Ty(e,t=n=>n.message){let n={_errors:[]},r=o=>{for(let i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return r(e),n}function aD(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,a;for(let c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l},c.path));else if(c.code==="invalid_key")r({issues:c.issues},c.path);else if(c.code==="invalid_element")r({issues:c.issues},c.path);else{let l=[...i,...c.path];if(l.length===0){n.errors.push(t(c));continue}let d=n,u=0;for(;u<l.length;){let p=l[u],f=u===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(a=d.items)[p]??(a[p]={errors:[]}),d=d.items[p]),f&&d.errors.push(t(c)),u++}}};return r(e),n}function N3(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function cD(e){let t=[],n=[...e.issues].sort((r,o)=>(r.path??[]).length-(o.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${N3(r.path)}`);return t.join(`
7
+ `),t.push(il(e.hint,qa.gray))),t.join("")}function $y(e){return il(e,qa.green)}function Fn(e){return il(e,qa.gray)}var qa,ir=x(()=>{"use strict";qa={red:"\x1B[31m",yellow:"\x1B[33m",green:"\x1B[32m",cyan:"\x1B[36m",gray:"\x1B[90m",reset:"\x1B[0m",bold:"\x1B[1m"}});var dx,JT=x(()=>{"use strict";dx="0.124.100"});function K(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){let p=d[u];p in a||(a[p]=l[p].bind(a))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let l=n?.Parent?new i:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Sn(e){return e&&Object.assign(xy,e),xy}var ZT,ux,us,sl,xy,mf=x(()=>{ZT=Object.freeze({status:"aborted"});ux=Symbol("zod_brand"),us=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},sl=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},xy={}});var Ee={};me(Ee,{BIGINT_FORMAT_RANGES:()=>sD,Class:()=>QT,NUMBER_FORMAT_RANGES:()=>iD,aborted:()=>dl,allowsEval:()=>tD,assert:()=>UAe,assertEqual:()=>FAe,assertIs:()=>GAe,assertNever:()=>BAe,assertNotEqual:()=>WAe,assignProp:()=>cl,base64ToUint8Array:()=>I3,base64urlToUint8Array:()=>sCe,cached:()=>yf,captureStackTrace:()=>fx,cleanEnum:()=>iCe,cleanRegex:()=>Oy,clone:()=>Vr,cloneDef:()=>zAe,createTransparentProxy:()=>YAe,defineLazy:()=>ht,esc:()=>px,escapeRegex:()=>Ri,extend:()=>eCe,finalizeIssue:()=>Ro,floatSafeRemainder:()=>XT,getElementAtPath:()=>qAe,getEnumValues:()=>Ey,getLengthableOrigin:()=>Cy,getParsedType:()=>ZAe,getSizableOrigin:()=>Ay,hexToUint8Array:()=>cCe,isObject:()=>nu,isPlainObject:()=>ll,issue:()=>wf,joinValues:()=>ie,jsonStringifyReplacer:()=>hf,merge:()=>nCe,mergeDefs:()=>Va,normalizeParams:()=>Oe,nullish:()=>al,numKeys:()=>JAe,objectClone:()=>HAe,omit:()=>XAe,optionalKeys:()=>oD,parsedType:()=>Se,partial:()=>rCe,pick:()=>QAe,prefixIssues:()=>Yo,primitiveTypes:()=>rD,promiseAllObject:()=>VAe,propertyKeyTypes:()=>Py,randomString:()=>KAe,required:()=>oCe,safeExtend:()=>tCe,shallowClone:()=>nD,slugify:()=>eD,stringifyPrimitive:()=>Re,uint8ArrayToBase64:()=>T3,uint8ArrayToBase64url:()=>aCe,uint8ArrayToHex:()=>lCe,unwrapMessage:()=>Sy});function FAe(e){return e}function WAe(e){return e}function GAe(e){}function BAe(e){throw new Error("Unexpected value in exhaustive check")}function UAe(e){}function Ey(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ie(e,t="|"){return e.map(n=>Re(n)).join(t)}function hf(e,t){return typeof t=="bigint"?t.toString():t}function yf(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function al(e){return e==null}function Oy(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function XT(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){let c=r.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}let i=n>o?n:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}function ht(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_3)return r===void 0&&(r=_3,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function HAe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Va(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function zAe(e){return Va(e._zod.def)}function qAe(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function VAe(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=r[i];return o})}function KAe(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function px(e){return JSON.stringify(e)}function eD(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function nu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ll(e){if(nu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(nu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function nD(e){return ll(e)?{...e}:Array.isArray(e)?[...e]:e}function JAe(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ri(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vr(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Oe(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 new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function YAe(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function Re(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function oD(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function QAe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Va(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return cl(this,"shape",s),s},checks:[]});return Vr(e,i)}function XAe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Va(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return cl(this,"shape",s),s},checks:[]});return Vr(e,i)}function eCe(e,t){if(!ll(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Va(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return cl(this,"shape",i),i}});return Vr(e,o)}function tCe(e,t){if(!ll(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Va(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return cl(this,"shape",r),r}});return Vr(e,n)}function nCe(e,t){let n=Va(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return cl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Vr(e,n)}function rCe(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=Va(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return cl(this,"shape",c),c},checks:[]});return Vr(t,s)}function oCe(e,t,n){let r=Va(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return cl(this,"shape",i),i}});return Vr(t,r)}function dl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Yo(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Sy(e){return typeof e=="string"?e:e?.message}function Ro(e,t,n){let r={...e,path:e.path??[]};if(!e.message){let o=Sy(e.inst?._zod.def?.error?.(e))??Sy(t?.error?.(e))??Sy(n.customError?.(e))??Sy(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ay(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Cy(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Se(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function wf(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function iCe(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function I3(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function T3(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function sCe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return I3(t+n)}function aCe(e){return T3(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function cCe(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function lCe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var _3,fx,tD,ZAe,Py,rD,iD,sD,QT,ze=x(()=>{_3=Symbol("evaluating");fx="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};tD=yf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});ZAe=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":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Py=new Set(["string","number","symbol"]),rD=new Set(["string","number","bigint","boolean","symbol","undefined"]);iD={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},sD={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};QT=class{constructor(...t){}}});function Iy(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Ty(e,t=n=>n.message){let n={_errors:[]},r=o=>{for(let i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return r(e),n}function aD(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,a;for(let c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l},c.path));else if(c.code==="invalid_key")r({issues:c.issues},c.path);else if(c.code==="invalid_element")r({issues:c.issues},c.path);else{let l=[...i,...c.path];if(l.length===0){n.errors.push(t(c));continue}let d=n,u=0;for(;u<l.length;){let p=l[u],f=u===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(a=d.items)[p]??(a[p]={errors:[]}),d=d.items[p]),f&&d.errors.push(t(c)),u++}}};return r(e),n}function N3(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function cD(e){let t=[],n=[...e.issues].sort((r,o)=>(r.path??[]).length-(o.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${N3(r.path)}`);return t.join(`
8
8
  `)}var D3,_y,$o,lD=x(()=>{mf();ze();D3=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,hf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_y=K("$ZodError",D3),$o=K("$ZodError",D3,{Parent:Error})});var bf,gx,vf,mx,kf,dD,Rf,uD,hx,uCe,yx,pCe,wx,fCe,bx,gCe,vx,mCe,kx,hCe,Rx,yCe,$x,wCe,pD=x(()=>{mf();lD();ze();bf=e=>(t,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new us;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Ro(c,i,Sn())));throw fx(a,o?.callee),a}return s.value},gx=bf($o),vf=e=>async(t,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Ro(c,i,Sn())));throw fx(a,o?.callee),a}return s.value},mx=vf($o),kf=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new us;return i.issues.length?{success:!1,error:new(e??_y)(i.issues.map(s=>Ro(s,o,Sn())))}:{success:!0,data:i.value}},dD=kf($o),Rf=e=>async(t,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Ro(s,o,Sn())))}:{success:!0,data:i.value}},uD=Rf($o),hx=e=>(t,n,r)=>{let o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return bf(e)(t,n,o)},uCe=hx($o),yx=e=>(t,n,r)=>bf(e)(t,n,r),pCe=yx($o),wx=e=>async(t,n,r)=>{let o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return vf(e)(t,n,o)},fCe=wx($o),bx=e=>async(t,n,r)=>vf(e)(t,n,r),gCe=bx($o),vx=e=>(t,n,r)=>{let o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return kf(e)(t,n,o)},mCe=vx($o),kx=e=>(t,n,r)=>kf(e)(t,n,r),hCe=kx($o),Rx=e=>async(t,n,r)=>{let o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Rf(e)(t,n,o)},yCe=Rx($o),$x=e=>async(t,n,r)=>Rf(e)(t,n,r),wCe=$x($o)});var $i={};me($i,{base64:()=>PD,base64url:()=>xx,bigint:()=>DD,boolean:()=>jD,browserEmail:()=>ECe,cidrv4:()=>ED,cidrv6:()=>OD,cuid:()=>fD,cuid2:()=>gD,date:()=>CD,datetime:()=>ID,domain:()=>ACe,duration:()=>bD,e164:()=>AD,email:()=>kD,emoji:()=>RD,extendedDuration:()=>bCe,guid:()=>vD,hex:()=>CCe,hostname:()=>PCe,html5Email:()=>$Ce,idnEmail:()=>SCe,integer:()=>ND,ipv4:()=>$D,ipv6:()=>xD,ksuid:()=>yD,lowercase:()=>FD,mac:()=>SD,md5_base64:()=>ICe,md5_base64url:()=>TCe,md5_hex:()=>_Ce,nanoid:()=>wD,null:()=>LD,number:()=>Sx,rfc5322Email:()=>xCe,sha1_base64:()=>NCe,sha1_base64url:()=>jCe,sha1_hex:()=>DCe,sha256_base64:()=>MCe,sha256_base64url:()=>FCe,sha256_hex:()=>LCe,sha384_base64:()=>GCe,sha384_base64url:()=>BCe,sha384_hex:()=>WCe,sha512_base64:()=>HCe,sha512_base64url:()=>zCe,sha512_hex:()=>UCe,string:()=>TD,time:()=>_D,ulid:()=>mD,undefined:()=>MD,unicodeEmail:()=>j3,uppercase:()=>WD,uuid:()=>ru,uuid4:()=>vCe,uuid6:()=>kCe,uuid7:()=>RCe,xid:()=>hD});function RD(){return new RegExp(OCe,"u")}function M3(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _D(e){return new RegExp(`^${M3(e)}$`)}function ID(e){let t=M3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${L3}T(?:${r})$`)}function Dy(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ny(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var fD,gD,mD,hD,yD,wD,bD,bCe,vD,ru,vCe,kCe,RCe,kD,$Ce,xCe,j3,SCe,ECe,OCe,$D,xD,SD,ED,OD,PD,xx,PCe,ACe,AD,L3,CD,TD,DD,ND,Sx,jD,LD,MD,FD,WD,CCe,_Ce,ICe,TCe,DCe,NCe,jCe,LCe,MCe,FCe,WCe,GCe,BCe,UCe,HCe,zCe,Ex=x(()=>{ze();fD=/^[cC][^\s-]{8,}$/,gD=/^[0-9a-z]+$/,mD=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hD=/^[0-9a-vA-V]{20}$/,yD=/^[A-Za-z0-9]{27}$/,wD=/^[a-zA-Z0-9_-]{21}$/,bD=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bCe=/^[-+]?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)?)??$/,vD=/^([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})$/,ru=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,vCe=ru(4),kCe=ru(6),RCe=ru(7),kD=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$Ce=/^[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])?)*$/,xCe=/^(([^<>()\[\]\\.,;:\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,}))$/,j3=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,SCe=j3,ECe=/^[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])?)*$/,OCe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";$D=/^(?:(?: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])$/,xD=/^(([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}|:))$/,SD=e=>{let t=Ri(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ED=/^((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])$/,OD=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,PD=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xx=/^[A-Za-z0-9_-]*$/,PCe=/^(?=.{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])?)*\.?$/,ACe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,AD=/^\+[1-9]\d{6,14}$/,L3="(?:(?:\\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])))",CD=new RegExp(`^${L3}$`);TD=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},DD=/^-?\d+n?$/,ND=/^-?\d+$/,Sx=/^-?\d+(?:\.\d+)?$/,jD=/^(?:true|false)$/i,LD=/^null$/i,MD=/^undefined$/i,FD=/^[^A-Z]*$/,WD=/^[^a-z]*$/,CCe=/^[0-9a-fA-F]*$/;_Ce=/^[0-9a-fA-F]{32}$/,ICe=Dy(22,"=="),TCe=Ny(22),DCe=/^[0-9a-fA-F]{40}$/,NCe=Dy(27,"="),jCe=Ny(27),LCe=/^[0-9a-fA-F]{64}$/,MCe=Dy(43,"="),FCe=Ny(43),WCe=/^[0-9a-fA-F]{96}$/,GCe=Dy(64,""),BCe=Ny(64),UCe=/^[0-9a-fA-F]{128}$/,HCe=Dy(86,"=="),zCe=Ny(86)});function F3(e,t,n){e.issues.length&&t.issues.push(...Yo(n,e.issues))}var tn,W3,Ox,Px,GD,BD,UD,HD,zD,qD,VD,KD,JD,$f,ZD,YD,QD,XD,eN,tN,nN,rN,oN,Ax=x(()=>{mf();Ex();ze();tn=K("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),W3={number:"number",bigint:"bigint",object:"date"},Ox=K("$ZodCheckLessThan",(e,t)=>{tn.init(e,t);let n=W3[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Px=K("$ZodCheckGreaterThan",(e,t)=>{tn.init(e,t);let n=W3[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),GD=K("$ZodCheckMultipleOf",(e,t)=>{tn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):XT(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),BD=K("$ZodCheckNumberFormat",(e,t)=>{tn.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=iD[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,n&&(a.pattern=ND)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){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:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),UD=K("$ZodCheckBigIntFormat",(e,t)=>{tn.init(e,t);let[n,r]=sD[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=o=>{let i=o.value;i<n&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>r&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),HD=K("$ZodCheckMaxSize",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:Ay(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),zD=K("$ZodCheckMinSize",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:Ay(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qD=K("$ZodCheckSizeEquals",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:Ay(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),VD=K("$ZodCheckMaxLength",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let s=Cy(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KD=K("$ZodCheckMinLength",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let s=Cy(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),JD=K("$ZodCheckLengthEquals",(e,t)=>{var n;tn.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!al(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let s=Cy(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),$f=K("$ZodCheckStringFormat",(e,t)=>{var n,r;tn.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ZD=K("$ZodCheckRegex",(e,t)=>{$f.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),YD=K("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=FD),$f.init(e,t)}),QD=K("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=WD),$f.init(e,t)}),XD=K("$ZodCheckIncludes",(e,t)=>{tn.init(e,t);let n=Ri(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),eN=K("$ZodCheckStartsWith",(e,t)=>{tn.init(e,t);let n=new RegExp(`^${Ri(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),tN=K("$ZodCheckEndsWith",(e,t)=>{tn.init(e,t);let n=new RegExp(`.*${Ri(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});nN=K("$ZodCheckProperty",(e,t)=>{tn.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>F3(o,n,t.property));F3(r,n,t.property)}}),rN=K("$ZodCheckMimeType",(e,t)=>{tn.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),oN=K("$ZodCheckOverwrite",(e,t)=>{tn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var jy,iN=x(()=>{jy=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
9
9
  `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
10
10
  `))}}});var sN,aN=x(()=>{sN={major:4,minor:3,patch:6}});function AN(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function X3(e){if(!xx.test(e))return!1;let t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return AN(n)}function eZ(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}function B3(e,t,n){e.issues.length&&t.issues.push(...Yo(n,e.issues)),t.value[n]=e.value}function Dx(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Yo(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function tZ(e){let t=Object.keys(e.shape);for(let r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);let n=oD(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nZ(e,t,n,r,o,i){let s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,d=c.optout==="optional";for(let u in t){if(a.has(u))continue;if(l==="never"){s.push(u);continue}let p=c.run({value:t[u],issues:[]},r);p instanceof Promise?e.push(p.then(f=>Dx(f,n,u,t,d))):Dx(p,n,u,t,d)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}function U3(e,t,n,r){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!dl(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Ro(s,r,Sn())))}),t)}function H3(e,t,n,r){let o=e.filter(i=>i.issues.length===0);return o.length===1?(t.value=o[0].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Ro(s,r,Sn())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}function cN(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(ll(e)&&ll(t)){let n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(let i of r){let s=cN(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t[r],s=cN(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function z3(e,t,n){let r=new Map,o;for(let a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(let c of a.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(a);let i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),dl(e))return e;let s=cN(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}function Cx(e,t,n){e.issues.length&&t.issues.push(...Yo(n,e.issues)),t.value[n]=e.value}function q3(e,t,n,r,o,i,s){e.issues.length&&(Py.has(typeof r)?n.issues.push(...Yo(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(a=>Ro(a,s,Sn()))})),t.issues.length&&(Py.has(typeof r)?n.issues.push(...Yo(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:r,issues:t.issues.map(a=>Ro(a,s,Sn()))})),n.value.set(e.value,t.value)}function V3(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function K3(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function J3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Z3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function _x(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function Ix(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>Tx(e,i,t.out,n)):Tx(e,o,t.out,n)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>Tx(e,i,t.in,n)):Tx(e,o,t.in,n)}}function Tx(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function Y3(e){return e.value=Object.freeze(e.value),e}function Q3(e,t,n,r){if(!e){let o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(wf(o))}}var rt,ou,Jt,lN,dN,uN,pN,fN,gN,mN,hN,yN,wN,bN,vN,kN,RN,$N,xN,SN,EN,ON,PN,CN,_N,IN,TN,DN,Nx,NN,Ly,jx,jN,LN,MN,FN,WN,GN,BN,UN,HN,zN,rZ,qN,My,VN,KN,JN,Lx,ZN,YN,QN,XN,ej,tj,nj,Mx,rj,oj,ij,sj,aj,cj,lj,dj,uj,Fy,pj,fj,gj,mj,hj,yj,wj=x(()=>{Ax();mf();iN();pD();Ex();ze();aN();ze();rt=K("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sN;let r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(let o of r)for(let i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,a,c)=>{let l=dl(s),d;for(let u of a){if(u._zod.def.when){if(!u._zod.def.when(s))continue}else if(l)continue;let p=s.issues.length,f=u._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new us;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,s.issues.length!==p&&(l||(l=dl(s,p)))});else{if(s.issues.length===p)continue;l||(l=dl(s,p))}}return d?d.then(()=>s):s},i=(s,a,c)=>{if(dl(s))return s.aborted=!0,s;let l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new us;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,a)):i(l,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new us;return c.then(l=>o(l,r,a))}return o(c,r,a)}}ht(e,"~standard",()=>({validate:o=>{try{let i=dD(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return uD(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),ou=K("$ZodString",(e,t)=>{rt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??TD(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Jt=K("$ZodStringFormat",(e,t)=>{$f.init(e,t),ou.init(e,t)}),lN=K("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=vD),Jt.init(e,t)}),dN=K("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ru(r))}else t.pattern??(t.pattern=ru());Jt.init(e,t)}),uN=K("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=kD),Jt.init(e,t)}),pN=K("$ZodURL",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),fN=K("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RD()),Jt.init(e,t)}),gN=K("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=wD),Jt.init(e,t)}),mN=K("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=fD),Jt.init(e,t)}),hN=K("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=gD),Jt.init(e,t)}),yN=K("$ZodULID",(e,t)=>{t.pattern??(t.pattern=mD),Jt.init(e,t)}),wN=K("$ZodXID",(e,t)=>{t.pattern??(t.pattern=hD),Jt.init(e,t)}),bN=K("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=yD),Jt.init(e,t)}),vN=K("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ID(t)),Jt.init(e,t)}),kN=K("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=CD),Jt.init(e,t)}),RN=K("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_D(t)),Jt.init(e,t)}),$N=K("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bD),Jt.init(e,t)}),xN=K("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$D),Jt.init(e,t),e._zod.bag.format="ipv4"}),SN=K("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xD),Jt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),EN=K("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=SD(t.delimiter)),Jt.init(e,t),e._zod.bag.format="mac"}),ON=K("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ED),Jt.init(e,t)}),PN=K("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=OD),Jt.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(r.length!==2)throw new Error;let[o,i]=r;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});CN=K("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=PD),Jt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{AN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});_N=K("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=xx),Jt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{X3(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),IN=K("$ZodE164",(e,t)=>{t.pattern??(t.pattern=AD),Jt.init(e,t)});TN=K("$ZodJWT",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{eZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),DN=K("$ZodCustomStringFormat",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Nx=K("$ZodNumber",(e,t)=>{rt.init(e,t),e._zod.pattern=e._zod.bag.pattern??Sx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),NN=K("$ZodNumberFormat",(e,t)=>{BD.init(e,t),Nx.init(e,t)}),Ly=K("$ZodBoolean",(e,t)=>{rt.init(e,t),e._zod.pattern=jD,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),jx=K("$ZodBigInt",(e,t)=>{rt.init(e,t),e._zod.pattern=DD,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),jN=K("$ZodBigIntFormat",(e,t)=>{UD.init(e,t),jx.init(e,t)}),LN=K("$ZodSymbol",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;return typeof o=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),n}}),MN=K("$ZodUndefined",(e,t)=>{rt.init(e,t),e._zod.pattern=MD,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{let o=n.value;return typeof o>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),n}}),FN=K("$ZodNull",(e,t)=>{rt.init(e,t),e._zod.pattern=LD,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{let o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),WN=K("$ZodAny",(e,t)=>{rt.init(e,t),e._zod.parse=n=>n}),GN=K("$ZodUnknown",(e,t)=>{rt.init(e,t),e._zod.parse=n=>n}),BN=K("$ZodNever",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),UN=K("$ZodVoid",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;return typeof o>"u"||n.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),n}}),HN=K("$ZodDate",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let o=n.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),n}});zN=K("$ZodArray",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?i.push(c.then(l=>B3(l,n,s))):B3(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});rZ=K("$ZodObject",(e,t)=>{if(rt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let r=yf(()=>tZ(t));ht(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let u of d.values)c[l].add(u)}}return c});let o=nu,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=r.value);let l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let d=[],u=s.shape;for(let p of s.keys){let f=u[p],g=f._zod.optout==="optional",m=f._zod.run({value:l[p],issues:[]},c);m instanceof Promise?d.push(m.then(h=>Dx(h,a,p,l,g))):Dx(m,a,p,l,g)}return i?nZ(d,l,a,c,r.value,e):d.length?Promise.all(d).then(()=>a):a}}),qN=K("$ZodObjectJIT",(e,t)=>{rZ.init(e,t);let n=e._zod.parse,r=yf(()=>tZ(t)),o=p=>{let f=new jy(["shape","payload","ctx"]),g=r.value,m=v=>{let k=px(v);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};f.write("const input = payload.value;");let h=Object.create(null),y=0;for(let v of g.keys)h[v]=`key_${y++}`;f.write("const newResult = {};");for(let v of g.keys){let k=h[v],$=px(v),E=p[v]?._zod?.optout==="optional";f.write(`const ${k} = ${m(v)};`),E?f.write(`
@@ -43,13 +43,13 @@ var CAe=Object.create;var HT=Object.defineProperty;var _Ae=Object.getOwnProperty
43
43
 
44
44
  `)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(v,k)=>b(p,v,k)},i,s=nu,a=!xy.jitless,l=a&&tD.value,d=t.catchall,u;e._zod.parse=(p,f)=>{u??(u=r.value);let g=p.value;return s(g)?a&&l&&f?.async===!1&&f.jitless!==!0?(i||(i=o(t.shape)),p=i(p,f),d?nZ([],g,p,f,u,e):p):n(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),p)}});My=K("$ZodUnion",(e,t)=>{rt.init(e,t),ht(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ht(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ht(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ht(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Oy(i.source)).join("|")})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1,a=[];for(let c of t.options){let l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>U3(c,o,e,i)):U3(a,o,e,i)}});VN=K("$ZodXor",(e,t)=>{My.init(e,t),t.inclusive=!1;let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1,a=[];for(let c of t.options){let l=c._zod.run({value:o.value,issues:[]},i);l instanceof Promise?(a.push(l),s=!0):a.push(l)}return s?Promise.all(a).then(c=>H3(c,o,e,i)):H3(a,o,e,i)}}),KN=K("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,My.init(e,t);let n=e._zod.parse;ht(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let l of c)o[a].add(l)}}return o});let r=yf(()=>{let o=t.options,i=new Map;for(let s of o){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!nu(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}}),JN=K("$ZodIntersection",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>z3(n,c,l)):z3(n,i,s)}});Lx=K("$ZodTuple",(e,t)=>{rt.init(e,t);let n=t.items;e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],a=[...n].reverse().findIndex(d=>d._zod.optin!=="optional"),c=a===-1?0:n.length-a;if(!t.rest){let d=i.length>n.length,u=i.length<c-1;if(d||u)return r.issues.push({...d?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let l=-1;for(let d of n){if(l++,l>=i.length&&l>=c)continue;let u=d._zod.run({value:i[l],issues:[]},o);u instanceof Promise?s.push(u.then(p=>Cx(p,r,l))):Cx(u,r,l)}if(t.rest){let d=i.slice(n.length);for(let u of d){l++;let p=t.rest._zod.run({value:u,issues:[]},o);p instanceof Promise?s.push(p.then(f=>Cx(f,r,l))):Cx(p,r,l)}}return s.length?Promise.all(s).then(()=>r):r}});ZN=K("$ZodRecord",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!ll(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);let d=t.valueType._zod.run({value:o[l],issues:[]},r);d instanceof Promise?i.push(d.then(u=>{u.issues.length&&n.issues.push(...Yo(l,u.issues)),n.value[l]=u.value})):(d.issues.length&&n.issues.push(...Yo(l,d.issues)),n.value[l]=d.value)}let c;for(let l in o)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{n.value={};for(let a of Reflect.ownKeys(o)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Sx.test(a)&&c.issues.length){let u=t.keyType._zod.run({value:Number(a),issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");u.issues.length===0&&(c=u)}if(c.issues.length){t.mode==="loose"?n.value[a]=o[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(u=>Ro(u,r,Sn())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:o[a],issues:[]},r);d instanceof Promise?i.push(d.then(u=>{u.issues.length&&n.issues.push(...Yo(a,u.issues)),n.value[c.value]=u.value})):(d.issues.length&&n.issues.push(...Yo(a,d.issues)),n.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>n):n}}),YN=K("$ZodMap",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),n;let i=[];n.value=new Map;for(let[s,a]of o){let c=t.keyType._zod.run({value:s,issues:[]},r),l=t.valueType._zod.run({value:a,issues:[]},r);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,u])=>{q3(d,u,n,s,o,e,r)})):q3(c,l,n,s,o,e,r)}return i.length?Promise.all(i).then(()=>n):n}});QN=K("$ZodSet",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Set))return n.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of o){let a=t.valueType._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(c=>V3(c,n))):V3(a,n)}return i.length?Promise.all(i).then(()=>n):n}});XN=K("$ZodEnum",(e,t)=>{rt.init(e,t);let n=Ey(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Py.has(typeof o)).map(o=>typeof o=="string"?Ri(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),ej=K("$ZodLiteral",(e,t)=>{if(rt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ri(r):r?Ri(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),tj=K("$ZodFile",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),nj=K("$ZodTransform",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new sl(e.constructor.name);let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new us;return n.value=o,n}});Mx=K("$ZodOptional",(e,t)=>{rt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ht(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oy(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>K3(i,n.value)):K3(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),rj=K("$ZodExactOptional",(e,t)=>{Mx.init(e,t),ht(e._zod,"values",()=>t.innerType._zod.values),ht(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),oj=K("$ZodNullable",(e,t)=>{rt.init(e,t),ht(e._zod,"optin",()=>t.innerType._zod.optin),ht(e._zod,"optout",()=>t.innerType._zod.optout),ht(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oy(n.source)}|null)$`):void 0}),ht(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),ij=K("$ZodDefault",(e,t)=>{rt.init(e,t),e._zod.optin="optional",ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>J3(i,t)):J3(o,t)}});sj=K("$ZodPrefault",(e,t)=>{rt.init(e,t),e._zod.optin="optional",ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),aj=K("$ZodNonOptional",(e,t)=>{rt.init(e,t),ht(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Z3(i,e)):Z3(o,e)}});cj=K("$ZodSuccess",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new sl("ZodSuccess");let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.issues.length===0,n)):(n.value=o.issues.length===0,n)}}),lj=K("$ZodCatch",(e,t)=>{rt.init(e,t),ht(e._zod,"optin",()=>t.innerType._zod.optin),ht(e._zod,"optout",()=>t.innerType._zod.optout),ht(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>Ro(s,r,Sn()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>Ro(i,r,Sn()))},input:n.value}),n.issues=[]),n)}}),dj=K("$ZodNaN",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),uj=K("$ZodPipe",(e,t)=>{rt.init(e,t),ht(e._zod,"values",()=>t.in._zod.values),ht(e._zod,"optin",()=>t.in._zod.optin),ht(e._zod,"optout",()=>t.out._zod.optout),ht(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>_x(s,t.in,r)):_x(i,t.in,r)}let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>_x(i,t.out,r)):_x(o,t.out,r)}});Fy=K("$ZodCodec",(e,t)=>{rt.init(e,t),ht(e._zod,"values",()=>t.in._zod.values),ht(e._zod,"optin",()=>t.in._zod.optin),ht(e._zod,"optout",()=>t.out._zod.optout),ht(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>Ix(s,t,r)):Ix(i,t,r)}else{let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>Ix(s,t,r)):Ix(i,t,r)}}});pj=K("$ZodReadonly",(e,t)=>{rt.init(e,t),ht(e._zod,"propValues",()=>t.innerType._zod.propValues),ht(e._zod,"values",()=>t.innerType._zod.values),ht(e._zod,"optin",()=>t.innerType?._zod?.optin),ht(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Y3):Y3(o)}});fj=K("$ZodTemplateLiteral",(e,t)=>{rt.init(e,t);let n=[];for(let r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let o=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;n.push(o.slice(i,s))}else if(r===null||rD.has(typeof r))n.push(Ri(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,o)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),gj=K("$ZodFunction",(e,t)=>(rt.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){let o=e._def.input?gx(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?gx(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let o=e._def.input?await mx(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await mx(e._def.output,i):i}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Lx({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),mj=K("$ZodPromise",(e,t)=>{rt.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(o=>t.innerType._zod.run({value:o,issues:[]},r))}),hj=K("$ZodLazy",(e,t)=>{rt.init(e,t),ht(e._zod,"innerType",()=>t.getter()),ht(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ht(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ht(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ht(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),yj=K("$ZodCustom",(e,t)=>{tn.init(e,t),rt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Q3(i,n,r,e));Q3(o,n,r,e)}})});function oZ(){return{localeError:VCe()}}var VCe,iZ=x(()=>{ze();VCe=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Re(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${ie(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function sZ(){return{localeError:KCe()}}var KCe,aZ=x(()=>{ze();KCe=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Re(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function cZ(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function lZ(){return{localeError:JCe()}}var JCe,dZ=x(()=>{ze();JCe=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Re(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let a=Number(o.maximum),c=cZ(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let a=Number(o.minimum),c=cZ(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function uZ(){return{localeError:ZCe()}}var ZCe,pZ=x(()=>{ze();ZCe=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Re(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function fZ(){return{localeError:YCe()}}var YCe,gZ=x(()=>{ze();YCe=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Re(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${ie(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",s=t(o.origin);return s?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(o.origin);return s?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}}});function mZ(){return{localeError:QCe()}}var QCe,hZ=x(()=>{ze();QCe=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Re(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${ie(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}}});function yZ(){return{localeError:XCe()}}var XCe,wZ=x(()=>{ze();XCe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${Re(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),a=r[o.origin]??o.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),a=r[o.origin]??o.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}}});function bZ(){return{localeError:e_e()}}var e_e,vZ=x(()=>{ze();e_e=()=>{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"}};function t(o){return e[o]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Re(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function Fx(){return{localeError:t_e()}}var t_e,bj=x(()=>{ze();t_e=()=>{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 n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return`Invalid input: expected ${i}, received ${a}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Re(o.values[0])}`:`Invalid option: expected one of ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.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":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}}});function kZ(){return{localeError:n_e()}}var n_e,RZ=x(()=>{ze();n_e=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${Re(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}}});function $Z(){return{localeError:r_e()}}var r_e,xZ=x(()=>{ze();r_e=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Re(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),a=r[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),a=r[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}}});function SZ(){return{localeError:o_e()}}var o_e,EZ=x(()=>{ze();o_e=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Re(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${ie(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${ie(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function OZ(){return{localeError:i_e()}}var i_e,PZ=x(()=>{ze();i_e=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Re(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${ie(o.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\xF6te"}}}});function AZ(){return{localeError:s_e()}}var s_e,CZ=x(()=>{ze();s_e=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN",number:"nombre",array:"tableau"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instanceof ${o.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Re(o.values[0])} attendu`:`Option invalide : une valeur parmi ${ie(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Trop grand : ${o.origin??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o.origin??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Trop petit : ${o.origin} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : ${o.origin} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${ie(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function _Z(){return{localeError:a_e()}}var a_e,IZ=x(()=>{ze();a_e=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Re(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",s=t(o.origin);return s?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",s=t(o.origin);return s?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${ie(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function TZ(){return{localeError:c_e()}}var c_e,DZ=x(()=>{ze();c_e=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,r=l=>{let d=n(l);return d?d.label:l??e.unknown.label},o=l=>`\u05D4${r(l)}`,i=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,u=c[d??""]??r(d),p=Se(l.input),f=c[p]??e[p]?.label??p;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Re(l.values[0])}`;let d=l.values.map(f=>Re(f));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=s(l.origin),u=o(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let g=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",m=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let p=l.inclusive?"<=":"<",f=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),u=o(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let g=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let h=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`}let m=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let p=l.inclusive?">=":">",f=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${f} ${p}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let u=a[d.format],p=u?.label??d.format,g=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${g}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${ie(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function NZ(){return{localeError:l_e()}}var l_e,jZ=x(()=>{ze();l_e=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let n={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Re(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function LZ(e,t,n){return Math.abs(e)===1?t:n}function xf(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}function MZ(){return{localeError:d_e()}}var d_e,FZ=x(()=>{ze();d_e=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Re(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let a=Number(o.maximum),c=LZ(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xf(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xf(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let a=Number(o.minimum),c=LZ(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xf(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xf(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${ie(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${xf(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${xf(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function WZ(){return{localeError:u_e()}}var u_e,GZ=x(()=>{ze();u_e=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Re(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}}});function BZ(){return{localeError:p_e()}}var p_e,UZ=x(()=>{ze();p_e=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Re(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}}});function HZ(){return{localeError:f_e()}}var f_e,zZ=x(()=>{ze();f_e=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Re(o.values[0])}`:`Opzione non valida: atteso uno tra ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}}});function qZ(){return{localeError:g_e()}}var g_e,VZ=x(()=>{ze();g_e=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Re(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${ie(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(o.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(o.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${ie(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function KZ(){return{localeError:m_e()}}var m_e,JZ=x(()=>{ze();m_e=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Re(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${ie(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function Wx(){return{localeError:h_e()}}var h_e,vj=x(()=>{ze();h_e=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Re(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${ie(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function ZZ(){return Wx()}var YZ=x(()=>{vj()});function QZ(){return{localeError:y_e()}}var y_e,XZ=x(()=>{ze();y_e=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Re(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${ie(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(o.origin),c=a?.unit??"\uC694\uC18C";return a?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${c} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(o.origin),c=a?.unit??"\uC694\uC18C";return a?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${c} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${ie(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function e8(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}function t8(){return{localeError:w_e()}}var Wy,w_e,n8=x(()=>{ze();Wy=e=>e.charAt(0).toUpperCase()+e.slice(1);w_e=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,s,a){let c=e[o]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${Re(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${ie(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=r[o.origin]??o.origin,s=t(o.origin,e8(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${Wy(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let a=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Wy(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[o.origin]??o.origin,s=t(o.origin,e8(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${Wy(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let a=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Wy(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${ie(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=r[o.origin]??o.origin;return`${Wy(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function r8(){return{localeError:b_e()}}var b_e,o8=x(()=>{ze();b_e=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Re(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function i8(){return{localeError:v_e()}}var v_e,s8=x(()=>{ze();v_e=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Re(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ie(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}}});function a8(){return{localeError:k_e()}}var k_e,c8=x(()=>{ze();k_e=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Re(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),a=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),a=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}}});function l8(){return{localeError:R_e()}}var R_e,d8=x(()=>{ze();R_e=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Re(o.values[0])}`:`Ugyldig valg: forventet en av ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}}});function u8(){return{localeError:$_e()}}var $_e,p8=x(()=>{ze();$_e=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Re(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function f8(){return{localeError:x_e()}}var x_e,g8=x(()=>{ze();x_e=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Re(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${ie(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function m8(){return{localeError:S_e()}}var S_e,h8=x(()=>{ze();S_e=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Re(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function y8(){return{localeError:E_e()}}var E_e,w8=x(()=>{ze();E_e=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(o){return e[o]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipo inv\xE1lido: esperado instanceof ${o.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${Re(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Muito pequeno: esperado que ${o.origin} tivesse ${i}${o.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}}});function b8(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function v8(){return{localeError:O_e()}}var O_e,k8=x(()=>{ze();O_e=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Re(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let a=Number(o.maximum),c=b8(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let a=Number(o.minimum),c=b8(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function R8(){return{localeError:P_e()}}var P_e,$8=x(()=>{ze();P_e=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let n={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Re(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}}});function x8(){return{localeError:A_e()}}var A_e,S8=x(()=>{ze();A_e=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Re(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${ie(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function E8(){return{localeError:C_e()}}var C_e,O8=x(()=>{ze();C_e=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Re(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ie(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function P8(){return{localeError:__e()}}var __e,A8=x(()=>{ze();__e=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Re(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${ie(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function C8(){return{localeError:I_e()}}var I_e,_8=x(()=>{ze();I_e=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Re(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Gx(){return{localeError:T_e()}}var T_e,kj=x(()=>{ze();T_e=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Re(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function I8(){return Gx()}var T8=x(()=>{kj()});function D8(){return{localeError:D_e()}}var D_e,N8=x(()=>{ze();D_e=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Re(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${ie(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${ie(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function j8(){return{localeError:N_e()}}var N_e,L8=x(()=>{ze();N_e=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Re(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function M8(){return{localeError:j_e()}}var j_e,F8=x(()=>{ze();j_e=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Re(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${ie(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function W8(){return{localeError:L_e()}}var L_e,G8=x(()=>{ze();L_e=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Re(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${ie(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function B8(){return{localeError:M_e()}}var M_e,U8=x(()=>{ze();M_e=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Re(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${ie(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function H8(){return{localeError:F_e()}}var F_e,z8=x(()=>{ze();F_e=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=Se(o.input),a=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Re(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${ie(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${ie(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Gy={};me(Gy,{ar:()=>oZ,az:()=>sZ,be:()=>lZ,bg:()=>uZ,ca:()=>fZ,cs:()=>mZ,da:()=>yZ,de:()=>bZ,en:()=>Fx,eo:()=>kZ,es:()=>$Z,fa:()=>SZ,fi:()=>OZ,fr:()=>AZ,frCA:()=>_Z,he:()=>TZ,hu:()=>NZ,hy:()=>MZ,id:()=>WZ,is:()=>BZ,it:()=>HZ,ja:()=>qZ,ka:()=>KZ,kh:()=>ZZ,km:()=>Wx,ko:()=>QZ,lt:()=>t8,mk:()=>r8,ms:()=>i8,nl:()=>a8,no:()=>l8,ota:()=>u8,pl:()=>m8,ps:()=>f8,pt:()=>y8,ru:()=>v8,sl:()=>R8,sv:()=>x8,ta:()=>E8,th:()=>P8,tr:()=>C8,ua:()=>I8,uk:()=>Gx,ur:()=>D8,uz:()=>j8,vi:()=>M8,yo:()=>H8,zhCN:()=>W8,zhTW:()=>B8});var Rj=x(()=>{iZ();aZ();dZ();pZ();gZ();hZ();wZ();vZ();bj();RZ();xZ();EZ();PZ();CZ();IZ();DZ();jZ();FZ();GZ();UZ();zZ();VZ();JZ();YZ();vj();XZ();n8();o8();s8();c8();d8();p8();g8();h8();w8();k8();$8();S8();O8();A8();_8();T8();kj();N8();L8();F8();G8();U8();z8()});function Ux(){return new Bx}var q8,$j,xj,Bx,vr,By=x(()=>{$j=Symbol("ZodOutput"),xj=Symbol("ZodInput"),Bx=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(q8=globalThis).__zod_globalRegistry??(q8.__zod_globalRegistry=Ux());vr=globalThis.__zod_globalRegistry});function Sj(e,t){return new e({type:"string",...Oe(t)})}function Ej(e,t){return new e({type:"string",coerce:!0,...Oe(t)})}function Hx(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Oe(t)})}function Uy(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Oe(t)})}function zx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Oe(t)})}function qx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Oe(t)})}function Vx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Oe(t)})}function Kx(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Oe(t)})}function Hy(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Oe(t)})}function Jx(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Oe(t)})}function Zx(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Oe(t)})}function Yx(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Oe(t)})}function Qx(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Oe(t)})}function Xx(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Oe(t)})}function eS(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Oe(t)})}function tS(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Oe(t)})}function nS(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Oe(t)})}function rS(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Oe(t)})}function Oj(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Oe(t)})}function oS(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Oe(t)})}function iS(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Oe(t)})}function sS(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Oe(t)})}function aS(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Oe(t)})}function cS(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Oe(t)})}function lS(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Oe(t)})}function Aj(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Oe(t)})}function Cj(e,t){return new e({type:"string",format:"date",check:"string_format",...Oe(t)})}function _j(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Oe(t)})}function Ij(e,t){return new e({type:"string",format:"duration",check:"string_format",...Oe(t)})}function Tj(e,t){return new e({type:"number",checks:[],...Oe(t)})}function Dj(e,t){return new e({type:"number",coerce:!0,checks:[],...Oe(t)})}function Nj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Oe(t)})}function jj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Oe(t)})}function Lj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Oe(t)})}function Mj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Oe(t)})}function Fj(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Oe(t)})}function Wj(e,t){return new e({type:"boolean",...Oe(t)})}function Gj(e,t){return new e({type:"boolean",coerce:!0,...Oe(t)})}function Bj(e,t){return new e({type:"bigint",...Oe(t)})}function Uj(e,t){return new e({type:"bigint",coerce:!0,...Oe(t)})}function Hj(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Oe(t)})}function zj(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Oe(t)})}function qj(e,t){return new e({type:"symbol",...Oe(t)})}function Vj(e,t){return new e({type:"undefined",...Oe(t)})}function Kj(e,t){return new e({type:"null",...Oe(t)})}function Jj(e){return new e({type:"any"})}function Zj(e){return new e({type:"unknown"})}function Yj(e,t){return new e({type:"never",...Oe(t)})}function Qj(e,t){return new e({type:"void",...Oe(t)})}function Xj(e,t){return new e({type:"date",...Oe(t)})}function eL(e,t){return new e({type:"date",coerce:!0,...Oe(t)})}function tL(e,t){return new e({type:"nan",...Oe(t)})}function Ks(e,t){return new Ox({check:"less_than",...Oe(t),value:e,inclusive:!1})}function Qo(e,t){return new Ox({check:"less_than",...Oe(t),value:e,inclusive:!0})}function Js(e,t){return new Px({check:"greater_than",...Oe(t),value:e,inclusive:!1})}function Kr(e,t){return new Px({check:"greater_than",...Oe(t),value:e,inclusive:!0})}function dS(e){return Js(0,e)}function uS(e){return Ks(0,e)}function pS(e){return Qo(0,e)}function fS(e){return Kr(0,e)}function ul(e,t){return new GD({check:"multiple_of",...Oe(t),value:e})}function pl(e,t){return new HD({check:"max_size",...Oe(t),maximum:e})}function Zs(e,t){return new zD({check:"min_size",...Oe(t),minimum:e})}function iu(e,t){return new qD({check:"size_equals",...Oe(t),size:e})}function su(e,t){return new VD({check:"max_length",...Oe(t),maximum:e})}function Ka(e,t){return new KD({check:"min_length",...Oe(t),minimum:e})}function au(e,t){return new JD({check:"length_equals",...Oe(t),length:e})}function Sf(e,t){return new ZD({check:"string_format",format:"regex",...Oe(t),pattern:e})}function Ef(e){return new YD({check:"string_format",format:"lowercase",...Oe(e)})}function Of(e){return new QD({check:"string_format",format:"uppercase",...Oe(e)})}function Pf(e,t){return new XD({check:"string_format",format:"includes",...Oe(t),includes:e})}function Af(e,t){return new eN({check:"string_format",format:"starts_with",...Oe(t),prefix:e})}function Cf(e,t){return new tN({check:"string_format",format:"ends_with",...Oe(t),suffix:e})}function gS(e,t,n){return new nN({check:"property",property:e,schema:t,...Oe(n)})}function _f(e,t){return new rN({check:"mime_type",mime:e,...Oe(t)})}function ps(e){return new oN({check:"overwrite",tx:e})}function If(e){return ps(t=>t.normalize(e))}function Tf(){return ps(e=>e.trim())}function Df(){return ps(e=>e.toLowerCase())}function Nf(){return ps(e=>e.toUpperCase())}function jf(){return ps(e=>eD(e))}function nL(e,t,n){return new e({type:"array",element:t,...Oe(n)})}function G_e(e,t,n){return new e({type:"union",options:t,...Oe(n)})}function B_e(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Oe(n)})}function U_e(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...Oe(r)})}function H_e(e,t,n){return new e({type:"intersection",left:t,right:n})}function z_e(e,t,n,r){let o=n instanceof rt,i=o?r:n,s=o?n:null;return new e({type:"tuple",items:t,rest:s,...Oe(i)})}function q_e(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...Oe(r)})}function V_e(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...Oe(r)})}function K_e(e,t,n){return new e({type:"set",valueType:t,...Oe(n)})}function J_e(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:r,...Oe(n)})}function Z_e(e,t,n){return new e({type:"enum",entries:t,...Oe(n)})}function Y_e(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Oe(n)})}function rL(e,t){return new e({type:"file",...Oe(t)})}function Q_e(e,t){return new e({type:"transform",transform:t})}function X_e(e,t){return new e({type:"optional",innerType:t})}function e0e(e,t){return new e({type:"nullable",innerType:t})}function t0e(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():nD(n)}})}function n0e(e,t,n){return new e({type:"nonoptional",innerType:t,...Oe(n)})}function r0e(e,t){return new e({type:"success",innerType:t})}function o0e(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function i0e(e,t,n){return new e({type:"pipe",in:t,out:n})}function s0e(e,t){return new e({type:"readonly",innerType:t})}function a0e(e,t,n){return new e({type:"template_literal",parts:t,...Oe(n)})}function c0e(e,t){return new e({type:"lazy",getter:t})}function l0e(e,t){return new e({type:"promise",innerType:t})}function oL(e,t,n){let r=Oe(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function iL(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Oe(n)})}function sL(e){let t=V8(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(wf(r,n.value,t._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(wf(o))}},e(n.value,n)));return t}function V8(e,t){let n=new tn({check:"custom",...Oe(t)});return n._zod.check=e,n}function aL(e){let t=new tn({check:"describe"});return t._zod.onattach=[n=>{let r=vr.get(n)??{};vr.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function cL(e){let t=new tn({check:"meta"});return t._zod.onattach=[n=>{let r=vr.get(n)??{};vr.add(n,{...r,...e})}],t._zod.check=()=>{},t}function lL(e,t){let n=Oe(t),r=n.truthy??["true","1","yes","on","y","enabled"],o=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(f=>typeof f=="string"?f.toLowerCase():f),o=o.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(r),s=new Set(o),a=e.Codec??Fy,c=e.Boolean??Ly,l=e.String??ou,d=new l({type:"string",error:n.error}),u=new c({type:"boolean",error:n.error}),p=new a({type:"pipe",in:d,out:u,transform:((f,g)=>{let m=f;return n.case!=="sensitive"&&(m=m.toLowerCase()),i.has(m)?!0:s.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:g.value,inst:p,continue:!1}),{})}),reverseTransform:((f,g)=>f===!0?r[0]||"true":o[0]||"false"),error:n.error});return p}function Lf(e,t,n,r={}){let o=Oe(r),i={...Oe(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:a=>n.test(a),...o};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Pj,K8=x(()=>{Ax();By();wj();ze();Pj={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function fl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??vr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qt(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let p=s.schema,f=t.processors[o.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);f(e,t,p,d)}let u=e._zod.parent;u&&(s.ref||(s.ref=u),qt(u,t,d),t.seen.get(u).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&Jr(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function gl(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=r.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}let o=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(s[0])?.id,p=e.external.uri??(g=>g);if(u)return{ref:p(u)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${p("__shared")}#/${a}/${f}`}}if(s[1]===n)return{ref:"#"};let l=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);let d=a.schema;for(let u in d)delete d[u];d.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
45
45
 
46
- 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]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function ml(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){r(d);let p=e.seen.get(d),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===d)for(let m in c)m==="$ref"||m==="allOf"||m in l||delete c[m];if(f.$ref&&p.def)for(let m in c)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(c[m])===JSON.stringify(p.def[m])&&delete c[m]}let u=s._zod.parent;if(u&&u!==d){r(u);let p=e.seen.get(u);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())r(s[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Mf(t,"input",e.processors),output:Mf(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Jr(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Jr(r.element,n);if(r.type==="set")return Jr(r.valueType,n);if(r.type==="lazy")return Jr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Jr(r.innerType,n);if(r.type==="intersection")return Jr(r.left,n)||Jr(r.right,n);if(r.type==="record"||r.type==="map")return Jr(r.keyType,n)||Jr(r.valueType,n);if(r.type==="pipe")return Jr(r.in,n)||Jr(r.out,n);if(r.type==="object"){for(let o in r.shape)if(Jr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(Jr(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(Jr(o,n))return!0;return!!(r.rest&&Jr(r.rest,n))}return!1}var dL,Mf,zy=x(()=>{By();dL=(e,t={})=>n=>{let r=fl({...n,processors:t});return qt(e,r),gl(r,e),ml(r,e)},Mf=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=fl({...o??{},target:i,io:t,processors:n});return qt(e,s),gl(s,e),ml(s,e)}});function wS(e,t){if("_idmap"in e){let r=e,o=fl({...t,processors:mS}),i={};for(let c of r._idmap.entries()){let[l,d]=c;qt(d,o)}let s={},a={registry:r,uri:t?.uri,defs:i};o.external=a;for(let c of r._idmap.entries()){let[l,d]=c;gl(o,d),s[l]=ml(o,d)}if(Object.keys(i).length>0){let c=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let n=fl({...t,processors:mS});return qt(e,n),gl(n,e),ml(n,e)}var d0e,uL,pL,fL,gL,mL,hL,yL,wL,bL,vL,kL,RL,$L,xL,SL,EL,OL,PL,AL,CL,_L,IL,TL,DL,NL,hS,jL,LL,ML,FL,WL,GL,BL,UL,HL,zL,qL,yS,VL,mS,qy=x(()=>{zy();ze();d0e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uL=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=d0e[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},pL=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof s=="number"&&(o.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},fL=(e,t,n,r)=>{n.type="boolean"},gL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},mL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},hL=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},yL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},wL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bL=(e,t,n,r)=>{n.not={}},vL=(e,t,n,r)=>{},kL=(e,t,n,r)=>{},RL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},$L=(e,t,n,r)=>{let o=e._zod.def,i=Ey(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},xL=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},SL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},EL=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},OL=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(o,i)},PL=(e,t,n,r)=>{n.type="boolean"},AL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},CL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},_L=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},IL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},TL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},DL=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=qt(i.element,t,{...r,path:[...r.path,"items"]})},NL=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let l in s)o.properties[l]=qt(s[l],t,{...r,path:[...r.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=qt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},hS=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>qt(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},jL=(e,t,n,r)=>{let o=e._zod.def,i=qt(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=qt(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},LL=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>qt(p,t,{...r,path:[...r.path,s,f]})),l=i.rest?qt(i.rest,t,{...r,path:[...r.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,l&&(o.items=l)):t.target==="openapi-3.0"?(o.items={anyOf:c},l&&o.items.anyOf.push(l),o.minItems=c.length,l||(o.maxItems=c.length)):(o.items=c,l&&(o.additionalItems=l));let{minimum:d,maximum:u}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof u=="number"&&(o.maxItems=u)},ML=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=qt(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let u of c)o.patternProperties[u.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=qt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=qt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d)}},FL=(e,t,n,r)=>{let o=e._zod.def,i=qt(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},WL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},GL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},BL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},UL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},HL=(e,t,n,r)=>{let o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;qt(i,t,r);let s=t.seen.get(e);s.ref=i},zL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},qL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},yS=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},VL=(e,t,n,r)=>{let o=e._zod.innerType;qt(o,t,r);let i=t.seen.get(e);i.ref=o},mS={string:uL,number:pL,boolean:fL,bigint:gL,symbol:mL,null:hL,undefined:yL,void:wL,never:bL,any:vL,unknown:kL,date:RL,enum:$L,literal:xL,nan:SL,template_literal:EL,file:OL,success:PL,custom:AL,function:CL,transform:_L,map:IL,set:TL,array:DL,object:NL,union:hS,intersection:jL,tuple:LL,record:ML,nullable:FL,nonoptional:WL,default:GL,prefault:BL,catch:UL,pipe:HL,readonly:zL,promise:qL,optional:yS,lazy:VL}});var bS,J8=x(()=>{qy();zy();bS=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=fl({processors:mS,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return qt(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),gl(this.ctx,t);let r=ml(this.ctx,t),{"~standard":o,...i}=r;return i}}});var Z8={};var Y8=x(()=>{});var Ja={};me(Ja,{$ZodAny:()=>WN,$ZodArray:()=>zN,$ZodAsyncError:()=>us,$ZodBase64:()=>CN,$ZodBase64URL:()=>_N,$ZodBigInt:()=>jx,$ZodBigIntFormat:()=>jN,$ZodBoolean:()=>Ly,$ZodCIDRv4:()=>ON,$ZodCIDRv6:()=>PN,$ZodCUID:()=>mN,$ZodCUID2:()=>hN,$ZodCatch:()=>lj,$ZodCheck:()=>tn,$ZodCheckBigIntFormat:()=>UD,$ZodCheckEndsWith:()=>tN,$ZodCheckGreaterThan:()=>Px,$ZodCheckIncludes:()=>XD,$ZodCheckLengthEquals:()=>JD,$ZodCheckLessThan:()=>Ox,$ZodCheckLowerCase:()=>YD,$ZodCheckMaxLength:()=>VD,$ZodCheckMaxSize:()=>HD,$ZodCheckMimeType:()=>rN,$ZodCheckMinLength:()=>KD,$ZodCheckMinSize:()=>zD,$ZodCheckMultipleOf:()=>GD,$ZodCheckNumberFormat:()=>BD,$ZodCheckOverwrite:()=>oN,$ZodCheckProperty:()=>nN,$ZodCheckRegex:()=>ZD,$ZodCheckSizeEquals:()=>qD,$ZodCheckStartsWith:()=>eN,$ZodCheckStringFormat:()=>$f,$ZodCheckUpperCase:()=>QD,$ZodCodec:()=>Fy,$ZodCustom:()=>yj,$ZodCustomStringFormat:()=>DN,$ZodDate:()=>HN,$ZodDefault:()=>ij,$ZodDiscriminatedUnion:()=>KN,$ZodE164:()=>IN,$ZodEmail:()=>uN,$ZodEmoji:()=>fN,$ZodEncodeError:()=>sl,$ZodEnum:()=>XN,$ZodError:()=>_y,$ZodExactOptional:()=>rj,$ZodFile:()=>tj,$ZodFunction:()=>gj,$ZodGUID:()=>lN,$ZodIPv4:()=>xN,$ZodIPv6:()=>SN,$ZodISODate:()=>kN,$ZodISODateTime:()=>vN,$ZodISODuration:()=>$N,$ZodISOTime:()=>RN,$ZodIntersection:()=>JN,$ZodJWT:()=>TN,$ZodKSUID:()=>bN,$ZodLazy:()=>hj,$ZodLiteral:()=>ej,$ZodMAC:()=>EN,$ZodMap:()=>YN,$ZodNaN:()=>dj,$ZodNanoID:()=>gN,$ZodNever:()=>BN,$ZodNonOptional:()=>aj,$ZodNull:()=>FN,$ZodNullable:()=>oj,$ZodNumber:()=>Nx,$ZodNumberFormat:()=>NN,$ZodObject:()=>rZ,$ZodObjectJIT:()=>qN,$ZodOptional:()=>Mx,$ZodPipe:()=>uj,$ZodPrefault:()=>sj,$ZodPromise:()=>mj,$ZodReadonly:()=>pj,$ZodRealError:()=>$o,$ZodRecord:()=>ZN,$ZodRegistry:()=>Bx,$ZodSet:()=>QN,$ZodString:()=>ou,$ZodStringFormat:()=>Jt,$ZodSuccess:()=>cj,$ZodSymbol:()=>LN,$ZodTemplateLiteral:()=>fj,$ZodTransform:()=>nj,$ZodTuple:()=>Lx,$ZodType:()=>rt,$ZodULID:()=>yN,$ZodURL:()=>pN,$ZodUUID:()=>dN,$ZodUndefined:()=>MN,$ZodUnion:()=>My,$ZodUnknown:()=>GN,$ZodVoid:()=>UN,$ZodXID:()=>wN,$ZodXor:()=>VN,$brand:()=>ux,$constructor:()=>K,$input:()=>xj,$output:()=>$j,Doc:()=>jy,JSONSchema:()=>Z8,JSONSchemaGenerator:()=>bS,NEVER:()=>ZT,TimePrecision:()=>Pj,_any:()=>Jj,_array:()=>nL,_base64:()=>sS,_base64url:()=>aS,_bigint:()=>Bj,_boolean:()=>Wj,_catch:()=>o0e,_check:()=>V8,_cidrv4:()=>oS,_cidrv6:()=>iS,_coercedBigint:()=>Uj,_coercedBoolean:()=>Gj,_coercedDate:()=>eL,_coercedNumber:()=>Dj,_coercedString:()=>Ej,_cuid:()=>Yx,_cuid2:()=>Qx,_custom:()=>oL,_date:()=>Xj,_decode:()=>yx,_decodeAsync:()=>bx,_default:()=>t0e,_discriminatedUnion:()=>U_e,_e164:()=>cS,_email:()=>Hx,_emoji:()=>Jx,_encode:()=>hx,_encodeAsync:()=>wx,_endsWith:()=>Cf,_enum:()=>J_e,_file:()=>rL,_float32:()=>jj,_float64:()=>Lj,_gt:()=>Js,_gte:()=>Kr,_guid:()=>Uy,_includes:()=>Pf,_int:()=>Nj,_int32:()=>Mj,_int64:()=>Hj,_intersection:()=>H_e,_ipv4:()=>nS,_ipv6:()=>rS,_isoDate:()=>Cj,_isoDateTime:()=>Aj,_isoDuration:()=>Ij,_isoTime:()=>_j,_jwt:()=>lS,_ksuid:()=>tS,_lazy:()=>c0e,_length:()=>au,_literal:()=>Y_e,_lowercase:()=>Ef,_lt:()=>Ks,_lte:()=>Qo,_mac:()=>Oj,_map:()=>V_e,_max:()=>Qo,_maxLength:()=>su,_maxSize:()=>pl,_mime:()=>_f,_min:()=>Kr,_minLength:()=>Ka,_minSize:()=>Zs,_multipleOf:()=>ul,_nan:()=>tL,_nanoid:()=>Zx,_nativeEnum:()=>Z_e,_negative:()=>uS,_never:()=>Yj,_nonnegative:()=>fS,_nonoptional:()=>n0e,_nonpositive:()=>pS,_normalize:()=>If,_null:()=>Kj,_nullable:()=>e0e,_number:()=>Tj,_optional:()=>X_e,_overwrite:()=>ps,_parse:()=>bf,_parseAsync:()=>vf,_pipe:()=>i0e,_positive:()=>dS,_promise:()=>l0e,_property:()=>gS,_readonly:()=>s0e,_record:()=>q_e,_refine:()=>iL,_regex:()=>Sf,_safeDecode:()=>kx,_safeDecodeAsync:()=>$x,_safeEncode:()=>vx,_safeEncodeAsync:()=>Rx,_safeParse:()=>kf,_safeParseAsync:()=>Rf,_set:()=>K_e,_size:()=>iu,_slugify:()=>jf,_startsWith:()=>Af,_string:()=>Sj,_stringFormat:()=>Lf,_stringbool:()=>lL,_success:()=>r0e,_superRefine:()=>sL,_symbol:()=>qj,_templateLiteral:()=>a0e,_toLowerCase:()=>Df,_toUpperCase:()=>Nf,_transform:()=>Q_e,_trim:()=>Tf,_tuple:()=>z_e,_uint32:()=>Fj,_uint64:()=>zj,_ulid:()=>Xx,_undefined:()=>Vj,_union:()=>G_e,_unknown:()=>Zj,_uppercase:()=>Of,_url:()=>Hy,_uuid:()=>zx,_uuidv4:()=>qx,_uuidv6:()=>Vx,_uuidv7:()=>Kx,_void:()=>Qj,_xid:()=>eS,_xor:()=>B_e,clone:()=>Vr,config:()=>Sn,createStandardJSONSchemaMethod:()=>Mf,createToJSONSchemaMethod:()=>dL,decode:()=>pCe,decodeAsync:()=>gCe,describe:()=>aL,encode:()=>uCe,encodeAsync:()=>fCe,extractDefs:()=>gl,finalize:()=>ml,flattenError:()=>Iy,formatError:()=>Ty,globalConfig:()=>xy,globalRegistry:()=>vr,initializeContext:()=>fl,isValidBase64:()=>AN,isValidBase64URL:()=>X3,isValidJWT:()=>eZ,locales:()=>Gy,meta:()=>cL,parse:()=>gx,parseAsync:()=>mx,prettifyError:()=>cD,process:()=>qt,regexes:()=>$i,registry:()=>Ux,safeDecode:()=>hCe,safeDecodeAsync:()=>wCe,safeEncode:()=>mCe,safeEncodeAsync:()=>yCe,safeParse:()=>dD,safeParseAsync:()=>uD,toDotPath:()=>N3,toJSONSchema:()=>wS,treeifyError:()=>aD,util:()=>Ee,version:()=>sN});var xo=x(()=>{mf();pD();lD();wj();Ax();aN();ze();Ex();Rj();By();iN();K8();zy();qy();J8();Y8()});var vS={};me(vS,{endsWith:()=>Cf,gt:()=>Js,gte:()=>Kr,includes:()=>Pf,length:()=>au,lowercase:()=>Ef,lt:()=>Ks,lte:()=>Qo,maxLength:()=>su,maxSize:()=>pl,mime:()=>_f,minLength:()=>Ka,minSize:()=>Zs,multipleOf:()=>ul,negative:()=>uS,nonnegative:()=>fS,nonpositive:()=>pS,normalize:()=>If,overwrite:()=>ps,positive:()=>dS,property:()=>gS,regex:()=>Sf,size:()=>iu,slugify:()=>jf,startsWith:()=>Af,toLowerCase:()=>Df,toUpperCase:()=>Nf,trim:()=>Tf,uppercase:()=>Of});var kS=x(()=>{xo()});var Ff={};me(Ff,{ZodISODate:()=>$S,ZodISODateTime:()=>RS,ZodISODuration:()=>SS,ZodISOTime:()=>xS,date:()=>JL,datetime:()=>KL,duration:()=>YL,time:()=>ZL});function KL(e){return Aj(RS,e)}function JL(e){return Cj($S,e)}function ZL(e){return _j(xS,e)}function YL(e){return Ij(SS,e)}var RS,$S,xS,SS,Vy=x(()=>{xo();Jy();RS=K("ZodISODateTime",(e,t)=>{vN.init(e,t),Zt.init(e,t)});$S=K("ZodISODate",(e,t)=>{kN.init(e,t),Zt.init(e,t)});xS=K("ZodISOTime",(e,t)=>{RN.init(e,t),Zt.init(e,t)});SS=K("ZodISODuration",(e,t)=>{$N.init(e,t),Zt.init(e,t)})});var Q8,p0e,So,QL=x(()=>{xo();xo();ze();Q8=(e,t)=>{_y.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ty(e,n)},flatten:{value:n=>Iy(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,hf,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,hf,2)}},isEmpty:{get(){return e.issues.length===0}}})},p0e=K("ZodError",Q8),So=K("ZodError",Q8,{Parent:Error})});var XL,eM,tM,nM,rM,oM,iM,sM,aM,cM,lM,dM,uM=x(()=>{xo();QL();XL=bf(So),eM=vf(So),tM=kf(So),nM=Rf(So),rM=hx(So),oM=yx(So),iM=wx(So),sM=bx(So),aM=vx(So),cM=kx(So),lM=Rx(So),dM=$x(So)});var Ky={};me(Ky,{ZodAny:()=>bM,ZodArray:()=>$M,ZodBase64:()=>GS,ZodBase64URL:()=>BS,ZodBigInt:()=>zf,ZodBigIntFormat:()=>zS,ZodBoolean:()=>Hf,ZodCIDRv4:()=>FS,ZodCIDRv6:()=>WS,ZodCUID:()=>IS,ZodCUID2:()=>TS,ZodCatch:()=>zM,ZodCodec:()=>XS,ZodCustom:()=>sw,ZodCustomStringFormat:()=>Bf,ZodDate:()=>tw,ZodDefault:()=>FM,ZodDiscriminatedUnion:()=>SM,ZodE164:()=>US,ZodEmail:()=>AS,ZodEmoji:()=>CS,ZodEnum:()=>Wf,ZodExactOptional:()=>jM,ZodFile:()=>DM,ZodFunction:()=>e1,ZodGUID:()=>Zy,ZodIPv4:()=>LS,ZodIPv6:()=>MS,ZodIntersection:()=>EM,ZodJWT:()=>HS,ZodKSUID:()=>jS,ZodLazy:()=>YM,ZodLiteral:()=>TM,ZodMAC:()=>pM,ZodMap:()=>_M,ZodNaN:()=>VM,ZodNanoID:()=>_S,ZodNever:()=>kM,ZodNonOptional:()=>YS,ZodNull:()=>yM,ZodNullable:()=>MM,ZodNumber:()=>Uf,ZodNumberFormat:()=>lu,ZodObject:()=>rw,ZodOptional:()=>ZS,ZodPipe:()=>QS,ZodPrefault:()=>GM,ZodPromise:()=>XM,ZodReadonly:()=>KM,ZodRecord:()=>iw,ZodSet:()=>IM,ZodString:()=>Gf,ZodStringFormat:()=>Zt,ZodSuccess:()=>HM,ZodSymbol:()=>mM,ZodTemplateLiteral:()=>ZM,ZodTransform:()=>NM,ZodTuple:()=>PM,ZodType:()=>pt,ZodULID:()=>DS,ZodURL:()=>ew,ZodUUID:()=>Ys,ZodUndefined:()=>hM,ZodUnion:()=>ow,ZodUnknown:()=>vM,ZodVoid:()=>RM,ZodXID:()=>NS,ZodXor:()=>xM,_ZodString:()=>PS,_default:()=>WM,_function:()=>o7,any:()=>jY,array:()=>nw,base64:()=>bY,base64url:()=>vY,bigint:()=>_Y,boolean:()=>gM,catch:()=>qM,check:()=>i7,cidrv4:()=>yY,cidrv6:()=>wY,codec:()=>t7,cuid:()=>lY,cuid2:()=>dY,custom:()=>s7,date:()=>MY,describe:()=>a7,discriminatedUnion:()=>HY,e164:()=>kY,email:()=>X8,emoji:()=>aY,enum:()=>KS,exactOptional:()=>LM,file:()=>YY,float32:()=>OY,float64:()=>PY,function:()=>o7,guid:()=>eY,hash:()=>EY,hex:()=>SY,hostname:()=>xY,httpUrl:()=>sY,instanceof:()=>l7,int:()=>OS,int32:()=>AY,int64:()=>IY,intersection:()=>OM,ipv4:()=>gY,ipv6:()=>hY,json:()=>u7,jwt:()=>RY,keyof:()=>FY,ksuid:()=>fY,lazy:()=>QM,literal:()=>ZY,looseObject:()=>BY,looseRecord:()=>qY,mac:()=>mY,map:()=>VY,meta:()=>c7,nan:()=>e7,nanoid:()=>cY,nativeEnum:()=>JY,never:()=>qS,nonoptional:()=>UM,null:()=>wM,nullable:()=>Qy,nullish:()=>QY,number:()=>fM,object:()=>WY,optional:()=>Yy,partialRecord:()=>zY,pipe:()=>Xy,prefault:()=>BM,preprocess:()=>p7,promise:()=>r7,readonly:()=>JM,record:()=>CM,refine:()=>t1,set:()=>KY,strictObject:()=>GY,string:()=>ES,stringFormat:()=>$Y,stringbool:()=>d7,success:()=>XY,superRefine:()=>n1,symbol:()=>DY,templateLiteral:()=>n7,transform:()=>JS,tuple:()=>AM,uint32:()=>CY,uint64:()=>TY,ulid:()=>uY,undefined:()=>NY,union:()=>VS,unknown:()=>cu,url:()=>iY,uuid:()=>tY,uuidv4:()=>nY,uuidv6:()=>rY,uuidv7:()=>oY,void:()=>LY,xid:()=>pY,xor:()=>UY});function ES(e){return Sj(Gf,e)}function X8(e){return Hx(AS,e)}function eY(e){return Uy(Zy,e)}function tY(e){return zx(Ys,e)}function nY(e){return qx(Ys,e)}function rY(e){return Vx(Ys,e)}function oY(e){return Kx(Ys,e)}function iY(e){return Hy(ew,e)}function sY(e){return Hy(ew,{protocol:/^https?$/,hostname:$i.domain,...Ee.normalizeParams(e)})}function aY(e){return Jx(CS,e)}function cY(e){return Zx(_S,e)}function lY(e){return Yx(IS,e)}function dY(e){return Qx(TS,e)}function uY(e){return Xx(DS,e)}function pY(e){return eS(NS,e)}function fY(e){return tS(jS,e)}function gY(e){return nS(LS,e)}function mY(e){return Oj(pM,e)}function hY(e){return rS(MS,e)}function yY(e){return oS(FS,e)}function wY(e){return iS(WS,e)}function bY(e){return sS(GS,e)}function vY(e){return aS(BS,e)}function kY(e){return cS(US,e)}function RY(e){return lS(HS,e)}function $Y(e,t,n={}){return Lf(Bf,e,t,n)}function xY(e){return Lf(Bf,"hostname",$i.hostname,e)}function SY(e){return Lf(Bf,"hex",$i.hex,e)}function EY(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=$i[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return Lf(Bf,r,o,t)}function fM(e){return Tj(Uf,e)}function OS(e){return Nj(lu,e)}function OY(e){return jj(lu,e)}function PY(e){return Lj(lu,e)}function AY(e){return Mj(lu,e)}function CY(e){return Fj(lu,e)}function gM(e){return Wj(Hf,e)}function _Y(e){return Bj(zf,e)}function IY(e){return Hj(zS,e)}function TY(e){return zj(zS,e)}function DY(e){return qj(mM,e)}function NY(e){return Vj(hM,e)}function wM(e){return Kj(yM,e)}function jY(){return Jj(bM)}function cu(){return Zj(vM)}function qS(e){return Yj(kM,e)}function LY(e){return Qj(RM,e)}function MY(e){return Xj(tw,e)}function nw(e,t){return nL($M,e,t)}function FY(e){let t=e._zod.def.shape;return KS(Object.keys(t))}function WY(e,t){let n={type:"object",shape:e??{},...Ee.normalizeParams(t)};return new rw(n)}function GY(e,t){return new rw({type:"object",shape:e,catchall:qS(),...Ee.normalizeParams(t)})}function BY(e,t){return new rw({type:"object",shape:e,catchall:cu(),...Ee.normalizeParams(t)})}function VS(e,t){return new ow({type:"union",options:e,...Ee.normalizeParams(t)})}function UY(e,t){return new xM({type:"union",options:e,inclusive:!1,...Ee.normalizeParams(t)})}function HY(e,t,n){return new SM({type:"union",options:t,discriminator:e,...Ee.normalizeParams(n)})}function OM(e,t){return new EM({type:"intersection",left:e,right:t})}function AM(e,t,n){let r=t instanceof rt,o=r?n:t,i=r?t:null;return new PM({type:"tuple",items:e,rest:i,...Ee.normalizeParams(o)})}function CM(e,t,n){return new iw({type:"record",keyType:e,valueType:t,...Ee.normalizeParams(n)})}function zY(e,t,n){let r=Vr(e);return r._zod.values=void 0,new iw({type:"record",keyType:r,valueType:t,...Ee.normalizeParams(n)})}function qY(e,t,n){return new iw({type:"record",keyType:e,valueType:t,mode:"loose",...Ee.normalizeParams(n)})}function VY(e,t,n){return new _M({type:"map",keyType:e,valueType:t,...Ee.normalizeParams(n)})}function KY(e,t){return new IM({type:"set",valueType:e,...Ee.normalizeParams(t)})}function KS(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Wf({type:"enum",entries:n,...Ee.normalizeParams(t)})}function JY(e,t){return new Wf({type:"enum",entries:e,...Ee.normalizeParams(t)})}function ZY(e,t){return new TM({type:"literal",values:Array.isArray(e)?e:[e],...Ee.normalizeParams(t)})}function YY(e){return rL(DM,e)}function JS(e){return new NM({type:"transform",transform:e})}function Yy(e){return new ZS({type:"optional",innerType:e})}function LM(e){return new jM({type:"optional",innerType:e})}function Qy(e){return new MM({type:"nullable",innerType:e})}function QY(e){return Yy(Qy(e))}function WM(e,t){return new FM({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function BM(e,t){return new GM({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function UM(e,t){return new YS({type:"nonoptional",innerType:e,...Ee.normalizeParams(t)})}function XY(e){return new HM({type:"success",innerType:e})}function qM(e,t){return new zM({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function e7(e){return tL(VM,e)}function Xy(e,t){return new QS({type:"pipe",in:e,out:t})}function t7(e,t,n){return new XS({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function JM(e){return new KM({type:"readonly",innerType:e})}function n7(e,t){return new ZM({type:"template_literal",parts:e,...Ee.normalizeParams(t)})}function QM(e){return new YM({type:"lazy",getter:e})}function r7(e){return new XM({type:"promise",innerType:e})}function o7(e){return new e1({type:"function",input:Array.isArray(e?.input)?AM(e?.input):e?.input??nw(cu()),output:e?.output??cu()})}function i7(e){let t=new tn({check:"custom"});return t._zod.check=e,t}function s7(e,t){return oL(sw,e??(()=>!0),t)}function t1(e,t={}){return iL(sw,e,t)}function n1(e){return sL(e)}function l7(e,t={}){let n=new sw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ee.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function u7(e){let t=QM(()=>VS([ES(e),fM(),gM(),wM(),nw(t),CM(ES(),t)]));return t}function p7(e,t){return Xy(JS(e),t)}var pt,PS,Gf,Zt,AS,Zy,Ys,ew,CS,_S,IS,TS,DS,NS,jS,LS,pM,MS,FS,WS,GS,BS,US,HS,Bf,Uf,lu,Hf,zf,zS,mM,hM,yM,bM,vM,kM,RM,tw,$M,rw,ow,xM,SM,EM,PM,iw,_M,IM,Wf,TM,DM,NM,ZS,jM,MM,FM,GM,YS,HM,zM,VM,QS,XS,KM,ZM,YM,XM,e1,sw,a7,c7,d7,Jy=x(()=>{xo();xo();qy();zy();kS();Vy();uM();pt=K("ZodType",(e,t)=>(rt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Mf(e,"input"),output:Mf(e,"output")}}),e.toJSONSchema=dL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ee.mergeDefs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Vr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>XL(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>tM(e,n,r),e.parseAsync=async(n,r)=>eM(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>nM(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>rM(e,n,r),e.decode=(n,r)=>oM(e,n,r),e.encodeAsync=async(n,r)=>iM(e,n,r),e.decodeAsync=async(n,r)=>sM(e,n,r),e.safeEncode=(n,r)=>aM(e,n,r),e.safeDecode=(n,r)=>cM(e,n,r),e.safeEncodeAsync=async(n,r)=>lM(e,n,r),e.safeDecodeAsync=async(n,r)=>dM(e,n,r),e.refine=(n,r)=>e.check(t1(n,r)),e.superRefine=n=>e.check(n1(n)),e.overwrite=n=>e.check(ps(n)),e.optional=()=>Yy(e),e.exactOptional=()=>LM(e),e.nullable=()=>Qy(e),e.nullish=()=>Yy(Qy(e)),e.nonoptional=n=>UM(e,n),e.array=()=>nw(e),e.or=n=>VS([e,n]),e.and=n=>OM(e,n),e.transform=n=>Xy(e,JS(n)),e.default=n=>WM(e,n),e.prefault=n=>BM(e,n),e.catch=n=>qM(e,n),e.pipe=n=>Xy(e,n),e.readonly=()=>JM(e),e.describe=n=>{let r=e.clone();return vr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return vr.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return vr.get(e);let r=e.clone();return vr.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),PS=K("_ZodString",(e,t)=>{ou.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>uL(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Sf(...r)),e.includes=(...r)=>e.check(Pf(...r)),e.startsWith=(...r)=>e.check(Af(...r)),e.endsWith=(...r)=>e.check(Cf(...r)),e.min=(...r)=>e.check(Ka(...r)),e.max=(...r)=>e.check(su(...r)),e.length=(...r)=>e.check(au(...r)),e.nonempty=(...r)=>e.check(Ka(1,...r)),e.lowercase=r=>e.check(Ef(r)),e.uppercase=r=>e.check(Of(r)),e.trim=()=>e.check(Tf()),e.normalize=(...r)=>e.check(If(...r)),e.toLowerCase=()=>e.check(Df()),e.toUpperCase=()=>e.check(Nf()),e.slugify=()=>e.check(jf())}),Gf=K("ZodString",(e,t)=>{ou.init(e,t),PS.init(e,t),e.email=n=>e.check(Hx(AS,n)),e.url=n=>e.check(Hy(ew,n)),e.jwt=n=>e.check(lS(HS,n)),e.emoji=n=>e.check(Jx(CS,n)),e.guid=n=>e.check(Uy(Zy,n)),e.uuid=n=>e.check(zx(Ys,n)),e.uuidv4=n=>e.check(qx(Ys,n)),e.uuidv6=n=>e.check(Vx(Ys,n)),e.uuidv7=n=>e.check(Kx(Ys,n)),e.nanoid=n=>e.check(Zx(_S,n)),e.guid=n=>e.check(Uy(Zy,n)),e.cuid=n=>e.check(Yx(IS,n)),e.cuid2=n=>e.check(Qx(TS,n)),e.ulid=n=>e.check(Xx(DS,n)),e.base64=n=>e.check(sS(GS,n)),e.base64url=n=>e.check(aS(BS,n)),e.xid=n=>e.check(eS(NS,n)),e.ksuid=n=>e.check(tS(jS,n)),e.ipv4=n=>e.check(nS(LS,n)),e.ipv6=n=>e.check(rS(MS,n)),e.cidrv4=n=>e.check(oS(FS,n)),e.cidrv6=n=>e.check(iS(WS,n)),e.e164=n=>e.check(cS(US,n)),e.datetime=n=>e.check(KL(n)),e.date=n=>e.check(JL(n)),e.time=n=>e.check(ZL(n)),e.duration=n=>e.check(YL(n))});Zt=K("ZodStringFormat",(e,t)=>{Jt.init(e,t),PS.init(e,t)}),AS=K("ZodEmail",(e,t)=>{uN.init(e,t),Zt.init(e,t)});Zy=K("ZodGUID",(e,t)=>{lN.init(e,t),Zt.init(e,t)});Ys=K("ZodUUID",(e,t)=>{dN.init(e,t),Zt.init(e,t)});ew=K("ZodURL",(e,t)=>{pN.init(e,t),Zt.init(e,t)});CS=K("ZodEmoji",(e,t)=>{fN.init(e,t),Zt.init(e,t)});_S=K("ZodNanoID",(e,t)=>{gN.init(e,t),Zt.init(e,t)});IS=K("ZodCUID",(e,t)=>{mN.init(e,t),Zt.init(e,t)});TS=K("ZodCUID2",(e,t)=>{hN.init(e,t),Zt.init(e,t)});DS=K("ZodULID",(e,t)=>{yN.init(e,t),Zt.init(e,t)});NS=K("ZodXID",(e,t)=>{wN.init(e,t),Zt.init(e,t)});jS=K("ZodKSUID",(e,t)=>{bN.init(e,t),Zt.init(e,t)});LS=K("ZodIPv4",(e,t)=>{xN.init(e,t),Zt.init(e,t)});pM=K("ZodMAC",(e,t)=>{EN.init(e,t),Zt.init(e,t)});MS=K("ZodIPv6",(e,t)=>{SN.init(e,t),Zt.init(e,t)});FS=K("ZodCIDRv4",(e,t)=>{ON.init(e,t),Zt.init(e,t)});WS=K("ZodCIDRv6",(e,t)=>{PN.init(e,t),Zt.init(e,t)});GS=K("ZodBase64",(e,t)=>{CN.init(e,t),Zt.init(e,t)});BS=K("ZodBase64URL",(e,t)=>{_N.init(e,t),Zt.init(e,t)});US=K("ZodE164",(e,t)=>{IN.init(e,t),Zt.init(e,t)});HS=K("ZodJWT",(e,t)=>{TN.init(e,t),Zt.init(e,t)});Bf=K("ZodCustomStringFormat",(e,t)=>{DN.init(e,t),Zt.init(e,t)});Uf=K("ZodNumber",(e,t)=>{Nx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>pL(e,r,o,i),e.gt=(r,o)=>e.check(Js(r,o)),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.lt=(r,o)=>e.check(Ks(r,o)),e.lte=(r,o)=>e.check(Qo(r,o)),e.max=(r,o)=>e.check(Qo(r,o)),e.int=r=>e.check(OS(r)),e.safe=r=>e.check(OS(r)),e.positive=r=>e.check(Js(0,r)),e.nonnegative=r=>e.check(Kr(0,r)),e.negative=r=>e.check(Ks(0,r)),e.nonpositive=r=>e.check(Qo(0,r)),e.multipleOf=(r,o)=>e.check(ul(r,o)),e.step=(r,o)=>e.check(ul(r,o)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});lu=K("ZodNumberFormat",(e,t)=>{NN.init(e,t),Uf.init(e,t)});Hf=K("ZodBoolean",(e,t)=>{Ly.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fL(e,n,r,o)});zf=K("ZodBigInt",(e,t)=>{jx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>gL(e,r,o,i),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.gt=(r,o)=>e.check(Js(r,o)),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.lt=(r,o)=>e.check(Ks(r,o)),e.lte=(r,o)=>e.check(Qo(r,o)),e.max=(r,o)=>e.check(Qo(r,o)),e.positive=r=>e.check(Js(BigInt(0),r)),e.negative=r=>e.check(Ks(BigInt(0),r)),e.nonpositive=r=>e.check(Qo(BigInt(0),r)),e.nonnegative=r=>e.check(Kr(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(ul(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});zS=K("ZodBigIntFormat",(e,t)=>{jN.init(e,t),zf.init(e,t)});mM=K("ZodSymbol",(e,t)=>{LN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mL(e,n,r,o)});hM=K("ZodUndefined",(e,t)=>{MN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yL(e,n,r,o)});yM=K("ZodNull",(e,t)=>{FN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hL(e,n,r,o)});bM=K("ZodAny",(e,t)=>{WN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vL(e,n,r,o)});vM=K("ZodUnknown",(e,t)=>{GN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kL(e,n,r,o)});kM=K("ZodNever",(e,t)=>{BN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bL(e,n,r,o)});RM=K("ZodVoid",(e,t)=>{UN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wL(e,n,r,o)});tw=K("ZodDate",(e,t)=>{HN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>RL(e,r,o,i),e.min=(r,o)=>e.check(Kr(r,o)),e.max=(r,o)=>e.check(Qo(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});$M=K("ZodArray",(e,t)=>{zN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>DL(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Ka(n,r)),e.nonempty=n=>e.check(Ka(1,n)),e.max=(n,r)=>e.check(su(n,r)),e.length=(n,r)=>e.check(au(n,r)),e.unwrap=()=>e.element});rw=K("ZodObject",(e,t)=>{qN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>NL(e,n,r,o),Ee.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>KS(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cu()}),e.loose=()=>e.clone({...e._zod.def,catchall:cu()}),e.strict=()=>e.clone({...e._zod.def,catchall:qS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ee.extend(e,n),e.safeExtend=n=>Ee.safeExtend(e,n),e.merge=n=>Ee.merge(e,n),e.pick=n=>Ee.pick(e,n),e.omit=n=>Ee.omit(e,n),e.partial=(...n)=>Ee.partial(ZS,e,n[0]),e.required=(...n)=>Ee.required(YS,e,n[0])});ow=K("ZodUnion",(e,t)=>{My.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hS(e,n,r,o),e.options=t.options});xM=K("ZodXor",(e,t)=>{ow.init(e,t),VN.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hS(e,n,r,o),e.options=t.options});SM=K("ZodDiscriminatedUnion",(e,t)=>{ow.init(e,t),KN.init(e,t)});EM=K("ZodIntersection",(e,t)=>{JN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jL(e,n,r,o)});PM=K("ZodTuple",(e,t)=>{Lx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>LL(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});iw=K("ZodRecord",(e,t)=>{ZN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ML(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});_M=K("ZodMap",(e,t)=>{YN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>IL(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Zs(...n)),e.nonempty=n=>e.check(Zs(1,n)),e.max=(...n)=>e.check(pl(...n)),e.size=(...n)=>e.check(iu(...n))});IM=K("ZodSet",(e,t)=>{QN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>TL(e,n,r,o),e.min=(...n)=>e.check(Zs(...n)),e.nonempty=n=>e.check(Zs(1,n)),e.max=(...n)=>e.check(pl(...n)),e.size=(...n)=>e.check(iu(...n))});Wf=K("ZodEnum",(e,t)=>{XN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>$L(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Wf({...t,checks:[],...Ee.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Wf({...t,checks:[],...Ee.normalizeParams(o),entries:i})}});TM=K("ZodLiteral",(e,t)=>{ej.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xL(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});DM=K("ZodFile",(e,t)=>{tj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>OL(e,n,r,o),e.min=(n,r)=>e.check(Zs(n,r)),e.max=(n,r)=>e.check(pl(n,r)),e.mime=(n,r)=>e.check(_f(Array.isArray(n)?n:[n],r))});NM=K("ZodTransform",(e,t)=>{nj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_L(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new sl(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ee.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Ee.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});ZS=K("ZodOptional",(e,t)=>{Mx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yS(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});jM=K("ZodExactOptional",(e,t)=>{rj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yS(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});MM=K("ZodNullable",(e,t)=>{oj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>FL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});FM=K("ZodDefault",(e,t)=>{ij.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});GM=K("ZodPrefault",(e,t)=>{sj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});YS=K("ZodNonOptional",(e,t)=>{aj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});HM=K("ZodSuccess",(e,t)=>{cj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>PL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});zM=K("ZodCatch",(e,t)=>{lj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>UL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});VM=K("ZodNaN",(e,t)=>{dj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>SL(e,n,r,o)});QS=K("ZodPipe",(e,t)=>{uj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>HL(e,n,r,o),e.in=t.in,e.out=t.out});XS=K("ZodCodec",(e,t)=>{QS.init(e,t),Fy.init(e,t)});KM=K("ZodReadonly",(e,t)=>{pj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ZM=K("ZodTemplateLiteral",(e,t)=>{fj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>EL(e,n,r,o)});YM=K("ZodLazy",(e,t)=>{hj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VL(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});XM=K("ZodPromise",(e,t)=>{mj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});e1=K("ZodFunction",(e,t)=>{gj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>CL(e,n,r,o)});sw=K("ZodCustom",(e,t)=>{yj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>AL(e,n,r,o)});a7=aL,c7=cL;d7=(...e)=>lL({Codec:XS,Boolean:Hf,String:Gf},...e)});function m0e(e){Sn({customError:e})}function h0e(){return Sn().customError}var g0e,r1,f7=x(()=>{xo();xo();g0e={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"};r1||(r1={})});function w0e(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function b0e(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function g7(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ie.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Ie.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=b0e(o,t),s=Ir(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Ie.null();if(o.length===0)return Ie.never();if(o.length===1)return Ie.literal(o[0]);if(o.every(s=>typeof s=="string"))return Ie.enum(o);let i=o.map(s=>Ie.literal(s));return i.length<2?i[0]:Ie.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return g7(s,t)});return o.length===0?Ie.never():o.length===1?o[0]:Ie.union(o)}if(!n)return Ie.any();let r;switch(n){case"string":{let o=Ie.string();if(e.format){let i=e.format;i==="email"?o=o.check(Ie.email()):i==="uri"||i==="uri-reference"?o=o.check(Ie.url()):i==="uuid"||i==="guid"?o=o.check(Ie.uuid()):i==="date-time"?o=o.check(Ie.iso.datetime()):i==="date"?o=o.check(Ie.iso.date()):i==="time"?o=o.check(Ie.iso.time()):i==="duration"?o=o.check(Ie.iso.duration()):i==="ipv4"?o=o.check(Ie.ipv4()):i==="ipv6"?o=o.check(Ie.ipv6()):i==="mac"?o=o.check(Ie.mac()):i==="cidr"?o=o.check(Ie.cidrv4()):i==="cidr-v6"?o=o.check(Ie.cidrv6()):i==="base64"?o=o.check(Ie.base64()):i==="base64url"?o=o.check(Ie.base64url()):i==="e164"?o=o.check(Ie.e164()):i==="jwt"?o=o.check(Ie.jwt()):i==="emoji"?o=o.check(Ie.emoji()):i==="nanoid"?o=o.check(Ie.nanoid()):i==="cuid"?o=o.check(Ie.cuid()):i==="cuid2"?o=o.check(Ie.cuid2()):i==="ulid"?o=o.check(Ie.ulid()):i==="xid"?o=o.check(Ie.xid()):i==="ksuid"&&(o=o.check(Ie.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Ie.number().int():Ie.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Ie.boolean();break}case"null":{r=Ie.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=Ir(l,t);o[c]=s.has(c)?d:d.optional()}if(e.propertyNames){let c=Ir(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Ir(e.additionalProperties,t):Ie.any();if(Object.keys(o).length===0){r=Ie.record(c,l);break}let d=Ie.object(o).passthrough(),u=Ie.looseRecord(c,l);r=Ie.intersection(d,u);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let p of l){let f=Ir(c[p],t),g=Ie.string().regex(new RegExp(p));d.push(Ie.looseRecord(g,f))}let u=[];if(Object.keys(o).length>0&&u.push(Ie.object(o).passthrough()),u.push(...d),u.length===0)r=Ie.object({}).passthrough();else if(u.length===1)r=u[0];else{let p=Ie.intersection(u[0],u[1]);for(let f=2;f<u.length;f++)p=Ie.intersection(p,u[f]);r=p}break}let a=Ie.object(o);e.additionalProperties===!1?r=a.strict():typeof e.additionalProperties=="object"?r=a.catchall(Ir(e.additionalProperties,t)):r=a.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(c=>Ir(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?Ir(i,t):void 0;a?r=Ie.tuple(s).rest(a):r=Ie.tuple(s),typeof e.minItems=="number"&&(r=r.check(Ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ie.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(c=>Ir(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Ir(e.additionalItems,t):void 0;a?r=Ie.tuple(s).rest(a):r=Ie.tuple(s),typeof e.minItems=="number"&&(r=r.check(Ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ie.maxLength(e.maxItems)))}else if(i!==void 0){let s=Ir(i,t),a=Ie.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),r=a}else r=Ie.array(Ie.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function Ir(e,t){if(typeof e=="boolean")return e?Ie.any():Ie.never();let n=g7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(l=>Ir(l,t)),c=Ie.union(a);n=r?Ie.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(l=>Ir(l,t)),c=Ie.xor(a);n=r?Ie.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Ie.any();else{let a=r?n:Ir(e.allOf[0],t),c=r?0:1;for(let l=c;l<e.allOf.length;l++)a=Ie.intersection(a,Ir(e.allOf[l],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Ie.nullable(n)),e.readOnly===!0&&(n=Ie.readonly(n));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(o[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(o[a]=e[a]);for(let a of Object.keys(e))y0e.has(a)||(o[a]=e[a]);return Object.keys(o).length>0&&t.registry.add(n,o),n}function m7(e,t){if(typeof e=="boolean")return e?Ie.any():Ie.never();let n=w0e(e,t?.defaultTarget),r=e.$defs||e.definitions||{},o={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??vr};return Ir(e,o)}var Ie,y0e,h7=x(()=>{By();kS();Vy();Jy();Ie={...Ky,...vS,iso:Ff},y0e=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"])});var o1={};me(o1,{bigint:()=>$0e,boolean:()=>R0e,date:()=>x0e,number:()=>k0e,string:()=>v0e});function v0e(e){return Ej(Gf,e)}function k0e(e){return Dj(Uf,e)}function R0e(e){return Gj(Hf,e)}function $0e(e){return Uj(zf,e)}function x0e(e){return eL(tw,e)}var y7=x(()=>{xo();Jy()});var w={};me(w,{$brand:()=>ux,$input:()=>xj,$output:()=>$j,NEVER:()=>ZT,TimePrecision:()=>Pj,ZodAny:()=>bM,ZodArray:()=>$M,ZodBase64:()=>GS,ZodBase64URL:()=>BS,ZodBigInt:()=>zf,ZodBigIntFormat:()=>zS,ZodBoolean:()=>Hf,ZodCIDRv4:()=>FS,ZodCIDRv6:()=>WS,ZodCUID:()=>IS,ZodCUID2:()=>TS,ZodCatch:()=>zM,ZodCodec:()=>XS,ZodCustom:()=>sw,ZodCustomStringFormat:()=>Bf,ZodDate:()=>tw,ZodDefault:()=>FM,ZodDiscriminatedUnion:()=>SM,ZodE164:()=>US,ZodEmail:()=>AS,ZodEmoji:()=>CS,ZodEnum:()=>Wf,ZodError:()=>p0e,ZodExactOptional:()=>jM,ZodFile:()=>DM,ZodFirstPartyTypeKind:()=>r1,ZodFunction:()=>e1,ZodGUID:()=>Zy,ZodIPv4:()=>LS,ZodIPv6:()=>MS,ZodISODate:()=>$S,ZodISODateTime:()=>RS,ZodISODuration:()=>SS,ZodISOTime:()=>xS,ZodIntersection:()=>EM,ZodIssueCode:()=>g0e,ZodJWT:()=>HS,ZodKSUID:()=>jS,ZodLazy:()=>YM,ZodLiteral:()=>TM,ZodMAC:()=>pM,ZodMap:()=>_M,ZodNaN:()=>VM,ZodNanoID:()=>_S,ZodNever:()=>kM,ZodNonOptional:()=>YS,ZodNull:()=>yM,ZodNullable:()=>MM,ZodNumber:()=>Uf,ZodNumberFormat:()=>lu,ZodObject:()=>rw,ZodOptional:()=>ZS,ZodPipe:()=>QS,ZodPrefault:()=>GM,ZodPromise:()=>XM,ZodReadonly:()=>KM,ZodRealError:()=>So,ZodRecord:()=>iw,ZodSet:()=>IM,ZodString:()=>Gf,ZodStringFormat:()=>Zt,ZodSuccess:()=>HM,ZodSymbol:()=>mM,ZodTemplateLiteral:()=>ZM,ZodTransform:()=>NM,ZodTuple:()=>PM,ZodType:()=>pt,ZodULID:()=>DS,ZodURL:()=>ew,ZodUUID:()=>Ys,ZodUndefined:()=>hM,ZodUnion:()=>ow,ZodUnknown:()=>vM,ZodVoid:()=>RM,ZodXID:()=>NS,ZodXor:()=>xM,_ZodString:()=>PS,_default:()=>WM,_function:()=>o7,any:()=>jY,array:()=>nw,base64:()=>bY,base64url:()=>vY,bigint:()=>_Y,boolean:()=>gM,catch:()=>qM,check:()=>i7,cidrv4:()=>yY,cidrv6:()=>wY,clone:()=>Vr,codec:()=>t7,coerce:()=>o1,config:()=>Sn,core:()=>Ja,cuid:()=>lY,cuid2:()=>dY,custom:()=>s7,date:()=>MY,decode:()=>oM,decodeAsync:()=>sM,describe:()=>a7,discriminatedUnion:()=>HY,e164:()=>kY,email:()=>X8,emoji:()=>aY,encode:()=>rM,encodeAsync:()=>iM,endsWith:()=>Cf,enum:()=>KS,exactOptional:()=>LM,file:()=>YY,flattenError:()=>Iy,float32:()=>OY,float64:()=>PY,formatError:()=>Ty,fromJSONSchema:()=>m7,function:()=>o7,getErrorMap:()=>h0e,globalRegistry:()=>vr,gt:()=>Js,gte:()=>Kr,guid:()=>eY,hash:()=>EY,hex:()=>SY,hostname:()=>xY,httpUrl:()=>sY,includes:()=>Pf,instanceof:()=>l7,int:()=>OS,int32:()=>AY,int64:()=>IY,intersection:()=>OM,ipv4:()=>gY,ipv6:()=>hY,iso:()=>Ff,json:()=>u7,jwt:()=>RY,keyof:()=>FY,ksuid:()=>fY,lazy:()=>QM,length:()=>au,literal:()=>ZY,locales:()=>Gy,looseObject:()=>BY,looseRecord:()=>qY,lowercase:()=>Ef,lt:()=>Ks,lte:()=>Qo,mac:()=>mY,map:()=>VY,maxLength:()=>su,maxSize:()=>pl,meta:()=>c7,mime:()=>_f,minLength:()=>Ka,minSize:()=>Zs,multipleOf:()=>ul,nan:()=>e7,nanoid:()=>cY,nativeEnum:()=>JY,negative:()=>uS,never:()=>qS,nonnegative:()=>fS,nonoptional:()=>UM,nonpositive:()=>pS,normalize:()=>If,null:()=>wM,nullable:()=>Qy,nullish:()=>QY,number:()=>fM,object:()=>WY,optional:()=>Yy,overwrite:()=>ps,parse:()=>XL,parseAsync:()=>eM,partialRecord:()=>zY,pipe:()=>Xy,positive:()=>dS,prefault:()=>BM,preprocess:()=>p7,prettifyError:()=>cD,promise:()=>r7,property:()=>gS,readonly:()=>JM,record:()=>CM,refine:()=>t1,regex:()=>Sf,regexes:()=>$i,registry:()=>Ux,safeDecode:()=>cM,safeDecodeAsync:()=>dM,safeEncode:()=>aM,safeEncodeAsync:()=>lM,safeParse:()=>tM,safeParseAsync:()=>nM,set:()=>KY,setErrorMap:()=>m0e,size:()=>iu,slugify:()=>jf,startsWith:()=>Af,strictObject:()=>GY,string:()=>ES,stringFormat:()=>$Y,stringbool:()=>d7,success:()=>XY,superRefine:()=>n1,symbol:()=>DY,templateLiteral:()=>n7,toJSONSchema:()=>wS,toLowerCase:()=>Df,toUpperCase:()=>Nf,transform:()=>JS,treeifyError:()=>aD,trim:()=>Tf,tuple:()=>AM,uint32:()=>CY,uint64:()=>TY,ulid:()=>uY,undefined:()=>NY,union:()=>VS,unknown:()=>cu,uppercase:()=>Of,url:()=>iY,util:()=>Ee,uuid:()=>tY,uuidv4:()=>nY,uuidv6:()=>rY,uuidv7:()=>oY,void:()=>LY,xid:()=>pY,xor:()=>UY});var i1=x(()=>{xo();Jy();kS();QL();uM();f7();xo();bj();xo();qy();h7();Rj();Vy();Vy();y7();Sn(Fx())});var Jn=x(()=>{i1();i1()});function s1(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)|0;return Math.abs(t).toString(16).padStart(8,"0")}function eE(e){return e.replace(/[^a-zA-Z0-9.-]/g,"-")}function w7(e,t){let n=i=>`SPDXRef-Package-${t}${eE(i)}`,r=e.map(i=>({name:i.name,SPDXID:n(i.name),versionInfo:i.version??"NOASSERTION",downloadLocation:i.downloadLocation??"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION",...i.purl?{externalRefs:[{referenceCategory:"PACKAGE-MANAGER",referenceType:"purl",referenceLocator:i.purl}]}:{}})),o=e.flatMap(i=>(i.dependsOn??[]).map(s=>({spdxElementId:n(i.name),relationshipType:"DEPENDS_ON",relatedSpdxElement:n(s)})));return{packages:r,relationships:o}}function S0e(e,t=()=>new Date){let n="SPDXRef-DOCUMENT",r=`SPDXRef-Package-${eE(e.subjectName)}`,{packages:o,relationships:i}=w7(e.packages,""),s=[{spdxElementId:n,relationshipType:"DESCRIBES",relatedSpdxElement:r},...i],a=[];(e.subDocuments??[]).forEach((l,d)=>{let u=`SPDXRef-Package-sub${d}-${eE(l.subjectName)}`;a.push({name:l.subjectName,SPDXID:u,versionInfo:l.subjectVersion??"NOASSERTION",downloadLocation:"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION",comment:`subjectId: ${l.subjectId}`}),s.push({spdxElementId:r,relationshipType:"CONTAINS",relatedSpdxElement:u});let{packages:p,relationships:f}=w7(l.packages,`sub${d}-`);a.push(...p),s.push(...p.map(g=>({spdxElementId:u,relationshipType:"CONTAINS",relatedSpdxElement:g.SPDXID})),...f)});let c={spdxVersion:"SPDX-2.3",dataLicense:"CC0-1.0",SPDXID:n,name:e.subjectName,documentNamespace:`https://chant.dev/spdxdocs/${eE(e.subjectName)}-${s1(e.subjectId)}`,creationInfo:{created:t().toISOString(),creators:[`Tool: ${e.generator}`]},packages:[{name:e.subjectName,SPDXID:r,versionInfo:e.subjectVersion??"NOASSERTION",downloadLocation:"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION"},...o,...a],relationships:s};return JSON.stringify(c,null,2)}function b7(e,t){return e.map(n=>({type:n.type==="config"?"application":"library","bom-ref":`${t}${n.name}`,name:n.name,...n.version?{version:n.version}:{},...n.purl?{purl:n.purl}:{}}))}function v7(e,t){return e.filter(n=>(n.dependsOn?.length??0)>0).map(n=>({ref:`${t}${n.name}`,dependsOn:n.dependsOn.map(r=>`${t}${r}`)}))}function E0e(e,t=()=>new Date){let n=`subject:${e.subjectName}`,r=b7(e.packages,""),o=e.subDocuments??[],i=o.map((u,p)=>{let f=`sub${p}:`;return{type:"application","bom-ref":`${f}subject:${u.subjectName}`,name:u.subjectName,...u.subjectVersion?{version:u.subjectVersion}:{},properties:[{name:"chant:subjectId",value:u.subjectId}],components:b7(u.packages,f)}}),s=o.flatMap((u,p)=>{let f=`sub${p}:`;return[{ref:`${f}subject:${u.subjectName}`,dependsOn:u.packages.map(m=>`${f}${m.name}`)},...v7(u.packages,f)]}),a=[...e.packages.map(u=>u.name),...i.map(u=>u["bom-ref"])],c=[{ref:n,dependsOn:a},...v7(e.packages,""),...s],l=o.length>0?[{aggregate:"incomplete",assemblies:[n,...i.map(u=>u["bom-ref"])]}]:void 0,d={bomFormat:"CycloneDX",specVersion:"1.5",serialNumber:`urn:uuid:${O0e(s1(e.subjectId)+s1(e.subjectName))}`,version:1,metadata:{timestamp:t().toISOString(),tools:[{name:e.generator}],component:{type:"application","bom-ref":n,name:e.subjectName,...e.subjectVersion?{version:e.subjectVersion}:{},...i.length>0?{components:i}:{}}},components:r,dependencies:c,...l?{compositions:l}:{}};return JSON.stringify(d,null,2)}function O0e(e){let t=(e+e+e+e).slice(0,32);return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-8${t.slice(17,20)}-${t.slice(20,32)}`}function a1(e,t,n){let r=e==="spdx"?S0e(t,n):E0e(t,n);return{format:e,mediaType:Qs[e],bytes:r}}var tE=x(()=>{"use strict";Za()});import{readFileSync as R7,writeFileSync as P0e,mkdirSync as A0e}from"node:fs";import{dirname as k7,join as $7}from"node:path";function C0e(e){let t=JSON.parse(e),n=new Map,r=(o,i,s)=>{if(!o)return;let a=`${o}@${i??""}`,c=n.get(a);if(c){s?.length&&(c.dependsOn=[...new Set([...c.dependsOn??[],...s])]);return}n.set(a,{name:o,version:i,type:"npm",purl:i?`pkg:npm/${encodeURIComponent(o)}@${i}`:void 0,dependsOn:s?.length?s:void 0})};if(t.packages)for(let[o,i]of Object.entries(t.packages)){if(o==="")continue;let s=i.name??o.replace(/^.*node_modules\//,"");r(s,i.version,i.dependencies?Object.keys(i.dependencies):void 0)}else if(t.dependencies)for(let[o,i]of Object.entries(t.dependencies))r(o,i.version,i.requires?Object.keys(i.requires):void 0);return[...n.values()].sort((o,i)=>o.name.localeCompare(i.name))}function _0e(e){let t=[],r=e.replace(/<dependencyManagement>[\s\S]*?<\/dependencyManagement>/,"").match(/<dependencies>([\s\S]*?)<\/dependencies>/);if(!r)return t;let o=r[1],i=/<dependency>([\s\S]*?)<\/dependency>/g,s;for(;(s=i.exec(o))!==null;){let a=s[1],c=a.match(/<groupId>([^<]+)<\/groupId>/)?.[1]?.trim(),l=a.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim(),d=a.match(/<version>([^<]+)<\/version>/)?.[1]?.trim();if(!c||!l)continue;let u=`${c}:${l}`;t.push({name:u,version:d,type:"maven",purl:d?`pkg:maven/${encodeURIComponent(c)}/${encodeURIComponent(l)}@${d}`:void 0})}return t.sort((a,c)=>a.name.localeCompare(c.name))}function I0e(e){let t=new Map,n=e.split(/^\[\[package\]\]\s*$/m).slice(1);for(let r of n){let o=r.split(/^\[/m)[0]??"",i=u=>new RegExp(`^${u}\\s*=\\s*"([^"]*)"`,"m").exec(o)?.[1],s=i("name"),a=i("version");if(!s||i("source")===void 0)continue;let c=/^dependencies\s*=\s*\[([\s\S]*?)\]/m.exec(o)?.[1],l=c?[...c.matchAll(/"([^"\s]+)[^"]*"/g)].map(u=>u[1]):[],d=`${s}@${a??""}`;t.has(d)||t.set(d,{name:s,version:a,type:"cargo",purl:a?`pkg:cargo/${encodeURIComponent(s)}@${a}`:void 0,dependsOn:l.length?[...new Set(l)]:void 0})}return[...t.values()].sort((r,o)=>r.name.localeCompare(o.name)||(r.version??"").localeCompare(o.version??""))}function N0e(e){for(let[t,n]of[["npm","package-lock.json"],["maven","pom.xml"],["cargo","Cargo.lock"]]){let r=$7(e,n);try{return R7(r,"utf-8"),{kind:t,path:r}}catch{continue}}}function j0e(e,t){return $7(e,`sbom.${t}.json`)}function L0e(e={}){let t=e.now??(()=>new Date);function n(r,o,i,s=xi){let a=N0e(r);if(!a)throw new Error(`no supported lockfile/manifest found under "${r}" (looked for package-lock.json, pom.xml, Cargo.lock) \u2014 the hermetic lockfile SBOM backend requires a lockfile on disk; use the deep-scan path (#610) for images with no lockfile`);let c=R7(a.path,"utf-8"),l=T0e[a.kind](c),d=`chant-lockfile-sbom/${D0e[a.kind]}`,u=a1(s,{subjectName:o,subjectId:i??a.path,packages:l,generator:d},t),p=e.outDir??r;return A0e(p,{recursive:!0}),P0e(j0e(p,s),u.bytes),{...u,packageCount:l.length,generator:d}}return{async forImage(r){throw new nE("forImage")},async forJar(r){return n(k7(r.jarPath),r.jarPath,r.digest,r.format)},async forZip(r){return n(k7(r.zipPath),r.zipPath,r.digest,r.format)},async forDir(r){return n(r.path,r.path,void 0,r.format)}}}var T0e,D0e,x7,c1=x(()=>{"use strict";tE();Za();Za();T0e={npm:C0e,maven:_0e,cargo:I0e},D0e={npm:"package-lock.json",maven:"pom.xml",cargo:"Cargo.lock"};x7=L0e()});function S7(){return l1||(l1=x7),l1}var Qs,xi,nE,l1,Za=x(()=>{"use strict";c1();Qs={spdx:"application/spdx+json",cyclonedx:"application/vnd.cyclonedx+json"},xi="spdx",nE=class extends Error{constructor(n){super(`SbomGenerator.${n} has no real implementation configured \u2014 inject a real generator (shelling out to syft/buildx/cyclonedx-maven/cdxgen) or use a mock in tests`);this.method=n;this.name="SbomGeneratorNotImplementedError"}}});import{existsSync as du}from"fs";import{dirname as aw,join as qf,resolve as E7}from"path";function cw(e){let t=E7(e),n=t;for(;;){let r=qf(n,"chant.config.ts");if(du(r))return{dir:n,configPath:r};let o=qf(n,"chant.config.json");if(du(o))return{dir:n,configPath:o};if(du(qf(n,".git"))||du(qf(n,"package.json")))return{dir:n};let i=aw(n);if(i===n)return{dir:t};n=i}}function kr(e){let t=E7(e),n;for(let r=t;;r=aw(r)){if(du(qf(r,".git"))){n=r;break}if(aw(r)===r)break}for(let r=t;;r=aw(r)){let[o,i]=M0e.map(c=>qf(r,c)),s=du(o),a=du(i);if(s&&a)return{dir:r,file:o,conflicting:i};if(s)return{dir:r,file:o};if(a)return{dir:r,file:i};if(n===void 0||r===n||aw(r)===r)return}}var M0e,Si=x(()=>{"use strict";M0e=["chant.workspace.json","chant.workspace.jsonc"]});import{existsSync as F0e}from"node:fs";import{dirname as d1,sep as rE}from"node:path";import{fileURLToPath as W0e,pathToFileURL as fyt}from"node:url";function O7(e){if(!/\.[cm]?js$/.test(e))return e;let t=e.lastIndexOf(u1);return t<0?e:e.slice(0,t)+`${rE}src${rE}`+e.slice(t+u1.length)}function P7(e){let t=/\.([cm]?)js$/.exec(e);if(!(!t||e.lastIndexOf(u1)<0))return O7(e).slice(0,-t[0].length)+`.${t[1]}ts`}function A7(e){let t=W0e(e),n=d1(O7(t));return n===d1(t)||F0e(n)?n:d1(t)}function C7(e){let t=e.replace(/[?#].*$/,"");return/\.(?:[cm]?ts|tsx)$/.test(t)&&!/\.d\.[cm]?ts$/.test(t)}function oE(e){return/\.(?:[cm]?js|json)$/.test(e.replace(/[?#].*$/,""))}function G0e(){if(C7(import.meta.url))return!0;if(typeof process>"u")return!1;let e=[...process.execArgv,...(process.env.NODE_OPTIONS??"").split(/\s+/)];return e.some((t,n)=>t==="--conditions=development"||t==="-C=development"||(t==="--conditions"||t==="-C")&&e[n+1]==="development")}var u1,lw,uu=x(()=>{"use strict";u1=`${rE}dist${rE}`;lw=G0e()?["development"]:[]});import{createRequire as B0e}from"node:module";function _7(e,t){let n=e?.code;return n!=="ERR_MODULE_NOT_FOUND"&&n!=="MODULE_NOT_FOUND"?!1:String(e.message).split(`
47
- `)[0].includes(`'${t}`)}function I7(e,t){return new Error(`chant needs ${e} to ${t}; install it with: ${U0e[e]}`)}async function T7(e,t,n){try{return await n()}catch(r){throw _7(r,e)?I7(e,t):r}}function D7(e,t,n,r){try{return B0e(r)(t)}catch(o){throw _7(o,e)?I7(e,n):o}}var U0e,p1=x(()=>{"use strict";U0e={esbuild:"npm i -D esbuild",tsx:"npm i -D tsx"}});import{existsSync as iE,readFileSync as H0e,realpathSync as z0e}from"node:fs";import*as q0e from"node:module";import{dirname as g1,join as f1,sep as byt}from"node:path";import{fileURLToPath as V0e,pathToFileURL as kyt}from"node:url";function m1(){return globalThis[K0e]}function N7(e,t){let n=/^(@intentius\/chant(?:-[a-z0-9-]+)?)(\/.*)?$/.exec(e);if(!n)return;let r=n[2]?`.${n[2]}`:".",o=g1(t);for(;;){let i=f1(o,"node_modules",n[1]),s=f1(i,"package.json");if(iE(s)){let c;try{c=JSON.parse(H0e(s,"utf-8")).exports}catch{return}if(!c||typeof c!="object")return;let l=c,d=l[r],u;if(d===void 0){let g="";for(let m of Object.keys(l)){let h=m.indexOf("*");if(h<0||m.indexOf("*",h+1)>=0)continue;let y=m.slice(0,h),b=m.slice(h+1);!r.startsWith(y)||!r.endsWith(b)||r.length<m.length||y.length<=g.length||(g=y,d=l[m],u=r.slice(y.length,r.length-b.length))}}let p=d&&typeof d=="object"?d.development:void 0;if(typeof p!="string")return;let f=f1(i,u===void 0?p:p.split("*").join(u));return iE(f)?z0e(f):void 0}let a=g1(o);if(a===o)return;o=a}}function Rr(){let e=m1();if(!e)return!1;if(e.tsx)return!0;let t=n=>D7("tsx",n,"run TypeScript",import.meta.url);return t("tsx/cjs/api").register(),t("tsx/esm/api").register(),e.tsx=!0,!0}function sE(e){return oE(e)?m1()?.tsx??!1:Rr()}function j7(){let e=m1();return e!==void 0&&!e.tsx}function aE(e){let t=A7(e);return iE(t)?t:g1(V0e(e))}function Zr(e){return iE(e)?e:e.replace(/\.ts$/,".js")}var xyt,K0e,Xo=x(()=>{"use strict";uu();p1();({registerHooks:xyt}=q0e),K0e=Symbol.for("chant.compiledCli")});async function L7(e){return Rr(),await import(e)}var M7=x(()=>{"use strict";Xo()});function Yr(e){if(e===null||typeof e!="object"||!("default"in e))return e;let t=e.default;if(!J0e(t))return e;let n={};for(let r of Object.keys(t))r!=="__esModule"&&(n[r]=t[r]);return n}function J0e(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&e.__esModule===!0}var hl=x(()=>{"use strict"});var F7=ve((Ayt,h1)=>{if(typeof h1=="object")throw new Error("esbuild is not part of chant's wave-job runtime (wave-runtime.mjs): this path needs the full @intentius/chant CLI");h1.exports={}});import{existsSync as y1,mkdtempSync as Z0e,readFileSync as Y0e,realpathSync as B7,rmSync as W7,statSync as U7,writeFileSync as Q0e}from"node:fs";import{createRequire as X0e}from"node:module";import{tmpdir as eIe}from"node:os";import{dirname as H7,join as dw,resolve as tIe}from"node:path";function oIe(){let e=globalThis;return e.__chantExternalPackagePathCache??=new Map}function iIe(e,t){let n=t;for(;;){let r=dw(n,"node_modules",e);if(y1(r)){let i=dw(r,"package.json");if(!y1(i))return;let s;try{s=JSON.parse(Y0e(i,"utf-8"))}catch{return}if(typeof s!="object"||s===null||s.exports!==void 0)return;let a=s.main,l=tIe(r,typeof a=="string"?a:"index.js");if(!y1(l)||!U7(l).isFile())return;try{return B7(l)}catch{return}}let o=H7(n);if(o===n)return;n=o}}function sIe(){let e=[],t=new Map,n=oIe();for(let o of rIe)try{let i=n.get(o);if(i===void 0&&!n.has(o)&&(i=iIe(o,G7)??nIe.resolve(o,{paths:[G7]}),n.set(o,i)),i===void 0)continue;t.set(o,i),e.push(H7(i))}catch{n.set(o,void 0)}return{plugin:{name:"chant-sandbox-external-trusted-packages",setup(o){for(let[i,s]of t){let a=new RegExp(`^${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`);o.onResolve({filter:a},()=>({path:s,external:!0}))}}},readPaths:e}}function aIe(){return{name:"chant-sandbox-core-source",setup(e){e.onResolve({filter:/^@intentius\/chant(?:\/.*)?$/},t=>{if(!t.importer)return;let n=N7(t.path,t.importer);return n===void 0?void 0:{path:n}})}}}async function cE(e){let t=B7(Z0e(dw(eIe(),"chant-sandbox-"))),n=dw(t,"driver.mts");Q0e(n,e,"utf-8");let r=dw(t,"child.mjs"),{plugin:o,readPaths:i}=sIe(),s;try{s=await T7("esbuild","bundle a TypeScript project",()=>Promise.resolve().then(()=>et(F7(),1)))}catch(d){throw W7(t,{recursive:!0,force:!0}),d}let a=performance.now();try{await s.build({entryPoints:[n],outfile:r,bundle:!0,platform:"node",format:"esm",absWorkingDir:t,logLevel:"silent",...lw.length>0?{conditions:["module",...lw]}:{},plugins:[aIe(),o]})}catch(d){throw W7(t,{recursive:!0,force:!0}),d}let c=performance.now()-a,l=U7(r).size;return{bundlePath:r,bundleDir:t,externalReadPaths:i,durationMs:c,bytes:l}}var G7,nIe,rIe,w1=x(()=>{"use strict";uu();p1();Xo();G7=import.meta.dirname,nIe=X0e(import.meta.url),rIe=["typescript","@cdktn/hcl2json"]});function b1(e){for(let t of Object.keys(Vf))delete Vf[t];Object.assign(Vf,e)}var Vf,uw=x(()=>{"use strict";Vf={}});import{dirname as lE,join as fs}from"node:path";function pu(e){return JSON.stringify(e)}function v1(e=[]){return["function send(payload) {",...e.map(t=>` ${t}`),' if (typeof process.send !== "function") {'," console.log(JSON.stringify(payload));"," return Promise.resolve();"," }"," return new Promise((resolve) => {"," const lost = (err) => {",' writeSync(2, "chant: the sandboxed child could not hand its result to the parent: " +',' (err && err.message ? err.message : String(err)) + " (chant#2461)\\n");'," process.exit(1);"," };"," try {"," process.send(payload, (err) => (err ? lost(err) : resolve()));"," } catch (err) {"," lost(err);"," }"," });","}"]}function z7(e){return[`import { classifyChildError } from ${pu(cIe)};`,`import { scanConfigWireSafety } from ${pu(lIe)};`,`import { esModuleNamespace } from ${pu(dIe)};`,'import { writeSync } from "node:fs";',"",...v1(),"","async function main() {"," let namespace;"," try {",` namespace = esModuleNamespace(await import(${pu(e)}));`," } catch (err) {",` await send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err).toJSON() });`," return;"," }",""," const selected = namespace.default ?? namespace.config ?? namespace;",""," const offenders = scanConfigWireSafety(selected);"," if (offenders.length > 0) {",' await send({ kind: "chant-config", ok: false, offenders });'," return;"," }",""," let config;"," try {"," config = JSON.parse(JSON.stringify(selected ?? {}));"," } catch (err) {",` await send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err, "resolution").toJSON() });`," return;"," }",' await send({ kind: "chant-config", ok: true, config });',"}","","main().catch((err) =>",` send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err).toJSON() }),`,");"].join(`
46
+ 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]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function ml(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=s=>{let a=e.seen.get(s);if(a.ref===null)return;let c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){r(d);let p=e.seen.get(d),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,l),s._zod.parent===d)for(let m in c)m==="$ref"||m==="allOf"||m in l||delete c[m];if(f.$ref&&p.def)for(let m in c)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(c[m])===JSON.stringify(p.def[m])&&delete c[m]}let u=s._zod.parent;if(u&&u!==d){r(u);let p=e.seen.get(u);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())r(s[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Mf(t,"input",e.processors),output:Mf(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Jr(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Jr(r.element,n);if(r.type==="set")return Jr(r.valueType,n);if(r.type==="lazy")return Jr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Jr(r.innerType,n);if(r.type==="intersection")return Jr(r.left,n)||Jr(r.right,n);if(r.type==="record"||r.type==="map")return Jr(r.keyType,n)||Jr(r.valueType,n);if(r.type==="pipe")return Jr(r.in,n)||Jr(r.out,n);if(r.type==="object"){for(let o in r.shape)if(Jr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(Jr(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(Jr(o,n))return!0;return!!(r.rest&&Jr(r.rest,n))}return!1}var dL,Mf,zy=x(()=>{By();dL=(e,t={})=>n=>{let r=fl({...n,processors:t});return qt(e,r),gl(r,e),ml(r,e)},Mf=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=fl({...o??{},target:i,io:t,processors:n});return qt(e,s),gl(s,e),ml(s,e)}});function wS(e,t){if("_idmap"in e){let r=e,o=fl({...t,processors:mS}),i={};for(let c of r._idmap.entries()){let[l,d]=c;qt(d,o)}let s={},a={registry:r,uri:t?.uri,defs:i};o.external=a;for(let c of r._idmap.entries()){let[l,d]=c;gl(o,d),s[l]=ml(o,d)}if(Object.keys(i).length>0){let c=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let n=fl({...t,processors:mS});return qt(e,n),gl(n,e),ml(n,e)}var d0e,uL,pL,fL,gL,mL,hL,yL,wL,bL,vL,kL,RL,$L,xL,SL,EL,OL,PL,AL,CL,_L,IL,TL,DL,NL,hS,jL,LL,ML,FL,WL,GL,BL,UL,HL,zL,qL,yS,VL,mS,qy=x(()=>{zy();ze();d0e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uL=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=d0e[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},pL=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof s=="number"&&(o.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},fL=(e,t,n,r)=>{n.type="boolean"},gL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},mL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},hL=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},yL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},wL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bL=(e,t,n,r)=>{n.not={}},vL=(e,t,n,r)=>{},kL=(e,t,n,r)=>{},RL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},$L=(e,t,n,r)=>{let o=e._zod.def,i=Ey(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},xL=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},SL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},EL=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},OL=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(o,i)},PL=(e,t,n,r)=>{n.type="boolean"},AL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},CL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},_L=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},IL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},TL=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},DL=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=qt(i.element,t,{...r,path:[...r.path,"items"]})},NL=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let l in s)o.properties[l]=qt(s[l],t,{...r,path:[...r.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=qt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},hS=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>qt(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s},jL=(e,t,n,r)=>{let o=e._zod.def,i=qt(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=qt(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c},LL=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>qt(p,t,{...r,path:[...r.path,s,f]})),l=i.rest?qt(i.rest,t,{...r,path:[...r.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,l&&(o.items=l)):t.target==="openapi-3.0"?(o.items={anyOf:c},l&&o.items.anyOf.push(l),o.minItems=c.length,l||(o.maxItems=c.length)):(o.items=c,l&&(o.additionalItems=l));let{minimum:d,maximum:u}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof u=="number"&&(o.maxItems=u)},ML=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=qt(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let u of c)o.patternProperties[u.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=qt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=qt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d)}},FL=(e,t,n,r)=>{let o=e._zod.def,i=qt(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},WL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},GL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},BL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},UL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},HL=(e,t,n,r)=>{let o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;qt(i,t,r);let s=t.seen.get(e);s.ref=i},zL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},qL=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},yS=(e,t,n,r)=>{let o=e._zod.def;qt(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},VL=(e,t,n,r)=>{let o=e._zod.innerType;qt(o,t,r);let i=t.seen.get(e);i.ref=o},mS={string:uL,number:pL,boolean:fL,bigint:gL,symbol:mL,null:hL,undefined:yL,void:wL,never:bL,any:vL,unknown:kL,date:RL,enum:$L,literal:xL,nan:SL,template_literal:EL,file:OL,success:PL,custom:AL,function:CL,transform:_L,map:IL,set:TL,array:DL,object:NL,union:hS,intersection:jL,tuple:LL,record:ML,nullable:FL,nonoptional:WL,default:GL,prefault:BL,catch:UL,pipe:HL,readonly:zL,promise:qL,optional:yS,lazy:VL}});var bS,J8=x(()=>{qy();zy();bS=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=fl({processors:mS,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return qt(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),gl(this.ctx,t);let r=ml(this.ctx,t),{"~standard":o,...i}=r;return i}}});var Z8={};var Y8=x(()=>{});var Ja={};me(Ja,{$ZodAny:()=>WN,$ZodArray:()=>zN,$ZodAsyncError:()=>us,$ZodBase64:()=>CN,$ZodBase64URL:()=>_N,$ZodBigInt:()=>jx,$ZodBigIntFormat:()=>jN,$ZodBoolean:()=>Ly,$ZodCIDRv4:()=>ON,$ZodCIDRv6:()=>PN,$ZodCUID:()=>mN,$ZodCUID2:()=>hN,$ZodCatch:()=>lj,$ZodCheck:()=>tn,$ZodCheckBigIntFormat:()=>UD,$ZodCheckEndsWith:()=>tN,$ZodCheckGreaterThan:()=>Px,$ZodCheckIncludes:()=>XD,$ZodCheckLengthEquals:()=>JD,$ZodCheckLessThan:()=>Ox,$ZodCheckLowerCase:()=>YD,$ZodCheckMaxLength:()=>VD,$ZodCheckMaxSize:()=>HD,$ZodCheckMimeType:()=>rN,$ZodCheckMinLength:()=>KD,$ZodCheckMinSize:()=>zD,$ZodCheckMultipleOf:()=>GD,$ZodCheckNumberFormat:()=>BD,$ZodCheckOverwrite:()=>oN,$ZodCheckProperty:()=>nN,$ZodCheckRegex:()=>ZD,$ZodCheckSizeEquals:()=>qD,$ZodCheckStartsWith:()=>eN,$ZodCheckStringFormat:()=>$f,$ZodCheckUpperCase:()=>QD,$ZodCodec:()=>Fy,$ZodCustom:()=>yj,$ZodCustomStringFormat:()=>DN,$ZodDate:()=>HN,$ZodDefault:()=>ij,$ZodDiscriminatedUnion:()=>KN,$ZodE164:()=>IN,$ZodEmail:()=>uN,$ZodEmoji:()=>fN,$ZodEncodeError:()=>sl,$ZodEnum:()=>XN,$ZodError:()=>_y,$ZodExactOptional:()=>rj,$ZodFile:()=>tj,$ZodFunction:()=>gj,$ZodGUID:()=>lN,$ZodIPv4:()=>xN,$ZodIPv6:()=>SN,$ZodISODate:()=>kN,$ZodISODateTime:()=>vN,$ZodISODuration:()=>$N,$ZodISOTime:()=>RN,$ZodIntersection:()=>JN,$ZodJWT:()=>TN,$ZodKSUID:()=>bN,$ZodLazy:()=>hj,$ZodLiteral:()=>ej,$ZodMAC:()=>EN,$ZodMap:()=>YN,$ZodNaN:()=>dj,$ZodNanoID:()=>gN,$ZodNever:()=>BN,$ZodNonOptional:()=>aj,$ZodNull:()=>FN,$ZodNullable:()=>oj,$ZodNumber:()=>Nx,$ZodNumberFormat:()=>NN,$ZodObject:()=>rZ,$ZodObjectJIT:()=>qN,$ZodOptional:()=>Mx,$ZodPipe:()=>uj,$ZodPrefault:()=>sj,$ZodPromise:()=>mj,$ZodReadonly:()=>pj,$ZodRealError:()=>$o,$ZodRecord:()=>ZN,$ZodRegistry:()=>Bx,$ZodSet:()=>QN,$ZodString:()=>ou,$ZodStringFormat:()=>Jt,$ZodSuccess:()=>cj,$ZodSymbol:()=>LN,$ZodTemplateLiteral:()=>fj,$ZodTransform:()=>nj,$ZodTuple:()=>Lx,$ZodType:()=>rt,$ZodULID:()=>yN,$ZodURL:()=>pN,$ZodUUID:()=>dN,$ZodUndefined:()=>MN,$ZodUnion:()=>My,$ZodUnknown:()=>GN,$ZodVoid:()=>UN,$ZodXID:()=>wN,$ZodXor:()=>VN,$brand:()=>ux,$constructor:()=>K,$input:()=>xj,$output:()=>$j,Doc:()=>jy,JSONSchema:()=>Z8,JSONSchemaGenerator:()=>bS,NEVER:()=>ZT,TimePrecision:()=>Pj,_any:()=>Jj,_array:()=>nL,_base64:()=>sS,_base64url:()=>aS,_bigint:()=>Bj,_boolean:()=>Wj,_catch:()=>o0e,_check:()=>V8,_cidrv4:()=>oS,_cidrv6:()=>iS,_coercedBigint:()=>Uj,_coercedBoolean:()=>Gj,_coercedDate:()=>eL,_coercedNumber:()=>Dj,_coercedString:()=>Ej,_cuid:()=>Yx,_cuid2:()=>Qx,_custom:()=>oL,_date:()=>Xj,_decode:()=>yx,_decodeAsync:()=>bx,_default:()=>t0e,_discriminatedUnion:()=>U_e,_e164:()=>cS,_email:()=>Hx,_emoji:()=>Jx,_encode:()=>hx,_encodeAsync:()=>wx,_endsWith:()=>Cf,_enum:()=>J_e,_file:()=>rL,_float32:()=>jj,_float64:()=>Lj,_gt:()=>Js,_gte:()=>Kr,_guid:()=>Uy,_includes:()=>Pf,_int:()=>Nj,_int32:()=>Mj,_int64:()=>Hj,_intersection:()=>H_e,_ipv4:()=>nS,_ipv6:()=>rS,_isoDate:()=>Cj,_isoDateTime:()=>Aj,_isoDuration:()=>Ij,_isoTime:()=>_j,_jwt:()=>lS,_ksuid:()=>tS,_lazy:()=>c0e,_length:()=>au,_literal:()=>Y_e,_lowercase:()=>Ef,_lt:()=>Ks,_lte:()=>Qo,_mac:()=>Oj,_map:()=>V_e,_max:()=>Qo,_maxLength:()=>su,_maxSize:()=>pl,_mime:()=>_f,_min:()=>Kr,_minLength:()=>Ka,_minSize:()=>Zs,_multipleOf:()=>ul,_nan:()=>tL,_nanoid:()=>Zx,_nativeEnum:()=>Z_e,_negative:()=>uS,_never:()=>Yj,_nonnegative:()=>fS,_nonoptional:()=>n0e,_nonpositive:()=>pS,_normalize:()=>If,_null:()=>Kj,_nullable:()=>e0e,_number:()=>Tj,_optional:()=>X_e,_overwrite:()=>ps,_parse:()=>bf,_parseAsync:()=>vf,_pipe:()=>i0e,_positive:()=>dS,_promise:()=>l0e,_property:()=>gS,_readonly:()=>s0e,_record:()=>q_e,_refine:()=>iL,_regex:()=>Sf,_safeDecode:()=>kx,_safeDecodeAsync:()=>$x,_safeEncode:()=>vx,_safeEncodeAsync:()=>Rx,_safeParse:()=>kf,_safeParseAsync:()=>Rf,_set:()=>K_e,_size:()=>iu,_slugify:()=>jf,_startsWith:()=>Af,_string:()=>Sj,_stringFormat:()=>Lf,_stringbool:()=>lL,_success:()=>r0e,_superRefine:()=>sL,_symbol:()=>qj,_templateLiteral:()=>a0e,_toLowerCase:()=>Df,_toUpperCase:()=>Nf,_transform:()=>Q_e,_trim:()=>Tf,_tuple:()=>z_e,_uint32:()=>Fj,_uint64:()=>zj,_ulid:()=>Xx,_undefined:()=>Vj,_union:()=>G_e,_unknown:()=>Zj,_uppercase:()=>Of,_url:()=>Hy,_uuid:()=>zx,_uuidv4:()=>qx,_uuidv6:()=>Vx,_uuidv7:()=>Kx,_void:()=>Qj,_xid:()=>eS,_xor:()=>B_e,clone:()=>Vr,config:()=>Sn,createStandardJSONSchemaMethod:()=>Mf,createToJSONSchemaMethod:()=>dL,decode:()=>pCe,decodeAsync:()=>gCe,describe:()=>aL,encode:()=>uCe,encodeAsync:()=>fCe,extractDefs:()=>gl,finalize:()=>ml,flattenError:()=>Iy,formatError:()=>Ty,globalConfig:()=>xy,globalRegistry:()=>vr,initializeContext:()=>fl,isValidBase64:()=>AN,isValidBase64URL:()=>X3,isValidJWT:()=>eZ,locales:()=>Gy,meta:()=>cL,parse:()=>gx,parseAsync:()=>mx,prettifyError:()=>cD,process:()=>qt,regexes:()=>$i,registry:()=>Ux,safeDecode:()=>hCe,safeDecodeAsync:()=>wCe,safeEncode:()=>mCe,safeEncodeAsync:()=>yCe,safeParse:()=>dD,safeParseAsync:()=>uD,toDotPath:()=>N3,toJSONSchema:()=>wS,treeifyError:()=>aD,util:()=>Ee,version:()=>sN});var xo=x(()=>{mf();pD();lD();wj();Ax();aN();ze();Ex();Rj();By();iN();K8();zy();qy();J8();Y8()});var vS={};me(vS,{endsWith:()=>Cf,gt:()=>Js,gte:()=>Kr,includes:()=>Pf,length:()=>au,lowercase:()=>Ef,lt:()=>Ks,lte:()=>Qo,maxLength:()=>su,maxSize:()=>pl,mime:()=>_f,minLength:()=>Ka,minSize:()=>Zs,multipleOf:()=>ul,negative:()=>uS,nonnegative:()=>fS,nonpositive:()=>pS,normalize:()=>If,overwrite:()=>ps,positive:()=>dS,property:()=>gS,regex:()=>Sf,size:()=>iu,slugify:()=>jf,startsWith:()=>Af,toLowerCase:()=>Df,toUpperCase:()=>Nf,trim:()=>Tf,uppercase:()=>Of});var kS=x(()=>{xo()});var Ff={};me(Ff,{ZodISODate:()=>$S,ZodISODateTime:()=>RS,ZodISODuration:()=>SS,ZodISOTime:()=>xS,date:()=>JL,datetime:()=>KL,duration:()=>YL,time:()=>ZL});function KL(e){return Aj(RS,e)}function JL(e){return Cj($S,e)}function ZL(e){return _j(xS,e)}function YL(e){return Ij(SS,e)}var RS,$S,xS,SS,Vy=x(()=>{xo();Jy();RS=K("ZodISODateTime",(e,t)=>{vN.init(e,t),Zt.init(e,t)});$S=K("ZodISODate",(e,t)=>{kN.init(e,t),Zt.init(e,t)});xS=K("ZodISOTime",(e,t)=>{RN.init(e,t),Zt.init(e,t)});SS=K("ZodISODuration",(e,t)=>{$N.init(e,t),Zt.init(e,t)})});var Q8,p0e,So,QL=x(()=>{xo();xo();ze();Q8=(e,t)=>{_y.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ty(e,n)},flatten:{value:n=>Iy(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,hf,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,hf,2)}},isEmpty:{get(){return e.issues.length===0}}})},p0e=K("ZodError",Q8),So=K("ZodError",Q8,{Parent:Error})});var XL,eM,tM,nM,rM,oM,iM,sM,aM,cM,lM,dM,uM=x(()=>{xo();QL();XL=bf(So),eM=vf(So),tM=kf(So),nM=Rf(So),rM=hx(So),oM=yx(So),iM=wx(So),sM=bx(So),aM=vx(So),cM=kx(So),lM=Rx(So),dM=$x(So)});var Ky={};me(Ky,{ZodAny:()=>bM,ZodArray:()=>$M,ZodBase64:()=>GS,ZodBase64URL:()=>BS,ZodBigInt:()=>zf,ZodBigIntFormat:()=>zS,ZodBoolean:()=>Hf,ZodCIDRv4:()=>FS,ZodCIDRv6:()=>WS,ZodCUID:()=>IS,ZodCUID2:()=>TS,ZodCatch:()=>zM,ZodCodec:()=>XS,ZodCustom:()=>sw,ZodCustomStringFormat:()=>Bf,ZodDate:()=>tw,ZodDefault:()=>FM,ZodDiscriminatedUnion:()=>SM,ZodE164:()=>US,ZodEmail:()=>AS,ZodEmoji:()=>CS,ZodEnum:()=>Wf,ZodExactOptional:()=>jM,ZodFile:()=>DM,ZodFunction:()=>e1,ZodGUID:()=>Zy,ZodIPv4:()=>LS,ZodIPv6:()=>MS,ZodIntersection:()=>EM,ZodJWT:()=>HS,ZodKSUID:()=>jS,ZodLazy:()=>YM,ZodLiteral:()=>TM,ZodMAC:()=>pM,ZodMap:()=>_M,ZodNaN:()=>VM,ZodNanoID:()=>_S,ZodNever:()=>kM,ZodNonOptional:()=>YS,ZodNull:()=>yM,ZodNullable:()=>MM,ZodNumber:()=>Uf,ZodNumberFormat:()=>lu,ZodObject:()=>rw,ZodOptional:()=>ZS,ZodPipe:()=>QS,ZodPrefault:()=>GM,ZodPromise:()=>XM,ZodReadonly:()=>KM,ZodRecord:()=>iw,ZodSet:()=>IM,ZodString:()=>Gf,ZodStringFormat:()=>Zt,ZodSuccess:()=>HM,ZodSymbol:()=>mM,ZodTemplateLiteral:()=>ZM,ZodTransform:()=>NM,ZodTuple:()=>PM,ZodType:()=>pt,ZodULID:()=>DS,ZodURL:()=>ew,ZodUUID:()=>Ys,ZodUndefined:()=>hM,ZodUnion:()=>ow,ZodUnknown:()=>vM,ZodVoid:()=>RM,ZodXID:()=>NS,ZodXor:()=>xM,_ZodString:()=>PS,_default:()=>WM,_function:()=>o7,any:()=>jY,array:()=>nw,base64:()=>bY,base64url:()=>vY,bigint:()=>_Y,boolean:()=>gM,catch:()=>qM,check:()=>i7,cidrv4:()=>yY,cidrv6:()=>wY,codec:()=>t7,cuid:()=>lY,cuid2:()=>dY,custom:()=>s7,date:()=>MY,describe:()=>a7,discriminatedUnion:()=>HY,e164:()=>kY,email:()=>X8,emoji:()=>aY,enum:()=>KS,exactOptional:()=>LM,file:()=>YY,float32:()=>OY,float64:()=>PY,function:()=>o7,guid:()=>eY,hash:()=>EY,hex:()=>SY,hostname:()=>xY,httpUrl:()=>sY,instanceof:()=>l7,int:()=>OS,int32:()=>AY,int64:()=>IY,intersection:()=>OM,ipv4:()=>gY,ipv6:()=>hY,json:()=>u7,jwt:()=>RY,keyof:()=>FY,ksuid:()=>fY,lazy:()=>QM,literal:()=>ZY,looseObject:()=>BY,looseRecord:()=>qY,mac:()=>mY,map:()=>VY,meta:()=>c7,nan:()=>e7,nanoid:()=>cY,nativeEnum:()=>JY,never:()=>qS,nonoptional:()=>UM,null:()=>wM,nullable:()=>Qy,nullish:()=>QY,number:()=>fM,object:()=>WY,optional:()=>Yy,partialRecord:()=>zY,pipe:()=>Xy,prefault:()=>BM,preprocess:()=>p7,promise:()=>r7,readonly:()=>JM,record:()=>CM,refine:()=>t1,set:()=>KY,strictObject:()=>GY,string:()=>ES,stringFormat:()=>$Y,stringbool:()=>d7,success:()=>XY,superRefine:()=>n1,symbol:()=>DY,templateLiteral:()=>n7,transform:()=>JS,tuple:()=>AM,uint32:()=>CY,uint64:()=>TY,ulid:()=>uY,undefined:()=>NY,union:()=>VS,unknown:()=>cu,url:()=>iY,uuid:()=>tY,uuidv4:()=>nY,uuidv6:()=>rY,uuidv7:()=>oY,void:()=>LY,xid:()=>pY,xor:()=>UY});function ES(e){return Sj(Gf,e)}function X8(e){return Hx(AS,e)}function eY(e){return Uy(Zy,e)}function tY(e){return zx(Ys,e)}function nY(e){return qx(Ys,e)}function rY(e){return Vx(Ys,e)}function oY(e){return Kx(Ys,e)}function iY(e){return Hy(ew,e)}function sY(e){return Hy(ew,{protocol:/^https?$/,hostname:$i.domain,...Ee.normalizeParams(e)})}function aY(e){return Jx(CS,e)}function cY(e){return Zx(_S,e)}function lY(e){return Yx(IS,e)}function dY(e){return Qx(TS,e)}function uY(e){return Xx(DS,e)}function pY(e){return eS(NS,e)}function fY(e){return tS(jS,e)}function gY(e){return nS(LS,e)}function mY(e){return Oj(pM,e)}function hY(e){return rS(MS,e)}function yY(e){return oS(FS,e)}function wY(e){return iS(WS,e)}function bY(e){return sS(GS,e)}function vY(e){return aS(BS,e)}function kY(e){return cS(US,e)}function RY(e){return lS(HS,e)}function $Y(e,t,n={}){return Lf(Bf,e,t,n)}function xY(e){return Lf(Bf,"hostname",$i.hostname,e)}function SY(e){return Lf(Bf,"hex",$i.hex,e)}function EY(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=$i[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return Lf(Bf,r,o,t)}function fM(e){return Tj(Uf,e)}function OS(e){return Nj(lu,e)}function OY(e){return jj(lu,e)}function PY(e){return Lj(lu,e)}function AY(e){return Mj(lu,e)}function CY(e){return Fj(lu,e)}function gM(e){return Wj(Hf,e)}function _Y(e){return Bj(zf,e)}function IY(e){return Hj(zS,e)}function TY(e){return zj(zS,e)}function DY(e){return qj(mM,e)}function NY(e){return Vj(hM,e)}function wM(e){return Kj(yM,e)}function jY(){return Jj(bM)}function cu(){return Zj(vM)}function qS(e){return Yj(kM,e)}function LY(e){return Qj(RM,e)}function MY(e){return Xj(tw,e)}function nw(e,t){return nL($M,e,t)}function FY(e){let t=e._zod.def.shape;return KS(Object.keys(t))}function WY(e,t){let n={type:"object",shape:e??{},...Ee.normalizeParams(t)};return new rw(n)}function GY(e,t){return new rw({type:"object",shape:e,catchall:qS(),...Ee.normalizeParams(t)})}function BY(e,t){return new rw({type:"object",shape:e,catchall:cu(),...Ee.normalizeParams(t)})}function VS(e,t){return new ow({type:"union",options:e,...Ee.normalizeParams(t)})}function UY(e,t){return new xM({type:"union",options:e,inclusive:!1,...Ee.normalizeParams(t)})}function HY(e,t,n){return new SM({type:"union",options:t,discriminator:e,...Ee.normalizeParams(n)})}function OM(e,t){return new EM({type:"intersection",left:e,right:t})}function AM(e,t,n){let r=t instanceof rt,o=r?n:t,i=r?t:null;return new PM({type:"tuple",items:e,rest:i,...Ee.normalizeParams(o)})}function CM(e,t,n){return new iw({type:"record",keyType:e,valueType:t,...Ee.normalizeParams(n)})}function zY(e,t,n){let r=Vr(e);return r._zod.values=void 0,new iw({type:"record",keyType:r,valueType:t,...Ee.normalizeParams(n)})}function qY(e,t,n){return new iw({type:"record",keyType:e,valueType:t,mode:"loose",...Ee.normalizeParams(n)})}function VY(e,t,n){return new _M({type:"map",keyType:e,valueType:t,...Ee.normalizeParams(n)})}function KY(e,t){return new IM({type:"set",valueType:e,...Ee.normalizeParams(t)})}function KS(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Wf({type:"enum",entries:n,...Ee.normalizeParams(t)})}function JY(e,t){return new Wf({type:"enum",entries:e,...Ee.normalizeParams(t)})}function ZY(e,t){return new TM({type:"literal",values:Array.isArray(e)?e:[e],...Ee.normalizeParams(t)})}function YY(e){return rL(DM,e)}function JS(e){return new NM({type:"transform",transform:e})}function Yy(e){return new ZS({type:"optional",innerType:e})}function LM(e){return new jM({type:"optional",innerType:e})}function Qy(e){return new MM({type:"nullable",innerType:e})}function QY(e){return Yy(Qy(e))}function WM(e,t){return new FM({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function BM(e,t){return new GM({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ee.shallowClone(t)}})}function UM(e,t){return new YS({type:"nonoptional",innerType:e,...Ee.normalizeParams(t)})}function XY(e){return new HM({type:"success",innerType:e})}function qM(e,t){return new zM({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function e7(e){return tL(VM,e)}function Xy(e,t){return new QS({type:"pipe",in:e,out:t})}function t7(e,t,n){return new XS({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function JM(e){return new KM({type:"readonly",innerType:e})}function n7(e,t){return new ZM({type:"template_literal",parts:e,...Ee.normalizeParams(t)})}function QM(e){return new YM({type:"lazy",getter:e})}function r7(e){return new XM({type:"promise",innerType:e})}function o7(e){return new e1({type:"function",input:Array.isArray(e?.input)?AM(e?.input):e?.input??nw(cu()),output:e?.output??cu()})}function i7(e){let t=new tn({check:"custom"});return t._zod.check=e,t}function s7(e,t){return oL(sw,e??(()=>!0),t)}function t1(e,t={}){return iL(sw,e,t)}function n1(e){return sL(e)}function l7(e,t={}){let n=new sw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ee.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function u7(e){let t=QM(()=>VS([ES(e),fM(),gM(),wM(),nw(t),CM(ES(),t)]));return t}function p7(e,t){return Xy(JS(e),t)}var pt,PS,Gf,Zt,AS,Zy,Ys,ew,CS,_S,IS,TS,DS,NS,jS,LS,pM,MS,FS,WS,GS,BS,US,HS,Bf,Uf,lu,Hf,zf,zS,mM,hM,yM,bM,vM,kM,RM,tw,$M,rw,ow,xM,SM,EM,PM,iw,_M,IM,Wf,TM,DM,NM,ZS,jM,MM,FM,GM,YS,HM,zM,VM,QS,XS,KM,ZM,YM,XM,e1,sw,a7,c7,d7,Jy=x(()=>{xo();xo();qy();zy();kS();Vy();uM();pt=K("ZodType",(e,t)=>(rt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Mf(e,"input"),output:Mf(e,"output")}}),e.toJSONSchema=dL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ee.mergeDefs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Vr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>XL(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>tM(e,n,r),e.parseAsync=async(n,r)=>eM(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>nM(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>rM(e,n,r),e.decode=(n,r)=>oM(e,n,r),e.encodeAsync=async(n,r)=>iM(e,n,r),e.decodeAsync=async(n,r)=>sM(e,n,r),e.safeEncode=(n,r)=>aM(e,n,r),e.safeDecode=(n,r)=>cM(e,n,r),e.safeEncodeAsync=async(n,r)=>lM(e,n,r),e.safeDecodeAsync=async(n,r)=>dM(e,n,r),e.refine=(n,r)=>e.check(t1(n,r)),e.superRefine=n=>e.check(n1(n)),e.overwrite=n=>e.check(ps(n)),e.optional=()=>Yy(e),e.exactOptional=()=>LM(e),e.nullable=()=>Qy(e),e.nullish=()=>Yy(Qy(e)),e.nonoptional=n=>UM(e,n),e.array=()=>nw(e),e.or=n=>VS([e,n]),e.and=n=>OM(e,n),e.transform=n=>Xy(e,JS(n)),e.default=n=>WM(e,n),e.prefault=n=>BM(e,n),e.catch=n=>qM(e,n),e.pipe=n=>Xy(e,n),e.readonly=()=>JM(e),e.describe=n=>{let r=e.clone();return vr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return vr.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return vr.get(e);let r=e.clone();return vr.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),PS=K("_ZodString",(e,t)=>{ou.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>uL(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Sf(...r)),e.includes=(...r)=>e.check(Pf(...r)),e.startsWith=(...r)=>e.check(Af(...r)),e.endsWith=(...r)=>e.check(Cf(...r)),e.min=(...r)=>e.check(Ka(...r)),e.max=(...r)=>e.check(su(...r)),e.length=(...r)=>e.check(au(...r)),e.nonempty=(...r)=>e.check(Ka(1,...r)),e.lowercase=r=>e.check(Ef(r)),e.uppercase=r=>e.check(Of(r)),e.trim=()=>e.check(Tf()),e.normalize=(...r)=>e.check(If(...r)),e.toLowerCase=()=>e.check(Df()),e.toUpperCase=()=>e.check(Nf()),e.slugify=()=>e.check(jf())}),Gf=K("ZodString",(e,t)=>{ou.init(e,t),PS.init(e,t),e.email=n=>e.check(Hx(AS,n)),e.url=n=>e.check(Hy(ew,n)),e.jwt=n=>e.check(lS(HS,n)),e.emoji=n=>e.check(Jx(CS,n)),e.guid=n=>e.check(Uy(Zy,n)),e.uuid=n=>e.check(zx(Ys,n)),e.uuidv4=n=>e.check(qx(Ys,n)),e.uuidv6=n=>e.check(Vx(Ys,n)),e.uuidv7=n=>e.check(Kx(Ys,n)),e.nanoid=n=>e.check(Zx(_S,n)),e.guid=n=>e.check(Uy(Zy,n)),e.cuid=n=>e.check(Yx(IS,n)),e.cuid2=n=>e.check(Qx(TS,n)),e.ulid=n=>e.check(Xx(DS,n)),e.base64=n=>e.check(sS(GS,n)),e.base64url=n=>e.check(aS(BS,n)),e.xid=n=>e.check(eS(NS,n)),e.ksuid=n=>e.check(tS(jS,n)),e.ipv4=n=>e.check(nS(LS,n)),e.ipv6=n=>e.check(rS(MS,n)),e.cidrv4=n=>e.check(oS(FS,n)),e.cidrv6=n=>e.check(iS(WS,n)),e.e164=n=>e.check(cS(US,n)),e.datetime=n=>e.check(KL(n)),e.date=n=>e.check(JL(n)),e.time=n=>e.check(ZL(n)),e.duration=n=>e.check(YL(n))});Zt=K("ZodStringFormat",(e,t)=>{Jt.init(e,t),PS.init(e,t)}),AS=K("ZodEmail",(e,t)=>{uN.init(e,t),Zt.init(e,t)});Zy=K("ZodGUID",(e,t)=>{lN.init(e,t),Zt.init(e,t)});Ys=K("ZodUUID",(e,t)=>{dN.init(e,t),Zt.init(e,t)});ew=K("ZodURL",(e,t)=>{pN.init(e,t),Zt.init(e,t)});CS=K("ZodEmoji",(e,t)=>{fN.init(e,t),Zt.init(e,t)});_S=K("ZodNanoID",(e,t)=>{gN.init(e,t),Zt.init(e,t)});IS=K("ZodCUID",(e,t)=>{mN.init(e,t),Zt.init(e,t)});TS=K("ZodCUID2",(e,t)=>{hN.init(e,t),Zt.init(e,t)});DS=K("ZodULID",(e,t)=>{yN.init(e,t),Zt.init(e,t)});NS=K("ZodXID",(e,t)=>{wN.init(e,t),Zt.init(e,t)});jS=K("ZodKSUID",(e,t)=>{bN.init(e,t),Zt.init(e,t)});LS=K("ZodIPv4",(e,t)=>{xN.init(e,t),Zt.init(e,t)});pM=K("ZodMAC",(e,t)=>{EN.init(e,t),Zt.init(e,t)});MS=K("ZodIPv6",(e,t)=>{SN.init(e,t),Zt.init(e,t)});FS=K("ZodCIDRv4",(e,t)=>{ON.init(e,t),Zt.init(e,t)});WS=K("ZodCIDRv6",(e,t)=>{PN.init(e,t),Zt.init(e,t)});GS=K("ZodBase64",(e,t)=>{CN.init(e,t),Zt.init(e,t)});BS=K("ZodBase64URL",(e,t)=>{_N.init(e,t),Zt.init(e,t)});US=K("ZodE164",(e,t)=>{IN.init(e,t),Zt.init(e,t)});HS=K("ZodJWT",(e,t)=>{TN.init(e,t),Zt.init(e,t)});Bf=K("ZodCustomStringFormat",(e,t)=>{DN.init(e,t),Zt.init(e,t)});Uf=K("ZodNumber",(e,t)=>{Nx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>pL(e,r,o,i),e.gt=(r,o)=>e.check(Js(r,o)),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.lt=(r,o)=>e.check(Ks(r,o)),e.lte=(r,o)=>e.check(Qo(r,o)),e.max=(r,o)=>e.check(Qo(r,o)),e.int=r=>e.check(OS(r)),e.safe=r=>e.check(OS(r)),e.positive=r=>e.check(Js(0,r)),e.nonnegative=r=>e.check(Kr(0,r)),e.negative=r=>e.check(Ks(0,r)),e.nonpositive=r=>e.check(Qo(0,r)),e.multipleOf=(r,o)=>e.check(ul(r,o)),e.step=(r,o)=>e.check(ul(r,o)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});lu=K("ZodNumberFormat",(e,t)=>{NN.init(e,t),Uf.init(e,t)});Hf=K("ZodBoolean",(e,t)=>{Ly.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fL(e,n,r,o)});zf=K("ZodBigInt",(e,t)=>{jx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>gL(e,r,o,i),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.gt=(r,o)=>e.check(Js(r,o)),e.gte=(r,o)=>e.check(Kr(r,o)),e.min=(r,o)=>e.check(Kr(r,o)),e.lt=(r,o)=>e.check(Ks(r,o)),e.lte=(r,o)=>e.check(Qo(r,o)),e.max=(r,o)=>e.check(Qo(r,o)),e.positive=r=>e.check(Js(BigInt(0),r)),e.negative=r=>e.check(Ks(BigInt(0),r)),e.nonpositive=r=>e.check(Qo(BigInt(0),r)),e.nonnegative=r=>e.check(Kr(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(ul(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});zS=K("ZodBigIntFormat",(e,t)=>{jN.init(e,t),zf.init(e,t)});mM=K("ZodSymbol",(e,t)=>{LN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mL(e,n,r,o)});hM=K("ZodUndefined",(e,t)=>{MN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yL(e,n,r,o)});yM=K("ZodNull",(e,t)=>{FN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hL(e,n,r,o)});bM=K("ZodAny",(e,t)=>{WN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vL(e,n,r,o)});vM=K("ZodUnknown",(e,t)=>{GN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kL(e,n,r,o)});kM=K("ZodNever",(e,t)=>{BN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bL(e,n,r,o)});RM=K("ZodVoid",(e,t)=>{UN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wL(e,n,r,o)});tw=K("ZodDate",(e,t)=>{HN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>RL(e,r,o,i),e.min=(r,o)=>e.check(Kr(r,o)),e.max=(r,o)=>e.check(Qo(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});$M=K("ZodArray",(e,t)=>{zN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>DL(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Ka(n,r)),e.nonempty=n=>e.check(Ka(1,n)),e.max=(n,r)=>e.check(su(n,r)),e.length=(n,r)=>e.check(au(n,r)),e.unwrap=()=>e.element});rw=K("ZodObject",(e,t)=>{qN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>NL(e,n,r,o),Ee.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>KS(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cu()}),e.loose=()=>e.clone({...e._zod.def,catchall:cu()}),e.strict=()=>e.clone({...e._zod.def,catchall:qS()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Ee.extend(e,n),e.safeExtend=n=>Ee.safeExtend(e,n),e.merge=n=>Ee.merge(e,n),e.pick=n=>Ee.pick(e,n),e.omit=n=>Ee.omit(e,n),e.partial=(...n)=>Ee.partial(ZS,e,n[0]),e.required=(...n)=>Ee.required(YS,e,n[0])});ow=K("ZodUnion",(e,t)=>{My.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hS(e,n,r,o),e.options=t.options});xM=K("ZodXor",(e,t)=>{ow.init(e,t),VN.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hS(e,n,r,o),e.options=t.options});SM=K("ZodDiscriminatedUnion",(e,t)=>{ow.init(e,t),KN.init(e,t)});EM=K("ZodIntersection",(e,t)=>{JN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jL(e,n,r,o)});PM=K("ZodTuple",(e,t)=>{Lx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>LL(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});iw=K("ZodRecord",(e,t)=>{ZN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ML(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});_M=K("ZodMap",(e,t)=>{YN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>IL(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Zs(...n)),e.nonempty=n=>e.check(Zs(1,n)),e.max=(...n)=>e.check(pl(...n)),e.size=(...n)=>e.check(iu(...n))});IM=K("ZodSet",(e,t)=>{QN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>TL(e,n,r,o),e.min=(...n)=>e.check(Zs(...n)),e.nonempty=n=>e.check(Zs(1,n)),e.max=(...n)=>e.check(pl(...n)),e.size=(...n)=>e.check(iu(...n))});Wf=K("ZodEnum",(e,t)=>{XN.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>$L(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Wf({...t,checks:[],...Ee.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Wf({...t,checks:[],...Ee.normalizeParams(o),entries:i})}});TM=K("ZodLiteral",(e,t)=>{ej.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xL(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});DM=K("ZodFile",(e,t)=>{tj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>OL(e,n,r,o),e.min=(n,r)=>e.check(Zs(n,r)),e.max=(n,r)=>e.check(pl(n,r)),e.mime=(n,r)=>e.check(_f(Array.isArray(n)?n:[n],r))});NM=K("ZodTransform",(e,t)=>{nj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_L(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new sl(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ee.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Ee.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});ZS=K("ZodOptional",(e,t)=>{Mx.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yS(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});jM=K("ZodExactOptional",(e,t)=>{rj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yS(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});MM=K("ZodNullable",(e,t)=>{oj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>FL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});FM=K("ZodDefault",(e,t)=>{ij.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});GM=K("ZodPrefault",(e,t)=>{sj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});YS=K("ZodNonOptional",(e,t)=>{aj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});HM=K("ZodSuccess",(e,t)=>{cj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>PL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});zM=K("ZodCatch",(e,t)=>{lj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>UL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});VM=K("ZodNaN",(e,t)=>{dj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>SL(e,n,r,o)});QS=K("ZodPipe",(e,t)=>{uj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>HL(e,n,r,o),e.in=t.in,e.out=t.out});XS=K("ZodCodec",(e,t)=>{QS.init(e,t),Fy.init(e,t)});KM=K("ZodReadonly",(e,t)=>{pj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ZM=K("ZodTemplateLiteral",(e,t)=>{fj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>EL(e,n,r,o)});YM=K("ZodLazy",(e,t)=>{hj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VL(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});XM=K("ZodPromise",(e,t)=>{mj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qL(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});e1=K("ZodFunction",(e,t)=>{gj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>CL(e,n,r,o)});sw=K("ZodCustom",(e,t)=>{yj.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>AL(e,n,r,o)});a7=aL,c7=cL;d7=(...e)=>lL({Codec:XS,Boolean:Hf,String:Gf},...e)});function m0e(e){Sn({customError:e})}function h0e(){return Sn().customError}var g0e,r1,f7=x(()=>{xo();xo();g0e={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"};r1||(r1={})});function w0e(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function b0e(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function g7(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ie.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Ie.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=b0e(o,t),s=Ir(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Ie.null();if(o.length===0)return Ie.never();if(o.length===1)return Ie.literal(o[0]);if(o.every(s=>typeof s=="string"))return Ie.enum(o);let i=o.map(s=>Ie.literal(s));return i.length<2?i[0]:Ie.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return g7(s,t)});return o.length===0?Ie.never():o.length===1?o[0]:Ie.union(o)}if(!n)return Ie.any();let r;switch(n){case"string":{let o=Ie.string();if(e.format){let i=e.format;i==="email"?o=o.check(Ie.email()):i==="uri"||i==="uri-reference"?o=o.check(Ie.url()):i==="uuid"||i==="guid"?o=o.check(Ie.uuid()):i==="date-time"?o=o.check(Ie.iso.datetime()):i==="date"?o=o.check(Ie.iso.date()):i==="time"?o=o.check(Ie.iso.time()):i==="duration"?o=o.check(Ie.iso.duration()):i==="ipv4"?o=o.check(Ie.ipv4()):i==="ipv6"?o=o.check(Ie.ipv6()):i==="mac"?o=o.check(Ie.mac()):i==="cidr"?o=o.check(Ie.cidrv4()):i==="cidr-v6"?o=o.check(Ie.cidrv6()):i==="base64"?o=o.check(Ie.base64()):i==="base64url"?o=o.check(Ie.base64url()):i==="e164"?o=o.check(Ie.e164()):i==="jwt"?o=o.check(Ie.jwt()):i==="emoji"?o=o.check(Ie.emoji()):i==="nanoid"?o=o.check(Ie.nanoid()):i==="cuid"?o=o.check(Ie.cuid()):i==="cuid2"?o=o.check(Ie.cuid2()):i==="ulid"?o=o.check(Ie.ulid()):i==="xid"?o=o.check(Ie.xid()):i==="ksuid"&&(o=o.check(Ie.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Ie.number().int():Ie.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Ie.boolean();break}case"null":{r=Ie.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=Ir(l,t);o[c]=s.has(c)?d:d.optional()}if(e.propertyNames){let c=Ir(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Ir(e.additionalProperties,t):Ie.any();if(Object.keys(o).length===0){r=Ie.record(c,l);break}let d=Ie.object(o).passthrough(),u=Ie.looseRecord(c,l);r=Ie.intersection(d,u);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let p of l){let f=Ir(c[p],t),g=Ie.string().regex(new RegExp(p));d.push(Ie.looseRecord(g,f))}let u=[];if(Object.keys(o).length>0&&u.push(Ie.object(o).passthrough()),u.push(...d),u.length===0)r=Ie.object({}).passthrough();else if(u.length===1)r=u[0];else{let p=Ie.intersection(u[0],u[1]);for(let f=2;f<u.length;f++)p=Ie.intersection(p,u[f]);r=p}break}let a=Ie.object(o);e.additionalProperties===!1?r=a.strict():typeof e.additionalProperties=="object"?r=a.catchall(Ir(e.additionalProperties,t)):r=a.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(c=>Ir(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?Ir(i,t):void 0;a?r=Ie.tuple(s).rest(a):r=Ie.tuple(s),typeof e.minItems=="number"&&(r=r.check(Ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ie.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(c=>Ir(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?Ir(e.additionalItems,t):void 0;a?r=Ie.tuple(s).rest(a):r=Ie.tuple(s),typeof e.minItems=="number"&&(r=r.check(Ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ie.maxLength(e.maxItems)))}else if(i!==void 0){let s=Ir(i,t),a=Ie.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),r=a}else r=Ie.array(Ie.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(r=r.describe(e.description)),e.default!==void 0&&(r=r.default(e.default)),r}function Ir(e,t){if(typeof e=="boolean")return e?Ie.any():Ie.never();let n=g7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(l=>Ir(l,t)),c=Ie.union(a);n=r?Ie.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(l=>Ir(l,t)),c=Ie.xor(a);n=r?Ie.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Ie.any();else{let a=r?n:Ir(e.allOf[0],t),c=r?0:1;for(let l=c;l<e.allOf.length;l++)a=Ie.intersection(a,Ir(e.allOf[l],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Ie.nullable(n)),e.readOnly===!0&&(n=Ie.readonly(n));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(o[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(o[a]=e[a]);for(let a of Object.keys(e))y0e.has(a)||(o[a]=e[a]);return Object.keys(o).length>0&&t.registry.add(n,o),n}function m7(e,t){if(typeof e=="boolean")return e?Ie.any():Ie.never();let n=w0e(e,t?.defaultTarget),r=e.$defs||e.definitions||{},o={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??vr};return Ir(e,o)}var Ie,y0e,h7=x(()=>{By();kS();Vy();Jy();Ie={...Ky,...vS,iso:Ff},y0e=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"])});var o1={};me(o1,{bigint:()=>$0e,boolean:()=>R0e,date:()=>x0e,number:()=>k0e,string:()=>v0e});function v0e(e){return Ej(Gf,e)}function k0e(e){return Dj(Uf,e)}function R0e(e){return Gj(Hf,e)}function $0e(e){return Uj(zf,e)}function x0e(e){return eL(tw,e)}var y7=x(()=>{xo();Jy()});var w={};me(w,{$brand:()=>ux,$input:()=>xj,$output:()=>$j,NEVER:()=>ZT,TimePrecision:()=>Pj,ZodAny:()=>bM,ZodArray:()=>$M,ZodBase64:()=>GS,ZodBase64URL:()=>BS,ZodBigInt:()=>zf,ZodBigIntFormat:()=>zS,ZodBoolean:()=>Hf,ZodCIDRv4:()=>FS,ZodCIDRv6:()=>WS,ZodCUID:()=>IS,ZodCUID2:()=>TS,ZodCatch:()=>zM,ZodCodec:()=>XS,ZodCustom:()=>sw,ZodCustomStringFormat:()=>Bf,ZodDate:()=>tw,ZodDefault:()=>FM,ZodDiscriminatedUnion:()=>SM,ZodE164:()=>US,ZodEmail:()=>AS,ZodEmoji:()=>CS,ZodEnum:()=>Wf,ZodError:()=>p0e,ZodExactOptional:()=>jM,ZodFile:()=>DM,ZodFirstPartyTypeKind:()=>r1,ZodFunction:()=>e1,ZodGUID:()=>Zy,ZodIPv4:()=>LS,ZodIPv6:()=>MS,ZodISODate:()=>$S,ZodISODateTime:()=>RS,ZodISODuration:()=>SS,ZodISOTime:()=>xS,ZodIntersection:()=>EM,ZodIssueCode:()=>g0e,ZodJWT:()=>HS,ZodKSUID:()=>jS,ZodLazy:()=>YM,ZodLiteral:()=>TM,ZodMAC:()=>pM,ZodMap:()=>_M,ZodNaN:()=>VM,ZodNanoID:()=>_S,ZodNever:()=>kM,ZodNonOptional:()=>YS,ZodNull:()=>yM,ZodNullable:()=>MM,ZodNumber:()=>Uf,ZodNumberFormat:()=>lu,ZodObject:()=>rw,ZodOptional:()=>ZS,ZodPipe:()=>QS,ZodPrefault:()=>GM,ZodPromise:()=>XM,ZodReadonly:()=>KM,ZodRealError:()=>So,ZodRecord:()=>iw,ZodSet:()=>IM,ZodString:()=>Gf,ZodStringFormat:()=>Zt,ZodSuccess:()=>HM,ZodSymbol:()=>mM,ZodTemplateLiteral:()=>ZM,ZodTransform:()=>NM,ZodTuple:()=>PM,ZodType:()=>pt,ZodULID:()=>DS,ZodURL:()=>ew,ZodUUID:()=>Ys,ZodUndefined:()=>hM,ZodUnion:()=>ow,ZodUnknown:()=>vM,ZodVoid:()=>RM,ZodXID:()=>NS,ZodXor:()=>xM,_ZodString:()=>PS,_default:()=>WM,_function:()=>o7,any:()=>jY,array:()=>nw,base64:()=>bY,base64url:()=>vY,bigint:()=>_Y,boolean:()=>gM,catch:()=>qM,check:()=>i7,cidrv4:()=>yY,cidrv6:()=>wY,clone:()=>Vr,codec:()=>t7,coerce:()=>o1,config:()=>Sn,core:()=>Ja,cuid:()=>lY,cuid2:()=>dY,custom:()=>s7,date:()=>MY,decode:()=>oM,decodeAsync:()=>sM,describe:()=>a7,discriminatedUnion:()=>HY,e164:()=>kY,email:()=>X8,emoji:()=>aY,encode:()=>rM,encodeAsync:()=>iM,endsWith:()=>Cf,enum:()=>KS,exactOptional:()=>LM,file:()=>YY,flattenError:()=>Iy,float32:()=>OY,float64:()=>PY,formatError:()=>Ty,fromJSONSchema:()=>m7,function:()=>o7,getErrorMap:()=>h0e,globalRegistry:()=>vr,gt:()=>Js,gte:()=>Kr,guid:()=>eY,hash:()=>EY,hex:()=>SY,hostname:()=>xY,httpUrl:()=>sY,includes:()=>Pf,instanceof:()=>l7,int:()=>OS,int32:()=>AY,int64:()=>IY,intersection:()=>OM,ipv4:()=>gY,ipv6:()=>hY,iso:()=>Ff,json:()=>u7,jwt:()=>RY,keyof:()=>FY,ksuid:()=>fY,lazy:()=>QM,length:()=>au,literal:()=>ZY,locales:()=>Gy,looseObject:()=>BY,looseRecord:()=>qY,lowercase:()=>Ef,lt:()=>Ks,lte:()=>Qo,mac:()=>mY,map:()=>VY,maxLength:()=>su,maxSize:()=>pl,meta:()=>c7,mime:()=>_f,minLength:()=>Ka,minSize:()=>Zs,multipleOf:()=>ul,nan:()=>e7,nanoid:()=>cY,nativeEnum:()=>JY,negative:()=>uS,never:()=>qS,nonnegative:()=>fS,nonoptional:()=>UM,nonpositive:()=>pS,normalize:()=>If,null:()=>wM,nullable:()=>Qy,nullish:()=>QY,number:()=>fM,object:()=>WY,optional:()=>Yy,overwrite:()=>ps,parse:()=>XL,parseAsync:()=>eM,partialRecord:()=>zY,pipe:()=>Xy,positive:()=>dS,prefault:()=>BM,preprocess:()=>p7,prettifyError:()=>cD,promise:()=>r7,property:()=>gS,readonly:()=>JM,record:()=>CM,refine:()=>t1,regex:()=>Sf,regexes:()=>$i,registry:()=>Ux,safeDecode:()=>cM,safeDecodeAsync:()=>dM,safeEncode:()=>aM,safeEncodeAsync:()=>lM,safeParse:()=>tM,safeParseAsync:()=>nM,set:()=>KY,setErrorMap:()=>m0e,size:()=>iu,slugify:()=>jf,startsWith:()=>Af,strictObject:()=>GY,string:()=>ES,stringFormat:()=>$Y,stringbool:()=>d7,success:()=>XY,superRefine:()=>n1,symbol:()=>DY,templateLiteral:()=>n7,toJSONSchema:()=>wS,toLowerCase:()=>Df,toUpperCase:()=>Nf,transform:()=>JS,treeifyError:()=>aD,trim:()=>Tf,tuple:()=>AM,uint32:()=>CY,uint64:()=>TY,ulid:()=>uY,undefined:()=>NY,union:()=>VS,unknown:()=>cu,uppercase:()=>Of,url:()=>iY,util:()=>Ee,uuid:()=>tY,uuidv4:()=>nY,uuidv6:()=>rY,uuidv7:()=>oY,void:()=>LY,xid:()=>pY,xor:()=>UY});var i1=x(()=>{xo();Jy();kS();QL();uM();f7();xo();bj();xo();qy();h7();Rj();Vy();Vy();y7();Sn(Fx())});var Jn=x(()=>{i1();i1()});function s1(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)|0;return Math.abs(t).toString(16).padStart(8,"0")}function eE(e){return e.replace(/[^a-zA-Z0-9.-]/g,"-")}function w7(e,t){let n=i=>`SPDXRef-Package-${t}${eE(i)}`,r=e.map(i=>({name:i.name,SPDXID:n(i.name),versionInfo:i.version??"NOASSERTION",downloadLocation:i.downloadLocation??"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION",...i.purl?{externalRefs:[{referenceCategory:"PACKAGE-MANAGER",referenceType:"purl",referenceLocator:i.purl}]}:{}})),o=e.flatMap(i=>(i.dependsOn??[]).map(s=>({spdxElementId:n(i.name),relationshipType:"DEPENDS_ON",relatedSpdxElement:n(s)})));return{packages:r,relationships:o}}function S0e(e,t=()=>new Date){let n="SPDXRef-DOCUMENT",r=`SPDXRef-Package-${eE(e.subjectName)}`,{packages:o,relationships:i}=w7(e.packages,""),s=[{spdxElementId:n,relationshipType:"DESCRIBES",relatedSpdxElement:r},...i],a=[];(e.subDocuments??[]).forEach((l,d)=>{let u=`SPDXRef-Package-sub${d}-${eE(l.subjectName)}`;a.push({name:l.subjectName,SPDXID:u,versionInfo:l.subjectVersion??"NOASSERTION",downloadLocation:"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION",comment:`subjectId: ${l.subjectId}`}),s.push({spdxElementId:r,relationshipType:"CONTAINS",relatedSpdxElement:u});let{packages:p,relationships:f}=w7(l.packages,`sub${d}-`);a.push(...p),s.push(...p.map(g=>({spdxElementId:u,relationshipType:"CONTAINS",relatedSpdxElement:g.SPDXID})),...f)});let c={spdxVersion:"SPDX-2.3",dataLicense:"CC0-1.0",SPDXID:n,name:e.subjectName,documentNamespace:`https://chant.dev/spdxdocs/${eE(e.subjectName)}-${s1(e.subjectId)}`,creationInfo:{created:t().toISOString(),creators:[`Tool: ${e.generator}`]},packages:[{name:e.subjectName,SPDXID:r,versionInfo:e.subjectVersion??"NOASSERTION",downloadLocation:"NOASSERTION",filesAnalyzed:!1,licenseConcluded:"NOASSERTION",licenseDeclared:"NOASSERTION",copyrightText:"NOASSERTION"},...o,...a],relationships:s};return JSON.stringify(c,null,2)}function b7(e,t){return e.map(n=>({type:n.type==="config"?"application":"library","bom-ref":`${t}${n.name}`,name:n.name,...n.version?{version:n.version}:{},...n.purl?{purl:n.purl}:{}}))}function v7(e,t){return e.filter(n=>(n.dependsOn?.length??0)>0).map(n=>({ref:`${t}${n.name}`,dependsOn:n.dependsOn.map(r=>`${t}${r}`)}))}function E0e(e,t=()=>new Date){let n=`subject:${e.subjectName}`,r=b7(e.packages,""),o=e.subDocuments??[],i=o.map((u,p)=>{let f=`sub${p}:`;return{type:"application","bom-ref":`${f}subject:${u.subjectName}`,name:u.subjectName,...u.subjectVersion?{version:u.subjectVersion}:{},properties:[{name:"chant:subjectId",value:u.subjectId}],components:b7(u.packages,f)}}),s=o.flatMap((u,p)=>{let f=`sub${p}:`;return[{ref:`${f}subject:${u.subjectName}`,dependsOn:u.packages.map(m=>`${f}${m.name}`)},...v7(u.packages,f)]}),a=[...e.packages.map(u=>u.name),...i.map(u=>u["bom-ref"])],c=[{ref:n,dependsOn:a},...v7(e.packages,""),...s],l=o.length>0?[{aggregate:"incomplete",assemblies:[n,...i.map(u=>u["bom-ref"])]}]:void 0,d={bomFormat:"CycloneDX",specVersion:"1.5",serialNumber:`urn:uuid:${O0e(s1(e.subjectId)+s1(e.subjectName))}`,version:1,metadata:{timestamp:t().toISOString(),tools:[{name:e.generator}],component:{type:"application","bom-ref":n,name:e.subjectName,...e.subjectVersion?{version:e.subjectVersion}:{},...i.length>0?{components:i}:{}}},components:r,dependencies:c,...l?{compositions:l}:{}};return JSON.stringify(d,null,2)}function O0e(e){let t=(e+e+e+e).slice(0,32);return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-8${t.slice(17,20)}-${t.slice(20,32)}`}function a1(e,t,n){let r=e==="spdx"?S0e(t,n):E0e(t,n);return{format:e,mediaType:Qs[e],bytes:r}}var tE=x(()=>{"use strict";Za()});import{readFileSync as R7,writeFileSync as P0e,mkdirSync as A0e}from"node:fs";import{dirname as k7,join as $7}from"node:path";function C0e(e){let t=JSON.parse(e),n=new Map,r=(o,i,s)=>{if(!o)return;let a=`${o}@${i??""}`,c=n.get(a);if(c){s?.length&&(c.dependsOn=[...new Set([...c.dependsOn??[],...s])]);return}n.set(a,{name:o,version:i,type:"npm",purl:i?`pkg:npm/${encodeURIComponent(o)}@${i}`:void 0,dependsOn:s?.length?s:void 0})};if(t.packages)for(let[o,i]of Object.entries(t.packages)){if(o==="")continue;let s=i.name??o.replace(/^.*node_modules\//,"");r(s,i.version,i.dependencies?Object.keys(i.dependencies):void 0)}else if(t.dependencies)for(let[o,i]of Object.entries(t.dependencies))r(o,i.version,i.requires?Object.keys(i.requires):void 0);return[...n.values()].sort((o,i)=>o.name.localeCompare(i.name))}function _0e(e){let t=[],r=e.replace(/<dependencyManagement>[\s\S]*?<\/dependencyManagement>/,"").match(/<dependencies>([\s\S]*?)<\/dependencies>/);if(!r)return t;let o=r[1],i=/<dependency>([\s\S]*?)<\/dependency>/g,s;for(;(s=i.exec(o))!==null;){let a=s[1],c=a.match(/<groupId>([^<]+)<\/groupId>/)?.[1]?.trim(),l=a.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim(),d=a.match(/<version>([^<]+)<\/version>/)?.[1]?.trim();if(!c||!l)continue;let u=`${c}:${l}`;t.push({name:u,version:d,type:"maven",purl:d?`pkg:maven/${encodeURIComponent(c)}/${encodeURIComponent(l)}@${d}`:void 0})}return t.sort((a,c)=>a.name.localeCompare(c.name))}function I0e(e){let t=new Map,n=e.split(/^\[\[package\]\]\s*$/m).slice(1);for(let r of n){let o=r.split(/^\[/m)[0]??"",i=u=>new RegExp(`^${u}\\s*=\\s*"([^"]*)"`,"m").exec(o)?.[1],s=i("name"),a=i("version");if(!s||i("source")===void 0)continue;let c=/^dependencies\s*=\s*\[([\s\S]*?)\]/m.exec(o)?.[1],l=c?[...c.matchAll(/"([^"\s]+)[^"]*"/g)].map(u=>u[1]):[],d=`${s}@${a??""}`;t.has(d)||t.set(d,{name:s,version:a,type:"cargo",purl:a?`pkg:cargo/${encodeURIComponent(s)}@${a}`:void 0,dependsOn:l.length?[...new Set(l)]:void 0})}return[...t.values()].sort((r,o)=>r.name.localeCompare(o.name)||(r.version??"").localeCompare(o.version??""))}function N0e(e){for(let[t,n]of[["npm","package-lock.json"],["maven","pom.xml"],["cargo","Cargo.lock"]]){let r=$7(e,n);try{return R7(r,"utf-8"),{kind:t,path:r}}catch{continue}}}function j0e(e,t){return $7(e,`sbom.${t}.json`)}function L0e(e={}){let t=e.now??(()=>new Date);function n(r,o,i,s=xi){let a=N0e(r);if(!a)throw new Error(`no supported lockfile/manifest found under "${r}" (looked for package-lock.json, pom.xml, Cargo.lock) \u2014 the hermetic lockfile SBOM backend requires a lockfile on disk; use the deep-scan path (#610) for images with no lockfile`);let c=R7(a.path,"utf-8"),l=T0e[a.kind](c),d=`chant-lockfile-sbom/${D0e[a.kind]}`,u=a1(s,{subjectName:o,subjectId:i??a.path,packages:l,generator:d},t),p=e.outDir??r;return A0e(p,{recursive:!0}),P0e(j0e(p,s),u.bytes),{...u,packageCount:l.length,generator:d}}return{async forImage(r){throw new nE("forImage")},async forJar(r){return n(k7(r.jarPath),r.jarPath,r.digest,r.format)},async forZip(r){return n(k7(r.zipPath),r.zipPath,r.digest,r.format)},async forDir(r){return n(r.path,r.path,void 0,r.format)}}}var T0e,D0e,x7,c1=x(()=>{"use strict";tE();Za();Za();T0e={npm:C0e,maven:_0e,cargo:I0e},D0e={npm:"package-lock.json",maven:"pom.xml",cargo:"Cargo.lock"};x7=L0e()});function S7(){return l1||(l1=x7),l1}var Qs,xi,nE,l1,Za=x(()=>{"use strict";c1();Qs={spdx:"application/spdx+json",cyclonedx:"application/vnd.cyclonedx+json"},xi="spdx",nE=class extends Error{constructor(n){super(`SbomGenerator.${n} has no real implementation configured \u2014 inject a real generator (shelling out to syft/buildx/cyclonedx-maven/cdxgen) or use a mock in tests`);this.method=n;this.name="SbomGeneratorNotImplementedError"}}});import{existsSync as du}from"fs";import{dirname as aw,join as qf,resolve as E7}from"path";function cw(e){let t=E7(e),n=t;for(;;){let r=qf(n,"chant.config.ts");if(du(r))return{dir:n,configPath:r};let o=qf(n,"chant.config.json");if(du(o))return{dir:n,configPath:o};if(du(qf(n,".git"))||du(qf(n,"package.json")))return{dir:n};let i=aw(n);if(i===n)return{dir:t};n=i}}function kr(e){let t=E7(e),n;for(let r=t;;r=aw(r)){if(du(qf(r,".git"))){n=r;break}if(aw(r)===r)break}for(let r=t;;r=aw(r)){let[o,i]=M0e.map(c=>qf(r,c)),s=du(o),a=du(i);if(s&&a)return{dir:r,file:o,conflicting:i};if(s)return{dir:r,file:o};if(a)return{dir:r,file:i};if(n===void 0||r===n||aw(r)===r)return}}var M0e,Si=x(()=>{"use strict";M0e=["chant.workspace.json","chant.workspace.jsonc"]});import{existsSync as F0e}from"node:fs";import{dirname as d1,sep as rE}from"node:path";import{fileURLToPath as W0e,pathToFileURL as fyt}from"node:url";function O7(e){if(!/\.[cm]?js$/.test(e))return e;let t=e.lastIndexOf(u1);return t<0?e:e.slice(0,t)+`${rE}src${rE}`+e.slice(t+u1.length)}function P7(e){let t=/\.([cm]?)js$/.exec(e);if(!(!t||e.lastIndexOf(u1)<0))return O7(e).slice(0,-t[0].length)+`.${t[1]}ts`}function A7(e){let t=W0e(e),n=d1(O7(t));return n===d1(t)||F0e(n)?n:d1(t)}function C7(e){let t=e.replace(/[?#].*$/,"");return/\.(?:[cm]?ts|tsx)$/.test(t)&&!/\.d\.[cm]?ts$/.test(t)}function oE(e){return/\.(?:[cm]?js|json)$/.test(e.replace(/[?#].*$/,""))}function G0e(){if(C7(import.meta.url))return!0;if(typeof process>"u")return!1;let e=[...process.execArgv,...(process.env.NODE_OPTIONS??"").split(/\s+/)];return e.some((t,n)=>t==="--conditions=@intentius/chant-source"||t==="-C=@intentius/chant-source"||(t==="--conditions"||t==="-C")&&e[n+1]==="@intentius/chant-source")}var u1,lw,uu=x(()=>{"use strict";u1=`${rE}dist${rE}`;lw=G0e()?["@intentius/chant-source"]:[]});import{createRequire as B0e}from"node:module";function _7(e,t){let n=e?.code;return n!=="ERR_MODULE_NOT_FOUND"&&n!=="MODULE_NOT_FOUND"?!1:String(e.message).split(`
47
+ `)[0].includes(`'${t}`)}function I7(e,t){return new Error(`chant needs ${e} to ${t}; install it with: ${U0e[e]}`)}async function T7(e,t,n){try{return await n()}catch(r){throw _7(r,e)?I7(e,t):r}}function D7(e,t,n,r){try{return B0e(r)(t)}catch(o){throw _7(o,e)?I7(e,n):o}}var U0e,p1=x(()=>{"use strict";U0e={esbuild:"npm i -D esbuild",tsx:"npm i -D tsx"}});import{existsSync as iE,readFileSync as H0e,realpathSync as z0e}from"node:fs";import*as q0e from"node:module";import{dirname as g1,join as f1,sep as byt}from"node:path";import{fileURLToPath as V0e,pathToFileURL as kyt}from"node:url";function m1(){return globalThis[K0e]}function N7(e,t){let n=/^(@intentius\/chant(?:-[a-z0-9-]+)?)(\/.*)?$/.exec(e);if(!n)return;let r=n[2]?`.${n[2]}`:".",o=g1(t);for(;;){let i=f1(o,"node_modules",n[1]),s=f1(i,"package.json");if(iE(s)){let c;try{c=JSON.parse(H0e(s,"utf-8")).exports}catch{return}if(!c||typeof c!="object")return;let l=c,d=l[r],u;if(d===void 0){let g="";for(let m of Object.keys(l)){let h=m.indexOf("*");if(h<0||m.indexOf("*",h+1)>=0)continue;let y=m.slice(0,h),b=m.slice(h+1);!r.startsWith(y)||!r.endsWith(b)||r.length<m.length||y.length<=g.length||(g=y,d=l[m],u=r.slice(y.length,r.length-b.length))}}let p=d&&typeof d=="object"?d["@intentius/chant-source"]:void 0;if(typeof p!="string")return;let f=f1(i,u===void 0?p:p.split("*").join(u));return iE(f)?z0e(f):void 0}let a=g1(o);if(a===o)return;o=a}}function Rr(){let e=m1();if(!e)return!1;if(e.tsx)return!0;let t=n=>D7("tsx",n,"run TypeScript",import.meta.url);return t("tsx/cjs/api").register(),t("tsx/esm/api").register(),e.tsx=!0,!0}function sE(e){return oE(e)?m1()?.tsx??!1:Rr()}function j7(){let e=m1();return e!==void 0&&!e.tsx}function aE(e){let t=A7(e);return iE(t)?t:g1(V0e(e))}function Zr(e){return iE(e)?e:e.replace(/\.ts$/,".js")}var xyt,K0e,Xo=x(()=>{"use strict";uu();p1();({registerHooks:xyt}=q0e),K0e=Symbol.for("chant.compiledCli")});async function L7(e){return Rr(),await import(e)}var M7=x(()=>{"use strict";Xo()});function Yr(e){if(e===null||typeof e!="object"||!("default"in e))return e;let t=e.default;if(!J0e(t))return e;let n={};for(let r of Object.keys(t))r!=="__esModule"&&(n[r]=t[r]);return n}function J0e(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&e.__esModule===!0}var hl=x(()=>{"use strict"});var F7=ve((Ayt,h1)=>{if(typeof h1=="object")throw new Error("esbuild is not part of chant's wave-job runtime (wave-runtime.mjs): this path needs the full @intentius/chant CLI");h1.exports={}});import{existsSync as y1,mkdtempSync as Z0e,readFileSync as Y0e,realpathSync as B7,rmSync as W7,statSync as U7,writeFileSync as Q0e}from"node:fs";import{createRequire as X0e}from"node:module";import{tmpdir as eIe}from"node:os";import{dirname as H7,join as dw,resolve as tIe}from"node:path";function oIe(){let e=globalThis;return e.__chantExternalPackagePathCache??=new Map}function iIe(e,t){let n=t;for(;;){let r=dw(n,"node_modules",e);if(y1(r)){let i=dw(r,"package.json");if(!y1(i))return;let s;try{s=JSON.parse(Y0e(i,"utf-8"))}catch{return}if(typeof s!="object"||s===null||s.exports!==void 0)return;let a=s.main,l=tIe(r,typeof a=="string"?a:"index.js");if(!y1(l)||!U7(l).isFile())return;try{return B7(l)}catch{return}}let o=H7(n);if(o===n)return;n=o}}function sIe(){let e=[],t=new Map,n=oIe();for(let o of rIe)try{let i=n.get(o);if(i===void 0&&!n.has(o)&&(i=iIe(o,G7)??nIe.resolve(o,{paths:[G7]}),n.set(o,i)),i===void 0)continue;t.set(o,i),e.push(H7(i))}catch{n.set(o,void 0)}return{plugin:{name:"chant-sandbox-external-trusted-packages",setup(o){for(let[i,s]of t){let a=new RegExp(`^${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`);o.onResolve({filter:a},()=>({path:s,external:!0}))}}},readPaths:e}}function aIe(){return{name:"chant-sandbox-core-source",setup(e){e.onResolve({filter:/^@intentius\/chant(?:\/.*)?$/},t=>{if(!t.importer)return;let n=N7(t.path,t.importer);return n===void 0?void 0:{path:n}})}}}async function cE(e){let t=B7(Z0e(dw(eIe(),"chant-sandbox-"))),n=dw(t,"driver.mts");Q0e(n,e,"utf-8");let r=dw(t,"child.mjs"),{plugin:o,readPaths:i}=sIe(),s;try{s=await T7("esbuild","bundle a TypeScript project",()=>Promise.resolve().then(()=>et(F7(),1)))}catch(d){throw W7(t,{recursive:!0,force:!0}),d}let a=performance.now();try{await s.build({entryPoints:[n],outfile:r,bundle:!0,platform:"node",format:"esm",absWorkingDir:t,logLevel:"silent",...lw.length>0?{conditions:["module",...lw]}:{},plugins:[aIe(),o]})}catch(d){throw W7(t,{recursive:!0,force:!0}),d}let c=performance.now()-a,l=U7(r).size;return{bundlePath:r,bundleDir:t,externalReadPaths:i,durationMs:c,bytes:l}}var G7,nIe,rIe,w1=x(()=>{"use strict";uu();p1();Xo();G7=import.meta.dirname,nIe=X0e(import.meta.url),rIe=["typescript","@cdktn/hcl2json"]});function b1(e){for(let t of Object.keys(Vf))delete Vf[t];Object.assign(Vf,e)}var Vf,uw=x(()=>{"use strict";Vf={}});import{dirname as lE,join as fs}from"node:path";function pu(e){return JSON.stringify(e)}function v1(e=[]){return["function send(payload) {",...e.map(t=>` ${t}`),' if (typeof process.send !== "function") {'," console.log(JSON.stringify(payload));"," return Promise.resolve();"," }"," return new Promise((resolve) => {"," const lost = (err) => {",' writeSync(2, "chant: the sandboxed child could not hand its result to the parent: " +',' (err && err.message ? err.message : String(err)) + " (chant#2461)\\n");'," process.exit(1);"," };"," try {"," process.send(payload, (err) => (err ? lost(err) : resolve()));"," } catch (err) {"," lost(err);"," }"," });","}"]}function z7(e){return[`import { classifyChildError } from ${pu(cIe)};`,`import { scanConfigWireSafety } from ${pu(lIe)};`,`import { esModuleNamespace } from ${pu(dIe)};`,'import { writeSync } from "node:fs";',"",...v1(),"","async function main() {"," let namespace;"," try {",` namespace = esModuleNamespace(await import(${pu(e)}));`," } catch (err) {",` await send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err).toJSON() });`," return;"," }",""," const selected = namespace.default ?? namespace.config ?? namespace;",""," const offenders = scanConfigWireSafety(selected);"," if (offenders.length > 0) {",' await send({ kind: "chant-config", ok: false, offenders });'," return;"," }",""," let config;"," try {"," config = JSON.parse(JSON.stringify(selected ?? {}));"," } catch (err) {",` await send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err, "resolution").toJSON() });`," return;"," }",' await send({ kind: "chant-config", ok: true, config });',"}","","main().catch((err) =>",` send({ kind: "chant-config", ok: false, error: classifyChildError(${pu(e)}, err).toJSON() }),`,");"].join(`
48
48
  `)}var dE,fu,Byt,Uyt,Hyt,cIe,zyt,lIe,qyt,Vyt,Kyt,dIe,k1=x(()=>{"use strict";uw();Xo();dE=aE(import.meta.url),fu=fs(dE,".."),Byt=Zr(fs(fu,"collect.ts")),Uyt=Zr(fs(fu,"resolve.ts")),Hyt=Zr(fs(fu,"entity-wire-codec.ts")),cIe=Zr(fs(dE,"child-errors.ts")),zyt=Zr(fs(lE(fu),"provenance.ts")),lIe=Zr(fs(dE,"config-wire.ts")),qyt=Zr(fs(dE,"policy-wire.ts")),Vyt=Zr(fs(lE(fu),"lint","post-synth.ts")),Kyt=Zr(fs(lE(fu),"params.ts")),dIe=Zr(fs(lE(fu),"module-interop.ts"))});function q7(e,t){let n=t.map(r=>` ${r.path||"<root>"}: ${r.found}`);return[`Cannot evaluate ${e} inside the --sandbox boundary: it holds values that are not data.`,...n,"Under --sandbox the config is evaluated in an isolated child process and only JSON crosses back, so every value must be a string, number, boolean, null, array or plain object. Move the offending value out of chant.config.ts (lint rule plugins and policy checks are referenced by path, not embedded), or drop --sandbox for this build."].join(`
49
49
  `)}var V7=x(()=>{"use strict"});import{fork as uIe}from"node:child_process";function K7(e){let t="";return{push(n){t+=n.toString();let r=t.indexOf(`
50
50
  `);for(;r!==-1;)e(t.slice(0,r)),t=t.slice(r+1),r=t.indexOf(`
51
51
  `)},flush(){t.length>0&&(e(t),t="")}}}function pIe(e,t,n,r,o){let i=r.trim(),s=`${e}: child exited before reporting results (code ${t}, signal ${n})`;if(o.length>0){let a=o.map(c=>c&&typeof c=="object"?`{${Object.keys(c).join(", ")}}`:typeof c).join(", ");return`${s}. It sent ${o.length} message(s) the parent did not recognise (${a}), so the payload shape and the parent's check disagree`+(i?`: ${i}`:"")}return i?`${s}: ${i}`:t!==0||n!==null?s:`${s}. It exited cleanly with nothing on stderr, and no message arrived even after its IPC channel closed, so it never sent one: something it awaited never settled. On the run path the usual cause is a project file with a top-level \`await\` that does not settle. Module scope is arbitrary project source, an import of such a file never completes, and a promise that never settles is not a rejection, so the driver's own \`main().catch\` does not see it either. The config driver has nothing to await that can hang, and a failed send exits non-zero with a reason on stderr, so on the config path this has no known cause: please report it with the command that produced it (chant#2461).`}function R1(e,t,n=fIe){e.on("exit",(r,o)=>{let i=!1,s,a=()=>{i||(i=!0,s!==void 0&&clearTimeout(s),t(r,o))};if(!e.connected){a();return}e.once("disconnect",a),s=setTimeout(a,n)})}function J7(e,t){let{bundlePath:n,bundleDir:r,projectRealpath:o,externalReadPaths:i,env:s,timeoutMs:a,label:c,send:l,outputPrefix:d}=e;return new Promise((u,p)=>{let f=[r,o,...i].map(O=>`--allow-fs-read=${O}`),g=uIe(n,[],{execArgv:["--permission",...f],env:s,stdio:["ignore","pipe","pipe","ipc"]}),m=!1,h="",y=[],b=setTimeout(()=>{m||(m=!0,g.kill(),p(new Error(`${c} timed out after ${a}ms`)))},a);l!==void 0&&g.send(l,O=>{m||!O||(m=!0,clearTimeout(b),g.kill(),p(new Error(`${c}: failed to send the child its input: ${O.message}`)))});let v=O=>{process.stderr.write(`${d} ${O}
52
- `)},k=K7(v),$=K7(v);g.stdout?.on("data",O=>{k.push(O)}),g.stdout?.on("end",()=>k.flush()),g.stderr?.on("data",O=>{h+=O.toString(),$.push(O)}),g.stderr?.on("end",()=>$.flush()),g.on("message",O=>{if(!m){if(!t(O)){y.push(O);return}m=!0,clearTimeout(b),g.kill(),u(O)}}),g.on("error",O=>{m||(m=!0,clearTimeout(b),p(O))}),R1(g,(O,E)=>{m||(m=!0,clearTimeout(b),p(new Error(pIe(c,O,E,h,y))))})})}var fIe,$1=x(()=>{"use strict";fIe=2e3});var Y7={};me(Y7,{evaluateConfigSandboxed:()=>wIe});import{realpathSync as gIe,rmSync as mIe}from"node:fs";import{resolve as Z7}from"node:path";function yIe(e){return typeof e=="object"&&e!==null&&e.kind==="chant-config"&&typeof e.ok=="boolean"}async function wIe(e,t){let n=z7(e),{bundlePath:r,bundleDir:o,externalReadPaths:i,durationMs:s,bytes:a}=await cE(n);try{let c;try{c=gIe(Z7(t))}catch{c=Z7(t)}let l={PATH:process.env.PATH??""},d=process.env[Kf];d&&(l[Kf]=d);let u=await J7({bundlePath:r,bundleDir:o,projectRealpath:c,externalReadPaths:i,env:l,timeoutMs:hIe,label:`sandboxed evaluation of ${e}`,outputPrefix:"[sandbox:config]"},yIe);if(!u.ok)throw u.offenders&&u.offenders.length>0?new Error(q7(e,u.offenders)):new Error(u.error?.message?`Failed to evaluate ${e} inside the --sandbox boundary: ${u.error.message}`:`Failed to evaluate ${e} inside the --sandbox boundary`);return{config:u.config??{},bundleMs:s,bundleBytes:a}}finally{mIe(o,{recursive:!0,force:!0})}}var hIe,Q7=x(()=>{"use strict";w1();k1();V7();$1();pw();hIe=6e4});import{dirname as bIe}from"node:path";function kIe(e){let t=Yr(e);return t.default??t.config??t}async function X7(e,t=bIe(e)){if(!vIe)return kIe(await L7(e));if(x1.has(e))return x1.get(e);let{evaluateConfigSandboxed:n}=await Promise.resolve().then(()=>(Q7(),Y7)),{config:r}=await n(e,t);return x1.set(e,r),r}var vIe,x1,S1=x(()=>{"use strict";M7();hl();vIe=!1,x1=new Map});var C1={};me(C1,{importLexiconModule:()=>mu,importLexiconPackage:()=>Oo,isPackageNotFound:()=>P1,lexiconDeclarationName:()=>rQ,lexiconModulePath:()=>Ei,lexiconModuleRoot:()=>A1,lexiconNames:()=>Eo,lexiconPackagesToInstall:()=>AIe,lexiconSourceLabel:()=>PIe,packageNameOf:()=>iQ,pathLexiconMap:()=>SIe,pathLexiconRoot:()=>uE,recordedLexiconModules:()=>EIe,registerLexiconDeclarations:()=>wl,resetLexiconModules:()=>OIe,resolveFromProject:()=>pE});import{createRequire as tQ}from"node:module";import{dirname as RIe,isAbsolute as gu,join as $Ie,relative as nQ,resolve as Jf,sep as xIe}from"node:path";import{pathToFileURL as O1}from"node:url";function rQ(e){return typeof e=="string"?e:e.name}function Eo(e){return e?.map(rQ)}function E1(e,t){let n=nQ(t,e);return n===""||!n.startsWith("..")&&!gu(n)}function uE(e,t,n="."){let r=gu(e.module)?e.module:Jf(t,e.module),o=e.root!==void 0,i=o?gu(e.root)?Jf(e.root):Jf(t,e.root):RIe(r),s=Jf(t),a=Jf(t,n),c;return E1(i,s)?E1(a,i)?c=`${i} contains the project's source directory (${a})`:E1(r,i)||(c=`the module ${r} is not inside ${i}`):c=`${i} is outside the project (${s})`,c===void 0?{root:i}:o?{problem:c}:{}}function wl(e,t,n){let r={};for(let o of e??[]){if(typeof o=="string"){yl.delete(o),fw.delete(o);continue}let i=oQ(o,t);yl.set(o.name,i),r[o.name]=i;let{root:s}=uE(o,t,n);s===void 0?fw.delete(o.name):fw.set(o.name,s)}return r}function oQ(e,t){return gu(e.module)?e.module:Jf(t,e.module)}function SIe(e,t){let n=new Map;for(let r of e)typeof r!="string"&&n.set(r.name,oQ(r,t));return n}function EIe(){return new Map(yl)}function Ei(e){return yl.get(e)}function A1(e){return fw.get(e)}function OIe(){yl.clear(),fw.clear()}async function mu(e,t={}){let n=yl.get(e);if(n!==void 0)try{return(t.typeScript??!oE(n))&&Rr(),Yr(await import(n))}catch(r){throw new Error(`lexicon "${e}" is declared with module ${n}, which could not be loaded: `+(r instanceof Error?r.message:String(r)))}}function PIe(e,t=process.cwd(),n=yl){let r=n.get(e);if(r===void 0)return`@intentius/chant-lexicon-${e}`;let o=nQ(t,r);return o===""||o.startsWith("..")||gu(o)?r:`./${o.split(xIe).join("/")}`}function AIe(e,t=yl){return e.filter(n=>!t.has(n)).map(n=>`@intentius/chant-lexicon-${n}`)}function iQ(e){if(e.startsWith(".")||gu(e)||e.startsWith("file:"))return;let t=e.split("/");return e.startsWith("@")?t.slice(0,2).join("/"):t[0]}function P1(e,t){let n=e?.code;if(n!=="ERR_MODULE_NOT_FOUND"&&n!=="MODULE_NOT_FOUND")return!1;let r=e instanceof Error?e.message:String(e);return[`'${t}'`,`"${t}"`,`'${t}/`,`"${t}/`].some(o=>r.includes(o))}function pE(e,t=process.cwd()){try{return tQ($Ie(t,"package.json")).resolve(e)}catch{return}}function CIe(e){if(gu(e))return O1(e).href;let t=import.meta.resolve;return typeof t=="function"?t(e):O1(tQ(import.meta.url).resolve(e)).href}async function Oo(e,t=process.cwd()){let n=iQ(e);if(j7()){let r;try{r=CIe(e)}catch(o){if(n===void 0||!P1(o,n))Rr();else return eQ(e,t,o)}r!==void 0&&sE(r)}try{return Yr(await import(e))}catch(r){if(n===void 0||!P1(r,n))throw r;return eQ(e,t,r)}}async function eQ(e,t,n){let r=pE(e,t);if(r===void 0)throw n;return sE(r),Yr(await import(O1(r).href))}var yl,fw,Zn=x(()=>{"use strict";Xo();hl();uu();yl=new Map,fw=new Map});var _Ie,IIe,TIe,Zf,sQ,fE=x(()=>{"use strict";Jn();_Ie=w.strictObject({env:w.string().min(1)}),IIe=w.strictObject({capability:w.string().min(1),member:w.string().min(1).optional(),env:w.string().min(1).optional()}),TIe=w.union([_Ie,IIe]),Zf=w.strictObject({url:w.string().min(1),key:TIe.optional(),timeoutMs:w.number().int().positive().optional()}),sQ=w.strictObject({backends:w.record(w.string(),Zf).optional()})});var bl,_1,DIe,NIe,jIe,LIe,MIe,FIe,aQ,cQ=x(()=>{"use strict";Jn();bl=w.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"an environment variable name"),_1=w.union([w.string().min(1),w.literal(!1)]),DIe=w.object({type:w.literal("npm"),packages:w.array(w.string().min(1)).min(1),registry:w.string().url().optional(),access:w.enum(["public","restricted"]).optional(),sbom:_1.optional(),stage:w.boolean().optional(),tokenEnv:bl.optional(),pins:w.string().min(1).optional(),registryWait:w.number().int().min(0).optional()}).strict(),NIe=w.object({type:w.literal("oci"),image:w.string().min(1),repository:w.string().min(1),tags:w.array(w.string().min(1)).optional(),usernameEnv:bl.optional(),passwordEnv:bl.optional(),sbom:_1.optional()}).strict(),jIe=w.object({type:w.literal("forge"),forge:w.enum(["github","gitlab","forgejo"]),repo:w.string().min(1),api:w.string().url().optional(),assets:w.array(w.string().min(1)),notes:w.object({file:w.string().min(1),heading:w.string().regex(/^#{1,6} \S/,"a markdown heading, such as ## {version}"),linkBase:w.string().url().optional(),before:w.string().min(1).optional(),after:w.string().min(1).optional()}).strict().optional(),tag:w.string().min(1).optional(),tokenEnv:bl.optional(),sbom:_1.optional(),latest:w.union([w.boolean(),w.literal("legacy")]).optional()}).strict().refine(e=>e.assets.length>0||e.notes!==void 0,{message:"a forge release needs assets, notes or both",path:["assets"]}),LIe=w.object({type:w.literal("homebrew"),tap:w.string().regex(/^[^/\s]+\/[^/\s]+$/,"owner/name"),formula:w.string().min(1),template:w.string().min(1),assets:w.array(w.string().min(1)).min(1),url:w.string().min(1),branch:w.string().min(1).optional(),api:w.string().url().optional(),tokenEnv:bl.optional(),sshKeyEnv:bl.optional()}).strict(),MIe=w.object({type:w.literal("marketplace"),marketplace:w.enum(["vscode","openvsx"]),vsix:w.string().min(1),registry:w.string().url().optional(),tokenEnv:bl.optional(),auth:w.enum(["token","azure-credential","trusted-publishing"]).optional(),onRefusal:w.enum(["fail","warn"]).optional()}).strict(),FIe=w.object({type:w.literal("tauri-updater"),repo:w.string().regex(/^[^/\s]+\/[^/\s]+$/,"owner/name"),tag:w.string().min(1),platforms:w.record(w.string().regex(/^(darwin|linux|windows)-[a-z0-9_]+(-[a-z0-9]+)?$/,"<os>-<arch> or <os>-<arch>-<installer>"),w.string().min(1)).refine(e=>Object.keys(e).length>0,"at least one platform"),assets:w.array(w.string().min(1)).optional(),notes:w.string().min(1).optional(),url:w.string().min(1).optional(),manifest:w.string().regex(/^[^/\\]+$/,"a file name").optional(),latest:w.union([w.boolean(),w.literal("legacy")]).optional(),api:w.string().url().optional(),tokenEnv:bl.optional()}).strict(),aQ=w.discriminatedUnion("type",[DIe,NIe,jIe,LIe,MIe,FIe])});function Oi(e){return typeof e=="string"?e:e.name}function mE(e){return e?.map(Oi)}function vl(e){return e.includes("*")}function gw(e,t){let n=e.split("*");if(n.length===1)return e===t;let r=n[0],o=n[n.length-1];if(!t.startsWith(r))return!1;let i=r.length;for(let s=1;s<n.length-1;s++){let a=n[s];if(a==="")continue;let c=t.indexOf(a,i);if(c===-1)return!1;i=c+a.length}return t.length-i>=o.length&&t.endsWith(o)}function Yf(e,t){let n=mE(e)??[];return n.includes(t)?!0:n.some(r=>vl(r)&&gw(r,t))}function I1(e,t){let n=e?.find(r=>Oi(r)===t)??e?.find(r=>vl(Oi(r))&&gw(Oi(r),t));return n&&typeof n!="string"?n.endpoint:void 0}function hE(e,t){let n=e?.find(r=>Oi(r)===t)??e?.find(r=>vl(Oi(r))&&gw(Oi(r),t));return n&&typeof n!="string"?n.executor:void 0}function yE(e){return typeof e=="object"&&e!==null&&typeof e.param=="string"}function mw(e){let t=e.ownership;if(!(!t||!t.stack||t.enabled===!1))return t.stack}var gE,wE=x(()=>{"use strict";gE=["github","gitlab","forgejo"]});var W1={};me(W1,{ChantConfigSchema:()=>hw,DEFAULT_CHANT_CONFIG:()=>j1,EXECUTOR_FORGES:()=>gE,InvalidChantConfigError:()=>Qf,ROOT_SOURCE_EXCLUDES:()=>kE,configuredSourceDir:()=>mQ,environmentEndpoint:()=>I1,environmentExecutor:()=>hE,environmentName:()=>Oi,environmentNames:()=>mE,findProjectConfigPastFragments:()=>yw,isEnvironmentPattern:()=>vl,isLintOnlyFragment:()=>RE,isOwnershipParamRef:()=>yE,loadChantConfig:()=>gs,loadChantConfigUpward:()=>bE,matchesDeclaredEnvironment:()=>Yf,matchesEnvironmentPattern:()=>gw,ownershipEnvDisagreement:()=>UIe,resolveAutoReleaseDisabled:()=>HIe,resolveDiscoveryGlobs:()=>hu,resolveFoldEnabled:()=>wQ,resolveKnowledgeDir:()=>zIe,resolveOwnershipEnv:()=>L1,resolveOwnershipMarker:()=>yQ,resolveOwnershipStack:()=>mw,resolveSandboxEnabled:()=>bQ,resolveSbomFormat:()=>M1,resolveSigningDefaults:()=>$E,resolveSourceDir:()=>vE,resolveVulnPolicy:()=>F1});import{existsSync as lQ,readFileSync as fQ}from"fs";import{dirname as gQ,join as T1,resolve as D1}from"path";async function gs(e){let t=T1(e,"chant.config.ts");if(lQ(t)){let r=await X7(t,e);return{config:pQ(r,t),configPath:t}}let n=T1(e,"chant.config.json");if(lQ(n)){let{readFileSync:r}=await import("fs"),o=r(n,"utf-8"),i=JSON.parse(o);return{config:pQ(i,n),configPath:n}}return{config:j1}}async function bE(e){let{dir:t,configPath:n}=yw(e);return n&&BIe(n),gs(t)}function yw(e){let{dir:t,configPath:n}=cw(e);for(;n&&RE(n);){let r=gQ(t);if(r===t)break;({dir:t,configPath:n}=cw(r))}return{dir:t,configPath:n}}function mQ(e){return typeof e?.sourceDir=="string"&&e.sourceDir!==""?e.sourceDir:"."}function vE(e,t,n){return D1(e,n??mQ(t))}async function hu(e,t={}){let{dir:n,configPath:r}=yw(e);if(!r)return;let o;try{({config:o}=await gs(n))}catch(c){if(c instanceof Qf&&(c.key==="exclude"||c.key==="include"))throw c;return}let i=t.sourceWalk===!0&&o.sourceDir===void 0&&D1(e)===D1(n),s=[...o.exclude??[],...i?kE:[]],a=o.include??[];if(!(s.length===0&&a.length===0))return{root:n,exclude:s,include:a}}function RE(e){if(!e.endsWith("chant.config.json"))return!1;try{let t=JSON.parse(fQ(e,"utf-8"));if(typeof t!="object"||t===null||Array.isArray(t))return!1;let n=Object.keys(t).filter(r=>!hQ(r));return n.length>0&&n.every(r=>N1.has(r))}catch{return!1}}function BIe(e){if(e.endsWith("chant.config.json"))try{let t=JSON.parse(fQ(e,"utf-8"));if(typeof t!="object"||t===null||Array.isArray(t))return;let n=Object.keys(t).filter(r=>!hQ(r));if(n.some(r=>!N1.has(r))&&!n.some(r=>uQ.has(r))){let r=n.filter(o=>!N1.has(o));console.error(`warning: ${e} is being used as the project config, but declares no project-level key (${[...uQ].slice(0,4).join(", ")}, \u2026). ${r.length===1?"The key":"The keys"} ${r.map(o=>`"${o}"`).join(", ")} stopped the walk to the real one \u2014 any config above this file is being ignored. Prefix a comment key with "_", or move the key to the project config. (chant #1711)`)}}catch{}}function L1(e,t){let n=e.ownership?.env;if(!yE(n))return n;let r=n.param,o=e.buildParams?.[r];if(!o)throw new Error(`ownership.env references build parameter "${r}", which chant.config.ts's buildParams does not declare`);let i=t?.find(s=>s.name===r);if(!i)throw new Error(`ownership.env references build parameter "${r}", which resolved to no value for this build \u2014 pass --param ${r}=<value>${o.env?`, set ${o.env}`:""}, or give it a default`);return String(i.value)}function yQ(e,t){let n=mw(e);if(n!==void 0)return{stack:n,env:L1(e,t)}}function UIe(e,t){let n=e.ownership?.env;if(typeof n!="string"||mw(e)===void 0)return;let r=t?.find(o=>o.name==="env");if(!(!r||String(r.value)===n))return`ownership.env is "${n}" but the env build parameter resolved to ${JSON.stringify(r.value)} (${r.source}) \u2014 the ownership marker and params.env disagree about which environment this build is for. Use ownership: { env: { param: "env" } } so the marker follows the parameter.`}function HIe(e,t){return t?!0:e.release?.autoRecord===!1}function wQ(e,t){return t!==void 0?t:e.build?.fold!==void 0?e.build.fold:!0}function bQ(e,t){return t?!0:e.build?.sandbox===!0}function M1(e,t){return t??e.sbom?.format??xi}function $E(e){let t=e.signing,n=t?.keyless!==!1;return{keyless:n,...!n&&t?.key?{key:{key:t.key}}:{},identityPolicyDefaults:{expectedIssuer:t?.oidcIssuer,expectedIdentity:t?.identity,identityIsRegexp:t?.identityIsRegexp,key:t?.keyless===!1?t?.key:void 0}}}function F1(e){let t=e.vulnPolicy;if(!t)return{};let n={};return t.failSeverity&&(n.failSeverity=t.failSeverity),t.fixableOnly!==void 0&&(n.fixableOnly=t.fixableOnly),t.warnSeverity&&(n.warnSeverity=t.warnSeverity),t.failOnLicense!==void 0&&(n.failOnLicense=t.failOnLicense),t.failOnUnknownSeverity!==void 0&&(n.failOnUnknownSeverity=t.failOnUnknownSeverity),t.failOnKev!==void 0&&(n.failOnKev=t.failOnKev),t.failEpssAtOrAbove!==void 0&&(n.failEpssAtOrAbove=t.failEpssAtOrAbove),t.warnEpssAtOrAbove!==void 0&&(n.warnEpssAtOrAbove=t.warnEpssAtOrAbove),t.exploitabilityFixableOnly!==void 0&&(n.exploitabilityFixableOnly=t.exploitabilityFixableOnly),t.license&&(n.license=t.license),n}function zIe(e,t){return T1(t,e.knowledge?.dir??"knowledge")}function pQ(e,t){if(typeof e!="object"||e===null)return j1;let n=hw.safeParse(e);if(!n.success){let a=n.error.issues[0],c=a.path.length>0?a.path.join("."):void 0,l=t?` in ${t}`:"";throw new Qf(`Invalid chant config${l}: ${c?`${c}: `:""}${a.message}`,a.path.length>0?String(a.path[0]):void 0)}let r=e.lexicons,o=t!==void 0?gQ(t):process.cwd(),i=e.sourceDir;for(let[a,c]of(r??[]).entries()){if(typeof c=="string"||c.root===void 0)continue;let{problem:l}=uE(c,o,i);if(l!==void 0){let d=t?` in ${t}`:"";throw new Qf(`Invalid chant config${d}: lexicons.${a}.root: ${l}`,"lexicons")}}let s=wl(r,o,i);return Object.keys(s).length>0?{...e,lexicons:Eo(r),lexiconModules:s}:e}var dQ,WIe,GIe,hw,j1,kE,N1,hQ,uQ,Qf,En=x(()=>{"use strict";Jn();Za();Si();S1();Zn();fE();cQ();wE();wE();dQ={bucket:w.string().min(1),prefix:w.string().optional(),region:w.string().min(1).optional(),endpoint:w.string().url().optional(),forcePathStyle:w.boolean().optional(),credentials:w.object({accessKeyId:w.string().min(1),secretAccessKey:w.string().min(1),sessionToken:w.string().min(1).optional()}).strict().optional()},WIe=w.union([w.string().min(1),w.object({name:w.string().min(1),endpoint:w.string().min(1).optional(),canary:w.boolean().optional(),executor:w.object({forge:w.enum(gE),workflow:w.string().min(1)}).strict().optional()})]),GIe=w.union([w.string().min(1),w.object({name:w.string().min(1),module:w.string().min(1),root:w.string().min(1).optional()}).strict()]),hw=w.object({lexicons:w.array(GIe).optional(),capabilities:w.array(w.string().min(1)).optional(),environments:w.array(WIe).optional(),sourceDir:w.string().min(1).optional(),lint:w.record(w.string(),w.unknown()).optional(),ownership:w.object({stack:w.string().min(1).optional(),env:w.union([w.string().min(1),w.object({param:w.string().min(1)})]).optional(),enabled:w.boolean().optional()}).optional(),build:w.object({fold:w.boolean().optional()}).optional(),graph:w.object({lint:w.enum(["gate","report"]).optional(),reader:w.object({module:w.string().min(1),config:w.record(w.string(),w.unknown()).optional()}).strict().optional()}).strict().optional(),buildParams:w.record(w.string(),w.object({type:w.enum(["string","number","boolean"]),default:w.union([w.string(),w.number(),w.boolean()]).optional(),enum:w.array(w.union([w.string(),w.number(),w.boolean()])).optional(),env:w.string().min(1).optional(),required:w.boolean().optional(),description:w.string().optional()})).optional(),release:w.object({autoRecord:w.boolean().optional(),publish:w.array(aQ).optional(),images:w.array(w.union([w.object({name:w.string().min(1),build:w.string().min(1),archive:w.string().min(1),platforms:w.array(w.string().min(1)).min(1).optional()}).strict(),w.object({name:w.string().min(1),dockerfile:w.string().min(1),context:w.string().min(1).optional(),platforms:w.array(w.string().min(1)).min(1).optional(),archive:w.string().min(1).optional(),prepare:w.string().min(1).optional(),args:w.record(w.string(),w.string()).optional()}).strict()])).optional(),lane:w.string().regex(/^[a-z0-9][a-z0-9-]*$/,"a ci.green lane name: lowercase letters, digits and dashes").optional(),version:w.object({packages:w.array(w.string().min(1)).min(1),lockfile:w.union([w.string().min(1),w.literal(!1)]).optional()}).strict().optional(),workflow:w.object({trigger:w.enum(["tag","dispatch"]).optional(),gate:w.enum(["last-green","head"]).optional(),install:w.string().min(1).optional(),build:w.union([w.string().min(1),w.literal(!1)]).optional(),chant:w.string().min(1).optional(),after:w.array(w.string().min(1)).optional(),permissions:w.record(w.string(),w.enum(["read","write"])).optional(),env:w.record(w.string(),w.string()).optional(),setup:w.array(w.union([w.object({uses:w.string().min(1),with:w.record(w.string(),w.union([w.string(),w.number(),w.boolean()])).optional(),env:w.record(w.string(),w.string()).optional()}).strict(),w.object({run:w.string().min(1),env:w.record(w.string(),w.string()).optional()}).strict()])).optional(),file:w.string().regex(/^[^/][^\0]*$/,"a path from the repository root").refine(e=>!e.split("/").includes(".."),"a path inside the repository").optional()}).strict().optional()}).optional(),run:w.object({on:w.string().min(1).optional()}).strict().optional(),sbom:w.object({format:w.enum(["spdx","cyclonedx"]).optional(),enabled:w.boolean().optional()}).optional(),signing:w.object({keyless:w.boolean().optional(),oidcIssuer:w.string().min(1).optional(),identity:w.string().min(1).optional(),identityIsRegexp:w.boolean().optional(),key:w.string().min(1).optional()}).optional(),vulnPolicy:w.object({failSeverity:w.enum(["critical","high","medium","low","negligible","unknown"]).optional(),fixableOnly:w.boolean().optional(),warnSeverity:w.enum(["critical","high","medium","low","negligible","unknown"]).optional(),failOnLicense:w.boolean().optional(),failOnUnknownSeverity:w.boolean().optional(),failOnKev:w.boolean().optional(),failEpssAtOrAbove:w.number().min(0).max(1).optional(),warnEpssAtOrAbove:w.number().min(0).max(1).optional(),exploitabilityFixableOnly:w.boolean().optional(),license:w.object({allow:w.array(w.string()).optional(),deny:w.array(w.string()).optional()}).optional(),scanner:w.enum(["grype","trivy"]).optional(),vexSources:w.array(w.string()).optional()}).optional(),knowledge:w.object({dir:w.string().min(1).optional()}).optional(),codegen:w.object({outDir:w.string().min(1).optional()}).strict().optional(),decide:sQ.optional(),exclude:w.array(w.string().min(1)).optional(),include:w.array(w.string().min(1)).optional(),rootOnly:w.boolean().optional(),snapshots:w.discriminatedUnion("store",[w.object({store:w.literal("git-ref"),ref:w.string().regex(/^refs\/chant\//).optional(),readOrphanBranch:w.boolean().optional()}).strict(),w.object({store:w.literal("orphan-branch")}).strict(),w.object({store:w.literal("local"),dir:w.string().min(1).optional()}).strict(),w.object({store:w.literal("s3"),...dQ}).strict(),w.object({store:w.literal("none")}).strict()]).optional(),observationBaseline:w.object({store:w.enum(["file","git-ref","s3","none"]),dir:w.string().min(1).optional(),ref:w.string().regex(/^refs\/chant\//).optional(),s3:w.object(dQ).strict().optional()}).strict().optional()}).passthrough(),j1={};kE=["scripts","migrations"];N1=new Set(["$schema","extends","rules","overrides","plugins","policies"]),hQ=e=>e.startsWith("_");uQ=new Set(Object.keys(hw.shape).filter(e=>e!=="lint"));Qf=class extends Error{constructor(n,r){super(n);this.key=r}}});var Kf,pw=x(()=>{"use strict";En();Kf="CHANT_ENV"});var ww=ve((Nwt,xQ)=>{"use strict";var vQ="[^\\\\/]",qIe="(?=.)",kQ="[^/]",G1="(?:\\/|$)",RQ="(?:^|\\/)",B1=`\\.{1,2}${G1}`,VIe="(?!\\.)",KIe=`(?!${RQ}${B1})`,JIe=`(?!\\.{0,1}${G1})`,ZIe=`(?!${B1})`,YIe="[^.\\/]",QIe=`${kQ}*?`,XIe="/",$Q={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:qIe,QMARK:kQ,END_ANCHOR:G1,DOTS_SLASH:B1,NO_DOT:VIe,NO_DOTS:KIe,NO_DOT_SLASH:JIe,NO_DOTS_SLASH:ZIe,QMARK_NO_DOT:YIe,STAR:QIe,START_ANCHOR:RQ,SEP:XIe},eTe={...$Q,SLASH_LITERAL:"[\\\\/]",QMARK:vQ,STAR:`${vQ}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},tTe={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};xQ.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:tTe,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?eTe:$Q}}});var bw=ve(Po=>{"use strict";var{REGEX_BACKSLASH:nTe,REGEX_REMOVE_BACKSLASH:rTe,REGEX_SPECIAL_CHARS:oTe,REGEX_SPECIAL_CHARS_GLOBAL:iTe}=ww();Po.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Po.hasRegexChars=e=>oTe.test(e);Po.isRegexChar=e=>e.length===1&&Po.hasRegexChars(e);Po.escapeRegex=e=>e.replace(iTe,"\\$1");Po.toPosixSlashes=e=>e.replace(nTe,"/");Po.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};Po.removeBackslashes=e=>e.replace(rTe,t=>t==="\\"?"":t);Po.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Po.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Po.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Po.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",o=n.contains?"":"$",i=`${r}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i};Po.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return r===""?n[n.length-2]:r}});var IQ=ve((Lwt,_Q)=>{"use strict";var SQ=bw(),{CHAR_ASTERISK:U1,CHAR_AT:sTe,CHAR_BACKWARD_SLASH:vw,CHAR_COMMA:aTe,CHAR_DOT:H1,CHAR_EXCLAMATION_MARK:z1,CHAR_FORWARD_SLASH:CQ,CHAR_LEFT_CURLY_BRACE:q1,CHAR_LEFT_PARENTHESES:V1,CHAR_LEFT_SQUARE_BRACKET:cTe,CHAR_PLUS:lTe,CHAR_QUESTION_MARK:EQ,CHAR_RIGHT_CURLY_BRACE:dTe,CHAR_RIGHT_PARENTHESES:OQ,CHAR_RIGHT_SQUARE_BRACKET:uTe}=ww(),PQ=e=>e===CQ||e===vw,AQ=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},pTe=(e,t)=>{let n=t||{},r=e.length-1,o=n.parts===!0||n.scanToEnd===!0,i=[],s=[],a=[],c=e,l=-1,d=0,u=0,p=!1,f=!1,g=!1,m=!1,h=!1,y=!1,b=!1,v=!1,k=!1,$=!1,O=0,E,P,T={value:"",depth:0,isGlob:!1},S=()=>l>=r,C=()=>c.charCodeAt(l+1),F=()=>(E=P,c.charCodeAt(++l));for(;l<r;){P=F();let V;if(P===vw){b=T.backslashes=!0,P=F(),P===q1&&(y=!0);continue}if(y===!0||P===q1){for(O++;S()!==!0&&(P=F());){if(P===vw){b=T.backslashes=!0,F();continue}if(P===q1){O++;continue}if(y!==!0&&P===H1&&(P=F())===H1){if(p=T.isBrace=!0,g=T.isGlob=!0,$=!0,o===!0)continue;break}if(y!==!0&&P===aTe){if(p=T.isBrace=!0,g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===dTe&&(O--,O===0)){y=!1,p=T.isBrace=!0,$=!0;break}}if(o===!0)continue;break}if(P===CQ){if(i.push(l),s.push(T),T={value:"",depth:0,isGlob:!1},$===!0)continue;if(E===H1&&l===d+1){d+=2;continue}u=l+1;continue}if(n.noext!==!0&&(P===lTe||P===sTe||P===U1||P===EQ||P===z1)===!0&&C()===V1){if(g=T.isGlob=!0,m=T.isExtglob=!0,$=!0,P===z1&&l===d&&(k=!0),o===!0){for(;S()!==!0&&(P=F());){if(P===vw){b=T.backslashes=!0,P=F();continue}if(P===OQ){g=T.isGlob=!0,$=!0;break}}continue}break}if(P===U1){if(E===U1&&(h=T.isGlobstar=!0),g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===EQ){if(g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===cTe){for(;S()!==!0&&(V=F());){if(V===vw){b=T.backslashes=!0,F();continue}if(V===uTe){f=T.isBracket=!0,g=T.isGlob=!0,$=!0;break}}if(o===!0)continue;break}if(n.nonegate!==!0&&P===z1&&l===d){v=T.negated=!0,d++;continue}if(n.noparen!==!0&&P===V1){if(g=T.isGlob=!0,o===!0){for(;S()!==!0&&(P=F());){if(P===V1){b=T.backslashes=!0,P=F();continue}if(P===OQ){$=!0;break}}continue}break}if(g===!0){if($=!0,o===!0)continue;break}}n.noext===!0&&(m=!1,g=!1);let L=c,A="",_="";d>0&&(A=c.slice(0,d),c=c.slice(d),u-=d),L&&g===!0&&u>0?(L=c.slice(0,u),_=c.slice(u)):g===!0?(L="",_=c):L=c,L&&L!==""&&L!=="/"&&L!==c&&PQ(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),n.unescape===!0&&(_&&(_=SQ.removeBackslashes(_)),L&&b===!0&&(L=SQ.removeBackslashes(L)));let N={prefix:A,input:e,start:d,base:L,glob:_,isBrace:p,isBracket:f,isGlob:g,isExtglob:m,isGlobstar:h,negated:v,negatedExtglob:k};if(n.tokens===!0&&(N.maxDepth=0,PQ(P)||s.push(T),N.tokens=s),n.parts===!0||n.tokens===!0){let V;for(let J=0;J<i.length;J++){let M=V?V+1:d,z=i[J],G=e.slice(M,z);n.tokens&&(J===0&&d!==0?(s[J].isPrefix=!0,s[J].value=A):s[J].value=G,AQ(s[J]),N.maxDepth+=s[J].depth),(J!==0||G!=="")&&a.push(G),V=z}if(V&&V+1<e.length){let J=e.slice(V+1);a.push(J),n.tokens&&(s[s.length-1].value=J,AQ(s[s.length-1]),N.maxDepth+=s[s.length-1].depth)}N.slashes=i,N.parts=a}return N};_Q.exports=pTe});var LQ=ve((Mwt,jQ)=>{"use strict";var kw=ww(),ei=bw(),{MAX_LENGTH:xE,POSIX_REGEX_SOURCE:fTe,REGEX_NON_SPECIAL_CHARS:gTe,REGEX_SPECIAL_CHARS_BACKREF:mTe,REPLACEMENTS:TQ}=kw,hTe=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(o=>ei.escapeRegex(o)).join("..")}return n},Xf=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,DQ=e=>{let t=[],n=0,r=0,o=0,i="",s=!1;for(let a of e){if(s===!0){i+=a,s=!1;continue}if(a==="\\"){i+=a,s=!0;continue}if(a==='"'){o=o===1?0:1,i+=a;continue}if(o===0){if(a==="[")n++;else if(a==="]"&&n>0)n--;else if(n===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){t.push(i),i="";continue}}}i+=a}return t.push(i),t},yTe=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n==="\\"){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},NQ=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(yTe(t))return t.replace(/\\(.)/g,"$1")},wTe=e=>{let t=e.map(NQ).filter(Boolean);for(let n=0;n<t.length;n++)for(let r=n+1;r<t.length;r++){let o=t[n],i=t[r],s=o[0];if(!(!s||o!==s.repeat(o.length)||i!==s.repeat(i.length))&&(o===i||o.startsWith(i)||i.startsWith(o)))return!0}return!1},K1=(e,t=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let n=0,r=0,o=0,i=!1;for(let s=1;s<e.length;s++){let a=e[s];if(i===!0){i=!1;continue}if(a==="\\"){i=!0;continue}if(a==='"'){o=o===1?0:1;continue}if(o!==1){if(a==="["){n++;continue}if(a==="]"&&n>0){n--;continue}if(!(n>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return t===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},bTe=e=>{let t=0,n=[];for(;t<e.length;){let o=K1(e.slice(t),!1);if(!o||o.type!=="*")return;let i=DQ(o.body).map(a=>a.trim());if(i.length!==1)return;let s=NQ(i[0]);if(!s||s.length!==1)return;n.push(s),t+=o.end+1}return n.length<1?void 0:`${n.length===1?ei.escapeRegex(n[0]):`[${n.map(o=>ei.escapeRegex(o)).join("")}]`}*`},vTe=e=>{let t=0,n=e.trim(),r=K1(n);for(;r;)t++,n=r.body.trim(),r=K1(n);return t},kTe=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let n=typeof t.maxExtglobRecursion=="number"?t.maxExtglobRecursion:kw.DEFAULT_MAX_EXTGLOB_RECURSION,r=DQ(e).map(o=>o.trim());if(r.length>1&&(r.some(o=>o==="")||r.some(o=>/^[*?]+$/.test(o))||wTe(r)))return{risky:!0};for(let o of r){let i=bTe(o);if(i)return{risky:!0,safeOutput:i};if(vTe(o)>n)return{risky:!0}}return{risky:!1}},J1=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=TQ[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(xE,n.maxLength):xE,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);let i={type:"bos",value:"",output:n.prepend||""},s=[i],a=n.capture?"":"?:",c=kw.globChars(n.windows),l=kw.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:h,NO_DOTS_SLASH:y,QMARK:b,QMARK_NO_DOT:v,STAR:k,START_ANCHOR:$}=c,O=le=>`(${a}(?:(?!${$}${le.dot?g:d}).)*?)`,E=n.dot?"":m,P=n.dot?b:v,T=n.bash===!0?O(n):k;n.capture&&(T=`(${T})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let S={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=ei.removePrefix(e,S),o=e.length;let C=[],F=[],L=[],A=i,_,N=()=>S.index===o-1,V=S.peek=(le=1)=>e[S.index+le],J=S.advance=()=>e[++S.index]||"",M=()=>e.slice(S.index+1),z=(le="",Qe=0)=>{S.consumed+=le,S.index+=Qe},G=le=>{S.output+=le.output!=null?le.output:le.value,z(le.value)},B=()=>{let le=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)J(),S.start++,le++;return le%2===0?!1:(S.negated=!0,S.start++,!0)},U=le=>{S[le]++,L.push(le)},Z=le=>{S[le]--,L.pop()},X=le=>{if(A.type==="globstar"){let Qe=S.braces>0&&(le.type==="comma"||le.type==="brace"),Q=le.extglob===!0||C.length&&(le.type==="pipe"||le.type==="paren");le.type!=="slash"&&le.type!=="paren"&&!Qe&&!Q&&(S.output=S.output.slice(0,-A.output.length),A.type="star",A.value="*",A.output=T,S.output+=A.output)}if(C.length&&le.type!=="paren"&&(C[C.length-1].inner+=le.value),(le.value||le.output)&&G(le),A&&A.type==="text"&&le.type==="text"){A.output=(A.output||A.value)+le.value,A.value+=le.value;return}le.prev=A,s.push(le),A=le},se=(le,Qe)=>{let Q={...l[Qe],conditions:1,inner:""};Q.prev=A,Q.parens=S.parens,Q.output=S.output,Q.startIndex=S.index,Q.tokensIndex=s.length;let Pe=(n.capture?"(":"")+Q.open;U("parens"),X({type:le,value:Qe,output:S.output?"":f}),X({type:"paren",extglob:!0,value:J(),output:Pe}),C.push(Q)},Ce=le=>{let Qe=e.slice(le.startIndex,S.index+1),Q=e.slice(le.startIndex+2,S.index),Pe=kTe(Q,n);if((le.type==="plus"||le.type==="star")&&Pe.risky){let yt=Pe.safeOutput?(le.output?"":f)+(n.capture?`(${Pe.safeOutput})`:Pe.safeOutput):void 0,an=s[le.tokensIndex];an.type="text",an.value=Qe,an.output=yt||ei.escapeRegex(Qe);for(let ee=le.tokensIndex+1;ee<s.length;ee++)s[ee].value="",s[ee].output="",delete s[ee].suffix;S.output=le.output+an.output,S.backtrack=!0,X({type:"paren",extglob:!0,value:_,output:""}),Z("parens");return}let Fe=le.close+(n.capture?")":""),lt;if(le.type==="negate"){let yt=T;if(le.inner&&le.inner.length>1&&le.inner.includes("/")&&(yt=O(n)),(yt!==T||N()||/^\)+$/.test(M()))&&(Fe=le.close=`)$))${yt}`),le.inner.includes("*")&&(lt=M())&&/^\.[^\\/.]+$/.test(lt)){let an=J1(lt,{...t,fastpaths:!1}).output;Fe=le.close=`)${an})${yt})`}le.prev.type==="bos"&&(S.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:_,output:Fe}),Z("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let le=!1,Qe=e.replace(mTe,(Q,Pe,Fe,lt,yt,an)=>lt==="\\"?(le=!0,Q):lt==="?"?Pe?Pe+lt+(yt?b.repeat(yt.length):""):an===0?P+(yt?b.repeat(yt.length):""):b.repeat(Fe.length):lt==="."?d.repeat(Fe.length):lt==="*"?Pe?Pe+lt+(yt?T:""):T:Pe?Q:`\\${Q}`);return le===!0&&(n.unescape===!0?Qe=Qe.replace(/\\/g,""):Qe=Qe.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),Qe===e&&n.contains===!0?(S.output=e,S):(S.output=ei.wrapOutput(Qe,S,t),S)}for(;!N();){if(_=J(),_==="\0")continue;if(_==="\\"){let Q=V();if(Q==="/"&&n.bash!==!0||Q==="."||Q===";")continue;if(!Q){_+="\\",X({type:"text",value:_});continue}let Pe=/^\\+/.exec(M()),Fe=0;if(Pe&&Pe[0].length>2&&(Fe=Pe[0].length,S.index+=Fe,Fe%2!==0&&(_+="\\")),n.unescape===!0?_=J():_+=J(),S.brackets===0){X({type:"text",value:_});continue}}if(S.brackets>0&&(_!=="]"||A.value==="["||A.value==="[^")){if(n.posix!==!1&&_===":"){let Q=A.value.slice(1);if(Q.includes("[")&&(A.posix=!0,Q.includes(":"))){let Pe=A.value.lastIndexOf("["),Fe=A.value.slice(0,Pe),lt=A.value.slice(Pe+2),yt=fTe[lt];if(yt){A.value=Fe+yt,S.backtrack=!0,J(),!i.output&&s.indexOf(A)===1&&(i.output=f);continue}}}(_==="["&&V()!==":"||_==="-"&&V()==="]")&&(_=`\\${_}`),_==="]"&&(A.value==="["||A.value==="[^")&&(_=`\\${_}`),n.posix===!0&&_==="!"&&A.value==="["&&(_="^"),A.value+=_,G({value:_});continue}if(S.quotes===1&&_!=='"'){_=ei.escapeRegex(_),A.value+=_,G({value:_});continue}if(_==='"'){S.quotes=S.quotes===1?0:1,n.keepQuotes===!0&&X({type:"text",value:_});continue}if(_==="("){U("parens"),X({type:"paren",value:_});continue}if(_===")"){if(S.parens===0&&n.strictBrackets===!0)throw new SyntaxError(Xf("opening","("));let Q=C[C.length-1];if(Q&&S.parens===Q.parens+1){Ce(C.pop());continue}X({type:"paren",value:_,output:S.parens?")":"\\)"}),Z("parens");continue}if(_==="["){if(n.nobracket===!0||!M().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(Xf("closing","]"));_=`\\${_}`}else U("brackets");X({type:"bracket",value:_});continue}if(_==="]"){if(n.nobracket===!0||A&&A.type==="bracket"&&A.value.length===1){X({type:"text",value:_,output:`\\${_}`});continue}if(S.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(Xf("opening","["));X({type:"text",value:_,output:`\\${_}`});continue}Z("brackets");let Q=A.value.slice(1);if(A.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&(_=`/${_}`),A.value+=_,G({value:_}),n.literalBrackets===!1||ei.hasRegexChars(Q))continue;let Pe=ei.escapeRegex(A.value);if(S.output=S.output.slice(0,-A.value.length),n.literalBrackets===!0){S.output+=Pe,A.value=Pe;continue}A.value=`(${a}${Pe}|${A.value})`,S.output+=A.value;continue}if(_==="{"&&n.nobrace!==!0){U("braces");let Q={type:"brace",value:_,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};F.push(Q),X(Q);continue}if(_==="}"){let Q=F[F.length-1];if(n.nobrace===!0||!Q){X({type:"text",value:_,output:_});continue}let Pe=")";if(Q.dots===!0){let Fe=s.slice(),lt=[];for(let yt=Fe.length-1;yt>=0&&(s.pop(),Fe[yt].type!=="brace");yt--)Fe[yt].type!=="dots"&&lt.unshift(Fe[yt].value);Pe=hTe(lt,n),S.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){let Fe=S.output.slice(0,Q.outputIndex),lt=S.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",_=Pe="\\}",S.output=Fe;for(let yt of lt)S.output+=yt.output||yt.value}X({type:"brace",value:_,output:Pe}),Z("braces"),F.pop();continue}if(_==="|"){C.length>0&&C[C.length-1].conditions++,X({type:"text",value:_});continue}if(_===","){let Q=_,Pe=F[F.length-1];Pe&&L[L.length-1]==="braces"&&(Pe.comma=!0,Q="|"),X({type:"comma",value:_,output:Q});continue}if(_==="/"){if(A.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",s.pop(),A=i;continue}X({type:"slash",value:_,output:p});continue}if(_==="."){if(S.braces>0&&A.type==="dot"){A.value==="."&&(A.output=d);let Q=F[F.length-1];A.type="dots",A.output+=_,A.value+=_,Q.dots=!0;continue}if(S.braces+S.parens===0&&A.type!=="bos"&&A.type!=="slash"){X({type:"text",value:_,output:d});continue}X({type:"dot",value:_,output:d});continue}if(_==="?"){if(!(A&&A.value==="(")&&n.noextglob!==!0&&V()==="("&&V(2)!=="?"){se("qmark",_);continue}if(A&&A.type==="paren"){let Pe=V(),Fe=_;(A.value==="("&&!/[!=<:]/.test(Pe)||Pe==="<"&&!/<([!=]|\w+>)/.test(M()))&&(Fe=`\\${_}`),X({type:"text",value:_,output:Fe});continue}if(n.dot!==!0&&(A.type==="slash"||A.type==="bos")){X({type:"qmark",value:_,output:v});continue}X({type:"qmark",value:_,output:b});continue}if(_==="!"){if(n.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){se("negate",_);continue}if(n.nonegate!==!0&&S.index===0){B();continue}}if(_==="+"){if(n.noextglob!==!0&&V()==="("&&V(2)!=="?"){se("plus",_);continue}if(A&&A.value==="("||n.regex===!1){X({type:"plus",value:_,output:u});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||S.parens>0){X({type:"plus",value:_});continue}X({type:"plus",value:u});continue}if(_==="@"){if(n.noextglob!==!0&&V()==="("&&V(2)!=="?"){X({type:"at",extglob:!0,value:_,output:""});continue}X({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let Q=gTe.exec(M());Q&&(_+=Q[0],S.index+=Q[0].length),X({type:"text",value:_});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=_,A.output=T,S.backtrack=!0,S.globstar=!0,z(_);continue}let le=M();if(n.noextglob!==!0&&/^\([^?]/.test(le)){se("star",_);continue}if(A.type==="star"){if(n.noglobstar===!0){z(_);continue}let Q=A.prev,Pe=Q.prev,Fe=Q.type==="slash"||Q.type==="bos",lt=Pe&&(Pe.type==="star"||Pe.type==="globstar");if(n.bash===!0&&(!Fe||le[0]&&le[0]!=="/")){X({type:"star",value:_,output:""});continue}let yt=S.braces>0&&(Q.type==="comma"||Q.type==="brace"),an=C.length&&(Q.type==="pipe"||Q.type==="paren");if(!Fe&&Q.type!=="paren"&&!yt&&!an){X({type:"star",value:_,output:""});continue}for(;le.slice(0,3)==="/**";){let ee=e[S.index+4];if(ee&&ee!=="/")break;le=le.slice(3),z("/**",3)}if(Q.type==="bos"&&N()){A.type="globstar",A.value+=_,A.output=O(n),S.output=A.output,S.globstar=!0,z(_);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!lt&&N()){S.output=S.output.slice(0,-(Q.output+A.output).length),Q.output=`(?:${Q.output}`,A.type="globstar",A.output=O(n)+(n.strictSlashes?")":"|$)"),A.value+=_,S.globstar=!0,S.output+=Q.output+A.output,z(_);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&le[0]==="/"){let ee=le[1]!==void 0?"|$":"";S.output=S.output.slice(0,-(Q.output+A.output).length),Q.output=`(?:${Q.output}`,A.type="globstar",A.output=`${O(n)}${p}|${p}${ee})`,A.value+=_,S.output+=Q.output+A.output,S.globstar=!0,z(_+J()),X({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&le[0]==="/"){A.type="globstar",A.value+=_,A.output=`(?:^|${p}|${O(n)}${p})`,S.output=A.output,S.globstar=!0,z(_+J()),X({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-A.output.length),A.type="globstar",A.output=O(n),A.value+=_,S.output+=A.output,S.globstar=!0,z(_);continue}let Qe={type:"star",value:_,output:T};if(n.bash===!0){Qe.output=".*?",(A.type==="bos"||A.type==="slash")&&(Qe.output=E+Qe.output),X(Qe);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&n.regex===!0){Qe.output=_,X(Qe);continue}(S.index===S.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(S.output+=h,A.output+=h):n.dot===!0?(S.output+=y,A.output+=y):(S.output+=E,A.output+=E),V()!=="*"&&(S.output+=f,A.output+=f)),X(Qe)}for(;S.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing","]"));S.output=ei.escapeLast(S.output,"["),Z("brackets")}for(;S.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing",")"));S.output=ei.escapeLast(S.output,"("),Z("parens")}for(;S.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing","}"));S.output=ei.escapeLast(S.output,"{"),Z("braces")}if(n.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&X({type:"maybe_slash",value:"",output:`${p}?`}),S.backtrack===!0){S.output="";for(let le of S.tokens)S.output+=le.output!=null?le.output:le.value,le.suffix&&(S.output+=le.suffix)}return S};J1.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(xE,n.maxLength):xE,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=TQ[e]||e;let{DOT_LITERAL:i,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:u,STAR:p,START_ANCHOR:f}=kw.globChars(n.windows),g=n.dot?d:l,m=n.dot?u:l,h=n.capture?"":"?:",y={negated:!1,prefix:""},b=n.bash===!0?".*?":p;n.capture&&(b=`(${b})`);let v=E=>E.noglobstar===!0?b:`(${h}(?:(?!${f}${E.dot?c:i}).)*?)`,k=E=>{switch(E){case"*":return`${g}${a}${b}`;case".*":return`${i}${a}${b}`;case"*.*":return`${g}${b}${i}${a}${b}`;case"*/*":return`${g}${b}${s}${a}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${s})?${m}${a}${b}`;case"**/*.*":return`(?:${g}${v(n)}${s})?${m}${b}${i}${a}${b}`;case"**/.*":return`(?:${g}${v(n)}${s})?${i}${a}${b}`;default:{let P=/^(.*?)\.(\w+)$/.exec(E);if(!P)return;let T=k(P[1]);return T?T+i+P[2]:void 0}}},$=ei.removePrefix(e,y),O=k($);return O&&n.strictSlashes!==!0&&(O+=`${s}?`),O};jQ.exports=J1});var WQ=ve((Fwt,FQ)=>{"use strict";var RTe=IQ(),Z1=LQ(),MQ=bw(),$Te=ww(),xTe=e=>e&&typeof e=="object"&&!Array.isArray(e),_n=(e,t,n=!1)=>{if(Array.isArray(e)){let d=e.map(p=>_n(p,t,n));return p=>{for(let f of d){let g=f(p);if(g)return g}return!1}}let r=xTe(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},i=o.windows,s=r?_n.compileRe(e,t):_n.makeRe(e,t,!1,!0),a=s.state;delete s.state;let c=()=>!1;if(o.ignore){let d={...t,ignore:null,onMatch:null,onResult:null};c=_n(o.ignore,d,n)}let l=(d,u=!1)=>{let{isMatch:p,match:f,output:g}=_n.test(d,s,t,{glob:e,posix:i}),m={glob:e,state:a,regex:s,posix:i,input:d,output:g,match:f,isMatch:p};return typeof o.onResult=="function"&&o.onResult(m),p===!1?(m.isMatch=!1,u?m:!1):c(d)?(typeof o.onIgnore=="function"&&o.onIgnore(m),m.isMatch=!1,u?m:!1):(typeof o.onMatch=="function"&&o.onMatch(m),u?m:!0)};return n&&(l.state=a),l};_n.test=(e,t,n,{glob:r,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=n||{},s=i.format||(o?MQ.toPosixSlashes:null),a=e===r,c=a&&s?s(e):e;return a===!1&&(c=s?s(e):e,a=c===r),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=_n.matchBase(e,t,n,o):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};_n.matchBase=(e,t,n)=>(t instanceof RegExp?t:_n.makeRe(t,n)).test(MQ.basename(e));_n.isMatch=(e,t,n)=>_n(t,n)(e);_n.parse=(e,t)=>Array.isArray(e)?e.map(n=>_n.parse(n,t)):Z1(e,{...t,fastpaths:!1});_n.scan=(e,t)=>RTe(e,t);_n.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let o=t||{},i=o.contains?"":"^",s=o.contains?"":"$",a=`${i}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let c=_n.toRegex(a,t);return r===!0&&(c.state=e),c};_n.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Z1.fastpaths(e,t)),o.output||(o=Z1(e,t)),_n.compileRe(o,t,n,r)};_n.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};_n.constants=$Te;FQ.exports=_n});var yu=ve((Wwt,UQ)=>{"use strict";var GQ=WQ(),STe=bw();function BQ(e,t,n=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:STe.isWindows()}),GQ(e,t,n)}Object.assign(BQ,GQ);UQ.exports=BQ});import{dirname as ETe}from"path";import{fileURLToPath as OTe}from"url";import{createHash as PTe}from"crypto";import{execFile as ATe}from"child_process";function Q1(){return SE=new Y1,SE}function ot(){return SE||Q1()}function X1(e){return ETe(OTe(e))}var HQ,Y1,SE,ti=x(()=>{"use strict";HQ=et(yu(),1),Y1=class{constructor(){this.name="node";this.hashAlgorithm="sha256";this.commands={runner:"node",exec:"npx",packCmd:["npm","pack"]}}hash(t){return PTe("sha256").update(t).digest("hex")}globMatch(t,n){return(0,HQ.default)(t)(n)}async spawn(t,n){return new Promise(r=>{let o=ATe(t[0],t.slice(1),{cwd:n?.cwd,maxBuffer:10485760,...n?.env?{env:{...process.env,...n.env}}:{}},(i,s,a)=>{r({stdout:s??"",stderr:a??"",exitCode:i?i.code??1:0})});o.stdin&&(o.stdin.on("error",()=>{}),o.stdin.end(n?.stdin??""))})}}});import{createHmac as CTe,timingSafeEqual as Vwt}from"node:crypto";function eF(e=EE){let t=e.toLowerCase();return{signature:`${t}-signature`,timestamp:`${t}-timestamp`,event:`${t}-event`,delivery:`${t}-delivery`}}function tF(e,t,n){return`sha256=${CTe("sha256",e).update(`${String(t)}.${n}`,"utf8").digest("hex")}`}var EE,nF=x(()=>{"use strict";EE="x-chant"});import{createHash as _Te,createHmac as ITe,randomUUID as TTe,timingSafeEqual as Qwt}from"node:crypto";function NTe(e){let t={};e.CI_JOB_URL?t.url=e.CI_JOB_URL:e.GITHUB_SERVER_URL&&e.GITHUB_REPOSITORY&&e.GITHUB_RUN_ID?t.url=`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`:e.CI_PIPELINE_URL&&(t.url=e.CI_PIPELINE_URL),e.GITLAB_CI==="true"?t.forge="gitlab":e.GITEA_ACTIONS==="true"||e.FORGEJO_ACTIONS==="true"?t.forge="forgejo":e.GITHUB_ACTIONS==="true"&&(t.forge="github");let n=e.GITHUB_REPOSITORY||e.CI_PROJECT_PATH;n&&(t.repository=n);let r=e.GITHUB_SHA||e.CI_COMMIT_SHA;return r&&(t.commit=r),t}function OE(e,t={}){let n=t.env??process.env,{id:r,project:o,targets:i,run:s,...a}=e,c={...NTe(n),...s??{}},l=o??c.repository??"this project",d=e.digest??e.drift?.fingerprint??c.commit,u=r??(d?_Te("sha256").update(JSON.stringify([e.source,l,e.event,e.wave?.number??null,e.environment??null,d])).digest("hex"):TTe());return{schema:DTe,id:u,at:(t.now??new Date).toISOString(),...a,project:l,targets:i??[],...Object.keys(c).length>0?{run:c}:{}}}function VQ(e){if(e.summary)return`${e.source}: ${e.summary}`;let t=e.wave?`wave ${e.wave.number}${e.wave.name?` (${e.wave.name})`:""} of ${e.project}`:e.environment?`${e.environment} in ${e.project}`:e.project;return`${e.source}: ${t} ${jTe[e.event]}`}function KQ(e,t){let n=[];return e.approve?.review&&n.push({title:"Review and approve",value:`pull request ${e.approve.review.pr}, then ${t.again??"run it again"}`,link:e.approve.review.url}),e.drift?(e.drift.changed.length>0&&n.push({title:"Drifted",value:e.drift.changed.join(", ")}),e.drift.missing?.length&&n.push({title:"Missing",value:e.drift.missing.join(", ")}),e.drift.failed?.length&&n.push({title:"Not refreshed",value:e.drift.failed.join(", ")})):(e.targets.length>0||t.noTargets)&&n.push({title:t.targets??"Targets",value:e.targets.join(", ")||t.noTargets}),e.ci&&(n.push({title:"Commit",value:`${e.ci.commit.slice(0,12)} on ${e.ci.branch}`}),e.ci.phase&&n.push({title:"Phase",value:e.ci.failedRun?`${e.ci.phase}: ${e.ci.failedRun.name} ${e.ci.failedRun.conclusion??""}`.trimEnd():e.ci.phase}),e.ci.failedRun?.url&&n.push({title:"Failed run",value:e.ci.failedRun.url,link:e.ci.failedRun.url}),e.ci.culprit&&n.push({title:"Culprit",value:e.ci.culprit.slice(0,12)}),e.ci.red&&n.push({title:"Was red",value:e.ci.red.slice(0,12)})),e.digest&&n.push({title:"Digest",value:e.digest}),e.approve&&n.push({title:e.approve.review?"Or approve":"Approve",value:e.approve.command}),e.reason&&n.push({title:t.reason??"Reason",value:e.reason}),e.run?.url&&n.push({title:"Run",value:e.run.url,link:e.run.url}),e.reportUrl&&n.push({title:"Report",value:e.reportUrl,link:e.reportUrl}),n}function WTe(e){if(!(e.event!=="waiting"||!e.digest||!e.wave?.gate))return{id:e.id,source:e.source,at:e.at,gate:e.wave.gate,digest:e.digest}}function GTe(e,t){let n=Buffer.from(JSON.stringify({v:1,...t}),"utf8").toString("base64url");return`${n}.${FTe(e,n)}`}function BTe(e,t,n={}){let r=[`*${VQ(e)}*`],o=n.rerun??{};for(let a of KQ(e,n))a.title==="Review and approve"?r.push(`${a.title}: <${a.link}|${a.value.replace(", then",">, then")}`):/^(Or a|A)pprove$|^Digest$/.test(a.title)?r.push(`${a.title}: \`${a.value}\``):a.link?r.push(`${a.title}: <${a.link}>`):r.push(`${a.title}: ${a.value}`);let i=r.join(`
52
+ `)},k=K7(v),$=K7(v);g.stdout?.on("data",O=>{k.push(O)}),g.stdout?.on("end",()=>k.flush()),g.stderr?.on("data",O=>{h+=O.toString(),$.push(O)}),g.stderr?.on("end",()=>$.flush()),g.on("message",O=>{if(!m){if(!t(O)){y.push(O);return}m=!0,clearTimeout(b),g.kill(),u(O)}}),g.on("error",O=>{m||(m=!0,clearTimeout(b),p(O))}),R1(g,(O,E)=>{m||(m=!0,clearTimeout(b),p(new Error(pIe(c,O,E,h,y))))})})}var fIe,$1=x(()=>{"use strict";fIe=2e3});var Y7={};me(Y7,{evaluateConfigSandboxed:()=>wIe});import{realpathSync as gIe,rmSync as mIe}from"node:fs";import{resolve as Z7}from"node:path";function yIe(e){return typeof e=="object"&&e!==null&&e.kind==="chant-config"&&typeof e.ok=="boolean"}async function wIe(e,t){let n=z7(e),{bundlePath:r,bundleDir:o,externalReadPaths:i,durationMs:s,bytes:a}=await cE(n);try{let c;try{c=gIe(Z7(t))}catch{c=Z7(t)}let l={PATH:process.env.PATH??""},d=process.env[Kf];d&&(l[Kf]=d);let u=await J7({bundlePath:r,bundleDir:o,projectRealpath:c,externalReadPaths:i,env:l,timeoutMs:hIe,label:`sandboxed evaluation of ${e}`,outputPrefix:"[sandbox:config]"},yIe);if(!u.ok)throw u.offenders&&u.offenders.length>0?new Error(q7(e,u.offenders)):new Error(u.error?.message?`Failed to evaluate ${e} inside the --sandbox boundary: ${u.error.message}`:`Failed to evaluate ${e} inside the --sandbox boundary`);return{config:u.config??{},bundleMs:s,bundleBytes:a}}finally{mIe(o,{recursive:!0,force:!0})}}var hIe,Q7=x(()=>{"use strict";w1();k1();V7();$1();pw();hIe=6e4});import{dirname as bIe}from"node:path";function kIe(e){let t=Yr(e);return t.default??t.config??t}async function X7(e,t=bIe(e)){if(!vIe)return kIe(await L7(e));if(x1.has(e))return x1.get(e);let{evaluateConfigSandboxed:n}=await Promise.resolve().then(()=>(Q7(),Y7)),{config:r}=await n(e,t);return x1.set(e,r),r}var vIe,x1,S1=x(()=>{"use strict";M7();hl();vIe=!1,x1=new Map});var C1={};me(C1,{importLexiconModule:()=>mu,importLexiconPackage:()=>Oo,isPackageNotFound:()=>P1,lexiconDeclarationName:()=>rQ,lexiconModulePath:()=>Ei,lexiconModuleRoot:()=>A1,lexiconNames:()=>Eo,lexiconPackagesToInstall:()=>AIe,lexiconSourceLabel:()=>PIe,packageNameOf:()=>iQ,pathLexiconMap:()=>SIe,pathLexiconRoot:()=>uE,recordedLexiconModules:()=>EIe,registerLexiconDeclarations:()=>wl,resetLexiconModules:()=>OIe,resolveFromProject:()=>pE});import{createRequire as tQ}from"node:module";import{dirname as RIe,isAbsolute as gu,join as $Ie,relative as nQ,resolve as Jf,sep as xIe}from"node:path";import{pathToFileURL as O1}from"node:url";function rQ(e){return typeof e=="string"?e:e.name}function Eo(e){return e?.map(rQ)}function E1(e,t){let n=nQ(t,e);return n===""||!n.startsWith("..")&&!gu(n)}function uE(e,t,n="."){let r=gu(e.module)?e.module:Jf(t,e.module),o=e.root!==void 0,i=o?gu(e.root)?Jf(e.root):Jf(t,e.root):RIe(r),s=Jf(t),a=Jf(t,n),c;return E1(i,s)?E1(a,i)?c=`${i} contains the project's source directory (${a})`:E1(r,i)||(c=`the module ${r} is not inside ${i}`):c=`${i} is outside the project (${s})`,c===void 0?{root:i}:o?{problem:c}:{}}function wl(e,t,n){let r={};for(let o of e??[]){if(typeof o=="string"){yl.delete(o),fw.delete(o);continue}let i=oQ(o,t);yl.set(o.name,i),r[o.name]=i;let{root:s}=uE(o,t,n);s===void 0?fw.delete(o.name):fw.set(o.name,s)}return r}function oQ(e,t){return gu(e.module)?e.module:Jf(t,e.module)}function SIe(e,t){let n=new Map;for(let r of e)typeof r!="string"&&n.set(r.name,oQ(r,t));return n}function EIe(){return new Map(yl)}function Ei(e){return yl.get(e)}function A1(e){return fw.get(e)}function OIe(){yl.clear(),fw.clear()}async function mu(e,t={}){let n=yl.get(e);if(n!==void 0)try{return(t.typeScript??!oE(n))&&Rr(),Yr(await import(n))}catch(r){throw new Error(`lexicon "${e}" is declared with module ${n}, which could not be loaded: `+(r instanceof Error?r.message:String(r)))}}function PIe(e,t=process.cwd(),n=yl){let r=n.get(e);if(r===void 0)return`@intentius/chant-lexicon-${e}`;let o=nQ(t,r);return o===""||o.startsWith("..")||gu(o)?r:`./${o.split(xIe).join("/")}`}function AIe(e,t=yl){return e.filter(n=>!t.has(n)).map(n=>`@intentius/chant-lexicon-${n}`)}function iQ(e){if(e.startsWith(".")||gu(e)||e.startsWith("file:"))return;let t=e.split("/");return e.startsWith("@")?t.slice(0,2).join("/"):t[0]}function P1(e,t){let n=e?.code;if(n!=="ERR_MODULE_NOT_FOUND"&&n!=="MODULE_NOT_FOUND")return!1;let r=e instanceof Error?e.message:String(e);return[`'${t}'`,`"${t}"`,`'${t}/`,`"${t}/`].some(o=>r.includes(o))}function pE(e,t=process.cwd()){try{return tQ($Ie(t,"package.json")).resolve(e)}catch{return}}function CIe(e){if(gu(e))return O1(e).href;let t=import.meta.resolve;return typeof t=="function"?t(e):O1(tQ(import.meta.url).resolve(e)).href}async function Oo(e,t=process.cwd()){let n=iQ(e);if(j7()){let r;try{r=CIe(e)}catch(o){if(n===void 0||!P1(o,n))Rr();else return eQ(e,t,o)}r!==void 0&&sE(r)}try{return Yr(await import(e))}catch(r){if(n===void 0||!P1(r,n))throw r;return eQ(e,t,r)}}async function eQ(e,t,n){let r=pE(e,t);if(r===void 0)throw n;return sE(r),Yr(await import(O1(r).href))}var yl,fw,Zn=x(()=>{"use strict";Xo();hl();uu();yl=new Map,fw=new Map});var _Ie,IIe,TIe,Zf,sQ,fE=x(()=>{"use strict";Jn();_Ie=w.strictObject({env:w.string().min(1)}),IIe=w.strictObject({capability:w.string().min(1),member:w.string().min(1).optional(),env:w.string().min(1).optional()}),TIe=w.union([_Ie,IIe]),Zf=w.strictObject({url:w.string().min(1),key:TIe.optional(),timeoutMs:w.number().int().positive().optional()}),sQ=w.strictObject({backends:w.record(w.string(),Zf).optional()})});var bl,_1,DIe,NIe,jIe,LIe,MIe,FIe,aQ,cQ=x(()=>{"use strict";Jn();bl=w.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"an environment variable name"),_1=w.union([w.string().min(1),w.literal(!1)]),DIe=w.object({type:w.literal("npm"),packages:w.array(w.string().min(1)).min(1),registry:w.string().url().optional(),access:w.enum(["public","restricted"]).optional(),sbom:_1.optional(),stage:w.boolean().optional(),tokenEnv:bl.optional(),pins:w.string().min(1).optional(),registryWait:w.number().int().min(0).optional()}).strict(),NIe=w.object({type:w.literal("oci"),image:w.string().min(1),repository:w.string().min(1),tags:w.array(w.string().min(1)).optional(),usernameEnv:bl.optional(),passwordEnv:bl.optional(),sbom:_1.optional()}).strict(),jIe=w.object({type:w.literal("forge"),forge:w.enum(["github","gitlab","forgejo"]),repo:w.string().min(1),api:w.string().url().optional(),assets:w.array(w.string().min(1)),notes:w.object({file:w.string().min(1),heading:w.string().regex(/^#{1,6} \S/,"a markdown heading, such as ## {version}"),linkBase:w.string().url().optional(),before:w.string().min(1).optional(),after:w.string().min(1).optional()}).strict().optional(),tag:w.string().min(1).optional(),tokenEnv:bl.optional(),sbom:_1.optional(),latest:w.union([w.boolean(),w.literal("legacy")]).optional()}).strict().refine(e=>e.assets.length>0||e.notes!==void 0,{message:"a forge release needs assets, notes or both",path:["assets"]}),LIe=w.object({type:w.literal("homebrew"),tap:w.string().regex(/^[^/\s]+\/[^/\s]+$/,"owner/name"),formula:w.string().min(1),template:w.string().min(1),assets:w.array(w.string().min(1)).min(1),url:w.string().min(1),branch:w.string().min(1).optional(),api:w.string().url().optional(),tokenEnv:bl.optional(),sshKeyEnv:bl.optional()}).strict(),MIe=w.object({type:w.literal("marketplace"),marketplace:w.enum(["vscode","openvsx"]),vsix:w.string().min(1),registry:w.string().url().optional(),tokenEnv:bl.optional(),auth:w.enum(["token","azure-credential","trusted-publishing"]).optional(),onRefusal:w.enum(["fail","warn"]).optional()}).strict(),FIe=w.object({type:w.literal("tauri-updater"),repo:w.string().regex(/^[^/\s]+\/[^/\s]+$/,"owner/name"),tag:w.string().min(1),platforms:w.record(w.string().regex(/^(darwin|linux|windows)-[a-z0-9_]+(-[a-z0-9]+)?$/,"<os>-<arch> or <os>-<arch>-<installer>"),w.string().min(1)).refine(e=>Object.keys(e).length>0,"at least one platform"),assets:w.array(w.string().min(1)).optional(),notes:w.string().min(1).optional(),url:w.string().min(1).optional(),manifest:w.string().regex(/^[^/\\]+$/,"a file name").optional(),latest:w.union([w.boolean(),w.literal("legacy")]).optional(),api:w.string().url().optional(),tokenEnv:bl.optional()}).strict(),aQ=w.discriminatedUnion("type",[DIe,NIe,jIe,LIe,MIe,FIe])});function Oi(e){return typeof e=="string"?e:e.name}function mE(e){return e?.map(Oi)}function vl(e){return e.includes("*")}function gw(e,t){let n=e.split("*");if(n.length===1)return e===t;let r=n[0],o=n[n.length-1];if(!t.startsWith(r))return!1;let i=r.length;for(let s=1;s<n.length-1;s++){let a=n[s];if(a==="")continue;let c=t.indexOf(a,i);if(c===-1)return!1;i=c+a.length}return t.length-i>=o.length&&t.endsWith(o)}function Yf(e,t){let n=mE(e)??[];return n.includes(t)?!0:n.some(r=>vl(r)&&gw(r,t))}function I1(e,t){let n=e?.find(r=>Oi(r)===t)??e?.find(r=>vl(Oi(r))&&gw(Oi(r),t));return n&&typeof n!="string"?n.endpoint:void 0}function hE(e,t){let n=e?.find(r=>Oi(r)===t)??e?.find(r=>vl(Oi(r))&&gw(Oi(r),t));return n&&typeof n!="string"?n.executor:void 0}function yE(e){return typeof e=="object"&&e!==null&&typeof e.param=="string"}function mw(e){let t=e.ownership;if(!(!t||!t.stack||t.enabled===!1))return t.stack}var gE,wE=x(()=>{"use strict";gE=["github","gitlab","forgejo"]});var W1={};me(W1,{ChantConfigSchema:()=>hw,DEFAULT_CHANT_CONFIG:()=>j1,EXECUTOR_FORGES:()=>gE,InvalidChantConfigError:()=>Qf,ROOT_SOURCE_EXCLUDES:()=>kE,configuredSourceDir:()=>mQ,environmentEndpoint:()=>I1,environmentExecutor:()=>hE,environmentName:()=>Oi,environmentNames:()=>mE,findProjectConfigPastFragments:()=>yw,isEnvironmentPattern:()=>vl,isLintOnlyFragment:()=>RE,isOwnershipParamRef:()=>yE,loadChantConfig:()=>gs,loadChantConfigUpward:()=>bE,matchesDeclaredEnvironment:()=>Yf,matchesEnvironmentPattern:()=>gw,ownershipEnvDisagreement:()=>UIe,resolveAutoReleaseDisabled:()=>HIe,resolveDiscoveryGlobs:()=>hu,resolveFoldEnabled:()=>wQ,resolveKnowledgeDir:()=>zIe,resolveOwnershipEnv:()=>L1,resolveOwnershipMarker:()=>yQ,resolveOwnershipStack:()=>mw,resolveSandboxEnabled:()=>bQ,resolveSbomFormat:()=>M1,resolveSigningDefaults:()=>$E,resolveSourceDir:()=>vE,resolveVulnPolicy:()=>F1});import{existsSync as lQ,readFileSync as fQ}from"fs";import{dirname as gQ,join as T1,resolve as D1}from"path";async function gs(e){let t=T1(e,"chant.config.ts");if(lQ(t)){let r=await X7(t,e);return{config:pQ(r,t),configPath:t}}let n=T1(e,"chant.config.json");if(lQ(n)){let{readFileSync:r}=await import("fs"),o=r(n,"utf-8"),i=JSON.parse(o);return{config:pQ(i,n),configPath:n}}return{config:j1}}async function bE(e){let{dir:t,configPath:n}=yw(e);return n&&BIe(n),gs(t)}function yw(e){let{dir:t,configPath:n}=cw(e);for(;n&&RE(n);){let r=gQ(t);if(r===t)break;({dir:t,configPath:n}=cw(r))}return{dir:t,configPath:n}}function mQ(e){return typeof e?.sourceDir=="string"&&e.sourceDir!==""?e.sourceDir:"."}function vE(e,t,n){return D1(e,n??mQ(t))}async function hu(e,t={}){let{dir:n,configPath:r}=yw(e);if(!r)return;let o;try{({config:o}=await gs(n))}catch(c){if(c instanceof Qf&&(c.key==="exclude"||c.key==="include"))throw c;return}let i=t.sourceWalk===!0&&o.sourceDir===void 0&&D1(e)===D1(n),s=[...o.exclude??[],...i?kE:[]],a=o.include??[];if(!(s.length===0&&a.length===0))return{root:n,exclude:s,include:a}}function RE(e){if(!e.endsWith("chant.config.json"))return!1;try{let t=JSON.parse(fQ(e,"utf-8"));if(typeof t!="object"||t===null||Array.isArray(t))return!1;let n=Object.keys(t).filter(r=>!hQ(r));return n.length>0&&n.every(r=>N1.has(r))}catch{return!1}}function BIe(e){if(e.endsWith("chant.config.json"))try{let t=JSON.parse(fQ(e,"utf-8"));if(typeof t!="object"||t===null||Array.isArray(t))return;let n=Object.keys(t).filter(r=>!hQ(r));if(n.some(r=>!N1.has(r))&&!n.some(r=>uQ.has(r))){let r=n.filter(o=>!N1.has(o));console.error(`warning: ${e} is being used as the project config, but declares no project-level key (${[...uQ].slice(0,4).join(", ")}, \u2026). ${r.length===1?"The key":"The keys"} ${r.map(o=>`"${o}"`).join(", ")} stopped the walk to the real one \u2014 any config above this file is being ignored. Prefix a comment key with "_", or move the key to the project config. (chant #1711)`)}}catch{}}function L1(e,t){let n=e.ownership?.env;if(!yE(n))return n;let r=n.param,o=e.buildParams?.[r];if(!o)throw new Error(`ownership.env references build parameter "${r}", which chant.config.ts's buildParams does not declare`);let i=t?.find(s=>s.name===r);if(!i)throw new Error(`ownership.env references build parameter "${r}", which resolved to no value for this build \u2014 pass --param ${r}=<value>${o.env?`, set ${o.env}`:""}, or give it a default`);return String(i.value)}function yQ(e,t){let n=mw(e);if(n!==void 0)return{stack:n,env:L1(e,t)}}function UIe(e,t){let n=e.ownership?.env;if(typeof n!="string"||mw(e)===void 0)return;let r=t?.find(o=>o.name==="env");if(!(!r||String(r.value)===n))return`ownership.env is "${n}" but the env build parameter resolved to ${JSON.stringify(r.value)} (${r.source}) \u2014 the ownership marker and params.env disagree about which environment this build is for. Use ownership: { env: { param: "env" } } so the marker follows the parameter.`}function HIe(e,t){return t?!0:e.release?.autoRecord===!1}function wQ(e,t){return t!==void 0?t:e.build?.fold!==void 0?e.build.fold:!0}function bQ(e,t){return t?!0:e.build?.sandbox===!0}function M1(e,t){return t??e.sbom?.format??xi}function $E(e){let t=e.signing,n=t?.keyless!==!1;return{keyless:n,...!n&&t?.key?{key:{key:t.key}}:{},identityPolicyDefaults:{expectedIssuer:t?.oidcIssuer,expectedIdentity:t?.identity,identityIsRegexp:t?.identityIsRegexp,key:t?.keyless===!1?t?.key:void 0}}}function F1(e){let t=e.vulnPolicy;if(!t)return{};let n={};return t.failSeverity&&(n.failSeverity=t.failSeverity),t.fixableOnly!==void 0&&(n.fixableOnly=t.fixableOnly),t.warnSeverity&&(n.warnSeverity=t.warnSeverity),t.failOnLicense!==void 0&&(n.failOnLicense=t.failOnLicense),t.failOnUnknownSeverity!==void 0&&(n.failOnUnknownSeverity=t.failOnUnknownSeverity),t.failOnKev!==void 0&&(n.failOnKev=t.failOnKev),t.failEpssAtOrAbove!==void 0&&(n.failEpssAtOrAbove=t.failEpssAtOrAbove),t.warnEpssAtOrAbove!==void 0&&(n.warnEpssAtOrAbove=t.warnEpssAtOrAbove),t.exploitabilityFixableOnly!==void 0&&(n.exploitabilityFixableOnly=t.exploitabilityFixableOnly),t.license&&(n.license=t.license),n}function zIe(e,t){return T1(t,e.knowledge?.dir??"knowledge")}function pQ(e,t){if(typeof e!="object"||e===null)return j1;let n=hw.safeParse(e);if(!n.success){let a=n.error.issues[0],c=a.path.length>0?a.path.join("."):void 0,l=t?` in ${t}`:"";throw new Qf(`Invalid chant config${l}: ${c?`${c}: `:""}${a.message}`,a.path.length>0?String(a.path[0]):void 0)}let r=e.lexicons,o=t!==void 0?gQ(t):process.cwd(),i=e.sourceDir;for(let[a,c]of(r??[]).entries()){if(typeof c=="string"||c.root===void 0)continue;let{problem:l}=uE(c,o,i);if(l!==void 0){let d=t?` in ${t}`:"";throw new Qf(`Invalid chant config${d}: lexicons.${a}.root: ${l}`,"lexicons")}}let s=wl(r,o,i);return Object.keys(s).length>0?{...e,lexicons:Eo(r),lexiconModules:s}:e}var dQ,WIe,GIe,hw,j1,kE,N1,hQ,uQ,Qf,En=x(()=>{"use strict";Jn();Za();Si();S1();Zn();fE();cQ();wE();wE();dQ={bucket:w.string().min(1),prefix:w.string().optional(),region:w.string().min(1).optional(),endpoint:w.string().url().optional(),forcePathStyle:w.boolean().optional(),credentials:w.object({accessKeyId:w.string().min(1),secretAccessKey:w.string().min(1),sessionToken:w.string().min(1).optional()}).strict().optional()},WIe=w.union([w.string().min(1),w.object({name:w.string().min(1),endpoint:w.string().min(1).optional(),canary:w.boolean().optional(),executor:w.object({forge:w.enum(gE),workflow:w.string().min(1)}).strict().optional()})]),GIe=w.union([w.string().min(1),w.object({name:w.string().min(1),module:w.string().min(1),root:w.string().min(1).optional()}).strict()]),hw=w.object({lexicons:w.array(GIe).optional(),capabilities:w.array(w.string().min(1)).optional(),environments:w.array(WIe).optional(),sourceDir:w.string().min(1).optional(),lint:w.record(w.string(),w.unknown()).optional(),ownership:w.object({stack:w.string().min(1).optional(),env:w.union([w.string().min(1),w.object({param:w.string().min(1)})]).optional(),enabled:w.boolean().optional()}).optional(),build:w.object({fold:w.boolean().optional()}).optional(),graph:w.object({lint:w.enum(["gate","report"]).optional(),reader:w.object({module:w.string().min(1),config:w.record(w.string(),w.unknown()).optional()}).strict().optional()}).strict().optional(),buildParams:w.record(w.string(),w.object({type:w.enum(["string","number","boolean"]),default:w.union([w.string(),w.number(),w.boolean()]).optional(),enum:w.array(w.union([w.string(),w.number(),w.boolean()])).optional(),env:w.string().min(1).optional(),required:w.boolean().optional(),description:w.string().optional()})).optional(),release:w.object({autoRecord:w.boolean().optional(),publish:w.array(aQ).optional(),images:w.array(w.union([w.object({name:w.string().min(1),build:w.string().min(1),archive:w.string().min(1),platforms:w.array(w.string().min(1)).min(1).optional()}).strict(),w.object({name:w.string().min(1),dockerfile:w.string().min(1),context:w.string().min(1).optional(),platforms:w.array(w.string().min(1)).min(1).optional(),archive:w.string().min(1).optional(),prepare:w.string().min(1).optional(),args:w.record(w.string(),w.string()).optional()}).strict()])).optional(),lane:w.string().regex(/^[a-z0-9][a-z0-9-]*$/,"a ci.green lane name: lowercase letters, digits and dashes").optional(),legacyTags:w.array(w.string().min(1)).optional(),version:w.object({packages:w.array(w.string().min(1)).min(1),lockfile:w.union([w.string().min(1),w.literal(!1)]).optional()}).strict().optional(),workflow:w.object({trigger:w.enum(["tag","dispatch"]).optional(),gate:w.enum(["last-green","head"]).optional(),install:w.string().min(1).optional(),build:w.union([w.string().min(1),w.literal(!1)]).optional(),chant:w.string().min(1).optional(),after:w.array(w.string().min(1)).optional(),permissions:w.record(w.string(),w.enum(["read","write"])).optional(),env:w.record(w.string(),w.string()).optional(),setup:w.array(w.union([w.object({uses:w.string().min(1),with:w.record(w.string(),w.union([w.string(),w.number(),w.boolean()])).optional(),env:w.record(w.string(),w.string()).optional()}).strict(),w.object({run:w.string().min(1),env:w.record(w.string(),w.string()).optional()}).strict()])).optional(),file:w.string().regex(/^[^/][^\0]*$/,"a path from the repository root").refine(e=>!e.split("/").includes(".."),"a path inside the repository").optional()}).strict().optional()}).optional(),run:w.object({on:w.string().min(1).optional()}).strict().optional(),sbom:w.object({format:w.enum(["spdx","cyclonedx"]).optional(),enabled:w.boolean().optional()}).optional(),signing:w.object({keyless:w.boolean().optional(),oidcIssuer:w.string().min(1).optional(),identity:w.string().min(1).optional(),identityIsRegexp:w.boolean().optional(),key:w.string().min(1).optional()}).optional(),vulnPolicy:w.object({failSeverity:w.enum(["critical","high","medium","low","negligible","unknown"]).optional(),fixableOnly:w.boolean().optional(),warnSeverity:w.enum(["critical","high","medium","low","negligible","unknown"]).optional(),failOnLicense:w.boolean().optional(),failOnUnknownSeverity:w.boolean().optional(),failOnKev:w.boolean().optional(),failEpssAtOrAbove:w.number().min(0).max(1).optional(),warnEpssAtOrAbove:w.number().min(0).max(1).optional(),exploitabilityFixableOnly:w.boolean().optional(),license:w.object({allow:w.array(w.string()).optional(),deny:w.array(w.string()).optional()}).optional(),scanner:w.enum(["grype","trivy"]).optional(),vexSources:w.array(w.string()).optional()}).optional(),knowledge:w.object({dir:w.string().min(1).optional()}).optional(),codegen:w.object({outDir:w.string().min(1).optional()}).strict().optional(),decide:sQ.optional(),exclude:w.array(w.string().min(1)).optional(),include:w.array(w.string().min(1)).optional(),rootOnly:w.boolean().optional(),snapshots:w.discriminatedUnion("store",[w.object({store:w.literal("git-ref"),ref:w.string().regex(/^refs\/chant\//).optional(),readOrphanBranch:w.boolean().optional()}).strict(),w.object({store:w.literal("orphan-branch")}).strict(),w.object({store:w.literal("local"),dir:w.string().min(1).optional()}).strict(),w.object({store:w.literal("s3"),...dQ}).strict(),w.object({store:w.literal("none")}).strict()]).optional(),observationBaseline:w.object({store:w.enum(["file","git-ref","s3","none"]),dir:w.string().min(1).optional(),ref:w.string().regex(/^refs\/chant\//).optional(),s3:w.object(dQ).strict().optional()}).strict().optional()}).passthrough(),j1={};kE=["scripts","migrations"];N1=new Set(["$schema","extends","rules","overrides","plugins","policies"]),hQ=e=>e.startsWith("_");uQ=new Set(Object.keys(hw.shape).filter(e=>e!=="lint"));Qf=class extends Error{constructor(n,r){super(n);this.key=r}}});var Kf,pw=x(()=>{"use strict";En();Kf="CHANT_ENV"});var ww=ve((Nwt,xQ)=>{"use strict";var vQ="[^\\\\/]",qIe="(?=.)",kQ="[^/]",G1="(?:\\/|$)",RQ="(?:^|\\/)",B1=`\\.{1,2}${G1}`,VIe="(?!\\.)",KIe=`(?!${RQ}${B1})`,JIe=`(?!\\.{0,1}${G1})`,ZIe=`(?!${B1})`,YIe="[^.\\/]",QIe=`${kQ}*?`,XIe="/",$Q={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:qIe,QMARK:kQ,END_ANCHOR:G1,DOTS_SLASH:B1,NO_DOT:VIe,NO_DOTS:KIe,NO_DOT_SLASH:JIe,NO_DOTS_SLASH:ZIe,QMARK_NO_DOT:YIe,STAR:QIe,START_ANCHOR:RQ,SEP:XIe},eTe={...$Q,SLASH_LITERAL:"[\\\\/]",QMARK:vQ,STAR:`${vQ}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},tTe={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};xQ.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:tTe,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?eTe:$Q}}});var bw=ve(Po=>{"use strict";var{REGEX_BACKSLASH:nTe,REGEX_REMOVE_BACKSLASH:rTe,REGEX_SPECIAL_CHARS:oTe,REGEX_SPECIAL_CHARS_GLOBAL:iTe}=ww();Po.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Po.hasRegexChars=e=>oTe.test(e);Po.isRegexChar=e=>e.length===1&&Po.hasRegexChars(e);Po.escapeRegex=e=>e.replace(iTe,"\\$1");Po.toPosixSlashes=e=>e.replace(nTe,"/");Po.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};Po.removeBackslashes=e=>e.replace(rTe,t=>t==="\\"?"":t);Po.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Po.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Po.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Po.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",o=n.contains?"":"$",i=`${r}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i};Po.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return r===""?n[n.length-2]:r}});var IQ=ve((Lwt,_Q)=>{"use strict";var SQ=bw(),{CHAR_ASTERISK:U1,CHAR_AT:sTe,CHAR_BACKWARD_SLASH:vw,CHAR_COMMA:aTe,CHAR_DOT:H1,CHAR_EXCLAMATION_MARK:z1,CHAR_FORWARD_SLASH:CQ,CHAR_LEFT_CURLY_BRACE:q1,CHAR_LEFT_PARENTHESES:V1,CHAR_LEFT_SQUARE_BRACKET:cTe,CHAR_PLUS:lTe,CHAR_QUESTION_MARK:EQ,CHAR_RIGHT_CURLY_BRACE:dTe,CHAR_RIGHT_PARENTHESES:OQ,CHAR_RIGHT_SQUARE_BRACKET:uTe}=ww(),PQ=e=>e===CQ||e===vw,AQ=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},pTe=(e,t)=>{let n=t||{},r=e.length-1,o=n.parts===!0||n.scanToEnd===!0,i=[],s=[],a=[],c=e,l=-1,d=0,u=0,p=!1,f=!1,g=!1,m=!1,h=!1,y=!1,b=!1,v=!1,k=!1,$=!1,O=0,E,P,T={value:"",depth:0,isGlob:!1},S=()=>l>=r,C=()=>c.charCodeAt(l+1),F=()=>(E=P,c.charCodeAt(++l));for(;l<r;){P=F();let V;if(P===vw){b=T.backslashes=!0,P=F(),P===q1&&(y=!0);continue}if(y===!0||P===q1){for(O++;S()!==!0&&(P=F());){if(P===vw){b=T.backslashes=!0,F();continue}if(P===q1){O++;continue}if(y!==!0&&P===H1&&(P=F())===H1){if(p=T.isBrace=!0,g=T.isGlob=!0,$=!0,o===!0)continue;break}if(y!==!0&&P===aTe){if(p=T.isBrace=!0,g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===dTe&&(O--,O===0)){y=!1,p=T.isBrace=!0,$=!0;break}}if(o===!0)continue;break}if(P===CQ){if(i.push(l),s.push(T),T={value:"",depth:0,isGlob:!1},$===!0)continue;if(E===H1&&l===d+1){d+=2;continue}u=l+1;continue}if(n.noext!==!0&&(P===lTe||P===sTe||P===U1||P===EQ||P===z1)===!0&&C()===V1){if(g=T.isGlob=!0,m=T.isExtglob=!0,$=!0,P===z1&&l===d&&(k=!0),o===!0){for(;S()!==!0&&(P=F());){if(P===vw){b=T.backslashes=!0,P=F();continue}if(P===OQ){g=T.isGlob=!0,$=!0;break}}continue}break}if(P===U1){if(E===U1&&(h=T.isGlobstar=!0),g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===EQ){if(g=T.isGlob=!0,$=!0,o===!0)continue;break}if(P===cTe){for(;S()!==!0&&(V=F());){if(V===vw){b=T.backslashes=!0,F();continue}if(V===uTe){f=T.isBracket=!0,g=T.isGlob=!0,$=!0;break}}if(o===!0)continue;break}if(n.nonegate!==!0&&P===z1&&l===d){v=T.negated=!0,d++;continue}if(n.noparen!==!0&&P===V1){if(g=T.isGlob=!0,o===!0){for(;S()!==!0&&(P=F());){if(P===V1){b=T.backslashes=!0,P=F();continue}if(P===OQ){$=!0;break}}continue}break}if(g===!0){if($=!0,o===!0)continue;break}}n.noext===!0&&(m=!1,g=!1);let L=c,A="",_="";d>0&&(A=c.slice(0,d),c=c.slice(d),u-=d),L&&g===!0&&u>0?(L=c.slice(0,u),_=c.slice(u)):g===!0?(L="",_=c):L=c,L&&L!==""&&L!=="/"&&L!==c&&PQ(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),n.unescape===!0&&(_&&(_=SQ.removeBackslashes(_)),L&&b===!0&&(L=SQ.removeBackslashes(L)));let N={prefix:A,input:e,start:d,base:L,glob:_,isBrace:p,isBracket:f,isGlob:g,isExtglob:m,isGlobstar:h,negated:v,negatedExtglob:k};if(n.tokens===!0&&(N.maxDepth=0,PQ(P)||s.push(T),N.tokens=s),n.parts===!0||n.tokens===!0){let V;for(let J=0;J<i.length;J++){let M=V?V+1:d,z=i[J],G=e.slice(M,z);n.tokens&&(J===0&&d!==0?(s[J].isPrefix=!0,s[J].value=A):s[J].value=G,AQ(s[J]),N.maxDepth+=s[J].depth),(J!==0||G!=="")&&a.push(G),V=z}if(V&&V+1<e.length){let J=e.slice(V+1);a.push(J),n.tokens&&(s[s.length-1].value=J,AQ(s[s.length-1]),N.maxDepth+=s[s.length-1].depth)}N.slashes=i,N.parts=a}return N};_Q.exports=pTe});var LQ=ve((Mwt,jQ)=>{"use strict";var kw=ww(),ei=bw(),{MAX_LENGTH:xE,POSIX_REGEX_SOURCE:fTe,REGEX_NON_SPECIAL_CHARS:gTe,REGEX_SPECIAL_CHARS_BACKREF:mTe,REPLACEMENTS:TQ}=kw,hTe=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(o=>ei.escapeRegex(o)).join("..")}return n},Xf=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,DQ=e=>{let t=[],n=0,r=0,o=0,i="",s=!1;for(let a of e){if(s===!0){i+=a,s=!1;continue}if(a==="\\"){i+=a,s=!0;continue}if(a==='"'){o=o===1?0:1,i+=a;continue}if(o===0){if(a==="[")n++;else if(a==="]"&&n>0)n--;else if(n===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){t.push(i),i="";continue}}}i+=a}return t.push(i),t},yTe=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n==="\\"){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},NQ=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(yTe(t))return t.replace(/\\(.)/g,"$1")},wTe=e=>{let t=e.map(NQ).filter(Boolean);for(let n=0;n<t.length;n++)for(let r=n+1;r<t.length;r++){let o=t[n],i=t[r],s=o[0];if(!(!s||o!==s.repeat(o.length)||i!==s.repeat(i.length))&&(o===i||o.startsWith(i)||i.startsWith(o)))return!0}return!1},K1=(e,t=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let n=0,r=0,o=0,i=!1;for(let s=1;s<e.length;s++){let a=e[s];if(i===!0){i=!1;continue}if(a==="\\"){i=!0;continue}if(a==='"'){o=o===1?0:1;continue}if(o!==1){if(a==="["){n++;continue}if(a==="]"&&n>0){n--;continue}if(!(n>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return t===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},bTe=e=>{let t=0,n=[];for(;t<e.length;){let o=K1(e.slice(t),!1);if(!o||o.type!=="*")return;let i=DQ(o.body).map(a=>a.trim());if(i.length!==1)return;let s=NQ(i[0]);if(!s||s.length!==1)return;n.push(s),t+=o.end+1}return n.length<1?void 0:`${n.length===1?ei.escapeRegex(n[0]):`[${n.map(o=>ei.escapeRegex(o)).join("")}]`}*`},vTe=e=>{let t=0,n=e.trim(),r=K1(n);for(;r;)t++,n=r.body.trim(),r=K1(n);return t},kTe=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let n=typeof t.maxExtglobRecursion=="number"?t.maxExtglobRecursion:kw.DEFAULT_MAX_EXTGLOB_RECURSION,r=DQ(e).map(o=>o.trim());if(r.length>1&&(r.some(o=>o==="")||r.some(o=>/^[*?]+$/.test(o))||wTe(r)))return{risky:!0};for(let o of r){let i=bTe(o);if(i)return{risky:!0,safeOutput:i};if(vTe(o)>n)return{risky:!0}}return{risky:!1}},J1=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=TQ[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(xE,n.maxLength):xE,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);let i={type:"bos",value:"",output:n.prepend||""},s=[i],a=n.capture?"":"?:",c=kw.globChars(n.windows),l=kw.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:h,NO_DOTS_SLASH:y,QMARK:b,QMARK_NO_DOT:v,STAR:k,START_ANCHOR:$}=c,O=le=>`(${a}(?:(?!${$}${le.dot?g:d}).)*?)`,E=n.dot?"":m,P=n.dot?b:v,T=n.bash===!0?O(n):k;n.capture&&(T=`(${T})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let S={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=ei.removePrefix(e,S),o=e.length;let C=[],F=[],L=[],A=i,_,N=()=>S.index===o-1,V=S.peek=(le=1)=>e[S.index+le],J=S.advance=()=>e[++S.index]||"",M=()=>e.slice(S.index+1),z=(le="",Qe=0)=>{S.consumed+=le,S.index+=Qe},G=le=>{S.output+=le.output!=null?le.output:le.value,z(le.value)},B=()=>{let le=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)J(),S.start++,le++;return le%2===0?!1:(S.negated=!0,S.start++,!0)},U=le=>{S[le]++,L.push(le)},Z=le=>{S[le]--,L.pop()},X=le=>{if(A.type==="globstar"){let Qe=S.braces>0&&(le.type==="comma"||le.type==="brace"),Q=le.extglob===!0||C.length&&(le.type==="pipe"||le.type==="paren");le.type!=="slash"&&le.type!=="paren"&&!Qe&&!Q&&(S.output=S.output.slice(0,-A.output.length),A.type="star",A.value="*",A.output=T,S.output+=A.output)}if(C.length&&le.type!=="paren"&&(C[C.length-1].inner+=le.value),(le.value||le.output)&&G(le),A&&A.type==="text"&&le.type==="text"){A.output=(A.output||A.value)+le.value,A.value+=le.value;return}le.prev=A,s.push(le),A=le},se=(le,Qe)=>{let Q={...l[Qe],conditions:1,inner:""};Q.prev=A,Q.parens=S.parens,Q.output=S.output,Q.startIndex=S.index,Q.tokensIndex=s.length;let Pe=(n.capture?"(":"")+Q.open;U("parens"),X({type:le,value:Qe,output:S.output?"":f}),X({type:"paren",extglob:!0,value:J(),output:Pe}),C.push(Q)},Ce=le=>{let Qe=e.slice(le.startIndex,S.index+1),Q=e.slice(le.startIndex+2,S.index),Pe=kTe(Q,n);if((le.type==="plus"||le.type==="star")&&Pe.risky){let yt=Pe.safeOutput?(le.output?"":f)+(n.capture?`(${Pe.safeOutput})`:Pe.safeOutput):void 0,an=s[le.tokensIndex];an.type="text",an.value=Qe,an.output=yt||ei.escapeRegex(Qe);for(let ee=le.tokensIndex+1;ee<s.length;ee++)s[ee].value="",s[ee].output="",delete s[ee].suffix;S.output=le.output+an.output,S.backtrack=!0,X({type:"paren",extglob:!0,value:_,output:""}),Z("parens");return}let Fe=le.close+(n.capture?")":""),lt;if(le.type==="negate"){let yt=T;if(le.inner&&le.inner.length>1&&le.inner.includes("/")&&(yt=O(n)),(yt!==T||N()||/^\)+$/.test(M()))&&(Fe=le.close=`)$))${yt}`),le.inner.includes("*")&&(lt=M())&&/^\.[^\\/.]+$/.test(lt)){let an=J1(lt,{...t,fastpaths:!1}).output;Fe=le.close=`)${an})${yt})`}le.prev.type==="bos"&&(S.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:_,output:Fe}),Z("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let le=!1,Qe=e.replace(mTe,(Q,Pe,Fe,lt,yt,an)=>lt==="\\"?(le=!0,Q):lt==="?"?Pe?Pe+lt+(yt?b.repeat(yt.length):""):an===0?P+(yt?b.repeat(yt.length):""):b.repeat(Fe.length):lt==="."?d.repeat(Fe.length):lt==="*"?Pe?Pe+lt+(yt?T:""):T:Pe?Q:`\\${Q}`);return le===!0&&(n.unescape===!0?Qe=Qe.replace(/\\/g,""):Qe=Qe.replace(/\\+/g,Q=>Q.length%2===0?"\\\\":Q?"\\":"")),Qe===e&&n.contains===!0?(S.output=e,S):(S.output=ei.wrapOutput(Qe,S,t),S)}for(;!N();){if(_=J(),_==="\0")continue;if(_==="\\"){let Q=V();if(Q==="/"&&n.bash!==!0||Q==="."||Q===";")continue;if(!Q){_+="\\",X({type:"text",value:_});continue}let Pe=/^\\+/.exec(M()),Fe=0;if(Pe&&Pe[0].length>2&&(Fe=Pe[0].length,S.index+=Fe,Fe%2!==0&&(_+="\\")),n.unescape===!0?_=J():_+=J(),S.brackets===0){X({type:"text",value:_});continue}}if(S.brackets>0&&(_!=="]"||A.value==="["||A.value==="[^")){if(n.posix!==!1&&_===":"){let Q=A.value.slice(1);if(Q.includes("[")&&(A.posix=!0,Q.includes(":"))){let Pe=A.value.lastIndexOf("["),Fe=A.value.slice(0,Pe),lt=A.value.slice(Pe+2),yt=fTe[lt];if(yt){A.value=Fe+yt,S.backtrack=!0,J(),!i.output&&s.indexOf(A)===1&&(i.output=f);continue}}}(_==="["&&V()!==":"||_==="-"&&V()==="]")&&(_=`\\${_}`),_==="]"&&(A.value==="["||A.value==="[^")&&(_=`\\${_}`),n.posix===!0&&_==="!"&&A.value==="["&&(_="^"),A.value+=_,G({value:_});continue}if(S.quotes===1&&_!=='"'){_=ei.escapeRegex(_),A.value+=_,G({value:_});continue}if(_==='"'){S.quotes=S.quotes===1?0:1,n.keepQuotes===!0&&X({type:"text",value:_});continue}if(_==="("){U("parens"),X({type:"paren",value:_});continue}if(_===")"){if(S.parens===0&&n.strictBrackets===!0)throw new SyntaxError(Xf("opening","("));let Q=C[C.length-1];if(Q&&S.parens===Q.parens+1){Ce(C.pop());continue}X({type:"paren",value:_,output:S.parens?")":"\\)"}),Z("parens");continue}if(_==="["){if(n.nobracket===!0||!M().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(Xf("closing","]"));_=`\\${_}`}else U("brackets");X({type:"bracket",value:_});continue}if(_==="]"){if(n.nobracket===!0||A&&A.type==="bracket"&&A.value.length===1){X({type:"text",value:_,output:`\\${_}`});continue}if(S.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(Xf("opening","["));X({type:"text",value:_,output:`\\${_}`});continue}Z("brackets");let Q=A.value.slice(1);if(A.posix!==!0&&Q[0]==="^"&&!Q.includes("/")&&(_=`/${_}`),A.value+=_,G({value:_}),n.literalBrackets===!1||ei.hasRegexChars(Q))continue;let Pe=ei.escapeRegex(A.value);if(S.output=S.output.slice(0,-A.value.length),n.literalBrackets===!0){S.output+=Pe,A.value=Pe;continue}A.value=`(${a}${Pe}|${A.value})`,S.output+=A.value;continue}if(_==="{"&&n.nobrace!==!0){U("braces");let Q={type:"brace",value:_,output:"(",outputIndex:S.output.length,tokensIndex:S.tokens.length};F.push(Q),X(Q);continue}if(_==="}"){let Q=F[F.length-1];if(n.nobrace===!0||!Q){X({type:"text",value:_,output:_});continue}let Pe=")";if(Q.dots===!0){let Fe=s.slice(),lt=[];for(let yt=Fe.length-1;yt>=0&&(s.pop(),Fe[yt].type!=="brace");yt--)Fe[yt].type!=="dots"&&lt.unshift(Fe[yt].value);Pe=hTe(lt,n),S.backtrack=!0}if(Q.comma!==!0&&Q.dots!==!0){let Fe=S.output.slice(0,Q.outputIndex),lt=S.tokens.slice(Q.tokensIndex);Q.value=Q.output="\\{",_=Pe="\\}",S.output=Fe;for(let yt of lt)S.output+=yt.output||yt.value}X({type:"brace",value:_,output:Pe}),Z("braces"),F.pop();continue}if(_==="|"){C.length>0&&C[C.length-1].conditions++,X({type:"text",value:_});continue}if(_===","){let Q=_,Pe=F[F.length-1];Pe&&L[L.length-1]==="braces"&&(Pe.comma=!0,Q="|"),X({type:"comma",value:_,output:Q});continue}if(_==="/"){if(A.type==="dot"&&S.index===S.start+1){S.start=S.index+1,S.consumed="",S.output="",s.pop(),A=i;continue}X({type:"slash",value:_,output:p});continue}if(_==="."){if(S.braces>0&&A.type==="dot"){A.value==="."&&(A.output=d);let Q=F[F.length-1];A.type="dots",A.output+=_,A.value+=_,Q.dots=!0;continue}if(S.braces+S.parens===0&&A.type!=="bos"&&A.type!=="slash"){X({type:"text",value:_,output:d});continue}X({type:"dot",value:_,output:d});continue}if(_==="?"){if(!(A&&A.value==="(")&&n.noextglob!==!0&&V()==="("&&V(2)!=="?"){se("qmark",_);continue}if(A&&A.type==="paren"){let Pe=V(),Fe=_;(A.value==="("&&!/[!=<:]/.test(Pe)||Pe==="<"&&!/<([!=]|\w+>)/.test(M()))&&(Fe=`\\${_}`),X({type:"text",value:_,output:Fe});continue}if(n.dot!==!0&&(A.type==="slash"||A.type==="bos")){X({type:"qmark",value:_,output:v});continue}X({type:"qmark",value:_,output:b});continue}if(_==="!"){if(n.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){se("negate",_);continue}if(n.nonegate!==!0&&S.index===0){B();continue}}if(_==="+"){if(n.noextglob!==!0&&V()==="("&&V(2)!=="?"){se("plus",_);continue}if(A&&A.value==="("||n.regex===!1){X({type:"plus",value:_,output:u});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||S.parens>0){X({type:"plus",value:_});continue}X({type:"plus",value:u});continue}if(_==="@"){if(n.noextglob!==!0&&V()==="("&&V(2)!=="?"){X({type:"at",extglob:!0,value:_,output:""});continue}X({type:"text",value:_});continue}if(_!=="*"){(_==="$"||_==="^")&&(_=`\\${_}`);let Q=gTe.exec(M());Q&&(_+=Q[0],S.index+=Q[0].length),X({type:"text",value:_});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=_,A.output=T,S.backtrack=!0,S.globstar=!0,z(_);continue}let le=M();if(n.noextglob!==!0&&/^\([^?]/.test(le)){se("star",_);continue}if(A.type==="star"){if(n.noglobstar===!0){z(_);continue}let Q=A.prev,Pe=Q.prev,Fe=Q.type==="slash"||Q.type==="bos",lt=Pe&&(Pe.type==="star"||Pe.type==="globstar");if(n.bash===!0&&(!Fe||le[0]&&le[0]!=="/")){X({type:"star",value:_,output:""});continue}let yt=S.braces>0&&(Q.type==="comma"||Q.type==="brace"),an=C.length&&(Q.type==="pipe"||Q.type==="paren");if(!Fe&&Q.type!=="paren"&&!yt&&!an){X({type:"star",value:_,output:""});continue}for(;le.slice(0,3)==="/**";){let ee=e[S.index+4];if(ee&&ee!=="/")break;le=le.slice(3),z("/**",3)}if(Q.type==="bos"&&N()){A.type="globstar",A.value+=_,A.output=O(n),S.output=A.output,S.globstar=!0,z(_);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&!lt&&N()){S.output=S.output.slice(0,-(Q.output+A.output).length),Q.output=`(?:${Q.output}`,A.type="globstar",A.output=O(n)+(n.strictSlashes?")":"|$)"),A.value+=_,S.globstar=!0,S.output+=Q.output+A.output,z(_);continue}if(Q.type==="slash"&&Q.prev.type!=="bos"&&le[0]==="/"){let ee=le[1]!==void 0?"|$":"";S.output=S.output.slice(0,-(Q.output+A.output).length),Q.output=`(?:${Q.output}`,A.type="globstar",A.output=`${O(n)}${p}|${p}${ee})`,A.value+=_,S.output+=Q.output+A.output,S.globstar=!0,z(_+J()),X({type:"slash",value:"/",output:""});continue}if(Q.type==="bos"&&le[0]==="/"){A.type="globstar",A.value+=_,A.output=`(?:^|${p}|${O(n)}${p})`,S.output=A.output,S.globstar=!0,z(_+J()),X({type:"slash",value:"/",output:""});continue}S.output=S.output.slice(0,-A.output.length),A.type="globstar",A.output=O(n),A.value+=_,S.output+=A.output,S.globstar=!0,z(_);continue}let Qe={type:"star",value:_,output:T};if(n.bash===!0){Qe.output=".*?",(A.type==="bos"||A.type==="slash")&&(Qe.output=E+Qe.output),X(Qe);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&n.regex===!0){Qe.output=_,X(Qe);continue}(S.index===S.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(S.output+=h,A.output+=h):n.dot===!0?(S.output+=y,A.output+=y):(S.output+=E,A.output+=E),V()!=="*"&&(S.output+=f,A.output+=f)),X(Qe)}for(;S.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing","]"));S.output=ei.escapeLast(S.output,"["),Z("brackets")}for(;S.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing",")"));S.output=ei.escapeLast(S.output,"("),Z("parens")}for(;S.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(Xf("closing","}"));S.output=ei.escapeLast(S.output,"{"),Z("braces")}if(n.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&X({type:"maybe_slash",value:"",output:`${p}?`}),S.backtrack===!0){S.output="";for(let le of S.tokens)S.output+=le.output!=null?le.output:le.value,le.suffix&&(S.output+=le.suffix)}return S};J1.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(xE,n.maxLength):xE,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=TQ[e]||e;let{DOT_LITERAL:i,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:u,STAR:p,START_ANCHOR:f}=kw.globChars(n.windows),g=n.dot?d:l,m=n.dot?u:l,h=n.capture?"":"?:",y={negated:!1,prefix:""},b=n.bash===!0?".*?":p;n.capture&&(b=`(${b})`);let v=E=>E.noglobstar===!0?b:`(${h}(?:(?!${f}${E.dot?c:i}).)*?)`,k=E=>{switch(E){case"*":return`${g}${a}${b}`;case".*":return`${i}${a}${b}`;case"*.*":return`${g}${b}${i}${a}${b}`;case"*/*":return`${g}${b}${s}${a}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${s})?${m}${a}${b}`;case"**/*.*":return`(?:${g}${v(n)}${s})?${m}${b}${i}${a}${b}`;case"**/.*":return`(?:${g}${v(n)}${s})?${i}${a}${b}`;default:{let P=/^(.*?)\.(\w+)$/.exec(E);if(!P)return;let T=k(P[1]);return T?T+i+P[2]:void 0}}},$=ei.removePrefix(e,y),O=k($);return O&&n.strictSlashes!==!0&&(O+=`${s}?`),O};jQ.exports=J1});var WQ=ve((Fwt,FQ)=>{"use strict";var RTe=IQ(),Z1=LQ(),MQ=bw(),$Te=ww(),xTe=e=>e&&typeof e=="object"&&!Array.isArray(e),_n=(e,t,n=!1)=>{if(Array.isArray(e)){let d=e.map(p=>_n(p,t,n));return p=>{for(let f of d){let g=f(p);if(g)return g}return!1}}let r=xTe(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},i=o.windows,s=r?_n.compileRe(e,t):_n.makeRe(e,t,!1,!0),a=s.state;delete s.state;let c=()=>!1;if(o.ignore){let d={...t,ignore:null,onMatch:null,onResult:null};c=_n(o.ignore,d,n)}let l=(d,u=!1)=>{let{isMatch:p,match:f,output:g}=_n.test(d,s,t,{glob:e,posix:i}),m={glob:e,state:a,regex:s,posix:i,input:d,output:g,match:f,isMatch:p};return typeof o.onResult=="function"&&o.onResult(m),p===!1?(m.isMatch=!1,u?m:!1):c(d)?(typeof o.onIgnore=="function"&&o.onIgnore(m),m.isMatch=!1,u?m:!1):(typeof o.onMatch=="function"&&o.onMatch(m),u?m:!0)};return n&&(l.state=a),l};_n.test=(e,t,n,{glob:r,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=n||{},s=i.format||(o?MQ.toPosixSlashes:null),a=e===r,c=a&&s?s(e):e;return a===!1&&(c=s?s(e):e,a=c===r),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=_n.matchBase(e,t,n,o):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};_n.matchBase=(e,t,n)=>(t instanceof RegExp?t:_n.makeRe(t,n)).test(MQ.basename(e));_n.isMatch=(e,t,n)=>_n(t,n)(e);_n.parse=(e,t)=>Array.isArray(e)?e.map(n=>_n.parse(n,t)):Z1(e,{...t,fastpaths:!1});_n.scan=(e,t)=>RTe(e,t);_n.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let o=t||{},i=o.contains?"":"^",s=o.contains?"":"$",a=`${i}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let c=_n.toRegex(a,t);return r===!0&&(c.state=e),c};_n.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=Z1.fastpaths(e,t)),o.output||(o=Z1(e,t)),_n.compileRe(o,t,n,r)};_n.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};_n.constants=$Te;FQ.exports=_n});var yu=ve((Wwt,UQ)=>{"use strict";var GQ=WQ(),STe=bw();function BQ(e,t,n=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:STe.isWindows()}),GQ(e,t,n)}Object.assign(BQ,GQ);UQ.exports=BQ});import{dirname as ETe}from"path";import{fileURLToPath as OTe}from"url";import{createHash as PTe}from"crypto";import{execFile as ATe}from"child_process";function Q1(){return SE=new Y1,SE}function ot(){return SE||Q1()}function X1(e){return ETe(OTe(e))}var HQ,Y1,SE,ti=x(()=>{"use strict";HQ=et(yu(),1),Y1=class{constructor(){this.name="node";this.hashAlgorithm="sha256";this.commands={runner:"node",exec:"npx",packCmd:["npm","pack"]}}hash(t){return PTe("sha256").update(t).digest("hex")}globMatch(t,n){return(0,HQ.default)(t)(n)}async spawn(t,n){return new Promise(r=>{let o=ATe(t[0],t.slice(1),{cwd:n?.cwd,maxBuffer:10485760,...n?.env?{env:{...process.env,...n.env}}:{}},(i,s,a)=>{r({stdout:s??"",stderr:a??"",exitCode:i?i.code??1:0})});o.stdin&&(o.stdin.on("error",()=>{}),o.stdin.end(n?.stdin??""))})}}});import{createHmac as CTe,timingSafeEqual as Vwt}from"node:crypto";function eF(e=EE){let t=e.toLowerCase();return{signature:`${t}-signature`,timestamp:`${t}-timestamp`,event:`${t}-event`,delivery:`${t}-delivery`}}function tF(e,t,n){return`sha256=${CTe("sha256",e).update(`${String(t)}.${n}`,"utf8").digest("hex")}`}var EE,nF=x(()=>{"use strict";EE="x-chant"});import{createHash as _Te,createHmac as ITe,randomUUID as TTe,timingSafeEqual as Qwt}from"node:crypto";function NTe(e){let t={};e.CI_JOB_URL?t.url=e.CI_JOB_URL:e.GITHUB_SERVER_URL&&e.GITHUB_REPOSITORY&&e.GITHUB_RUN_ID?t.url=`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`:e.CI_PIPELINE_URL&&(t.url=e.CI_PIPELINE_URL),e.GITLAB_CI==="true"?t.forge="gitlab":e.GITEA_ACTIONS==="true"||e.FORGEJO_ACTIONS==="true"?t.forge="forgejo":e.GITHUB_ACTIONS==="true"&&(t.forge="github");let n=e.GITHUB_REPOSITORY||e.CI_PROJECT_PATH;n&&(t.repository=n);let r=e.GITHUB_SHA||e.CI_COMMIT_SHA;return r&&(t.commit=r),t}function OE(e,t={}){let n=t.env??process.env,{id:r,project:o,targets:i,run:s,...a}=e,c={...NTe(n),...s??{}},l=o??c.repository??"this project",d=e.digest??e.drift?.fingerprint??c.commit,u=r??(d?_Te("sha256").update(JSON.stringify([e.source,l,e.event,e.wave?.number??null,e.environment??null,d])).digest("hex"):TTe());return{schema:DTe,id:u,at:(t.now??new Date).toISOString(),...a,project:l,targets:i??[],...Object.keys(c).length>0?{run:c}:{}}}function VQ(e){if(e.summary)return`${e.source}: ${e.summary}`;let t=e.wave?`wave ${e.wave.number}${e.wave.name?` (${e.wave.name})`:""} of ${e.project}`:e.environment?`${e.environment} in ${e.project}`:e.project;return`${e.source}: ${t} ${jTe[e.event]}`}function KQ(e,t){let n=[];return e.approve?.review&&n.push({title:"Review and approve",value:`pull request ${e.approve.review.pr}, then ${t.again??"run it again"}`,link:e.approve.review.url}),e.drift?(e.drift.changed.length>0&&n.push({title:"Drifted",value:e.drift.changed.join(", ")}),e.drift.missing?.length&&n.push({title:"Missing",value:e.drift.missing.join(", ")}),e.drift.failed?.length&&n.push({title:"Not refreshed",value:e.drift.failed.join(", ")})):(e.targets.length>0||t.noTargets)&&n.push({title:t.targets??"Targets",value:e.targets.join(", ")||t.noTargets}),e.ci&&(n.push({title:"Commit",value:`${e.ci.commit.slice(0,12)} on ${e.ci.branch}`}),e.ci.phase&&n.push({title:"Phase",value:e.ci.failedRun?`${e.ci.phase}: ${e.ci.failedRun.name} ${e.ci.failedRun.conclusion??""}`.trimEnd():e.ci.phase}),e.ci.failedRun?.url&&n.push({title:"Failed run",value:e.ci.failedRun.url,link:e.ci.failedRun.url}),e.ci.culprit&&n.push({title:"Culprit",value:e.ci.culprit.slice(0,12)}),e.ci.red&&n.push({title:"Was red",value:e.ci.red.slice(0,12)})),e.digest&&n.push({title:"Digest",value:e.digest}),e.approve&&n.push({title:e.approve.review?"Or approve":"Approve",value:e.approve.command}),e.reason&&n.push({title:t.reason??"Reason",value:e.reason}),e.run?.url&&n.push({title:"Run",value:e.run.url,link:e.run.url}),e.reportUrl&&n.push({title:"Report",value:e.reportUrl,link:e.reportUrl}),n}function WTe(e){if(!(e.event!=="waiting"||!e.digest||!e.wave?.gate))return{id:e.id,source:e.source,at:e.at,gate:e.wave.gate,digest:e.digest}}function GTe(e,t){let n=Buffer.from(JSON.stringify({v:1,...t}),"utf8").toString("base64url");return`${n}.${FTe(e,n)}`}function BTe(e,t,n={}){let r=[`*${VQ(e)}*`],o=n.rerun??{};for(let a of KQ(e,n))a.title==="Review and approve"?r.push(`${a.title}: <${a.link}|${a.value.replace(", then",">, then")}`):/^(Or a|A)pprove$|^Digest$/.test(a.title)?r.push(`${a.title}: \`${a.value}\``):a.link?r.push(`${a.title}: <${a.link}>`):r.push(`${a.title}: ${a.value}`);let i=r.join(`
53
53
  `),s=t?[UTe(t)]:[];return e.rerunUrl&&s.push({type:"actions",block_id:o.block,elements:[{type:"button",action_id:o.action??"chant-rerun",text:{type:"plain_text",text:o.label??"Run again"},url:e.rerunUrl}]}),s.length?{text:i,blocks:[{type:"section",text:{type:"mrkdwn",text:i}},...s]}:{text:i}}function UTe(e){let t=(n,r,o)=>({type:"button",text:{type:"plain_text",text:n},action_id:r,value:e.token,...o?{style:o}:{}});return{type:"actions",elements:[t("Approve",LTe,"primary"),t("Decline",MTe)]}}function HTe(e,t="approve"){return`${t} ${e.token}`}function zTe(e,t,n={}){let r=n.relayName&&`reply @${n.relayName} `,o=[...n.wave&&e.wave?[{title:n.wave,value:`${e.wave.number}`}]:[],...KQ(e,n).filter(a=>n.teamsReport!==!1||a.title!=="Report"),...t&&!r?[{title:"Approve in chat",value:`mention the relay and reply: ${HTe(t)}`}]:[]],i=(a,c)=>({type:"Action.OpenUrl",title:a,url:c}),s=[...e.approve?.review?[i("Review and approve",e.approve.review.url)]:[],...e.rerunUrl?[i(n.rerun?.label??"Run again",e.rerunUrl)]:[],...e.run?.url?[i("Open the run",e.run.url)]:[]];return{type:"message",attachments:[{contentType:"application/vnd.microsoft.card.adaptive",contentUrl:null,content:{$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.4",body:[{type:"TextBlock",text:VQ(e),weight:"Bolder",wrap:!0},{type:"FactSet",facts:o.map(a=>({title:a.title,value:a.link&&a.title==="Review and approve"?`${a.value}: ${a.link}`:a.value}))},...t&&r?[{type:"TextBlock",wrap:!0,text:`Approve here: ${r}approve ${t.token}. Decline: ${r}decline ${t.token}.`}]:[]],...s.length>0?{actions:s}:{}}}]}}function eg(e,t="notify"){if(typeof e!="object"||e===null||Array.isArray(e))return`${t}: expected { webhook, key, slack, teams, events }`;let n=e;for(let r of Object.keys(n))if(!qQ.includes(r))return`${t}.${r}: unknown setting (expected ${qQ.join(", ")})`;for(let r of["webhook","key","slack","teams","relay"]){let o=n[r];if(o!==void 0&&(typeof o!="string"||!qTe.test(o)))return`${t}.${r}: the name of the environment variable that holds the ${r==="key"?"signing key":r==="relay"?"relay key":"URL"}, never the ${r==="key"||r==="relay"?"key":"URL"} itself`}if(n.webhook!==void 0&&n.key===void 0)return`${t}.key: a webhook needs a signing key; name the variable that holds it`;if(n.key!==void 0&&n.webhook===void 0)return`${t}.webhook: a key is for a webhook; name the variable that holds its URL`;if(n.relayName!==void 0&&(typeof n.relayName!="string"||!/^[^\s@<>][^\r\n@<>]{0,79}$/.test(n.relayName)||n.relayName.trim()!==n.relayName))return`${t}.relayName: the relay's name as Teams mentions it, one line of at most 80 characters without @, < or >`;if(n.webhook===void 0&&n.slack===void 0&&n.teams===void 0)return`${t}: name a webhook (with its key), a slack or a teams URL variable`;if(n.events!==void 0&&!(Array.isArray(n.events)&&n.events.every(r=>zQ.includes(r))))return`${t}.events: a list of ${zQ.join(", ")}`}function JQ(e){return e?[e.webhook,e.key,e.slack,e.teams,e.relay].filter(t=>typeof t=="string"&&t!==""):[]}function VTe(e,t,n={}){let r=JSON.stringify(e),o=n.now??Math.floor(Date.now()/1e3),i=eF(n.prefix??EE);return{body:r,headers:{"content-type":"application/json","user-agent":n.userAgent??e.source,[i.event]:e.event,[i.delivery]:e.id,[i.timestamp]:String(o),[i.signature]:tF(t,o,r)}}}function ZQ(e,t){let n=e;for(let r of t)r&&(n=n.split(r).join("<url>"));return n.replace(/https?:\/\/\S+/g,"<url>")}async function KTe(e,t,n,r,o){let i="not attempted";for(let s=0;s<r;s++){s>0&&await o(500*s);try{let a=await e(t,{method:"POST",...n,signal:AbortSignal.timeout(1e4)});if(a.ok)return;if(i=`HTTP ${String(a.status)}`,a.status<500)return i}catch(a){i=ZQ(a instanceof Error?a.message:String(a),[t])}}return i}async function PE(e,t,n={}){if(!e||!t)return[];if(e.events&&!e.events.includes(t.event))return[];let r=n.env??process.env,o=n.fetch??((m,h)=>globalThis.fetch(m,h)),i=Math.max(1,n.attempts??3),s=n.sleep??(m=>new Promise(h=>setTimeout(h,m))),a=n.log??(m=>process.stderr.write(m+`
54
54
  `)),c=[],l=async(m,h,y)=>{let b;try{let v=r[h];if(!v)b={target:m,ok:!1,detail:`${h} is not set`};else{let k=y();if(typeof k=="string")b={target:m,ok:!1,detail:k};else{let $=await KTe(o,v,k,i,s);b={target:m,ok:$===void 0,detail:$??"delivered"}}}}catch(v){b={target:m,ok:!1,detail:ZQ(v instanceof Error?v.message:String(v),[r[h]??""])}}b.ok||a(`notify: the ${t.event} event was not delivered to ${JTe[m]}: ${b.detail}`),c.push(b)},d=m=>({headers:{"content-type":"application/json"},body:JSON.stringify(m)});e.webhook&&await l("webhook",e.webhook,()=>{let m=e.key?r[e.key]:void 0;return m?VTe(t,m,{now:n.now,prefix:n.prefix||void 0,userAgent:n.userAgent||void 0}):`${e.key??"the key variable"} is not set, and an event is never sent unsigned`});let u=WTe(t),p=e.relay?r[e.relay]:void 0;e.relay&&u&&!p&&a(`notify: ${e.relay} is not set, so the message carries no relay buttons`);let f=u&&p?{token:GTe(p,u)}:void 0,g=e.relayName?{...n.message,relayName:e.relayName}:n.message;return e.slack&&await l("slack",e.slack,()=>d(n.render?.slack?n.render.slack(t,f):BTe(t,f,g))),e.teams&&await l("teams",e.teams,()=>d(n.render?.teams?n.render.teams(t,f):zTe(t,f,g))),c}var DTe,zQ,jTe,LTe,MTe,FTe,ebt,qTe,qQ,JTe,tg=x(()=>{"use strict";nF();nF();DTe="chant.notify/v1",zQ=["waiting","refused","failed","drift","ci.red","ci.culprit","ci.green","ci.quarantine-passed","ci.stale"];jTe={waiting:"waits for an approval",refused:"was refused",failed:"failed",drift:"drifted","ci.red":"is red","ci.culprit":"has a culprit","ci.green":"is green again","ci.quarantine-passed":"passed a quarantined test","ci.stale":"has no green commit"};LTe="chant-approve",MTe="chant-decline",FTe=(e,t)=>ITe("sha256",e).update(`chant-relay.${t}`,"utf8").digest("hex");ebt=1440*60;qTe=/^[A-Za-z_][A-Za-z0-9_]*$/,qQ=["webhook","key","slack","teams","events","relay","relayName"];JTe={webhook:"the webhook",slack:"Slack",teams:"Teams"}});var iX={};me(iX,{CHANT_APPROVE_TEMPLATE:()=>IE,CHANT_NOTIFY_WAVE_TEMPLATE:()=>lF,CHANT_OVERRIDE_TEMPLATE:()=>dF,CHANT_WORDS:()=>Yn,CI_PRODUCT_APPLY_MODES:()=>iF,CI_PRODUCT_COMMANDS:()=>oF,CI_PRODUCT_COMMENT_REPLIES:()=>sF,CI_PRODUCT_STAGES:()=>QQ,COMMIT_COMMENT_ARG:()=>rX,CiProductWordsError:()=>CE,PRODUCT_ACTION_ENV:()=>AE,PRODUCT_ACTION_EVENT_FLAG:()=>iDe,PRODUCT_COMMENT_ASK_MAX:()=>aF,activeProductWords:()=>Et,approveLine:()=>Rw,assertProductWords:()=>eX,commandWord:()=>TE,commentLine:()=>pF,commitWordOf:()=>oX,isChantWords:()=>Ao,notifyWaveLabel:()=>rg,overrideLine:()=>$w,parseProductComment:()=>cF,productActionFromEnv:()=>sDe,productContext:()=>eDe,productStatusContext:()=>ng,productWaveGate:()=>tDe,productWordsProblems:()=>XQ,resolveProductWords:()=>uF,setActiveProductWords:()=>tX,withProductWords:()=>XTe});function uF(e={}){let t=e.product??Yn.product,n=t!==Yn.product;return{product:t,stages:{...Yn.stages,...e.stages??{}},verbs:{plan:e.verbs?.plan??Yn.verbs.plan,apply:e.verbs?.apply??Yn.verbs.apply},noun:e.noun??Yn.noun,commands:e.commands??Yn.commands,aliases:e.aliases??[],approve:e.approve??(n?`${t} approve {op} {gate} --plan {digest} {sign}`:IE),override:e.override??(n?`${t} override {target} --rule {rule} --reason {reason} {sign}`:dF),...e.op!==void 0?{op:e.op}:{},gateName:e.gateName??Yn.gateName,prGate:e.prGate??Yn.prGate,approval:e.approval??Yn.approval,applyMode:e.applyMode??(n&&(e.op!==void 0||e.approval==="per-wave")?"on-merge":Yn.applyMode),...e.bin!==void 0?{bin:e.bin}:{},adoptMarkers:e.adoptMarkers??[],notify:{source:e.notify?.source??t,wave:e.notify?.wave??lF,headers:e.notify?.headers??`x-${t}`,...e.notify?.message?{message:e.notify.message}:{}},...e.replies!==void 0?{replies:e.replies}:{}}}function XQ(e,t={}){let n=[],r=(s,a)=>{ZTe.test(a)||n.push(`${s} is ${JSON.stringify(a)}, and a word is lowercase letters, digits and -`)};r("product",e.product);let o=new Map;for(let s of QQ){let a=e.stages[s];r(`stages.${s}`,a);let c=o.get(a);c&&n.push(`stages.${s} and stages.${c} are both ${JSON.stringify(a)}, so their statuses would be one`),o.set(a,s)}for(let[s,a]of Object.entries(e.verbs))a.forEach((c,l)=>r(`verbs.${s}[${l}]`,c));e.noun.forEach((s,a)=>r(`noun[${a}]`,s));for(let[s,a]of Object.entries(e.commands))r(`commands.${s}`,s),oF.includes(a)?t.jobs&&!t.jobs.includes(a)&&n.push(`commands.${s} needs a ${a} job, and the pipeline has none`):n.push(`commands.${s} maps onto ${JSON.stringify(a)}, which is not one of ${oF.join(", ")}`);for(let s of e.aliases){/^[a-z0-9][a-z0-9 -]*$/.test(s.from)||n.push(`the alias ${JSON.stringify(s.from)} is lowercase words`),Object.values(e.commands).includes(s.command)||n.push(`the alias ${JSON.stringify(s.from)} stands for ${s.command}, which no command names`);for(let[a,c]of Object.entries(s.refuse??{}))/^--?[A-Za-z0-9-]*$/.test(a)||n.push(`the alias ${JSON.stringify(s.from)} refuses ${JSON.stringify(a)}, and a flag is - or -- then letters, digits and -`),(typeof c!="string"||c.trim()===""||/[\r\n]/.test(c))&&n.push(`the alias ${JSON.stringify(s.from)} refuses ${a} with no one-line reply`)}for(let[s,a]of Object.entries(e.replies??{}))if(!sF.includes(s))n.push(`replies.${s} is not one of ${sF.join(", ")}`);else if(typeof a!="string"||a.trim()===""||/[\r\n]/.test(a))n.push(`replies.${s} is one line of text`);else for(let c of a.matchAll(/\{([^}]*)\}/g))(s!=="member"||c[1]!=="member"&&c[1]!=="members")&&n.push(`replies.${s} names {${c[1]}}, which chant does not fill`);for(let[s,a]of[["approve",e.approve],["override",e.override]]){for(let c of a.matchAll(/\{([^}]*)\}/g))YTe.has(c[1])||n.push(`${s} names {${c[1]}}, which chant does not fill`);/[`$;&|<>\\\n]/.test(a.replace(/\{[^}]*\}/g,"").replace(/<[a-z-]+>/g,""))&&n.push(`${s} carries shell syntax`)}e.op!==void 0&&!rF.test(e.op)&&n.push(`op is ${JSON.stringify(e.op)}, and an op is lowercase letters, digits, - and _`),rF.test(e.prGate)||n.push(`prGate is ${JSON.stringify(e.prGate)}, and a gate is lowercase letters, digits, - and _`),e.gateName.includes("{k}")?rF.test(e.gateName.replace("{gate}","g").replace("{k}","1"))||n.push(`gateName ${JSON.stringify(e.gateName)} does not make a gate name`):n.push("gateName needs {k}, so each wave has its own gate"),e.approval!=="per-wave"&&e.approval!=="pull-request"&&n.push(`approval is ${JSON.stringify(e.approval)}; use per-wave or pull-request`),iF.includes(e.applyMode)||n.push(`applyMode is ${JSON.stringify(e.applyMode)}; use ${iF.join(", ")}`),e.bin!==void 0&&!/^[A-Za-z0-9@/._ -]+$/.test(e.bin)&&n.push(`bin ${JSON.stringify(e.bin)} carries shell syntax`);let i=e.notify??Yn.notify;r("notify.source",i.source),/^x-[a-z0-9][a-z0-9-]*$/.test(i.headers)||n.push(`notify.headers is ${JSON.stringify(i.headers)}, and a header prefix is x- then lowercase letters, digits and -`);for(let s of i.wave.matchAll(/\{([^}]*)\}/g))QTe.has(s[1])||n.push(`notify.wave names {${s[1]}}, which chant does not fill`);return i.wave.includes("{k}")||n.push("notify.wave needs {k}, so a message names its wave"),/[\r\n]/.test(i.wave)&&n.push("notify.wave is one line"),n}function eX(e,t={}){let n=uF(e),r=XQ(n,t);if(r.length>0)throw new CE(r);return n}function Et(){return _E}function tX(e){let t=_E;return _E=e?eX(e):Yn,t}async function XTe(e,t){if(!e)return t();let n=tX(e);try{return await t()}finally{_E=n}}function Ao(e){return e.product===Yn.product}function ng(e,t,n){let r=`${e.product}/${e.stages[t]}`;return n?`${r}/${n}`:r}function rg(e,t){let n=(e.notify??Yn.notify).wave;return(t.name?n:n.replace(/ ?\(\{name\}\)/g,"").replace(/ ?\{name\}/g,"")).replace(/\{(k|name|spec|product)\}/g,(o,i)=>i==="k"?String(t.k):i==="name"?t.name??"":i==="spec"?t.spec:e.product)}function eDe(e,t){return`${e.product}/${t}`}function Rw(e,t){let n=nX(e.approve,{op:t.op,gate:t.gate,digest:t.digest,approver:t.approver??"<you>",sign:t.sign===!1?"":"--sign",target:t.target??""});return t.environment!==void 0&&Ao(e)&&e.approve===IE?n.replace(` ${t.gate} `,` ${t.gate} --env ${t.environment} `):n}function $w(e,t){return nX(e.override,{op:t.op,gate:t.gate??"",rule:[...new Set(t.rules)].sort().join(" --rule "),reason:t.reason??"<text>",target:t.target??"",digest:t.digest??"",approver:"<you>",sign:t.sign?"--sign":""})}function TE(e,t){return Object.entries(e.commands).find(([,n])=>n===t)?.[0]}function pF(e,t){let n=TE(e,t);return n===void 0?void 0:`/${e.product} ${n}`}function tDe(e,t,n){return e.gateName.replace("{gate}",t).replace("{k}",String(n))}function oX(e,t){if(typeof t!="string")return;let n=t.trim().split(/[ \t\r\n]+/);if(!(n[0]!==`/${e.product}`||n[1]===void 0))return e.commands[n[1]]==="commit"?n[1]:void 0}function cF(e,t,n={},r={},o={}){if(typeof t!="string"||o.leaveCommit&&oX(e,t)!==void 0)return;let i=t.trim(),s=`/${e.product}`;for(let p of e.aliases){if(p.when!==void 0&&n[p.when]!=="1"||i!==p.from&&!i.startsWith(`${p.from} `)&&!i.startsWith(`${p.from} `))continue;if(/[\r\n]/.test(i))return{kind:"refused",reason:"a command is one line, and nothing else in the comment"};let f=TE(e,p.command);if(f===void 0)return;let g=i.slice(p.from.length).trim().split(/[ \t]+/).filter(h=>h!==""),m=[];for(let h=0;h<g.length;h++){let y=g[h],b=p.refuse&&Object.prototype.hasOwnProperty.call(p.refuse,y)?p.refuse[y]:void 0;if(b!==void 0)return{kind:"refused",reason:b};if(y==="-d"||y==="--dir"){let v=g[++h];if(v===void 0)return{kind:"refused",reason:`\`${y}\` names the ${e.noun[0]}'s directory`};m.push(v.replace(/^\.\/+/,"").replace(/\/+$/,""))}else{if(y==="--verbose")continue;if(y.startsWith("-"))return{kind:"refused",reason:`\`${p.from}\` takes no flag ${y} here`};m.push(y)}}i=[s,f,...m].join(" ");break}if(i!==s&&!i.startsWith(`${s} `)&&!i.startsWith(`${s} `))return;if(/[\r\n]/.test(i))return{kind:"refused",reason:"a command is one line, and nothing else in the comment"};let a=i.split(/[ \t]+/),c=a[1],l=Object.keys(e.commands).map(p=>`\`${s} ${p}\``).join(", ");if(c===void 0)return{kind:"refused",reason:`the commands are ${l}`};let d=e.commands[c];if(d===void 0)return{kind:"refused",reason:oDe.has(c)?`a comment never runs \`${c}\`: ${e.product} re-plans, and runs what an approval covers, on request and nothing more`:`the commands are ${l}`};let u=`\`${s} ${c}\``;switch(d){case"lock":case"unlock":return a.length===2?{kind:d}:{kind:"refused",reason:`${u} takes nothing after it`};case"commit":{if(o.leaveCommit)return;if(a.length===2)return{kind:"commit",word:c};let p=Object.prototype.hasOwnProperty.call(r,c)?r[c]:void 0;if(p===void 0)return{kind:"refused",reason:`${u} takes nothing after it`};let f=a[2];return a.length!==3||!rX.test(f)||!p.test(f)?{kind:"refused",reason:`${u} takes nothing, or one name after it matching \`${p.source}\``}:{kind:"commit",word:c,arg:f}}case"agent":{let p=i.slice(`${s} ${c}`.length).trim();return p===""?{kind:"refused",reason:`${u} needs an ask after it, on the same line`}:p.length>aF?{kind:"refused",reason:`an ask is at most ${aF} characters`}:/[\u0000-\u0008\u000b-\u001f\u007f]/.test(p)?{kind:"refused",reason:"an ask is plain text, with no control characters"}:{kind:"agent",ask:p}}case"action":{let p=`${u} takes a ${e.noun[0]} and an action: \`${s} ${c} <${e.noun[0]}> <action>\``;if(a.length!==4)return{kind:"refused",reason:p};let f=a[2],g=a[3];return!YQ.test(f)||f.split("/").some(m=>m===""||m==="."||m==="..")?{kind:"refused",reason:`the ${e.noun[0]} is a name or a path from the repository root`}:rDe.test(g)?{kind:"action",member:f,address:g}:{kind:"refused",reason:"an action is an action address or name, with no spaces or shell characters"}}case"apply":{if(a.length===2)return{kind:"apply"};let p=a.length===3?/^wave-([1-9][0-9]{0,3})$/.exec(a[2]):null;return p?{kind:"apply",wave:Number(p[1])}:{kind:"refused",reason:`${u} takes nothing, or a wave like \`wave-2\``}}case"plan":{let p=[],f=[],g={};for(let y=2;y<a.length;y++){let b=a[y];if(b==="--target"){let v=a[++y];if(v===void 0)return{kind:"refused",reason:`\`--target\` needs an address after it: \`${s} ${c} --target <address>\``};if(!nDe.test(v))return{kind:"refused",reason:"a target is a resource address or URN, or <member>:<address>, with no spaces or shell characters"};p.push(v)}else if(b==="--refresh")g.refresh=!0;else if(b==="--target-dependents")g.targetDependents=!0;else{if(b.startsWith("-"))return{kind:"refused",reason:`${u} takes \`--target <address>\`, \`--target-dependents\` and \`--refresh\`, and no other flag`};f.push(b)}}if(f.length>1)return{kind:"refused",reason:`${u} takes one ${e.noun[0]} at most`};let m=f[0];if(g.targetDependents&&p.length===0)return{kind:"refused",reason:"`--target-dependents` widens a `--target`; give one"};let h={...p.length>0?{targets:p}:{},...g};return m===void 0?{kind:"plan",...h}:!YQ.test(m)||m.split("/").some(y=>y===""||y==="."||y==="..")?{kind:"refused",reason:`the ${e.noun[0]} is a name or a path from the repository root`}:{kind:"plan",member:m,...h}}}}function sDe(e,t){let n=TE(e,"action");if(n===void 0)return{kind:"refused",reason:`${e.product} names no action command, so no job answers one`};let r=t[AE.comment]?.trim();if(r){let a=cF(e,r,t);return a?.kind==="action"?{...a,from:"comment"}:a?.kind==="refused"?a:{kind:"refused",reason:`the comment is not \`/${e.product} ${n} <${e.noun[0]}> <action>\``}}let o=t[AE.member]?.trim()??"",i=t[AE.action]?.trim()??"";if(o===""||i==="")return{kind:"refused",reason:`a dispatched action names a ${e.noun[0]} and an action`};if(/\s/.test(o)||/\s/.test(i))return{kind:"refused",reason:`a ${e.noun[0]} and an action are one word each`};let s=cF(e,`/${e.product} ${n} ${o} ${i}`,{});return s?.kind==="action"?{...s,from:"dispatch"}:s?.kind==="refused"?s:{kind:"refused",reason:`a dispatched action names a ${e.noun[0]} and an action`}}var QQ,oF,iF,sF,lF,IE,dF,Yn,ZTe,rF,YTe,QTe,CE,_E,nX,YQ,nDe,rDe,rX,aF,oDe,AE,iDe,Co=x(()=>{"use strict";QQ=["plan","apply","record","check","drift","lock","approval","control"],oF=["plan","apply","lock","unlock","agent","action","commit"],iF=["on-merge","release","before-merge"],sF=["plan","apply","lock","unlock","action","agent","fork","member"],lF="wave {k} ({name}) of {spec}",IE="chant approve {op} {gate} --plan {digest} --approver {approver} {sign}",dF='chant approve {op} {target} --rule {rule} --reason "<why>" {sign}',Yn=Object.freeze({product:"chant",stages:{plan:"plan",apply:"apply",record:"record",check:"check",drift:"drift",lock:"lock",approval:"approval",control:"control"},verbs:{plan:["plan","planned"],apply:["apply","applied"]},noun:["member","members"],commands:{apply:"apply"},aliases:[],approve:IE,override:dF,gateName:"{gate}-wave-{k}",prGate:"pr-apply",approval:"pull-request",applyMode:"release",adoptMarkers:[],notify:{source:"chant",wave:lF,headers:"x-chant"}});ZTe=/^[a-z0-9][a-z0-9-]*$/,rF=/^[a-z0-9][a-z0-9_-]*$/,YTe=new Set(["op","gate","digest","approver","sign","target","rule","reason"]),QTe=new Set(["k","name","spec","product"]),CE=class extends Error{constructor(n){super(`the product's words are refused: ${n.join("; ")}`);this.problems=n;this.name="CiProductWordsError"}};_E=Yn;nX=(e,t)=>e.replace(/\{([a-z]+)\}/g,(n,r)=>t[r]??"").split(/[ \t]+/).filter(n=>n!=="").join(" ");YQ=/^[A-Za-z0-9_][A-Za-z0-9_.\/-]{0,199}$/,nDe=/^[A-Za-z0-9_][A-Za-z0-9_.:\/\[\]"*@=+$,-]{0,499}$/,rDe=/^[A-Za-z_][A-Za-z0-9_.\[\]"-]{0,299}$/,rX=/^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$/,aF=2e3,oDe=new Set(["approve","override","force-unlock","unlock-state","import","state","destroy","merge"]);AE={comment:"CHANT_ACTION_COMMENT",member:"CHANT_ACTION_MEMBER",action:"CHANT_ACTION"},iDe="--from-event"});var sX=x(()=>{"use strict"});function aX(e){return e.notify??Yn.notify}function cX(e){return aX(e).source}function lX(e,t={}){let n=aX(e),r=n.message?{...t,message:{...n.message,...t.message}}:t;return t.prefix!==void 0||Ao(e)?r:{...r,prefix:n.headers}}var dX=x(()=>{"use strict";Co();sX()});var ge,Qr=x(()=>{"use strict";ge={done:0,failed:1,drift:2,waiting:3,moved:4,held:5,superseded:6,denied:7,declined:8,misplaced:9}});function og(e){return typeof e=="object"&&e!==null&&kl in e&&e[kl]===!0}var kl,Ya=x(()=>{"use strict";kl=Symbol.for("chant.intrinsic")});var uX,Rl,ig=x(()=>{"use strict";Ya();Rl=class{constructor(t,n){this[uX]=!0;this.parent=new WeakRef(t),this.attribute=n}_setLogicalName(t){this.logicalName=t}getLogicalName(){return this.logicalName}toString(){let t=this.logicalName?`${this.logicalName}.${this.attribute}`:`.${this.attribute}`;throw new Error(`A resource attribute reference (${t}) has no string form: it stands for a value the build resolves later, and interpolating it into a plain template literal would produce "[object Object]". Use the lexicon's own intrinsic, whose interior handles references \u2014 \`Sub\`\${\u2026}\`\` for CloudFormation \u2014 or move the reference out of the template.`)}[(uX=kl,Symbol.toPrimitive)](){return this.toString()}toJSON(){if(!this.logicalName)throw new Error(`Cannot serialize AttrRef for attribute "${this.attribute}": logical name not set`);return{__attrRef:{entity:this.logicalName,attribute:this.attribute}}}}});function Ht(e,t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.fromEntries(Object.entries(t).sort(([n],[r])=>n.localeCompare(r))):t}var fF=x(()=>{"use strict"});function ms(e){return e instanceof Rl?!0:typeof e=="object"&&e!==null&&"parent"in e&&"attribute"in e&&"_setLogicalName"in e&&typeof e.parent=="object"&&typeof e.attribute=="string"}var nn=x(()=>{"use strict";ig();fF()});import{createHash as pX}from"node:crypto";function Wn(e){return`sha256:${pX("sha256").update(e,"utf8").digest("hex")}`}function ni(e){return pX("sha256").update(e).digest("hex")}var Xr=x(()=>{"use strict"});function xw(e){return"props"in e}function Qn(e){return typeof e!="object"||e===null?!1:e[$l]===!0?!0:cDe(e)}function cDe(e){for(let t of Object.getOwnPropertySymbols(e)){let n=Object.getOwnPropertyDescriptor(e,t);if(!(n===void 0||n.enumerable||n.value!==!0)&&t.description?.endsWith(aDe)===!0)return!0}return!1}var $l,aDe,sr=x(()=>{"use strict";$l=Symbol.for("chant.declarable");aDe=".declarable"});function cn(e){let t=gF(e,"$",new Set);if(t===void 0)throw new Error("canonicalJson: value at $ is not representable in JSON");return t}function gF(e,t,n){if(e!==null&&(typeof e=="object"||typeof e=="function")){let o=e.toJSON;typeof o=="function"&&(e=o.call(e))}if(e===void 0)return;if(e===null)return"null";switch(typeof e){case"boolean":return e?"true":"false";case"number":if(!Number.isFinite(e))throw new Error(`canonicalJson: non-finite number at ${t}`);return String(e);case"string":return JSON.stringify(e);case"bigint":throw new Error(`canonicalJson: bigint at ${t} is not representable in JSON`);case"function":case"symbol":throw new Error(`canonicalJson: ${typeof e} at ${t} is not representable in JSON`)}let r=e;if(n.has(r))throw new Error(`canonicalJson: circular structure at ${t}`);n.add(r);try{if(Array.isArray(r))return`[${r.map((a,c)=>gF(a,`${t}[${c}]`,n)??"null").join(",")}]`;let o=Object.keys(r).sort(),i=[];for(let s of o){let a=gF(r[s],`${t}.${s}`,n);a!==void 0&&i.push(`${JSON.stringify(s)}:${a}`)}return`{${i.join(",")}}`}finally{n.delete(r)}}var Gn=x(()=>{"use strict";Xr();sr();Ya()});var mX={};me(mX,{LEGACY_PLAN_DIGEST_PREFIX:()=>gX,PLAN_DIGEST_ALGORITHM:()=>fX,PLAN_DIGEST_PREFIX:()=>sg,computePlanDigest:()=>Ot,describePlanDigest:()=>NE,isPlanDigest:()=>DE,samePlanDigest:()=>Ke});function Ot(e,t){return sg+Wn(cn({kind:e,subject:t})).slice(gX.length)}function DE(e){return typeof e=="string"&&mF.test(e)}function Ke(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;let n=mF.exec(e),r=mF.exec(t);return n!==null&&r!==null&&n[1]===r[1]}function NE(e){return e??"(none \u2014 recorded before plan-bound gates)"}var fX,sg,gX,mF,Nt=x(()=>{"use strict";Gn();Xr();fX="sha256",sg="jcs1-sha256:",gX="sha256:",mF=/^(?:jcs1-)?sha256:([0-9a-f]{64})$/});function jE(e){return`${e.member}\0${e.address}\0${e.deposed??""}\0${e.action}`}function Ow(e){let t=e.filter(n=>n.provisional!==!0).map(n=>({member:n.member,planDigest:n.planDigest})).sort((n,r)=>Qa(n.member,r.member));for(let n=1;n<t.length;n++)if(t[n-1].member===t[n].member)throw new Error(`the change set names member ${t[n].member} twice`);return Ot("change-set",t)}function wX(e){let t=new Set(e.members.filter(s=>s.provisional===!0).map(s=>s.member)),n=e.members.filter(s=>!t.has(s.member)).map(s=>({member:s.member,status:s.status,holes:s.holes,...s.group?{group:{digest:s.group.digest,reads:[...s.group.reads].sort()}}:{}})).sort((s,a)=>Qa(s.member,a.member)),r=e.entries.filter(s=>!t.has(s.member)).map(({node:s,instanceOf:a,source:c,...l})=>l).sort((s,a)=>Qa(jE(s),jE(a))),o=(e.sideEffects??[]).filter(s=>!t.has(s.member)).sort(yX),i=e.releaseDigest!==void 0||e.environment!==void 0?{planned:{releaseDigest:e.releaseDigest??null,environment:e.environment??null}}:{};return Ot("change-set-document",{set:Ow(e.members),members:n,entries:r,sideEffects:o,...i})}function dDe(e,t){let n=Object.fromEntries(lDe.map(c=>[c,0])),r={},o={},i=[],s=[],a=(c,l,d)=>{let u=c[l]??={};u[d]=(u[d]??0)+1};for(let c of t){n[c.action]++,a(r,c.type,c.action),a(o,c.member,c.action);let l={member:c.member,address:c.address,type:c.type,...c.deposed!==void 0?{deposed:c.deposed}:{},...c.disruption!==void 0?{disruption:c.disruption}:{}};c.action==="delete"&&i.push(l),c.action==="replace"&&s.push(l)}return{members:e.length,entries:t.length,actions:n,types:hX(r),byMember:hX(o),deletes:i,replacements:s,failed:e.filter(c=>c.status==="failed").map(c=>c.member),holes:e.reduce((c,l)=>c+l.holes.length,0)}}function hX(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>Qa(t,n)))}function Pw(e,t={}){let n=e.map(a=>a.member).sort((a,c)=>Qa(a.member,c.member)),r=[];for(let a of e)for(let c of a.entries){if(c.member!==a.member.member)throw new Error(`an entry at ${c.address} names member ${c.member}, inside member ${a.member.member}`);r.push(c)}r.sort((a,c)=>Qa(jE(a),jE(c)));let o=e.flatMap(a=>(a.sideEffects??[]).map(c=>({member:a.member.member,...c}))).sort(yX),i=t.planned?{releaseDigest:t.planned.releaseDigest,environment:t.planned.environment}:{},s=wX({members:n,entries:r,sideEffects:o,...i});return{$schema:Sw,contract:Ew,...t.chant!==void 0?{chant:t.chant}:{},digest:s,...i,members:n,entries:r,...o.length>0?{sideEffects:o}:{},summary:dDe(n,r)}}function Aw(e){try{return wX(e)===e.digest}catch{return!1}}var Sw,Ew,lDe,Qa,yX,ag=x(()=>{"use strict";Nt();Sw="https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",Ew=1,lDe=["create","update","replace","delete","read","no-op","forget"],Qa=(e,t)=>e<t?-1:e>t?1:0;yX=(e,t)=>Qa(e.member,t.member)||Qa(e.address,t.address)||Qa(e.trigger??"",t.trigger??"")});var bX,hF=x(()=>{"use strict";bX=["changeSets","releases","runEvents"]});import{dirname as Cbt,isAbsolute as uDe,join as _bt}from"node:path";import{fileURLToPath as pDe}from"node:url";function vX(e,t="--report-url"){let n=e.trim();if(n.startsWith("file://")){let s;try{s=pDe(n)}catch(a){return{error:`${t} ${n}: ${a instanceof Error?a.message:String(a)}`}}return uDe(s)?{scheme:"file",url:n.replace(/\/+$/,""),dir:s}:{error:`${t} ${n}: a file URL names an absolute directory`}}let r=/^s3:\/\/([^/]+)\/?(.*)$/.exec(n);if(r){let s=r[2].replace(/\/+$/,"");return{scheme:"s3",url:`s3://${r[1]}${s?`/${s}`:""}`,bucket:r[1],prefix:s}}let o=/^gs:\/\/([a-z0-9][a-z0-9._-]{1,221}[a-z0-9])(?:\/(.*))?$/.exec(n);if(o){let s=(o[2]??"").replace(/\/+$/,"");return{scheme:"gs",url:`gs://${o[1]}${s?`/${s}`:""}`,bucket:o[1],prefix:s}}let i=/^az:\/\/([a-z0-9]{3,24})\/([a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,62})(?:\/(.*))?$/.exec(n);if(i){let s=(i[3]??"").replace(/\/+$/,"");return{scheme:"az",url:`az://${i[1]}/${i[2]}${s?`/${s}`:""}`,account:i[1],container:i[2],prefix:s}}return{error:`${t} ${n}: takes an s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory> URL`}}var kX=x(()=>{"use strict"});var yF,RX=x(()=>{yF={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://intentius.io/chant/schemas/workspace/declaration/v1/chant.workspace.schema.json",title:"chant.workspace.json",description:"A workspace declaration, schema 1 (#2524 D1, D2; ws-051). Only this file makes a directory a workspace. It may also be named chant.workspace.jsonc, which allows comments and trailing commas; having both is an error. Unknown fields are refused, except fields whose names start with x-. A field added later within schema 1 is optional, and a declaration that uses one sets minReader to the first chant that knows it, so an older chant says so instead of misreading the file. Uniqueness of names and the placement rules are checked in code, since JSON Schema cannot say them.",type:"object",required:["name","schema","members"],properties:{$schema:{type:"string",description:"An editor hint. chant ignores it."},$comment:{type:"string",description:"A note for people. chant ignores it."},name:{$ref:"#/$defs/name",description:"The workspace's name. With a git revision it identifies the workspace to readers (#2524 D15)."},schema:{const:1,description:"The declaration format version."},minReader:{$ref:"#/$defs/version",description:"The oldest chant that may read this declaration. An older chant refuses it with reader-too-old."},scope:{enum:["repo","org"],description:"What the workspace spans (#3168). repo, the default, is one repository's workspace. org is an org-level workspace: it holds only members of kind repo, each a reference to another repository's workspace, and chant workspace check fails any other member (WSP013). A warden generates an org workspace from its policy, or checks one against the forge's repository list with chant workspace check --forge-repos. Added in schema 1 by chant 0.124.47, so a declaration that uses it sets minReader to 0.124.47 or newer."},members:{type:"array",description:"Members and example groups, in the order readers list them.",items:{$ref:"#/$defs/entry"}},pins:{type:"array",description:"The toolchain and plugins that read this workspace, pinned (#2524 D3, threat model). Member kinds come only from pinned packages, read as data from their ./workspace-kinds subpath (#2535).",items:{$ref:"#/$defs/pin"}},quorum:{type:"integer",minimum:0,description:"How many agree verdicts besides the decider's a record needs, for every record kind with a reviews list (#2671). chant workspace records reports each record's quorum against it. Two when absent. Added in schema 1 by chant 0.86.0, so a declaration that sets it sets minReader to 0.86.0 or newer. A per-kind quorum comes later (#2650 C14)."},records:{type:"array",description:"The workspace's own record kinds, each a kind file relative to the workspace root (#2680): the kinds whose records belong to no one member, such as a decisions directory at the root. A member names its own in its records. chant workspace ls lists them, and chant workspace records and graph --intent read every declared kind when --kind is not given. Added in schema 1 by chant 0.86.0, so a declaration that uses it sets minReader to 0.86.0 or newer.",items:{$ref:"#/$defs/recordKind"}},hosts:{type:"array",description:"The hosts boxes run on (#2727). A host is one machine reached under one hostname: boxes on it share its ports, its state root and, in a browser, its cookie jar, so chant workspace check compares the boxes on one host and never boxes on different hosts. A member's box block names its host. Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",items:{$ref:"#/$defs/host"}},diagrams:{type:"array",description:"The workspace's own diagram artifacts (#2764): the diagrams that belong to no one member, such as a diagrams directory at the root. A member names its own in its diagrams. chant workspace ls lists every declared diagram, and chant workspace check reports one whose render is stale for its source when the entry records a sourceHash. Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",items:{$ref:"#/$defs/diagram"}},checks:{type:"object",description:"Severity for the declaration checks that allow it, keyed by WSP id (#2535, ws-028): error, warning, info or off. chant workspace check refuses an id it does not know, and one whose severity is fixed.",propertyNames:{pattern:"^WSP[0-9]{3}$"},additionalProperties:{$ref:"#/$defs/severity"}},changes:{type:"object",additionalProperties:!1,description:"The forward coverage check, chant workspace check --changes <base>..<head> (#2773): each path a diff changes is mapped to the current records whose constrains cover it. severity says what a finding does: off reports none, warn (the default) reports them and passes, fail reports them and fails. ignore lists globs over files whose changes need no record, such as lockfiles and generated output. Added in schema 1 by chant 0.92.0, so a declaration that uses it sets minReader to 0.92.0 or newer.",properties:{severity:{enum:["off","warn","fail"],description:"What a change-uncovered or change-out-of-scope finding does. warn when absent."},ignore:{type:"array",description:"Globs over file paths from the workspace root: * and ? within one segment, ** across segments. A changed path one matches is listed as ignored and never reported.",items:{$ref:"#/$defs/fileGlob"}}}},writeScope:{type:"object",propertyNames:{$ref:"#/$defs/className"},additionalProperties:{$ref:"#/$defs/classScope",description:"A domain class a pinned package supplies at its ./workspace-principals subpath (#3080, ws-079): principals holding the role the class names in the trust policy at base, and none of the agent, runner and service roles. A key no pinned package supplies fails chant workspace check with WSP003, and a writer judged human is refused with write-scope-class-unknown, since it may be in that class. Added in schema 1 by chant 0.102.0, so a declaration that uses one sets minReader to 0.102.0 or newer."},description:"Who may write what (#2524 D5, #2548, ws-067): for each principal class, the members whose files it may write and the record kinds it may write, with which verbs. A class is human, agent, runner or service, or a domain class a pinned package supplies (#3080). A class with no entry is not restricted. An agent is always bound to its session's member (agents); its entry can only narrow the record kinds and verbs. chant workspace records new, amend, review and close and the MCP record tools refuse a write outside the writer's scope with write-scope-member or write-scope-kind, and chant workspace check --changes reports each commit that writes outside its author's scope, read from the declaration and the trust policy at the range's base, and a write to a path the class's protected list covers with write-scope-protected (#3146). Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer.",properties:{human:{$ref:"#/$defs/classScope",description:"Principals holding none of the agent, runner and service roles, and none of the roles a domain class names, in the trust policy at base."},agent:{$ref:"#/$defs/agentScope",description:"An agent session (agents), or a principal holding the agent role in the trust policy at base."},runner:{$ref:"#/$defs/classScope",description:"Principals holding the runner role in the trust policy at base, such as a CI job's signing identity."},service:{$ref:"#/$defs/classScope",description:"Principals holding the service role in the trust policy at base."}}},agents:{type:"array",description:"The agent sessions the workspace declares (#2524 D20, #2548, ws-067, ws-101). Each is bound to the members it names, one with member or several with members: it writes the files of any of them and the records of kinds any of them or the workspace declares, as writeScope.agent allows. A session resumes from chant workspace agent <name> --json, which prints its member, its scope and the spec, read from the repository alone. A write names its session with the CHANT_AGENT environment variable, or a commit with a Chant-Agent trailer. Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer.",items:{$ref:"#/$defs/agent"}},identity:{type:"object",additionalProperties:!1,description:"Who a person-attributed record or gate approval may name, and which gates need a signed approval (#3163, ws-080). Read from the declaration at base, like writeScope, so a change can't loosen its own rule. A person is named by a forge identity (github:<login>, gitlab:<login>, or <forge>@<host>:<login> for forgejo, gitea or a self-hosted github or gitlab) that the surface which signed them in maps their session to, or by a principal .chant/allowed_signers lists at base. chant never authenticates a person: a forge identity is recorded as the surface gives it, and only a seal verified against the signers at base attests it. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",properties:{attribution:{enum:["any","identified"],description:"any (the default): a record's by, decided_by, reviewer or answerer and a gate approval's actor may be any name, such as a roster name. identified: each must be a forge identity, a principal the signers file at base lists, or a principal holding the agent, runner or service role at base or listed by a declared agent session; chant workspace records new and review, points answer and chant approve refuse any other name with principal-unidentified."},gates:{type:"object",description:"Gates, by name, that pass only on a signed approval: chant approve --sign with a key the signers file at base lists for the approver. The rule applies to a gate of that name in every member, Op and component. An unsigned approval, or one whose signer is not in class, is recorded nowhere and never counts toward the gate.",propertyNames:{type:"string",minLength:1},additionalProperties:{type:"object",additionalProperties:!1,properties:{class:{$ref:"#/$defs/className",description:"The principal class the signer must be in, read from the role grants at base (#3080, ws-079): human, runner, service, or a domain class a pinned package supplies. A class no pinned package supplies lets no approval through (fail closed). Absent: any signer the signers file lists."},quorum:{description:"The approval rules an Op gate of this name takes (#4324), in place of the Op's own approval.quorum: one rule or a list, each with count, and optionally targets globs over the run's environment and roles from .chant/trust.json at base. Read at base, so a change can't lower the quorum its own run needs. notAuthor is refused: an Op gate has no pull request to read the author from. Added in schema 1 by chant 0.124.47, so a declaration that uses it sets minReader to 0.124.47 or newer.",oneOf:[{$ref:"#/$defs/gateQuorumRule"},{type:"array",minItems:1,items:{$ref:"#/$defs/gateQuorumRule"}}]},policy:{$ref:"#/$defs/gatePolicyRef",description:"The policy set an Op gate of this name takes (#4404), in place of the Op's own approval.policy. Read at base, so a change can't swap in a permissive policy for its own run. Build the object with the owning lexicon's helper (the cedar lexicon's gatePolicy()) and paste it here. Added in schema 1 by chant 0.124.49, so a declaration that uses it sets minReader to 0.124.49 or newer."},mode:{enum:["log-only","enforce"],description:"Whether the policy's decision binds the gate (#4404), in place of the Op's own approval.mode: log-only records it next to the approval, enforce passes the gate only on a permit. Read at base, so a change can't switch its own gate to a mode that passes it. Added in schema 1 by chant 0.124.49, so a declaration that uses it sets minReader to 0.124.49 or newer."},context:{type:"object",description:"Plan attributes handed to the policy (#4404), over the Op's own approval.context, key by key: a change can't edit a key declared here, and a key only the Op declares still reaches the policy. A value is a plain one, since a step output reference is resolved at run time and a declaration can't hold one. plan is reserved. Added in schema 1 by chant 0.124.49, so a declaration that uses it sets minReader to 0.124.49 or newer.",additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array",items:{type:"string"}}]}}}}}}},ci:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"What the workspace's CI decides about its commits (#3573, ws-103). Added in schema 1 by chant 0.108.0, so a declaration that uses it sets minReader to 0.108.0 or newer.",properties:{green:{$ref:"#/$defs/ciGreen"},workflow:{$ref:"#/$defs/ciWorkflow"},hooks:{$ref:"#/$defs/ciHooks"},lockGrain:{$ref:"#/$defs/ciLockGrain"},locks:{enum:["apply","plan"],description:"When a pull request takes its target locks, _locks/<gate>.json on chant/lifecycle (#4293). apply: the pull request's apply takes them, and chant lock takes them by hand. plan: its plan takes them too, through chant lock --stage plan in a job that runs the target branch's code. Under either, chant components pr-apply refuses a target that another open pull request holds, and a lock whose pull request merged or closed reads as released. Absent: nothing is locked. Read from the declaration at base. Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer."},policy:{$ref:"#/$defs/ciPolicy"},reportUrl:{type:"string",minLength:1,description:"Where the pull-request jobs copy their reports and events, and where chant ci run keeps the run index, <reportUrl>/runs/index.json (#4160): an s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory> URL, as --report-url takes. gs:// and az:// URLs (#4554) need minReader 0.124.55 or newer. chant build --pr-loop, chant ci run, chant ci serve and chant ci runs use it when --report-url is not given, and the flag wins. Readers find it in chant workspace ls --json as ci.reportUrl. Added in schema 1 by chant 0.124.32, so a declaration that uses it sets minReader to 0.124.32 or newer."},branches:{type:"object",description:"Branch routing (#4292): a branch name to member-name globs. A member a glob matches applies from that branch alone: chant build --pr-loop targets its pipeline at the branch, and its record and apply jobs plan nothing on a push to any other branch. A member no glob matches applies from every branch the map does not name. One member may not be matched by two branches. Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer.",patternProperties:{"^x-":!0,"^(?!x-)[^\\s]+$":{$ref:"#/$defs/ciMemberGlobs"}},additionalProperties:!1},labels:{type:"object",description:"Label filters (#4292): a pull request label to member-name globs. When a pull request carries one of these labels, its plan jobs plan only the members those labels match. A label never gates: the record and apply jobs never read labels, and an apply still needs an approval of the digest it plans. Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer.",patternProperties:{"^x-":!0,"^(?!x-).+$":{$ref:"#/$defs/ciMemberGlobs"}},additionalProperties:!1},identity:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"Cloud identities for the pull-request jobs (#4296). Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer.",properties:{cloud:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"Each cloud's plan and apply identities, as rules over environment and member globs. chant build --pr-loop takes the first rule that matches the pipeline's environment and member. The plan job trades its OIDC token for the plan identity before the change is checked out, the record job takes the plan identity, and the apply jobs the apply identity. A rule may not plan as an identity any rule applies as.",properties:{aws:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},required:["rules"],description:"AWS roles, assumed through STS AssumeRoleWithWebIdentity.",properties:{region:{type:"string",minLength:1,description:"The STS region. Default us-east-1."},audience:{type:"string",minLength:1,description:"The OIDC token's audience. Default sts.amazonaws.com."},endpoint:{type:"string",pattern:"^https?://",description:"The STS endpoint, for an emulator. Default the region's, or AWS_ENDPOINT_URL_STS in the job."},rules:{$ref:"#/$defs/ciCloudIdentityRules"}}},gcp:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},required:["provider","rules"],description:"GCP service accounts, reached through a workload identity provider and impersonated with IAM generateAccessToken.",properties:{provider:{type:"string",pattern:"^(//iam\\.googleapis\\.com/)?projects/[^/]+/locations/global/workloadIdentityPools/[^/]+/providers/[^/]+$",description:"The workload identity provider: projects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<provider>."},audience:{type:"string",minLength:1,description:"The OIDC token's audience. Default https://iam.googleapis.com/<provider>."},stsEndpoint:{type:"string",pattern:"^https?://",description:"Google's STS, for an emulator. Default https://sts.googleapis.com."},iamEndpoint:{type:"string",pattern:"^https?://",description:"IAM credentials, for an emulator. Default https://iamcredentials.googleapis.com."},rules:{$ref:"#/$defs/ciCloudIdentityRules"}}},azure:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},required:["tenantId","rules"],description:"Entra application clients, each with a federated credential for the forge's tokens. The rules' identities are client ids.",properties:{tenantId:{type:"string",minLength:1,description:"The Entra tenant."},subscriptionId:{type:"string",minLength:1,description:"Set as AZURE_SUBSCRIPTION_ID and ARM_SUBSCRIPTION_ID when given."},audience:{type:"string",minLength:1,description:"The OIDC token's audience. Default api://AzureADTokenExchange."},authority:{type:"string",pattern:"^https?://",description:"The Entra authority host, for an emulator. Default https://login.microsoftonline.com."},database:{type:"boolean",description:"Also trade each identity for an Azure Database for PostgreSQL token, set as AZURE_DATABASE_ACCESS_TOKEN, which the sql lexicon's entra token source signs in with (#4572). Default false. Added in schema 1 by chant 0.124.55, so a declaration that sets database sets minReader to 0.124.55 or newer."},rules:{$ref:"#/$defs/ciCloudIdentityRules"}}},pulumi:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},required:["organization","rules"],description:"Pulumi Cloud access tokens (#4549), traded through Pulumi Cloud's OAuth token exchange and set as PULUMI_ACCESS_TOKEN: the plan and record jobs preview with the plan token, the apply jobs run up with the apply token. The rules' identities are team:<name>, user:<login>, organization or organization:admin. Added in schema 1 by chant 0.124.55, so a declaration that uses it sets minReader to 0.124.55 or newer.",properties:{organization:{type:"string",minLength:1,description:"The Pulumi organization."},audience:{type:"string",minLength:1,description:"The OIDC token's audience. Default urn:pulumi:org:<organization>."},apiUrl:{type:"string",pattern:"^https?://",description:"The Pulumi Cloud API, for a self-hosted one or a fake. Default https://api.pulumi.com. When set, the trade sets PULUMI_BACKEND_URL to it too."},rules:{$ref:"#/$defs/ciCloudIdentityRules"}}}}}}},prEnvironment:{type:"object",description:"An environment per open pull request (#4298): chant components pr-env up applies the pull request's components to pr-<number>, which takes the template environment's declared endpoint, and pr-env down tears down only what carries that environment's ownership marker. A pull request's environment is never a release target. Read from the declaration at base, so a pull request cannot change its own template or TTL. Added in schema 1 by chant 0.124.42, so a declaration that uses it sets minReader to 0.124.42 or newer.",required:["template"],additionalProperties:!1,patternProperties:{"^x-":!0},properties:{template:{type:"string",pattern:"^[a-z0-9][a-z0-9-]*(/[a-z0-9][a-z0-9-]*)?$",description:"The declared environment a pull request's environment is derived from: pr-<number> takes its endpoint unless a pr-* entry declares one."},ttl:{type:"string",pattern:"^[1-9][0-9]*(m|h|d)$",description:"How long a pull request's environment lives after its last apply, such as 72h, 90m or 7d. chant components pr-env sweep tears down one whose TTL passed. 72h when absent."},teardown:{type:"object",description:"A command that tears down what no lexicon does, such as a Terraform root's copy of the environment (#4330). pr-env down and pr-env sweep run it after the ownership check, twice: CHANT_PR_ENV_STAGE=owned writes the candidates with their read-back markers to CHANT_PR_ENV_RESULT, and CHANT_PR_ENV_STAGE=teardown deletes the candidates in CHANT_PR_ENV_CANDIDATES and writes their outcomes. It runs without the forge token variables. Added in schema 1 by chant 0.124.45, so a declaration that uses it sets minReader to 0.124.45 or newer.",required:["command"],additionalProperties:!1,patternProperties:{"^x-":!0},properties:{name:{type:"string",pattern:"^[a-z0-9][a-z0-9-]*$",description:"The name the teardown's outcomes are attributed to, as a lexicon's are. teardown when absent."},command:{type:"array",minItems:1,items:{type:"string",minLength:1},description:"Argv, run in the member's directory at the commit the job runs at. {env}, {pr} and {stage} are filled in."},lexicons:{type:"array",items:{type:"string",minLength:1},description:"The lexicons the command tears down in place of, such as terraform. Their own teardown is left out, so one with no teardown execution does not leave the environment incomplete."}}}}}}},retention:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"How long chant lifecycle gc keeps each kind of stored record (#4036). A kind or field left out keeps its default: changeSets 14 days; releases 14 days and the newest 10 of each member; runEvents 14 days and the newest 100. Whatever the policy, gc never prunes a release an environment runs, what a pending gate binds, or a change set a gate names with a kept release. Read from the declaration at base. Added in schema 1 by chant 0.124.29, so a declaration that uses it sets minReader to 0.124.29 or newer.",properties:{changeSets:{type:"object",additionalProperties:!1,description:"Stored change sets, _change-sets/<digest>.json on chant/lifecycle.",properties:{days:{$ref:"#/$defs/retentionDays"}}},releases:{type:"object",additionalProperties:!1,description:"Releases, _releases/<digest>.json on chant/lifecycle, with the template bytes only they name. A release stays promotable for days after its newest cut, and the newest keep releases of each member stay promotable at any age, unless their commit is revoked.",properties:{days:{$ref:"#/$defs/retentionDays"},keep:{$ref:"#/$defs/retentionKeep"}}},runEvents:{type:"object",additionalProperties:!1,description:"Run event files, <git-common-dir>/chant/run-events/<run>.jsonl on each host. A file is kept for days after its last write, and the newest keep files at any age.",properties:{days:{$ref:"#/$defs/retentionDays"},keep:{$ref:"#/$defs/retentionKeep"}}}}},metrics:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"How chant workspace metrics counts the DORA metrics (#4039). Added in schema 1 by chant 0.124.29, so a declaration that uses it sets minReader to 0.124.29 or newer.",properties:{failureWindowDays:{type:"integer",minimum:1,maximum:365,description:"A deploy counts as failed when, within this many days after it, the commit it deployed is revoked or the environment is rolled back from it. The default is 7."}}},security:{type:"array",uniqueItems:!0,description:"The security groups the workspace opts into (#4168), for every member; a member's own security adds to them. With none, a security feature the workspace has not turned on never refuses, warns or hides anything. verified-releases: release publish and promote --release take only a verified release. supply-chain: a publish without OIDC provenance warns, and a target with no SBOM source is refused. who-ran-it: ci tick needs a runner key. review-rules: pr-apply requires a forge review. isolated-runners: an apply job requires a runner-start statement. workspace check reports what a declared group lacks (WSP161 to WSP165). Added in schema 1 by chant 0.124.33, so a declaration that uses it sets minReader to 0.124.33 or newer.",items:{enum:["verified-releases","supply-chain","who-ran-it","review-rules","isolated-runners"]}}},patternProperties:{"^x-":!0},additionalProperties:!1,$defs:{ciCloudIdentityRules:{type:"array",minItems:1,description:"Rules, first match wins: a rule matches a pipeline when its environments match the pipeline's environment and its members match the pipeline's member, and a target inside the member when its targets match the target too. A rule with no environments matches every environment, one with no members every member and a pipeline outside a member, and one with no targets every target.",items:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},required:["plan","apply"],properties:{environments:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1},description:"Environment-name globs, such as prod or staging-*."},members:{$ref:"#/$defs/ciMemberGlobs"},targets:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1},description:"Target globs inside the member (#4332), such as Terraform roots or Op wave run targets: * within one / segment, ** across segments, ? one character. The plan job trades for every plan identity the member's targets take, and an apply splits into one job per apply identity. Added in schema 1 by chant 0.124.45, so a declaration that uses it sets minReader to 0.124.45 or newer."},name:{type:"string",pattern:"^[a-z0-9_-]+$",description:"The name of the apply job group the rule's targets form (#4332). Default: from its first target glob. Added by chant 0.124.45."},plan:{type:"string",minLength:1,description:"The identity the plan and record jobs take: a role ARN, a service account email or a client id."},apply:{type:"string",minLength:1,description:"The identity the apply jobs take."}}}},ciMemberGlobs:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1,pattern:"^[a-z0-9*?\\[\\]{},!-]+$"},description:'Globs over member names, such as prod-* or ["api", "web"]: * and ? within the name, [...] classes, {a,b} alternatives.'},retentionDays:{type:"integer",minimum:0,maximum:36500,description:"Days a record is kept past its last write or use. 0 lets every record go that no never-prune rule keeps."},retentionKeep:{type:"integer",minimum:0,maximum:1e5,description:"How many of the newest are kept at any age."},name:{type:"string",pattern:"^[a-z0-9][a-z0-9-]{0,39}$",description:"Lowercase letters, digits and hyphens, starting with a letter or digit, at most 40 characters. _workspace and _members are reserved; the pattern already rules them out."},kindName:{type:"string",pattern:"^[a-z][a-z0-9-]{0,39}$"},gatePolicyRef:{type:"object",additionalProperties:!1,required:["kind","lexicon","name","version","text"],description:"A gate policy set a lexicon rendered (#2508), as plain data.",properties:{kind:{const:"gate-policy"},lexicon:{type:"string",minLength:1,description:"The lexicon whose gate-policy module evaluates text."},name:{type:"string",minLength:1,description:"A name for the policy set, carried into every recorded decision."},version:{type:"string",minLength:1,description:"sha256: and the hex digest of text. A recorded permit counts only under the version it was evaluated against."},text:{type:"string",minLength:1,description:"The policy set, in the lexicon's own language."}}},gateQuorumRule:{type:"object",additionalProperties:!1,required:["count"],description:"One approval rule (#4290): count distinct human approvers, from roles when it names them.",properties:{targets:{type:"array",minItems:1,items:{type:"string",minLength:1},description:"Globs over the run's environment: * within one / segment, ** across segments, ? one character. Absent: every run. A rule with targets never covers a run with no environment."},count:{type:"integer",minimum:1,description:"Distinct human approvers the rule needs."},roles:{type:"array",minItems:1,items:{type:"string",minLength:1},description:"Only an approver .chant/trust.json at base gives one of these roles counts, and only with an approval sealed by a signer listed at base."},notAuthor:{type:"boolean",description:"Refused on an Op gate, which has no author to judge by."}}},className:{type:"string",pattern:"^(?!x-)[a-z][a-z0-9-]{0,39}$",description:"A principal class: human, agent, runner, service, or a domain class a pinned package supplies (#3080)."},version:{type:"string",pattern:"^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"},dir:{type:"string",description:'A directory relative to the workspace root, with / separators: "." for the root itself, otherwise no leading /, no . or .. segments and no trailing /.',pattern:"^(\\.|(?!\\.\\.?(/|$))[^/\\\\]+(/(?!\\.\\.?(/|$))[^/\\\\]+)*)$"},glob:{type:"string",description:"A glob over directories, relative to the workspace root: * and ? within one segment, ** across segments, [...] classes. No leading /, no . or .. segments.",pattern:"^(?!\\.\\.?(/|$))[^/\\\\]+(/(?!\\.\\.?(/|$))[^/\\\\]+)*$"},severity:{enum:["error","warning","info","off"]},suppress:{type:"array",description:"Declaration checks suppressed for this entry (#2535). Each names a WSP id and says why. A suppressed finding is still reported, as suppressed, and never fails check.",items:{type:"object",required:["check","because"],properties:{check:{type:"string",pattern:"^WSP[0-9]{3}$"},because:{type:"string",minLength:1}},patternProperties:{"^x-":!0},additionalProperties:!1}},outputName:{type:"string",minLength:1,maxLength:255,pattern:"^[^\\u0000-\\u001f]+$",description:"An output's name, compared exactly."},link:{type:"object",description:"A member link: this member reads output of member (#2539), or sends its telemetry to a pipeline of its collector (#2558).",required:["member","output"],properties:{member:{$ref:"#/$defs/name",description:"The producer: another member of this workspace."},output:{$ref:"#/$defs/outputName",description:"The producer's output, matched exactly. It must be one the producer's kind exposes. For a telemetry link, the id of a pipeline or an exporter in the producer's collector."},kind:{$ref:"#/$defs/kindName",description:"The link kind. output, the default: the consumer reads the named output. telemetry (#2558): the consumer sends its telemetry to the named pipeline or exporter of the producer's collector, and chant workspace graph checks that it exists and, when protocol is given, that it speaks it. A declaration that uses telemetry sets minReader to 0.101.0 or newer."},protocol:{enum:["grpc","http/protobuf","http/json"],description:"For a telemetry link, the OTLP protocol the consumer sends, as OTEL_EXPORTER_OTLP_PROTOCOL names it. Refused on any other kind. Added in schema 1 by chant 0.101.0."}},patternProperties:{"^x-":!0},additionalProperties:!1},entry:{description:"A member, or an example group when kind is examples (ws-051).",type:"object",required:["kind"],properties:{kind:{$ref:"#/$defs/kindName"}},if:{type:"object",properties:{kind:{const:"examples"}},required:["kind"]},then:{$ref:"#/$defs/group"},else:{$ref:"#/$defs/member"}},member:{type:"object",description:"A member (#2524 D2). Its directory leaves the root project, and it gets its own build, lint and ledger.",required:["name","kind"],properties:{name:{$ref:"#/$defs/name",description:"Frozen once the member deploys; a rename is an alias record."},dir:{$ref:"#/$defs/dir"},kind:{$ref:"#/$defs/kindName",description:"How to read the member: chant, workspace, repo, other, or a kind a pinned plugin supplies (#2535). Every kind but repo needs dir; a repo member has repo instead (#3168)."},repo:{$ref:"#/$defs/repoRef"},roles:{type:"array",description:"Roles the member plays. A role may point at a path inside the member.",items:{oneOf:[{$ref:"#/$defs/kindName"},{type:"object",required:["name"],properties:{name:{$ref:"#/$defs/kindName"},path:{$ref:"#/$defs/dir",description:"Relative to the member's directory."}},patternProperties:{"^x-":!0},additionalProperties:!1}]}},generated:{type:"array",description:"Files in the member's directory that a command writes (#2524 D14, #2541). chant workspace check fails when one differs from what its generator writes, unless the entry is marked handWritten with a reason. The lineage lock classes the same files as generated. skills/*/SKILL.md, which chant update writes, is listed implicitly for a chant member.",items:{$ref:"#/$defs/generatedFile"}},outputs:{type:"array",uniqueItems:!0,description:"The outputs this member exposes as link targets (#2539), for a member whose kind takes them from the entry: other, or a kind a pinned package supplies. A chant member's outputs are read from its source, and a nested workspace exposes none.",items:{$ref:"#/$defs/outputName"}},fields:{$ref:"#/$defs/memberFields"},runsOn:{type:"string",minLength:1,pattern:"^[^/\\s]+/\\S+$",description:"The cluster resource this member runs on, as `<member>/<address>`: the member that holds it and its address (`infra/google_container_cluster.prod`), or its node id in the graph. chant workspace graph draws a declared edge from each Argo CD cluster Secret this member holds to that node, for a repo where the Secret's name is not the cluster's (#5101). A node it names that the graph does not hold, or more than one, is a warning and draws no edge. Added in schema 1 by chant 0.124.98, so a declaration that uses it sets minReader to 0.124.98 or newer."},links:{type:"array",description:"Member links (#2524 D6, #2539): the outputs of other members this member reads. A link is stated once, here on the consumer, and matched exactly against the producer's outputs. chant workspace check resolves it in source.",items:{$ref:"#/$defs/link"}},records:{type:"array",description:"The record kinds this member holds, each a kind file relative to the member's directory (#2680). chant workspace ls lists them, and chant workspace records and graph --intent read every declared kind when --kind is not given. Added in schema 1 by chant 0.86.0, so a declaration that uses it sets minReader to 0.86.0 or newer.",items:{$ref:"#/$defs/recordKind"}},diagrams:{type:"array",description:"The diagram artifacts this member holds (#2764). chant workspace ls lists every declared diagram, and chant workspace check reports one whose render is stale for its source when the entry records a sourceHash. Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",items:{$ref:"#/$defs/diagram"}},box:{$ref:"#/$defs/box"},upstream:{type:"string",minLength:1,description:"Where an embedded member's files come from. Versions live in the lock."},ci:{type:"object",additionalProperties:!1,patternProperties:{"^x-":!0},description:"This member's own CI settings (#4168 step 6). Added in schema 1 by chant 0.124.34, so a declaration that uses it sets minReader to 0.124.34 or newer.",properties:{workflow:{$ref:"#/$defs/ciWorkflow"},hooks:{$ref:"#/$defs/ciHooks"},lockGrain:{$ref:"#/$defs/ciLockGrain"}}},travel:{type:"boolean",description:"Whether the member goes with an export (#2524 D10, #2552). chant workspace export writes only members that set travel to true into the export member, and refuses to name one that does not. Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer."},acceptWorkspaceGates:{type:"boolean",description:"Whether an approval of a workspace gate may stand in for this member's own gates (#2554, ws-039). It does only when the approval's digest covers the plan the member's run reached its gate with, and only when the declaration at base sets this to true; a working-tree change never opts a member in. Absent or false, a workspace gate never satisfies this member's gates. Added in schema 1 by chant 0.124.47, so a declaration that uses it sets minReader to 0.124.47 or newer."},security:{type:"array",uniqueItems:!0,description:"The security groups this member opts into, added to the declaration's top-level security (#4168). A release, publish or pull-request job of this member runs under both lists. Added in schema 1 by chant 0.124.33, so a declaration that uses it sets minReader to 0.124.33 or newer.",items:{enum:["verified-releases","supply-chain","who-ran-it","review-rules","isolated-runners"]}},because:{type:"string",minLength:1,description:"Why the member is there. Required for kind other."},suppress:{$ref:"#/$defs/suppress"}},patternProperties:{"^x-":!0},additionalProperties:!1,allOf:[{if:{type:"object",properties:{kind:{const:"other"}},required:["kind"]},then:{type:"object",properties:{because:{type:"string"}},required:["because"]}},{if:{type:"object",properties:{kind:{const:"repo"}},required:["kind"]},then:{required:["repo"],properties:{repo:!0,dir:!1}},else:{required:["dir"],properties:{dir:!0,repo:!1}}}]},repoRef:{type:"object",description:"Another repository's workspace, named by URL and pinned revision (#3168). A member of kind repo carries it and has no dir. chant reads that workspace read-only through the other repository's own read contract, its chant workspace graph at the revision, the way it reads a nested workspace member, and never writes there. Added in schema 1 by chant 0.124.47, so a declaration that uses it sets minReader to 0.124.47 or newer.",required:["url","rev"],properties:{url:{type:"string",pattern:"^[^\\s]+$",description:"Where git fetches the repository from: an https, ssh or file URL, a local path, or an scp-style git@host:org/repo. A URL that carries a password or token is refused when it is read."},rev:{type:"string",pattern:"^([0-9a-f]{40}|[0-9a-f]{64})$",description:"The pinned revision, a full commit id. A branch or tag is not a pin."},workspace:{$ref:"#/$defs/dir",description:'The workspace root inside that repository, relative to its git root. Defaults to ".".'}},patternProperties:{"^x-":!0},additionalProperties:!1},memberFields:{type:"object",description:"Values for the fields the member's kind declares (#3151), such as an app member's scripts, env and health. Each is a string, integer or boolean, or an object of those for a field the kind declares as an object. chant workspace check fails when the kind declares no such field or a value is of the wrong type (WSP005), and chant workspace status --json prints every field the kind declares with its defaults filled in. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",propertyNames:{pattern:"^[a-z][A-Za-z0-9]{0,39}$"},additionalProperties:{oneOf:[{type:"string"},{type:"integer"},{type:"boolean"},{type:"object",propertyNames:{pattern:"^[a-z][A-Za-z0-9]{0,39}$"},additionalProperties:{oneOf:[{type:"string"},{type:"integer"},{type:"boolean"}]}}]}},group:{type:"object",description:"An example group (ws-051): every directory the glob matches that holds a chant project is built and linted. A group has no ledger, releases or links, and its matches are never members. A match may sit inside a member's directory; that member leaves it to the group.",required:["name","kind","glob"],properties:{name:{$ref:"#/$defs/name"},kind:{const:"examples"},glob:{oneOf:[{$ref:"#/$defs/glob"},{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/glob"}}]},suppress:{$ref:"#/$defs/suppress"}},patternProperties:{"^x-":!0},additionalProperties:!1},path:{type:"string",description:"A file or directory path with / separators: no leading /, no . or .. segments and no trailing /.",pattern:"^(?!\\.\\.?(/|$))[^/\\\\]+(/(?!\\.\\.?(/|$))[^/\\\\]+)*$"},box:{type:"object",description:"The member is a box, or holds a box's declarations (#2726). A box holds no credential: each capability it needs outside itself is reached through a broker, a runtime such as a lobby or a door, which holds the credential and enforces the scope. chant workspace check fails when a file in the member's directory carries a literal secret (WSP121) and when a capability names no broker (WSP122). chant workspace status --json lists the capabilities, so a broker can read the scopes. Its host, slot, ports, state and cookies state the box's isolation (#2727): chant derives each value from the box's identity, its host, the member's name and its slot, and prints them in chant workspace status --json, so a runtime reads them instead of choosing its own. chant workspace check fails when two boxes on a host resolve to the same value (WSP123) and when a box hard-codes a machine path (WSP124). A member that builds the fountain lexicon's Box declares the callback token fountain gives its sandbox as the capability fountain-callback, brokered by fountain, with scope owner, or chant workspace check fails (WSP125, #2780). Its intent names the decision record that says what the box is for (#2850): chant workspace status --json reports the record's state and answer, and chant workspace check fails when no decision record has the id (WSP126) and warns when the record constrains no member or path of this workspace (WSP127, #2857). Its services list what the box runs under its supervisor (#2880), which the fly lexicon observes, restarts and applies through sprite-env, and which chant workspace status --json prints. Its factory declares what the box builds, how a build is checked, which member declares the builder agents and where a finished build is published (#3146, ws-077), its listing what the box shows of itself (#3146), and its replicate where the box's work in progress is pushed so a lost box loses none of it (#3172, ws-085). Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",properties:{intent:{type:"string",minLength:1,description:"The id of the decision record that says what the box is for (#2850), a record of a declared kind named decision. A new box starts as a question: the record is proposed with a null choice until the person who answers it decides it. The record constrains a member or path of this workspace, with member:<a member's name> or a path: entry at, above or inside a member's directory. It need not be this member: the intent can constrain the app the box runs when that app is another member (#2857). When it constrains this member, chant workspace graph --intent shows it for the box's files. Added by chant 0.94.0, so a declaration that uses it sets minReader to 0.94.0 or newer."},services:{type:"array",description:"The services the box runs under its supervisor, sprite-env on a sprite (#2880). Each name is given once, every needs entry names a service of this list, the needs form no cycle, and at most one service sets httpPort; a declaration that breaks one of these can't be read (declaration-invalid). The fly lexicon's spriteServicesObserve and spriteServiceRestart read the list with box: true, and spriteApplyServices with box: true creates and replaces the services through sprite-env. None when omitted. Added by chant 0.95.0, so a declaration that uses it sets minReader to 0.95.0 or newer.",items:{$ref:"#/$defs/boxService"}},factory:{$ref:"#/$defs/boxFactory"},listing:{$ref:"#/$defs/boxListing"},publisher:{type:"string",minLength:1,pattern:"\\S",description:"The command that publishes the box's work (#3165, ws-088): it applies a built work item to the box's checkout and, when factory.publish names a target, pushes it and opens the pull request, and it sends the records a person kept uncommitted. It is run from the workspace root by chant workspace box publish, split into words as a shell splits plain words (quotes group, a backslash escapes) but never given to a shell, with a JSON request on stdin; box-publish.schema.json says what it reads and prints. An orchestrator such as studio supplies it. chant workspace status --json prints it under the member's box, so a surface offers a publish only when a box names one. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer."},replicate:{$ref:"#/$defs/boxReplicate"},ship:{$ref:"#/$defs/boxShip"},capabilities:{type:"array",description:"Each capability the box reaches outside itself, named once. None when omitted.",items:{$ref:"#/$defs/capability"}},host:{$ref:"#/$defs/name",description:"The host the box runs on, one of the top-level hosts (#2727). The box's name is the member's name."},slot:{type:"integer",minimum:0,description:"The box's number on its host (#2727). Its ports come from the slot's block of the host's range."},ports:{type:"object",description:"The ports the box listens on, each a name and its offset in the box's block (#2727). The port is the block's first port plus the offset.",propertyNames:{$ref:"#/$defs/kindName"},additionalProperties:{type:"integer",minimum:0,maximum:65534}},state:{type:"object",description:"State the box keeps outside its checkout, such as hud's identity and database, each a name and a path relative to the box's state directory (#2727). The name is usually the environment variable the runtime sets, such as HUD_IDENTITY_PATH. A path that is absolute, starts with ~ or an environment reference, or has a .. segment is a WSP124 finding.",propertyNames:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},additionalProperties:{type:"string",minLength:1}},cookies:{type:"array",description:"Session cookie names the box's runtimes set, such as hud_session (#2727). A browser scopes a cookie to a host, not a port, so each resolves to <cookie>_<member name>.",uniqueItems:!0,items:{type:"string",pattern:"^[A-Za-z][A-Za-z0-9_-]{0,63}$"}}},dependentRequired:{host:["slot"],slot:["host"],ports:["host"],state:["host"],cookies:["host"]},patternProperties:{"^x-":!0},additionalProperties:!1},boxFactory:{type:"object",description:"What the box builds and how (#3146, ws-077), replacing studio's x-factory. Opt-in: a box block without it declares no factory, and nothing here is required of a workspace that doesn't build with agents (#3174). At most one box block in a declaration declares a factory. builds and builders name declared members, or the declaration can't be read (declaration-invalid). chant workspace status --json and chant workspace graph --json print it under the member's box. The factory need not build an app: builds may name any member kind, such as chant or terraform, and the check may be a plan, a lint or a conformance run. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",required:["builds"],properties:{builds:{type:"array",minItems:1,uniqueItems:!0,description:"The members the factory builds, each a declared member of any kind. A work item a person asks for here constrains member:<the first>.",items:{$ref:"#/$defs/name"}},check:{description:"The command whose exit code is a build's verdict, run from the workspace root after the work item's own checks: a command, or { run, kind } saying what it is. kind is test when omitted.",oneOf:[{type:"string",minLength:1},{type:"object",required:["run"],properties:{run:{type:"string",minLength:1,description:"The command, run from the workspace root."},kind:{enum:["test","build","lint","plan","conformance"],description:"What the command is: an app's tests, a build, a lint, a lifecycle plan or a conformance run. test when omitted."}},patternProperties:{"^x-":!0},additionalProperties:!1}]},checks:{$ref:"#/$defs/path",description:"The directory, from the workspace root, where a work item's builder writes the check for its item. When omitted the orchestrator chooses, such as <the first member of builds>/checks."},builders:{$ref:"#/$defs/name",description:"The member that declares the builder agents, such as the one whose agents/ holds them. tiers says which of them builds at which tier (#3152)."},tiers:{type:"array",minItems:1,description:"Which builder agent builds at which tier (#3152, ws-094), replacing studio's studio/role and studio/tier Agent metadata. Each entry names a tier, in the vocabulary of the work kind's work.tier.tiers (#3147), and an agent the builders member declares, by its name. An entry with kinds builds only members of those kinds, so an infra builder and an app builder can share a tier; an entry without kinds builds the tier for every other kind. A tier has at most one entry without kinds and at most one per kind, tiers needs builders, and a session names a declared agent session, or the declaration can't be read (declaration-invalid). chant workspace status --json prints builderFor, the agent for each built member and tier. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",items:{type:"object",required:["tier","agent"],properties:{tier:{$ref:"#/$defs/kindName",description:"The tier, such as small, medium or large: a word of the work kind's work.tier.tiers, which a work item's tier or the slice-tier decision point answers."},agent:{type:"string",minLength:1,pattern:"^[^\\u0000-\\u001f]+$",description:"The builder agent's name, as the builders member declares it (such as an Agent of the fountain lexicon in its agents/)."},kinds:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/kindName"},description:"The member kinds this agent builds at the tier, such as app or terraform. Without it, every kind no other entry of the tier names."},session:{$ref:"#/$defs/name",description:"The declared agent session (agents) the builder writes as, so its write scope is that session's. Optional: without it the orchestrator chooses."}},patternProperties:{"^x-":!0},additionalProperties:!1}},publish:{type:"object",description:"Where a finished build is published: its branch is pushed and a pull request opened against repo's base. The repo is the record, so an orchestrator reads this instead of being told the target in its environment.",required:["repo"],properties:{forge:{enum:["github"],description:"The forge repo is on. github when omitted."},repo:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9._-]{1,100}$",description:"The repository the pull request is opened on, as owner/name."},base:{type:"string",minLength:1,description:"The branch the pull request targets. The repository's default branch when omitted."},branchPrefix:{type:"string",minLength:1,pattern:"^[A-Za-z0-9._/-]+$",description:"What the published branch's name starts with; the work item's id follows, as in box/ and then box/work-012. chant/work/ when omitted, the work lease's own branch."},head:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9._-]{1,100}$",description:"The repository the branch is pushed to when it isn't repo, as owner/name: a fork, so the pull request comes from <head owner>:<branch>. A runtime that publishes for one contributor's fork supplies that per contributor instead (arugula-salad/studio#242); this names a fork the whole workspace publishes from."}},patternProperties:{"^x-":!0},additionalProperties:!1}},patternProperties:{"^x-":!0},additionalProperties:!1},boxListing:{type:"object",description:"What the box shows of itself on a home site that lists boxes (#3146, #3154): whether it is listed, its title and one line, and a cover image kept as a file in the repo. A box's listing is configuration, so changing it is a reviewed change (ws-074). chant workspace status --json and chant workspace graph --json print it under the member's box, with the cover's sha256. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",properties:{published:{type:"boolean",description:"Whether the box is listed. true when omitted: a box is listed unless its owner takes it out."},title:{type:"string",maxLength:60,pattern:"^[^\\u0000-\\u001f\\u007f-\\u009f]*$",description:"The box's title, one line of at most 60 characters. Empty when omitted, and a reader then shows a name of its own."},line:{type:"string",maxLength:140,pattern:"^[^\\u0000-\\u001f\\u007f-\\u009f]*$",description:"One line saying what the box is, at most 140 characters. Empty when omitted."},cover:{$ref:"#/$defs/path",description:"A PNG, JPEG or WebP picture of the box, as a file from the workspace root. None when omitted."}},patternProperties:{"^x-":!0},additionalProperties:!1},boxReplicate:{type:"object",description:"Where the box's work in progress is replicated, so a box that is lost, reclaimed or corrupted before anyone commits loses nothing (#3172, ws-085). Work in progress is the work branches (chant/work/...), the kept attempts (refs/chant/kept/..., #3147), the snapshots chant workspace wip save takes of each branch's working tree, uncommitted records included (refs/chant/wip/<branch>), and the ledger branch, chant/lifecycle. chant pushes them to remote under their own names and never forces a push. Opt-in: a box block without it replicates nothing. At most one box block in a declaration declares one, or the declaration can't be read (declaration-invalid). chant workspace status --json prints it under the member's box, with every default filled in, and reports in replication how far each ref is from the remote. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",properties:{remote:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",description:"The git remote to push to, by name: the repository's own remote, such as origin, or a mirror the host adds to the box's checkout with its credential, since a box holds none (#2726). origin when omitted."},refs:{type:"array",minItems:1,uniqueItems:!0,description:"What is replicated: work (the branches under chant/work/), kept (the kept attempts under refs/chant/kept/), wip (the snapshots under refs/chant/wip/) and ledger (the chant/lifecycle branch). All four when omitted.",items:{enum:["work","kept","wip","ledger"]}},on:{type:"array",uniqueItems:!0,description:"When chant pushes on its own: save, after each chant workspace wip save, and release, after a work lease is released (chant workspace work release, or a run of an Op under a work lease ending, which is when a kept attempt is written). Both when omitted; an empty list leaves every push to chant workspace wip push. A record write never pushes, because chant's record writes never run git (ws-074).",items:{enum:["save","release"]}},every:{type:"string",pattern:"^[1-9][0-9]*(s|m|h)$",description:"How often the host runs chant workspace wip push on a schedule of its own, such as 10m, beside the pushes on save and release. chant runs no scheduler; it only states the interval. None when omitted."}},patternProperties:{"^x-":!0},additionalProperties:!1},boxShip:{type:"object",description:"How the box ships its staged work to its own site (ws-100): the people working on a box see the working tree at once, everyone else sees the last release, and a person ships. op is the Op in the box member that does it: its own steps commit the staged tree as one commit by the person shipping (named to it in CHANT_SHIP_BY) with a Chant-Record trailer for each work item it lands, then release that commit to the box's site, stopping at gate, and record the release in env's release ledger. chant runs none of it; a surface runs chant run <op> in the member's directory and approves the gate as for any Op. chant workspace status --json prints it under the member's box with the commit the site serves (the latest release in env's ledger) and what is waiting to ship (the files changed between that commit and the working tree, bookkeeping left out). Added in schema 1 by chant 0.104.0, so a declaration that uses it sets minReader to 0.104.0 or newer.",required:["op"],properties:{op:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",description:"The name of the Op in the box member that ships, as chant run takes it."},gate:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",description:"The gate the Op stops at for a person's approval. ship when omitted."},env:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",description:"The environment whose release ledger, under the box member, the Op records each release in. box when omitted."},bookkeeping:{type:"array",uniqueItems:!0,description:"Path prefixes from the workspace root whose changes are bookkeeping, such as the record directories, and never count as waiting to ship. None when omitted.",items:{type:"string",minLength:1,pattern:"^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\n]+$"}}},patternProperties:{"^x-":!0},additionalProperties:!1},boxService:{type:"object",description:"A service a box runs under its supervisor (#2880).",required:["name","cmd"],properties:{name:{$ref:"#/$defs/kindName",description:"The service's name in the supervisor. Unique within the box."},cmd:{type:"string",minLength:1,description:"The command the supervisor runs (sprite-env services create --cmd). ${HOME} and other ${VAR} references are expanded from the environment of the process that applies the list, so the declaration holds no machine path."},needs:{type:"array",uniqueItems:!0,description:"Names of services of the same box that start before this one (sprite-env services create --needs).",items:{$ref:"#/$defs/kindName"}},httpPort:{$ref:"#/$defs/port",description:"The port the supervisor routes the sprite's URL to (sprite-env services create --http-port). At most one service of a box sets it."},duration:{type:"string",pattern:"^[0-9]+(\\.[0-9]+)?(ms|s|m)$",description:"How long the service must stay up after it is created or started, such as 3s (sprite-env services create --duration)."},health:{type:"string",pattern:"^https?://",description:"A URL that answers 200 while the service works. spriteServicesObserve probes it, and spriteServiceRestart waits for it after a restart. Without it, the supervisor's state decides."},optional:{type:"boolean",description:"True for a service something else creates by name, such as a site a release Op makes: spriteApplyServices creates it only when its only names it, and spriteServicesObserve skips it while the supervisor has no such service."}},patternProperties:{"^x-":!0},additionalProperties:!1},capability:{type:"object",description:"A capability a box needs and does not hold the credential for, such as inference, fountain or a third-party API (#2726).",required:["name"],properties:{name:{$ref:"#/$defs/kindName",description:"The capability, such as inference or fountain. Unique within the box."},broker:{type:"string",minLength:1,description:"What brokers the capability: the runtime that holds the credential and swaps the box's own token for it, such as lobby or door. It may name a member of this workspace, or a runtime outside it. Without it the capability is unbrokered, and chant workspace check fails with WSP122."},scope:{type:"array",uniqueItems:!0,description:"What of the box's own the broker lets it reach, which the broker enforces. For Fountain: agent (start conversations with its own agent), vault (attach its own vault), conversations and sandboxes (its own). The words are the broker's; chant records them.",items:{type:"string",minLength:1,pattern:"^[^\\u0000-\\u001f]+$"}}},patternProperties:{"^x-":!0},additionalProperties:!1},recordKind:{type:"object",description:"A record kind the workspace declares (#2680): a kind file that exports recordKind. chant workspace check fails (WSP115) when the file is missing or does not load as a record kind.",required:["kind"],properties:{kind:{$ref:"#/$defs/path",description:"The kind file, relative to the member's directory, or to the workspace root for the workspace's own records. A path is listed once across the declaration."},name:{$ref:"#/$defs/kindName",description:"The name readers show for the kind. Without it, the kind file's own recordKind.name. Unique across the declaration."}},patternProperties:{"^x-":!0},additionalProperties:!1},diagram:{type:"object",description:"A diagram artifact the workspace declares (#2764): a rendered image with a source, pinned to the renderer that made it. A mermaid or excalidraw diagram may name no render: a reader draws it from its source. chant never runs the renderer.",required:["name","title","renderer"],if:{type:"object",properties:{renderer:{type:"object",properties:{tool:{enum:["mermaid","excalidraw"]}},required:["tool"]}},required:["renderer"]},then:{type:"object",properties:{source:{$ref:"#/$defs/path"}},required:["source"]},else:{type:"object",properties:{render:{$ref:"#/$defs/path"}},required:["render"]},properties:{name:{$ref:"#/$defs/name",description:"Unique across the declaration."},title:{type:"string",minLength:1,description:"Shown above the diagram."},source:{oneOf:[{$ref:"#/$defs/path"},{type:"null"}],description:"The source file, from the workspace root, with / separators. Null for an SVG with no source. Default null."},render:{oneOf:[{$ref:"#/$defs/path"},{type:"null"}],description:"The rendered image, from the workspace root, with / separators. Required for d2 and graphviz. A mermaid or excalidraw diagram needs a source instead and may leave render out or null, from chant 0.96.0: a reader such as hud draws it from the source (an excalidraw diagram may still commit an exported SVG for docs)."},renderer:{$ref:"#/$defs/diagramRenderer"},sourceHash:{type:["string","null"],pattern:"^[0-9a-f]{64}$",description:"sha256 hex of the source's bytes when render was last produced from it, or for a mermaid or excalidraw diagram without a render, when the source was last pinned. chant workspace check compares this against the source in the tree read and reports drift (WSP133) on a mismatch; without it, or without a source, the render is never checked for drift. Default null."}},patternProperties:{"^x-":!0},additionalProperties:!1},diagramRenderer:{type:"object",description:"The renderer a diagram's render was made with. chant records the pin; it never installs or runs the renderer (ws-052).",required:["tool","version"],properties:{tool:{enum:["d2","mermaid","graphviz","excalidraw"]},version:{$ref:"#/$defs/version",description:"The exact release the render was made with, such as 0.9.0. For mermaid or excalidraw, the release of the library a reader draws the source with, such as 11.4.1."},args:{type:"array",description:'Passed before the input and output paths, in order, such as ["--layout=elk", "--theme=0", "--pad=40", "--omit-version"]. Empty when absent.',items:{type:"string"}}},patternProperties:{"^x-":!0},additionalProperties:!1},generatedFile:{type:"object",description:"One generated file of a member (#2524 D14, #2541).",required:["path","generator"],properties:{path:{$ref:"#/$defs/path",description:"The file, relative to the member's directory."},generator:{type:"string",minLength:1,description:"The command line that writes the file, run in the member's directory with the member's own node_modules/.bin first on PATH, such as chant build ci --lexicon github -o ci.yml. When it passes -o or --output with this file's path, chant workspace check --generated points that flag at a temporary file. Otherwise the generator writes in place and check restores the tree afterwards."},sources:{type:"array",description:"The files or directories the generator reads, relative to the workspace root, since a generator often reads other members.",items:{$ref:"#/$defs/path"}},handWritten:{type:"object",description:"The file is kept by hand instead of regenerated. chant workspace check reports it with the reason and never runs its generator, and the lock classes it owned.",required:["because"],properties:{because:{type:"string",minLength:1}},patternProperties:{"^x-":!0},additionalProperties:!1}},patternProperties:{"^x-":!0},additionalProperties:!1},pin:{description:"An npm package at an exact version, or a local plugin by path. integrity is a Subresource Integrity digest.",oneOf:[{type:"object",required:["package","version"],properties:{package:{type:"string",pattern:"^(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"},version:{$ref:"#/$defs/version"},integrity:{type:"string",pattern:"^sha(256|384|512)-[A-Za-z0-9+/]+={0,2}$"}},patternProperties:{"^x-":!0},additionalProperties:!1},{type:"object",required:["path"],properties:{path:{$ref:"#/$defs/dir"},integrity:{type:"string",pattern:"^sha(256|384|512)-[A-Za-z0-9+/]+={0,2}$"}},patternProperties:{"^x-":!0},additionalProperties:!1}]},host:{type:"object",description:"A host boxes run on (#2727).",required:["name","ports"],properties:{name:{$ref:"#/$defs/name",description:"The host's name, unique among hosts. A box block names it in host."},ports:{type:"object",description:"The TCP ports boxes on this host take theirs from. Slot n owns the block from + n * perBox to from + (n + 1) * perBox - 1, which must end at or before to.",required:["from","to","perBox"],properties:{from:{$ref:"#/$defs/port",description:"The first port of the range."},to:{$ref:"#/$defs/port",description:"The last port of the range, inclusive."},perBox:{type:"integer",minimum:1,maximum:65535,description:"How many ports each box's block holds. A box's port offsets are below it."}},additionalProperties:!1},stateRoot:{type:"string",minLength:1,description:"Where boxes on this host keep state, as an environment reference such as ${XDG_STATE_HOME}/chant/boxes, which the runtime expands on the machine. A box's state directory is <stateRoot>/<member name>. A literal machine path, such as /Users/... or anything under $HOME, is a WSP124 finding. Default ${XDG_STATE_HOME}/chant/boxes."}},patternProperties:{"^x-":!0},additionalProperties:!1},port:{type:"integer",minimum:1,maximum:65535},fileGlob:{type:"string",description:"A glob over file paths, relative to the workspace root: * and ? within one segment, ** across segments, [...] classes and {a,b} alternatives. No leading /, no . or .. segments.",pattern:"^(?!\\.\\.?(/|$))[^/\\\\]+(/(?!\\.\\.?(/|$))[^/\\\\]+)*$"},recordScope:{type:"object",description:"Record kind names, as the kind file's recordKind.name or the name the declaration gives it, each with the verbs the class may write it with: new, amend, review and close (a review session). A kind left out may not be written at all. A record file a commit deletes is never in scope.",propertyNames:{$ref:"#/$defs/kindName"},additionalProperties:{type:"array",uniqueItems:!0,items:{enum:["new","amend","review","close"]}}},protectedPath:{description:"A protected path: a glob from the workspace root, or { path, except } for a JSON file whose listed top-level keys, or the values JSON Pointers name, may still change.",oneOf:[{$ref:"#/$defs/fileGlob"},{type:"object",required:["path"],properties:{path:{$ref:"#/$defs/fileGlob"},except:{type:"array",minItems:1,uniqueItems:!0,description:"What a write may change in the JSON file: a top-level key, or, for an entry starting with /, the values a JSON Pointer matches, where a * token matches every key or array index at its level, such as /members/*/box/listing for every box's listing (#3308). A change anywhere else in the file, or to a file that doesn't parse as a JSON object before and after, is still outside the scope.",items:{type:"string",minLength:1}}},patternProperties:{"^x-":!0},additionalProperties:!1}]},classScope:{type:"object",description:"A principal class's write scope.",properties:{members:{description:"The members whose files the class may write, by name, or * for every path. Without it, every path. A path in no member is in scope only under *.",oneOf:[{const:"*"},{type:"array",uniqueItems:!0,items:{$ref:"#/$defs/name"}}]},protected:{type:"array",description:"Paths the class may not write, even inside a member it may (#3146, ws-077): each a glob from the workspace root, or { path, except } for a JSON file the class may change only in the top-level keys except names. An entry protects the files it matches and everything under a directory it matches. A record file is judged by records, not here. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",items:{$ref:"#/$defs/protectedPath"}},records:{$ref:"#/$defs/recordScope",description:"The record kinds the class may write, and how. Without it, every kind in reach, with every verb. A kind a member declares is in reach when that member is; the workspace's own kinds always are."}},patternProperties:{"^x-":!0},additionalProperties:!1},agentScope:{type:"object",description:"The agent class's write scope. Its members are always the members its session is bound to, so only the record kinds and the protected paths can be set.",properties:{protected:{type:"array",description:"Paths the class may not write, even inside a member it may (#3146, ws-077): each a glob from the workspace root, or { path, except } for a JSON file the class may change only in the top-level keys except names. An entry protects the files it matches and everything under a directory it matches. A record file is judged by records, not here. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",items:{$ref:"#/$defs/protectedPath"}},records:{$ref:"#/$defs/recordScope",description:"The record kinds an agent may write, and how. Without it, every kind in reach of its member, with every verb."}},patternProperties:{"^x-":!0},additionalProperties:!1},agent:{type:"object",description:"An agent session (#2548). It names its members with exactly one of member and members (ws-101).",required:["name"],oneOf:[{properties:{member:!0},required:["member"]},{properties:{members:!0},required:["members"]}],properties:{name:{$ref:"#/$defs/name",description:"The session's name, unique among agents: what CHANT_AGENT and a Chant-Agent trailer give."},member:{$ref:"#/$defs/name",description:"The one member the session is bound to. It must be a declared member, not an example group. A session bound to several names them with members instead."},members:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/name"},description:"The members the session is bound to, when it writes in more than one, such as a factory that builds an app and writes its evidence records in a design member (ws-101, arugula-salad/studio#402). Each must be a declared member, not an example group. The session may write the files of any of them and the records of kinds any of them or the workspace declares, and the write scope is judged against all of them together. Added in schema 1 by chant 0.105.0, so a declaration that uses it sets minReader to 0.105.0 or newer."},principals:{type:"array",uniqueItems:!0,items:{type:"string",minLength:1},description:"Principals that write only as this session: a commit attested by one, or a write whose by names one, is judged as the session. A principal is listed by one session at most."}},patternProperties:{"^x-":!0},additionalProperties:!1},ciGreen:{type:"object",description:"Which commits passed CI (#3573, ws-103). chant ci tick tags each first-parent commit of branch, within window, whose required phases all passed with ci/green/<sha>, and a green commit that later fails a required phase with ci/revoked/<sha>. Both are annotated tags made once and never moved or deleted by chant. chant ci last-green prints the newest commit with a green tag and no revoked tag.",required:["branch","phases","require"],properties:{branch:{oneOf:[{type:"string",minLength:1,pattern:"^[^\\s~^:?*\\[\\\\]+$"},{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1,pattern:"^[^\\s~^:?*\\[\\\\]+$"}}],description:"The branch whose commits are tagged, such as main. Only its first-parent commits count. A list judges each branch, so a branch ci.branches routes members to gets a green verdict and can release (#4325); the first is the trunk that readers use when they are not told a branch. A string reads as it always did."},window:{type:"string",pattern:"^[1-9][0-9]*(m|h|d)$",description:"How far back a tick looks, by committer time, such as 24h, 90m or 7d. 24h when absent."},phases:{type:"object",minProperties:1,description:"The phases, by name. Each is a list of check-run name patterns, or { runs, skipped }. A pattern matches a check run's whole name, with * standing for any run of characters. A phase passes when every check run its patterns match finished with success, judged by each run's latest attempt.",propertyNames:{$ref:"#/$defs/ciPhaseName"},additionalProperties:{$ref:"#/$defs/ciPhase"}},require:{type:"array",minItems:1,uniqueItems:!0,description:"The phases a commit must pass to be tagged green, by name. Each must be a declared phase.",items:{$ref:"#/$defs/ciPhaseName"}},preMerge:{type:"array",uniqueItems:!0,description:"The phases that must pass before the branch moves (#4168 4.4), by name: the quick checks a pull request's checks, a merge queue, chant ci serve landing a branch, or chant ci run --local give before a change lands. Each must be a declared phase. The trunk-curated workflow needs at least one. Added in schema 1 by chant 0.124.34, so a declaration that uses it sets minReader to 0.124.34 or newer.",items:{$ref:"#/$defs/ciPhaseName"}},signedSince:{type:"string",pattern:"^[0-9a-f]{40}([0-9a-f]{24})?$",description:"Added by #4031, read by chant 0.124.28 and newer. The full sha of the first commit on branch whose ci/green and ci/revoked tags must carry a DSSE statement in their annotation, signed by a key .chant/trust.json at base lists under runners for a principal holding the runner role. A tag on a strict first-parent ancestor of this commit counts unsigned, so existing tags keep working; a tag on any other commit, this one included, needs a statement. Position in history decides, never a date, which whoever makes a commit or a tag sets. A reader refuses a sha that names no commit in its clone with declaration-invalid. Absent, no tag needs a statement. Since chant 0.124.32 (#4156) it covers Op run records the same way, when ci.green.source is runs: an unsigned run counts on a strict first-parent ancestor of this commit and needs a statement on any other, ci serve refuses to start without a runner key trusted at the target's head, and ci run and chant run warn about a run they leave unsigned. Absent, an unsigned run counts and nothing asks for a key."},mergeQueue:{oneOf:[{type:"boolean"},{type:"object",additionalProperties:!1,required:["retries"],properties:{retries:{type:"integer",minimum:0,maximum:5,description:"Added by #4729. How many times the verdict re-runs a failed workflow run's failed jobs before the group fails. On a failed required job, chant ci verdict --wait waits for the job's workflow run to finish, re-runs its failed jobs while the run's attempt is no more than retries, and fails when it fails on attempt retries + 1. Above 0, chant ci workflow gives the verdict job actions: write and passes --timeout-minutes so the verdict gives up, with a message, before Actions kills the job. 0 is true's behaviour: the first failed job fails the group. Read by chant 0.124.70 and newer, so a declaration that sets the object form sets minReader to 0.124.70 or newer."}}}],description:`The branch takes changes through GitHub's merge queue (#4644). chant ci workflow adds the merge_group trigger (checks_requested) to each workflow holding a phase that sets build, and writes .github/workflows/chant-merge-queue.yml, whose chant-verdict job runs chant ci verdict --wait on the group's commit: it passes when every required phase passed there, judged as the tick judges, so the queue's ruleset requires that one check. The queue lands the commit its group tested, so the group's runs count for it; a later push run's skipped or cancelled attempt of the same job never replaces the group's decided one. A workflow holding a phase without build gets no trigger: add merge_group to it by hand. true is { "retries": 0 }. Written by chant 0.124.61 and newer, so a declaration that sets it sets minReader to 0.124.61 or newer.`},notify:{type:"object",description:"Who chant ci tick tells (#4645), as an Op waves spec's notify: each value names an environment variable, never a URL or a key. webhook and key: a signed chant.notify/v1 webhook; slack and teams: incoming webhooks; events: which to send, of ci.red, ci.culprit, ci.green and ci.quarantine-passed (all of them by default). ci.red: the branch's newest decided commit is red after its one retry. ci.culprit: a bisect named the first red commit. ci.green: the branch is green again after a ci.red. ci.quarantine-passed (#4677), from chant ci quarantine report rather than the tick: a quarantined test passed in the scheduled run, sent on every such run until its entry goes. The tick's events are each sent once: the tick marks it in the commit's _ci record, so it needs chant/lifecycle, and it sends nothing when it can't write the records. Read by chant 0.124.61 and newer, so a declaration that sets it sets minReader to 0.124.61 or newer. staleAfter adds ci.stale (#4678).",properties:{webhook:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},key:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},slack:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},teams:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},events:{type:"array",uniqueItems:!0,items:{enum:["ci.red","ci.culprit","ci.green","ci.quarantine-passed","ci.stale"]}},staleAfter:{type:"number",exclusiveMinimum:0,description:"Added by #4678. Hours the branch may go without a green commit before the tick sends ci.stale: when the oldest first-parent commit above the newest green one (ci/green, not revoked; lanes don't count) was committed this long ago. It names the tip, that commit (since), the green commit (lastGreen) and the whole hours. It is sent once per red stretch, marked in _ci/branch/<branch>.json on chant/lifecycle, and the stretch ends when a newer commit is green: the tick then sends ci.green naming since, or adds since to the ci.green it sends anyway. The generated chant-ci-green.yml ticks every 15 minutes on a schedule, so this fires when nothing else runs the tick. Unset, no ci.stale. Read by chant 0.124.63 and newer, so a declaration that sets staleAfter sets minReader to 0.124.63 or newer."}},additionalProperties:!1},quarantine:{type:"object",required:["phases"],description:"Known-flaky tests the phases' runners leave out until they are fixed (#4677). Each entry names the test, the issue that tracks the fix, the last day it stays out (until) and why. Each phase's runner gets its filter from chant ci quarantine filter --phase <name> --runner nextest|playwright|list, and chant ci quarantine check fails, as filter does, when an entry is past its until or the until is more than maxDays from today. A scheduled run of the quarantined tests alone, which no phase's patterns match, tells whether one is fixed. Read by chant 0.124.63 and newer, so a declaration that sets it sets minReader to 0.124.63 or newer.",properties:{maxDays:{type:"integer",minimum:1,description:"How many days from today an entry's until may be, at most. 14 when absent."},phases:{type:"object",minProperties:1,description:"The quarantined tests by phase. Each phase must be a declared phase.",propertyNames:{$ref:"#/$defs/ciPhaseName"},additionalProperties:{type:"array",minItems:1,items:{type:"object",required:["test","issue","until","why"],properties:{test:{type:"string",minLength:1,description:"The test, as its runner names it. nextest: the binary id, a space and the test's name, as nextest prints them, or the test's name alone for any binary. Playwright: the test's title, with file set."},file:{type:"string",minLength:1,description:"The file the test is in, from the runner's test directory: for Playwright the spec's path from testDir, as Playwright prints it."},issue:{type:"string",pattern:"^(#?[0-9]+|https?://\\S+)$",description:"The issue that tracks the fix: a number or a URL."},until:{type:"string",pattern:"^[0-9]{4}-[0-9]{2}-[0-9]{2}$",description:"The last day the test stays out, YYYY-MM-DD, UTC."},why:{type:"string",minLength:1,description:"One line: how it fails."}},patternProperties:{"^x-":!0},additionalProperties:!1}}}},patternProperties:{"^x-":!0},additionalProperties:!1},lanes:{type:"object",minProperties:1,description:"Green lanes (#4662): named subsets of the phases, each with tags of its own, for a deployable that needs only some of them. A commit that passes a lane's phases gets ci/green-<lane>/<sha>, and a lane-green commit that later fails one gets ci/revoked-<lane>/<sha>, judged by the same tick from the same runs as require, with no runs of their own; the bisect and the retry stay per phase. ci/green/<sha> still follows require. chant ci last-green --lane <name> and chant ci base --lane <name> read a lane. A signed lane tag's statement names its lane, so it never counts as another lane's tag or as ci/green. Added in schema 1 by chant 0.124.61, so a declaration that uses it sets minReader to 0.124.61 or newer.",propertyNames:{type:"string",pattern:"^[a-z0-9][a-z0-9-]*$"},additionalProperties:{type:"object",required:["require"],properties:{require:{type:"array",minItems:1,uniqueItems:!0,description:"The phases a commit must pass to be green in this lane, by name. Each must be a declared phase.",items:{$ref:"#/$defs/ciPhaseName"}}},patternProperties:{"^x-":!0},additionalProperties:!1}},source:{enum:["checks","runs"],description:"Added by #4044, read by chant 0.124.28 and newer, so a declaration that sets it sets minReader to 0.124.28 or newer. Where chant ci tick reads each phase's results. checks (the default): the forge's check runs, whose names the phases' patterns match. runs: chant's own Op runs, read from the run ledger on chant/lifecycle, for a project whose pipelines run as chant Ops, such as one on GitLab or Forgejo. A phase's patterns then match Op names, a run counts for the commit its record names as gitSha, and the latest run of each Op decides. A run counts only when its record carries a statement signed by a key .chant/trust.json at base lists under runners for a principal holding the runner role; the tick ignores and reports any other. A tick from runs signs every tag it makes, so it needs a runner key."}},patternProperties:{"^x-":!0},additionalProperties:!1},ciWorkflow:{enum:["trunk-curated","trunk-curated+apply-on-merge","apply-before-merge"],description:"A prescribed delivery workflow (#4168). trunk-curated: a merge records the plan and deploys nothing; releases are cut from green commits and promoted through each member's environments, gated in the last. trunk-curated+apply-on-merge: the same, with the apply on merge turned back on. apply-before-merge (#4301, ws-106): the same as trunk-curated, and a person may also apply an open pull request's plan from its head under its gate, once it is approved, mergeable, undiverged and its checks passed (chant components pr-apply --before-merge); added by chant 0.124.42, so a declaration that uses it sets minReader to 0.124.42 or newer. chant workspace check reports what a member under one still lacks (WSP151), and chant ci init writes it. At the top level for every member, or on a member, which wins. Added in schema 1 by chant 0.124.34, so a declaration that uses it sets minReader to 0.124.34 or newer."},ciLockGrain:{enum:["target","resource","repo"],description:"What one apply holds while it applies (#4552). target: the component, root or stack; the engine's own lock keeps one target's applies apart. resource: a lease on one row per changed resource, in _locks/rows/<gate>.json at the root of chant/lifecycle, taken before the apply and released after, and under ci.locks a pull request locks those row keys in place of its component names. A held row stops the apply with exit 5. repo: one apply at a time in the repository, which the generated pipeline keeps. Absent: each member takes its lexicon's default, resource for choudoufu and plunge and target for Terraform, tofu, Terragrunt and stock Pulumi, which refuse resource. At the top level for every member, or on a member, which wins. Read from the declaration at base. Added in schema 1 by chant 0.124.55, so a declaration that uses it sets minReader to 0.124.55 or newer."},ciHooks:{type:"object",description:"Stage hooks the pull-request jobs run (#4288), in the shape an Op waves spec's hooks take: before.observe, before.plan, after.plan, before.apply and after.apply, each a list of { command, name?, onFailure?, perRun?, targets? }. targets are component names or patterns. chant components pr-plan, pr-record and pr-apply read them from the declaration at base, the top level's first and then the member's. after.gate and apply.runBy are refused. Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer. check (#4556) is a list of hooks a product's check job runs through chant ci check, before any plan, with onFailure fail and no {plan}; added in schema 1 by chant 0.124.55, so a declaration that uses check sets minReader to 0.124.55 or newer."},ciPolicy:{type:"object",description:"Gate-time policy on the pull-request jobs (#4294): a policy engine run over the change set, with the policy read at base. engine names the result shape the command prints, conftest (the default) or opa. path is the policy directory, relative to the declaration (default policy). namespace is the package to read. command replaces the engine's own argv, with {policy} for the policy directory exported from base and {input} for the input file. deny rules refuse the apply unless an override counts; hold rules make the plan wait for a person's approval; warn rules are advice. There is no unattended outcome. source (#4613) is { repo, ref, path? }: a shared repository whose ref the job fetches, read in place of path, with the commit read recorded on the report and the wave's decision; path inside it defaults to policy, and path beside source is refused. packs (#4613) is a list of { dir, config? }: CrossGuard packs every pulumi-up preview runs, copied from the declaration's directory at base, or from the top of source when it is set. Added in schema 1 by chant 0.124.41, so a declaration that uses it sets minReader to 0.124.41 or newer; source and packs were added in schema 1 by chant 0.124.55, so a declaration that sets either sets minReader to 0.124.55 or newer. install (#4774) is true to fetch conftest or opa at the release chant pins, checked against its recorded sha256, when the engine is not on PATH; it is refused beside command. Read by chant 0.124.77 and newer, so a declaration that sets install sets minReader to 0.124.77 or newer."},ciPhaseName:{type:"string",pattern:"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$"},ciPhase:{oneOf:[{$ref:"#/$defs/ciRunPatterns"},{type:"object",required:["runs"],properties:{runs:{$ref:"#/$defs/ciRunPatterns"},skipped:{enum:["pass","fail"],description:"What a check run that finished as skipped counts as. fail (the default): it never passes. pass: it passes, for a job a path filter runs only on some commits."},build:{enum:["every","newest"],description:"Added by #4169, read by chant 0.124.33 and newer. Which first-parent commits of the branch the phase runs on. every (the default): each one. newest: only the newest commit when a runner frees. Under either, a run that was cancelled leaves the commit unbuilt rather than red. Under newest, a commit a newer run superseded is unbuilt too, and a red commit starts a bisect over the unbuilt commits back to the last one the phase passed on. chant ci workflow writes the triggers and concurrency of the workflows holding a phase that sets build, and leaves them alone for a phase that does not."}},patternProperties:{"^x-":!0},additionalProperties:!1}]},ciRunPatterns:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1,description:"A check run's name, such as lint, or a pattern with *, such as e2e (*)."}}}}});function mDe(e,t){return Object.keys(e??{}).filter(n=>gDe(e[n],t))}function xX(e,t){return t.map(n=>({member:n,branches:mDe(e,n)})).filter(n=>n.branches.length>1)}var $X,gDe,wF=x(()=>{"use strict";$X=et(yu(),1),gDe=(e,t)=>e.some(n=>(0,$X.default)(n)(t))});function SX(e){let t=[];for(let n of LE){let r=e[n]?.rules??[],o=new Set(r.map(i=>i.apply));r.forEach((i,s)=>{let a=`/ci/identity/cloud/${n}/rules/${s}`;if(i.plan===i.apply?t.push({pointer:a,message:`ci.identity.cloud.${n}.rules[${s}] plans and applies as ${i.plan}; the plan runs the pull request's code, so give it an identity of its own`}):o.has(i.plan)&&t.push({pointer:a,message:`ci.identity.cloud.${n}.rules[${s}] plans as ${i.plan}, which another rule applies as; the plan runs the pull request's code, so give it an identity no rule applies as`}),n==="pulumi")for(let c of["plan","apply"])vDe(i[c])||t.push({pointer:`${a}/${c}`,message:`ci.identity.cloud.pulumi.rules[${s}].${c} is ${JSON.stringify(i[c])}; a Pulumi Cloud identity is team:<name>, user:<login>, organization or organization:admin`})})}return t}function vDe(e){let t=/^(team|user):([^\s:]+)$/.exec(e);if(t)return{tokenType:`urn:pulumi:token-type:access_token:${t[1]==="team"?"team":"personal"}`,scope:e};if(e==="organization")return{tokenType:"urn:pulumi:token-type:access_token:organization"};if(e==="organization:admin")return{tokenType:"urn:pulumi:token-type:access_token:organization",scope:"admin"}}function kDe(e){return`CHANT_ID_TOKEN_${e.toUpperCase()}`}var hDe,LE,yDe,wDe,bDe,bF,jbt,RDe,$De,Lbt,EX=x(()=>{"use strict";hDe=["aws","gcp","azure"],LE=[...hDe,"pulumi"],yDe="https://ossrdbms-aad.database.windows.net/.default",wDe="AZURE_DATABASE_ACCESS_TOKEN",bDe={aws:"role",gcp:"serviceAccount",azure:"clientId",pulumi:"token"};bF="CHANT_CLOUD_TRADE";jbt=["ACTIONS_ID_TOKEN_REQUEST_TOKEN","ACTIONS_ID_TOKEN_REQUEST_URL",...LE.map(kDe),bF],RDe="CHANT_CLOUD_TARGETS",$De="CHANT_CLOUD_TRADED",Lbt=['const fs=require("fs");',"const [out,format]=process.argv.slice(1);","const Q=String.fromCharCode(39);",'const fail=(m)=>{console.error("chant: the OIDC trade failed: "+m);process.exit(1)};',`let spec;try{spec=JSON.parse(process.env.${bF}||"")}catch{fail("${bF} is not JSON")}`,'const clean=(v)=>typeof v==="string"&&/^[\\x21-\\x7e]+$/.test(v);','const trim=(u)=>String(u).replace(/\\/+$/,"");','const post=async(url,headers,body)=>{const r=await fetch(url,{method:"POST",headers,body});const t=await r.text();if(!r.ok)throw new Error(url+" answered "+r.status+": "+t.slice(0,200).replace(/\\s+/g," "));return t};','const json=(t,what)=>{try{return JSON.parse(t)}catch{throw new Error(what+" answered with no JSON")}};',"const idToken=async(cloud,aud)=>{",'const named=process.env["CHANT_ID_TOKEN_"+cloud.toUpperCase()];if(named)return named;',"const u=process.env.ACTIONS_ID_TOKEN_REQUEST_URL,k=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;",'if(!u||!k)throw new Error("the job can request no OIDC token for "+cloud+": it needs id-token: write, and a pull request from a fork gets none");','const r=await fetch(u+(u.includes("?")?"&":"?")+"audience="+encodeURIComponent(aud),{headers:{authorization:"bearer "+k,accept:"application/json"}});','if(!r.ok)throw new Error("the OIDC token request answered "+r.status);','const v=json(await r.text(),"the OIDC token request").value;if(!clean(v))throw new Error("the OIDC token request gave no token");return v};',`const KEY=${JSON.stringify(bDe)};`,'const ids=(c)=>{const s=spec[c],l=[];if(s[KEY[c]])l.push(s[KEY[c]]);for(const t of s.targets||[])if(!l.includes(t[KEY[c]]))l.push(t[KEY[c]]);if(!l.length)throw new Error(c+" names no identity");return l};',"const vars={},secrets=[],said=[],by={};","const run=async()=>{",'if(spec.aws){const a=spec.aws;const tok=await idToken("aws",a.audience);by.aws={};','const ep=trim(a.endpoint||process.env.AWS_ENDPOINT_URL_STS||("https://sts."+a.region+".amazonaws.com"+(a.region.startsWith("cn-")?".cn":"")));','for(const role of ids("aws")){','const t=await post(ep+"/",{"content-type":"application/x-www-form-urlencoded",accept:"application/xml"},new URLSearchParams({Action:"AssumeRoleWithWebIdentity",Version:"2011-06-15",RoleArn:role,RoleSessionName:"chant-"+(process.env.GITHUB_RUN_ID||process.env.CI_JOB_ID||"job"),WebIdentityToken:tok}).toString());','const g=(k)=>{const m=new RegExp("<"+k+">([^<]+)</"+k+">").exec(t);return m?m[1].trim():undefined};','const id=g("AccessKeyId"),key=g("SecretAccessKey"),st=g("SessionToken");if(!clean(id)||!clean(key)||!clean(st))throw new Error("STS gave no credentials for "+role);',"by.aws[role]={AWS_ACCESS_KEY_ID:id,AWS_SECRET_ACCESS_KEY:key,AWS_SESSION_TOKEN:st,AWS_REGION:a.region,AWS_DEFAULT_REGION:a.region};secrets.push(key,st);said.push(role)}","if(a.role)Object.assign(vars,by.aws[a.role])}",'if(spec.gcp){const c=spec.gcp;const tok=await idToken("gcp",c.audience);by.gcp={};','const sts=trim(c.stsEndpoint||"https://sts.googleapis.com"),iam=trim(c.iamEndpoint||"https://iamcredentials.googleapis.com");','const fed=json(await post(/\\/token$/.test(sts)?sts:sts+"/v1/token",{"content-type":"application/json"},JSON.stringify({grantType:"urn:ietf:params:oauth:grant-type:token-exchange",audience:"//iam.googleapis.com/"+c.provider,scope:"https://www.googleapis.com/auth/cloud-platform",requestedTokenType:"urn:ietf:params:oauth:token-type:access_token",subjectToken:tok,subjectTokenType:"urn:ietf:params:oauth:token-type:jwt"})),"Google STS").access_token;','if(!clean(fed))throw new Error("Google STS gave no token");','for(const sa of ids("gcp")){','const at=json(await post(iam+"/v1/projects/-/serviceAccounts/"+encodeURIComponent(sa)+":generateAccessToken",{"content-type":"application/json",authorization:"Bearer "+fed},JSON.stringify({scope:["https://www.googleapis.com/auth/cloud-platform"]})),"IAM credentials").accessToken;','if(!clean(at))throw new Error("IAM credentials gave no token for "+sa);',"by.gcp[sa]={GOOGLE_OAUTH_ACCESS_TOKEN:at,CLOUDSDK_AUTH_ACCESS_TOKEN:at};secrets.push(at);said.push(sa)}","if(c.serviceAccount)Object.assign(vars,by.gcp[c.serviceAccount])}",'if(spec.azure){const z=spec.azure;const tok=await idToken("azure",z.audience);by.azure={};','const host=trim(z.authority||"https://login.microsoftonline.com");','for(const cid of ids("azure")){','const at=json(await post(host+"/"+encodeURIComponent(z.tenantId)+"/oauth2/v2.0/token",{"content-type":"application/x-www-form-urlencoded"},new URLSearchParams({client_id:cid,scope:"https://management.azure.com/.default",grant_type:"client_credentials",client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",client_assertion:tok}).toString()),"Entra").access_token;','if(!clean(at))throw new Error("Entra gave no token for "+cid);',`let db;if(z.database){db=json(await post(host+"/"+encodeURIComponent(z.tenantId)+"/oauth2/v2.0/token",{"content-type":"application/x-www-form-urlencoded"},new URLSearchParams({client_id:cid,scope:${JSON.stringify(yDe)},grant_type:"client_credentials",client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer",client_assertion:tok}).toString()),"Entra").access_token;if(!clean(db))throw new Error("Entra gave no database token for "+cid);secrets.push(db)}`,`by.azure[cid]={AZURE_ACCESS_TOKEN:at,AZURE_CLIENT_ID:cid,AZURE_TENANT_ID:z.tenantId,ARM_CLIENT_ID:cid,ARM_TENANT_ID:z.tenantId,...(z.subscriptionId?{AZURE_SUBSCRIPTION_ID:z.subscriptionId,ARM_SUBSCRIPTION_ID:z.subscriptionId}:{}),...(db?{${wDe}:db}:{})};secrets.push(at);said.push(cid)}`,"if(z.clientId)Object.assign(vars,by.azure[z.clientId])}",'if(spec.pulumi){const p=spec.pulumi;const tok=await idToken("pulumi",p.audience);by.pulumi={};','const api=trim(p.apiUrl||"https://api.pulumi.com");','for(const id of ids("pulumi")){','const m=/^(team|user):([^\\s:]+)$/.exec(id),org=id==="organization"||id==="organization:admin";if(!m&&!org)throw new Error("Pulumi Cloud has no token for "+id);','const f={audience:"urn:pulumi:org:"+p.organization,grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token_type:"urn:ietf:params:oauth:token-type:id_token",requested_token_type:"urn:pulumi:token-type:access_token:"+(m?(m[1]==="team"?"team":"personal"):"organization"),subject_token:tok};','if(m)f.scope=id;else if(id==="organization:admin")f.scope="admin";','const at=json(await post(api+"/api/oauth/token",{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},new URLSearchParams(f).toString()),"Pulumi Cloud").access_token;','if(!clean(at))throw new Error("Pulumi Cloud gave no token for "+id);','by.pulumi[id]={PULUMI_ACCESS_TOKEN:at,...(p.apiUrl?{PULUMI_BACKEND_URL:api}:{})};secrets.push(at);said.push("Pulumi Cloud "+id)}',"if(p.token)Object.assign(vars,by.pulumi[p.token])}","const clouds=Object.keys(by);if(clouds.some((c)=>(spec[c].targets||[]).length>0)){","const doc={version:1,clouds:{}};for(const c of clouds){const s=spec[c];doc.clouds[c]={...(s[KEY[c]]?{default:s[KEY[c]]}:{}),targets:(s.targets||[]).map((t)=>({targets:t.targets,identity:t[KEY[c]]})),vars:by[c]}}",'const tf=trim(process.env.RUNNER_TEMP||process.env.TMPDIR||"/tmp")+"/chant-cloud-targets-"+require("crypto").randomBytes(8).toString("hex")+".json";',`fs.writeFileSync(tf,JSON.stringify(doc),{mode:0o600,flag:"wx"});vars.${RDe}=tf}`,`if(clouds.length)vars.${$De}=clouds.join(",");`,'for(const [k,v] of Object.entries(vars))if(!clean(v))throw new Error(k+" is not a value the job can hold");','if(format==="github-env"){for(const s of secrets)console.log("::add-mask::"+s);fs.appendFileSync(out,Object.entries(vars).map(([k,v])=>k+"="+v+"\\n").join(""))}','else{const sh=Object.entries(vars).map(([k,v])=>"export "+k+"="+Q+v.split(Q).join(Q+"\\\\"+Q+Q)+Q+"\\n").join("");if(out==="-")process.stdout.write(sh);else fs.writeFileSync(out,sh,{mode:0o600})}','for(const s of said)console.error("chant: traded the job\\u0027s OIDC token for "+s)};',"run().catch((e)=>fail(e&&e.message?e.message:String(e)));"].join("")});var vF={};me(vF,{gitTop:()=>hs,gitTree:()=>Xs,joinPath:()=>je,resolveCommit:()=>_w,skippedDir:()=>eo,workingTree:()=>On});import{execFileSync as AX}from"node:child_process";import{readdirSync as xDe,readFileSync as OX,statSync as PX}from"node:fs";import{join as Cw}from"node:path";function je(...e){return e.filter(t=>t!==""&&t!==".").join("/")}function On(e){return{label:"",stat(t){try{let n=PX(Cw(e,t));return n.isDirectory()?"dir":n.isFile()?"file":void 0}catch{return}},list(t){let n;try{n=xDe(Cw(e,t),{withFileTypes:!0})}catch{return}let r=[];for(let o of n){let i=o.isDirectory()?"dir":o.isFile()?"file":void 0;if(!i&&o.isSymbolicLink())try{let s=PX(Cw(e,t,o.name));i=s.isDirectory()?"dir":s.isFile()?"file":void 0}catch{}i&&r.push({name:o.name,type:i})}return r},read(t){return OX(Cw(e,t),"utf-8")},bytes(t){return OX(Cw(e,t))}}}function ME(e,t){return AX("git",t,{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","pipe"],maxBuffer:512*1024*1024})}function hs(e){try{return ME(e,["rev-parse","--show-toplevel"]).trim()}catch{return}}function _w(e,t){if(!t.startsWith("-"))try{return ME(e,["rev-parse","--verify","--quiet",`${t}^{commit}`]).trim()}catch{return}}function Xs(e,t,n=""){let r=new Map([["","dir"]]),o=new Map([["",[]]]),i=ME(e,["ls-tree","-r","-t","-z","--full-tree",t]);for(let s of i.split("\0")){if(!s)continue;let a=s.indexOf(" "),c=s.slice(0,a).split(" ")[1],l=s.slice(a+1),d;if(n==="")d=l;else if(l.startsWith(`${n}/`))d=l.slice(n.length+1);else continue;let u=c==="tree"?"dir":c==="blob"?"file":void 0;if(!u)continue;r.set(d,u);let p=d.lastIndexOf("/"),f=p<0?"":d.slice(0,p);o.has(f)||o.set(f,[]),o.get(f).push({name:d.slice(p+1),type:u}),u==="dir"&&!o.has(d)&&o.set(d,[])}return{label:` at ${t.slice(0,8)}`,stat:s=>r.get(s),list:s=>r.get(s)==="dir"?[...o.get(s)??[]]:void 0,read(s){if(r.get(s)!=="file")throw new Error(`${s} is not a file${` at ${t.slice(0,8)}`}`);return ME(e,["cat-file","blob",`${t}:${je(n,s)}`])},bytes(s){if(r.get(s)!=="file")throw new Error(`${s} is not a file${` at ${t.slice(0,8)}`}`);return AX("git",["cat-file","blob",`${t}:${je(n,s)}`],{cwd:e,stdio:["ignore","pipe","pipe"],maxBuffer:512*1024*1024})}}}function eo(e){return e==="node_modules"||e.startsWith(".")}var Vt=x(()=>{"use strict"});function _X(e,t){let r=t.split("/").map(a=>a==="**"?"**":SDe(a)?a:(0,CX.default)(a,{dot:!1})),o=new Set,i=a=>(e.list(a)??[]).filter(c=>c.type==="dir"&&!eo(c.name)).map(c=>c.name),s=(a,c)=>{if(c===r.length){a!==""&&o.add(a);return}let l=r[c];if(l==="**"){s(a,c+1);for(let d of i(a))s(je(a,d),c);return}if(typeof l=="string"){let d=je(a,l);e.stat(d)==="dir"&&s(d,c+1);return}for(let d of i(a))l(d)&&s(je(a,d),c+1)};return s("",0),[...o].sort()}var CX,SDe,IX=x(()=>{"use strict";CX=et(yu(),1);Vt();SDe=e=>!/[*?[\]{}()!+@]/.test(e)});var kF,TX=x(()=>{kF={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://intentius.io/chant/schemas/workspace/kinds/v1/workspace-kinds.schema.json",title:"workspace-kinds.json",description:"Member kinds a plugin supplies (#2524 D3, #2535, ws-031). A package publishes this file as data at its ./workspace-kinds subpath. chant reads it with the file system and never imports the package, so reading kinds never loads a lexicon.",type:"object",required:["schema","kinds"],properties:{$schema:{type:"string",description:"An editor hint. chant ignores it."},$comment:{type:"string",description:"A note for people. chant ignores it."},schema:{const:1,description:"The kinds format version."},kinds:{type:"array",minItems:1,items:{$ref:"#/$defs/kind"}}},patternProperties:{"^x-":!0},additionalProperties:!1,$defs:{kind:{type:"object",required:["name","description","precedence","probe"],properties:{name:{type:"string",pattern:"^[a-z][a-z0-9-]{0,39}$",description:"The kind's name, as a member's kind field names it. chant, workspace, repo, design, other and examples are built in and can't be supplied."},description:{type:"string",minLength:1,description:"One line saying what the member's directory holds, for listings and error messages."},precedence:{type:"integer",minimum:1,maximum:999,description:"When the probes of several kinds claim one directory, the highest precedence decides. Two claiming kinds with the same highest precedence are a tie, and a tie fails. The built-in chant kind has 500 and workspace has 1000."},probe:{$ref:"#/$defs/probe"},outputs:{type:"array",uniqueItems:!0,description:"The outputs every member of this kind exposes as link targets (#2524 D6, #2539). A member entry of the kind may list more in its own outputs field. Without this field the kind exposes only what each entry lists.",items:{type:"string",minLength:1,maxLength:255,pattern:"^[^\\u0000-\\u001f]+$"}},graph:{$ref:"#/$defs/graph"},drift:{$ref:"#/$defs/drift"},fields:{$ref:"#/$defs/fields"},reader:{type:"string",pattern:"^[a-z][a-z0-9-]{0,39}$",description:"A link reader chant ships, by name, that derives a member's links from the member's own files (#3932): dbt-project reads a dbt project's sources; goose-dir, golang-migrate-dir, clickhouse-migrations-dir and flyway-dir list a migrations directory in order (#4400). The reader is chant's code and runs offline, parsing files as data; the package supplies only the name. A name this chant doesn't have keeps the kind without a reader, and the load reports it. A chant older than this field fails a kinds file that uses it."},memberFile:{$ref:"#/$defs/memberFile"}},patternProperties:{"^x-":!0},additionalProperties:!1},probe:{type:"object",description:"What the probe checks in a member's directory. It runs no code. It passes when any of its clauses does, and it needs at least one.",minProperties:1,properties:{anyFile:{type:"array",minItems:1,uniqueItems:!0,description:"The directory passes when a file matching one of these names sits directly in it. A * in a name matches any run of characters, so *.tf matches every Terraform file.",items:{$ref:"#/$defs/fileName"}},anyBlock:{type:"object",description:"The directory passes when a file directly in it, whose name matches one of in, has a line opening an unlabelled block named in blocks: leading space, the name, optional space, then {. No file is parsed.",required:["in","blocks"],properties:{in:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/fileName"}},blocks:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",pattern:"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"}}},additionalProperties:!1},anyJsonKey:{type:"object",description:"The directory passes when a file directly in it, whose name matches one of in, parses as JSON and has a value at one of pointers, each a JSON Pointer such as /scripts/start (#3151). A file that is not JSON is no evidence either way. Added by chant 0.103.0.",required:["in","pointers"],properties:{in:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/fileName"}},pointers:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",pattern:"^(/[^/]+)+$"}}},additionalProperties:!1},anyLine:{type:"object",description:"The directory passes when a file directly in it, whose name matches one of in, has a line that starts with one of starts, after leading space and ignoring case (#4400). A goose directory is found by -- +goose Up. Added by the chant that adds the goose-dir reader.",required:["in","starts"],properties:{in:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/fileName"}},starts:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1}}},additionalProperties:!1},anyDocument:{type:"object",description:'The directory passes when a file directly in it, whose name matches one of in, parses as YAML or JSON and one of its documents satisfies an entry of match (#3179). An entry maps JSON Pointers to the values allowed there, all of which must hold; a * in a value matches any run of characters, so ["*"] means the pointer has a value. A file that does not parse is no evidence either way.',required:["in","match"],properties:{in:{type:"array",minItems:1,uniqueItems:!0,items:{$ref:"#/$defs/fileName"}},match:{type:"array",minItems:1,items:{type:"object",minProperties:1,propertyNames:{pattern:"^(/[^/]+)+$"},additionalProperties:{type:"array",minItems:1,uniqueItems:!0,items:{type:"string",minLength:1}}}}},additionalProperties:!1}},additionalProperties:!1},fileName:{type:"string",description:"A file name, with no directory part. A * matches any run of characters, and [0-9] one digit.",pattern:"^(?!\\.\\.?$)[^/\\\\]+$"},graph:{type:"object",description:"How chant workspace graph reads a member of this kind (#2874, #4413). chant writes a reader project of its own outside the workspace and runs the member's chant graph there. The project either declares a lexicon and puts config under that lexicon's key (lexicon), or names a graph reader module the supplying package ships (reader). In every string key and value of config, {member} becomes the member's name, {dir} its absolute directory and {workspace} the absolute workspace root. Without this field a member of the kind is listed with kind-not-run.",properties:{lexicon:{type:"string",pattern:"^[a-z][a-z0-9-]{0,39}$",description:"The lexicon that reads the member, by name. The package that supplies the kind must be @intentius/chant-lexicon-<lexicon>, so the lexicon chant loads is the one the declaration pins. Not with reader."},reader:{type:"string",pattern:"^(?!/)(?!.*\\.\\.)(?!.*\\\\)[^\\u0000-\\u001f]+$",description:"A graph reader module, as a path inside the supplying package (#4413): an ES module whose default export is (input: { dir, config }) => GraphIR. The member's own chant graph loads it in the reader project, so it runs under the member's toolchain, and it must only read files. Any package may supply it, not only a lexicon. Not with lexicon. A chant older than this field can't read a kinds file that uses it."},config:{type:"object",description:"With lexicon, the lexicon's config namespace for the reader project, such as terraform's roots. With reader, the config object the module is called with (optional). Placeholders are substituted; nothing else is interpreted."}},if:{properties:{reader:!0},required:["reader"]},then:{not:{properties:{lexicon:!0},required:["lexicon"]}},else:{properties:{lexicon:!0,config:!0},required:["lexicon","config"]},patternProperties:{"^x-":!0},additionalProperties:!1},drift:{type:"object",description:"How chant workspace drift --member reads a member of this kind (#5068): a drift reader module the supplying package ships, called with the member's directory and config. In every string key and value of config, {member} becomes the member's name, {dir} its absolute directory and {workspace} the absolute workspace root, as in graph. Without this field a member of the kind answers no-drift-read. A chant older than this field can't read a kinds file that uses it.",required:["reader"],properties:{reader:{type:"string",pattern:"^(?!/)(?!.*\\.\\.)(?!.*\\\\)[^\\u0000-\\u001f]+$",description:"A drift reader module, as a path inside the supplying package: an ES module whose default export is (input: { dir, config, member, observedAt, read?, resource?, stack? }) => DriftReaderOutput, sync or async, the lines of each read it ran or a refusal (drift-reader.schema.json). chant workspace drift imports it in its own process, with the process's environment, so the reader brings its own credentials; chant makes no call of its own for it."},config:{type:"object",description:"The config object the module is called with (optional). Placeholders are substituted; nothing else is interpreted."}},patternProperties:{"^x-":!0},additionalProperties:!1},fields:{type:"object",description:"The fields a member entry of this kind may set under its own fields block, each with a type and, optionally, a default (#3151). chant workspace check fails a member whose fields name one the kind doesn't declare or give a value of the wrong type (WSP005), and chant workspace status --json prints every declared field with the defaults filled in. Added by chant 0.103.0; an older chant can't read a kinds file that uses it.",minProperties:1,propertyNames:{$ref:"#/$defs/fieldName"},additionalProperties:{oneOf:[{$ref:"#/$defs/scalarField"},{$ref:"#/$defs/objectField"}]}},fieldName:{type:"string",pattern:"^[a-z][A-Za-z0-9]{0,39}$"},scalarField:{type:"object",required:["type","description"],properties:{type:{enum:["string","integer","boolean"]},description:{type:"string",minLength:1},default:{oneOf:[{type:"string"},{type:"integer"},{type:"boolean"}],description:"The value a member that doesn't set the field gets. Its type is the field's. Without it the field reads as null when unset."},pattern:{type:"string",minLength:1,description:"For a string field: a regular expression the value must match."}},additionalProperties:!1},objectField:{type:"object",required:["type","description","properties"],properties:{type:{const:"object"},description:{type:"string",minLength:1},properties:{type:"object",minProperties:1,propertyNames:{$ref:"#/$defs/fieldName"},additionalProperties:{$ref:"#/$defs/scalarField"},description:"The object's own fields, each a string, integer or boolean field. A member sets any of them; the rest take their defaults."}},additionalProperties:!1},memberFile:{type:"object",description:"A file every member of this kind has, and the JSON Schema it must pass (#3672). chant workspace check reads the file from the member's directory, parses it as YAML when its name ends in .yml or .yaml and as JSON otherwise, and validates it against the schema (WSP012). The schema is a JSON file inside the supplying package, read as data with draft 2020-12. A chant older than this field fails a kinds file that uses it.",required:["path","schema"],properties:{path:{type:"string",description:"The file, relative to the member's directory, such as terragucci.yml. Forward slashes; no .. segment and no leading /.",pattern:"^(?!/)(?!.*(^|/)\\.\\.?(/|$))[^\\\\]+$"},schema:{type:"string",description:"The JSON Schema the file must pass, relative to the supplying package's directory, such as schemas/terragucci.schema.json. It must be a .json file inside the package.",pattern:"^(?!/)(?!.*(^|/)\\.\\.?(/|$))[^\\\\]+\\.json$"}},patternProperties:{"^x-":!0},additionalProperties:!1}}}});function DX(e){return e===FE||e.endsWith(`/${FE}`)}var FE,zbt,RF=x(()=>{"use strict";FE=".chant/work",zbt=`/${FE}/`});import{createHash as $F}from"node:crypto";import{lstatSync as ODe,readdirSync as PDe,readFileSync as NX}from"node:fs";import{join as jX}from"node:path";function CDe(e){let t=ADe.exec(e);return t?{algorithm:t[1],digest:t[2]}:void 0}function LX(e,t,n){for(let r of PDe(e,{withFileTypes:!0})){let o=t===""?r.name:`${t}/${r.name}`;if(r.isSymbolicLink())throw new cg(`${o} is a symbolic link, which a pinned plugin may not contain`);r.isDirectory()?!_De.has(r.name)&&!DX(o)&&LX(jX(e,r.name),o,n):r.isFile()&&n.push(o)}}function IDe(e){let t=[];return LX(e,"",t),t.sort((n,r)=>n<r?-1:n>r?1:0)}function TDe(e,t="sha256"){let n;try{n=ODe(e)}catch{throw new cg("it does not exist")}if(n.isSymbolicLink())throw new cg("it is a symbolic link, which a pinned plugin may not be");if(n.isFile())return{integrity:`${t}-${$F(t).update(NX(e)).digest("base64")}`,files:1};let r=IDe(e),o=r.map(i=>`${$F(t).update(NX(jX(e,...i.split("/")))).digest("hex")} ${i}
55
55
  `).join("");return{integrity:`${t}-${$F(t).update(o,"utf8").digest("base64")}`,files:r.length}}function MX(e,t,n){let r=CDe(t);if(!r)return{ok:!1,message:`${n}: integrity ${JSON.stringify(t)} is not sha256-, sha384- or sha512- and a base64 digest`};let o;try{o=TDe(e,r.algorithm).integrity}catch(i){if(!(i instanceof cg))throw i;return{ok:!1,message:`${n}: can't check its integrity, ${i.message}`}}return o===t?{ok:!0}:{ok:!1,message:`${n}: integrity mismatch, so nothing is read from it. The pin says ${t} and the plugin hashes to ${o}. If the change is intended, run \`chant workspace pin ${n}\` and put the value it prints in the pin; otherwise restore the plugin`}}var ADe,_De,cg,FX=x(()=>{"use strict";RF();ADe=/^(sha(?:256|384|512))-([A-Za-z0-9+/]+={0,2})$/;_De=new Set(["node_modules",".git"]),cg=class extends Error{}});import{createHash as xF,createPublicKey as DDe,verify as NDe}from"node:crypto";function SF(e){let t=e;return!!t&&typeof t=="object"&&!Array.isArray(t)&&["id","clientDataJSON","authenticatorData","signature"].every(n=>typeof t[n]=="string"&&jDe.test(t[n]))}function lg(e){return xF("sha256").update(e).digest("base64url")}function WX(e){let t;try{t=DDe({key:Buffer.from(e,"base64url"),format:"der",type:"spki"})}catch(n){return{problem:`the public key is not a DER SubjectPublicKeyInfo: ${n instanceof Error?n.message:String(n)}`}}return t.asymmetricKeyType==="ed25519"?{key:t,alg:"EdDSA"}:t.asymmetricKeyType==="ec"&&t.asymmetricKeyDetails?.namedCurve==="prime256v1"?{key:t,alg:"ES256"}:t.asymmetricKeyType==="rsa"?{key:t,alg:"RS256"}:{problem:`a ${t.asymmetricKeyType}${t.asymmetricKeyDetails?.namedCurve?` ${t.asymmetricKeyDetails.namedCurve}`:""} key; a passkey is Ed25519, P-256 or RSA`}}function Iw(e,t,n){try{let r=n.find(p=>LDe(p.id,e.id));if(!r)return{ok:!1,reason:`signed by passkey ${e.id}, which the policy at base does not list for the approver`};let o=Buffer.from(e.clientDataJSON,"base64url"),i;try{i=JSON.parse(o.toString("utf-8"))}catch{return{ok:!1,reason:"its clientDataJSON is not JSON"}}if(i.type!=="webauthn.get")return{ok:!1,reason:`its client data is a ${JSON.stringify(i.type)} ceremony, not webauthn.get`};if(i.challenge!==lg(t))return{ok:!1,reason:"its challenge is not this approval's statement digest"};if(typeof i.origin!="string"||!r.origins.includes(i.origin))return{ok:!1,reason:`it comes from origin ${JSON.stringify(i.origin)}, and the passkey allows ${r.origins.join(", ")}`};if(i.crossOrigin===!0)return{ok:!1,reason:"it was made in a cross-origin frame"};let s=Buffer.from(e.authenticatorData,"base64url");if(s.length<37)return{ok:!1,reason:"its authenticatorData is shorter than 37 bytes"};if(!s.subarray(0,32).equals(xF("sha256").update(r.rpId,"utf-8").digest()))return{ok:!1,reason:`its rpIdHash is not SHA-256 of ${r.rpId}`};let a=s[32];if(!(a&1))return{ok:!1,reason:"the user-present flag is unset"};if(!(a&4))return{ok:!1,reason:"the user-verified flag is unset"};let c=WX(r.publicKey);if("problem"in c)return{ok:!1,reason:`passkey ${r.id}: ${c.problem}`};let l=Buffer.concat([s,xF("sha256").update(o).digest()]),d=Buffer.from(e.signature,"base64url");return NDe(c.alg==="EdDSA"?null:"sha256",l,c.key,d)?{ok:!0,key:r.id}:{ok:!1,reason:"the signature does not match the signed fields"}}catch(r){return{ok:!1,reason:r instanceof Error?r.message:String(r)}}}var jDe,LDe,EF=x(()=>{"use strict";jDe=/^[A-Za-z0-9_-]+={0,2}$/;LDe=(e,t)=>e.replace(/=+$/,"")===t.replace(/=+$/,"")});import{createHash as MDe,createPublicKey as OF,verify as PF}from"node:crypto";function jw(e){let t=e.carriedFrom;if(t===void 0)return e;let{carriedFrom:n,checkpointDigest:r,...o}=e;return{...o,op:t.op,gate:t.gate,timestamp:t.timestamp,...t.checkpointDigest!==void 0?{checkpointDigest:t.checkpointDigest}:{}}}function xl(e){return e.binding!==void 0?3:(e.carriedFrom!==void 0?e.carriedFrom.checkpointDigest:e.checkpointDigest)!==void 0?2:1}function to(e){let t=jw(e),n=t.relayedBy!==void 0?`
@@ -103,7 +103,7 @@ ${e.timestamp}`,"utf-8")}function UDe(e,t,n){let r=`the approval of gate ${n.gat
103
103
  `+I.slice(ue+1):Ne+=I.slice(he),Ne.slice(1)}function Mn(I){let Y="",oe=0;for(let fe=0;fe<I.length;oe>=65536?fe+=2:fe++){oe=Pe(I,fe);let he=A[oe];!he&&se(oe)?(Y+=I[fe],oe>=65536&&(Y+=I[fe+1])):Y+=he||J(oe)}return Y}function hr(I,Y,oe){let fe="",he=I.tag;for(let ke=0,ue=oe.length;ke<ue;ke+=1){let Ae=oe[ke];I.replacer&&(Ae=I.replacer.call(oe,String(ke),Ae)),(q(I,Y,Ae,!1,!1)||typeof Ae>"u"&&q(I,Y,null,!1,!1))&&(fe!==""&&(fe+=","+(I.condenseFlow?"":" ")),fe+=I.dump)}I.tag=he,I.dump="["+fe+"]"}function qr(I,Y,oe,fe){let he="",ke=I.tag;for(let ue=0,Ae=oe.length;ue<Ae;ue+=1){let Ne=oe[ue];I.replacer&&(Ne=I.replacer.call(oe,String(ue),Ne)),(q(I,Y+1,Ne,!0,!0,!1,!0)||typeof Ne>"u"&&q(I,Y+1,null,!0,!0,!1,!0))&&((!fe||he!=="")&&(he+=U(I,Y)),I.dump&&a===I.dump.charCodeAt(0)?he+="-":he+="- ",he+=I.dump)}I.tag=ke,I.dump=he||"[]"}function _r(I,Y,oe){let fe="",he=I.tag,ke=Object.keys(oe);for(let ue=0,Ae=ke.length;ue<Ae;ue+=1){let Ne="";fe!==""&&(Ne+=", "),I.condenseFlow&&(Ne+='"');let Ve=ke[ue],Ze=oe[Ve];I.replacer&&(Ze=I.replacer.call(oe,Ve,Ze)),q(I,Y,Ve,!1,!1)&&(I.dump.length>1024&&(Ne+="? "),Ne+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),q(I,Y,Ze,!1,!1)&&(Ne+=I.dump,fe+=Ne))}I.tag=he,I.dump="{"+fe+"}"}function rl(I,Y,oe,fe){let he="",ke=I.tag,ue=Object.keys(oe);if(I.sortKeys===!0)ue.sort();else if(typeof I.sortKeys=="function")ue.sort(I.sortKeys);else if(I.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let Ae=0,Ne=ue.length;Ae<Ne;Ae+=1){let Ve="";(!fe||he!=="")&&(Ve+=U(I,Y));let Ze=ue[Ae],Xe=oe[Ze];if(I.replacer&&(Xe=I.replacer.call(oe,Ze,Xe)),!q(I,Y+1,Ze,!0,!0,!0))continue;let ut=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;ut&&(I.dump&&a===I.dump.charCodeAt(0)?Ve+="?":Ve+="? "),Ve+=I.dump,ut&&(Ve+=U(I,Y)),q(I,Y+1,Xe,!0,ut)&&(I.dump&&a===I.dump.charCodeAt(0)?Ve+=":":Ve+=": ",Ve+=I.dump,he+=Ve)}I.tag=ke,I.dump=he||"{}"}function R(I,Y,oe){let fe=oe?I.explicitTypes:I.implicitTypes;for(let he=0,ke=fe.length;he<ke;he+=1){let ue=fe[he];if((ue.instanceOf||ue.predicate)&&(!ue.instanceOf||typeof Y=="object"&&Y instanceof ue.instanceOf)&&(!ue.predicate||ue.predicate(Y))){if(oe?ue.multi&&ue.representName?I.tag=ue.representName(Y):I.tag=ue.tag:I.tag="?",ue.represent){let Ae=I.styleMap[ue.tag]||ue.defaultStyle,Ne;if(r.call(ue.represent)==="[object Function]")Ne=ue.represent(Y,Ae);else if(o.call(ue.represent,Ae))Ne=ue.represent[Ae](Y,Ae);else throw new t("!<"+ue.tag+'> tag resolver accepts not "'+Ae+'" style');I.dump=Ne}return!0}}return!1}function q(I,Y,oe,fe,he,ke,ue){I.tag=null,I.dump=oe,R(I,oe,!1)||R(I,oe,!0);let Ae=r.call(I.dump),Ne=fe;fe&&(fe=I.flowLevel<0||I.flowLevel>Y);let Ve=Ae==="[object Object]"||Ae==="[object Array]",Ze,Xe;if(Ve&&(Ze=I.duplicates.indexOf(oe),Xe=Ze!==-1),(I.tag!==null&&I.tag!=="?"||Xe||I.indent!==2&&Y>0)&&(he=!1),Xe&&I.usedDuplicates[Ze])I.dump="*ref_"+Ze;else{if(Ve&&Xe&&!I.usedDuplicates[Ze]&&(I.usedDuplicates[Ze]=!0),Ae==="[object Object]")fe&&Object.keys(I.dump).length!==0?(rl(I,Y,I.dump,he),Xe&&(I.dump="&ref_"+Ze+I.dump)):(_r(I,Y,I.dump),Xe&&(I.dump="&ref_"+Ze+" "+I.dump));else if(Ae==="[object Array]")fe&&I.dump.length!==0?(I.noArrayIndent&&!ue&&Y>0?qr(I,Y-1,I.dump,he):qr(I,Y,I.dump,he),Xe&&(I.dump="&ref_"+Ze+I.dump)):(hr(I,Y,I.dump),Xe&&(I.dump="&ref_"+Ze+" "+I.dump));else if(Ae==="[object String]")I.tag!=="?"&&Mt(I,I.dump,Y,ke,Ne);else{if(Ae==="[object Undefined]")return!1;if(I.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+Ae)}if(I.tag!==null&&I.tag!=="?"){let ut=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");I.tag[0]==="!"?ut="!"+ut:ut.slice(0,18)==="tag:yaml.org,2002:"?ut="!!"+ut.slice(18):ut="!<"+ut+">",I.dump=ut+" "+I.dump}}return!0}function re(I,Y){let oe=[],fe=[];de(I,oe,fe);let he=fe.length;for(let ke=0;ke<he;ke+=1)Y.duplicates.push(oe[fe[ke]]);Y.usedDuplicates=new Array(he)}function de(I,Y,oe){if(I!==null&&typeof I=="object"){let fe=Y.indexOf(I);if(fe!==-1)oe.indexOf(fe)===-1&&oe.push(fe);else if(Y.push(I),Array.isArray(I))for(let he=0,ke=I.length;he<ke;he+=1)de(I[he],Y,oe);else{let he=Object.keys(I);for(let ke=0,ue=he.length;ke<ue;ke+=1)de(I[he[ke]],Y,oe)}}}function ne(I,Y){Y=Y||{};let oe=new G(Y);oe.noRefs||re(I,oe);let fe=I;return oe.replacer&&(fe=oe.replacer.call({"":fe},"",fe)),q(oe,0,fe,!0,!0)?oe.dump+`
104
104
  `:""}return pB.dump=ne,pB}function GWe(){if(dre)return jr;dre=1;let e=FWe(),t=WWe();function n(r,o){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return jr.Type=oo(),jr.Schema=ure(),jr.FAILSAFE_SCHEMA=mre(),jr.JSON_SCHEMA=vre(),jr.CORE_SCHEMA=kre(),jr.DEFAULT_SCHEMA=fB(),jr.load=e.load,jr.loadAll=e.loadAll,jr.dump=t.dump,jr.YAMLException=bb(),jr.types={binary:xre(),float:bre(),map:gre(),null:hre(),pairs:Ere(),set:Ore(),timestamp:Rre(),bool:yre(),int:wre(),merge:$re(),omap:Sre(),seq:fre(),str:pre()},jr.safeLoad=n("safeLoad","load"),jr.safeLoadAll=n("safeLoadAll","loadAll"),jr.safeDump=n("safeDump","dump"),jr}var jr,SO,Dl,Wne,zG,Gne,qG,Bne,VG,Une,KG,Hne,JG,zne,ZG,qne,YG,Vne,QG,Kne,XG,Jne,eB,Zne,tB,Yne,nB,Qne,rB,Xne,oB,ere,iB,tre,sB,nre,aB,rre,cB,ore,lB,ire,dB,sre,uB,are,cre,pB,lre,dre,BWe,oc,zkt,qkt,Vkt,Kkt,Jkt,Zkt,Ykt,Qkt,Xkt,eRt,tRt,nRt,rRt,oRt,EO=x(()=>{jr={},SO={},Dl={};pB={};BWe=GWe(),oc=LWe(BWe),{Type:zkt,Schema:qkt,FAILSAFE_SCHEMA:Vkt,JSON_SCHEMA:Kkt,CORE_SCHEMA:Jkt,DEFAULT_SCHEMA:Zkt,load:Ykt,loadAll:Qkt,dump:Xkt,YAMLException:eRt,types:tRt,safeLoad:nRt,safeLoadAll:rRt,safeDump:oRt}=oc});import{existsSync as Pre,readFileSync as _O}from"node:fs";import{isAbsolute as PO,join as mB,relative as AO,resolve as CO}from"node:path";function DO(e=[]){let t=new Map;for(let n of[...Are,...e]){if(t.has(n.name))throw new Error(`kind ${n.name} is registered twice`);t.set(n.name,n)}return{get:n=>t.get(n),names:()=>[...t.values()].filter(n=>n.shape==="member").map(n=>n.name).sort(),all:()=>[...t.values()]}}function Cre(){return DO()}function hB(e,t,n){if("directory"in e.probe)return!0;if("chantProject"in e.probe)return wB(t,n);if("repo"in e.probe)return!0;let{anyFile:r,anyBlock:o,anyJsonKey:i,anyLine:s,anyDocument:a}=e.probe;if(r&&vb(t,n,r).length>0)return!0;if(i)for(let c of vb(t,n,i.in))try{let l=JSON.parse(t.read(c));if(i.pointers.some(d=>_re(l,d)!==void 0))return!0}catch{}if(s){let c=s.starts.map(l=>l.toLowerCase());for(let l of vb(t,n,s.in))try{if(t.read(l).split(/\r?\n/).some(d=>c.some(u=>d.trimStart().toLowerCase().startsWith(u))))return!0}catch{}}if(a)for(let c of vb(t,n,a.in))try{if(qWe(t.read(c)).some(l=>a.match.some(d=>VWe(l,d))))return!0}catch{}if(o){let c=new RegExp(`^\\s*(?:${o.blocks.map(yB).join("|")})\\s*\\{`,"m");for(let l of vb(t,n,o.in))try{if(c.test(t.read(l)))return!0}catch{}}return!1}function zWe(e){return!("directory"in e)&&!("chantProject"in e)&&!("repo"in e)}function vb(e,t,n){let r=[],o=n.filter(i=>i.includes("*"));for(let i of n)!i.includes("*")&&e.stat(je(t,i))==="file"&&r.push(je(t,i));if(o.length>0){let i=o.map(s=>new RegExp(`^${s.split("*").map(a=>yB(a).replace(/\\\[0-9\\\]/g,"[0-9]")).join("[^/]*")}$`));for(let s of e.list(t)??[])s.type==="file"&&i.some(a=>a.test(s.name))&&r.push(je(t,s.name))}return r.sort()}function qWe(e){try{return oc.loadAll(e)}catch{try{return oc.loadAll(e.replace(/(^|[\s:\-[,{])!(?:[A-Za-z][\w]*:?)+/gm,"$1"))}catch{return[]}}}function VWe(e,t){let n=Object.entries(t);return n.length>0&&n.every(([r,o])=>{let i=_re(e,r);return i===void 0?!1:o.some(s=>new RegExp(`^${s.split("*").map(yB).join(".*")}$`).test(String(i)))})}function _re(e,t){let n=e;for(let r of t.split("/").slice(1)){let o=r.replace(/~1/g,"/").replace(/~0/g,"~");if(n===null||typeof n!="object"||!Object.prototype.hasOwnProperty.call(n,o))return;n=n[o]}return n}function yB(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ire(e,t,n,r=[]){let o=e.all().filter(s=>s.shape==="member"&&zWe(s.probe)&&!r.includes(s.name)&&hB(s,t,n)).sort((s,a)=>a.precedence-s.precedence||(s.name<a.name?-1:1)),i=o.filter(s=>s.precedence===o[0]?.precedence);return{claims:o,winner:i.length===1?i[0]:void 0,tie:i.length>1?i:[]}}function wB(e,t){let n=je(t,"package.json");if(e.stat(n)==="file")try{let o=JSON.parse(e.read(n));for(let i of["dependencies","devDependencies","peerDependencies"]){let s=o[i];if(s&&typeof s=="object"&&Object.keys(s).some(ZWe))return!0}}catch{}let r=(o,i)=>{let s=e.list(o)??[];return s.some(a=>a.type==="file"&&KWe.includes(a.name))?!0:i===JWe?!1:s.some(a=>a.type==="dir"&&!eo(a.name)&&r(je(o,a.name),i+1))};return r(t,0)}function ZWe(e){return e==="@intentius/chant"||e.startsWith("@intentius/chant-lexicon-")}function YWe(){if(OO)return OO;let e=rc();return OO=new e({allErrors:!0,strict:!0}).compile(kF),OO}function QWe(e,t){let n;try{n=JSON.parse(e)}catch(a){return{kinds:[],problems:[`${t}: the kinds file is not JSON (${a.message})`]}}let r=YWe();if(!r(n)){let a=(r.errors??[]).map(c=>`${t}: ${c.instancePath||"the kinds file"} ${c.message??"is invalid"}`);return{kinds:[],problems:[...new Set(a)]}}let o=[],i=[],s=new Set;for(let a of n.kinds){if(HWe.includes(a.name)){o.push(`${t}: kind ${a.name} is built in and can't be supplied by a package`);continue}if(s.has(a.name)){o.push(`${t}: kind ${a.name} is listed twice`);continue}s.add(a.name),i.push({name:a.name,description:a.description,probe:{...a.probe.anyFile?{anyFile:[...a.probe.anyFile]}:{},...a.probe.anyBlock?{anyBlock:{in:[...a.probe.anyBlock.in],blocks:[...a.probe.anyBlock.blocks]}}:{},...a.probe.anyJsonKey?{anyJsonKey:{in:[...a.probe.anyJsonKey.in],pointers:[...a.probe.anyJsonKey.pointers]}}:{},...a.probe.anyLine?{anyLine:{in:[...a.probe.anyLine.in],starts:[...a.probe.anyLine.starts]}}:{},...a.probe.anyDocument?{anyDocument:{in:[...a.probe.anyDocument.in],match:a.probe.anyDocument.match.map(c=>structuredClone(c))}}:{}},precedence:a.precedence,shape:"member",outputs:{from:"declared",names:[...a.outputs??[]]},source:t,...a.graph?{graph:{...a.graph.lexicon?{lexicon:a.graph.lexicon}:{},...a.graph.reader?{reader:a.graph.reader}:{},config:structuredClone(a.graph.config??{})}}:{},...a.drift?{drift:{reader:a.drift.reader,config:structuredClone(a.drift.config??{})}}:{},...a.fields?{fields:structuredClone(a.fields)}:{},...a.reader&&gB.includes(a.reader)?{reader:a.reader}:{},...a.memberFile?{memberFile:{path:a.memberFile.path,schema:a.memberFile.schema}}:{}}),a.reader&&!gB.includes(a.reader)&&o.push(`${t}: kind ${a.name} names link reader ${a.reader}, which this chant does not have (it has ${gB.join(", ")}); the kind is kept, and its members' links are only those their entries state`);for(let c of tGe(a.fields??{}))o.push(`${t}: kind ${a.name} ${c}`)}return{kinds:i,problems:o}}function XWe(e,t=kb){return Fw(e,t)}function bB(e,t){let n=mB(e,"package.json"),r;try{r=JSON.parse(_O(n,"utf-8"))}catch{return{kinds:[],problems:[`${t??e}: no readable package.json in ${e}`],file:void 0}}let o=t??(typeof r.name=="string"?r.name:e),i=XWe(r);if(i===void 0)return{kinds:[],problems:[],file:void 0};if(typeof i!="string")return{kinds:[],problems:[`${o}: ${i.problem}`],file:void 0};let s=CO(e,i),a=AO(e,s);if(a.startsWith("..")||PO(a))return{kinds:[],problems:[`${o}: exports["${kb}"] points outside the package`],file:void 0};let c;try{c=_O(s,"utf-8")}catch{return{kinds:[],problems:[`${o}: exports["${kb}"] names ${i}, which does not exist`],file:s}}let l=QWe(c,o),d=typeof r.name=="string"?r.name:void 0;for(let u of l.kinds){if(u.packageDir=e,u.memberFile){let p=eGe(u.memberFile,e);p&&l.problems.push(`${o}: kind ${u.name} ${p}; members of the kind fail WSP012 until it is fixed`)}if(u.graph?.reader){let p=CO(e,...u.graph.reader.split("/")),f=AO(e,p);f.startsWith("..")||PO(f)?(l.problems.push(`${o}: kind ${u.name} names graph reader ${u.graph.reader}, which is outside the package; the kind is kept, and workspace graph lists its members with kind-not-run`),delete u.graph):Pre(p)?u.graph.readerFile=p:(l.problems.push(`${o}: kind ${u.name} names graph reader ${u.graph.reader}, which does not exist in the package; the kind is kept, and workspace graph lists its members with kind-not-run`),delete u.graph)}else u.graph?.lexicon&&d!==IO(u.graph.lexicon)&&(l.problems.push(`${o}: kind ${u.name} reads its members with lexicon ${u.graph.lexicon}, which is ${IO(u.graph.lexicon)}, and this package is ${d??"unnamed"}; the kind is kept, and workspace graph lists its members with kind-not-run`),delete u.graph);if(u.drift){let p=CO(e,...u.drift.reader.split("/")),f=AO(e,p);f.startsWith("..")||PO(f)?(l.problems.push(`${o}: kind ${u.name} names drift reader ${u.drift.reader}, which is outside the package; the kind is kept, and workspace drift answers no-drift-read for its members`),delete u.drift):Pre(p)?u.drift.readerFile=p:(l.problems.push(`${o}: kind ${u.name} names drift reader ${u.drift.reader}, which does not exist in the package; the kind is kept, and workspace drift answers no-drift-read for its members`),delete u.drift)}}return{...l,file:s}}function eGe(e,t){let n=CO(t,...e.schema.split("/"));e.schemaFile=n;let r=AO(t,n);if(r.startsWith("..")||PO(r))return`names member-file schema ${e.schema}, which is outside the package`;let o;try{o=JSON.parse(_O(n,"utf-8"))}catch(i){return i.code==="ENOENT"?`names member-file schema ${e.schema}, which does not exist`:`names member-file schema ${e.schema}, which is not JSON (${i.message})`}if(o===null||typeof o!="object"||Array.isArray(o))return`names member-file schema ${e.schema}, which is not a JSON Schema object`;try{let i=rc();e.validate=new i({allErrors:!0,strict:!1}).compile(o)}catch(i){return`names member-file schema ${e.schema}, which does not compile as a draft 2020-12 schema (${i.message})`}}function IO(e){return`@intentius/chant-lexicon-${e}`}function vB(e,t){let n=o=>o.replace(/\{(member|dir|workspace)\}/g,(i,s)=>t[s]),r=o=>typeof o=="string"?n(o):Array.isArray(o)?o.map(r):o!==null&&typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,s])=>[n(i),r(s)])):o;return r(e)}function kB(e,t,n=wu){if(e.package){let r=oa(e.package,t)??oa(e.package,n);if(!r)return{problem:`pinned package ${e.package} is not installed; install it to read the kinds it supplies`};let o;try{o=JSON.parse(_O(mB(r,"package.json"),"utf-8")).version}catch{o=void 0}return e.version&&o!==e.version?{problem:`${e.package} is pinned at ${e.version}, and ${String(o??"an unknown version")} is installed`}:{dir:r,source:e.package}}if(e.path){let r=mB(t,...e.path.split("/"));if(e.integrity){let o=MX(r,e.integrity,e.path);if(!o.ok)return{problem:o.message}}return{dir:r,source:e.path}}return null}function _u(e,t){let n=[],r=[],o=new Map,i=new Set;return e.forEach((s,a)=>{let c=kB(s,t);if(c===null)return;if("problem"in c){n.push({pin:a,message:c.problem});return}let{dir:l,source:d}=c,u=bB(l,d);for(let p of u.problems)n.push({pin:a,message:p});for(let p of u.kinds){let f=o.get(p.name);if(f){i.add(p.name),n.push({pin:a,message:`kind ${p.name} is supplied by both ${f} and ${d}; a kind name has one source`});continue}o.set(p.name,d),r.push(p)}}),{registry:DO(r.filter(s=>!i.has(s.name))),problems:n}}function Tre(e,t){if(!(e.type==="integer"?typeof t=="number"&&Number.isInteger(t):typeof t===e.type))return`is ${JSON.stringify(t)}, and the field is ${e.type==="integer"?"an integer":`a ${e.type}`}`;if(e.pattern!==void 0&&typeof t=="string"){let r;try{r=new RegExp(e.pattern,"u")}catch{return}if(!r.test(t))return`is ${JSON.stringify(t)}, which does not match ${e.pattern}`}}function tGe(e){let t=[],n=(r,o)=>{if(o.pattern!==void 0)try{new RegExp(o.pattern,"u")}catch{t.push(`declares field ${r} with pattern ${o.pattern}, which is not a regular expression`);return}if(o.default===void 0)return;let i=Tre(o,o.default);i&&t.push(`declares field ${r} whose default ${i}`)};for(let[r,o]of Object.entries(e))if(o.type==="object")for(let[i,s]of Object.entries(o.properties))n(`${r}.${i}`,s);else n(r,o);return t}function RB(e,t){if(e===void 0)return{fields:null,problems:[]};let n=e.fields,r=[];if(n===void 0)return t!==null&&r.push({path:"",message:`kind ${e.name} declares no fields, and the entry sets ${Object.keys(t).join(", ")||"an empty fields block"}`}),{fields:null,problems:r};let o=t??{};for(let a of Object.keys(o))a in n||r.push({path:a,message:`kind ${e.name} declares no field ${a}; its fields are ${Object.keys(n).join(", ")}`});let i=(a,c,l)=>{if(l!==void 0){let d=Tre(c,l);if(!d)return l;r.push({path:a,message:`field ${a.replace("/",".")} ${d}`})}return c.default??null},s={};for(let[a,c]of Object.entries(n)){if(c.type!=="object"){s[a]=i(a,c,o[a]);continue}let l=o[a],d={};l!==void 0&&(l!==null&&typeof l=="object"&&!Array.isArray(l)?d=l:r.push({path:a,message:`field ${a} is ${JSON.stringify(l)}, and the field is an object`}));for(let u of Object.keys(d))u in c.properties||r.push({path:`${a}/${u}`,message:`kind ${e.name} declares no field ${a}.${u}; ${a} has ${Object.keys(c.properties).join(", ")}`});s[a]=Object.fromEntries(Object.entries(c.properties).map(([u,p])=>[u,i(`${a}/${u}`,p,d[u])]))}return{fields:s,problems:r}}var gRt,kb,gB,TO,ic,UWe,Are,HWe,KWe,JWe,OO,ri=x(()=>{"use strict";TX();Vt();FX();Sl();yb();EO();gRt=kF.$id,kb="./workspace-kinds",gB=["dbt-project","goose-dir","golang-migrate-dir","clickhouse-migrations-dir","flyway-dir"],TO="examples",ic="repo",UWe="design",Are=[{name:"chant",description:"a chant project, with a chant.config.ts or chant.config.json in its directory",probe:{anyFile:["chant.config.ts","chant.config.json"]},precedence:500,shape:"member",outputs:{from:"chant-source"},source:"builtin"},{name:"workspace",description:"a nested workspace, with its own chant.workspace.json; the outer one reads it through its own chant workspace graph and never writes inside it",probe:{anyFile:["chant.workspace.json","chant.workspace.jsonc"]},precedence:1e3,shape:"member",outputs:{from:"none"},source:"builtin"},{name:ic,description:"another repository's workspace, named by URL and pinned revision; chant reads it through that repository's own chant workspace graph and never writes there",probe:{repo:!0},precedence:0,shape:"member",outputs:{from:"none"},source:"builtin"},{name:"other",description:"a directory chant does not read; the entry says why in `because`",probe:{directory:!0},precedence:0,shape:"member",outputs:{from:"declared",names:[]},source:"builtin"},{name:UWe,description:"a data member holding the design artifacts the workspace owns; chant reads its files for record pins and builds nothing",probe:{directory:!0},precedence:0,shape:"member",outputs:{from:"declared",names:[]},source:"builtin"},{name:TO,description:"an example group: every directory its glob matches that holds a chant project is built and linted",probe:{chantProject:!0},precedence:0,shape:"group",outputs:{from:"none"},source:"builtin"}],HWe=Are.map(e=>e.name);KWe=["chant.config.ts","chant.config.json"],JWe=4});function sc(e){return String(e).replace(/~/g,"~0").replace(/\//g,"~1")}function Nl(e,t){let n=[0];for(let h=0;h<e.length;h++)e.charCodeAt(h)===10&&n.push(h+1);let r=h=>{let y=0,b=n.length-1;for(;y<b;){let v=y+b+1>>1;n[v]<=h?y=v:b=v-1}return{line:y+1,column:h-n[y]+1}},o=new Map,i=new Map,s=new Map,a=e.charCodeAt(0)===65279?1:0,c=(h,y=a)=>{throw new NO(h,y)},l=h=>h>=e.length?"the end of the file":`${JSON.stringify(e[h])}`;function d(){for(;;){let h=e[a];if(h===" "||h===" "||h===`
105
105
  `||h==="\r")a++;else if(h==="/"&&(e[a+1]==="/"||e[a+1]==="*"))if(t.jsonc||c("comments are only allowed in chant.workspace.jsonc"),e[a+1]==="/")for(;a<e.length&&e[a]!==`
106
- `;)a++;else{let y=e.indexOf("*/",a+2);y<0&&c("unterminated /* comment"),a=y+2}else return}}function u(){let h=a;for(a++;;){a>=e.length&&c("unterminated string",h);let y=e.charCodeAt(a);if(y===34)break;y<32&&c("control character in a string; escape it",a),a+=y===92?2:1}a++;try{return JSON.parse(e.slice(h,a))}catch{return c("invalid escape in a string",h)}}function p(h){d(),o.set(h,a);let y=f(h);return i.set(h,a),y}function f(h){let y=e[a];if(y==="{")return g(h);if(y==="[")return m(h);if(y==='"')return u();for(let[v,k]of[["true",!0],["false",!1],["null",null]])if(e.startsWith(v,a))return a+=v.length,k;let b=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/.exec(e.slice(a,a+64));return b?(a+=b[0].length,Number(b[0])):c(`expected a value, found ${l(a)}`)}function g(h){let y={},b=new Set;if(a++,d(),e[a]==="}")return a++,y;for(;;){d(),e[a]!=='"'&&c(`expected a quoted key, found ${l(a)}`);let v=a,k=u();b.has(k)&&c(`duplicate key ${JSON.stringify(k)}`,v),b.add(k);let $=`${h}/${sc(k)}`;if(s.set($,v),d(),e[a]!==":"&&c(`expected ":" after key ${JSON.stringify(k)}, found ${l(a)}`),a++,Object.defineProperty(y,k,{value:p($),enumerable:!0,writable:!0,configurable:!0}),d(),e[a]===","){if(a++,d(),e[a]==="}")return t.jsonc||c("trailing comma; only chant.workspace.jsonc allows one"),a++,y;continue}if(e[a]==="}")return a++,y;c(`expected "," or "}", found ${l(a)}`)}}function m(h){let y=[];if(a++,d(),e[a]==="]")return a++,y;for(;;){if(y.push(p(`${h}/${y.length}`)),d(),e[a]===","){if(a++,d(),e[a]==="]")return t.jsonc||c("trailing comma; only chant.workspace.jsonc allows one"),a++,y;continue}if(e[a]==="]")return a++,y;c(`expected "," or "]", found ${l(a)}`)}}try{d(),a>=e.length&&c("the file is empty");let h=p("");return d(),a<e.length&&c(`unexpected ${l(a)} after the value`),{ok:!0,value:h,locate(y,b){if(b&&s.has(y))return r(s.get(y));for(let v=y;;v=v.slice(0,v.lastIndexOf("/"))){let k=o.get(v);if(k!==void 0)return r(k);if(v==="")return r(0)}},span(y){let b=o.get(y),v=i.get(y);if(!(b===void 0||v===void 0))return{key:s.get(y)??null,start:b,end:v}}}}catch(h){if(!(h instanceof NO))throw h;return{ok:!1,message:h.message,location:r(h.offset)}}}var NO,Cg=x(()=>{"use strict";NO=class extends Error{constructor(n,r){super(n);this.offset=r}}});function Dre(){return"0.124.99"}var Nre=x(()=>{"use strict"});function _g(e=process.env){let t=e.CI?.trim().toLowerCase();return t&&t!=="false"&&t!=="0"?"ledger":void 0}function jO(e){if(e!==void 0)return typeof e=="string"?{name:e}:e}function Iu(e,t=!1){let n=[];t&&n.push("a gate that asks a decision point takes its quorum from the point: give `approval` or `point`, not both");let r=typeof e=="string"?{name:e}:e;if(r===null||typeof r!="object"||Array.isArray(r))return[...n,"`point` is a decision point's name or { name, inputs?, pass?, store? }"];let{name:o,inputs:i,pass:s,store:a,...c}=r;if((typeof o!="string"||!nGe.test(o))&&n.push("`point.name` is a decision point's name: lower case letters, digits and hyphens, starting with a letter"),i!==void 0&&(i===null||typeof i!="object"||Array.isArray(i))&&n.push("`point.inputs` is an object of input name to value"),i&&typeof i=="object"){let d=Object.keys(i).filter(u=>u in Rb);d.length>0&&n.push(`\`point.inputs\` gives ${d.join(", ")}, which the gate passes itself`)}s!==void 0&&(!Array.isArray(s)||s.length===0||s.some(d=>typeof d!="string"&&typeof d!="boolean"))&&n.push("`point.pass` is a non-empty list of the answers that pass the gate"),a!==void 0&&a!=="tree"&&a!=="ledger"&&n.push("`point.store` is tree or ledger: where the question is held");let l=Object.keys(c);return l.length>0&&n.push(`\`point\` takes name, inputs, pass and store, not ${l.join(", ")}`),n}function Tu(e,t,n,r={}){if(n.planDigest!==null&&!t.includes("gate.planDigest"))throw new Error(`gate "${n.name}" binds a plan and asks decision point ${e}, which does not declare the input gate.planDigest: declare it in the points file, so each plan is its own question and an answer for one plan never passes another`);let o={};for(let[i,s]of Object.entries(Rb))t.includes(i)&&n[s]!==null&&(o[i]=n[s]);return{...r,...o}}function $b(e,t,n){return`gate:${e}/${t}${n?`@${n}`:""}`}function LO(e){if(!e||!e.startsWith("gate:"))return;let t=e.slice(5),n=t.lastIndexOf("@"),r=n>0?t.slice(0,n):t,o=r.indexOf("/");if(!(o<=0||o===r.length-1))return{op:r.slice(0,o),gate:r.slice(o+1),...n>0?{env:t.slice(n+1)}:{}}}var Ig,nGe,Rb,ac=x(()=>{"use strict";Ig=[!0];nGe=/^[a-z][a-z0-9-]*$/;Rb={"gate.component":"component","gate.name":"name","gate.env":"env","gate.planDigest":"planDigest"}});function Ti(e){return e===void 0?[]:Array.isArray(e)?[...e]:[e]}function $B(e,t){let n=e.replace(/\\/g,"/").replace(/\/+$/,""),r="";for(let o=0;o<n.length;o++){let i=n[o];i==="*"&&n[o+1]==="*"?n[o+2]==="/"?(r+="(?:.*/)?",o+=2):(r+=".*",o+=1):i==="*"?r+="[^/]*":i==="?"?r+="[^/]":r+=i.replace(/[.+^${}()|[\]\\]/g,"\\$&")}return new RegExp(`^${r}$`).test(t.replace(/\\/g,"/").replace(/\/+$/,""))}function Tg(e,t){return e.filter(n=>n.targets===void 0||n.targets.some(r=>t.some(o=>$B(r,o))))}function Sb(e){return e.reduce((t,n)=>Math.max(t,n.count),1)}function Di(e,t,n){let r=Array.isArray(e)?e:[e],o=[];return Array.isArray(e)&&e.length===0&&o.push(`\`${t}\` must name at least one rule`),r.forEach((i,s)=>{let a=Array.isArray(e)?`${t}[${s}]`:t;if(typeof i!="object"||i===null||Array.isArray(i)){o.push(`\`${a}\` must be an object`);return}let c=i;(typeof c.count!="number"||!Number.isInteger(c.count)||c.count<1)&&o.push(`\`${a}.count\` must be an integer of at least 1`),c.roles!==void 0&&(!Array.isArray(c.roles)||c.roles.length===0||c.roles.some(d=>typeof d!="string"||d===""))&&o.push(`\`${a}.roles\` must be a non-empty list of role names`),c.targets!==void 0&&(!Array.isArray(c.targets)||c.targets.length===0||c.targets.some(d=>typeof d!="string"||d===""))&&o.push(`\`${a}.targets\` must be a non-empty list of globs`),c.notAuthor!==void 0&&typeof c.notAuthor!="boolean"&&o.push(`\`${a}.notAuthor\` must be true or false`),c.notAuthor===!0&&!n.notAuthor&&o.push(`\`${a}.notAuthor\` is not read here: an Op gate has no author to judge by. An Op waves spec's \`approvals.quorum\` reads it from the merged pull request`);let l=new Set(["targets","count","roles","notAuthor"]);for(let d of Object.keys(c))l.has(d)||o.push(`\`${a}.${d}\` is not a quorum field; use targets, count, roles or notAuthor`)}),o}function FO(e,t){return Object.entries(t).filter(([,n])=>n.some(r=>oi(r,e))).map(([n])=>n).sort()}function Eb(e,t){let n=new Set,r=[];for(let s of[...t].sort((a,c)=>Date.parse(a.at)-Date.parse(c.at)))n.has(MO(s.who))||s.judged.excluded!==void 0||e.roles?.length&&!(s.judged.proven&&s.judged.roles.some(a=>e.roles.includes(a)))||(n.add(MO(s.who)),r.push(s));let o=!e.notAuthor||r.some(s=>s.judged.proven&&s.judged.author===!1),i=e.notAuthor===!0&&!o&&r.some(s=>s.judged.proven&&s.judged.author===void 0);return{...e.targets?{targets:[...e.targets]}:{},count:e.count,...e.roles?.length?{roles:[...e.roles]}:{},...e.notAuthor?{notAuthor:!0}:{},approvers:r.map(s=>s.who),met:r.length>=e.count&&o,...i?{authorUnknown:!0}:{}}}function jl(e){let t=e.targets?e.targets.join(", "):"every target",n=`${e.approvers.length} of ${e.count} approval${e.count===1?"":"s"}${e.approvers.length?` (${e.approvers.join(", ")})`:""}`;if(e.met)return`${t}: ${n}, met`;let r=e.count-e.approvers.length,o=[];r>0&&o.push(`${r} more${e.roles?.length?` from ${e.roles.join(" or ")}`:""}`),e.notAuthor&&o.push(r>0?"one of them not the author":"an approver who is not the author");let i=e.authorUnknown?" (the change's author is not known, so no approver can show they are someone else)":"";return`${t}: ${n}, needs ${o.join(", ")}${i}`}function Ob(e){return e.filter(t=>!t.met).map(jl).join("; ")}function WO(e){let t=[];for(let n of e.replace(/\r\n/g,`
106
+ `;)a++;else{let y=e.indexOf("*/",a+2);y<0&&c("unterminated /* comment"),a=y+2}else return}}function u(){let h=a;for(a++;;){a>=e.length&&c("unterminated string",h);let y=e.charCodeAt(a);if(y===34)break;y<32&&c("control character in a string; escape it",a),a+=y===92?2:1}a++;try{return JSON.parse(e.slice(h,a))}catch{return c("invalid escape in a string",h)}}function p(h){d(),o.set(h,a);let y=f(h);return i.set(h,a),y}function f(h){let y=e[a];if(y==="{")return g(h);if(y==="[")return m(h);if(y==='"')return u();for(let[v,k]of[["true",!0],["false",!1],["null",null]])if(e.startsWith(v,a))return a+=v.length,k;let b=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/.exec(e.slice(a,a+64));return b?(a+=b[0].length,Number(b[0])):c(`expected a value, found ${l(a)}`)}function g(h){let y={},b=new Set;if(a++,d(),e[a]==="}")return a++,y;for(;;){d(),e[a]!=='"'&&c(`expected a quoted key, found ${l(a)}`);let v=a,k=u();b.has(k)&&c(`duplicate key ${JSON.stringify(k)}`,v),b.add(k);let $=`${h}/${sc(k)}`;if(s.set($,v),d(),e[a]!==":"&&c(`expected ":" after key ${JSON.stringify(k)}, found ${l(a)}`),a++,Object.defineProperty(y,k,{value:p($),enumerable:!0,writable:!0,configurable:!0}),d(),e[a]===","){if(a++,d(),e[a]==="}")return t.jsonc||c("trailing comma; only chant.workspace.jsonc allows one"),a++,y;continue}if(e[a]==="}")return a++,y;c(`expected "," or "}", found ${l(a)}`)}}function m(h){let y=[];if(a++,d(),e[a]==="]")return a++,y;for(;;){if(y.push(p(`${h}/${y.length}`)),d(),e[a]===","){if(a++,d(),e[a]==="]")return t.jsonc||c("trailing comma; only chant.workspace.jsonc allows one"),a++,y;continue}if(e[a]==="]")return a++,y;c(`expected "," or "]", found ${l(a)}`)}}try{d(),a>=e.length&&c("the file is empty");let h=p("");return d(),a<e.length&&c(`unexpected ${l(a)} after the value`),{ok:!0,value:h,locate(y,b){if(b&&s.has(y))return r(s.get(y));for(let v=y;;v=v.slice(0,v.lastIndexOf("/"))){let k=o.get(v);if(k!==void 0)return r(k);if(v==="")return r(0)}},span(y){let b=o.get(y),v=i.get(y);if(!(b===void 0||v===void 0))return{key:s.get(y)??null,start:b,end:v}}}}catch(h){if(!(h instanceof NO))throw h;return{ok:!1,message:h.message,location:r(h.offset)}}}var NO,Cg=x(()=>{"use strict";NO=class extends Error{constructor(n,r){super(n);this.offset=r}}});function Dre(){return"0.124.100"}var Nre=x(()=>{"use strict"});function _g(e=process.env){let t=e.CI?.trim().toLowerCase();return t&&t!=="false"&&t!=="0"?"ledger":void 0}function jO(e){if(e!==void 0)return typeof e=="string"?{name:e}:e}function Iu(e,t=!1){let n=[];t&&n.push("a gate that asks a decision point takes its quorum from the point: give `approval` or `point`, not both");let r=typeof e=="string"?{name:e}:e;if(r===null||typeof r!="object"||Array.isArray(r))return[...n,"`point` is a decision point's name or { name, inputs?, pass?, store? }"];let{name:o,inputs:i,pass:s,store:a,...c}=r;if((typeof o!="string"||!nGe.test(o))&&n.push("`point.name` is a decision point's name: lower case letters, digits and hyphens, starting with a letter"),i!==void 0&&(i===null||typeof i!="object"||Array.isArray(i))&&n.push("`point.inputs` is an object of input name to value"),i&&typeof i=="object"){let d=Object.keys(i).filter(u=>u in Rb);d.length>0&&n.push(`\`point.inputs\` gives ${d.join(", ")}, which the gate passes itself`)}s!==void 0&&(!Array.isArray(s)||s.length===0||s.some(d=>typeof d!="string"&&typeof d!="boolean"))&&n.push("`point.pass` is a non-empty list of the answers that pass the gate"),a!==void 0&&a!=="tree"&&a!=="ledger"&&n.push("`point.store` is tree or ledger: where the question is held");let l=Object.keys(c);return l.length>0&&n.push(`\`point\` takes name, inputs, pass and store, not ${l.join(", ")}`),n}function Tu(e,t,n,r={}){if(n.planDigest!==null&&!t.includes("gate.planDigest"))throw new Error(`gate "${n.name}" binds a plan and asks decision point ${e}, which does not declare the input gate.planDigest: declare it in the points file, so each plan is its own question and an answer for one plan never passes another`);let o={};for(let[i,s]of Object.entries(Rb))t.includes(i)&&n[s]!==null&&(o[i]=n[s]);return{...r,...o}}function $b(e,t,n){return`gate:${e}/${t}${n?`@${n}`:""}`}function LO(e){if(!e||!e.startsWith("gate:"))return;let t=e.slice(5),n=t.lastIndexOf("@"),r=n>0?t.slice(0,n):t,o=r.indexOf("/");if(!(o<=0||o===r.length-1))return{op:r.slice(0,o),gate:r.slice(o+1),...n>0?{env:t.slice(n+1)}:{}}}var Ig,nGe,Rb,ac=x(()=>{"use strict";Ig=[!0];nGe=/^[a-z][a-z0-9-]*$/;Rb={"gate.component":"component","gate.name":"name","gate.env":"env","gate.planDigest":"planDigest"}});function Ti(e){return e===void 0?[]:Array.isArray(e)?[...e]:[e]}function $B(e,t){let n=e.replace(/\\/g,"/").replace(/\/+$/,""),r="";for(let o=0;o<n.length;o++){let i=n[o];i==="*"&&n[o+1]==="*"?n[o+2]==="/"?(r+="(?:.*/)?",o+=2):(r+=".*",o+=1):i==="*"?r+="[^/]*":i==="?"?r+="[^/]":r+=i.replace(/[.+^${}()|[\]\\]/g,"\\$&")}return new RegExp(`^${r}$`).test(t.replace(/\\/g,"/").replace(/\/+$/,""))}function Tg(e,t){return e.filter(n=>n.targets===void 0||n.targets.some(r=>t.some(o=>$B(r,o))))}function Sb(e){return e.reduce((t,n)=>Math.max(t,n.count),1)}function Di(e,t,n){let r=Array.isArray(e)?e:[e],o=[];return Array.isArray(e)&&e.length===0&&o.push(`\`${t}\` must name at least one rule`),r.forEach((i,s)=>{let a=Array.isArray(e)?`${t}[${s}]`:t;if(typeof i!="object"||i===null||Array.isArray(i)){o.push(`\`${a}\` must be an object`);return}let c=i;(typeof c.count!="number"||!Number.isInteger(c.count)||c.count<1)&&o.push(`\`${a}.count\` must be an integer of at least 1`),c.roles!==void 0&&(!Array.isArray(c.roles)||c.roles.length===0||c.roles.some(d=>typeof d!="string"||d===""))&&o.push(`\`${a}.roles\` must be a non-empty list of role names`),c.targets!==void 0&&(!Array.isArray(c.targets)||c.targets.length===0||c.targets.some(d=>typeof d!="string"||d===""))&&o.push(`\`${a}.targets\` must be a non-empty list of globs`),c.notAuthor!==void 0&&typeof c.notAuthor!="boolean"&&o.push(`\`${a}.notAuthor\` must be true or false`),c.notAuthor===!0&&!n.notAuthor&&o.push(`\`${a}.notAuthor\` is not read here: an Op gate has no author to judge by. An Op waves spec's \`approvals.quorum\` reads it from the merged pull request`);let l=new Set(["targets","count","roles","notAuthor"]);for(let d of Object.keys(c))l.has(d)||o.push(`\`${a}.${d}\` is not a quorum field; use targets, count, roles or notAuthor`)}),o}function FO(e,t){return Object.entries(t).filter(([,n])=>n.some(r=>oi(r,e))).map(([n])=>n).sort()}function Eb(e,t){let n=new Set,r=[];for(let s of[...t].sort((a,c)=>Date.parse(a.at)-Date.parse(c.at)))n.has(MO(s.who))||s.judged.excluded!==void 0||e.roles?.length&&!(s.judged.proven&&s.judged.roles.some(a=>e.roles.includes(a)))||(n.add(MO(s.who)),r.push(s));let o=!e.notAuthor||r.some(s=>s.judged.proven&&s.judged.author===!1),i=e.notAuthor===!0&&!o&&r.some(s=>s.judged.proven&&s.judged.author===void 0);return{...e.targets?{targets:[...e.targets]}:{},count:e.count,...e.roles?.length?{roles:[...e.roles]}:{},...e.notAuthor?{notAuthor:!0}:{},approvers:r.map(s=>s.who),met:r.length>=e.count&&o,...i?{authorUnknown:!0}:{}}}function jl(e){let t=e.targets?e.targets.join(", "):"every target",n=`${e.approvers.length} of ${e.count} approval${e.count===1?"":"s"}${e.approvers.length?` (${e.approvers.join(", ")})`:""}`;if(e.met)return`${t}: ${n}, met`;let r=e.count-e.approvers.length,o=[];r>0&&o.push(`${r} more${e.roles?.length?` from ${e.roles.join(" or ")}`:""}`),e.notAuthor&&o.push(r>0?"one of them not the author":"an approver who is not the author");let i=e.authorUnknown?" (the change's author is not known, so no approver can show they are someone else)":"";return`${t}: ${n}, needs ${o.join(", ")}${i}`}function Ob(e){return e.filter(t=>!t.met).map(jl).join("; ")}function WO(e){let t=[];for(let n of e.replace(/\r\n/g,`
107
107
  `).split(`
108
108
  `)){let r=/^requested-by:\s*(\S+)\s*$/i.exec(n.trim());r&&rGe.test(r[1])&&!t.some(o=>oi(o,r[1]))&&t.push(r[1])}return t}function xb(e){let t=/^(?:github|gitlab|forgejo|gitea|codeberg)(?:@[^:\s]+)?:(.+)$/i.exec(e.trim());return t?[e,t[1]]:[e]}function GO(e,t){let n=xb(t);return e.find(r=>xb(r.who).some(o=>n.some(i=>oi(o,i))))?.why}function Pb(e){let t=[],n=(r,o)=>{r.trim()&&!t.some(i=>oi(i.who,r))&&t.push({who:r,why:o})};e.author&&n(e.author,`${e.author} opened the change`);for(let r of e.commits??[])for(let o of WO(r.message))n(e.principal?e.principal(o):o,`${o} asked for ${r.sha.slice(0,7)}`);for(let r of e.agents??[])n(r,`${r} is an account an agent acts as`);return t}function Dg(e){let t=e;return t.via!=="pr-review"||typeof t.head!="string"||t.head===""||!Array.isArray(t.reviewers)||t.reviewers.length===0||t.reviewers.some(n=>typeof n!="string"||n==="")?null:{...typeof t.pr=="number"?{pr:t.pr}:{},head:t.head,reviewers:[...t.reviewers]}}function Ab(e,t=n=>n){let n=[],r=[];for(let o of e){let i=Dg(o);if(!i){n.push(o);continue}let s=i.reviewers.map(t);r.push({head:i.head,approvers:s});let{seal:a,...c}=o,l=Object.fromEntries(Object.entries(c).filter(([d])=>!["via","reviewers","head","pr","excluded"].includes(d)));for(let d of s)n.push({...l,resolvedBy:d,approver:{kind:"human"},review:{pr:i.pr??0,head:i.head,approvers:s}})}return{records:n,reviews:r}}function Ni(e){let t=(n,r)=>n.some(o=>oi(o,r));return n=>{let r=n.seal!==void 0&&n.seal!==null&&na(e.signers,n)===null,o=e.review!==void 0&&n.review?.head===e.review.head&&t(e.review.approvers,n.resolvedBy),i=n.review!==void 0&&(e.recorded??[]).some(l=>l.head===n.review.head&&t(l.approvers,n.resolvedBy)),s=r||o||i,c=e.authors!==void 0&&e.authors.some(l=>oi(l,n.resolvedBy))?`${n.resolvedBy} wrote the change`:GO(e.involved??[],n.resolvedBy);return{proven:s,roles:s?FO(n.resolvedBy,e.roles):[],...c!==void 0?{author:!0}:e.authors!==void 0?{author:!1}:{},...c!==void 0&&e.excludeInvolved?{excluded:`${c}, so ${n.resolvedBy}'s approval does not count`}:{}}}}var cc,MO,oi,lc,rGe,ii=x(()=>{"use strict";ys();cc=()=>({proven:!1,roles:[]});MO=e=>e.normalize("NFKC").trim().toLowerCase(),oi=(e,t)=>MO(e)===MO(t);lc=e=>(e.roles?.length??0)>0||e.notAuthor===!0,rGe=/^[A-Za-z0-9][A-Za-z0-9._-]*(\[bot\])?$/});function xB(e,t,n){return(e??BO).replaceAll("{gate}",t).replaceAll("{k}",String(n))}function SB(e,t,n,r){let o=[...e].sort((l,d)=>{let u=r(l),p=r(d);return u<p?-1:u>p?1:0}),i=Math.floor(o.length/n),s=o.length%n,a=(t-1)*i+Math.min(t-1,s),c=i+(t<=s?1:0);return o.slice(a,a+c)}var BO,EB=x(()=>{"use strict";BO="{gate}-wave-{k}"});var qO={};me(qO,{WAVE_OUTCOME_VERSION:()=>UO,blockedMembers:()=>HO,blockedWords:()=>zO,earlierWaveOutcomes:()=>jg,onlyWaiting:()=>dGe,passesThrough:()=>Ll,readWaveOutcomeFile:()=>AB,runSummary:()=>uGe,settleEarlierWaves:()=>lGe,waveOutcomeFileName:()=>Ng,writeWaveOutcomeFile:()=>PB});import{existsSync as oGe,readdirSync as iGe,readFileSync as jre,statSync as sGe,writeFileSync as aGe}from"node:fs";import{basename as cGe,join as Lre}from"node:path";function Ll(e){return e!==void 0&&OB.has(e.status)}function HO(e,t,n,r,o){if(o!==void 0)return new Map(e.map(s=>[s,`wave-${o}`]));let i=new Map;for(let s of e){let a=[...t.get(s)??[]].filter(c=>n.has(c)).sort().map(c=>{let l=r.get(c);if(!Ll(l))return l?.status==="blocked"&&l.by?l.by:c}).find(c=>c!==void 0);a!==void 0&&i.set(s,a)}return i}function lGe(e,t,n,r){let o=new Map(r),i=[],s=new Set;for(let a=1;a<t&&a<=e.length;a++){let c=e[a-1],l=c.filter(u=>!o.has(u)),d=HO(l,n,s,o);for(let u of l){let p=d.get(u);p!==void 0?o.set(u,{status:"blocked",by:p}):i.push(u)}for(let u of c)s.add(u)}return{outcomes:o,unsettled:i}}function dGe(e){let t=!1;for(let n of e.values())if(!OB.has(n.status)&&(t=!0,n.status!=="waiting"&&!(n.status==="blocked"&&n.by!==void 0&&e.get(n.by)?.status==="waiting")))return!1;return t}function zO(e){let t=new Map;for(let[n,r]of[...e].sort(Mre))t.set(r,[...t.get(r)??[],n]);return[...t].map(([n,r])=>`${r.join(", ")} (blocked by ${n})`).join("; ")}function uGe(e){let t=new Map;for(let r of e)t.set(r.status,(t.get(r.status)??0)+1);if(![...t.keys()].some(r=>!OB.has(r)))return;let n=[`${t.get("applied")??0} applied`,`${t.get("failed")??0} failed`,`${t.get("blocked")??0} blocked`];for(let r of["waiting","refused","decided","not-applied"])t.get(r)&&n.push(`${t.get(r)} ${r==="decided"?"not reported by their share":r}`);return t.get("unchanged")&&n.push(`${t.get("unchanged")} unchanged`),n.join(", ")}function Ng(e,t={}){let n=t.group!==void 0?`-group-${t.group.replace(/[^A-Za-z0-9._-]/g,"_")}`:"",r=t.share!==void 0?`-share-${t.share}`:"",o=t.apply===!0&&!n&&!r?"-apply":"";return`outcome-wave-${e}${n}${r}${o}.json`}function PB(e,t,n,r,o=new Date().toISOString(),i=!1){let s=Lre(e,Ng(t,n)),a={version:UO,wave:t,at:o,members:Object.fromEntries(Object.entries(r).sort(Mre)),...i?{holds_all:!0}:{}};return aGe(s,JSON.stringify(a,null,2)+`
109
109
  `),s}function Fre(e){let t=[],n=(r,o)=>{let i;try{i=iGe(r)}catch{return}for(let s of i){let a=Lre(r,s),c=!1;try{c=sGe(a).isDirectory()}catch{continue}c?o<4&&n(a,o+1):/^outcome-wave-\d+.*\.json$/.test(s)&&t.push(a)}};for(let r of e)oGe(r)&&n(r,0);return t.sort()}function jg(e,t){let n=new Map,r=new Map;for(let i of Fre(e)){let s;try{s=JSON.parse(jre(i,"utf-8"))}catch{continue}let a=s?.members??s?.roots;if(s?.version!==UO||!Number.isInteger(s.wave)||s.wave>=t||typeof s.at!="string"||typeof a!="object"||a===null)continue;for(let[l,d]of Object.entries(a)){let u=n.get(l);u&&(u.at>s.at||u.at===s.at&&d.status==="decided"&&u.status!=="decided")||n.set(l,{...d,wave:s.wave,at:s.at})}let c=r.get(s.wave);(!c||c.at<=s.at)&&r.set(s.wave,{at:s.at,holdsAll:s.holds_all===!0})}let o=[...r].filter(([,i])=>i.holdsAll).map(([i])=>i).sort((i,s)=>i-s);return{members:n,...o.length?{holdsAll:o[0]}:{}}}function AB(e,t){let n;for(let r of Fre(e)){if(cGe(r)!==t)continue;let o;try{o=JSON.parse(jre(r,"utf-8"))}catch{continue}o?.version!==UO||typeof o.at!="string"||typeof o.members!="object"||o.members===null||(!n||n.at<=o.at)&&(n=o)}return n}var UO,OB,Mre,Ml=x(()=>{"use strict";UO=1,OB=new Set(["applied","unchanged"]);Mre=([e],[t])=>e<t?-1:e>t?1:0});function Cb(e){if(e===void 0)return[];if(e===null||typeof e!="object"||Array.isArray(e))return["`evidence` must be an object"];let t=e,n=[];for(let r of Object.keys(t))r!=="requires"&&n.push(`\`evidence.${r}\` is not a setting; \`evidence\` takes \`requires\``);return t.requires!==void 0&&(!Array.isArray(t.requires)||t.requires.some(r=>typeof r!="string"||!/^[A-Za-z0-9][A-Za-z0-9._:-]*$/.test(r)))&&n.push("`evidence.requires` must be a list of check names (letters, digits, `.`, `_`, `:` and `-`, as `refs` in .chant/trust.json names them)"),n}var VO=x(()=>{"use strict"});function JO(e){let t=e.step;if(t===void 0)return[];if(t===null||typeof t!="object"||Array.isArray(t))return['`step` must be { "kind": "<capability>", ...input }'];let n=[],r=t.kind;(typeof r!="string"||r.trim()==="")&&n.push('`step.kind` must name a capability, such as "terraform-apply"');for(let o of["plan","apply","planWave","applyWave"])e[o]!==void 0&&n.push(`\`step\` and \`${o}\` are both set; a wave plans and applies through its capability or through commands, so give one`);e.hooks?.apply?.runBy==="apply"&&n.push('`hooks.apply.runBy: "apply"` hands the apply-stage hooks to an apply command, and a `step` has none; leave runBy as chant');for(let o of e.waves){o.hooks?.apply?.runBy==="apply"&&n.push(`wave "${o.name}" hands its apply-stage hooks to an apply command, and a \`step\` has none`);for(let i of o.runs??[]){let s=i.input;s!==void 0&&(s===null||typeof s!="object"||Array.isArray(s))&&n.push(`wave "${o.name}" run "${i.target}": \`input\` must be an object laid over the step's input`),s&&typeof s=="object"&&"kind"in s&&n.push(`wave "${o.name}" run "${i.target}": \`input\` cannot change the step's kind`)}}return n}function Wre(e){let t=[];for(let[n,r]of[["parallelism",e.parallelism],...e.waves.map(o=>[`wave "${o.name}" parallelism`,o.parallelism])])r!==void 0&&(typeof r!="number"||!Number.isInteger(r)||r<1?t.push(`${n} is ${JSON.stringify(r)}; give a whole number of 1 or more, the most that run at once`):r>1&&e.step===void 0&&t.push(`${n} is ${r}, and runs apply at once only through \`step\`; drop it or give step`));return t}function Mg(e){if(e===void 0)return[];if(e===null||typeof e!="object"||Array.isArray(e))return['`holds` must be { "policy"?: true, "cost"?: {...} }'];let t=[];for(let[n,r]of Object.entries(e))n==="policy"?typeof r!="boolean"&&t.push("`holds.policy` must be true or false"):n==="cost"?t.push(...pGe(r)):t.push(`\`holds.${n}\` is not a setting; the ones there are holds.policy and holds.cost`);return t}function pGe(e){if(e===null||typeof e!="object"||Array.isArray(e))return['`holds.cost` must be { "command": [...], "approveAbove": <number>, "format"?, "currency"? }'];let t=e,n=[];(!Array.isArray(t.command)||t.command.length===0||!t.command.every(r=>typeof r=="string"&&r!==""))&&n.push("`holds.cost.command` must be argv, a non-empty list of strings"),(typeof t.approveAbove!="number"||!Number.isFinite(t.approveAbove)||t.approveAbove<0)&&n.push("`holds.cost.approveAbove` must be a monthly amount of 0 or more"),t.format!==void 0&&!KO.includes(t.format)&&n.push(`\`holds.cost.format\` must be ${KO.join(" or ")}`),t.currency!==void 0&&(typeof t.currency!="string"||!/^[A-Z]{3}$/.test(t.currency))&&n.push('`holds.cost.currency` must be a three-letter currency code, such as "USD"');for(let r of Object.keys(t))["command","approveAbove","format","currency"].includes(r)||n.push(`\`holds.cost.${r}\` is not a setting`);return n}function ZO(e,t){let n=e?.policy===!0||t?.policy===!0,r=e!==void 0?e.cost:t?.cost;if(!(!n&&!r))return{...n?{policy:!0}:{},...r?{cost:r}:{}}}var KO,Lg,_b=x(()=>{"use strict";KO=["infracost","chant"],Lg="(monthly cost)"});function CB(e){let t=[],n=(r,o,i)=>{if(r!==void 0&&!(r===!1&&i)){if(r===null||typeof r!="object"||Array.isArray(r)){t.push(`${o} must be { "env"?: "<env>", "component"?: "<name>" }${i?" or false":""}`);return}for(let[s,a]of Object.entries(r))s!=="env"&&s!=="component"?t.push(`${o} has an unknown key "${s}"; it takes env and component`):(typeof a!="string"||a.trim()==="")&&t.push(`${o}.${s} must be a non-empty string`)}};n(e.release,"`release`",!0);for(let r of e.waves)for(let o of r.runs??[])n(o.release,`wave "${r.name}" run "${o.target}": \`release\``,!1);return t}function Gre(e,t){return e.replaceAll("{target}",t.target).replaceAll("{op}",t.op).replaceAll("{wave}",t.wave)}function _B(e,t,n){if(!e.step||e.release===!1)return null;let r={target:n.target,op:n.op??e.op,wave:t.name},o=e.release??{},i=n.release?.env??o.env,s=n.release?.component??o.component;return{env:i!==void 0?Gre(i,r):e.labels?.Env??t.name,component:s!==void 0?Gre(s,r):n.target}}function IB(e,t,n,r){let o=new Map;for(let a of t){let c=o.get(a.releaseDigest);(c===void 0||a.timestamp>c)&&o.set(a.releaseDigest,a.timestamp)}let s=e.filter(a=>a.commit===n.commit).map(a=>({r:a,digest:r(a,n.env,n.component)})).filter(a=>a.digest!==null).sort((a,c)=>(o.get(c.r.releaseDigest)??"").localeCompare(o.get(a.r.releaseDigest)??"")||a.r.releaseDigest.localeCompare(c.r.releaseDigest))[0];return s?{releaseDigest:s.r.releaseDigest,templatesDigest:s.digest}:null}var Ib=x(()=>{"use strict"});function NB(e){let t=[];return typeof e.train=="string"&&gGe.test(e.train)||t.push("train must be a release train's id"),typeof e.run=="string"&&mGe.test(e.run)||t.push("run must be a workspace run's id"),typeof e.env=="string"&&Fg.test(e.env)||t.push("env must be an environment's name"),typeof e.releaseDigest=="string"&&hGe.test(e.releaseDigest)||t.push("releaseDigest must be a release digest"),t}function jb(e){let n=e.replace(/^https?:\/\//,"").replace(/\.git$/,"").replace(/\/+$/,"").split("/");if(n.length<3||n.some(i=>i===""))throw new Tb(`project key "${e}" must be <host>/<owner>/<name>, such as github.com/acme/infra`);let[r,...o]=n;return{key:e,host:r,path:o.join("/"),owner:o.slice(0,-1).join("/"),name:o[o.length-1]}}function Kre(e){let t=e.toLowerCase().replace(/:\d+$/,"");if(t==="github.com"||t.startsWith("github."))return"github";if(t==="gitlab.com"||t.startsWith("gitlab.")||t.includes(".gitlab."))return"gitlab";if(t==="codeberg.org"||t.startsWith("forgejo.")||t.startsWith("gitea.")||t.includes("forgejo"))return"forgejo"}function wGe(e,t){let n=t.toLowerCase();return e==="github"?n==="github.com"?"https://api.github.com":`https://${t}/api/v3`:e==="gitlab"?`https://${t}/api/v4`:`https://${t}/api/v1`}function LB(e,t="control"){if(typeof e!="object"||e===null||Array.isArray(e))return[`${t} must be a mapping with repo and op`];let n=e,r=[],o;if(typeof n.repo!="string")r.push(`${t}.repo must name the control repo, such as github.com/acme/control`);else try{o=jb(n.repo).host}catch(i){r.push(`${t}.repo: ${i.message}`)}return typeof n.op=="string"&&Fg.test(n.op)||r.push(`${t}.op must name the Op the control repo runs on this repo's dependents, such as deploy`),n.forge!==void 0&&!Ure.includes(n.forge)&&r.push(`${t}.forge must be one of ${Ure.join(", ")}`),o!==void 0&&n.forge===void 0&&!Kre(o)&&r.push(`${t}.forge is needed: ${n.repo}'s host does not say which forge it is`),n.member!==void 0&&!(typeof n.member=="string"&&Fg.test(n.member))&&r.push(`${t}.member must be this repo's name in the control repo's workspace`),n.tokenSecret!==void 0&&!(typeof n.tokenSecret=="string"&&Bre.test(n.tokenSecret))&&r.push(`${t}.tokenSecret must name the secret holding the dispatch token, such as ${TB}`),n.readTokenSecret!==void 0&&!(typeof n.readTokenSecret=="string"&&Bre.test(n.readTokenSecret))?r.push(`${t}.readTokenSecret must name the secret holding a read-only token for the control repo, such as ${Hre}`):typeof n.readTokenSecret=="string"&&n.readTokenSecret===(n.tokenSecret??TB)&&r.push(`${t}.readTokenSecret must not be the dispatch token's secret (${n.readTokenSecret}): the plan job runs the change's code`),n.ref!==void 0&&!(typeof n.ref=="string"&&fGe.test(n.ref))&&r.push(`${t}.ref must be a branch name`),n.apiBase!==void 0&&!(typeof n.apiBase=="string"&&/^https?:\/\/[^\s'"]+$/.test(n.apiBase))&&r.push(`${t}.apiBase must be an http(s) URL`),r}function Jre(e,t){let n=LB(e);if(n.length>0)throw new Tb(n.join("; "),n);let r=jb(e.repo),o=e.forge??Kre(r.host),i=e.member??t;if(!Fg.test(i))throw new Tb(`control.member: "${i}" is not a name the control repo's workspace can hold; set control.member`);return{repo:e.repo,host:r.host,path:r.path,forge:o,apiBase:(e.apiBase??wGe(o,r.host)).replace(/\/+$/,""),op:e.op,member:i,ref:e.ref??yGe,tokenSecret:e.tokenSecret??TB,readTokenSecret:e.readTokenSecret??Hre}}var Fg,fGe,Bre,TB,Hre,Db,DB,zre,qre,Vre,gGe,mGe,hGe,Nb,jB,yGe,Tb,Ure,Zre,Wg=x(()=>{"use strict";Co();Fg=/^[A-Za-z0-9][A-Za-z0-9._/-]{0,127}$/,fGe=/^[A-Za-z0-9][A-Za-z0-9._/-]{0,127}$/,Bre=/^[A-Za-z_][A-Za-z0-9_]{0,127}$/,TB="CHANT_CONTROL_TOKEN",Hre="CHANT_CONTROL_READ_TOKEN",Db="CHANT_CONTROL_OUTCOME",DB="CHANT_CONTROL_TRAIN",zre="CHANT_CONTROL_RUN",qre="CHANT_CONTROL_ENV",Vre="CHANT_CONTROL_RELEASE",gGe=/^train-[A-Za-z0-9-]{1,64}$/,mGe=/^ws-[A-Za-z0-9-]{1,64}$/,hGe=/^[a-z0-9]+(-[a-z0-9]+)*:[0-9a-f]{64}$/;Nb=["applied","partial","unchanged","waiting","failed"],jB=["applied","partial"],yGe="main",Tb=class extends Error{constructor(n,r=[n]){super(n);this.problems=r;this.name="ControlConfigError"}};Ure=["github","gitlab","forgejo"];Zre="control-dispatch"});var sP={};me(sP,{CHECK_HOOK_MOMENT:()=>bGe,CI_CHECK_HOOK_FLOOR:()=>vGe,GATE_APPROVAL_SOURCES:()=>dc,OP_LEDGER_NAME:()=>Hg,OP_WAVES_APPROVAL_STATUS_VAR:()=>IGe,OP_WAVES_CONTROL_FLOOR:()=>kGe,OP_WAVES_CONTROL_JOB:()=>RGe,OP_WAVES_DIGEST_OVER:()=>eoe,OP_WAVE_APPLY_HOOKS_RUNNERS:()=>YO,OP_WAVE_DEFAULT_APPLY:()=>eP,OP_WAVE_DEFAULT_GATE_NAME:()=>WB,OP_WAVE_GATE_POLICIES:()=>Bg,OP_WAVE_HOOK_FAILURES:()=>Ug,OP_WAVE_HOOK_MOMENTS:()=>Mb,OP_WAVE_JOB_TIMEOUT_MINUTES:()=>Xre,PR_LOOP_HOOK_MOMENTS:()=>noe,assertCheckHooks:()=>roe,assertOpWaveCloud:()=>GB,assertOpWaveHooks:()=>uc,assertOpWavesSpec:()=>ju,assertPrLoopHooks:()=>iP,notifyVariables:()=>JQ,opWaveApplyHooksRunBy:()=>Gb,opWaveAt:()=>Lu,opWaveBinArgv:()=>zg,opWaveChecksDir:()=>tP,opWaveGateName:()=>Fb,opWaveGroupOf:()=>FGe,opWaveGroupRuns:()=>rP,opWaveGroupsProblem:()=>oP,opWaveHookRuns:()=>Fl,opWaveHooksAt:()=>Wb,opWaveJobArtifactName:()=>AGe,opWaveJobArtifactPaths:()=>PGe,opWaveJobInputsByWave:()=>OGe,opWaveJobTimeout:()=>EGe,opWaveJobs:()=>ooe,opWaveOf:()=>WGe,opWaveOutcomeDir:()=>ca,opWaveOutcomePath:()=>Du,opWavePointAt:()=>QO,opWavePointOf:()=>Yre,opWavePointProblems:()=>Lb,opWaveRecordPath:()=>si,opWaveRunMatches:()=>nP,opWaveShare:()=>Bb,opWavesApprovalStatusCommand:()=>DGe,opWavesControlProblems:()=>Qre,opWavesControlTarget:()=>$Ge,opWavesInvolvedProblems:()=>XO,opWavesLastJobs:()=>SGe,opWavesOutcomeCommand:()=>xGe,opWavesPostsApprovalStatus:()=>TGe,opWavesRecordPlansCommand:()=>_Ge,opWavesResumeCommand:()=>CGe,waveApproveTarget:()=>Nu});function Yre(e){if(e!==void 0)return typeof e=="string"?{name:e}:e}function Lb(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)&&"timeout"in e){let{timeout:t,...n}=e,r=Iu(n);return(typeof t!="string"||!/^(\d+(ms|s|m|h|d))+$/.test(t))&&r.push('`point.timeout` is a duration such as "48h"'),r}return Iu(e)}function QO(e,t){let n=e.waves.find(r=>r.name===t);return Yre(n?.point??e.point)}function Nu(e,t){return t.length===1?t[0]:e}function Qre(e){let t=LB(e,"control");if(t.length>0)return t;let n=e,r=[];typeof n.member=="string"&&Fg.test(n.member)||r.push("control.member must name this repo in the control repo's workspace: an Op waves spec has no repository name to default it to");for(let o of["sentCheck","markSent"])n[o]!==void 0&&!(typeof n[o]=="string"&&n[o]!==""&&!n[o].includes(`
@@ -170,7 +170,7 @@ ${e.timestamp}`,"utf-8")}function UDe(e,t,n){let r=`the approval of gate ${n.gat
170
170
  `).filter(Boolean),i=[],s;for(let a of o){let c={signers:Qse(e,a,r[0]),rotation:Qse(e,a,r[1])};if(c.signers===void 0){s&&i.push({version:0,commit:a,digest:"",threshold:0,signers:[],excluded:[],signedBy:[]}),s=void 0;continue}let l=vHe(s,c,a);if("code"in l)return{versions:i,broken:{commit:a,code:l.code,reason:l.reason}};l!==s&&i.push(l),s=l}return{versions:i}}var mHe,wHe,RHe,cA,tae=x(()=>{"use strict";Jn();Gn();ed();Ki();Ov();mHe="chant-signers";wHe=w.object({schema:w.literal(1),version:w.number().int().min(1),previous:w.string().regex(/^sha256:[0-9a-f]{64}$/).nullable(),threshold:w.number().int().min(1),signatures:w.array(w.object({principal:w.string().min(1),signature:w.string().min(1)}).strict())}).strict();RHe=/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/,cA=class{constructor(t,n,r){this.repo=t;this.base=n;this.history=r;this.index=new Map;this.memo=new Map}isAncestor(t,n){try{return Xse("git",["merge-base","--is-ancestor",t,n],{cwd:this.repo,stdio:"ignore"}),!0}catch{return!1}}firstParents(){return this.line||(this.line=aA(this.repo,["rev-list","--first-parent",this.base]).split(`
171
171
  `).filter(Boolean),this.line.forEach((t,n)=>this.index.set(t,n))),this.line}entryIndex(){if(!this.entries){let t=this.firstParents(),n=new Map;for(let o of aA(this.repo,["rev-list","--parents",this.base]).split(`
172
172
  `)){let[i,...s]=o.trim().split(" ");i&&n.set(i,s)}let r=new Map;for(let o=t.length-1;o>=0;o--){let i=[t[o]];for(;i.length>0;){let s=i.pop();if(!r.has(s)){r.set(s,o);for(let a of n.get(s)??[])r.has(a)||i.push(a)}}}this.entries=r}return this.entries}entryOf(t){if(RHe.test(t))return this.entryIndex().get(t)??null;if(!this.isAncestor(t,this.base))return null;let n=this.firstParents(),r=0,o=n.length-1,i=0;for(;r<=o;){let s=r+o>>1;this.isAncestor(t,n[s])?(i=s,r=s+1):o=s-1}return i}versionFor(t){let n=this.memo.get(t);if(n!==void 0)return n;let r=this.lookup(t);return this.memo.set(t,r),r}lookup(t){if(this.history.broken)return null;let n=this.history.versions.at(-1)??null,r=this.entryOf(t);if(r===null)return n;let o=null,i=1/0;for(let s of this.history.versions){let a=s.commit?this.index.get(s.commit):void 0;a===void 0||a<=r||a<i&&(o=s,i=a)}return o}}});import{execFileSync as iae}from"node:child_process";function o2(e,t){return iae("git",t,{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","pipe"],maxBuffer:256*1024*1024})}function nae(e,t){try{return o2(e,["rev-parse","--verify","--quiet",`${t}^{commit}`]).trim()||void 0}catch{return}}function Go(e,t){if(t!==void 0){let n=t.startsWith("-")?void 0:nae(e,t);return n?{commit:n,from:"flag"}:{commit:null,from:null,problem:`--base ${t} names no commit in this repository`}}for(let[n,r]of[["refs/remotes/origin/HEAD","origin/HEAD"],["refs/heads/main","main"],["refs/heads/master","master"]]){let o=nae(e,n);if(o)return{commit:o,from:r}}return{commit:null,from:null,problem:"no base revision: pass --base <rev> (there is no origin/HEAD, main or master)"}}function di(e,t){if(!t.commit)return Es(null,t.problem?[t.problem]:[]);let n=Vi(Br(e,t.commit),t.commit);if(!n.active||n.problems.length>0)return n;let r=eae(e,t.commit,n.signersPath);if(r.broken){let i=r.broken.commit?` at ${r.broken.commit.slice(0,8)}`:"";return{...n,problems:[`the signer history of ${n.signersPath} is broken${i}: ${r.broken.reason}`]}}let o=new cA(e,t.commit,r);return{...n,signersAt:i=>o.versionFor(i)}}function $He(e,t,n){let r=new Map;if(n.length===0)return r;let o=o2(e,["--literal-pathspecs","log","-c","--name-only","--no-renames","--format=%x00%H",t,"--",...n]),i=new Set(n),s="";for(let a of o.split(`
173
- `))a.startsWith("\0")?s=a.slice(1).trim():a&&i.has(a)&&!r.has(a)&&r.set(a,s);return r}function xHe(e,t){if(t.length===0)return new Set;let n=o2(e,["--literal-pathspecs","status","--porcelain=v1","-z","--untracked-files=all","--",...t]),r=new Set,o=n.split("\0");for(let i=0;i<o.length;i++){let s=o[i];s.length<4||(r.add(s.slice(3)),(s[0]==="R"||s[0]==="C")&&i++)}return r}function rae(e,t,n){try{return iae("git",["merge-base","--is-ancestor",t,n],{cwd:e,stdio:"ignore"}),!0}catch{return!1}}function oae(e,t,n){return t.adopted.some(r=>rae(e,n,r.to)&&(r.from===void 0||!rae(e,n,r.from)))}function Av(e,t,n,r){let o=t;if(t.signersAt){let s=t.signersAt(n);if(o={...t,signers:s?.signers??[]},!s||s.version===0){let a="no signer set was in effect where this commit entered the base's history";return oae(e,t,n)?{level:"adopted",commit:n,reason:`in a commit range the policy at base adopts; ${a}`}:{level:"unattested",commit:n,reason:a}}}let i=rA({repo:e,policy:o},n,r);return i.level==="unattested"&&oae(e,t,n)?{level:"adopted",commit:n,attestor:i.attestor,reason:`in a commit range the policy at base adopts; ${i.reason}`}:{level:i.level,commit:n,attestor:i.attestor,...i.principal?{principal:i.principal}:{},...i.key?{key:i.key}:{},reason:i.reason}}function sae(e){let t=new Map,n=i=>{for(let s of e.paths)t.set(s,{level:"unattested",commit:null,reason:i});return t};if(!e.repo)return n("not in a git repository");if(e.policy.problems.length>0)return n(e.policy.problems.join("; "));if(!e.policy.active)return n(`no signers file (${e.policy.signersPath}) at base ${e.policy.base?.slice(0,8)}; attestation is off`);let r=e.at===null?xHe(e.repo,e.paths):new Set,o=$He(e.repo,e.at??"HEAD",e.paths.filter(i=>!r.has(i)));for(let i of e.paths){if(r.has(i)){t.set(i,{level:"unattested",commit:null,reason:"the working tree has uncommitted changes to this file"});continue}let s=o.get(i);if(!s){t.set(i,{level:"unattested",commit:null,reason:"no commit holds this file"});continue}let a=Av(e.repo,e.policy,s,e.attestors);t.set(i,e.revisit?.(i,a)??a)}return t}var td=x(()=>{"use strict";zi();Om();Ki();tae()});function lA(e,t){if(typeof e!="string")return!1;let n=e.match(EHe);return!!n&&(t===void 0||n[1]===t)}var SHe,jSt,EHe,i2=x(()=>{"use strict";SHe={"declaration-missing":"No chant.workspace.json or .jsonc between the directory and the git root.","declaration-ambiguous":"Both chant.workspace.json and chant.workspace.jsonc exist.","declaration-unparseable":"The declaration is not valid JSON, or not valid JSONC for .jsonc.","declaration-invalid":"The declaration does not match its schema, repeats a name, or --member names no entry.","placement-invalid":"A member or group match breaks a placement rule.","reader-too-old":"The declaration's minReader is newer than the chant reading it.","root-chant-required":"The declaration pins a chant version other than the reader's, and that chant is not installed at the workspace root.","not-a-git-repository":"--at, or a ledger read, needs a git repository and there is none.","revision-unknown":"--at names no commit.","live-at-revision":"graph was given --live and --at: a live read is of the account now, not of a revision.","environment-invalid":"An environment name that can't name a ledger directory.","dir-missing":"The member's directory does not exist.","unknown-kind":"No built-in kind or pinned package supplies the member's kind.","kind-probe-failed":"The member's directory is not what its kind reads.","no-matches":"An example group matches no directory holding a chant project.","kind-not-run":"The member's kind is one the per-member commands don't run, such as other.","command-failed":"The member's own command exited with a failure, or the lexicon that reads the member through its kind's graph block isn't installed where the workspace resolves its pin.","output-unreadable":"The member's command printed something that isn't the document asked for.","ir-version-unsupported":"The member's IR has a version this chant can't read.","query-invalid":"search was given no query, a term its grammar can't parse, or a --count-by that is not a grouping.","usage-invalid":"search was given a flag that needs another one it lacks, or two that don't go together, such as --check-live without --snapshot.","environment-unknown":"--env names an environment the project's chant config does not declare.","snapshot-unavailable":"--snapshot names a snapshot chant can't replay: none is recorded for the environment, or the ref is one replay does not take.","build-failed":"The project's build, or one of its build roots, failed, so the graph search would answer over is incomplete.","index-unavailable":"--index names an index version chant can't read: none is recorded under the scope key in the store, or its stamp is not the scope or version asked for.","snapshot-at-revision":"workspace search was given --snapshot and --at: a snapshot replays the estate as recorded over the source in the working tree, not at a revision.","member-chant-too-old":"The member's chant predates the document asked for: it has no such command, or prints it without the read contract.","lexicon-has-no-mapping":"The lexicon ships no capability mapping, so no capability rule can read its resources.","capability-not-derivable":"The lexicon's capability mapping labels none of the kinds the capability's rule needs.","lexicon-not-loaded":"The lexicon isn't installed where the chant that wrote the catalog runs, so its mapping wasn't read.","instances-each-value":"The block's count or for_each reads each.value or each.key, which only a plan can count.","instances-merge":"The block's count or for_each calls merge(), which the declared graph does not evaluate.","instances-value-unknown":"The block's count or for_each is a form the graph reads, and the files a plan reads give it no value, or one that keys no instances.","instances-form-unread":"The block's count or for_each is an expression the graph does not read: another function, a for expression, another conditional, arithmetic, or a resource, data or module attribute.","instances-over-limit":"The block would have more than 256 instance nodes, so it is drawn alone.","instances-module-uncounted":"The block is under an expanded module call whose count or for_each the graph cannot count, so none of its instance ids is known.","ledger-unreadable":"Reading the ledger failed, so nothing from it is listed.","ledger-malformed":"Some lines of the ledger aren't release records; the rest are listed.","filter-invalid":"A --where or --since names a field the read doesn't have, an operator its type doesn't take, or a value not of its type; nothing was read.","table-unknown":"chant ledger was given a table that is not one of resources, snapshots, runs, gates, deploys, releases or cuts.","gates-no-ledger":"The checkout has no chant/lifecycle branch, so there is no gate ledger to read.","gates-no-gate-ledger":"The branch has no gate ledger for the member: no run of it has reached a gate.","gates-ledger-unreadable":"Reading the member's gate ledger failed, so no gate is listed.","stewards-unreadable":"An *.op.ts file could not be imported, so a steward it declares may be missing.","stewards-conflict":"A steward was dropped: its name, or an Op it lists, belongs to another steward.","steward-runs-unreadable":"Reading an Op's run ledger, or a ConvergeOp's converge ledger, failed, so its last run or last tick is null.","record-unparseable":"No front matter, a YAML error or a value outside the JSON subset of YAML, or for a JSON kind a file that is not one object or repeats a member name.","record-schema-invalid":"The record's front matter, or its JSON object, does not match the kind's schema.","record-id-duplicate":"Another record earlier in path order has the same id.","record-supersedes-unknown":"A supersedes link names an id no record has.","record-supersedes-conflict":"A second closed record supersedes a record another one already superseded.","record-remediates-unknown":"A remediates link names an id no record has.","record-remediates-not-closed":"A remediates link names a record that isn't closed; a record still open is amended instead.","record-seal-mismatch":"A closed record's seal is not the whole-file seal of its text now: the record changed after it closed.","session-seal-mismatch":"A closed session's seal is not the whole-file seal of its text now: the session changed after it closed, or was sealed by the rule before #2546.","session-verdict-unknown-record":"A session's verdict names a record that none of the session kind's subject records has.","asset-drift":"A file the record pins by hash has changed: its bytes no longer hash to the pinned sha256.","asset-missing":"A file the record pins by hash does not exist in the tree read.","asset-stale":"A file the record pins is unchanged at the hash a record it supersedes pinned: the decision changed and the artifact did not follow.","record-supersedes-pending":"A supersedes link from a record whose state is weaker than the record it names, so the link has no effect yet.","record-no-evidence":"The record's evidence list is empty: it cites nothing and pins no file. Information for a reviewer, never an error.","review-undigested":"A verdict names no digest of the text it judged. It still counts, and an amendment does not stop it counting.","source-transcript-drift":"The record's source block pins a transcript by hash, the file it names can be read here, and its bytes hash to something else: it is not the transcript the record means.","work-needs-unknown":"A work record's needs list names a work id no record has, so the item stays blocked.","work-implements-unknown":"A work record's implements list names a decision id no decision has.","work-needs-cycle":"A work record needs itself through its needs links, so it can never be ready.","work-implements-undecided":"A work record implements a decision whose state is not approved, such as proposed.","work-done-unpinned":"A work record is done and its evidence list is empty: nothing shows the work was done.","work-closed-without-date":"A work record is done or dropped and has no closing date.","work-done-gap-open":"A work record is done, and the finding it came from still fires on its region. graph --intent raises it, and records does by walking that region.","work-acceptance-unmet":"A work record is done, and one of its acceptance criteria has no passing evidence of the verification it expects. check fails on it (WSP117).","work-acceptance-self-verified":"A passing manual verdict on a work record's criterion names the record's implementer, so it does not count: a manual verdict comes from someone else.","work-contract-unknown":"A work record names a contract that no record of its kind's contract kind has.","work-contract-undecided":"A work record names a contract whose state is not approved, such as a draft.","work-tier-unknown":"A work record names a builder tier that its kind's work.tier.tiers does not list.","flag-work-unknown":"A flag record names a work item that no record of its kind's work kind has.","flag-stale":"Every decision a flag's work item implements is confirmed, so the flag is due for removal. check reports it (WSP118).","answer-points-unreadable":"The points file the answer kind names can't be read, or is not valid.","answer-point-unknown":"The answer's point is not declared in the points file the answer kind names.","answer-point-changed":"The point's declaration changed since the question was asked, so the answer is to an older version of the question.","review-decider":"The verdict is the decider's own, and the quorum counts verdicts besides the decider's.","review-agent":"The reviewer holds the agent role in the trust policy at base.","review-duplicate":"A later verdict by the same principal replaces this one. Names are compared after NFKC, trimming and lower-casing.","review-older-digest":"The verdict names a digest other than the record's text now: the record changed after the verdict.","review-unattested":"An attestation policy is active at base, and the verdict carries no seal that verifies for its reviewer.","seal-missing":"The verdict, or the record, carries no seal.","seal-signer-unlisted":"The reviewer, or the record's author, has no key in the signers file at base, so the seal can't count.","seal-signature-invalid":"The seal is malformed, names a signer other than the reviewer or author, or its signature does not verify over the verdict or record.","seal-unverifiable":"Nothing here can say whose seal it is: there is no signers file at base, ssh-keygen is not installed, or the record came back in a return sealed by a signer no admission lists yet.","record-unattested":"A signers file is active at base, and the record names an author whose seal does not verify: it has none, the author has no key in the file, or the signature fails.","record-ratified-below-quorum":"The record is in its kind's ratified state (reviews.ratified), and its quorum is not met: it was written to that state by hand, past the check of records new and amend. It is still read, and stays valid.","kind-unreadable":"The record kind file is missing or could not be imported.","kind-invalid":"The record kind file exports no recordKind, or its shape is wrong.","schema-unreadable":"The schema file the record kind names is missing or is not JSON.","schema-id-mismatch":"The schema's $id differs from the id the record kind names.","schema-invalid":"The record schema itself does not compile.","location-missing":"The records directory does not exist, in the tree or at the revision.","write-usage-invalid":"The command line lacks a value the write needs, or gives one it does not take.","write-input-invalid":"The fields given with --from or --set can't be read, are not JSON, or are not a JSON object.","record-not-found":"No record of the kind has the id given.","record-id-taken":"The id given for a new record is already used, by a record or a file name.","record-id-unallocatable":"No id was given and none can be allocated: the records share no single prefix and --prefix names none.","record-path-unmatched":"The file name made from the record's id and title does not match the kind's location.","record-closed":"The record is in a closed state, so nothing in it changes; a new record supersedes it instead.","amend-id-immutable":"An amendment changes the record's id, and ids are never renumbered.","amend-supersede-instead":"The record is approved, and the amendment changes a field the approval rule does not let change in place; a new record supersedes it instead.","review-unsupported":"The kind's schema has no reviews field, so its records take no review.","review-note-required":"A dissent was given with no note: a dissent needs a reason.","review-sign-failed":"--sign was given and no seal could be made: the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.","record-state-not-initial":"A record written through chant serve mcp gives a state other than the kind's first: a new record opens proposed, and a person moves it on.","source-harvest-not-proposed":"A harvested record (source.via harvest) was written in a state other than the kind's first: a harvest proposes, and a person decides.","ratify-quorum-not-met":"The write puts a record in its kind's ratified state (reviews.ratified), and the record's quorum is not met: too few agreeing verdicts count.","record-sign-failed":"--sign was given and no author seal could be made: the record names no author, the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.","record-conflict":"--expect named a digest the record no longer has: another write changed it after the caller read it. The refusal names the digest it has now; re-read the record and write again.","write-lock-timeout":"Another write held the working tree's write lock for longer than the write waits (CHANT_WRITE_LOCK_WAIT_MS); the refusal names the holder. Run the write again.","write-lock-not-held":"CHANT_WRITE_LOCK names a batch's lock token that no longer holds the working tree's write lock: the batch released it, or it expired and another writer took it.","write-scope-member":"The write is to a file, or to a record kind, of a member outside the writer's scope: an agent session writes only the members it is bound to, and writeScope.<class>.members leaves the member out.","write-scope-kind":"The write is to a record kind writeScope.<class>.records does not list, with a verb it does not list for the kind, or deletes a record.","write-scope-protected":"The write is to a file writeScope.<class>.protected lists, or one under a directory it lists, outside the top-level keys or JSON Pointers the entry's except allows (#3146, #3308).","write-scope-class-unknown":"The declaration's writeScope at base names a principal class no pinned package supplies, and the writer is judged human, so it may be in that class; the write is refused until the package is installed at the pinned version or the entry removed (#3080).","agent-unknown":"CHANT_AGENT, or a commit's Chant-Agent trailer, names an agent session the declaration at base does not declare.","principal-unidentified":"chant.workspace.json at base sets identity.attribution to identified, and the write names a person by a bare name: --by, an author field or a decision point's answerer must be a forge identity (github:<login>, gitlab:<login>, <forge>@<host>:<login>), a principal the signers file at base lists, or an agent, runner or service principal (#3163).","session-unknown":"--session names no session of a session kind whose subjects are the record's kind.","session-not-open":"--session names a session in a closed state, which takes no more verdicts.","points-undeclared":"No record kind with an answers block is declared, or given with --kind, so there is no points file to ask.","points-invalid":"The points file an answer kind names can't be read, or does not match decision-points.schema.json and the rules checked in code.","point-unknown":"No points file declares the point asked, or the one an answer names.","point-inputs-invalid":"The inputs given to an ask are not a JSON object of the point's declared inputs.","point-decider-failed":"A model decider that fails closed (unreachable: fail) could not answer, so the ask wrote nothing.","answer-not-candidate":"The people's answer is not one of the question's candidates.","quorum-not-met":"Too few of the people who answered count toward the point's quorum: distinct, not holding the agent role, not the steward that asked, and holding one of its roles when it names any. Nobody named over MCP or ACP counts (#3817).","answer-in-steward-turn":"The answer was given during a steward's turn, or by a process it started: a steward never answers a decision point, and a person answers it through hud or at a shell.","answer-never-over-mcp":"The answer or retraction came over MCP or ACP, or from a process a session on one started, and the question constrains a gate that is never resolved there: a person answers it at a shell or through hud (#3817).","answer-not-answered":"points retract names a question that has no answer to retract: it is escalated or proposed, and people answer it instead (#3351).","answer-field-unsupported":"The answer kind's copy of point-answer.schema.json predates a field the write needs, a note, a relay, a retraction, an ad-hoc question's asked or a withdrawal: copy the schema anew to turn it on (#3351, #3402, #3403, #2888).","point-candidates-invalid":"points ask names an ad-hoc point without --candidates, a declared point with them, or candidates that are not a question and criteria of the point's question type (#3403).","since-rev-unknown":"--since names no commit, or a session with no opening revision and no commit that added it.","since-session-unknown":"--since has the shape of a session id and names no commit, and no session the kind or the declaration reads has that id.","since-session-open":"--since names a session that is still open, so the comparison runs to the working tree.","intent-region-invalid":"The region's path, or its line range, does not exist in the tree read.","intent-record-unknown":"graph --intent --record names an id that no record of a decision kind read has.","intent-symbol-unsupported":"The region names a symbol, path#symbol, in a file no symbol resolver reads; a line range still works.","intent-symbol-unknown":"The region names a symbol the file does not declare in the tree read.","intent-symbol-ambiguous":"The region names a symbol that matches more than one declaration in the file; its qualified name picks one.","intent-history-shallow":"The repository is a shallow clone, so the region's history stops at the clone's boundary.","intent-plugin-failed":"A kind file's commitJoins, which joins commits to units, contracts and evidence, failed for a commit.","squash-unfollowed":"A squash commit's pull request ref (refs/pull/<n>/head) is not in the clone and could not be fetched from origin, so its original commits are not followed; the read keeps its answer without them.","intent-commit-undecided":"A commit changed the region when no decision constrained it at path granularity.","intent-commit-bare":"A commit names no unit, carries no record through its Chant-Record or Chant-Lease trailer, and has no pull request and no decision covering the region at its time.","intent-pin-drifted":"A decision's pinned artifact no longer hashes to the pin.","intent-pin-missing":"A decision's pinned artifact does not exist in the tree read.","intent-pin-stale":"A current decision pins an artifact at the hash a record it supersedes pinned, and the artifact has not changed since: the decision moved on and the artifact did not.","intent-artifact-unpinned":"An artifact decisions in the graph pinned, which no current decision pins.","intent-decision-superseded-live":"Every decision constraining the region is superseded.","intent-decision-provisional":"The current decisions constraining the region are all in states their kind does not close, such as decided.","intent-decision-contested":"A current decision constraining the region has an open concern: a dissent neither addressed nor withdrawn.","intent-constraint-coarse":"The region is constrained only through its member, not by path.","intent-constraint-lost":"A decision's path constraint names a path that does not exist in the tree read.","intent-evidence-unpinned":"A decision's evidence has no hash: a URL, or a path with no sha256.","intent-trailer-unverified":"A commit carries a trailer a plugin says claims authorship, and the commit is not attested.","intent-region-unconstrained":"No decision constrains the region at any granularity.","intent-decision-unimplemented":"A decided decision constrains the region, no work item that is not dropped implements it, and no commit falls in its window.","intent-work-blocked":"A work item constraining the region has commits in its window while a work item it needs is not done.","intent-work-open-decided-code":"Commits in the region are a decision's own work while the work item implementing that decision is still open.","intent-commit-join-conflict":"A commit joined to an agent run by its Chant-Run trailer or the run's record has the patch-id of a commit another run recorded, so it is not joined to that run by content.","intent-why-no-decision":"No current decision governs the region at any granularity, and none is carried out by the commits or runs that made its current lines.","intent-why-no-run":"None of the region's current lines was made by a commit an agent run is joined to.","intent-why-uncommitted":"Some of the region's lines are not committed yet.","intent-why-run-ambiguous":"Some lines come from a commit several agent runs made, and no run's recorded hunks say which wrote them.","change-uncovered":"A path the diff changes is covered by no current decided record and no open work item, by path or by its member.","change-out-of-scope":"A record in hand for the change, such as the work item it is for or a decision that item implements, lists a path the diff changes in its out_of_scope.","commit-unlinked":"A trunk commit in the range names no work item: it has no Chant-Record trailer of a work kind and no Chant-Lease trailer.","commit-wrongly-linked":"A trunk commit in the range names a work item that is not there: a Chant-Record whose id no work kind has or whose kind is not a work kind, a malformed Chant-Record, or a Chant-Lease that resolves to no work item, and no other trailer links it.","patch-path-invalid":"workspace patch --path names a path that is not relative and inside the workspace.","composites-no-chant-member":"No member of kind chant was read, so nothing declares a composite instance or a component.","composites-none-declared":"The members read declare no composite instance.","composites-no-component":"The members read declare no component, so no composite instance has one.","runtimes-config-unreadable":"The member's chant.config.ts could not be read, so only the built-in local runtime is listed, and no environment from the config.","runtimes-lexicon-unreadable":"A lexicon the member's config lists could not be loaded, so it is not listed as a runtime.","environments-none-declared":"The member's chant.config.ts declares no environments, so only local and the environments in its ledger are listed.","environments-ledger-undeclared":"The member's ledger has releases in an environment its config's environments don't cover, so chant run --env would refuse it and it is not listed.","environments-ledger-unreadable":"The chant/lifecycle branch exists and the member's ledger environments could not be listed.","environments-component-undeclared":"A component declares an environment its member's chant.config.ts environments don't cover, so chant run --env would refuse it and it is not listed (#3153).","executor-none-declared":"The member's chant.config.ts declares no executor for the environment, so nothing names the forge workflow that deploys it.","executor-config-unreadable":"The member's chant.config.ts could not be read, so whether a forge workflow deploys the environment is unknown.","diagram-source-missing":"A declared diagram's source file does not exist in the tree read.","diagram-render-missing":"A declared diagram's render file does not exist in the tree read.","diagram-render-drift":"A declared diagram records a sourceHash, and the source's bytes now hash to something else: the render is stale for its source.","security-signers-missing":"The workspace opts into verified-releases, and there is no .chant/allowed_signers to verify a release's signature against.","security-release-gate-missing":"Under verified-releases, identity.gates has no release entry, or it names no class, so a cut is not held to a class of signers.","security-publish-allows-unsigned":"Under verified-releases, a pipeline file runs release publish with --allow-unsigned.","security-sbom-disabled":"Under supply-chain, a member's chant.config.ts sets sbom: false on a publish target.","security-sbom-unsourced":"Under supply-chain, a member publishes, names no sbom file and has no package-lock.json, pom.xml or Cargo.lock to write one from.","security-publish-no-provenance":"Under supply-chain, a pipeline file runs release publish without --require-provenance.","security-component-no-sbom":"Under supply-chain, a member's components have no generate-sbom step.","security-component-no-verify":"Under supply-chain, a member's components have no verify step.","security-signed-since-unset":"Under who-ran-it, ci.green sets no signedSince, or there is no ci.green block.","security-runner-untrusted":"Under who-ran-it, .chant/trust.json lists no runner key.","security-tick-no-key":"Under who-ran-it, a pipeline file runs ci tick with no runner key.","security-review-not-required":"Under review-rules, an apply job passes --no-require-review, which the group overrides.","security-attribution-any":"Under review-rules, identity.attribution is not identified.","security-gate-unsigned":"Under review-rules, an apply job names a gate identity.gates does not list, or identity.gates lists none.","security-runner-start-no-key":"Under isolated-runners, .chant/trust.json lists no key under runners for a provisioner to sign runner-start statements with.","security-runner-start-no-role":"Under isolated-runners, no principal under runners in .chant/trust.json holds the runner role.","security-trust-unreadable":"Under isolated-runners, .chant/trust.json can't be read, so no runner-start statement can be checked.","ci-workflow-green-undeclared":"Under ci.workflow, the declaration has no ci.green block, so no commit gets a verdict and no release can be cut.","ci-workflow-no-pre-merge":"Under ci.workflow, ci.green.preMerge names no phase, so nothing says which checks run before the branch moves.","ci-workflow-apply-in-green":"Under ci.workflow, a phase in ci.green.require matches an apply job, which would wait on its own verdict.","ci-workflow-no-components":"Under ci.workflow, a member declares no component, so nothing of it can be cut or promoted.","ci-workflow-no-environments":"Under ci.workflow, a member's chant.config.ts declares no environments, so a release has nowhere to be promoted to.","ci-workflow-ungated-env":"Under ci.workflow, a component has no gate, so a promote to the last environment waits on no approval.","ci-workflow-pipeline-missing":"Under ci.workflow, no pipeline file runs the plan job, the merge job or chant ci tick.","ci-workflow-pipeline-differs":"Under ci.workflow, the pipeline does not match the workflow: it applies on merge under trunk-curated, records under trunk-curated+apply-on-merge, or applies before merge, or fails to, against apply-before-merge.","ci-workflow-publish-missing":"Under ci.workflow, no pipeline file runs chant release publish.","gate-approval-unbased":"An Op gate's approval block sets a quorum, policy, mode or context that identity.gates does not set at base, so the change being run can edit it.","ci-branch-route-differs":"A member's generated pull-request pipeline targets a branch other than the one ci.branches routes the member to.","box-credential-declared":"A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.","box-capability-unbrokered":"A capability in a member's box block names no broker, so the box would hold its credential.","box-fountain-callback-undeclared":"A box member builds a fountain Box, whose sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.","box-intent-unknown":"A box block names an intent, and no record of a declared kind named decision has that id.","box-intent-unconstrained":"The decision record a box names as its intent constrains no member or path of this workspace: no member: entry for a declared member and no path: entry at, above or inside one's directory.","box-none":"No member's box block declares services, so the workspace has no box for a host to plant.","box-several":"More than one member's box block declares services, and a planted workspace runs one box.","work-kind-missing":"No work kind to find the item in: --kind names a kind with no work block, or the declaration names no work kind.","work-kind-ambiguous":"More than one declared work kind has a record with the id, so --kind must name one.","work-item-unknown":"No work record has the id, so there is nothing to lease.","work-item-closed":"A claim on a work item in a closed state, such as done or dropped: there is no work left to claim.","work-criterion-unknown":"The work record lists no acceptance criterion with the id the evidence names, or its kind has no acceptance criteria.","lease-held":"Someone holds a live lease on the work item: another worker, or, for a claim, the same one.","lease-not-held":"Nobody holds a live lease on the work item: it expired, was released or was never claimed.","lease-token-mismatch":"The live lease on the work item carries another fencing token than the one given.","work-evidence-ops-missing":"Work evidence cites a run, deploy, gate answer or release plan the local chant/lifecycle branch does not hold.","work-evidence-ops-mismatch":"Work evidence cites an ops record that does not hash to the sha256 given, or a run whose outcome disagrees with the evidence's result.","work-evidence-ops-unfinished":"Work evidence cites a run that is still gated or waiting, so it has no outcome to show.","lease-race":"Another writer changed the lease between this command's read and its write.","lease-push-rejected":"The remote refused the lease push: another clone claimed the item first, or the remote could not be reached.","run-exists":"runs start or runs record was given a run id the ledger already has.","run-unknown":"runs end names a run the ledger has no start for.","run-ended":"runs end names a run whose end is already recorded.","runs-no-ledger":"The checkout has no chant/lifecycle branch, so there are no agent runs to read.","runs-ledger-malformed":"Some lines of the agent run ledger aren't run events; the rest are read.","run-not-ended":"runs sign or runs statement names a run with no end recorded. A statement is signed over the run's whole record.","run-statement-invalid":"The envelope's payload is not an in-toto Statement v1 with chant's agent-run predicate, or has a field the predicate does not define.","run-statement-signer-mismatch":"The statement names a signer other than the runner whose key signed it.","run-statement-mismatch":"A listed runner key signed the statement, and it does not match the run's record: another run, a record that hashes differently, or another unit, harness, model, provider or principal.","listing-member-unknown":"box listing set names a member the declaration does not declare.","listing-box-missing":"box listing set names a member whose entry declares no box block, so it has no listing.","listing-cover-invalid":"The cover can't be read, is not a PNG, JPEG or WebP picture, is larger than 5 MiB, has a path outside the workspace, or has an extension other than its picture format's.","member-exists":"member add names a member the declaration already has, with an entry other than the one given.","member-unknown":"member remove names a member the declaration does not declare.","trust-config-invalid":".chant/trust.json in the working tree is not JSON or does not match its schema, or the write would make it so.","trust-conflict":"--expect named a digest .chant/trust.json no longer has: another write changed it after the caller read it. The refusal names the digest it has now.","runner-exists":"trust runner add names a principal .chant/trust.json already lists with another key or class, or gives a key it lists for another principal.","runner-unknown":"trust runner remove names a principal .chant/trust.json lists no runner for.","factory-member-unknown":"box factory set names a member the declaration does not declare.","factory-box-missing":"box factory set names a member whose entry declares no box block, so it has no factory.","publish-member-unknown":"box publish names a member the declaration does not declare.","publish-none":"box publish names a member whose box block names no publisher, or which declares no box block.","publish-refused":"The box's publisher refused (it exited 2): nothing was published, and its message says why.","publish-failed":"The box's publisher could not be run, failed (a nonzero exit other than 2) or ran out of time; its message says what it had done.","publish-answer-invalid":"The box's publisher exited 0 and printed no JSON object, or one box-publish.schema.json does not allow.","publish-unrecorded":"The commit the publisher named is not in the repository, or lacks the apply record of ws-075: Chant-Applied-By naming --by, Chant-Applied-At, Chant-Applied-Commit and a Chant-Record for the item, or a Chant-Record for each record sent.","wip-no-branch":"HEAD is detached, or names a branch with no commit yet, so there is no branch to keep work in progress for.","wip-none":"wip restore was given no snapshot, and the branch has none under refs/chant/wip/<branch>.","wip-snapshot-unknown":"wip restore names something that is not a work-in-progress snapshot chant took.","wip-branch-other":"wip restore names a snapshot taken on another branch than the one checked out.","wip-race":"Another writer moved refs/chant/wip/<branch> between this command's read and its write.","wip-policy-none":"wip push or wip fetch was run, and no box block declares replicate, so there is no remote.","wip-remote-unknown":"The replicate policy names a git remote the checkout does not have; the host adds it, with its credential, before chant pushes.","ci-green-undeclared":"The declaration has no ci.green block, so chant does not know which check runs make a commit green.","ci-branch-unknown":"The checkout has no ref for the branch ci.green names: neither the remote-tracking branch nor a local one.","box-isolation-collision":"Two boxes on one host resolve to the same port, state path or cookie name, or two ports in one box share an offset.","box-isolation-literal":"A host's stateRoot or a box's state entry is a literal machine path instead of one derived from an environment reference and the box's name.","signers-file-missing":"There is no signers file at the base revision, so there is no signer history to read.","signers-removed":"The signers file was removed. Commits merged before the removal keep the set they were judged by; nothing after it verifies.","rotation-unparseable":"The rotation file beside the signers file is not JSON.","rotation-invalid":"The rotation file does not match its shape: schema 1, a version, the previous set's digest, a threshold and signatures.","rotation-first-version":"The first signer set's rotation file names a version other than 1, or a previous digest.","rotation-missing":"The signer set or its threshold changed and no rotation file signed by the set before it came with the change.","rotation-version-skew":"The rotation names a version other than the one after the set it replaces, as a replayed or skipped rotation does.","rotation-previous-mismatch":"The rotation names a previous digest other than the set it replaces, as a rollback to an older set does.","rotation-threshold-unsatisfiable":"The new threshold is more than the number of distinct signers in the new set, so no later rotation could meet it.","rotation-threshold-not-met":"Fewer distinct signers of the set before signed the rotation, in the chant-signers namespace, than that set's threshold.","trust-policy-unreadable":"The trust policy at base can't be read, or its signer history is broken, so no runner key is trusted.","envelope-unreadable":"The --envelope file can't be read, or is not JSON.","envelope-invalid":"The file is not a DSSE envelope: payloadType, payload in canonical base64, and signatures with keyid and sig.","envelope-untrusted":"No signature in the envelope verifies against a runner key the policy at base lists.","evidence-payload-type":"The envelope's payload type is not application/vnd.in-toto+json.","evidence-statement-invalid":"The payload is not an in-toto Statement v1 with chant's runner-evidence predicate, or has a field the predicate does not define.","evidence-runner-mismatch":"The statement names a runner other than the one whose key signed it.","runner-key-invalid":"The key given to evidence sign or runs sign is not an Ed25519 private key in PEM, or the key given to trust runner add is not an ssh-ed25519 public key or an Ed25519 key in PEM.","runner-key-is-signer":"The key given to evidence sign, runs sign or trust runner add is a person's key in the signers file, or trust runner add names a signer. Evidence and run statements are signed by a service or CI identity.","runner-key-unlisted":"The policy at base lists no runner with the key given to evidence sign or runs sign.","ref-update-invalid":"The hook's standard input is not the lines git hands a pre-receive or pre-push hook.","ref-evidence-missing":"No runner evidence for a check the policy at base requires for the ref is attached to the pushed commit.","ref-evidence-stale":"Evidence for a required check verifies, but a record it names changed after it was signed, or it names no records and was signed over another tree.","lock-invalid":"The lineage lock can't be read.","manual-step-open":"A scope in the lineage lock has an open manual step.","missing-dir":"The chant member's directory does not exist, so there is nothing to build.","no-lexicon":"No lexicon is named in the member's chant.config.* or package.json, so there is nothing to build.","lexicon-unsupported":"A lexicon the member uses has no native target in workspace exit.","exit-failed":"The member's exit did not finish: its build failed, or it was refused.","choudoufu-steps-missing":"A choudoufu member's exit listed no roundtrip steps.","native-missing":"A native file the exit wrote is missing or empty.","native-unreadable":"A native file the exit wrote is not valid JSON, or has no content.","no-deploy-command":"A native file that can be deployed has no stock deploy command.","chant-config-left":"A chant.config.* file is still in the exited member.","chant-dependency":"The member's package.json still has a chant dependency, or a script that calls chant.","chant-in-ci":"A CI file of the exited member still calls chant.","declaration-not-other":"The declaration still gives the exited member a kind other than other.","member-required":"workspace drift was given no --member, or more than one: it reads one member.","no-drift-read":"The member's kind has no drift read, such as other, app or a nested workspace.","read-unsupported":"--read names a read the member's engine does not answer, such as state on a chant member.","resource-unsupported":"--resource was given for an engine that cannot read one resource on its own.","env-required":"A chant member's live drift read needs an environment, and --env was not given."},jSt=Object.keys(SHe),EHe=/^plugin:([^:\s]+):([a-z0-9]+(?:-[a-z0-9]+)*)$/});function aae(e){let t=e.commitJoins,n=e.commitJoinsName;if(t===void 0)return n===void 0?void 0:"commitJoinsName: a kind file with no commitJoins has no findings to name";if(n!==void 0&&(typeof n!="string"||!PHe.test(n)))return"commitJoinsName: a string with no colon or space, the <name> of plugin:<name>:<code>";let r=n===void 0?{}:{name:n};if(typeof t=="function")return{form:"function",join:t,...r};let o=OHe.safeParse(t);return o.success?{form:"data",data:o.data,...r}:o.error.issues.map(i=>`commitJoins${i.path.length?`.${i.path.join(".")}`:""}: ${i.message}`).join("; ")}function Pm(e,t){let n=t.toLowerCase(),r=[];for(let[o,i]of Object.entries(e))if(o.toLowerCase()===n)for(let s of i){let a=s.trim();a&&!r.includes(a)&&r.push(a)}return r}function nd(e,t){return Pm(e,t)[0]}function a2(e,t){let n=t.toLowerCase();return Object.keys(e).some(r=>r.toLowerCase()===n)}function AHe(e,t,n){if(!e)return{};let r=n.read(e.split("{id}").join(t));if(r===void 0)return{};let o;try{o=JSON.parse(r)}catch{throw new Error(`${e.split("{id}").join(t)} is not JSON`)}if(o===null||typeof o!="object"||Array.isArray(o))return{};let{id:i,...s}=o;return s}function CHe(e,t,n){let r={},o=(a,c)=>({...AHe(e.records?.[a],c,n),id:c});for(let a of["unit","contract"]){let c=e.trailers[a],l=c?nd(t.trailers,c):void 0;l&&(r[a]=o(a,l))}let i=e.trailers.evidence?Pm(t.trailers,e.trailers.evidence):[];i.length>0&&(r.evidence=i.map(a=>o("evidence",a)));let s=(e.authorship??[]).filter(a=>a2(t.trailers,a));return s.length>0&&(r.authorship=s),r}function Am(e){let t=e?.decisions;return Array.isArray(t)?t.filter(n=>typeof n=="string"&&n!==""):[]}async function uA(e,t,n,r){if(e.form==="data")return CHe(e.data,t,n);let o=await e.join(t,n);if(o==null)return{};if(typeof o!="object")throw new Error("commitJoins returned something that is not an object");let i=(l,d)=>{if(l!=null){if(typeof l!="object"||Array.isArray(l)||typeof l.id!="string"||l.id==="")throw new Error(`commitJoins returned a ${d} with no string id`);return l}},s={},a=i(o.unit,"unit"),c=i(o.contract,"contract");if(a&&(s.unit=a),c&&(s.contract=c),o.evidence!==void 0&&o.evidence!==null){let l=Array.isArray(o.evidence)?o.evidence:[o.evidence];s.evidence=l.map(d=>i(d,"evidence")).filter(Boolean)}if(o.authorship!==void 0){if(!Array.isArray(o.authorship)||!o.authorship.every(l=>typeof l=="string"))throw new Error("commitJoins returned authorship that is not a list of trailer keys");s.authorship=o.authorship}if(o.findings!==void 0&&o.findings!==null){if(!Array.isArray(o.findings))throw new Error("commitJoins returned findings that are not a list");s.findings=o.findings.map(l=>{if(l===null||typeof l!="object"||Array.isArray(l))throw new Error("commitJoins returned a finding that is not an object");let{code:d,message:u,refs:p}=l;if(!lA(d,r))throw new Error(`commitJoins returned the finding code ${JSON.stringify(d)}, and a plugin's codes are plugin:${r}:<code>, with <code> in lower case words joined by dashes`);if(typeof u!="string"||u==="")throw new Error(`commitJoins returned the finding ${d} with no message`);if(p!==void 0&&(!Array.isArray(p)||!p.every(f=>typeof f=="string")))throw new Error(`commitJoins returned the finding ${d} with refs that are not a list of strings`);return{code:d,message:u,refs:p??[]}})}return s}var dA,s2,OHe,PHe,Cv=x(()=>{"use strict";Jn();i2();dA=w.string().regex(/^[A-Za-z0-9][A-Za-z0-9-]*$/,"a trailer key holds letters, digits and dashes"),s2=w.string().min(1).refine(e=>e.includes("{id}")&&!e.startsWith("/")&&!e.split("/").includes(".."),"a record path is relative to the workspace root and holds {id}"),OHe=w.object({trailers:w.object({unit:dA.optional(),contract:dA.optional(),evidence:dA.optional()}).strict(),records:w.object({unit:s2.optional(),contract:s2.optional(),evidence:s2.optional()}).strict().optional(),authorship:w.array(dA).optional()}).strict(),PHe=/^[^:\s]+$/});function Tv(e){let t=e.indexOf(":");if(t<=0)return;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();return DHe.test(n)&&NHe.test(r)?{kind:n,id:r}:void 0}function lae(e){let t=[];for(let o of Pm(e,Cm)){let i=Tv(o);i&&!t.some(s=>s.kind===i.kind&&s.id===i.id)&&t.push(i)}let n=nd(e,_He)??null,r=nd(e,THe)??null;return{agent:nd(e,_v)??null,lease:nd(e,Iv)??null,run:nd(e,cae)??null,records:t,applied:n===null?null:{by:n,at:nd(e,IHe)??null,commit:r!==null&&jHe.test(r)?r:null}}}var _v,Iv,cae,Cm,_He,IHe,THe,DHe,NHe,jHe,_m=x(()=>{"use strict";Cv();_v="Chant-Agent",Iv="Chant-Lease",cae="Chant-Run",Cm="Chant-Record",_He="Chant-Applied-By",IHe="Chant-Applied-At",THe="Chant-Applied-Commit",DHe=/^[a-z][a-z0-9-]*$/,NHe=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/,jHe=/^[0-9a-f]{40,64}$/});var mae={};me(mae,{HANDED_TO_ROOT_ENV:()=>l2,declaredChantPin:()=>gae,handToRootChant:()=>Dv,locateWorkspace:()=>Kt,rootChantBin:()=>fae});import{spawn as LHe}from"node:child_process";import{existsSync as MHe,readFileSync as FHe,realpathSync as dae}from"node:fs";import{join as c2,relative as uae,resolve as WHe}from"node:path";function Kt(e,t){let n=hs(e);if(t!==void 0){if(!n)throw new ye("not-a-git-repository","--at reads git objects, and this directory is not in a git repository");let i=_w(n,t);if(!i)throw new ye("revision-unknown",`--at ${t} names no commit in this repository`);let s=Xs(n,i),a=pae(uae(n,dae(WHe(e)))),c=QB(s,a.startsWith("..")?"":a);if(c===void 0)throw new ye("declaration-missing",`no chant.workspace.json or .jsonc between ${a||"."} and the git root at ${i.slice(0,8)}`);return{tree:c===""?s:Xs(n,i,c),root:c===""?".":c,rootOnDisk:c2(n,...c.split("/")),at:i,top:n}}let r=kr(e);if(!r)throw new ye("declaration-missing",n?"no chant.workspace.json or .jsonc between this directory and the git root; chant workspace init proposes one":"no chant.workspace.json or .jsonc in this directory; chant workspace init proposes one");let o=n?pae(uae(n,dae(r.dir))):r.dir;return{tree:On(r.dir),root:o===""?".":o,rootOnDisk:r.dir,at:null,top:n}}function fae(e,t){let n=oa(Vg,e);if(!n)return;let r;try{r=JSON.parse(FHe(c2(n,"package.json"),"utf-8"))}catch{return}if(r.version!==t)return;let o=typeof r.bin=="string"?r.bin:r.bin?.chant;if(typeof o!="string")return;let i=c2(n,o);return MHe(i)?i:void 0}function gae(e){let t=Rs.find(o=>e.tree.stat(o)==="file");if(!t)return;let n;try{n=e.tree.read(t)}catch{return}let r=Nl(n,{jsonc:t.endsWith(".jsonc")});if(!(!r.ok||r.value===null||typeof r.value!="object"||Array.isArray(r.value)))return gP(r.value)?.version}async function Dv(e,t,n=process.argv.slice(2)){if(process.env[l2])return;let r;try{r=Kt(e,t)}catch{return}let o=gae(r);if(o===void 0||o===on())return;let i=fae(r.rootOnDisk,o);if(i)return new Promise(s=>{let a=LHe(i,n,{stdio:"inherit",env:{...process.env,[l2]:o}});a.on("error",c=>{process.stderr.write(`could not start the root's chant ${o} at ${i}: ${c.message}
173
+ `))a.startsWith("\0")?s=a.slice(1).trim():a&&i.has(a)&&!r.has(a)&&r.set(a,s);return r}function xHe(e,t){if(t.length===0)return new Set;let n=o2(e,["--literal-pathspecs","status","--porcelain=v1","-z","--untracked-files=all","--",...t]),r=new Set,o=n.split("\0");for(let i=0;i<o.length;i++){let s=o[i];s.length<4||(r.add(s.slice(3)),(s[0]==="R"||s[0]==="C")&&i++)}return r}function rae(e,t,n){try{return iae("git",["merge-base","--is-ancestor",t,n],{cwd:e,stdio:"ignore"}),!0}catch{return!1}}function oae(e,t,n){return t.adopted.some(r=>rae(e,n,r.to)&&(r.from===void 0||!rae(e,n,r.from)))}function Av(e,t,n,r){let o=t;if(t.signersAt){let s=t.signersAt(n);if(o={...t,signers:s?.signers??[]},!s||s.version===0){let a="no signer set was in effect where this commit entered the base's history";return oae(e,t,n)?{level:"adopted",commit:n,reason:`in a commit range the policy at base adopts; ${a}`}:{level:"unattested",commit:n,reason:a}}}let i=rA({repo:e,policy:o},n,r);return i.level==="unattested"&&oae(e,t,n)?{level:"adopted",commit:n,attestor:i.attestor,reason:`in a commit range the policy at base adopts; ${i.reason}`}:{level:i.level,commit:n,attestor:i.attestor,...i.principal?{principal:i.principal}:{},...i.key?{key:i.key}:{},reason:i.reason}}function sae(e){let t=new Map,n=i=>{for(let s of e.paths)t.set(s,{level:"unattested",commit:null,reason:i});return t};if(!e.repo)return n("not in a git repository");if(e.policy.problems.length>0)return n(e.policy.problems.join("; "));if(!e.policy.active)return n(`no signers file (${e.policy.signersPath}) at base ${e.policy.base?.slice(0,8)}; attestation is off`);let r=e.at===null?xHe(e.repo,e.paths):new Set,o=$He(e.repo,e.at??"HEAD",e.paths.filter(i=>!r.has(i)));for(let i of e.paths){if(r.has(i)){t.set(i,{level:"unattested",commit:null,reason:"the working tree has uncommitted changes to this file"});continue}let s=o.get(i);if(!s){t.set(i,{level:"unattested",commit:null,reason:"no commit holds this file"});continue}let a=Av(e.repo,e.policy,s,e.attestors);t.set(i,e.revisit?.(i,a)??a)}return t}var td=x(()=>{"use strict";zi();Om();Ki();tae()});function lA(e,t){if(typeof e!="string")return!1;let n=e.match(EHe);return!!n&&(t===void 0||n[1]===t)}var SHe,jSt,EHe,i2=x(()=>{"use strict";SHe={"declaration-missing":"No chant.workspace.json or .jsonc between the directory and the git root.","declaration-ambiguous":"Both chant.workspace.json and chant.workspace.jsonc exist.","declaration-unparseable":"The declaration is not valid JSON, or not valid JSONC for .jsonc.","declaration-invalid":"The declaration does not match its schema, repeats a name, or --member names no entry.","placement-invalid":"A member or group match breaks a placement rule.","reader-too-old":"The declaration's minReader is newer than the chant reading it.","root-chant-required":"The declaration pins a chant version other than the reader's, and that chant is not installed at the workspace root.","not-a-git-repository":"--at, or a ledger read, needs a git repository and there is none.","revision-unknown":"--at names no commit.","live-at-revision":"graph was given --live and --at: a live read is of the account now, not of a revision.","environment-invalid":"An environment name that can't name a ledger directory.","dir-missing":"The member's directory does not exist.","unknown-kind":"No built-in kind or pinned package supplies the member's kind.","kind-probe-failed":"The member's directory is not what its kind reads.","no-matches":"An example group matches no directory holding a chant project.","kind-not-run":"The member's kind is one the per-member commands don't run, such as other.","command-failed":"The member's own command exited with a failure, or the lexicon that reads the member through its kind's graph block isn't installed where the workspace resolves its pin.","output-unreadable":"The member's command printed something that isn't the document asked for.","ir-version-unsupported":"The member's IR has a version this chant can't read.","query-invalid":"search was given no query, a term its grammar can't parse, or a --count-by that is not a grouping.","usage-invalid":"search was given a flag that needs another one it lacks, or two that don't go together, such as --check-live without --snapshot.","environment-unknown":"--env names an environment the project's chant config does not declare.","snapshot-unavailable":"--snapshot names a snapshot chant can't replay: none is recorded for the environment, or the ref is one replay does not take.","build-failed":"The project's build, or one of its build roots, failed, so the graph search would answer over is incomplete.","index-unavailable":"--index names an index version chant can't read: none is recorded under the scope key in the store, or its stamp is not the scope or version asked for.","snapshot-at-revision":"workspace search was given --snapshot and --at: a snapshot replays the estate as recorded over the source in the working tree, not at a revision.","member-chant-too-old":"The member's chant predates the document asked for: it has no such command, or prints it without the read contract.","lexicon-has-no-mapping":"The lexicon ships no capability mapping, so no capability rule can read its resources.","capability-not-derivable":"The lexicon's capability mapping labels none of the kinds the capability's rule needs.","lexicon-not-loaded":"The lexicon isn't installed where the chant that wrote the catalog runs, so its mapping wasn't read.","instances-each-value":"The block's count or for_each reads each.value or each.key, which only a plan can count.","instances-merge":"The block's count or for_each calls merge(), which the declared graph does not evaluate.","instances-value-unknown":"The block's count or for_each is a form the graph reads, and the files a plan reads give it no value, or one that keys no instances.","instances-form-unread":"The block's count or for_each is an expression the graph does not read: another function, a for expression, another conditional, arithmetic, or a resource, data or module attribute.","instances-over-limit":"The block would have more than 256 instance nodes, so it is drawn alone.","instances-module-uncounted":"The block is under an expanded module call whose count or for_each the graph cannot count, so none of its instance ids is known.","ledger-unreadable":"Reading the ledger failed, so nothing from it is listed.","ledger-malformed":"Some lines of the ledger aren't release records; the rest are listed.","filter-invalid":"A --where or --since names a field the read doesn't have, an operator its type doesn't take, or a value not of its type; nothing was read.","table-unknown":"chant ledger was given a table that is not one of resources, snapshots, runs, gates, deploys, releases or cuts.","gates-no-ledger":"The checkout has no chant/lifecycle branch, so there is no gate ledger to read.","gates-no-gate-ledger":"The branch has no gate ledger for the member: no run of it has reached a gate.","gates-ledger-unreadable":"Reading the member's gate ledger failed, so no gate is listed.","stewards-unreadable":"An *.op.ts file could not be imported, so a steward it declares may be missing.","stewards-conflict":"A steward was dropped: its name, or an Op it lists, belongs to another steward.","steward-runs-unreadable":"Reading an Op's run ledger, or a ConvergeOp's converge ledger, failed, so its last run or last tick is null.","record-unparseable":"No front matter, a YAML error or a value outside the JSON subset of YAML, or for a JSON kind a file that is not one object or repeats a member name.","record-schema-invalid":"The record's front matter, or its JSON object, does not match the kind's schema.","record-id-duplicate":"Another record earlier in path order has the same id.","record-supersedes-unknown":"A supersedes link names an id no record has.","record-supersedes-conflict":"A second closed record supersedes a record another one already superseded.","record-remediates-unknown":"A remediates link names an id no record has.","record-remediates-not-closed":"A remediates link names a record that isn't closed; a record still open is amended instead.","record-seal-mismatch":"A closed record's seal is not the whole-file seal of its text now: the record changed after it closed.","session-seal-mismatch":"A closed session's seal is not the whole-file seal of its text now: the session changed after it closed, or was sealed by the rule before #2546.","session-verdict-unknown-record":"A session's verdict names a record that none of the session kind's subject records has.","asset-drift":"A file the record pins by hash has changed: its bytes no longer hash to the pinned sha256.","asset-missing":"A file the record pins by hash does not exist in the tree read.","asset-stale":"A file the record pins is unchanged at the hash a record it supersedes pinned: the decision changed and the artifact did not follow.","record-supersedes-pending":"A supersedes link from a record whose state is weaker than the record it names, so the link has no effect yet.","record-no-evidence":"The record's evidence list is empty: it cites nothing and pins no file. Information for a reviewer, never an error.","review-undigested":"A verdict names no digest of the text it judged. It still counts, and an amendment does not stop it counting.","source-transcript-drift":"The record's source block pins a transcript by hash, the file it names can be read here, and its bytes hash to something else: it is not the transcript the record means.","work-needs-unknown":"A work record's needs list names a work id no record has, so the item stays blocked.","work-implements-unknown":"A work record's implements list names a decision id no decision has.","work-needs-cycle":"A work record needs itself through its needs links, so it can never be ready.","work-implements-undecided":"A work record implements a decision whose state is not approved, such as proposed.","work-done-unpinned":"A work record is done and its evidence list is empty: nothing shows the work was done.","work-closed-without-date":"A work record is done or dropped and has no closing date.","work-done-gap-open":"A work record is done, and the finding it came from still fires on its region. graph --intent raises it, and records does by walking that region.","work-acceptance-unmet":"A work record is done, and one of its acceptance criteria has no passing evidence of the verification it expects. check fails on it (WSP117).","work-acceptance-self-verified":"A passing manual verdict on a work record's criterion names the record's implementer, so it does not count: a manual verdict comes from someone else.","work-contract-unknown":"A work record names a contract that no record of its kind's contract kind has.","work-contract-undecided":"A work record names a contract whose state is not approved, such as a draft.","work-tier-unknown":"A work record names a builder tier that its kind's work.tier.tiers does not list.","flag-work-unknown":"A flag record names a work item that no record of its kind's work kind has.","flag-stale":"Every decision a flag's work item implements is confirmed, so the flag is due for removal. check reports it (WSP118).","answer-points-unreadable":"The points file the answer kind names can't be read, or is not valid.","answer-point-unknown":"The answer's point is not declared in the points file the answer kind names.","answer-point-changed":"The point's declaration changed since the question was asked, so the answer is to an older version of the question.","review-decider":"The verdict is the decider's own, and the quorum counts verdicts besides the decider's.","review-agent":"The reviewer holds the agent role in the trust policy at base.","review-duplicate":"A later verdict by the same principal replaces this one. Names are compared after NFKC, trimming and lower-casing.","review-older-digest":"The verdict names a digest other than the record's text now: the record changed after the verdict.","review-unattested":"An attestation policy is active at base, and the verdict carries no seal that verifies for its reviewer.","seal-missing":"The verdict, or the record, carries no seal.","seal-signer-unlisted":"The reviewer, or the record's author, has no key in the signers file at base, so the seal can't count.","seal-signature-invalid":"The seal is malformed, names a signer other than the reviewer or author, or its signature does not verify over the verdict or record.","seal-unverifiable":"Nothing here can say whose seal it is: there is no signers file at base, ssh-keygen is not installed, or the record came back in a return sealed by a signer no admission lists yet.","record-unattested":"A signers file is active at base, and the record names an author whose seal does not verify: it has none, the author has no key in the file, or the signature fails.","record-ratified-below-quorum":"The record is in its kind's ratified state (reviews.ratified), and its quorum is not met: it was written to that state by hand, past the check of records new and amend. It is still read, and stays valid.","kind-unreadable":"The record kind file is missing or could not be imported.","kind-invalid":"The record kind file exports no recordKind, or its shape is wrong.","schema-unreadable":"The schema file the record kind names is missing or is not JSON.","schema-id-mismatch":"The schema's $id differs from the id the record kind names.","schema-invalid":"The record schema itself does not compile.","location-missing":"The records directory does not exist, in the tree or at the revision.","write-usage-invalid":"The command line lacks a value the write needs, or gives one it does not take.","write-input-invalid":"The fields given with --from or --set can't be read, are not JSON, or are not a JSON object.","record-not-found":"No record of the kind has the id given.","record-id-taken":"The id given for a new record is already used, by a record or a file name.","record-id-unallocatable":"No id was given and none can be allocated: the records share no single prefix and --prefix names none.","record-path-unmatched":"The file name made from the record's id and title does not match the kind's location.","record-closed":"The record is in a closed state, so nothing in it changes; a new record supersedes it instead.","amend-id-immutable":"An amendment changes the record's id, and ids are never renumbered.","amend-supersede-instead":"The record is approved, and the amendment changes a field the approval rule does not let change in place; a new record supersedes it instead.","review-unsupported":"The kind's schema has no reviews field, so its records take no review.","review-note-required":"A dissent was given with no note: a dissent needs a reason.","review-sign-failed":"--sign was given and no seal could be made: the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.","record-state-not-initial":"A record written through chant serve mcp gives a state other than the kind's first: a new record opens proposed, and a person moves it on.","source-harvest-not-proposed":"A harvested record (source.via harvest) was written in a state other than the kind's first: a harvest proposes, and a person decides.","ratify-quorum-not-met":"The write puts a record in its kind's ratified state (reviews.ratified), and the record's quorum is not met: too few agreeing verdicts count.","record-sign-failed":"--sign was given and no author seal could be made: the record names no author, the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.","record-conflict":"--expect named a digest the record no longer has: another write changed it after the caller read it. The refusal names the digest it has now; re-read the record and write again.","write-lock-timeout":"Another write held the working tree's write lock for longer than the write waits (CHANT_WRITE_LOCK_WAIT_MS); the refusal names the holder. Run the write again.","write-lock-not-held":"CHANT_WRITE_LOCK names a batch's lock token that no longer holds the working tree's write lock: the batch released it, or it expired and another writer took it.","write-scope-member":"The write is to a file, or to a record kind, of a member outside the writer's scope: an agent session writes only the members it is bound to, and writeScope.<class>.members leaves the member out.","write-scope-kind":"The write is to a record kind writeScope.<class>.records does not list, with a verb it does not list for the kind, or deletes a record.","write-scope-protected":"The write is to a file writeScope.<class>.protected lists, or one under a directory it lists, outside the top-level keys or JSON Pointers the entry's except allows (#3146, #3308).","write-scope-class-unknown":"The declaration's writeScope at base names a principal class no pinned package supplies, and the writer is judged human, so it may be in that class; the write is refused until the package is installed at the pinned version or the entry removed (#3080).","agent-unknown":"CHANT_AGENT, or a commit's Chant-Agent trailer, names an agent session the declaration at base does not declare.","principal-unidentified":"chant.workspace.json at base sets identity.attribution to identified, and the write names a person by a bare name: --by, an author field or a decision point's answerer must be a forge identity (github:<login>, gitlab:<login>, <forge>@<host>:<login>), a principal the signers file at base lists, or an agent, runner or service principal (#3163).","session-unknown":"--session names no session of a session kind whose subjects are the record's kind.","session-not-open":"--session names a session in a closed state, which takes no more verdicts.","points-undeclared":"No record kind with an answers block is declared, or given with --kind, so there is no points file to ask.","points-invalid":"The points file an answer kind names can't be read, or does not match decision-points.schema.json and the rules checked in code.","point-unknown":"No points file declares the point asked, or the one an answer names.","point-inputs-invalid":"The inputs given to an ask are not a JSON object of the point's declared inputs.","point-decider-failed":"A model decider that fails closed (unreachable: fail) could not answer, so the ask wrote nothing.","answer-not-candidate":"The people's answer is not one of the question's candidates.","quorum-not-met":"Too few of the people who answered count toward the point's quorum: distinct, not holding the agent role, not the steward that asked, and holding one of its roles when it names any. Nobody named over MCP or ACP counts (#3817).","answer-in-steward-turn":"The answer was given during a steward's turn, or by a process it started: a steward never answers a decision point, and a person answers it through hud or at a shell.","answer-never-over-mcp":"The answer or retraction came over MCP or ACP, or from a process a session on one started, and the question constrains a gate that is never resolved there: a person answers it at a shell or through hud (#3817).","answer-not-answered":"points retract names a question that has no answer to retract: it is escalated or proposed, and people answer it instead (#3351).","answer-field-unsupported":"The answer kind's copy of point-answer.schema.json predates a field the write needs, a note, a relay, a retraction, an ad-hoc question's asked or a withdrawal: copy the schema anew to turn it on (#3351, #3402, #3403, #2888).","point-candidates-invalid":"points ask names an ad-hoc point without --candidates, a declared point with them, or candidates that are not a question and criteria of the point's question type (#3403).","since-rev-unknown":"--since names no commit, or a session with no opening revision and no commit that added it.","since-session-unknown":"--since has the shape of a session id and names no commit, and no session the kind or the declaration reads has that id.","since-session-open":"--since names a session that is still open, so the comparison runs to the working tree.","intent-region-invalid":"The region's path, or its line range, does not exist in the tree read.","intent-record-unknown":"graph --intent --record names an id that no record of a decision kind read has.","intent-symbol-unsupported":"The region names a symbol, path#symbol, in a file no symbol resolver reads; a line range still works.","intent-symbol-unknown":"The region names a symbol the file does not declare in the tree read.","intent-symbol-ambiguous":"The region names a symbol that matches more than one declaration in the file; its qualified name picks one.","intent-history-shallow":"The repository is a shallow clone, so the region's history stops at the clone's boundary.","intent-plugin-failed":"A kind file's commitJoins, which joins commits to units, contracts and evidence, failed for a commit.","squash-unfollowed":"A squash commit's pull request ref (refs/pull/<n>/head) is not in the clone and could not be fetched from origin, so its original commits are not followed; the read keeps its answer without them.","intent-commit-undecided":"A commit changed the region when no decision constrained it at path granularity.","intent-commit-bare":"A commit names no unit, carries no record through its Chant-Record or Chant-Lease trailer, and has no pull request and no decision covering the region at its time.","intent-pin-drifted":"A decision's pinned artifact no longer hashes to the pin.","intent-pin-missing":"A decision's pinned artifact does not exist in the tree read.","intent-pin-stale":"A current decision pins an artifact at the hash a record it supersedes pinned, and the artifact has not changed since: the decision moved on and the artifact did not.","intent-artifact-unpinned":"An artifact decisions in the graph pinned, which no current decision pins.","intent-decision-superseded-live":"Every decision constraining the region is superseded.","intent-decision-provisional":"The current decisions constraining the region are all in states their kind does not close, such as decided.","intent-decision-contested":"A current decision constraining the region has an open concern: a dissent neither addressed nor withdrawn.","intent-constraint-coarse":"The region is constrained only through its member, not by path.","intent-constraint-lost":"A decision's path constraint names a path that does not exist in the tree read.","intent-evidence-unpinned":"A decision's evidence has no hash: a URL, or a path with no sha256.","intent-trailer-unverified":"A commit carries a trailer a plugin says claims authorship, and the commit is not attested.","intent-region-unconstrained":"No decision constrains the region at any granularity.","intent-decision-unimplemented":"A decided decision constrains the region, no work item that is not dropped implements it, and no commit falls in its window.","intent-work-blocked":"A work item constraining the region has commits in its window while a work item it needs is not done.","intent-work-open-decided-code":"Commits in the region are a decision's own work while the work item implementing that decision is still open.","intent-commit-join-conflict":"A commit joined to an agent run by its Chant-Run trailer or the run's record has the patch-id of a commit another run recorded, so it is not joined to that run by content.","intent-why-no-decision":"No current decision governs the region at any granularity, and none is carried out by the commits or runs that made its current lines.","intent-why-no-run":"None of the region's current lines was made by a commit an agent run is joined to.","intent-why-uncommitted":"Some of the region's lines are not committed yet.","intent-why-run-ambiguous":"Some lines come from a commit several agent runs made, and no run's recorded hunks say which wrote them.","change-uncovered":"A path the diff changes is covered by no current decided record and no open work item, by path or by its member.","change-out-of-scope":"A record in hand for the change, such as the work item it is for or a decision that item implements, lists a path the diff changes in its out_of_scope.","commit-unlinked":"A trunk commit in the range names no work item: it has no Chant-Record trailer of a work kind and no Chant-Lease trailer.","commit-wrongly-linked":"A trunk commit in the range names a work item that is not there: a Chant-Record whose id no work kind has or whose kind is not a work kind, a malformed Chant-Record, or a Chant-Lease that resolves to no work item, and no other trailer links it.","patch-path-invalid":"workspace patch --path names a path that is not relative and inside the workspace.","composites-no-chant-member":"No member of kind chant was read, so nothing declares a composite instance or a component.","composites-none-declared":"The members read declare no composite instance.","composites-no-component":"The members read declare no component, so no composite instance has one.","runtimes-config-unreadable":"The member's chant.config.ts could not be read, so only the built-in local runtime is listed, and no environment from the config.","runtimes-lexicon-unreadable":"A lexicon the member's config lists could not be loaded, so it is not listed as a runtime.","environments-none-declared":"The member's chant.config.ts declares no environments, so only local and the environments in its ledger are listed.","environments-ledger-undeclared":"The member's ledger has releases in an environment its config's environments don't cover, so chant run --env would refuse it and it is not listed.","environments-ledger-unreadable":"The chant/lifecycle branch exists and the member's ledger environments could not be listed.","environments-component-undeclared":"A component declares an environment its member's chant.config.ts environments don't cover, so chant run --env would refuse it and it is not listed (#3153).","executor-none-declared":"The member's chant.config.ts declares no executor for the environment, so nothing names the forge workflow that deploys it.","executor-config-unreadable":"The member's chant.config.ts could not be read, so whether a forge workflow deploys the environment is unknown.","diagram-source-missing":"A declared diagram's source file does not exist in the tree read.","diagram-render-missing":"A declared diagram's render file does not exist in the tree read.","diagram-render-drift":"A declared diagram records a sourceHash, and the source's bytes now hash to something else: the render is stale for its source.","security-signers-missing":"The workspace opts into verified-releases, and there is no .chant/allowed_signers to verify a release's signature against.","security-release-gate-missing":"Under verified-releases, identity.gates has no release entry, or it names no class, so a cut is not held to a class of signers.","security-publish-allows-unsigned":"Under verified-releases, a pipeline file runs release publish with --allow-unsigned.","security-sbom-disabled":"Under supply-chain, a member's chant.config.ts sets sbom: false on a publish target.","security-sbom-unsourced":"Under supply-chain, a member publishes, names no sbom file and has no package-lock.json, pom.xml or Cargo.lock to write one from.","security-publish-no-provenance":"Under supply-chain, a pipeline file runs release publish without --require-provenance.","security-component-no-sbom":"Under supply-chain, a member's components have no generate-sbom step.","security-component-no-verify":"Under supply-chain, a member's components have no verify step.","security-signed-since-unset":"Under who-ran-it, ci.green sets no signedSince, or there is no ci.green block.","security-runner-untrusted":"Under who-ran-it, .chant/trust.json lists no runner key.","security-tick-no-key":"Under who-ran-it, a pipeline file runs ci tick with no runner key.","security-review-not-required":"Under review-rules, an apply job passes --no-require-review, which the group overrides.","security-attribution-any":"Under review-rules, identity.attribution is not identified.","security-gate-unsigned":"Under review-rules, an apply job names a gate identity.gates does not list, or identity.gates lists none.","security-runner-start-no-key":"Under isolated-runners, .chant/trust.json lists no key under runners for a provisioner to sign runner-start statements with.","security-runner-start-no-role":"Under isolated-runners, no principal under runners in .chant/trust.json holds the runner role.","security-trust-unreadable":"Under isolated-runners, .chant/trust.json can't be read, so no runner-start statement can be checked.","ci-workflow-green-undeclared":"Under ci.workflow, the declaration has no ci.green block, so no commit gets a verdict and no release can be cut.","ci-workflow-no-pre-merge":"Under ci.workflow, ci.green.preMerge names no phase, so nothing says which checks run before the branch moves.","ci-workflow-apply-in-green":"Under ci.workflow, a phase in ci.green.require matches an apply job, which would wait on its own verdict.","ci-workflow-no-components":"Under ci.workflow, a member declares no component, so nothing of it can be cut or promoted.","ci-workflow-no-environments":"Under ci.workflow, a member's chant.config.ts declares no environments, so a release has nowhere to be promoted to.","ci-workflow-ungated-env":"Under ci.workflow, a component has no gate, so a promote to the last environment waits on no approval.","ci-workflow-pipeline-missing":"Under ci.workflow, no pipeline file runs the plan job, the merge job or chant ci tick.","ci-workflow-pipeline-differs":"Under ci.workflow, the pipeline does not match the workflow: it applies on merge under trunk-curated, records under trunk-curated+apply-on-merge, or applies before merge, or fails to, against apply-before-merge.","ci-workflow-publish-missing":"Under ci.workflow, no pipeline file runs chant release publish.","gate-approval-unbased":"An Op gate's approval block sets a quorum, policy, mode or context that identity.gates does not set at base, so the change being run can edit it.","ci-branch-route-differs":"A member's generated pull-request pipeline targets a branch other than the one ci.branches routes the member to.","box-credential-declared":"A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.","box-capability-unbrokered":"A capability in a member's box block names no broker, so the box would hold its credential.","box-fountain-callback-undeclared":"A box member builds a fountain Box, whose sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.","box-intent-unknown":"A box block names an intent, and no record of a declared kind named decision has that id.","box-intent-unconstrained":"The decision record a box names as its intent constrains no member or path of this workspace: no member: entry for a declared member and no path: entry at, above or inside one's directory.","box-none":"No member's box block declares services, so the workspace has no box for a host to plant.","box-several":"More than one member's box block declares services, and a planted workspace runs one box.","work-kind-missing":"No work kind to find the item in: --kind names a kind with no work block, or the declaration names no work kind.","work-kind-ambiguous":"More than one declared work kind has a record with the id, so --kind must name one.","work-item-unknown":"No work record has the id, so there is nothing to lease.","work-item-closed":"A claim on a work item in a closed state, such as done or dropped: there is no work left to claim.","work-criterion-unknown":"The work record lists no acceptance criterion with the id the evidence names, or its kind has no acceptance criteria.","lease-held":"Someone holds a live lease on the work item: another worker, or, for a claim, the same one.","lease-not-held":"Nobody holds a live lease on the work item: it expired, was released or was never claimed.","lease-token-mismatch":"The live lease on the work item carries another fencing token than the one given.","work-evidence-ops-missing":"Work evidence cites a run, deploy, gate answer or release plan the local chant/lifecycle branch does not hold.","work-evidence-ops-mismatch":"Work evidence cites an ops record that does not hash to the sha256 given, or a run whose outcome disagrees with the evidence's result.","work-evidence-ops-unfinished":"Work evidence cites a run that is still gated or waiting, so it has no outcome to show.","lease-race":"Another writer changed the lease between this command's read and its write.","lease-push-rejected":"The remote refused the lease push: another clone claimed the item first, or the remote could not be reached.","run-exists":"runs start or runs record was given a run id the ledger already has.","run-unknown":"runs end names a run the ledger has no start for.","run-ended":"runs end names a run whose end is already recorded.","runs-no-ledger":"The checkout has no chant/lifecycle branch, so there are no agent runs to read.","runs-ledger-malformed":"Some lines of the agent run ledger aren't run events; the rest are read.","run-not-ended":"runs sign or runs statement names a run with no end recorded. A statement is signed over the run's whole record.","run-statement-invalid":"The envelope's payload is not an in-toto Statement v1 with chant's agent-run predicate, or has a field the predicate does not define.","run-statement-signer-mismatch":"The statement names a signer other than the runner whose key signed it.","run-statement-mismatch":"A listed runner key signed the statement, and it does not match the run's record: another run, a record that hashes differently, or another unit, harness, model, provider or principal.","listing-member-unknown":"box listing set names a member the declaration does not declare.","listing-box-missing":"box listing set names a member whose entry declares no box block, so it has no listing.","listing-cover-invalid":"The cover can't be read, is not a PNG, JPEG or WebP picture, is larger than 5 MiB, has a path outside the workspace, or has an extension other than its picture format's.","member-exists":"member add names a member the declaration already has, with an entry other than the one given.","member-unknown":"member remove names a member the declaration does not declare.","trust-config-invalid":".chant/trust.json in the working tree is not JSON or does not match its schema, or the write would make it so.","trust-conflict":"--expect named a digest .chant/trust.json no longer has: another write changed it after the caller read it. The refusal names the digest it has now.","runner-exists":"trust runner add names a principal .chant/trust.json already lists with another key or class, or gives a key it lists for another principal.","runner-unknown":"trust runner remove names a principal .chant/trust.json lists no runner for.","factory-member-unknown":"box factory set names a member the declaration does not declare.","factory-box-missing":"box factory set names a member whose entry declares no box block, so it has no factory.","publish-member-unknown":"box publish names a member the declaration does not declare.","publish-none":"box publish names a member whose box block names no publisher, or which declares no box block.","publish-refused":"The box's publisher refused (it exited 2): nothing was published, and its message says why.","publish-failed":"The box's publisher could not be run, failed (a nonzero exit other than 2) or ran out of time; its message says what it had done.","publish-answer-invalid":"The box's publisher exited 0 and printed no JSON object, or one box-publish.schema.json does not allow.","publish-unrecorded":"The commit the publisher named is not in the repository, or lacks the apply record of ws-075: Chant-Applied-By naming --by, Chant-Applied-At, Chant-Applied-Commit and a Chant-Record for the item, or a Chant-Record for each record sent.","wip-no-branch":"HEAD is detached, or names a branch with no commit yet, so there is no branch to keep work in progress for.","wip-none":"wip restore was given no snapshot, and the branch has none under refs/chant/wip/<branch>.","wip-snapshot-unknown":"wip restore names something that is not a work-in-progress snapshot chant took.","wip-branch-other":"wip restore names a snapshot taken on another branch than the one checked out.","wip-race":"Another writer moved refs/chant/wip/<branch> between this command's read and its write.","wip-policy-none":"wip push or wip fetch was run, and no box block declares replicate, so there is no remote.","wip-remote-unknown":"The replicate policy names a git remote the checkout does not have; the host adds it, with its credential, before chant pushes.","ci-green-undeclared":"The declaration has no ci.green block, so chant does not know which check runs make a commit green.","ci-branch-unknown":"The checkout has no ref for the branch ci.green names: neither the remote-tracking branch nor a local one.","box-isolation-collision":"Two boxes on one host resolve to the same port, state path or cookie name, or two ports in one box share an offset.","box-isolation-literal":"A host's stateRoot or a box's state entry is a literal machine path instead of one derived from an environment reference and the box's name.","signers-file-missing":"There is no signers file at the base revision, so there is no signer history to read.","signers-removed":"The signers file was removed. Commits merged before the removal keep the set they were judged by; nothing after it verifies.","rotation-unparseable":"The rotation file beside the signers file is not JSON.","rotation-invalid":"The rotation file does not match its shape: schema 1, a version, the previous set's digest, a threshold and signatures.","rotation-first-version":"The first signer set's rotation file names a version other than 1, or a previous digest.","rotation-missing":"The signer set or its threshold changed and no rotation file signed by the set before it came with the change.","rotation-version-skew":"The rotation names a version other than the one after the set it replaces, as a replayed or skipped rotation does.","rotation-previous-mismatch":"The rotation names a previous digest other than the set it replaces, as a rollback to an older set does.","rotation-threshold-unsatisfiable":"The new threshold is more than the number of distinct signers in the new set, so no later rotation could meet it.","rotation-threshold-not-met":"Fewer distinct signers of the set before signed the rotation, in the chant-signers namespace, than that set's threshold.","trust-policy-unreadable":"The trust policy at base can't be read, or its signer history is broken, so no runner key is trusted.","envelope-unreadable":"The --envelope file can't be read, or is not JSON.","envelope-invalid":"The file is not a DSSE envelope: payloadType, payload in canonical base64, and signatures with keyid and sig.","envelope-untrusted":"No signature in the envelope verifies against a runner key the policy at base lists.","evidence-payload-type":"The envelope's payload type is not application/vnd.in-toto+json.","evidence-statement-invalid":"The payload is not an in-toto Statement v1 with chant's runner-evidence predicate, or has a field the predicate does not define.","evidence-runner-mismatch":"The statement names a runner other than the one whose key signed it.","runner-key-invalid":"The key given to evidence sign or runs sign is not an Ed25519 private key in PEM, or the key given to trust runner add is not an ssh-ed25519 public key or an Ed25519 key in PEM.","runner-key-is-signer":"The key given to evidence sign, runs sign or trust runner add is a person's key in the signers file, or trust runner add names a signer. Evidence and run statements are signed by a service or CI identity.","runner-key-unlisted":"The policy at base lists no runner with the key given to evidence sign or runs sign.","ref-update-invalid":"The hook's standard input is not the lines git hands a pre-receive or pre-push hook.","ref-evidence-missing":"No runner evidence for a check the policy at base requires for the ref is attached to the pushed commit.","ref-evidence-stale":"Evidence for a required check verifies, but a record it names changed after it was signed, or it names no records and was signed over another tree.","bump-invalid":"--bump-member is not <member>=major|minor|patch, or names a member the declaration does not have.","paths-changed":"The member has paths changed since its last release, after changes.ignore and generated files, or has no release yet.","needed-by":"A member of the release depends on this one, and this one has changes since its last release.","range-broken-by":"The range this member last published for a dependency does not admit that dependency's next label.","lock-invalid":"The lineage lock can't be read.","manual-step-open":"A scope in the lineage lock has an open manual step.","missing-dir":"The chant member's directory does not exist, so there is nothing to build.","no-lexicon":"No lexicon is named in the member's chant.config.* or package.json, so there is nothing to build.","lexicon-unsupported":"A lexicon the member uses has no native target in workspace exit.","exit-failed":"The member's exit did not finish: its build failed, or it was refused.","choudoufu-steps-missing":"A choudoufu member's exit listed no roundtrip steps.","native-missing":"A native file the exit wrote is missing or empty.","native-unreadable":"A native file the exit wrote is not valid JSON, or has no content.","no-deploy-command":"A native file that can be deployed has no stock deploy command.","chant-config-left":"A chant.config.* file is still in the exited member.","chant-dependency":"The member's package.json still has a chant dependency, or a script that calls chant.","chant-in-ci":"A CI file of the exited member still calls chant.","declaration-not-other":"The declaration still gives the exited member a kind other than other.","member-required":"workspace drift was given no --member, or more than one: it reads one member.","no-drift-read":"The member's kind has no drift read, such as other, app or a nested workspace.","read-unsupported":"--read names a read the member's engine does not answer, such as state on a chant member.","resource-unsupported":"--resource was given for an engine that cannot read one resource on its own.","env-required":"A chant member's live drift read needs an environment, and --env was not given."},jSt=Object.keys(SHe),EHe=/^plugin:([^:\s]+):([a-z0-9]+(?:-[a-z0-9]+)*)$/});function aae(e){let t=e.commitJoins,n=e.commitJoinsName;if(t===void 0)return n===void 0?void 0:"commitJoinsName: a kind file with no commitJoins has no findings to name";if(n!==void 0&&(typeof n!="string"||!PHe.test(n)))return"commitJoinsName: a string with no colon or space, the <name> of plugin:<name>:<code>";let r=n===void 0?{}:{name:n};if(typeof t=="function")return{form:"function",join:t,...r};let o=OHe.safeParse(t);return o.success?{form:"data",data:o.data,...r}:o.error.issues.map(i=>`commitJoins${i.path.length?`.${i.path.join(".")}`:""}: ${i.message}`).join("; ")}function Pm(e,t){let n=t.toLowerCase(),r=[];for(let[o,i]of Object.entries(e))if(o.toLowerCase()===n)for(let s of i){let a=s.trim();a&&!r.includes(a)&&r.push(a)}return r}function nd(e,t){return Pm(e,t)[0]}function a2(e,t){let n=t.toLowerCase();return Object.keys(e).some(r=>r.toLowerCase()===n)}function AHe(e,t,n){if(!e)return{};let r=n.read(e.split("{id}").join(t));if(r===void 0)return{};let o;try{o=JSON.parse(r)}catch{throw new Error(`${e.split("{id}").join(t)} is not JSON`)}if(o===null||typeof o!="object"||Array.isArray(o))return{};let{id:i,...s}=o;return s}function CHe(e,t,n){let r={},o=(a,c)=>({...AHe(e.records?.[a],c,n),id:c});for(let a of["unit","contract"]){let c=e.trailers[a],l=c?nd(t.trailers,c):void 0;l&&(r[a]=o(a,l))}let i=e.trailers.evidence?Pm(t.trailers,e.trailers.evidence):[];i.length>0&&(r.evidence=i.map(a=>o("evidence",a)));let s=(e.authorship??[]).filter(a=>a2(t.trailers,a));return s.length>0&&(r.authorship=s),r}function Am(e){let t=e?.decisions;return Array.isArray(t)?t.filter(n=>typeof n=="string"&&n!==""):[]}async function uA(e,t,n,r){if(e.form==="data")return CHe(e.data,t,n);let o=await e.join(t,n);if(o==null)return{};if(typeof o!="object")throw new Error("commitJoins returned something that is not an object");let i=(l,d)=>{if(l!=null){if(typeof l!="object"||Array.isArray(l)||typeof l.id!="string"||l.id==="")throw new Error(`commitJoins returned a ${d} with no string id`);return l}},s={},a=i(o.unit,"unit"),c=i(o.contract,"contract");if(a&&(s.unit=a),c&&(s.contract=c),o.evidence!==void 0&&o.evidence!==null){let l=Array.isArray(o.evidence)?o.evidence:[o.evidence];s.evidence=l.map(d=>i(d,"evidence")).filter(Boolean)}if(o.authorship!==void 0){if(!Array.isArray(o.authorship)||!o.authorship.every(l=>typeof l=="string"))throw new Error("commitJoins returned authorship that is not a list of trailer keys");s.authorship=o.authorship}if(o.findings!==void 0&&o.findings!==null){if(!Array.isArray(o.findings))throw new Error("commitJoins returned findings that are not a list");s.findings=o.findings.map(l=>{if(l===null||typeof l!="object"||Array.isArray(l))throw new Error("commitJoins returned a finding that is not an object");let{code:d,message:u,refs:p}=l;if(!lA(d,r))throw new Error(`commitJoins returned the finding code ${JSON.stringify(d)}, and a plugin's codes are plugin:${r}:<code>, with <code> in lower case words joined by dashes`);if(typeof u!="string"||u==="")throw new Error(`commitJoins returned the finding ${d} with no message`);if(p!==void 0&&(!Array.isArray(p)||!p.every(f=>typeof f=="string")))throw new Error(`commitJoins returned the finding ${d} with refs that are not a list of strings`);return{code:d,message:u,refs:p??[]}})}return s}var dA,s2,OHe,PHe,Cv=x(()=>{"use strict";Jn();i2();dA=w.string().regex(/^[A-Za-z0-9][A-Za-z0-9-]*$/,"a trailer key holds letters, digits and dashes"),s2=w.string().min(1).refine(e=>e.includes("{id}")&&!e.startsWith("/")&&!e.split("/").includes(".."),"a record path is relative to the workspace root and holds {id}"),OHe=w.object({trailers:w.object({unit:dA.optional(),contract:dA.optional(),evidence:dA.optional()}).strict(),records:w.object({unit:s2.optional(),contract:s2.optional(),evidence:s2.optional()}).strict().optional(),authorship:w.array(dA).optional()}).strict(),PHe=/^[^:\s]+$/});function Tv(e){let t=e.indexOf(":");if(t<=0)return;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();return DHe.test(n)&&NHe.test(r)?{kind:n,id:r}:void 0}function lae(e){let t=[];for(let o of Pm(e,Cm)){let i=Tv(o);i&&!t.some(s=>s.kind===i.kind&&s.id===i.id)&&t.push(i)}let n=nd(e,_He)??null,r=nd(e,THe)??null;return{agent:nd(e,_v)??null,lease:nd(e,Iv)??null,run:nd(e,cae)??null,records:t,applied:n===null?null:{by:n,at:nd(e,IHe)??null,commit:r!==null&&jHe.test(r)?r:null}}}var _v,Iv,cae,Cm,_He,IHe,THe,DHe,NHe,jHe,_m=x(()=>{"use strict";Cv();_v="Chant-Agent",Iv="Chant-Lease",cae="Chant-Run",Cm="Chant-Record",_He="Chant-Applied-By",IHe="Chant-Applied-At",THe="Chant-Applied-Commit",DHe=/^[a-z][a-z0-9-]*$/,NHe=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/,jHe=/^[0-9a-f]{40,64}$/});var mae={};me(mae,{HANDED_TO_ROOT_ENV:()=>l2,declaredChantPin:()=>gae,handToRootChant:()=>Dv,locateWorkspace:()=>Kt,rootChantBin:()=>fae});import{spawn as LHe}from"node:child_process";import{existsSync as MHe,readFileSync as FHe,realpathSync as dae}from"node:fs";import{join as c2,relative as uae,resolve as WHe}from"node:path";function Kt(e,t){let n=hs(e);if(t!==void 0){if(!n)throw new ye("not-a-git-repository","--at reads git objects, and this directory is not in a git repository");let i=_w(n,t);if(!i)throw new ye("revision-unknown",`--at ${t} names no commit in this repository`);let s=Xs(n,i),a=pae(uae(n,dae(WHe(e)))),c=QB(s,a.startsWith("..")?"":a);if(c===void 0)throw new ye("declaration-missing",`no chant.workspace.json or .jsonc between ${a||"."} and the git root at ${i.slice(0,8)}`);return{tree:c===""?s:Xs(n,i,c),root:c===""?".":c,rootOnDisk:c2(n,...c.split("/")),at:i,top:n}}let r=kr(e);if(!r)throw new ye("declaration-missing",n?"no chant.workspace.json or .jsonc between this directory and the git root; chant workspace init proposes one":"no chant.workspace.json or .jsonc in this directory; chant workspace init proposes one");let o=n?pae(uae(n,dae(r.dir))):r.dir;return{tree:On(r.dir),root:o===""?".":o,rootOnDisk:r.dir,at:null,top:n}}function fae(e,t){let n=oa(Vg,e);if(!n)return;let r;try{r=JSON.parse(FHe(c2(n,"package.json"),"utf-8"))}catch{return}if(r.version!==t)return;let o=typeof r.bin=="string"?r.bin:r.bin?.chant;if(typeof o!="string")return;let i=c2(n,o);return MHe(i)?i:void 0}function gae(e){let t=Rs.find(o=>e.tree.stat(o)==="file");if(!t)return;let n;try{n=e.tree.read(t)}catch{return}let r=Nl(n,{jsonc:t.endsWith(".jsonc")});if(!(!r.ok||r.value===null||typeof r.value!="object"||Array.isArray(r.value)))return gP(r.value)?.version}async function Dv(e,t,n=process.argv.slice(2)){if(process.env[l2])return;let r;try{r=Kt(e,t)}catch{return}let o=gae(r);if(o===void 0||o===on())return;let i=fae(r.rootOnDisk,o);if(i)return new Promise(s=>{let a=LHe(i,n,{stdio:"inherit",env:{...process.env,[l2]:o}});a.on("error",c=>{process.stderr.write(`could not start the root's chant ${o} at ${i}: ${c.message}
174
174
  `),s(1)}),a.on("close",c=>s(c??1))})}var pae,l2,Ur=x(()=>{"use strict";Si();It();Cg();ri();Vt();pae=e=>e.split("\\").join("/");l2="CHANT_WORKSPACE_ROOT_CHANT"});var Nv={};me(Nv,{AGENT_ENV:()=>u2,AGENT_TRAILER:()=>_v,FACTORY_CHECK_LOG:()=>Eae,SCOPE_FINDING_CODES:()=>UHe,WRITE_SCOPE_CODES:()=>od,WriteScopeError:()=>vc,checkWriteScope:()=>qHe,classesOf:()=>gv,declaredSessions:()=>m2,judgePath:()=>Oae,judgeRecord:()=>g2,onlyKeysChanged:()=>Sae,principalClass:()=>kae,protectedEntry:()=>$ae,refuseRecordWrite:()=>h2,resolveWriter:()=>p2,roleGrants:()=>lm,scopeOf:()=>gA,scopeSource:()=>Bo,scopedKind:()=>Aae,unknownClassVerdict:()=>f2});import{execFileSync as GHe}from"node:child_process";import{posix as hae,relative as yae,sep as wae}from"node:path";import{isDeepStrictEqual as BHe}from"node:util";function kae(e,t,n=Kl()){return Aie(e,t,n)}function p2(e,t,n,r=Kl()){let o=n.principal??null,i=e?.agents??[];if(n.agent!==void 0&&n.agent!==null){let s=i.find(a=>a.name===n.agent);if(!s){let a=i.map(c=>c.name).join(", ");throw new vc("agent-unknown",e===null?`agent session ${JSON.stringify(n.agent)} is not declared: there is no workspace declaration`:`agent session ${JSON.stringify(n.agent)} is not declared: the declaration's agents ${a?`are ${a}`:"list none"}`)}return{principal:o,class:"agent",agent:s}}if(o!==null){let s=nr(o),a=i.find(c=>c.principals.some(l=>nr(l)===s));if(a)return{principal:o,class:"agent",agent:a}}return{principal:o,class:kae(t,o,r),agent:null}}function f2(e,t,n){if(t.class!=="human")return rd;let r=$U(e?.writeScope??null,n);if(r.length===0)return rd;let o=r.map(i=>`writeScope.${i}`).join(", ");return{ok:!1,code:"write-scope-class-unknown",message:`${Qu(t)} may be in ${r.length===1?"a class":"classes"} no pinned package supplies (${o}), so its scope can't be told; install the package that supplies ${r.length===1?"it":"them"} at the pinned version, or remove the entry (known classes: ${n.names().join(", ")})`}}function gA(e,t){let n=e?.writeScope?.[t.class];return t.class==="agent"?{members:null,records:n?.records??null,protected:n?.protected??[],pointer:n?.pointer??"/agents"}:n??null}function Qu(e){if(e.agent){let n=e.agent.members;return`agent session ${e.agent.name}, bound to ${n.length===1?"member":"members"} ${n.join(", ")},`}let t=e.principal!==null?`${e.principal} (${e.class})`:`a ${e.class} writer`;return e.class==="agent"?`${t}, which no agent session lists,`:t}function Rae(e,t,n){return e.class==="agent"?n!==null&&(e.agent?.members.includes(n)??!1):t.members===null||n!==null&&t.members.includes(n)}function g2(e,t,n,r){let o=gA(e,t);if(o===null)return rd;if(!(n.declared&&n.member===null?!0:Rae(t,o,n.member))){let c=n.member===null?"in no member":`of member ${n.member}`;return{ok:!1,code:"write-scope-member",message:`${Qu(t)} may not write ${n.name} records, which are ${c}: ${t.class==="agent"?"an agent session writes only the members it is bound to":`writeScope.${t.class}.members leaves it out`}`}}if(r==="delete")return{ok:!1,code:"write-scope-kind",message:`${Qu(t)} may not delete a ${n.name} record: a record is never deleted, and a new one supersedes it`};if(o.records===null)return rd;let a=[n.name,...n.declaredName!==null&&n.declaredName!==n.name?[n.declaredName]:[]].flatMap(c=>o.records[c]??[]);return a.includes(r)?rd:{ok:!1,code:"write-scope-kind",message:a.length===0?`${Qu(t)} may not write ${n.name} records: writeScope.${t.class}.records does not list the kind`:`${Qu(t)} may ${[...new Set(a)].join(", ")} ${n.name} records, and not ${r} them (writeScope.${t.class}.records)`}}function $ae(e,t){if(e.length===0)return null;let n=t.split("/"),r=n.map((o,i)=>n.slice(0,i+1).join("/"));for(let o of e){let i=(0,vae.default)(o.path,{dot:!0});if(r.some(s=>i(s)))return o}return null}function xae(e,t){if(t.length===0||e===null||typeof e!="object")return;let[n,...r]=t,o=e,i=n==="*"?Object.keys(o):Object.prototype.hasOwnProperty.call(o,n)?[n]:[];for(let s of i)r.length>0?xae(o[s],r):Array.isArray(e)?e[Number(s)]=HHe:delete o[s]}function Sae(e,t,n){if(e===null||t===null||n.length===0)return!1;let r=s=>{let a=Nl(s,{jsonc:!0});if(!a.ok)return null;let c=a.value;if(c===null||typeof c!="object"||Array.isArray(c))return null;let l=structuredClone(c);for(let d of n)d.startsWith("/")?xae(l,d.slice(1).split("/").map(u=>u.replace(/~1/g,"/").replace(/~0/g,"~"))):delete l[d];return l},o=r(e),i=r(t);return o!==null&&i!==null&&BHe(o,i)}function Oae(e,t,n,r){let o=gA(e,t);if(o===null)return rd;let i=Pr(n,e?.members??[]);if(!(i===null&&Eae.test(n))&&!Rae(t,o,i)){let l=i===null?"is in no member":`is in member ${i}`;return{ok:!1,code:"write-scope-member",message:`${Qu(t)} may not write ${n}, which ${l}: ${t.class==="agent"?"an agent session writes only the members it is bound to":`writeScope.${t.class}.members leaves it out`}`}}let a=$ae(o.protected,n);if(a===null||a.except.length>0&&r&&Sae(r.before(),r.after(),a.except))return rd;let c=a.except.length>0?`, outside what its except allows (${a.except.join(", ")})`:"";return{ok:!1,code:"write-scope-protected",message:`${Qu(t)} may not write ${n}${c}: writeScope.${t.class}.protected lists ${a.path}`}}function Pae(e,t){try{let n=Kt(e,t);return{declaration:Gt(n.tree),rootOnDisk:n.rootOnDisk,root:n.root,tree:n.tree}}catch(n){if(n instanceof ye)return n;throw n}}function d2(e,t){let n=Pae(e,t);return n instanceof ye?null:n}function Bo(e,t){let n=Gr(e),r=n?Go(n,t):null,o=n&&r?di(n,r):Es(null),i=a=>{let{tree:c,...l}=a;return{...l,classes:Cie(a.declaration.pins,a.rootOnDisk,{tree:c}).registry}};if(r?.commit){let a=d2(e,r.commit);if(a)return{...i(a),from:"base",policy:o}}let s=Pae(e);return s instanceof ye?{declaration:null,from:null,rootOnDisk:null,root:null,policy:o,classes:Kl(),failure:s}:{...i(s),from:"working-tree",policy:o}}function Aae(e,t,n,r){let o=e.declaration;if(!o||e.rootOnDisk===null)return{name:t,declaredName:null,member:null,declared:!1};let i=bae(yae(e.rootOnDisk,n)),s=[...o.records,...o.members.flatMap(c=>c.records)].find(c=>c.path===i);if(s)return{name:t,declaredName:s.name,member:s.member,declared:!0};let a=bae(yae(e.rootOnDisk,r));return{name:t,declaredName:null,member:a.startsWith("..")?null:Pr(a===""?".":a,o.members),declared:!1}}function m2(e){let t=Gr(e),n=t?Go(t):null;if(n?.commit){let o=d2(e,n.commit);if(o)return{agents:o.declaration.agents,from:"base"}}let r=d2(e);return r?{agents:r.declaration.agents,from:"working-tree"}:null}function h2(e,t){let n=Bo(e);if(n.declaration===null&&(t.agent===void 0||t.agent===null))return n;let r=p2(n.declaration,n.policy,{agent:t.agent,principal:t.principal},n.classes),o=f2(n.declaration,r,n.classes);if(!o.ok)throw new vc(o.code,o.message);let i=g2(n.declaration,r,Aae(n,t.kindName,t.kindFile,t.recordsDir),t.verb);if(!i.ok)throw new vc(i.code,i.message);return n}function pA(e,t){return GHe("git",t,{cwd:e,encoding:"utf-8",stdio:["ignore","pipe","pipe"],maxBuffer:512*1024*1024})}function fA(e,t,n){try{return pA(e,["show",`${t}:${n}`])}catch{return null}}function zHe(e,t,n,r){if(r.format!=="markdown-front-matter")return"amend";let o=fA(e,`${t}^`,n),i=fA(e,t,n);if(o===null||i===null)return"amend";let s=wc(o),a=wc(i);if(!s.ok||!a.ok)return"amend";let l=[...new Set([...Object.keys(s.value),...Object.keys(a.value)])].filter(d=>JSON.stringify(s.value[d])!==JSON.stringify(a.value[d]));if(r.session){let d=a.value[r.session.stateField];return typeof d=="string"&&r.session.closed.includes(d)&&s.value[r.session.stateField]!==d?"close":l.every(u=>r.reviewFields.includes(u)||r.session.fills.includes(u))?"review":"amend"}return l.length>0&&l.every(d=>r.reviewFields.includes(d))?"review":"amend"}async function qHe(e){let{top:t,base:n,head:r,prefix:o,declaration:i}=e,s=e.classes??Kl();if(i.writeScope===null&&i.agents.length===0)return null;let a=di(t,{commit:n,from:"flag"}),{activeAttestors:c}=await Promise.resolve().then(()=>(Om(),Jse)),l=await c(),d=g=>i.writeScope?.[g]!==void 0||g==="agent"&&i.agents.length>0,u=[...s.names().filter(d),...$U(i.writeScope,s)],p={base:n,restricted:u,agents:i.agents.map(g=>g.name),commits:[],findings:[]},f=pA(t,["rev-list","--reverse","--no-merges",`${n}..${r}`]).split(`
175
175
  `).filter(Boolean);for(let g of f){let[m,h,y]=pA(t,["log","-1",`--format=%s%x00%ae%x00%(trailers:key=${_v},valueonly,separator=%x01)`,g]).split("\0"),b=(y??"").split("").map(S=>S.trim()).filter(Boolean)[0]??null,v=a.active?Av(t,a,g,l):null,k=v?.level==="attested"&&v.principal!==void 0,$=k?v.principal:h.trim(),O=pA(t,["diff-tree","--no-commit-id","-r","--name-status","--no-renames","-z",g]).split("\0").filter(Boolean),E=[];for(let S=0;S+1<O.length;S+=2){let C=O[S+1];o!==""&&!C.startsWith(`${o}/`)||E.push({status:O[S],path:C})}let P;try{P=p2(i,a,{agent:b,principal:$},s)}catch(S){if(!(S instanceof vc))throw S;p.commits.push({commit:g,subject:m,principal:$,attested:k,class:"agent",agent:b,paths:E.length}),p.findings.push({id:`finding:${S.code}:${g}`,code:S.code,commit:g,path:null,principal:$,class:"agent",agent:b,verb:null,message:`${g.slice(0,8)} has ${_v}: ${b}: ${S.message}`});continue}p.commits.push({commit:g,subject:m,principal:$,attested:k,class:P.class,agent:P.agent?.name??null,paths:E.length});let T=f2(i,P,s);if(!T.ok){p.findings.push({id:`finding:${T.code}:${g}`,code:T.code,commit:g,path:null,principal:$,class:P.class,agent:null,verb:null,message:`${g.slice(0,8)}: ${T.message}`});continue}if(gA(i,P)!==null)for(let S of E){let C=o===""?S.path:S.path.slice(o.length+1),F=e.kinds.find(_=>hae.dirname(S.path)===_.dir&&_.match.test(hae.basename(S.path))),L=null,A;F?(L=S.status==="A"?"new":S.status==="D"?"delete":zHe(t,g,S.path,F),A=g2(i,P,F.scoped,L)):A=Oae(i,P,C,{before:()=>S.status==="A"?null:fA(t,`${g}^`,S.path),after:()=>S.status==="D"?null:fA(t,g,S.path)}),!A.ok&&p.findings.push({id:`finding:${A.code}:${g}:${C}`,code:A.code,commit:g,path:C,principal:$,class:P.class,agent:P.agent?.name??null,verb:L,message:`${g.slice(0,8)} ${S.status==="D"?"deletes":S.status==="A"?"adds":"changes"} ${C}: ${A.message}`})}}return p}var vae,u2,od,UHe,vc,rd,HHe,Eae,bae,Uo=x(()=>{"use strict";vae=et(yu(),1);It();xU();Cg();Hi();zi();Dn();Ki();td();_m();Ur();u2="CHANT_AGENT",od=["write-scope-member","write-scope-kind","write-scope-class-unknown","agent-unknown"],UHe=[...od,"write-scope-protected"];vc=class extends Error{constructor(n,r){super(r);this.code=n;this.name="WriteScopeError"}};rd={ok:!0};HHe=Symbol("except");Eae=/^\.chant\/factory\/[^/]+\/check\.log$/;bae=e=>wae==="/"?e:e.split(wae).join("/")});var w2={};me(w2,{FORGES:()=>_ae,IDENTITY_CODES:()=>Xu,IdentityError:()=>kc,forgePrincipal:()=>KHe,gateAdmission:()=>ZHe,gateAdmissionFrom:()=>y2,identify:()=>Dae,parseForgeIdentity:()=>Tae,refuseUnidentified:()=>wa,releaseRuleFrom:()=>Nae});function Tae(e){let t=VHe.exec(nr(e));if(!t)return null;let n=t[1],r=t[2]??Iae[n];return r===null?null:{forge:n,host:r,login:t[3]}}function KHe(e){return e.host===Iae[e.forge]?`${e.forge}:${e.login}`:`${e.forge}@${e.host}:${e.login}`}function Dae(e,t,n=null){let r=nr(e),o=Tae(e),i=a=>nr(a.principal)===r;return t.active&&(t.signers.some(i)||(t.passkeys??[]).some(i))?{principal:e,form:"signer",forge:o}:o?{principal:e,form:"forge",forge:o}:(n?.agents??[]).some(a=>a.principals.some(c=>nr(c)===r))||gv(Kl(),t,e).some(a=>JHe.has(a))?{principal:e,form:"role",forge:null}:{principal:e,form:"name",forge:null}}function wa(e,t,n,r={}){if(e.declaration?.identity?.attribution==="identified"&&!(r.agent!==void 0&&r.agent!==null&&e.declaration.agents.some(o=>o.name===r.agent))){for(let o of t)if(Dae(o,e.policy,e.declaration).form==="name")throw new kc(`${n} ${JSON.stringify(o)} names no identity the workspace can check: chant.workspace.json at base sets identity.attribution to identified, so a person is named by a forge identity (github:<login>, gitlab:<login>, or <forge>@<host>:<login>) or by a principal ${e.policy.signersPath} lists at base`)}}function y2(e,t){let n=e.declaration?.identity?.gates[t];if(!n)return null;let{policy:r,classes:o}=e,i={gate:t,class:n.class,signers:r,roles:lm(r),classes:o.all()};return{requirement:n,refuses:s=>ug(i,s)}}function Nae(e){let t=e.declaration?.identity?.gates[TF]??null,{policy:n,classes:r}=e;return{requirement:t,rule:{gate:TF,class:t?.class??null,signers:n,roles:lm(n),classes:r.all()}}}function ZHe(e,t,n){return y2(Bo(e,n),t)}var _ae,Iae,Cae,VHe,JHe,Xu,kc,ep=x(()=>{"use strict";Xa();xU();Dn();Uo();_ae=["github","gitlab","forgejo","gitea"],Iae={github:"github.com",gitlab:"gitlab.com",forgejo:null,gitea:null},Cae="[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?",VHe=new RegExp(`^(${_ae.join("|")})(?:@(${Cae}(?:\\.${Cae})+))?:([a-z0-9](?:[a-z0-9._-]{0,98}[a-z0-9_])?)$`);JHe=new Set(["agent","runner","service"]);Xu=["principal-unidentified"],kc=class extends Error{constructor(n){super(n);this.code="principal-unidentified";this.name="IdentityError"}}});function Nn(e){return{async read(n){await cr(e);let{resolutions:r,pending:o}=await Er(n,e);return{resolutions:r,pending:o}},async approvalRule(n,r){let{gateAdmission:o}=await Promise.resolve().then(()=>(ep(),w2));return o(e?.cwd??process.cwd(),n,r?.base)},async quorumJudge(n,r){let{scopeSource:o}=await Promise.resolve().then(()=>(Uo(),Nv)),{policy:i}=o(e?.cwd??process.cwd(),r?.base);return Ni({signers:i,roles:i.roles})},async appendResolution(n){let{record:r}=await dv(n,e);return{record:r,...await mA(e)}},async appendPending(n){let{record:r}=await cm(n,e);return{record:r,...await mA(e)}},async writeCheckpoint(n){await Sie(n,e)},async readCheckpoint(n,r){return await cr(e),Eie(n,r,e)},async storeChangeSet(n){await uU(n,e)},async readApplied(n){await cr(e);let{dir:r,file:o}=zl(n),i=await Lt(r,o,e);return i?DP(i):[]},async readFinished(n){await cr(e);let{dir:r,file:o}=zl(n),i=await Lt(r,o,e);return i?NP(i).finished.map(s=>({...s,op:s.op||n})):[]},async appendApplied(n){return t(n.op,n,`Applied under ${n.gate}`)},async appendFinished(n){return t(n.op,n,`Finished under ${n.gate}`)},async storeRequestAttachment(n,r,o){let{dir:i,file:s}=yU(n,r);await cr(e),await Tt(i,s,e)===null&&await zt(i,s,o,`Request on ${n}: ${r}`,e)},async storeGateReport(n,r,o,i){let{dir:s,file:a}=jae(n,r,o);await cr(e),await Tt(s,a,e)===null&&(await zt(s,a,i,`The plans of ${n} ${r}: ${o}`,e),await mA(e))},async readGateReport(n,r,o){await cr(e);let{dir:i,file:s}=jae(n,r,o);return Lt(i,s,e)}};async function t(n,r,o){let{dir:i,file:s}=zl(n),a=JSON.stringify(r,Ht);await cr(e);let c;for(let l=1;l<=5;l++)try{let d=await Tt(i,s,e),u=d?await Bt(d,e):null;return await zt(i,s,u?`${u.replace(/\n$/,"")}
176
176
  ${a}
@@ -529,7 +529,7 @@ Approve this plan for ${h}, ${g}? Type ${h} to approve: `);if(O===null||O.trim()
529
529
  `),r(u?`${Buffer.from(d,"utf8").subarray(0,x3).toString("utf8")}
530
530
  ...
531
531
  `:d),u&&o(`The attachment is longer than ${x3} bytes; the whole is at ${a}/${c} on chant/lifecycle.
532
- `),!0}var Mft,x3,SAe=x(()=>{"use strict";Qr();Mft="0.124.55";x3=64*1024});import{readFileSync as EAe}from"node:fs";import{resolve as Gft}from"node:path";async function OAe(e,t){let{pushed:n,pushWarning:r}=await fc(...t!==void 0?[{cwd:t}]:[]).catch(o=>{if(o instanceof io)return{pushed:!1,pushWarning:o.message};throw o});return n?{pushed:n,suffix:""}:la(r)?{pushed:n,suffix:` (${Fu})`}:(console.error(br({message:`The push to the remote did not land: ${r??"no reason given"}`,hint:e})),{pushed:n,suffix:" (local only \u2014 the push did not land)"})}async function PAe(e){let t=e.args.path,n=e.args.extraPositional;if(!t||t==="."||!n)return console.error(be({message:"Usage: chant approve <op> <gate>"})),1;if(e.args.expire){try{await cr()}catch(l){return console.error(be({message:`Cannot expire the gate: ${l instanceof Error?l.message:String(l)}`})),1}let s=new Date().toISOString(),a=Un((await Er(t)).pending,n);if(!a||er(a,s))return console.error(br({message:`Gate "${n}" on "${t}" has no standing pending fact \u2014 nothing to expire`})),0;await cm({op:t,gate:n,timestamp:s,expiresAt:s,...a.description?{description:a.description}:{},...a.runId?{runId:a.runId}:{},...a.gitSha?{gitSha:a.gitSha}:{}});let c=await OAe(`The expiry is recorded locally on ${cx}. Until it reaches the remote, a run in another checkout still sees the old pending fact.`);return console.error($y(`Gate "${n}" on "${t}" expired at ${s} \u2014 not approved`+c.suffix)),console.error(Fn(t===rm?"The next `chant components fan-out` decides this gate from scratch and records a fresh pending fact.":d_.test(t)?"The next `chant components pr-apply` decides this gate from scratch and records a fresh pending fact.":t===ov?`The next \`chant workspace promote ${n}\` decides this gate from scratch and records a fresh pending fact.`:t===om?`The next \`chant workspace upgrade ${n}\` decides this gate from scratch and records a fresh pending fact.`:t===im?"The next `chant workspace exit` decides this gate from scratch and records a fresh pending fact.":t===Gi?"The next `chant components promote --release` decides this gate from scratch and records a fresh pending fact.":`The next \`chant run ${t}\` decides this gate from scratch and records a fresh pending fact.`)),0}if(t===Bl){let{runOverrideApprove:s}=await Promise.resolve().then(()=>(mAe(),gAe));return s(e)}if(e.args.rules!==void 0||e.args.reason!==void 0)return console.error(be({message:`--rule and --reason override a denied plan: chant approve ${Bl} <subject> --rule <id> --reason <text>`,hint:`To approve gate "${n}" on "${t}", put any prose in --note.`})),1;if(e.args.statement){if(e.args.sign!==void 0||e.args.signature!==void 0)return console.error(be({message:"--statement prints what to sign and records nothing, so it takes neither --sign nor --signature"})),1;let s={actor:e.args.approver??e.args.actor,...e.args.plan!==void 0?{plan:e.args.plan}:{},...e.args.env!==void 0?{environment:e.args.env}:{},...e.args.relayedBy!==void 0?{relayedBy:e.args.relayedBy}:{},...e.args.at!==void 0?{at:e.args.at}:{},...e.args.binding!==void 0?{binding:e.args.binding}:{},allowSameOrigin:e.args.allowSameOrigin},a=await Uft(t,n,s);return a?(console.log(JSON.stringify(a,null,2)),console.error(Fn(`Have ${a.resolvedBy} sign these bytes (an ssh key in the ${a.namespace} namespace, or a passkey with challenge ${a.challenge}), then record it: chant approve ${t} ${n} --actor ${a.resolvedBy}`+(a.relayedBy!==null?` --relayed-by ${a.relayedBy}`:"")+(a.planDigest!==null?` --plan ${a.planDigest}`:"")+(a.environment!==null?` --env ${a.environment}`:"")+(a.binding!==null?` --binding ${qft(a.binding)}`:"")+` --at ${a.timestamp} --signature <file>`)),0):1}let r=e.args.plan,o=await Promise.resolve().then(()=>(SAe(),xAe));if(e.args.signature===void 0&&await o.interactiveApproval(e.args)){let s=await o.confirmApproval(t,n,{...r!==void 0?{plan:r}:{},...e.args.env!==void 0?{environment:e.args.env}:{}});if(s.status==="refused")return s.code;s.status==="confirmed"&&(r=s.plan)}let i=await R3(t,n,{actor:e.args.approver??e.args.actor,note:e.args.note,url:e.args.url,plan:r,...e.args.env!==void 0?{environment:e.args.env}:{},allowSameOrigin:e.args.allowSameOrigin,...e.args.roles?{roles:e.args.roles}:{},...e.args.agent?{agent:!0}:{},...e.args.sign!==void 0?{sign:e.args.sign}:{},...e.args.signature!==void 0?{signature:e.args.signature}:{},...e.args.at!==void 0?{at:e.args.at}:{},...e.args.binding!==void 0?{binding:e.args.binding}:{},...e.args.relayedBy!==void 0?{relayedBy:e.args.relayedBy}:{}});if(!i.ok)return 1;if(e.args.resumeRun||e.args.resume!==void 0){let{resumeAfterApproval:s}=await Promise.resolve().then(()=>(mT(),_9));return s(t,n,i.record.environment,i.pushed)}return console.error(Fn("This records the resolution as a fact; it does not itself re-run anything. "+(t===rm?`Repeat the \`chant components fan-out\` command and it walks through gate "${n}".`:d_.test(t)?`The pull request's apply (\`chant components pr-apply\`) walks through gate "${n}" when it plans this same digest.`:t===ov?`Repeat \`chant workspace promote ${n}\`, and it applies the patch this approval names.`:t===om?`Repeat \`chant workspace upgrade ${n}\` with the same target, and it applies the patch this approval names.`:t===im?"Repeat `chant workspace exit` with the same members, and it applies the patch this approval names.":t===Gi?`Repeat the same \`chant components promote --release\`, and it walks through gate "${n}" when it plans this same change set for this release.`:`Run \`chant run ${t}\` and it walks through gate "${n}".`))),0}async function Bft(e,t,n,r){let{readRelease:o,readCuts:i,labelsByDigest:s}=await Promise.resolve().then(()=>(Oc(),zm)),{readRevokedCommits:a,revocationOf:c,revokedRefusal:l}=await Promise.resolve().then(()=>(FI(),f5)),d=await o(n,{cwd:r}).catch(()=>null);if(!d)return console.error(be({message:`Gate "${t}" on "${e}" binds release ${n}, which can't be read from ${cx}, so whether it is revoked is unknown [release-unreadable]`,hint:`Fetch the ledger branch (git fetch origin ${cx}:${cx}) and approve again from the member's directory.`})),!0;let u;try{u=await a(r)}catch(g){return console.error(be({message:`Gate "${t}" on "${e}" binds release ${n}, and the ci tags can't be judged: ${g instanceof Error?g.message:String(g)} [declaration-invalid]`,hint:"Fix ci.green in chant.workspace.json at base; chant workspace check names the problem."})),!0}let p=c(d,u);if(!p)return!1;let f=s((await i({cwd:r}).catch(()=>({cuts:[]}))).cuts).get(n)??null;return console.error(be(l({releaseDigest:n,label:f},p,`Clear the pending gate with \`chant approve ${e} ${t} --expire\`, then promote a release cut from a green commit: \`chant ci last-green\` names the newest, and \`chant release list\` marks the revoked releases.`))),!0}async function R3(e,t,n){let r=await AAe(e,t,n,!1);return"statement"in r?{ok:!1}:r}async function Uft(e,t,n){let r=await AAe(e,t,n,!0);return"statement"in r?r.statement:null}async function AAe(e,t,n,r){if(!r&&Wr())return console.error(be({message:`Cannot record the approval of "${t}": ${Mi} is set, so nothing is written to chant/lifecycle`,hint:`Unset ${Mi} to approve the gate.`})),{ok:!1};let o=n.cwd??process.cwd(),i=n.cwd!==void 0?[{cwd:n.cwd}]:[],{ops:s}=await vd(...i),a=Pke([...s.values()].map(U=>U.config),e,t);!a&&!s.has(e)&&e!==rm&&e!==om&&e!==im&&e!==ov&&e!==Bl&&e!==Gi&&console.error(br({message:`Op "${e}" was not found among discovered *.op.ts declarations \u2014 recording the resolution anyway`}));try{await cr(...i)}catch(U){return console.error(be({message:`Cannot record the approval: ${U instanceof Error?U.message:String(U)}`,hint:"The pending fact this answers lives on that branch; appending without it would drop it."})),{ok:!1}}if(a){let U=Un((await Er(a.op,...i)).pending,a.gate);if(U&&!er(U,new Date().toISOString()))return console.error(be({message:`Gate "${t}" on "${e}" is now gate "${a.gate}" on "${a.op}", which lists it as an alias, and "${a.gate}" has a standing pending fact`,hint:`Approve that gate instead: chant approve ${a.op} ${a.gate}`})),{ok:!1};console.error(Fn(`Gate "${t}" on "${e}" is an alias of gate "${a.gate}" on "${a.op}": the next run of ${a.op} counts this approval there while the pending fact it answers stands and the plan is the same.`))}let c=n.url??Hl();if(c&&!CP(c))return console.error(be({message:`--url must be an absolute http/https URL (got "${c}")`,hint:"Pass the PR/MR link, or omit --url and put prose in --note."})),{ok:!1};let l=await Er(e,...i),d=U=>U.some(X=>X.gate===t&&X.environment!==void 0)&&n.environment!==void 0?U.filter(X=>X.environment===n.environment):U,u=Un(d(l.pending),t),p=u?.environment,f;if(n.plan!==void 0){if(!DE(n.plan))return console.error(be({message:`--plan must be a plan digest ("jcs1-sha256:" or "sha256:", then 64 hex characters), got "${n.plan}"`,hint:"Copy it from the gated run's `plan :` line, or from the pending-gate summary. It is not a plan file path."})),{ok:!1};f=n.plan}else{if(!u)return console.error(be({message:n.environment!==void 0&&l.pending.some(U=>U.gate===t&&U.environment!==void 0)?`Gate "${t}" on "${e}" has no pending fact in environment "${n.environment}", so there is no plan to approve`:`Gate "${t}" on "${e}" has no pending fact, so there is no plan to approve`,hint:`Run \`chant run ${e}\` first \u2014 it plans, stops at the gate, and records the plan this approval would be for. To approve a plan you already have the digest for, pass \`--plan <digest>\`.`})),{ok:!1};f=u.planDigest}let g=u?.checkpointDigest!==void 0&&Ke(f,u.planDigest)?u.checkpointDigest:void 0,m=u?.releaseDigest!==void 0&&Ke(f,u.planDigest)?u.releaseDigest:void 0,h=u?.changeSet!==void 0&&Ke(f,u.planDigest)?u.changeSet:void 0;if(u?.releaseDigest!==void 0&&await Bft(e,t,u.releaseDigest,o))return{ok:!1};let y=n.origin??pa(),b=await Er(e,...i),v=Un(d(b.pending),t);if(Lo(y)&&(v?.neverOverMcp||s.get(e)?.config.neverOverMcp))return console.error(be({message:`Gate "${t}" on "${e}" is never resolved over ${y==="acp"?"ACP":"MCP"}`,hint:`Approvals belong to people: \`chant approve ${e} ${t}\` at a shell.`})),{ok:!1};if(v?.answer)return console.error(be({message:`Gate "${t}" on "${e}" asks decision point ${v.answer.point}, so its answer passes the gate, not an approval`,hint:`Answer the question: \`chant workspace points answer ${v.answer.id} --answer <value> --by <name>\`, then run \`chant run ${e}\` again.`})),{ok:!1};let k=mU(v?.origin,y);if(k&&!n.allowSameOrigin)return console.error(be({message:`Gate "${t}" on "${e}" cannot be resolved from here: ${k}`,hint:`Approve it from a channel the run did not come from \u2014 \`chant approve ${e} ${t}\` at a shell is the usual one. If resolving from the same channel genuinely is the intent, pass --allow-same-origin, which records that it was deliberate.`})),{ok:!1};let $=n.relayedBy?.trim();if(n.relayedBy!==void 0&&(!$||/[\r\n]/.test($)))return console.error(be({message:`--relayed-by needs one principal on one line (got ${JSON.stringify(n.relayedBy)})`,hint:"Name who relayed the approval, such as --relayed-by github:<login> or a principal the signers file lists."})),{ok:!1};let O=n.actor??(Lo(y)?sv:XA()),E={kind:n.agent||Lo(y)?"agent":"human",...n.roles&&n.roles.length>0?{roles:[...new Set(n.roles)]}:{}},P=await Promise.resolve().then(()=>(ep(),w2)),{scopeSource:T}=await Promise.resolve().then(()=>(Uo(),Nv)),S=T(o);try{P.refuseUnidentified(S,[O],n.actor!==void 0?"--actor":"the approver"),$&&P.refuseUnidentified(S,[$],"--relayed-by")}catch(U){if(!(U instanceof P.IdentityError))throw U;return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U.message}`,hint:"Pass --actor <forge identity or signer>, as the surface that signed the person in maps them, for example --actor github:<login>."})),{ok:!1}}let C=(U,Z)=>(console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U}`,...Z?{hint:Z}:{}})),{ok:!1});if(n.signature!==void 0&&n.sign!==void 0)return C("--sign signs here and --signature brings a signature made elsewhere; pass one of them");if(n.at!==void 0&&!r&&n.signature===void 0)return C("--at sets the time of a statement signed elsewhere, so it goes with --statement or --signature");if(n.signature!==void 0&&n.at===void 0)return C("--signature needs --at <timestamp>, the statement's time, since the signature covers it",`Pass the timestamp \`chant approve ${e} ${t} --statement\` printed.`);if(n.binding!==void 0){if(!r&&n.signature===void 0&&n.sign===void 0)return C("--binding is a line the approver's signature covers, so it goes with --statement, --signature or --sign");let U=aAe(n.binding);if(U!==null)return C(`--binding takes one line of printable text, and ${U}`)}let F=new Date().toISOString();if(n.at!==void 0){let U=Date.parse(n.at);if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(n.at)||Number.isNaN(U)||new Date(U).toISOString()!==n.at)return C(`--at takes a UTC time as chant writes one, such as ${F}, not ${JSON.stringify(n.at)}`);if(U>Date.now()+Hft)return C(`--at ${n.at} is in the future`);if(u&&n.at<u.timestamp)return C(`--at ${n.at} is before the pending fact it answers (${u.timestamp}), and a run counts only approvals newer than that`,`Take a fresh statement: chant approve ${e} ${t} --statement.`);F=n.at}let L={op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{}};if(r){let{CHANT_VERSION:U}=await Promise.resolve().then(()=>(qA(),qce));return{statement:cAe(L,U)}}let A=P.gateAdmissionFrom(S,t);if(A&&n.sign===void 0&&n.signature===void 0)return console.error(be({message:`Gate "${t}" needs a signed approval: chant.workspace.json at base names it in identity.gates`+(A.requirement.class!==null?`, from the class ${A.requirement.class}`:"")+", and this approval is not signed",hint:`chant approve ${e} ${t} --actor <principal> --sign [<key file>], with a key ${S.policy.signersPath} at base lists for that principal, or --signature <file> --at <timestamp> with a signature made elsewhere over the statement --statement prints.`})),{ok:!1};let _;if(n.signature!==void 0){let U=zft(n.signature,L,S.policy,o);if("refused"in U)return C(U.refused);_=U.seal}if(n.sign!==void 0){let{resolveSigningKey:U,sealGateApproval:Z,gateSealVersion:X,SealError:se}=await Promise.resolve().then(()=>(Rh(),kh));try{let Ce=U(n.sign,o);try{let le=X(L);_={...Z(Ce.file,L),...le!==1?{version:le}:{}}}finally{Ce.cleanup()}}catch(Ce){if(!(Ce instanceof se))throw Ce;return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${Ce.message}`})),{ok:!1}}}if(A){let U=A.refuses({op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},seal:_});if(U!==null)return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U}`,hint:`identity.gates.${t} in chant.workspace.json at base counts only an approval signed by a key ${S.policy.signersPath} lists for the approver`+(A.requirement.class!==null?`, who holds the role of the class ${A.requirement.class}`:"")+"."})),{ok:!1}}let N=v?.approval,V=Ni({signers:S.policy,roles:S.policy.roles}),J=V({version:1,op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},..._?{seal:_}:{}}).roles,M;if(N?.policy)try{let Z=await(n.evaluator??await BB(N.policy.lexicon)).evaluateGatePolicy(N.policy,UB({op:e,gate:t,resolvedBy:O,approver:E,roles:J,...f!==void 0?{planDigest:f}:{},...N.context?{context:N.context}:{}}));M={policy:N.policy.name,version:N.policy.version,mode:N.mode,contextDigest:Vb(N.context),decision:Z.decision,determining:Z.determining,errors:Z.errors}}catch(U){return console.error(be({message:`Gate "${t}" on "${e}" declares policy "${N.policy.name}", which could not be evaluated: ${U instanceof Error?U.message:String(U)}`,hint:`Install the ${N.policy.lexicon} lexicon in this project, or approve from a checkout that has it.`})),{ok:!1}}let{record:z}=await dv({op:e,gate:t,resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,..._?{seal:_}:{},approver:E,...M?{policyDecision:M}:{},...n.note?{note:n.note}:{},...c?{url:c}:{},...f!==void 0?{planDigest:f}:{},...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},...p!==void 0?{environment:p}:{},...m!==void 0?{releaseDigest:m}:{},...h!==void 0?{changeSet:h}:{},...u?.gitSha?{gitSha:u.gitSha}:{},...u?.runId?{runId:u.runId}:{},origin:y,...k&&n.allowSameOrigin?{sameOriginOverride:!0}:{}},...i),G=await OAe(`The resolution is recorded locally on ${cx}. Until it reaches the remote, a run in another checkout will not see it.`,n.cwd);console.error($y(`Gate "${t}" on "${e}" resolved by ${z.resolvedBy}`+(z.relayedBy?`, relayed by ${z.relayedBy},`:"")+` at ${z.timestamp}`+(z.url?` (${z.url})`:"")+(z.seal?`, signed with ${z.seal.kind===ea?"passkey ":""}${z.seal.key}`:"")+G.suffix)),z.binding!==void 0&&console.error(Fn(`The signature also binds ${JSON.stringify(z.binding)} (--binding).`)),z.planDigest&&console.error(Fn(`This approves the plan ${z.planDigest}`+(z.environment!==void 0?` in environment "${z.environment}"`:"")+(z.releaseDigest!==void 0?` for release ${z.releaseDigest}`:"")+", and only that plan. A run whose fresh plan differs refuses rather than applying it.")),z.checkpointDigest&&console.error(Fn(`The next run resumes at this gate from run ${u?.runId??"(unknown)"}'s checkpoint ${z.checkpointDigest}, after it plans again. A moved plan or another commit starts it at the first phase.`));let B=(E.roles??[]).filter(U=>!J.includes(U));if(B.length>0&&console.error(Fn(`--role ${B.join(", ")} is recorded on the approval and trusted by nothing: a gate's quorum and policy read ${z.resolvedBy}'s roles from .chant/trust.json at base, and only for an approval sealed by a signer listed at base (chant approve --sign).`)),N)for(let U of Vft(N,z,b.resolutions,v,b.pending,V))console.error(Fn(U));return{ok:!0,record:z,pushed:G.pushed}}function zft(e,t,n,r){let o;try{o=e==="-"?EAe(0,"utf-8"):EAe(Gft(r,e),"utf-8")}catch(l){return{refused:`--signature ${e} can't be read: ${l instanceof Error?l.message:String(l)}`}}let i=lAe(o);if("problem"in i)return{refused:`--signature ${e}: ${i.problem}`};let s=i.kind==="ssh"?{signer:t.resolvedBy,key:"",signature:i.signature}:{kind:ea,signer:t.resolvedBy,key:i.assertion.id,signature:i.assertion.signature,clientDataJSON:i.assertion.clientDataJSON,authenticatorData:i.assertion.authenticatorData},a=ta(n,t.resolvedBy,s,to(t));if(!a.ok)return{refused:a.unlisted?`${t.resolvedBy} has no ${i.kind==="ssh"?`key in ${n.signersPath}`:"passkey in .chant/trust.json"} at base, so a signature made elsewhere can't be checked`:`the ${i.kind==="ssh"?"ssh signature":"passkey's assertion"} does not verify for ${t.resolvedBy} over this approval's statement: ${a.reason}`};let c=xl(t);return{seal:{...s,key:a.key,...c!==1?{version:c}:{}}}}function qft(e){return/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}function Vft(e,t,n,r,o=r?[r]:[],i=cc){let s=[],a=t.policyDecision;if(a){let p=a.determining.length>0?` (${a.determining.join(", ")})`:"",f=e.mode==="enforce"?a.decision==="allow"?"In enforce mode this permit passes the gate on its own.":"In enforce mode only a permit passes the gate on its own, so this approval counts only toward the quorum.":"The gate is in log-only mode, so the decision is recorded and does not change the outcome.";s.push(`Policy "${a.policy}" ${a.version}: ${a.decision}${p}. ${f}`);for(let g of a.errors)s.push(`Policy evaluation error: ${g}`)}let c=r?.timestamp??new Date(0).toISOString(),l=r&&Ke(r.planDigest,t.planDigest)?sd(o,r):c,d=id([...n,t],t.gate,c,t.planDigest,e,l,i),u=d.counted.map(p=>p.resolvedBy).join(", ")||"none yet";if(Array.isArray(e.quorum))for(let p of d.rules??[])s.push(`Quorum: ${jl(p)}.`);else{let p=Ti(e.quorum)[0],f=p?.roles?` with role ${p.roles.join(" or ")}`:"";s.push(`Quorum: ${d.counted.length} of ${d.need} human approval(s)${f} for this plan (${u}).`)}if(!d.counted.includes(t)){let p=Ti(e.quorum).flatMap(f=>f.roles??[]);s.push(Im(t).kind==="agent"?"An agent's approval does not count toward the quorum.":i(t).proven?`This approval does not count toward the quorum: .chant/trust.json at base gives ${t.resolvedBy} none of its roles (${[...new Set(p)].join(", ")}).`:"This approval does not count toward the quorum: its roles are read from .chant/trust.json at base, and only for an approval sealed by a signer listed at base (chant approve --sign).")}return s}var cx,Hft,$3=x(()=>{"use strict";xa();rI();Ul();Or();Nt();qg();lo();ii();so();Bk();tt();Jg();da();ys();dAe();ir();PH();cx="chant/lifecycle";Hft=300*1e3});VT();var S3=new Set(["--help","--open","--note-commands","--check-job","--ref-gate-status","--locks","--reach","--version","--agents","--agent","--all-projects","--all","--force","--fix","--watch","--verbose","--live","--overlay","--explain","--owned","--verbatim","--skip-undeclarable","--apply-rewrites","--write","--strict","--validate","--use-composites","--composites","--stacks","--components","--pr-build","--pr-env","--up","--down","--include-dependents","--cross-root","--local","--json","--progress-json","--events-json","--follow","--update-snapshot","--update-baseline","--run-examples","--check","--bump","--no-release-record","--deploy-unchanged","--plan-only","--continue","--no-record","--fold","--no-fold","--no-cache","--discover","--no-build","--sandbox","--yes","--confirm-prod","--once","--rerun-failed","--setup-key","--trust","--unsigned","--in-place","--require-runner-start","--require-clouds","--no-push","--no-forks","--list","--no-require-review","--expire","--check-live","--stream","--check-snapshot","--fail-on-drift","--durable-requests","--skip-mcp","--read-only","--mcp-read-only","--propose","--current","--uncommitted","--allow-code","--allow-skip","--allow-unsigned","--override-green","--require-provenance","--root-only","--generated","--decide","--policy-only","--render-spec","--record-plans","--approval-status","--waves-outcome","--loopback","--artifacts","--push","--only","--reset"]);function E3(e){e=e.slice();let t={command:"",path:".",extraPositional:void 0,extraPositional2:void 0,output:void 0,format:"",force:void 0,fix:!1,lexicon:void 0,template:void 0,watch:!1,verbose:!1,help:!1,param:void 0,paramsFile:void 0,report:void 0,local:void 0,profile:void 0,json:void 0,live:!1,migrateFrom:void 0,migrateTo:void 0,emit:void 0,strict:!1,validate:!1,useComposites:!1,reportFile:void 0,skill:void 0,skipMcp:void 0,readOnly:void 0,mcpReadOnly:void 0,propose:void 0,src:void 0,env:void 0},n=e.indexOf("--");e=n<0?qT(e,S3):[...qT(e.slice(0,n),S3),...e.slice(n)];let r=!1,o=s=>{t.command&&(t.positionals??=[]).push(s),t.command?t.path==="."?(t.path=s,t.pathGiven=!0):t.extraPositional?t.extraPositional2=s:t.extraPositional=s:t.command=s},i=0;for(;i<e.length;){let s=e[i];if(r)o(s);else if(s==="--")r=!0;else if(s==="--help"||s==="-h")t.help=!0;else if(s==="--version"||s==="-V")t.version=!0;else if(s==="--output"||s==="-o")t.output=e[++i];else if(s==="--format"||s==="-f")t.format=e[++i];else if(s==="--lexicon"||s==="-d")t.lexicon=e[++i];else if(s==="--template"||s==="-t")t.template=e[++i];else if(s==="--force")t.force=!0;else if(s==="--fix")t.fix=!0;else if(s==="--watch"||s==="-w")t.watch=!0;else if(s==="--verbose"||s==="-v")t.verbose=!0;else if(s==="--profile"||s==="-p")t.profile=e[++i];else if(s==="--report"){let a=e[i+1];a&&!a.startsWith("-")?(t.reportFile=a,i++):t.report=!0}else if(s==="--live")t.live=!0;else if(s==="--overlay")t.overlay=!0;else if(s==="--between"){if(t.betweenA=e[++i],t.betweenB=e[++i],!t.betweenA||!t.betweenB)throw new Error("--between needs two snapshot refs: --between <refA> <refB>")}else if(s==="--traffic"){let a=e[++i];if(!a)throw new Error('--traffic needs a level, passed to the engine verbatim: --traffic "100 rps, p50"');t.traffic=a}else if(s==="--overlay-anchor"){let a=e[++i];if(a!=="source"&&a!=="live")throw new Error(`--overlay-anchor must be 'source' or 'live', got '${a}'`);t.overlayAnchor=a}else if(s==="--scan"){let a=e[++i];if(a===void 0||a==="--"||a.startsWith("--"))throw new Error("--scan needs a directory: --scan <dir>");(t.scanDirs??=[]).push(a)}else if(s==="--reset")t.reset=!0;else if(s==="--chant-version"){let a=e[++i];if(!a||!/^\d+\.\d+\.\d+$/.test(a))throw new Error("--chant-version needs a chant version: --chant-version 0.124.84");t.chantVersion=a}else if(s==="--with"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--with needs a chant package name: --with @intentius/chant-lexicon-<name>");(t.withPackages??=[]).push(a)}else if(s==="--from")t.migrateFrom=e[++i];else if(s==="--kustomize")t.kustomize=e[++i];else if(s==="--parser-option"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--parser-option needs key or key=value: --parser-option acceptLossyV1");(t.parserOption??=[]).push(a)}else if(s==="--tag"){let a=e[++i];if(!a||a.startsWith("-")||!a.includes("="))throw new Error("--tag needs key=value: --tag team=payments");(t.selectTags??=[]).push(a)}else if(s==="--type")t.selectType=e[++i];else if(s==="--name")t.selectName=e[++i];else if(s==="--owned")t.owned=!0;else if(s==="--namespace"){if(t.namespace=e[++i],!t.namespace||t.namespace.startsWith("-"))throw new Error("--namespace needs a namespace: --namespace <ns>")}else if(s==="--verbatim")t.verbatim=!0;else if(s==="--skip-undeclarable")t.skipUndeclarable=!0;else if(s==="--state")t.statePath=e[++i],t.statePath!==void 0&&(t.statePaths??=[]).push(t.statePath);else if(s==="--state-dir"){if(t.stateDir=e[++i],!t.stateDir||t.stateDir.startsWith("-"))throw new Error("--state-dir needs a directory: --state-dir <dir>")}else if(s==="--wave-size"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--wave-size needs a whole number from 1: got "${a??""}"`);t.waveSize=c}else if(s==="--all")t.all=!0;else if(s==="--select")t.selectAddress=e[++i];else if(s==="--live-name")t.liveName=e[++i];else if(s==="--apply-rewrites")t.applyRewrites=!0;else if(s==="--stack")t.carveStack=e[++i];else if(s==="--write")t.write=!0;else if(s==="--write-source")t.writeSource=!0;else if(s==="--to")t.migrateTo=e[++i];else if(s==="--emit")t.emit=e[++i];else if(s==="--dry-run")t.dryRun=!0;else if(s==="--drill")t.drill=!0;else if(s==="--yes")t.yes=!0;else if(s==="--push")t.push=!0;else if(s==="--confirm-prod")t.confirmProd=!0;else if(s==="--strict")t.strict=!0;else if(s==="--validate")t.validate=!0;else if(s==="--use-composites")t.useComposites=!0;else if(s==="--skill")t.skill=e[++i];else if(s==="--skip-mcp")t.skipMcp=!0;else if(s==="--read-only")t.readOnly=!0;else if(s==="--mcp-read-only")t.mcpReadOnly=!0;else if(s==="--propose")t.propose=!0;else if(s==="--src")t.src=e[++i];else if(s==="--env")t.env=e[++i];else if(s==="--port"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--port needs a port: --port <container-port>=<host-port>");(t.port??=[]).push(a)}else if(s==="--image"){if(t.image=e[++i],!t.image||t.image.startsWith("-"))throw new Error("--image needs an image reference: --image <name>:<tag>");(t.images??=[]).push(t.image)}else if(s==="--network"){if(t.network=e[++i],!t.network||t.network.startsWith("-"))throw new Error("--network needs a Docker network name: --network <name>")}else if(s==="--setting"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--setting needs a value: --setting <KEY>=<VALUE>");(t.setting??=[]).push(a)}else if(s==="--loopback")t.loopback=!0;else if(s==="--promote-to"){if(t.promoteTo=e[++i],!t.promoteTo||t.promoteTo.startsWith("-"))throw new Error("--promote-to needs an environment: --promote-to <env>")}else if(s==="--tier")t.tier=e[++i];else if(s==="--agents")t.agents=!0;else if(s==="--scope")t.scope=e[++i];else if(s==="--all-projects")t.allProjects=!0;else if(s==="--runtime")t.runtime=e[++i];else if(s==="--fail-on")t.failOn=e[++i];else if(s==="--preset"){if(t.preset=e[++i],!t.preset||t.preset.startsWith("-"))throw new Error("--preset needs a name: --preset pull-request")}else if(s==="--baseline"){if(t.baseline=e[++i],!t.baseline||t.baseline.startsWith("-"))throw new Error("--baseline needs a file: --baseline <report.json>")}else if(s==="--max-files")t.maxFiles=Number(e[++i]);else if(s==="--theme")t.theme=e[++i];else if(s==="--stacks")t.stacks=!0;else if(s==="--components")t.components=!0;else if(s==="--generate")t.generate=e[++i];else if(s==="--spec")t.opsSpec=e[++i];else if(s==="--dump-outputs")t.dumpOutputs=e[++i];else if(s==="--digest-file")t.digestFile=e[++i];else if(s==="--seed-outputs")(t.seedOutputs??=[]).push(e[++i]);else if(s==="--keep")t.keepLocks=!0;else if(s==="--reach")t.lockReach=!0;else if(s==="--runs"||s==="--plans"||s==="--wave-outputs"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a file`);t[{"--runs":"runsFile","--plans":"plansFile","--wave-outputs":"waveOutputs"}[s]]=a}else if(s==="--detail")t.detail=Number(e[++i]);else if(s==="--lens")t.lens=e[++i];else if(s==="--explain")t.explain=!0;else if(s==="--show")t.show=e[++i];else if(s==="--count-by"){if(t.countBy=e[++i],!t.countBy||t.countBy.startsWith("-"))throw new Error("--count-by needs a grouping: --count-by kind, --count-by module or --count-by attr:<name>")}else if(s==="--up")t.up=!0;else if(s==="--down")t.down=!0;else if(s==="--node-sizes")t.nodeSizes=e[++i];else if(s==="--layout-engine")t.layoutEngine=e[++i];else if(s==="--base")t.base=e[++i];else if(s==="--head")t.head=e[++i];else if(s==="--include-dependents")t.includeDependents=!0;else if(s==="--cross-root")t.crossRoot=!0;else if(s==="--dependents-of"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--dependents-of needs a member name: --dependents-of <member>");t.dependentsOf=a}else if(s==="--pin"){let a=e[++i];if(!a||a.startsWith("-")||!a.includes("="))throw new Error("--pin needs a member and a release: --pin <member>=<label|digest>");(t.pins??=[]).push(a)}else if(s==="--from-affected")t.fromAffected=e[++i];else if(s==="--gate")t.gate=e[++i];else if(s==="--wave-gate"){if(t.waveGate=e[++i],!t.waveGate||t.waveGate.startsWith("-"))throw new Error("--wave-gate needs a gate name: --wave-gate <name>")}else if(s==="--wave"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--wave needs a wave number from 1: got "${a??""}"`);t.wave=c}else if(s==="--decide")t.decide=!0;else if(s==="--policy-only")t.policyOnly=!0;else if(s==="--render-spec")t.renderSpec=!0;else if(s==="--record-plans")t.recordPlans=!0;else if(s==="--approval-status")t.approvalStatus=!0;else if(s==="--waves-outcome")t.wavesOutcome=!0;else if(s==="--apply-status"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--apply-status needs the status's name: --apply-status <context>");t.applyStatus=a}else if(s==="--of"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--of needs the number of waves: got "${a??""}"`);t.of=c}else if(s==="--group"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--group needs a job group's name: --group <name>");t.group=a}else if(s==="--share"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--share needs a share number from 1: got "${a??""}"`);t.share=c}else if(s==="--target"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--target needs an address: --target <component>:<address>, or on pr-plan --target <address>");(t.targets??=[]).push(a)}else if(s==="--refresh")t.refresh=!0;else if(s==="--target-dependents")t.targetDependents=!0;else if(s==="--comment-targets")t.commentTargets=!0;else if(s==="--parallelism"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--parallelism needs a whole number of 1 or more: got "${a??""}"`);t.parallelism=c}else if(s==="--canary"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--canary needs a component name: --canary <name>[,<name>...]");(t.canary??=[]).push(...a.split(",").map(c=>c.trim()).filter(Boolean))}else if(s==="--pr"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--pr needs a pull or merge request number: got "${a??""}"`);t.pr=c,(t.prs??=[]).push(c)}else if(s==="--channel"){if(t.channel=e[++i],!t.channel||!/^[A-Za-z][A-Za-z0-9._-]*$/.test(t.channel))throw new Error(`--channel needs a channel name, such as next or hotfix: got "${t.channel??""}"`)}else if(s==="--forge"){if(t.forge=e[++i],!t.forge||t.forge.startsWith("-"))throw new Error("--forge needs a forge: --forge github|gitlab|forgejo")}else if(s==="--require-clouds")t.requireClouds=!0;else if(s==="--require-review")t.requireReview=!0;else if(s==="--list")t.list=!0;else if(s==="--stage"){if(t.lockStage=e[++i],!t.lockStage||t.lockStage.startsWith("-"))throw new Error("--stage needs plan, apply or lock: --stage <stage>")}else if(s==="--alive"){if(t.aliveRun=e[++i],!t.aliveRun||t.aliveRun.startsWith("-"))throw new Error("--alive needs a run id: --alive <run>")}else if(s==="--beat"){if(t.beatRun=e[++i],!t.beatRun||t.beatRun.startsWith("-"))throw new Error("--beat needs a run id: --beat <run> --parent <pid>")}else if(s==="--parent"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--parent needs a process id: --parent <pid>");t.parentPid=a}else if(s==="--run"){if(t.unlockRun=e[++i],!t.unlockRun||t.unlockRun.startsWith("-"))throw new Error("--run needs a run id: --run <id>")}else if(s==="--from-report"){if(t.fromReport=e[++i],!t.fromReport||t.fromReport.startsWith("-"))throw new Error("--from-report needs a report file: --from-report <pr-plan.json>")}else if(s==="--from-job"||s==="--claims"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(s==="--from-job"?"--from-job needs the job's name: --from-job <job>":"--claims needs a directory: --claims <dir>");s==="--from-job"?t.fromJob=a:t.claims=a}else if(s==="--report-url"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--report-url needs a URL: --report-url s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory>");t.reportUrl=a}else if(s==="--result"){if(t.planResult=e[++i],!t.planResult||t.planResult.startsWith("-"))throw new Error("--result needs the plan job's result: --result success|failure|cancelled")}else if(s==="--no-forks")t.noForks=!0;else if(s==="--no-status")t.noStatus=!0;else if(s==="--status-url"){if(t.statusUrl=e[++i],!t.statusUrl||t.statusUrl.startsWith("-"))throw new Error("--status-url needs a URL template: --status-url https://host/reports/{key}")}else if(s==="--override-green")t.overrideGreen=!0;else if(s==="--allow-unsigned")t.allowUnsigned=!0;else if(s==="--require-provenance")t.requireProvenance=!0;else if(s==="--pr-loop")t.prLoop=!0;else if(s==="--green")t.green=!0;else if(s==="--before-merge")t.beforeMerge=!0;else if(s==="--requires"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--requires needs a list of checks: --requires approved,mergeable,undiverged,checks");t.requires=a.split(",").map(c=>c.trim()).filter(Boolean)}else if(s==="--respond"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--respond needs a list of responses: --respond wave-refused=diff,apply-failed=off,description=check");t.respond=[...t.respond??[],a]}else if(s==="--decide-backend"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--decide-backend needs the name of a decide.backends entry");t.decideBackend=a}else if(s==="--decide-model"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--decide-model needs a model id");t.decideModel=a}else if(s==="--merge"||s==="--merge-token-env"||s==="--merge-method"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value: --merge manual|auto, --merge-token-env <VAR>, --merge-method merge|squash|rebase`);s==="--merge"?t.merge=a:s==="--merge-token-env"?t.mergeTokenEnv=a:t.mergeMethod=a}else if(s==="--apply-before-merge")t.applyBeforeMerge=!0;else if(s==="--apply-on-merge")t.applyOnMerge=!0;else if(s==="--action-job")t.actionJob=!0;else if(s==="--preview-comment")t.previewComment=!0;else if(s==="--pr-env")t.prEnv=!0;else if(s==="--pr-runner"){let a=e[++i]??"",c=/^(plan|apply|default)=(.+)$/.exec(a);if(!c)throw new Error(`--pr-runner needs <stage>=<label>[,<label>...], the stage plan, apply or default: got "${a}"`);let l=c[2].split(",").map(d=>d.trim()).filter(Boolean);if(l.length===0)throw new Error(`--pr-runner ${c[1]} names no label`);(t.prRunners??={})[c[1]]=l}else if(s==="--pr-variable"||s==="--pr-secret"){let a=e[++i]??"",c=a.indexOf("=");if(c<1)throw new Error(`${s} needs <NAME>=<${s==="--pr-secret"?"secret":"value"}>: got "${a}"`);let l=s==="--pr-secret"?t.prSecrets??={}:t.prVariables??={};l[a.slice(0,c)]=a.slice(c+1)}else if(s==="--pr-build")t.prBuild=!0;else if(s==="--build-command"){let a=e[++i];if(a===void 0||a==="")throw new Error("--build-command needs a shell line: --build-command '<line>'");t.ciBuildCommand=a}else if(s==="--land")t.ciLand=!0;else if(s==="--pr-build-command"){let a=e[++i];if(a===void 0||a==="")throw new Error("--pr-build-command needs a shell line: --pr-build-command '<line>'");t.prBuildCommand=a}else if(s==="--before-script"){let a=e[++i];if(a===void 0||a==="")throw new Error("--before-script needs a shell line: --before-script '<line>'");(t.beforeScript??=[]).push(a)}else if(s==="--resume"){let a=e[i+1];a===void 0||a.startsWith("-")?t.resumeRun=!0:t.resume=e[++i]}else if(s==="--local")t.local=!0;else if(s==="--json")t.json=!0;else if(s==="--progress-json")t.progressJson=!0;else if(s==="--events-json")t.eventsJson=!0;else if(s==="--follow")t.follow=!0;else if(s==="--gated-exit")t.gatedExit=Number(e[++i]);else if(s==="--durable-requests")t.durableRequests=!0;else if(s==="--update-snapshot")t.updateSnapshot=!0;else if(s==="--update-baseline")t.updateBaseline=!0;else if(s==="--deep")t.deep=!0;else if(s==="--at")t.at=e[++i];else if(s==="--capability-view")t.capabilityView=!0;else if(s==="--capabilities")t.capabilities=!0;else if(s==="--snapshot"){if(t.snapshot=e[++i],!t.snapshot||t.snapshot.startsWith("-"))throw new Error("--snapshot needs a snapshot ref: --snapshot latest")}else if(s==="--kind"){if(t.kind=e[++i],!t.kind||t.kind.startsWith("-"))throw new Error("--kind needs a kind file: --kind <path>");(t.kinds??=[]).push(t.kind)}else if(s==="--composites")t.composites=!0;else if(s==="--intent"){let a=e[i+1];if(a!==void 0&&!a.startsWith("-"))t.intent=e[++i];else if(e.includes("--record"))t.intent="";else throw new Error("--intent needs a region: --intent <path[:start-end]|path#symbol|member/node|sha>, or --intent --record <id>")}else if(s==="--follow-squash")t.followSquash=!0;else if(s==="--forge-issues")t.forgeIssues=!0;else if(s==="--record"){if(t.record=e[++i],!t.record||t.record.startsWith("-"))throw new Error("--record needs a record id: --record <id>")}else if(s==="--path"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--path needs a path: --path <path>");(t.paths??=[]).push(a)}else if(s==="--worktree")t.worktree=!0;else if(s==="--max-bytes"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--max-bytes needs a whole number of bytes above 0");t.maxBytes=a}else if(s==="--changes"){if(t.changes=e[++i],!t.changes||t.changes.startsWith("-"))throw new Error("--changes needs a range: --changes <base>..<head>")}else if(s==="--severity"){if(t.severity=e[++i],!t.severity||t.severity.startsWith("-"))throw new Error("--severity needs off, warn or fail")}else if(s==="--current")t.current=!0;else if(s==="--uncommitted")t.uncommitted=!0;else if(s==="--set"){if(t.set=e[++i],!t.set||t.set.startsWith("-")&&t.set!=="-")throw new Error("--set needs a JSON file, or - for standard input: --set <file|->")}else if(s==="--cover"){if(t.cover=e[++i],!t.cover||t.cover.startsWith("-"))throw new Error("--cover needs a PNG, JPEG or WebP file: --cover <image>")}else if(s==="--cover-path"){if(t.coverPath=e[++i],!t.coverPath||t.coverPath.startsWith("-"))throw new Error("--cover-path needs a path from the workspace root: --cover-path <path>")}else if(s==="--records")t.records=!0;else if(s==="--expect"){if(t.expect=e[++i],!t.expect||t.expect.startsWith("-"))throw new Error("--expect needs the record's digest, as records --json prints it: --expect <digest>")}else if(s==="--label"){if(t.label=e[++i],!t.label||t.label.startsWith("-"))throw new Error("--label needs the snapshot's name, such as a turn id: --label <text>")}else if(s==="--branch"){if(t.branch=e[++i],!t.branch||t.branch.startsWith("-"))throw new Error("--branch needs a branch name: --branch <branch>")}else if(s==="--security"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--security needs a group: --security verified-releases|supply-chain|who-ran-it|review-rules|isolated-runners");t.securityGroups=[...t.securityGroups??[],a]}else if(s==="--workflow"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--workflow needs a workflow's name: --workflow <name>");t.ciWorkflows=[...t.ciWorkflows??[],a]}else if(s==="--chant"){if(t.ciChant=e[++i],!t.ciChant||t.ciChant.startsWith("-"))throw new Error('--chant needs the command that runs chant, such as "npx tsx packages/core/src/cli/main.ts": --chant <command>')}else if(s==="--commit"){if(t.commit=e[++i],!t.commit||t.commit.startsWith("-"))throw new Error("--commit needs the commit the job runs at: --commit <sha>")}else if(s==="--pass-env"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--pass-env needs a variable's name, such as AWS_PROFILE: --pass-env <NAME>");(t.passEnv??=[]).push(a)}else if(s==="--secrets"){if(t.ciSecrets=e[++i],!t.ciSecrets||t.ciSecrets.startsWith("-"))throw new Error("--secrets needs the host's secrets file, a dotenv or JSON file only its owner can read: --secrets <file>")}else if(s==="--repo"){let a=e[++i];if(a&&/^https?:\/\//.test(a))t.repoUrl=a;else if(t.ciRepo=a,!t.ciRepo||!/^[^/\s-][^/\s]*\/[^/\s]+$/.test(t.ciRepo))throw new Error("--repo needs the repository as owner/name, or for chant notify relay its https clone address: --repo <owner/repo>, --repo <url>")}else if(s==="--token-env"){if(t.tokenEnv=e[++i],!t.tokenEnv||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t.tokenEnv))throw new Error("--token-env needs a variable's name: --token-env <VAR>")}else if(s==="--host"){if(t.host=e[++i],!t.host||t.host.startsWith("-"))throw new Error("--host needs an address to listen on, such as 0.0.0.0: --host <address>")}else if(s==="--run-index-limit"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--run-index-limit needs a whole number of runs, 1 or more: --run-index-limit <n>");t.runIndexLimit=a}else if(s==="--max-jobs"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--max-jobs needs a whole number of jobs, 1 or more: --max-jobs <n>");t.maxJobs=a}else if(s==="--author"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--author needs a forge login: --author <login>");(t.ciAuthors??=[]).push(a)}else if(s==="--rerun-failed")t.rerunFailed=!0;else if(s==="--install"){if(t.ciInstall=e[++i],!t.ciInstall||t.ciInstall.startsWith("-"))throw new Error('--install needs the install command, such as "npm install": --install <command>')}else if(s==="--token-secret"){if(t.ciTokenSecret=e[++i],!t.ciTokenSecret||t.ciTokenSecret.startsWith("-"))throw new Error("--token-secret needs a repository secret's name, such as CI_GREEN_TOKEN: --token-secret <NAME>")}else if(s==="--app-id-var"){if(t.ciAppIdVar=e[++i],!t.ciAppIdVar||t.ciAppIdVar.startsWith("-"))throw new Error("--app-id-var needs the Actions variable holding the App's id: --app-id-var <VAR>")}else if(s==="--app-key-secret"){if(t.ciAppKeySecret=e[++i],!t.ciAppKeySecret||t.ciAppKeySecret.startsWith("-"))throw new Error("--app-key-secret needs the secret holding the App's private key: --app-key-secret <NAME>")}else if(s==="--runner-key-secret"){if(t.ciRunnerKeySecret=e[++i],!t.ciRunnerKeySecret||t.ciRunnerKeySecret.startsWith("-"))throw new Error("--runner-key-secret needs the repository secret holding the runner key, such as CHANT_RUNNER_KEY: --runner-key-secret <NAME>")}else if(s==="--verdict"){if(t.verdict=e[++i],!t.verdict||t.verdict.startsWith("-"))throw new Error("--verdict needs agree, dissent or abstain")}else if(s==="--class"){if(t.runnerClass=e[++i],!t.runnerClass||t.runnerClass.startsWith("-"))throw new Error("--class needs runner or service: --class <class>")}else if(s==="--by"){if(t.by=e[++i],!t.by||t.by.startsWith("-"))throw new Error("--by needs the reviewer: --by <principal>");(t.bys??=[]).push(t.by)}else if(s==="--own-jobs"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--own-jobs needs the YAML file of your own jobs: --own-jobs <file>");t.ownJobs=a}else if(s==="--keep-own-jobs")t.keepOwnJobs=!0;else if(s==="--run-group"){let a=e[++i];if(a!=="commit"&&a!=="pull-request")throw new Error(`--run-group takes commit or pull-request: got "${a??""}"`);t.runGroup=a}else if(s==="--control"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--control needs the control repo, such as github.com/acme/control");t.controlRepo=a}else if(s==="--control-setting"){let a=e[++i]??"",c=/^(op|member|readTokenSecret|tokenSecret|forge|ref|apiBase|sentCheck|markSent)=(.+)$/s.exec(a);if(!c)throw new Error(`--control-setting needs <key>=<value>, the key one of op, member, readTokenSecret, tokenSecret, forge, ref, apiBase, sentCheck, markSent: got "${a}"`);(t.controlSettings??={})[c[1]]=c[2]}else if(s==="--note-commands")t.noteCommands=!0;else if(s==="--check-job")t.checkJob=!0;else if(s==="--ref-gate-status")t.refGateStatus=!0;else if(s==="--evidence-runner-key-secret"){if(t.evidenceRunnerKeySecret=e[++i],!t.evidenceRunnerKeySecret||t.evidenceRunnerKeySecret.startsWith("-"))throw new Error("--evidence-runner-key-secret needs the secret holding the runner key: --evidence-runner-key-secret <NAME>")}else if(s==="--evidence-identity"){if(t.evidenceIdentity=e[++i],t.evidenceIdentity!=="oidc")throw new Error(`--evidence-identity takes oidc, the one identity chant signs keyless with: got "${t.evidenceIdentity??""}"`)}else if(s==="--evidence-audience"){if(t.evidenceAudience=e[++i],!t.evidenceAudience||t.evidenceAudience.startsWith("-"))throw new Error("--evidence-audience needs the OIDC token's audience: --evidence-audience <aud>")}else if(s==="--record-run"){if(t.recordRun=e[++i],!t.recordRun||!/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(t.recordRun))throw new Error(`--record-run needs the plan job's name: got "${t.recordRun??""}"`)}else if(s==="--not-affected"){if(i+1>=e.length)throw new Error(`--not-affected needs the re-plan's argument, empty for none: --not-affected "$CHANT_PLAN_ARGUMENT"`);t.notAffected=e[++i]}else if(s==="--context"){let a=e[++i];if(!a||!/^[A-Za-z0-9][A-Za-z0-9_.\/:-]*$/.test(a))throw new Error(`--context needs the plan status's context, letters, digits and _./:-: got "${a??""}"`);t.statusContexts=[...t.statusContexts??[],a]}else if(s==="--plan-job"){if(t.planJob=e[++i],!t.planJob||!/^[A-Za-z0-9_][A-Za-z0-9_-]*$/.test(t.planJob))throw new Error(`--plan-job needs the plan job's name: got "${t.planJob??""}"`)}else if(s==="--evidence-dir"){if(t.evidenceDir=e[++i],!t.evidenceDir||t.evidenceDir.startsWith("-"))throw new Error("--evidence-dir needs the directory the signing job kept: --evidence-dir .chant/evidence/plan")}else if(s==="--summary"){if(t.checkSummary=e[++i],!t.checkSummary||t.checkSummary.startsWith("-"))throw new Error("--summary needs a file to append the check report's section to: --summary <file>")}else if(s==="--locks")t.locks=!0;else if(s==="--stale-notes")t.staleNotes=!0;else if(s==="--stale")t.stale=!0;else if(s==="--tip"){let a=e[++i];if(!a||!/^[0-9a-f]{40}$/.test(a))throw new Error(`--tip needs the target branch's full commit sha: got "${a??""}"`);t.tip=a}else if(s==="--open")t.open=!0;else if(s==="--inputs"){if(t.inputs=e[++i],!t.inputs||t.inputs.startsWith("-")&&t.inputs!=="-")throw new Error("--inputs needs a JSON file, - for standard input, or the JSON itself: --inputs <file|-|json>")}else if(s==="--candidates"){if(t.candidates=e[++i],!t.candidates||t.candidates.startsWith("-")&&t.candidates!=="-")throw new Error("--candidates needs a JSON file, - for standard input, or the JSON itself: --candidates <file|-|json>")}else if(s==="--response"){if(t.response=e[++i],!t.response||t.response.startsWith("-"))throw new Error("--response needs a JSON file: --response <file>")}else if(s==="--subject"){if(t.subject=e[++i],!t.subject||t.subject.startsWith("-"))throw new Error("--subject needs what the question is about, such as a work item id: --subject <id>")}else if(s==="--store"){let a=e[++i];if(a!=="tree"&&a!=="ledger")throw new Error("--store is tree (the answer kind's directory in the working tree) or ledger (chant/lifecycle): --store <tree|ledger>");t.store=a}else if(s==="--answer"){if(t.answer=e[++i],t.answer===void 0||t.answer==="")throw new Error("--answer needs one of the question's candidates: --answer <value>")}else if(s==="--sign"){let a=e[i+1];t.sign=a!==void 0&&!a.startsWith("-")?e[++i]:!0}else if(s==="--session"){if(t.session=e[++i],!t.session||t.session.startsWith("-"))throw new Error("--session needs a session id: --session <id>")}else if(s==="--prefix"){if(t.prefix=e[++i],!t.prefix||t.prefix.startsWith("-"))throw new Error("--prefix needs an id prefix: --prefix <prefix>")}else if(s==="--key"||s==="--check-id"||s==="--claim"||s==="--environment"||s==="--envelope"||s==="--threshold"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value`);let c={"--key":"key","--check-id":"checkId","--claim":"claim","--environment":"environment","--envelope":"envelope","--threshold":"threshold"}[s];t[c]=a}else if(s==="--ref"||s==="--hook"||s==="--git-dir"||s==="--ledger"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value`);let c={"--ref":"ref","--hook":"hook","--git-dir":"gitDir","--ledger":"ledger"}[s];t[c]=a}else if(s==="--require"){if(t.require=e[++i],!t.require||t.require.startsWith("-"))throw new Error("--require needs a provenance level: --require attested")}else if(s==="--ambient")t.ambient=!0;else if(s==="--check-live")t.checkLive=!0;else if(s==="--check-snapshot")t.checkSnapshot=!0;else if(s==="--fail-on-drift")t.failOnDrift=!0;else if(s==="--run-examples")t.runExamples=!0;else if(s==="--pinned-digest")t.pinnedDigest=e[++i];else if(s==="--check")t.check=!0;else if(s==="--bump")t.bump=!0;else if(s==="--component")t.component=e[++i];else if(s==="--digest")t.digest=e[++i],t.digest!==void 0&&(t.digests??=[]).push(t.digest);else if(s==="--release-plan")t.releasePlanFile=e[++i];else if(s==="--release"){if(t.release=e[++i],!t.release||t.release.startsWith("-"))throw new Error("--release needs a release's label or digest: --release <label|digest>")}else if(s==="--build"){if(t.buildCommand=e[++i],!t.buildCommand)throw new Error("--build needs a shell command: --build '<command>'")}else if(s==="--deploy-unchanged")t.deployUnchanged=!0;else if(s==="--continue")t.continueTrain=!0;else if(s==="--plan-only")t.planOnly=!0;else if(s==="--artifacts")t.artifacts=!0;else if(s==="--git-sha")t.gitSha=e[++i];else if(s==="--run-id")t.runId=e[++i];else if(s==="--actor")t.actor=e[++i];else if(s==="--approver")t.approver=e[++i];else if(s==="--statement")t.statement=!0;else if(s==="--signature"){if(t.signature=e[++i],!t.signature||t.signature.startsWith("-")&&t.signature!=="-")throw new Error("--signature needs a file holding the signature, or - for stdin: --signature <file|->")}else if(s==="--binding"){if(t.binding=e[++i],!t.binding||t.binding.startsWith("-"))throw new Error("--binding needs the line the signature binds, which does not start with -: --binding <text>")}else if(s==="--relayed-by"){if(t.relayedBy=e[++i],!t.relayedBy||t.relayedBy.startsWith("-"))throw new Error("--relayed-by needs the principal that relayed it: --relayed-by <principal>")}else if(s==="--on"){if(t.on=e[++i],!t.on||t.on.startsWith("-"))throw new Error("--on needs a runtime name: --on <lexicon>")}else if(s==="--compare-to")t.compareTo=e[++i];else if(s==="--no-release-record")t.noReleaseRecord=!0;else if(s==="--no-record")t.noRecord=!0;else if(s==="--fold")t.fold=!0;else if(s==="--no-build")t.noBuild=!0;else if(s==="--no-cache")t.noCache=!0;else if(s==="--discover")t.discover=!0;else if(s==="--no-fold")t.fold=!1;else if(s==="--sandbox")t.sandbox=!0;else if(s==="--fold-rank"){let a=e[i+1];a&&!a.startsWith("-")?(t.foldRankCollapsedFile=a,i++):t.foldRank=!0}else if(s==="--param")(t.param??=[]).push(e[++i]);else if(s==="--lexicon-output")(t.lexiconOutput??=[]).push(e[++i]);else if(s==="--params-file")t.paramsFile=e[++i];else if(s==="--projection")t.projection=e[++i];else if(s==="--interval")t.interval=e[++i];else if(s==="--lease-ttl")t.leaseTtl=e[++i];else if(s==="--steward"){let a=e[i+1];a!==void 0&&!a.startsWith("-")?(t.steward=a,i++):t.steward=""}else if(s==="--once")t.once=!0;else if(s==="--setup-key")t.setupKey=!0;else if(s==="--trust")t.trustKey=!0;else if(s==="--in-place")t.ciInPlace=!0;else if(s==="--require-runner-start")t.requireRunnerStart=!0;else if(s==="--job"){if(t.ciJob=e[++i],!t.ciJob||t.ciJob.startsWith("-"))throw new Error("--job needs the job as JSON or @<file>: --job @job.json")}else if(s==="--no-push")t.noPush=!0;else if(s==="--no-require-review")t.requireReview=!1;else if(s==="--unsigned")t.unsigned=!0;else if(s==="--principal"){if(t.ciPrincipal=e[++i],!t.ciPrincipal||t.ciPrincipal.startsWith("-"))throw new Error("--principal needs the runner's principal: --principal <name>")}else if(s==="--work"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--work needs a work item id: --work <id>");t.work=a,(t.works??=[]).push(a)}else if(s==="--holder"||s==="--ttl"||s==="--token"||s==="--outcome"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs a value: ${s} <${s.slice(2)}>`);t[s.slice(2)]=a}else if(s==="--input"||s==="--org"||s==="--endpoint"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs a value: ${s} <${s==="--input"?"file":s.slice(2)}>`);t[s.slice(2)]=a}else if(s==="--signer"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--signer needs a principal: --signer <principal>");t.signer=a}else if(s==="--unit"||s==="--decision"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs an id: ${s} <id>`);t[s.slice(2)]=a}else if(s==="--note")t.note=e[++i];else if(s==="--reason"){if(t.reason=e[++i],t.reason===void 0||t.reason.startsWith("-"))throw new Error("--reason needs the text of the reason: --reason <text>")}else if(s==="--rule"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--rule needs a rule id: --rule <id>");(t.rules??=[]).push(a)}else if(s==="--expire")t.expire=!0;else if(s==="--role"){let a=e[++i]??"";t.roles=[...t.roles??[],...a.split(",").map(c=>c.trim()).filter(Boolean)]}else if(s==="--agent")t.agent=!0;else if(s==="--allow-code")t.allowCode=!0;else if(s==="--allow-skip")t.allowSkip=!0;else if(s==="--source"){if(t.source=e[++i],!t.source||t.source.startsWith("-"))throw new Error("--source needs a template: --source <repo>[#<member>] for workspace upgrade, or a source for ci tick and ci list: --source checks|runs")}else if(s==="--tags"){if(t.tags=e[++i],!t.tags||t.tags.startsWith("-"))throw new Error("--tags needs a tag glob: --tags 'v*'")}else if(s==="--index"){if(t.index=e[++i],!t.index||t.index.startsWith("-"))throw new Error("--index needs a value: --index <file> for workspace adopt-lineage, --index <scope key>[@<version>] for search and lifecycle diff")}else if(s==="--adopt"){if(t.adopt=e[++i],!t.adopt||t.adopt.startsWith("-"))throw new Error("--adopt needs an adoption file: --adopt <file>")}else if(s==="--adopt-out"){if(t.adoptOut=e[++i],!t.adoptOut||t.adoptOut.startsWith("-"))throw new Error("--adopt-out needs a file: --adopt-out <file>")}else if(s==="--remove")t.remove=!0;else if(s==="--available")t.available=!0;else if(s==="--root-only")t.rootOnly=!0;else if(s==="--forge-repos"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--forge-repos needs a file: --forge-repos <repos.json>");t.forgeRepos=a}else if(s==="--generated")t.generated=!0;else if(s==="--runs-on"){let a=e[++i],c=a?.indexOf("=")??-1;if(!a||c<1||c===a.length-1)throw new Error("--runs-on needs a member and the cluster resource it runs on: --runs-on <member>=<member>/<address>");t.runsOn={...t.runsOn??{},[a.slice(0,c)]:a.slice(c+1)}}else if(s==="--member"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--member needs a member or group name: --member <name>");t.members=[...t.members??[],...a.split(",").map(c=>c.trim()).filter(Boolean)]}else if(s==="--allow-same-origin")t.allowSameOrigin=!0;else if(s==="--plan")t.plan=e[++i];else if(s==="--url")t.url=e[++i];else if(s==="--op")t.op=e[++i];else if(s==="--where"){let a=e[++i];if(a===void 0||a.startsWith("--"))throw new Error("--where needs a clause: --where <field><op><value>");t.where=[...t.where??[],a]}else if(s==="--read"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--read needs a read: --read <state|plan|refresh|live-read|ownership>");t.driftRead=a}else if(s==="--stream")t.stream=!0;else if(s==="--resource"){let a=e[++i];if(!a||a.startsWith("--"))throw new Error("--resource needs an address: --resource <addr>");t.resource=a}else if(s==="--since")t.since=e[++i];else if(s==="--wait")t.ciWait=!0;else if(s==="--retries"){let a=e[++i];if(a===void 0||!/^\d+$/.test(a))throw new Error(`--retries needs a whole number of re-runs: --retries <n>, got ${JSON.stringify(a??"")}`);t.ciRetries=Number(a)}else if(s==="--timeout-minutes"){let a=e[++i],c=a===void 0?NaN:Number(a);if(a===void 0||a.trim()===""||!Number.isFinite(c)||c<=0)throw new Error(`--timeout-minutes needs a number of minutes above 0: --timeout-minutes <n>, got ${JSON.stringify(a??"")}`);t.ciTimeoutMinutes=c}else if(s==="--lane")t.lane=e[++i];else if(s==="--runner")t.quarantineRunner=e[++i];else if(s==="--junit"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--junit needs the JUnit XML file the run wrote: --junit <file>");(t.quarantineJunit??=[]).push(a)}else if(s==="--only")t.quarantineOnly=!0;else if(s==="--phase")t.phase=e[++i];else if(s==="--audit-log"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--audit-log needs the log: --audit-log aws[:<region>]");t.auditLog=a}else if(s==="--limit")t.limit=Number(e[++i]);else{if(s.startsWith("--"))throw new Error(`Unknown flag: ${s}
532
+ `),!0}var Mft,x3,SAe=x(()=>{"use strict";Qr();Mft="0.124.55";x3=64*1024});import{readFileSync as EAe}from"node:fs";import{resolve as Gft}from"node:path";async function OAe(e,t){let{pushed:n,pushWarning:r}=await fc(...t!==void 0?[{cwd:t}]:[]).catch(o=>{if(o instanceof io)return{pushed:!1,pushWarning:o.message};throw o});return n?{pushed:n,suffix:""}:la(r)?{pushed:n,suffix:` (${Fu})`}:(console.error(br({message:`The push to the remote did not land: ${r??"no reason given"}`,hint:e})),{pushed:n,suffix:" (local only \u2014 the push did not land)"})}async function PAe(e){let t=e.args.path,n=e.args.extraPositional;if(!t||t==="."||!n)return console.error(be({message:"Usage: chant approve <op> <gate>"})),1;if(e.args.expire){try{await cr()}catch(l){return console.error(be({message:`Cannot expire the gate: ${l instanceof Error?l.message:String(l)}`})),1}let s=new Date().toISOString(),a=Un((await Er(t)).pending,n);if(!a||er(a,s))return console.error(br({message:`Gate "${n}" on "${t}" has no standing pending fact \u2014 nothing to expire`})),0;await cm({op:t,gate:n,timestamp:s,expiresAt:s,...a.description?{description:a.description}:{},...a.runId?{runId:a.runId}:{},...a.gitSha?{gitSha:a.gitSha}:{}});let c=await OAe(`The expiry is recorded locally on ${cx}. Until it reaches the remote, a run in another checkout still sees the old pending fact.`);return console.error($y(`Gate "${n}" on "${t}" expired at ${s} \u2014 not approved`+c.suffix)),console.error(Fn(t===rm?"The next `chant components fan-out` decides this gate from scratch and records a fresh pending fact.":d_.test(t)?"The next `chant components pr-apply` decides this gate from scratch and records a fresh pending fact.":t===ov?`The next \`chant workspace promote ${n}\` decides this gate from scratch and records a fresh pending fact.`:t===om?`The next \`chant workspace upgrade ${n}\` decides this gate from scratch and records a fresh pending fact.`:t===im?"The next `chant workspace exit` decides this gate from scratch and records a fresh pending fact.":t===Gi?"The next `chant components promote --release` decides this gate from scratch and records a fresh pending fact.":`The next \`chant run ${t}\` decides this gate from scratch and records a fresh pending fact.`)),0}if(t===Bl){let{runOverrideApprove:s}=await Promise.resolve().then(()=>(mAe(),gAe));return s(e)}if(e.args.rules!==void 0||e.args.reason!==void 0)return console.error(be({message:`--rule and --reason override a denied plan: chant approve ${Bl} <subject> --rule <id> --reason <text>`,hint:`To approve gate "${n}" on "${t}", put any prose in --note.`})),1;if(e.args.statement){if(e.args.sign!==void 0||e.args.signature!==void 0)return console.error(be({message:"--statement prints what to sign and records nothing, so it takes neither --sign nor --signature"})),1;let s={actor:e.args.approver??e.args.actor,...e.args.plan!==void 0?{plan:e.args.plan}:{},...e.args.env!==void 0?{environment:e.args.env}:{},...e.args.relayedBy!==void 0?{relayedBy:e.args.relayedBy}:{},...e.args.at!==void 0?{at:e.args.at}:{},...e.args.binding!==void 0?{binding:e.args.binding}:{},allowSameOrigin:e.args.allowSameOrigin},a=await Uft(t,n,s);return a?(console.log(JSON.stringify(a,null,2)),console.error(Fn(`Have ${a.resolvedBy} sign these bytes (an ssh key in the ${a.namespace} namespace, or a passkey with challenge ${a.challenge}), then record it: chant approve ${t} ${n} --actor ${a.resolvedBy}`+(a.relayedBy!==null?` --relayed-by ${a.relayedBy}`:"")+(a.planDigest!==null?` --plan ${a.planDigest}`:"")+(a.environment!==null?` --env ${a.environment}`:"")+(a.binding!==null?` --binding ${qft(a.binding)}`:"")+` --at ${a.timestamp} --signature <file>`)),0):1}let r=e.args.plan,o=await Promise.resolve().then(()=>(SAe(),xAe));if(e.args.signature===void 0&&await o.interactiveApproval(e.args)){let s=await o.confirmApproval(t,n,{...r!==void 0?{plan:r}:{},...e.args.env!==void 0?{environment:e.args.env}:{}});if(s.status==="refused")return s.code;s.status==="confirmed"&&(r=s.plan)}let i=await R3(t,n,{actor:e.args.approver??e.args.actor,note:e.args.note,url:e.args.url,plan:r,...e.args.env!==void 0?{environment:e.args.env}:{},allowSameOrigin:e.args.allowSameOrigin,...e.args.roles?{roles:e.args.roles}:{},...e.args.agent?{agent:!0}:{},...e.args.sign!==void 0?{sign:e.args.sign}:{},...e.args.signature!==void 0?{signature:e.args.signature}:{},...e.args.at!==void 0?{at:e.args.at}:{},...e.args.binding!==void 0?{binding:e.args.binding}:{},...e.args.relayedBy!==void 0?{relayedBy:e.args.relayedBy}:{}});if(!i.ok)return 1;if(e.args.resumeRun||e.args.resume!==void 0){let{resumeAfterApproval:s}=await Promise.resolve().then(()=>(mT(),_9));return s(t,n,i.record.environment,i.pushed)}return console.error(Fn("This records the resolution as a fact; it does not itself re-run anything. "+(t===rm?`Repeat the \`chant components fan-out\` command and it walks through gate "${n}".`:d_.test(t)?`The pull request's apply (\`chant components pr-apply\`) walks through gate "${n}" when it plans this same digest.`:t===ov?`Repeat \`chant workspace promote ${n}\`, and it applies the patch this approval names.`:t===om?`Repeat \`chant workspace upgrade ${n}\` with the same target, and it applies the patch this approval names.`:t===im?"Repeat `chant workspace exit` with the same members, and it applies the patch this approval names.":t===Gi?`Repeat the same \`chant components promote --release\`, and it walks through gate "${n}" when it plans this same change set for this release.`:`Run \`chant run ${t}\` and it walks through gate "${n}".`))),0}async function Bft(e,t,n,r){let{readRelease:o,readCuts:i,labelsByDigest:s}=await Promise.resolve().then(()=>(Oc(),zm)),{readRevokedCommits:a,revocationOf:c,revokedRefusal:l}=await Promise.resolve().then(()=>(FI(),f5)),d=await o(n,{cwd:r}).catch(()=>null);if(!d)return console.error(be({message:`Gate "${t}" on "${e}" binds release ${n}, which can't be read from ${cx}, so whether it is revoked is unknown [release-unreadable]`,hint:`Fetch the ledger branch (git fetch origin ${cx}:${cx}) and approve again from the member's directory.`})),!0;let u;try{u=await a(r)}catch(g){return console.error(be({message:`Gate "${t}" on "${e}" binds release ${n}, and the ci tags can't be judged: ${g instanceof Error?g.message:String(g)} [declaration-invalid]`,hint:"Fix ci.green in chant.workspace.json at base; chant workspace check names the problem."})),!0}let p=c(d,u);if(!p)return!1;let f=s((await i({cwd:r}).catch(()=>({cuts:[]}))).cuts).get(n)??null;return console.error(be(l({releaseDigest:n,label:f},p,`Clear the pending gate with \`chant approve ${e} ${t} --expire\`, then promote a release cut from a green commit: \`chant ci last-green\` names the newest, and \`chant release list\` marks the revoked releases.`))),!0}async function R3(e,t,n){let r=await AAe(e,t,n,!1);return"statement"in r?{ok:!1}:r}async function Uft(e,t,n){let r=await AAe(e,t,n,!0);return"statement"in r?r.statement:null}async function AAe(e,t,n,r){if(!r&&Wr())return console.error(be({message:`Cannot record the approval of "${t}": ${Mi} is set, so nothing is written to chant/lifecycle`,hint:`Unset ${Mi} to approve the gate.`})),{ok:!1};let o=n.cwd??process.cwd(),i=n.cwd!==void 0?[{cwd:n.cwd}]:[],{ops:s}=await vd(...i),a=Pke([...s.values()].map(U=>U.config),e,t);!a&&!s.has(e)&&e!==rm&&e!==om&&e!==im&&e!==ov&&e!==Bl&&e!==Gi&&console.error(br({message:`Op "${e}" was not found among discovered *.op.ts declarations \u2014 recording the resolution anyway`}));try{await cr(...i)}catch(U){return console.error(be({message:`Cannot record the approval: ${U instanceof Error?U.message:String(U)}`,hint:"The pending fact this answers lives on that branch; appending without it would drop it."})),{ok:!1}}if(a){let U=Un((await Er(a.op,...i)).pending,a.gate);if(U&&!er(U,new Date().toISOString()))return console.error(be({message:`Gate "${t}" on "${e}" is now gate "${a.gate}" on "${a.op}", which lists it as an alias, and "${a.gate}" has a standing pending fact`,hint:`Approve that gate instead: chant approve ${a.op} ${a.gate}`})),{ok:!1};console.error(Fn(`Gate "${t}" on "${e}" is an alias of gate "${a.gate}" on "${a.op}": the next run of ${a.op} counts this approval there while the pending fact it answers stands and the plan is the same.`))}let c=n.url??Hl();if(c&&!CP(c))return console.error(be({message:`--url must be an absolute http/https URL (got "${c}")`,hint:"Pass the PR/MR link, or omit --url and put prose in --note."})),{ok:!1};let l=await Er(e,...i),d=U=>U.some(X=>X.gate===t&&X.environment!==void 0)&&n.environment!==void 0?U.filter(X=>X.environment===n.environment):U,u=Un(d(l.pending),t),p=u?.environment,f;if(n.plan!==void 0){if(!DE(n.plan))return console.error(be({message:`--plan must be a plan digest ("jcs1-sha256:" or "sha256:", then 64 hex characters), got "${n.plan}"`,hint:"Copy it from the gated run's `plan :` line, or from the pending-gate summary. It is not a plan file path."})),{ok:!1};f=n.plan}else{if(!u)return console.error(be({message:n.environment!==void 0&&l.pending.some(U=>U.gate===t&&U.environment!==void 0)?`Gate "${t}" on "${e}" has no pending fact in environment "${n.environment}", so there is no plan to approve`:`Gate "${t}" on "${e}" has no pending fact, so there is no plan to approve`,hint:`Run \`chant run ${e}\` first \u2014 it plans, stops at the gate, and records the plan this approval would be for. To approve a plan you already have the digest for, pass \`--plan <digest>\`.`})),{ok:!1};f=u.planDigest}let g=u?.checkpointDigest!==void 0&&Ke(f,u.planDigest)?u.checkpointDigest:void 0,m=u?.releaseDigest!==void 0&&Ke(f,u.planDigest)?u.releaseDigest:void 0,h=u?.changeSet!==void 0&&Ke(f,u.planDigest)?u.changeSet:void 0;if(u?.releaseDigest!==void 0&&await Bft(e,t,u.releaseDigest,o))return{ok:!1};let y=n.origin??pa(),b=await Er(e,...i),v=Un(d(b.pending),t);if(Lo(y)&&(v?.neverOverMcp||s.get(e)?.config.neverOverMcp))return console.error(be({message:`Gate "${t}" on "${e}" is never resolved over ${y==="acp"?"ACP":"MCP"}`,hint:`Approvals belong to people: \`chant approve ${e} ${t}\` at a shell.`})),{ok:!1};if(v?.answer)return console.error(be({message:`Gate "${t}" on "${e}" asks decision point ${v.answer.point}, so its answer passes the gate, not an approval`,hint:`Answer the question: \`chant workspace points answer ${v.answer.id} --answer <value> --by <name>\`, then run \`chant run ${e}\` again.`})),{ok:!1};let k=mU(v?.origin,y);if(k&&!n.allowSameOrigin)return console.error(be({message:`Gate "${t}" on "${e}" cannot be resolved from here: ${k}`,hint:`Approve it from a channel the run did not come from \u2014 \`chant approve ${e} ${t}\` at a shell is the usual one. If resolving from the same channel genuinely is the intent, pass --allow-same-origin, which records that it was deliberate.`})),{ok:!1};let $=n.relayedBy?.trim();if(n.relayedBy!==void 0&&(!$||/[\r\n]/.test($)))return console.error(be({message:`--relayed-by needs one principal on one line (got ${JSON.stringify(n.relayedBy)})`,hint:"Name who relayed the approval, such as --relayed-by github:<login> or a principal the signers file lists."})),{ok:!1};let O=n.actor??(Lo(y)?sv:XA()),E={kind:n.agent||Lo(y)?"agent":"human",...n.roles&&n.roles.length>0?{roles:[...new Set(n.roles)]}:{}},P=await Promise.resolve().then(()=>(ep(),w2)),{scopeSource:T}=await Promise.resolve().then(()=>(Uo(),Nv)),S=T(o);try{P.refuseUnidentified(S,[O],n.actor!==void 0?"--actor":"the approver"),$&&P.refuseUnidentified(S,[$],"--relayed-by")}catch(U){if(!(U instanceof P.IdentityError))throw U;return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U.message}`,hint:"Pass --actor <forge identity or signer>, as the surface that signed the person in maps them, for example --actor github:<login>."})),{ok:!1}}let C=(U,Z)=>(console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U}`,...Z?{hint:Z}:{}})),{ok:!1});if(n.signature!==void 0&&n.sign!==void 0)return C("--sign signs here and --signature brings a signature made elsewhere; pass one of them");if(n.at!==void 0&&!r&&n.signature===void 0)return C("--at sets the time of a statement signed elsewhere, so it goes with --statement or --signature");if(n.signature!==void 0&&n.at===void 0)return C("--signature needs --at <timestamp>, the statement's time, since the signature covers it",`Pass the timestamp \`chant approve ${e} ${t} --statement\` printed.`);if(n.binding!==void 0){if(!r&&n.signature===void 0&&n.sign===void 0)return C("--binding is a line the approver's signature covers, so it goes with --statement, --signature or --sign");let U=aAe(n.binding);if(U!==null)return C(`--binding takes one line of printable text, and ${U}`)}let F=new Date().toISOString();if(n.at!==void 0){let U=Date.parse(n.at);if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(n.at)||Number.isNaN(U)||new Date(U).toISOString()!==n.at)return C(`--at takes a UTC time as chant writes one, such as ${F}, not ${JSON.stringify(n.at)}`);if(U>Date.now()+Hft)return C(`--at ${n.at} is in the future`);if(u&&n.at<u.timestamp)return C(`--at ${n.at} is before the pending fact it answers (${u.timestamp}), and a run counts only approvals newer than that`,`Take a fresh statement: chant approve ${e} ${t} --statement.`);F=n.at}let L={op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{}};if(r){let{CHANT_VERSION:U}=await Promise.resolve().then(()=>(qA(),qce));return{statement:cAe(L,U)}}let A=P.gateAdmissionFrom(S,t);if(A&&n.sign===void 0&&n.signature===void 0)return console.error(be({message:`Gate "${t}" needs a signed approval: chant.workspace.json at base names it in identity.gates`+(A.requirement.class!==null?`, from the class ${A.requirement.class}`:"")+", and this approval is not signed",hint:`chant approve ${e} ${t} --actor <principal> --sign [<key file>], with a key ${S.policy.signersPath} at base lists for that principal, or --signature <file> --at <timestamp> with a signature made elsewhere over the statement --statement prints.`})),{ok:!1};let _;if(n.signature!==void 0){let U=zft(n.signature,L,S.policy,o);if("refused"in U)return C(U.refused);_=U.seal}if(n.sign!==void 0){let{resolveSigningKey:U,sealGateApproval:Z,gateSealVersion:X,SealError:se}=await Promise.resolve().then(()=>(Rh(),kh));try{let Ce=U(n.sign,o);try{let le=X(L);_={...Z(Ce.file,L),...le!==1?{version:le}:{}}}finally{Ce.cleanup()}}catch(Ce){if(!(Ce instanceof se))throw Ce;return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${Ce.message}`})),{ok:!1}}}if(A){let U=A.refuses({op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},seal:_});if(U!==null)return console.error(be({message:`Gate "${t}" on "${e}" was not approved: ${U}`,hint:`identity.gates.${t} in chant.workspace.json at base counts only an approval signed by a key ${S.policy.signersPath} lists for the approver`+(A.requirement.class!==null?`, who holds the role of the class ${A.requirement.class}`:"")+"."})),{ok:!1}}let N=v?.approval,V=Ni({signers:S.policy,roles:S.policy.roles}),J=V({version:1,op:e,gate:t,...p!==void 0?{environment:p}:{},...f!==void 0?{planDigest:f}:{},resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},..._?{seal:_}:{}}).roles,M;if(N?.policy)try{let Z=await(n.evaluator??await BB(N.policy.lexicon)).evaluateGatePolicy(N.policy,UB({op:e,gate:t,resolvedBy:O,approver:E,roles:J,...f!==void 0?{planDigest:f}:{},...N.context?{context:N.context}:{}}));M={policy:N.policy.name,version:N.policy.version,mode:N.mode,contextDigest:Vb(N.context),decision:Z.decision,determining:Z.determining,errors:Z.errors}}catch(U){return console.error(be({message:`Gate "${t}" on "${e}" declares policy "${N.policy.name}", which could not be evaluated: ${U instanceof Error?U.message:String(U)}`,hint:`Install the ${N.policy.lexicon} lexicon in this project, or approve from a checkout that has it.`})),{ok:!1}}let{record:z}=await dv({op:e,gate:t,resolvedBy:O,...$?{relayedBy:$}:{},timestamp:F,..._?{seal:_}:{},approver:E,...M?{policyDecision:M}:{},...n.note?{note:n.note}:{},...c?{url:c}:{},...f!==void 0?{planDigest:f}:{},...g!==void 0?{checkpointDigest:g}:{},...n.binding!==void 0?{binding:n.binding}:{},...p!==void 0?{environment:p}:{},...m!==void 0?{releaseDigest:m}:{},...h!==void 0?{changeSet:h}:{},...u?.gitSha?{gitSha:u.gitSha}:{},...u?.runId?{runId:u.runId}:{},origin:y,...k&&n.allowSameOrigin?{sameOriginOverride:!0}:{}},...i),G=await OAe(`The resolution is recorded locally on ${cx}. Until it reaches the remote, a run in another checkout will not see it.`,n.cwd);console.error($y(`Gate "${t}" on "${e}" resolved by ${z.resolvedBy}`+(z.relayedBy?`, relayed by ${z.relayedBy},`:"")+` at ${z.timestamp}`+(z.url?` (${z.url})`:"")+(z.seal?`, signed with ${z.seal.kind===ea?"passkey ":""}${z.seal.key}`:"")+G.suffix)),z.binding!==void 0&&console.error(Fn(`The signature also binds ${JSON.stringify(z.binding)} (--binding).`)),z.planDigest&&console.error(Fn(`This approves the plan ${z.planDigest}`+(z.environment!==void 0?` in environment "${z.environment}"`:"")+(z.releaseDigest!==void 0?` for release ${z.releaseDigest}`:"")+", and only that plan. A run whose fresh plan differs refuses rather than applying it.")),z.checkpointDigest&&console.error(Fn(`The next run resumes at this gate from run ${u?.runId??"(unknown)"}'s checkpoint ${z.checkpointDigest}, after it plans again. A moved plan or another commit starts it at the first phase.`));let B=(E.roles??[]).filter(U=>!J.includes(U));if(B.length>0&&console.error(Fn(`--role ${B.join(", ")} is recorded on the approval and trusted by nothing: a gate's quorum and policy read ${z.resolvedBy}'s roles from .chant/trust.json at base, and only for an approval sealed by a signer listed at base (chant approve --sign).`)),N)for(let U of Vft(N,z,b.resolutions,v,b.pending,V))console.error(Fn(U));return{ok:!0,record:z,pushed:G.pushed}}function zft(e,t,n,r){let o;try{o=e==="-"?EAe(0,"utf-8"):EAe(Gft(r,e),"utf-8")}catch(l){return{refused:`--signature ${e} can't be read: ${l instanceof Error?l.message:String(l)}`}}let i=lAe(o);if("problem"in i)return{refused:`--signature ${e}: ${i.problem}`};let s=i.kind==="ssh"?{signer:t.resolvedBy,key:"",signature:i.signature}:{kind:ea,signer:t.resolvedBy,key:i.assertion.id,signature:i.assertion.signature,clientDataJSON:i.assertion.clientDataJSON,authenticatorData:i.assertion.authenticatorData},a=ta(n,t.resolvedBy,s,to(t));if(!a.ok)return{refused:a.unlisted?`${t.resolvedBy} has no ${i.kind==="ssh"?`key in ${n.signersPath}`:"passkey in .chant/trust.json"} at base, so a signature made elsewhere can't be checked`:`the ${i.kind==="ssh"?"ssh signature":"passkey's assertion"} does not verify for ${t.resolvedBy} over this approval's statement: ${a.reason}`};let c=xl(t);return{seal:{...s,key:a.key,...c!==1?{version:c}:{}}}}function qft(e){return/^[\w@%+=:,./-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}function Vft(e,t,n,r,o=r?[r]:[],i=cc){let s=[],a=t.policyDecision;if(a){let p=a.determining.length>0?` (${a.determining.join(", ")})`:"",f=e.mode==="enforce"?a.decision==="allow"?"In enforce mode this permit passes the gate on its own.":"In enforce mode only a permit passes the gate on its own, so this approval counts only toward the quorum.":"The gate is in log-only mode, so the decision is recorded and does not change the outcome.";s.push(`Policy "${a.policy}" ${a.version}: ${a.decision}${p}. ${f}`);for(let g of a.errors)s.push(`Policy evaluation error: ${g}`)}let c=r?.timestamp??new Date(0).toISOString(),l=r&&Ke(r.planDigest,t.planDigest)?sd(o,r):c,d=id([...n,t],t.gate,c,t.planDigest,e,l,i),u=d.counted.map(p=>p.resolvedBy).join(", ")||"none yet";if(Array.isArray(e.quorum))for(let p of d.rules??[])s.push(`Quorum: ${jl(p)}.`);else{let p=Ti(e.quorum)[0],f=p?.roles?` with role ${p.roles.join(" or ")}`:"";s.push(`Quorum: ${d.counted.length} of ${d.need} human approval(s)${f} for this plan (${u}).`)}if(!d.counted.includes(t)){let p=Ti(e.quorum).flatMap(f=>f.roles??[]);s.push(Im(t).kind==="agent"?"An agent's approval does not count toward the quorum.":i(t).proven?`This approval does not count toward the quorum: .chant/trust.json at base gives ${t.resolvedBy} none of its roles (${[...new Set(p)].join(", ")}).`:"This approval does not count toward the quorum: its roles are read from .chant/trust.json at base, and only for an approval sealed by a signer listed at base (chant approve --sign).")}return s}var cx,Hft,$3=x(()=>{"use strict";xa();rI();Ul();Or();Nt();qg();lo();ii();so();Bk();tt();Jg();da();ys();dAe();ir();PH();cx="chant/lifecycle";Hft=300*1e3});VT();var S3=new Set(["--help","--open","--note-commands","--check-job","--ref-gate-status","--locks","--reach","--version","--agents","--agent","--all-projects","--all","--force","--fix","--watch","--verbose","--live","--overlay","--explain","--owned","--verbatim","--skip-undeclarable","--apply-rewrites","--write","--strict","--validate","--use-composites","--composites","--stacks","--components","--pr-build","--pr-env","--up","--down","--include-dependents","--cross-root","--local","--json","--progress-json","--events-json","--follow","--update-snapshot","--update-baseline","--run-examples","--check","--bump","--no-release-record","--deploy-unchanged","--plan-only","--continue","--no-record","--fold","--no-fold","--no-cache","--discover","--no-build","--sandbox","--yes","--confirm-prod","--once","--rerun-failed","--setup-key","--trust","--unsigned","--in-place","--require-runner-start","--require-clouds","--no-push","--no-forks","--list","--no-require-review","--expire","--check-live","--stream","--check-snapshot","--fail-on-drift","--durable-requests","--skip-mcp","--read-only","--mcp-read-only","--propose","--current","--uncommitted","--allow-code","--allow-skip","--allow-unsigned","--override-green","--require-provenance","--root-only","--generated","--decide","--policy-only","--render-spec","--record-plans","--approval-status","--waves-outcome","--loopback","--artifacts","--push","--only","--reset"]);function E3(e){e=e.slice();let t={command:"",path:".",extraPositional:void 0,extraPositional2:void 0,output:void 0,format:"",force:void 0,fix:!1,lexicon:void 0,template:void 0,watch:!1,verbose:!1,help:!1,param:void 0,paramsFile:void 0,report:void 0,local:void 0,profile:void 0,json:void 0,live:!1,migrateFrom:void 0,migrateTo:void 0,emit:void 0,strict:!1,validate:!1,useComposites:!1,reportFile:void 0,skill:void 0,skipMcp:void 0,readOnly:void 0,mcpReadOnly:void 0,propose:void 0,src:void 0,env:void 0},n=e.indexOf("--");e=n<0?qT(e,S3):[...qT(e.slice(0,n),S3),...e.slice(n)];let r=!1,o=s=>{t.command&&(t.positionals??=[]).push(s),t.command?t.path==="."?(t.path=s,t.pathGiven=!0):t.extraPositional?t.extraPositional2=s:t.extraPositional=s:t.command=s},i=0;for(;i<e.length;){let s=e[i];if(r)o(s);else if(s==="--")r=!0;else if(s==="--help"||s==="-h")t.help=!0;else if(s==="--version"||s==="-V")t.version=!0;else if(s==="--output"||s==="-o")t.output=e[++i];else if(s==="--format"||s==="-f")t.format=e[++i];else if(s==="--lexicon"||s==="-d")t.lexicon=e[++i];else if(s==="--template"||s==="-t")t.template=e[++i];else if(s==="--force")t.force=!0;else if(s==="--fix")t.fix=!0;else if(s==="--watch"||s==="-w")t.watch=!0;else if(s==="--verbose"||s==="-v")t.verbose=!0;else if(s==="--profile"||s==="-p")t.profile=e[++i];else if(s==="--report"){let a=e[i+1];a&&!a.startsWith("-")?(t.reportFile=a,i++):t.report=!0}else if(s==="--live")t.live=!0;else if(s==="--overlay")t.overlay=!0;else if(s==="--between"){if(t.betweenA=e[++i],t.betweenB=e[++i],!t.betweenA||!t.betweenB)throw new Error("--between needs two snapshot refs: --between <refA> <refB>")}else if(s==="--traffic"){let a=e[++i];if(!a)throw new Error('--traffic needs a level, passed to the engine verbatim: --traffic "100 rps, p50"');t.traffic=a}else if(s==="--overlay-anchor"){let a=e[++i];if(a!=="source"&&a!=="live")throw new Error(`--overlay-anchor must be 'source' or 'live', got '${a}'`);t.overlayAnchor=a}else if(s==="--scan"){let a=e[++i];if(a===void 0||a==="--"||a.startsWith("--"))throw new Error("--scan needs a directory: --scan <dir>");(t.scanDirs??=[]).push(a)}else if(s==="--reset")t.reset=!0;else if(s==="--chant-version"){let a=e[++i];if(!a||!/^\d+\.\d+\.\d+$/.test(a))throw new Error("--chant-version needs a chant version: --chant-version 0.124.84");t.chantVersion=a}else if(s==="--with"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--with needs a chant package name: --with @intentius/chant-lexicon-<name>");(t.withPackages??=[]).push(a)}else if(s==="--from")t.migrateFrom=e[++i];else if(s==="--kustomize")t.kustomize=e[++i];else if(s==="--parser-option"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--parser-option needs key or key=value: --parser-option acceptLossyV1");(t.parserOption??=[]).push(a)}else if(s==="--tag"){let a=e[++i];if(!a||a.startsWith("-")||!a.includes("="))throw new Error("--tag needs key=value: --tag team=payments");(t.selectTags??=[]).push(a)}else if(s==="--type")t.selectType=e[++i];else if(s==="--name")t.selectName=e[++i];else if(s==="--owned")t.owned=!0;else if(s==="--namespace"){if(t.namespace=e[++i],!t.namespace||t.namespace.startsWith("-"))throw new Error("--namespace needs a namespace: --namespace <ns>")}else if(s==="--verbatim")t.verbatim=!0;else if(s==="--skip-undeclarable")t.skipUndeclarable=!0;else if(s==="--state")t.statePath=e[++i],t.statePath!==void 0&&(t.statePaths??=[]).push(t.statePath);else if(s==="--state-dir"){if(t.stateDir=e[++i],!t.stateDir||t.stateDir.startsWith("-"))throw new Error("--state-dir needs a directory: --state-dir <dir>")}else if(s==="--wave-size"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--wave-size needs a whole number from 1: got "${a??""}"`);t.waveSize=c}else if(s==="--all")t.all=!0;else if(s==="--select")t.selectAddress=e[++i];else if(s==="--live-name")t.liveName=e[++i];else if(s==="--apply-rewrites")t.applyRewrites=!0;else if(s==="--stack")t.carveStack=e[++i];else if(s==="--write")t.write=!0;else if(s==="--write-source")t.writeSource=!0;else if(s==="--to")t.migrateTo=e[++i];else if(s==="--emit")t.emit=e[++i];else if(s==="--dry-run")t.dryRun=!0;else if(s==="--drill")t.drill=!0;else if(s==="--yes")t.yes=!0;else if(s==="--push")t.push=!0;else if(s==="--confirm-prod")t.confirmProd=!0;else if(s==="--strict")t.strict=!0;else if(s==="--validate")t.validate=!0;else if(s==="--use-composites")t.useComposites=!0;else if(s==="--skill")t.skill=e[++i];else if(s==="--skip-mcp")t.skipMcp=!0;else if(s==="--read-only")t.readOnly=!0;else if(s==="--mcp-read-only")t.mcpReadOnly=!0;else if(s==="--propose")t.propose=!0;else if(s==="--src")t.src=e[++i];else if(s==="--env")t.env=e[++i];else if(s==="--port"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--port needs a port: --port <container-port>=<host-port>");(t.port??=[]).push(a)}else if(s==="--image"){if(t.image=e[++i],!t.image||t.image.startsWith("-"))throw new Error("--image needs an image reference: --image <name>:<tag>");(t.images??=[]).push(t.image)}else if(s==="--network"){if(t.network=e[++i],!t.network||t.network.startsWith("-"))throw new Error("--network needs a Docker network name: --network <name>")}else if(s==="--setting"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--setting needs a value: --setting <KEY>=<VALUE>");(t.setting??=[]).push(a)}else if(s==="--loopback")t.loopback=!0;else if(s==="--promote-to"){if(t.promoteTo=e[++i],!t.promoteTo||t.promoteTo.startsWith("-"))throw new Error("--promote-to needs an environment: --promote-to <env>")}else if(s==="--tier")t.tier=e[++i];else if(s==="--agents")t.agents=!0;else if(s==="--scope")t.scope=e[++i];else if(s==="--all-projects")t.allProjects=!0;else if(s==="--runtime")t.runtime=e[++i];else if(s==="--fail-on")t.failOn=e[++i];else if(s==="--preset"){if(t.preset=e[++i],!t.preset||t.preset.startsWith("-"))throw new Error("--preset needs a name: --preset pull-request")}else if(s==="--baseline"){if(t.baseline=e[++i],!t.baseline||t.baseline.startsWith("-"))throw new Error("--baseline needs a file: --baseline <report.json>")}else if(s==="--max-files")t.maxFiles=Number(e[++i]);else if(s==="--theme")t.theme=e[++i];else if(s==="--stacks")t.stacks=!0;else if(s==="--components")t.components=!0;else if(s==="--generate")t.generate=e[++i];else if(s==="--spec")t.opsSpec=e[++i];else if(s==="--dump-outputs")t.dumpOutputs=e[++i];else if(s==="--digest-file")t.digestFile=e[++i];else if(s==="--seed-outputs")(t.seedOutputs??=[]).push(e[++i]);else if(s==="--keep")t.keepLocks=!0;else if(s==="--reach")t.lockReach=!0;else if(s==="--runs"||s==="--plans"||s==="--wave-outputs"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a file`);t[{"--runs":"runsFile","--plans":"plansFile","--wave-outputs":"waveOutputs"}[s]]=a}else if(s==="--detail")t.detail=Number(e[++i]);else if(s==="--lens")t.lens=e[++i];else if(s==="--explain")t.explain=!0;else if(s==="--show")t.show=e[++i];else if(s==="--count-by"){if(t.countBy=e[++i],!t.countBy||t.countBy.startsWith("-"))throw new Error("--count-by needs a grouping: --count-by kind, --count-by module or --count-by attr:<name>")}else if(s==="--up")t.up=!0;else if(s==="--down")t.down=!0;else if(s==="--node-sizes")t.nodeSizes=e[++i];else if(s==="--layout-engine")t.layoutEngine=e[++i];else if(s==="--base")t.base=e[++i];else if(s==="--head")t.head=e[++i];else if(s==="--include-dependents")t.includeDependents=!0;else if(s==="--cross-root")t.crossRoot=!0;else if(s==="--dependents-of"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--dependents-of needs a member name: --dependents-of <member>");t.dependentsOf=a}else if(s==="--pin"){let a=e[++i];if(!a||a.startsWith("-")||!a.includes("="))throw new Error("--pin needs a member and a release: --pin <member>=<label|digest>");(t.pins??=[]).push(a)}else if(s==="--from-affected")t.fromAffected=e[++i];else if(s==="--gate")t.gate=e[++i];else if(s==="--wave-gate"){if(t.waveGate=e[++i],!t.waveGate||t.waveGate.startsWith("-"))throw new Error("--wave-gate needs a gate name: --wave-gate <name>")}else if(s==="--wave"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--wave needs a wave number from 1: got "${a??""}"`);t.wave=c}else if(s==="--decide")t.decide=!0;else if(s==="--policy-only")t.policyOnly=!0;else if(s==="--render-spec")t.renderSpec=!0;else if(s==="--record-plans")t.recordPlans=!0;else if(s==="--approval-status")t.approvalStatus=!0;else if(s==="--waves-outcome")t.wavesOutcome=!0;else if(s==="--apply-status"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--apply-status needs the status's name: --apply-status <context>");t.applyStatus=a}else if(s==="--of"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--of needs the number of waves: got "${a??""}"`);t.of=c}else if(s==="--group"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--group needs a job group's name: --group <name>");t.group=a}else if(s==="--share"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--share needs a share number from 1: got "${a??""}"`);t.share=c}else if(s==="--target"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--target needs an address: --target <component>:<address>, or on pr-plan --target <address>");(t.targets??=[]).push(a)}else if(s==="--refresh")t.refresh=!0;else if(s==="--target-dependents")t.targetDependents=!0;else if(s==="--comment-targets")t.commentTargets=!0;else if(s==="--parallelism"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--parallelism needs a whole number of 1 or more: got "${a??""}"`);t.parallelism=c}else if(s==="--canary"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--canary needs a component name: --canary <name>[,<name>...]");(t.canary??=[]).push(...a.split(",").map(c=>c.trim()).filter(Boolean))}else if(s==="--pr"){let a=e[++i],c=Number(a);if(!Number.isInteger(c)||c<1)throw new Error(`--pr needs a pull or merge request number: got "${a??""}"`);t.pr=c,(t.prs??=[]).push(c)}else if(s==="--channel"){if(t.channel=e[++i],!t.channel||!/^[A-Za-z][A-Za-z0-9._-]*$/.test(t.channel))throw new Error(`--channel needs a channel name, such as next or hotfix: got "${t.channel??""}"`)}else if(s==="--forge"){if(t.forge=e[++i],!t.forge||t.forge.startsWith("-"))throw new Error("--forge needs a forge: --forge github|gitlab|forgejo")}else if(s==="--require-clouds")t.requireClouds=!0;else if(s==="--require-review")t.requireReview=!0;else if(s==="--list")t.list=!0;else if(s==="--stage"){if(t.lockStage=e[++i],!t.lockStage||t.lockStage.startsWith("-"))throw new Error("--stage needs plan, apply or lock: --stage <stage>")}else if(s==="--alive"){if(t.aliveRun=e[++i],!t.aliveRun||t.aliveRun.startsWith("-"))throw new Error("--alive needs a run id: --alive <run>")}else if(s==="--beat"){if(t.beatRun=e[++i],!t.beatRun||t.beatRun.startsWith("-"))throw new Error("--beat needs a run id: --beat <run> --parent <pid>")}else if(s==="--parent"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--parent needs a process id: --parent <pid>");t.parentPid=a}else if(s==="--run"){if(t.unlockRun=e[++i],!t.unlockRun||t.unlockRun.startsWith("-"))throw new Error("--run needs a run id: --run <id>")}else if(s==="--from-report"){if(t.fromReport=e[++i],!t.fromReport||t.fromReport.startsWith("-"))throw new Error("--from-report needs a report file: --from-report <pr-plan.json>")}else if(s==="--from-job"||s==="--claims"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(s==="--from-job"?"--from-job needs the job's name: --from-job <job>":"--claims needs a directory: --claims <dir>");s==="--from-job"?t.fromJob=a:t.claims=a}else if(s==="--report-url"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--report-url needs a URL: --report-url s3://<bucket>/<prefix>, gs://<bucket>/<prefix>, az://<account>/<container>/<prefix> or file://<directory>");t.reportUrl=a}else if(s==="--result"){if(t.planResult=e[++i],!t.planResult||t.planResult.startsWith("-"))throw new Error("--result needs the plan job's result: --result success|failure|cancelled")}else if(s==="--no-forks")t.noForks=!0;else if(s==="--no-status")t.noStatus=!0;else if(s==="--status-url"){if(t.statusUrl=e[++i],!t.statusUrl||t.statusUrl.startsWith("-"))throw new Error("--status-url needs a URL template: --status-url https://host/reports/{key}")}else if(s==="--override-green")t.overrideGreen=!0;else if(s==="--allow-unsigned")t.allowUnsigned=!0;else if(s==="--require-provenance")t.requireProvenance=!0;else if(s==="--pr-loop")t.prLoop=!0;else if(s==="--green")t.green=!0;else if(s==="--before-merge")t.beforeMerge=!0;else if(s==="--requires"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--requires needs a list of checks: --requires approved,mergeable,undiverged,checks");t.requires=a.split(",").map(c=>c.trim()).filter(Boolean)}else if(s==="--respond"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--respond needs a list of responses: --respond wave-refused=diff,apply-failed=off,description=check");t.respond=[...t.respond??[],a]}else if(s==="--decide-backend"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--decide-backend needs the name of a decide.backends entry");t.decideBackend=a}else if(s==="--decide-model"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--decide-model needs a model id");t.decideModel=a}else if(s==="--merge"||s==="--merge-token-env"||s==="--merge-method"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value: --merge manual|auto, --merge-token-env <VAR>, --merge-method merge|squash|rebase`);s==="--merge"?t.merge=a:s==="--merge-token-env"?t.mergeTokenEnv=a:t.mergeMethod=a}else if(s==="--apply-before-merge")t.applyBeforeMerge=!0;else if(s==="--apply-on-merge")t.applyOnMerge=!0;else if(s==="--action-job")t.actionJob=!0;else if(s==="--preview-comment")t.previewComment=!0;else if(s==="--pr-env")t.prEnv=!0;else if(s==="--pr-runner"){let a=e[++i]??"",c=/^(plan|apply|default)=(.+)$/.exec(a);if(!c)throw new Error(`--pr-runner needs <stage>=<label>[,<label>...], the stage plan, apply or default: got "${a}"`);let l=c[2].split(",").map(d=>d.trim()).filter(Boolean);if(l.length===0)throw new Error(`--pr-runner ${c[1]} names no label`);(t.prRunners??={})[c[1]]=l}else if(s==="--pr-variable"||s==="--pr-secret"){let a=e[++i]??"",c=a.indexOf("=");if(c<1)throw new Error(`${s} needs <NAME>=<${s==="--pr-secret"?"secret":"value"}>: got "${a}"`);let l=s==="--pr-secret"?t.prSecrets??={}:t.prVariables??={};l[a.slice(0,c)]=a.slice(c+1)}else if(s==="--pr-build")t.prBuild=!0;else if(s==="--build-command"){let a=e[++i];if(a===void 0||a==="")throw new Error("--build-command needs a shell line: --build-command '<line>'");t.ciBuildCommand=a}else if(s==="--land")t.ciLand=!0;else if(s==="--pr-build-command"){let a=e[++i];if(a===void 0||a==="")throw new Error("--pr-build-command needs a shell line: --pr-build-command '<line>'");t.prBuildCommand=a}else if(s==="--before-script"){let a=e[++i];if(a===void 0||a==="")throw new Error("--before-script needs a shell line: --before-script '<line>'");(t.beforeScript??=[]).push(a)}else if(s==="--resume"){let a=e[i+1];a===void 0||a.startsWith("-")?t.resumeRun=!0:t.resume=e[++i]}else if(s==="--local")t.local=!0;else if(s==="--json")t.json=!0;else if(s==="--progress-json")t.progressJson=!0;else if(s==="--events-json")t.eventsJson=!0;else if(s==="--follow")t.follow=!0;else if(s==="--gated-exit")t.gatedExit=Number(e[++i]);else if(s==="--durable-requests")t.durableRequests=!0;else if(s==="--update-snapshot")t.updateSnapshot=!0;else if(s==="--update-baseline")t.updateBaseline=!0;else if(s==="--deep")t.deep=!0;else if(s==="--at")t.at=e[++i];else if(s==="--capability-view")t.capabilityView=!0;else if(s==="--capabilities")t.capabilities=!0;else if(s==="--snapshot"){if(t.snapshot=e[++i],!t.snapshot||t.snapshot.startsWith("-"))throw new Error("--snapshot needs a snapshot ref: --snapshot latest")}else if(s==="--kind"){if(t.kind=e[++i],!t.kind||t.kind.startsWith("-"))throw new Error("--kind needs a kind file: --kind <path>");(t.kinds??=[]).push(t.kind)}else if(s==="--composites")t.composites=!0;else if(s==="--intent"){let a=e[i+1];if(a!==void 0&&!a.startsWith("-"))t.intent=e[++i];else if(e.includes("--record"))t.intent="";else throw new Error("--intent needs a region: --intent <path[:start-end]|path#symbol|member/node|sha>, or --intent --record <id>")}else if(s==="--follow-squash")t.followSquash=!0;else if(s==="--bump-member"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--bump-member needs a member and a level: --bump-member <member>=major|minor|patch");(t.bumpMember??=[]).push(a)}else if(s==="--forge-issues")t.forgeIssues=!0;else if(s==="--record"){if(t.record=e[++i],!t.record||t.record.startsWith("-"))throw new Error("--record needs a record id: --record <id>")}else if(s==="--path"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--path needs a path: --path <path>");(t.paths??=[]).push(a)}else if(s==="--worktree")t.worktree=!0;else if(s==="--max-bytes"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--max-bytes needs a whole number of bytes above 0");t.maxBytes=a}else if(s==="--changes"){if(t.changes=e[++i],!t.changes||t.changes.startsWith("-"))throw new Error("--changes needs a range: --changes <base>..<head>")}else if(s==="--severity"){if(t.severity=e[++i],!t.severity||t.severity.startsWith("-"))throw new Error("--severity needs off, warn or fail")}else if(s==="--current")t.current=!0;else if(s==="--uncommitted")t.uncommitted=!0;else if(s==="--set"){if(t.set=e[++i],!t.set||t.set.startsWith("-")&&t.set!=="-")throw new Error("--set needs a JSON file, or - for standard input: --set <file|->")}else if(s==="--cover"){if(t.cover=e[++i],!t.cover||t.cover.startsWith("-"))throw new Error("--cover needs a PNG, JPEG or WebP file: --cover <image>")}else if(s==="--cover-path"){if(t.coverPath=e[++i],!t.coverPath||t.coverPath.startsWith("-"))throw new Error("--cover-path needs a path from the workspace root: --cover-path <path>")}else if(s==="--records")t.records=!0;else if(s==="--expect"){if(t.expect=e[++i],!t.expect||t.expect.startsWith("-"))throw new Error("--expect needs the record's digest, as records --json prints it: --expect <digest>")}else if(s==="--label"){if(t.label=e[++i],!t.label||t.label.startsWith("-"))throw new Error("--label needs the snapshot's name, such as a turn id: --label <text>")}else if(s==="--branch"){if(t.branch=e[++i],!t.branch||t.branch.startsWith("-"))throw new Error("--branch needs a branch name: --branch <branch>")}else if(s==="--security"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--security needs a group: --security verified-releases|supply-chain|who-ran-it|review-rules|isolated-runners");t.securityGroups=[...t.securityGroups??[],a]}else if(s==="--workflow"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--workflow needs a workflow's name: --workflow <name>");t.ciWorkflows=[...t.ciWorkflows??[],a]}else if(s==="--chant"){if(t.ciChant=e[++i],!t.ciChant||t.ciChant.startsWith("-"))throw new Error('--chant needs the command that runs chant, such as "npx tsx packages/core/src/cli/main.ts": --chant <command>')}else if(s==="--commit"){if(t.commit=e[++i],!t.commit||t.commit.startsWith("-"))throw new Error("--commit needs the commit the job runs at: --commit <sha>")}else if(s==="--pass-env"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--pass-env needs a variable's name, such as AWS_PROFILE: --pass-env <NAME>");(t.passEnv??=[]).push(a)}else if(s==="--secrets"){if(t.ciSecrets=e[++i],!t.ciSecrets||t.ciSecrets.startsWith("-"))throw new Error("--secrets needs the host's secrets file, a dotenv or JSON file only its owner can read: --secrets <file>")}else if(s==="--repo"){let a=e[++i];if(a&&/^https?:\/\//.test(a))t.repoUrl=a;else if(t.ciRepo=a,!t.ciRepo||!/^[^/\s-][^/\s]*\/[^/\s]+$/.test(t.ciRepo))throw new Error("--repo needs the repository as owner/name, or for chant notify relay its https clone address: --repo <owner/repo>, --repo <url>")}else if(s==="--token-env"){if(t.tokenEnv=e[++i],!t.tokenEnv||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t.tokenEnv))throw new Error("--token-env needs a variable's name: --token-env <VAR>")}else if(s==="--host"){if(t.host=e[++i],!t.host||t.host.startsWith("-"))throw new Error("--host needs an address to listen on, such as 0.0.0.0: --host <address>")}else if(s==="--run-index-limit"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--run-index-limit needs a whole number of runs, 1 or more: --run-index-limit <n>");t.runIndexLimit=a}else if(s==="--max-jobs"){let a=Number(e[++i]);if(!Number.isInteger(a)||a<1)throw new Error("--max-jobs needs a whole number of jobs, 1 or more: --max-jobs <n>");t.maxJobs=a}else if(s==="--author"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--author needs a forge login: --author <login>");(t.ciAuthors??=[]).push(a)}else if(s==="--rerun-failed")t.rerunFailed=!0;else if(s==="--install"){if(t.ciInstall=e[++i],!t.ciInstall||t.ciInstall.startsWith("-"))throw new Error('--install needs the install command, such as "npm install": --install <command>')}else if(s==="--token-secret"){if(t.ciTokenSecret=e[++i],!t.ciTokenSecret||t.ciTokenSecret.startsWith("-"))throw new Error("--token-secret needs a repository secret's name, such as CI_GREEN_TOKEN: --token-secret <NAME>")}else if(s==="--app-id-var"){if(t.ciAppIdVar=e[++i],!t.ciAppIdVar||t.ciAppIdVar.startsWith("-"))throw new Error("--app-id-var needs the Actions variable holding the App's id: --app-id-var <VAR>")}else if(s==="--app-key-secret"){if(t.ciAppKeySecret=e[++i],!t.ciAppKeySecret||t.ciAppKeySecret.startsWith("-"))throw new Error("--app-key-secret needs the secret holding the App's private key: --app-key-secret <NAME>")}else if(s==="--runner-key-secret"){if(t.ciRunnerKeySecret=e[++i],!t.ciRunnerKeySecret||t.ciRunnerKeySecret.startsWith("-"))throw new Error("--runner-key-secret needs the repository secret holding the runner key, such as CHANT_RUNNER_KEY: --runner-key-secret <NAME>")}else if(s==="--verdict"){if(t.verdict=e[++i],!t.verdict||t.verdict.startsWith("-"))throw new Error("--verdict needs agree, dissent or abstain")}else if(s==="--class"){if(t.runnerClass=e[++i],!t.runnerClass||t.runnerClass.startsWith("-"))throw new Error("--class needs runner or service: --class <class>")}else if(s==="--by"){if(t.by=e[++i],!t.by||t.by.startsWith("-"))throw new Error("--by needs the reviewer: --by <principal>");(t.bys??=[]).push(t.by)}else if(s==="--own-jobs"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--own-jobs needs the YAML file of your own jobs: --own-jobs <file>");t.ownJobs=a}else if(s==="--keep-own-jobs")t.keepOwnJobs=!0;else if(s==="--run-group"){let a=e[++i];if(a!=="commit"&&a!=="pull-request")throw new Error(`--run-group takes commit or pull-request: got "${a??""}"`);t.runGroup=a}else if(s==="--control"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error("--control needs the control repo, such as github.com/acme/control");t.controlRepo=a}else if(s==="--control-setting"){let a=e[++i]??"",c=/^(op|member|readTokenSecret|tokenSecret|forge|ref|apiBase|sentCheck|markSent)=(.+)$/s.exec(a);if(!c)throw new Error(`--control-setting needs <key>=<value>, the key one of op, member, readTokenSecret, tokenSecret, forge, ref, apiBase, sentCheck, markSent: got "${a}"`);(t.controlSettings??={})[c[1]]=c[2]}else if(s==="--note-commands")t.noteCommands=!0;else if(s==="--check-job")t.checkJob=!0;else if(s==="--ref-gate-status")t.refGateStatus=!0;else if(s==="--evidence-runner-key-secret"){if(t.evidenceRunnerKeySecret=e[++i],!t.evidenceRunnerKeySecret||t.evidenceRunnerKeySecret.startsWith("-"))throw new Error("--evidence-runner-key-secret needs the secret holding the runner key: --evidence-runner-key-secret <NAME>")}else if(s==="--evidence-identity"){if(t.evidenceIdentity=e[++i],t.evidenceIdentity!=="oidc")throw new Error(`--evidence-identity takes oidc, the one identity chant signs keyless with: got "${t.evidenceIdentity??""}"`)}else if(s==="--evidence-audience"){if(t.evidenceAudience=e[++i],!t.evidenceAudience||t.evidenceAudience.startsWith("-"))throw new Error("--evidence-audience needs the OIDC token's audience: --evidence-audience <aud>")}else if(s==="--record-run"){if(t.recordRun=e[++i],!t.recordRun||!/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(t.recordRun))throw new Error(`--record-run needs the plan job's name: got "${t.recordRun??""}"`)}else if(s==="--not-affected"){if(i+1>=e.length)throw new Error(`--not-affected needs the re-plan's argument, empty for none: --not-affected "$CHANT_PLAN_ARGUMENT"`);t.notAffected=e[++i]}else if(s==="--context"){let a=e[++i];if(!a||!/^[A-Za-z0-9][A-Za-z0-9_.\/:-]*$/.test(a))throw new Error(`--context needs the plan status's context, letters, digits and _./:-: got "${a??""}"`);t.statusContexts=[...t.statusContexts??[],a]}else if(s==="--plan-job"){if(t.planJob=e[++i],!t.planJob||!/^[A-Za-z0-9_][A-Za-z0-9_-]*$/.test(t.planJob))throw new Error(`--plan-job needs the plan job's name: got "${t.planJob??""}"`)}else if(s==="--evidence-dir"){if(t.evidenceDir=e[++i],!t.evidenceDir||t.evidenceDir.startsWith("-"))throw new Error("--evidence-dir needs the directory the signing job kept: --evidence-dir .chant/evidence/plan")}else if(s==="--summary"){if(t.checkSummary=e[++i],!t.checkSummary||t.checkSummary.startsWith("-"))throw new Error("--summary needs a file to append the check report's section to: --summary <file>")}else if(s==="--locks")t.locks=!0;else if(s==="--stale-notes")t.staleNotes=!0;else if(s==="--stale")t.stale=!0;else if(s==="--tip"){let a=e[++i];if(!a||!/^[0-9a-f]{40}$/.test(a))throw new Error(`--tip needs the target branch's full commit sha: got "${a??""}"`);t.tip=a}else if(s==="--open")t.open=!0;else if(s==="--inputs"){if(t.inputs=e[++i],!t.inputs||t.inputs.startsWith("-")&&t.inputs!=="-")throw new Error("--inputs needs a JSON file, - for standard input, or the JSON itself: --inputs <file|-|json>")}else if(s==="--candidates"){if(t.candidates=e[++i],!t.candidates||t.candidates.startsWith("-")&&t.candidates!=="-")throw new Error("--candidates needs a JSON file, - for standard input, or the JSON itself: --candidates <file|-|json>")}else if(s==="--response"){if(t.response=e[++i],!t.response||t.response.startsWith("-"))throw new Error("--response needs a JSON file: --response <file>")}else if(s==="--subject"){if(t.subject=e[++i],!t.subject||t.subject.startsWith("-"))throw new Error("--subject needs what the question is about, such as a work item id: --subject <id>")}else if(s==="--store"){let a=e[++i];if(a!=="tree"&&a!=="ledger")throw new Error("--store is tree (the answer kind's directory in the working tree) or ledger (chant/lifecycle): --store <tree|ledger>");t.store=a}else if(s==="--answer"){if(t.answer=e[++i],t.answer===void 0||t.answer==="")throw new Error("--answer needs one of the question's candidates: --answer <value>")}else if(s==="--sign"){let a=e[i+1];t.sign=a!==void 0&&!a.startsWith("-")?e[++i]:!0}else if(s==="--session"){if(t.session=e[++i],!t.session||t.session.startsWith("-"))throw new Error("--session needs a session id: --session <id>")}else if(s==="--prefix"){if(t.prefix=e[++i],!t.prefix||t.prefix.startsWith("-"))throw new Error("--prefix needs an id prefix: --prefix <prefix>")}else if(s==="--key"||s==="--check-id"||s==="--claim"||s==="--environment"||s==="--envelope"||s==="--threshold"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value`);let c={"--key":"key","--check-id":"checkId","--claim":"claim","--environment":"environment","--envelope":"envelope","--threshold":"threshold"}[s];t[c]=a}else if(s==="--ref"||s==="--hook"||s==="--git-dir"||s==="--ledger"){let a=e[++i];if(a===void 0||a.startsWith("-"))throw new Error(`${s} needs a value`);let c={"--ref":"ref","--hook":"hook","--git-dir":"gitDir","--ledger":"ledger"}[s];t[c]=a}else if(s==="--require"){if(t.require=e[++i],!t.require||t.require.startsWith("-"))throw new Error("--require needs a provenance level: --require attested")}else if(s==="--ambient")t.ambient=!0;else if(s==="--check-live")t.checkLive=!0;else if(s==="--check-snapshot")t.checkSnapshot=!0;else if(s==="--fail-on-drift")t.failOnDrift=!0;else if(s==="--run-examples")t.runExamples=!0;else if(s==="--pinned-digest")t.pinnedDigest=e[++i];else if(s==="--check")t.check=!0;else if(s==="--bump")t.bump=!0;else if(s==="--component")t.component=e[++i];else if(s==="--digest")t.digest=e[++i],t.digest!==void 0&&(t.digests??=[]).push(t.digest);else if(s==="--release-plan")t.releasePlanFile=e[++i];else if(s==="--release"){if(t.release=e[++i],!t.release||t.release.startsWith("-"))throw new Error("--release needs a release's label or digest: --release <label|digest>")}else if(s==="--build"){if(t.buildCommand=e[++i],!t.buildCommand)throw new Error("--build needs a shell command: --build '<command>'")}else if(s==="--deploy-unchanged")t.deployUnchanged=!0;else if(s==="--continue")t.continueTrain=!0;else if(s==="--plan-only")t.planOnly=!0;else if(s==="--artifacts")t.artifacts=!0;else if(s==="--git-sha")t.gitSha=e[++i];else if(s==="--run-id")t.runId=e[++i];else if(s==="--actor")t.actor=e[++i];else if(s==="--approver")t.approver=e[++i];else if(s==="--statement")t.statement=!0;else if(s==="--signature"){if(t.signature=e[++i],!t.signature||t.signature.startsWith("-")&&t.signature!=="-")throw new Error("--signature needs a file holding the signature, or - for stdin: --signature <file|->")}else if(s==="--binding"){if(t.binding=e[++i],!t.binding||t.binding.startsWith("-"))throw new Error("--binding needs the line the signature binds, which does not start with -: --binding <text>")}else if(s==="--relayed-by"){if(t.relayedBy=e[++i],!t.relayedBy||t.relayedBy.startsWith("-"))throw new Error("--relayed-by needs the principal that relayed it: --relayed-by <principal>")}else if(s==="--on"){if(t.on=e[++i],!t.on||t.on.startsWith("-"))throw new Error("--on needs a runtime name: --on <lexicon>")}else if(s==="--compare-to")t.compareTo=e[++i];else if(s==="--no-release-record")t.noReleaseRecord=!0;else if(s==="--no-record")t.noRecord=!0;else if(s==="--fold")t.fold=!0;else if(s==="--no-build")t.noBuild=!0;else if(s==="--no-cache")t.noCache=!0;else if(s==="--discover")t.discover=!0;else if(s==="--no-fold")t.fold=!1;else if(s==="--sandbox")t.sandbox=!0;else if(s==="--fold-rank"){let a=e[i+1];a&&!a.startsWith("-")?(t.foldRankCollapsedFile=a,i++):t.foldRank=!0}else if(s==="--param")(t.param??=[]).push(e[++i]);else if(s==="--lexicon-output")(t.lexiconOutput??=[]).push(e[++i]);else if(s==="--params-file")t.paramsFile=e[++i];else if(s==="--projection")t.projection=e[++i];else if(s==="--interval")t.interval=e[++i];else if(s==="--lease-ttl")t.leaseTtl=e[++i];else if(s==="--steward"){let a=e[i+1];a!==void 0&&!a.startsWith("-")?(t.steward=a,i++):t.steward=""}else if(s==="--once")t.once=!0;else if(s==="--setup-key")t.setupKey=!0;else if(s==="--trust")t.trustKey=!0;else if(s==="--in-place")t.ciInPlace=!0;else if(s==="--require-runner-start")t.requireRunnerStart=!0;else if(s==="--job"){if(t.ciJob=e[++i],!t.ciJob||t.ciJob.startsWith("-"))throw new Error("--job needs the job as JSON or @<file>: --job @job.json")}else if(s==="--no-push")t.noPush=!0;else if(s==="--no-require-review")t.requireReview=!1;else if(s==="--unsigned")t.unsigned=!0;else if(s==="--principal"){if(t.ciPrincipal=e[++i],!t.ciPrincipal||t.ciPrincipal.startsWith("-"))throw new Error("--principal needs the runner's principal: --principal <name>")}else if(s==="--work"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--work needs a work item id: --work <id>");t.work=a,(t.works??=[]).push(a)}else if(s==="--holder"||s==="--ttl"||s==="--token"||s==="--outcome"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs a value: ${s} <${s.slice(2)}>`);t[s.slice(2)]=a}else if(s==="--input"||s==="--org"||s==="--endpoint"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs a value: ${s} <${s==="--input"?"file":s.slice(2)}>`);t[s.slice(2)]=a}else if(s==="--signer"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--signer needs a principal: --signer <principal>");t.signer=a}else if(s==="--unit"||s==="--decision"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error(`${s} needs an id: ${s} <id>`);t[s.slice(2)]=a}else if(s==="--note")t.note=e[++i];else if(s==="--reason"){if(t.reason=e[++i],t.reason===void 0||t.reason.startsWith("-"))throw new Error("--reason needs the text of the reason: --reason <text>")}else if(s==="--rule"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--rule needs a rule id: --rule <id>");(t.rules??=[]).push(a)}else if(s==="--expire")t.expire=!0;else if(s==="--role"){let a=e[++i]??"";t.roles=[...t.roles??[],...a.split(",").map(c=>c.trim()).filter(Boolean)]}else if(s==="--agent")t.agent=!0;else if(s==="--allow-code")t.allowCode=!0;else if(s==="--allow-skip")t.allowSkip=!0;else if(s==="--source"){if(t.source=e[++i],!t.source||t.source.startsWith("-"))throw new Error("--source needs a template: --source <repo>[#<member>] for workspace upgrade, or a source for ci tick and ci list: --source checks|runs")}else if(s==="--tags"){if(t.tags=e[++i],!t.tags||t.tags.startsWith("-"))throw new Error("--tags needs a tag glob: --tags 'v*'")}else if(s==="--index"){if(t.index=e[++i],!t.index||t.index.startsWith("-"))throw new Error("--index needs a value: --index <file> for workspace adopt-lineage, --index <scope key>[@<version>] for search and lifecycle diff")}else if(s==="--adopt"){if(t.adopt=e[++i],!t.adopt||t.adopt.startsWith("-"))throw new Error("--adopt needs an adoption file: --adopt <file>")}else if(s==="--adopt-out"){if(t.adoptOut=e[++i],!t.adoptOut||t.adoptOut.startsWith("-"))throw new Error("--adopt-out needs a file: --adopt-out <file>")}else if(s==="--remove")t.remove=!0;else if(s==="--available")t.available=!0;else if(s==="--root-only")t.rootOnly=!0;else if(s==="--forge-repos"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--forge-repos needs a file: --forge-repos <repos.json>");t.forgeRepos=a}else if(s==="--generated")t.generated=!0;else if(s==="--runs-on"){let a=e[++i],c=a?.indexOf("=")??-1;if(!a||c<1||c===a.length-1)throw new Error("--runs-on needs a member and the cluster resource it runs on: --runs-on <member>=<member>/<address>");t.runsOn={...t.runsOn??{},[a.slice(0,c)]:a.slice(c+1)}}else if(s==="--member"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--member needs a member or group name: --member <name>");t.members=[...t.members??[],...a.split(",").map(c=>c.trim()).filter(Boolean)]}else if(s==="--allow-same-origin")t.allowSameOrigin=!0;else if(s==="--plan")t.plan=e[++i];else if(s==="--url")t.url=e[++i];else if(s==="--op")t.op=e[++i];else if(s==="--where"){let a=e[++i];if(a===void 0||a.startsWith("--"))throw new Error("--where needs a clause: --where <field><op><value>");t.where=[...t.where??[],a]}else if(s==="--read"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--read needs a read: --read <state|plan|refresh|live-read|ownership>");t.driftRead=a}else if(s==="--stream")t.stream=!0;else if(s==="--resource"){let a=e[++i];if(!a||a.startsWith("--"))throw new Error("--resource needs an address: --resource <addr>");t.resource=a}else if(s==="--since")t.since=e[++i];else if(s==="--wait")t.ciWait=!0;else if(s==="--retries"){let a=e[++i];if(a===void 0||!/^\d+$/.test(a))throw new Error(`--retries needs a whole number of re-runs: --retries <n>, got ${JSON.stringify(a??"")}`);t.ciRetries=Number(a)}else if(s==="--timeout-minutes"){let a=e[++i],c=a===void 0?NaN:Number(a);if(a===void 0||a.trim()===""||!Number.isFinite(c)||c<=0)throw new Error(`--timeout-minutes needs a number of minutes above 0: --timeout-minutes <n>, got ${JSON.stringify(a??"")}`);t.ciTimeoutMinutes=c}else if(s==="--lane")t.lane=e[++i];else if(s==="--runner")t.quarantineRunner=e[++i];else if(s==="--junit"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--junit needs the JUnit XML file the run wrote: --junit <file>");(t.quarantineJunit??=[]).push(a)}else if(s==="--only")t.quarantineOnly=!0;else if(s==="--phase")t.phase=e[++i];else if(s==="--audit-log"){let a=e[++i];if(!a||a.startsWith("-"))throw new Error("--audit-log needs the log: --audit-log aws[:<region>]");t.auditLog=a}else if(s==="--limit")t.limit=Number(e[++i]);else{if(s.startsWith("--"))throw new Error(`Unknown flag: ${s}
533
533
  Run "chant --help" to see supported flags.`);if(/^-[A-Za-z]/.test(s))throw new Error(`Unknown flag: ${s}
534
534
  Run "chant --help" to see supported flags.`);o(s)}i++}if(t.promoteTo&&!(t.command==="build"&&t.components&&t.generate))throw new Error("--promote-to needs build --components --generate <lexicon>: it adds a promote job to the generated CI pipeline, and only generate mode emits one.");if((t.ownJobs!==void 0||t.keepOwnJobs)&&!(t.command==="build"&&t.components&&t.generate))throw new Error(`${t.ownJobs!==void 0?"--own-jobs":"--keep-own-jobs"} needs build --components --generate <forge>: it adds your own jobs to the pipeline file generate mode writes.`);return t}var jAe={lc:"lifecycle",sync:"update"};function O3(e,t){let n=jAe[e.command]??e.command,r=`${n} ${e.path}`,o=t.find(s=>s.name===r);if(o)return{def:o,compound:!0};let i=t.find(s=>s.name===n);return i?{def:i,compound:!1}:null}ir();function P3(e){return new Promise(t=>{let n=()=>{if(e.writableLength===0||e.writableEnded||e.destroyed){o(),t();return}e.once("drain",n)},r=()=>{o(),t()},o=()=>{e.off("drain",n),e.off("error",r),e.off("close",r)};e.once("error",r),e.once("close",r),n()})}async function KT(e){await P3(process.stdout),await P3(process.stderr),process.exit(e)}JT();import{realpathSync as A3}from"node:fs";import{fileURLToPath as MAe}from"node:url";function C3(e,t){if(!e)return!1;try{return A3(e)===A3(MAe(t))}catch{return!1}}pw();ti();b2();vI();zA();ir();da();import{readFileSync as UT}from"node:fs";import{relative as k3,resolve as Ha}from"node:path";tt();var vpt="_waves";function kpt(e){return`${e}.stops.json`}var sPe=/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/,Rpt=/^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;function $pt(e){let t;try{t=JSON.parse(e??"null")}catch{return{version:1,stops:{}}}let n={},r=t&&typeof t=="object"&&t.version===1?t.stops:void 0;if(r&&typeof r=="object")for(let[o,i]of Object.entries(r)){let s=i;!sPe.test(o)||!s||!Number.isInteger(s.through)||s.through<1||typeof s.at!="string"||(n[o]={through:s.through,at:s.at,...typeof s.by=="string"?{by:s.by}:{},...Number.isInteger(s.pr)?{pr:s.pr}:{}})}return{version:1,stops:n}}function xpt(e,t){return e!==void 0&&t>e.through}async function Spt(e,t,n={}){if(!Rpt.test(e)||!sPe.test(t))return;await Tn(n);let r=await Tt(vpt,kpt(e),n);if(r)return $pt(await Bt(r,n)).stops[t]}async function aPe(e,t,n={}){let r;try{r=n.sha??await hc(n)}catch{return}let o;try{o=await Spt(e,r,n)}catch{return}if(!xpt(o,t))return;let i=o.by?`${o.by}'s`:"a",s=o.pr!==void 0?` on pull request ${o.pr}`:"";return`wave ${t} waits: ${i} comment${s} ran ${e} again at ${r.slice(0,12)} through wave ${o.through}; comment the apply again without a wave to run the waves after it`}RA();tp();Qr();async function iAe(e){let t=e.args.noRecord===!0;if(!t&&!Wr())return rAe(e);let n=t?"--no-record":`${Mi}=${process.env[Mi]}`,r=process.env[Mi];t&&(process.env[Mi]="1"),RP(),console.error(br({message:XB(n)}));try{return await rAe(e)}finally{console.error(br({message:tU(n)})),RP(),t&&(r===void 0?delete process.env[Mi]:process.env[Mi]=r)}}async function rAe(e){let{args:t}=e;if(t.merge!==void 0)return Sft(e);if(t.applyStatus!==void 0)return Eft(e);let n=t.opsSpec;if(n&&t.recordPlans)try{let a=Fs(UT(Ha(n),"utf-8"),`--spec ${n}`),c=await bI({spec:a});if(t.json)console.log(JSON.stringify(c,null,2));else for(let l of c.waves)console.error(`wave ${l.wave} (${l.name}) at ${c.head.slice(0,12)}: ${l.digest}`);return 0}catch(a){return console.error(be({message:a instanceof Error?a.message:String(a)})),1}if(n&&t.approvalStatus)return Oft(e,n);if(n&&t.wavesOutcome)try{let a=Fs(UT(Ha(n),"utf-8"),`--spec ${n}`),{opWaveOutcomeDir:c}=await Promise.resolve().then(()=>(Lr(),sP)),{earlierWaveOutcomes:l}=await Promise.resolve().then(()=>(Ml(),qO)),{applyOutcomeOf:d}=await Promise.resolve().then(()=>(rx(),AT)),{readOpWaveRestNote:u}=await Promise.resolve().then(()=>(ky(),ox)),p=u([Ha(c(a))]);if(p?.next!==void 0)return console.error(`${a.name}: wave ${p.wave} started a follow-on run for wave ${p.next}, so this run's outcome is not the waves'; that run sends it`),0;let{withChainOutcomes:f}=await Promise.resolve().then(()=>(ky(),ox)),g=d(f(l([Ha(c(a))],Number.MAX_SAFE_INTEGER).members,p));if(t.json)console.log(JSON.stringify(g,null,2));else{console.log(g.outcome);let m=Object.entries(g.counts).map(([h,y])=>`${y} ${h}`).join(", ");console.error(`${a.name}: ${g.outcome}${m?` (${m})`:", no wave wrote an outcome"}`)}return 0}catch(a){return console.error(be({message:a instanceof Error?a.message:String(a)})),1}if(!n||t.wave===void 0)return console.error(be({message:"`chant run wave` needs --spec <file> and --wave <k>",hint:"Run it as a generated Op waves pipeline does: chant run wave --spec <file> --wave <k> [--decide | --share <i> | --group <name> [--share <i>]]"})),1;if(t.decide&&(t.share!==void 0||t.group!==void 0))return console.error(be({message:`--decide and --${t.share!==void 0?"share":"group"} are two different jobs; pass one`})),1;if(t.policyOnly&&(t.share!==void 0||t.group!==void 0))return console.error(be({message:`--policy-only runs a wave's policy in its own or its deciding job; a --${t.share!==void 0?"share":"group"} job has none of its own`})),1;let r=t.phase;if(r!==void 0&&!Dm.includes(r))return console.error(be({message:`--phase is one of ${Dm.join(", ")}: a split wave's plan, gate, apply or record job`,hint:`got ${JSON.stringify(t.phase??"")}`})),1;let o=r==="gate"||r==="record"?Lm().head:void 0,i,s={...t.share!==void 0?{share:t.share}:{},...t.group!==void 0?{group:t.group}:{}};if(t.eventsJson&&t.json)return console.error(be({message:"--events-json and --json both print to stdout",hint:"Pass one. --events-json prints the job's run events; --json prints its result."})),1;try{let a=Ha(n),c;if(t.renderSpec){let p=await Promise.resolve().then(()=>(dJ(),qke)),f=k3(process.cwd(),a),g=p.opWavesSpecCommandFromEnv(),m=p.opWavesSpecRunsAtHead()&&r!=="gate"&&r!=="record",h=p.renderOpWavesJobSpec({specFile:f,base:t.base??"HEAD^1",cwd:process.cwd(),render:p.commandSpecRender(g,f,process.cwd()),fallback:tx,parse:Fs,...m?{runsAtHead:m,headRender:b=>p.commandSpecRender(g,f,process.cwd(),{[p.OP_WAVES_SPEC_BASE_ENV]:b})}:{}});c=h.show,i=h.spec,m&&console.error(`${i.name}: the runs come from the spec rendered at ${h.sha.slice(0,12)}, the applied commit; the rules from the one rendered at base`);let y=p.renderedJobMissing(i,t.wave,s,h.at);if(y)return console.error(`${y}, so this job has nothing to apply`),0}else i=Fs(UT(a,"utf-8"),`--spec ${n}`);if(!t.policyOnly&&(r===void 0||r==="gate")){let p=await aPe(i.name,t.wave,o?{sha:o}:{});if(p)return console.error(p),ge.waiting}let l=t.eventsJson?await(await Promise.resolve().then(()=>(xPe(),$Pe))).openCliRunEvents(t,{kind:"op",name:i.name,cwd:process.cwd()}):void 0,d=zce(),u=await yI({...l?{events:l.emit}:{},...d?.afterPlan?{afterPlan:d.afterPlan}:{},...d?.capabilities?{capabilities:d.capabilities}:{},...d?.hookExec?{hookExec:d.hookExec}:{},...d?.runHooks?{runHooks:d.runHooks}:{},...d?.hooks?{inProcessHooks:d.hooks}:{},spec:i,specFile:k3(process.cwd(),a),wave:t.wave,...t.decide?{decide:!0}:{},...t.policyOnly?{policyOnly:!0}:{},...t.share!==void 0?{share:t.share}:{},...t.group!==void 0?{group:t.group}:{},...t.base?{base:t.base}:{},...c?{show:c}:{},...r?{phase:r}:{},...o?{head:o}:{}});return r==="record"&&(u.exitCode=await(await Promise.resolve().then(()=>(ky(),ox))).followOnAfterRecord({spec:i,wave:t.wave,exitCode:u.exitCode})),t.json&&console.log(JSON.stringify(u,null,2)),t.policyOnly||r==="plan"||r==="apply"||r==="gate"&&u.exitCode===ge.done||(await hA(i,t.wave,{result:u},s),await oAe(i,t.wave,{result:u})),u.exitCode}catch(a){let c=a instanceof Error?a.message:String(a);return console.error(be({message:c})),i&&r!=="plan"&&r!=="apply"&&(await hA(i,t.wave,{error:c},s),await oAe(i,t.wave,{error:c})),1}}async function Sft(e){let{args:t}=e,n=l=>(console.error(be({message:l})),1);if(t.merge!=="auto"&&t.merge!=="manual")return n("--merge is auto or manual: auto merges the pull request once every wave applied its decided head, manual says it is ready");let r=t.op;if(!r||t.wave===void 0)return n("--merge closes a before-merge run: --op <name> --wave <last wave> --merge auto|manual --forge <kind>");let{FORGE_KINDS:o}=await Promise.resolve().then(()=>(pi(),sh));if(!t.forge||!o.includes(t.forge))return n(`--merge replies on the pull request: --forge ${o.join("|")}`);let i=t.forge,{beforeMergeRunFromEnv:s,isBeforeMergeRun:a}=await Promise.resolve().then(()=>(tp(),Zae)),c=s();if(!a(c))return console.error("this run names no decided head: a push applies on its own, so nothing is merged here"),0;try{let{beforeMergeRecordAt:l}=await Promise.resolve().then(()=>(EPe(),SPe)),{beforeMergeDone:d}=await Promise.resolve().then(()=>(APe(),PPe)),{opWaveOutcomeDir:u}=await Promise.resolve().then(()=>(Lr(),sP)),{earlierWaveOutcomes:p}=await Promise.resolve().then(()=>(Ml(),qO)),{applyOutcomeOf:f}=await Promise.resolve().then(()=>(rx(),AT)),{forgeFromJobEnv:g}=await Promise.resolve().then(()=>(f3(),p3)),{mergeTokenEnv:m}=await Promise.resolve().then(()=>(d3(),OPe)),{releaseTargetLocks:h}=await Promise.resolve().then(()=>(Dq(),Tfe)),{PR_APPLY_GATE:y}=await Promise.resolve().then(()=>(Bk(),pV)),{activeProductWords:b}=await Promise.resolve().then(()=>(Co(),iX)),v=c.head?await l(r,c.head):void 0,{readOpWaveRestNote:k,withChainOutcomes:$}=await Promise.resolve().then(()=>(ky(),ox)),O=k([Ha(u({name:r}))]),E=f($(p([Ha(u({name:r}))],Number.MAX_SAFE_INTEGER).members,O)),P;if(t.merge==="auto"&&t.mergeTokenEnv){let C=m(t.mergeTokenEnv);if("error"in C)return n(String(C.error));P=g(i,C)}let T=t.gate??y,S=await d({op:r,waves:t.wave,run:c,record:v,outcome:E,...O?.next!==void 0?{followOn:{wave:O.wave,next:O.next,found:O.found}}:{},merge:t.merge,forge:g(i),...P?{merger:P}:{},release:async C=>(await h(T,C)).released,words:b()});return console.error(S.text),S.code}catch(l){return n(l instanceof Error?l.message:String(l))}}async function Eft(e){let{args:t}=e,n=s=>(console.error(be({message:s})),1),r=t.op;if(!r||t.wave===void 0||t.of===void 0||!t.at)return n("--apply-status posts one wave's apply status: --op <name> --wave <n> --of <count> --apply-status <context> --at <sha> --forge <kind>");let{FORGE_KINDS:o}=await Promise.resolve().then(()=>(pi(),sh));if(!t.forge||!o.includes(t.forge))return n(`--apply-status posts on a forge: --forge ${o.join("|")}`);let i=t.forge;try{let{postOpWaveApplyStatus:s}=await Promise.resolve().then(()=>(TPe(),IPe)),{opWaveOutcomeDir:a}=await Promise.resolve().then(()=>(Lr(),sP)),{forgeFromJobEnv:c}=await Promise.resolve().then(()=>(f3(),p3)),l=i==="gitlab"&&t.at===process.env.CI_COMMIT_SHA&&/^[0-9]+$/.test(process.env.CI_PIPELINE_ID??"")?Number(process.env.CI_PIPELINE_ID):void 0,d=await s({forge:c(i),dirs:[Ha(a({name:r}))],wave:t.wave,of:t.of,context:t.applyStatus,at:t.at,...l!==void 0?{pipelineId:l}:{}});return console.error(d),0}catch(s){return n(`the apply status was not posted: ${s instanceof Error?s.message:String(s)}`)}}async function oAe(e,t,n){try{let{respondOpWave:r,triageOfOpWave:o}=await Promise.resolve().then(()=>(ZPe(),JPe)),{resolveResponses:i}=await Promise.resolve().then(()=>(b3(),BPe)),s=i(e.respond);if(s["wave-refused"]==="off"&&s["apply-failed"]==="off"||n.result&&n.result.exitCode===0&&!o(e,t,n))return;let{detectForge:a,forgeFromEnv:c}=await Promise.resolve().then(()=>(pi(),sh)),l=a();if(!l)return;let d;try{d=c(l)}catch{return}let u=process.env.GITHUB_SHA??process.env.CI_COMMIT_SHA;await r(e,t,n,{forge:d,...u?{head:u}:{}})}catch(r){console.error(br({message:`the wave's responses were not posted: ${r instanceof Error?r.message:String(r)}`}))}}async function Oft(e,t){let{args:n}=e,r=u=>(console.error(be({message:u})),1),{FORGE_KINDS:o,forgeFromEnv:i}=await Promise.resolve().then(()=>(pi(),sh));if(!n.forge||!o.includes(n.forge))return r(`--approval-status posts on a forge: --forge ${o.join("|")}`);let s,a;try{s=Fs(UT(Ha(t),"utf-8"),`--spec ${t}`),a=i(n.forge)}catch(u){return r(u instanceof Error?u.message:String(u))}let{postApprovalStatus:c,postOpenApprovalStatuses:l}=await Promise.resolve().then(()=>(nAe(),tAe)),d=k3(process.cwd(),Ha(t));try{if(n.open){let p=n.branch??process.env.CI_COMMIT_BRANCH;if(!p)return r("--approval-status --open posts for the pull requests into a branch: run it in a branch pipeline, or pass --branch <branch>");let f=await l({spec:s,specFile:d,forge:a,branch:p});for(let g of f.warnings)console.error(br({message:g}));for(let g of f.posted)console.error(`!${g.pr}: ${g.status.state}: ${g.status.description}`);return f.warnings.length>0&&f.posted.length===0?1:0}if(n.pr===void 0||!n.head||!n.base)return r("--approval-status needs the pull request, its head and its base: --pr <n> --head <sha> --base <sha>, or --open");let u=await c({spec:s,specFile:d,forge:a,pr:n.pr,head:n.head,base:n.base});return console.error(`#${n.pr}: ${u.state}: ${u.description}`),0}catch(u){return r(`the approval status was not posted: ${u instanceof Error?u.message:String(u)}`)}}mT();$3();Q$();var Kft=[{name:"run wave",handler:iAe},{name:"run resume",handler:C9},{name:"approve",handler:PAe},{name:"workspace points",handler:D9}],Jft=`
535
535
  chant runtime ${dx} - the wave-job commands of chant, in one file