lensmcp 1.23.13 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/bundled/bridge.js +27 -27
  2. package/bundled/capture-runner.js +26 -26
  3. package/bundled/dashboard-ui/app.css +1 -1
  4. package/bundled/dashboard-ui/app.js +17 -17
  5. package/bundled/dashboard.js +98 -64
  6. package/bundled/lint-runner.js +3 -3
  7. package/bundled/main.js +43 -40
  8. package/bundled/shim.js +47 -43
  9. package/lib/bridge-origins.d.ts +16 -0
  10. package/lib/bridge-origins.js +1 -0
  11. package/lib/cli.js +54 -42
  12. package/lib/dashboard-login.d.ts +17 -0
  13. package/lib/dashboard-login.js +3 -0
  14. package/lib/duplicate-registration.d.ts +6 -3
  15. package/lib/duplicate-registration.js +1 -1
  16. package/lib/forward-signals.d.ts +24 -0
  17. package/lib/forward-signals.js +1 -0
  18. package/lib/guest-graph.d.ts +44 -0
  19. package/lib/guest-graph.js +4 -0
  20. package/lib/heap-analyzer-main.d.ts +1 -0
  21. package/lib/heap-analyzer-main.js +3 -0
  22. package/lib/heap-analyzer.d.ts +109 -0
  23. package/lib/heap-analyzer.js +1 -0
  24. package/lib/lint-args.d.ts +1 -1
  25. package/lib/mcp-mode.d.ts +92 -10
  26. package/lib/mcp-mode.js +3 -2
  27. package/lib/mcp-restart.d.ts +20 -1
  28. package/lib/mcp-restart.js +1 -1
  29. package/lib/mcp-sessions.d.ts +20 -0
  30. package/lib/mcp-sessions.js +2 -0
  31. package/lib/mcp-token.d.ts +48 -0
  32. package/lib/mcp-token.js +4 -0
  33. package/lib/mcp-wiring.d.ts +20 -5
  34. package/lib/mcp-wiring.js +2 -2
  35. package/lib/mem-command.d.ts +113 -0
  36. package/lib/mem-command.js +3 -0
  37. package/lib/perf-rules-check.d.ts +35 -0
  38. package/lib/perf-rules-check.js +4 -0
  39. package/lib/pod-source-maps.d.ts +31 -0
  40. package/lib/pod-source-maps.js +1 -0
  41. package/lib/process-ownership.d.ts +30 -0
  42. package/lib/process-ownership.js +2 -0
  43. package/lib/server-bundle.d.ts +19 -0
  44. package/lib/server-bundle.js +5 -0
  45. package/lib/status-client.d.ts +4 -1
  46. package/lib/status-client.js +2 -2
  47. package/lib/sweep.d.ts +15 -0
  48. package/lib/sweep.js +1 -1
  49. package/lib/upgrade.d.ts +14 -0
  50. package/lib/upgrade.js +2 -2
  51. package/lib/workspace-scope.d.ts +26 -9
  52. package/package.json +4 -4
  53. package/plugin/.claude-plugin/plugin.json +1 -1
  54. package/plugin/scripts/dashboard-open.sh +26 -6
  55. package/plugin/skills/dashboard/SKILL.md +3 -1
  56. package/plugin/skills/using-lensmcp/SKILL.md +27 -0
  57. package/plugin/skills/using-lensmcp/rules/bundle-heavy-barrel-import.md +79 -0
  58. package/plugin/skills/using-lensmcp/rules/pod-heap-budget.md +53 -0
  59. package/plugin/skills/using-lensmcp/rules/pod-retained-generation.md +38 -0
  60. package/plugins/lensmcp/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lensmcp/skills/lensmcp-dashboard/SKILL.md +5 -2
  62. package/plugins/lensmcp/skills/using-lensmcp/SKILL.md +21 -0
  63. package/plugins/lensmcp/skills/using-lensmcp/rules/bundle-heavy-barrel-import.md +79 -0
  64. package/plugins/lensmcp/skills/using-lensmcp/rules/pod-heap-budget.md +53 -0
  65. package/plugins/lensmcp/skills/using-lensmcp/rules/pod-retained-generation.md +38 -0
package/bundled/main.js CHANGED
@@ -1,72 +1,75 @@
1
- "use strict";var Q6=Object.defineProperty;var s=(e,t)=>Q6(e,"name",{value:t,configurable:!0});var B4=Object.defineProperty,o=s((e,t)=>B4(e,"name",{value:t,configurable:!0}),"s"),Se=s((e,t)=>{for(var r in t)B4(e,r,{get:t[r],enumerable:!0})},"qe");function $(e,t,r,i){var u=arguments.length,n=u<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(u<3?a(n):u>3?a(t,r,n):a(t,r))||n);return u>3&&n&&Object.defineProperty(t,r,n),n}s($,"x"),o($,"__decorate");function wr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}s(wr,"vo"),o(wr,"__metadata");import"reflect-metadata";import{FrontMcp as ey,FrontMcpInstance as w4,LogLevel as C4}from"@frontmcp/sdk";var x4="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function $4(e,t){let r="",i=e;for(let u=t-1;u>=0;u--){let n=i%32;r=x4[n]+r,i=(i-n)/32}return r}s($4,"Uw"),o($4,"encodeTime");function k4(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let i=0;i<e;i++)r+=x4[(t[i]??0)&31];return r}s(k4,"Lw"),o(k4,"encodeRandom");function Oe(e=Date.now()){return $4(e,10)+k4(16)}s(Oe,"ke"),o(Oe,"ulid");var ty=class{static{s(this,"yo")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let i=r.handler(t);i&&typeof i.then=="function"&&i.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},vt="REDACTED",uy=["token","secret","password","passwd","apikey","credential","assertion","signature"],ry=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),ny=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function Ki(e){let t=e.toLowerCase();if(ny.test(t.replace(/[-_.]+/g,"")))return!1;if(uy.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&ry.has(r))return!0;return!1}s(Ki,"Qv"),o(Ki,"isSecretParam");var iy=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,sy=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function A4(e){return e&&e.replace(iy,`$1${vt}@`).replace(sy,(t,r,i)=>Ki(i)?`${r}${i}=${vt}`:t)}s(A4,"Gw"),o(A4,"redactUrlParams");var ay=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,oy=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,ly=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function Te(e){return A4(e).replace(ly,(t,r,i,u)=>`${r}${i}${u}${vt}${u}`).replace(ay,vt).replace(oy,(t,r)=>`${r} ${vt}`)}s(Te,"Ge"),o(Te,"redactText");function Hi(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(Hi,"ey"),o(Hi,"clip");function _4(e,t=4096){if(e!==void 0)return Hi(Te(e),t)}s(_4,"ty"),o(_4,"safeText");function I4(e){return Hi(Te(e),300)}s(I4,"ry"),o(I4,"safeTitle");var dy=6,cy=64,my=/^TS\d{1,5}$/,py=o((e,t)=>e==="code"&&typeof t=="string"&&my.test(t),"isDiagnosticCode");function Yt(e,t=0,r=dy){if(typeof e=="string")return Te(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let n=!1,a=e.map((l,d)=>{if(d>=cy)return l;let c=Yt(l,t+1,r);return c!==l&&(n=!0),c});return n?a:e}let i=!1,u={};for(let[n,a]of Object.entries(e)){let l=Ki(n)&&a!==void 0&&a!==null&&!py(n,a)?vt:Yt(a,t+1,r);l!==a&&(i=!0),u[n]=l}return i?u:e}s(Yt,"Nt"),o(Yt,"redactDeep");var fy=12;function S4(e={}){let t=e.maxDepth??fy,r=0,i=0;return{redact(u){r+=1;let n=u.title===void 0?void 0:I4(Te(u.title)),a=u.message===void 0?void 0:_4(Te(u.message),4096),l=u.raw===void 0?void 0:Yt(u.raw,0,t),d=n!==u.title,c=a!==u.message,m=l!==u.raw;return!d&&!c&&!m?u:(i+=1,{...u,...n!==void 0?{title:n}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:i}),"stats"),reset:o(()=>{r=0,i=0},"reset")}}s(S4,"ny"),o(S4,"createEventRedactor");var gy=class{static{s(this,"bo")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),i=JSON.stringify(r);if(i===t.lastJson)return;t.lastJson=i,t.revision+=1;let u=this.subs.get(e);if(u)for(let n of u)try{n(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},F4=class{static{s(this,"Dt")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let i={...r,...t,id:r.id};return this.nodes.set(e,i),i}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],i=e.direction??"both",u=e.depth??4,n=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=n);){let{id:c,d:m}=d.shift();if(!a.has(c)&&(a.add(c),!(m>=u)))for(let f of r){if(i==="out"||i==="both"){let p=this.outByAxis.get(f)?.get(c);if(p)for(let g of p){l.add(g);let v=this.edges.get(g);a.has(v.to)||d.push({id:v.to,d:m+1})}}if(i==="in"||i==="both"){let p=this.inByAxis.get(f)?.get(c);if(p)for(let g of p){l.add(g);let v=this.edges.get(g);a.has(v.from)||d.push({id:v.from,d:m+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(c=>this.edges.get(c)).filter(c=>!!c)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let i=this.nodes.get(r);i&&t.push(i)}return t}};function z4(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(z4,"r$"),o(z4,"fnv1a32");function j4(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${z4(t.join("|"))}`}s(j4,"oy"),o(j4,"fingerprint");var hy=class{static{s(this,"xo")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function Xi(e,t={}){let r,i;if(t.flowId)i=t.flowId,r=e.filter(f=>f.context.flowId===i);else{let f=e.find(p=>p.context.flowId);if(!f)return;i=f.context.flowId,r=e.filter(p=>p.context.flowId===i)}if(r.length===0)return;r.sort((f,p)=>f.timestamp-p.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let n=r[0],a=[],l,d;for(let f of r){let p=R4(f);if(p){if(a.push(p),p.kind==="render"||p.kind==="final-render"){let g=f.raw;g?.render&&(l={id:g.render.id,page:g.render.page,route:g.render.route,componentName:g.render.componentName})}else if(f.source==="visual"&&p.kind==="visual-violation"){let g=f.raw;g?.frame&&(d=g.frame.id)}}}for(let f=a.length-1;f>=0;f--)if(a[f].kind==="render"){a[f]={...a[f],kind:"final-render"};break}let c=r[0].timestamp,m=r[r.length-1].timestamp;return{flowId:i,origin:{type:n.context.originType,nodeId:n.context.originNodeId,at:n.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:c,endedAt:m,eventCount:r.length}}s(Xi,"_o"),o(Xi,"compileStory");function R4(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,i=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(i)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${i}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(R4,"n$"),o(R4,"classifyEvent");var h={};Se(h,{$brand:s(()=>P4,"$brand"),$input:s(()=>Dg,"$input"),$output:s(()=>Eg,"$output"),NEVER:s(()=>N4,"NEVER"),TimePrecision:s(()=>Bg,"TimePrecision"),ZodAny:s(()=>Wo,"ZodAny"),ZodArray:s(()=>t0,"ZodArray"),ZodBase64:s(()=>En,"ZodBase64"),ZodBase64URL:s(()=>Dn,"ZodBase64URL"),ZodBigInt:s(()=>Tu,"ZodBigInt"),ZodBigIntFormat:s(()=>xn,"ZodBigIntFormat"),ZodBoolean:s(()=>Ou,"ZodBoolean"),ZodCIDRv4:s(()=>vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>yn,"ZodCIDRv6"),ZodCUID:s(()=>dn,"ZodCUID"),ZodCUID2:s(()=>cn,"ZodCUID2"),ZodCatch:s(()=>S0,"ZodCatch"),ZodCodec:s(()=>Ju,"ZodCodec"),ZodCustom:s(()=>Wu,"ZodCustom"),ZodCustomStringFormat:s(()=>_t,"ZodCustomStringFormat"),ZodDate:s(()=>kn,"ZodDate"),ZodDefault:s(()=>k0,"ZodDefault"),ZodDiscriminatedUnion:s(()=>o0,"ZodDiscriminatedUnion"),ZodE164:s(()=>bn,"ZodE164"),ZodEmail:s(()=>an,"ZodEmail"),ZodEmoji:s(()=>on,"ZodEmoji"),ZodEnum:s(()=>Ft,"ZodEnum"),ZodError:s(()=>QE,"ZodError"),ZodExactOptional:s(()=>C0,"ZodExactOptional"),ZodFile:s(()=>b0,"ZodFile"),ZodFirstPartyTypeKind:s(()=>K0,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>L0,"ZodFunction"),ZodGUID:s(()=>Fu,"ZodGUID"),ZodIPv4:s(()=>gn,"ZodIPv4"),ZodIPv6:s(()=>hn,"ZodIPv6"),ZodISODate:s(()=>eo,"ZodISODate"),ZodISODateTime:s(()=>Ya,"ZodISODateTime"),ZodISODuration:s(()=>no,"ZodISODuration"),ZodISOTime:s(()=>uo,"ZodISOTime"),ZodIntersection:s(()=>d0,"ZodIntersection"),ZodIssueCode:s(()=>e5,"ZodIssueCode"),ZodJWT:s(()=>Bn,"ZodJWT"),ZodKSUID:s(()=>fn,"ZodKSUID"),ZodLazy:s(()=>U0,"ZodLazy"),ZodLiteral:s(()=>E0,"ZodLiteral"),ZodMAC:s(()=>wo,"ZodMAC"),ZodMap:s(()=>f0,"ZodMap"),ZodNaN:s(()=>F0,"ZodNaN"),ZodNanoID:s(()=>ln,"ZodNanoID"),ZodNever:s(()=>Xo,"ZodNever"),ZodNonOptional:s(()=>Rn,"ZodNonOptional"),ZodNull:s(()=>Go,"ZodNull"),ZodNullable:s(()=>x0,"ZodNullable"),ZodNumber:s(()=>ju,"ZodNumber"),ZodNumberFormat:s(()=>at,"ZodNumberFormat"),ZodObject:s(()=>Pu,"ZodObject"),ZodOptional:s(()=>Sn,"ZodOptional"),ZodPipe:s(()=>qu,"ZodPipe"),ZodPrefault:s(()=>A0,"ZodPrefault"),ZodPreprocess:s(()=>O0,"ZodPreprocess"),ZodPromise:s(()=>M0,"ZodPromise"),ZodReadonly:s(()=>T0,"ZodReadonly"),ZodRealError:s(()=>De,"ZodRealError"),ZodRecord:s(()=>St,"ZodRecord"),ZodSet:s(()=>h0,"ZodSet"),ZodString:s(()=>Su,"ZodString"),ZodStringFormat:s(()=>ee,"ZodStringFormat"),ZodSuccess:s(()=>_0,"ZodSuccess"),ZodSymbol:s(()=>Lo,"ZodSymbol"),ZodTemplateLiteral:s(()=>N0,"ZodTemplateLiteral"),ZodTransform:s(()=>w0,"ZodTransform"),ZodTuple:s(()=>c0,"ZodTuple"),ZodType:s(()=>V,"ZodType"),ZodULID:s(()=>mn,"ZodULID"),ZodURL:s(()=>zu,"ZodURL"),ZodUUID:s(()=>Ae,"ZodUUID"),ZodUndefined:s(()=>Vo,"ZodUndefined"),ZodUnion:s(()=>Uu,"ZodUnion"),ZodUnknown:s(()=>Ho,"ZodUnknown"),ZodVoid:s(()=>Yo,"ZodVoid"),ZodXID:s(()=>pn,"ZodXID"),ZodXor:s(()=>s0,"ZodXor"),_ZodString:s(()=>sn,"_ZodString"),_default:s(()=>zn,"_default"),_function:s(()=>Gu,"_function"),any:s(()=>Ko,"any"),array:s(()=>It,"array"),base64:s(()=>Ao,"base64"),base64url:s(()=>_o,"base64url"),bigint:s(()=>Uo,"bigint"),boolean:s(()=>Cn,"boolean"),catch:s(()=>Tn,"catch"),check:s(()=>q0,"check"),cidrv4:s(()=>$o,"cidrv4"),cidrv6:s(()=>ko,"cidrv6"),clone:s(()=>he,"clone"),codec:s(()=>j0,"codec"),coerce:s(()=>e1,"coerce"),config:s(()=>de,"config"),core:s(()=>O4,"core"),cuid:s(()=>vo,"cuid"),cuid2:s(()=>yo,"cuid2"),custom:s(()=>V0,"custom"),date:s(()=>e0,"date"),decode:s(()=>Nh,"decode"),decodeAsync:s(()=>Uh,"decodeAsync"),describe:s(()=>Jh,"describe"),discriminatedUnion:s(()=>l0,"discriminatedUnion"),e164:s(()=>Io,"e164"),email:s(()=>so,"email"),emoji:s(()=>go,"emoji"),encode:s(()=>Th,"encode"),encodeAsync:s(()=>Ph,"encodeAsync"),endsWith:s(()=>wu,"endsWith"),enum:s(()=>Zu,"enum"),exactOptional:s(()=>Fn,"exactOptional"),file:s(()=>B0,"file"),flattenError:s(()=>Ar,"flattenError"),float32:s(()=>Oo,"float32"),float64:s(()=>To,"float64"),formatError:s(()=>_r,"formatError"),fromJSONSchema:s(()=>Qh,"fromJSONSchema"),function:s(()=>Gu,"function"),getErrorMap:s(()=>Hh,"getErrorMap"),globalRegistry:s(()=>Be,"globalRegistry"),gt:s(()=>je,"gt"),gte:s(()=>pe,"gte"),guid:s(()=>ao,"guid"),hash:s(()=>Ro,"hash"),hex:s(()=>jo,"hex"),hostname:s(()=>zo,"hostname"),httpUrl:s(()=>fo,"httpUrl"),includes:s(()=>bu,"includes"),instanceof:s(()=>J0,"instanceof"),int:s(()=>Ru,"int"),int32:s(()=>No,"int32"),int64:s(()=>Mo,"int64"),intersection:s(()=>An,"intersection"),invertCodec:s(()=>R0,"invertCodec"),ipv4:s(()=>Bo,"ipv4"),ipv6:s(()=>xo,"ipv6"),iso:s(()=>Xa,"iso"),json:s(()=>G0,"json"),jwt:s(()=>So,"jwt"),keyof:s(()=>u0,"keyof"),ksuid:s(()=>bo,"ksuid"),lazy:s(()=>Pn,"lazy"),length:s(()=>xt,"length"),literal:s(()=>D0,"literal"),locales:s(()=>ea,"locales"),looseObject:s(()=>i0,"looseObject"),looseRecord:s(()=>p0,"looseRecord"),lowercase:s(()=>Eu,"lowercase"),lt:s(()=>ze,"lt"),lte:s(()=>Ee,"lte"),mac:s(()=>Co,"mac"),map:s(()=>g0,"map"),maxLength:s(()=>Ct,"maxLength"),maxSize:s(()=>rt,"maxSize"),meta:s(()=>Gh,"meta"),mime:s(()=>Cu,"mime"),minLength:s(()=>Ze,"minLength"),minSize:s(()=>Re,"minSize"),multipleOf:s(()=>ut,"multipleOf"),nan:s(()=>z0,"nan"),nanoid:s(()=>ho,"nanoid"),nativeEnum:s(()=>y0,"nativeEnum"),negative:s(()=>tn,"negative"),never:s(()=>Nu,"never"),nonnegative:s(()=>rn,"nonnegative"),nonoptional:s(()=>On,"nonoptional"),nonpositive:s(()=>un,"nonpositive"),normalize:s(()=>xu,"normalize"),null:s(()=>$n,"null"),nullable:s(()=>jt,"nullable"),nullish:s(()=>$0,"nullish"),number:s(()=>wn,"number"),object:s(()=>r0,"object"),optional:s(()=>zt,"optional"),overwrite:s(()=>ke,"overwrite"),parse:s(()=>zh,"parse"),parseAsync:s(()=>jh,"parseAsync"),partialRecord:s(()=>m0,"partialRecord"),pipe:s(()=>Vu,"pipe"),positive:s(()=>en,"positive"),prefault:s(()=>jn,"prefault"),preprocess:s(()=>W0,"preprocess"),prettifyError:s(()=>ls,"prettifyError"),promise:s(()=>Z0,"promise"),property:s(()=>nn,"property"),readonly:s(()=>Nn,"readonly"),record:s(()=>In,"record"),refine:s(()=>Un,"refine"),regex:s(()=>yu,"regex"),regexes:s(()=>Me,"regexes"),registry:s(()=>zr,"registry"),safeDecode:s(()=>Zh,"safeDecode"),safeDecodeAsync:s(()=>qh,"safeDecodeAsync"),safeEncode:s(()=>Mh,"safeEncode"),safeEncodeAsync:s(()=>Lh,"safeEncodeAsync"),safeParse:s(()=>Rh,"safeParse"),safeParseAsync:s(()=>Oh,"safeParseAsync"),set:s(()=>v0,"set"),setErrorMap:s(()=>Kh,"setErrorMap"),size:s(()=>wt,"size"),slugify:s(()=>_u,"slugify"),startsWith:s(()=>Bu,"startsWith"),strictObject:s(()=>n0,"strictObject"),string:s(()=>At,"string"),stringFormat:s(()=>Fo,"stringFormat"),stringbool:s(()=>Wh,"stringbool"),success:s(()=>I0,"success"),superRefine:s(()=>Mn,"superRefine"),symbol:s(()=>qo,"symbol"),templateLiteral:s(()=>P0,"templateLiteral"),toJSONSchema:s(()=>Ha,"toJSONSchema"),toLowerCase:s(()=>ku,"toLowerCase"),toUpperCase:s(()=>Au,"toUpperCase"),transform:s(()=>Lu,"transform"),treeifyError:s(()=>as,"treeifyError"),trim:s(()=>$u,"trim"),tuple:s(()=>_n,"tuple"),uint32:s(()=>Po,"uint32"),uint64:s(()=>Zo,"uint64"),ulid:s(()=>Eo,"ulid"),undefined:s(()=>Jo,"undefined"),union:s(()=>Mu,"union"),unknown:s(()=>Le,"unknown"),uppercase:s(()=>Du,"uppercase"),url:s(()=>po,"url"),util:s(()=>W,"util"),uuid:s(()=>oo,"uuid"),uuidv4:s(()=>lo,"uuidv4"),uuidv6:s(()=>co,"uuidv6"),uuidv7:s(()=>mo,"uuidv7"),void:s(()=>Qo,"void"),xid:s(()=>Do,"xid"),xor:s(()=>a0,"xor")});var O4={};Se(O4,{$ZodAny:s(()=>Lp,"$ZodAny"),$ZodArray:s(()=>Wp,"$ZodArray"),$ZodAsyncError:s(()=>Qe,"$ZodAsyncError"),$ZodBase64:s(()=>zp,"$ZodBase64"),$ZodBase64URL:s(()=>jp,"$ZodBase64URL"),$ZodBigInt:s(()=>zs,"$ZodBigInt"),$ZodBigIntFormat:s(()=>Pp,"$ZodBigIntFormat"),$ZodBoolean:s(()=>Fs,"$ZodBoolean"),$ZodCIDRv4:s(()=>Sp,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>Fp,"$ZodCIDRv6"),$ZodCUID:s(()=>Ep,"$ZodCUID"),$ZodCUID2:s(()=>Dp,"$ZodCUID2"),$ZodCatch:s(()=>ff,"$ZodCatch"),$ZodCheck:s(()=>te,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>Km,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>ap,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>ks,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>ip,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>tp,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>$s,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>rp,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>Qm,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>Hm,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>lp,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>ep,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>Xm,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>Gm,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>Wm,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>dp,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>op,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>up,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>Ym,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>sp,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>lu,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>np,"$ZodCheckUpperCase"),$ZodCodec:s(()=>Xs,"$ZodCodec"),$ZodCustom:s(()=>Bf,"$ZodCustom"),$ZodCustomStringFormat:s(()=>Tp,"$ZodCustomStringFormat"),$ZodDate:s(()=>Gp,"$ZodDate"),$ZodDefault:s(()=>df,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>Yp,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>Rp,"$ZodE164"),$ZodEmail:s(()=>gp,"$ZodEmail"),$ZodEmoji:s(()=>vp,"$ZodEmoji"),$ZodEncodeError:s(()=>Cr,"$ZodEncodeError"),$ZodEnum:s(()=>rf,"$ZodEnum"),$ZodError:s(()=>ss,"$ZodError"),$ZodExactOptional:s(()=>of,"$ZodExactOptional"),$ZodFile:s(()=>sf,"$ZodFile"),$ZodFunction:s(()=>Ef,"$ZodFunction"),$ZodGUID:s(()=>pp,"$ZodGUID"),$ZodIPv4:s(()=>Ap,"$ZodIPv4"),$ZodIPv6:s(()=>_p,"$ZodIPv6"),$ZodISODate:s(()=>xp,"$ZodISODate"),$ZodISODateTime:s(()=>Cp,"$ZodISODateTime"),$ZodISODuration:s(()=>kp,"$ZodISODuration"),$ZodISOTime:s(()=>$p,"$ZodISOTime"),$ZodIntersection:s(()=>Qp,"$ZodIntersection"),$ZodJWT:s(()=>Op,"$ZodJWT"),$ZodKSUID:s(()=>wp,"$ZodKSUID"),$ZodLazy:s(()=>bf,"$ZodLazy"),$ZodLiteral:s(()=>nf,"$ZodLiteral"),$ZodMAC:s(()=>Ip,"$ZodMAC"),$ZodMap:s(()=>tf,"$ZodMap"),$ZodNaN:s(()=>gf,"$ZodNaN"),$ZodNanoID:s(()=>yp,"$ZodNanoID"),$ZodNever:s(()=>Vp,"$ZodNever"),$ZodNonOptional:s(()=>mf,"$ZodNonOptional"),$ZodNull:s(()=>Zp,"$ZodNull"),$ZodNullable:s(()=>lf,"$ZodNullable"),$ZodNumber:s(()=>Ss,"$ZodNumber"),$ZodNumberFormat:s(()=>Np,"$ZodNumberFormat"),$ZodObject:s(()=>Kp,"$ZodObject"),$ZodObjectJIT:s(()=>Hp,"$ZodObjectJIT"),$ZodOptional:s(()=>Gs,"$ZodOptional"),$ZodPipe:s(()=>Hs,"$ZodPipe"),$ZodPrefault:s(()=>cf,"$ZodPrefault"),$ZodPreprocess:s(()=>hf,"$ZodPreprocess"),$ZodPromise:s(()=>Df,"$ZodPromise"),$ZodReadonly:s(()=>vf,"$ZodReadonly"),$ZodRealError:s(()=>ye,"$ZodRealError"),$ZodRecord:s(()=>ef,"$ZodRecord"),$ZodRegistry:s(()=>bg,"$ZodRegistry"),$ZodSet:s(()=>uf,"$ZodSet"),$ZodString:s(()=>du,"$ZodString"),$ZodStringFormat:s(()=>Q,"$ZodStringFormat"),$ZodSuccess:s(()=>pf,"$ZodSuccess"),$ZodSymbol:s(()=>Up,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>yf,"$ZodTemplateLiteral"),$ZodTransform:s(()=>af,"$ZodTransform"),$ZodTuple:s(()=>Us,"$ZodTuple"),$ZodType:s(()=>L,"$ZodType"),$ZodULID:s(()=>bp,"$ZodULID"),$ZodURL:s(()=>hp,"$ZodURL"),$ZodUUID:s(()=>fp,"$ZodUUID"),$ZodUndefined:s(()=>Mp,"$ZodUndefined"),$ZodUnion:s(()=>Sr,"$ZodUnion"),$ZodUnknown:s(()=>qp,"$ZodUnknown"),$ZodVoid:s(()=>Jp,"$ZodVoid"),$ZodXID:s(()=>Bp,"$ZodXID"),$ZodXor:s(()=>Xp,"$ZodXor"),$brand:s(()=>P4,"$brand"),$constructor:s(()=>b,"$constructor"),$input:s(()=>Dg,"$input"),$output:s(()=>Eg,"$output"),Doc:s(()=>cp,"Doc"),JSONSchema:s(()=>YE,"JSONSchema"),JSONSchemaGenerator:s(()=>XE,"JSONSchemaGenerator"),NEVER:s(()=>N4,"NEVER"),TimePrecision:s(()=>Bg,"TimePrecision"),_any:s(()=>Sa,"_any"),_array:s(()=>Na,"_array"),_base64:s(()=>Hr,"_base64"),_base64url:s(()=>Xr,"_base64url"),_bigint:s(()=>Ca,"_bigint"),_boolean:s(()=>Ba,"_boolean"),_catch:s(()=>Ug,"_catch"),_check:s(()=>La,"_check"),_cidrv4:s(()=>Wr,"_cidrv4"),_cidrv6:s(()=>Kr,"_cidrv6"),_coercedBigint:s(()=>xa,"_coercedBigint"),_coercedBoolean:s(()=>wa,"_coercedBoolean"),_coercedDate:s(()=>Oa,"_coercedDate"),_coercedNumber:s(()=>ha,"_coercedNumber"),_coercedString:s(()=>la,"_coercedString"),_cuid:s(()=>Mr,"_cuid"),_cuid2:s(()=>Zr,"_cuid2"),_custom:s(()=>Ua,"_custom"),_date:s(()=>Ra,"_date"),_decode:s(()=>ps,"_decode"),_decodeAsync:s(()=>gs,"_decodeAsync"),_default:s(()=>Tg,"_default"),_discriminatedUnion:s(()=>xg,"_discriminatedUnion"),_e164:s(()=>Yr,"_e164"),_email:s(()=>jr,"_email"),_emoji:s(()=>Pr,"_emoji"),_encode:s(()=>ms,"_encode"),_encodeAsync:s(()=>fs,"_encodeAsync"),_endsWith:s(()=>wu,"_endsWith"),_enum:s(()=>Sg,"_enum"),_file:s(()=>Pa,"_file"),_float32:s(()=>ya,"_float32"),_float64:s(()=>Ea,"_float64"),_gt:s(()=>je,"_gt"),_gte:s(()=>pe,"_gte"),_guid:s(()=>hu,"_guid"),_includes:s(()=>bu,"_includes"),_int:s(()=>va,"_int"),_int32:s(()=>Da,"_int32"),_int64:s(()=>$a,"_int64"),_intersection:s(()=>$g,"_intersection"),_ipv4:s(()=>Jr,"_ipv4"),_ipv6:s(()=>Gr,"_ipv6"),_isoDate:s(()=>ma,"_isoDate"),_isoDateTime:s(()=>ca,"_isoDateTime"),_isoDuration:s(()=>fa,"_isoDuration"),_isoTime:s(()=>pa,"_isoTime"),_jwt:s(()=>Qr,"_jwt"),_ksuid:s(()=>Vr,"_ksuid"),_lazy:s(()=>qg,"_lazy"),_length:s(()=>xt,"_length"),_literal:s(()=>zg,"_literal"),_lowercase:s(()=>Eu,"_lowercase"),_lt:s(()=>ze,"_lt"),_lte:s(()=>Ee,"_lte"),_mac:s(()=>da,"_mac"),_map:s(()=>_g,"_map"),_max:s(()=>Ee,"_max"),_maxLength:s(()=>Ct,"_maxLength"),_maxSize:s(()=>rt,"_maxSize"),_mime:s(()=>Cu,"_mime"),_min:s(()=>pe,"_min"),_minLength:s(()=>Ze,"_minLength"),_minSize:s(()=>Re,"_minSize"),_multipleOf:s(()=>ut,"_multipleOf"),_nan:s(()=>Ta,"_nan"),_nanoid:s(()=>Ur,"_nanoid"),_nativeEnum:s(()=>Fg,"_nativeEnum"),_negative:s(()=>tn,"_negative"),_never:s(()=>za,"_never"),_nonnegative:s(()=>rn,"_nonnegative"),_nonoptional:s(()=>Ng,"_nonoptional"),_nonpositive:s(()=>un,"_nonpositive"),_normalize:s(()=>xu,"_normalize"),_null:s(()=>Ia,"_null"),_nullable:s(()=>Og,"_nullable"),_number:s(()=>ga,"_number"),_optional:s(()=>Rg,"_optional"),_overwrite:s(()=>ke,"_overwrite"),_parse:s(()=>iu,"_parse"),_parseAsync:s(()=>su,"_parseAsync"),_pipe:s(()=>Mg,"_pipe"),_positive:s(()=>en,"_positive"),_promise:s(()=>Vg,"_promise"),_property:s(()=>nn,"_property"),_readonly:s(()=>Zg,"_readonly"),_record:s(()=>Ag,"_record"),_refine:s(()=>Ma,"_refine"),_regex:s(()=>yu,"_regex"),_safeDecode:s(()=>vs,"_safeDecode"),_safeDecodeAsync:s(()=>Es,"_safeDecodeAsync"),_safeEncode:s(()=>hs,"_safeEncode"),_safeEncodeAsync:s(()=>ys,"_safeEncodeAsync"),_safeParse:s(()=>au,"_safeParse"),_safeParseAsync:s(()=>ou,"_safeParseAsync"),_set:s(()=>Ig,"_set"),_size:s(()=>wt,"_size"),_slugify:s(()=>_u,"_slugify"),_startsWith:s(()=>Bu,"_startsWith"),_string:s(()=>oa,"_string"),_stringFormat:s(()=>$t,"_stringFormat"),_stringbool:s(()=>Ja,"_stringbool"),_success:s(()=>Pg,"_success"),_superRefine:s(()=>Za,"_superRefine"),_symbol:s(()=>Aa,"_symbol"),_templateLiteral:s(()=>Lg,"_templateLiteral"),_toLowerCase:s(()=>ku,"_toLowerCase"),_toUpperCase:s(()=>Au,"_toUpperCase"),_transform:s(()=>jg,"_transform"),_trim:s(()=>$u,"_trim"),_tuple:s(()=>kg,"_tuple"),_uint32:s(()=>ba,"_uint32"),_uint64:s(()=>ka,"_uint64"),_ulid:s(()=>Lr,"_ulid"),_undefined:s(()=>_a,"_undefined"),_union:s(()=>wg,"_union"),_unknown:s(()=>Fa,"_unknown"),_uppercase:s(()=>Du,"_uppercase"),_url:s(()=>vu,"_url"),_uuid:s(()=>Rr,"_uuid"),_uuidv4:s(()=>Or,"_uuidv4"),_uuidv6:s(()=>Tr,"_uuidv6"),_uuidv7:s(()=>Nr,"_uuidv7"),_void:s(()=>ja,"_void"),_xid:s(()=>qr,"_xid"),_xor:s(()=>Cg,"_xor"),clone:s(()=>he,"clone"),config:s(()=>de,"config"),createStandardJSONSchemaMethod:s(()=>Iu,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>Jg,"createToJSONSchemaMethod"),decode:s(()=>Dy,"decode"),decodeAsync:s(()=>By,"decodeAsync"),describe:s(()=>qa,"describe"),encode:s(()=>Ey,"encode"),encodeAsync:s(()=>by,"encodeAsync"),extractDefs:s(()=>it,"extractDefs"),finalize:s(()=>st,"finalize"),flattenError:s(()=>Ar,"flattenError"),formatError:s(()=>_r,"formatError"),globalConfig:s(()=>Qt,"globalConfig"),globalRegistry:s(()=>Be,"globalRegistry"),initializeContext:s(()=>nt,"initializeContext"),isValidBase64:s(()=>Ir,"isValidBase64"),isValidBase64URL:s(()=>_s,"isValidBase64URL"),isValidJWT:s(()=>Is,"isValidJWT"),locales:s(()=>ea,"locales"),meta:s(()=>Va,"meta"),parse:s(()=>ds,"parse"),parseAsync:s(()=>cs,"parseAsync"),prettifyError:s(()=>ls,"prettifyError"),process:s(()=>X,"process"),regexes:s(()=>Me,"regexes"),registry:s(()=>zr,"registry"),safeDecode:s(()=>Cy,"safeDecode"),safeDecodeAsync:s(()=>$y,"safeDecodeAsync"),safeEncode:s(()=>wy,"safeEncode"),safeEncodeAsync:s(()=>xy,"safeEncodeAsync"),safeParse:s(()=>hm,"safeParse"),safeParseAsync:s(()=>vm,"safeParseAsync"),toDotPath:s(()=>os,"toDotPath"),toJSONSchema:s(()=>Ha,"toJSONSchema"),treeifyError:s(()=>as,"treeifyError"),util:s(()=>W,"util"),version:s(()=>mp,"version")});var T4,N4=Object.freeze({status:"aborted"});function b(e,t,r){function i(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let c=a.prototype,m=Object.keys(c);for(let f=0;f<m.length;f++){let p=m[f];p in l||(l[p]=c[p].bind(l))}}s(i,"o"),o(i,"init");let u=r?.Parent??Object;class n extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(n,"name",{value:e});function a(l){var d;let c=r?.Parent?new n:this;i(c,l),(d=c._zod).deferred??(d.deferred=[]);for(let m of c._zod.deferred)m();return c}return s(a,"a"),o(a,"_"),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(b,"_"),o(b,"$constructor");var P4=Symbol("zod_brand"),Qe=class extends Error{static{s(this,"Ne")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Cr=class extends Error{static{s(this,"He")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(T4=globalThis).__zod_globalConfig??(T4.__zod_globalConfig={});var Qt=globalThis.__zod_globalConfig;function de(e){return e&&Object.assign(Qt,e),Qt}s(de,"ne"),o(de,"config");var W={};Se(W,{BIGINT_FORMAT_RANGES:s(()=>um,"BIGINT_FORMAT_RANGES"),Class:s(()=>yy,"Class"),NUMBER_FORMAT_RANGES:s(()=>tm,"NUMBER_FORMAT_RANGES"),aborted:s(()=>Ue,"aborted"),allowsEval:s(()=>X4,"allowsEval"),assert:s(()=>q4,"assert"),assertEqual:s(()=>U4,"assertEqual"),assertIs:s(()=>Z4,"assertIs"),assertNever:s(()=>L4,"assertNever"),assertNotEqual:s(()=>M4,"assertNotEqual"),assignProp:s(()=>Fe,"assignProp"),base64ToUint8Array:s(()=>ns,"base64ToUint8Array"),base64urlToUint8Array:s(()=>cm,"base64urlToUint8Array"),cached:s(()=>yt,"cached"),captureStackTrace:s(()=>es,"captureStackTrace"),cleanEnum:s(()=>dm,"cleanEnum"),cleanRegex:s(()=>tu,"cleanRegex"),clone:s(()=>he,"clone"),cloneDef:s(()=>G4,"cloneDef"),createTransparentProxy:s(()=>em,"createTransparentProxy"),defineLazy:s(()=>G,"defineLazy"),esc:s(()=>$r,"esc"),escapeRegex:s(()=>$e,"escapeRegex"),explicitlyAborted:s(()=>rs,"explicitlyAborted"),extend:s(()=>im,"extend"),finalizeIssue:s(()=>fe,"finalizeIssue"),floatSafeRemainder:s(()=>Yi,"floatSafeRemainder"),getElementAtPath:s(()=>W4,"getElementAtPath"),getEnumValues:s(()=>xr,"getEnumValues"),getLengthableOrigin:s(()=>ru,"getLengthableOrigin"),getParsedType:s(()=>vy,"getParsedType"),getSizableOrigin:s(()=>uu,"getSizableOrigin"),hexToUint8Array:s(()=>pm,"hexToUint8Array"),isObject:s(()=>et,"isObject"),isPlainObject:s(()=>Pe,"isPlainObject"),issue:s(()=>nu,"issue"),joinValues:s(()=>A,"joinValues"),jsonStringifyReplacer:s(()=>eu,"jsonStringifyReplacer"),merge:s(()=>am,"merge"),mergeDefs:s(()=>xe,"mergeDefs"),normalizeParams:s(()=>S,"normalizeParams"),nullish:s(()=>Ne,"nullish"),numKeys:s(()=>Y4,"numKeys"),objectClone:s(()=>J4,"objectClone"),omit:s(()=>nm,"omit"),optionalKeys:s(()=>us,"optionalKeys"),parsedType:s(()=>M,"parsedType"),partial:s(()=>om,"partial"),pick:s(()=>rm,"pick"),prefixIssues:s(()=>ve,"prefixIssues"),primitiveTypes:s(()=>Q4,"primitiveTypes"),promiseAllObject:s(()=>K4,"promiseAllObject"),propertyKeyTypes:s(()=>kr,"propertyKeyTypes"),randomString:s(()=>H4,"randomString"),required:s(()=>lm,"required"),safeExtend:s(()=>sm,"safeExtend"),shallowClone:s(()=>ts,"shallowClone"),slugify:s(()=>Qi,"slugify"),stringifyPrimitive:s(()=>P,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>is,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>mm,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>fm,"uint8ArrayToHex"),unwrapMessage:s(()=>Et,"unwrapMessage")});function U4(e){return e}s(U4,"o$"),o(U4,"assertEqual");function M4(e){return e}s(M4,"i$"),o(M4,"assertNotEqual");function Z4(e){}s(Z4,"s$"),o(Z4,"assertIs");function L4(e){throw new Error("Unexpected value in exhaustive check")}s(L4,"a$"),o(L4,"assertNever");function q4(e){}s(q4,"c$"),o(q4,"assert");function xr(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}s(xr,"zr"),o(xr,"getEnumValues");function A(e,t="|"){return e.map(r=>P(r)).join(t)}s(A,"k"),o(A,"joinValues");function eu(e,t){return typeof t=="bigint"?t.toString():t}s(eu,"Mt"),o(eu,"jsonStringifyReplacer");function yt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(yt,"Ct"),o(yt,"cached");function Ne(e){return e==null}s(Ne,"Ye"),o(Ne,"nullish");function tu(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(tu,"jr"),o(tu,"cleanRegex");function Yi(e,t){let r=e/t,i=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<u?0:r-i}s(Yi,"ya"),o(Yi,"floatSafeRemainder");var V4=Symbol("evaluating");function G(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==V4)return i===void 0&&(i=V4,i=r()),i},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(G,"q"),o(G,"defineLazy");function J4(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(J4,"u$"),o(J4,"objectClone");function Fe(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(Fe,"Qe"),o(Fe,"assignProp");function xe(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}s(xe,"Je"),o(xe,"mergeDefs");function G4(e){return xe(e._zod.def)}s(G4,"l$"),o(G4,"cloneDef");function W4(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}s(W4,"d$"),o(W4,"getElementAtPath");function K4(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let u={};for(let n=0;n<t.length;n++)u[t[n]]=i[n];return u})}s(K4,"p$"),o(K4,"promiseAllObject");function H4(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}s(H4,"m$"),o(H4,"randomString");function $r(e){return JSON.stringify(e)}s($r,"wo"),o($r,"esc");function Qi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(Qi,"ba"),o(Qi,"slugify");var es="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function et(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(et,"bt"),o(et,"isObject");var X4=yt(()=>{if(Qt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Pe(e){if(et(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(et(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(Pe,"et"),o(Pe,"isPlainObject");function ts(e){return Pe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(ts,"_a"),o(ts,"shallowClone");function Y4(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(Y4,"f$"),o(Y4,"numKeys");var vy=o(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}`)}},"getParsedType"),kr=new Set(["string","number","symbol"]),Q4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s($e,"Ae"),o($e,"escapeRegex");function he(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}s(he,"ge"),o(he,"clone");function S(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};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:o(()=>t.error,"error")}:t}s(S,"N"),o(S,"normalizeParams");function em(e){let t;return new Proxy({},{get(r,i,u){return t??(t=e()),Reflect.get(t,i,u)},set(r,i,u,n){return t??(t=e()),Reflect.set(t,i,u,n)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,u){return t??(t=e()),Reflect.defineProperty(t,i,u)}})}s(em,"h$"),o(em,"createTransparentProxy");function P(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(P,"j"),o(P,"stringifyPrimitive");function us(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(us,"$a"),o(us,"optionalKeys");var tm={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]},um={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function rm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=xe(e._zod.def,{get shape(){let n={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Fe(this,"shape",n),n},checks:[]});return he(e,u)}s(rm,"v$"),o(rm,"pick");function nm(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=xe(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Fe(this,"shape",n),n},checks:[]});return he(e,u)}s(nm,"y$"),o(nm,"omit");function im(e,t){if(!Pe(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let n in t)if(Object.getOwnPropertyDescriptor(u,n)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=xe(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return Fe(this,"shape",u),u}});return he(e,i)}s(im,"b$"),o(im,"extend");function sm(e,t){if(!Pe(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=xe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Fe(this,"shape",i),i}});return he(e,r)}s(sm,"x$"),o(sm,"safeExtend");function am(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=xe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Fe(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return he(e,r)}s(am,"_$"),o(am,"merge");function om(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=xe(t._zod.def,{get shape(){let n=t._zod.def.shape,a={...n};if(r)for(let l in r){if(!(l in n))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:n[l]}):n[l])}else for(let l in n)a[l]=e?new e({type:"optional",innerType:n[l]}):n[l];return Fe(this,"shape",a),a},checks:[]});return he(t,u)}s(om,"w$"),o(om,"partial");function lm(e,t,r){let i=xe(t._zod.def,{get shape(){let u=t._zod.def.shape,n={...u};if(r)for(let a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(n[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)n[a]=new e({type:"nonoptional",innerType:u[a]});return Fe(this,"shape",n),n}});return he(t,i)}s(lm,"$$"),o(lm,"required");function Ue(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(Ue,"tt"),o(Ue,"aborted");function rs(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(rs,"Ia"),o(rs,"explicitlyAborted");function ve(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}s(ve,"be"),o(ve,"prefixIssues");function Et(e){return typeof e=="string"?e:e?.message}s(Et,"Ar"),o(Et,"unwrapMessage");function fe(e,t,r){let i=e.message?e.message:Et(e.inst?._zod.def?.error?.(e))??Et(t?.error?.(e))??Et(r.customError?.(e))??Et(r.localeError?.(e))??"Invalid input",{inst:u,continue:n,input:a,...l}=e;return l.path??(l.path=[]),l.message=i,t?.reportInput&&(l.input=a),l}s(fe,"he"),o(fe,"finalizeIssue");function uu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(uu,"Pr"),o(uu,"getSizableOrigin");function ru(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(ru,"Nr"),o(ru,"getLengthableOrigin");function M(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(M,"O"),o(M,"parsedType");function nu(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}s(nu,"Ut"),o(nu,"issue");function dm(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(dm,"k$"),o(dm,"cleanEnum");function ns(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}s(ns,"ay"),o(ns,"base64ToUint8Array");function is(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s(is,"cy"),o(is,"uint8ArrayToBase64");function cm(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return ns(t+r)}s(cm,"S$"),o(cm,"base64urlToUint8Array");function mm(e){return is(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(mm,"I$"),o(mm,"uint8ArrayToBase64url");function pm(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}s(pm,"R$"),o(pm,"hexToUint8Array");function fm(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(fm,"T$"),o(fm,"uint8ArrayToHex");var yy=class{static{s(this,"va")}static{o(this,"Class")}constructor(...e){}},gm=o((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,eu,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),ss=b("$ZodError",gm),ye=b("$ZodError",gm,{Parent:Error});function Ar(e,t=r=>r.message){let r={},i=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):i.push(t(u));return{formErrors:i,fieldErrors:r}}s(Ar,"Mr"),o(Ar,"flattenError");function _r(e,t=r=>r.message){let r={_errors:[]},i=o((u,n=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},[...n,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...n,...a.path]);else{let l=[...n,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,c=0;for(;c<l.length;){let m=l[c];c===l.length-1?(d[m]=d[m]||{_errors:[]},d[m]._errors.push(t(a))):d[m]=d[m]||{_errors:[]},d=d[m],c++}}}},"processError");return i(e),r}s(_r,"Cr"),o(_r,"formatError");function as(e,t=r=>r.message){let r={errors:[]},i=o((u,n=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(c=>i({issues:c},[...n,...d.path]));else if(d.code==="invalid_key")i({issues:d.issues},[...n,...d.path]);else if(d.code==="invalid_element")i({issues:d.issues},[...n,...d.path]);else{let c=[...n,...d.path];if(c.length===0){r.errors.push(t(d));continue}let m=r,f=0;for(;f<c.length;){let p=c[f],g=f===c.length-1;typeof p=="string"?(m.properties??(m.properties={}),(a=m.properties)[p]??(a[p]={errors:[]}),m=m.properties[p]):(m.items??(m.items=[]),(l=m.items)[p]??(l[p]={errors:[]}),m=m.items[p]),g&&m.errors.push(t(d)),f++}}},"processError");return i(e),r}s(as,"Ra"),o(as,"treeifyError");function os(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}s(os,"ly"),o(os,"toDotPath");function ls(e){let t=[],r=[...e.issues].sort((i,u)=>(i.path??[]).length-(u.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${os(i.path)}`);return t.join(`
2
- `)}s(ls,"Ta"),o(ls,"prettifyError");var iu=o(e=>(t,r,i,u)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new Qe;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>fe(d,n,de())));throw es(l,u?.callee),l}return a.value},"_parse"),ds=iu(ye),su=o(e=>async(t,r,i,u)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>fe(d,n,de())));throw es(l,u?.callee),l}return a.value},"_parseAsync"),cs=su(ye),au=o(e=>(t,r,i)=>{let u=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},u);if(n instanceof Promise)throw new Qe;return n.issues.length?{success:!1,error:new(e??ss)(n.issues.map(a=>fe(a,u,de())))}:{success:!0,data:n.value}},"_safeParse"),hm=au(ye),ou=o(e=>async(t,r,i)=>{let u=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},u);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>fe(a,u,de())))}:{success:!0,data:n.value}},"_safeParseAsync"),vm=ou(ye),ms=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return iu(e)(t,r,u)},"_encode"),Ey=ms(ye),ps=o(e=>(t,r,i)=>iu(e)(t,r,i),"_decode"),Dy=ps(ye),fs=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return su(e)(t,r,u)},"_encodeAsync"),by=fs(ye),gs=o(e=>async(t,r,i)=>su(e)(t,r,i),"_decodeAsync"),By=gs(ye),hs=o(e=>(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return au(e)(t,r,u)},"_safeEncode"),wy=hs(ye),vs=o(e=>(t,r,i)=>au(e)(t,r,i),"_safeDecode"),Cy=vs(ye),ys=o(e=>async(t,r,i)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return ou(e)(t,r,u)},"_safeEncodeAsync"),xy=ys(ye),Es=o(e=>async(t,r,i)=>ou(e)(t,r,i),"_safeDecodeAsync"),$y=Es(ye),Me={};Se(Me,{base64:s(()=>zm,"base64"),base64url:s(()=>bs,"base64url"),bigint:s(()=>Pm,"bigint"),boolean:s(()=>Mm,"boolean"),browserEmail:s(()=>jy,"browserEmail"),cidrv4:s(()=>Sm,"cidrv4"),cidrv6:s(()=>Fm,"cidrv6"),cuid:s(()=>ym,"cuid"),cuid2:s(()=>Em,"cuid2"),date:s(()=>Tm,"date"),datetime:s(()=>Cs,"datetime"),domain:s(()=>Ty,"domain"),duration:s(()=>Cm,"duration"),e164:s(()=>Rm,"e164"),email:s(()=>$m,"email"),emoji:s(()=>Ds,"emoji"),extendedDuration:s(()=>ky,"extendedDuration"),guid:s(()=>xm,"guid"),hex:s(()=>Ny,"hex"),hostname:s(()=>Oy,"hostname"),html5Email:s(()=>Sy,"html5Email"),httpProtocol:s(()=>jm,"httpProtocol"),idnEmail:s(()=>zy,"idnEmail"),integer:s(()=>Um,"integer"),ipv4:s(()=>Am,"ipv4"),ipv6:s(()=>_m,"ipv6"),ksuid:s(()=>Bm,"ksuid"),lowercase:s(()=>qm,"lowercase"),mac:s(()=>Im,"mac"),md5_base64:s(()=>Uy,"md5_base64"),md5_base64url:s(()=>My,"md5_base64url"),md5_hex:s(()=>Py,"md5_hex"),nanoid:s(()=>wm,"nanoid"),null:s(()=>Zm,"null"),number:s(()=>xs,"number"),rfc5322Email:s(()=>Fy,"rfc5322Email"),sha1_base64:s(()=>Ly,"sha1_base64"),sha1_base64url:s(()=>qy,"sha1_base64url"),sha1_hex:s(()=>Zy,"sha1_hex"),sha256_base64:s(()=>Jy,"sha256_base64"),sha256_base64url:s(()=>Gy,"sha256_base64url"),sha256_hex:s(()=>Vy,"sha256_hex"),sha384_base64:s(()=>Ky,"sha384_base64"),sha384_base64url:s(()=>Hy,"sha384_base64url"),sha384_hex:s(()=>Wy,"sha384_hex"),sha512_base64:s(()=>Yy,"sha512_base64"),sha512_base64url:s(()=>Qy,"sha512_base64url"),sha512_hex:s(()=>Xy,"sha512_hex"),string:s(()=>Nm,"string"),time:s(()=>ws,"time"),ulid:s(()=>Dm,"ulid"),undefined:s(()=>Lm,"undefined"),unicodeEmail:s(()=>km,"unicodeEmail"),uppercase:s(()=>Vm,"uppercase"),uuid:s(()=>Dt,"uuid"),uuid4:s(()=>Ay,"uuid4"),uuid6:s(()=>_y,"uuid6"),uuid7:s(()=>Iy,"uuid7"),xid:s(()=>bm,"xid")});var ym=/^[cC][0-9a-z]{6,}$/,Em=/^[0-9a-z]+$/,Dm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bm=/^[0-9a-vA-V]{20}$/,Bm=/^[A-Za-z0-9]{27}$/,wm=/^[a-zA-Z0-9_-]{21}$/,Cm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ky=/^[-+]?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)?)??$/,xm=/^([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})$/,Dt=o(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)$/,"uuid"),Ay=Dt(4),_y=Dt(6),Iy=Dt(7),$m=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sy=/^[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])?)*$/,Fy=/^(([^<>()\[\]\\.,;:\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,}))$/,km=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zy=km,jy=/^[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])?)*$/,Ry="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ds(){return new RegExp(Ry,"u")}s(Ds,"La"),o(Ds,"emoji");var Am=/^(?:(?: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])$/,_m=/^(([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}|:))$/,Im=o(e=>{let t=$e(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),Sm=/^((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])$/,Fm=/^(([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])$/,zm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bs=/^[A-Za-z0-9_-]*$/,Oy=/^(?=.{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])?)*\.?$/,Ty=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,jm=/^https?$/,Rm=/^\+[1-9]\d{6,14}$/,Om="(?:(?:\\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])))",Tm=new RegExp(`^${Om}$`);function Bs(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+)?)?`}s(Bs,"my"),o(Bs,"timeSource");function ws(e){return new RegExp(`^${Bs(e)}$`)}s(ws,"Xa"),o(ws,"time");function Cs(e){let t=Bs({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Om}T(?:${i})$`)}s(Cs,"Ha"),o(Cs,"datetime");var Nm=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Pm=/^-?\d+n?$/,Um=/^-?\d+$/,xs=/^-?\d+(?:\.\d+)?$/,Mm=/^(?:true|false)$/i,Zm=/^null$/i,Lm=/^undefined$/i,qm=/^[^A-Z]*$/,Vm=/^[^a-z]*$/,Ny=/^[0-9a-fA-F]*$/;function bt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(bt,"Ur"),o(bt,"fixedBase64");function Bt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(Bt,"Lr"),o(Bt,"fixedBase64url");var Py=/^[0-9a-fA-F]{32}$/,Uy=bt(22,"=="),My=Bt(22),Zy=/^[0-9a-fA-F]{40}$/,Ly=bt(27,"="),qy=Bt(27),Vy=/^[0-9a-fA-F]{64}$/,Jy=bt(43,"="),Gy=Bt(43),Wy=/^[0-9a-fA-F]{96}$/,Ky=bt(64,""),Hy=Bt(64),Xy=/^[0-9a-fA-F]{128}$/,Yy=bt(86,"=="),Qy=Bt(86),te=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Jm={number:"number",bigint:"bigint",object:"date"},$s=b("$ZodCheckLessThan",(e,t)=>{te.init(e,t);let r=Jm[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ks=b("$ZodCheckGreaterThan",(e,t)=>{te.init(e,t);let r=Jm[typeof t.value];e._zod.onattach.push(i=>{let u=i._zod.bag,n=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gm=b("$ZodCheckMultipleOf",(e,t)=>{te.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Yi(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Wm=b("$ZodCheckNumberFormat",(e,t)=>{te.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[u,n]=tm[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=n,r&&(l.pattern=Um)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>n&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Km=b("$ZodCheckBigIntFormat",(e,t)=>{te.init(e,t);let[r,i]=um[t.format];e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,n.minimum=r,n.maximum=i}),e._zod.check=u=>{let n=u.value;n<r&&u.issues.push({origin:"bigint",input:n,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),n>i&&u.issues.push({origin:"bigint",input:n,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Hm=b("$ZodCheckMaxSize",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;u.size<=t.maximum||i.issues.push({origin:uu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Xm=b("$ZodCheckMinSize",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;u.size>=t.minimum||i.issues.push({origin:uu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Ym=b("$ZodCheckSizeEquals",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.size!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=i=>{let u=i.value,n=u.size;if(n===t.size)return;let a=n>t.size;i.issues.push({origin:uu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Qm=b("$ZodCheckMaxLength",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let u=i.value;if(u.length<=t.maximum)return;let n=ru(u);i.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),ep=b("$ZodCheckMinLength",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let u=i.value;if(u.length>=t.minimum)return;let n=ru(u);i.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),tp=b("$ZodCheckLengthEquals",(e,t)=>{var r;te.init(e,t),(r=e._zod.def).when??(r.when=i=>{let u=i.value;return!Ne(u)&&u.length!==void 0}),e._zod.onattach.push(i=>{let u=i._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=i=>{let u=i.value,n=u.length;if(n===t.length)return;let a=ru(u),l=n>t.length;i.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),lu=b("$ZodCheckStringFormat",(e,t)=>{var r,i;te.init(e,t),e._zod.onattach.push(u=>{let n=u._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),up=b("$ZodCheckRegex",(e,t)=>{lu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rp=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qm),lu.init(e,t)}),np=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vm),lu.init(e,t)}),ip=b("$ZodCheckIncludes",(e,t)=>{te.init(e,t);let r=$e(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(u=>{let n=u._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(i)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),sp=b("$ZodCheckStartsWith",(e,t)=>{te.init(e,t);let r=new RegExp(`^${$e(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),ap=b("$ZodCheckEndsWith",(e,t)=>{te.init(e,t);let r=new RegExp(`.*${$e(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let u=i._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function As(e,t,r){e.issues.length&&t.issues.push(...ve(r,e.issues))}s(As,"fy"),o(As,"handleCheckPropertyResult");var op=b("$ZodCheckProperty",(e,t)=>{te.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(u=>As(u,r,t.property));As(i,r,t.property)}}),lp=b("$ZodCheckMimeType",(e,t)=>{te.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),dp=b("$ZodCheckOverwrite",(e,t)=>{te.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),cp=class{static{s(this,"Fr")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
3
- `).filter(u=>u),r=Math.min(...t.map(u=>u.length-u.trimStart().length)),i=t.map(u=>u.slice(r)).map(u=>" ".repeat(this.indent*2)+u);for(let u of i)this.content.push(u)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...t,r.join(`
4
- `))}},mp={major:4,minor:4,patch:3},L=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mp;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let n of u._zod.onattach)n(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let c=Ue(a),m;for(let f of l){if(f._zod.def.when){if(rs(a)||!f._zod.def.when(a))continue}else if(c)continue;let p=a.issues.length,g=f._zod.check(a);if(g instanceof Promise&&d?.async===!1)throw new Qe;if(m||g instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await g,a.issues.length!==p&&(c||(c=Ue(a,p)))});else{if(a.issues.length===p)continue;c||(c=Ue(a,p))}}return m?m.then(()=>a):a},"runChecks"),n=o((a,l,d)=>{if(Ue(a))return a.aborted=!0,a;let c=u(l,i,d);if(c instanceof Promise){if(d.async===!1)throw new Qe;return c.then(m=>e._zod.parse(m,d))}return e._zod.parse(c,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(m=>n(m,a,l)):n(c,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new Qe;return d.then(c=>u(c,i,l))}return u(d,i,l)}}G(e,"~standard",()=>({validate:o(u=>{try{let n=hm(e,u);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return vm(e,u).then(n=>n.success?{value:n.data}:{issues:n.error?.issues})}},"validate"),vendor:"zod",version:1}))}),du=b("$ZodString",(e,t)=>{L.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Nm(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Q=b("$ZodStringFormat",(e,t)=>{lu.init(e,t),du.init(e,t)}),pp=b("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xm),Q.init(e,t)}),fp=b("$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=Dt(r))}else t.pattern??(t.pattern=Dt());Q.init(e,t)}),gp=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$m),Q.init(e,t)}),hp=b("$ZodURL",(e,t)=>{Q.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===jm.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),vp=b("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ds()),Q.init(e,t)}),yp=b("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=wm),Q.init(e,t)}),Ep=b("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ym),Q.init(e,t)}),Dp=b("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Em),Q.init(e,t)}),bp=b("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dm),Q.init(e,t)}),Bp=b("$ZodXID",(e,t)=>{t.pattern??(t.pattern=bm),Q.init(e,t)}),wp=b("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Bm),Q.init(e,t)}),Cp=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Cs(t)),Q.init(e,t)}),xp=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tm),Q.init(e,t)}),$p=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ws(t)),Q.init(e,t)}),kp=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Cm),Q.init(e,t)}),Ap=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Am),Q.init(e,t),e._zod.bag.format="ipv4"}),_p=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=_m),Q.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ip=b("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Im(t.delimiter)),Q.init(e,t),e._zod.bag.format="mac"}),Sp=b("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Sm),Q.init(e,t)}),Fp=b("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Fm),Q.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[u,n]=i;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ir(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(Ir,"Gc"),o(Ir,"isValidBase64");var zp=b("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zm),Q.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ir(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function _s(e){if(!bs.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ir(r)}s(_s,"zy"),o(_s,"isValidBase64URL");var jp=b("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=bs),Q.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{_s(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Rp=b("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Rm),Q.init(e,t)});function Is(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let u=JSON.parse(atob(i));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(Is,"jy"),o(Is,"isValidJWT");var Op=b("$ZodJWT",(e,t)=>{Q.init(e,t),e._zod.check=r=>{Is(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Tp=b("$ZodCustomStringFormat",(e,t)=>{Q.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ss=b("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??xs,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let n=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...n?{received:n}:{}}),r}}),Np=b("$ZodNumberFormat",(e,t)=>{Wm.init(e,t),Ss.init(e,t)}),Fs=b("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=Mm,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),zs=b("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=Pm,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Pp=b("$ZodBigIntFormat",(e,t)=>{Km.init(e,t),zs.init(e,t)}),Up=b("$ZodSymbol",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),Mp=b("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=Lm,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Zp=b("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=Zm,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),Lp=b("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),qp=b("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Vp=b("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Jp=b("$ZodVoid",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),Gp=b("$ZodDate",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,n=u instanceof Date;return n&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...n?{received:"Invalid Date"}:{},inst:e}),r}});function js(e,t,r){e.issues.length&&t.issues.push(...ve(r,e.issues)),t.value[r]=e.value}s(js,"vy"),o(js,"handleArrayResult");var Wp=b("$ZodArray",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let n=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?n.push(d.then(c=>js(c,r,a))):js(d,r,a)}return n.length?Promise.all(n).then(()=>r):r}});function cu(e,t,r,i,u,n){let a=r in i;if(e.issues.length){if(u&&n&&!a)return;t.issues.push(...ve(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(cu,"Fo"),o(cu,"handlePropertyResult");function Rs(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=us(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(Rs,"Oy"),o(Rs,"normalizeDef");function Os(e,t,r,i,u,n){let a=[],l=u.keySet,d=u.catchall._zod,c=d.def.type,m=d.optin==="optional",f=d.optout==="optional";for(let p in t){if(p==="__proto__"||l.has(p))continue;if(c==="never"){a.push(p);continue}let g=d.run({value:t[p],issues:[]},i);g instanceof Promise?e.push(g.then(v=>cu(v,r,p,t,m,f))):cu(g,r,p,t,m,f)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length?Promise.all(e).then(()=>r):r}s(Os,"Py"),o(Os,"handleCatchall");var Kp=b("$ZodObject",(e,t)=>{if(L.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=yt(()=>Rs(t));G(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let c=a[d]._zod;if(c.values){l[d]??(l[d]=new Set);for(let m of c.values)l[d].add(m)}}return l});let i=et,u=t.catchall,n;e._zod.parse=(a,l)=>{n??(n=r.value);let d=a.value;if(!i(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let c=[],m=n.shape;for(let f of n.keys){let p=m[f],g=p._zod.optin==="optional",v=p._zod.optout==="optional",E=p._zod.run({value:d[f],issues:[]},l);E instanceof Promise?c.push(E.then(D=>cu(D,a,f,d,g,v))):cu(E,a,f,d,g,v)}return u?Os(c,d,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),Hp=b("$ZodObjectJIT",(e,t)=>{Kp.init(e,t);let r=e._zod.parse,i=yt(()=>Rs(t)),u=o(f=>{let p=new cp(["shape","payload","ctx"]),g=i.value,v=o(k=>{let _=$r(k);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`},"parseStr");p.write("const input = payload.value;");let E=Object.create(null),D=0;for(let k of g.keys)E[k]=`key_${D++}`;p.write("const newResult = {};");for(let k of g.keys){let _=E[k],F=$r(k),I=f[k],z=I?._zod?.optin==="optional",Z=I?._zod?.optout==="optional";p.write(`const ${_} = ${v(k)};`),z&&Z?p.write(`
5
- if (${_}.issues.length) {
6
- if (${F} in input) {
7
- payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
1
+ "use strict";var xE=Object.defineProperty;var s=(e,t)=>xE(e,"name",{value:t,configurable:!0});var om=Object.defineProperty,o=s((e,t)=>om(e,"name",{value:t,configurable:!0}),"s"),Oe=s((e,t)=>{for(var r in t)om(e,r,{get:t[r],enumerable:!0})},"Xe");function _(e,t,r,n){var u=arguments.length,i=u<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(u<3?a(i):u>3?a(t,r,i):a(t,r))||i);return u>3&&i&&Object.defineProperty(t,r,i),i}s(_,"b"),o(_,"__decorate");function Rr(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}s(Rr,"Po"),o(Rr,"__metadata");import"reflect-metadata";import{FrontMcp as $E,FrontMcpInstance as lm,LogLevel as dm}from"@frontmcp/sdk";var cm="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function pm(e,t){let r="",n=e;for(let u=t-1;u>=0;u--){let i=n%32;r=cm[i]+r,n=(n-i)/32}return r}s(pm,"sk"),o(pm,"encodeTime");function mm(e){let t=new Uint8Array(e);globalThis.crypto.getRandomValues(t);let r="";for(let n=0;n<e;n++)r+=cm[(t[n]??0)&31];return r}s(mm,"ak"),o(mm,"encodeRandom");function Pe(e=Date.now()){return pm(e,10)+mm(16)}s(Pe,"Re"),o(Pe,"ulid");var fm=class{static{s(this,"Lt")}static{o(this,"EventBus")}constructor(e={}){this.subs=new Set,this.dropped=0,this.capacity=e.capacity??1e4,this.onDrop=e.onDrop,this.transform=e.transform}publish(e){if(this.subs.size>this.capacity){this.dropped++,this.onDrop?.(1);return}let t=e;if(this.transform)try{t=this.transform(e)??e}catch{t=e}for(let r of this.subs)if(!(r.filter&&!r.filter(t)))try{let n=r.handler(t);n&&typeof n.then=="function"&&n.catch(()=>{})}catch{}}subscribe(e,t){let r={handler:e,filter:t};return this.subs.add(r),()=>{this.subs.delete(r)}}droppedCount(){return this.dropped}subscriberCount(){return this.subs.size}},xt="REDACTED",CE=["token","secret","password","passwd","apikey","credential","assertion","signature"],kE=new Set(["key","auth","authorization","jwt","code","sig","pwd","pass","session","sid","bearer","otp","cookie","set-cookie"]),AE=/^(?:(?:prompt|completion|total|input|output|cache|cached|cacheread|cachewrite|reasoning|thinking|max|min|remaining|used|billed)tokens|tokens?(?:count|used|limit|remaining))$/;function ls(e){let t=e.toLowerCase();if(AE.test(t.replace(/[-_.]+/g,"")))return!1;if(CE.some(r=>t.includes(r)))return!0;for(let r of t.split(/[-_.]+/))if(r&&kE.has(r))return!0;return!1}s(ls,"qy"),o(ls,"isSecretParam");var _E=/^([a-z][a-z0-9+.-]*:\/\/)[^/?#@\s]*@/i,IE=/([?&#])([^=&#\s]+)=([^&#\s]*)/g;function hm(e){return e&&e.replace(_E,`$1${xt}@`).replace(IE,(t,r,n)=>ls(n)?`${r}${n}=${xt}`:t)}s(hm,"mk"),o(hm,"redactUrlParams");var SE=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]*/g,FE=/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,zE=/\b(authorization|x-api-key|api-key|cookie|set-cookie|proxy-authorization)\b(\s*[:=]\s*)(["']?)((?:(?:bearer|basic)\s+)?[^\s"',;]{4,})\3/gi;function Ue(e){return hm(e).replace(zE,(t,r,n,u)=>`${r}${n}${u}${xt}${u}`).replace(SE,xt).replace(FE,(t,r)=>`${r} ${xt}`)}s(Ue,"He"),o(Ue,"redactText");function ds(e,t){return e.length<=t?e:`${e.slice(0,t)}\u2026[lensmcp truncated: ${e.length-t} more chars]`}s(ds,"Gy"),o(ds,"clip");function gm(e,t=4096){if(e!==void 0)return ds(Ue(e),t)}s(gm,"Jy"),o(gm,"safeText");function vm(e){return ds(Ue(e),300)}s(vm,"Wy"),o(vm,"safeTitle");var jE=6,OE=64,RE=/^TS\d{1,5}$/,TE=o((e,t)=>e==="code"&&typeof t=="string"&&RE.test(t),"isDiagnosticCode");function lu(e,t=0,r=jE){if(typeof e=="string")return Ue(e);if(e===null||typeof e!="object"||t>=r)return e;if(Array.isArray(e)){let i=!1,a=e.map((l,d)=>{if(d>=OE)return l;let c=lu(l,t+1,r);return c!==l&&(i=!0),c});return i?a:e}let n=!1,u={};for(let[i,a]of Object.entries(e)){let l=ls(i)&&a!==void 0&&a!==null&&!TE(i,a)?xt:lu(a,t+1,r);l!==a&&(n=!0),u[i]=l}return n?u:e}s(lu,"Bt"),o(lu,"redactDeep");var NE=12;function cs(e={}){let t=e.maxDepth??NE,r=0,n=0;return{redact(u){r+=1;let i=u.title===void 0?void 0:vm(Ue(u.title)),a=u.message===void 0?void 0:gm(Ue(u.message),4096),l=u.raw===void 0?void 0:lu(u.raw,0,t),d=i!==u.title,c=a!==u.message,p=l!==u.raw;return!d&&!c&&!p?u:(n+=1,{...u,...i!==void 0?{title:i}:{},...a!==void 0?{message:a}:{},...l!==void 0?{raw:l}:{}})},stats:o(()=>({inspected:r,redacted:n}),"stats"),reset:o(()=>{r=0,n=0},"reset")}}s(cs,"Mo"),o(cs,"createEventRedactor");var ym=class{static{s(this,"Zt")}static{o(this,"ResourceStore")}constructor(){this.entries=new Map,this.subs=new Map}register(e,t){if(this.entries.has(e))throw new Error(`Resource already registered: ${e}`);return this.entries.set(e,{uri:e,produce:t,revision:0}),()=>{this.entries.delete(e),this.subs.delete(e)}}async read(e){let t=this.entries.get(e);if(!t)throw new Error(`Unknown resource: ${e}`);return t.produce()}list(){return[...this.entries.keys()]}async markDirty(e){let t=this.entries.get(e);if(!t)return;let r=await t.produce(),n=JSON.stringify(r);if(n===t.lastJson)return;t.lastJson=n,t.revision+=1;let u=this.subs.get(e);if(u)for(let i of u)try{i(e,t.revision)}catch{}}revision(e){return this.entries.get(e)?.revision}subscribe(e,t){let r=this.subs.get(e);return r||(r=new Set,this.subs.set(e,r)),r.add(t),()=>{r?.delete(t)}}},Em=class{static{s(this,"Vt")}static{o(this,"GraphStore")}constructor(){this.nodes=new Map,this.edges=new Map,this.byParent=new Map,this.byFlow=new Map,this.byLogical=new Map,this.byInstance=new Map,this.byRequest=new Map,this.outByAxis=new Map,this.inByAxis=new Map}addNode(e){this.nodes.set(e.id,e),e.parentTraceNodeId&&this.addToIndex(this.byParent,e.parentTraceNodeId,e.id),e.context.flowId&&this.addToIndex(this.byFlow,e.context.flowId,e.id),e.logicalId&&this.addToIndex(this.byLogical,e.logicalId,e.id),e.instanceId&&this.addToIndex(this.byInstance,e.instanceId,e.id),e.context.requestId&&this.addToIndex(this.byRequest,e.context.requestId,e.id)}updateNode(e,t){let r=this.nodes.get(e);if(!r)throw new Error(`Unknown node: ${e}`);let n={...r,...t,id:r.id};return this.nodes.set(e,n),n}getNode(e){return this.nodes.get(e)}addEdge(e){this.edges.set(e.id,e);let t=this.outByAxis.get(e.axis);t||(t=new Map,this.outByAxis.set(e.axis,t)),this.addToIndex(t,e.from,e.id);let r=this.inByAxis.get(e.axis);r||(r=new Map,this.inByAxis.set(e.axis,r)),this.addToIndex(r,e.to,e.id)}getEdge(e){return this.edges.get(e)}childrenOf(e){return this.materialiseNodes(this.byParent.get(e))}nodesInFlow(e){return this.materialiseNodes(this.byFlow.get(e))}nodesByLogical(e){return this.materialiseNodes(this.byLogical.get(e))}nodesByInstance(e){return this.materialiseNodes(this.byInstance.get(e))}nodesByRequest(e){return this.materialiseNodes(this.byRequest.get(e))}traverse(e){let t=this.nodes.get(e.from);if(!t)return{nodes:[],edges:[]};let r=Array.isArray(e.lens)?e.lens:[e.lens],n=e.direction??"both",u=e.depth??4,i=e.maxNodes??1e3,a=new Set,l=new Set,d=[{id:t.id,d:0}];for(;d.length&&!(a.size>=i);){let{id:c,d:p}=d.shift();if(!a.has(c)&&(a.add(c),!(p>=u)))for(let m of r){if(n==="out"||n==="both"){let f=this.outByAxis.get(m)?.get(c);if(f)for(let h of f){l.add(h);let g=this.edges.get(h);a.has(g.to)||d.push({id:g.to,d:p+1})}}if(n==="in"||n==="both"){let f=this.inByAxis.get(m)?.get(c);if(f)for(let h of f){l.add(h);let g=this.edges.get(h);a.has(g.from)||d.push({id:g.from,d:p+1})}}}}return{nodes:this.materialiseNodes(a),edges:[...l].map(c=>this.edges.get(c)).filter(c=>!!c)}}nodeCount(){return this.nodes.size}edgeCount(){return this.edges.size}addToIndex(e,t,r){let n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}materialiseNodes(e){if(!e)return[];let t=[];for(let r of e){let n=this.nodes.get(r);n&&t.push(n)}return t}};function bm(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}s(bm,"$k"),o(bm,"fnv1a32");function Dm(e){let t=[e.kind,e.identity,e.file??"",e.detail??""];return`${e.kind}:${bm(t.join("|"))}`}s(Dm,"Ky"),o(Dm,"fingerprint");var ME=class{static{s(this,"No")}static{o(this,"ReducerRegistry")}constructor(){this.reducers=[]}register(e,t){if(this.reducers.some(r=>r.name===e))throw new Error(`Reducer already registered: ${e}`);this.reducers.push({name:e,reducer:t})}list(){return this.reducers}async dispatch(e){for(let{reducer:t}of this.reducers)try{let r=t(e);r&&typeof r.then=="function"&&await r}catch{}}};function ps(e,t={}){let r,n;if(t.flowId)n=t.flowId,r=e.filter(m=>m.context.flowId===n);else{let m=e.find(f=>f.context.flowId);if(!m)return;n=m.context.flowId,r=e.filter(f=>f.context.flowId===n)}if(r.length===0)return;r.sort((m,f)=>m.timestamp-f.timestamp);let u=1e3;r.length>u&&(r=[r[0],...r.slice(r.length-(u-1))]);let i=r[0],a=[],l,d;for(let m of r){let f=wm(m);if(f){if(a.push(f),f.kind==="render"||f.kind==="final-render"){let h=m.raw;h?.render&&(l={id:h.render.id,page:h.render.page,route:h.render.route,componentName:h.render.componentName})}else if(m.source==="visual"&&f.kind==="visual-violation"){let h=m.raw;h?.frame&&(d=h.frame.id)}}}for(let m=a.length-1;m>=0;m--)if(a[m].kind==="render"){a[m]={...a[m],kind:"final-render"};break}let c=r[0].timestamp,p=r[r.length-1].timestamp;return{flowId:n,origin:{type:i.context.originType,nodeId:i.context.originNodeId,at:i.timestamp},phases:a,finalState:l?{page:l.page,route:l.route,componentName:l.componentName,renderId:l.id,visualFrameId:d}:void 0,startedAt:c,endedAt:p,eventCount:r.length}}s(ps,"Do"),o(ps,"compileStory");function wm(e){let t=(e.raw??null)?.kind;if(t==="flow-origin"||e.source==="client-runtime"&&t==="user-action"){let r=e.raw;return{kind:"user-action",at:e.timestamp,label:r?.origin?.label??e.title,eventIds:[e.id]}}if(e.source==="react"&&t==="render"){let r=e.raw;return{kind:"render",at:e.timestamp,label:`render ${r?.render?.componentName??"?"}`,eventIds:[e.id],details:r?.render?{componentName:r.render.componentName,durationMs:r.render.actualDurationMs}:void 0}}if(e.source==="react"&&t==="slot-content-changed"){let r=e.raw,n=r?.slot?.toComponent??"?";return{kind:/spinner|loader|loading/i.test(n)?"loading-ui":"idle-ui",at:e.timestamp,label:`slot ${r?.slot?.slotLogicalId??""} \u2192 ${n}`,eventIds:[e.id]}}if(e.source==="client-runtime"&&t==="route"){let r=e.raw;return{kind:"route-transition",at:e.timestamp,label:`route ${r?.from??""} \u2192 ${r?.url??""}`,eventIds:[e.id]}}if(e.source==="valtio"&&t==="state-update"){let r=e.raw;return{kind:"state-update",at:e.timestamp,label:`${r?.update?.storeId??"?"}.${r?.update?.path??"?"}`,eventIds:[e.id],details:r?.update}}if(e.source==="nestjs"&&t==="server-request"){let r=e.raw;return{kind:"backend-request",at:e.timestamp,label:`${r?.request?.method??"?"} ${r?.request?.route??"?"} \u2192 ${r?.request?.status??"?"}`,eventIds:[e.id],details:r?.request}}if(e.source==="chrome"&&e.category==="network")return{kind:"backend-request",at:e.timestamp,label:e.title,eventIds:[e.id]};if(e.source==="visual"&&t==="visual-violation"){let r=e.raw;return{kind:"visual-violation",at:e.timestamp,label:`${r?.violation?.ruleType??"rule"} ${r?.violation?.ruleId??""}`,eventIds:[e.id]}}}s(wm,"kk"),o(wm,"classifyEvent");var Bm={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},PE=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),ms="db-request-account",UE=new Set(["react","valtio","client-runtime","chrome","visual"]),$t=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),re=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),pe=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function xm(e){let t=$t(e.raw)?e.raw:{},r=$t(t.request)?t.request:{},n=$t(t.span)?t.span:{},u=e.context??{},i=re(t.kind)??"",a=i===ms,l=(a?pe(t.lastEndedAt):void 0)??pe(e.timestamp)??0,d=pe(r.startedAt)??pe(n.startTime)??pe(t.startedAt)??(a?pe(t.firstStartedAt):void 0),c=pe(r.endedAt)??pe(n.endTime)??(d!==void 0&&pe(t.durationMs)!==void 0?d+t.durationMs:void 0),p=Math.min(l,d??l),m=Math.max(l,c??l),f=$t(t.render)?t.render:{},h=$t(t.update)?t.update:{},g=i==="render"?re(f.componentName):i==="state-update"?re(h.path)?.split(".").slice(0,2).join("."):void 0,E=re(t.queue),B=re(t.jobId),w=String(e.source),b=re(t.project)??re(u.projectName);return{event:e,id:e.id,ts:l,from:p,to:m,kind:i,source:w,...re(u.requestId)?{requestId:re(u.requestId)}:{},...re(u.parentRequestId)?{parentRequestId:re(u.parentRequestId)}:{},...E&&B?{queueKey:`${E}#${B}`}:{},browser:UE.has(w)||w==="memory"&&b===void 0,bookkeeping:PE.has(i),...b?{project:b}:{},...g?{subject:g}:{},...i==="fetch-start"||i==="fetch-done"?{route:fs(re(t.url)),method:re(t.method)}:i==="server-request"?{route:re(r.route),method:re(r.method)}:i==="gateway-request"?{route:fs(re(t.url)),method:re(t.method)}:{}}}s(xm,"Rk"),o(xm,"readItem");function fs(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),n=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return n?n[1]??"/":r}s(fs,"Xy"),o(fs,"pathOnly");var ZE=o(e=>e.split(".")[0],"rootOf"),$m=o((e,t)=>e.reduce((r,n)=>Math.min(r,t(n)),1/0),"minOf"),Cm=o((e,t)=>e.reduce((r,n)=>Math.max(r,t(n)),-1/0),"maxOf"),hs=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),gs=o(e=>e.requestId&&!e.requestId.startsWith("job:")?ZE(e.requestId):void 0,"directFamilyOf");function km(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(km,"Tk"),o(km,"jobKeyOf");function Am(e,t){let r=e.filter(i=>!i.parentRequestId&&(i.kind==="server-request"||i.kind==="gateway-request"||i.kind==="fetch-start"||i.kind==="fetch-done")).sort((i,a)=>i.from-a.from||hs(i,a));if(r.length<2)return[e];let n=[];for(let i of r){let a=n[n.length-1];a&&i.from<=a.to+t?a.to=Math.max(a.to,i.to):n.push({from:i.from,to:i.to})}if(n.length<2)return[e];let u=n.map(()=>[]);for(let i of e){let a=n.findIndex(l=>i.ts>=l.from-t&&i.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<n.length;l+=1)n[l].from<=i.ts&&(a=l)}u[a].push(i)}return u.filter(i=>i.length>0)}s(Am,"Ak"),o(Am,"occurrencesOf");var _m={debug:0,info:1,warning:2,error:3,fatal:4};function vs(e,t){let r=[],n=[];for(let u of e){let i=n[n.length-1];i&&u.ts-i.ts>=t&&(r.push(n),n=[]),n.push(u)}return n.length&&r.push(n),r}s(vs,"Yy"),o(vs,"runs");function Im(e,t={}){let r={...Bm};for(let[b,$]of Object.entries(t))typeof $=="number"&&Number.isFinite($)&&(r[b]=$);let n=new Set,u=[];for(let b of e)n.has(b.id)||(n.add(b.id),u.push(xm(b)));u.sort(hs);let i=re(u[0]?.event.context?.flowId)??re(u[0]?.event.raw?.flowId)??"",a=new Map;for(let b of u)b.kind==="queue-enqueued"&&b.queueKey&&b.requestId&&!b.requestId.startsWith("job:")&&!a.has(b.queueKey)&&a.set(b.queueKey,b);let l=new Map,d=new Map,c=[];for(let b of u){let $=km(b),x=gs(b);if($!==void 0){let F=d.get($);F?F.push(b):d.set($,[b])}else if(x!==void 0){let F=l.get(x);F?F.push(b):l.set(x,[b])}else c.push(b)}let p=[],m=new Map;for(let[b,$]of l)Am($,r.occurrenceSlackMs).forEach((x,F)=>{let C={id:`${i}~r:${b}${F===0?"":`@${F+1}`}`,kind:"request",items:x,requestId:b};p.push(C);for(let j of x)m.set(j,C)});for(let[b,$]of d){let x=a.get(b),F=x?m.get(x):void 0;F?F.items.push(...$):p.push({id:`${i}~r:job:${b}`,kind:"request",items:$,requestId:`job:${b}`})}let f=u.filter(b=>b.kind==="fetch-done"&&gs(b)!==void 0),h=new Map;for(let b of p)b.requestId&&h.set(b.requestId,[...h.get(b.requestId)??[],b]);let g=o((b,$)=>{let x=h.get(b);if(x)return x.find(F=>F.items.some(C=>C.kind==="fetch-done"&&C.ts===$))??x[x.length-1]},"owningUnit"),E=c.filter(b=>b.browser);for(let b of vs(E,r.burstGapMs)){let $=b[0].ts,x=f.filter(j=>j.ts<=$&&$-j.ts<=r.attachWindowMs),F=[...new Set(x.map(j=>gs(j)))];if(F.length===1){let j=g(F[0],x[x.length-1].ts);if(j){j.items.push(...b);continue}}let C=b.some(j=>j.kind==="flow-origin");p.push({id:`${i}~${C?"o":"u"}:${b[0].id}`,kind:C?"origin":"ui",items:b,...F.length>1?{after:F.sort()}:{}})}for(let b of vs(c.filter($=>!$.browser),r.phaseGapMs))p.push({id:`${i}~a:${b[0].id}`,kind:"ambient",items:b});let B=Sm(i,u.length,p,r),w=Tr(u.map(b=>b.event));return w?{...B,sql:w}:B}s(Im,"rb"),o(Im,"segmentFlow");function Sm(e,t,r,n){for(let f of r)f.items.sort(hs);let u=r.map(f=>({unit:f,from:$m(f.items,h=>h.from),to:Cm(f.items,h=>h.to)}));u.sort((f,h)=>f.from-h.from||(f.unit.id<h.unit.id?-1:1));let i=new Map,a=0,l=-1/0;for(let f of u)(a===0||f.from-l>=n.phaseGapMs)&&(a+=1),l=Math.max(l,f.to),i.set(f.unit,a);let d=[];for(let f of u){let h=Fm(f.unit.items,n.maxSegmentEvents),g=f.unit.kind==="request"?Tr(f.unit.items.map(E=>E.event)):void 0;h.forEach((E,B)=>{let w=zm(e,f.unit,E,i.get(f.unit),h.length>1?{index:B+1,total:h.length}:void 0);d.push(g&&B===0?{...w,sql:g}:w)})}let c={};for(let f of d)for(let h of f.eventIds)c[h]=f.id;let p=[];for(let f of d){let h=p[f.phase-1];h||(h={index:f.phase,start:f.start,end:f.end,segmentIds:[]},p[f.phase-1]=h),h.start=Math.min(h.start,f.start),h.end=Math.max(h.end,f.end),h.segmentIds.push(f.id)}let m=d.reduce((f,h)=>f+h.counts.signal,0);return{flowId:e,segments:d,phases:p.filter(Boolean),assignment:c,stats:{events:t,signal:m,bookkeeping:t-m,segments:d.length,phases:p.filter(Boolean).length,largestSegment:d.reduce((f,h)=>Math.max(f,h.counts.total),0)}}}s(Sm,"zk"),o(Sm,"assemble");function Fm(e,t){if(e.filter(i=>!i.bookkeeping).length<=t)return[e];let r=[],n=[],u=0;for(let i of e)!i.bookkeeping&&u===t&&(r.push(n),n=[],u=0),n.push(i),i.bookkeeping||(u+=1);return n.length&&r.push(n),r}s(Fm,"Ok"),o(Fm,"chunk");function zm(e,t,r,n,u){let i={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let h of r){h.bookkeeping?i.bookkeeping+=1:i.signal+=1;let g=String(h.event.severity);g==="error"||g==="fatal"?i.errors+=1:g==="warning"&&(i.warnings+=1),(_m[g]??1)>(_m[l]??0)&&(l=g),h.project&&a.add(h.project)}let d=t.kind==="ui"||t.kind==="origin"?Om(r):[],c=$m(r,h=>h.from),p=Cm(r,h=>h.to),m=jm(t.items),f=t.id;return{id:u&&u.index>1?`${f}#${u.index}`:f,flowId:e,kind:t.kind,label:Rm(t,r,m,u,d),phase:n,start:c,end:p,durationMs:p-c,eventIds:r.map(h=>h.id),counts:i,projects:[...a].sort(),...m.route?{route:m.route}:{},...m.method?{method:m.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(zm,"jk"),o(zm,"toSegment");function jm(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(jm,"Pk"),o(jm,"routeOf");function Om(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,n)=>n[1]-r[1]||(r[0]<n[0]?-1:1)).slice(0,3).map(([r,n])=>n>1?`${r} \xD7${n}`:r)}s(Om,"Mk"),o(Om,"hotOf");function Rm(e,t,r,n,u){let i=n?` (part ${n.index}/${n.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${i}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${i}`:`request ${e.requestId??""}${i}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${i}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${i}`:`background${i}`}s(Rm,"Nk"),o(Rm,"labelOf");var Tm=50;function Tr(e){let t=new Map,r=new Map,n=new Set;for(let g of e){if(n.has(g.id))continue;n.add(g.id);let E=$t(g.raw)?g.raw:{},B=re(E.kind),w=re(g.context?.requestId);if(!w)continue;let b=re(E.project)??re(g.context?.projectName);if(B==="db-query"&&g.source==="db"){let $=r.get(w)??{count:0,workMs:0,...b?{project:b}:{}};$.count+=1,$.workMs+=pe(E.durationMs)??0,r.set(w,$)}else if(B===ms){let $=re(E.accountId)??g.id,x=pe(E.seq)??0,F=t.get($);if(F&&F.seq>=x)continue;t.set($,{requestId:w,...b?{project:b}:{},seq:x,basis:E.basis==="end"?"end":"settled",statements:pe(E.statements)??0,failed:pe(E.failed)??0,workMs:pe(E.workMs)??0,recorded:pe(E.recorded)??0,suppressed:pe(E.suppressed)??0,unwritten:pe(E.unwritten)??0})}}let u=new Map;for(let g of t.values()){let E=u.get(g.requestId);if(!E){u.set(g.requestId,{...g});continue}g.basis==="settled"&&(E.basis="settled"),E.statements+=g.statements,E.failed+=g.failed,E.workMs+=g.workMs,E.recorded+=g.recorded,E.suppressed+=g.suppressed,E.unwritten+=g.unwritten}let i=[...new Set([...r.keys(),...u.keys()])].sort();if(i.length===0)return;let a={statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0},l={statements:0,workMs:0},d=[];for(let g of i){let E=r.get(g),B=u.get(g),w=E?.count??0;l.statements+=w,l.workMs+=E?.workMs??0;let b=!B||w>B.statements?"unverified":w===B.statements?"complete":"incomplete";B&&b!=="unverified"&&(a.statements+=B.statements,a.failed+=B.failed,a.workMs+=B.workMs,a.recorded+=B.recorded,a.suppressed+=B.suppressed,a.unwritten+=B.unwritten);let $=E?.project??B?.project;d.push({requestId:g,...$?{project:$}:{},status:b,observed:w,observedWorkMs:E?.workMs??0,...B?{basis:B.basis,statements:B.statements,failed:B.failed,workMs:B.workMs,recorded:B.recorded,suppressed:B.suppressed,unwritten:B.unwritten}:{}})}let c=o(g=>d.filter(E=>E.status===g).length,"tally"),p=c("unverified"),m=c("incomplete"),f=o(g=>(g.statements??0)-g.observed,"missing"),h=d.filter(g=>g.status!=="complete").sort((g,E)=>(g.status==="incomplete"?0:1)-(E.status==="incomplete"?0:1)||f(E)-f(g)||(g.requestId<E.requestId?-1:g.requestId>E.requestId?1:0));return{status:p>0?"unverified":m>0?"incomplete":"complete",requests:d.length,complete:c("complete"),incomplete:m,unverified:p,settled:d.filter(g=>g.status!=="unverified"&&g.basis==="settled").length,observed:l,accounted:a,gaps:h.slice(0,Tm),gapsTruncated:h.length>Tm}}s(Tr,"Uo"),o(Tr,"sqlAccountingOf");var v={};Oe(v,{$brand:s(()=>Um,"$brand"),$input:s(()=>wg,"$input"),$output:s(()=>Dg,"$output"),NEVER:s(()=>Pm,"NEVER"),TimePrecision:s(()=>xg,"TimePrecision"),ZodAny:s(()=>f0,"ZodAny"),ZodArray:s(()=>D0,"ZodArray"),ZodBase64:s(()=>zn,"ZodBase64"),ZodBase64URL:s(()=>jn,"ZodBase64URL"),ZodBigInt:s(()=>Wu,"ZodBigInt"),ZodBigIntFormat:s(()=>Mn,"ZodBigIntFormat"),ZodBoolean:s(()=>Gu,"ZodBoolean"),ZodCIDRv4:s(()=>Sn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Fn,"ZodCIDRv6"),ZodCUID:s(()=>xn,"ZodCUID"),ZodCUID2:s(()=>$n,"ZodCUID2"),ZodCatch:s(()=>X0,"ZodCatch"),ZodCodec:s(()=>rr,"ZodCodec"),ZodCustom:s(()=>ir,"ZodCustom"),ZodCustomStringFormat:s(()=>Tt,"ZodCustomStringFormat"),ZodDate:s(()=>Un,"ZodDate"),ZodDefault:s(()=>G0,"ZodDefault"),ZodDiscriminatedUnion:s(()=>A0,"ZodDiscriminatedUnion"),ZodE164:s(()=>On,"ZodE164"),ZodEmail:s(()=>Dn,"ZodEmail"),ZodEmoji:s(()=>wn,"ZodEmoji"),ZodEnum:s(()=>Pt,"ZodEnum"),ZodError:s(()=>$5,"ZodError"),ZodExactOptional:s(()=>q0,"ZodExactOptional"),ZodFile:s(()=>U0,"ZodFile"),ZodFirstPartyTypeKind:s(()=>hl,"ZodFirstPartyTypeKind"),ZodFunction:s(()=>ll,"ZodFunction"),ZodGUID:s(()=>Lu,"ZodGUID"),ZodIPv4:s(()=>_n,"ZodIPv4"),ZodIPv6:s(()=>In,"ZodIPv6"),ZodISODate:s(()=>Do,"ZodISODate"),ZodISODateTime:s(()=>Eo,"ZodISODateTime"),ZodISODuration:s(()=>$o,"ZodISODuration"),ZodISOTime:s(()=>Bo,"ZodISOTime"),ZodIntersection:s(()=>I0,"ZodIntersection"),ZodIssueCode:s(()=>C5,"ZodIssueCode"),ZodJWT:s(()=>Rn,"ZodJWT"),ZodKSUID:s(()=>An,"ZodKSUID"),ZodLazy:s(()=>sl,"ZodLazy"),ZodLiteral:s(()=>M0,"ZodLiteral"),ZodMAC:s(()=>Lo,"ZodMAC"),ZodMap:s(()=>j0,"ZodMap"),ZodNaN:s(()=>Y0,"ZodNaN"),ZodNanoID:s(()=>Bn,"ZodNanoID"),ZodNever:s(()=>v0,"ZodNever"),ZodNonOptional:s(()=>Kn,"ZodNonOptional"),ZodNull:s(()=>m0,"ZodNull"),ZodNullable:s(()=>V0,"ZodNullable"),ZodNumber:s(()=>Vu,"ZodNumber"),ZodNumberFormat:s(()=>pt,"ZodNumberFormat"),ZodObject:s(()=>Hu,"ZodObject"),ZodOptional:s(()=>Vn,"ZodOptional"),ZodPipe:s(()=>tr,"ZodPipe"),ZodPrefault:s(()=>W0,"ZodPrefault"),ZodPreprocess:s(()=>ul,"ZodPreprocess"),ZodPromise:s(()=>al,"ZodPromise"),ZodReadonly:s(()=>rl,"ZodReadonly"),ZodRealError:s(()=>we,"ZodRealError"),ZodRecord:s(()=>Mt,"ZodRecord"),ZodSet:s(()=>R0,"ZodSet"),ZodString:s(()=>Zu,"ZodString"),ZodStringFormat:s(()=>ue,"ZodStringFormat"),ZodSuccess:s(()=>K0,"ZodSuccess"),ZodSymbol:s(()=>l0,"ZodSymbol"),ZodTemplateLiteral:s(()=>nl,"ZodTemplateLiteral"),ZodTransform:s(()=>L0,"ZodTransform"),ZodTuple:s(()=>S0,"ZodTuple"),ZodType:s(()=>J,"ZodType"),ZodULID:s(()=>Cn,"ZodULID"),ZodURL:s(()=>qu,"ZodURL"),ZodUUID:s(()=>Fe,"ZodUUID"),ZodUndefined:s(()=>c0,"ZodUndefined"),ZodUnion:s(()=>Xu,"ZodUnion"),ZodUnknown:s(()=>g0,"ZodUnknown"),ZodVoid:s(()=>y0,"ZodVoid"),ZodXID:s(()=>kn,"ZodXID"),ZodXor:s(()=>C0,"ZodXor"),_ZodString:s(()=>bn,"_ZodString"),_default:s(()=>Gn,"_default"),_function:s(()=>nr,"_function"),any:s(()=>h0,"any"),array:s(()=>Nt,"array"),base64:s(()=>Wo,"base64"),base64url:s(()=>Ko,"base64url"),bigint:s(()=>s0,"bigint"),boolean:s(()=>Nn,"boolean"),catch:s(()=>Xn,"catch"),check:s(()=>dl,"check"),cidrv4:s(()=>Jo,"cidrv4"),cidrv6:s(()=>Go,"cidrv6"),clone:s(()=>ye,"clone"),codec:s(()=>el,"codec"),coerce:s(()=>u1,"coerce"),config:s(()=>ce,"config"),core:s(()=>Nm,"core"),cuid:s(()=>To,"cuid"),cuid2:s(()=>No,"cuid2"),custom:s(()=>cl,"custom"),date:s(()=>b0,"date"),decode:s(()=>Pv,"decode"),decodeAsync:s(()=>Zv,"decodeAsync"),describe:s(()=>Wv,"describe"),discriminatedUnion:s(()=>_0,"discriminatedUnion"),e164:s(()=>Ho,"e164"),email:s(()=>ko,"email"),emoji:s(()=>Oo,"emoji"),encode:s(()=>Mv,"encode"),encodeAsync:s(()=>Uv,"encodeAsync"),endsWith:s(()=>ju,"endsWith"),enum:s(()=>Qu,"enum"),exactOptional:s(()=>Jn,"exactOptional"),file:s(()=>Z0,"file"),flattenError:s(()=>Zr,"flattenError"),float32:s(()=>u0,"float32"),float64:s(()=>r0,"float64"),formatError:s(()=>Lr,"formatError"),fromJSONSchema:s(()=>t1,"fromJSONSchema"),function:s(()=>nr,"function"),getErrorMap:s(()=>Yv,"getErrorMap"),globalRegistry:s(()=>xe,"globalRegistry"),gt:s(()=>Ne,"gt"),gte:s(()=>he,"gte"),guid:s(()=>Ao,"guid"),hash:s(()=>t0,"hash"),hex:s(()=>e0,"hex"),hostname:s(()=>Qo,"hostname"),httpUrl:s(()=>jo,"httpUrl"),includes:s(()=>Fu,"includes"),instanceof:s(()=>pl,"instanceof"),int:s(()=>Ju,"int"),int32:s(()=>n0,"int32"),int64:s(()=>a0,"int64"),intersection:s(()=>Zn,"intersection"),invertCodec:s(()=>tl,"invertCodec"),ipv4:s(()=>Zo,"ipv4"),ipv6:s(()=>Vo,"ipv6"),iso:s(()=>yo,"iso"),json:s(()=>ml,"json"),jwt:s(()=>Xo,"jwt"),keyof:s(()=>w0,"keyof"),ksuid:s(()=>Uo,"ksuid"),lazy:s(()=>Qn,"lazy"),length:s(()=>zt,"length"),literal:s(()=>P0,"literal"),locales:s(()=>ba,"locales"),looseObject:s(()=>$0,"looseObject"),looseRecord:s(()=>z0,"looseRecord"),lowercase:s(()=>Iu,"lowercase"),lt:s(()=>Te,"lt"),lte:s(()=>De,"lte"),mac:s(()=>qo,"mac"),map:s(()=>O0,"map"),maxLength:s(()=>Ft,"maxLength"),maxSize:s(()=>ot,"maxSize"),meta:s(()=>Kv,"meta"),mime:s(()=>Ou,"mime"),minLength:s(()=>Je,"minLength"),minSize:s(()=>Me,"minSize"),multipleOf:s(()=>at,"multipleOf"),nan:s(()=>Q0,"nan"),nanoid:s(()=>Ro,"nanoid"),nativeEnum:s(()=>N0,"nativeEnum"),negative:s(()=>gn,"negative"),never:s(()=>Ku,"never"),nonnegative:s(()=>yn,"nonnegative"),nonoptional:s(()=>Hn,"nonoptional"),nonpositive:s(()=>vn,"nonpositive"),normalize:s(()=>Ru,"normalize"),null:s(()=>Pn,"null"),nullable:s(()=>Zt,"nullable"),nullish:s(()=>J0,"nullish"),number:s(()=>Tn,"number"),object:s(()=>B0,"object"),optional:s(()=>Ut,"optional"),overwrite:s(()=>Se,"overwrite"),parse:s(()=>Ov,"parse"),parseAsync:s(()=>Rv,"parseAsync"),partialRecord:s(()=>F0,"partialRecord"),pipe:s(()=>ur,"pipe"),positive:s(()=>hn,"positive"),prefault:s(()=>Wn,"prefault"),preprocess:s(()=>fl,"preprocess"),prettifyError:s(()=>_s,"prettifyError"),promise:s(()=>ol,"promise"),property:s(()=>En,"property"),readonly:s(()=>Yn,"readonly"),record:s(()=>qn,"record"),refine:s(()=>ei,"refine"),regex:s(()=>_u,"regex"),regexes:s(()=>Ve,"regexes"),registry:s(()=>Gr,"registry"),safeDecode:s(()=>qv,"safeDecode"),safeDecodeAsync:s(()=>Jv,"safeDecodeAsync"),safeEncode:s(()=>Lv,"safeEncode"),safeEncodeAsync:s(()=>Vv,"safeEncodeAsync"),safeParse:s(()=>Tv,"safeParse"),safeParseAsync:s(()=>Nv,"safeParseAsync"),set:s(()=>T0,"set"),setErrorMap:s(()=>Xv,"setErrorMap"),size:s(()=>St,"size"),slugify:s(()=>Pu,"slugify"),startsWith:s(()=>zu,"startsWith"),strictObject:s(()=>x0,"strictObject"),string:s(()=>Rt,"string"),stringFormat:s(()=>Yo,"stringFormat"),stringbool:s(()=>Hv,"stringbool"),success:s(()=>H0,"success"),superRefine:s(()=>ti,"superRefine"),symbol:s(()=>d0,"symbol"),templateLiteral:s(()=>il,"templateLiteral"),toJSONSchema:s(()=>vo,"toJSONSchema"),toLowerCase:s(()=>Nu,"toLowerCase"),toUpperCase:s(()=>Mu,"toUpperCase"),transform:s(()=>er,"transform"),treeifyError:s(()=>ks,"treeifyError"),trim:s(()=>Tu,"trim"),tuple:s(()=>Ln,"tuple"),uint32:s(()=>i0,"uint32"),uint64:s(()=>o0,"uint64"),ulid:s(()=>Mo,"ulid"),undefined:s(()=>p0,"undefined"),union:s(()=>Yu,"union"),unknown:s(()=>Ge,"unknown"),uppercase:s(()=>Su,"uppercase"),url:s(()=>zo,"url"),util:s(()=>W,"util"),uuid:s(()=>_o,"uuid"),uuidv4:s(()=>Io,"uuidv4"),uuidv6:s(()=>So,"uuidv6"),uuidv7:s(()=>Fo,"uuidv7"),void:s(()=>E0,"void"),xid:s(()=>Po,"xid"),xor:s(()=>k0,"xor")});var Nm={};Oe(Nm,{$ZodAny:s(()=>Jf,"$ZodAny"),$ZodArray:s(()=>Xf,"$ZodArray"),$ZodAsyncError:s(()=>nt,"$ZodAsyncError"),$ZodBase64:s(()=>Rf,"$ZodBase64"),$ZodBase64URL:s(()=>Tf,"$ZodBase64URL"),$ZodBigInt:s(()=>Qs,"$ZodBigInt"),$ZodBigIntFormat:s(()=>Zf,"$ZodBigIntFormat"),$ZodBoolean:s(()=>Ys,"$ZodBoolean"),$ZodCIDRv4:s(()=>jf,"$ZodCIDRv4"),$ZodCIDRv6:s(()=>Of,"$ZodCIDRv6"),$ZodCUID:s(()=>wf,"$ZodCUID"),$ZodCUID2:s(()=>Bf,"$ZodCUID2"),$ZodCatch:s(()=>gh,"$ZodCatch"),$ZodCheck:s(()=>ne,"$ZodCheck"),$ZodCheckBigIntFormat:s(()=>X4,"$ZodCheckBigIntFormat"),$ZodCheckEndsWith:s(()=>df,"$ZodCheckEndsWith"),$ZodCheckGreaterThan:s(()=>Gs,"$ZodCheckGreaterThan"),$ZodCheckIncludes:s(()=>of,"$ZodCheckIncludes"),$ZodCheckLengthEquals:s(()=>rf,"$ZodCheckLengthEquals"),$ZodCheckLessThan:s(()=>Js,"$ZodCheckLessThan"),$ZodCheckLowerCase:s(()=>sf,"$ZodCheckLowerCase"),$ZodCheckMaxLength:s(()=>tf,"$ZodCheckMaxLength"),$ZodCheckMaxSize:s(()=>Y4,"$ZodCheckMaxSize"),$ZodCheckMimeType:s(()=>pf,"$ZodCheckMimeType"),$ZodCheckMinLength:s(()=>uf,"$ZodCheckMinLength"),$ZodCheckMinSize:s(()=>Q4,"$ZodCheckMinSize"),$ZodCheckMultipleOf:s(()=>K4,"$ZodCheckMultipleOf"),$ZodCheckNumberFormat:s(()=>H4,"$ZodCheckNumberFormat"),$ZodCheckOverwrite:s(()=>mf,"$ZodCheckOverwrite"),$ZodCheckProperty:s(()=>cf,"$ZodCheckProperty"),$ZodCheckRegex:s(()=>nf,"$ZodCheckRegex"),$ZodCheckSizeEquals:s(()=>ef,"$ZodCheckSizeEquals"),$ZodCheckStartsWith:s(()=>lf,"$ZodCheckStartsWith"),$ZodCheckStringFormat:s(()=>bu,"$ZodCheckStringFormat"),$ZodCheckUpperCase:s(()=>af,"$ZodCheckUpperCase"),$ZodCodec:s(()=>va,"$ZodCodec"),$ZodCustom:s(()=>xh,"$ZodCustom"),$ZodCustomStringFormat:s(()=>Pf,"$ZodCustomStringFormat"),$ZodDate:s(()=>Hf,"$ZodDate"),$ZodDefault:s(()=>ph,"$ZodDefault"),$ZodDiscriminatedUnion:s(()=>th,"$ZodDiscriminatedUnion"),$ZodE164:s(()=>Nf,"$ZodE164"),$ZodEmail:s(()=>yf,"$ZodEmail"),$ZodEmoji:s(()=>bf,"$ZodEmoji"),$ZodEncodeError:s(()=>Nr,"$ZodEncodeError"),$ZodEnum:s(()=>sh,"$ZodEnum"),$ZodError:s(()=>Cs,"$ZodError"),$ZodExactOptional:s(()=>dh,"$ZodExactOptional"),$ZodFile:s(()=>oh,"$ZodFile"),$ZodFunction:s(()=>Dh,"$ZodFunction"),$ZodGUID:s(()=>gf,"$ZodGUID"),$ZodIPv4:s(()=>Sf,"$ZodIPv4"),$ZodIPv6:s(()=>Ff,"$ZodIPv6"),$ZodISODate:s(()=>Af,"$ZodISODate"),$ZodISODateTime:s(()=>kf,"$ZodISODateTime"),$ZodISODuration:s(()=>If,"$ZodISODuration"),$ZodISOTime:s(()=>_f,"$ZodISOTime"),$ZodIntersection:s(()=>uh,"$ZodIntersection"),$ZodJWT:s(()=>Mf,"$ZodJWT"),$ZodKSUID:s(()=>Cf,"$ZodKSUID"),$ZodLazy:s(()=>Bh,"$ZodLazy"),$ZodLiteral:s(()=>ah,"$ZodLiteral"),$ZodMAC:s(()=>zf,"$ZodMAC"),$ZodMap:s(()=>nh,"$ZodMap"),$ZodNaN:s(()=>vh,"$ZodNaN"),$ZodNanoID:s(()=>Df,"$ZodNanoID"),$ZodNever:s(()=>Wf,"$ZodNever"),$ZodNonOptional:s(()=>fh,"$ZodNonOptional"),$ZodNull:s(()=>Vf,"$ZodNull"),$ZodNullable:s(()=>ch,"$ZodNullable"),$ZodNumber:s(()=>Xs,"$ZodNumber"),$ZodNumberFormat:s(()=>Uf,"$ZodNumberFormat"),$ZodObject:s(()=>Yf,"$ZodObject"),$ZodObjectJIT:s(()=>Qf,"$ZodObjectJIT"),$ZodOptional:s(()=>ma,"$ZodOptional"),$ZodPipe:s(()=>ga,"$ZodPipe"),$ZodPrefault:s(()=>mh,"$ZodPrefault"),$ZodPreprocess:s(()=>yh,"$ZodPreprocess"),$ZodPromise:s(()=>wh,"$ZodPromise"),$ZodReadonly:s(()=>Eh,"$ZodReadonly"),$ZodRealError:s(()=>be,"$ZodRealError"),$ZodRecord:s(()=>rh,"$ZodRecord"),$ZodRegistry:s(()=>Bg,"$ZodRegistry"),$ZodSet:s(()=>ih,"$ZodSet"),$ZodString:s(()=>Du,"$ZodString"),$ZodStringFormat:s(()=>te,"$ZodStringFormat"),$ZodSuccess:s(()=>hh,"$ZodSuccess"),$ZodSymbol:s(()=>Lf,"$ZodSymbol"),$ZodTemplateLiteral:s(()=>bh,"$ZodTemplateLiteral"),$ZodTransform:s(()=>lh,"$ZodTransform"),$ZodTuple:s(()=>sa,"$ZodTuple"),$ZodType:s(()=>L,"$ZodType"),$ZodULID:s(()=>xf,"$ZodULID"),$ZodURL:s(()=>Ef,"$ZodURL"),$ZodUUID:s(()=>vf,"$ZodUUID"),$ZodUndefined:s(()=>qf,"$ZodUndefined"),$ZodUnion:s(()=>Vr,"$ZodUnion"),$ZodUnknown:s(()=>Gf,"$ZodUnknown"),$ZodVoid:s(()=>Kf,"$ZodVoid"),$ZodXID:s(()=>$f,"$ZodXID"),$ZodXor:s(()=>eh,"$ZodXor"),$brand:s(()=>Um,"$brand"),$constructor:s(()=>D,"$constructor"),$input:s(()=>wg,"$input"),$output:s(()=>Dg,"$output"),Doc:s(()=>ff,"Doc"),JSONSchema:s(()=>x5,"JSONSchema"),JSONSchemaGenerator:s(()=>B5,"JSONSchemaGenerator"),NEVER:s(()=>Pm,"NEVER"),TimePrecision:s(()=>xg,"TimePrecision"),_any:s(()=>Xa,"_any"),_array:s(()=>no,"_array"),_base64:s(()=>cn,"_base64"),_base64url:s(()=>pn,"_base64url"),_bigint:s(()=>qa,"_bigint"),_boolean:s(()=>Za,"_boolean"),_catch:s(()=>Zg,"_catch"),_check:s(()=>lo,"_check"),_cidrv4:s(()=>ln,"_cidrv4"),_cidrv6:s(()=>dn,"_cidrv6"),_coercedBigint:s(()=>Va,"_coercedBigint"),_coercedBoolean:s(()=>La,"_coercedBoolean"),_coercedDate:s(()=>uo,"_coercedDate"),_coercedNumber:s(()=>Ra,"_coercedNumber"),_coercedString:s(()=>_a,"_coercedString"),_cuid:s(()=>tn,"_cuid"),_cuid2:s(()=>un,"_cuid2"),_custom:s(()=>so,"_custom"),_date:s(()=>to,"_date"),_decode:s(()=>zs,"_decode"),_decodeAsync:s(()=>Os,"_decodeAsync"),_default:s(()=>Mg,"_default"),_discriminatedUnion:s(()=>kg,"_discriminatedUnion"),_e164:s(()=>mn,"_e164"),_email:s(()=>Wr,"_email"),_emoji:s(()=>Qr,"_emoji"),_encode:s(()=>Fs,"_encode"),_encodeAsync:s(()=>js,"_encodeAsync"),_endsWith:s(()=>ju,"_endsWith"),_enum:s(()=>zg,"_enum"),_file:s(()=>io,"_file"),_float32:s(()=>Na,"_float32"),_float64:s(()=>Ma,"_float64"),_gt:s(()=>Ne,"_gt"),_gte:s(()=>he,"_gte"),_guid:s(()=>ku,"_guid"),_includes:s(()=>Fu,"_includes"),_int:s(()=>Ta,"_int"),_int32:s(()=>Pa,"_int32"),_int64:s(()=>Ja,"_int64"),_intersection:s(()=>Ag,"_intersection"),_ipv4:s(()=>an,"_ipv4"),_ipv6:s(()=>on,"_ipv6"),_isoDate:s(()=>Fa,"_isoDate"),_isoDateTime:s(()=>Sa,"_isoDateTime"),_isoDuration:s(()=>ja,"_isoDuration"),_isoTime:s(()=>za,"_isoTime"),_jwt:s(()=>fn,"_jwt"),_ksuid:s(()=>sn,"_ksuid"),_lazy:s(()=>Jg,"_lazy"),_length:s(()=>zt,"_length"),_literal:s(()=>Og,"_literal"),_lowercase:s(()=>Iu,"_lowercase"),_lt:s(()=>Te,"_lt"),_lte:s(()=>De,"_lte"),_mac:s(()=>Ia,"_mac"),_map:s(()=>Sg,"_map"),_max:s(()=>De,"_max"),_maxLength:s(()=>Ft,"_maxLength"),_maxSize:s(()=>ot,"_maxSize"),_mime:s(()=>Ou,"_mime"),_min:s(()=>he,"_min"),_minLength:s(()=>Je,"_minLength"),_minSize:s(()=>Me,"_minSize"),_multipleOf:s(()=>at,"_multipleOf"),_nan:s(()=>ro,"_nan"),_nanoid:s(()=>en,"_nanoid"),_nativeEnum:s(()=>jg,"_nativeEnum"),_negative:s(()=>gn,"_negative"),_never:s(()=>Qa,"_never"),_nonnegative:s(()=>yn,"_nonnegative"),_nonoptional:s(()=>Pg,"_nonoptional"),_nonpositive:s(()=>vn,"_nonpositive"),_normalize:s(()=>Ru,"_normalize"),_null:s(()=>Ha,"_null"),_nullable:s(()=>Ng,"_nullable"),_number:s(()=>Oa,"_number"),_optional:s(()=>Tg,"_optional"),_overwrite:s(()=>Se,"_overwrite"),_parse:s(()=>gu,"_parse"),_parseAsync:s(()=>vu,"_parseAsync"),_pipe:s(()=>Lg,"_pipe"),_positive:s(()=>hn,"_positive"),_promise:s(()=>Gg,"_promise"),_property:s(()=>En,"_property"),_readonly:s(()=>qg,"_readonly"),_record:s(()=>Ig,"_record"),_refine:s(()=>ao,"_refine"),_regex:s(()=>_u,"_regex"),_safeDecode:s(()=>Ts,"_safeDecode"),_safeDecodeAsync:s(()=>Ms,"_safeDecodeAsync"),_safeEncode:s(()=>Rs,"_safeEncode"),_safeEncodeAsync:s(()=>Ns,"_safeEncodeAsync"),_safeParse:s(()=>yu,"_safeParse"),_safeParseAsync:s(()=>Eu,"_safeParseAsync"),_set:s(()=>Fg,"_set"),_size:s(()=>St,"_size"),_slugify:s(()=>Pu,"_slugify"),_startsWith:s(()=>zu,"_startsWith"),_string:s(()=>Aa,"_string"),_stringFormat:s(()=>jt,"_stringFormat"),_stringbool:s(()=>mo,"_stringbool"),_success:s(()=>Ug,"_success"),_superRefine:s(()=>oo,"_superRefine"),_symbol:s(()=>Wa,"_symbol"),_templateLiteral:s(()=>Vg,"_templateLiteral"),_toLowerCase:s(()=>Nu,"_toLowerCase"),_toUpperCase:s(()=>Mu,"_toUpperCase"),_transform:s(()=>Rg,"_transform"),_trim:s(()=>Tu,"_trim"),_tuple:s(()=>_g,"_tuple"),_uint32:s(()=>Ua,"_uint32"),_uint64:s(()=>Ga,"_uint64"),_ulid:s(()=>rn,"_ulid"),_undefined:s(()=>Ka,"_undefined"),_union:s(()=>$g,"_union"),_unknown:s(()=>Ya,"_unknown"),_uppercase:s(()=>Su,"_uppercase"),_url:s(()=>Au,"_url"),_uuid:s(()=>Kr,"_uuid"),_uuidv4:s(()=>Hr,"_uuidv4"),_uuidv6:s(()=>Xr,"_uuidv6"),_uuidv7:s(()=>Yr,"_uuidv7"),_void:s(()=>eo,"_void"),_xid:s(()=>nn,"_xid"),_xor:s(()=>Cg,"_xor"),clone:s(()=>ye,"clone"),config:s(()=>ce,"config"),createStandardJSONSchemaMethod:s(()=>Uu,"createStandardJSONSchemaMethod"),createToJSONSchemaMethod:s(()=>Wg,"createToJSONSchemaMethod"),decode:s(()=>JE,"decode"),decodeAsync:s(()=>WE,"decodeAsync"),describe:s(()=>co,"describe"),encode:s(()=>VE,"encode"),encodeAsync:s(()=>GE,"encodeAsync"),extractDefs:s(()=>dt,"extractDefs"),finalize:s(()=>ct,"finalize"),flattenError:s(()=>Zr,"flattenError"),formatError:s(()=>Lr,"formatError"),globalConfig:s(()=>du,"globalConfig"),globalRegistry:s(()=>xe,"globalRegistry"),initializeContext:s(()=>lt,"initializeContext"),isValidBase64:s(()=>qr,"isValidBase64"),isValidBase64URL:s(()=>Ks,"isValidBase64URL"),isValidJWT:s(()=>Hs,"isValidJWT"),locales:s(()=>ba,"locales"),meta:s(()=>po,"meta"),parse:s(()=>Is,"parse"),parseAsync:s(()=>Ss,"parseAsync"),prettifyError:s(()=>_s,"prettifyError"),process:s(()=>Y,"process"),regexes:s(()=>Ve,"regexes"),registry:s(()=>Gr,"registry"),safeDecode:s(()=>HE,"safeDecode"),safeDecodeAsync:s(()=>YE,"safeDecodeAsync"),safeEncode:s(()=>KE,"safeEncode"),safeEncodeAsync:s(()=>XE,"safeEncodeAsync"),safeParse:s(()=>y4,"safeParse"),safeParseAsync:s(()=>E4,"safeParseAsync"),toDotPath:s(()=>As,"toDotPath"),toJSONSchema:s(()=>vo,"toJSONSchema"),treeifyError:s(()=>ks,"treeifyError"),util:s(()=>W,"util"),version:s(()=>hf,"version")});var Mm,Pm=Object.freeze({status:"aborted"});function D(e,t,r){function n(l,d){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,d);let c=a.prototype,p=Object.keys(c);for(let m=0;m<p.length;m++){let f=p[m];f in l||(l[f]=c[f].bind(l))}}s(n,"o"),o(n,"init");let u=r?.Parent??Object;class i extends u{static{s(this,"i")}static{o(this,"Definition")}}Object.defineProperty(i,"name",{value:e});function a(l){var d;let c=r?.Parent?new i:this;n(c,l),(d=c._zod).deferred??(d.deferred=[]);for(let p of c._zod.deferred)p();return c}return s(a,"a"),o(a,"_"),Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o(l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e),"value")}),Object.defineProperty(a,"name",{value:e}),a}s(D,"w"),o(D,"$constructor");var Um=Symbol("zod_brand"),nt=class extends Error{static{s(this,"Ue")}static{o(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Nr=class extends Error{static{s(this,"rt")}static{o(this,"$ZodEncodeError")}constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Mm=globalThis).__zod_globalConfig??(Mm.__zod_globalConfig={});var du=globalThis.__zod_globalConfig;function ce(e){return e&&Object.assign(du,e),du}s(ce,"se"),o(ce,"config");var W={};Oe(W,{BIGINT_FORMAT_RANGES:s(()=>n4,"BIGINT_FORMAT_RANGES"),Class:s(()=>qE,"Class"),NUMBER_FORMAT_RANGES:s(()=>r4,"NUMBER_FORMAT_RANGES"),aborted:s(()=>qe,"aborted"),allowsEval:s(()=>Qm,"allowsEval"),assert:s(()=>Jm,"assert"),assertEqual:s(()=>Zm,"assertEqual"),assertIs:s(()=>qm,"assertIs"),assertNever:s(()=>Vm,"assertNever"),assertNotEqual:s(()=>Lm,"assertNotEqual"),assignProp:s(()=>Re,"assignProp"),base64ToUint8Array:s(()=>xs,"base64ToUint8Array"),base64urlToUint8Array:s(()=>m4,"base64urlToUint8Array"),cached:s(()=>Ct,"cached"),captureStackTrace:s(()=>bs,"captureStackTrace"),cleanEnum:s(()=>p4,"cleanEnum"),cleanRegex:s(()=>pu,"cleanRegex"),clone:s(()=>ye,"clone"),cloneDef:s(()=>Km,"cloneDef"),createTransparentProxy:s(()=>u4,"createTransparentProxy"),defineLazy:s(()=>G,"defineLazy"),esc:s(()=>Pr,"esc"),escapeRegex:s(()=>Ie,"escapeRegex"),explicitlyAborted:s(()=>Bs,"explicitlyAborted"),extend:s(()=>a4,"extend"),finalizeIssue:s(()=>ge,"finalizeIssue"),floatSafeRemainder:s(()=>ys,"floatSafeRemainder"),getElementAtPath:s(()=>Hm,"getElementAtPath"),getEnumValues:s(()=>Mr,"getEnumValues"),getLengthableOrigin:s(()=>fu,"getLengthableOrigin"),getParsedType:s(()=>LE,"getParsedType"),getSizableOrigin:s(()=>mu,"getSizableOrigin"),hexToUint8Array:s(()=>h4,"hexToUint8Array"),isObject:s(()=>it,"isObject"),isPlainObject:s(()=>Le,"isPlainObject"),issue:s(()=>hu,"issue"),joinValues:s(()=>S,"joinValues"),jsonStringifyReplacer:s(()=>cu,"jsonStringifyReplacer"),merge:s(()=>l4,"merge"),mergeDefs:s(()=>_e,"mergeDefs"),normalizeParams:s(()=>z,"normalizeParams"),nullish:s(()=>Ze,"nullish"),numKeys:s(()=>e4,"numKeys"),objectClone:s(()=>Wm,"objectClone"),omit:s(()=>s4,"omit"),optionalKeys:s(()=>ws,"optionalKeys"),parsedType:s(()=>Z,"parsedType"),partial:s(()=>d4,"partial"),pick:s(()=>i4,"pick"),prefixIssues:s(()=>Ee,"prefixIssues"),primitiveTypes:s(()=>t4,"primitiveTypes"),promiseAllObject:s(()=>Xm,"promiseAllObject"),propertyKeyTypes:s(()=>Ur,"propertyKeyTypes"),randomString:s(()=>Ym,"randomString"),required:s(()=>c4,"required"),safeExtend:s(()=>o4,"safeExtend"),shallowClone:s(()=>Ds,"shallowClone"),slugify:s(()=>Es,"slugify"),stringifyPrimitive:s(()=>P,"stringifyPrimitive"),uint8ArrayToBase64:s(()=>$s,"uint8ArrayToBase64"),uint8ArrayToBase64url:s(()=>f4,"uint8ArrayToBase64url"),uint8ArrayToHex:s(()=>g4,"uint8ArrayToHex"),unwrapMessage:s(()=>kt,"unwrapMessage")});function Zm(e){return e}s(Zm,"Dk"),o(Zm,"assertEqual");function Lm(e){return e}s(Lm,"Ck"),o(Lm,"assertNotEqual");function qm(e){}s(qm,"Uk"),o(qm,"assertIs");function Vm(e){throw new Error("Unexpected value in exhaustive check")}s(Vm,"Lk"),o(Vm,"assertNever");function Jm(e){}s(Jm,"Fk"),o(Jm,"assert");function Mr(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}s(Mr,"Zr"),o(Mr,"getEnumValues");function S(e,t="|"){return e.map(r=>P(r)).join(t)}s(S,"I"),o(S,"joinValues");function cu(e,t){return typeof t=="bigint"?t.toString():t}s(cu,"Gt"),o(cu,"jsonStringifyReplacer");function Ct(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}s(Ct,"Jt"),o(Ct,"cached");function Ze(e){return e==null}s(Ze,"nt"),o(Ze,"nullish");function pu(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}s(pu,"Vr"),o(pu,"cleanRegex");function ys(e,t){let r=e/t,n=Math.round(r),u=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<u?0:r-n}s(ys,"qa"),o(ys,"floatSafeRemainder");var Gm=Symbol("evaluating");function G(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Gm)return n===void 0&&(n=Gm,n=r()),n},set(u){Object.defineProperty(e,t,{value:u})},configurable:!0})}s(G,"J"),o(G,"defineLazy");function Wm(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}s(Wm,"Bk"),o(Wm,"objectClone");function Re(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}s(Re,"ot"),o(Re,"assignProp");function _e(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}s(_e,"Ye"),o(_e,"mergeDefs");function Km(e){return _e(e._zod.def)}s(Km,"Zk"),o(Km,"cloneDef");function Hm(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}s(Hm,"Vk"),o(Hm,"getElementAtPath");function Xm(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let u={};for(let i=0;i<t.length;i++)u[t[i]]=n[i];return u})}s(Xm,"qk"),o(Xm,"promiseAllObject");function Ym(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}s(Ym,"Gk"),o(Ym,"randomString");function Pr(e){return JSON.stringify(e)}s(Pr,"Lo"),o(Pr,"esc");function Es(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}s(Es,"Ga"),o(Es,"slugify");var bs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function it(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}s(it,"Rt"),o(it,"isObject");var Qm=Ct(()=>{if(du.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Le(e){if(it(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(it(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}s(Le,"it"),o(Le,"isPlainObject");function Ds(e){return Le(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}s(Ds,"Wa"),o(Ds,"shallowClone");function e4(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}s(e4,"Jk"),o(e4,"numKeys");var LE=o(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}`)}},"getParsedType"),Ur=new Set(["string","number","symbol"]),t4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(Ie,"Pe"),o(Ie,"escapeRegex");function ye(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}s(ye,"ve"),o(ye,"clone");function z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:o(()=>t,"error")};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:o(()=>t.error,"error")}:t}s(z,"N"),o(z,"normalizeParams");function u4(e){let t;return new Proxy({},{get(r,n,u){return t??(t=e()),Reflect.get(t,n,u)},set(r,n,u,i){return t??(t=e()),Reflect.set(t,n,u,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,u){return t??(t=e()),Reflect.defineProperty(t,n,u)}})}s(u4,"Kk"),o(u4,"createTransparentProxy");function P(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}s(P,"j"),o(P,"stringifyPrimitive");function ws(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}s(ws,"Xa"),o(ws,"optionalKeys");var r4={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]},n4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function i4(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let u=_e(e._zod.def,{get shape(){let i={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Re(this,"shape",i),i},checks:[]});return ye(e,u)}s(i4,"Xk"),o(i4,"pick");function s4(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let u=_e(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Re(this,"shape",i),i},checks:[]});return ye(e,u)}s(s4,"Hk"),o(s4,"omit");function a4(e,t){if(!Le(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let u=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(u,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=_e(e._zod.def,{get shape(){let u={...e._zod.def.shape,...t};return Re(this,"shape",u),u}});return ye(e,n)}s(a4,"Yk"),o(a4,"extend");function o4(e,t){if(!Le(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=_e(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Re(this,"shape",n),n}});return ye(e,r)}s(o4,"Qk"),o(o4,"safeExtend");function l4(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=_e(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Re(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ye(e,r)}s(l4,"eS"),o(l4,"merge");function d4(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let u=_e(t._zod.def,{get shape(){let i=t._zod.def.shape,a={...i};if(r)for(let l in r){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(a[l]=e?new e({type:"optional",innerType:i[l]}):i[l])}else for(let l in i)a[l]=e?new e({type:"optional",innerType:i[l]}):i[l];return Re(this,"shape",a),a},checks:[]});return ye(t,u)}s(d4,"tS"),o(d4,"partial");function c4(e,t,r){let n=_e(t._zod.def,{get shape(){let u=t._zod.def.shape,i={...u};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:u[a]}))}else for(let a in u)i[a]=new e({type:"nonoptional",innerType:u[a]});return Re(this,"shape",i),i}});return ye(t,n)}s(c4,"rS"),o(c4,"required");function qe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}s(qe,"st"),o(qe,"aborted");function Bs(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}s(Bs,"Qa"),o(Bs,"explicitlyAborted");function Ee(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}s(Ee,"_e"),o(Ee,"prefixIssues");function kt(e){return typeof e=="string"?e:e?.message}s(kt,"Br"),o(kt,"unwrapMessage");function ge(e,t,r){let n=e.message?e.message:kt(e.inst?._zod.def?.error?.(e))??kt(t?.error?.(e))??kt(r.customError?.(e))??kt(r.localeError?.(e))??"Invalid input",{inst:u,continue:i,input:a,...l}=e;return l.path??(l.path=[]),l.message=n,t?.reportInput&&(l.input=a),l}s(ge,"ye"),o(ge,"finalizeIssue");function mu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}s(mu,"Gr"),o(mu,"getSizableOrigin");function fu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}s(fu,"Jr"),o(fu,"getLengthableOrigin");function Z(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}s(Z,"P"),o(Z,"parsedType");function hu(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}s(hu,"Wt"),o(hu,"issue");function p4(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}s(p4,"nS"),o(p4,"cleanEnum");function xs(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}s(xs,"ib"),o(xs,"base64ToUint8Array");function $s(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}s($s,"sb"),o($s,"uint8ArrayToBase64");function m4(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return xs(t+r)}s(m4,"oS"),o(m4,"base64urlToUint8Array");function f4(e){return $s(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}s(f4,"iS"),o(f4,"uint8ArrayToBase64url");function h4(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}s(h4,"sS"),o(h4,"hexToUint8Array");function g4(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}s(g4,"aS"),o(g4,"uint8ArrayToHex");var qE=class{static{s(this,"Va")}static{o(this,"Class")}constructor(...e){}},v4=o((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,cu,2),Object.defineProperty(e,"toString",{value:o(()=>e.message,"value"),enumerable:!1})},"initializer"),Cs=D("$ZodError",v4),be=D("$ZodError",v4,{Parent:Error});function Zr(e,t=r=>r.message){let r={},n=[];for(let u of e.issues)u.path.length>0?(r[u.path[0]]=r[u.path[0]]||[],r[u.path[0]].push(t(u))):n.push(t(u));return{formErrors:n,fieldErrors:r}}s(Zr,"Kr"),o(Zr,"flattenError");function Lr(e,t=r=>r.message){let r={_errors:[]},n=o((u,i=[])=>{for(let a of u.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>n({issues:l},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{let l=[...i,...a.path];if(l.length===0)r._errors.push(t(a));else{let d=r,c=0;for(;c<l.length;){let p=l[c];c===l.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(t(a))):d[p]=d[p]||{_errors:[]},d=d[p],c++}}}},"processError");return n(e),r}s(Lr,"Xr"),o(Lr,"formatError");function ks(e,t=r=>r.message){let r={errors:[]},n=o((u,i=[])=>{var a,l;for(let d of u.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(c=>n({issues:c},[...i,...d.path]));else if(d.code==="invalid_key")n({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")n({issues:d.issues},[...i,...d.path]);else{let c=[...i,...d.path];if(c.length===0){r.errors.push(t(d));continue}let p=r,m=0;for(;m<c.length;){let f=c[m],h=m===c.length-1;typeof f=="string"?(p.properties??(p.properties={}),(a=p.properties)[f]??(a[f]={errors:[]}),p=p.properties[f]):(p.items??(p.items=[]),(l=p.items)[f]??(l[f]={errors:[]}),p=p.items[f]),h&&p.errors.push(t(d)),m++}}},"processError");return n(e),r}s(ks,"ec"),o(ks,"treeifyError");function As(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}s(As,"cb"),o(As,"toDotPath");function _s(e){let t=[],r=[...e.issues].sort((n,u)=>(n.path??[]).length-(u.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${As(n.path)}`);return t.join(`
2
+ `)}s(_s,"tc"),o(_s,"prettifyError");var gu=o(e=>(t,r,n,u)=>{let i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new nt;if(a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>ge(d,i,ce())));throw bs(l,u?.callee),l}return a.value},"_parse"),Is=gu(be),vu=o(e=>async(t,r,n,u)=>{let i=n?{...n,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(u?.Err??e)(a.issues.map(d=>ge(d,i,ce())));throw bs(l,u?.callee),l}return a.value},"_parseAsync"),Ss=vu(be),yu=o(e=>(t,r,n)=>{let u=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},u);if(i instanceof Promise)throw new nt;return i.issues.length?{success:!1,error:new(e??Cs)(i.issues.map(a=>ge(a,u,ce())))}:{success:!0,data:i.value}},"_safeParse"),y4=yu(be),Eu=o(e=>async(t,r,n)=>{let u=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},u);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>ge(a,u,ce())))}:{success:!0,data:i.value}},"_safeParseAsync"),E4=Eu(be),Fs=o(e=>(t,r,n)=>{let u=n?{...n,direction:"backward"}:{direction:"backward"};return gu(e)(t,r,u)},"_encode"),VE=Fs(be),zs=o(e=>(t,r,n)=>gu(e)(t,r,n),"_decode"),JE=zs(be),js=o(e=>async(t,r,n)=>{let u=n?{...n,direction:"backward"}:{direction:"backward"};return vu(e)(t,r,u)},"_encodeAsync"),GE=js(be),Os=o(e=>async(t,r,n)=>vu(e)(t,r,n),"_decodeAsync"),WE=Os(be),Rs=o(e=>(t,r,n)=>{let u=n?{...n,direction:"backward"}:{direction:"backward"};return yu(e)(t,r,u)},"_safeEncode"),KE=Rs(be),Ts=o(e=>(t,r,n)=>yu(e)(t,r,n),"_safeDecode"),HE=Ts(be),Ns=o(e=>async(t,r,n)=>{let u=n?{...n,direction:"backward"}:{direction:"backward"};return Eu(e)(t,r,u)},"_safeEncodeAsync"),XE=Ns(be),Ms=o(e=>async(t,r,n)=>Eu(e)(t,r,n),"_safeDecodeAsync"),YE=Ms(be),Ve={};Oe(Ve,{base64:s(()=>O4,"base64"),base64url:s(()=>Us,"base64url"),bigint:s(()=>U4,"bigint"),boolean:s(()=>L4,"boolean"),browserEmail:s(()=>sb,"browserEmail"),cidrv4:s(()=>z4,"cidrv4"),cidrv6:s(()=>j4,"cidrv6"),cuid:s(()=>b4,"cuid"),cuid2:s(()=>D4,"cuid2"),date:s(()=>M4,"date"),datetime:s(()=>qs,"datetime"),domain:s(()=>lb,"domain"),duration:s(()=>C4,"duration"),e164:s(()=>T4,"e164"),email:s(()=>A4,"email"),emoji:s(()=>Ps,"emoji"),extendedDuration:s(()=>QE,"extendedDuration"),guid:s(()=>k4,"guid"),hex:s(()=>db,"hex"),hostname:s(()=>ob,"hostname"),html5Email:s(()=>rb,"html5Email"),httpProtocol:s(()=>R4,"httpProtocol"),idnEmail:s(()=>ib,"idnEmail"),integer:s(()=>Z4,"integer"),ipv4:s(()=>I4,"ipv4"),ipv6:s(()=>S4,"ipv6"),ksuid:s(()=>x4,"ksuid"),lowercase:s(()=>J4,"lowercase"),mac:s(()=>F4,"mac"),md5_base64:s(()=>pb,"md5_base64"),md5_base64url:s(()=>mb,"md5_base64url"),md5_hex:s(()=>cb,"md5_hex"),nanoid:s(()=>$4,"nanoid"),null:s(()=>q4,"null"),number:s(()=>Vs,"number"),rfc5322Email:s(()=>nb,"rfc5322Email"),sha1_base64:s(()=>hb,"sha1_base64"),sha1_base64url:s(()=>gb,"sha1_base64url"),sha1_hex:s(()=>fb,"sha1_hex"),sha256_base64:s(()=>yb,"sha256_base64"),sha256_base64url:s(()=>Eb,"sha256_base64url"),sha256_hex:s(()=>vb,"sha256_hex"),sha384_base64:s(()=>Db,"sha384_base64"),sha384_base64url:s(()=>wb,"sha384_base64url"),sha384_hex:s(()=>bb,"sha384_hex"),sha512_base64:s(()=>xb,"sha512_base64"),sha512_base64url:s(()=>$b,"sha512_base64url"),sha512_hex:s(()=>Bb,"sha512_hex"),string:s(()=>P4,"string"),time:s(()=>Ls,"time"),ulid:s(()=>w4,"ulid"),undefined:s(()=>V4,"undefined"),unicodeEmail:s(()=>_4,"unicodeEmail"),uppercase:s(()=>G4,"uppercase"),uuid:s(()=>At,"uuid"),uuid4:s(()=>eb,"uuid4"),uuid6:s(()=>tb,"uuid6"),uuid7:s(()=>ub,"uuid7"),xid:s(()=>B4,"xid")});var b4=/^[cC][0-9a-z]{6,}$/,D4=/^[0-9a-z]+$/,w4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,B4=/^[0-9a-vA-V]{20}$/,x4=/^[A-Za-z0-9]{27}$/,$4=/^[a-zA-Z0-9_-]{21}$/,C4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,QE=/^[-+]?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)?)??$/,k4=/^([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})$/,At=o(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)$/,"uuid"),eb=At(4),tb=At(6),ub=At(7),A4=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rb=/^[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])?)*$/,nb=/^(([^<>()\[\]\\.,;:\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,}))$/,_4=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ib=_4,sb=/^[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])?)*$/,ab="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ps(){return new RegExp(ab,"u")}s(Ps,"mc"),o(Ps,"emoji");var I4=/^(?:(?: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])$/,S4=/^(([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}|:))$/,F4=o(e=>{let t=Ie(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},"mac"),z4=/^((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])$/,j4=/^(([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])$/,O4=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Us=/^[A-Za-z0-9_-]*$/,ob=/^(?=.{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])?)*\.?$/,lb=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,R4=/^https?$/,T4=/^\+[1-9]\d{6,14}$/,N4="(?:(?:\\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])))",M4=new RegExp(`^${N4}$`);function Zs(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+)?)?`}s(Zs,"db"),o(Zs,"timeSource");function Ls(e){return new RegExp(`^${Zs(e)}$`)}s(Ls,"$c"),o(Ls,"time");function qs(e){let t=Zs({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${N4}T(?:${n})$`)}s(qs,"kc"),o(qs,"datetime");var P4=o(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),U4=/^-?\d+n?$/,Z4=/^-?\d+$/,Vs=/^-?\d+(?:\.\d+)?$/,L4=/^(?:true|false)$/i,q4=/^null$/i,V4=/^undefined$/i,J4=/^[^A-Z]*$/,G4=/^[^a-z]*$/,db=/^[0-9a-fA-F]*$/;function _t(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}s(_t,"Hr"),o(_t,"fixedBase64");function It(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}s(It,"Yr"),o(It,"fixedBase64url");var cb=/^[0-9a-fA-F]{32}$/,pb=_t(22,"=="),mb=It(22),fb=/^[0-9a-fA-F]{40}$/,hb=_t(27,"="),gb=It(27),vb=/^[0-9a-fA-F]{64}$/,yb=_t(43,"="),Eb=It(43),bb=/^[0-9a-fA-F]{96}$/,Db=_t(64,""),wb=It(64),Bb=/^[0-9a-fA-F]{128}$/,xb=_t(86,"=="),$b=It(86),ne=D("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),W4={number:"number",bigint:"bigint",object:"date"},Js=D("$ZodCheckLessThan",(e,t)=>{ne.init(e,t);let r=W4[typeof t.value];e._zod.onattach.push(n=>{let u=n._zod.bag,i=(t.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?u.maximum=t.value:u.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gs=D("$ZodCheckGreaterThan",(e,t)=>{ne.init(e,t);let r=W4[typeof t.value];e._zod.onattach.push(n=>{let u=n._zod.bag,i=(t.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?u.minimum=t.value:u.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),K4=D("$ZodCheckMultipleOf",(e,t)=>{ne.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ys(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),H4=D("$ZodCheckNumberFormat",(e,t)=>{ne.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[u,i]=r4[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=u,l.maximum=i,r&&(l.pattern=Z4)}),e._zod.check=a=>{let l=a.value;if(r){if(!Number.isInteger(l)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}l<u&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!t.abort}),l>i&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),X4=D("$ZodCheckBigIntFormat",(e,t)=>{ne.init(e,t);let[r,n]=n4[t.format];e._zod.onattach.push(u=>{let i=u._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n}),e._zod.check=u=>{let i=u.value;i<r&&u.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&u.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Y4=D("$ZodCheckMaxSize",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.size!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let u=n.value;u.size<=t.maximum||n.issues.push({origin:mu(u),code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),Q4=D("$ZodCheckMinSize",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.size!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let u=n.value;u.size>=t.minimum||n.issues.push({origin:mu(u),code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),ef=D("$ZodCheckSizeEquals",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.size!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag;u.minimum=t.size,u.maximum=t.size,u.size=t.size}),e._zod.check=n=>{let u=n.value,i=u.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:mu(u),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tf=D("$ZodCheckMaxLength",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.length!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<u&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let u=n.value;if(u.length<=t.maximum)return;let i=fu(u);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),uf=D("$ZodCheckMinLength",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.length!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>u&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let u=n.value;if(u.length>=t.minimum)return;let i=fu(u);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:u,inst:e,continue:!t.abort})}}),rf=D("$ZodCheckLengthEquals",(e,t)=>{var r;ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{let u=n.value;return!Ze(u)&&u.length!==void 0}),e._zod.onattach.push(n=>{let u=n._zod.bag;u.minimum=t.length,u.maximum=t.length,u.length=t.length}),e._zod.check=n=>{let u=n.value,i=u.length;if(i===t.length)return;let a=fu(u),l=i>t.length;n.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),bu=D("$ZodCheckStringFormat",(e,t)=>{var r,n;ne.init(e,t),e._zod.onattach.push(u=>{let i=u._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=u=>{t.pattern.lastIndex=0,!t.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:t.format,input:u.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),nf=D("$ZodCheckRegex",(e,t)=>{bu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sf=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=J4),bu.init(e,t)}),af=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=G4),bu.init(e,t)}),of=D("$ZodCheckIncludes",(e,t)=>{ne.init(e,t);let r=Ie(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(u=>{let i=u._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=u=>{u.value.includes(t.includes,t.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:u.value,inst:e,continue:!t.abort})}}),lf=D("$ZodCheckStartsWith",(e,t)=>{ne.init(e,t);let r=new RegExp(`^${Ie(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let u=n._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),df=D("$ZodCheckEndsWith",(e,t)=>{ne.init(e,t);let r=new RegExp(`.*${Ie(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let u=n._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Ws(e,t,r){e.issues.length&&t.issues.push(...Ee(r,e.issues))}s(Ws,"pb"),o(Ws,"handleCheckPropertyResult");var cf=D("$ZodCheckProperty",(e,t)=>{ne.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(u=>Ws(u,r,t.property));Ws(n,r,t.property)}}),pf=D("$ZodCheckMimeType",(e,t)=>{ne.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),mf=D("$ZodCheckOverwrite",(e,t)=>{ne.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),ff=class{static{s(this,"Qr")}static{o(this,"Doc")}constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
3
+ `).filter(u=>u),r=Math.min(...t.map(u=>u.length-u.trimStart().length)),n=t.map(u=>u.slice(r)).map(u=>" ".repeat(this.indent*2)+u);for(let u of n)this.content.push(u)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(n=>` ${n}`)];return new e(...t,r.join(`
4
+ `))}},hf={major:4,minor:4,patch:3},L=D("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hf;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let u of n)for(let i of u._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let u=o((a,l,d)=>{let c=qe(a),p;for(let m of l){if(m._zod.def.when){if(Bs(a)||!m._zod.def.when(a))continue}else if(c)continue;let f=a.issues.length,h=m._zod.check(a);if(h instanceof Promise&&d?.async===!1)throw new nt;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,a.issues.length!==f&&(c||(c=qe(a,f)))});else{if(a.issues.length===f)continue;c||(c=qe(a,f))}}return p?p.then(()=>a):a},"runChecks"),i=o((a,l,d)=>{if(qe(a))return a.aborted=!0,a;let c=u(l,n,d);if(c instanceof Promise){if(d.async===!1)throw new nt;return c.then(p=>e._zod.parse(p,d))}return e._zod.parse(c,d)},"handleCanaryResult");e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(p=>i(p,a,l)):i(c,a,l)}let d=e._zod.parse(a,l);if(d instanceof Promise){if(l.async===!1)throw new nt;return d.then(c=>u(c,n,l))}return u(d,n,l)}}G(e,"~standard",()=>({validate:o(u=>{try{let i=y4(e,u);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return E4(e,u).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Du=D("$ZodString",(e,t)=>{L.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??P4(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),te=D("$ZodStringFormat",(e,t)=>{bu.init(e,t),Du.init(e,t)}),gf=D("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=k4),te.init(e,t)}),vf=D("$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=At(r))}else t.pattern??(t.pattern=At());te.init(e,t)}),yf=D("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=A4),te.init(e,t)}),Ef=D("$ZodURL",(e,t)=>{te.init(e,t),e._zod.check=r=>{try{let n=r.value.trim();if(!t.normalize&&t.protocol?.source===R4.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let u=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(u.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=u.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),bf=D("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ps()),te.init(e,t)}),Df=D("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$4),te.init(e,t)}),wf=D("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=b4),te.init(e,t)}),Bf=D("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=D4),te.init(e,t)}),xf=D("$ZodULID",(e,t)=>{t.pattern??(t.pattern=w4),te.init(e,t)}),$f=D("$ZodXID",(e,t)=>{t.pattern??(t.pattern=B4),te.init(e,t)}),Cf=D("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=x4),te.init(e,t)}),kf=D("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qs(t)),te.init(e,t)}),Af=D("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=M4),te.init(e,t)}),_f=D("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ls(t)),te.init(e,t)}),If=D("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=C4),te.init(e,t)}),Sf=D("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=I4),te.init(e,t),e._zod.bag.format="ipv4"}),Ff=D("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=S4),te.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),zf=D("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=F4(t.delimiter)),te.init(e,t),e._zod.bag.format="mac"}),jf=D("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=z4),te.init(e,t)}),Of=D("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=j4),te.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[u,i]=n;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${u}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function qr(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}s(qr,"bu"),o(qr,"isValidBase64");var Rf=D("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=O4),te.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{qr(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Ks(e){if(!Us.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return qr(r)}s(Ks,"Tb"),o(Ks,"isValidBase64URL");var Tf=D("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Us),te.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Ks(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Nf=D("$ZodE164",(e,t)=>{t.pattern??(t.pattern=T4),te.init(e,t)});function Hs(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let u=JSON.parse(atob(n));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||t&&(!("alg"in u)||u.alg!==t))}catch{return!1}}s(Hs,"Ab"),o(Hs,"isValidJWT");var Mf=D("$ZodJWT",(e,t)=>{te.init(e,t),e._zod.check=r=>{Hs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Pf=D("$ZodCustomStringFormat",(e,t)=>{te.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Xs=D("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vs,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let u=r.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return r;let i=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...i?{received:i}:{}}),r}}),Uf=D("$ZodNumberFormat",(e,t)=>{H4.init(e,t),Xs.init(e,t)}),Ys=D("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=L4,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let u=r.value;return typeof u=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),r}}),Qs=D("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=U4,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Zf=D("$ZodBigIntFormat",(e,t)=>{X4.init(e,t),Qs.init(e,t)}),Lf=D("$ZodSymbol",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;return typeof u=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:e}),r}}),qf=D("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=V4,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:e}),r}}),Vf=D("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=q4,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let u=r.value;return u===null||r.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),r}}),Jf=D("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Gf=D("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Wf=D("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Kf=D("$ZodVoid",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;return typeof u>"u"||r.issues.push({expected:"void",code:"invalid_type",input:u,inst:e}),r}}),Hf=D("$ZodDate",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let u=r.value,i=u instanceof Date;return i&&!Number.isNaN(u.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:u,...i?{received:"Invalid Date"}:{},inst:e}),r}});function ea(e,t,r){e.issues.length&&t.issues.push(...Ee(r,e.issues)),t.value[r]=e.value}s(ea,"hb"),o(ea,"handleArrayResult");var Xf=D("$ZodArray",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;if(!Array.isArray(u))return r.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),r;r.value=Array(u.length);let i=[];for(let a=0;a<u.length;a++){let l=u[a],d=t.element._zod.run({value:l,issues:[]},n);d instanceof Promise?i.push(d.then(c=>ea(c,r,a))):ea(d,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function wu(e,t,r,n,u,i){let a=r in n;if(e.issues.length){if(u&&i&&!a)return;t.issues.push(...Ee(r,e.issues))}if(!a&&!u){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}s(wu,"ii"),o(wu,"handlePropertyResult");function ta(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=ws(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}s(ta,"zb"),o(ta,"normalizeDef");function ua(e,t,r,n,u,i){let a=[],l=u.keySet,d=u.catchall._zod,c=d.def.type,p=d.optin==="optional",m=d.optout==="optional";for(let f in t){if(f==="__proto__"||l.has(f))continue;if(c==="never"){a.push(f);continue}let h=d.run({value:t[f],issues:[]},n);h instanceof Promise?e.push(h.then(g=>wu(g,r,f,t,p,m))):wu(h,r,f,t,p,m)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}s(ua,"Ob"),o(ua,"handleCatchall");var Yf=D("$ZodObject",(e,t)=>{if(L.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:o(()=>{let l={...a};return Object.defineProperty(t,"shape",{value:l}),l},"get")})}let r=Ct(()=>ta(t));G(e._zod,"propValues",()=>{let a=t.shape,l={};for(let d in a){let c=a[d]._zod;if(c.values){l[d]??(l[d]=new Set);for(let p of c.values)l[d].add(p)}}return l});let n=it,u=t.catchall,i;e._zod.parse=(a,l)=>{i??(i=r.value);let d=a.value;if(!n(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let c=[],p=i.shape;for(let m of i.keys){let f=p[m],h=f._zod.optin==="optional",g=f._zod.optout==="optional",E=f._zod.run({value:d[m],issues:[]},l);E instanceof Promise?c.push(E.then(B=>wu(B,a,m,d,h,g))):wu(E,a,m,d,h,g)}return u?ua(c,d,a,l,r.value,e):c.length?Promise.all(c).then(()=>a):a}}),Qf=D("$ZodObjectJIT",(e,t)=>{Yf.init(e,t);let r=e._zod.parse,n=Ct(()=>ta(t)),u=o(m=>{let f=new ff(["shape","payload","ctx"]),h=n.value,g=o(b=>{let $=Pr(b);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`},"parseStr");f.write("const input = payload.value;");let E=Object.create(null),B=0;for(let b of h.keys)E[b]=`key_${B++}`;f.write("const newResult = {};");for(let b of h.keys){let $=E[b],x=Pr(b),F=m[b],C=F?._zod?.optin==="optional",j=F?._zod?.optout==="optional";f.write(`const ${$} = ${g(b)};`),C&&j?f.write(`
5
+ if (${$}.issues.length) {
6
+ if (${x} in input) {
7
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
8
8
  ...iss,
9
- path: iss.path ? [${F}, ...iss.path] : [${F}]
9
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
10
10
  })));
11
11
  }
12
12
  }
13
13
 
14
- if (${_}.value === undefined) {
15
- if (${F} in input) {
16
- newResult[${F}] = undefined;
14
+ if (${$}.value === undefined) {
15
+ if (${x} in input) {
16
+ newResult[${x}] = undefined;
17
17
  }
18
18
  } else {
19
- newResult[${F}] = ${_}.value;
19
+ newResult[${x}] = ${$}.value;
20
20
  }
21
21
 
22
- `):z?p.write(`
23
- if (${_}.issues.length) {
24
- payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
22
+ `):C?f.write(`
23
+ if (${$}.issues.length) {
24
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
25
25
  ...iss,
26
- path: iss.path ? [${F}, ...iss.path] : [${F}]
26
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
27
27
  })));
28
28
  }
29
29
 
30
- if (${_}.value === undefined) {
31
- if (${F} in input) {
32
- newResult[${F}] = undefined;
30
+ if (${$}.value === undefined) {
31
+ if (${x} in input) {
32
+ newResult[${x}] = undefined;
33
33
  }
34
34
  } else {
35
- newResult[${F}] = ${_}.value;
35
+ newResult[${x}] = ${$}.value;
36
36
  }
37
37
 
38
- `):p.write(`
39
- const ${_}_present = ${F} in input;
40
- if (${_}.issues.length) {
41
- payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
38
+ `):f.write(`
39
+ const ${$}_present = ${x} in input;
40
+ if (${$}.issues.length) {
41
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
42
42
  ...iss,
43
- path: iss.path ? [${F}, ...iss.path] : [${F}]
43
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
44
44
  })));
45
45
  }
46
- if (!${_}_present && !${_}.issues.length) {
46
+ if (!${$}_present && !${$}.issues.length) {
47
47
  payload.issues.push({
48
48
  code: "invalid_type",
49
49
  expected: "nonoptional",
50
50
  input: undefined,
51
- path: [${F}]
51
+ path: [${x}]
52
52
  });
53
53
  }
54
54
 
55
- if (${_}_present) {
56
- if (${_}.value === undefined) {
57
- newResult[${F}] = undefined;
55
+ if (${$}_present) {
56
+ if (${$}.value === undefined) {
57
+ newResult[${x}] = undefined;
58
58
  } else {
59
- newResult[${F}] = ${_}.value;
59
+ newResult[${x}] = ${$}.value;
60
60
  }
61
61
  }
62
62
 
63
- `)}p.write("payload.value = newResult;"),p.write("return payload;");let B=p.compile();return(k,_)=>B(f,k,_)},"generateFastpass"),n,a=et,l=!Qt.jitless,d=l&&X4.value,c=t.catchall,m;e._zod.parse=(f,p)=>{m??(m=i.value);let g=f.value;return a(g)?l&&d&&p?.async===!1&&p.jitless!==!0?(n||(n=u(t.shape)),f=n(f,p),c?Os([],g,f,p,m,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Ts(e,t,r,i){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let u=e.filter(n=>!Ue(n));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>fe(a,i,de())))}),t)}s(Ts,"yy"),o(Ts,"handleUnionResults");var Sr=b("$ZodUnion",(e,t)=>{L.init(e,t),G(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),G(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),G(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),G(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${i.map(u=>tu(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);if(d instanceof Promise)a.push(d),n=!0;else{if(d.issues.length===0)return d;a.push(d)}}return n?Promise.all(a).then(l=>Ts(l,i,e,u)):Ts(a,i,e,u)}});function Ns(e,t,r,i){let u=e.filter(n=>n.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(n=>n.issues.map(a=>fe(a,i,de())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(Ns,"by"),o(Ns,"handleExclusiveUnionResults");var Xp=b("$ZodXor",(e,t)=>{Sr.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,u)=>{if(r)return r(i,u);let n=!1,a=[];for(let l of t.options){let d=l._zod.run({value:i.value,issues:[]},u);d instanceof Promise?(a.push(d),n=!0):a.push(d)}return n?Promise.all(a).then(l=>Ns(l,i,e,u)):Ns(a,i,e,u)}}),Yp=b("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Sr.init(e,t);let r=e._zod.parse;G(e._zod,"propValues",()=>{let u={};for(let n of t.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let c of d)u[l].add(c)}}return u});let i=yt(()=>{let u=t.options,n=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(n.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);n.set(d,a)}}return n});e._zod.parse=(u,n)=>{let a=u.value;if(!et(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=i.value.get(a?.[t.discriminator]);return l?l._zod.run(u,n):t.unionFallback||n.direction==="backward"?r(u,n):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),Qp=b("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value,n=t.left._zod.run({value:u,issues:[]},i),a=t.right._zod.run({value:u,issues:[]},i);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([l,d])=>Ps(r,l,d)):Ps(r,n,a)}});function Fr(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(Pe(e)&&Pe(t)){let r=Object.keys(t),i=Object.keys(e).filter(n=>r.indexOf(n)!==-1),u={...e,...t};for(let n of i){let a=Fr(e[n],t[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};u[n]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let u=e[i],n=t[i],a=Fr(u,n);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(Fr,"Sc"),o(Fr,"mergeValues");function Ps(e,t,r){let i=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(l);let n=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(n.length&&u&&e.issues.push({...u,keys:n}),Ue(e))return e;let a=Fr(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(Ps,"xy"),o(Ps,"handleIntersectionResults");var Us=b("$ZodTuple",(e,t)=>{L.init(e,t);let r=t.items;e._zod.parse=(i,u)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],l=Ms(r,"optin"),d=Ms(r,"optout");if(!t.rest){if(n.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:n,inst:e,origin:"array"}),i;n.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=new Array(r.length);for(let m=0;m<r.length;m++){let f=r[m]._zod.run({value:n[m],issues:[]},u);f instanceof Promise?a.push(f.then(p=>{c[m]=p})):c[m]=f}if(t.rest){let m=r.length-1,f=n.slice(r.length);for(let p of f){m++;let g=t.rest._zod.run({value:p,issues:[]},u);g instanceof Promise?a.push(g.then(v=>Zs(v,i,m))):Zs(g,i,m)}}return a.length?Promise.all(a).then(()=>Ls(c,i,r,n,d)):Ls(c,i,r,n,d)}});function Ms(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(Ms,"_y"),o(Ms,"getTupleOptStart");function Zs(e,t,r){e.issues.length&&t.issues.push(...ve(r,e.issues)),t.value[r]=e.value}s(Zs,"wy"),o(Zs,"handleTupleResult");function Ls(e,t,r,i,u){for(let n=0;n<r.length;n++){let a=e[n],l=n<i.length;if(a.issues.length){if(!l&&n>=u){t.value.length=n;break}t.issues.push(...ve(n,a.issues))}t.value[n]=a.value}for(let n=t.value.length-1;n>=i.length&&r[n]._zod.optout==="optional"&&t.value[n]===void 0;n--)t.value.length=n;return t}s(Ls,"$y"),o(Ls,"handleTupleResults");var ef=b("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!Pe(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){l.add(typeof c=="number"?c.toString():c);let m=t.keyType._zod.run({value:c,issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(g=>fe(g,i,de())),input:c,path:[c],inst:e});continue}let f=m.value,p=t.valueType._zod.run({value:u[c],issues:[]},i);p instanceof Promise?n.push(p.then(g=>{g.issues.length&&r.issues.push(...ve(c,g.issues)),r.value[f]=g.value})):(p.issues.length&&r.issues.push(...ve(c,p.issues)),r.value[f]=p.value)}let d;for(let c in u)l.has(c)||(d=d??[],d.push(c));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&xs.test(l)&&d.issues.length){let m=t.keyType._zod.run({value:Number(l),issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(d=m)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(m=>fe(m,i,de())),input:l,path:[l],inst:e});continue}let c=t.valueType._zod.run({value:u[l],issues:[]},i);c instanceof Promise?n.push(c.then(m=>{m.issues.length&&r.issues.push(...ve(l,m.issues)),r.value[d.value]=m.value})):(c.issues.length&&r.issues.push(...ve(l,c.issues)),r.value[d.value]=c.value)}}return n.length?Promise.all(n).then(()=>r):r}}),tf=b("$ZodMap",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let n=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:l,issues:[]},i);d instanceof Promise||c instanceof Promise?n.push(Promise.all([d,c]).then(([m,f])=>{qs(m,f,r,a,u,e,i)})):qs(d,c,r,a,u,e,i)}return n.length?Promise.all(n).then(()=>r):r}});function qs(e,t,r,i,u,n,a){e.issues.length&&(kr.has(typeof i)?r.issues.push(...ve(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:n,issues:e.issues.map(l=>fe(l,a,de()))})),t.issues.length&&(kr.has(typeof i)?r.issues.push(...ve(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:n,key:i,issues:t.issues.map(l=>fe(l,a,de()))})),r.value.set(e.value,t.value)}s(qs,"ky"),o(qs,"handleMapResult");var uf=b("$ZodSet",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let n=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise?n.push(l.then(d=>Vs(d,r))):Vs(l,r)}return n.length?Promise.all(n).then(()=>r):r}});function Vs(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s(Vs,"Sy"),o(Vs,"handleSetResult");var rf=b("$ZodEnum",(e,t)=>{L.init(e,t);let r=xr(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(u=>kr.has(typeof u)).map(u=>typeof u=="string"?$e(u):u.toString()).join("|")})$`),e._zod.parse=(u,n)=>{let a=u.value;return i.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),nf=b("$ZodLiteral",(e,t)=>{if(L.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?$e(i):i?$e(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,u)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),sf=b("$ZodFile",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),af=b("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Cr(e.constructor.name);let u=t.transform(r.value,r);if(i.async)return(u instanceof Promise?u:Promise.resolve(u)).then(n=>(r.value=n,r.fallback=!0,r));if(u instanceof Promise)throw new Qe;return r.value=u,r.fallback=!0,r}});function Js(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s(Js,"Iy"),o(Js,"handleOptionalResult");var Gs=b("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tu(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(a=>Js(a,u)):Js(n,u)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),of=b("$ZodExactOptional",(e,t)=>{Gs.init(e,t),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),lf=b("$ZodNullable",(e,t)=>{L.init(e,t),G(e._zod,"optin",()=>t.innerType._zod.optin),G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tu(r.source)}|null)$`):void 0}),G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),df=b("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>Ws(n,t)):Ws(u,t)}});function Ws(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(Ws,"Ry"),o(Ws,"handleDefaultResult");var cf=b("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),mf=b("$ZodNonOptional",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>Ks(n,e)):Ks(u,e)}});function Ks(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(Ks,"Ty"),o(Ks,"handleNonOptionalResult");var pf=b("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Cr("ZodSuccess");let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),ff=b("$ZodCatch",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(n=>(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(a=>fe(a,i,de()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(n=>fe(n,i,de()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),gf=b("$ZodNaN",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Hs=b("$ZodPipe",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let n=t.out._zod.run(r,i);return n instanceof Promise?n.then(a=>mu(a,t.in,i)):mu(n,t.in,i)}let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>mu(n,t.out,i)):mu(u,t.out,i)}});function mu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(mu,"Co"),o(mu,"handlePipeResult");var Xs=b("$ZodCodec",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let u=t.in._zod.run(r,i);return u instanceof Promise?u.then(n=>pu(n,t,i)):pu(u,t,i)}else{let u=t.out._zod.run(r,i);return u instanceof Promise?u.then(n=>pu(n,t,i)):pu(u,t,i)}}});function pu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(u=>fu(e,u,t.out,r)):fu(e,i,t.out,r)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(u=>fu(e,u,t.in,r)):fu(e,i,t.in,r)}}s(pu,"Uo"),o(pu,"handleCodecAResult");function fu(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}s(fu,"Lo"),o(fu,"handleCodecTxResult");var hf=b("$ZodPreprocess",(e,t)=>{Hs.init(e,t)}),vf=b("$ZodReadonly",(e,t)=>{L.init(e,t),G(e._zod,"propValues",()=>t.innerType._zod.propValues),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"optin",()=>t.innerType?._zod?.optin),G(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let u=t.innerType._zod.run(r,i);return u instanceof Promise?u.then(Ys):Ys(u)}});function Ys(e){return e.value=Object.freeze(e.value),e}s(Ys,"Ey"),o(Ys,"handleReadonlyResult");var yf=b("$ZodTemplateLiteral",(e,t)=>{L.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let u=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let n=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(n,a))}else if(i===null||Q4.has(typeof i))r.push($e(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,u)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Ef=b("$ZodFunction",(e,t)=>(L.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let u=e._def.input?ds(e._def.input,i):i,n=Reflect.apply(r,this,u);return e._def.output?ds(e._def.output,n):n}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let u=e._def.input?await cs(e._def.input,i):i,n=await Reflect.apply(r,this,u);return e._def.output?await cs(e._def.output,n):n}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Us({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Df=b("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},i))}),bf=b("$ZodLazy",(e,t)=>{L.init(e,t),G(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),G(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),G(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),G(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),G(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Bf=b("$ZodCustom",(e,t)=>{te.init(e,t),L.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,u=t.fn(i);if(u instanceof Promise)return u.then(n=>Qs(n,r,i,e));Qs(u,r,i,e)}});function Qs(e,t,r,i){if(!e){let u={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(u.params=i._zod.def.params),t.issues.push(nu(u))}}s(Qs,"Ay"),o(Qs,"handleRefineResult");var ea={};Se(ea,{ar:s(()=>wf,"ar"),az:s(()=>Cf,"az"),be:s(()=>xf,"be"),bg:s(()=>$f,"bg"),ca:s(()=>kf,"ca"),cs:s(()=>Af,"cs"),da:s(()=>_f,"da"),de:s(()=>If,"de"),el:s(()=>Sf,"el"),en:s(()=>ua,"en"),eo:s(()=>Ff,"eo"),es:s(()=>zf,"es"),fa:s(()=>jf,"fa"),fi:s(()=>Rf,"fi"),fr:s(()=>Of,"fr"),frCA:s(()=>Tf,"frCA"),he:s(()=>Nf,"he"),hr:s(()=>Pf,"hr"),hu:s(()=>Uf,"hu"),hy:s(()=>Mf,"hy"),id:s(()=>Zf,"id"),is:s(()=>Lf,"is"),it:s(()=>qf,"it"),ja:s(()=>Vf,"ja"),ka:s(()=>Jf,"ka"),kh:s(()=>Gf,"kh"),km:s(()=>na,"km"),ko:s(()=>Wf,"ko"),lt:s(()=>Kf,"lt"),mk:s(()=>Hf,"mk"),ms:s(()=>Xf,"ms"),nl:s(()=>Yf,"nl"),no:s(()=>Qf,"no"),ota:s(()=>eg,"ota"),pl:s(()=>ug,"pl"),ps:s(()=>tg,"ps"),pt:s(()=>rg,"pt"),ro:s(()=>ng,"ro"),ru:s(()=>ig,"ru"),sl:s(()=>sg,"sl"),sv:s(()=>ag,"sv"),ta:s(()=>og,"ta"),th:s(()=>lg,"th"),tr:s(()=>dg,"tr"),ua:s(()=>cg,"ua"),uk:s(()=>aa,"uk"),ur:s(()=>mg,"ur"),uz:s(()=>pg,"uz"),vi:s(()=>fg,"vi"),yo:s(()=>vg,"yo"),zhCN:s(()=>gg,"zhCN"),zhTW:s(()=>hg,"zhTW")});var eE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\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 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return u.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 ${P(u.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: ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()} ${a.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 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${u.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${A(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.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 ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function wf(){return{localeError:eE()}}s(wf,"Nu"),o(wf,"default");var tE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${P(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[n.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${A(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Cf(){return{localeError:tE()}}s(Cf,"Du"),o(Cf,"default");function ta(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(ta,"Dy"),o(ta,"getBelarusianPlural");var uE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=ta(l,a.unit.one,a.unit.few,a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.maximum.toString()} ${d}`}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 ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=ta(l,a.unit.one,a.unit.few,a.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 ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${A(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.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 ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function xf(){return{localeError:uE()}}s(xf,"Mu"),o(xf,"default");var rE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.maximum.toString()} ${a.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 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;if(n.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 "${n.prefix}"`;if(n.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 "${n.suffix}"`;if(n.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 "${n.includes}"`;if(n.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 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${A(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function $f(){return{localeError:rE()}}s($f,"Cu"),o($f,"default");var nE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${P(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${A(u.values," o ")}`;case"too_big":{let n=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${n} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${n} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function kf(){return{localeError:nE()}}s(kf,"Uu"),o(kf,"default");var iE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${P(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${n}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${r[n.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${A(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function Af(){return{localeError:iE()}}s(Af,"Lu"),o(Af,"default");var sE=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\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"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${n}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${P(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${n} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${n} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${A(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function _f(){return{localeError:sE()}}s(_f,"Fu"),o(_f,"default");var aE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${P(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${n}${u.maximum.toString()} ist`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${n}${u.minimum.toString()} ist`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${A(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function If(){return{localeError:aE()}}s(If,"Zu"),o(If,"default");var oE=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${P(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[n.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${A(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function Sf(){return{localeError:oE()}}s(Sf,"Bu"),o(Sf,"default");var lE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return`Invalid input: expected ${n}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${P(u.values[0])}`:`Invalid option: expected one of ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${n}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${n}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(n=>`'${n}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function ua(){return{localeError:lE()}}s(ua,"qr"),o(ua,"default");var dE=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${P(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${n}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function Ff(){return{localeError:dE()}}s(Ff,"Vu"),o(Ff,"default");var cE=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={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 u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${P(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${n}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${r[n.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function zf(){return{localeError:cE()}}s(zf,"qu"),o(zf,"default");var mE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \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 ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${P(u.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 ${A(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[n.format]??u.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 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${A(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.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 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function jf(){return{localeError:mE()}}s(jf,"Gu"),o(jf,"default");var pE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${P(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${r[n.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${A(u.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"}}},"error");function Rf(){return{localeError:pE()}}s(Rf,"Ju"),o(Rf,"default");var fE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${P(u.values[0])} attendu`:`Option invalide : une valeur parmi ${A(u.values,"|")} attendue`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${i[u.origin]??"valeur"} doit ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${i[u.origin]??"valeur"} doit \xEAtre ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${A(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Of(){return{localeError:fE()}}s(Of,"Ku"),o(Of,"default");var gE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${P(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${n}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${n}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${r[n.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${A(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Tf(){return{localeError:gE()}}s(Tf,"Wu"),o(Tf,"default");var hE=o(()=>{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"}},r=o(c=>c?e[c]:void 0,"typeEntry"),i=o(c=>{let m=r(c);return m?m.label:c??e.unknown.label},"typeLabel"),u=o(c=>`\u05D4${i(c)}`,"withDefinite"),n=o(c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(c=>c?t[c]??null:null,"getSizing"),l={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"}},d={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let m=c.expected,f=d[m??""]??i(m),p=M(c.input),g=d[p]??e[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`}case"invalid_value":{if(c.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 ${P(c.values[0])}`;let m=c.values.map(p=>P(p));if(c.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 ${m[0]} \u05D0\u05D5 ${m[1]}`;let f=m[m.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 ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${f}`}case"too_big":{let m=a(c.origin),f=u(c.origin??"value");if(c.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${m?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=c.inclusive?`${c.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let p=c.inclusive?"<=":"<",g=n(c.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${f} ${g} ${p}${c.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${f} ${g} ${p}${c.maximum.toString()}`}case"too_small":{let m=a(c.origin),f=u(c.origin??"value");if(c.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${m?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let D=(c.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let E=c.inclusive?`${c.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let p=c.inclusive?">=":">",g=n(c.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${f} ${g} ${p}${c.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${f} ${g} ${p}${c.minimum.toString()}`}case"invalid_format":{let m=c;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.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 ${m.pattern}`;let f=l[m.format],p=f?.label??m.format,g=(f?.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 ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${A(c.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${u(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Nf(){return{localeError:hE()}}s(Nf,"Xu"),o(Nf,"default");var vE=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${P(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${n}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=i[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${n}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${r[n.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${A(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function Pf(){return{localeError:vE()}}s(Pf,"Hu"),o(Pf,"default");var yE=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${P(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${n}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[n.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Uf(){return{localeError:yE()}}s(Uf,"Yu"),o(Uf,"default");function ra(e,t,r){return Math.abs(e)===1?t:r}s(ra,"My"),o(ra,"getArmenianPlural");function tt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(tt,"qt"),o(tt,"withDefiniteArticle");var EE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\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 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=ra(l,a.unit.one,a.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 ${tt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.maximum.toString()} ${d}`}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 ${tt(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=ra(l,a.unit.one,a.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 ${tt(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${u.minimum.toString()} ${d}`}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 ${tt(u.origin)} \u056C\u056B\u0576\u056B ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.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 ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[n.format]??u.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 ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${A(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${tt(u.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 ${tt(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Mf(){return{localeError:EE()}}s(Mf,"Qu"),o(Mf,"default");var DE=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${P(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${r[n.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function Zf(){return{localeError:DE()}}s(Zf,"el"),o(Zf,"default");var bE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${P(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${n}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${n}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${A(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function Lf(){return{localeError:bE()}}s(Lf,"tl"),o(Lf,"default");var BE=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${n}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${P(u.values[0])}`:`Opzione non valida: atteso uno tra ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${n}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${n}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${r[n.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${A(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function qf(){return{localeError:BE()}}s(qf,"rl"),o(qf,"default");var wE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${P(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${A(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.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${u.keys.length>1?"\u7FA4":""}: ${A(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Vf(){return{localeError:wE()}}s(Vf,"nl"),o(Vf,"default");var CE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\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 u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\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 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\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 ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.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 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??u.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 ${u.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${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${A(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.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 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function Jf(){return{localeError:CE()}}s(Jf,"ol"),o(Jf,"default");var xE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={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 u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\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 ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${A(u.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 ${u.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 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function na(){return{localeError:xE()}}s(na,"Gr"),o(na,"default");function Gf(){return na()}s(Gf,"il"),o(Gf,"default");var $E=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${P(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${A(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${n}${a}`}case"too_small":{let n=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${n}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[n.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${A(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Wf(){return{localeError:$E()}}s(Wf,"sl"),o(Wf,"default");var gu=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function ia(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}s(ia,"Cy"),o(ia,"getUnitTypeFromNumber");var kE=o(()=>{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(u,n,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[n],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={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"},i={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 u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${n}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${P(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${A(u.values,"|")} pasirinkim\u0173`;case"too_big":{let n=i[u.origin]??u.origin,a=t(u.origin,ia(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${gu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${gu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let n=i[u.origin]??u.origin,a=t(u.origin,ia(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${gu(n??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${gu(n??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${A(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=i[u.origin]??u.origin;return`${gu(n??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Kf(){return{localeError:kE()}}s(Kf,"al"),o(Kf,"default");var AE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.maximum.toString()} ${a.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 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`Invalid ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`${u.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"}: ${A(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.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 ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Hf(){return{localeError:AE()}}s(Hf,"cl"),o(Hf,"default");var _E=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${n}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${P(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${r[n.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${A(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function Xf(){return{localeError:_E()}}s(Xf,"ul"),o(Xf,"default");var IE=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${n}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${P(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${n}${u.maximum.toString()} is`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${n}${u.minimum.toString()} is`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${r[n.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function Yf(){return{localeError:IE()}}s(Yf,"ll"),o(Yf,"default");var SE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-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"},i={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${n}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${P(u.values[0])}`:`Ugyldig valg: forventet en av ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${r[n.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${A(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function Qf(){return{localeError:SE()}}s(Qf,"dl"),o(Qf,"default");var FE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${P(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${n}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${n}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=u;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[n.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function eg(){return{localeError:FE()}}s(eg,"pl"),o(eg,"default");var zE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${P(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${A(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${n}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[n.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${A(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.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 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function tg(){return{localeError:zE()}}s(tg,"ml"),o(tg,"default");var jE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${P(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[n.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function ug(){return{localeError:jE()}}s(ug,"fl"),o(ug,"default");var RE=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${P(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${n}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${n}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${r[n.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${A(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function rg(){return{localeError:RE()}}s(rg,"gl"),o(rg,"default");var OE=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${P(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${r[n.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${A(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function ng(){return{localeError:OE()}}s(ng,"hl"),o(ng,"default");function sa(e,t,r,i){let u=Math.abs(e),n=u%10,a=u%100;return a>=11&&a<=19?i:n===1?t:n>=2&&n<=4?r:i}s(sa,"Uy"),o(sa,"getRussianPlural");var TE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=sa(l,a.unit.one,a.unit.few,a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.maximum.toString()} ${d}`}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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=sa(l,a.unit.one,a.unit.few,a.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 ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${u.minimum.toString()} ${d}`}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 ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${A(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function ig(){return{localeError:TE()}}s(ig,"vl"),o(ig,"default");var NE=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${P(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${n}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${n}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${r[n.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${A(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function sg(){return{localeError:NE()}}s(sg,"yl"),o(sg,"default");var PE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${P(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${r[n.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${A(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function ag(){return{localeError:PE()}}s(ag,"bl"),o(ag,"default");var UE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\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 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\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 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} ${a.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 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\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 ${u.origin} ${n}${u.minimum.toString()} ${a.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 ${u.origin} ${n}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.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 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.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${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${A(u.keys,", ")}`;case"invalid_key":return`${u.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`${u.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"}}},"error");function og(){return{localeError:UE()}}s(og,"xl"),o(og,"default");var ME=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={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 u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\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 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.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 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[n.format]??u.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 ${u.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: ${A(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.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 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function lg(){return{localeError:ME()}}s(lg,"_l"),o(lg,"default");var ZE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${P(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${A(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function dg(){return{localeError:ZE()}}s(dg,"wl"),o(dg,"default");var LE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\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 ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return u.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 ${P(u.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 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${u.maximum.toString()} ${a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.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 "${n.suffix}"`:n.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 "${n.includes}"`:n.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 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${A(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function aa(){return{localeError:LE()}}s(aa,"Kr"),o(aa,"default");function cg(){return aa()}s(cg,"$l"),o(cg,"default");var qE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${P(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${A(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${n}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${n}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.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${u.keys.length>1?"\u0632":""}: ${A(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function mg(){return{localeError:qE()}}s(mg,"kl"),o(mg,"default");var VE=o(()=>{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"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${P(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[n.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${A(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function pg(){return{localeError:VE()}}s(pg,"Sl"),o(pg,"default");var JE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${P(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${n}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${A(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.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 ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function fg(){return{localeError:JE()}}s(fg,"Il"),o(fg,"default");var GE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${P(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${r[n.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${A(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function gg(){return{localeError:GE()}}s(gg,"Rl"),o(gg,"default");var WE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${P(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${n}${u.maximum.toString()}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${n}${u.minimum.toString()}`}case"invalid_format":{let n=u;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${r[n.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${A(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function hg(){return{localeError:WE()}}s(hg,"Tl"),o(hg,"default");var KE=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let n=i[u.expected]??u.expected,a=M(u.input),l=i[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${P(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${A(u.values,"|")}`;case"too_big":{let n=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${n}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.maximum}`}case"too_small":{let n=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${n}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${u.minimum}`}case"invalid_format":{let n=u;return n.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 "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${r[n.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${A(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.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 ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function vg(){return{localeError:KE()}}s(vg,"El"),o(vg,"default");var yg,Eg=Symbol("ZodOutput"),Dg=Symbol("ZodInput"),bg=class{static{s(this,"Jo")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function zr(){return new bg}s(zr,"Ko"),o(zr,"registry"),(yg=globalThis).__zod_globalRegistry??(yg.__zod_globalRegistry=zr());var Be=globalThis.__zod_globalRegistry;function oa(e,t){return new e({type:"string",...S(t)})}s(oa,"jl"),o(oa,"_string");function la(e,t){return new e({type:"string",coerce:!0,...S(t)})}s(la,"Ol"),o(la,"_coercedString");function jr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...S(t)})}s(jr,"Wo"),o(jr,"_email");function hu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...S(t)})}s(hu,"Xr"),o(hu,"_guid");function Rr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...S(t)})}s(Rr,"Xo"),o(Rr,"_uuid");function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(t)})}s(Or,"Ho"),o(Or,"_uuidv4");function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(t)})}s(Tr,"Yo"),o(Tr,"_uuidv6");function Nr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(t)})}s(Nr,"Qo"),o(Nr,"_uuidv7");function vu(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...S(t)})}s(vu,"Hr"),o(vu,"_url");function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...S(t)})}s(Pr,"ei"),o(Pr,"_emoji");function Ur(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(t)})}s(Ur,"ti"),o(Ur,"_nanoid");function Mr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...S(t)})}s(Mr,"ri"),o(Mr,"_cuid");function Zr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(t)})}s(Zr,"ni"),o(Zr,"_cuid2");function Lr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...S(t)})}s(Lr,"oi"),o(Lr,"_ulid");function qr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...S(t)})}s(qr,"ii"),o(qr,"_xid");function Vr(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(t)})}s(Vr,"si"),o(Vr,"_ksuid");function Jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(t)})}s(Jr,"ai"),o(Jr,"_ipv4");function Gr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(t)})}s(Gr,"ci"),o(Gr,"_ipv6");function da(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...S(t)})}s(da,"Pl"),o(da,"_mac");function Wr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(t)})}s(Wr,"ui"),o(Wr,"_cidrv4");function Kr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(t)})}s(Kr,"li"),o(Kr,"_cidrv6");function Hr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...S(t)})}s(Hr,"di"),o(Hr,"_base64");function Xr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...S(t)})}s(Xr,"pi"),o(Xr,"_base64url");function Yr(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...S(t)})}s(Yr,"mi"),o(Yr,"_e164");function Qr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...S(t)})}s(Qr,"fi"),o(Qr,"_jwt");var Bg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ca(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(t)})}s(ca,"Dl"),o(ca,"_isoDateTime");function ma(e,t){return new e({type:"string",format:"date",check:"string_format",...S(t)})}s(ma,"Ml"),o(ma,"_isoDate");function pa(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...S(t)})}s(pa,"Cl"),o(pa,"_isoTime");function fa(e,t){return new e({type:"string",format:"duration",check:"string_format",...S(t)})}s(fa,"Ul"),o(fa,"_isoDuration");function ga(e,t){return new e({type:"number",checks:[],...S(t)})}s(ga,"Ll"),o(ga,"_number");function ha(e,t){return new e({type:"number",coerce:!0,checks:[],...S(t)})}s(ha,"Fl"),o(ha,"_coercedNumber");function va(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...S(t)})}s(va,"Zl"),o(va,"_int");function ya(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...S(t)})}s(ya,"Bl"),o(ya,"_float32");function Ea(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...S(t)})}s(Ea,"Vl"),o(Ea,"_float64");function Da(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...S(t)})}s(Da,"ql"),o(Da,"_int32");function ba(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...S(t)})}s(ba,"Gl"),o(ba,"_uint32");function Ba(e,t){return new e({type:"boolean",...S(t)})}s(Ba,"Jl"),o(Ba,"_boolean");function wa(e,t){return new e({type:"boolean",coerce:!0,...S(t)})}s(wa,"Kl"),o(wa,"_coercedBoolean");function Ca(e,t){return new e({type:"bigint",...S(t)})}s(Ca,"Wl"),o(Ca,"_bigint");function xa(e,t){return new e({type:"bigint",coerce:!0,...S(t)})}s(xa,"Xl"),o(xa,"_coercedBigint");function $a(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...S(t)})}s($a,"Hl"),o($a,"_int64");function ka(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...S(t)})}s(ka,"Yl"),o(ka,"_uint64");function Aa(e,t){return new e({type:"symbol",...S(t)})}s(Aa,"Ql"),o(Aa,"_symbol");function _a(e,t){return new e({type:"undefined",...S(t)})}s(_a,"ed"),o(_a,"_undefined");function Ia(e,t){return new e({type:"null",...S(t)})}s(Ia,"td"),o(Ia,"_null");function Sa(e){return new e({type:"any"})}s(Sa,"rd"),o(Sa,"_any");function Fa(e){return new e({type:"unknown"})}s(Fa,"nd"),o(Fa,"_unknown");function za(e,t){return new e({type:"never",...S(t)})}s(za,"od"),o(za,"_never");function ja(e,t){return new e({type:"void",...S(t)})}s(ja,"id"),o(ja,"_void");function Ra(e,t){return new e({type:"date",...S(t)})}s(Ra,"sd"),o(Ra,"_date");function Oa(e,t){return new e({type:"date",coerce:!0,...S(t)})}s(Oa,"ad"),o(Oa,"_coercedDate");function Ta(e,t){return new e({type:"nan",...S(t)})}s(Ta,"cd"),o(Ta,"_nan");function ze(e,t){return new $s({check:"less_than",...S(t),value:e,inclusive:!1})}s(ze,"Ue"),o(ze,"_lt");function Ee(e,t){return new $s({check:"less_than",...S(t),value:e,inclusive:!0})}s(Ee,"Ie"),o(Ee,"_lte");function je(e,t){return new ks({check:"greater_than",...S(t),value:e,inclusive:!1})}s(je,"Le"),o(je,"_gt");function pe(e,t){return new ks({check:"greater_than",...S(t),value:e,inclusive:!0})}s(pe,"ve"),o(pe,"_gte");function en(e){return je(0,e)}s(en,"gi"),o(en,"_positive");function tn(e){return ze(0,e)}s(tn,"hi"),o(tn,"_negative");function un(e){return Ee(0,e)}s(un,"vi"),o(un,"_nonpositive");function rn(e){return pe(0,e)}s(rn,"yi"),o(rn,"_nonnegative");function ut(e,t){return new Gm({check:"multiple_of",...S(t),value:e})}s(ut,"rt"),o(ut,"_multipleOf");function rt(e,t){return new Hm({check:"max_size",...S(t),maximum:e})}s(rt,"nt"),o(rt,"_maxSize");function Re(e,t){return new Xm({check:"min_size",...S(t),minimum:e})}s(Re,"Fe"),o(Re,"_minSize");function wt(e,t){return new Ym({check:"size_equals",...S(t),size:e})}s(wt,"wt"),o(wt,"_size");function Ct(e,t){return new Qm({check:"max_length",...S(t),maximum:e})}s(Ct,"$t"),o(Ct,"_maxLength");function Ze(e,t){return new ep({check:"min_length",...S(t),minimum:e})}s(Ze,"Ke"),o(Ze,"_minLength");function xt(e,t){return new tp({check:"length_equals",...S(t),length:e})}s(xt,"kt"),o(xt,"_length");function yu(e,t){return new up({check:"string_format",format:"regex",...S(t),pattern:e})}s(yu,"Gt"),o(yu,"_regex");function Eu(e){return new rp({check:"string_format",format:"lowercase",...S(e)})}s(Eu,"Jt"),o(Eu,"_lowercase");function Du(e){return new np({check:"string_format",format:"uppercase",...S(e)})}s(Du,"Kt"),o(Du,"_uppercase");function bu(e,t){return new ip({check:"string_format",format:"includes",...S(t),includes:e})}s(bu,"Wt"),o(bu,"_includes");function Bu(e,t){return new sp({check:"string_format",format:"starts_with",...S(t),prefix:e})}s(Bu,"Xt"),o(Bu,"_startsWith");function wu(e,t){return new ap({check:"string_format",format:"ends_with",...S(t),suffix:e})}s(wu,"Ht"),o(wu,"_endsWith");function nn(e,t,r){return new op({check:"property",property:e,schema:t,...S(r)})}s(nn,"bi"),o(nn,"_property");function Cu(e,t){return new lp({check:"mime_type",mime:e,...S(t)})}s(Cu,"Yt"),o(Cu,"_mime");function ke(e){return new dp({check:"overwrite",tx:e})}s(ke,"De"),o(ke,"_overwrite");function xu(e){return ke(t=>t.normalize(e))}s(xu,"Qt"),o(xu,"_normalize");function $u(){return ke(e=>e.trim())}s($u,"er"),o($u,"_trim");function ku(){return ke(e=>e.toLowerCase())}s(ku,"tr"),o(ku,"_toLowerCase");function Au(){return ke(e=>e.toUpperCase())}s(Au,"rr"),o(Au,"_toUpperCase");function _u(){return ke(e=>Qi(e))}s(_u,"nr"),o(_u,"_slugify");function Na(e,t,r){return new e({type:"array",element:t,...S(r)})}s(Na,"ud"),o(Na,"_array");function wg(e,t,r){return new e({type:"union",options:t,...S(r)})}s(wg,"uS"),o(wg,"_union");function Cg(e,t,r){return new e({type:"union",options:t,inclusive:!1,...S(r)})}s(Cg,"lS"),o(Cg,"_xor");function xg(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...S(i)})}s(xg,"dS"),o(xg,"_discriminatedUnion");function $g(e,t,r){return new e({type:"intersection",left:t,right:r})}s($g,"pS"),o($g,"_intersection");function kg(e,t,r,i){let u=r instanceof L,n=u?i:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...S(n)})}s(kg,"mS"),o(kg,"_tuple");function Ag(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...S(i)})}s(Ag,"fS"),o(Ag,"_record");function _g(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...S(i)})}s(_g,"gS"),o(_g,"_map");function Ig(e,t,r){return new e({type:"set",valueType:t,...S(r)})}s(Ig,"hS"),o(Ig,"_set");function Sg(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:i,...S(r)})}s(Sg,"vS"),o(Sg,"_enum");function Fg(e,t,r){return new e({type:"enum",entries:t,...S(r)})}s(Fg,"yS"),o(Fg,"_nativeEnum");function zg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...S(r)})}s(zg,"bS"),o(zg,"_literal");function Pa(e,t){return new e({type:"file",...S(t)})}s(Pa,"ld"),o(Pa,"_file");function jg(e,t){return new e({type:"transform",transform:t})}s(jg,"xS"),o(jg,"_transform");function Rg(e,t){return new e({type:"optional",innerType:t})}s(Rg,"_S"),o(Rg,"_optional");function Og(e,t){return new e({type:"nullable",innerType:t})}s(Og,"wS"),o(Og,"_nullable");function Tg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ts(r)}})}s(Tg,"$S"),o(Tg,"_default");function Ng(e,t,r){return new e({type:"nonoptional",innerType:t,...S(r)})}s(Ng,"kS"),o(Ng,"_nonoptional");function Pg(e,t){return new e({type:"success",innerType:t})}s(Pg,"SS"),o(Pg,"_success");function Ug(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s(Ug,"IS"),o(Ug,"_catch");function Mg(e,t,r){return new e({type:"pipe",in:t,out:r})}s(Mg,"RS"),o(Mg,"_pipe");function Zg(e,t){return new e({type:"readonly",innerType:t})}s(Zg,"TS"),o(Zg,"_readonly");function Lg(e,t,r){return new e({type:"template_literal",parts:t,...S(r)})}s(Lg,"ES"),o(Lg,"_templateLiteral");function qg(e,t){return new e({type:"lazy",getter:t})}s(qg,"AS"),o(qg,"_lazy");function Vg(e,t){return new e({type:"promise",innerType:t})}s(Vg,"zS"),o(Vg,"_promise");function Ua(e,t,r){let i=S(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}s(Ua,"dd"),o(Ua,"_custom");function Ma(e,t,r){return new e({type:"custom",check:"custom",fn:t,...S(r)})}s(Ma,"pd"),o(Ma,"_refine");function Za(e,t){let r=La(i=>(i.addIssue=u=>{if(typeof u=="string")i.issues.push(nu(u,i.value,r._zod.def));else{let n=u;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=i.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),i.issues.push(nu(n))}},e(i.value,i)),t);return r}s(Za,"md"),o(Za,"_superRefine");function La(e,t){let r=new te({check:"custom",...S(t)});return r._zod.check=e,r}s(La,"Fy"),o(La,"_check");function qa(e){let t=new te({check:"describe"});return t._zod.onattach=[r=>{let i=Be.get(r)??{};Be.add(r,{...i,description:e})}],t._zod.check=()=>{},t}s(qa,"fd"),o(qa,"describe");function Va(e){let t=new te({check:"meta"});return t._zod.onattach=[r=>{let i=Be.get(r)??{};Be.add(r,{...i,...e})}],t._zod.check=()=>{},t}s(Va,"gd"),o(Va,"meta");function Ja(e,t){let r=S(t),i=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(g=>typeof g=="string"?g.toLowerCase():g),u=u.map(g=>typeof g=="string"?g.toLowerCase():g));let n=new Set(i),a=new Set(u),l=e.Codec??Xs,d=e.Boolean??Fs,c=e.String??du,m=new c({type:"string",error:r.error}),f=new d({type:"boolean",error:r.error}),p=new l({type:"pipe",in:m,out:f,transform:o(((g,v)=>{let E=g;return r.case!=="sensitive"&&(E=E.toLowerCase()),n.has(E)?!0:a.has(E)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:v.value,inst:p,continue:!1}),{})}),"transform"),reverseTransform:o(((g,v)=>g===!0?i[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return p}s(Ja,"hd"),o(Ja,"_stringbool");function $t(e,t,r,i={}){let u=S(i),n={...S(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(n.pattern=r),new e(n)}s($t,"or"),o($t,"_stringFormat");function nt(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??Be,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}}s(nt,"ot"),o(nt,"initializeContext");function X(e,t,r={path:[],schemaPath:[]}){var i;let u=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{let f=a.schema,p=t.processors[u.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);p(e,t,f,c)}let m=e._zod.parent;m&&(a.ref||(a.ref=m),X(m,t,c),t.seen.get(m).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&me(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(X,"W"),o(X,"process");function it(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=i.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(a[0])?.id,f=e.external.uri??(g=>g);if(m)return{ref:f(m)};let p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},"makeURI"),n=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:c}=u(a);l.def={...l.schema},c&&(l.defId=c);let m=l.schema;for(let f in m)delete m[f];m.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
63
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let w=f.compile();return(b,$)=>w(m,b,$)},"generateFastpass"),i,a=it,l=!du.jitless,d=l&&Qm.value,c=t.catchall,p;e._zod.parse=(m,f)=>{p??(p=n.value);let h=m.value;return a(h)?l&&d&&f?.async===!1&&f.jitless!==!0?(i||(i=u(t.shape)),m=i(m,f),c?ua([],h,m,f,p,e):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function ra(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let u=e.filter(i=>!qe(i));return u.length===1?(t.value=u[0].value,u[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ge(a,n,ce())))}),t)}s(ra,"gb"),o(ra,"handleUnionResults");var Vr=D("$ZodUnion",(e,t)=>{L.init(e,t),G(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),G(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),G(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),G(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${n.map(u=>pu(u.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,u)=>{if(r)return r(n,u);let i=!1,a=[];for(let l of t.options){let d=l._zod.run({value:n.value,issues:[]},u);if(d instanceof Promise)a.push(d),i=!0;else{if(d.issues.length===0)return d;a.push(d)}}return i?Promise.all(a).then(l=>ra(l,n,e,u)):ra(a,n,e,u)}});function na(e,t,r,n){let u=e.filter(i=>i.issues.length===0);return u.length===1?(t.value=u[0].value,t):(u.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ge(a,n,ce())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}s(na,"vb"),o(na,"handleExclusiveUnionResults");var eh=D("$ZodXor",(e,t)=>{Vr.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,u)=>{if(r)return r(n,u);let i=!1,a=[];for(let l of t.options){let d=l._zod.run({value:n.value,issues:[]},u);d instanceof Promise?(a.push(d),i=!0):a.push(d)}return i?Promise.all(a).then(l=>na(l,n,e,u)):na(a,n,e,u)}}),th=D("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Vr.init(e,t);let r=e._zod.parse;G(e._zod,"propValues",()=>{let u={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[l,d]of Object.entries(a)){u[l]||(u[l]=new Set);for(let c of d)u[l].add(c)}}return u});let n=Ct(()=>{let u=t.options,i=new Map;for(let a of u){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of l){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,a)}}return i});e._zod.parse=(u,i)=>{let a=u.value;if(!it(a))return u.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),u;let l=n.value.get(a?.[t.discriminator]);return l?l._zod.run(u,i):t.unionFallback||i.direction==="backward"?r(u,i):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:a,path:[t.discriminator],inst:e}),u)}}),uh=D("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value,i=t.left._zod.run({value:u,issues:[]},n),a=t.right._zod.run({value:u,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,d])=>ia(r,l,d)):ia(r,i,a)}});function Jr(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(Le(e)&&Le(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),u={...e,...t};for(let i of n){let a=Jr(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};u[i]=a.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let u=e[n],i=t[n],a=Jr(u,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}s(Jr,"Yc"),o(Jr,"mergeValues");function ia(e,t,r){let n=new Map,u;for(let l of t.issues)if(l.code==="unrecognized_keys"){u??(u=l);for(let d of l.keys)n.has(d)||n.set(d,{}),n.get(d).l=!0}else e.issues.push(l);for(let l of r.issues)if(l.code==="unrecognized_keys")for(let d of l.keys)n.has(d)||n.set(d,{}),n.get(d).r=!0;else e.issues.push(l);let i=[...n].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(i.length&&u&&e.issues.push({...u,keys:i}),qe(e))return e;let a=Jr(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}s(ia,"yb"),o(ia,"handleIntersectionResults");var sa=D("$ZodTuple",(e,t)=>{L.init(e,t);let r=t.items;e._zod.parse=(n,u)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[],l=aa(r,"optin"),d=aa(r,"optout");if(!t.rest){if(i.length<l)return n.issues.push({code:"too_small",minimum:l,inclusive:!0,input:i,inst:e,origin:"array"}),n;i.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let c=new Array(r.length);for(let p=0;p<r.length;p++){let m=r[p]._zod.run({value:i[p],issues:[]},u);m instanceof Promise?a.push(m.then(f=>{c[p]=f})):c[p]=m}if(t.rest){let p=r.length-1,m=i.slice(r.length);for(let f of m){p++;let h=t.rest._zod.run({value:f,issues:[]},u);h instanceof Promise?a.push(h.then(g=>oa(g,n,p))):oa(h,n,p)}}return a.length?Promise.all(a).then(()=>la(c,n,r,i,d)):la(c,n,r,i,d)}});function aa(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}s(aa,"bb"),o(aa,"getTupleOptStart");function oa(e,t,r){e.issues.length&&t.issues.push(...Ee(r,e.issues)),t.value[r]=e.value}s(oa,"xb"),o(oa,"handleTupleResult");function la(e,t,r,n,u){for(let i=0;i<r.length;i++){let a=e[i],l=i<n.length;if(a.issues.length){if(!l&&i>=u){t.value.length=i;break}t.issues.push(...Ee(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&r[i]._zod.optout==="optional"&&t.value[i]===void 0;i--)t.value.length=i;return t}s(la,"_b"),o(la,"handleTupleResults");var rh=D("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;if(!Le(u))return r.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let l=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){l.add(typeof c=="number"?c.toString():c);let p=t.keyType._zod.run({value:c,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(h=>ge(h,n,ce())),input:c,path:[c],inst:e});continue}let m=p.value,f=t.valueType._zod.run({value:u[c],issues:[]},n);f instanceof Promise?i.push(f.then(h=>{h.issues.length&&r.issues.push(...Ee(c,h.issues)),r.value[m]=h.value})):(f.issues.length&&r.issues.push(...Ee(c,f.issues)),r.value[m]=f.value)}let d;for(let c in u)l.has(c)||(d=d??[],d.push(c));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:d})}else{r.value={};for(let l of Reflect.ownKeys(u)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(u,l))continue;let d=t.keyType._zod.run({value:l,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Vs.test(l)&&d.issues.length){let p=t.keyType._zod.run({value:Number(l),issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?r.value[l]=u[l]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>ge(p,n,ce())),input:l,path:[l],inst:e});continue}let c=t.valueType._zod.run({value:u[l],issues:[]},n);c instanceof Promise?i.push(c.then(p=>{p.issues.length&&r.issues.push(...Ee(l,p.issues)),r.value[d.value]=p.value})):(c.issues.length&&r.issues.push(...Ee(l,c.issues)),r.value[d.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),nh=D("$ZodMap",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;if(!(u instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:u,inst:e}),r;let i=[];r.value=new Map;for(let[a,l]of u){let d=t.keyType._zod.run({value:a,issues:[]},n),c=t.valueType._zod.run({value:l,issues:[]},n);d instanceof Promise||c instanceof Promise?i.push(Promise.all([d,c]).then(([p,m])=>{da(p,m,r,a,u,e,n)})):da(d,c,r,a,u,e,n)}return i.length?Promise.all(i).then(()=>r):r}});function da(e,t,r,n,u,i,a){e.issues.length&&(Ur.has(typeof n)?r.issues.push(...Ee(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:u,inst:i,issues:e.issues.map(l=>ge(l,a,ce()))})),t.issues.length&&(Ur.has(typeof n)?r.issues.push(...Ee(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:u,inst:i,key:n,issues:t.issues.map(l=>ge(l,a,ce()))})),r.value.set(e.value,t.value)}s(da,"wb"),o(da,"handleMapResult");var ih=D("$ZodSet",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;if(!(u instanceof Set))return r.issues.push({input:u,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of u){let l=t.valueType._zod.run({value:a,issues:[]},n);l instanceof Promise?i.push(l.then(d=>ca(d,r))):ca(l,r)}return i.length?Promise.all(i).then(()=>r):r}});function ca(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}s(ca,"$b"),o(ca,"handleSetResult");var sh=D("$ZodEnum",(e,t)=>{L.init(e,t);let r=Mr(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(u=>Ur.has(typeof u)).map(u=>typeof u=="string"?Ie(u):u.toString()).join("|")})$`),e._zod.parse=(u,i)=>{let a=u.value;return n.has(a)||u.issues.push({code:"invalid_value",values:r,input:a,inst:e}),u}}),ah=D("$ZodLiteral",(e,t)=>{if(L.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ie(n):n?Ie(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,u)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),oh=D("$ZodFile",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{let u=r.value;return u instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:u,inst:e}),r}}),lh=D("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nr(e.constructor.name);let u=t.transform(r.value,r);if(n.async)return(u instanceof Promise?u:Promise.resolve(u)).then(i=>(r.value=i,r.fallback=!0,r));if(u instanceof Promise)throw new nt;return r.value=u,r.fallback=!0,r}});function pa(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}s(pa,"kb"),o(pa,"handleOptionalResult");var ma=D("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${pu(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let u=r.value,i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>pa(a,u)):pa(i,u)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),dh=D("$ZodExactOptional",(e,t)=>{ma.init(e,t),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),ch=D("$ZodNullable",(e,t)=>{L.init(e,t),G(e._zod,"optin",()=>t.innerType._zod.optin),G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${pu(r.source)}|null)$`):void 0}),G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ph=D("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let u=t.innerType._zod.run(r,n);return u instanceof Promise?u.then(i=>fa(i,t)):fa(u,t)}});function fa(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}s(fa,"Sb"),o(fa,"handleDefaultResult");var mh=D("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),fh=D("$ZodNonOptional",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let u=t.innerType._zod.run(r,n);return u instanceof Promise?u.then(i=>ha(i,e)):ha(u,e)}});function ha(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}s(ha,"Ib"),o(ha,"handleNonOptionalResult");var hh=D("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nr("ZodSuccess");let u=t.innerType._zod.run(r,n);return u instanceof Promise?u.then(i=>(r.value=i.issues.length===0,r)):(r.value=u.issues.length===0,r)}}),gh=D("$ZodCatch",(e,t)=>{L.init(e,t),e._zod.optin="optional",G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let u=t.innerType._zod.run(r,n);return u instanceof Promise?u.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>ge(a,n,ce()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=u.value,u.issues.length&&(r.value=t.catchValue({...r,error:{issues:u.issues.map(i=>ge(i,n,ce()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),vh=D("$ZodNaN",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ga=D("$ZodPipe",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>Bu(a,t.in,n)):Bu(i,t.in,n)}let u=t.in._zod.run(r,n);return u instanceof Promise?u.then(i=>Bu(i,t.out,n)):Bu(u,t.out,n)}});function Bu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}s(Bu,"ri"),o(Bu,"handlePipeResult");var va=D("$ZodCodec",(e,t)=>{L.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let u=t.in._zod.run(r,n);return u instanceof Promise?u.then(i=>xu(i,t,n)):xu(u,t,n)}else{let u=t.out._zod.run(r,n);return u instanceof Promise?u.then(i=>xu(i,t,n)):xu(u,t,n)}}});function xu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(u=>$u(e,u,t.out,r)):$u(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(u=>$u(e,u,t.in,r)):$u(e,n,t.in,r)}}s(xu,"ni"),o(xu,"handleCodecAResult");function $u(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}s($u,"oi"),o($u,"handleCodecTxResult");var yh=D("$ZodPreprocess",(e,t)=>{ga.init(e,t)}),Eh=D("$ZodReadonly",(e,t)=>{L.init(e,t),G(e._zod,"propValues",()=>t.innerType._zod.propValues),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"optin",()=>t.innerType?._zod?.optin),G(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let u=t.innerType._zod.run(r,n);return u instanceof Promise?u.then(ya):ya(u)}});function ya(e){return e.value=Object.freeze(e.value),e}s(ya,"Rb"),o(ya,"handleReadonlyResult");var bh=D("$ZodTemplateLiteral",(e,t)=>{L.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let u=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!u)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let i=u.startsWith("^")?1:0,a=u.endsWith("$")?u.length-1:u.length;r.push(u.slice(i,a))}else if(n===null||t4.has(typeof n))r.push(Ie(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,u)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),Dh=D("$ZodFunction",(e,t)=>(L.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let u=e._def.input?Is(e._def.input,n):n,i=Reflect.apply(r,this,u);return e._def.output?Is(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let u=e._def.input?await Ss(e._def.input,n):n,i=await Reflect.apply(r,this,u);return e._def.output?await Ss(e._def.output,i):i}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new sa({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),wh=D("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(u=>t.innerType._zod.run({value:u,issues:[]},n))}),Bh=D("$ZodLazy",(e,t)=>{L.init(e,t),G(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),G(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),G(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),G(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),G(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),xh=D("$ZodCustom",(e,t)=>{ne.init(e,t),L.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,u=t.fn(n);if(u instanceof Promise)return u.then(i=>Ea(i,r,n,e));Ea(u,r,n,e)}});function Ea(e,t,r,n){if(!e){let u={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(u.params=n._zod.def.params),t.issues.push(hu(u))}}s(Ea,"Eb"),o(Ea,"handleRefineResult");var ba={};Oe(ba,{ar:s(()=>$h,"ar"),az:s(()=>Ch,"az"),be:s(()=>kh,"be"),bg:s(()=>Ah,"bg"),ca:s(()=>_h,"ca"),cs:s(()=>Ih,"cs"),da:s(()=>Sh,"da"),de:s(()=>Fh,"de"),el:s(()=>zh,"el"),en:s(()=>wa,"en"),eo:s(()=>jh,"eo"),es:s(()=>Oh,"es"),fa:s(()=>Rh,"fa"),fi:s(()=>Th,"fi"),fr:s(()=>Nh,"fr"),frCA:s(()=>Mh,"frCA"),he:s(()=>Ph,"he"),hr:s(()=>Uh,"hr"),hu:s(()=>Zh,"hu"),hy:s(()=>Lh,"hy"),id:s(()=>qh,"id"),is:s(()=>Vh,"is"),it:s(()=>Jh,"it"),ja:s(()=>Gh,"ja"),ka:s(()=>Wh,"ka"),kh:s(()=>Kh,"kh"),km:s(()=>xa,"km"),ko:s(()=>Hh,"ko"),lt:s(()=>Xh,"lt"),mk:s(()=>Yh,"mk"),ms:s(()=>Qh,"ms"),nl:s(()=>eg,"nl"),no:s(()=>tg,"no"),ota:s(()=>ug,"ota"),pl:s(()=>ng,"pl"),ps:s(()=>rg,"ps"),pt:s(()=>ig,"pt"),ro:s(()=>sg,"ro"),ru:s(()=>ag,"ru"),sl:s(()=>og,"sl"),sv:s(()=>lg,"sv"),ta:s(()=>dg,"ta"),th:s(()=>cg,"th"),tr:s(()=>pg,"tr"),ua:s(()=>mg,"ua"),uk:s(()=>ka,"uk"),ur:s(()=>fg,"ur"),uz:s(()=>hg,"uz"),vi:s(()=>gg,"vi"),yo:s(()=>Eg,"yo"),zhCN:s(()=>vg,"zhCN"),zhTW:s(()=>yg,"zhTW")});var Cb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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: ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${u.maximum.toString()} ${a.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 ${u.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${u.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${u.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${u.minimum.toString()}`}case"invalid_format":{let i=u;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 "${u.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}`:`${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${u.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${u.keys.length>1?"\u0629":""}: ${S(u.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${u.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 ${u.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}},"error");function $h(){return{localeError:Cb()}}s($h,"cl"),o($h,"default");var kb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${u.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${l}`}case"invalid_value":return u.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${P(u.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${i}${u.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${u.origin??"d\u0259y\u0259r"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${i}${u.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${u.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${u.keys.length>1?"lar":""}: ${S(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${u.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}},"error");function Ch(){return{localeError:kb()}}s(Ch,"ul"),o(Ch,"default");function Da(e,t,r,n){let u=Math.abs(e),i=u%10,a=u%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}s(Da,"Pb"),o(Da,"getBelarusianPlural");var Ab=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${u.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Da(l,a.unit.one,a.unit.few,a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${u.maximum.toString()} ${d}`}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 ${u.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Da(l,a.unit.one,a.unit.few,a.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 ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${u.minimum.toString()} ${d}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${u.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${u.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${S(u.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${u.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 ${u.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}},"error");function kh(){return{localeError:Ab()}}s(kh,"ll"),o(kh,"default");var _b=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\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 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${u.maximum.toString()} ${a.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 ${u.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${u.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${u.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${u.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u043E\u0432\u0435":""}: ${S(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}},"error");function Ah(){return{localeError:_b()}}s(Ah,"dl"),o(Ah,"default");var Ib=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${u.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${l}`}case"invalid_value":return u.values.length===1?`Valor inv\xE0lid: s'esperava ${P(u.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(u.values," o ")}`;case"too_big":{let i=u.inclusive?"com a m\xE0xim":"menys de",a=t(u.origin);return a?`Massa gran: s'esperava que ${u.origin??"el valor"} contingu\xE9s ${i} ${u.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${i} ${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(u.origin);return a?`Massa petit: s'esperava que ${u.origin} contingu\xE9s ${i} ${u.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${u.origin} fos ${i} ${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${u.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${u.origin}`;default:return"Entrada inv\xE0lida"}}},"error");function _h(){return{localeError:Ib()}}s(_h,"pl"),o(_h,"default");var Sb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${u.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${l}`}case"invalid_value":return u.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${P(u.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${i}${u.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED m\xEDt ${i}${u.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${u.origin??"hodnota"} mus\xED b\xFDt ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${u.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${S(u.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${u.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${u.origin}`;default:return"Neplatn\xFD vstup"}}},"error");function Ih(){return{localeError:Sb()}}s(Ih,"ml"),o(Ih,"default");var Fb=o(()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\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"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldigt input: forventede instanceof ${u.expected}, fik ${l}`:`Ugyldigt input: forventede ${i}, fik ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig v\xE6rdi: forventede ${P(u.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin),l=n[u.origin]??u.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${i} ${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${i} ${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin),l=n[u.origin]??u.origin;return a?`For lille: forventede ${l} ${a.verb} ${i} ${u.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${i} ${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${u.origin}`;default:return"Ugyldigt input"}}},"error");function Sh(){return{localeError:Fb()}}s(Sh,"fl"),o(Sh,"default");var zb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",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"},n={nan:"NaN",number:"Zahl",array:"Array"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${u.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${l}`}case"invalid_value":return u.values.length===1?`Ung\xFCltige Eingabe: erwartet ${P(u.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${i}${u.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${u.origin??"Wert"} ${i}${u.maximum.toString()} ist`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Zu klein: erwartet, dass ${u.origin} ${i}${u.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${u.origin} ${i}${u.minimum.toString()} ist`}case"invalid_format":{let i=u;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: ${r[i.format]??u.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${S(u.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${u.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${u.origin}`;default:return"Ung\xFCltige Eingabe"}}},"error");function Fh(){return{localeError:zb()}}s(Fh,"hl"),o(Fh,"default");var jb=o(()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return typeof u.expected=="string"&&/^[A-Z]/.test(u.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${u.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return u.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${P(u.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${u.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${u.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${u.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??u.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${u.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${u.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${u.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${S(u.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${u.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${u.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}},"error");function zh(){return{localeError:jb()}}s(zh,"gl"),o(zh,"default");var Ob=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return`Invalid input: expected ${i}, received ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${P(u.values[0])}`:`Invalid option: expected one of ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Too big: expected ${u.origin??"value"} to have ${i}${u.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${u.origin??"value"} to be ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Too small: expected ${u.origin} to have ${i}${u.minimum.toString()} ${a.unit}`:`Too small: expected ${u.origin} to be ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return u.options&&Array.isArray(u.options)&&u.options.length>0?`Invalid discriminator value. Expected ${u.options.map(i=>`'${i}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}},"error");function wa(){return{localeError:Ob()}}s(wa,"nn"),o(wa,"default");var Rb=o(()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${u.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${l}`}case"invalid_value":return u.values.length===1?`Nevalida enigo: atendi\u011Dis ${P(u.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${i}${u.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${u.origin??"valoro"} havu ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Tro malgranda: atendi\u011Dis ke ${u.origin} havu ${i}${u.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${u.origin} estu ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} \u015Dlosilo${u.keys.length>1?"j":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}},"error");function jh(){return{localeError:Rb()}}s(jh,"vl"),o(jh,"default");var Tb=o(()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={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 u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${u.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: se esperaba ${P(u.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin),l=n[u.origin]??u.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${i}${u.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin),l=n[u.origin]??u.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${i}${u.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[u.origin]??u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[u.origin]??u.origin}`;default:return"Entrada inv\xE1lida"}}},"error");function Oh(){return{localeError:Tb()}}s(Oh,"yl"),o(Oh,"default");var Nb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${u.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \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 ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return u.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${P(u.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 ${S(u.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${u.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${u.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${i}${u.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${u.origin} \u0628\u0627\u06CC\u062F ${i}${u.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=u;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`:`${r[i.format]??u.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 ${u.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${u.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${S(u.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${u.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 ${u.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}},"error");function Rh(){return{localeError:Nb()}}s(Rh,"bl"),o(Rh,"default");var Mb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${l}`}case"invalid_value":return u.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${P(u.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${u.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${u.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(u.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"}}},"error");function Th(){return{localeError:Mb()}}s(Th,"xl"),o(Th,"default");var Pb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : instanceof ${u.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${l} re\xE7u`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : ${P(u.values[0])} attendu`:`Option invalide : une valeur parmi ${S(u.values,"|")} attendue`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Trop grand : ${n[u.origin]??"valeur"} doit ${a.verb} ${i}${u.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[u.origin]??"valeur"} doit \xEAtre ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Trop petit : ${n[u.origin]??"valeur"} doit ${a.verb} ${i}${u.minimum.toString()} ${a.unit}`:`Trop petit : ${n[u.origin]??"valeur"} doit \xEAtre ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${S(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Nh(){return{localeError:Pb()}}s(Nh,"_l"),o(Nh,"default");var Ub=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Entr\xE9e invalide : attendu instanceof ${u.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${l}`}case"invalid_value":return u.values.length===1?`Entr\xE9e invalide : attendu ${P(u.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"\u2264":"<",a=t(u.origin);return a?`Trop grand : attendu que ${u.origin??"la valeur"} ait ${i}${u.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${u.origin??"la valeur"} soit ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?"\u2265":">",a=t(u.origin);return a?`Trop petit : attendu que ${u.origin} ait ${i}${u.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${u.origin} soit ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${u.divisor}`;case"unrecognized_keys":return`Cl\xE9${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${S(u.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${u.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entr\xE9e invalide"}}},"error");function Mh(){return{localeError:Ub()}}s(Mh,"wl"),o(Mh,"default");var Zb=o(()=>{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"}},r=o(c=>c?e[c]:void 0,"typeEntry"),n=o(c=>{let p=r(c);return p?p.label:c??e.unknown.label},"typeLabel"),u=o(c=>`\u05D4${n(c)}`,"withDefinite"),i=o(c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA","verbFor"),a=o(c=>c?t[c]??null:null,"getSizing"),l={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"}},d={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let p=c.expected,m=d[p??""]??n(p),f=Z(c.input),h=d[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(c.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 ${P(c.values[0])}`;let p=c.values.map(f=>P(f));if(c.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 ${p[0]} \u05D0\u05D5 ${p[1]}`;let m=p[p.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 ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let p=a(c.origin),m=u(c.origin??"value");if(c.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",E=c.inclusive?`${c.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let f=c.inclusive?"<=":"<",h=i(c.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.maximum.toString()}`}case"too_small":{let p=a(c.origin),m=u(c.origin??"value");if(c.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${p?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let B=(c.origin,"\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${B}`}let E=c.inclusive?`${c.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`.trim()}let f=c.inclusive?">=":">",h=i(c.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${f}${c.minimum.toString()}`}case"invalid_format":{let p=c;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.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 ${p.pattern}`;let m=l[p.format],f=m?.label??p.format,h=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${h}`}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 ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${S(c.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${u(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}},"error");function Ph(){return{localeError:Zb()}}s(Ph,"$l"),o(Ph,"default");var Lb=o(()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${u.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${l}`}case"invalid_value":return u.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${P(u.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin),l=n[u.origin]??u.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${i}${u.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin),l=n[u.origin]??u.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${i}${u.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??u.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${u.divisor}`;case"unrecognized_keys":return`Neprepoznat${u.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${S(u.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[u.origin]??u.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[u.origin]??u.origin}`;default:return"Neispravan unos"}}},"error");function Uh(){return{localeError:Lb()}}s(Uh,"kl"),o(Uh,"default");var qb=o(()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${u.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return u.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${P(u.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xFAl nagy: ${u.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${u.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${u.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} m\xE9rete t\xFAl kicsi ${i}${u.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${u.origin} t\xFAl kicsi ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${u.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${u.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${u.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}},"error");function Zh(){return{localeError:qb()}}s(Zh,"Sl"),o(Zh,"default");function Ba(e,t,r){return Math.abs(e)===1?t:r}s(Ba,"Mb"),o(Ba,"getArmenianPlural");function st(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}s(st,"er"),o(st,"withDefiniteArticle");var Vb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ba(l,a.unit.one,a.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 ${st(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${u.maximum.toString()} ${d}`}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 ${st(u.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ba(l,a.unit.one,a.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 ${st(u.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${u.minimum.toString()} ${d}`}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 ${st(u.origin)} \u056C\u056B\u0576\u056B ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${u.keys.length>1?"\u0576\u0565\u0580":""}. ${S(u.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${st(u.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 ${st(u.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}},"error");function Lh(){return{localeError:Vb()}}s(Lh,"Il"),o(Lh,"default");var Jb=o(()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${i}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak valid: diharapkan ${P(u.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${i}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: diharapkan ${u.origin} memiliki ${i}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${u.origin} menjadi ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}},"error");function qh(){return{localeError:Jb()}}s(qh,"Rl"),o(qh,"default");var Gb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${u.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return u.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${P(u.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} hafi ${i}${u.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin??"gildi"} s\xE9 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} hafi ${i}${u.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${u.origin} s\xE9 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${S(u.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${u.origin}`;default:return"Rangt gildi"}}},"error");function Vh(){return{localeError:Gb()}}s(Vh,"El"),o(Vh,"default");var Wb=o(()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",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"},n={nan:"NaN",number:"numero",array:"vettore"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Input non valido: atteso instanceof ${u.expected}, ricevuto ${l}`:`Input non valido: atteso ${i}, ricevuto ${l}`}case"invalid_value":return u.values.length===1?`Input non valido: atteso ${P(u.values[0])}`:`Opzione non valida: atteso uno tra ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Troppo grande: ${u.origin??"valore"} deve avere ${i}${u.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${u.origin??"valore"} deve essere ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Troppo piccolo: ${u.origin} deve avere ${i}${u.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${u.origin} deve essere ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`Input non valido: ${r[i.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${S(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}},"error");function Jh(){return{localeError:Wb()}}s(Jh,"Tl"),o(Jh,"default");var Kb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${u.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return u.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${P(u.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(u.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=u.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(u.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${u.origin??"\u5024"}\u306F${u.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=u.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(u.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${u.origin}\u306F${u.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=u;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${r[i.format]??u.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${u.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${u.keys.length>1?"\u7FA4":""}: ${S(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${u.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}},"error");function Gh(){return{localeError:Kb()}}s(Gh,"Al"),o(Gh,"default");var Hb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\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 u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${u.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${u.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\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 ${u.origin} ${a.verb} ${i}${u.minimum.toString()} ${a.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 ${u.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 ${r[i.format]??u.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 ${u.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${u.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(u.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${u.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 ${u.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}},"error");function Wh(){return{localeError:Hb()}}s(Wh,"zl"),o(Wh,"default");var Xb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={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 u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${u.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${i} ${u.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${u.origin} ${i} ${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${S(u.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 ${u.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 ${u.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}},"error");function xa(){return{localeError:Xb()}}s(xa,"on"),o(xa,"default");function Kh(){return xa()}s(Kh,"Ol"),o(Kh,"default");var Yb=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${u.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return u.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${P(u.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(u.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=u.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()}${d} ${i}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${u.maximum.toString()} ${i}${a}`}case"too_small":{let i=u.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(u.origin),d=l?.unit??"\uC694\uC18C";return l?`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()}${d} ${i}${a}`:`${u.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${u.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${u.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${S(u.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${u.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${u.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}},"error");function Hh(){return{localeError:Yb()}}s(Hh,"jl"),o(Hh,"default");var Cu=o(e=>e.charAt(0).toUpperCase()+e.slice(1),"capitalizeFirstCharacter");function $a(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}s($a,"Nb"),o($a,"getUnitTypeFromNumber");var Qb=o(()=>{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(u,i,a,l){let d=e[u]??null;return d===null?d:{unit:d.unit[i],verb:d.verb[l][a?"inclusive":"notInclusive"]}}s(t,"t"),o(t,"getSizing");let r={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"},n={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 u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${u.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${i}`}case"invalid_value":return u.values.length===1?`Privalo b\u016Bti ${P(u.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(u.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[u.origin]??u.origin,a=t(u.origin,$a(Number(u.maximum)),u.inclusive??!1,"smaller");if(a?.verb)return`${Cu(i??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.maximum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Cu(i??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.maximum.toString()} ${a?.unit}`}case"too_small":{let i=n[u.origin]??u.origin,a=t(u.origin,$a(Number(u.minimum)),u.inclusive??!1,"bigger");if(a?.verb)return`${Cu(i??u.origin??"reik\u0161m\u0117")} ${a.verb} ${u.minimum.toString()} ${a.unit??"element\u0173"}`;let l=u.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Cu(i??u.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${u.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${S(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[u.origin]??u.origin;return`${Cu(i??u.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}},"error");function Xh(){return{localeError:Qb()}}s(Xh,"Pl"),o(Xh,"default");var e5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${u.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\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 ${l}`}case"invalid_value":return u.values.length===1?`Invalid input: expected ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${u.maximum.toString()} ${a.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 ${u.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${u.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${u.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`${u.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"}: ${S(u.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${u.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 ${u.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}},"error");function Yh(){return{localeError:e5()}}s(Yh,"Ml"),o(Yh,"default");var t5=o(()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",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"},n={nan:"NaN",number:"nombor"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${l}`:`Input tidak sah: dijangka ${i}, diterima ${l}`}case"invalid_value":return u.values.length===1?`Input tidak sah: dijangka ${P(u.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Terlalu besar: dijangka ${u.origin??"nilai"} ${a.verb} ${i}${u.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Terlalu kecil: dijangka ${u.origin} ${a.verb} ${i}${u.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${u.origin} adalah ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}},"error");function Qh(){return{localeError:t5()}}s(Qh,"Nl"),o(Qh,"default");var u5=o(()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",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"},n={nan:"NaN",number:"getal"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${i}, ontving ${l}`}case"invalid_value":return u.values.length===1?`Ongeldige invoer: verwacht ${P(u.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin),l=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${u.origin??"waarde"} ${i}${u.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin??"waarde"} ${i}${u.maximum.toString()} is`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin),l=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${u.origin} ${i}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${u.origin} ${i}${u.minimum.toString()} is`}case"invalid_format":{let i=u;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: ${r[i.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}},"error");function eg(){return{localeError:u5()}}s(eg,"Dl"),o(eg,"default");var r5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-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"},n={nan:"NaN",number:"tall",array:"liste"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ugyldig input: forventet instanceof ${u.expected}, fikk ${l}`:`Ugyldig input: forventet ${i}, fikk ${l}`}case"invalid_value":return u.values.length===1?`Ugyldig verdi: forventet ${P(u.values[0])}`:`Ugyldig valg: forventet en av ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${i}${u.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${u.origin??"value"} til \xE5 ha ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`For lite(n): forventet ${u.origin} til \xE5 ha ${i}${u.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${u.origin} til \xE5 ha ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${S(u.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}},"error");function tg(){return{localeError:r5()}}s(tg,"Cl"),o(tg,"default");var n5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`F\xE2sit giren: umulan instanceof ${u.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`F\xE2sit giren: umulan ${P(u.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${i}${u.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${u.origin??"value"}, ${i}${u.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${i}${u.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${u.origin}, ${i}${u.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${u.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${u.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}},"error");function ug(){return{localeError:n5()}}s(ug,"Ul"),o(ug,"default");var i5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${u.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \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 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return u.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${P(u.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(u.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${u.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${u.maximum.toString()} \u0648\u064A`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${i}${u.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${u.origin} \u0628\u0627\u06CC\u062F ${i}${u.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=u;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`:`${r[i.format]??u.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${u.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${u.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${S(u.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${u.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 ${u.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}},"error");function rg(){return{localeError:i5()}}s(rg,"Ll"),o(rg,"default");var s5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"liczba",array:"tablica"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${u.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${l}`}case"invalid_value":return u.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${P(u.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${u.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${u.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${u.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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) ${r[i.format]??u.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${u.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${u.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}},"error");function ng(){return{localeError:s5()}}s(ng,"Fl"),o(ng,"default");var a5=o(()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Tipo inv\xE1lido: esperado instanceof ${u.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${l}`}case"invalid_value":return u.values.length===1?`Entrada inv\xE1lida: esperado ${P(u.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Muito grande: esperado que ${u.origin??"valor"} tivesse ${i}${u.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${u.origin??"valor"} fosse ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Muito pequeno: esperado que ${u.origin} tivesse ${i}${u.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${u.origin} fosse ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${S(u.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${u.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${u.origin}`;default:return"Campo inv\xE1lido"}}},"error");function ig(){return{localeError:a5()}}s(ig,"Bl"),o(ig,"default");var o5=o(()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${l}`}case"invalid_value":return u.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${P(u.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} ${a.verb} ${i}${u.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${u.origin??"valoarea"} s\u0103 fie ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Prea mic: a\u0219teptat ca ${u.origin} ${a.verb} ${i}${u.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${u.origin} s\u0103 fie ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??u.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${u.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${S(u.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${u.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${u.origin}`;default:return"Intrare invalid\u0103"}}},"error");function sg(){return{localeError:o5()}}s(sg,"Zl"),o(sg,"default");function Ca(e,t,r,n){let u=Math.abs(e),i=u%10,a=u%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}s(Ca,"Db"),o(Ca,"getRussianPlural");var l5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${u.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\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 ${l}`}case"invalid_value":return u.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);if(a){let l=Number(u.maximum),d=Ca(l,a.unit.one,a.unit.few,a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${u.maximum.toString()} ${d}`}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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);if(a){let l=Number(u.minimum),d=Ca(l,a.unit.one,a.unit.few,a.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 ${u.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${u.minimum.toString()} ${d}`}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 ${u.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${u.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0438":""}: ${S(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}},"error");function ag(){return{localeError:l5()}}s(ag,"Vl"),o(ag,"default");var d5=o(()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${u.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${l}`}case"invalid_value":return u.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${P(u.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} imelo ${i}${u.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${u.origin??"vrednost"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${u.origin} imelo ${i}${u.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${S(u.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}},"error");function og(){return{localeError:d5()}}s(og,"ql"),o(og,"default");var c5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"antal",array:"lista"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${u.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${l}`}case"invalid_value":return u.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${P(u.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${i}${u.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${u.origin??"v\xE4rdet"} att ha ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${i}${u.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${u.origin??"v\xE4rdet"} att ha ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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) ${r[i.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${S(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${u.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}},"error");function lg(){return{localeError:c5()}}s(lg,"Gl"),o(lg,"default");var p5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\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 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${u.maximum.toString()} ${a.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 ${u.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${u.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\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 ${u.origin} ${i}${u.minimum.toString()} ${a.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 ${u.origin} ${i}${u.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${u.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${u.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${S(u.keys,", ")}`;case"invalid_key":return`${u.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`${u.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"}}},"error");function dg(){return{localeError:p5()}}s(dg,"Jl"),o(dg,"default");var m5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={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 u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\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 ${l}`}case"invalid_value":return u.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${u.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(u.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${u.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${u.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${u.minimum.toString()}`}case"invalid_format":{let i=u;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: ${r[i.format]??u.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 ${u.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: ${S(u.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${u.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 ${u.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}},"error");function cg(){return{localeError:m5()}}s(cg,"Wl"),o(cg,"default");var f5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${u.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${l}`}case"invalid_value":return u.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${P(u.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${i}${u.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${u.origin??"de\u011Fer"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${i}${u.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${u.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${u.keys.length>1?"lar":""}: ${S(u.keys,", ")}`;case"invalid_key":return`${u.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${u.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}},"error");function pg(){return{localeError:f5()}}s(pg,"Kl"),o(pg,"default");var h5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.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 ${u.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\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 ${l}`}case"invalid_value":return u.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 ${P(u.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 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${u.maximum.toString()} ${a.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 ${u.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} ${a.verb} ${i}${u.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${u.origin} \u0431\u0443\u0434\u0435 ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${u.keys.length>1?"\u0456":""}: ${S(u.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${u.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 ${u.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}},"error");function ka(){return{localeError:h5()}}s(ka,"an"),o(ka,"default");function mg(){return ka()}s(mg,"Xl"),o(mg,"default");var g5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${u.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \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 ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return u.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${P(u.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(u.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${u.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${u.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${u.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u06D2 ${i}${u.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${u.origin} \u06A9\u0627 ${i}${u.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${u.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${u.keys.length>1?"\u0632":""}: ${S(u.keys,"\u060C ")}`;case"invalid_key":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${u.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}},"error");function fg(){return{localeError:g5()}}s(fg,"Hl"),o(fg,"default");var v5=o(()=>{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"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${l}`}case"invalid_value":return u.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${P(u.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Juda katta: kutilgan ${u.origin??"qiymat"} ${i}${u.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${u.origin??"qiymat"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Juda kichik: kutilgan ${u.origin} ${i}${u.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${u.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${u.keys.length>1?"lar":""}: ${S(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${u.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}},"error");function hg(){return{localeError:v5()}}s(hg,"Yl"),o(hg,"default");var y5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${u.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return u.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${P(u.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${u.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${u.origin??"gi\xE1 tr\u1ECB"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${a.verb} ${i}${u.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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}`:`${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${S(u.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${u.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 ${u.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}},"error");function gg(){return{localeError:y5()}}s(gg,"Ql"),o(gg,"default");var E5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${u.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return u.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${P(u.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${i}${u.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${u.origin??"\u503C"} ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${i}${u.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${u.origin} ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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${r[i.format]??u.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${u.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${S(u.keys,", ")}`;case"invalid_key":return`${u.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${u.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}},"error");function vg(){return{localeError:E5()}}s(vg,"ed"),o(vg,"default");var b5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${u.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return u.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${P(u.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${i}${u.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${u.origin??"\u503C"} \u61C9\u70BA ${i}${u.maximum.toString()}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${i}${u.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${u.origin} \u61C9\u70BA ${i}${u.minimum.toString()}`}case"invalid_format":{let i=u;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 ${r[i.format]??u.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${u.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${u.keys.length>1?"\u5011":""}\uFF1A${S(u.keys,"\u3001")}`;case"invalid_key":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${u.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}},"error");function yg(){return{localeError:b5()}}s(yg,"td"),o(yg,"default");var D5=o(()=>{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(u){return e[u]??null}s(t,"t"),o(t,"getSizing");let r={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"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return u=>{switch(u.code){case"invalid_type":{let i=n[u.expected]??u.expected,a=Z(u.input),l=n[a]??a;return/^[A-Z]/.test(u.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${u.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return u.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${P(u.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(u.values,"|")}`;case"too_big":{let i=u.inclusive?"<=":"<",a=t(u.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin??"iye"} ${a.verb} ${i}${u.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${u.maximum}`}case"too_small":{let i=u.inclusive?">=":">",a=t(u.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${u.origin} ${a.verb} ${i}${u.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${u.minimum}`}case"invalid_format":{let i=u;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: ${r[i.format]??u.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 ${u.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(u.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${u.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 ${u.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}},"error");function Eg(){return{localeError:D5()}}s(Eg,"rd"),o(Eg,"default");var bg,Dg=Symbol("ZodOutput"),wg=Symbol("ZodInput"),Bg=class{static{s(this,"di")}static{o(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Gr(){return new Bg}s(Gr,"pi"),o(Gr,"registry"),(bg=globalThis).__zod_globalRegistry??(bg.__zod_globalRegistry=Gr());var xe=globalThis.__zod_globalRegistry;function Aa(e,t){return new e({type:"string",...z(t)})}s(Aa,"id"),o(Aa,"_string");function _a(e,t){return new e({type:"string",coerce:!0,...z(t)})}s(_a,"sd"),o(_a,"_coercedString");function Wr(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}s(Wr,"mi"),o(Wr,"_email");function ku(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}s(ku,"un"),o(ku,"_guid");function Kr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}s(Kr,"fi"),o(Kr,"_uuid");function Hr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}s(Hr,"hi"),o(Hr,"_uuidv4");function Xr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}s(Xr,"gi"),o(Xr,"_uuidv6");function Yr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}s(Yr,"vi"),o(Yr,"_uuidv7");function Au(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}s(Au,"ln"),o(Au,"_url");function Qr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}s(Qr,"yi"),o(Qr,"_emoji");function en(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}s(en,"bi"),o(en,"_nanoid");function tn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}s(tn,"xi"),o(tn,"_cuid");function un(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}s(un,"_i"),o(un,"_cuid2");function rn(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}s(rn,"wi"),o(rn,"_ulid");function nn(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}s(nn,"$i"),o(nn,"_xid");function sn(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}s(sn,"ki"),o(sn,"_ksuid");function an(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}s(an,"Si"),o(an,"_ipv4");function on(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}s(on,"Ii"),o(on,"_ipv6");function Ia(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}s(Ia,"ad"),o(Ia,"_mac");function ln(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}s(ln,"Ri"),o(ln,"_cidrv4");function dn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}s(dn,"Ei"),o(dn,"_cidrv6");function cn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}s(cn,"Ti"),o(cn,"_base64");function pn(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}s(pn,"Ai"),o(pn,"_base64url");function mn(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}s(mn,"zi"),o(mn,"_e164");function fn(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}s(fn,"Oi"),o(fn,"_jwt");var xg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Sa(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}s(Sa,"ud"),o(Sa,"_isoDateTime");function Fa(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}s(Fa,"ld"),o(Fa,"_isoDate");function za(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}s(za,"dd"),o(za,"_isoTime");function ja(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}s(ja,"pd"),o(ja,"_isoDuration");function Oa(e,t){return new e({type:"number",checks:[],...z(t)})}s(Oa,"md"),o(Oa,"_number");function Ra(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}s(Ra,"fd"),o(Ra,"_coercedNumber");function Ta(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}s(Ta,"hd"),o(Ta,"_int");function Na(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}s(Na,"gd"),o(Na,"_float32");function Ma(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}s(Ma,"vd"),o(Ma,"_float64");function Pa(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}s(Pa,"yd"),o(Pa,"_int32");function Ua(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}s(Ua,"bd"),o(Ua,"_uint32");function Za(e,t){return new e({type:"boolean",...z(t)})}s(Za,"xd"),o(Za,"_boolean");function La(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}s(La,"_d"),o(La,"_coercedBoolean");function qa(e,t){return new e({type:"bigint",...z(t)})}s(qa,"wd"),o(qa,"_bigint");function Va(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}s(Va,"$d"),o(Va,"_coercedBigint");function Ja(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}s(Ja,"kd"),o(Ja,"_int64");function Ga(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}s(Ga,"Sd"),o(Ga,"_uint64");function Wa(e,t){return new e({type:"symbol",...z(t)})}s(Wa,"Id"),o(Wa,"_symbol");function Ka(e,t){return new e({type:"undefined",...z(t)})}s(Ka,"Rd"),o(Ka,"_undefined");function Ha(e,t){return new e({type:"null",...z(t)})}s(Ha,"Ed"),o(Ha,"_null");function Xa(e){return new e({type:"any"})}s(Xa,"Td"),o(Xa,"_any");function Ya(e){return new e({type:"unknown"})}s(Ya,"Ad"),o(Ya,"_unknown");function Qa(e,t){return new e({type:"never",...z(t)})}s(Qa,"zd"),o(Qa,"_never");function eo(e,t){return new e({type:"void",...z(t)})}s(eo,"Od"),o(eo,"_void");function to(e,t){return new e({type:"date",...z(t)})}s(to,"jd"),o(to,"_date");function uo(e,t){return new e({type:"date",coerce:!0,...z(t)})}s(uo,"Pd"),o(uo,"_coercedDate");function ro(e,t){return new e({type:"nan",...z(t)})}s(ro,"Md"),o(ro,"_nan");function Te(e,t){return new Js({check:"less_than",...z(t),value:e,inclusive:!1})}s(Te,"Ve"),o(Te,"_lt");function De(e,t){return new Js({check:"less_than",...z(t),value:e,inclusive:!0})}s(De,"Te"),o(De,"_lte");function Ne(e,t){return new Gs({check:"greater_than",...z(t),value:e,inclusive:!1})}s(Ne,"qe"),o(Ne,"_gt");function he(e,t){return new Gs({check:"greater_than",...z(t),value:e,inclusive:!0})}s(he,"be"),o(he,"_gte");function hn(e){return Ne(0,e)}s(hn,"ji"),o(hn,"_positive");function gn(e){return Te(0,e)}s(gn,"Pi"),o(gn,"_negative");function vn(e){return De(0,e)}s(vn,"Mi"),o(vn,"_nonpositive");function yn(e){return he(0,e)}s(yn,"Ni"),o(yn,"_nonnegative");function at(e,t){return new K4({check:"multiple_of",...z(t),value:e})}s(at,"at"),o(at,"_multipleOf");function ot(e,t){return new Y4({check:"max_size",...z(t),maximum:e})}s(ot,"ct"),o(ot,"_maxSize");function Me(e,t){return new Q4({check:"min_size",...z(t),minimum:e})}s(Me,"Ge"),o(Me,"_minSize");function St(e,t){return new ef({check:"size_equals",...z(t),size:e})}s(St,"At"),o(St,"_size");function Ft(e,t){return new tf({check:"max_length",...z(t),maximum:e})}s(Ft,"zt"),o(Ft,"_maxLength");function Je(e,t){return new uf({check:"min_length",...z(t),minimum:e})}s(Je,"Qe"),o(Je,"_minLength");function zt(e,t){return new rf({check:"length_equals",...z(t),length:e})}s(zt,"Ot"),o(zt,"_length");function _u(e,t){return new nf({check:"string_format",format:"regex",...z(t),pattern:e})}s(_u,"tr"),o(_u,"_regex");function Iu(e){return new sf({check:"string_format",format:"lowercase",...z(e)})}s(Iu,"rr"),o(Iu,"_lowercase");function Su(e){return new af({check:"string_format",format:"uppercase",...z(e)})}s(Su,"nr"),o(Su,"_uppercase");function Fu(e,t){return new of({check:"string_format",format:"includes",...z(t),includes:e})}s(Fu,"or"),o(Fu,"_includes");function zu(e,t){return new lf({check:"string_format",format:"starts_with",...z(t),prefix:e})}s(zu,"ir"),o(zu,"_startsWith");function ju(e,t){return new df({check:"string_format",format:"ends_with",...z(t),suffix:e})}s(ju,"sr"),o(ju,"_endsWith");function En(e,t,r){return new cf({check:"property",property:e,schema:t,...z(r)})}s(En,"Di"),o(En,"_property");function Ou(e,t){return new pf({check:"mime_type",mime:e,...z(t)})}s(Ou,"ar"),o(Ou,"_mime");function Se(e){return new mf({check:"overwrite",tx:e})}s(Se,"Le"),o(Se,"_overwrite");function Ru(e){return Se(t=>t.normalize(e))}s(Ru,"cr"),o(Ru,"_normalize");function Tu(){return Se(e=>e.trim())}s(Tu,"ur"),o(Tu,"_trim");function Nu(){return Se(e=>e.toLowerCase())}s(Nu,"lr"),o(Nu,"_toLowerCase");function Mu(){return Se(e=>e.toUpperCase())}s(Mu,"dr"),o(Mu,"_toUpperCase");function Pu(){return Se(e=>Es(e))}s(Pu,"pr"),o(Pu,"_slugify");function no(e,t,r){return new e({type:"array",element:t,...z(r)})}s(no,"Nd"),o(no,"_array");function $g(e,t,r){return new e({type:"union",options:t,...z(r)})}s($g,"BI"),o($g,"_union");function Cg(e,t,r){return new e({type:"union",options:t,inclusive:!1,...z(r)})}s(Cg,"ZI"),o(Cg,"_xor");function kg(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...z(n)})}s(kg,"VI"),o(kg,"_discriminatedUnion");function Ag(e,t,r){return new e({type:"intersection",left:t,right:r})}s(Ag,"qI"),o(Ag,"_intersection");function _g(e,t,r,n){let u=r instanceof L,i=u?n:r,a=u?r:null;return new e({type:"tuple",items:t,rest:a,...z(i)})}s(_g,"GI"),o(_g,"_tuple");function Ig(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...z(n)})}s(Ig,"JI"),o(Ig,"_record");function Sg(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...z(n)})}s(Sg,"WI"),o(Sg,"_map");function Fg(e,t,r){return new e({type:"set",valueType:t,...z(r)})}s(Fg,"KI"),o(Fg,"_set");function zg(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(u=>[u,u])):t;return new e({type:"enum",entries:n,...z(r)})}s(zg,"XI"),o(zg,"_enum");function jg(e,t,r){return new e({type:"enum",entries:t,...z(r)})}s(jg,"HI"),o(jg,"_nativeEnum");function Og(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(r)})}s(Og,"YI"),o(Og,"_literal");function io(e,t){return new e({type:"file",...z(t)})}s(io,"Dd"),o(io,"_file");function Rg(e,t){return new e({type:"transform",transform:t})}s(Rg,"QI"),o(Rg,"_transform");function Tg(e,t){return new e({type:"optional",innerType:t})}s(Tg,"eR"),o(Tg,"_optional");function Ng(e,t){return new e({type:"nullable",innerType:t})}s(Ng,"tR"),o(Ng,"_nullable");function Mg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ds(r)}})}s(Mg,"rR"),o(Mg,"_default");function Pg(e,t,r){return new e({type:"nonoptional",innerType:t,...z(r)})}s(Pg,"nR"),o(Pg,"_nonoptional");function Ug(e,t){return new e({type:"success",innerType:t})}s(Ug,"oR"),o(Ug,"_success");function Zg(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}s(Zg,"iR"),o(Zg,"_catch");function Lg(e,t,r){return new e({type:"pipe",in:t,out:r})}s(Lg,"sR"),o(Lg,"_pipe");function qg(e,t){return new e({type:"readonly",innerType:t})}s(qg,"aR"),o(qg,"_readonly");function Vg(e,t,r){return new e({type:"template_literal",parts:t,...z(r)})}s(Vg,"cR"),o(Vg,"_templateLiteral");function Jg(e,t){return new e({type:"lazy",getter:t})}s(Jg,"uR"),o(Jg,"_lazy");function Gg(e,t){return new e({type:"promise",innerType:t})}s(Gg,"lR"),o(Gg,"_promise");function so(e,t,r){let n=z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}s(so,"Cd"),o(so,"_custom");function ao(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}s(ao,"Ud"),o(ao,"_refine");function oo(e,t){let r=lo(n=>(n.addIssue=u=>{if(typeof u=="string")n.issues.push(hu(u,n.value,r._zod.def));else{let i=u;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(hu(i))}},e(n.value,n)),t);return r}s(oo,"Ld"),o(oo,"_superRefine");function lo(e,t){let r=new ne({check:"custom",...z(t)});return r._zod.check=e,r}s(lo,"Ub"),o(lo,"_check");function co(e){let t=new ne({check:"describe"});return t._zod.onattach=[r=>{let n=xe.get(r)??{};xe.add(r,{...n,description:e})}],t._zod.check=()=>{},t}s(co,"Fd"),o(co,"describe");function po(e){let t=new ne({check:"meta"});return t._zod.onattach=[r=>{let n=xe.get(r)??{};xe.add(r,{...n,...e})}],t._zod.check=()=>{},t}s(po,"Bd"),o(po,"meta");function mo(e,t){let r=z(t),n=r.truthy??["true","1","yes","on","y","enabled"],u=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(h=>typeof h=="string"?h.toLowerCase():h),u=u.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(n),a=new Set(u),l=e.Codec??va,d=e.Boolean??Ys,c=e.String??Du,p=new c({type:"string",error:r.error}),m=new d({type:"boolean",error:r.error}),f=new l({type:"pipe",in:p,out:m,transform:o(((h,g)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?!0:a.has(E)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:f,continue:!1}),{})}),"transform"),reverseTransform:o(((h,g)=>h===!0?n[0]||"true":u[0]||"false"),"reverseTransform"),error:r.error});return f}s(mo,"Zd"),o(mo,"_stringbool");function jt(e,t,r,n={}){let u=z(n),i={...z(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...u};return r instanceof RegExp&&(i.pattern=r),new e(i)}s(jt,"mr"),o(jt,"_stringFormat");function lt(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??xe,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}}s(lt,"ut"),o(lt,"initializeContext");function Y(e,t,r={path:[],schemaPath:[]}){var n;let u=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,c);else{let m=a.schema,f=t.processors[u.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);f(e,t,m,c)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Y(p,t,c),t.seen.get(p).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),t.io==="input"&&fe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}s(Y,"K"),o(Y,"process");function dt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let d=n.get(l);if(d&&d!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(l,a[0])}}let u=o(a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(p)return{ref:m(p)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${l}/${f}`}}if(a[1]===r)return{ref:"#"};let d=`#/${l}/`,c=a[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:d+c}},"makeURI"),i=o(a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:d,defId:c}=u(a);l.def={...l.schema},c&&(l.defId=c);let p=l.schema;for(let m in p)delete p[m];p.$ref=d},"extractToDef");if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
64
64
 
65
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){n(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(l.cycle){n(a);continue}if(l.count>1&&e.reused==="ref"){n(a);continue}}}s(it,"it"),o(it,"extractDefs");function st(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let c=d.def??d.schema,m={...c},f=d.ref;if(d.ref=null,f){i(f);let g=e.seen.get(f),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Object.assign(c,v),Object.assign(c,m),l._zod.parent===f)for(let E in c)E==="$ref"||E==="allOf"||E in m||delete c[E];if(v.$ref&&g.def)for(let E in c)E==="$ref"||E==="allOf"||E in g.def&&JSON.stringify(c[E])===JSON.stringify(g.def[E])&&delete c[E]}let p=l._zod.parent;if(p&&p!==f){i(p);let g=e.seen.get(p);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(let v in c)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(c[v])===JSON.stringify(g.def[v])&&delete c[v]}e.override({zodSchema:l,jsonSchema:c,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())i(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;n!==void 0&&u.id===n&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Iu(t,"input",e.processors),output:Iu(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(st,"st"),o(st,"finalize");function me(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return me(i.element,r);if(i.type==="set")return me(i.valueType,r);if(i.type==="lazy")return me(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return me(i.innerType,r);if(i.type==="intersection")return me(i.left,r)||me(i.right,r);if(i.type==="record"||i.type==="map")return me(i.keyType,r)||me(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:me(i.in,r)||me(i.out,r);if(i.type==="object"){for(let u in i.shape)if(me(i.shape[u],r))return!0;return!1}if(i.type==="union"){for(let u of i.options)if(me(u,r))return!0;return!1}if(i.type==="tuple"){for(let u of i.items)if(me(u,r))return!0;return!!(i.rest&&me(i.rest,r))}return!1}s(me,"ye"),o(me,"isTransforming");var Jg=o((e,t={})=>r=>{let i=nt({...r,processors:t});return X(e,i),it(i,e),st(i,e)},"createToJSONSchemaMethod"),Iu=o((e,t,r={})=>i=>{let{libraryOptions:u,target:n}=i??{},a=nt({...u??{},target:n,io:t,processors:r});return X(e,a),it(a,e),st(a,e)},"createStandardJSONSchemaMethod"),HE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Gg=o((e,t,r,i)=>{let u=r;u.type="string";let{minimum:n,maximum:a,format:l,patterns:d,contentEncoding:c}=e._zod.bag;if(typeof n=="number"&&(u.minLength=n),typeof a=="number"&&(u.maxLength=a),l&&(u.format=HE[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),c&&(u.contentEncoding=c),d&&d.size>0){let m=[...d];m.length===1?u.pattern=m[0].source:m.length>1&&(u.allOf=[...m.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},"stringProcessor"),Wg=o((e,t,r,i)=>{let u=r,{minimum:n,maximum:a,format:l,multipleOf:d,exclusiveMaximum:c,exclusiveMinimum:m}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let f=typeof m=="number"&&m>=(n??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";f?g?(u.minimum=m,u.exclusiveMinimum=!0):u.exclusiveMinimum=m:typeof n=="number"&&(u.minimum=n),p?g?(u.maximum=c,u.exclusiveMaximum=!0):u.exclusiveMaximum=c:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),Kg=o((e,t,r,i)=>{r.type="boolean"},"booleanProcessor"),Hg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Xg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),Yg=o((e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),Qg=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),eh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),th=o((e,t,r,i)=>{r.not={}},"neverProcessor"),uh=o((e,t,r,i)=>{},"anyProcessor"),rh=o((e,t,r,i)=>{},"unknownProcessor"),nh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),ih=o((e,t,r,i)=>{let u=e._zod.def,n=xr(u.entries);n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),r.enum=n},"enumProcessor"),sh=o((e,t,r,i)=>{let u=e._zod.def,n=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else n.every(a=>typeof a=="number")&&(r.type="number"),n.every(a=>typeof a=="string")&&(r.type="string"),n.every(a=>typeof a=="boolean")&&(r.type="boolean"),n.every(a=>a===null)&&(r.type="null"),r.enum=n},"literalProcessor"),ah=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),oh=o((e,t,r,i)=>{let u=r,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=n.source},"templateLiteralProcessor"),lh=o((e,t,r,i)=>{let u=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(n.minLength=a),l!==void 0&&(n.maxLength=l),d?d.length===1?(n.contentMediaType=d[0],Object.assign(u,n)):(Object.assign(u,n),u.anyOf=d.map(c=>({contentMediaType:c}))):Object.assign(u,n)},"fileProcessor"),dh=o((e,t,r,i)=>{r.type="boolean"},"successProcessor"),ch=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),mh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),ph=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),fh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),gh=o((e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),hh=o((e,t,r,i)=>{let u=r,n=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=X(n.element,t,{...i,path:[...i.path,"items"]})},"arrayProcessor"),vh=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object",u.properties={};let a=n.shape;for(let c in a)u.properties[c]=X(a[c],t,{...i,path:[...i.path,"properties",c]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(c=>{let m=n.shape[c]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(u.required=Array.from(d)),n.catchall?._zod.def.type==="never"?u.additionalProperties=!1:n.catchall?n.catchall&&(u.additionalProperties=X(n.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),Ga=o((e,t,r,i)=>{let u=e._zod.def,n=u.inclusive===!1,a=u.options.map((l,d)=>X(l,t,{...i,path:[...i.path,n?"oneOf":"anyOf",d]}));n?r.oneOf=a:r.anyOf=a},"unionProcessor"),yh=o((e,t,r,i)=>{let u=e._zod.def,n=X(u.left,t,{...i,path:[...i.path,"allOf",0]}),a=X(u.right,t,{...i,path:[...i.path,"allOf",1]}),l=o(c=>"allOf"in c&&Object.keys(c).length===1,"isSimpleIntersection"),d=[...l(n)?n.allOf:[n],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),Eh=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=n.items.map((p,g)=>X(p,t,{...i,path:[...i.path,a,g]})),c=n.rest?X(n.rest,t,{...i,path:[...i.path,l,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,c&&(u.items=c)):t.target==="openapi-3.0"?(u.items={anyOf:d},c&&u.items.anyOf.push(c),u.minItems=d.length,c||(u.maxItems=d.length)):(u.items=d,c&&(u.additionalItems=c));let{minimum:m,maximum:f}=e._zod.bag;typeof m=="number"&&(u.minItems=m),typeof f=="number"&&(u.maxItems=f)},"tupleProcessor"),Dh=o((e,t,r,i)=>{let u=r,n=e._zod.def;u.type="object";let a=n.keyType,l=a._zod.bag?.patterns;if(n.mode==="loose"&&l&&l.size>0){let c=X(n.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});u.patternProperties={};for(let m of l)u.patternProperties[m.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=X(n.keyType,t,{...i,path:[...i.path,"propertyNames"]})),u.additionalProperties=X(n.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=a._zod.values;if(d){let c=[...d].filter(m=>typeof m=="string"||typeof m=="number");c.length>0&&(u.required=c)}},"recordProcessor"),bh=o((e,t,r,i)=>{let u=e._zod.def,n=X(u.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},"nullableProcessor"),Bh=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"nonoptionalProcessor"),wh=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),Ch=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),xh=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),$h=o((e,t,r,i)=>{let u=e._zod.def,n=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?n?u.out:u.in:u.out;X(a,t,i);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),kh=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),Ah=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"promiseProcessor"),Wa=o((e,t,r,i)=>{let u=e._zod.def;X(u.innerType,t,i);let n=t.seen.get(e);n.ref=u.innerType},"optionalProcessor"),_h=o((e,t,r,i)=>{let u=e._zod.innerType;X(u,t,i);let n=t.seen.get(e);n.ref=u},"lazyProcessor"),Ka={string:Gg,number:Wg,boolean:Kg,bigint:Hg,symbol:Xg,null:Yg,undefined:Qg,void:eh,never:th,any:uh,unknown:rh,date:nh,enum:ih,literal:sh,nan:ah,template_literal:oh,file:lh,success:dh,custom:ch,function:mh,transform:ph,map:fh,set:gh,array:hh,object:vh,union:Ga,intersection:yh,tuple:Eh,record:Dh,nullable:bh,nonoptional:Bh,default:wh,prefault:Ch,catch:xh,pipe:$h,readonly:kh,promise:Ah,optional:Wa,lazy:_h};function Ha(e,t){if("_idmap"in e){let i=e,u=nt({...t,processors:Ka}),n={};for(let d of i._idmap.entries()){let[c,m]=d;X(m,u)}let a={},l={registry:i,uri:t?.uri,defs:n};u.external=l;for(let d of i._idmap.entries()){let[c,m]=d;it(u,m),a[c]=st(u,m)}if(Object.keys(n).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:n}}return{schemas:a}}let r=nt({...t,processors:Ka});return X(e,r),it(r,e),st(r,e)}s(Ha,"$i"),o(Ha,"toJSONSchema");var XE=class{static{s(this,"ki")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=nt({processors:Ka,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return X(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),it(this.ctx,e);let r=st(this.ctx,e),{"~standard":i,...u}=r;return u}},YE={},Ih={};Se(Ih,{ZodAny:s(()=>Wo,"ZodAny"),ZodArray:s(()=>t0,"ZodArray"),ZodBase64:s(()=>En,"ZodBase64"),ZodBase64URL:s(()=>Dn,"ZodBase64URL"),ZodBigInt:s(()=>Tu,"ZodBigInt"),ZodBigIntFormat:s(()=>xn,"ZodBigIntFormat"),ZodBoolean:s(()=>Ou,"ZodBoolean"),ZodCIDRv4:s(()=>vn,"ZodCIDRv4"),ZodCIDRv6:s(()=>yn,"ZodCIDRv6"),ZodCUID:s(()=>dn,"ZodCUID"),ZodCUID2:s(()=>cn,"ZodCUID2"),ZodCatch:s(()=>S0,"ZodCatch"),ZodCodec:s(()=>Ju,"ZodCodec"),ZodCustom:s(()=>Wu,"ZodCustom"),ZodCustomStringFormat:s(()=>_t,"ZodCustomStringFormat"),ZodDate:s(()=>kn,"ZodDate"),ZodDefault:s(()=>k0,"ZodDefault"),ZodDiscriminatedUnion:s(()=>o0,"ZodDiscriminatedUnion"),ZodE164:s(()=>bn,"ZodE164"),ZodEmail:s(()=>an,"ZodEmail"),ZodEmoji:s(()=>on,"ZodEmoji"),ZodEnum:s(()=>Ft,"ZodEnum"),ZodExactOptional:s(()=>C0,"ZodExactOptional"),ZodFile:s(()=>b0,"ZodFile"),ZodFunction:s(()=>L0,"ZodFunction"),ZodGUID:s(()=>Fu,"ZodGUID"),ZodIPv4:s(()=>gn,"ZodIPv4"),ZodIPv6:s(()=>hn,"ZodIPv6"),ZodIntersection:s(()=>d0,"ZodIntersection"),ZodJWT:s(()=>Bn,"ZodJWT"),ZodKSUID:s(()=>fn,"ZodKSUID"),ZodLazy:s(()=>U0,"ZodLazy"),ZodLiteral:s(()=>E0,"ZodLiteral"),ZodMAC:s(()=>wo,"ZodMAC"),ZodMap:s(()=>f0,"ZodMap"),ZodNaN:s(()=>F0,"ZodNaN"),ZodNanoID:s(()=>ln,"ZodNanoID"),ZodNever:s(()=>Xo,"ZodNever"),ZodNonOptional:s(()=>Rn,"ZodNonOptional"),ZodNull:s(()=>Go,"ZodNull"),ZodNullable:s(()=>x0,"ZodNullable"),ZodNumber:s(()=>ju,"ZodNumber"),ZodNumberFormat:s(()=>at,"ZodNumberFormat"),ZodObject:s(()=>Pu,"ZodObject"),ZodOptional:s(()=>Sn,"ZodOptional"),ZodPipe:s(()=>qu,"ZodPipe"),ZodPrefault:s(()=>A0,"ZodPrefault"),ZodPreprocess:s(()=>O0,"ZodPreprocess"),ZodPromise:s(()=>M0,"ZodPromise"),ZodReadonly:s(()=>T0,"ZodReadonly"),ZodRecord:s(()=>St,"ZodRecord"),ZodSet:s(()=>h0,"ZodSet"),ZodString:s(()=>Su,"ZodString"),ZodStringFormat:s(()=>ee,"ZodStringFormat"),ZodSuccess:s(()=>_0,"ZodSuccess"),ZodSymbol:s(()=>Lo,"ZodSymbol"),ZodTemplateLiteral:s(()=>N0,"ZodTemplateLiteral"),ZodTransform:s(()=>w0,"ZodTransform"),ZodTuple:s(()=>c0,"ZodTuple"),ZodType:s(()=>V,"ZodType"),ZodULID:s(()=>mn,"ZodULID"),ZodURL:s(()=>zu,"ZodURL"),ZodUUID:s(()=>Ae,"ZodUUID"),ZodUndefined:s(()=>Vo,"ZodUndefined"),ZodUnion:s(()=>Uu,"ZodUnion"),ZodUnknown:s(()=>Ho,"ZodUnknown"),ZodVoid:s(()=>Yo,"ZodVoid"),ZodXID:s(()=>pn,"ZodXID"),ZodXor:s(()=>s0,"ZodXor"),_ZodString:s(()=>sn,"_ZodString"),_default:s(()=>zn,"_default"),_function:s(()=>Gu,"_function"),any:s(()=>Ko,"any"),array:s(()=>It,"array"),base64:s(()=>Ao,"base64"),base64url:s(()=>_o,"base64url"),bigint:s(()=>Uo,"bigint"),boolean:s(()=>Cn,"boolean"),catch:s(()=>Tn,"catch"),check:s(()=>q0,"check"),cidrv4:s(()=>$o,"cidrv4"),cidrv6:s(()=>ko,"cidrv6"),codec:s(()=>j0,"codec"),cuid:s(()=>vo,"cuid"),cuid2:s(()=>yo,"cuid2"),custom:s(()=>V0,"custom"),date:s(()=>e0,"date"),describe:s(()=>Jh,"describe"),discriminatedUnion:s(()=>l0,"discriminatedUnion"),e164:s(()=>Io,"e164"),email:s(()=>so,"email"),emoji:s(()=>go,"emoji"),enum:s(()=>Zu,"enum"),exactOptional:s(()=>Fn,"exactOptional"),file:s(()=>B0,"file"),float32:s(()=>Oo,"float32"),float64:s(()=>To,"float64"),function:s(()=>Gu,"function"),guid:s(()=>ao,"guid"),hash:s(()=>Ro,"hash"),hex:s(()=>jo,"hex"),hostname:s(()=>zo,"hostname"),httpUrl:s(()=>fo,"httpUrl"),instanceof:s(()=>J0,"instanceof"),int:s(()=>Ru,"int"),int32:s(()=>No,"int32"),int64:s(()=>Mo,"int64"),intersection:s(()=>An,"intersection"),invertCodec:s(()=>R0,"invertCodec"),ipv4:s(()=>Bo,"ipv4"),ipv6:s(()=>xo,"ipv6"),json:s(()=>G0,"json"),jwt:s(()=>So,"jwt"),keyof:s(()=>u0,"keyof"),ksuid:s(()=>bo,"ksuid"),lazy:s(()=>Pn,"lazy"),literal:s(()=>D0,"literal"),looseObject:s(()=>i0,"looseObject"),looseRecord:s(()=>p0,"looseRecord"),mac:s(()=>Co,"mac"),map:s(()=>g0,"map"),meta:s(()=>Gh,"meta"),nan:s(()=>z0,"nan"),nanoid:s(()=>ho,"nanoid"),nativeEnum:s(()=>y0,"nativeEnum"),never:s(()=>Nu,"never"),nonoptional:s(()=>On,"nonoptional"),null:s(()=>$n,"null"),nullable:s(()=>jt,"nullable"),nullish:s(()=>$0,"nullish"),number:s(()=>wn,"number"),object:s(()=>r0,"object"),optional:s(()=>zt,"optional"),partialRecord:s(()=>m0,"partialRecord"),pipe:s(()=>Vu,"pipe"),prefault:s(()=>jn,"prefault"),preprocess:s(()=>W0,"preprocess"),promise:s(()=>Z0,"promise"),readonly:s(()=>Nn,"readonly"),record:s(()=>In,"record"),refine:s(()=>Un,"refine"),set:s(()=>v0,"set"),strictObject:s(()=>n0,"strictObject"),string:s(()=>At,"string"),stringFormat:s(()=>Fo,"stringFormat"),stringbool:s(()=>Wh,"stringbool"),success:s(()=>I0,"success"),superRefine:s(()=>Mn,"superRefine"),symbol:s(()=>qo,"symbol"),templateLiteral:s(()=>P0,"templateLiteral"),transform:s(()=>Lu,"transform"),tuple:s(()=>_n,"tuple"),uint32:s(()=>Po,"uint32"),uint64:s(()=>Zo,"uint64"),ulid:s(()=>Eo,"ulid"),undefined:s(()=>Jo,"undefined"),union:s(()=>Mu,"union"),unknown:s(()=>Le,"unknown"),url:s(()=>po,"url"),uuid:s(()=>oo,"uuid"),uuidv4:s(()=>lo,"uuidv4"),uuidv6:s(()=>co,"uuidv6"),uuidv7:s(()=>mo,"uuidv7"),void:s(()=>Qo,"void"),xid:s(()=>Do,"xid"),xor:s(()=>a0,"xor")});var Sh={};Se(Sh,{endsWith:s(()=>wu,"endsWith"),gt:s(()=>je,"gt"),gte:s(()=>pe,"gte"),includes:s(()=>bu,"includes"),length:s(()=>xt,"length"),lowercase:s(()=>Eu,"lowercase"),lt:s(()=>ze,"lt"),lte:s(()=>Ee,"lte"),maxLength:s(()=>Ct,"maxLength"),maxSize:s(()=>rt,"maxSize"),mime:s(()=>Cu,"mime"),minLength:s(()=>Ze,"minLength"),minSize:s(()=>Re,"minSize"),multipleOf:s(()=>ut,"multipleOf"),negative:s(()=>tn,"negative"),nonnegative:s(()=>rn,"nonnegative"),nonpositive:s(()=>un,"nonpositive"),normalize:s(()=>xu,"normalize"),overwrite:s(()=>ke,"overwrite"),positive:s(()=>en,"positive"),property:s(()=>nn,"property"),regex:s(()=>yu,"regex"),size:s(()=>wt,"size"),slugify:s(()=>_u,"slugify"),startsWith:s(()=>Bu,"startsWith"),toLowerCase:s(()=>ku,"toLowerCase"),toUpperCase:s(()=>Au,"toUpperCase"),trim:s(()=>$u,"trim"),uppercase:s(()=>Du,"uppercase")});var Xa={};Se(Xa,{ZodISODate:s(()=>eo,"ZodISODate"),ZodISODateTime:s(()=>Ya,"ZodISODateTime"),ZodISODuration:s(()=>no,"ZodISODuration"),ZodISOTime:s(()=>uo,"ZodISOTime"),date:s(()=>to,"date"),datetime:s(()=>Qa,"datetime"),duration:s(()=>io,"duration"),time:s(()=>ro,"time")});var Ya=b("ZodISODateTime",(e,t)=>{Cp.init(e,t),ee.init(e,t)});function Qa(e){return ca(Ya,e)}s(Qa,"tp"),o(Qa,"datetime");var eo=b("ZodISODate",(e,t)=>{xp.init(e,t),ee.init(e,t)});function to(e){return ma(eo,e)}s(to,"rp"),o(to,"date");var uo=b("ZodISOTime",(e,t)=>{$p.init(e,t),ee.init(e,t)});function ro(e){return pa(uo,e)}s(ro,"np"),o(ro,"time");var no=b("ZodISODuration",(e,t)=>{kp.init(e,t),ee.init(e,t)});function io(e){return fa(no,e)}s(io,"op"),o(io,"duration");var Fh=o((e,t)=>{ss.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>_r(e,r),"value")},flatten:{value:o(r=>Ar(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,eu,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,eu,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),QE=b("ZodError",Fh),De=b("ZodError",Fh,{Parent:Error}),zh=iu(De),jh=su(De),Rh=au(De),Oh=ou(De),Th=ms(De),Nh=ps(De),Ph=fs(De),Uh=gs(De),Mh=hs(De),Zh=vs(De),Lh=ys(De),qh=Es(De),Vh=new WeakMap;function kt(e,t,r){let i=Object.getPrototypeOf(e),u=Vh.get(i);if(u||(u=new Set,Vh.set(i,u)),!u.has(t)){u.add(t);for(let n in r){let a=r[n];Object.defineProperty(i,n,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(kt,"nn"),o(kt,"_installLazyMethods");var V=b("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Iu(e,"input"),output:Iu(e,"output")}}),e.toJSONSchema=Jg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>zh(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Rh(e,r,i),e.parseAsync=async(r,i)=>jh(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Oh(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Th(e,r,i),e.decode=(r,i)=>Nh(e,r,i),e.encodeAsync=async(r,i)=>Ph(e,r,i),e.decodeAsync=async(r,i)=>Uh(e,r,i),e.safeEncode=(r,i)=>Mh(e,r,i),e.safeDecode=(r,i)=>Zh(e,r,i),e.safeEncodeAsync=async(r,i)=>Lh(e,r,i),e.safeDecodeAsync=async(r,i)=>qh(e,r,i),kt(e,"ZodType",{check(...r){let i=this.def;return this.clone(W.mergeDefs(i,{checks:[...i.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return he(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(Un(r,i))},superRefine(r,i){return this.check(Mn(r,i))},overwrite(r){return this.check(ke(r))},optional(){return zt(this)},exactOptional(){return Fn(this)},nullable(){return jt(this)},nullish(){return zt(jt(this))},nonoptional(r){return On(this,r)},array(){return It(this)},or(r){return Mu([this,r])},and(r){return An(this,r)},transform(r){return Vu(this,Lu(r))},default(r){return zn(this,r)},prefault(r){return jn(this,r)},catch(r){return Tn(this,r)},pipe(r){return Vu(this,r)},readonly(){return Nn(this)},describe(r){let i=this.clone();return Be.add(i,{description:r}),i},meta(...r){if(r.length===0)return Be.get(this);let i=this.clone();return Be.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return Be.get(e)?.description},configurable:!0}),e)),sn=b("_ZodString",(e,t)=>{du.init(e,t),V.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Gg(e,i,u,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,kt(e,"_ZodString",{regex(...i){return this.check(yu(...i))},includes(...i){return this.check(bu(...i))},startsWith(...i){return this.check(Bu(...i))},endsWith(...i){return this.check(wu(...i))},min(...i){return this.check(Ze(...i))},max(...i){return this.check(Ct(...i))},length(...i){return this.check(xt(...i))},nonempty(...i){return this.check(Ze(1,...i))},lowercase(i){return this.check(Eu(i))},uppercase(i){return this.check(Du(i))},trim(){return this.check($u())},normalize(...i){return this.check(xu(...i))},toLowerCase(){return this.check(ku())},toUpperCase(){return this.check(Au())},slugify(){return this.check(_u())}})}),Su=b("ZodString",(e,t)=>{du.init(e,t),sn.init(e,t),e.email=r=>e.check(jr(an,r)),e.url=r=>e.check(vu(zu,r)),e.jwt=r=>e.check(Qr(Bn,r)),e.emoji=r=>e.check(Pr(on,r)),e.guid=r=>e.check(hu(Fu,r)),e.uuid=r=>e.check(Rr(Ae,r)),e.uuidv4=r=>e.check(Or(Ae,r)),e.uuidv6=r=>e.check(Tr(Ae,r)),e.uuidv7=r=>e.check(Nr(Ae,r)),e.nanoid=r=>e.check(Ur(ln,r)),e.guid=r=>e.check(hu(Fu,r)),e.cuid=r=>e.check(Mr(dn,r)),e.cuid2=r=>e.check(Zr(cn,r)),e.ulid=r=>e.check(Lr(mn,r)),e.base64=r=>e.check(Hr(En,r)),e.base64url=r=>e.check(Xr(Dn,r)),e.xid=r=>e.check(qr(pn,r)),e.ksuid=r=>e.check(Vr(fn,r)),e.ipv4=r=>e.check(Jr(gn,r)),e.ipv6=r=>e.check(Gr(hn,r)),e.cidrv4=r=>e.check(Wr(vn,r)),e.cidrv6=r=>e.check(Kr(yn,r)),e.e164=r=>e.check(Yr(bn,r)),e.datetime=r=>e.check(Qa(r)),e.date=r=>e.check(to(r)),e.time=r=>e.check(ro(r)),e.duration=r=>e.check(io(r))});function At(e){return oa(Su,e)}s(At,"Qr"),o(At,"string");var ee=b("ZodStringFormat",(e,t)=>{Q.init(e,t),sn.init(e,t)}),an=b("ZodEmail",(e,t)=>{gp.init(e,t),ee.init(e,t)});function so(e){return jr(an,e)}s(so,"qy"),o(so,"email");var Fu=b("ZodGUID",(e,t)=>{pp.init(e,t),ee.init(e,t)});function ao(e){return hu(Fu,e)}s(ao,"Gy"),o(ao,"guid");var Ae=b("ZodUUID",(e,t)=>{fp.init(e,t),ee.init(e,t)});function oo(e){return Rr(Ae,e)}s(oo,"Jy"),o(oo,"uuid");function lo(e){return Or(Ae,e)}s(lo,"Ky"),o(lo,"uuidv4");function co(e){return Tr(Ae,e)}s(co,"Wy"),o(co,"uuidv6");function mo(e){return Nr(Ae,e)}s(mo,"Xy"),o(mo,"uuidv7");var zu=b("ZodURL",(e,t)=>{hp.init(e,t),ee.init(e,t)});function po(e){return vu(zu,e)}s(po,"Hy"),o(po,"url");function fo(e){return vu(zu,{protocol:Me.httpProtocol,hostname:Me.domain,...W.normalizeParams(e)})}s(fo,"Yy"),o(fo,"httpUrl");var on=b("ZodEmoji",(e,t)=>{vp.init(e,t),ee.init(e,t)});function go(e){return Pr(on,e)}s(go,"Qy"),o(go,"emoji");var ln=b("ZodNanoID",(e,t)=>{yp.init(e,t),ee.init(e,t)});function ho(e){return Ur(ln,e)}s(ho,"eb"),o(ho,"nanoid");var dn=b("ZodCUID",(e,t)=>{Ep.init(e,t),ee.init(e,t)});function vo(e){return Mr(dn,e)}s(vo,"tb"),o(vo,"cuid");var cn=b("ZodCUID2",(e,t)=>{Dp.init(e,t),ee.init(e,t)});function yo(e){return Zr(cn,e)}s(yo,"rb"),o(yo,"cuid2");var mn=b("ZodULID",(e,t)=>{bp.init(e,t),ee.init(e,t)});function Eo(e){return Lr(mn,e)}s(Eo,"nb"),o(Eo,"ulid");var pn=b("ZodXID",(e,t)=>{Bp.init(e,t),ee.init(e,t)});function Do(e){return qr(pn,e)}s(Do,"ob"),o(Do,"xid");var fn=b("ZodKSUID",(e,t)=>{wp.init(e,t),ee.init(e,t)});function bo(e){return Vr(fn,e)}s(bo,"ib"),o(bo,"ksuid");var gn=b("ZodIPv4",(e,t)=>{Ap.init(e,t),ee.init(e,t)});function Bo(e){return Jr(gn,e)}s(Bo,"sb"),o(Bo,"ipv4");var wo=b("ZodMAC",(e,t)=>{Ip.init(e,t),ee.init(e,t)});function Co(e){return da(wo,e)}s(Co,"ab"),o(Co,"mac");var hn=b("ZodIPv6",(e,t)=>{_p.init(e,t),ee.init(e,t)});function xo(e){return Gr(hn,e)}s(xo,"cb"),o(xo,"ipv6");var vn=b("ZodCIDRv4",(e,t)=>{Sp.init(e,t),ee.init(e,t)});function $o(e){return Wr(vn,e)}s($o,"ub"),o($o,"cidrv4");var yn=b("ZodCIDRv6",(e,t)=>{Fp.init(e,t),ee.init(e,t)});function ko(e){return Kr(yn,e)}s(ko,"lb"),o(ko,"cidrv6");var En=b("ZodBase64",(e,t)=>{zp.init(e,t),ee.init(e,t)});function Ao(e){return Hr(En,e)}s(Ao,"db"),o(Ao,"base64");var Dn=b("ZodBase64URL",(e,t)=>{jp.init(e,t),ee.init(e,t)});function _o(e){return Xr(Dn,e)}s(_o,"pb"),o(_o,"base64url");var bn=b("ZodE164",(e,t)=>{Rp.init(e,t),ee.init(e,t)});function Io(e){return Yr(bn,e)}s(Io,"mb"),o(Io,"e164");var Bn=b("ZodJWT",(e,t)=>{Op.init(e,t),ee.init(e,t)});function So(e){return Qr(Bn,e)}s(So,"fb"),o(So,"jwt");var _t=b("ZodCustomStringFormat",(e,t)=>{Tp.init(e,t),ee.init(e,t)});function Fo(e,t,r={}){return $t(_t,e,t,r)}s(Fo,"gb"),o(Fo,"stringFormat");function zo(e){return $t(_t,"hostname",Me.hostname,e)}s(zo,"hb"),o(zo,"hostname");function jo(e){return $t(_t,"hex",Me.hex,e)}s(jo,"vb"),o(jo,"hex");function Ro(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,u=Me[i];if(!u)throw new Error(`Unrecognized hash format: ${i}`);return $t(_t,i,u,t)}s(Ro,"yb"),o(Ro,"hash");var ju=b("ZodNumber",(e,t)=>{Ss.init(e,t),V.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Wg(e,i,u,n),kt(e,"ZodNumber",{gt(i,u){return this.check(je(i,u))},gte(i,u){return this.check(pe(i,u))},min(i,u){return this.check(pe(i,u))},lt(i,u){return this.check(ze(i,u))},lte(i,u){return this.check(Ee(i,u))},max(i,u){return this.check(Ee(i,u))},int(i){return this.check(Ru(i))},safe(i){return this.check(Ru(i))},positive(i){return this.check(je(0,i))},nonnegative(i){return this.check(pe(0,i))},negative(i){return this.check(ze(0,i))},nonpositive(i){return this.check(Ee(0,i))},multipleOf(i,u){return this.check(ut(i,u))},step(i,u){return this.check(ut(i,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function wn(e){return ga(ju,e)}s(wn,"yp"),o(wn,"number");var at=b("ZodNumberFormat",(e,t)=>{Np.init(e,t),ju.init(e,t)});function Ru(e){return va(at,e)}s(Ru,"Ai"),o(Ru,"int");function Oo(e){return ya(at,e)}s(Oo,"bb"),o(Oo,"float32");function To(e){return Ea(at,e)}s(To,"xb"),o(To,"float64");function No(e){return Da(at,e)}s(No,"_b"),o(No,"int32");function Po(e){return ba(at,e)}s(Po,"wb"),o(Po,"uint32");var Ou=b("ZodBoolean",(e,t)=>{Fs.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Kg(e,r,i,u)});function Cn(e){return Ba(Ou,e)}s(Cn,"bp"),o(Cn,"boolean");var Tu=b("ZodBigInt",(e,t)=>{zs.init(e,t),V.init(e,t),e._zod.processJSONSchema=(i,u,n)=>Hg(e,i,u,n),e.gte=(i,u)=>e.check(pe(i,u)),e.min=(i,u)=>e.check(pe(i,u)),e.gt=(i,u)=>e.check(je(i,u)),e.gte=(i,u)=>e.check(pe(i,u)),e.min=(i,u)=>e.check(pe(i,u)),e.lt=(i,u)=>e.check(ze(i,u)),e.lte=(i,u)=>e.check(Ee(i,u)),e.max=(i,u)=>e.check(Ee(i,u)),e.positive=i=>e.check(je(BigInt(0),i)),e.negative=i=>e.check(ze(BigInt(0),i)),e.nonpositive=i=>e.check(Ee(BigInt(0),i)),e.nonnegative=i=>e.check(pe(BigInt(0),i)),e.multipleOf=(i,u)=>e.check(ut(i,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Uo(e){return Ca(Tu,e)}s(Uo,"$b"),o(Uo,"bigint");var xn=b("ZodBigIntFormat",(e,t)=>{Pp.init(e,t),Tu.init(e,t)});function Mo(e){return $a(xn,e)}s(Mo,"kb"),o(Mo,"int64");function Zo(e){return ka(xn,e)}s(Zo,"Sb"),o(Zo,"uint64");var Lo=b("ZodSymbol",(e,t)=>{Up.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Xg(e,r,i,u)});function qo(e){return Aa(Lo,e)}s(qo,"Ib"),o(qo,"symbol");var Vo=b("ZodUndefined",(e,t)=>{Mp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Qg(e,r,i,u)});function Jo(e){return _a(Vo,e)}s(Jo,"Rb"),o(Jo,"_undefined");var Go=b("ZodNull",(e,t)=>{Zp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Yg(e,r,i,u)});function $n(e){return Ia(Go,e)}s($n,"$p"),o($n,"_null");var Wo=b("ZodAny",(e,t)=>{Lp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>uh(e,r,i,u)});function Ko(){return Sa(Wo)}s(Ko,"Tb"),o(Ko,"any");var Ho=b("ZodUnknown",(e,t)=>{qp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>rh(e,r,i,u)});function Le(){return Fa(Ho)}s(Le,"St"),o(Le,"unknown");var Xo=b("ZodNever",(e,t)=>{Vp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>th(e,r,i,u)});function Nu(e){return za(Xo,e)}s(Nu,"Xi"),o(Nu,"never");var Yo=b("ZodVoid",(e,t)=>{Jp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>eh(e,r,i,u)});function Qo(e){return ja(Yo,e)}s(Qo,"Eb"),o(Qo,"_void");var kn=b("ZodDate",(e,t)=>{Gp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(i,u,n)=>nh(e,i,u,n),e.min=(i,u)=>e.check(pe(i,u)),e.max=(i,u)=>e.check(Ee(i,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function e0(e){return Ra(kn,e)}s(e0,"Ab"),o(e0,"date");var t0=b("ZodArray",(e,t)=>{Wp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>hh(e,r,i,u),e.element=t.element,kt(e,"ZodArray",{min(r,i){return this.check(Ze(r,i))},nonempty(r){return this.check(Ze(1,r))},max(r,i){return this.check(Ct(r,i))},length(r,i){return this.check(xt(r,i))},unwrap(){return this.element}})});function It(e,t){return Na(t0,e,t)}s(It,"an"),o(It,"array");function u0(e){let t=e._zod.def.shape;return Zu(Object.keys(t))}s(u0,"zb"),o(u0,"keyof");var Pu=b("ZodObject",(e,t)=>{Hp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>vh(e,r,i,u),W.defineLazy(e,"shape",()=>t.shape),kt(e,"ZodObject",{keyof(){return Zu(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Le()})},loose(){return this.clone({...this._zod.def,catchall:Le()})},strict(){return this.clone({...this._zod.def,catchall:Nu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return W.extend(this,r)},safeExtend(r){return W.safeExtend(this,r)},merge(r){return W.merge(this,r)},pick(r){return W.pick(this,r)},omit(r){return W.omit(this,r)},partial(...r){return W.partial(Sn,this,r[0])},required(...r){return W.required(Rn,this,r[0])}})});function r0(e,t){let r={type:"object",shape:e??{},...W.normalizeParams(t)};return new Pu(r)}s(r0,"jb"),o(r0,"object");function n0(e,t){return new Pu({type:"object",shape:e,catchall:Nu(),...W.normalizeParams(t)})}s(n0,"Ob"),o(n0,"strictObject");function i0(e,t){return new Pu({type:"object",shape:e,catchall:Le(),...W.normalizeParams(t)})}s(i0,"Pb"),o(i0,"looseObject");var Uu=b("ZodUnion",(e,t)=>{Sr.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ga(e,r,i,u),e.options=t.options});function Mu(e,t){return new Uu({type:"union",options:e,...W.normalizeParams(t)})}s(Mu,"Hi"),o(Mu,"union");var s0=b("ZodXor",(e,t)=>{Uu.init(e,t),Xp.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ga(e,r,i,u),e.options=t.options});function a0(e,t){return new s0({type:"union",options:e,inclusive:!1,...W.normalizeParams(t)})}s(a0,"Nb"),o(a0,"xor");var o0=b("ZodDiscriminatedUnion",(e,t)=>{Uu.init(e,t),Yp.init(e,t)});function l0(e,t,r){return new o0({type:"union",options:t,discriminator:e,...W.normalizeParams(r)})}s(l0,"Db"),o(l0,"discriminatedUnion");var d0=b("ZodIntersection",(e,t)=>{Qp.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>yh(e,r,i,u)});function An(e,t){return new d0({type:"intersection",left:e,right:t})}s(An,"jp"),o(An,"intersection");var c0=b("ZodTuple",(e,t)=>{Us.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Eh(e,r,i,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function _n(e,t,r){let i=t instanceof L,u=i?r:t,n=i?t:null;return new c0({type:"tuple",items:e,rest:n,...W.normalizeParams(u)})}s(_n,"Pp"),o(_n,"tuple");var St=b("ZodRecord",(e,t)=>{ef.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Dh(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType});function In(e,t,r){return!t||!t._zod?new St({type:"record",keyType:At(),valueType:e,...W.normalizeParams(t)}):new St({type:"record",keyType:e,valueType:t,...W.normalizeParams(r)})}s(In,"Np"),o(In,"record");function m0(e,t,r){let i=he(e);return i._zod.values=void 0,new St({type:"record",keyType:i,valueType:t,...W.normalizeParams(r)})}s(m0,"Mb"),o(m0,"partialRecord");function p0(e,t,r){return new St({type:"record",keyType:e,valueType:t,mode:"loose",...W.normalizeParams(r)})}s(p0,"Cb"),o(p0,"looseRecord");var f0=b("ZodMap",(e,t)=>{tf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>fh(e,r,i,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Re(...r)),e.nonempty=r=>e.check(Re(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(wt(...r))});function g0(e,t,r){return new f0({type:"map",keyType:e,valueType:t,...W.normalizeParams(r)})}s(g0,"Ub"),o(g0,"map");var h0=b("ZodSet",(e,t)=>{uf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>gh(e,r,i,u),e.min=(...r)=>e.check(Re(...r)),e.nonempty=r=>e.check(Re(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(wt(...r))});function v0(e,t){return new h0({type:"set",valueType:e,...W.normalizeParams(t)})}s(v0,"Lb"),o(v0,"set");var Ft=b("ZodEnum",(e,t)=>{rf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(i,u,n)=>ih(e,i,u,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,u)=>{let n={};for(let a of i)if(r.has(a))n[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ft({...t,checks:[],...W.normalizeParams(u),entries:n})},e.exclude=(i,u)=>{let n={...t.entries};for(let a of i)if(r.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new Ft({...t,checks:[],...W.normalizeParams(u),entries:n})}});function Zu(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Ft({type:"enum",entries:r,...W.normalizeParams(t)})}s(Zu,"Yi"),o(Zu,"_enum");function y0(e,t){return new Ft({type:"enum",entries:e,...W.normalizeParams(t)})}s(y0,"Fb"),o(y0,"nativeEnum");var E0=b("ZodLiteral",(e,t)=>{nf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>sh(e,r,i,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function D0(e,t){return new E0({type:"literal",values:Array.isArray(e)?e:[e],...W.normalizeParams(t)})}s(D0,"Zb"),o(D0,"literal");var b0=b("ZodFile",(e,t)=>{sf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>lh(e,r,i,u),e.min=(r,i)=>e.check(Re(r,i)),e.max=(r,i)=>e.check(rt(r,i)),e.mime=(r,i)=>e.check(Cu(Array.isArray(r)?r:[r],i))});function B0(e){return Pa(b0,e)}s(B0,"Bb"),o(B0,"file");var w0=b("ZodTransform",(e,t)=>{af.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ph(e,r,i,u),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Cr(e.constructor.name);r.addIssue=n=>{if(typeof n=="string")r.issues.push(W.issue(n,r.value,t));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(W.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(n=>(r.value=n,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function Lu(e){return new w0({type:"transform",transform:e})}s(Lu,"Qi"),o(Lu,"transform");var Sn=b("ZodOptional",(e,t)=>{Gs.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Wa(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function zt(e){return new Sn({type:"optional",innerType:e})}s(zt,"tn"),o(zt,"optional");var C0=b("ZodExactOptional",(e,t)=>{of.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Wa(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Fn(e){return new C0({type:"optional",innerType:e})}s(Fn,"Zp"),o(Fn,"exactOptional");var x0=b("ZodNullable",(e,t)=>{lf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>bh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function jt(e){return new x0({type:"nullable",innerType:e})}s(jt,"rn"),o(jt,"nullable");function $0(e){return zt(jt(e))}s($0,"Vb"),o($0,"nullish");var k0=b("ZodDefault",(e,t)=>{df.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>wh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zn(e,t){return new k0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}s(zn,"qp"),o(zn,"_default");var A0=b("ZodPrefault",(e,t)=>{cf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ch(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function jn(e,t){return new A0({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}s(jn,"Jp"),o(jn,"prefault");var Rn=b("ZodNonOptional",(e,t)=>{mf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Bh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function On(e,t){return new Rn({type:"nonoptional",innerType:e,...W.normalizeParams(t)})}s(On,"Kp"),o(On,"nonoptional");var _0=b("ZodSuccess",(e,t)=>{pf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>dh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function I0(e){return new _0({type:"success",innerType:e})}s(I0,"qb"),o(I0,"success");var S0=b("ZodCatch",(e,t)=>{ff.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>xh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Tn(e,t){return new S0({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(Tn,"Hp"),o(Tn,"_catch");var F0=b("ZodNaN",(e,t)=>{gf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ah(e,r,i,u)});function z0(e){return Ta(F0,e)}s(z0,"Gb"),o(z0,"nan");var qu=b("ZodPipe",(e,t)=>{Hs.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>$h(e,r,i,u),e.in=t.in,e.out=t.out});function Vu(e,t){return new qu({type:"pipe",in:e,out:t})}s(Vu,"zi"),o(Vu,"pipe");var Ju=b("ZodCodec",(e,t)=>{qu.init(e,t),Xs.init(e,t)});function j0(e,t,r){return new Ju({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(j0,"Jb"),o(j0,"codec");function R0(e){let t=e._zod.def;return new Ju({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(R0,"Kb"),o(R0,"invertCodec");var O0=b("ZodPreprocess",(e,t)=>{qu.init(e,t),hf.init(e,t)}),T0=b("ZodReadonly",(e,t)=>{vf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>kh(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Nn(e){return new T0({type:"readonly",innerType:e})}s(Nn,"tm"),o(Nn,"readonly");var N0=b("ZodTemplateLiteral",(e,t)=>{yf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>oh(e,r,i,u)});function P0(e,t){return new N0({type:"template_literal",parts:e,...W.normalizeParams(t)})}s(P0,"Wb"),o(P0,"templateLiteral");var U0=b("ZodLazy",(e,t)=>{bf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>_h(e,r,i,u),e.unwrap=()=>e._zod.def.getter()});function Pn(e){return new U0({type:"lazy",getter:e})}s(Pn,"om"),o(Pn,"lazy");var M0=b("ZodPromise",(e,t)=>{Df.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>Ah(e,r,i,u),e.unwrap=()=>e._zod.def.innerType});function Z0(e){return new M0({type:"promise",innerType:e})}s(Z0,"Xb"),o(Z0,"promise");var L0=b("ZodFunction",(e,t)=>{Ef.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>mh(e,r,i,u)});function Gu(e){return new L0({type:"function",input:Array.isArray(e?.input)?_n(e?.input):e?.input??It(Le()),output:e?.output??Le()})}s(Gu,"Hb"),o(Gu,"_function");var Wu=b("ZodCustom",(e,t)=>{Bf.init(e,t),V.init(e,t),e._zod.processJSONSchema=(r,i,u)=>ch(e,r,i,u)});function q0(e){let t=new te({check:"custom"});return t._zod.check=e,t}s(q0,"Yb"),o(q0,"check");function V0(e,t){return Ua(Wu,e??(()=>!0),t)}s(V0,"Qb"),o(V0,"custom");function Un(e,t={}){return Ma(Wu,e,t)}s(Un,"am"),o(Un,"refine");function Mn(e,t){return Za(e,t)}s(Mn,"cm"),o(Mn,"superRefine");var Jh=qa,Gh=Va;function J0(e,t={}){let r=new Wu({type:"custom",check:"custom",fn:o(i=>i instanceof e,"fn"),abort:!0,...W.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}s(J0,"rx"),o(J0,"_instanceof");var Wh=o((...e)=>Ja({Codec:Ju,Boolean:Ou,String:Su},...e),"stringbool");function G0(e){let t=Pn(()=>Mu([At(e),wn(),Cn(),$n(),It(t),In(At(),t)]));return t}s(G0,"ox"),o(G0,"json");function W0(e,t){return new O0({type:"pipe",in:Lu(e),out:t})}s(W0,"ix"),o(W0,"preprocess");var e5={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Kh(e){de({customError:e})}s(Kh,"MS"),o(Kh,"setErrorMap");function Hh(){return de().customError}s(Hh,"CS"),o(Hh,"getErrorMap");var K0;K0||(K0={});var O={...Ih,...Sh,iso:Xa},t5=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Xh(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(Xh,"LS"),o(Xh,"detectVersion");function Yh(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(Yh,"FS"),o(Yh,"resolveRef");function H0(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return O.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 u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return O.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let n=Yh(u,t),a=ce(n,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return O.null();if(u.length===0)return O.never();if(u.length===1)return O.literal(u[0]);if(u.every(a=>typeof a=="string"))return O.enum(u);let n=u.map(a=>O.literal(a));return n.length<2?n[0]:O.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return O.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(n=>{let a={...e,type:n};return H0(a,t)});return u.length===0?O.never():u.length===1?u[0]:O.union(u)}if(!r)return O.any();let i;switch(r){case"string":{let u=O.string();if(e.format){let n=e.format;n==="email"?u=u.check(O.email()):n==="uri"||n==="uri-reference"?u=u.check(O.url()):n==="uuid"||n==="guid"?u=u.check(O.uuid()):n==="date-time"?u=u.check(O.iso.datetime()):n==="date"?u=u.check(O.iso.date()):n==="time"?u=u.check(O.iso.time()):n==="duration"?u=u.check(O.iso.duration()):n==="ipv4"?u=u.check(O.ipv4()):n==="ipv6"?u=u.check(O.ipv6()):n==="mac"?u=u.check(O.mac()):n==="cidr"?u=u.check(O.cidrv4()):n==="cidr-v6"?u=u.check(O.cidrv6()):n==="base64"?u=u.check(O.base64()):n==="base64url"?u=u.check(O.base64url()):n==="e164"?u=u.check(O.e164()):n==="jwt"?u=u.check(O.jwt()):n==="emoji"?u=u.check(O.emoji()):n==="nanoid"?u=u.check(O.nanoid()):n==="cuid"?u=u.check(O.cuid()):n==="cuid2"?u=u.check(O.cuid2()):n==="ulid"?u=u.check(O.ulid()):n==="xid"?u=u.check(O.xid()):n==="ksuid"&&(u=u.check(O.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),i=u;break}case"number":case"integer":{let u=r==="integer"?O.number().int():O.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),i=u;break}case"boolean":{i=O.boolean();break}case"null":{i=O.null();break}case"object":{let u={},n=e.properties||{},a=new Set(e.required||[]);for(let[d,c]of Object.entries(n)){let m=ce(c,t);u[d]=a.has(d)?m:m.optional()}if(e.propertyNames){let d=ce(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?ce(e.additionalProperties,t):O.any();if(Object.keys(u).length===0){i=O.record(d,c);break}let m=O.object(u).passthrough(),f=O.looseRecord(d,c);i=O.intersection(m,f);break}if(e.patternProperties){let d=e.patternProperties,c=Object.keys(d),m=[];for(let p of c){let g=ce(d[p],t),v=O.string().regex(new RegExp(p));m.push(O.looseRecord(v,g))}let f=[];if(Object.keys(u).length>0&&f.push(O.object(u).passthrough()),f.push(...m),f.length===0)i=O.object({}).passthrough();else if(f.length===1)i=f[0];else{let p=O.intersection(f[0],f[1]);for(let g=2;g<f.length;g++)p=O.intersection(p,f[g]);i=p}break}let l=O.object(u);e.additionalProperties===!1?i=l.strict():typeof e.additionalProperties=="object"?i=l.catchall(ce(e.additionalProperties,t)):i=l.passthrough();break}case"array":{let u=e.prefixItems,n=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>ce(d,t)),l=n&&typeof n=="object"&&!Array.isArray(n)?ce(n,t):void 0;l?i=O.tuple(a).rest(l):i=O.tuple(a),typeof e.minItems=="number"&&(i=i.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(O.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(d=>ce(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?ce(e.additionalItems,t):void 0;l?i=O.tuple(a).rest(l):i=O.tuple(a),typeof e.minItems=="number"&&(i=i.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(O.maxLength(e.maxItems)))}else if(n!==void 0){let a=ce(n,t),l=O.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),i=l}else i=O.array(O.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}s(H0,"sx"),o(H0,"convertBaseSchema");function ce(e,t){if(typeof e=="boolean")return e?O.any():O.never();let r=H0(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(c=>ce(c,t)),d=O.union(l);r=i?O.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(c=>ce(c,t)),d=O.xor(l);r=i?O.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:O.any();else{let l=i?r:ce(e.allOf[0],t),d=i?0:1;for(let c=d;c<e.allOf.length;c++)l=O.intersection(l,ce(e.allOf[c],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=O.nullable(r)),e.readOnly===!0&&(r=O.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},n=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of n)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))t5.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s(ce,"me"),o(ce,"convertSchema");function Qh(e,t){if(typeof e=="boolean")return e?O.any():O.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Xh(r,t?.defaultTarget),u=r.$defs||r.definitions||{},n={version:i,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Be};return ce(r,n)}s(Qh,"ax"),o(Qh,"fromJSONSchema");var e1={};Se(e1,{bigint:s(()=>n1,"bigint"),boolean:s(()=>r1,"boolean"),date:s(()=>i1,"date"),number:s(()=>u1,"number"),string:s(()=>t1,"string")});function t1(e){return la(Su,e)}s(t1,"ZS"),o(t1,"string");function u1(e){return ha(ju,e)}s(u1,"BS"),o(u1,"number");function r1(e){return wa(Ou,e)}s(r1,"VS"),o(r1,"boolean");function n1(e){return xa(Tu,e)}s(n1,"qS"),o(n1,"bigint");function i1(e){return Oa(kn,e)}s(i1,"GS"),o(i1,"date"),de(ua());var X0=h.object({file:h.string(),line:h.number().int().nonnegative().optional(),column:h.number().int().nonnegative().optional(),symbol:h.string().optional(),componentName:h.string().optional(),hookName:h.string().optional()}),u5=h.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),s1=h.object({sessionId:h.string(),browserContextId:h.string().optional(),tabId:h.string().optional(),frameId:h.string().optional(),route:h.string().optional(),url:h.string().optional(),flowId:h.string().optional(),originType:u5.optional(),originNodeId:h.string().optional(),causedByNodeId:h.string().optional(),requestId:h.string().optional(),parentRequestId:h.string().optional(),traceparent:h.string().optional(),projectName:h.string().optional(),userActionId:h.string().optional(),userIdHash:h.string().optional(),tenantIdHash:h.string().optional()}),r5=h.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai","lens"]),n5=h.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),Y0=h.enum(["debug","info","warning","error","fatal"]),t7=h.object({id:h.string(),sessionId:h.string(),timestamp:h.number().int().nonnegative(),source:r5,category:n5,severity:Y0,context:s1,fingerprint:h.string(),title:h.string(),message:h.string().optional(),location:X0.optional(),relatedFiles:h.array(h.string()).optional(),relatedUrls:h.array(h.string()).optional(),raw:h.unknown().optional()}),i5=h.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),s5=h.enum(["created","active","completed","disposed","errored"]),u7=h.object({id:h.string(),parentTraceNodeId:h.string().optional(),type:i5,logicalId:h.string().optional(),instanceId:h.string().optional(),generation:h.number().int().nonnegative().optional(),lifecycle:s5,context:s1,name:h.string(),startTime:h.number().int().nonnegative(),endTime:h.number().int().nonnegative().optional(),durationMs:h.number().nonnegative().optional(),location:X0.optional(),attributes:h.record(h.string(),h.unknown())}),a5=h.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),r7=h.object({id:h.string(),from:h.string(),to:h.string(),axis:a5,type:h.string(),timestamp:h.number().int().nonnegative(),attributes:h.record(h.string(),h.unknown()).optional()}),o5=h.enum(["mount","update"]),l5=h.discriminatedUnion("type",[h.object({type:h.literal("props"),changedKeys:h.array(h.string())}),h.object({type:h.literal("react-state"),hookIndex:h.number().int()}),h.object({type:h.literal("context"),contextName:h.string()}),h.object({type:h.literal("valtio-path"),path:h.string(),changedKeys:h.array(h.string())}),h.object({type:h.literal("parent-render"),parentRenderId:h.string()}),h.object({type:h.literal("hook-dep-changed"),hookInstanceId:h.string(),depsHashBefore:h.string(),depsHashAfter:h.string()}),h.object({type:h.literal("force"),reason:h.string()})]),n7=h.object({phase:o5,actualDurationMs:h.number().nonnegative(),baseDurationMs:h.number().nonnegative(),startTime:h.number().nonnegative(),commitTime:h.number().nonnegative(),why:h.array(l5)}),i7=h.object({hookInstanceId:h.string(),depsHash:h.string(),prevDepsHash:h.string().optional(),durationMs:h.number().nonnegative(),cleanupRan:h.boolean().optional()}),s7=h.object({storeId:h.string(),path:h.string(),changedKeys:h.array(h.string()),beforeHash:h.string(),afterHash:h.string(),preview:h.unknown().optional()}),a7=h.object({method:h.string(),route:h.string(),status:h.number().int().optional(),durationMs:h.number().nonnegative().optional(),traceparent:h.string().optional()}),d5=h.enum(["N+1","sequential-await","growing-allocation"]),o7=h.object({iterations:h.number().int().nonnegative(),durationMs:h.number().nonnegative(),dbCallsInsideLoop:h.number().int().nonnegative(),redisCallsInsideLoop:h.number().int().nonnegative(),awaitedOperationsInsideLoop:h.number().int().nonnegative(),slowestIterations:h.array(h.object({index:h.number().int().nonnegative(),durationMs:h.number().nonnegative(),childNodeIds:h.array(h.string())})).optional(),patterns:h.array(d5).optional()}),c5=h.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),l7=h.object({ownerInstanceId:h.string(),containerKind:c5,fieldName:h.string(),itemCount:h.number().int().nonnegative(),estimatedBytes:h.number().nonnegative(),retainedBytes:h.number().nonnegative().optional(),growthSinceStart:h.number()}),m5=h.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),d7=h.object({ownerNodeId:h.string(),operation:m5,beforeCount:h.number().int().nonnegative(),afterCount:h.number().int().nonnegative(),estimatedDeltaBytes:h.number(),keyPreview:h.string().optional(),valueType:h.string().optional()}),a1=h.object({x:h.number(),y:h.number(),width:h.number().nonnegative(),height:h.number().nonnegative()}),p5=h.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),f5=h.enum(["computed-style","layout","paint-order"]),c7=h.object({causedBy:p5,viewport:a1,layoutSnapshotId:h.string(),styleSnapshotId:h.string(),screenshotId:h.string().optional(),changedNodes:h.array(h.object({uid:h.string(),component:h.string().optional(),change:f5,property:h.string().optional(),before:h.unknown().optional(),after:h.unknown().optional()}))}),g5=h.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),h5=h.enum(["always","after-animation","stable-only","during-animation"]),v5=h.enum(["info","warning","error"]),m7=h.object({ruleId:h.string(),ruleType:g5,severity:v5,timing:h5,element:h.object({uid:h.string(),component:h.string().optional(),rect:a1}),expected:h.record(h.string(),h.unknown()),actual:h.record(h.string(),h.unknown()),evidence:h.object({computedStyle:h.string().optional(),screenshotCrop:h.string().optional(),trace:h.string().optional(),cssCause:h.object({selector:h.string(),file:h.string().optional(),line:h.number().int().optional(),declaration:h.string().optional()}).optional()})}),y5=h.enum(["none","connected"]),E5=h.enum(["running","clean","failing","error"]),D5=h.object({id:h.string(),tool:h.string(),project:h.string().optional(),firstReportedAt:h.number().int().nonnegative(),lastReportedAt:h.number().int().nonnegative(),lastRunStatus:E5,lastRunDurationMs:h.number().int().nonnegative().optional(),errorCount:h.number().int().nonnegative(),warningCount:h.number().int().nonnegative().optional(),error:h.string().optional()}),Zn=h.object({producer:y5,producers:h.array(D5),lastReportedAt:h.number().int().nonnegative().optional(),ageMs:h.number().int().nonnegative().optional(),stale:h.boolean(),detail:h.string()}),o1=10*6e4;function Ln(e){let t=e.now??Date.now(),r=[...e.producers].sort((c,m)=>m.lastReportedAt-c.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let i=r[0].lastReportedAt,u=Math.max(0,t-i),n=u>o1,a=r.filter(c=>c.lastRunStatus==="failing"),l=r.filter(c=>c.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(c=>c.id).join(", ")}); newest report ${l1(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(c=>`${c.id} \u2014 ${c.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),n&&d.push(`Older than ${Math.round(o1/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:i,ageMs:u,stale:n,detail:d.join(" ")}}s(Ln,"gr"),o(Ln,"summariseProducers");function l1(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(l1,"pI"),o(l1,"describeAge");var Rt=h.object({$schema:h.string().optional(),schemaVersion:h.literal(1),revision:h.number().int().nonnegative(),updatedAt:h.string().datetime().optional()}),b5=h.enum(["starting","clean","warning","failing"]),d1=h.object({source:h.string(),severity:Y0,title:h.string(),fingerprint:h.string(),resource:h.string(),pageId:h.string().optional(),flowId:h.string().optional(),location:X0.optional()}),B5=h.object({typecheck:h.enum(["passed","failed","unknown"]).optional(),lint:h.enum(["passed","failed","unknown"]).optional(),build:h.enum(["passed","failed","unknown"]).optional(),runtime:h.enum(["passed","failed","warning","unknown"]).optional(),visual:h.enum(["passed","failed","warning","unknown"]).optional(),memory:h.enum(["passed","failed","warning","unknown"]).optional()}),w5=h.enum(["embedded","shared"]),C5=h.object({mode:w5,pid:h.number(),startedAt:h.string(),url:h.string().optional()}),p7=Rt.extend({sessionId:h.string(),status:b5,activeTab:h.string().optional(),tabsWithIssues:h.array(h.string()).optional(),blocking:h.array(d1),warnings:h.array(d1).default([]),suggestedReads:h.array(h.string()),checks:B5.optional(),server:C5.optional()}),x5=h.object({eventsResident:h.number().int().nonnegative(),eventsResidentBytes:h.number().int().nonnegative(),eventsIngested:h.number().int().nonnegative(),eventsDropped:h.number().int().nonnegative(),eventsDroppedForBytes:h.number().int().nonnegative().optional(),eventCap:h.number().int().nonnegative().optional(),eventByteCap:h.number().int().nonnegative().optional(),artifactsResident:h.number().int().nonnegative().optional(),artifactsResidentBytes:h.number().int().nonnegative().optional(),artifactsDropped:h.number().int().nonnegative().optional(),artifactByteCap:h.number().int().nonnegative().optional(),truncatedEvents:h.number().int().nonnegative().optional(),truncatedBytesReclaimed:h.number().int().nonnegative().optional(),rawByteLimit:h.number().int().nonnegative().optional(),reducers:h.record(h.string(),h.object({residentEvents:h.number().int().nonnegative(),residentBytes:h.number().int().nonnegative(),evictedEvents:h.number().int().nonnegative(),evictedForBytes:h.number().int().nonnegative(),eventCap:h.number().int().nonnegative(),byteCap:h.number().int().nonnegative()})).optional()}),f7=Rt.extend({sessionId:h.string(),supportedResources:h.array(h.string()),supportedTools:h.array(h.string()),supportedJobs:h.array(h.string()),supportedChannels:h.array(h.string()),subscribedByDefault:h.array(h.string()),transports:h.array(h.enum(["stdio","http","socket"])),host:h.object({platform:h.string(),node:h.string()}),project:h.object({name:h.string(),nxVersion:h.string().optional()}),storage:x5.optional()}),$5=h.object({id:h.string(),timestamp:h.number().int().nonnegative(),message:h.string(),fingerprint:h.string(),code:h.string().optional(),rule:h.string().optional(),severity:Y0.optional(),file:h.string().optional(),line:h.number().int().nonnegative().optional(),column:h.number().int().nonnegative().optional(),project:h.string().optional()}),g7=Rt.merge(Zn).extend({status:h.enum(["unknown","clean","failing"]),errorCount:h.number().int().nonnegative(),lastRunAt:h.number().int().nonnegative().optional()}),h7=Rt.merge(Zn).extend({errors:h.array($5)}),v7=Rt.merge(Zn).extend({status:h.enum(["unknown","clean","warning","failing"]),errorCount:h.number().int().nonnegative(),warningCount:h.number().int().nonnegative(),lastRunAt:h.number().int().nonnegative().optional()}),y7=Rt.merge(Zn).extend({status:h.enum(["unknown","clean","warning","failing"]),hmrUpdates:h.number().int().nonnegative(),lastRunAt:h.number().int().nonnegative().optional()}),Ot=Symbol.for("@lensmcp/session/Session"),Ku=Symbol.for("@lensmcp/core/EventBus"),k5=Symbol.for("@lensmcp/core/GraphStore"),R=Symbol.for("@lensmcp/core/ResourceStore"),A5=Symbol.for("@lensmcp/storage/Storage"),_5="capture-request.json",I5="capture-runner.json",S5="capture-rules.json",Q0="__lensmcpTruncation",F5="__lensmcpTruncated";function _e(e,t=Number.POSITIVE_INFINITY,r=12){return ot(e,t,r,32)}s(_e,"je"),o(_e,"estimateJsonBytes");function el(e,t,r=12){return ot(e,t,r,Number.POSITIVE_INFINITY)>t}s(el,"os"),o(el,"exceedsJsonByteBudget");function ot(e,t,r,i){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return i;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=ot(e[l],t-a,r-1,i)+1,a>t)return a;return a}let u=2,n=e;for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a))continue;let l=ot(n[a],t-u,r-1,i);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(ot,"vr"),o(ot,"walk");function qn(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(qn,"dm"),o(qn,"record");function c1(e,t,r){return qn(e,r),{[F5]:!0,originalBytes:_e(t,Number.POSITIVE_INFINITY,64)}}s(c1,"bI"),o(c1,"stub");function m1(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s(m1,"xI"),o(m1,"isScalar");function Tt(e,t,r,i){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let n=Math.max(0,u-64);return qn(t,i),t.budget-=n,`${e.slice(0,n)}\u2026[lensmcp truncated: ${e.length-n} more chars]`}return e===null||typeof e!="object"?(t.budget-=ot(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?c1(t,e,i):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?p1(e,t,r,i):f1(e,t,r,i)}s(Tt,"yr"),o(Tt,"clampValue");function p1(e,t,r,i){let u=[],n=Math.min(e.length,t.maxArrayItems);for(let a=0;a<n&&!(t.budget<=0);a++)u.push(Tt(e[a],t,r-1,`${i}[${a}]`));return u.length<e.length&&qn(t,`${i}[] (+${e.length-u.length} items dropped)`),u}s(p1,"_I"),o(p1,"clampArray");function f1(e,t,r,i){let u={},n,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],c=ot(d,512,r-1,Number.POSITIVE_INFINITY);if(c<=512&&(!a||m1(d))){u[l]=d,t.budget-=l.length+4+c;continue}(n??=[]).push({key:l,bytes:c})}if(!n)return u;n.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of n){let d=i?`${i}.${l}`:l;u[l]=Tt(e[l],t,r-1,d)}return u}s(f1,"wI"),o(f1,"clampObject");function g1(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!el(e,r,i)){let d=_e(e,r,i),c={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:Tt(e,c,i,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=_e(e,Number.POSITIVE_INFINITY,64),n={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=Tt(e,n,i,""),l=_e(a,Number.POSITIVE_INFINITY,i);if(n.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:n.paths};a[Q0]=d}return{value:a,truncated:n.truncatedAnything,originalBytes:u,keptBytes:l,paths:n.paths}}s(g1,"pm"),o(g1,"boundedClone");function lt(e,t){if(e.size<=t)return 0;let r=0,i=e.keys();for(;e.size>t;){let u=i.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(lt,"Ce"),o(lt,"capMap");var Hu=256,Xu="error-dismissed",Vn="error-restored",h1="lens",z5=new Set(["dashboard","cli","agent"]);function v1(e){if(e.source!==h1||!e.raw||typeof e.raw!="object")return;let t=e.raw,r=t.groupId;if(typeof r!="string"||r.length===0||r.length>2048)return;if(t.kind===Vn)return{kind:Vn,groupId:r};if(t.kind!==Xu)return;let i=t.until;if(typeof i!="number"||!Number.isFinite(i))return;let u=Array.isArray(t.eventIds)?t.eventIds.filter(c=>typeof c=="string"&&c.length>0).slice(0,200):[],n=z5.has(t.by)?t.by:void 0,a=o((c,m)=>typeof c=="string"&&c.trim()?c.trim().slice(0,m):void 0,"text"),l=a(t.reason,500),d=a(t.title,300);return{kind:Xu,groupId:r,until:Math.min(i,e.timestamp),eventIds:u,...n?{by:n}:{},...l?{reason:l}:{},...d?{title:d}:{}}}s(v1,"vx"),o(v1,"readErrorDismissal");function y1(e){let{source:t,category:r,title:i,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(i)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(y1,"kI"),o(y1,"areaOf");var E1=240,j5=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),R5=new Set(["tenantId","caller","userId","accountId","email","subject"]),O5=8;function D1(e){let t=Jn(e,0);return g1(Yt({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s(D1,"TI"),o(D1,"aiProjection");function Jn(e,t){if(typeof e=="string")return b1(e);if(e===null||typeof e!="object")return e;if(t>=O5)return;if(Array.isArray(e))return e.slice(0,32).map(i=>Jn(i,t+1));let r={};for(let[i,u]of Object.entries(e))if(!R5.has(i)){if(j5.has(i)){typeof u=="string"?r[`${i}Chars`]=u.length:Array.isArray(u)?r[`${i}Count`]=u.length:u!=null&&(r[`${i}Present`]=!0);continue}r[i]=Jn(u,t+1)}return r}s(Jn,"fm"),o(Jn,"projectAi");function b1(e){return e.length<=E1?Te(e):`${Te(e.slice(0,E1))}\u2026`}s(b1,"EI"),o(b1,"clipText");function B1(e,t={}){let r=e.raw??{},i=r.render??{},u=r.span??{},n=r.request??{},a=o(z=>typeof z=="number"?z:void 0,"num"),l=r.loop??{},d=r.effect??{},c=a(r.durationMs)??a(u.durationMs)??a(n.durationMs)??a(l.durationMs)??a(i.actualDurationMs)??a(d.durationMs),m=typeof r.kind=="string"?r.kind:void 0,f=m==="fetch-done"||m==="fetch-error",p=a(i.commitTime),g=m==="render"&&p!==void 0&&Math.abs(p-e.timestamp)<6e4,v=f?e.timestamp:g?p:a(r.startedAt)??a(u.startTime)??a(n.startedAt)??a(l.startedAt)??(c!==void 0?e.timestamp-c:e.timestamp),E;if(typeof r.query=="string"){let z=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",Z=typeof r.result=="string"?` \u2192 ${r.result}`:"";E=r.query+z+Z}else if(typeof r.command=="string"){let z=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";E=r.command+z}else if(m==="state-update"){let z=r.update??{},Z="";try{Z=JSON.stringify(z.preview)}catch{}E=`${z.storeId??""}.${z.path??""} = ${Z}`}else m==="queue-completed"&&typeof r.returned=="string"?E=`returned ${r.returned}`:m==="queue-enqueued"&&(E=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let D;if(m==="gateway-request")D=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(m==="fetch-start"||m==="fetch-done"||m==="fetch-error")try{let z=new URL(String(r.href??r.url??""));D=`${z.hostname}${z.pathname}`}catch{}let B;if(m==="gateway-request"&&Array.isArray(r.steps))B=r.steps.map(z=>{let Z=[String(z.step)];return z.project&&Z.push(String(z.project)),z.prefix&&Z.push(String(z.prefix)),z.mode&&Z.push(String(z.mode)+(z.ok===!1?" \u2717":z.ok===!0?" \u2713":"")),z.caller&&Z.push("by "+String(z.caller)),z.pod&&Z.push(String(z.pod)),typeof z.atMs=="number"&&Z.push(`@${z.atMs}ms`),Z.join(" ")}),E=B.map(z=>z.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(m==="egress")E=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(m==="ai-call"){let z=r.usage??{},Z=z.promptTokens!==void 0||z.completionTokens!==void 0?` \xB7 ${a(z.promptTokens)??"?"}\u2192${a(z.completionTokens)??"?"} tok`:"",J=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",se=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",ue=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.provider??""}/${r.model??"?"}${Z}${J}${se}${ue}${r.stream===!0?" \xB7 stream":""}`}else if(m==="ai-round"){let z=r.model??{},Z=r.usage??{},J=Array.isArray(r.toolCalls)?r.toolCalls:[],se=`${a(Z.promptTokens)??"?"}\u2192${a(Z.completionTokens)??"?"} tok`,ue=J.length?` \xB7 ${J.length} tool call${J.length===1?"":"s"}`:"",Ce=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${z.provider??""}/${z.model??""} \xB7 ${se}${ue}${Ce}`}else if(m==="ai-turn-start"){let z=Array.isArray(r.tools)?r.tools:[];E=`skill ${r.skill??""} \xB7 ${r.output??""}${z.length?" \xB7 tools: "+z.join(", "):""}`}else if(m==="ai-tool-call"){let z=r.call??{},Z=r.result??{},J=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${z.name??"tool"} ${Z.error!=null?"\u2717 "+String(Z.error):"\u2713"}${J}`}else if(m==="ai-turn-end"){let z=r.usage??{},Z=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",J=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(z.promptTokens)??"?"}+${a(z.completionTokens)??"?"} tok${Z}${J}`}}let k;m==="db-query"&&typeof r.query=="string"?k=r.query:m==="redis-op"?k=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:m==="egress"?k=`${r.method??"GET"} ${r.host??""}`:m==="ai-call"?k=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:m==="queue-enqueued"?k=`enqueue ${r.queue??""}`:m==="span"&&typeof u.name=="string"?k=u.name:m==="memory-mutation"&&(k=e.title);let _=e.context??{},F=i.commitId??d.commitId??r.commitId,I=Array.isArray(i.why)?i.why.map(z=>typeof z?.type=="string"?z.type:void 0).filter(z=>!!z):[];return{id:e.id,t:e.timestamp,start:v,...k?{sig:k}:{},...D?{urlKey:D}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:m,area:y1({source:e.source,category:e.category,title:e.title,kind:m}),...typeof u.role=="string"?{role:u.role}:{},...typeof _.requestId=="string"?{requestId:_.requestId}:{},...typeof _.parentRequestId=="string"?{parentRequestId:_.parentRequestId}:{},...typeof F=="string"?{commitId:F}:{},...typeof i.componentName=="string"?{component:i.componentName}:{},...typeof i.phase=="string"?{phase:i.phase}:{},...I.length?{why:I}:{},...m==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...m==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...m==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof _.projectName=="string"?{project:_.projectName}:typeof r.project=="string"?{project:r.project}:{},...c!==void 0?{durationMs:c}:{},...f&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:D1(r)}:{},...E?{detail:E}:{},...B?{steps:B}:{}}}s(B1,"AI"),o(B1,"trimFlowEvent");var w1=1;function C1(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(C1,"zI"),o(C1,"kindRank");function Nt(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:C1(e.kind)}s(Nt,"gn"),o(Nt,"causalRank");function tl(e,t={}){let r=e.slice().filter(y=>{let w=y.raw??{},C=typeof w.kind=="string"?w.kind:"";if(C==="subscription-added"||C==="subscription-removed"||C==="hook-run"||C==="store-created"||C==="singleton-instance")return!1;let x=w.span;return!(typeof x?.name=="string"&&x.name.startsWith("nest.request "))}).map(y=>B1(y,t)),i=new Set;for(let y=r.length-1;y>=0;y--)i.has(r[y].id)?r.splice(y,1):i.add(r[y].id);let u=new Map;for(let y of r)(y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&!u.has(y.requestId)&&u.set(y.requestId,y.start);let n=o(y=>y.source!=="react"&&y.source!=="valtio"&&y.requestId&&u.has(y.requestId)?u.get(y.requestId):y.start,"anchorOf");r.sort((y,w)=>n(y)-n(w)||y.start-w.start||Nt(y)-Nt(w)||(w.durationMs??0)-(y.durationMs??0)||y.t-w.t);let a=o(y=>(y.kind==="span"||y.kind==="server-request"||y.kind==="gateway-request"||y.kind==="queue-process")&&(y.durationMs??0)>0,"spanLike"),l=r;for(let y of l)y.group=y.source==="react"||y.source==="valtio"||y.source==="client-runtime"||y.source==="visual"?"browser":"server";let d=new Map;for(let y of l)if((y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&y.project){let w=d.get(y.requestId)??[];w.push({project:y.project,start:y.start,end:y.start+(y.durationMs??0)}),d.set(y.requestId,w)}let c=o((y,w)=>{let C=d.get(y);if(C?.length)return C.every(x=>x.project===C[0].project)?C[0].project:C.filter(x=>x.start<=w+1&&x.end>=w-1).sort((x,j)=>j.start-x.start)[0]?.project},"projectOf");for(let y of l)if(!y.project&&y.source==="nestjs"&&y.requestId){let w=c(y.requestId,y.start);w&&(y.project=w)}for(let y of l){let w,C=y.requestId;for(let x of l){if(x===y||!a(x)||x.group!==y.group||x.requestId!==C)continue;let j=x.project,U=y.project;if(x.kind!=="gateway-request"&&y.kind!=="gateway-request"&&j!==void 0&&U!==void 0&&j!==U)continue;let K=x.durationMs??0,H=y.durationMs??0,T=Math.abs(x.start-y.start)<=w1,N=Nt(x),q=Nt(y),Y=x.start<=y.start;if(!(x.start+K>y.start&&(Y||T&&N<q)&&(!T||(N!==q?N<q:Y&&K>H))))continue;let le=w?Nt(w):-1,re=w?Math.abs(x.start-w.start)<=w1:!1;(!w||!re&&x.start>w.start||re&&N>le||re&&N===le&&(x.durationMs??0)<(w.durationMs??0))&&(w=x)}w&&(y.parent=w.id)}let m=new Map;for(let y of l){if(!y.requestId)continue;let w=m.get(y.requestId);w?w.push(y):m.set(y.requestId,[y])}let f=new Map(l.map(y=>[y.id,y])),p=o((y,w)=>{let C=(m.get(y)??[]).filter(x=>a(x)&&x.start<=w&&x.start+(x.durationMs??0)>=w);if(C.length!==0)return C.sort((x,j)=>j.start-x.start||(x.durationMs??0)-(j.durationMs??0)),C[0]},"callerNodeFor");for(let y of l){if(!y.parentRequestId||y.kind!=="server-request"&&y.kind!=="gateway-request")continue;let w=y.parent?f.get(y.parent):void 0;if(w&&w.requestId===y.requestId)continue;let C=p(y.parentRequestId,y.start);C&&C!==y&&C.start<=y.start&&(y.parent=C.id)}let g=l,v=new Map;for(let y of g)y.kind==="gateway-request"&&y.requestId&&!v.has(y.requestId)&&v.set(y.requestId,y);for(let y of g)if(y.group==="server"&&!y.parent&&y.requestId&&y.kind!=="gateway-request"){let w=v.get(y.requestId);w&&w!==y&&w.start<=y.start&&(y.parent=w.id)}let E=new Set,D=new Set,B=[];for(let y of g){if(y.kind!=="gateway-request")continue;if(!y.requestId){B.push(y);continue}let w=m.get(y.requestId)??[];if(w.filter(j=>j.kind==="gateway-request").sort((j,U)=>j.start-U.start)[0]!==y)continue;let C=w.find(j=>j.kind==="fetch-start"),x=w.find(j=>j.kind==="fetch-done"||j.kind==="fetch-error");if(!C&&!x){B.push(y);continue}C&&(y.fetchStartId=C.id,E.add(C.id)),x&&(y.fetchDoneId=x.id,D.add(x.id))}let k=new Map;for(let y of g){if(!y.urlKey)continue;let w=k.get(y.urlKey)??{gws:[],starts:[],dones:[]};y.kind==="gateway-request"?B.includes(y)&&w.gws.push(y):y.kind==="fetch-start"?E.has(y.id)||w.starts.push(y):(y.kind==="fetch-done"||y.kind==="fetch-error")&&(D.has(y.id)||w.dones.push(y)),k.set(y.urlKey,w)}for(let{gws:y,starts:w,dones:C}of k.values()){y.sort((j,U)=>j.start-U.start),w.sort((j,U)=>j.start-U.start);let x=new Set;y.forEach((j,U)=>{let K=w[U];K&&(j.fetchStartId=K.id);let H=K?K.t:j.start,T,N=1/0;for(let q of C){if(x.has(q.id))continue;let Y=q.fetchStartedAt??q.start-(q.durationMs??0),le=Math.abs(Y-H);le<N&&(N=le,T=q)}T&&(j.fetchDoneId=T.id,x.add(T.id))})}let _=new Map,F=new Map;for(let y of g)!y.queue||!y.jobId||(y.kind==="queue-enqueued"&&_.set(`${y.queue}#${y.jobId}`,y),y.kind==="queue-process"&&F.set(`${y.queue}#${y.jobId}`,y));for(let y of g){if(!y.queue||!y.jobId)continue;let w=`${y.queue}#${y.jobId}`;if(y.kind==="queue-process"&&!y.parent){let C=_.get(w);C&&C!==y&&C.start<=y.start&&(y.parent=C.id)}else if(y.kind==="queue-active"||y.kind==="queue-completed"||y.kind==="queue-failed"){let C=F.get(w);C&&C!==y&&C.start<=y.start&&(y.parent=C.id)}}let I=l;{let y=new Map;for(let C of I)C.kind==="fetch-start"&&y.set(C.id,C);let w=new Map;for(let C of I){if(C.kind!=="fetch-done"&&C.kind!=="fetch-error")continue;let x=[...y.values()].find(K=>K.requestId&&K.requestId===C.requestId)?.id,j=x?y.get(x):void 0;if(!j)continue;let U=C.fetchStartedAt??j.start;j.title=C.title,j.severity=C.severity,j.durationMs=C.durationMs??Math.max(0,C.t-U),j.kind="fetch",C.detail&&!j.detail&&(j.detail=C.detail),w.set(C.id,j.id)}if(w.size>0){I=I.filter(C=>!w.has(C.id));for(let C of I)for(C.fetchDoneId&&w.has(C.fetchDoneId)&&(C.fetchDoneId=w.get(C.fetchDoneId));C.parent&&w.has(C.parent);)C.parent=w.get(C.parent)}}let z=o(y=>!!y.commitId&&(y.kind==="render"||y.kind==="effect-run"||y.kind==="render-commit-truncated"),"commitMember"),Z=o(y=>[...new Set(y)],"uniq"),J=o(y=>Z(y.map(w=>w.component).filter(w=>!!w)),"named"),se=o(y=>y.length<=2?y.join(" + "):`${y[0]} + ${y.length-1} more`,"nameList"),ue=o(y=>{let w=new Map;for(let C of y)C.component&&w.set(C.component,(w.get(C.component)??0)+1);return[...w].map(([C,x])=>x>1?`${C} \xD7${x}`:C).join(", ")},"tally"),Ce=o(y=>{if(!y)return"effect";let w=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(y);return w?`${w[1]}:${w[2]}`:y},"shortHook"),Wi=o(y=>`${Ce(y.hook)}${y.cleanup?" (cleanup)":""}`,"hookLabel"),p4=o(y=>{let w=Math.min(...y.map(x=>x.start)),C=Math.max(...y.map(x=>x.start+(x.durationMs??0)));return{start:w,durationMs:C-w}},"extent"),f4=o(y=>(delete y.component,delete y.why,delete y.phase,delete y.hook,delete y.cleanup,delete y.renderTotal,delete y.renderPublished,y),"asGroup");function g4(y){let w=y[0],C=y.filter(ie=>ie.kind==="render"),x=y.filter(ie=>ie.kind==="effect-run"),j=y.find(ie=>ie.kind==="render-commit-truncated"),U=[...C].sort((ie,Xt)=>(Xt.durationMs??0)-(ie.durationMs??0)),K=U.filter(ie=>(ie.why??[]).some(Xt=>Xt!=="parent-render")),H=Z(K.flatMap(ie=>(ie.why??[]).filter(Xt=>Xt!=="parent-render"))),T=J(K),N=C.filter(ie=>ie.phase==="mount"),q=C.filter(ie=>ie.phase!=="mount"&&!K.includes(ie)),Y=U[0]?.component??"view",le=C.length>0&&N.length===C.length,re=H.length?H.join(" + "):void 0,Xe=le?"mount":"update",Ye=T.length?`view update \xB7 ${se(T)} \u2190 ${re}`:le?`view mount \xB7 ${Y}`:`view update \xB7 ${Y}`,D4=j?.renderTotal??C.length,Y6=[N.length?`mounted ${ue(N)}`:"",q.length?`re-rendered ${ue(q)}`:"",!T.length&&!le&&C.length?"trigger not recorded \u2014 every captured render came from its parent":"",j?`${D4} renders, ${j.renderPublished??C.length} recorded (per-commit cap)`:`${C.length} render${C.length===1?"":"s"}`,x.length?`${x.length} effect${x.length===1?"":"s"}: ${x.map(Wi).join(", ")}`:""].filter(Boolean).join(" \xB7 "),b4=J(C);return f4({...w,...p4(y),kind:"view-update",title:Ye,detail:Y6,commitId:w.commitId,viewPhase:Xe,...re?{cause:re}:{},causeComponents:T,components:b4,mounted:J(N),renderCount:D4,recordedRenders:C.length,effects:x.length,effectHooks:x.map(Wi),memberIds:y.map(ie=>ie.id),sig:`commit:${Xe}:${re??"-"}:${T.join(",")}:${b4.slice().sort().join(",")}`,severity:y.some(ie=>ie.severity==="error")?"error":w.severity})}s(g4,"Nw"),o(g4,"viewUpdateNode");function h4(y){let w=y[0],C=y.map(Wi);return f4({...w,...p4(y),kind:"commit-effects",title:y.length===1?`effect \xB7 ${C[0]}`:`effects \xB7 ${C[0]} + ${y.length-1} more`,detail:C.join(", "),commitId:w.commitId,effects:y.length,effectHooks:C,memberIds:y.map(x=>x.id),sig:`effects:${C.slice().sort().join(",")}`})}s(h4,"Dw"),o(h4,"effectsNode");let X6=o(y=>Z(y.map(w=>w==="state-update"?"state update":w==="fetch-start"?"request":w==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function v4(y,w){let C=y[0],x=y[y.length-1],j=y.length,U=C.detail,K=Math.min(...y.map(q=>q.start)),H=Math.max(...y.map(q=>q.start+(q.durationMs??0))),T=Math.round(y.reduce((q,Y)=>q+(Y.durationMs??0),0)/j*10)/10,N=Math.round((H-K)*10)/10;C.count=j,C.avgMs=T,C.wallMs=N,C.durationMs=H-K,C.items=y.slice(0,12).map(q=>({start:q.start-K,...q.durationMs!=null?{durationMs:q.durationMs}:{}})),C.memberIds=y.flatMap(q=>q.memberIds??[q.id]),C.title=`\xD7${j} ${C.title}`,y.some(q=>q.severity==="error")&&(C.severity="error"),C.kind==="view-update"?C.detail=[`${j} commits, ${w.length?`one per ${X6(w)}`:"back to back"}`,`avg ${T}ms \xB7 wall ${N}ms`,U??""].filter(Boolean).join(" \xB7 "):C.kind==="state-update"&&U&&x.detail?C.detail=`${j} updates in a row \xB7 wall ${N}ms \xB7 first ${U} \xB7 last ${x.detail}`:C.detail=[`${j} in a row \xB7 wall ${N}ms`,U??""].filter(Boolean).join(" \xB7 ")}s(v4,"Cw"),o(v4,"collapseRepeat");let br=[],Br=new Map,y4=new Set;for(let y=0;y<I.length;y++){if(y4.has(y))continue;let w=I[y];if(!z(w)){br.push(w);continue}let C=[y];for(let U=y+1;U<I.length;U++){let K=I[U];if(K.group==="browser"){if(!z(K)||K.commitId!==w.commitId)break;C.push(U)}}for(let U of C)y4.add(U);let x=C.map(U=>I[U]),j=x.some(U=>U.kind!=="effect-run")?g4(x):h4(x);for(let U of x)U.id!==j.id&&Br.set(U.id,j.id);br.push(j)}if(Br.size>0||br.some(y=>y.kind==="view-update"||y.kind==="commit-effects")){I=br;for(let y of I)for(;y.parent&&Br.has(y.parent);)y.parent=Br.get(y.parent)}{let y=new Map;for(let w of I)w.kind==="view-update"&&w.commitId&&!y.has(w.commitId)&&y.set(w.commitId,w);for(let w of I){if(w.kind!=="commit-effects"||w.parent||!w.commitId)continue;let C=y.get(w.commitId);C&&C.start<=w.start&&(w.parent=C.id)}}{let y=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),w=I.map((T,N)=>T.group==="browser"?N:-1).filter(T=>T>=0),C=o(T=>`${T.kind}|${T.sig??T.title}`,"keyOf"),x=w.map(T=>C(I[T])),j=o((T,N,q)=>{for(let Y=0;Y<q;Y++)if(x[T+Y]!==x[N+Y])return!1;return!0},"sameBlock"),U=o(T=>x[T].split("|")[0],"kindAt"),K=o(T=>{let N=0,q=1;for(let Y=1;Y<=4&&T+Y<=x.length;Y++){let le=1;for(;T+(le+1)*Y<=x.length&&j(T,T+le*Y,Y);)le+=1;le>=3&&Y*le>N*q&&(N=Y,q=le)}return{k:N,r:q}},"bestBlockAt"),H=new Map;for(let T=0;T<x.length;){let{k:N,r:q}=K(T);if(N===0){T+=1;continue}let Y=[...Array(N).keys()].find(re=>y.has(U(T+re)));if(Y!==void 0&&Y>0){let re=K(T+Y);if(re.k===N&&re.r>=3&&re.r>=q-1){T+=Y;continue}}let le=x.slice(T,T+N).map(re=>re.split("|")[0]).filter(re=>y.has(re));for(let re=0;re<N;re++){let Xe=[];for(let Ye=0;Ye<q;Ye++)Xe.push(I[w[T+re+Ye*N]]);v4(Xe,le);for(let Ye of Xe.slice(1))H.set(Ye.id,Xe[0].id)}T+=N*q}if(H.size>0){I=I.filter(T=>!H.has(T.id));for(let T of I)for(;T.parent&&H.has(T.parent);)T.parent=H.get(T.parent)}}{let y=new Map(I.map(w=>[w.id,w]));for(let w of I){let C=new Set([w.id]),x=w;for(;x?.parent;){if(C.has(x.parent)){x.parent=void 0;break}C.add(x.parent),x=y.get(x.parent)}}}let E4=o(y=>{let w=new Map;for(let x of I){if(!x.sig||a(x)!==y||x.kind==="server-request"||x.kind==="gateway-request"||x.group==="browser")continue;let j=`${x.parent??"root"}|${x.kind}|${x.sig}`,U=w.get(j);U?U.push(x):w.set(j,[x])}let C=new Map;for(let x of w.values()){if(x.length<3)continue;x.sort((N,q)=>N.start-q.start);let j=x[0],U=!1;for(let N=0;N+1<x.length;N++)if(x[N+1].start<x[N].start+(x[N].durationMs??0)){U=!0;break}let K=j.start,H=Math.max(...x.map(N=>N.start+(N.durationMs??0))),T=x.reduce((N,q)=>N+(q.durationMs??0),0);j.count=x.length,j.parallel=U,j.avgMs=Math.round(T/x.length*10)/10,j.wallMs=H-K,j.durationMs=H-K,j.title=`\xD7${x.length} ${j.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,j.detail=`${j.sig} \xD7${x.length} ${U?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${j.avgMs}ms \xB7 wall ${j.wallMs}ms`,j.items=x.slice(0,12).map(N=>({start:N.start-K,...N.durationMs!=null?{durationMs:N.durationMs}:{}})),j.memberIds=x.flatMap(N=>N.memberIds??[N.id]),x.some(N=>N.severity==="error")&&(j.severity="error");for(let N of x.slice(1))C.set(N.id,j.id)}if(C.size!==0){I=I.filter(x=>!C.has(x.id));for(let x of I)for(;x.parent&&C.has(x.parent);)x.parent=C.get(x.parent)}},"aggregatePass");E4(!0),E4(!1);for(let y of I){if(!a(y))continue;let w=y.durationMs??0;if(w<40)continue;let C=I.filter(H=>H.parent===y.id&&(H.durationMs??0)>0).map(H=>[H.start,H.start+(H.durationMs??0)]).sort((H,T)=>H[0]-T[0]),x=0,j=-1,U=-1;for(let[H,T]of C)H>U?(U>j&&(x+=U-j),j=H,U=T):T>U&&(U=T);U>j&&(x+=U-j);let K=Math.max(0,w-x);(K>=50||K/w>=.7&&w>=40)&&(y.selfMs=K,y.detail=`\u26A0 cpu-heavy: ${K}ms self-time of ${w}ms${y.detail?" \xB7 "+y.detail:""}`)}return{events:I}}s(tl,"gm"),o(tl,"buildFlowDetail");var x1={phaseGapMs:1500,burstGapMs:250,attachWindowMs:400,maxSegmentEvents:400,occurrenceSlackMs:10},T5=new Set(["subscription-added","subscription-removed","hook-run","store-created","singleton-instance","visual-frame"]),N5=new Set(["react","valtio","client-runtime","chrome","visual"]),Yu=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),ae=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),dt=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"num");function $1(e){let t=Yu(e.raw)?e.raw:{},r=Yu(t.request)?t.request:{},i=Yu(t.span)?t.span:{},u=e.context??{},n=dt(e.timestamp)??0,a=ae(t.kind)??"",l=dt(r.startedAt)??dt(i.startTime)??dt(t.startedAt),d=dt(r.endedAt)??dt(i.endTime)??(l!==void 0&&dt(t.durationMs)!==void 0?l+t.durationMs:void 0),c=Math.min(n,l??n),m=Math.max(n,d??n),f=Yu(t.render)?t.render:{},p=Yu(t.update)?t.update:{},g=a==="render"?ae(f.componentName):a==="state-update"?ae(p.path)?.split(".").slice(0,2).join("."):void 0,v=ae(t.queue),E=ae(t.jobId),D=String(e.source),B=ae(t.project)??ae(u.projectName);return{event:e,id:e.id,ts:n,from:c,to:m,kind:a,source:D,...ae(u.requestId)?{requestId:ae(u.requestId)}:{},...ae(u.parentRequestId)?{parentRequestId:ae(u.parentRequestId)}:{},...v&&E?{queueKey:`${v}#${E}`}:{},browser:N5.has(D)||D==="memory"&&B===void 0,bookkeeping:T5.has(a),...B?{project:B}:{},...g?{subject:g}:{},...a==="fetch-start"||a==="fetch-done"?{route:ul(ae(t.url)),method:ae(t.method)}:a==="server-request"?{route:ae(r.route),method:ae(r.method)}:a==="gateway-request"?{route:ul(ae(t.url)),method:ae(t.method)}:{}}}s($1,"PI"),o($1,"readItem");function ul(e){if(!e)return;let t=e.search(/[?#]/),r=t===-1?e:e.slice(0,t),i=/^[a-z][a-z0-9+.-]*:\/\/[^/]*(\/.*)?$/i.exec(r);return i?i[1]??"/":r}s(ul,"xx"),o(ul,"pathOnly");var P5=o(e=>e.split(".")[0],"rootOf"),k1=o((e,t)=>e.reduce((r,i)=>Math.min(r,t(i)),1/0),"minOf"),A1=o((e,t)=>e.reduce((r,i)=>Math.max(r,t(i)),-1/0),"maxOf"),rl=o((e,t)=>e.ts-t.ts||(e.id<t.id?-1:e.id>t.id?1:0),"compare"),nl=o(e=>e.requestId&&!e.requestId.startsWith("job:")?P5(e.requestId):void 0,"directFamilyOf");function _1(e){if(e.requestId?.startsWith("job:"))return e.requestId.slice(4);if(e.queueKey&&e.kind!=="queue-enqueued"&&!e.requestId)return e.queueKey}s(_1,"DI"),o(_1,"jobKeyOf");function I1(e,t){let r=e.filter(n=>!n.parentRequestId&&(n.kind==="server-request"||n.kind==="gateway-request"||n.kind==="fetch-start"||n.kind==="fetch-done")).sort((n,a)=>n.from-a.from||rl(n,a));if(r.length<2)return[e];let i=[];for(let n of r){let a=i[i.length-1];a&&n.from<=a.to+t?a.to=Math.max(a.to,n.to):i.push({from:n.from,to:n.to})}if(i.length<2)return[e];let u=i.map(()=>[]);for(let n of e){let a=i.findIndex(l=>n.ts>=l.from-t&&n.ts<=l.to+t);if(a===-1){a=0;for(let l=0;l<i.length;l+=1)i[l].from<=n.ts&&(a=l)}u[a].push(n)}return u.filter(n=>n.length>0)}s(I1,"MI"),o(I1,"occurrencesOf");var S1={debug:0,info:1,warning:2,error:3,fatal:4};function il(e,t){let r=[],i=[];for(let u of e){let n=i[i.length-1];n&&u.ts-n.ts>=t&&(r.push(i),i=[]),i.push(u)}return i.length&&r.push(i),r}s(il,"wx"),o(il,"runs");function F1(e,t={}){let r={...x1};for(let[D,B]of Object.entries(t))typeof B=="number"&&Number.isFinite(B)&&(r[D]=B);let i=new Set,u=[];for(let D of e)i.has(D.id)||(i.add(D.id),u.push($1(D)));u.sort(rl);let n=ae(u[0]?.event.context?.flowId)??ae(u[0]?.event.raw?.flowId)??"",a=new Map;for(let D of u)D.kind==="queue-enqueued"&&D.queueKey&&D.requestId&&!D.requestId.startsWith("job:")&&!a.has(D.queueKey)&&a.set(D.queueKey,D);let l=new Map,d=new Map,c=[];for(let D of u){let B=_1(D),k=nl(D);if(B!==void 0){let _=d.get(B);_?_.push(D):d.set(B,[D])}else if(k!==void 0){let _=l.get(k);_?_.push(D):l.set(k,[D])}else c.push(D)}let m=[],f=new Map;for(let[D,B]of l)I1(B,r.occurrenceSlackMs).forEach((k,_)=>{let F={id:`${n}~r:${D}${_===0?"":`@${_+1}`}`,kind:"request",items:k,requestId:D};m.push(F);for(let I of k)f.set(I,F)});for(let[D,B]of d){let k=a.get(D),_=k?f.get(k):void 0;_?_.items.push(...B):m.push({id:`${n}~r:job:${D}`,kind:"request",items:B,requestId:`job:${D}`})}let p=u.filter(D=>D.kind==="fetch-done"&&nl(D)!==void 0),g=new Map;for(let D of m)D.requestId&&g.set(D.requestId,[...g.get(D.requestId)??[],D]);let v=o((D,B)=>{let k=g.get(D);if(k)return k.find(_=>_.items.some(F=>F.kind==="fetch-done"&&F.ts===B))??k[k.length-1]},"owningUnit"),E=c.filter(D=>D.browser);for(let D of il(E,r.burstGapMs)){let B=D[0].ts,k=p.filter(I=>I.ts<=B&&B-I.ts<=r.attachWindowMs),_=[...new Set(k.map(I=>nl(I)))];if(_.length===1){let I=v(_[0],k[k.length-1].ts);if(I){I.items.push(...D);continue}}let F=D.some(I=>I.kind==="flow-origin");m.push({id:`${n}~${F?"o":"u"}:${D[0].id}`,kind:F?"origin":"ui",items:D,..._.length>1?{after:_.sort()}:{}})}for(let D of il(c.filter(B=>!B.browser),r.phaseGapMs))m.push({id:`${n}~a:${D[0].id}`,kind:"ambient",items:D});return z1(n,u.length,m,r)}s(F1,"Sx"),o(F1,"segmentFlow");function z1(e,t,r,i){for(let p of r)p.items.sort(rl);let u=r.map(p=>({unit:p,from:k1(p.items,g=>g.from),to:A1(p.items,g=>g.to)}));u.sort((p,g)=>p.from-g.from||(p.unit.id<g.unit.id?-1:1));let n=new Map,a=0,l=-1/0;for(let p of u)(a===0||p.from-l>=i.phaseGapMs)&&(a+=1),l=Math.max(l,p.to),n.set(p.unit,a);let d=[];for(let p of u){let g=j1(p.unit.items,i.maxSegmentEvents);g.forEach((v,E)=>{d.push(R1(e,p.unit,v,n.get(p.unit),g.length>1?{index:E+1,total:g.length}:void 0))})}let c={};for(let p of d)for(let g of p.eventIds)c[g]=p.id;let m=[];for(let p of d){let g=m[p.phase-1];g||(g={index:p.phase,start:p.start,end:p.end,segmentIds:[]},m[p.phase-1]=g),g.start=Math.min(g.start,p.start),g.end=Math.max(g.end,p.end),g.segmentIds.push(p.id)}let f=d.reduce((p,g)=>p+g.counts.signal,0);return{flowId:e,segments:d,phases:m.filter(Boolean),assignment:c,stats:{events:t,signal:f,bookkeeping:t-f,segments:d.length,phases:m.filter(Boolean).length,largestSegment:d.reduce((p,g)=>Math.max(p,g.counts.total),0)}}}s(z1,"CI"),o(z1,"assemble");function j1(e,t){if(e.filter(n=>!n.bookkeeping).length<=t)return[e];let r=[],i=[],u=0;for(let n of e)!n.bookkeeping&&u===t&&(r.push(i),i=[],u=0),i.push(n),n.bookkeeping||(u+=1);return i.length&&r.push(i),r}s(j1,"UI"),o(j1,"chunk");function R1(e,t,r,i,u){let n={total:r.length,signal:0,bookkeeping:0,errors:0,warnings:0},a=new Set,l="debug";for(let g of r){g.bookkeeping?n.bookkeeping+=1:n.signal+=1;let v=String(g.event.severity);v==="error"||v==="fatal"?n.errors+=1:v==="warning"&&(n.warnings+=1),(S1[v]??1)>(S1[l]??0)&&(l=v),g.project&&a.add(g.project)}let d=t.kind==="ui"||t.kind==="origin"?T1(r):[],c=k1(r,g=>g.from),m=A1(r,g=>g.to),f=O1(t.items),p=t.id;return{id:u&&u.index>1?`${p}#${u.index}`:p,flowId:e,kind:t.kind,label:N1(t,r,f,u,d),phase:i,start:c,end:m,durationMs:m-c,eventIds:r.map(g=>g.id),counts:n,projects:[...a].sort(),...f.route?{route:f.route}:{},...f.method?{method:f.method}:{},...t.requestId?{requestId:t.requestId}:{},...t.after?{after:t.after}:{},...d.length?{hot:d}:{},...u?{part:u}:{},worstSeverity:l}}s(R1,"LI"),o(R1,"toSegment");function O1(e){let t=e.find(r=>r.kind==="fetch-start"&&r.route)??e.find(r=>r.kind==="server-request"&&!r.parentRequestId&&r.route)??e.find(r=>r.kind==="gateway-request"&&r.route)??e.find(r=>r.kind==="fetch-done"&&r.route);return{...t?.route?{route:t.route}:{},...t?.method?{method:t.method.toUpperCase()}:{}}}s(O1,"FI"),o(O1,"routeOf");function T1(e){let t=new Map;for(let r of e)r.subject&&!r.bookkeeping&&t.set(r.subject,(t.get(r.subject)??0)+1);return[...t.entries()].sort((r,i)=>i[1]-r[1]||(r[0]<i[0]?-1:1)).slice(0,3).map(([r,i])=>i>1?`${r} \xD7${i}`:r)}s(T1,"ZI"),o(T1,"hotOf");function N1(e,t,r,i,u){let n=i?` (part ${i.index}/${i.total})`:"";if(e.kind==="request"){if(r.route)return`${r.method?`${r.method} `:""}${r.route}${n}`;let a=t.find(l=>l.queueKey);return a?`job ${a.queueKey}${n}`:`request ${e.requestId??""}${n}`}return e.kind==="origin"?`${t.find(a=>a.kind==="flow-origin")?.event.title||"start"}${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:e.kind==="ui"?`UI update${u.length?` \xB7 ${u.join(", ")}`:""}${n}`:`background${n}`}s(N1,"BI"),o(N1,"labelOf");var P1=["user-action","page-load","navigation","api","ai","background","test","system","other"],Gn=new Map;function Pt(e,t){let r=Gn.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),Gn.size>500&&Gn.clear(),Gn.set(e,r)),r.test(t)}s(Pt,"vn"),o(Pt,"globMatch");var U5=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function U1(e,t){return t.some(r=>r.route?U5(e)?Pt(e,`${r.method??"GET"} ${r.route}`):Pt(e,r.route):!1)}s(U1,"qI"),o(U1,"routeMatches");function sl(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!Pt(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&Pt(e.origin,t.origin.nodeId))||e.route!==void 0&&!U1(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(i=>Pt(e.project,i))))}s(sl,"Rx"),o(sl,"ruleMatches");var al=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),qe=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),Wn=o(e=>al(e.raw)?qe(e.raw.kind)??"":"","kindOf");function M1(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>Wn(l)==="flow-origin"),i=r??t.find(l=>qe(l.context?.originType));if(!i)return{};let u=al(i.raw)?i.raw:{},n=qe(i.context?.originType)??(r?qe(i.title):void 0),a=qe(u.originNodeId)??qe(i.context?.originNodeId);return{...n?{type:n}:{},...a?{nodeId:a}:{}}}s(M1,"GI"),o(M1,"originOf");var M5=/^(verify|e2e|test|smoke|load)[-_:]/i,Z5=o((e,t)=>M5.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),Z1={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},L5=new Set(["page-load","user-action","navigation"]),q5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Kn(e){return e.replace(/[?#].*$/,"").split("/").map(t=>q5.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(Kn,"bm"),o(Kn,"templatePath");function L1(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(L1,"HI"),o(L1,"componentOf");function q1(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(q1,"YI"),o(q1,"scriptFamily");function V1(e,t,r,i){let u=t.nodeId,n=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(n)return`${n[1]}:${Kn(n[2])}`;if(t.type&&Z1[t.type]==="user-action"&&u)return L1(u);if(e==="test")return q1(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${Kn(a.route)}`;let l=i.find(d=>Wn(d)==="ai-call");return l&&al(l.raw)?`ai \xB7 ${qe(l.raw.model)??qe(l.raw.provider)??"call"}`:u?Kn(u):void 0}s(V1,"QI"),o(V1,"subjectOf");var V5=10,J5=1e3,G5=3,W5=500,K5=1e3;function J1(e,t){let r=new Set,i=t.segments.filter(n=>n.kind==="request");t.segments.some(n=>n.counts.errors>0)&&r.add("has-error"),i.some(n=>n.durationMs>=J5)&&r.add("slow"),i.length>=V5&&r.add("fan-out"),new Set(t.segments.flatMap(n=>n.projects)).size>=3&&r.add("multi-service"),e.some(n=>Wn(n)==="queue-enqueued")&&r.add("queue"),e.some(n=>Wn(n)==="ai-call"||n.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=W5&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=K5&&r.add("large");let u=new Map;for(let n of i)(!n.part||n.part.index===1)&&u.set(n.label,(u.get(n.label)??0)+1);return[...u.values()].some(n=>n>=G5)&&r.add("repeated-requests"),[...r].sort()}s(J1,"iR"),o(J1,"tagsOf");function G1(e,t,r=[]){let i=M1(e),u={flowId:t.flowId,origin:i,segments:t.segments},n=J1(e,t),a=o((m,f,p)=>{let g=V1(m,i,t,e);return{category:m,decidedBy:f,...p!==void 0?{ruleIndex:p}:{},tags:n,origin:i,...g?{subject:g}:{}}},"done"),l=r.findIndex(m=>m.category&&sl(m,u));if(l!==-1)return a(r[l].category,"rule",l);if(Z5(t.flowId,i.nodeId))return a("test","test");let d=i.type?Z1[i.type]:void 0;if(d)return a(d,"origin");if(n.includes("ai"))return a("ai","shape");let c=t.segments.filter(m=>m.kind==="request");return c.length>0?a(c.every(m=>m.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(m=>m.kind==="ambient")?a("system","shape"):a("other","shape")}s(G1,"Ex"),o(G1,"classifyFlow");function W1(e,t,r=[]){let i=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&sl(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return i?i.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&L5.has(t.category)?t.category:"ui"}s(W1,"Ax"),o(W1,"categoryOfSegment");function K1(e){return H1(e).map(t=>{let r=new Map;for(let u of t.items){let n=r.get(u.subject);n?n.push(u):r.set(u.subject,[u])}let i=[...r.entries()].sort((u,n)=>(u[0]===void 0?1:0)-(n[0]===void 0?1:0)||n[1].length-u[1].length||String(u[0]).localeCompare(String(n[0]))).map(([u,n])=>({subject:u,count:n.length,items:n}));return{...t,subjects:i}})}s(K1,"zx"),o(K1,"groupFlows");function H1(e){let t=new Map;for(let i of e){let u=t.get(i.category);u?u.push(i):t.set(i.category,[i])}let r=o(i=>{let u=P1.indexOf(i);return u===-1?P1.length:u},"rank");return[...t.entries()].sort((i,u)=>r(i[0])-r(u[0])||(i[0]<u[0]?-1:i[0]>u[0]?1:0)).map(([i,u])=>({category:i,count:u.length,items:u}))}s(H1,"sR"),o(H1,"groupByCategory");var Ut={categories:[],segments:{},problems:[]},ol=200,X1=200,Y1=64,H5=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,X5=["category","flowId","originType","origin","route","project"],Y5={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},ll=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function Q1(e,t){if(!ll(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))X5.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let i=e.category;if(typeof i!="string"||i.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=i.trim();if(u.length>Y1||!H5.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${Y1}) \u2014 rule dropped`]};let n={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>X1)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${X1} characters \u2014 rule dropped`]};n[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:n,problems:r}}s(Q1,"lR"),o(Q1,"parseRule");function ev(e){if(e==null)return Ut;if(!ll(e))return{...Ut,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],i=e.categories;i!==void 0&&(Array.isArray(i)?(i.length>ol&&t.push(`flows.categories has ${i.length} rules; only the first ${ol} are used`),i.slice(0,ol).forEach((a,l)=>{let d=Q1(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},n=e.segments;if(n!==void 0)if(!ll(n))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(n)){let d=Y5[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${x1[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s(ev,"Px"),o(ev,"parseFlowsConfig");function tv(e,t=Ut){let r=F1(e,t.segments),i=G1(e,r,t.categories),u={};for(let n of r.segments)u[n.id]=W1(n,i,t.categories);return{segmentation:r,classification:i,segmentCategories:u}}s(tv,"Nx"),o(tv,"analyzeFlow");function dl(e,t={}){let r=t.threshold??5,i=[];for(let u of e){let n=u.raw??null;if(n?.kind!=="loop"||!n.loop)continue;let a=n.loop.dbCallsInsideLoop??0;a>r&&i.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${n.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:n.loop.iterations,durationMs:n.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return i}s(dl,"as"),o(dl,"detectDbInLoop");function uv(e,t={}){let r=t.threshold??3,i=new Map;for(let n of e){let a=n.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=i.get(l);d||(d=[],i.set(l,d)),d.push(n)}let u=[];for(let[n,a]of i)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:n,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(uv,"Dx"),o(uv,"detectNPlusOne");function rv(e,t={}){let r=t.threshold??5,i=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,c=u.get(d);c||(c=[],u.set(d,c)),c.push(a)}let n=[];for(let[a,l]of u){l.sort((c,m)=>c.timestamp-m.timestamp);let d=0;for(let c=0;c<l.length;c++){for(;l[c].timestamp-l[d].timestamp>i;)d++;let m=c-d+1;if(m>r){let f=l.slice(d,c+1),p=f[0].raw.render?.componentName??a;n.push({kind:"render-storm",severity:"warning",title:`${p} rendered ${m}\xD7 in ${i}ms`,evidence:f.map(g=>g.id),details:{componentInstanceId:a,count:m,windowMs:i,threshold:r},detectedAt:f[f.length-1].timestamp});break}}}return n}s(rv,"Mx"),o(rv,"detectRenderStorm");function nv(e,t,r){let i=new Map,u=new Set;function n(l){let d=i.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let c=r(l),m=t.get(l)??[],f;for(let g of m){let v=n(g);(!f||v.totalDurationMs>f.totalDurationMs)&&(f=v)}u.delete(l);let p=f?{path:[l,...f.path],totalDurationMs:c+f.totalDurationMs}:{path:[l],totalDurationMs:c};return i.set(l,p),p}s(n,"i"),o(n,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=n(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(nv,"Cx"),o(nv,"findSlowPath");var iv={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function Ie(e){let t={...iv};if(e)for(let r of Object.keys(iv)){let i=e[r];typeof i=="number"&&Number.isFinite(i)&&i>=0&&(t[r]=i)}return t}s(Ie,"fe"),o(Ie,"resolveThresholds");function sv(e){let t=e.raw??null,r=t?.kind,i=e.context,u={id:e.id,parentTraceNodeId:i.causedByNodeId??i.originNodeId,lifecycle:"completed",context:i,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let n=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:n.render?.componentLogicalId,instanceId:n.render?.componentInstanceId,name:`render ${n.render?.componentName??"?"}`,durationMs:n.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let n=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:n.update?.storeId,name:`${n.update?.storeId??"?"}.${n.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let n=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${n.request?.method??"?"} ${n.request?.route??"?"}`,durationMs:n.request?.durationMs}}}if(r==="db-query"){let n=t,a=[n.op,n.table].filter(Boolean).join(" ")||(n.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:n.table?`db:${n.op??"query"}:${n.table}`:void 0,name:n.error?`${a} (failed)`:a,durationMs:n.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let n=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:n.origin?.nodeId,name:n.origin?.label??e.title}}}}s(sv,"dR"),o(sv,"eventToNode");function av(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),i=[];for(let l of r){let d=sv(l);d&&(e.addNode(d.node),i.push(d))}let u=0,n=o((l,d,c,m)=>{let f={id:`${c}:${l}->${d}`,from:l,to:d,axis:c,type:m,timestamp:e.getNode(d)?.startTime??0};e.addEdge(f),u++},"addEdge");for(let l of i){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&n(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of i){let d=l.node.context.flowId;if(!d)continue;let c=a.get(d);c||(c=[],a.set(d,c)),c.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let c=l[d-1].node,m=l[d].node;m.context.causedByNodeId!==c.id&&n(c.id,m.id,"caused","flow-sequence")}return{nodeCount:i.length,edgeCount:u}}s(av,"Lx"),o(av,"buildGraphFromEvents");var ov=new WeakMap;function Hn(e){let t=ov.get(e);if(t!==void 0)return t;let r=_e(e);return ov.set(e,r),r}s(Hn,"xr"),o(Hn,"estimateEventBytes");function lv(e,t={}){let r=t.rawByteLimit??32768,i=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!el(u,r,i)){let c=_e(u,r,i);return{event:e,truncated:!1,originalBytes:c,keptBytes:c}}let n=_e(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=Tt(u,a,i,""),d=_e(l,Number.POSITIVE_INFINITY,i);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let c={truncated:!0,originalBytes:n,keptBytes:d,paths:a.paths};l[Q0]=c}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:n,keptBytes:d}}s(lv,"hR"),o(lv,"clampEventRaw");function dv(e={}){let t=0,r=0,i=0,u=e.rawByteLimit??32768;return{clamp(n){t+=1;let a=lv(n,e);return a.truncated&&(r+=1,i+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:i,rawByteLimit:u}},reset(){t=0,r=0,i=0}}}s(dv,"Zx"),o(dv,"createEventClamp");var Q5={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},eD=64*1024*1024,tD=32*1024*1024,uD=class{static{s(this,"cs")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??eD,this.artifactCaps={...Q5,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??tD}appendEvent(e){let t=Hn(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let i=_e(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,i),this.artifactOrder.push(e.id),this.residentArtifactBytes+=i;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},rD=class{static{s(this,"us")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??Oe(),this.storage=e.storage??new uD,this.clamp=e.clamp===!1?void 0:dv(e.clamp??{}),this.redactor=e.redact===!1?void 0:S4(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new ty({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((i,u)=>u(i),r),"transform")}:{}}),this.graph=new F4,this.resources=new gy,this.reducers=new hy,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as Qu,ProviderScope as er}from"@frontmcp/sdk";var cl;function cv(e){cl=e}s(cv,"Bx"),o(cv,"setActiveSession");function Mt(){if(!cl)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return cl}s(Mt,"xn"),o(Mt,"requireSession");var nD=Qu({provide:Ot,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:er.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Mt(),"useFactory")}),iD=Qu({provide:Ku,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:er.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Mt().bus,"useFactory")}),sD=Qu({provide:k5,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:er.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Mt().graph,"useFactory")}),aD=Qu({provide:R,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:er.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Mt().resources,"useFactory")}),oD=Qu({provide:A5,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:er.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Mt().storage,"useFactory")}),lD=[nD,iD,sD,aD,oD];function mv(e={}){let t=new rD(e);return t.start(),cv(t),{session:t,providers:lD}}s(mv,"qx"),o(mv,"bootstrapLensmcp");var D7=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),b7=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
66
- `);import{createSocket as dD}from"node:dgram";import{closeSync as cD,existsSync as pv,openSync as mD,readSync as pD,statSync as fv}from"node:fs";import{createServer as fD}from"node:net";import{existsSync as gv,unlinkSync as hv}from"node:fs";var gD=1024*1024;function vv(e){let t=e.onError??(()=>{});try{gv(e.path)&&hv(e.path)}catch{}let r=new Set,i=e.maxFrameBytes??gD,u=fD(n=>{r.add(n);let a="";n.setEncoding("utf8"),n.on("data",l=>{a+=l;let d;for(;(d=a.indexOf(`
67
- `))!==-1;){let c=a.slice(0,d);a=a.slice(d+1),c&&e.onMessage(c)}a.length>i&&(t(new Error(`uds: frame exceeded ${i} bytes without a newline \u2014 connection dropped`)),a="",n.destroy())}),n.on("error",l=>t(l)),n.on("close",()=>r.delete(n))});return u.on("error",n=>t(n)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(n=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{gv(e.path)&&hv(e.path)}catch{}n()})}catch{n()}}),"close")}}s(vv,"Sm"),o(vv,"createUdsServer");function yv(e){let t=e.eventFile??process.env.LENSMCP_EVENT_FILE,r=e.socketPath??process.env.LENSMCP_IPC_SOCKET,i=e.udsPath??process.env.LENSMCP_UDS,u=e.onError??(()=>{}),n=0,a=o(p=>{let g=p.trim();if(!g)return;let v;try{v=JSON.parse(g)}catch{return}if(!(!v||typeof v!="object"||!("id"in v)||!("source"in v)))try{e.sessionId&&v.sessionId==="pending"&&(v.sessionId=e.sessionId,v.context&&v.context.sessionId==="pending"&&(v.context.sessionId=e.sessionId)),e.bus.publish(v),n+=1}catch(E){u(E)}},"publish"),l=[],d=!1,c=!1,m=!1;if(t){d=!0;let p=0,g="",v=!1,E=e.replayBytes??Number(process.env.LENSMCP_REPLAY_BYTES??4*1024*1024);if(pv(t))try{let k=fv(t).size;Number.isFinite(E)&&E>0&&k>0?(p=Math.max(0,k-E),v=p>0):p=k}catch{p=0}let D=Buffer.alloc(64*1024),B=setInterval(o(()=>{if(!pv(t))return;let k;try{k=fv(t).size}catch{return}for(k<p&&(p=0,g="");p<k;){let _;try{_=mD(t,"r")}catch(F){u(F);return}try{let F=Math.min(D.length,k-p),I=pD(_,D,0,F,p);if(I<=0)break;p+=I,g+=D.toString("utf8",0,I);let z;for(;(z=g.indexOf(`
68
- `))!==-1;){let Z=g.slice(0,z);if(g=g.slice(z+1),v){v=!1;continue}a(Z)}}finally{cD(_)}}},"drain"),e.pollMs??50);B.unref?.(),l.push(()=>clearInterval(B))}if(r){let[p,g]=r.split(":"),v=Number(g);if(p&&Number.isFinite(v)){c=!0;let E;try{E=dD("udp4"),E.on("message",D=>a(D.toString("utf8"))),E.on("error",D=>u(D)),E.bind(v,p),E.unref()}catch(D){u(D),c=!1}if(E){let D=E;l.push(()=>new Promise(B=>{try{D.close(()=>B())}catch{B()}}))}}}if(i)try{let p=vv({path:i,onMessage:o(g=>a(g),"onMessage"),onError:u});m=!0,l.push(()=>p.close())}catch(p){u(p)}let f=[];return d&&f.push("file"),c&&f.push("udp"),m&&f.push("uds"),{mode:f.join("+")||"none",count:o(()=>n,"count"),async stop(){for(let p of l)try{await p()}catch{}}}}s(yv,"Im"),o(yv,"startEventIngest");import{existsSync as hD,readFileSync as Ev}from"node:fs";import{dirname as vD,join as yD}from"node:path";function Dv(e=process.cwd()){let t=ml("nx.json",e);if(!t)return Ie();try{let r=JSON.parse(Ev(t,"utf8"));return Ie(r.lensmcp?.thresholds)}catch{return Ie()}}s(Dv,"Rm"),o(Dv,"loadWorkspaceThresholds");function bv(e=process.cwd()){let t=ml("nx.json",e);if(!t)return Ut;try{let r=JSON.parse(Ev(t,"utf8"));return ev(r.lensmcp?.flows)}catch(r){return{...Ut,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(bv,"Tm"),o(bv,"loadWorkspaceFlowsConfig");function ml(e,t){let r=t;for(let i=0;i<8;i++){let u=yD(r,e);if(hD(u))return u;let n=vD(r);if(n===r)break;r=n}}s(ml,"Hx"),o(ml,"findUp");import{App as ED}from"@frontmcp/sdk";import{Resource as DD,ResourceContext as bD}from"@frontmcp/sdk";var BD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),Bv=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),Ve=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),Xn=o(e=>typeof e=="string"?e:void 0,"asString");function ne(e,...t){for(let r of t){let i=Bv(e[r])??Ve(e[r]);if(i!==void 0)return i}}s(ne,"oe"),o(ne,"countOf");var oe=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function Yn(e,t,r,i,u){if(t>0)return{state:"failed",count:t,detail:`${oe(t,`${i} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:oe(r,`${i} warning`)};let n=Xn(e.status);return n==="clean"||n==="passed"?{state:"passed",count:0,detail:`${i} clean`}:{state:"unknown",detail:`${i} has not reported a result yet (status=${n??"absent"})`}}s(Yn,"Em"),o(Yn,"fromStatusField");var Qn=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>Yn(e,ne(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>Yn(e,ne(e,"errorCount","errors")??0,ne(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>{let t=Array.isArray(e.failures)?e.failures.filter(u=>{let n=u?.domain;return n!=="typecheck"&&n!=="lint"}).length:ne(e,"failures","failureCount")??0,r=(Bv(e.failures)??t)-t,i=t===0&&r>0&&Xn(e.status)==="failing"?{...e,status:"clean"}:e;return Yn(i,t,ne(e,"warnings","warningCount")??0,"build","build://failures")},"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=ne(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${oe(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=ne(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${oe(t,"server-side error")} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((ne(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=ne(e,"crashLooping")??0,r=ne(e,"wedged")??0,i=ne(e,"buildFailed")??0,u=ne(e,"typeErrors")??0,n=u>0?`${oe(u,"service")} with type errors no typecheck producer reports`:void 0,a=ne(e,"down")??0,l=Ve(e.restarts)??0,d=Array.isArray(e.services)?e.services.filter(g=>{let v=g??{};return v.buildFailed===!0&&v.state==="up"}).length:0,c=Math.max(0,i-d),m=d>0?`${oe(d,"service")} failing to build while still serving the last good bundle`:void 0,f=[m,n?`${n} (still serving)`:void 0].filter(Boolean);if(t>0||r>0||c>0){let g=[t>0?`${oe(t,"service")} crash-looping`:void 0,r>0?`${oe(r,"service")} wedged`:void 0,c>0?`${oe(c,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+i+u,detail:`${g.join(", ")} \u2014 read process://cluster (requests to them 502)${f.length?`; ${f.join("; ")}`:""}`}}if(m)return{state:"failed",count:i+u,detail:`${m} \u2014 read process://cluster for the error lines${n?`; ${n} (still serving)`:""}`};if(n)return{state:"failed",count:u,detail:`${n} \u2014 read process://cluster for the lines (the bundle built; the services still serve)`};if(a>0)return{state:"warning",count:a,detail:`${oe(a,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let p=ne(e,"up")??0;return{state:"passed",count:0,detail:`${oe(p,"service")} up${l>0?`, ${oe(l,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=ne(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${oe(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=ne(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${oe(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ne(e,"routes")??0,r=Ve(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${oe(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ne(e,"endpoints")??0,r=Ve(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${oe(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=ne(e,"queries")??0,r=Ve(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${oe(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=ne(e,"failingHosts")??0,r=ne(e,"slowHosts")??0,i=Ve(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${oe(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${oe(r,"external host")} over${i?` ${i}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")}],S7=Qn.map(e=>e.resource);async function wv(e,t){let r={kind:t.kind,resource:t.resource},i;try{i=BD(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!i)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=Xn(i.producer),n=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||n?"connected":"none",l=Xn(i.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(i)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let c=i.stale===!0,m=c?`${d.detail} (as of ${Ve(i.ageMs)!==void 0?Cv(Ve(i.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail;return{...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...c?{stale:!0}:{},detail:m,reads:t.reads(d.state)}}s(wv,"ZR"),o(wv,"readSignal");function Cv(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(Cv,"BR"),o(Cv,"describeAge");async function pl(e){return Promise.all(Qn.map(t=>wv(e,t)))}s(pl,"ps"),o(pl,"readSignals");var tr=o(e=>Qn.find(t=>t.resource===e.resource)??Qn.find(t=>t.kind===e.kind),"specFor");function fl(e){return{source:tr(e).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(fl,"Yx"),o(fl,"toItem");function xv(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(n=>{let a=e.filter(l=>l.kind===n);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),i=o(n=>n==="failed"?"failed":n==="passed"||n==="warning"?"passed":"unknown","tri"),u=o(n=>n,"quad");return{typecheck:i(r("typecheck")),lint:i(r("lint")),build:i(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(xv,"VR"),o(xv,"toChecks");function $v(e){let t=e.filter(c=>c.state==="failed"),r=e.filter(c=>c.state==="warning"),i=e.filter(c=>c.state==="passed"),u=t.filter(c=>tr(c).blocking).map(fl),n=[...t.filter(c=>!tr(c).blocking),...r].map(fl),a=u.length>0?"failing":n.length>0?"warning":i.length>0?"clean":"starting",l=[...t.filter(c=>tr(c).blocking).flatMap(c=>c.reads),...t.filter(c=>!tr(c).blocking).flatMap(c=>c.reads),...r.flatMap(c=>c.reads)],d=[...new Set(l)];return d.length===0&&d.push("events://recent"),{status:a,blocking:u,warnings:n,suggestedReads:d,checks:xv(e)}}s($v,"e_"),o($v,"deriveVerdict");function kv(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(kv,"qR"),o(kv,"readServerInfo");async function ei(e){let t=await pl(e.resources),r=$v(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:kv(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(ei,"Et"),o(ei,"aggregateStatus");var gl="agent://current-status",hl=class extends bD{static{s(this,"zm")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(R);try{return await e.read(gl)}catch{}let t=this.get(Ot);return ei({resources:e,sessionId:t.id,revision:e.revision(gl)??0})}};hl=$([DD({name:"agent-current-status",uri:gl,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],hl);var wD=hl;import{Resource as CD,ResourceContext as xD}from"@frontmcp/sdk";var vl=class extends xD{static{s(this,"Om")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(R).read("process://cluster")}};vl=$([CD({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, which fail to build, restart counts, and the error lines services printed (ERROR in, EADDRINUSE, and error TS\u2026 for a project no typecheck producer reports for \u2014 otherwise type errors are in typecheck://errors). Read this when a request 502s or a dev server stopped responding."})],vl);var $D=vl;import{Tool as kD,ToolContext as AD}from"@frontmcp/sdk";var Av=["typecheck","lint","build","runtime","cluster"],_D=[...Av,"all"],ID={typecheck:[{signal:"typecheck://current",resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."}],lint:[{signal:"lint://current",resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."}],build:[{signal:"build://current",resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."}],runtime:[{signal:"runtime://browser/errors",resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},{signal:"runtime://errors",resource:"runtime://errors",keys:["entries"],hint:"Errors a dev service raised while handling a request (a 500 from a curl, an e2e runner or the page) \u2014 route, status, request id and stack. No browser is involved."}],cluster:[{signal:"process://cluster",resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / EADDRINUSE; error TS only for a project no typecheck producer reports for). A wedged or crash-looping service 502s every request routed to it."}]},SD=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function _v(e,t){let r;try{r=SD(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let i of t.keys){let u=r[i];if(Array.isArray(u))return u}return[]}s(_v,"YR"),o(_v,"readItems");async function Iv(e){let t=e.kind==="all"?Av:[e.kind],r=await pl(e.resources),i=new Map(r.map(n=>[n.resource,n])),u=[];for(let n of t)for(let a of ID[n]){let l=i.get(a.signal),d=l?.producer??"none",c=l?.state??"unknown",m=d==="none"?[]:await _v(e.resources,a);u.push({kind:n,resource:a.resource,producer:d,state:c,count:m.length,returned:Math.min(m.length,e.limit),items:m.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((n,a)=>n+a.count,0),unmonitored:[...new Set(u.filter(n=>n.producer==="none").map(n=>n.kind))],groups:u}}s(Iv,"Mm"),o(Iv,"collectErrors");var Sv={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},ct={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, server-side request errors (a dev service's 500: route, status, stack), and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:_D,defaultKind:"all",defaultLimit:25,maxLimit:200},ti={name:"observe.dismiss_errors",description:"Hide runtime errors that are already UNDERSTOOD and are not a problem to fix \u2014 a 401 your own signed-out test browser caused, a failure from a fixture that exists to throw \u2014 so they stop counting in observe.current_status and the Stop hook. Give the entry `ids` from observe.errors (kind `runtime`), or `all: true`, and a `reason`: it is recorded with the dismissal and shown to the person in the dashboard. This HIDES, it does not fix: each error shows again the next time it happens. It cannot dismiss a failing typecheck, lint, build or a broken service \u2014 those are current verdicts and clear only when the code is fixed. Never dismiss an error you have not explained; undo with observe.restore_errors.",maxIds:250,minReasonChars:8},yl={name:"observe.restore_errors",description:"Undo a dismissal, so the errors it hid are listed and counted again. Give the dismissal `ids` from runtime://dismissed (or the id of an entry it hid), or `all: true` for every dismissal in effect \u2014 including ones a person made in the dashboard.",maxIds:250},Fv="agent://current-status",El=class extends AD{static{s(this,"Um")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(R);try{return await e.read(Fv)}catch{}let t=this.get(Ot);return ei({resources:e,sessionId:t.id,revision:e.revision(Fv)??0})}};El=$([kD({name:Sv.name,description:Sv.description,inputSchema:{}})],El);var FD=El;import{Tool as zD,ToolContext as jD,z as zv}from"@frontmcp/sdk";var Dl=class extends jD{static{s(this,"Fm")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(R);return Iv({resources:t,kind:e.kind,limit:e.limit})}};Dl=$([zD({name:ct.name,description:ct.description,inputSchema:{kind:zv.enum(ct.kinds).default(ct.defaultKind).describe("Which failures to return. 'runtime' = browser errors AND a service's own request errors (the 500 case); 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:zv.number().int().positive().max(ct.maxLimit).default(ct.defaultLimit).describe(`Max items per kind (default ${ct.defaultLimit}). \`count\` still reports the true total.`)}})],Dl);var RD=Dl;import{Tool as OD,ToolContext as TD,z as ur}from"@frontmcp/sdk";import{appendFileSync as ND,closeSync as PD,mkdirSync as UD,openSync as MD,renameSync as ZD,statSync as LD,unlinkSync as qD}from"node:fs";import{dirname as VD}from"node:path";function jv(e,t){let{fs:r,maxBytes:i,maxFiles:u}=t,n=`${e}.rotate.lock`,a=t.staleLockMs??3e4,l;for(let d=0;d<2&&l===void 0;d++)try{l=r.openSync(n,"wx")}catch{try{if(Date.now()-r.statSync(n).mtimeMs<=a)return"busy";r.unlinkSync(n)}catch{}}if(l===void 0)return"busy";try{try{if(r.statSync(e).size<=i)return"not-needed"}catch{return"not-needed"}try{r.unlinkSync(`${e}.${u}`)}catch{}for(let d=u-1;d>=1;d--)try{r.renameSync(`${e}.${d}`,`${e}.${d+1}`)}catch{}try{r.renameSync(e,`${e}.1`)}catch{}return"rotated"}finally{try{r.closeSync(l)}catch{}try{r.unlinkSync(n)}catch{}}}s(jv,"n_"),o(jv,"rotateBusFile");var Rv=o((e,t,r,i,u)=>({id:Oe(),sessionId:e,timestamp:t,source:h1,category:"runtime",severity:"info",context:{sessionId:e},fingerprint:r,title:i,raw:u}),"lensEvent");function Ov(e,t){return Rv(t,e.until,`${Xu}:${e.groupId}`,`error dismissed: ${e.title??e.groupId}`,{kind:Xu,groupId:e.groupId,until:e.until,eventIds:e.eventIds,...e.by?{by:e.by}:{},...e.reason?{reason:e.reason}:{},...e.title?{title:e.title}:{}})}s(Ov,"s_"),o(Ov,"dismissalEvent");function Tv(e,t,r){return Rv(t,r,`${Vn}:${e}`,"error restored",{kind:Vn,groupId:e})}s(Tv,"a_"),o(Tv,"restoralEvent");var Nv=o((e,t,r)=>{let i=Number(process.env[e]);return Number.isFinite(i)&&r(i)?i:t},"envNumber");function bl(e,t){t.length!==0&&(UD(VD(e),{recursive:!0}),jv(e,{maxBytes:Nv("LENSMCP_EVENT_MAX_BYTES",50*1024*1024,r=>r>0),maxFiles:Nv("LENSMCP_EVENT_MAX_FILES",5,r=>r>=1&&r<=20),fs:{statSync:LD,renameSync:ZD,unlinkSync:qD,openSync:MD,closeSync:PD}}),ND(e,t.map(r=>JSON.stringify(r)+`
69
- `).join("")))}s(bl,"fs"),o(bl,"appendBusEvents");var JD=["runtime://errors","runtime://browser/errors","runtime://browser/failed-requests"],GD="runtime://dismissed";async function Pv(e,t){let r;try{r=await e.read(t)}catch{return[]}let i=r?.entries;return Array.isArray(i)?i.flatMap(u=>{let n=u;if(!n||typeof n.id!="string"||!n.id)return[];let a=typeof n.title=="string"&&n.title?n.title:typeof n.message=="string"?n.message:n.id;return[{id:n.id,title:a,timestamp:typeof n.timestamp=="number"?n.timestamp:0}]}):[]}s(Pv,"f0"),o(Pv,"entriesOf");async function Uv(e,t,r=Date.now()){let i=new Set(t.ids??[]),u=[],n=r;for(let c of JD)for(let m of await Pv(e,c))!t.all&&!i.has(m.id)||u.some(f=>f.id===m.id)||(u.push({id:m.id,title:m.title,resource:c}),n=Math.max(n,m.timestamp));let a=new Set(u.map(c=>c.id)),l=t.reason.trim().slice(0,500),d=[];for(let c=0;c<u.length;c+=200){let m=u.slice(c,c+200),f=m[0]?.title??"";d.push({groupId:`events:${Oe()}`,until:n,eventIds:m.map(p=>p.id),by:t.by??"agent",reason:l,title:m.length===1?f:`${m.length} errors \u2014 ${f}`})}return{drafts:d,items:u,notFound:[...i].filter(c=>!a.has(c))}}s(Uv,"u_"),o(Uv,"planDismissal");async function Mv(e,t){let r;try{r=await e.read(GD)}catch{r=void 0}let i=r?.dismissals,u=(Array.isArray(i)?i:[]).flatMap(d=>{let c=d;return c&&typeof c.id=="string"?[{id:c.id,eventIds:Array.isArray(c.eventIds)?c.eventIds.filter(m=>typeof m=="string"):[]}]:[]});if(t.all)return{keys:u.map(d=>d.id),notFound:[]};let n=[...new Set(t.ids??[])],a=new Set,l=[];for(let d of n){let c=u.filter(m=>m.id===d||m.eventIds.includes(d));c.length===0&&l.push(d);for(let m of c)a.add(m.id)}return{keys:[...a],notFound:l}}s(Mv,"l_"),o(Mv,"planRestore");var WD="Hidden, not fixed. Each of these shows again the next time it happens, and runtime://dismissed lists what is hidden, by whom and why.",Bl=class extends TD{static{s(this,"Bm")}static{o(this,"ObserveDismissErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{dismissed:0,items:[],notFound:[],note:"Nothing named: pass `ids` (from observe.errors, kind runtime) or `all: true`."};let t=this.get(R),r=this.get(Ot),i=await Uv(t,e),u=i.drafts.map(a=>Ov(a,r.id)),n=process.env.LENSMCP_EVENT_FILE;if(n)bl(n,u);else for(let a of u)this.get(Ku).publish(a);return{dismissed:i.items.length,items:i.items,notFound:i.notFound,note:i.items.length?WD:"Nothing was dismissed: none of those ids is in a runtime error list right now."}}};Bl=$([OD({name:ti.name,description:ti.description,inputSchema:{ids:ur.array(ur.string().min(1)).max(ti.maxIds).optional().describe("Entry ids to dismiss \u2014 the `id` of items observe.errors returns for kind `runtime`."),all:ur.boolean().optional().describe("Dismiss every runtime error currently listed (server-side, browser, failed requests)."),reason:ur.string().min(ti.minReasonChars).describe("Why these are not a problem to fix. Recorded with the dismissal and shown to the person in the dashboard."),by:ur.enum(["agent","cli"]).default("agent").describe("Who is dismissing. Leave as 'agent'; the lensmcp CLI passes 'cli'.")}})],Bl);var KD=Bl;import{Tool as HD,ToolContext as XD,z as wl}from"@frontmcp/sdk";var Cl=class extends XD{static{s(this,"Gm")}static{o(this,"ObserveRestoreErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{restored:0,notFound:[],note:"Nothing named: pass dismissal `ids` (from runtime://dismissed) or `all: true`."};let t=this.get(R),r=this.get(Ot),i=await Mv(t,e),u=Date.now(),n=i.keys.map(l=>Tv(l,r.id,u)),a=process.env.LENSMCP_EVENT_FILE;if(a)bl(a,n);else for(let l of n)this.get(Ku).publish(l);return{restored:i.keys.length,notFound:i.notFound,note:i.keys.length?"Restored: what those dismissals hid is listed and counted again.":"Nothing was restored: no dismissal matches."}}};Cl=$([HD({name:yl.name,description:yl.description,inputSchema:{ids:wl.array(wl.string().min(1)).max(yl.maxIds).optional().describe("Dismissal ids from runtime://dismissed, or ids of entries a dismissal hid."),all:wl.boolean().optional().describe("Undo every dismissal in effect.")}})],Cl);var YD=Cl;import{spawn as QD}from"node:child_process";import{existsSync as xl,readFileSync as eb}from"node:fs";import{join as Zv}from"node:path";import{Job as tb,JobContext as ub,z as ge}from"@frontmcp/sdk";import{existsSync as rb}from"node:fs";import{dirname as nb,join as ib,relative as sb,resolve as mt,isAbsolute as ab}from"node:path";var ob=6;function Lv(e=process.env,t=process.cwd()){return mt(e.LENSMCP_WORKSPACE_ROOT??t)}s(Lv,"p_"),o(Lv,"resolveAllowedRoot");function ui(e,t){let r=sb(mt(e),mt(t));return r===""||!r.startsWith("..")&&!ab(r)}s(ui,"Km"),o(ui,"isWithinRoot");function qv(e,t){let r=mt(e);if(t===void 0)return{ok:!0,cwd:r};let i=mt(r,t);return ui(r,i)?{ok:!0,cwd:i}:{ok:!1,reason:`cwd ${i} is outside this server's workspace (${r}). verify_fix runs a workspace-defined Nx target, so it only runs in the workspace this server was started for. Set LENSMCP_WORKSPACE_ROOT to serve a different one.`}}s(qv,"m_"),o(qv,"confineToWorkspace");function Vv(e,t){let r=mt(t),i=mt(e);if(ui(r,i))for(let u=0;u<ob;u++){if(rb(ib(i,"nx.json")))return i;if(i===r)break;let n=nb(i);if(n===i||!ui(r,n))break;i=n}}s(Vv,"f_"),o(Vv,"findNxWorkspaceRootWithin");var lb=/^[@A-Za-z0-9][\w./-]*$/;function Jv(e){return e.length<=214&&lb.test(e)}s(Jv,"g_"),o(Jv,"isValidProjectName");var $l=class extends ub{static{s(this,"Xm")}static{o(this,"VerifyFixJob")}async execute(e){let t=Date.now(),r=e.project??process.env.LENSMCP_VERIFY_PROJECT??"example-web",i=Lv(),u=qv(i,e.cwd);if(!u.ok)return this.log(`[verify_fix] refused: ${u.reason}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let n=u.cwd;if(!Jv(r))return this.log(`[verify_fix] refused: ${r} is not a valid Nx project name`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let a=Vv(n,i);if(!a)return this.log(`No nx.json found between ${n} and ${i}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let l=Gv("nx",[a]);if(!l)return this.log(`Could not find node_modules/.bin/nx under ${a}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};this.log(`[verify_fix] nx run ${r}:agent-verify (cwd=${a})`);let d=QD(l,["run",`${r}:agent-verify`],{cwd:a,env:{...process.env},stdio:["ignore","pipe","pipe"]}),c=[],m=o(D=>{let B=/\[agent-verify\] ([a-z]+): (passed|failed|skipped|errored)/.exec(D);B&&B[1]&&B[2]&&(c.push({name:B[1],result:B[2],durationMs:0}),this.log(` ${B[1]}: ${B[2]}`))},"captureLine");kl(d.stdout,m),kl(d.stderr,m);let f=!1,p=setTimeout(()=>{f=!0;try{d.kill("SIGTERM")}catch{}},e.timeoutMs),g=await new Promise(D=>{d.on("exit",B=>D(B??1))});if(clearTimeout(p),f)return{status:"timeout",project:r,durationMs:Date.now()-t,stages:c,reportPath:null};let v=Zv(a,".lensmcp","verifications","latest.json"),E;if(xl(v))try{E=JSON.parse(eb(v,"utf-8"))}catch{E=void 0}return{status:E?.status??(g===0?"passed":"failed"),project:r,durationMs:E?.durationMs??Date.now()-t,stages:E?.stages??c,reportPath:xl(v)?v:null}}};$l=$([tb({name:"observe.verify_fix",description:"Run the deterministic verification loop (typecheck \u2192 lint \u2192 build) for a host project. Returns a per-stage report; suggested next read on failure is the relevant *://errors resource.",inputSchema:{project:ge.string().describe('Nx project name in the host workspace to verify. Defaults to LENSMCP_VERIFY_PROJECT or "example-web".').optional(),cwd:ge.string().describe("Directory to verify from. MUST be inside the workspace this server was started for (LENSMCP_WORKSPACE_ROOT, else the server's cwd); a path outside it is refused. Defaults to that workspace root.").optional(),timeoutMs:ge.number().int().positive().default(5*6e4).describe("How long to wait for the verify pipeline before declaring it stuck.")},outputSchema:{status:ge.enum(["passed","failed","errored","timeout"]),project:ge.string().nullable(),durationMs:ge.number(),stages:ge.array(ge.object({name:ge.string(),result:ge.enum(["passed","failed","skipped","errored"]),durationMs:ge.number(),exitCode:ge.number().optional(),summary:ge.string().optional()})),reportPath:ge.string().nullable()}})],$l);var db=$l;function Gv(e,t){for(let r of t){let i=Zv(r,"node_modules",".bin",e);if(xl(i))return i}}s(Gv,"A0"),o(Gv,"locateBin");function kl(e,t){if(!e)return;let r="";e.setEncoding("utf-8"),e.on("data",i=>{r+=typeof i=="string"?i:i.toString("utf-8");let u;for(;(u=r.indexOf(`
70
- `))!==-1;){let n=r.slice(0,u);r=r.slice(u+1),t(n)}}),e.on("end",()=>{r.length&&t(r)})}s(kl,"h_"),o(kl,"bufferLines");var Al=class{static{s(this,"kn")}static{o(this,"AgentApp")}};Al=$([ED({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[wD,$D],tools:[FD,RD,KD,YD],jobs:[db]})],Al);var cb={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},mb=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),Wv=new Set(["build","types","process"]),Kv=o(e=>Wv.has(e)?e:"unknown","faultOf"),pb=class{static{s(this,"Sn")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[],this.typechecked=new Set}ingest(e){if(e.category==="typecheck")return this.noteTypecheck(e);if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let i=typeof t.project=="string"?t.project:void 0;if(!i)return!1;if(r==="service-error"){let a=Kv(t.fault),l=this.touch(i,e.timestamp);if(l.faults.add(a),l.lastTitle=e.title,a==="types"&&this.typechecked.has(i))return!0;let d=typeof t.line=="string"?t.line:e.message??e.title;return this.errors.push({project:i,timestamp:e.timestamp,line:d,fingerprint:e.fingerprint,fault:a}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50),!0}if(r==="service-fault-closed"){let a=this.services.get(i),l=Array.isArray(t.closed)?t.closed.filter(d=>Wv.has(d)).map(Kv):[];return!a||l.length===0?!1:(a.lastSeenAt=e.timestamp,a.lastTitle=e.title,this.resolve(a,l),!0)}if(r==="service-recovered"){let a=this.services.get(i);return a?(a.lastSeenAt=e.timestamp,this.resolve(a),a.lastTitle=e.title,!0):!1}if(r==="lens-handoff-start"){let a=this.touch(i,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(i,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=cb[r];if(!u)return!1;let n=this.touch(i,e.timestamp);return n.state=u,n.lastTitle=e.title,mb.has(r)&&(n.restarts+=1),u==="up"&&this.resolve(n),!0}resolve(e,t){if(t)for(let i of t)e.faults.delete(i);else e.faults.clear();let r=o(i=>i.project===e.project&&(!t||t.includes(i.fault)),"gone");this.errors.splice(0,this.errors.length,...this.errors.filter(i=>!r(i)))}noteTypecheck(e){let t=e.raw??{};if(t.kind!=="typecheck-run"||t.phase!=="end"||typeof t.project!="string")return!1;let r=t.project,i=t.status==="clean"||t.status==="failing";return i===this.typechecked.has(r)?!1:(i?(this.typechecked.size>=100&&this.typechecked.delete(this.typechecked.values().next().value),this.typechecked.add(r),this.errors.splice(0,this.errors.length,...this.errors.filter(u=>!(u.project===r&&u.fault==="types")))):this.typechecked.delete(r),this.services.get(r)?.faults.has("types")??!1)}snapshot(){let e=[...this.services.values()].sort((r,i)=>r.project.localeCompare(i.project)).map(({faults:r,...i})=>({...i,buildFailed:r.has("build")||r.has("process")||r.has("unknown"),typeErrors:r.has("types")&&!this.typechecked.has(i.project)})),t=o(r=>e.filter(i=>i.state===r).map(i=>i.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),typeErrors:e.filter(r=>r.typeErrors).map(r=>r.project),restarts:e.reduce((r,i)=>r+i.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let i;for(let u of this.services.values())(!i||u.lastSeenAt<i.lastSeenAt)&&(i=u);i&&this.services.delete(i.project)}r={project:e,state:"starting",restarts:0,faults:new Set,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},ri="agent://current-status",ni="process://cluster",fb=250,gb=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function Hv(e){let t=new pb,r=e.sessionId??"pending",i,u=o(()=>{i||(i=setTimeout(()=>{i=void 0,e.resources.markDirty(ri)},fb),i.unref?.())},"scheduleStatusRefresh"),n=o(l=>{let d=t.ingest(l);d&&e.resources.markDirty(ni),(d||gb.has(l.category))&&u()},"handler"),a=e.bus.subscribe(n);return e.resources.register(ni,()=>({schemaVersion:1,revision:e.resources.revision(ni)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(ri,()=>ei({resources:e.resources,sessionId:r,revision:e.resources.revision(ri)??0})),{unsubscribe:o(()=>{a(),i&&(clearTimeout(i),i=void 0)},"unsubscribe"),uris:[ri,ni]}}s(Hv,"Ym"),o(Hv,"installAgentReducer");import{App as hb}from"@frontmcp/sdk";import{Resource as vb,ResourceContext as yb}from"@frontmcp/sdk";var _l=class extends yb{static{s(this,"Qm")}static{o(this,"FlowRecentResource")}async execute(){return this.get(R).read("flow://recent")}};_l=$([vb({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],_l);var Eb=_l;import{Resource as Db,ResourceContext as bb}from"@frontmcp/sdk";var Il=class extends bb{static{s(this,"tf")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(R).read("flow://current")}};Il=$([Db({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],Il);var Bb=Il;import{Resource as wb,ResourceContext as Cb}from"@frontmcp/sdk";var Sl=class extends Cb{static{s(this,"nf")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(R).read("flow://origins/recent")}};Sl=$([wb({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],Sl);var xb=Sl;import{Tool as $b,ToolContext as kb,z as ii}from"@frontmcp/sdk";var Xv;function Fl(e){Xv=e}s(Fl,"vs"),o(Fl,"setActiveFlowLookups");function pt(){return Xv}s(pt,"Re"),o(pt,"activeFlowLookups");var Ab=120;function zl(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{}}}s(zl,"sf"),o(zl,"segmentView");function jl(e,t={}){let{segmentation:r,classification:i,segmentCategories:u}=e,n=Math.max(1,t.maxSegments??Ab),a=r.segments.reduce((c,m)=>Math.min(c,m.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>n){let c=o(f=>f.counts.errors*1e6+f.counts.signal,"rank"),m=new Set([...d].sort((f,p)=>c(p)-c(f)||(f.id<p.id?-1:1)).slice(0,n).map(f=>f.id));d=d.filter(f=>m.has(f.id))}return{flowId:r.flowId,category:i.category,decidedBy:i.decidedBy,...i.subject?{subject:i.subject}:{},tags:i.tags,origin:i.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(c=>({index:c.index,startOffsetMs:Math.max(0,c.start-l),endOffsetMs:Math.max(0,c.end-l),segmentIds:c.segmentIds})),segments:d.map(c=>zl(c,u[c.id]??"other",l)),segmentsTruncated:d.length<r.segments.length}}s(jl,"af"),o(jl,"overviewOf");function Yv(e,t,r){let i=t.segmentation.segments.find(n=>n.id===r);if(!i)return;let u=new Set(i.eventIds);return e.filter(n=>u.has(n.id))}s(Yv,"__"),o(Yv,"eventsOfSegment");function Qv(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(Qv,"w_"),o(Qv,"filterClassified");function e3(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return K1(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(i=>({...i.subject!==void 0?{subject:i.subject}:{},count:i.count,flowIds:i.items.map(u=>u.id)}))}))}s(e3,"$_"),o(e3,"groupClassified");function t3(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(t3,"k_"),o(t3,"categoryCounts");function u3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),i=e.getFlowEvents(t.flowId);if(!r||!i)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?Yv(i,u,t.segmentId):void 0,l=u?.segmentation.segments.find(m=>m.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(m=>m.id)??[]};let d=u.segmentation.segments.reduce((m,f)=>Math.min(m,f.start),1/0),{events:c}=tl(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:zl(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:c.length>t.limit,events:c.slice(0,t.limit)}}let{events:n}=tl(i,{includeRaw:t.includeRaw});if(t.expand){let a=n.find(c=>c.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=i.filter(c=>l.has(c.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(c=>({id:c.id,timestamp:c.timestamp,source:c.source,category:c.category,severity:c.severity,title:c.title,message:c.message,...t.includeRaw?{raw:c.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:jl(u)}:{},truncated:n.length>t.limit,events:n.slice(0,t.limit)}}s(u3,"S_"),o(u3,"getFlowDetail");async function r3(e,t,r){if(e){let u=e.classifiedRecent(),n=Qv(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=n.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:n.length,categories:t3(u),...t.groupBy==="category"?{groups:e3(a)}:{}}}let i=await r();return{flows:i.flows.slice(0,t.limit),totalKnown:i.flows.length}}s(r3,"I_"),o(r3,"listRecentFlows");function n3(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...jl(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(n3,"R_"),o(n3,"getFlowSegments");var Rl=class extends kb{static{s(this,"cf")}static{o(this,"FlowListRecentTool")}async execute(e){return r3(pt(),e,async()=>await this.get(R).read("flow://recent"))}};Rl=$([$b({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:ii.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:ii.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:ii.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:ii.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],Rl);var _b=Rl;import{Tool as Ib,ToolContext as Sb,z as rr}from"@frontmcp/sdk";var Ol=class extends Sb{static{s(this,"lf")}static{o(this,"FlowGetTool")}async execute(e){return u3(pt(),e)}};Ol=$([Ib({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` for the full `event.raw` payloads. The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree.',inputSchema:{flowId:rr.string().describe("Flow id from flow://recent."),includeRaw:rr.boolean().default(!1),limit:rr.number().int().positive().max(500).default(200),expand:rr.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:rr.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],Ol);var Fb=Ol;import{Tool as zb,ToolContext as jb,z as Rb}from"@frontmcp/sdk";var Tl=class extends jb{static{s(this,"pf")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=pt();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};Tl=$([zb({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:Rb.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],Tl);var Ob=Tl;import{Tool as Tb,ToolContext as Nb,z as Pb}from"@frontmcp/sdk";import*as Ub from"node:fs";import{dirname as Mb,join as i3}from"node:path";var Zb="ai",Lb=/^ai_[0-9a-z]{8,40}$/,Nl=o(e=>typeof e=="string"&&Lb.test(e),"isAiCallId");function s3(e){return i3(Mb(e),Zb)}s(s3,"Q0"),o(s3,"aiContentDir");function a3(e,t){if(!Nl(t))throw new Error("invalid ai call id");return i3(s3(e),`${t}.json`)}s(a3,"eT"),o(a3,"aiContentFile");function o3(e,t){if(Nl(t))try{let r=JSON.parse(Ub.readFileSync(a3(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(o3,"A_"),o(o3,"readAiContent");var Pl=class extends Nb{static{s(this,"ff")}static{o(this,"AiGetCallTool")}async execute(e){if(!Nl(e.callId))return{found:!1,reason:"invalid call id"};let t=o3(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};Pl=$([Tb({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:Pb.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],Pl);var qb=Pl;import{Tool as Vb,ToolContext as Jb,z as l3}from"@frontmcp/sdk";var Ul=class extends Jb{static{s(this,"gf")}static{o(this,"FlowSegmentsTool")}async execute(e){return n3(pt(),e)}};Ul=$([Vb({name:"flow.segments",description:"Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow's category, subject and tags. Open one unit with flow.get { flowId, segmentId }.",inputSchema:{flowId:l3.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:l3.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],Ul);var Gb=Ul,Ml=class{static{s(this,"Rn")}static{o(this,"FlowApp")}};Ml=$([hb({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[Eb,Bb,xb],tools:[_b,Fb,Gb,Ob,qb]})],Ml);var si="flow://recent",ai="flow://current",oi="flow://origins/recent",nr=50,d3=50,Zl=2e3,Wb=4*1024*1024,Ll=32*1024*1024,Kb=nr+10;function c3(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0},r=o((m,f,p,g=!0)=>{let v=Math.min(f,m.events.length);if(v<=0)return;if(g&&v>0&&(m.events[0]?.raw??{}).kind==="flow-origin"&&m.events.length>1){let D=m.eventBytes[1]??0;if(m.events.splice(1,1),m.eventBytes.splice(1,1),m.retainedBytes=Math.max(0,m.retainedBytes-D),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-D),t.evictedEvents+=1,p&&(t.evictedForBytes+=1),v-=1,v<=0)return}let E=0;for(let D=0;D<v;D+=1)E+=m.eventBytes[D]??0;m.events.splice(0,v),m.eventBytes.splice(0,v),m.retainedBytes=Math.max(0,m.retainedBytes-E),t.retainedEvents=Math.max(0,t.retainedEvents-v),t.retainedBytes=Math.max(0,t.retainedBytes-E),t.evictedEvents+=v,p&&(t.evictedForBytes+=v)},"evictPrefix"),i=o(m=>{let f=0,p=m.retainedBytes;for(;p>Wb&&f<m.eventBytes.length;)p-=m.eventBytes[f]??0,f+=1;r(m,f,!0)},"enforceEntryByteCap"),u=o(()=>{for(let m=t.recentOrder.length-1;t.retainedBytes>Ll&&m>=0;m-=1){let f=t.flows.get(t.recentOrder[m]);if(!f)continue;let p=0,g=t.retainedBytes;for(;g>Ll&&p<f.eventBytes.length;)g-=f.eventBytes[p]??0,p+=1;r(f,p,!0)}},"enforceGlobalByteCap"),n=o(m=>{let f=m.context.flowId;if(!f)return;let p=(m.raw??{}).kind;if(p==="subscription-added"||p==="subscription-removed"||p==="hook-run"||p==="store-created"||p==="singleton-instance"||p==="visual-frame")return;let g=p==="flow-origin",v=t.flows.get(f);if(!v){v={summary:{flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,startedAt:m.timestamp,lastSeenAt:m.timestamp,eventCount:0,headline:m.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(f,v);let B={flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,at:m.timestamp,label:m.title,eventId:m.id};t.origins.push(B),t.origins.length>d3&&t.origins.splice(0,t.origins.length-d3),e.resources.markDirty(oi)}g&&!v.hasOrigin&&(v.hasOrigin=!0,v.summary.headline=m.title,m.context.originType&&(v.summary.originType=m.context.originType),m.context.originNodeId&&(v.summary.originNodeId=m.context.originNodeId)),m.timestamp<v.summary.startedAt&&(v.summary.startedAt=m.timestamp);let E=Hn(m);v.events.push(m),v.eventBytes.push(E),v.retainedBytes+=E,t.retainedEvents+=1,t.retainedBytes+=E,v.events.length>Zl&&r(v,v.events.length-Zl,!1),i(v),v.summary.eventCount+=1,v.summary.lastSeenAt=m.timestamp;let D=t.recentOrder.indexOf(f);if(D>=0&&t.recentOrder.splice(D,1),t.recentOrder.unshift(f),t.recentOrder.length>nr){let B=t.recentOrder.splice(nr);for(let k of B){let _=t.flows.get(k);_&&r(_,_.events.length,!1,!1),t.flows.delete(k)}}u(),t.currentFlowId!==f&&(t.currentFlowId=f,e.resources.markDirty(ai)),e.resources.markDirty(si)},"handler"),a=e.bus.subscribe(n);e.resources.register(si,()=>({schemaVersion:1,revision:e.resources.revision(si)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(m=>t.flows.get(m)?.summary).filter(m=>!!m)})),e.resources.register(ai,()=>{let m=t.currentFlowId,f=m?t.flows.get(m):void 0;return{schemaVersion:1,revision:e.resources.revision(ai)??0,updatedAt:new Date().toISOString(),flow:f?.summary??null}}),e.resources.register(oi,()=>({schemaVersion:1,revision:e.resources.revision(oi)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let l=e.flows??Ut,d=new Map,c={getFlowEvents(m){return t.flows.get(m)?.events.slice().sort((f,p)=>f.timestamp-p.timestamp)},getFlowSummary(m){return t.flows.get(m)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(m){return[...t.flows.values()].filter(f=>f.summary.originNodeId===m).map(f=>f.summary)},flowsConfig:l,analyzeFlow(m){let f=t.flows.get(m);if(!f)return;let p=`${f.summary.eventCount}:${f.events.length}:${f.summary.lastSeenAt}`,g=d.get(m);if(g&&g.key===p)return d.delete(m),d.set(m,g),g.analysis;let v=tv(c.getFlowEvents(m)??[],l);for(d.delete(m),d.set(m,{key:p,analysis:v});d.size>Kb;)d.delete(d.keys().next().value);return v},classifiedRecent(m=nr){let f=[];for(let p of t.recentOrder){if(f.length>=m)break;let g=t.flows.get(p)?.summary,v=c.analyzeFlow(p);!g||!v||f.push({summary:g,category:v.classification.category,decidedBy:v.classification.decidedBy,...v.classification.subject?{subject:v.classification.subject}:{},tags:v.classification.tags,segmentCount:v.segmentation.stats.segments,phaseCount:v.segmentation.stats.phases,signalCount:v.segmentation.stats.signal})}return f}};return Fl(c),{unsubscribe:o(()=>{Fl(void 0),a()},"unsubscribe"),uris:[si,ai,oi],lookups:c,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:nr*Zl,byteCap:Ll}),"retentionStats")}}s(c3,"yf"),o(c3,"installFlowReducer");import{App as Hb}from"@frontmcp/sdk";import{Resource as Xb,ResourceContext as Yb}from"@frontmcp/sdk";var ql=class extends Yb{static{s(this,"bf")}static{o(this,"StoryRecentResource")}async execute(){return this.get(R).read("story://recent")}};ql=$([Xb({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],ql);var Qb=ql;import{Resource as eB,ResourceContext as tB}from"@frontmcp/sdk";var Vl=class extends tB{static{s(this,"_f")}static{o(this,"StoryLastResource")}async execute(){return this.get(R).read("story://last")}};Vl=$([eB({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],Vl);var uB=Vl;import{Tool as rB,ToolContext as nB,z as iB}from"@frontmcp/sdk";var li="story://recent",di="story://last",we={byFlowId:new Map,order:[]},m3=!1;function p3(e){return m3||(e.resources.register(li,()=>({schemaVersion:1,revision:e.resources.revision(li)??0,updatedAt:new Date().toISOString(),stories:we.order.map(t=>we.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(di,()=>{let t=we.order[0],r=t?we.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(di)??0,updatedAt:new Date().toISOString(),story:r??null}}),m3=!0),f3(e.resources),{uris:[li,di]}}s(p3,"kf"),o(p3,"installStoryReducer");var Jl;function f3(e){Jl=o(t=>{e.markDirty(t)},"markDirty")}s(f3,"mT"),o(f3,"setMarkDirty");function Gl(e){we.byFlowId.set(e.flowId,e);let t=we.order.indexOf(e.flowId);if(t>=0&&we.order.splice(t,1),we.order.unshift(e.flowId),we.order.length>50){let r=we.order.splice(50);for(let i of r)we.byFlowId.delete(i)}Jl?.(li),Jl?.(di)}s(Gl,"En"),o(Gl,"recordCompiledStory");function g3(e){return we.byFlowId.get(e)}s(g3,"Sf"),o(g3,"getCompiledStory");var Wl=class extends nB{static{s(this,"If")}static{o(this,"StoryCompileTool")}async execute(e){let t=pt();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let i=Xi(r,{flowId:e.flowId});return i?(Gl(i),{compiled:!0,story:i}):{compiled:!1,flowId:e.flowId}}};Wl=$([rB({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:iB.string().describe("Flow id (from flow://recent).")}})],Wl);var sB=Wl;import{Tool as aB,ToolContext as oB,z as lB}from"@frontmcp/sdk";var Kl=class extends oB{static{s(this,"Tf")}static{o(this,"StoryGetTool")}async execute(e){let t=g3(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};Kl=$([aB({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:lB.string().describe("Flow id.")}})],Kl);var dB=Kl,Hl=class{static{s(this,"An")}static{o(this,"StoryApp")}};Hl=$([Hb({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[Qb,uB],tools:[sB,dB]})],Hl);import{App as cB}from"@frontmcp/sdk";import{Resource as mB,ResourceContext as pB}from"@frontmcp/sdk";var Xl=class extends pB{static{s(this,"Af")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(R).read("build://current")}};Xl=$([mB({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],Xl);var fB=Xl;import{Resource as gB,ResourceContext as hB}from"@frontmcp/sdk";var Yl=class extends hB{static{s(this,"jf")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(R).read("build://failures")}};Yl=$([gB({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],Yl);var vB=Yl;import{Resource as yB,ResourceContext as EB}from"@frontmcp/sdk";var Ql=class extends EB{static{s(this,"Pf")}static{o(this,"BuildRecentResource")}async execute(){return this.get(R).read("build://events/recent")}};Ql=$([yB({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],Ql);var DB=Ql,ed=class{static{s(this,"zn")}static{o(this,"BuildApp")}};ed=$([cB({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[fB,vB,DB]})],ed);var ci="build://current",mi="build://failures",pi="build://events/recent",bB=new Set(["vite","rollup","typescript","eslint"]),h3=new Set(["build","typecheck","lint"]),v3=50,BB="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function y3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(y3,"AT"),o(y3,"readRaw");function E3(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(E3,"zT"),o(E3,"defaultTool");function D3(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((p,g)=>{let v=t.producers.get(p);t.producers.set(p,{id:p,tool:g.tool,...g.project?{project:g.project}:{},firstReportedAt:v?.firstReportedAt??g.at,lastReportedAt:Math.max(v?.lastReportedAt??0,g.at),lastRunStatus:g.runStatus,errorCount:g.errorCount??v?.errorCount??0,...g.warningCount!==void 0?{warningCount:g.warningCount}:v?.warningCount!==void 0?{warningCount:v.warningCount}:{},...g.durationMs!==void 0?{lastRunDurationMs:g.durationMs}:v?.lastRunDurationMs!==void 0?{lastRunDurationMs:v.lastRunDurationMs}:{},...g.error?{error:g.error}:{}}),lt(t.producers,Hu)},"touchProducer"),i=o(p=>{for(let[g,v]of t.failures)p(v)&&t.failures.delete(g);for(let[g,v]of t.warnings)p(v)&&t.warnings.delete(g)},"drop"),u=o((p,g)=>{i(v=>v.domain===p&&(g===void 0||v.project===g))},"clearScope"),n=o((p,g)=>{if(g.length===0)return;let v=new Set(g);i(E=>E.domain===p&&E.file!==void 0&&v.has(E.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let p=[...t.producers.values()].some(g=>g.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty(ci),e.resources.markDirty(mi),e.resources.markDirty(pi)},"markDirty"),d=o(p=>{if([...t.failures.values()].some(g=>g.project===p)||[...t.warnings.values()].some(g=>g.project===p)||[...t.producers.values()].some(g=>g.project===p)){for(let g of h3)u(g,p);for(let[g,v]of t.producers)v.project===p&&t.producers.delete(g);t.sawVerdict=[...t.producers.values()].some(g=>g.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),c=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let F=p.raw??null,I=F?.kind;(I==="service-starting"||I==="service-respawn")&&F?.project&&d(F.project);return}if(!bB.has(p.source)||!h3.has(p.category))return;let g=p.category,v=y3(p),E=v.project,D=v.tool??E3(g,p.source),B=`${D}:${E??"*"}`,k=typeof v.kind=="string"&&v.kind.endsWith("-run"),_={id:p.id,timestamp:p.timestamp,severity:p.severity,title:p.title,...p.message!==void 0?{message:p.message}:{},...p.location?.file?{file:p.location.file}:v.file?{file:v.file}:{},domain:g,...E?{project:E}:{},fingerprint:p.fingerprint};if(p.severity==="info"&&(k&&v.phase==="start"||p.title.startsWith("tsc clear")||p.title.startsWith("ESLint clear"))){u(g,E),t.lastRunAt=p.timestamp,ir(t,_),r(B,{tool:D,...E?{project:E}:{},at:p.timestamp,runStatus:"running"}),k||(t.sawVerdict=!0),a(),l();return}if(k&&v.phase==="end"){let F=v.status==="error"?"error":v.status==="failing"?"failing":"clean";F==="clean"&&u(g,E),F!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,ir(t,_),r(B,{tool:D,...E?{project:E}:{},at:p.timestamp,runStatus:F,...v.durationMs!==void 0?{durationMs:v.durationMs}:{},...v.errorCount!==void 0?{errorCount:v.errorCount}:{},...v.warningCount!==void 0?{warningCount:v.warningCount}:{},...v.error?{error:v.error}:{}}),a(),l();return}if(v.kind==="hmr"||p.title.startsWith("HMR ")){t.hmrUpdates+=1;let F=[..._.file?[_.file]:[],...p.relatedFiles??[]];n("build",F),t.lastRunAt=p.timestamp,t.sawVerdict=!0,ir(t,_),r(B,{tool:D,...E?{project:E}:{},at:p.timestamp,runStatus:"clean"}),a(),l();return}ir(t,_),p.severity==="error"||p.severity==="fatal"?(t.failures.set(_.fingerprint,_),t.warnings.delete(_.fingerprint)):p.severity==="warning"?t.failures.has(_.fingerprint)||t.warnings.set(_.fingerprint,_):(t.failures.delete(_.fingerprint),t.warnings.delete(_.fingerprint)),t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(B,{tool:D,...E?{project:E}:{},at:p.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),m=e.bus.subscribe(c),f=o(()=>Ln({producers:[...t.producers.values()],domain:"build",noProducerHint:BB}),"health");return e.resources.register(ci,()=>({schemaVersion:1,revision:e.resources.revision(ci)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...f()})),e.resources.register(mi,()=>({schemaVersion:1,revision:e.resources.revision(mi)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...f()})),e.resources.register(pi,()=>({schemaVersion:1,revision:e.resources.revision(pi)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:m,uris:[ci,mi,pi]}}s(D3,"Df"),o(D3,"installBuildReducer");function ir(e,t){e.recent.push(t),e.recent.length>v3&&e.recent.splice(0,e.recent.length-v3)}s(ir,"Ts"),o(ir,"pushRecent");import{App as wB}from"@frontmcp/sdk";import{Resource as CB,ResourceContext as xB}from"@frontmcp/sdk";var td=class extends xB{static{s(this,"Mf")}static{o(this,"LintCurrentResource")}async execute(){return this.get(R).read("lint://current")}};td=$([CB({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],td);var $B=td;import{Resource as kB,ResourceContext as AB}from"@frontmcp/sdk";var ud=class extends AB{static{s(this,"Uf")}static{o(this,"LintErrorsResource")}async execute(){return this.get(R).read("lint://errors")}};ud=$([kB({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],ud);var _B=ud;import{Resource as IB,ResourceContext as SB}from"@frontmcp/sdk";var rd=class extends SB{static{s(this,"Ff")}static{o(this,"LintWarningsResource")}async execute(){return this.get(R).read("lint://warnings")}};rd=$([IB({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],rd);var FB=rd,nd=class{static{s(this,"jn")}static{o(this,"LintApp")}};nd=$([wB({id:"lint",name:"Lint",description:"ESLint state.",resources:[$B,_B,FB]})],nd);var fi="lint://current",gi="lint://errors",hi="lint://warnings",zB="Nothing runs ESLint in the dev loop, so this is expected. Run `lensmcp lint [paths\u2026]` to publish a run; until then treat lint as UNCHECKED, not passing.";function b3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(b3,"LT"),o(b3,"readRaw");function B3(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((m,f)=>{let p=t.producers.get(m);t.producers.set(m,{id:m,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:p?.firstReportedAt??f.at,lastReportedAt:Math.max(p?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??p?.errorCount??0,...f.warningCount!==void 0?{warningCount:f.warningCount}:p?.warningCount!==void 0?{warningCount:p.warningCount}:{},...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:p?.lastRunDurationMs!==void 0?{lastRunDurationMs:p.lastRunDurationMs}:{},...f.error?{error:f.error}:{}}),lt(t.producers,Hu)},"touchProducer"),i=o((m,f)=>{let p=o((g,v)=>{for(let[E,D]of g)v(D)&&g.delete(E)},"drop");if(m){p(t.errors,g=>g.project===m),p(t.warnings,g=>g.project===m);return}if(f){p(t.errors,g=>g.file===f),p(t.warnings,g=>g.file===f);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let m=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=m||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(fi),e.resources.markDirty(gi),e.resources.markDirty(hi)},"markDirty"),a=o(m=>{if([...t.errors.values()].some(f=>f.project===m)||[...t.warnings.values()].some(f=>f.project===m)||[...t.producers.values()].some(f=>f.project===m)){i(m,void 0);for(let[f,p]of t.producers)p.project===m&&t.producers.delete(f);t.sawVerdict=[...t.producers.values()].some(f=>f.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(m=>{if(m.source==="gateway"&&m.category==="cluster"){let k=m.raw??null,_=k?.kind;(_==="service-starting"||_==="service-respawn")&&k?.project&&a(k.project);return}if(m.source!=="eslint"||m.category!=="lint")return;let f=b3(m),p=f.project,g=f.tool??"eslint",v=`${g}:${p??"*"}`,E=f.kind==="lint-run";if(m.severity==="info"&&(E&&f.phase==="start"||m.title.startsWith("ESLint clear"))){i(p,m.location?.file),t.lastRunAt=m.timestamp,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let k=f.status==="error"?"error":f.status==="failing"?"failing":"clean";k!=="error"&&(t.sawVerdict=!0),t.lastRunAt=m.timestamp,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:k,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}let D=m.title.match(/^\[([^\]]+)\]/),B={id:m.id,timestamp:m.timestamp,severity:m.severity,...f.rule?{rule:f.rule}:D?.[1]?{rule:D[1]}:{},message:m.message??m.title,...m.location?.file?{file:m.location.file}:{},...m.location?.line!==void 0?{line:m.location.line}:{},...m.location?.column!==void 0?{column:m.location.column}:{},...p?{project:p}:{},fingerprint:m.fingerprint};if(m.severity==="error"||m.severity==="fatal")t.errors.set(B.fingerprint,B),t.warnings.delete(B.fingerprint);else if(m.severity==="warning")t.errors.has(B.fingerprint)||t.warnings.set(B.fingerprint,B);else return;t.lastRunAt=m.timestamp,t.sawVerdict=!0,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>Ln({producers:[...t.producers.values()],domain:"lint",noProducerHint:zB}),"health");return e.resources.register(fi,()=>({schemaVersion:1,revision:e.resources.revision(fi)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(gi,()=>({schemaVersion:1,revision:e.resources.revision(gi)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),e.resources.register(hi,()=>({schemaVersion:1,revision:e.resources.revision(hi)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...c()})),{unsubscribe:d,uris:[fi,gi,hi]}}s(B3,"Bf"),o(B3,"installLintReducer");import{App as jB}from"@frontmcp/sdk";import{Resource as RB,ResourceContext as OB}from"@frontmcp/sdk";var id=class extends OB{static{s(this,"Vf")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(R).read("typecheck://current")}};id=$([RB({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],id);var TB=id;import{Resource as NB,ResourceContext as PB}from"@frontmcp/sdk";var sd=class extends PB{static{s(this,"Gf")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(R).read("typecheck://errors")}};sd=$([NB({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],sd);var UB=sd,ad=class{static{s(this,"On")}static{o(this,"TypecheckApp")}};ad=$([jB({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[TB,UB]})],ad);var vi="typecheck://current",yi="typecheck://errors",MB="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function w3(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(w3,"JT"),o(w3,"readRaw");function C3(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((m,f)=>{let p=t.producers.get(m),g={id:m,tool:f.tool,...f.project?{project:f.project}:{},firstReportedAt:p?.firstReportedAt??f.at,lastReportedAt:Math.max(p?.lastReportedAt??0,f.at),lastRunStatus:f.runStatus,errorCount:f.errorCount??p?.errorCount??0,...f.durationMs!==void 0?{lastRunDurationMs:f.durationMs}:p?.lastRunDurationMs!==void 0?{lastRunDurationMs:p.lastRunDurationMs}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}};t.producers.set(m,g),lt(t.producers,Hu)},"touchProducer"),i=o(m=>{if(!m){t.errors.clear();return}for(let[f,p]of t.errors)p.project===m&&t.errors.delete(f)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let m=[...t.producers.values()].some(f=>f.lastRunStatus==="error");t.status=m||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),n=o(()=>{e.resources.markDirty(vi),e.resources.markDirty(yi)},"markDirty"),a=o(m=>{let f=[...t.errors.values()].some(g=>g.project===m),p=[...t.producers.values()].some(g=>g.project===m);if(!(!f&&!p)){i(m);for(let[g,v]of t.producers)v.project===m&&t.producers.delete(g);t.sawVerdict=[...t.producers.values()].some(g=>g.lastRunStatus!=="error"),u(),n()}},"supersedeProject"),l=o(m=>{if(m.source==="gateway"&&m.category==="cluster"){let k=m.raw??null,_=k?.kind;(_==="service-starting"||_==="service-respawn")&&k?.project&&a(k.project);return}if(m.source!=="typescript"||m.category!=="typecheck")return;let f=w3(m),p=f.project,g=f.tool??"tsc",v=`${g}:${p??"*"}`,E=f.kind==="typecheck-run";if(m.severity==="info"&&(E&&f.phase==="start"||m.title.startsWith("tsc clear"))){i(p),t.lastRunAt=m.timestamp,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),n();return}if(E&&f.phase==="end"){let k=f.status==="error"?"error":f.status==="failing"?"failing":"clean";k!=="error"&&(t.sawVerdict=!0),t.lastRunAt=m.timestamp,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:k,...f.durationMs!==void 0?{durationMs:f.durationMs}:{},...f.errorCount!==void 0?{errorCount:f.errorCount}:{},...f.warningCount!==void 0?{warningCount:f.warningCount}:{},...f.error?{error:f.error}:{}}),u(),n();return}if(m.severity!=="error"&&m.severity!=="fatal")return;let D=m.title.match(/\bTS(\d+):/),B={id:m.id,timestamp:m.timestamp,...f.code?{code:f.code}:D?{code:`TS${D[1]}`}:{},message:m.message??m.title,...m.location?.file?{file:m.location.file}:{},...m.location?.line!==void 0?{line:m.location.line}:{},...m.location?.column!==void 0?{column:m.location.column}:{},...p?{project:p}:{},fingerprint:m.fingerprint};t.errors.set(B.fingerprint,B),t.lastRunAt=m.timestamp,t.sawVerdict=!0,r(v,{tool:g,...p?{project:p}:{},at:m.timestamp,runStatus:"failing"}),u(),n()},"handler"),d=e.bus.subscribe(l),c=o(()=>Ln({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:MB}),"health");return e.resources.register(vi,()=>({schemaVersion:1,revision:e.resources.revision(vi)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(yi,()=>({schemaVersion:1,revision:e.resources.revision(yi)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),{unsubscribe:d,uris:[vi,yi]}}s(C3,"Kf"),o(C3,"installTypecheckReducer");import{App as ZB}from"@frontmcp/sdk";import{Resource as LB,ResourceContext as qB}from"@frontmcp/sdk";var od=class extends qB{static{s(this,"Wf")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(R).read("bundle://current")}};od=$([LB({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],od);var VB=od;import{Resource as JB,ResourceContext as GB}from"@frontmcp/sdk";var ld=class extends GB{static{s(this,"Hf")}static{o(this,"BundleChunksResource")}async execute(){return this.get(R).read("bundle://chunks")}};ld=$([JB({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],ld);var WB=ld;import{Resource as KB,ResourceContext as HB}from"@frontmcp/sdk";var dd=class extends HB{static{s(this,"Qf")}static{o(this,"BundleModulesResource")}async execute(){return this.get(R).read("bundle://modules")}};dd=$([KB({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],dd);var XB=dd;import{Resource as YB,ResourceContext as QB}from"@frontmcp/sdk";var cd=class extends QB{static{s(this,"tg")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(R).read("bundle://regressions")}};cd=$([YB({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],cd);var e2=cd;import{Resource as t2,ResourceContext as u2}from"@frontmcp/sdk";var md=class extends u2{static{s(this,"ng")}static{o(this,"BundleCompareResource")}async execute(){return this.get(R).read("bundle://compare/latest")}};md=$([t2({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],md);var r2=md,pd=class{static{s(this,"Pn")}static{o(this,"BundleApp")}};pd=$([ZB({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[VB,WB,XB,e2,r2]})],pd);function fd(e,t){let r=[],i=new Map(e.chunks.map(n=>[n.name,n])),u=new Map(t.chunks.map(n=>[n.name,n]));for(let[n,a]of u){let l=i.get(n);if(!l){r.push({kind:"chunk-added",name:n,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:n,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...x3(l,a))}for(let[n,a]of i)u.has(n)||r.push({kind:"chunk-removed",name:n,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((n,a)=>Math.abs(a.deltaBytes)-Math.abs(n.deltaBytes))}s(fd,"Ps"),o(fd,"compareReports");function x3(e,t){let r=[],i=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let n=i.get(u.id);if(n===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-n;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:n,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(x3,"iE"),o(x3,"compareModules");var Ei="bundle://current",Di="bundle://chunks",bi="bundle://modules",sr="bundle://regressions",ar="bundle://compare/latest";function $3(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let n=u.raw;if(!n||typeof n!="object"||!("kind"in n)||n.kind!=="bundle-report")return;let a=n.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?fd(t.baseline,a):[],e.resources.markDirty(Ei),e.resources.markDirty(Di),e.resources.markDirty(bi),e.resources.markDirty(sr),e.resources.markDirty(ar))},"handler"),i=e.bus.subscribe(r);return e.resources.register(Ei,()=>({schemaVersion:1,revision:e.resources.revision(Ei)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(Di,()=>({schemaVersion:1,revision:e.resources.revision(Di)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(bi,()=>{let u=t.current?.chunks.flatMap(n=>n.modules.map(a=>({...a,chunk:n.name})))??[];return{schemaVersion:1,revision:e.resources.revision(bi)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(sr,()=>({schemaVersion:1,revision:e.resources.revision(sr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(ar,()=>({schemaVersion:1,revision:e.resources.revision(ar)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:i,uris:[Ei,Di,bi,sr,ar],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=fd(t.baseline,t.current)),e.resources.markDirty(sr),e.resources.markDirty(ar)},"setBaseline")}}s($3,"ig"),o($3,"installBundleReducer");import{App as n2}from"@frontmcp/sdk";import{Resource as i2,ResourceContext as s2}from"@frontmcp/sdk";var gd=class extends s2{static{s(this,"sg")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(R).read("runtime://browser/console")}};gd=$([i2({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],gd);var a2=gd;import{Resource as o2,ResourceContext as l2}from"@frontmcp/sdk";var hd=class extends l2{static{s(this,"cg")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(R).read("runtime://browser/errors")}};hd=$([o2({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],hd);var d2=hd;import{Resource as c2,ResourceContext as m2}from"@frontmcp/sdk";var vd=class extends m2{static{s(this,"lg")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(R).read("runtime://errors")}};vd=$([c2({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],vd);var p2=vd;import{Resource as f2,ResourceContext as g2}from"@frontmcp/sdk";var yd=class extends g2{static{s(this,"pg")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(R).read("runtime://browser/network")}};yd=$([f2({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],yd);var h2=yd;import{Resource as v2,ResourceContext as y2}from"@frontmcp/sdk";var Ed=class extends y2{static{s(this,"fg")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(R).read("runtime://browser/failed-requests")}};Ed=$([v2({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],Ed);var E2=Ed;import{Resource as D2,ResourceContext as b2}from"@frontmcp/sdk";var Dd=class extends b2{static{s(this,"hg")}static{o(this,"RuntimeDismissedResource")}async execute(){return this.get(R).read("runtime://dismissed")}};Dd=$([D2({name:"runtime-dismissed",uri:"runtime://dismissed",mimeType:"application/json",description:"Errors someone DISMISSED by hand \u2014 in the dashboard, at the CLI, or an agent through observe.dismiss_errors \u2014 with who did it and the reason they gave. A dismissed error is hidden from runtime://errors and the browser error lists, not fixed: it shows again the next time it happens. Read this when an error list is shorter than you expected."})],Dd);var B2=Dd,bd=class{static{s(this,"Mn")}static{o(this,"RuntimeApp")}};bd=$([n2({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[a2,d2,p2,h2,E2,B2]})],bd);var Zt="runtime://browser/console",Je="runtime://browser/errors",Lt="runtime://browser/network",Ge="runtime://browser/failed-requests",We="runtime://errors",or="runtime://dismissed",w2=200,k3=100,C2=200,x2=50,$2=500,k2="default",A2=1e3,Bd=o(e=>e??k2,"tabOf");function A3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(A3,"SE"),o(A3,"isDocumentBoundary");function _3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(_3,"IE"),o(_3,"isTabGone");function I3(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,dismissed:new Map,changedAt:new Map},i=o((c,m)=>{r.changedAt.set(c,m),e.resources.markDirty(c)},"touch"),u=o((c,m,f)=>{let p=c.filter(g=>!(Bd(g.tabId)===m&&g.timestamp<f));p.length!==c.length&&(c.length=0,c.push(...p))},"retract"),n=o(c=>{let m=v1(c);if(m){let p=r.dismissed.get(m.groupId);r.dismissed.delete(m.groupId),m.kind===Xu&&(r.dismissed.set(m.groupId,{eventIds:new Set(m.eventIds),at:c.timestamp,...m.by?{by:m.by}:{},...m.reason?{reason:m.reason}:{},...m.title?{title:m.title}:{}}),r.dismissed.size>$2&&r.dismissed.delete(r.dismissed.keys().next().value));let g=new Set([...p?.eventIds??[],...r.dismissed.get(m.groupId)?.eventIds??[]]);for(let[v,E]of[[We,r.serverErrors],[Je,r.errors],[Ge,r.failed]])E.some(D=>g.has(D.id))&&i(v,c.timestamp);i(or,c.timestamp);return}if(S3(c)){let p=c.raw?.project;if(p){let g=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(v=>v.project!==p),r.serverErrors.length!==g&&i(We,c.timestamp)}return}if(F3(c)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,c.timestamp),qt(r.serverErrors,z3(c),k3),i(We,c.timestamp);return}if(!(c.source==="client-runtime"||c.source==="chrome")&&!(c.source==="react"&&c.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,c.timestamp),_3(c)){let p=Bd(c.context.tabId);u(r.errors,p,Number.POSITIVE_INFINITY),u(r.failed,p,Number.POSITIVE_INFINITY),r.readyByTab.delete(p);for(let g of[Je,Ge,Zt,Lt])i(g,c.timestamp);return}if(A3(c)){let p=Bd(c.context.tabId);r.readyByTab.set(p,Math.max(r.readyByTab.get(p)??0,c.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,c.timestamp);let g=c.timestamp-A2;u(r.errors,p,g),u(r.failed,p,g);for(let v of[Je,Ge,Zt,Lt])i(v,c.timestamp);return}let f={id:c.id,timestamp:c.timestamp,severity:c.severity,title:c.title,message:c.message,source:c.source,fingerprint:c.fingerprint,tabId:c.context.tabId,url:c.context.url,raw:c.raw};if(c.category==="network"){qt(r.network,f,C2),i(Lt,c.timestamp),c.severity==="error"&&(qt(r.failed,f,x2),i(Ge,c.timestamp));return}(c.severity==="error"||c.severity==="fatal")&&(qt(r.errors,f,k3),i(Je,c.timestamp)),c.title?.startsWith("console.")&&(qt(r.console,f,w2),i(Zt,c.timestamp))},"handler"),a=e.bus.subscribe(n),l=new Set([We,Je,Ge]),d=o((c,m)=>{if(!l.has(c)||r.dismissed.size===0)return Cd(e.resources,c,m,r,t,0);let f=new Set([...r.dismissed.values()].flatMap(g=>[...g.eventIds])),p=m.filter(g=>!f.has(g.id));return Cd(e.resources,c,p,r,t,m.length-p.length)},"snap");return e.resources.register(We,()=>d(We,r.serverErrors)),e.resources.register(Zt,()=>d(Zt,r.console)),e.resources.register(Je,()=>d(Je,r.errors)),e.resources.register(Lt,()=>d(Lt,r.network)),e.resources.register(Ge,()=>d(Ge,r.failed)),e.resources.register(or,()=>{let c=new Set([...r.serverErrors,...r.errors,...r.failed].map(f=>f.id)),m=[...r.dismissed].map(([f,p])=>({id:f,at:p.at,...p.by?{by:p.by}:{},...p.reason?{reason:p.reason}:{},...p.title?{title:p.title}:{},eventIds:[...p.eventIds],hiding:[...p.eventIds].filter(g=>c.has(g)).length}));return{schemaVersion:1,revision:e.resources.revision(or)??0,updatedAt:new Date(r.changedAt.get(or)??t).toISOString(),count:m.length,dismissals:m,detail:m.length?`${m.length} dismissal${m.length===1?"":"s"} in effect \u2014 hidden, not fixed. Each error shows again the next time it happens; undo one with observe.restore_errors.`:"Nothing has been dismissed."}}),{unsubscribe:a,uris:[Zt,Je,Lt,Ge,We,or]}}s(I3,"xg"),o(I3,"installRuntimeReducer");function wd(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(wd,"U_"),o(wd,"projectOf");function S3(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s(S3,"RE"),o(S3,"isGenerationBoundary");function F3(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(F3,"TE"),o(F3,"isServerError");function z3(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...wd(e)?{project:wd(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(z3,"EE"),o(z3,"serverEntry");function Cd(e,t,r,i,u,n){let a=t===We,l=a?i.lastServerEventAt:i.lastEventAt,d=l!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(i.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),...n>0?{dismissedCount:n}:{},producer:d?"connected":"none",lastEventAt:l,lastReadyAt:i.lastReadyAt,detail:a?d?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since."+Bi(n):`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(c=>c.project??"unknown")).size} project${new Set(r.map(c=>c.project??"unknown")).size===1?"":"s"}`+Bi(n):"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":d?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${i.readyByTab.size} open tab${i.readyByTab.size===1?"":"s"}`+(i.lastReadyAt===void 0?" (no page load observed yet)":"")+Bi(n):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(Cd,"L_"),o(Cd,"snapshot");function Bi(e){return e>0?` \u2014 ${e} more dismissed by hand in the dashboard (hidden, not fixed)`:""}s(Bi,"bg"),o(Bi,"dismissedNote");function qt(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(qt,"Un"),o(qt,"pushBounded");import{App as _2}from"@frontmcp/sdk";import{Resource as I2,ResourceContext as S2}from"@frontmcp/sdk";var xd=class extends S2{static{s(this,"_g")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(R).read("browser://tabs")}};xd=$([I2({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],xd);var F2=xd;import{Resource as z2,ResourceContext as j2}from"@frontmcp/sdk";var $d=class extends j2{static{s(this,"$g")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(R).read("browser://active-tab")}};$d=$([z2({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],$d);var R2=$d,kd=class{static{s(this,"Ln")}static{o(this,"BrowserApp")}};kd=$([_2({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[F2,R2]})],kd);var Ke="browser://tabs",He="browser://active-tab";function j3(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(j3,"NE"),o(j3,"isDocumentBoundary");function R3(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(R3,"DE"),o(R3,"isTabGone");function O3(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},i=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(R3(a)){if(r.tabs.delete(l),r.activePageId===l){let c=[...r.tabs.keys()];r.activePageId=c[c.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(Ke,a.timestamp),r.changedAt.set(He,a.timestamp),e.resources.markDirty(Ke),e.resources.markDirty(He);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let c=r.tabs.keys().next().value;c!==void 0&&c!==l&&r.tabs.delete(c)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),j3(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(Ke,a.timestamp),r.changedAt.set(He,a.timestamp),e.resources.markDirty(Ke),e.resources.markDirty(He)},"handler"),u=e.bus.subscribe(i),n=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(Ke,()=>({schemaVersion:1,revision:e.resources.revision(Ke)??0,updatedAt:n(Ke),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(He,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(He)??0,updatedAt:n(He),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[Ke,He]}}s(O3,"Sg"),o(O3,"installBrowserReducer");import{App as O2}from"@frontmcp/sdk";import{Resource as T2,ResourceContext as N2}from"@frontmcp/sdk";var Ad=class extends N2{static{s(this,"Ig")}static{o(this,"NestProvidersResource")}async execute(){return this.get(R).read("nest://providers")}};Ad=$([T2({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],Ad);var P2=Ad;import{Resource as U2,ResourceContext as M2}from"@frontmcp/sdk";var _d=class extends M2{static{s(this,"Tg")}static{o(this,"NestRequestsResource")}async execute(){return this.get(R).read("nest://requests/recent")}};_d=$([U2({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],_d);var Z2=_d,Id=class{static{s(this,"Fn")}static{o(this,"NestApp")}};Id=$([O2({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[P2,Z2]})],Id);var wi="nest://providers",Ci="nest://requests/recent";function T3(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let n=u.raw??null;if(n?.kind==="singleton-instance"&&n.provider){let a=n.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(wi);return}if(n?.kind==="server-request"&&n.request){let a={...n.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(Ci);return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(wi,()=>({schemaVersion:1,revision:e.resources.revision(wi)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(Ci,()=>({schemaVersion:1,revision:e.resources.revision(Ci)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:i,uris:[wi,Ci]}}s(T3,"Ag"),o(T3,"installNestReducer");import{App as L2}from"@frontmcp/sdk";import{Resource as q2,ResourceContext as V2}from"@frontmcp/sdk";var Sd=class extends V2{static{s(this,"zg")}static{o(this,"TraceRecentResource")}async execute(){return this.get(R).read("trace://recent")}};Sd=$([q2({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],Sd);var J2=Sd;import{Resource as G2,ResourceContext as W2}from"@frontmcp/sdk";var Fd=class extends W2{static{s(this,"Og")}static{o(this,"TraceFailedResource")}async execute(){return this.get(R).read("trace://failed")}};Fd=$([G2({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],Fd);var K2=Fd,zd=class{static{s(this,"Zn")}static{o(this,"TraceApp")}};zd=$([L2({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[J2,K2]})],zd);var xi="trace://recent",$i="trace://failed";function N3(e){let t={recent:[],failed:[]},r=o(u=>{let n=u.raw??null;if(!n||n.kind!=="span"||!n.span?.name)return;let a={id:u.id,traceId:n.span.traceId,parentSpanId:n.span.parentSpanId,flowId:n.span.flowId??u.context.flowId,requestId:n.span.requestId??u.context.requestId,name:n.span.name,source:u.source,startTime:n.span.startTime??u.timestamp,endTime:n.span.endTime,durationMs:n.span.durationMs,status:n.span.status??(u.severity==="error"?"error":"ok")};jd(t.recent,a,100),a.status==="error"&&jd(t.failed,a,50),e.resources.markDirty(xi),a.status==="error"&&e.resources.markDirty($i)},"handler"),i=e.bus.subscribe(r);return e.resources.register(xi,()=>({schemaVersion:1,revision:e.resources.revision(xi)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register($i,()=>({schemaVersion:1,revision:e.resources.revision($i)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:i,uris:[xi,$i]}}s(N3,"Ng"),o(N3,"installTraceReducer");function jd(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(jd,"F_"),o(jd,"pushBounded");import{App as H2}from"@frontmcp/sdk";import{Resource as X2,ResourceContext as Y2}from"@frontmcp/sdk";var Rd=class extends Y2{static{s(this,"Dg")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(R).read("perf://slow-routes")}};Rd=$([X2({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],Rd);var Q2=Rd;import{Resource as ew,ResourceContext as tw}from"@frontmcp/sdk";var Od=class extends tw{static{s(this,"Cg")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(R).read("perf://duplicate-requests")}};Od=$([ew({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],Od);var uw=Od,Td=class{static{s(this,"Bn")}static{o(this,"PerfApp")}};Td=$([H2({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[Q2,uw]})],Td);var ki="perf://slow-routes",Ai=20,P3=2,rw=200;function U3(e){let t=Ie(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),i={routes:new Map},u=o(d=>{let c=d.raw??null;if(c?.kind!=="server-request"||!c.request)return;let{method:m,route:f}=c.request,p=c.request.durationMs??0,g=`${m} ${f}`,v=i.routes.get(g);if(v||(v={method:m,route:f,recent:[],samples:0,slowSamples:0,lastDurationMs:p,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),i.routes.delete(g),i.routes.set(g,v),v.recent.push(p),v.recent.length>Ai&&v.recent.splice(0,v.recent.length-Ai),v.samples+=1,p>=t&&(v.slowSamples+=1),v.lastDurationMs=p,v.lastSeenAt=d.timestamp,p>v.worstEverMs&&(v.worstEverMs=p,v.worstEverAt=d.timestamp),i.routes.size>rw){let E=i.routes.keys().next().value;E!==void 0&&i.routes.delete(E)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(ki)},"handler"),n=e.bus.subscribe(u),a=o(d=>d.recent.reduce((c,m)=>m>=t?c+1:c,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=P3,"currentlySlow");return e.resources.register(ki,()=>{let d=[...i.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(ki)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(c=>({method:c.method,route:c.route,worstRecentMs:Math.max(...c.recent),lastDurationMs:c.lastDurationMs,lastSeenAt:c.lastSeenAt,samples:c.samples,slowSamples:c.slowSamples,recentSlowSamples:a(c),worstEverMs:c.worstEverMs,worstEverAt:c.worstEverAt})).sort((c,m)=>m.worstRecentMs-c.worstRecentMs),routesTracked:i.routes.size,recentSampleWindow:Ai,minRecentSlowToKeep:P3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${i.routes.size} route${i.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${Ai} calls each (\u2265${t}ms).`}}),{unsubscribe:n,uris:[ki]}}s(U3,"Lg"),o(U3,"installPerfReducer");var _i="perf://duplicate-requests",Nd=10,M3=2,nw=200,Z3=300,iw=new Set(["t","_","cacheBust","ts"]);function L3(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])iw.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),i=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?i:`${t.origin}${i}`}catch{return e}}s(L3,"q_"),o(L3,"normalizeRequestUrl");function q3(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:n}of e)t.push({at:u,delta:1}),t.push({at:n+1,delta:-1});t.sort((u,n)=>u.at-n.at||u.delta-n.delta);let r=0,i=0;for(let{delta:u}of t)r+=u,r>i&&(i=r);return i}s(q3,"G_"),o(q3,"peakConcurrency");function V3(e){let t=Ie(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),i={endpoints:new Map},u=o(d=>{if(d.category!=="network")return;let c=d.raw??null;if(c?.kind!=="fetch-done"&&c?.kind!=="fetch-error"||!c.url||!c.method)return;let m=L3(c.url),f=c.method.toUpperCase();if(typeof c.startedAt!="number")return;let p=c.startedAt,g=p+(typeof c.durationMs=="number"?c.durationMs:0),v=d.context?.originNodeId??null,E=d.context?.flowId??null,D=`${f} ${m} @ ${v??"-"}`,B=i.endpoints.get(D);if(B||(B={method:f,url:m,originNodeId:v,currentFlowId:E,currentIntervals:[],currentPeak:0,recentPeaks:[],totalRequests:0,lastSeenAt:d.timestamp,worstEverPeak:0,worstEverAt:d.timestamp}),i.endpoints.delete(D),i.endpoints.set(D,B),E!==B.currentFlowId&&(B.currentIntervals.length>0&&(B.recentPeaks.push(B.currentPeak),B.recentPeaks.length>Nd&&B.recentPeaks.splice(0,B.recentPeaks.length-Nd)),B.currentFlowId=E,B.currentIntervals=[],B.currentPeak=0),B.currentIntervals.push({start:p,end:g}),B.currentIntervals.length>Z3&&B.currentIntervals.splice(0,B.currentIntervals.length-Z3),B.currentPeak=q3(B.currentIntervals),B.totalRequests+=1,B.lastSeenAt=d.timestamp,B.currentPeak>B.worstEverPeak&&(B.worstEverPeak=B.currentPeak,B.worstEverAt=d.timestamp),i.endpoints.size>nw){let k=i.endpoints.keys().next().value;k!==void 0&&i.endpoints.delete(k)}i.lastSampleAt=Math.max(i.lastSampleAt??0,d.timestamp),i.changedAt=d.timestamp,e.resources.markDirty(_i)},"handler"),n=e.bus.subscribe(u),a=o(d=>{let c=[...d.recentPeaks,...d.currentIntervals.length>0?[d.currentPeak]:[]],m=0;for(let f=c.length-1;f>=0&&!((c[f]??0)>=t);f-=1)m+=1;return m},"consecutiveCleanFlows"),l=o(d=>d.worstEverPeak>=t&&a(d)<M3,"currentlyDuplicated");return e.resources.register(_i,()=>{let d=[...i.endpoints.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(_i)??0,updatedAt:new Date(i.changedAt??r).toISOString(),peakThreshold:t,endpoints:d.map(c=>({method:c.method,url:c.url,originNodeId:c.originNodeId,peakConcurrent:c.currentPeak,cleanFlowsSince:a(c),flowsObserved:c.recentPeaks.length+(c.currentIntervals.length>0?1:0),totalRequests:c.totalRequests,worstEverPeak:c.worstEverPeak,worstEverAt:c.worstEverAt,lastSeenAt:c.lastSeenAt})).sort((c,m)=>m.peakConcurrent-c.peakConcurrent),endpointsTracked:i.endpoints.size,recentFlowWindow:Nd,minCleanFlowsToRetract:M3,lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":d.length===0?`${i.endpoints.size} endpoint${i.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${d.length} endpoint${d.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:n,uris:[_i]}}s(V3,"Zg"),o(V3,"installDuplicateRequestsReducer");import{App as sw}from"@frontmcp/sdk";import{Resource as aw,ResourceContext as ow}from"@frontmcp/sdk";var Pd=class extends ow{static{s(this,"Bg")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(R).read("db://slow-queries")}};Pd=$([aw({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],Pd);var lw=Pd;import{Resource as dw,ResourceContext as cw}from"@frontmcp/sdk";var Ud=class extends cw{static{s(this,"qg")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(R).read("db://analysis")}};Ud=$([dw({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],Ud);var mw=Ud,Md=class{static{s(this,"Vn")}static{o(this,"DbApp")}};Md=$([sw({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[lw,mw]})],Md);var Ii="db://slow-queries",Si="db://analysis",J3=50,pw=20,fw=200;function G3(e){let t=e[Q0];if(!t)return;let r=Array.isArray(t.paths)?t.paths:[];for(let i of r){let u=typeof i=="string"?/^findings\[\] \(\+(\d+) items dropped\)$/.exec(i):null;if(u)return Number(u[1])}return r.some(i=>typeof i=="string"&&i.startsWith("findings"))?0:void 0}s(G3,"cA"),o(G3,"findingsDroppedByClamp");function W3(e){let t=Ie(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),i={shapes:new Map,analyzeRuns:new Map},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let c=d.project??"unknown",m=d.op??"query",f=d.table??"query",p=d.durationMs??0,g=`${c}|${m}|${f}`,v=i.shapes.get(g);if(v||(v={project:c,op:m,table:f,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),i.shapes.delete(g),i.shapes.set(g,v),v.count+=1,d.error!==void 0&&(v.errorCount+=1),v.totalMs+=p,p>v.maxMs&&(v.maxMs=p,v.maxAt=l.timestamp),v.recent.push(p),v.recent.length>J3&&v.recent.splice(0,v.recent.length-J3),v.rowsTotal+=d.rows??0,d.query&&(v.lastSql=d.query),v.lastDurationMs=p,v.lastSeenAt=l.timestamp,v.suppressed+=d.floodSuppressed??0,i.shapes.size>fw){let E=i.shapes.keys().next().value;E!==void 0&&i.shapes.delete(E)}i.lastQueryAt=Math.max(i.lastQueryAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(Ii);return}if(d.kind==="db-analyze-run"){let c=d.project??"unknown",m=G3(d);i.analyzeRuns.set(c,{project:c,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[],...m!==void 0?{droppedFindings:m}:{}}),lt(i.analyzeRuns,Hu),i.lastAnalyzeAt=Math.max(i.lastAnalyzeAt??0,l.timestamp),i.changedAt=l.timestamp,e.resources.markDirty(Si)}}},"handler"),n=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((c,m)=>c-m);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(Ii,()=>{let l=[...i.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(Ii)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,c)=>c.maxMs-d.maxMs).slice(0,pw),shapesTracked:i.shapes.size,note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events.",lastSampleAt:i.lastQueryAt,producer:i.lastQueryAt===void 0?"none":"connected",detail:i.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${i.shapes.size} query shape${i.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(Si,()=>{let l=[...i.analyzeRuns.values()].sort((D,B)=>B.runAt-D.runAt),d=l.flatMap(D=>D.findings),c=d.length,m=d.filter(D=>D.severity==="error").length,f=d.filter(D=>D.severity==="warning").length,p=c-m-f,g=l.filter(D=>D.droppedFindings!==void 0),v=g.reduce((D,B)=>D+(B.droppedFindings??0),0),E=g.length>0;return{schemaVersion:1,revision:e.resources.revision(Si)??0,updatedAt:new Date(i.changedAt??r).toISOString(),runs:l,findingCount:c,errorCount:m,warningCount:f,infoCount:p,...E?{incomplete:!0,droppedFindings:v}:{},lastSampleAt:i.lastAnalyzeAt,producer:i.lastAnalyzeAt===void 0?"none":"connected",detail:i.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${c} finding${c===1?"":"s"} (${m} error, ${f} warning, ${p} info).`+(E?` INCOMPLETE: ${v>0?`${v} more findings were`:"part of a run was"} cut by the bus payload bound before reaching the lens (an event over 32 KiB keeps only the first 64 items of a list), and the cut takes whatever came last. The analyzer must keep one run under that bound, most severe first.`:"")}}),{unsubscribe:n,uris:[Ii,Si]}}s(W3,"Jg"),o(W3,"installDbReducer");import{App as gw}from"@frontmcp/sdk";import{Resource as hw,ResourceContext as vw}from"@frontmcp/sdk";var Zd=class extends vw{static{s(this,"Kg")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(R).read("net://egress/hosts")}};Zd=$([hw({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],Zd);var yw=Zd;import{Resource as Ew,ResourceContext as Dw}from"@frontmcp/sdk";var Ld=class extends Dw{static{s(this,"Xg")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(R).read("net://egress/recent")}};Ld=$([Ew({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],Ld);var bw=Ld;import{Resource as Bw,ResourceContext as ww}from"@frontmcp/sdk";var qd=class extends ww{static{s(this,"Yg")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(R).read("net://egress/failures")}};qd=$([Bw({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],qd);var Cw=qd,Vd=class{static{s(this,"qn")}static{o(this,"NetApp")}};Vd=$([gw({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[yw,bw,Cw]})],Vd);var Fi="net://egress/hosts",zi="net://egress/recent",ji="net://egress/failures",Vt=20,xw=25,$w=200,kw=20,Aw=5,K3=200,H3=50,X3=2;function Y3(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(Y3,"xA"),o(Y3,"isIdSegment");function Q3(e){let[t="/"]=e.split("?"),r=t.split("/"),i=[];for(let n of r){if(i.length>12){i.push("\u2026");break}i.push(Y3(n)?":id":n)}let u=i.join("/");return u.length===0?"/":u}s(Q3,"H_"),o(Q3,"templatisePath");function e6(e){let t=Ie(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),i={hosts:new Map,recent:[],failures:[]},u=o(m=>{let f=m.raw??null;if(!f||f.kind!=="egress")return;let p=f.project??"unknown",g=f.host??"unknown",v=(f.method??"GET").toUpperCase(),E=f.durationMs??0,D=typeof f.status=="number"?f.status:void 0,B=f.error===void 0?void 0:String(f.error),k=B!==void 0||D!==void 0&&D>=400,_=f.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",F=`${p}|${g}`,I=i.hosts.get(F);I||(I={project:p,host:g,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:m.timestamp,recent:[],outcomes:[],firstSeenAt:m.timestamp,lastSeenAt:m.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),i.hosts.delete(F),i.hosts.set(F,I),I.count+=1,B!==void 0&&(I.errorCount+=1),D!==void 0&&D>=400&&D<500&&(I.status4xx+=1),D!==void 0&&D>=500&&(I.status5xx+=1),I.totalMs+=E,E>I.maxMs&&(I.maxMs=E,I.maxAt=m.timestamp),I.recent.push(E),I.recent.length>Vt&&I.recent.splice(0,I.recent.length-Vt),I.outcomes.push(k),I.outcomes.length>Vt&&I.outcomes.splice(0,I.outcomes.length-Vt),I.lastDurationMs=E,I.lastBad=k,I.lastSeenAt=m.timestamp,I.suppressed+=f.floodSuppressed??0;let z=Q3(_),Z=`${v} ${z}`,J=I.endpoints.get(Z);if(J||(J={method:v,path:z,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:m.timestamp}),I.endpoints.delete(Z),I.endpoints.set(Z,J),J.count+=1,B!==void 0&&(J.errorCount+=1,J.lastError=B),D!==void 0&&D>=400&&D<500&&(J.status4xx+=1),D!==void 0&&D>=500&&(J.status5xx+=1),J.totalMs+=E,E>J.maxMs&&(J.maxMs=E),J.recent.push(E),J.recent.length>Vt&&J.recent.splice(0,J.recent.length-Vt),J.lastStatus=D,J.lastDurationMs=E,J.lastSeenAt=m.timestamp,I.endpoints.size>kw){let Ce=I.endpoints.keys().next().value;Ce!==void 0&&I.endpoints.delete(Ce)}if(i.hosts.size>$w){let Ce=i.hosts.keys().next().value;Ce!==void 0&&i.hosts.delete(Ce)}let se=m.context??{},ue={id:m.id,timestamp:m.timestamp,project:p,method:v,host:g,path:_,...D!==void 0?{status:D}:{},...B!==void 0?{error:B}:{},durationMs:E,...se.flowId?{flowId:se.flowId}:{},...se.requestId?{requestId:se.requestId}:{}};i.recent.push(ue),i.recent.length>K3&&i.recent.splice(0,i.recent.length-K3),k&&(i.failures.push(ue),i.failures.length>H3&&i.failures.splice(0,i.failures.length-H3),e.resources.markDirty(ji)),i.lastSampleAt=Math.max(i.lastSampleAt??0,m.timestamp),i.changedAt=m.timestamp,e.resources.markDirty(Fi),e.resources.markDirty(zi)},"handler"),n=e.bus.subscribe(u),a=o(m=>{if(m.length===0)return 0;let f=[...m].sort((p,g)=>p-g);return f[Math.min(f.length-1,Math.floor(f.length*.95))]??0},"p95"),l=o(m=>m.lastDurationMs>=t||m.recent.filter(f=>f>=t).length>=X3,"isSlow"),d=o(m=>m.lastBad||m.outcomes.filter(Boolean).length>=X3,"isFailing"),c=o(m=>{let f=m.outcomes.filter(Boolean).length;return d(m)?`${f} of the last ${m.outcomes.length} call${m.outcomes.length===1?"":"s"} failed`:l(m)?`${m.recent.filter(p=>p>=t).length} of the last ${m.recent.length} call${m.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(Fi,()=>{let m=[...i.hosts.values()],f=m.filter(d),p=m.filter(g=>!d(g)&&l(g));return{schemaVersion:1,revision:e.resources.revision(Fi)??0,updatedAt:new Date(i.changedAt??r).toISOString(),thresholdMs:t,hosts:m.map(g=>({project:g.project,host:g.host,count:g.count,errorCount:g.errorCount,status4xx:g.status4xx,status5xx:g.status5xx,avgMs:Math.round(g.totalMs/Math.max(g.count,1)*10)/10,p95Ms:a(g.recent),maxMs:g.maxMs,maxAt:g.maxAt,lastDurationMs:g.lastDurationMs,firstSeenAt:g.firstSeenAt,lastSeenAt:g.lastSeenAt,slow:l(g),failing:d(g),detail:c(g),suppressedEvents:g.suppressed,endpoints:[...g.endpoints.values()].map(v=>({method:v.method,path:v.path,count:v.count,errorCount:v.errorCount,status4xx:v.status4xx,status5xx:v.status5xx,avgMs:Math.round(v.totalMs/Math.max(v.count,1)*10)/10,p95Ms:a(v.recent),maxMs:v.maxMs,...v.lastStatus!==void 0?{lastStatus:v.lastStatus}:{},...v.lastError!==void 0?{lastError:v.lastError}:{},lastSeenAt:v.lastSeenAt})).sort((v,E)=>E.maxMs-v.maxMs).slice(0,Aw)})).sort((g,v)=>g.failing!==v.failing?g.failing?-1:1:v.maxMs-g.maxMs).slice(0,xw),hostsTracked:i.hosts.size,failingHosts:f.length,slowHosts:p.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${i.hosts.size} external host${i.hosts.size===1?"":"s"} observed; ${f.length} failing, ${p.length} slower than ${t}ms.`}}),e.resources.register(zi,()=>({schemaVersion:1,revision:e.resources.revision(zi)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.recent],count:i.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${i.recent.length} recent outbound call${i.recent.length===1?"":"s"}.`})),e.resources.register(ji,()=>({schemaVersion:1,revision:e.resources.revision(ji)??0,updatedAt:new Date(i.changedAt??r).toISOString(),entries:[...i.failures],count:i.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:i.lastSampleAt,producer:i.lastSampleAt===void 0?"none":"connected",detail:i.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${i.failures.length} failed outbound call${i.failures.length===1?"":"s"} held.`})),{unsubscribe:n,uris:[Fi,zi,ji]}}s(e6,"eh"),o(e6,"installNetReducer");import{App as _w}from"@frontmcp/sdk";import{Resource as Iw,ResourceContext as Sw}from"@frontmcp/sdk";var Jd=class extends Sw{static{s(this,"th")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(R).read("visual://current")}};Jd=$([Iw({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],Jd);var Fw=Jd;import{Resource as zw,ResourceContext as jw}from"@frontmcp/sdk";var Gd=class extends jw{static{s(this,"nh")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(R).read("visual://violations/current")}};Gd=$([zw({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],Gd);var Rw=Gd;import{Resource as Ow,ResourceContext as Tw}from"@frontmcp/sdk";var Wd=class extends Tw{static{s(this,"ih")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(R).read("visual://violations/stable")}};Wd=$([Ow({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],Wd);var Nw=Wd;import{Resource as Pw,ResourceContext as Uw}from"@frontmcp/sdk";var Kd=class extends Uw{static{s(this,"ah")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(R).read("visual://violations/during-animation")}};Kd=$([Pw({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],Kd);var Mw=Kd;import{Resource as Zw,ResourceContext as Lw}from"@frontmcp/sdk";var Hd=class extends Lw{static{s(this,"uh")}static{o(this,"VisualRulesResource")}async execute(){return this.get(R).read("visual://rules")}};Hd=$([Zw({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],Hd);var qw=Hd;import{Resource as Vw,ResourceContext as Jw}from"@frontmcp/sdk";var Xd=class extends Jw{static{s(this,"dh")}static{o(this,"VisualTokensResource")}async execute(){return this.get(R).read("visual://tokens")}};Xd=$([Vw({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],Xd);var Gw=Xd;import{Tool as Ww,ToolContext as Kw,z as t6}from"@frontmcp/sdk";import{existsSync as Hw,mkdirSync as Xw,readFileSync as Yw,writeFileSync as Qw}from"node:fs";import{dirname as eC,join as Yd}from"node:path";function Qd(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?eC(r):Yd(t,".lensmcp")}s(Qd,"Xs"),o(Qd,"captureDir");function u6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(u6,"CA"),o(u6,"pidAlive");function ec(e,t=u6){let r=Yd(e,I5);try{if(!Hw(r))return;let i=JSON.parse(Yw(r,"utf8"));return typeof i?.pid!="number"||!Number.isFinite(i.pid)?void 0:t(i.pid)?i:void 0}catch{return}}s(ec,"Hs"),o(ec,"liveRunner");function r6(e,t){try{return Xw(e,{recursive:!0}),Qw(Yd(e,_5),JSON.stringify(t)),!0}catch{return!1}}s(r6,"Y_"),o(r6,"publishCaptureRequest");var tc;async function n6(e,t){let r=tc;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let i=t().finally(()=>{tc=void 0});return tc={promise:i,requestId:e},{fresh:await i,coalesced:!1,requestId:e}}s(n6,"Q_"),o(n6,"captureSingleFlight");async function i6(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),i=e.budgetMs??8e3,u=e.pollMs??100,n=t()+i;for(;t()<n;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(i6,"ew"),o(i6,"waitForFreshFrame");var uc=class extends Kw{static{s(this,"gh")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(Ku),r=this.get(R),i=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await i(),n=Oe(),a=Date.now();t.publish({id:Oe(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:n}});let l=Qd(),d=ec(l),c=!1,m=await n6(n,async()=>(c=r6(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:n}),c&&d?await i6({readFrameId:i,before:u}):!1));return{requested:m.coalesced?!0:c,cause:e.cause,stable:e.stable,fresh:m.fresh,coalesced:m.coalesced,requestId:m.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};uc=$([Ww({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:t6.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:t6.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],uc);var tC=uc;import{Tool as uC,ToolContext as rC,z as nC}from"@frontmcp/sdk";var rc=class extends rC{static{s(this,"vh")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(R).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(i=>i.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};rc=$([uC({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:nC.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],rc);var iC=rc;import{Tool as sC,ToolContext as aC,z as oC}from"@frontmcp/sdk";var nc=class extends aC{static{s(this,"bh")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(R).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};nc=$([sC({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:oC.string().optional().describe("Optional frame id; defaults to the latest.")}})],nc);var lC=nc;import{Tool as dC,ToolContext as cC,z as mC}from"@frontmcp/sdk";var ic=class extends cC{static{s(this,"_h")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(R).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:s6(t)}:{found:!1,violationId:e.violationId}}};ic=$([dC({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:mC.string().describe("Id of the violation as seen in visual://violations/current.")}})],ic);var pC=ic;function s6(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
71
- `)}s(s6,"XA"),o(s6,"buildExplanation");import{Tool as fC,ToolContext as gC,z as be}from"@frontmcp/sdk";import{mkdirSync as hC,readFileSync as vC,renameSync as yC,writeFileSync as EC}from"node:fs";import{join as DC}from"node:path";var bC=500;function a6(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(a6,"nz"),o(a6,"pidAlive");function o6(e){try{let t=JSON.parse(vC(e,"utf8"));return Array.isArray(t?.rules)?t.rules:[]}catch{return[]}}s(o6,"oz"),o(o6,"readEntries");function l6(e,t,r={}){let i=r.pid??process.pid,u=r.isAlive??a6,n=DC(e,S5),a=[...o6(n).filter(d=>typeof d?.registeredBy=="number"&&typeof d?.rule?.id=="string"&&d.rule.id!==t.id&&(d.registeredBy===i||u(d.registeredBy))),{rule:t,registeredBy:i,registeredAt:(r.now??Date.now)()}].slice(-bC);hC(e,{recursive:!0});let l=`${n}.${i}.tmp`;return EC(l,JSON.stringify({schemaVersion:1,rules:a})),yC(l,n),a}s(l6,"rw"),o(l6,"registerSessionRule");var sc=class extends gC{static{s(this,"$h")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(Ku),r=this.get(R),i={id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints};t.publish({id:Oe(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:i}});let u=Qd(),n=!1,a;try{l6(u,i),n=ec(u)!==void 0,a=n?"The capture runner evaluates this rule on the next captured frame (visual.capture_frame).":"No capture runner is listening, so nothing will evaluate this rule until one starts (the dev cluster gateway or agent-dev). It is listed, not enforced."}catch(l){a=`Could not hand the rule to the capture runner (${l.message}). It is listed, but will NOT be evaluated.`}return{registered:!0,evaluated:n,note:a,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};sc=$([fC({name:"visual.register_rule",description:"Register (or replace) a visual rule. It is handed to the capture runner, which evaluates it on every frame captured from now on, for as long as this lens server runs. The result says whether a runner is listening; if `evaluated` is false the rule is only listed, and no violation can come of it.",inputSchema:{id:be.string().describe("Stable rule id; replaces a prior rule with the same id."),type:be.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:be.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:be.enum(["info","warning","error"]).default("warning"),timing:be.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:be.record(be.string(),be.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:be.record(be.string(),be.record(be.string(),be.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],sc);var BC=sc,ac=class{static{s(this,"Gn")}static{o(this,"VisualApp")}};ac=$([_w({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[Fw,Rw,Nw,Mw,qw,Gw],tools:[tC,iC,lC,pC,BC]})],ac);var lr="visual://current",dr="visual://violations/current",cr="visual://violations/stable",mr="visual://violations/during-animation",pr="visual://rules",fr="visual://tokens";function d6(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},i=o((p,g)=>{r.changedAt.set(p,g),e.resources.markDirty(p)},"touch"),u=o(p=>{i(dr,p),i(cr,p),i(mr,p)},"touchViolationViews"),n=o(p=>{let g=p.raw??null;if(g?.kind)switch(g.kind){case"visual-frame":{let v=g.frame;if(!v)return;r.currentFrame=v,r.lastFrameAt=p.timestamp,r.framesSeen+=1,r.rulesEvaluated=typeof g.rulesEvaluated=="number"?g.rulesEvaluated:void 0,i(lr,p.timestamp);let E=r.violations.length;r.violations=r.violations.filter(D=>D.frameId===v.id),E!==r.violations.length&&u(p.timestamp);return}case"visual-violation":if(!g.violation)return;r.violations.push(g.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(p.timestamp);return;case"visual-rule-registered":{let v=g.rule;if(!v)return;let E=r.rules.findIndex(D=>D.id===v.id);E>=0&&r.rules.splice(E,1),r.rules.push(v),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),i(pr,p.timestamp);return}case"visual-tokens-loaded":if(!g.tokens)return;r.tokens=g.tokens,i(fr,p.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(n),l=o(p=>new Date(r.changedAt.get(p)??t).toISOString(),"stamp"),d="No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.",c=o(()=>`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured`,"frameCount"),m=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,...r.rulesEvaluated!==void 0?{rulesEvaluated:r.rulesEvaluated}:{},producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?d:r.rulesEvaluated===void 0?`${c()}; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered.`:`${c()}; ${r.rulesEvaluated} rule${r.rulesEvaluated===1?"":"s"} evaluated on the current one.`}),"frameHealth"),f=o(()=>{let p=m();return r.framesSeen===0||r.rulesEvaluated===void 0?r.framesSeen===0?p:{...p,detail:`${p.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}:r.rulesEvaluated===0?{...p,producer:"none",detail:`${c()}, but NO rule was evaluated on the current one \u2014 an empty violation list is NOT evidence the UI is correct, nothing is being checked. Add rules to \`lensmcp.rules.json\` at the workspace root, or register one with visual.register_rule.`}:{...p,detail:`${p.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}},"violationHealth");return e.resources.register(lr,()=>({schemaVersion:1,revision:e.resources.revision(lr)??0,updatedAt:l(lr),frame:r.currentFrame??null,...m()})),e.resources.register(dr,()=>({schemaVersion:1,revision:e.resources.revision(dr)??0,updatedAt:l(dr),violations:r.violations.slice(),...f()})),e.resources.register(cr,()=>({schemaVersion:1,revision:e.resources.revision(cr)??0,updatedAt:l(cr),violations:r.violations.filter(p=>p.timing==="after-animation"||p.timing==="stable-only"||p.timing==="always"),...f()})),e.resources.register(mr,()=>({schemaVersion:1,revision:e.resources.revision(mr)??0,updatedAt:l(mr),violations:r.violations.filter(p=>p.timing==="during-animation"),...f()})),e.resources.register(pr,()=>({schemaVersion:1,revision:e.resources.revision(pr)??0,updatedAt:l(pr),rules:r.rules.slice()})),e.resources.register(fr,()=>({schemaVersion:1,revision:e.resources.revision(fr)??0,updatedAt:l(fr),tokens:r.tokens??null})),{unsubscribe:a,uris:[lr,dr,cr,mr,pr,fr]}}s(d6,"Sh"),o(d6,"installVisualReducer");import{App as wC}from"@frontmcp/sdk";import{Resource as CC,ResourceContext as xC}from"@frontmcp/sdk";var oc=class extends xC{static{s(this,"Ih")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(R).read("react://pages/current")}};oc=$([CC({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],oc);var $C=oc;import{Resource as kC,ResourceContext as AC}from"@frontmcp/sdk";var lc=class extends AC{static{s(this,"Th")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(R).read("react://components/hot")}};lc=$([kC({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],lc);var _C=lc;import{Resource as IC,ResourceContext as SC}from"@frontmcp/sdk";var dc=class extends SC{static{s(this,"Ah")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(R).read("react://renders/slow")}};dc=$([IC({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],dc);var FC=dc;import{Resource as zC,ResourceContext as jC}from"@frontmcp/sdk";var cc=class extends jC{static{s(this,"jh")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(R).read("react://renders/recent")}};cc=$([zC({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],cc);var RC=cc;import{Resource as OC,ResourceContext as TC}from"@frontmcp/sdk";var mc=class extends TC{static{s(this,"Ph")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(R).read("react://effects/recent")}};mc=$([OC({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],mc);var NC=mc;import{Resource as PC,ResourceContext as UC}from"@frontmcp/sdk";var pc=class extends UC{static{s(this,"Dh")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(R).read("react://memos/recomputed")}};pc=$([PC({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],pc);var MC=pc;import{Resource as ZC,ResourceContext as LC}from"@frontmcp/sdk";var fc=class extends LC{static{s(this,"Ch")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(R).read("react://hooks/recent")}};fc=$([ZC({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],fc);var qC=fc;import{Tool as VC,ToolContext as JC,z as gc}from"@frontmcp/sdk";var hc=class extends JC{static{s(this,"Fh")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(R).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentInstanceId===e.componentInstanceId){r=n;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let n=t.renders[u];if(n&&n.componentLogicalId===e.componentLogicalId){r=n;break}}if(!r)return{found:!1,searched:e};let i=(r.why??[]).map(u=>({...u,summary:c6(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:i,parentRenderId:r.parentRenderId}}};hc=$([VC({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:gc.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:gc.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:gc.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],hc);var GC=hc;function c6(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(c6,"kz"),o(c6,"summariseWhy");var vc=class{static{s(this,"Qn")}static{o(this,"ReactApp")}};vc=$([wC({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[$C,_C,FC,RC,NC,MC,qC],tools:[GC]})],vc);var gr="react://pages/current",Ri="react://components/hot",Oi="react://renders/slow",Ti="react://renders/recent",Ni="react://effects/recent",Pi="react://memos/recomputed",Ui="react://hooks/recent",Mi=100,yc=50,m6=500;function p6(e){let t=Ie(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},i=o(n=>{if(n.source!=="react")return;let a=n.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(Jt(r.rendersRecent,l,Mi),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>m6){for(let c of r.rendersByInstance.keys())if(r.rendersByInstance.delete(c),r.rendersByInstance.size<=m6)break}l.actualDurationMs>=t&&(Jt(r.rendersSlow,l,yc),r.rendersSlow.sort((c,m)=>m.actualDurationMs-c.actualDurationMs),r.rendersSlow.length>yc&&(r.rendersSlow.length=yc));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(gr)),e.resources.markDirty(Ti),e.resources.markDirty(Ri),l.actualDurationMs>=t&&e.resources.markDirty(Oi);return}case"effect-run":{let l=a.effect;if(!l)return;Jt(r.effectsRecent,l,Mi),e.resources.markDirty(Ni);return}case"hook-run":{let l=a.hook;if(!l)return;Jt(r.hooksRecent,l,Mi),e.resources.markDirty(Ui),l.recomputed&&l.hookType==="useMemo"&&(Jt(r.memosRecomputed,l,Mi),e.resources.markDirty(Pi));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:n.timestamp},e.resources.markDirty(gr));return}default:return}},"handler"),u=e.bus.subscribe(i);return e.resources.register(gr,()=>({schemaVersion:1,revision:e.resources.revision(gr)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(Ri,()=>({schemaVersion:1,revision:e.resources.revision(Ri)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((n,a)=>a.renderCount-n.renderCount)})),e.resources.register(Oi,()=>({schemaVersion:1,revision:e.resources.revision(Oi)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(Ti,()=>({schemaVersion:1,revision:e.resources.revision(Ti)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(Ni,()=>({schemaVersion:1,revision:e.resources.revision(Ni)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(Pi,()=>({schemaVersion:1,revision:e.resources.revision(Pi)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(Ui,()=>({schemaVersion:1,revision:e.resources.revision(Ui)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[gr,Ri,Oi,Ti,Ni,Pi,Ui],lookups:{latestRenderFor(n){return r.rendersByInstance.get(n)},latestRenderForLogical(n){if(r.hotByLogical.get(n))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===n)return l}}}}}s(p6,"Vh"),o(p6,"installReactReducer");function Jt(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Jt,"to"),o(Jt,"pushBounded");import{App as WC}from"@frontmcp/sdk";import{Resource as KC,ResourceContext as HC}from"@frontmcp/sdk";var Ec=class extends HC{static{s(this,"qh")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(R).read("valtio://updates/recent")}};Ec=$([KC({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],Ec);var XC=Ec;import{Resource as YC,ResourceContext as QC}from"@frontmcp/sdk";var Dc=class extends QC{static{s(this,"Jh")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(R).read("valtio://stores")}};Dc=$([YC({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],Dc);var ex=Dc;import{Resource as tx,ResourceContext as ux}from"@frontmcp/sdk";var bc=class extends ux{static{s(this,"Wh")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(R).read("valtio://subscribers")}};bc=$([tx({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],bc);var rx=bc,Bc=class{static{s(this,"ro")}static{o(this,"ValtioApp")}};Bc=$([WC({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[XC,ex,rx]})],Bc);var Zi="valtio://updates/recent",Li="valtio://stores",hr="valtio://subscribers",f6=100,g6=1e3,nx=1e3,ix=256,sx=256;function h6(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let i=r.next();if(i.done)break;e.delete(i.value)}}s(h6,"Dz"),o(h6,"capSet");function wc(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,ix):typeof e.path=="string"?[e.path]:[]}s(wc,"sw"),o(wc,"subscriptionPaths");function Cc(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(Cc,"aw"),o(Cc,"subscriberId");function v6(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let n=u.raw??null;if(n?.kind)switch(n.kind){case"state-update":{let a=n.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>f6&&t.updates.splice(0,t.updates.length-f6);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>g6){for(let c of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(c),t.latestUpdateByPath.size<=g6)break}e.resources.markDirty(Zi);return}case"store-created":{let a=n.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(Li);return}case"subscription-added":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=Cc(a);for(let d of wc(a)){let c=`${a.storeId}::${d}`,m=t.subscribers.get(c);m||(m=new Map,t.subscribers.set(c,m));let f=m.get(l);f||(f=new Set,m.set(l,f)),f.add(a.componentInstanceId),lt(m,Hu),h6(f,sx)}lt(t.subscribers,nx),e.resources.markDirty(hr);return}case"subscription-removed":{let a=n.subscription;if(!a||!a.componentInstanceId)return;let l=Cc(a);for(let d of wc(a)){let c=`${a.storeId}::${d}`,m=t.subscribers.get(c);if(!m)continue;let f=m.get(l);f&&(f.delete(a.componentInstanceId),f.size===0&&m.delete(l)),m.size===0&&t.subscribers.delete(c)}e.resources.markDirty(hr);return}default:return}},"handler"),i=e.bus.subscribe(r);return e.resources.register(Zi,()=>({schemaVersion:1,revision:e.resources.revision(Zi)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(Li,()=>({schemaVersion:1,revision:e.resources.revision(Li)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(hr,()=>({schemaVersion:1,revision:e.resources.revision(hr)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,n])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...n.keys()]}})})),{unsubscribe:i,uris:[Zi,Li,hr],lookups:{latestUpdateForPath(u,n){return t.latestUpdateByPath.get(`${u}::${n}`)},subscribersFor(u,n){return[...t.subscribers.get(`${u}::${n}`)?.keys()??[]]}}}}s(v6,"Hh"),o(v6,"installValtioReducer");import{App as ax}from"@frontmcp/sdk";import{Resource as ox,ResourceContext as lx}from"@frontmcp/sdk";var xc=class extends lx{static{s(this,"Yh")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(R).read("graph://patterns")}};xc=$([ox({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],xc);var dx=xc;import{Resource as cx,ResourceContext as mx}from"@frontmcp/sdk";var $c=class extends mx{static{s(this,"ev")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(R).read("graph://performance/event-loop-lag")}};$c=$([cx({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],$c);var px=$c;import{Tool as fx,ToolContext as gx,z as hx}from"@frontmcp/sdk";var y6;function kc(e){y6=e}s(kc,"aa"),o(kc,"setActiveGraphBuffer");function vr(){return y6?.events??[]}s(vr,"ht"),o(vr,"currentEvents");function ft(){let e=new F4;return av(e,vr()),e}s(ft,"Ee"),o(ft,"buildGraph");var Ac=class extends gx{static{s(this,"rv")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=ft().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};Ac=$([fx({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:hx.string().describe("Node id (usually the originating event id).")}})],Ac);var vx=Ac;import{Tool as yx,ToolContext as Ex,z as Gt}from"@frontmcp/sdk";var Dx=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],_c=class extends Ex{static{s(this,"ov")}static{o(this,"GraphTraverseTool")}async execute(e){let t=ft().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};_c=$([yx({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:Gt.string().describe("Start node id."),lens:Gt.array(Gt.enum(Dx)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:Gt.number().int().positive().max(12).default(4),direction:Gt.enum(["out","in","both"]).default("both"),maxNodes:Gt.number().int().positive().max(1e3).default(200)}})],_c);var bx=_c;import{Tool as Bx,ToolContext as wx,z as Cx}from"@frontmcp/sdk";var Ic=class extends wx{static{s(this,"sv")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=dl(vr(),{threshold:e.threshold});return{count:t.length,matches:t}}};Ic=$([Bx({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:Cx.number().int().positive().default(5)}})],Ic);var xx=Ic;import{Tool as $x,ToolContext as kx,z as Ax}from"@frontmcp/sdk";var Sc=class extends kx{static{s(this,"cv")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=ft(),r=new Map,i=vr(),u=e.from?[e.from]:i.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of i){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(c=>c.from===l.id).map(c=>c.to))}let n=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=nv(u.length?u:i.map(l=>l.id),r,n);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};Sc=$([$x({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:Ax.string().optional().describe("Start node id; defaults to all flow origins.")}})],Sc);var _x=Sc;import{Tool as Ix,ToolContext as Sx,z as E6}from"@frontmcp/sdk";var Fc=class extends Sx{static{s(this,"lv")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=ft(),r=e.originNodeId;if(!t.getNode(r)){let n=vr().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);n&&(r=n.id)}let i=t.getNode(r);if(!i)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:i.name,type:i.type},nodeCount:u.nodes.length,nodes:u.nodes.map(n=>({id:n.id,type:n.type,name:n.name,durationMs:n.durationMs}))}}};Fc=$([Ix({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:E6.string().describe("Origin node id, logicalId, or originating event id."),depth:E6.number().int().positive().max(12).default(6)}})],Fc);var Fx=Fc;import{Tool as zx,ToolContext as jx,z as D6}from"@frontmcp/sdk";var zc=class extends jx{static{s(this,"pv")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=ft();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(i=>({id:i.id,name:i.name,logicalId:i.logicalId}))}}};zc=$([zx({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:D6.string().describe("Origin node id."),depth:D6.number().int().positive().max(12).default(6)}})],zc);var Rx=zc;import{Tool as Ox,ToolContext as Tx,z as b6}from"@frontmcp/sdk";var jc=class extends Tx{static{s(this,"fv")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=ft();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(i=>i.type==="server-request");return{found:!0,count:r.length,requests:r.map(i=>({id:i.id,name:i.name,durationMs:i.durationMs}))}}};jc=$([Ox({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:b6.string().describe("UI origin node id (e.g. the user-action event id)."),depth:b6.number().int().positive().max(12).default(8)}})],jc);var Nx=jc,Rc=class{static{s(this,"oo")}static{o(this,"GraphApp")}};Rc=$([ax({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[dx,px],tools:[vx,bx,xx,_x,Fx,Rx,Nx]})],Rc);var Wt="graph://patterns",Kt="graph://performance/event-loop-lag",Oc=2e3,B6=8*1024*1024,Px=100,w6=100;function C6(e){let t=Ie(e.thresholds),r=(e.now??(()=>Date.now()))(),i={events:[]},u=[],n=0,a=0,l=0,d=new Set,c=[],m=new Map,f,p=new Map,g=o(F=>{switch(F.kind){case"n+1-query":return`n+1:${String(F.details.signature??"")}`;case"render-storm":return`storm:${String(F.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${F.evidence[0]??""}`;default:return`${F.kind}:${F.evidence.join(",")}`}},"patternKey"),v=o(F=>{m.set(Wt,F),e.resources.markDirty(Wt)},"markPatterns"),E=o((F,I)=>{let z=g(F);if(p.delete(z),p.set(z,F),p.size>Px){let Z=p.keys().next().value;Z!==void 0&&p.delete(Z)}v(I)},"pushPattern"),D=o(F=>{let I=!1;for(let[z,Z]of p){if(Z.evidence.length===0)continue;let J=Z.evidence.filter(se=>d.has(se));if(J.length===0){p.delete(z),I=!0;continue}J.length!==Z.evidence.length&&(Z.evidence=J,I=!0)}I&&v(F)},"dropUnevidencedPatterns"),B=o(F=>{f=F.timestamp;let I=Hn(F);i.events.push(F),u.push(I),n+=I,d.add(F.id);let z=Math.max(0,i.events.length-Oc),Z=n;for(let ue=0;ue<z;ue+=1)Z-=u[ue]??0;let J=0;for(;Z>B6&&z<u.length;)Z-=u[z]??0,z+=1,J+=1;if(z>0){let ue=i.events.splice(0,z);u.splice(0,z),n=Math.max(0,Z),a+=ue.length,l+=J;for(let Ce of ue)d.delete(Ce.id);D(F.timestamp)}let se=F.raw??null;if(se?.kind==="loop")for(let ue of dl(i.events,{threshold:t.dbInLoop}))E(ue,F.timestamp);if(se?.kind==="db-query")for(let ue of uv(i.events,{threshold:t.nPlusOne}))E(ue,F.timestamp);if(F.source==="react"&&se?.kind==="render")for(let ue of rv(i.events,{threshold:t.renderStorm}))E(ue,F.timestamp);F.source==="perf"&&se?.kind==="event-loop-lag"&&typeof se.lagMs=="number"&&(c.push({at:F.timestamp,lagMs:se.lagMs,source:F.source}),c.length>w6&&c.splice(0,c.length-w6),m.set(Kt,F.timestamp),e.resources.markDirty(Kt))},"handler"),k=e.bus.subscribe(B);kc(i);let _=o(F=>new Date(m.get(F)??r).toISOString(),"stamp");return e.resources.register(Wt,()=>({schemaVersion:1,revision:e.resources.revision(Wt)??0,updatedAt:_(Wt),patterns:[...p.values()],eventsBuffered:i.events.length,eventBufferCapacity:Oc,lastEventAt:f,producer:f===void 0?"none":"connected"})),e.resources.register(Kt,()=>({schemaVersion:1,revision:e.resources.revision(Kt)??0,updatedAt:_(Kt),samples:c.slice(),maxLagMs:c.reduce((F,I)=>Math.max(F,I.lagMs),0),lastEventAt:f})),{unsubscribe:o(()=>{kc(void 0),k()},"unsubscribe"),uris:[Wt,Kt],retentionStats:o(()=>({residentEvents:i.events.length,residentBytes:n,evictedEvents:a,evictedForBytes:l,eventCap:Oc,byteCap:B6}),"retentionStats")}}s(C6,"vv"),o(C6,"installGraphReducer");import{App as Ux}from"@frontmcp/sdk";import{Resource as Mx,ResourceContext as Zx}from"@frontmcp/sdk";var Tc=class extends Zx{static{s(this,"yv")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(R).read("memory://current")}};Tc=$([Mx({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],Tc);var Lx=Tc;import{Resource as qx,ResourceContext as Vx}from"@frontmcp/sdk";var Nc=class extends Vx{static{s(this,"xv")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(R).read("memory://owners")}};Nc=$([qx({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],Nc);var Jx=Nc;import{Resource as Gx,ResourceContext as Wx}from"@frontmcp/sdk";var Pc=class extends Wx{static{s(this,"wv")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(R).read("memory://owners/growing")}};Pc=$([Gx({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],Pc);var Kx=Pc;import{Resource as Hx,ResourceContext as Xx}from"@frontmcp/sdk";var Uc=class extends Xx{static{s(this,"kv")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(R).read("memory://leaks/suspected")}};Uc=$([Hx({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],Uc);var Yx=Uc;import{Tool as Qx,ToolContext as e$,z as t$}from"@frontmcp/sdk";var x6;function Mc(e){x6=e}s(Mc,"ca"),o(Mc,"setActiveMemoryLookups");function qi(){return x6}s(qi,"zt"),o(qi,"activeMemoryLookups");var Zc=class extends e${static{s(this,"Iv")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=qi();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};Zc=$([Qx({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:t$.string().describe("Flow id.")}})],Zc);var u$=Zc;import{Tool as r$,ToolContext as n$,z as i$}from"@frontmcp/sdk";var Lc=class extends n${static{s(this,"Tv")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=qi();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};Lc=$([r$({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:i$.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],Lc);var s$=Lc;import{Tool as a$,ToolContext as o$,z as l$}from"@frontmcp/sdk";var qc=class extends o${static{s(this,"Av")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=qi();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let i,u;if(r.kind==="retention"){let n=r.detail;i=`Owner ${n.ownerId} grew by ${n.growth} items during flow ${n.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let n=r.detail;i=`Disposed singleton ${n.logicalId} (generation ${n.generation}) still retains ${n.retainedBytes} bytes \u2014 a stale generation kept alive after HMR/reload.`,u="Ensure listeners/timers registered by the old instance are removed in the dispose hook (OnModuleDestroy / cleanup), so the previous generation can be garbage-collected."}return{found:!0,leak:r,narrative:i,recommendation:u}}};qc=$([a$({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner, which flow, what grew, and a remediation hint.",inputSchema:{leakIndex:l$.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],qc);var d$=qc,Vc=class{static{s(this,"io")}static{o(this,"MemoryApp")}};Vc=$([Ux({id:"memory",name:"Memory",description:"Container-owner growth tracking + suspect-leak / stale-generation detection. Hosts memory.explain_leak.",resources:[Lx,Jx,Kx,Yx],tools:[u$,s$,d$]})],Vc);var yr="memory://current",Er="memory://owners",Dr="memory://owners/growing",gt="memory://leaks/suspected",c$=200,$6=50,m$=500;function k6(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},i=o((E,D)=>{r.changedAt.set(E,D),e.resources.markDirty(E)},"touch"),u=o((E,D)=>{if(r.leaks.delete(E),r.leaks.set(E,D),r.leaks.size>c$){let B=r.leaks.keys().next().value;B!==void 0&&r.leaks.delete(B)}},"pushLeak"),n=new Map,a=o((E,D)=>{E!==D&&(n.delete(E),n.set(E,D),n.size>5e3&&n.delete(n.keys().next().value))},"noteRequestFlow"),l=o((E,D)=>{if(E.flowIds.add(D),E.flowIds.size>$6){for(let B of E.flowIds)if(E.flowIds.delete(B),E.flowIds.size<=$6)break}},"noteFlow"),d=o((E,D,B)=>{let k=r.owners.get(E);if(k||(k={ownerId:E,itemCount:D,estimatedBytes:0,startCount:D,mutations:0,flowIds:new Set,lastMutatedAt:B}),r.owners.delete(E),r.owners.set(E,k),r.owners.size>m$){let _=r.owners.keys().next().value;_!==void 0&&_!==E&&r.owners.delete(_)}return k},"ensure"),c=o((E,D)=>{let B=!1;for(let[k,_]of r.leaks){if(_.kind!=="retention"||_.ownerId!==E)continue;let F=_.detail.startCount;typeof F=="number"&&D<=F&&(r.leaks.delete(k),B=!0)}return B},"retractReleasedRetentions"),m=o(E=>{if(E.source!=="memory"&&E.source!=="perf")return;let D=E.raw??null;if(D?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,E.timestamp),D.kind){case"memory-mutation":{if(!D.mutation)return;let B=D.mutation,k=d(B.ownerNodeId,B.beforeCount??B.afterCount,E.timestamp);k.itemCount=B.afterCount,k.estimatedBytes=B.afterCount*64,k.mutations+=1,k.lastMutatedAt=E.timestamp,E.context.flowId&&l(k,E.context.flowId),E.context.requestId&&E.context.flowId&&a(E.context.requestId,E.context.flowId),i(Er,E.timestamp),i(Dr,E.timestamp),c(B.ownerNodeId,B.afterCount)&&i(gt,E.timestamp);return}case"memory-retention":{if(!D.retention)return;let B=D.retention,k=B.requestId?B.flowId:n.get(B.flowId)??B.flowId;u(`retention:${B.ownerId}:${k}`,{kind:"retention",ownerId:B.ownerId,flowId:k,detail:{...B,flowId:k},at:E.timestamp}),i(gt,E.timestamp);return}case"singleton-stale-generation":{if(!D.staleGeneration)return;let B=D.staleGeneration;u(`stale:${B.logicalId}:${B.generation}`,{kind:"stale-generation",logicalId:B.logicalId,detail:{...B},at:E.timestamp}),i(gt,E.timestamp);return}case"process-memory":{if(!D.memory)return;r.current={...D.role?{role:D.role}:{},heapUsed:D.memory.heapUsed,heapTotal:D.memory.heapTotal,rss:D.memory.rss,external:D.memory.external,arrayBuffers:D.memory.arrayBuffers,at:E.timestamp},i(yr,E.timestamp);return}default:return}},"handler"),f=e.bus.subscribe(m),p=o(E=>new Date(r.changedAt.get(E)??t).toISOString(),"stamp"),g=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(yr,()=>({schemaVersion:1,revision:e.resources.revision(yr)??0,updatedAt:p(yr),current:r.current??null})),e.resources.register(Er,()=>({schemaVersion:1,revision:e.resources.revision(Er)??0,updatedAt:p(Er),owners:[...r.owners.values()].map(Jc),...g()})),e.resources.register(Dr,()=>({schemaVersion:1,revision:e.resources.revision(Dr)??0,updatedAt:p(Dr),owners:[...r.owners.values()].map(Jc).filter(E=>E.growthSinceStart>0).sort((E,D)=>D.growthSinceStart-E.growthSinceStart).slice(0,20),...g()})),e.resources.register(gt,()=>({schemaVersion:1,revision:e.resources.revision(gt)??0,updatedAt:p(gt),suspected:[...r.leaks.values()],...g()}));let v={ownersMutatedByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E))},growthByFlow(E){return[...r.owners.values()].filter(D=>D.flowIds.has(E)).map(D=>({ownerId:D.ownerId,growth:D.itemCount-D.startCount}))},flowsThatMutatedOwner(E){let D=r.owners.get(E);return D?[...D.flowIds]:[]},getLeak(E){return[...r.leaks.values()][E]},allLeaks(){return[...r.leaks.values()]}};return Mc(v),{unsubscribe:o(()=>{Mc(void 0),f()},"unsubscribe"),uris:[yr,Er,Dr,gt],lookups:v}}s(k6,"jv"),o(k6,"installMemoryReducer");function Jc(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(Jc,"hw"),o(Jc,"toOwnerView");function A6(){let{session:e,providers:t}=mv(),r=Dv(),i=bv();for(let E of i.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${E}`);D3({bus:e.bus,resources:e.resources}),B3({bus:e.bus,resources:e.resources}),C3({bus:e.bus,resources:e.resources}),$3({bus:e.bus,resources:e.resources}),I3({bus:e.bus,resources:e.resources}),O3({bus:e.bus,resources:e.resources}),T3({bus:e.bus,resources:e.resources}),N3({bus:e.bus,resources:e.resources}),U3({bus:e.bus,resources:e.resources,thresholds:r}),V3({bus:e.bus,resources:e.resources,thresholds:r}),W3({bus:e.bus,resources:e.resources,thresholds:r}),e6({bus:e.bus,resources:e.resources,thresholds:r}),d6({bus:e.bus,resources:e.resources}),p6({bus:e.bus,resources:e.resources,thresholds:r}),v6({bus:e.bus,resources:e.resources});let u=c3({bus:e.bus,resources:e.resources,flows:i});e.registerReducerRetention("flow",u.retentionStats),p3({resources:e.resources});let n=C6({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",n.retentionStats),k6({bus:e.bus,resources:e.resources}),Hv({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,c=o(()=>{let E=process.memoryUsage(),D=Date.now(),B=E.rss>=l;B&&D-d>=5*6e4&&(d=D,console.warn(`[lensmcp] high process memory: rss=${Math.round(E.rss/1024/1024)}MB heap=${Math.round(E.heapUsed/1024/1024)}MB`)),e.bus.publish({id:Oe(),sessionId:e.id,timestamp:D,source:"perf",category:"runtime",severity:B?"warning":"info",context:{sessionId:e.id},fingerprint:j4({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:E.rss,heapUsed:E.heapUsed,heapTotal:E.heapTotal,external:E.external,arrayBuffers:E.arrayBuffers}}})},"publishProcessMemory");c();let m=setInterval(c,a);m.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(m),"stop")});let f=1200,p=new Map,g=e.bus.subscribe(E=>{let D=E.context.flowId;if(!D)return;let B=p.get(D);B&&clearTimeout(B);let k=setTimeout(()=>{p.delete(D);try{let _=pt()?.getFlowEvents(D);if(!_||_.length===0)return;let F=Xi(_,{flowId:D});F&&Gl(F)}catch{}},f);k.unref?.(),p.set(D,k)});e.onShutdown({name:"story-autocompile",stop:o(()=>{g();for(let E of p.values())clearTimeout(E);p.clear()},"stop")});let v=yv({bus:e.bus,sessionId:e.id,onError:o(E=>console.error("[lensmcp] ingest error:",E),"onError")});return v.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${v.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>v.stop(),"stop")}),{session:e,providers:t,ingest:v,flows:i}}s(A6,"vw"),o(A6,"createLensSession");import{App as p$}from"@frontmcp/sdk";import{Tool as f$,ToolContext as g$}from"@frontmcp/sdk";var Gc=class extends g${static{s(this,"Ov")}static{o(this,"LensmcpSessionTool")}async execute(){let e=this.get(Ot),t=this.get(R),r=_6(e);return{schemaVersion:1,revision:0,updatedAt:new Date().toISOString(),sessionId:e.id,supportedResources:t.list(),supportedTools:["lensmcp.session","observe.current_status"],supportedJobs:[],supportedChannels:[],subscribedByDefault:["agent://current-status"],transports:["stdio"],host:{platform:process.platform,node:process.version},project:{name:"lensmcp"},...r?{storage:r}:{}}}};Gc=$([f$({name:"lensmcp.session",description:"Returns the LensMCP session bootstrap response (schema version, supported resources/tools, transport info, host info).",inputSchema:{}})],Gc);var h$=Gc;function _6(e){let t=e.storageStats?.();if(!t?.storage&&!t?.clamp)return;let r=t.storage?.events,i=t.storage?.artifacts;return{eventsResident:r?.resident??0,eventsResidentBytes:r?.residentBytes??0,eventsIngested:r?.ingested??e.storage.totalEventsIngested(),eventsDropped:r?.dropped??e.storage.totalEventsDropped(),...r?{eventsDroppedForBytes:r.droppedForBytes,eventCap:r.cap,eventByteCap:r.byteCap}:{},...i?{artifactsResident:i.resident,artifactsResidentBytes:i.residentBytes,artifactsDropped:i.dropped,artifactByteCap:i.byteCap}:{},...t.clamp?{truncatedEvents:t.clamp.truncated,truncatedBytesReclaimed:t.clamp.bytesReclaimed,rawByteLimit:t.clamp.rawByteLimit}:{},...t.reducers?{reducers:t.reducers}:{}}}s(_6,"Ej"),o(_6,"readStorageStats");import{Skill as v$}from"@frontmcp/sdk";var Wc=class{static{s(this,"uo")}static{o(this,"UsingLensmcpSkill")}};Wc=$([v$({name:"using-lensmcp",description:"Drive the LensMCP lens to observe a running Vite+React+NestJS app: the install\u2192agent-dev\u2192read loop, which resource/tool answers which question, how to check build health (typecheck/lint/build/runtime/service errors) without re-running nx, and how to trace a user action across the stack.",tags:["lensmcp","observability","debugging","how-to"],priority:100,toolValidation:"ignore",tools:["observe.current_status","observe.errors","observe.dismiss_errors","graph.find_db_in_loop","graph.explain_rerender","graph.trace_from_origin","graph.find_backend_work_caused_by_click","graph.find_slow_path"],examples:[{scenario:"Verify a change to a running app instead of guessing from source",expectedOutcome:"Read nest://requests/recent + perf://slow-routes (and graph://patterns for DB issues) to see what the endpoint actually did."},{scenario:"Explain why a component re-rendered after an interaction",expectedOutcome:"Call graph.explain_rerender for the component, then graph.trace_from_origin from the click flow."}],instructions:"# Using LensMCP\n\nLensMCP is an MCP server that gives you **deterministic observability into a\nrunning Vite + React + NestJS app**. Reach for it after you change code, to\nsee what the running app actually did \u2014 not to read source. It is **zero\nconfig**: no app-code edits are required; the lens is wired in at the build\nand bootstrap layer.\n\n## The loop\n\n1. **Install once** (per workspace): `npx -y lensmcp install` \u2014 registers\n the plugin + this MCP server in the workspace .mcp.json. Then\n `nx g @lensmcp/nx-plugin:setup-vite <web>` and `:setup-nest <api>` wire each\n project (rewrites main.ts \u2192 createLensmcpNestApp; adds the Vite plugin).\n2. **Run** with capture: `nx run <project>:agent-dev` \u2014 starts the app and\n auto-captures backend spans, React renders, Valtio state, browser console/\n network, and (when a dev URL is set) real Chrome DOM/visual snapshots.\n3. **Read** the resources / call the tools below to answer your question.\n4. **If resources look empty**, run `npx lensmcp doctor --json` first \u2014 it\n reports Node, plugin registration, .mcp.json, per-project wiring, and\n agent-dev targets, each with a fix hint.\n\nResources are **live snapshots** of the running app; re-read them after you\nact. Thresholds (when a signal fires) are tunable in\n`nx.json#lensmcp.thresholds` (dbInLoop, nPlusOne, renderStorm, slowRouteMs,\nslowRenderMs).\n\n## Start here \u2014 one call for \"is anything broken?\"\n\n- Tool `observe.current_status` \u2014 the whole-workspace verdict: what is BLOCKING right\n now (typecheck / lint / build errors, browser runtime errors, wedged or crash-looping\n dev services), plus the exact resources that explain each one.\n- Tool `observe.errors` \u2014 the actual failing items, `kind`-filtered\n (`typecheck | lint | build | runtime | cluster | all`).\n\nCall these **before** running `nx typecheck` / `nx lint` for a project the dev cluster\nalready watches, and before tailing a dev-server log: the watching producers have already\ncomputed the answer.\n\n**`producer: \"none\"` is not a pass.** Every signal reports whether anything is feeding it.\nWhen it is `none`, nothing is watching and an empty error list proves nothing \u2014 treat that\ncheck as UNCHECKED and run the real command (the `detail` field names the producer to wire).\nA `stale: true` signal means \"clean as of `ageMs` ago\"; re-run if you have edited since.\n\n**A runtime error you have already EXPLAINED** \u2014 the 401 your own signed-out test browser caused,\na failure from a fixture that exists to throw \u2014 does not have to keep blocking. Tool\n`observe.dismiss_errors` (entry `ids` from `observe.errors` kind `runtime`, plus a `reason`)\nhides it. It hides, it does not fix: the error shows again the next time it happens, the reason\nis shown to the person in the dashboard, and it cannot reach a failing typecheck / lint / build\nor a broken service. Never dismiss an error you have not explained; `runtime://dismissed` lists\nwhat is hidden and `observe.restore_errors` undoes.\n\n## Decision map \u2014 question \u2192 where to look\n\n**Does it build / typecheck / lint?**\n- Tool `observe.errors` (`kind: 'typecheck' | 'lint' | 'build'`) \u2014 the items, with producer state.\n- Raw: `build://current`, `build://failures`; `typecheck://errors`; `lint://errors`, `lint://warnings`.\n\n**A request 502s / a dev service died or stopped responding?**\n- Tool `observe.errors` (`kind: 'cluster'`) or `process://cluster` \u2014 which services are up /\n down / wedged / crash-looping, restart counts, and the error lines they printed. Read this\n instead of grepping the gateway log.\n\n**Backend: what ran, and what was slow?**\n- `nest://requests/recent` \u2014 recent server requests (method, route, status, ms, flowId).\n- `perf://slow-routes` \u2014 slowest routes (\u2265 slowRouteMs).\n- `nest://providers` \u2014 every provider + scope (SINGLETON/REQUEST/TRANSIENT).\n- `trace://recent`, `trace://failed` \u2014 method-call spans.\n\n**Backend: DB problems (N+1, a query inside a loop)?**\n- `graph://patterns` \u2014 detected db-in-loop / n+1 / render-storm.\n- Tool `graph.find_db_in_loop` \u2014 on-demand scan with a threshold.\n\n**React: hot/slow components and why they render?**\n- `react://components/hot` \u2014 render counts; `react://renders/slow` \u2014 slow renders.\n- `react://renders/recent`, `react://effects/recent`, `react://hooks/recent`, `react://memos/recomputed`.\n- Tool `graph.explain_rerender` \u2014 why a specific component re-rendered.\n\n**State (Valtio)?**\n- `valtio://stores`, `valtio://updates/recent`, `valtio://subscribers` \u2014 per-path\n subscriptions (which component reads which store path).\n\n**Memory leak suspicion?**\n- `memory://leaks/suspected`, `memory://owners/growing`, `memory://owners`, `memory://current`.\n\n**Visual / runtime (browser)?**\n- `runtime://browser/console`, `runtime://browser/errors`, `runtime://browser/network`, `runtime://browser/failed-requests`.\n- `visual://violations/current`, `visual://violations/during-animation`, `visual://tokens`, `visual://rules`.\n- `browser://active-tab`, `browser://tabs`.\n\n**Bundle size regressed?**\n- `bundle://regressions`, `bundle://compare/latest`, `bundle://chunks`, `bundle://modules`.\n\n## Trace a user action across the whole stack\n\nA user interaction (onClick/onSubmit/onChange) is auto-wrapped so it starts a\n**flow**: the browser stamps `x-lensmcp-flow-id` on outgoing fetches, and the\nbackend stamps the same flowId on its spans. So you can ask \"what did this\nclick cause?\":\n\n- `flow://recent`, `flow://current`, `flow://origins/recent` \u2014 flows + their origins.\n- Tool `flow.list_recent` \u2014 flows with their `category` (page-load, user-action, api, ai, test, or\n one defined in `nx.json#lensmcp.flows`), `subject` (the page / component / route) and `tags`\n (has-error, fan-out, slow\u2026); filter with `category` / `tag`.\n- Tool `flow.segments` \u2014 **start here for a big flow**: a flow can hold thousands of events (a dozen\n independent requests, a mount burst, a store hydrating). This returns it as a few dozen segments in\n phases, with counts, errors and times; then `flow.get { flowId, segmentId }` opens one unit.\n- Tool `graph.trace_from_origin` \u2014 full causal chain from an origin node.\n- Tool `graph.find_backend_work_caused_by_click` \u2014 the backend spans/queries a click triggered.\n- Tool `graph.find_state_updates_caused_by` \u2014 Valtio updates a flow caused.\n- `story://last`, `story://recent` + the story tools \u2014 a compiled, human-readable\n narrative of one flow end to end.\n\n## Tips\n\n- Prefer asking a precise question and reading the **one** resource/tool that\n answers it over dumping everything.\n- After a fix, re-run the same read to confirm the signal cleared (e.g. the\n db-in-loop pattern is gone from `graph://patterns`, or the route dropped\n out of `perf://slow-routes`).\n- `events://recent` is the raw firehose \u2014 use it only when a specific\n resource doesn't exist for what you need."})],Wc);var Kc=class{static{s(this,"lo")}static{o(this,"MetaApp")}};Kc=$([p$({id:"lensmcp",name:"LensMCP Meta",description:'Session, health, and config tools, plus the "how to use LensMCP" skill.',tools:[h$],skills:[Wc]})],Kc);import{App as y$}from"@frontmcp/sdk";import{Resource as E$,ResourceContext as D$}from"@frontmcp/sdk";var I6="events://recent",Hc=class extends D${static{s(this,"Nv")}static{o(this,"EventsRecentResource")}async execute(){return{schemaVersion:1,revision:this.get(R).revision(I6)??0,updatedAt:new Date().toISOString(),events:[]}}};Hc=$([E$({name:"events-recent",uri:I6,mimeType:"application/json",description:"Recent normalised timeline events."})],Hc);var b$=Hc,Xc=class{static{s(this,"po")}static{o(this,"EventsApp")}};Xc=$([y$({id:"events",name:"Events",description:"Normalised timeline of recent events.",resources:[b$]})],Xc);import{App as B$}from"@frontmcp/sdk";import{Resource as w$,ResourceContext as C$}from"@frontmcp/sdk";var Yc="render://current",Qc=class extends C${static{s(this,"Cv")}static{o(this,"RenderCurrentResource")}async execute(){let e=this.get(R),t=e.revision(Yc)??0;try{return await e.read(Yc)}catch{return{schemaVersion:1,revision:t,updatedAt:new Date().toISOString(),snapshot:null,note:"render:// will be populated in Phase 4 (DOMSnapshot + LayerTree + Accessibility)."}}}};Qc=$([w$({name:"render-current",uri:Yc,mimeType:"application/json",description:"Most recent accessibility-tree snapshot of the active page. Phase 1 ships an empty placeholder; the full DOMSnapshot + LayerTree integration lands in Phase 4."})],Qc);var x$=Qc,e4=class{static{s(this,"mo")}static{o(this,"RenderApp")}};e4=$([B$({id:"render",name:"Render",description:"Accessibility tree + (Phase 4) DOMSnapshot + LayerTree.",resources:[x$]})],e4);import{App as $$}from"@frontmcp/sdk";import{Tool as k$,ToolContext as A$}from"@frontmcp/sdk";import{existsSync as _$,readFileSync as S6}from"node:fs";import{dirname as t4,join as u4}from"node:path";import{fileURLToPath as I$}from"node:url";function F6(){let e=process.env.LENSMCP_EVENT_FILE;return e?t4(e):u4(process.cwd(),".lensmcp")}s(F6,"Lj"),o(F6,"lensmcpDir");function z6(){try{let e=S6(u4(F6(),"setup-state.json"),"utf8"),t=JSON.parse(e);return typeof t?.version=="string"?t:void 0}catch{return}}s(z6,"Fj"),o(z6,"readSetupState");function r4(){let e=t4(I$(import.meta.url));for(let t=0;t<6;t++){let r=u4(e,"package.json");if(_$(r))try{let u=JSON.parse(S6(r,"utf8")).version;if(u)return u}catch{}let i=t4(e);if(i===e)break;e=i}return"0.0.0"}s(r4,"Zv"),o(r4,"installedVersion");function n4(){let e=r4(),t=z6();return t?t.version!==e?{ready:!1,installedVersion:e,setupVersion:t.version,reason:"version-mismatch"}:{ready:!0,installedVersion:e,setupVersion:t.version}:{ready:!1,installedVersion:e,reason:"never-setup"}}s(n4,"ua"),o(n4,"checkReadiness");function i4(){let e=process.env.LENSMCP_NO_SETUP_GATE;return e==="1"||e==="true"}s(i4,"la"),o(i4,"gateDisabled");function s4(e){return`LensMCP is not ready: ${e.reason==="version-mismatch"&&e.setupVersion?`last set up for v${e.setupVersion}`:"not set up on this machine yet"}, but v${e.installedVersion} is installed. Ask the user to run \`lensmcp setup\` once in their terminal \u2014 it installs the plugin wiring and trusts the dev CA + /etc/hosts (sudo prompts inline; idempotent) \u2014 then retry. Call the \`setup.status\` tool any time to re-check.`}s(s4,"da"),o(s4,"setupRequiredMessage");var a4=class extends A${static{s(this,"Bv")}static{o(this,"SetupStatusTool")}async execute(){let e=n4();return{ready:e.ready,installedVersion:e.installedVersion,setupVersion:e.setupVersion??null,reason:e.reason??null,gateDisabled:i4(),message:e.ready?`LensMCP is set up for v${e.installedVersion}. The lens is open.`:s4(e),fix:e.ready?null:"lensmcp setup"}}};a4=$([k$({name:"setup.status",description:"Report whether LensMCP is set up for the installed version on this machine. Always available (exempt from the setup-gate) so the agent can diagnose. If `ready` is false, ask the user to run `lensmcp setup`.",inputSchema:{}})],a4);var S$=a4,o4=class{static{s(this,"pa")}static{o(this,"SetupApp")}};o4=$([$$({id:"lensmcp-setup",name:"LensMCP Setup Gate",description:"Readiness gate: blocks lens tools until the workspace has run `lensmcp setup`, plus the always-open `setup.status` diagnostic.",tools:[S$]})],o4);import{Plugin as F$,ToolHook as z$}from"@frontmcp/sdk";function j6(e){return e.state?.input?.name??e.state?.tool?.metadata?.name??e.state?.tool?.fullName??e.toolName??""}s(j6,"_w"),o(j6,"toolNameOf");var{Will:j$}=z$,R$=new Set(["setup.status","lensmcp.session"]),Vi=class{static{s(this,"fo")}static{o(this,"SetupGatePlugin")}enforceSetup(e){if(i4())return;let t;try{t=n4()}catch{return}t.ready||e.fail(new Error(s4(t)))}};$([j$("execute",{priority:1e4,filter:o(e=>!R$.has(j6(e)),"filter")}),wr("design:type",Function),wr("design:paramtypes",[Object]),wr("design:returntype",void 0)],Vi.prototype,"enforceSetup",null),Vi=$([F$({name:"lensmcp-setup-gate",description:"Blocks lens tools until the workspace has run `lensmcp setup` for the installed lensmcp version (after install or upgrade). Fails open on error."})],Vi);function R6(e){let t=Number(process.env.LENSMCP_PARENT_PID??0);!Number.isInteger(t)||t<=0||setInterval(()=>{process.ppid!==t&&(console.error(`[lensmcp] ${e}: parent gateway (pid ${t}) is gone \u2014 exiting to free the port.`),process.exit(0))},5e3).unref()}s(R6,"ww"),o(R6,"watchParentGateway");import{existsSync as O6,readFileSync as O$,realpathSync as T$}from"node:fs";import{basename as N$,dirname as P$,join as Ht}from"node:path";var U$={dashboard:4321,mcpHttp:4500,bridge:5747};function Ji(e){try{return JSON.parse(O$(e,"utf8"))}catch{return}}s(Ji,"Vv"),o(Ji,"readJson");function T6(e,t){let r=2166136261;for(let i=0;i<e.length;i++)r^=e.charCodeAt(i),r=Math.imul(r,16777619);return Math.abs(r|0)%t}s(T6,"eO"),o(T6,"hashToRange");function ht(e){return e.toLowerCase().replace(/^@[^/]+\//,"").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")||"workspace"}s(ht,"Rr"),o(ht,"slugify");function N6(e){let t=Ji(Ht(e,"nx.json"));if(t?.lensmcp?.key)return ht(t.lensmcp.key);let r=Ji(Ht(e,"package.json"));return r?.name?ht(r.name):t?.name?ht(t.name):ht(N$(e))}s(N6,"tO"),o(N6,"resolveWorkspaceKey");function P6(e){return U$.mcpHttp+T6(e,200)}s(P6,"rO"),o(P6,"deriveMcpHttpPort");function U6(e){let t,r=e;for(;;){if(O6(Ht(r,".lensmcp","config.json")))return r;t===void 0&&O6(Ht(r,"nx.json"))&&(t=r);let i=P$(r);if(i===r)break;r=i}return t??e}s(U6,"nO"),o(U6,"findWorkspaceRoot");function l4(e,t=process.env){let r=U6(e),i=Ji(Ht(r,".lensmcp","config.json")),u=i?.key?ht(i.key):N6(r),n=typeof i?.ports?.mcpHttp=="number"?i.ports.mcpHttp:P6(u);return{root:r,key:u,mcpHttpPort:n,eventFile:t.LENSMCP_EVENT_FILE??Ht(r,".lensmcp","events.jsonl")}}s(l4,"kw"),o(l4,"resolveWorkspaceScope");var M$="/lensmcp/identity",Z$="lensmcp-mcp-identity";function M6(e){try{return T$(e)}catch{return e}}s(M6,"iO"),o(M6,"canonicalRoot");function Z6(e=process.env,t=process.cwd(),r){let i=l4(t,e),u=M6(e.LENSMCP_WORKSPACE_ROOT??i.root),n=e.LENSMCP_WORKSPACE_KEY?ht(e.LENSMCP_WORKSPACE_KEY):e.LENSMCP_WORKSPACE_ROOT?l4(u,e).key:i.key;return{kind:Z$,key:n,root:u,eventFile:i.eventFile,pid:process.pid,port:e.LENSMCP_PORT?Number(e.LENSMCP_PORT):void 0,version:r}}s(Z6,"Iw"),o(Z6,"resolveServerIdentity");import{chmodSync as L6,lstatSync as q6,mkdirSync as L$,unlinkSync as q$}from"node:fs";import{homedir as V$}from"node:os";import{dirname as J$,join as G$}from"node:path";function V6(e=process.env){return G$(e.LENSMCP_HOME||V$(),".lensmcp","mcp.sock")}s(V6,"dO"),o(V6,"defaultMcpSocketPath");function J6(e=process.env){return e.LENSMCP_SOCKET_PATH||V6(e)}s(J6,"Ew"),o(J6,"resolveMcpSocketPath");function G6(e){try{L$(e,{recursive:!0,mode:448})}catch{}try{let t=q6(e);return t.isDirectory()?((t.mode&63)!==0&&L6(e,448),!0):!1}catch{return!1}}s(G6,"pO"),o(G6,"ensureOwnerOnlyDir");function W6(e){let t;try{t=q6(e)}catch{return{cleared:!1}}if(!t.isSocket())return{cleared:!1,refused:t.isSymbolicLink()?"a symlink":t.isDirectory()?"a directory":"a regular file"};try{return q$(e),{cleared:!0}}catch(r){return{cleared:!1,refused:r instanceof Error?r.message:String(r)}}}s(W6,"mO"),o(W6,"clearStaleSocket");function K6(e){let t=J$(e);if(!G6(t))return{ok:!1,reason:`${t} is not a usable owner-only directory`};let r=W6(e);return r.refused?{ok:!1,reason:`${e} already exists and is ${r.refused}`}:{ok:!0}}s(K6,"Aw"),o(K6,"prepareSocketPath");function H6(e){try{return L6(e,384),!0}catch{return!1}}s(H6,"zw"),o(H6,"secureSocket"),R6("mcp");var{session:W$,providers:K$}=A6(),Gi=process.env.LENSMCP_TRANSPORT??"stdio",H$=[o4,Kc,Al,Xc,ed,nd,ad,pd,bd,kd,e4,Id,zd,Td,Md,Vd,ac,vc,Bc,Ml,Hl,Rc,Vc],d4={info:{name:"LensMCP MCP",version:"1.0.0"},apps:H$,providers:[...K$],plugins:[Vi]},c4=class{static{s(this,"Gv")}static{o(this,"LensmcpMcpServer")}};c4=$([ey({...d4,serve:!1})],c4);var X$=c4;if(Gi==="stdio")w4.runStdio({...d4,logging:{level:C4.Warn}}).catch(e=>{process.stderr.write(`[lensmcp] runStdio failed: ${e instanceof Error?e.stack??e.message:String(e)}
72
- `),process.exit(1)});else{let e=process.env.LENSMCP_HTTP_PATH??"/mcp",t=Z6(process.env,process.cwd(),r4()),r={method:"GET",path:M$,handler:o((l,d)=>{d.setHeader("content-type","application/json"),d.setHeader("cache-control","no-store"),d.end(JSON.stringify(t))},"handler")},i=process.env.LENSMCP_MCP_BIND??"loopback";i!=="loopback"&&i!=="127.0.0.1"&&i!=="::1"&&console.error(`[lensmcp] WARNING: MCP HTTP transport bound to ${i} \u2014 reachable beyond this machine. It exposes workspace telemetry and command-running jobs with NO authentication. Unset LENSMCP_MCP_BIND to restore loopback.`);let u=J6(process.env);if(Gi==="socket"){let l=K6(u);l.ok||(console.error(`[lensmcp] FATAL: refusing to serve MCP on ${u} \u2014 ${l.reason}. Every tool on this endpoint, including command-running jobs, would be reachable by whoever controls that path.`),process.exit(1))}let n=Gi==="socket"?{socketPath:u,entryPath:e,routes:[r]}:{port:Number(process.env.LENSMCP_PORT??3e3),entryPath:e,routes:[r],security:{bindAddress:i}},a=w4.bootstrap({...d4,logging:{level:C4.Info},http:n});Gi==="socket"&&a.then(()=>{H6(u)?console.error(`[lensmcp] MCP socket \u2192 ${u} (0600, owner-only directory)`):console.error(`[lensmcp] WARNING: could not set 0600 on ${u}. Its directory's permissions are now the only thing keeping other accounts out.`)},()=>{})}function m4(e){W$.stop().catch(()=>{}).finally(()=>{process.exit(e==="SIGINT"?130:0)})}s(m4,"Pw"),o(m4,"shutdown"),process.on("SIGINT",m4),process.on("SIGTERM",m4);export{X$ as default};
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){i(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(l.cycle){i(a);continue}if(l.count>1&&e.reused==="ref"){i(a);continue}}}s(dt,"lt"),o(dt,"extractDefs");function ct(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=o(l=>{let d=e.seen.get(l);if(d.ref===null)return;let c=d.def??d.schema,p={...c},m=d.ref;if(d.ref=null,m){n(m);let h=e.seen.get(m),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,p),l._zod.parent===m)for(let E in c)E==="$ref"||E==="allOf"||E in p||delete c[E];if(g.$ref&&h.def)for(let E in c)E==="$ref"||E==="allOf"||E in h.def&&JSON.stringify(c[E])===JSON.stringify(h.def[E])&&delete c[E]}let f=l._zod.parent;if(f&&f!==m){n(f);let h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(let g in c)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(c[g])===JSON.stringify(h.def[g])&&delete c[g]}e.override({zodSchema:l,jsonSchema:c,path:d.path??[]})},"flattenRef");for(let l of[...e.seen.entries()].reverse())n(l[0]);let u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(l)}Object.assign(u,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&u.id===i&&delete u.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let d=l[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?u.$defs=a:u.definitions=a);try{let l=JSON.parse(JSON.stringify(u));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Uu(t,"input",e.processors),output:Uu(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}s(ct,"dt"),o(ct,"finalize");function fe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return fe(n.element,r);if(n.type==="set")return fe(n.valueType,r);if(n.type==="lazy")return fe(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return fe(n.innerType,r);if(n.type==="intersection")return fe(n.left,r)||fe(n.right,r);if(n.type==="record"||n.type==="map")return fe(n.keyType,r)||fe(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:fe(n.in,r)||fe(n.out,r);if(n.type==="object"){for(let u in n.shape)if(fe(n.shape[u],r))return!0;return!1}if(n.type==="union"){for(let u of n.options)if(fe(u,r))return!0;return!1}if(n.type==="tuple"){for(let u of n.items)if(fe(u,r))return!0;return!!(n.rest&&fe(n.rest,r))}return!1}s(fe,"xe"),o(fe,"isTransforming");var Wg=o((e,t={})=>r=>{let n=lt({...r,processors:t});return Y(e,n),dt(n,e),ct(n,e)},"createToJSONSchemaMethod"),Uu=o((e,t,r={})=>n=>{let{libraryOptions:u,target:i}=n??{},a=lt({...u??{},target:i,io:t,processors:r});return Y(e,a),dt(a,e),ct(a,e)},"createStandardJSONSchemaMethod"),w5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Kg=o((e,t,r,n)=>{let u=r;u.type="string";let{minimum:i,maximum:a,format:l,patterns:d,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(u.minLength=i),typeof a=="number"&&(u.maxLength=a),l&&(u.format=w5[l]??l,u.format===""&&delete u.format,l==="time"&&delete u.format),c&&(u.contentEncoding=c),d&&d.size>0){let p=[...d];p.length===1?u.pattern=p[0].source:p.length>1&&(u.allOf=[...p.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},"stringProcessor"),Hg=o((e,t,r,n)=>{let u=r,{minimum:i,maximum:a,format:l,multipleOf:d,exclusiveMaximum:c,exclusiveMinimum:p}=e._zod.bag;typeof l=="string"&&l.includes("int")?u.type="integer":u.type="number";let m=typeof p=="number"&&p>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(u.minimum=p,u.exclusiveMinimum=!0):u.exclusiveMinimum=p:typeof i=="number"&&(u.minimum=i),f?h?(u.maximum=c,u.exclusiveMaximum=!0):u.exclusiveMaximum=c:typeof a=="number"&&(u.maximum=a),typeof d=="number"&&(u.multipleOf=d)},"numberProcessor"),Xg=o((e,t,r,n)=>{r.type="boolean"},"booleanProcessor"),Yg=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},"bigintProcessor"),Qg=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},"symbolProcessor"),ev=o((e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},"nullProcessor"),tv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},"undefinedProcessor"),uv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},"voidProcessor"),rv=o((e,t,r,n)=>{r.not={}},"neverProcessor"),nv=o((e,t,r,n)=>{},"anyProcessor"),iv=o((e,t,r,n)=>{},"unknownProcessor"),sv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},"dateProcessor"),av=o((e,t,r,n)=>{let u=e._zod.def,i=Mr(u.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},"enumProcessor"),ov=o((e,t,r,n)=>{let u=e._zod.def,i=[];for(let a of u.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},"literalProcessor"),lv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},"nanProcessor"),dv=o((e,t,r,n)=>{let u=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");u.type="string",u.pattern=i.source},"templateLiteralProcessor"),cv=o((e,t,r,n)=>{let u=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:d}=e._zod.bag;a!==void 0&&(i.minLength=a),l!==void 0&&(i.maxLength=l),d?d.length===1?(i.contentMediaType=d[0],Object.assign(u,i)):(Object.assign(u,i),u.anyOf=d.map(c=>({contentMediaType:c}))):Object.assign(u,i)},"fileProcessor"),pv=o((e,t,r,n)=>{r.type="boolean"},"successProcessor"),mv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),fv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},"functionProcessor"),hv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),gv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},"mapProcessor"),vv=o((e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},"setProcessor"),yv=o((e,t,r,n)=>{let u=r,i=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(u.minItems=a),typeof l=="number"&&(u.maxItems=l),u.type="array",u.items=Y(i.element,t,{...n,path:[...n.path,"items"]})},"arrayProcessor"),Ev=o((e,t,r,n)=>{let u=r,i=e._zod.def;u.type="object",u.properties={};let a=i.shape;for(let c in a)u.properties[c]=Y(a[c],t,{...n,path:[...n.path,"properties",c]});let l=new Set(Object.keys(a)),d=new Set([...l].filter(c=>{let p=i.shape[c]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(u.required=Array.from(d)),i.catchall?._zod.def.type==="never"?u.additionalProperties=!1:i.catchall?i.catchall&&(u.additionalProperties=Y(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(u.additionalProperties=!1)},"objectProcessor"),fo=o((e,t,r,n)=>{let u=e._zod.def,i=u.inclusive===!1,a=u.options.map((l,d)=>Y(l,t,{...n,path:[...n.path,i?"oneOf":"anyOf",d]}));i?r.oneOf=a:r.anyOf=a},"unionProcessor"),bv=o((e,t,r,n)=>{let u=e._zod.def,i=Y(u.left,t,{...n,path:[...n.path,"allOf",0]}),a=Y(u.right,t,{...n,path:[...n.path,"allOf",1]}),l=o(c=>"allOf"in c&&Object.keys(c).length===1,"isSimpleIntersection"),d=[...l(i)?i.allOf:[i],...l(a)?a.allOf:[a]];r.allOf=d},"intersectionProcessor"),Dv=o((e,t,r,n)=>{let u=r,i=e._zod.def;u.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((f,h)=>Y(f,t,{...n,path:[...n.path,a,h]})),c=i.rest?Y(i.rest,t,{...n,path:[...n.path,l,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(u.prefixItems=d,c&&(u.items=c)):t.target==="openapi-3.0"?(u.items={anyOf:d},c&&u.items.anyOf.push(c),u.minItems=d.length,c||(u.maxItems=d.length)):(u.items=d,c&&(u.additionalItems=c));let{minimum:p,maximum:m}=e._zod.bag;typeof p=="number"&&(u.minItems=p),typeof m=="number"&&(u.maxItems=m)},"tupleProcessor"),wv=o((e,t,r,n)=>{let u=r,i=e._zod.def;u.type="object";let a=i.keyType,l=a._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let c=Y(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});u.patternProperties={};for(let p of l)u.patternProperties[p.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(u.propertyNames=Y(i.keyType,t,{...n,path:[...n.path,"propertyNames"]})),u.additionalProperties=Y(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let d=a._zod.values;if(d){let c=[...d].filter(p=>typeof p=="string"||typeof p=="number");c.length>0&&(u.required=c)}},"recordProcessor"),Bv=o((e,t,r,n)=>{let u=e._zod.def,i=Y(u.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=u.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},"nullableProcessor"),xv=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType},"nonoptionalProcessor"),$v=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType,r.default=JSON.parse(JSON.stringify(u.defaultValue))},"defaultProcessor"),Cv=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},"prefaultProcessor"),kv=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType;let a;try{a=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},"catchProcessor"),Av=o((e,t,r,n)=>{let u=e._zod.def,i=u.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?u.out:u.in:u.out;Y(a,t,n);let l=t.seen.get(e);l.ref=a},"pipeProcessor"),_v=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType,r.readOnly=!0},"readonlyProcessor"),Iv=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType},"promiseProcessor"),ho=o((e,t,r,n)=>{let u=e._zod.def;Y(u.innerType,t,n);let i=t.seen.get(e);i.ref=u.innerType},"optionalProcessor"),Sv=o((e,t,r,n)=>{let u=e._zod.innerType;Y(u,t,n);let i=t.seen.get(e);i.ref=u},"lazyProcessor"),go={string:Kg,number:Hg,boolean:Xg,bigint:Yg,symbol:Qg,null:ev,undefined:tv,void:uv,never:rv,any:nv,unknown:iv,date:sv,enum:av,literal:ov,nan:lv,template_literal:dv,file:cv,success:pv,custom:mv,function:fv,transform:hv,map:gv,set:vv,array:yv,object:Ev,union:fo,intersection:bv,tuple:Dv,record:wv,nullable:Bv,nonoptional:xv,default:$v,prefault:Cv,catch:kv,pipe:Av,readonly:_v,promise:Iv,optional:ho,lazy:Sv};function vo(e,t){if("_idmap"in e){let n=e,u=lt({...t,processors:go}),i={};for(let d of n._idmap.entries()){let[c,p]=d;Y(p,u)}let a={},l={registry:n,uri:t?.uri,defs:i};u.external=l;for(let d of n._idmap.entries()){let[c,p]=d;dt(u,p),a[c]=ct(u,p)}if(Object.keys(i).length>0){let d=u.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:i}}return{schemas:a}}let r=lt({...t,processors:go});return Y(e,r),dt(r,e),ct(r,e)}s(vo,"Fi"),o(vo,"toJSONSchema");var B5=class{static{s(this,"Bi")}static{o(this,"JSONSchemaGenerator")}get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=lt({processors:go,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Y(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),dt(this.ctx,e);let r=ct(this.ctx,e),{"~standard":n,...u}=r;return u}},x5={},Fv={};Oe(Fv,{ZodAny:s(()=>f0,"ZodAny"),ZodArray:s(()=>D0,"ZodArray"),ZodBase64:s(()=>zn,"ZodBase64"),ZodBase64URL:s(()=>jn,"ZodBase64URL"),ZodBigInt:s(()=>Wu,"ZodBigInt"),ZodBigIntFormat:s(()=>Mn,"ZodBigIntFormat"),ZodBoolean:s(()=>Gu,"ZodBoolean"),ZodCIDRv4:s(()=>Sn,"ZodCIDRv4"),ZodCIDRv6:s(()=>Fn,"ZodCIDRv6"),ZodCUID:s(()=>xn,"ZodCUID"),ZodCUID2:s(()=>$n,"ZodCUID2"),ZodCatch:s(()=>X0,"ZodCatch"),ZodCodec:s(()=>rr,"ZodCodec"),ZodCustom:s(()=>ir,"ZodCustom"),ZodCustomStringFormat:s(()=>Tt,"ZodCustomStringFormat"),ZodDate:s(()=>Un,"ZodDate"),ZodDefault:s(()=>G0,"ZodDefault"),ZodDiscriminatedUnion:s(()=>A0,"ZodDiscriminatedUnion"),ZodE164:s(()=>On,"ZodE164"),ZodEmail:s(()=>Dn,"ZodEmail"),ZodEmoji:s(()=>wn,"ZodEmoji"),ZodEnum:s(()=>Pt,"ZodEnum"),ZodExactOptional:s(()=>q0,"ZodExactOptional"),ZodFile:s(()=>U0,"ZodFile"),ZodFunction:s(()=>ll,"ZodFunction"),ZodGUID:s(()=>Lu,"ZodGUID"),ZodIPv4:s(()=>_n,"ZodIPv4"),ZodIPv6:s(()=>In,"ZodIPv6"),ZodIntersection:s(()=>I0,"ZodIntersection"),ZodJWT:s(()=>Rn,"ZodJWT"),ZodKSUID:s(()=>An,"ZodKSUID"),ZodLazy:s(()=>sl,"ZodLazy"),ZodLiteral:s(()=>M0,"ZodLiteral"),ZodMAC:s(()=>Lo,"ZodMAC"),ZodMap:s(()=>j0,"ZodMap"),ZodNaN:s(()=>Y0,"ZodNaN"),ZodNanoID:s(()=>Bn,"ZodNanoID"),ZodNever:s(()=>v0,"ZodNever"),ZodNonOptional:s(()=>Kn,"ZodNonOptional"),ZodNull:s(()=>m0,"ZodNull"),ZodNullable:s(()=>V0,"ZodNullable"),ZodNumber:s(()=>Vu,"ZodNumber"),ZodNumberFormat:s(()=>pt,"ZodNumberFormat"),ZodObject:s(()=>Hu,"ZodObject"),ZodOptional:s(()=>Vn,"ZodOptional"),ZodPipe:s(()=>tr,"ZodPipe"),ZodPrefault:s(()=>W0,"ZodPrefault"),ZodPreprocess:s(()=>ul,"ZodPreprocess"),ZodPromise:s(()=>al,"ZodPromise"),ZodReadonly:s(()=>rl,"ZodReadonly"),ZodRecord:s(()=>Mt,"ZodRecord"),ZodSet:s(()=>R0,"ZodSet"),ZodString:s(()=>Zu,"ZodString"),ZodStringFormat:s(()=>ue,"ZodStringFormat"),ZodSuccess:s(()=>K0,"ZodSuccess"),ZodSymbol:s(()=>l0,"ZodSymbol"),ZodTemplateLiteral:s(()=>nl,"ZodTemplateLiteral"),ZodTransform:s(()=>L0,"ZodTransform"),ZodTuple:s(()=>S0,"ZodTuple"),ZodType:s(()=>J,"ZodType"),ZodULID:s(()=>Cn,"ZodULID"),ZodURL:s(()=>qu,"ZodURL"),ZodUUID:s(()=>Fe,"ZodUUID"),ZodUndefined:s(()=>c0,"ZodUndefined"),ZodUnion:s(()=>Xu,"ZodUnion"),ZodUnknown:s(()=>g0,"ZodUnknown"),ZodVoid:s(()=>y0,"ZodVoid"),ZodXID:s(()=>kn,"ZodXID"),ZodXor:s(()=>C0,"ZodXor"),_ZodString:s(()=>bn,"_ZodString"),_default:s(()=>Gn,"_default"),_function:s(()=>nr,"_function"),any:s(()=>h0,"any"),array:s(()=>Nt,"array"),base64:s(()=>Wo,"base64"),base64url:s(()=>Ko,"base64url"),bigint:s(()=>s0,"bigint"),boolean:s(()=>Nn,"boolean"),catch:s(()=>Xn,"catch"),check:s(()=>dl,"check"),cidrv4:s(()=>Jo,"cidrv4"),cidrv6:s(()=>Go,"cidrv6"),codec:s(()=>el,"codec"),cuid:s(()=>To,"cuid"),cuid2:s(()=>No,"cuid2"),custom:s(()=>cl,"custom"),date:s(()=>b0,"date"),describe:s(()=>Wv,"describe"),discriminatedUnion:s(()=>_0,"discriminatedUnion"),e164:s(()=>Ho,"e164"),email:s(()=>ko,"email"),emoji:s(()=>Oo,"emoji"),enum:s(()=>Qu,"enum"),exactOptional:s(()=>Jn,"exactOptional"),file:s(()=>Z0,"file"),float32:s(()=>u0,"float32"),float64:s(()=>r0,"float64"),function:s(()=>nr,"function"),guid:s(()=>Ao,"guid"),hash:s(()=>t0,"hash"),hex:s(()=>e0,"hex"),hostname:s(()=>Qo,"hostname"),httpUrl:s(()=>jo,"httpUrl"),instanceof:s(()=>pl,"instanceof"),int:s(()=>Ju,"int"),int32:s(()=>n0,"int32"),int64:s(()=>a0,"int64"),intersection:s(()=>Zn,"intersection"),invertCodec:s(()=>tl,"invertCodec"),ipv4:s(()=>Zo,"ipv4"),ipv6:s(()=>Vo,"ipv6"),json:s(()=>ml,"json"),jwt:s(()=>Xo,"jwt"),keyof:s(()=>w0,"keyof"),ksuid:s(()=>Uo,"ksuid"),lazy:s(()=>Qn,"lazy"),literal:s(()=>P0,"literal"),looseObject:s(()=>$0,"looseObject"),looseRecord:s(()=>z0,"looseRecord"),mac:s(()=>qo,"mac"),map:s(()=>O0,"map"),meta:s(()=>Kv,"meta"),nan:s(()=>Q0,"nan"),nanoid:s(()=>Ro,"nanoid"),nativeEnum:s(()=>N0,"nativeEnum"),never:s(()=>Ku,"never"),nonoptional:s(()=>Hn,"nonoptional"),null:s(()=>Pn,"null"),nullable:s(()=>Zt,"nullable"),nullish:s(()=>J0,"nullish"),number:s(()=>Tn,"number"),object:s(()=>B0,"object"),optional:s(()=>Ut,"optional"),partialRecord:s(()=>F0,"partialRecord"),pipe:s(()=>ur,"pipe"),prefault:s(()=>Wn,"prefault"),preprocess:s(()=>fl,"preprocess"),promise:s(()=>ol,"promise"),readonly:s(()=>Yn,"readonly"),record:s(()=>qn,"record"),refine:s(()=>ei,"refine"),set:s(()=>T0,"set"),strictObject:s(()=>x0,"strictObject"),string:s(()=>Rt,"string"),stringFormat:s(()=>Yo,"stringFormat"),stringbool:s(()=>Hv,"stringbool"),success:s(()=>H0,"success"),superRefine:s(()=>ti,"superRefine"),symbol:s(()=>d0,"symbol"),templateLiteral:s(()=>il,"templateLiteral"),transform:s(()=>er,"transform"),tuple:s(()=>Ln,"tuple"),uint32:s(()=>i0,"uint32"),uint64:s(()=>o0,"uint64"),ulid:s(()=>Mo,"ulid"),undefined:s(()=>p0,"undefined"),union:s(()=>Yu,"union"),unknown:s(()=>Ge,"unknown"),url:s(()=>zo,"url"),uuid:s(()=>_o,"uuid"),uuidv4:s(()=>Io,"uuidv4"),uuidv6:s(()=>So,"uuidv6"),uuidv7:s(()=>Fo,"uuidv7"),void:s(()=>E0,"void"),xid:s(()=>Po,"xid"),xor:s(()=>k0,"xor")});var zv={};Oe(zv,{endsWith:s(()=>ju,"endsWith"),gt:s(()=>Ne,"gt"),gte:s(()=>he,"gte"),includes:s(()=>Fu,"includes"),length:s(()=>zt,"length"),lowercase:s(()=>Iu,"lowercase"),lt:s(()=>Te,"lt"),lte:s(()=>De,"lte"),maxLength:s(()=>Ft,"maxLength"),maxSize:s(()=>ot,"maxSize"),mime:s(()=>Ou,"mime"),minLength:s(()=>Je,"minLength"),minSize:s(()=>Me,"minSize"),multipleOf:s(()=>at,"multipleOf"),negative:s(()=>gn,"negative"),nonnegative:s(()=>yn,"nonnegative"),nonpositive:s(()=>vn,"nonpositive"),normalize:s(()=>Ru,"normalize"),overwrite:s(()=>Se,"overwrite"),positive:s(()=>hn,"positive"),property:s(()=>En,"property"),regex:s(()=>_u,"regex"),size:s(()=>St,"size"),slugify:s(()=>Pu,"slugify"),startsWith:s(()=>zu,"startsWith"),toLowerCase:s(()=>Nu,"toLowerCase"),toUpperCase:s(()=>Mu,"toUpperCase"),trim:s(()=>Tu,"trim"),uppercase:s(()=>Su,"uppercase")});var yo={};Oe(yo,{ZodISODate:s(()=>Do,"ZodISODate"),ZodISODateTime:s(()=>Eo,"ZodISODateTime"),ZodISODuration:s(()=>$o,"ZodISODuration"),ZodISOTime:s(()=>Bo,"ZodISOTime"),date:s(()=>wo,"date"),datetime:s(()=>bo,"datetime"),duration:s(()=>Co,"duration"),time:s(()=>xo,"time")});var Eo=D("ZodISODateTime",(e,t)=>{kf.init(e,t),ue.init(e,t)});function bo(e){return Sa(Eo,e)}s(bo,"Ep"),o(bo,"datetime");var Do=D("ZodISODate",(e,t)=>{Af.init(e,t),ue.init(e,t)});function wo(e){return Fa(Do,e)}s(wo,"Tp"),o(wo,"date");var Bo=D("ZodISOTime",(e,t)=>{_f.init(e,t),ue.init(e,t)});function xo(e){return za(Bo,e)}s(xo,"Ap"),o(xo,"time");var $o=D("ZodISODuration",(e,t)=>{If.init(e,t),ue.init(e,t)});function Co(e){return ja($o,e)}s(Co,"zp"),o(Co,"duration");var jv=o((e,t)=>{Cs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o(r=>Lr(e,r),"value")},flatten:{value:o(r=>Zr(e,r),"value")},addIssue:{value:o(r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,cu,2)},"value")},addIssues:{value:o(r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,cu,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),$5=D("ZodError",jv),we=D("ZodError",jv,{Parent:Error}),Ov=gu(we),Rv=vu(we),Tv=yu(we),Nv=Eu(we),Mv=Fs(we),Pv=zs(we),Uv=js(we),Zv=Os(we),Lv=Rs(we),qv=Ts(we),Vv=Ns(we),Jv=Ms(we),Gv=new WeakMap;function Ot(e,t,r){let n=Object.getPrototypeOf(e),u=Gv.get(n);if(u||(u=new Set,Gv.set(n,u)),!u.has(t)){u.add(t);for(let i in r){let a=r[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}s(Ot,"gn"),o(Ot,"_installLazyMethods");var J=D("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Uu(e,"input"),output:Uu(e,"output")}}),e.toJSONSchema=Wg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>Ov(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Tv(e,r,n),e.parseAsync=async(r,n)=>Rv(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Nv(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Mv(e,r,n),e.decode=(r,n)=>Pv(e,r,n),e.encodeAsync=async(r,n)=>Uv(e,r,n),e.decodeAsync=async(r,n)=>Zv(e,r,n),e.safeEncode=(r,n)=>Lv(e,r,n),e.safeDecode=(r,n)=>qv(e,r,n),e.safeEncodeAsync=async(r,n)=>Vv(e,r,n),e.safeDecodeAsync=async(r,n)=>Jv(e,r,n),Ot(e,"ZodType",{check(...r){let n=this.def;return this.clone(W.mergeDefs(n,{checks:[...n.checks??[],...r.map(u=>typeof u=="function"?{_zod:{check:u,def:{check:"custom"},onattach:[]}}:u)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return ye(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(ei(r,n))},superRefine(r,n){return this.check(ti(r,n))},overwrite(r){return this.check(Se(r))},optional(){return Ut(this)},exactOptional(){return Jn(this)},nullable(){return Zt(this)},nullish(){return Ut(Zt(this))},nonoptional(r){return Hn(this,r)},array(){return Nt(this)},or(r){return Yu([this,r])},and(r){return Zn(this,r)},transform(r){return ur(this,er(r))},default(r){return Gn(this,r)},prefault(r){return Wn(this,r)},catch(r){return Xn(this,r)},pipe(r){return ur(this,r)},readonly(){return Yn(this)},describe(r){let n=this.clone();return xe.add(n,{description:r}),n},meta(...r){if(r.length===0)return xe.get(this);let n=this.clone();return xe.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return xe.get(e)?.description},configurable:!0}),e)),bn=D("_ZodString",(e,t)=>{Du.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,u,i)=>Kg(e,n,u,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ot(e,"_ZodString",{regex(...n){return this.check(_u(...n))},includes(...n){return this.check(Fu(...n))},startsWith(...n){return this.check(zu(...n))},endsWith(...n){return this.check(ju(...n))},min(...n){return this.check(Je(...n))},max(...n){return this.check(Ft(...n))},length(...n){return this.check(zt(...n))},nonempty(...n){return this.check(Je(1,...n))},lowercase(n){return this.check(Iu(n))},uppercase(n){return this.check(Su(n))},trim(){return this.check(Tu())},normalize(...n){return this.check(Ru(...n))},toLowerCase(){return this.check(Nu())},toUpperCase(){return this.check(Mu())},slugify(){return this.check(Pu())}})}),Zu=D("ZodString",(e,t)=>{Du.init(e,t),bn.init(e,t),e.email=r=>e.check(Wr(Dn,r)),e.url=r=>e.check(Au(qu,r)),e.jwt=r=>e.check(fn(Rn,r)),e.emoji=r=>e.check(Qr(wn,r)),e.guid=r=>e.check(ku(Lu,r)),e.uuid=r=>e.check(Kr(Fe,r)),e.uuidv4=r=>e.check(Hr(Fe,r)),e.uuidv6=r=>e.check(Xr(Fe,r)),e.uuidv7=r=>e.check(Yr(Fe,r)),e.nanoid=r=>e.check(en(Bn,r)),e.guid=r=>e.check(ku(Lu,r)),e.cuid=r=>e.check(tn(xn,r)),e.cuid2=r=>e.check(un($n,r)),e.ulid=r=>e.check(rn(Cn,r)),e.base64=r=>e.check(cn(zn,r)),e.base64url=r=>e.check(pn(jn,r)),e.xid=r=>e.check(nn(kn,r)),e.ksuid=r=>e.check(sn(An,r)),e.ipv4=r=>e.check(an(_n,r)),e.ipv6=r=>e.check(on(In,r)),e.cidrv4=r=>e.check(ln(Sn,r)),e.cidrv6=r=>e.check(dn(Fn,r)),e.e164=r=>e.check(mn(On,r)),e.datetime=r=>e.check(bo(r)),e.date=r=>e.check(wo(r)),e.time=r=>e.check(xo(r)),e.duration=r=>e.check(Co(r))});function Rt(e){return Aa(Zu,e)}s(Rt,"pn"),o(Rt,"string");var ue=D("ZodStringFormat",(e,t)=>{te.init(e,t),bn.init(e,t)}),Dn=D("ZodEmail",(e,t)=>{yf.init(e,t),ue.init(e,t)});function ko(e){return Wr(Dn,e)}s(ko,"Zb"),o(ko,"email");var Lu=D("ZodGUID",(e,t)=>{gf.init(e,t),ue.init(e,t)});function Ao(e){return ku(Lu,e)}s(Ao,"Vb"),o(Ao,"guid");var Fe=D("ZodUUID",(e,t)=>{vf.init(e,t),ue.init(e,t)});function _o(e){return Kr(Fe,e)}s(_o,"qb"),o(_o,"uuid");function Io(e){return Hr(Fe,e)}s(Io,"Gb"),o(Io,"uuidv4");function So(e){return Xr(Fe,e)}s(So,"Jb"),o(So,"uuidv6");function Fo(e){return Yr(Fe,e)}s(Fo,"Wb"),o(Fo,"uuidv7");var qu=D("ZodURL",(e,t)=>{Ef.init(e,t),ue.init(e,t)});function zo(e){return Au(qu,e)}s(zo,"Kb"),o(zo,"url");function jo(e){return Au(qu,{protocol:Ve.httpProtocol,hostname:Ve.domain,...W.normalizeParams(e)})}s(jo,"Xb"),o(jo,"httpUrl");var wn=D("ZodEmoji",(e,t)=>{bf.init(e,t),ue.init(e,t)});function Oo(e){return Qr(wn,e)}s(Oo,"Hb"),o(Oo,"emoji");var Bn=D("ZodNanoID",(e,t)=>{Df.init(e,t),ue.init(e,t)});function Ro(e){return en(Bn,e)}s(Ro,"Yb"),o(Ro,"nanoid");var xn=D("ZodCUID",(e,t)=>{wf.init(e,t),ue.init(e,t)});function To(e){return tn(xn,e)}s(To,"Qb"),o(To,"cuid");var $n=D("ZodCUID2",(e,t)=>{Bf.init(e,t),ue.init(e,t)});function No(e){return un($n,e)}s(No,"ex"),o(No,"cuid2");var Cn=D("ZodULID",(e,t)=>{xf.init(e,t),ue.init(e,t)});function Mo(e){return rn(Cn,e)}s(Mo,"tx"),o(Mo,"ulid");var kn=D("ZodXID",(e,t)=>{$f.init(e,t),ue.init(e,t)});function Po(e){return nn(kn,e)}s(Po,"rx"),o(Po,"xid");var An=D("ZodKSUID",(e,t)=>{Cf.init(e,t),ue.init(e,t)});function Uo(e){return sn(An,e)}s(Uo,"nx"),o(Uo,"ksuid");var _n=D("ZodIPv4",(e,t)=>{Sf.init(e,t),ue.init(e,t)});function Zo(e){return an(_n,e)}s(Zo,"ox"),o(Zo,"ipv4");var Lo=D("ZodMAC",(e,t)=>{zf.init(e,t),ue.init(e,t)});function qo(e){return Ia(Lo,e)}s(qo,"ix"),o(qo,"mac");var In=D("ZodIPv6",(e,t)=>{Ff.init(e,t),ue.init(e,t)});function Vo(e){return on(In,e)}s(Vo,"sx"),o(Vo,"ipv6");var Sn=D("ZodCIDRv4",(e,t)=>{jf.init(e,t),ue.init(e,t)});function Jo(e){return ln(Sn,e)}s(Jo,"ax"),o(Jo,"cidrv4");var Fn=D("ZodCIDRv6",(e,t)=>{Of.init(e,t),ue.init(e,t)});function Go(e){return dn(Fn,e)}s(Go,"cx"),o(Go,"cidrv6");var zn=D("ZodBase64",(e,t)=>{Rf.init(e,t),ue.init(e,t)});function Wo(e){return cn(zn,e)}s(Wo,"ux"),o(Wo,"base64");var jn=D("ZodBase64URL",(e,t)=>{Tf.init(e,t),ue.init(e,t)});function Ko(e){return pn(jn,e)}s(Ko,"lx"),o(Ko,"base64url");var On=D("ZodE164",(e,t)=>{Nf.init(e,t),ue.init(e,t)});function Ho(e){return mn(On,e)}s(Ho,"dx"),o(Ho,"e164");var Rn=D("ZodJWT",(e,t)=>{Mf.init(e,t),ue.init(e,t)});function Xo(e){return fn(Rn,e)}s(Xo,"px"),o(Xo,"jwt");var Tt=D("ZodCustomStringFormat",(e,t)=>{Pf.init(e,t),ue.init(e,t)});function Yo(e,t,r={}){return jt(Tt,e,t,r)}s(Yo,"mx"),o(Yo,"stringFormat");function Qo(e){return jt(Tt,"hostname",Ve.hostname,e)}s(Qo,"fx"),o(Qo,"hostname");function e0(e){return jt(Tt,"hex",Ve.hex,e)}s(e0,"hx"),o(e0,"hex");function t0(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,u=Ve[n];if(!u)throw new Error(`Unrecognized hash format: ${n}`);return jt(Tt,n,u,t)}s(t0,"gx"),o(t0,"hash");var Vu=D("ZodNumber",(e,t)=>{Xs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,u,i)=>Hg(e,n,u,i),Ot(e,"ZodNumber",{gt(n,u){return this.check(Ne(n,u))},gte(n,u){return this.check(he(n,u))},min(n,u){return this.check(he(n,u))},lt(n,u){return this.check(Te(n,u))},lte(n,u){return this.check(De(n,u))},max(n,u){return this.check(De(n,u))},int(n){return this.check(Ju(n))},safe(n){return this.check(Ju(n))},positive(n){return this.check(Ne(0,n))},nonnegative(n){return this.check(he(0,n))},negative(n){return this.check(Te(0,n))},nonpositive(n){return this.check(De(0,n))},multipleOf(n,u){return this.check(at(n,u))},step(n,u){return this.check(at(n,u))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Tn(e){return Oa(Vu,e)}s(Tn,"qp"),o(Tn,"number");var pt=D("ZodNumberFormat",(e,t)=>{Uf.init(e,t),Vu.init(e,t)});function Ju(e){return Ta(pt,e)}s(Ju,"Wi"),o(Ju,"int");function u0(e){return Na(pt,e)}s(u0,"vx"),o(u0,"float32");function r0(e){return Ma(pt,e)}s(r0,"yx"),o(r0,"float64");function n0(e){return Pa(pt,e)}s(n0,"bx"),o(n0,"int32");function i0(e){return Ua(pt,e)}s(i0,"xx"),o(i0,"uint32");var Gu=D("ZodBoolean",(e,t)=>{Ys.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Xg(e,r,n,u)});function Nn(e){return Za(Gu,e)}s(Nn,"Gp"),o(Nn,"boolean");var Wu=D("ZodBigInt",(e,t)=>{Qs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,u,i)=>Yg(e,n,u,i),e.gte=(n,u)=>e.check(he(n,u)),e.min=(n,u)=>e.check(he(n,u)),e.gt=(n,u)=>e.check(Ne(n,u)),e.gte=(n,u)=>e.check(he(n,u)),e.min=(n,u)=>e.check(he(n,u)),e.lt=(n,u)=>e.check(Te(n,u)),e.lte=(n,u)=>e.check(De(n,u)),e.max=(n,u)=>e.check(De(n,u)),e.positive=n=>e.check(Ne(BigInt(0),n)),e.negative=n=>e.check(Te(BigInt(0),n)),e.nonpositive=n=>e.check(De(BigInt(0),n)),e.nonnegative=n=>e.check(he(BigInt(0),n)),e.multipleOf=(n,u)=>e.check(at(n,u));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function s0(e){return qa(Wu,e)}s(s0,"_x"),o(s0,"bigint");var Mn=D("ZodBigIntFormat",(e,t)=>{Zf.init(e,t),Wu.init(e,t)});function a0(e){return Ja(Mn,e)}s(a0,"wx"),o(a0,"int64");function o0(e){return Ga(Mn,e)}s(o0,"$x"),o(o0,"uint64");var l0=D("ZodSymbol",(e,t)=>{Lf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Qg(e,r,n,u)});function d0(e){return Wa(l0,e)}s(d0,"kx"),o(d0,"symbol");var c0=D("ZodUndefined",(e,t)=>{qf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>tv(e,r,n,u)});function p0(e){return Ka(c0,e)}s(p0,"Sx"),o(p0,"_undefined");var m0=D("ZodNull",(e,t)=>{Vf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>ev(e,r,n,u)});function Pn(e){return Ha(m0,e)}s(Pn,"Xp"),o(Pn,"_null");var f0=D("ZodAny",(e,t)=>{Jf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>nv(e,r,n,u)});function h0(){return Xa(f0)}s(h0,"Ix"),o(h0,"any");var g0=D("ZodUnknown",(e,t)=>{Gf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>iv(e,r,n,u)});function Ge(){return Ya(g0)}s(Ge,"jt"),o(Ge,"unknown");var v0=D("ZodNever",(e,t)=>{Wf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>rv(e,r,n,u)});function Ku(e){return Qa(v0,e)}s(Ku,"fs"),o(Ku,"never");var y0=D("ZodVoid",(e,t)=>{Kf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>uv(e,r,n,u)});function E0(e){return eo(y0,e)}s(E0,"Rx"),o(E0,"_void");var Un=D("ZodDate",(e,t)=>{Hf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,u,i)=>sv(e,n,u,i),e.min=(n,u)=>e.check(he(n,u)),e.max=(n,u)=>e.check(De(n,u));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function b0(e){return to(Un,e)}s(b0,"Ex"),o(b0,"date");var D0=D("ZodArray",(e,t)=>{Xf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>yv(e,r,n,u),e.element=t.element,Ot(e,"ZodArray",{min(r,n){return this.check(Je(r,n))},nonempty(r){return this.check(Je(1,r))},max(r,n){return this.check(Ft(r,n))},length(r,n){return this.check(zt(r,n))},unwrap(){return this.element}})});function Nt(e,t){return no(D0,e,t)}s(Nt,"bn"),o(Nt,"array");function w0(e){let t=e._zod.def.shape;return Qu(Object.keys(t))}s(w0,"Tx"),o(w0,"keyof");var Hu=D("ZodObject",(e,t)=>{Qf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Ev(e,r,n,u),W.defineLazy(e,"shape",()=>t.shape),Ot(e,"ZodObject",{keyof(){return Qu(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Ge()})},loose(){return this.clone({...this._zod.def,catchall:Ge()})},strict(){return this.clone({...this._zod.def,catchall:Ku()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return W.extend(this,r)},safeExtend(r){return W.safeExtend(this,r)},merge(r){return W.merge(this,r)},pick(r){return W.pick(this,r)},omit(r){return W.omit(this,r)},partial(...r){return W.partial(Vn,this,r[0])},required(...r){return W.required(Kn,this,r[0])}})});function B0(e,t){let r={type:"object",shape:e??{},...W.normalizeParams(t)};return new Hu(r)}s(B0,"Ax"),o(B0,"object");function x0(e,t){return new Hu({type:"object",shape:e,catchall:Ku(),...W.normalizeParams(t)})}s(x0,"zx"),o(x0,"strictObject");function $0(e,t){return new Hu({type:"object",shape:e,catchall:Ge(),...W.normalizeParams(t)})}s($0,"Ox"),o($0,"looseObject");var Xu=D("ZodUnion",(e,t)=>{Vr.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>fo(e,r,n,u),e.options=t.options});function Yu(e,t){return new Xu({type:"union",options:e,...W.normalizeParams(t)})}s(Yu,"hs"),o(Yu,"union");var C0=D("ZodXor",(e,t)=>{Xu.init(e,t),eh.init(e,t),e._zod.processJSONSchema=(r,n,u)=>fo(e,r,n,u),e.options=t.options});function k0(e,t){return new C0({type:"union",options:e,inclusive:!1,...W.normalizeParams(t)})}s(k0,"jx"),o(k0,"xor");var A0=D("ZodDiscriminatedUnion",(e,t)=>{Xu.init(e,t),th.init(e,t)});function _0(e,t,r){return new A0({type:"union",options:t,discriminator:e,...W.normalizeParams(r)})}s(_0,"Px"),o(_0,"discriminatedUnion");var I0=D("ZodIntersection",(e,t)=>{uh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>bv(e,r,n,u)});function Zn(e,t){return new I0({type:"intersection",left:e,right:t})}s(Zn,"im"),o(Zn,"intersection");var S0=D("ZodTuple",(e,t)=>{sa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Dv(e,r,n,u),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ln(e,t,r){let n=t instanceof L,u=n?r:t,i=n?t:null;return new S0({type:"tuple",items:e,rest:i,...W.normalizeParams(u)})}s(Ln,"am"),o(Ln,"tuple");var Mt=D("ZodRecord",(e,t)=>{rh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>wv(e,r,n,u),e.keyType=t.keyType,e.valueType=t.valueType});function qn(e,t,r){return!t||!t._zod?new Mt({type:"record",keyType:Rt(),valueType:e,...W.normalizeParams(t)}):new Mt({type:"record",keyType:e,valueType:t,...W.normalizeParams(r)})}s(qn,"cm"),o(qn,"record");function F0(e,t,r){let n=ye(e);return n._zod.values=void 0,new Mt({type:"record",keyType:n,valueType:t,...W.normalizeParams(r)})}s(F0,"Mx"),o(F0,"partialRecord");function z0(e,t,r){return new Mt({type:"record",keyType:e,valueType:t,mode:"loose",...W.normalizeParams(r)})}s(z0,"Nx"),o(z0,"looseRecord");var j0=D("ZodMap",(e,t)=>{nh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>gv(e,r,n,u),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Me(...r)),e.nonempty=r=>e.check(Me(1,r)),e.max=(...r)=>e.check(ot(...r)),e.size=(...r)=>e.check(St(...r))});function O0(e,t,r){return new j0({type:"map",keyType:e,valueType:t,...W.normalizeParams(r)})}s(O0,"Dx"),o(O0,"map");var R0=D("ZodSet",(e,t)=>{ih.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>vv(e,r,n,u),e.min=(...r)=>e.check(Me(...r)),e.nonempty=r=>e.check(Me(1,r)),e.max=(...r)=>e.check(ot(...r)),e.size=(...r)=>e.check(St(...r))});function T0(e,t){return new R0({type:"set",valueType:e,...W.normalizeParams(t)})}s(T0,"Cx"),o(T0,"set");var Pt=D("ZodEnum",(e,t)=>{sh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,u,i)=>av(e,n,u,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,u)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Pt({...t,checks:[],...W.normalizeParams(u),entries:i})},e.exclude=(n,u)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Pt({...t,checks:[],...W.normalizeParams(u),entries:i})}});function Qu(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Pt({type:"enum",entries:r,...W.normalizeParams(t)})}s(Qu,"gs"),o(Qu,"_enum");function N0(e,t){return new Pt({type:"enum",entries:e,...W.normalizeParams(t)})}s(N0,"Ux"),o(N0,"nativeEnum");var M0=D("ZodLiteral",(e,t)=>{ah.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>ov(e,r,n,u),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function P0(e,t){return new M0({type:"literal",values:Array.isArray(e)?e:[e],...W.normalizeParams(t)})}s(P0,"Lx"),o(P0,"literal");var U0=D("ZodFile",(e,t)=>{oh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>cv(e,r,n,u),e.min=(r,n)=>e.check(Me(r,n)),e.max=(r,n)=>e.check(ot(r,n)),e.mime=(r,n)=>e.check(Ou(Array.isArray(r)?r:[r],n))});function Z0(e){return io(U0,e)}s(Z0,"Fx"),o(Z0,"file");var L0=D("ZodTransform",(e,t)=>{lh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>hv(e,r,n,u),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nr(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(W.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(W.issue(a))}};let u=t.transform(r.value,r);return u instanceof Promise?u.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=u,r.fallback=!0,r)}});function er(e){return new L0({type:"transform",transform:e})}s(er,"vs"),o(er,"transform");var Vn=D("ZodOptional",(e,t)=>{ma.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>ho(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Ut(e){return new Vn({type:"optional",innerType:e})}s(Ut,"fn"),o(Ut,"optional");var q0=D("ZodExactOptional",(e,t)=>{dh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>ho(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Jn(e){return new q0({type:"optional",innerType:e})}s(Jn,"hm"),o(Jn,"exactOptional");var V0=D("ZodNullable",(e,t)=>{ch.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Bv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Zt(e){return new V0({type:"nullable",innerType:e})}s(Zt,"hn"),o(Zt,"nullable");function J0(e){return Ut(Zt(e))}s(J0,"Bx"),o(J0,"nullish");var G0=D("ZodDefault",(e,t)=>{ph.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>$v(e,r,n,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gn(e,t){return new G0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}s(Gn,"ym"),o(Gn,"_default");var W0=D("ZodPrefault",(e,t)=>{mh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Cv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Wn(e,t){return new W0({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}s(Wn,"xm"),o(Wn,"prefault");var Kn=D("ZodNonOptional",(e,t)=>{fh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>xv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Hn(e,t){return new Kn({type:"nonoptional",innerType:e,...W.normalizeParams(t)})}s(Hn,"_m"),o(Hn,"nonoptional");var K0=D("ZodSuccess",(e,t)=>{hh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>pv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function H0(e){return new K0({type:"success",innerType:e})}s(H0,"Zx"),o(H0,"success");var X0=D("ZodCatch",(e,t)=>{gh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>kv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xn(e,t){return new X0({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}s(Xn,"km"),o(Xn,"_catch");var Y0=D("ZodNaN",(e,t)=>{vh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>lv(e,r,n,u)});function Q0(e){return ro(Y0,e)}s(Q0,"Vx"),o(Q0,"nan");var tr=D("ZodPipe",(e,t)=>{ga.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Av(e,r,n,u),e.in=t.in,e.out=t.out});function ur(e,t){return new tr({type:"pipe",in:e,out:t})}s(ur,"Ki"),o(ur,"pipe");var rr=D("ZodCodec",(e,t)=>{tr.init(e,t),va.init(e,t)});function el(e,t,r){return new rr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}s(el,"qx"),o(el,"codec");function tl(e){let t=e._zod.def;return new rr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}s(tl,"Gx"),o(tl,"invertCodec");var ul=D("ZodPreprocess",(e,t)=>{tr.init(e,t),yh.init(e,t)}),rl=D("ZodReadonly",(e,t)=>{Eh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>_v(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function Yn(e){return new rl({type:"readonly",innerType:e})}s(Yn,"Em"),o(Yn,"readonly");var nl=D("ZodTemplateLiteral",(e,t)=>{bh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>dv(e,r,n,u)});function il(e,t){return new nl({type:"template_literal",parts:e,...W.normalizeParams(t)})}s(il,"Jx"),o(il,"templateLiteral");var sl=D("ZodLazy",(e,t)=>{Bh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Sv(e,r,n,u),e.unwrap=()=>e._zod.def.getter()});function Qn(e){return new sl({type:"lazy",getter:e})}s(Qn,"zm"),o(Qn,"lazy");var al=D("ZodPromise",(e,t)=>{wh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>Iv(e,r,n,u),e.unwrap=()=>e._zod.def.innerType});function ol(e){return new al({type:"promise",innerType:e})}s(ol,"Wx"),o(ol,"promise");var ll=D("ZodFunction",(e,t)=>{Dh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>fv(e,r,n,u)});function nr(e){return new ll({type:"function",input:Array.isArray(e?.input)?Ln(e?.input):e?.input??Nt(Ge()),output:e?.output??Ge()})}s(nr,"Kx"),o(nr,"_function");var ir=D("ZodCustom",(e,t)=>{xh.init(e,t),J.init(e,t),e._zod.processJSONSchema=(r,n,u)=>mv(e,r,n,u)});function dl(e){let t=new ne({check:"custom"});return t._zod.check=e,t}s(dl,"Xx"),o(dl,"check");function cl(e,t){return so(ir,e??(()=>!0),t)}s(cl,"Hx"),o(cl,"custom");function ei(e,t={}){return ao(ir,e,t)}s(ei,"Pm"),o(ei,"refine");function ti(e,t){return oo(e,t)}s(ti,"Mm"),o(ti,"superRefine");var Wv=co,Kv=po;function pl(e,t={}){let r=new ir({type:"custom",check:"custom",fn:o(n=>n instanceof e,"fn"),abort:!0,...W.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}s(pl,"e_"),o(pl,"_instanceof");var Hv=o((...e)=>mo({Codec:rr,Boolean:Gu,String:Zu},...e),"stringbool");function ml(e){let t=Qn(()=>Yu([Rt(e),Tn(),Nn(),Pn(),Nt(t),qn(Rt(),t)]));return t}s(ml,"r_"),o(ml,"json");function fl(e,t){return new ul({type:"pipe",in:er(e),out:t})}s(fl,"n_"),o(fl,"preprocess");var C5={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Xv(e){ce({customError:e})}s(Xv,"gR"),o(Xv,"setErrorMap");function Yv(){return ce().customError}s(Yv,"vR"),o(Yv,"getErrorMap");var hl;hl||(hl={});var T={...Fv,...zv,iso:yo},k5=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Qv(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}s(Qv,"bR"),o(Qv,"detectVersion");function e1(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let u=r[1];if(!u||!t.defs[u])throw new Error(`Reference not found: ${e}`);return t.defs[u]}throw new Error(`Reference not found: ${e}`)}s(e1,"xR"),o(e1,"resolveRef");function gl(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return T.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 u=e.$ref;if(t.refs.has(u))return t.refs.get(u);if(t.processing.has(u))return T.lazy(()=>{if(!t.refs.has(u))throw new Error(`Circular reference not resolved: ${u}`);return t.refs.get(u)});t.processing.add(u);let i=e1(u,t),a=me(i,t);return t.refs.set(u,a),t.processing.delete(u),a}if(e.enum!==void 0){let u=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&u.length===1&&u[0]===null)return T.null();if(u.length===0)return T.never();if(u.length===1)return T.literal(u[0]);if(u.every(a=>typeof a=="string"))return T.enum(u);let i=u.map(a=>T.literal(a));return i.length<2?i[0]:T.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return T.literal(e.const);let r=e.type;if(Array.isArray(r)){let u=r.map(i=>{let a={...e,type:i};return gl(a,t)});return u.length===0?T.never():u.length===1?u[0]:T.union(u)}if(!r)return T.any();let n;switch(r){case"string":{let u=T.string();if(e.format){let i=e.format;i==="email"?u=u.check(T.email()):i==="uri"||i==="uri-reference"?u=u.check(T.url()):i==="uuid"||i==="guid"?u=u.check(T.uuid()):i==="date-time"?u=u.check(T.iso.datetime()):i==="date"?u=u.check(T.iso.date()):i==="time"?u=u.check(T.iso.time()):i==="duration"?u=u.check(T.iso.duration()):i==="ipv4"?u=u.check(T.ipv4()):i==="ipv6"?u=u.check(T.ipv6()):i==="mac"?u=u.check(T.mac()):i==="cidr"?u=u.check(T.cidrv4()):i==="cidr-v6"?u=u.check(T.cidrv6()):i==="base64"?u=u.check(T.base64()):i==="base64url"?u=u.check(T.base64url()):i==="e164"?u=u.check(T.e164()):i==="jwt"?u=u.check(T.jwt()):i==="emoji"?u=u.check(T.emoji()):i==="nanoid"?u=u.check(T.nanoid()):i==="cuid"?u=u.check(T.cuid()):i==="cuid2"?u=u.check(T.cuid2()):i==="ulid"?u=u.check(T.ulid()):i==="xid"?u=u.check(T.xid()):i==="ksuid"&&(u=u.check(T.ksuid()))}typeof e.minLength=="number"&&(u=u.min(e.minLength)),typeof e.maxLength=="number"&&(u=u.max(e.maxLength)),e.pattern&&(u=u.regex(new RegExp(e.pattern))),n=u;break}case"number":case"integer":{let u=r==="integer"?T.number().int():T.number();typeof e.minimum=="number"&&(u=u.min(e.minimum)),typeof e.maximum=="number"&&(u=u.max(e.maximum)),typeof e.exclusiveMinimum=="number"?u=u.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(u=u.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?u=u.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(u=u.lt(e.maximum)),typeof e.multipleOf=="number"&&(u=u.multipleOf(e.multipleOf)),n=u;break}case"boolean":{n=T.boolean();break}case"null":{n=T.null();break}case"object":{let u={},i=e.properties||{},a=new Set(e.required||[]);for(let[d,c]of Object.entries(i)){let p=me(c,t);u[d]=a.has(d)?p:p.optional()}if(e.propertyNames){let d=me(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?me(e.additionalProperties,t):T.any();if(Object.keys(u).length===0){n=T.record(d,c);break}let p=T.object(u).passthrough(),m=T.looseRecord(d,c);n=T.intersection(p,m);break}if(e.patternProperties){let d=e.patternProperties,c=Object.keys(d),p=[];for(let f of c){let h=me(d[f],t),g=T.string().regex(new RegExp(f));p.push(T.looseRecord(g,h))}let m=[];if(Object.keys(u).length>0&&m.push(T.object(u).passthrough()),m.push(...p),m.length===0)n=T.object({}).passthrough();else if(m.length===1)n=m[0];else{let f=T.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)f=T.intersection(f,m[h]);n=f}break}let l=T.object(u);e.additionalProperties===!1?n=l.strict():typeof e.additionalProperties=="object"?n=l.catchall(me(e.additionalProperties,t)):n=l.passthrough();break}case"array":{let u=e.prefixItems,i=e.items;if(u&&Array.isArray(u)){let a=u.map(d=>me(d,t)),l=i&&typeof i=="object"&&!Array.isArray(i)?me(i,t):void 0;l?n=T.tuple(a).rest(l):n=T.tuple(a),typeof e.minItems=="number"&&(n=n.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(T.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(d=>me(d,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?me(e.additionalItems,t):void 0;l?n=T.tuple(a).rest(l):n=T.tuple(a),typeof e.minItems=="number"&&(n=n.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(T.maxLength(e.maxItems)))}else if(i!==void 0){let a=me(i,t),l=T.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),n=l}else n=T.array(T.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}s(gl,"o_"),o(gl,"convertBaseSchema");function me(e,t){if(typeof e=="boolean")return e?T.any():T.never();let r=gl(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(c=>me(c,t)),d=T.union(l);r=n?T.intersection(r,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(c=>me(c,t)),d=T.xor(l);r=n?T.intersection(r,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:T.any();else{let l=n?r:me(e.allOf[0],t),d=n?0:1;for(let c=d;c<e.allOf.length;c++)l=T.intersection(l,me(e.allOf[c],t));r=l}e.nullable===!0&&t.version==="openapi-3.0"&&(r=T.nullable(r)),e.readOnly===!0&&(r=T.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let u={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of i)l in e&&(u[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(u[l]=e[l]);for(let l of Object.keys(e))k5.has(l)||(u[l]=e[l]);return Object.keys(u).length>0&&t.registry.add(r,u),e.description&&(r=r.describe(e.description)),r}s(me,"he"),o(me,"convertSchema");function t1(e,t){if(typeof e=="boolean")return e?T.any():T.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=Qv(r,t?.defaultTarget),u=r.$defs||r.definitions||{},i={version:n,defs:u,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??xe};return me(r,i)}s(t1,"i_"),o(t1,"fromJSONSchema");var u1={};Oe(u1,{bigint:s(()=>s1,"bigint"),boolean:s(()=>i1,"boolean"),date:s(()=>a1,"date"),number:s(()=>n1,"number"),string:s(()=>r1,"string")});function r1(e){return _a(Zu,e)}s(r1,"_R"),o(r1,"string");function n1(e){return Ra(Vu,e)}s(n1,"wR"),o(n1,"number");function i1(e){return La(Gu,e)}s(i1,"$R"),o(i1,"boolean");function s1(e){return Va(Wu,e)}s(s1,"kR"),o(s1,"bigint");function a1(e){return uo(Un,e)}s(a1,"SR"),o(a1,"date"),ce(wa());var vl=v.object({file:v.string(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),symbol:v.string().optional(),componentName:v.string().optional(),hookName:v.string().optional()}),A5=v.enum(["user-click","user-input","keyboard","route-load","effect","memo-recompute","timer","raf","idle-callback","websocket-message","broadcast-channel","post-message","storage-event","service-worker-message","media-query-change","visibility-change","resize","intersection-observer","mutation-observer","backend-response","hmr-update","ai-turn","page-load","form-submit","input-change"]),o1=v.object({sessionId:v.string(),browserContextId:v.string().optional(),tabId:v.string().optional(),frameId:v.string().optional(),route:v.string().optional(),url:v.string().optional(),flowId:v.string().optional(),originType:A5.optional(),originNodeId:v.string().optional(),causedByNodeId:v.string().optional(),requestId:v.string().optional(),parentRequestId:v.string().optional(),traceparent:v.string().optional(),projectName:v.string().optional(),userActionId:v.string().optional(),userIdHash:v.string().optional(),tenantIdHash:v.string().optional()}),_5=v.enum(["nx","vite","typescript","eslint","rollup","client-runtime","chrome","react","valtio","nestjs","nextjs","db","redis","queue","memory","visual","perf","security","gateway","external","ai","lens"]),I5=v.enum(["build","lint","typecheck","test","runtime","render","visual","trace","state","network","backend","db","memory","performance","security","deps","cluster","ai"]),yl=v.enum(["debug","info","warning","error","fatal"]),kA=v.object({id:v.string(),sessionId:v.string(),timestamp:v.number().int().nonnegative(),source:_5,category:I5,severity:yl,context:o1,fingerprint:v.string(),title:v.string(),message:v.string().optional(),location:vl.optional(),relatedFiles:v.array(v.string()).optional(),relatedUrls:v.array(v.string()).optional(),raw:v.unknown().optional()}),S5=v.enum(["session","browser-context","tab","renderer","router","route","page","component","element","slot","render","react-mount","react-unmount","hook","effect","effect-run","memo","memo-compute","ui-event","handler","animation","animation-frame","transition","timer","api-client-call","http-request","http-response","server-process","nest-app","nest-module","nest-provider","singleton-instance","server-request","guard","controller","service-method","loop","loop-iteration","queue-job","db-query","redis-op","promise","promise-continuation","state-store","state-update","selector","selector-update","visual-frame","visual-violation","style-change","layout-change","memory-owner","memory-mutation","memory-retention","heap-snapshot","build-event","lint-event","typecheck-event","test-event","bundle-report","hmr-update"]),F5=v.enum(["created","active","completed","disposed","errored"]),AA=v.object({id:v.string(),parentTraceNodeId:v.string().optional(),type:S5,logicalId:v.string().optional(),instanceId:v.string().optional(),generation:v.number().int().nonnegative().optional(),lifecycle:F5,context:o1,name:v.string(),startTime:v.number().int().nonnegative(),endTime:v.number().int().nonnegative().optional(),durationMs:v.number().nonnegative().optional(),location:vl.optional(),attributes:v.record(v.string(),v.unknown())}),z5=v.enum(["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"]),_A=v.object({id:v.string(),from:v.string(),to:v.string(),axis:z5,type:v.string(),timestamp:v.number().int().nonnegative(),attributes:v.record(v.string(),v.unknown()).optional()}),j5=v.enum(["mount","update"]),O5=v.discriminatedUnion("type",[v.object({type:v.literal("props"),changedKeys:v.array(v.string())}),v.object({type:v.literal("react-state"),hookIndex:v.number().int()}),v.object({type:v.literal("context"),contextName:v.string()}),v.object({type:v.literal("valtio-path"),path:v.string(),changedKeys:v.array(v.string())}),v.object({type:v.literal("parent-render"),parentRenderId:v.string()}),v.object({type:v.literal("hook-dep-changed"),hookInstanceId:v.string(),depsHashBefore:v.string(),depsHashAfter:v.string()}),v.object({type:v.literal("force"),reason:v.string()})]),IA=v.object({phase:j5,actualDurationMs:v.number().nonnegative(),baseDurationMs:v.number().nonnegative(),startTime:v.number().nonnegative(),commitTime:v.number().nonnegative(),why:v.array(O5)}),SA=v.object({hookInstanceId:v.string(),depsHash:v.string(),prevDepsHash:v.string().optional(),durationMs:v.number().nonnegative(),cleanupRan:v.boolean().optional()}),FA=v.object({storeId:v.string(),path:v.string(),changedKeys:v.array(v.string()),beforeHash:v.string(),afterHash:v.string(),preview:v.unknown().optional()}),zA=v.object({method:v.string(),route:v.string(),status:v.number().int().optional(),durationMs:v.number().nonnegative().optional(),traceparent:v.string().optional()}),R5=v.enum(["N+1","sequential-await","growing-allocation"]),jA=v.object({iterations:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),dbCallsInsideLoop:v.number().int().nonnegative(),redisCallsInsideLoop:v.number().int().nonnegative(),awaitedOperationsInsideLoop:v.number().int().nonnegative(),slowestIterations:v.array(v.object({index:v.number().int().nonnegative(),durationMs:v.number().nonnegative(),childNodeIds:v.array(v.string())})).optional(),patterns:v.array(R5).optional()}),T5=v.enum(["Map","Set","Array","EventEmitter","Queue","RxSubject","Timer","Interval","Custom"]),OA=v.object({ownerInstanceId:v.string(),containerKind:T5,fieldName:v.string(),itemCount:v.number().int().nonnegative(),estimatedBytes:v.number().nonnegative(),retainedBytes:v.number().nonnegative().optional(),growthSinceStart:v.number()}),N5=v.enum(["set","push","add","delete","clear","subscribe","listen","schedule"]),RA=v.object({ownerNodeId:v.string(),operation:N5,beforeCount:v.number().int().nonnegative(),afterCount:v.number().int().nonnegative(),estimatedDeltaBytes:v.number(),keyPreview:v.string().optional(),valueType:v.string().optional()}),l1=v.object({x:v.number(),y:v.number(),width:v.number().nonnegative(),height:v.number().nonnegative()}),M5=v.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]),P5=v.enum(["computed-style","layout","paint-order"]),TA=v.object({causedBy:M5,viewport:l1,layoutSnapshotId:v.string(),styleSnapshotId:v.string(),screenshotId:v.string().optional(),changedNodes:v.array(v.object({uid:v.string(),component:v.string().optional(),change:P5,property:v.string().optional(),before:v.unknown().optional(),after:v.unknown().optional()}))}),U5=v.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]),Z5=v.enum(["always","after-animation","stable-only","during-animation"]),L5=v.enum(["info","warning","error"]),NA=v.object({ruleId:v.string(),ruleType:U5,severity:L5,timing:Z5,element:v.object({uid:v.string(),component:v.string().optional(),rect:l1}),expected:v.record(v.string(),v.unknown()),actual:v.record(v.string(),v.unknown()),evidence:v.object({computedStyle:v.string().optional(),screenshotCrop:v.string().optional(),trace:v.string().optional(),cssCause:v.object({selector:v.string(),file:v.string().optional(),line:v.number().int().optional(),declaration:v.string().optional()}).optional()})}),q5=v.enum(["none","connected"]),V5=v.enum(["running","clean","failing","error"]),J5=v.object({id:v.string(),tool:v.string(),project:v.string().optional(),firstReportedAt:v.number().int().nonnegative(),lastReportedAt:v.number().int().nonnegative(),lastRunStatus:V5,lastRunDurationMs:v.number().int().nonnegative().optional(),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative().optional(),error:v.string().optional()}),ui=v.object({producer:q5,producers:v.array(J5),lastReportedAt:v.number().int().nonnegative().optional(),ageMs:v.number().int().nonnegative().optional(),stale:v.boolean(),detail:v.string()}),d1=10*6e4;function ri(e){let t=e.now??Date.now(),r=[...e.producers].sort((c,p)=>p.lastReportedAt-c.lastReportedAt);if(r.length===0)return{producer:"none",producers:[],stale:!1,detail:`No ${e.domain} producer has ever reported into this session \u2014 this is NOT a clean result, nothing is watching. ${e.noProducerHint}`};let n=r[0].lastReportedAt,u=Math.max(0,t-n),i=u>d1,a=r.filter(c=>c.lastRunStatus==="failing"),l=r.filter(c=>c.lastRunStatus==="error"),d=[`${r.length} ${e.domain} producer${r.length===1?"":"s"} reporting (${r.map(c=>c.id).join(", ")}); newest report ${c1(u)}.`];return l.length>0&&d.push(`${l.length} produced NO verdict (the tool itself failed): ${l.map(c=>`${c.id} \u2014 ${c.error??"unknown error"}`).join("; ")}.`),a.length>0&&d.push(`${a.length} reporting errors.`),i&&d.push(`Older than ${Math.round(d1/6e4)}m \u2014 the verdict may predate the current source.`),{producer:"connected",producers:r,lastReportedAt:n,ageMs:u,stale:i,detail:d.join(" ")}}s(ri,"kr"),o(ri,"summariseProducers");function c1(e){return e<1e3?"just now":e<6e4?`${Math.round(e/1e3)}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(c1,"qR"),o(c1,"describeAge");var Lt=v.object({$schema:v.string().optional(),schemaVersion:v.literal(1),revision:v.number().int().nonnegative(),updatedAt:v.string().datetime().optional()}),G5=v.enum(["starting","clean","warning","failing"]),p1=v.object({source:v.string(),severity:yl,title:v.string(),fingerprint:v.string(),resource:v.string(),pageId:v.string().optional(),flowId:v.string().optional(),location:vl.optional(),rule:v.string().optional(),fix:v.string().optional(),verify:v.string().optional(),docs:v.string().optional()}),W5=v.object({typecheck:v.enum(["passed","failed","unknown"]).optional(),lint:v.enum(["passed","failed","unknown"]).optional(),build:v.enum(["passed","failed","unknown"]).optional(),runtime:v.enum(["passed","failed","warning","unknown"]).optional(),visual:v.enum(["passed","failed","warning","unknown"]).optional(),memory:v.enum(["passed","failed","warning","unknown"]).optional()}),K5=v.enum(["embedded","shared"]),H5=v.object({mode:K5,pid:v.number(),startedAt:v.string(),url:v.string().optional()}),MA=Lt.extend({sessionId:v.string(),status:G5,activeTab:v.string().optional(),tabsWithIssues:v.array(v.string()).optional(),blocking:v.array(p1),warnings:v.array(p1).default([]),suggestedReads:v.array(v.string()),checks:W5.optional(),server:H5.optional()}),X5=v.object({eventsResident:v.number().int().nonnegative(),eventsResidentBytes:v.number().int().nonnegative(),eventsIngested:v.number().int().nonnegative(),eventsDropped:v.number().int().nonnegative(),eventsDroppedForBytes:v.number().int().nonnegative().optional(),eventCap:v.number().int().nonnegative().optional(),eventByteCap:v.number().int().nonnegative().optional(),artifactsResident:v.number().int().nonnegative().optional(),artifactsResidentBytes:v.number().int().nonnegative().optional(),artifactsDropped:v.number().int().nonnegative().optional(),artifactByteCap:v.number().int().nonnegative().optional(),truncatedEvents:v.number().int().nonnegative().optional(),truncatedBytesReclaimed:v.number().int().nonnegative().optional(),rawByteLimit:v.number().int().nonnegative().optional(),reducers:v.record(v.string(),v.object({residentEvents:v.number().int().nonnegative(),residentBytes:v.number().int().nonnegative(),evictedEvents:v.number().int().nonnegative(),evictedForBytes:v.number().int().nonnegative(),eventCap:v.number().int().nonnegative(),byteCap:v.number().int().nonnegative()})).optional()}),PA=Lt.extend({sessionId:v.string(),supportedResources:v.array(v.string()),supportedTools:v.array(v.string()),supportedJobs:v.array(v.string()),supportedChannels:v.array(v.string()),subscribedByDefault:v.array(v.string()),transports:v.array(v.enum(["stdio","http","socket"])),host:v.object({platform:v.string(),node:v.string()}),project:v.object({name:v.string(),nxVersion:v.string().optional()}),storage:X5.optional()}),Y5=v.object({id:v.string(),timestamp:v.number().int().nonnegative(),message:v.string(),fingerprint:v.string(),code:v.string().optional(),rule:v.string().optional(),severity:yl.optional(),file:v.string().optional(),line:v.number().int().nonnegative().optional(),column:v.number().int().nonnegative().optional(),project:v.string().optional()}),UA=Lt.merge(ui).extend({status:v.enum(["unknown","clean","failing"]),errorCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),ZA=Lt.merge(ui).extend({errors:v.array(Y5)}),LA=Lt.merge(ui).extend({status:v.enum(["unknown","clean","warning","failing"]),errorCount:v.number().int().nonnegative(),warningCount:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),qA=Lt.merge(ui).extend({status:v.enum(["unknown","clean","warning","failing"]),hmrUpdates:v.number().int().nonnegative(),lastRunAt:v.number().int().nonnegative().optional()}),qt=Symbol.for("@lensmcp/session/Session"),sr=Symbol.for("@lensmcp/core/EventBus"),Q5=Symbol.for("@lensmcp/core/GraphStore"),O=Symbol.for("@lensmcp/core/ResourceStore"),eD=Symbol.for("@lensmcp/storage/Storage"),tD="capture-request.json",uD="capture-runner.json",rD="capture-rules.json",El="__lensmcpTruncation",nD="__lensmcpTruncated";function ze(e,t=Number.POSITIVE_INFINITY,r=12){return mt(e,t,r,32)}s(ze,"Ne"),o(ze,"estimateJsonBytes");function bl(e,t,r=12){return mt(e,t,r,Number.POSITIVE_INFINITY)>t}s(bl,"ws"),o(bl,"exceedsJsonByteBudget");function mt(e,t,r,n){switch(typeof e){case"undefined":case"function":case"symbol":return 0;case"boolean":return 5;case"number":return Number.isFinite(e)?8:4;case"bigint":return 20;case"string":return e.length+2;default:break}if(e===null)return 4;if(r<=0)return n;if(e instanceof Date)return 26;if(Array.isArray(e)){let a=2;for(let l=0;l<e.length;l++)if(a+=mt(e[l],t-a,r-1,n)+1,a>t)return a;return a}let u=2,i=e;for(let a in i){if(!Object.prototype.hasOwnProperty.call(i,a))continue;let l=mt(i[a],t-u,r-1,n);if(l!==0&&(u+=a.length+4+l,u>t))return u}return u}s(mt,"Ir"),o(mt,"walk");function ni(e,t){e.truncatedAnything=!0,e.paths.length<20&&e.paths.push(t||"<root>")}s(ni,"Cm"),o(ni,"record");function m1(e,t,r){return ni(e,r),{[nD]:!0,originalBytes:ze(t,Number.POSITIVE_INFINITY,64)}}s(m1,"YR"),o(m1,"stub");function f1(e){if(e===null)return!0;let t=typeof e;return t==="number"||t==="boolean"||t==="string"||t==="bigint"}s(f1,"QR"),o(f1,"isScalar");function Vt(e,t,r,n){if(typeof e=="string"){let u=t.budget<=0?256:t.maxStringBytes;if(e.length+2<=u)return t.budget-=e.length+2,e;let i=Math.max(0,u-64);return ni(t,n),t.budget-=i,`${e.slice(0,i)}\u2026[lensmcp truncated: ${e.length-i} more chars]`}return e===null||typeof e!="object"?(t.budget-=mt(e,Number.POSITIVE_INFINITY,1,32),e):r<=0?m1(t,e,n):e instanceof Date?(t.budget-=26,e):Array.isArray(e)?h1(e,t,r,n):g1(e,t,r,n)}s(Vt,"Rr"),o(Vt,"clampValue");function h1(e,t,r,n){let u=[],i=Math.min(e.length,t.maxArrayItems);for(let a=0;a<i&&!(t.budget<=0);a++)u.push(Vt(e[a],t,r-1,`${n}[${a}]`));return u.length<e.length&&ni(t,`${n}[] (+${e.length-u.length} items dropped)`),u}s(h1,"e0"),o(h1,"clampArray");function g1(e,t,r,n){let u={},i,a=t.budget<=0;for(let l in e){if(!Object.prototype.hasOwnProperty.call(e,l))continue;let d=e[l],c=mt(d,512,r-1,Number.POSITIVE_INFINITY);if(c<=512&&(!a||f1(d))){u[l]=d,t.budget-=l.length+4+c;continue}(i??=[]).push({key:l,bytes:c})}if(!i)return u;i.sort((l,d)=>l.bytes===d.bytes?0:l.bytes<d.bytes?-1:1);for(let{key:l}of i){let d=n?`${n}.${l}`:l;u[l]=Vt(e[l],t,r-1,d)}return u}s(g1,"t0"),o(g1,"clampObject");function v1(e,t={}){let r=t.rawByteLimit??32768,n=t.maxDepth??12;if(r<=0)return{value:void 0,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(e==null)return{value:e,truncated:!1,originalBytes:0,keptBytes:0,paths:[]};if(!bl(e,r,n)){let d=ze(e,r,n),c={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1};return{value:Vt(e,c,n,""),truncated:!1,originalBytes:d,keptBytes:d,paths:[]}}let u=ze(e,Number.POSITIVE_INFINITY,64),i={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},a=Vt(e,i,n,""),l=ze(a,Number.POSITIVE_INFINITY,n);if(i.truncatedAnything&&a!==null&&typeof a=="object"&&!Array.isArray(a)){let d={truncated:!0,originalBytes:u,keptBytes:l,paths:i.paths};a[El]=d}return{value:a,truncated:i.truncatedAnything,originalBytes:u,keptBytes:l,paths:i.paths}}s(v1,"Um"),o(v1,"boundedClone");function ft(e,t){if(e.size<=t)return 0;let r=0,n=e.keys();for(;e.size>t;){let u=n.next();if(u.done)break;e.delete(u.value)&&(r+=1)}return r}s(ft,"Fe"),o(ft,"capMap");var ar=256,or="error-dismissed",ii="error-restored",y1="lens",iD=new Set(["dashboard","cli","agent"]);function E1(e){if(e.source!==y1||!e.raw||typeof e.raw!="object")return;let t=e.raw,r=t.groupId;if(typeof r!="string"||r.length===0||r.length>2048)return;if(t.kind===ii)return{kind:ii,groupId:r};if(t.kind!==or)return;let n=t.until;if(typeof n!="number"||!Number.isFinite(n))return;let u=Array.isArray(t.eventIds)?t.eventIds.filter(c=>typeof c=="string"&&c.length>0).slice(0,200):[],i=iD.has(t.by)?t.by:void 0,a=o((c,p)=>typeof c=="string"&&c.trim()?c.trim().slice(0,p):void 0,"text"),l=a(t.reason,500),d=a(t.title,300);return{kind:or,groupId:r,until:Math.min(n,e.timestamp),eventIds:u,...i?{by:i}:{},...l?{reason:l}:{},...d?{title:d}:{}}}s(E1,"h_"),o(E1,"readErrorDismissal");var sD=["pod-memory","pod-memory-retained","pod-memory-released","pod-memory-exited"];function Dl(e){if(!e||typeof e!="object")return;let t=e;if(sD.includes(t.kind)&&!(typeof t.project!="string"||!t.project)&&!(typeof t.pod!="number"||typeof t.pid!="number")&&!(t.kind==="pod-memory"&&(typeof t.live!="number"||!Number.isFinite(t.live)))&&!((t.kind==="pod-memory-retained"||t.kind==="pod-memory-released")&&typeof t.gen!="number"))return e}s(Dl,"$s"),o(Dl,"asPodMemoryRaw");var aD=["perf-rule-finding","perf-rule-retracted","perf-rule-scan"],wl="https://github.com/kiwiapps-ltd/lensmcp/blob/main/docs/lensmcp/concepts/memory-and-build-cost.mdx",b1={"bundle/heavy-barrel-import":`${wl}#bundleheavy-barrel-import`,"pod/heap-budget":`${wl}#podheap-budget`,"pod/retained-generation":`${wl}#podretained-generation`};function D1(e,t,r){return`perf-rule:${e}:${t}:${r}`}s(D1,"g_"),o(D1,"perfRuleFingerprint");var oD=/^[a-z][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/,lD=12,dD=4e3,We=o((e,t=dD)=>typeof e=="string"&&e.length>0&&e.length<=t,"isText");function w1(e){if(!e||typeof e!="object")return;let t=e;if(!aD.includes(t.kind)||typeof t.rule!="string"||!oD.test(t.rule)||!We(t.project,512))return;if(t.kind==="perf-rule-scan"){let n=t.open;return!Array.isArray(n)||n.length>256||!n.every(u=>We(u,512))?void 0:e}if(!We(t.subject,512))return;if(t.kind==="perf-rule-retracted")return e;if(t.severity!=="warning"&&t.severity!=="error"||!We(t.title)||!We(t.summary)||!We(t.verify)||!We(t.docs,1024))return;let r=t.fix;if(!(!Array.isArray(r)||r.length===0||r.length>lD||!r.every(n=>We(n)))&&!(!t.evidence||typeof t.evidence!="object"||Array.isArray(t.evidence))&&!(!t.cost||typeof t.cost!="object"||Array.isArray(t.cost)))return e}s(w1,"v_"),o(w1,"asPerfRuleRaw");function B1(e){let{source:t,category:r,title:n,kind:u}=e;return t==="ai"?"ai":u?.startsWith("memory")||u==="db-query"?"data":t==="gateway"||u==="gateway-request"?"gateway":u==="queue-process"||u==="queue-active"||u==="queue-completed"||u==="queue-failed"?"services":t==="db"||t==="redis"||t==="queue"||u==="redis-op"||u?.startsWith("queue-")?"data":t==="external"||u==="egress"?"network":t==="nestjs"||t==="nest"?/(?:Repository|Repo|Dao|Store)\./.test(n)?"data":"services":t==="valtio"?"state":r==="network"?"network":"browser"}s(B1,"c0"),o(B1,"areaOf");var x1=240,cD=new Set(["systemPrompt","prompt","prompts","messages","completion","completions","input","output","draft","text","content","result","arguments","params"]),pD=new Set(["tenantId","caller","userId","accountId","email","subject"]),mD=8;function $1(e){let t=si(e,0);return v1(lu({redacted:!0,...t}),{rawByteLimit:16*1024}).value}s($1,"p0"),o($1,"aiProjection");function si(e,t){if(typeof e=="string")return C1(e);if(e===null||typeof e!="object")return e;if(t>=mD)return;if(Array.isArray(e))return e.slice(0,32).map(n=>si(n,t+1));let r={};for(let[n,u]of Object.entries(e))if(!pD.has(n)){if(cD.has(n)){typeof u=="string"?r[`${n}Chars`]=u.length:Array.isArray(u)?r[`${n}Count`]=u.length:u!=null&&(r[`${n}Present`]=!0);continue}r[n]=si(u,t+1)}return r}s(si,"Zm"),o(si,"projectAi");function C1(e){return e.length<=x1?Ue(e):`${Ue(e.slice(0,x1))}\u2026`}s(C1,"m0"),o(C1,"clipText");function k1(e,t={}){let r=e.raw??{},n=r.render??{},u=r.span??{},i=r.request??{},a=o(C=>typeof C=="number"?C:void 0,"num"),l=r.loop??{},d=r.effect??{},c=a(r.durationMs)??a(u.durationMs)??a(i.durationMs)??a(l.durationMs)??a(n.actualDurationMs)??a(d.durationMs),p=typeof r.kind=="string"?r.kind:void 0,m=p==="fetch-done"||p==="fetch-error",f=a(n.commitTime),h=p==="render"&&f!==void 0&&Math.abs(f-e.timestamp)<6e4,g=m?e.timestamp:h?f:a(r.startedAt)??a(u.startTime)??a(i.startedAt)??a(l.startedAt)??(c!==void 0?e.timestamp-c:e.timestamp),E;if(typeof r.query=="string"){let C=Array.isArray(r.params)?` [${r.params.join(", ")}]`:"",j=typeof r.result=="string"?` \u2192 ${r.result}`:"";E=r.query+C+j}else if(typeof r.command=="string"){let C=typeof r.value=="string"?` \u2192 ${r.value}`:r.hit===!1?" \u2192 (miss)":"";E=r.command+C}else if(p==="state-update"){let C=r.update??{},j="";try{j=JSON.stringify(C.preview)}catch{}E=`${C.storeId??""}.${C.path??""} = ${j}`}else p==="queue-completed"&&typeof r.returned=="string"?E=`returned ${r.returned}`:p==="queue-enqueued"&&(E=`${r.job??"job"}#${r.jobId??"?"} \u2192 ${r.queue??""}${typeof r.data=="string"?" "+r.data:""}`);let B;if(p==="gateway-request")B=`${r.host??""}${String(r.url??"").split("?")[0]}`;else if(p==="fetch-start"||p==="fetch-done"||p==="fetch-error")try{let C=new URL(String(r.href??r.url??""));B=`${C.hostname}${C.pathname}`}catch{}let w;if(p==="gateway-request"&&Array.isArray(r.steps))w=r.steps.map(C=>{let j=[String(C.step)];return C.project&&j.push(String(C.project)),C.prefix&&j.push(String(C.prefix)),C.mode&&j.push(String(C.mode)+(C.ok===!1?" \u2717":C.ok===!0?" \u2713":"")),C.caller&&j.push("by "+String(C.caller)),C.pod&&j.push(String(C.pod)),typeof C.atMs=="number"&&j.push(`@${C.atMs}ms`),j.join(" ")}),E=w.map(C=>C.replace(/ @\d+ms$/,"")).join(" \u2192 ");else if(p==="egress")E=`${r.method??"GET"} ${r.host??""} \u2192 ${r.status??"?"}`;else if(e.source==="ai"){if(p==="ai-call"){let C=r.usage??{},j=C.promptTokens!==void 0||C.completionTokens!==void 0?` \xB7 ${a(C.promptTokens)??"?"}\u2192${a(C.completionTokens)??"?"} tok`:"",q=r.status!==void 0?` \xB7 ${String(r.status)}`:r.error?" \xB7 failed":"",Q=a(r.toolCallCount)?` \xB7 ${a(r.toolCallCount)} tool call${a(r.toolCallCount)===1?"":"s"}`:"",X=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.provider??""}/${r.model??"?"}${j}${q}${Q}${X}${r.stream===!0?" \xB7 stream":""}`}else if(p==="ai-round"){let C=r.model??{},j=r.usage??{},q=Array.isArray(r.toolCalls)?r.toolCalls:[],Q=`${a(j.promptTokens)??"?"}\u2192${a(j.completionTokens)??"?"} tok`,X=q.length?` \xB7 ${q.length} tool call${q.length===1?"":"s"}`:"",le=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${C.provider??""}/${C.model??""} \xB7 ${Q}${X}${le}`}else if(p==="ai-turn-start"){let C=Array.isArray(r.tools)?r.tools:[];E=`skill ${r.skill??""} \xB7 ${r.output??""}${C.length?" \xB7 tools: "+C.join(", "):""}`}else if(p==="ai-tool-call"){let C=r.call??{},j=r.result??{},q=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${C.name??"tool"} ${j.error!=null?"\u2717 "+String(j.error):"\u2713"}${q}`}else if(p==="ai-turn-end"){let C=r.usage??{},j=a(r.rounds)!==void 0?` \xB7 ${a(r.rounds)} round${a(r.rounds)===1?"":"s"}`:"",q=a(r.durationMs)!==void 0?` \xB7 ${(a(r.durationMs)/1e3).toFixed(1)}s`:"";E=`${r.ok===!1?"FAILED":"ok"} \xB7 ${a(C.promptTokens)??"?"}+${a(C.completionTokens)??"?"} tok${j}${q}`}}let b;p==="db-query"&&typeof r.query=="string"?b=r.query:p==="redis-op"?b=`${r.op??""} ${String(r.key??"").replace(/\d+/g,"#")}`:p==="egress"?b=`${r.method??"GET"} ${r.host??""}`:p==="ai-call"?b=`ai ${r.provider??""} ${r.model??""} ${r.api??""}`:p==="queue-enqueued"?b=`enqueue ${r.queue??""}`:p==="span"&&typeof u.name=="string"?b=u.name:p==="memory-mutation"&&(b=e.title);let $=e.context??{},x=n.commitId??d.commitId??r.commitId,F=Array.isArray(n.why)?n.why.map(C=>typeof C?.type=="string"?C.type:void 0).filter(C=>!!C):[];return{id:e.id,t:e.timestamp,start:g,...b?{sig:b}:{},...B?{urlKey:B}:{},...typeof r.queue=="string"?{queue:r.queue}:{},...r.jobId!=null?{jobId:String(r.jobId)}:{},source:e.source,category:e.category,severity:e.severity,title:e.title,kind:p,area:B1({source:e.source,category:e.category,title:e.title,kind:p}),...typeof u.role=="string"?{role:u.role}:{},...typeof $.requestId=="string"?{requestId:$.requestId}:{},...typeof $.parentRequestId=="string"?{parentRequestId:$.parentRequestId}:{},...typeof x=="string"?{commitId:x}:{},...typeof n.componentName=="string"?{component:n.componentName}:{},...typeof n.phase=="string"?{phase:n.phase}:{},...F.length?{why:F}:{},...p==="effect-run"&&typeof d.hookLogicalId=="string"?{hook:d.hookLogicalId}:{},...p==="effect-run"&&d.cleanupRan===!0?{cleanup:!0}:{},...p==="render-commit-truncated"?{renderTotal:a(r.total),renderPublished:a(r.published)}:{},...typeof $.projectName=="string"?{project:$.projectName}:typeof r.project=="string"?{project:r.project}:{},...c!==void 0?{durationMs:c}:{},...m&&a(r.startedAt)!==void 0?{fetchStartedAt:a(r.startedAt)}:{},...e.source==="ai"?{ai:t.includeRaw?r:$1(r)}:{},...E?{detail:E}:{},...w?{steps:w}:{}}}s(k1,"f0"),o(k1,"trimFlowEvent");var A1=1;function _1(e){return e==="flow-origin"?0:e?.endsWith("-start")?1:e==="gateway-request"?2:e==="server-request"?3:e==="span"?4:e==="render"||e==="render-commit-truncated"?6:e==="effect-run"?7:5}s(_1,"h0"),o(_1,"kindRank");function Jt(e){return e.kind==="span"&&e.role==="controller"?3.5:e.kind==="queue-process"?3:_1(e.kind)}s(Jt,"Rn"),o(Jt,"causalRank");function Bl(e,t={}){let r=Tr(e),n=e.slice().filter(y=>{let A=y.raw??{},k=typeof A.kind=="string"?A.kind:"";if(k==="subscription-added"||k==="subscription-removed"||k==="hook-run"||k==="store-created"||k==="singleton-instance"||k===ms)return!1;let I=A.span;return!(typeof I?.name=="string"&&I.name.startsWith("nest.request "))}).map(y=>k1(y,t)),u=new Set;for(let y=n.length-1;y>=0;y--)u.has(n[y].id)?n.splice(y,1):u.add(n[y].id);let i=new Map;for(let y of n)(y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&!i.has(y.requestId)&&i.set(y.requestId,y.start);let a=o(y=>y.source!=="react"&&y.source!=="valtio"&&y.requestId&&i.has(y.requestId)?i.get(y.requestId):y.start,"anchorOf");n.sort((y,A)=>a(y)-a(A)||y.start-A.start||Jt(y)-Jt(A)||(A.durationMs??0)-(y.durationMs??0)||y.t-A.t);let l=o(y=>(y.kind==="span"||y.kind==="server-request"||y.kind==="gateway-request"||y.kind==="queue-process")&&(y.durationMs??0)>0,"spanLike"),d=n;for(let y of d)y.group=y.source==="react"||y.source==="valtio"||y.source==="client-runtime"||y.source==="visual"?"browser":"server";let c=new Map;for(let y of d)if((y.kind==="gateway-request"||y.kind==="queue-process")&&y.requestId&&y.project){let A=c.get(y.requestId)??[];A.push({project:y.project,start:y.start,end:y.start+(y.durationMs??0)}),c.set(y.requestId,A)}let p=o((y,A)=>{let k=c.get(y);if(k?.length)return k.every(I=>I.project===k[0].project)?k[0].project:k.filter(I=>I.start<=A+1&&I.end>=A-1).sort((I,R)=>R.start-I.start)[0]?.project},"projectOf");for(let y of d)if(!y.project&&y.source==="nestjs"&&y.requestId){let A=p(y.requestId,y.start);A&&(y.project=A)}for(let y of d){let A,k=y.requestId;for(let I of d){if(I===y||!l(I)||I.group!==y.group||I.requestId!==k)continue;let R=I.project,U=y.project;if(I.kind!=="gateway-request"&&y.kind!=="gateway-request"&&R!==void 0&&U!==void 0&&R!==U)continue;let K=I.durationMs??0,H=y.durationMs??0,N=Math.abs(I.start-y.start)<=A1,M=Jt(I),V=Jt(y),ee=I.start<=y.start;if(!(I.start+K>y.start&&(ee||N&&M<V)&&(!N||(M!==V?M<V:ee&&K>H))))continue;let de=A?Jt(A):-1,se=A?Math.abs(I.start-A.start)<=A1:!1;(!A||!se&&I.start>A.start||se&&M>de||se&&M===de&&(I.durationMs??0)<(A.durationMs??0))&&(A=I)}A&&(y.parent=A.id)}let m=new Map;for(let y of d){if(!y.requestId)continue;let A=m.get(y.requestId);A?A.push(y):m.set(y.requestId,[y])}let f=new Map(d.map(y=>[y.id,y])),h=o((y,A)=>{let k=(m.get(y)??[]).filter(I=>l(I)&&I.start<=A&&I.start+(I.durationMs??0)>=A);if(k.length!==0)return k.sort((I,R)=>R.start-I.start||(I.durationMs??0)-(R.durationMs??0)),k[0]},"callerNodeFor");for(let y of d){if(!y.parentRequestId||y.kind!=="server-request"&&y.kind!=="gateway-request")continue;let A=y.parent?f.get(y.parent):void 0;if(A&&A.requestId===y.requestId)continue;let k=h(y.parentRequestId,y.start);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}let g=d,E=new Map;for(let y of g)y.kind==="gateway-request"&&y.requestId&&!E.has(y.requestId)&&E.set(y.requestId,y);for(let y of g)if(y.group==="server"&&!y.parent&&y.requestId&&y.kind!=="gateway-request"){let A=E.get(y.requestId);A&&A!==y&&A.start<=y.start&&(y.parent=A.id)}let B=new Set,w=new Set,b=[];for(let y of g){if(y.kind!=="gateway-request")continue;if(!y.requestId){b.push(y);continue}let A=m.get(y.requestId)??[];if(A.filter(R=>R.kind==="gateway-request").sort((R,U)=>R.start-U.start)[0]!==y)continue;let k=A.find(R=>R.kind==="fetch-start"),I=A.find(R=>R.kind==="fetch-done"||R.kind==="fetch-error");if(!k&&!I){b.push(y);continue}k&&(y.fetchStartId=k.id,B.add(k.id)),I&&(y.fetchDoneId=I.id,w.add(I.id))}let $=new Map;for(let y of g){if(!y.urlKey)continue;let A=$.get(y.urlKey)??{gws:[],starts:[],dones:[]};y.kind==="gateway-request"?b.includes(y)&&A.gws.push(y):y.kind==="fetch-start"?B.has(y.id)||A.starts.push(y):(y.kind==="fetch-done"||y.kind==="fetch-error")&&(w.has(y.id)||A.dones.push(y)),$.set(y.urlKey,A)}for(let{gws:y,starts:A,dones:k}of $.values()){y.sort((R,U)=>R.start-U.start),A.sort((R,U)=>R.start-U.start);let I=new Set;y.forEach((R,U)=>{let K=A[U];K&&(R.fetchStartId=K.id);let H=K?K.t:R.start,N,M=1/0;for(let V of k){if(I.has(V.id))continue;let ee=V.fetchStartedAt??V.start-(V.durationMs??0),de=Math.abs(ee-H);de<M&&(M=de,N=V)}N&&(R.fetchDoneId=N.id,I.add(N.id))})}let x=new Map,F=new Map;for(let y of g)!y.queue||!y.jobId||(y.kind==="queue-enqueued"&&x.set(`${y.queue}#${y.jobId}`,y),y.kind==="queue-process"&&F.set(`${y.queue}#${y.jobId}`,y));for(let y of g){if(!y.queue||!y.jobId)continue;let A=`${y.queue}#${y.jobId}`;if(y.kind==="queue-process"&&!y.parent){let k=x.get(A);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}else if(y.kind==="queue-active"||y.kind==="queue-completed"||y.kind==="queue-failed"){let k=F.get(A);k&&k!==y&&k.start<=y.start&&(y.parent=k.id)}}let C=d;{let y=new Map;for(let k of C)k.kind==="fetch-start"&&y.set(k.id,k);let A=new Map;for(let k of C){if(k.kind!=="fetch-done"&&k.kind!=="fetch-error")continue;let I=[...y.values()].find(K=>K.requestId&&K.requestId===k.requestId)?.id,R=I?y.get(I):void 0;if(!R)continue;let U=k.fetchStartedAt??R.start;R.title=k.title,R.severity=k.severity,R.durationMs=k.durationMs??Math.max(0,k.t-U),R.kind="fetch",k.detail&&!R.detail&&(R.detail=k.detail),A.set(k.id,R.id)}if(A.size>0){C=C.filter(k=>!A.has(k.id));for(let k of C)for(k.fetchDoneId&&A.has(k.fetchDoneId)&&(k.fetchDoneId=A.get(k.fetchDoneId));k.parent&&A.has(k.parent);)k.parent=A.get(k.parent)}}let j=o(y=>!!y.commitId&&(y.kind==="render"||y.kind==="effect-run"||y.kind==="render-commit-truncated"),"commitMember"),q=o(y=>[...new Set(y)],"uniq"),Q=o(y=>q(y.map(A=>A.component).filter(A=>!!A)),"named"),X=o(y=>y.length<=2?y.join(" + "):`${y[0]} + ${y.length-1} more`,"nameList"),le=o(y=>{let A=new Map;for(let k of y)k.component&&A.set(k.component,(A.get(k.component)??0)+1);return[...A].map(([k,I])=>I>1?`${k} \xD7${I}`:k).join(", ")},"tally"),DE=o(y=>{if(!y)return"effect";let A=/([^/\\]+?):(\d+)(?::\d+)?$/.exec(y);return A?`${A[1]}:${A[2]}`:y},"shortHook"),os=o(y=>`${DE(y.hook)}${y.cleanup?" (cleanup)":""}`,"hookLabel"),Qp=o(y=>{let A=Math.min(...y.map(I=>I.start)),k=Math.max(...y.map(I=>I.start+(I.durationMs??0)));return{start:A,durationMs:k-A}},"extent"),em=o(y=>(delete y.component,delete y.why,delete y.phase,delete y.hook,delete y.cleanup,delete y.renderTotal,delete y.renderPublished,y),"asGroup");function tm(y){let A=y[0],k=y.filter(oe=>oe.kind==="render"),I=y.filter(oe=>oe.kind==="effect-run"),R=y.find(oe=>oe.kind==="render-commit-truncated"),U=[...k].sort((oe,ou)=>(ou.durationMs??0)-(oe.durationMs??0)),K=U.filter(oe=>(oe.why??[]).some(ou=>ou!=="parent-render")),H=q(K.flatMap(oe=>(oe.why??[]).filter(ou=>ou!=="parent-render"))),N=Q(K),M=k.filter(oe=>oe.phase==="mount"),V=k.filter(oe=>oe.phase!=="mount"&&!K.includes(oe)),ee=U[0]?.component??"view",de=k.length>0&&M.length===k.length,se=H.length?H.join(" + "):void 0,ut=de?"mount":"update",rt=N.length?`view update \xB7 ${X(N)} \u2190 ${se}`:de?`view mount \xB7 ${ee}`:`view update \xB7 ${ee}`,sm=R?.renderTotal??k.length,BE=[M.length?`mounted ${le(M)}`:"",V.length?`re-rendered ${le(V)}`:"",!N.length&&!de&&k.length?"trigger not recorded \u2014 every captured render came from its parent":"",R?`${sm} renders, ${R.renderPublished??k.length} recorded (per-commit cap)`:`${k.length} render${k.length===1?"":"s"}`,I.length?`${I.length} effect${I.length===1?"":"s"}: ${I.map(os).join(", ")}`:""].filter(Boolean).join(" \xB7 "),am=Q(k);return em({...A,...Qp(y),kind:"view-update",title:rt,detail:BE,commitId:A.commitId,viewPhase:ut,...se?{cause:se}:{},causeComponents:N,components:am,mounted:Q(M),renderCount:sm,recordedRenders:k.length,effects:I.length,effectHooks:I.map(os),memberIds:y.map(oe=>oe.id),sig:`commit:${ut}:${se??"-"}:${N.join(",")}:${am.slice().sort().join(",")}`,severity:y.some(oe=>oe.severity==="error")?"error":A.severity})}s(tm,"rk"),o(tm,"viewUpdateNode");function um(y){let A=y[0],k=y.map(os);return em({...A,...Qp(y),kind:"commit-effects",title:y.length===1?`effect \xB7 ${k[0]}`:`effects \xB7 ${k[0]} + ${y.length-1} more`,detail:k.join(", "),commitId:A.commitId,effects:y.length,effectHooks:k,memberIds:y.map(I=>I.id),sig:`effects:${k.slice().sort().join(",")}`})}s(um,"nk"),o(um,"effectsNode");let wE=o(y=>q(y.map(A=>A==="state-update"?"state update":A==="fetch-start"?"request":A==="flow-origin"?"interaction":"response")).join(" + "),"describeInputs");function rm(y,A){let k=y[0],I=y[y.length-1],R=y.length,U=k.detail,K=Math.min(...y.map(V=>V.start)),H=Math.max(...y.map(V=>V.start+(V.durationMs??0))),N=Math.round(y.reduce((V,ee)=>V+(ee.durationMs??0),0)/R*10)/10,M=Math.round((H-K)*10)/10;k.count=R,k.avgMs=N,k.wallMs=M,k.durationMs=H-K,k.items=y.slice(0,12).map(V=>({start:V.start-K,...V.durationMs!=null?{durationMs:V.durationMs}:{}})),k.memberIds=y.flatMap(V=>V.memberIds??[V.id]),k.title=`\xD7${R} ${k.title}`,y.some(V=>V.severity==="error")&&(k.severity="error"),k.kind==="view-update"?k.detail=[`${R} commits, ${A.length?`one per ${wE(A)}`:"back to back"}`,`avg ${N}ms \xB7 wall ${M}ms`,U??""].filter(Boolean).join(" \xB7 "):k.kind==="state-update"&&U&&I.detail?k.detail=`${R} updates in a row \xB7 wall ${M}ms \xB7 first ${U} \xB7 last ${I.detail}`:k.detail=[`${R} in a row \xB7 wall ${M}ms`,U??""].filter(Boolean).join(" \xB7 ")}s(rm,"ik"),o(rm,"collapseRepeat");let jr=[],Or=new Map,nm=new Set;for(let y=0;y<C.length;y++){if(nm.has(y))continue;let A=C[y];if(!j(A)){jr.push(A);continue}let k=[y];for(let U=y+1;U<C.length;U++){let K=C[U];if(K.group==="browser"){if(!j(K)||K.commitId!==A.commitId)break;k.push(U)}}for(let U of k)nm.add(U);let I=k.map(U=>C[U]),R=I.some(U=>U.kind!=="effect-run")?tm(I):um(I);for(let U of I)U.id!==R.id&&Or.set(U.id,R.id);jr.push(R)}if(Or.size>0||jr.some(y=>y.kind==="view-update"||y.kind==="commit-effects")){C=jr;for(let y of C)for(;y.parent&&Or.has(y.parent);)y.parent=Or.get(y.parent)}{let y=new Map;for(let A of C)A.kind==="view-update"&&A.commitId&&!y.has(A.commitId)&&y.set(A.commitId,A);for(let A of C){if(A.kind!=="commit-effects"||A.parent||!A.commitId)continue;let k=y.get(A.commitId);k&&k.start<=A.start&&(A.parent=k.id)}}{let y=new Set(["state-update","fetch","fetch-start","fetch-done","fetch-error","flow-origin"]),A=C.map((N,M)=>N.group==="browser"?M:-1).filter(N=>N>=0),k=o(N=>`${N.kind}|${N.sig??N.title}`,"keyOf"),I=A.map(N=>k(C[N])),R=o((N,M,V)=>{for(let ee=0;ee<V;ee++)if(I[N+ee]!==I[M+ee])return!1;return!0},"sameBlock"),U=o(N=>I[N].split("|")[0],"kindAt"),K=o(N=>{let M=0,V=1;for(let ee=1;ee<=4&&N+ee<=I.length;ee++){let de=1;for(;N+(de+1)*ee<=I.length&&R(N,N+de*ee,ee);)de+=1;de>=3&&ee*de>M*V&&(M=ee,V=de)}return{k:M,r:V}},"bestBlockAt"),H=new Map;for(let N=0;N<I.length;){let{k:M,r:V}=K(N);if(M===0){N+=1;continue}let ee=[...Array(M).keys()].find(se=>y.has(U(N+se)));if(ee!==void 0&&ee>0){let se=K(N+ee);if(se.k===M&&se.r>=3&&se.r>=V-1){N+=ee;continue}}let de=I.slice(N,N+M).map(se=>se.split("|")[0]).filter(se=>y.has(se));for(let se=0;se<M;se++){let ut=[];for(let rt=0;rt<V;rt++)ut.push(C[A[N+se+rt*M]]);rm(ut,de);for(let rt of ut.slice(1))H.set(rt.id,ut[0].id)}N+=M*V}if(H.size>0){C=C.filter(N=>!H.has(N.id));for(let N of C)for(;N.parent&&H.has(N.parent);)N.parent=H.get(N.parent)}}{let y=new Map(C.map(A=>[A.id,A]));for(let A of C){let k=new Set([A.id]),I=A;for(;I?.parent;){if(k.has(I.parent)){I.parent=void 0;break}k.add(I.parent),I=y.get(I.parent)}}}let im=o(y=>{let A=new Map;for(let I of C){if(!I.sig||l(I)!==y||I.kind==="server-request"||I.kind==="gateway-request"||I.group==="browser")continue;let R=`${I.parent??"root"}|${I.kind}|${I.sig}`,U=A.get(R);U?U.push(I):A.set(R,[I])}let k=new Map;for(let I of A.values()){if(I.length<3)continue;I.sort((M,V)=>M.start-V.start);let R=I[0],U=!1;for(let M=0;M+1<I.length;M++)if(I[M+1].start<I[M].start+(I[M].durationMs??0)){U=!0;break}let K=R.start,H=Math.max(...I.map(M=>M.start+(M.durationMs??0))),N=I.reduce((M,V)=>M+(V.durationMs??0),0);R.count=I.length,R.parallel=U,R.avgMs=Math.round(N/I.length*10)/10,R.wallMs=H-K,R.durationMs=H-K,R.title=`\xD7${I.length} ${R.title.replace(/\s*\((?:\d+ rows?, )?\d+ms\)$/,"")}`,R.detail=`${R.sig} \xD7${I.length} ${U?"\u2016 parallel":"\u21BB sequential loop"} \xB7 avg ${R.avgMs}ms \xB7 wall ${R.wallMs}ms`,R.items=I.slice(0,12).map(M=>({start:M.start-K,...M.durationMs!=null?{durationMs:M.durationMs}:{}})),R.memberIds=I.flatMap(M=>M.memberIds??[M.id]),I.some(M=>M.severity==="error")&&(R.severity="error");for(let M of I.slice(1))k.set(M.id,R.id)}if(k.size!==0){C=C.filter(I=>!k.has(I.id));for(let I of C)for(;I.parent&&k.has(I.parent);)I.parent=k.get(I.parent)}},"aggregatePass");im(!0),im(!1);for(let y of C){if(!l(y))continue;let A=y.durationMs??0;if(A<40)continue;let k=C.filter(H=>H.parent===y.id&&(H.durationMs??0)>0).map(H=>[H.start,H.start+(H.durationMs??0)]).sort((H,N)=>H[0]-N[0]),I=0,R=-1,U=-1;for(let[H,N]of k)H>U?(U>R&&(I+=U-R),R=H,U=N):N>U&&(U=N);U>R&&(I+=U-R);let K=Math.max(0,A-I);(K>=50||K/A>=.7&&A>=40)&&(y.selfMs=K,y.detail=`\u26A0 cpu-heavy: ${K}ms self-time of ${A}ms${y.detail?" \xB7 "+y.detail:""}`)}return{events:C,...r?{sql:r}:{}}}s(Bl,"Vm"),o(Bl,"buildFlowDetail");var I1=["user-action","page-load","navigation","api","ai","background","test","system","other"],ai=new Map;function Gt(e,t){let r=ai.get(e);return r||(r=new RegExp(`^${e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".")}$`),ai.size>500&&ai.clear(),ai.set(e,r)),r.test(t)}s(Gt,"En"),o(Gt,"globMatch");var fD=o(e=>/^[A-Z]+ /.test(e),"hasMethod");function S1(e,t){return t.some(r=>r.route?fD(e)?Gt(e,`${r.method??"GET"} ${r.route}`):Gt(e,r.route):!1)}s(S1,"v0"),o(S1,"routeMatches");function xl(e,t){return!([e.flowId,e.originType,e.origin,e.route,e.project].filter(r=>r!==void 0).length===0||e.flowId!==void 0&&!Gt(e.flowId,t.flowId)||e.originType!==void 0&&e.originType!==t.origin.type||e.origin!==void 0&&!(t.origin.nodeId!==void 0&&Gt(e.origin,t.origin.nodeId))||e.route!==void 0&&!S1(e.route,t.segments)||e.project!==void 0&&!t.segments.some(r=>r.projects.some(n=>Gt(e.project,n))))}s(xl,"__"),o(xl,"ruleMatches");var $l=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj"),Ke=o(e=>typeof e=="string"&&e!==""?e:void 0,"str"),oi=o(e=>$l(e.raw)?Ke(e.raw.kind)??"":"","kindOf");function F1(e){let t=[...e].sort((l,d)=>(Number(l.timestamp)||0)-(Number(d.timestamp)||0)||(l.id<d.id?-1:1)),r=t.find(l=>oi(l)==="flow-origin"),n=r??t.find(l=>Ke(l.context?.originType));if(!n)return{};let u=$l(n.raw)?n.raw:{},i=Ke(n.context?.originType)??(r?Ke(n.title):void 0),a=Ke(u.originNodeId)??Ke(n.context?.originNodeId);return{...i?{type:i}:{},...a?{nodeId:a}:{}}}s(F1,"y0"),o(F1,"originOf");var hD=/^(verify|e2e|test|smoke|load)[-_:]/i,gD=o((e,t)=>hD.test(e)||t!==void 0&&/^(ui:)?(tools|scripts?|e2e)\//.test(t),"isTestFlow"),z1={"page-load":"page-load","user-click":"user-action","form-submit":"user-action","input-change":"user-action","double-click":"user-action","context-menu":"user-action","key-press":"user-action","route-load":"navigation","route-change":"navigation",navigation:"navigation","ai-turn":"ai",timer:"background",cron:"background",interval:"background",queue:"background",job:"background","websocket-message":"background","hmr-update":"system"},vD=new Set(["page-load","user-action","navigation"]),yD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function li(e){return e.replace(/[?#].*$/,"").split("/").map(t=>yD.test(t)||/^[0-9a-f]{16,}$/i.test(t)||/^\d{2,}$/.test(t)?":id":t).join("/")}s(li,"qm"),o(li,"templatePath");function j1(e){let t=/^ui:(?:.*\/)?([^/:]+?)(?:\.[a-z]+)?:\d+:([A-Za-z]+)$/.exec(e);return t?`${t[1]} \xB7 ${t[2]}`:e}s(j1,"$0"),o(j1,"componentOf");function O1(e){let t=e.replace(/[-_:][0-9a-f]{6,}(?:-[0-9a-f]+)*$/i,"");return t=t.replace(/[-_:](?=[a-z0-9]*\d)[a-z0-9]{6,}$/i,""),t=t.replace(/[-_:]\d+$/,""),t||e}s(O1,"k0"),o(O1,"scriptFamily");function R1(e,t,r,n){let u=t.nodeId,i=u?/^(page|route|ambient):(.*)$/.exec(u):null;if(i)return`${i[1]}:${li(i[2])}`;if(t.type&&z1[t.type]==="user-action"&&u)return j1(u);if(e==="test")return O1(r.flowId);let a=r.segments.find(d=>d.kind==="request"&&d.route);if(a?.route)return`${a.method??"GET"} ${li(a.route)}`;let l=n.find(d=>oi(d)==="ai-call");return l&&$l(l.raw)?`ai \xB7 ${Ke(l.raw.model)??Ke(l.raw.provider)??"call"}`:u?li(u):void 0}s(R1,"S0"),o(R1,"subjectOf");var ED=10,bD=1e3,DD=3,wD=500,BD=1e3;function T1(e,t){let r=new Set,n=t.segments.filter(i=>i.kind==="request");t.segments.some(i=>i.counts.errors>0)&&r.add("has-error"),n.some(i=>i.durationMs>=bD)&&r.add("slow"),n.length>=ED&&r.add("fan-out"),new Set(t.segments.flatMap(i=>i.projects)).size>=3&&r.add("multi-service"),e.some(i=>oi(i)==="queue-enqueued")&&r.add("queue"),e.some(i=>oi(i)==="ai-call"||i.source==="ai")&&r.add("ai"),t.stats.bookkeeping>=wD&&t.stats.bookkeeping*2>=t.stats.events&&r.add("storm"),t.stats.events>=BD&&r.add("large");let u=new Map;for(let i of n)(!i.part||i.part.index===1)&&u.set(i.label,(u.get(i.label)??0)+1);return[...u.values()].some(i=>i>=DD)&&r.add("repeated-requests"),[...r].sort()}s(T1,"z0"),o(T1,"tagsOf");function N1(e,t,r=[]){let n=F1(e),u={flowId:t.flowId,origin:n,segments:t.segments},i=T1(e,t),a=o((p,m,f)=>{let h=R1(p,n,t,e);return{category:p,decidedBy:m,...f!==void 0?{ruleIndex:f}:{},tags:i,origin:n,...h?{subject:h}:{}}},"done"),l=r.findIndex(p=>p.category&&xl(p,u));if(l!==-1)return a(r[l].category,"rule",l);if(gD(t.flowId,n.nodeId))return a("test","test");let d=n.type?z1[n.type]:void 0;if(d)return a(d,"origin");if(i.includes("ai"))return a("ai","shape");let c=t.segments.filter(p=>p.kind==="request");return c.length>0?a(c.every(p=>p.requestId?.startsWith("job:"))?"background":"api","shape"):t.segments.length>0&&t.segments.every(p=>p.kind==="ambient")?a("system","shape"):a("other","shape")}s(N1,"$_"),o(N1,"classifyFlow");function M1(e,t,r=[]){let n=r.find(u=>u.category&&(u.route!==void 0||u.project!==void 0)&&u.flowId===void 0&&u.origin===void 0&&u.originType===void 0&&xl(u,{flowId:e.flowId,origin:t.origin,segments:[e]}));return n?n.category:e.kind==="request"?e.requestId?.startsWith("job:")?"background":"api":e.kind==="ambient"?"system":e.kind==="origin"&&vD.has(t.category)?t.category:"ui"}s(M1,"k_"),o(M1,"categoryOfSegment");function P1(e){return U1(e).map(t=>{let r=new Map;for(let u of t.items){let i=r.get(u.subject);i?i.push(u):r.set(u.subject,[u])}let n=[...r.entries()].sort((u,i)=>(u[0]===void 0?1:0)-(i[0]===void 0?1:0)||i[1].length-u[1].length||String(u[0]).localeCompare(String(i[0]))).map(([u,i])=>({subject:u,count:i.length,items:i}));return{...t,subjects:n}})}s(P1,"S_"),o(P1,"groupFlows");function U1(e){let t=new Map;for(let n of e){let u=t.get(n.category);u?u.push(n):t.set(n.category,[n])}let r=o(n=>{let u=I1.indexOf(n);return u===-1?I1.length:u},"rank");return[...t.entries()].sort((n,u)=>r(n[0])-r(u[0])||(n[0]<u[0]?-1:n[0]>u[0]?1:0)).map(([n,u])=>({category:n,count:u.length,items:u}))}s(U1,"O0"),o(U1,"groupByCategory");var Wt={categories:[],segments:{},problems:[]},Cl=200,Z1=200,L1=64,xD=/^[A-Za-z0-9][A-Za-z0-9 ._:/-]*$/,$D=["category","flowId","originType","origin","route","project"],CD={phaseGapMs:[50,6e5],burstGapMs:[10,6e4],attachWindowMs:[0,6e4],maxSegmentEvents:[20,1e4],occurrenceSlackMs:[0,1e3]},kl=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isObj");function q1(e,t){if(!kl(e))return{problems:[`${t}: not an object`]};let r=[];for(let l of Object.keys(e))$D.includes(l)||r.push(`${t}: unknown field "${l}" ignored`);let n=e.category;if(typeof n!="string"||n.trim()==="")return{problems:[...r,`${t}: "category" must be a non-empty string \u2014 rule dropped`]};let u=n.trim();if(u.length>L1||!xD.test(u))return{problems:[...r,`${t}: category "${u.slice(0,40)}" is not a usable name (letters, digits, space . _ : / -; up to ${L1}) \u2014 rule dropped`]};let i={category:u},a=0;for(let l of["flowId","originType","origin","route","project"]){let d=e[l];if(d!==void 0){if(typeof d!="string"||d===""||d.length>Z1)return{problems:[...r,`${t}: "${l}" must be a non-empty string of up to ${Z1} characters \u2014 rule dropped`]};i[l]=d,a+=1}}return a===0?{problems:[...r,`${t}: "${u}" has no match field (flowId, originType, origin, route or project) \u2014 rule dropped`]}:{rule:i,problems:r}}s(q1,"N0"),o(q1,"parseRule");function V1(e){if(e==null)return Wt;if(!kl(e))return{...Wt,problems:["lensmcp.flows must be an object \u2014 ignored"]};let t=[],r=[],n=e.categories;n!==void 0&&(Array.isArray(n)?(n.length>Cl&&t.push(`flows.categories has ${n.length} rules; only the first ${Cl} are used`),n.slice(0,Cl).forEach((a,l)=>{let d=q1(a,`flows.categories[${l}]`);t.push(...d.problems),d.rule&&r.push(d.rule)})):t.push("flows.categories must be an array \u2014 ignored"));let u={},i=e.segments;if(i!==void 0)if(!kl(i))t.push("flows.segments must be an object \u2014 ignored");else for(let[a,l]of Object.entries(i)){let d=CD[a];if(!d){t.push(`flows.segments.${a}: unknown option ignored`);continue}if(typeof l!="number"||!Number.isFinite(l)||l<d[0]||l>d[1]){t.push(`flows.segments.${a}: ${JSON.stringify(l)} is outside ${d[0]}\u2013${d[1]}; using the default (${Bm[a]})`);continue}u[a]=l}return{categories:r,segments:u,problems:t}}s(V1,"E_"),o(V1,"parseFlowsConfig");function J1(e,t=Wt){let r=Im(e,t.segments),n=N1(e,r,t.categories),u={};for(let i of r.segments)u[i.id]=M1(i,n,t.categories);return{segmentation:r,classification:n,segmentCategories:u}}s(J1,"T_"),o(J1,"analyzeFlow");function Al(e,t={}){let r=t.threshold??5,n=[];for(let u of e){let i=u.raw??null;if(i?.kind!=="loop"||!i.loop)continue;let a=i.loop.dbCallsInsideLoop??0;a>r&&n.push({kind:"db-in-loop",severity:"warning",title:`${a} DB calls inside a loop (${i.loop.iterations??"?"} iterations)`,evidence:[u.id],details:{dbCallsInsideLoop:a,iterations:i.loop.iterations,durationMs:i.loop.durationMs,threshold:r},detectedAt:u.timestamp})}return n}s(Al,"Is"),o(Al,"detectDbInLoop");function G1(e,t={}){let r=t.threshold??3,n=new Map;for(let i of e){let a=i.raw??null;if(a?.kind!=="db-query"||!a.query?.signature)continue;let l=a.query.signature,d=n.get(l);d||(d=[],n.set(l,d)),d.push(i)}let u=[];for(let[i,a]of n)a.length>=r&&u.push({kind:"n+1-query",severity:"warning",title:`Query repeated ${a.length}\xD7 \u2014 likely N+1`,evidence:a.map(l=>l.id),details:{signature:i,count:a.length,threshold:r},detectedAt:a[a.length-1].timestamp});return u}s(G1,"A_"),o(G1,"detectNPlusOne");function W1(e,t={}){let r=t.threshold??5,n=t.windowMs??250,u=new Map;for(let a of e){if(a.source!=="react")continue;let l=a.raw??null;if(l?.kind!=="render"||!l.render?.componentInstanceId)continue;let d=l.render.componentInstanceId,c=u.get(d);c||(c=[],u.set(d,c)),c.push(a)}let i=[];for(let[a,l]of u){l.sort((c,p)=>c.timestamp-p.timestamp);let d=0;for(let c=0;c<l.length;c++){for(;l[c].timestamp-l[d].timestamp>n;)d++;let p=c-d+1;if(p>r){let m=l.slice(d,c+1),f=m[0].raw.render?.componentName??a;i.push({kind:"render-storm",severity:"warning",title:`${f} rendered ${p}\xD7 in ${n}ms`,evidence:m.map(h=>h.id),details:{componentInstanceId:a,count:p,windowMs:n,threshold:r},detectedAt:m[m.length-1].timestamp});break}}}return i}s(W1,"z_"),o(W1,"detectRenderStorm");function K1(e,t,r){let n=new Map,u=new Set;function i(l){let d=n.get(l);if(d)return d;if(u.has(l))return{path:[l],totalDurationMs:r(l)};u.add(l);let c=r(l),p=t.get(l)??[],m;for(let h of p){let g=i(h);(!m||g.totalDurationMs>m.totalDurationMs)&&(m=g)}u.delete(l);let f=m?{path:[l,...m.path],totalDurationMs:c+m.totalDurationMs}:{path:[l],totalDurationMs:c};return n.set(l,f),f}s(i,"i"),o(i,"best");let a={path:[],totalDurationMs:0};for(let l of e){let d=i(l);d.totalDurationMs>a.totalDurationMs&&(a=d)}return a}s(K1,"O_"),o(K1,"findSlowPath");var H1={dbInLoop:5,nPlusOne:3,renderStorm:5,slowRouteMs:500,slowRenderMs:16,slowQueryMs:100,duplicateRequestPeak:3,slowEgressMs:1e3};function je(e){let t={...H1};if(e)for(let r of Object.keys(H1)){let n=e[r];typeof n=="number"&&Number.isFinite(n)&&n>=0&&(t[r]=n)}return t}s(je,"ge"),o(je,"resolveThresholds");function X1(e){let t=e.raw??null,r=t?.kind,n=e.context,u={id:e.id,parentTraceNodeId:n.causedByNodeId??n.originNodeId,lifecycle:"completed",context:n,startTime:e.timestamp,attributes:{...t??{}}};if(e.source==="react"&&r==="render"){let i=t;return{parentAxis:"render",node:{...u,type:"render",logicalId:i.render?.componentLogicalId,instanceId:i.render?.componentInstanceId,name:`render ${i.render?.componentName??"?"}`,durationMs:i.render?.actualDurationMs}}}if(e.source==="valtio"&&r==="state-update"){let i=t;return{parentAxis:"state",node:{...u,type:"state-update",logicalId:i.update?.storeId,name:`${i.update?.storeId??"?"}.${i.update?.path??"?"}`}}}if(e.source==="nestjs"&&r==="server-request"){let i=t;return{parentAxis:"backend",node:{...u,type:"server-request",name:`${i.request?.method??"?"} ${i.request?.route??"?"}`,durationMs:i.request?.durationMs}}}if(r==="db-query"){let i=t,a=[i.op,i.table].filter(Boolean).join(" ")||(i.name??"query");return{parentAxis:"backend",node:{...u,type:"db-query",logicalId:i.table?`db:${i.op??"query"}:${i.table}`:void 0,name:i.error?`${a} (failed)`:a,durationMs:i.durationMs}}}if(r==="loop")return{parentAxis:"performance",node:{...u,type:"loop",name:"loop",durationMs:t.loop?.durationMs}};if(e.source==="client-runtime"&&r==="user-action"){let i=t;return{parentAxis:"caused",node:{...u,type:"ui-event",logicalId:i.origin?.nodeId,name:i.origin?.label??e.title}}}}s(X1,"D0"),o(X1,"eventToNode");function Y1(e,t){let r=[...t].sort((l,d)=>l.timestamp-d.timestamp),n=[];for(let l of r){let d=X1(l);d&&(e.addNode(d.node),n.push(d))}let u=0,i=o((l,d,c,p)=>{let m={id:`${c}:${l}->${d}`,from:l,to:d,axis:c,type:p,timestamp:e.getNode(d)?.startTime??0};e.addEdge(m),u++},"addEdge");for(let l of n){let d=l.node.context.causedByNodeId;d&&e.getNode(d)&&i(d,l.node.id,l.parentAxis??"caused","caused-by")}let a=new Map;for(let l of n){let d=l.node.context.flowId;if(!d)continue;let c=a.get(d);c||(c=[],a.set(d,c)),c.push(l)}for(let l of a.values())for(let d=1;d<l.length;d++){let c=l[d-1].node,p=l[d].node;p.context.causedByNodeId!==c.id&&i(c.id,p.id,"caused","flow-sequence")}return{nodeCount:n.length,edgeCount:u}}s(Y1,"P_"),o(Y1,"buildGraphFromEvents");var Q1=new WeakMap;function di(e){let t=Q1.get(e);if(t!==void 0)return t;let r=ze(e);return Q1.set(e,r),r}s(di,"Tr"),o(di,"estimateEventBytes");function e3(e,t={}){let r=t.rawByteLimit??32768,n=t.maxDepth??12,u=e.raw;if(u==null)return{event:e,truncated:!1,originalBytes:0,keptBytes:0};if(!bl(u,r,n)){let c=ze(u,r,n);return{event:e,truncated:!1,originalBytes:c,keptBytes:c}}let i=ze(u,Number.POSITIVE_INFINITY,64),a={budget:r,maxStringBytes:t.maxStringBytes??4096,maxArrayItems:t.maxArrayItems??64,paths:[],truncatedAnything:!1},l=Vt(u,a,n,""),d=ze(l,Number.POSITIVE_INFINITY,n);if(a.truncatedAnything&&l!==null&&typeof l=="object"&&!Array.isArray(l)){let c={truncated:!0,originalBytes:i,keptBytes:d,paths:a.paths};l[El]=c}return{event:{...e,raw:l},truncated:a.truncatedAnything,originalBytes:i,keptBytes:d}}s(e3,"B0"),o(e3,"clampEventRaw");function _l(e={}){let t=0,r=0,n=0,u=e.rawByteLimit??32768;return{clamp(i){t+=1;let a=e3(i,e);return a.truncated&&(r+=1,n+=Math.max(0,a.originalBytes-a.keptBytes)),a.event},stats(){return{inspected:t,truncated:r,bytesReclaimed:n,rawByteLimit:u}},reset(){t=0,r=0,n=0}}}s(_l,"Rs"),o(_l,"createEventClamp");var kD={screenshot:50,"visual-crop":50,"visual-frame":200,"build-report":20,"heap-snapshot":3,"trace-with-errors":20,verification:10},AD=64*1024*1024,_D=32*1024*1024,ID=class{static{s(this,"Es")}static{o(this,"InMemoryRingBuffer")}constructor(e={}){this.events=[],this.eventBytes=[],this.residentEventBytes=0,this.ingested=0,this.dropped=0,this.droppedForBytes=0,this.artifactsByKind=new Map,this.artifactsById=new Map,this.artifactBytesById=new Map,this.artifactOrder=[],this.residentArtifactBytes=0,this.artifactsDropped=0,this.eventCap=e.eventCap??5e3,this.eventByteCap=e.eventByteCap??AD,this.artifactCaps={...kD,...e.artifactCapacities},this.artifactByteCap=e.artifactByteCap??_D}appendEvent(e){let t=di(e);for(this.events.push(e),this.eventBytes.push(t),this.residentEventBytes+=t,this.ingested+=1,this.events.length>this.eventCap&&this.evictOldestEvents(this.events.length-this.eventCap);this.residentEventBytes>this.eventByteCap&&this.events.length>1;)this.evictOldestEvents(1),this.droppedForBytes+=1}evictOldestEvents(e){if(e<=0)return;let t=Math.min(e,this.events.length);for(let r=0;r<t;r++)this.residentEventBytes-=this.eventBytes[r]??0;this.events.splice(0,t),this.eventBytes.splice(0,t),this.dropped+=t,this.events.length===0&&(this.residentEventBytes=0)}recentEvents(e){return e===void 0||e>=this.events.length?[...this.events]:this.events.slice(this.events.length-e)}totalEventsIngested(){return this.ingested}totalEventsDropped(){return this.dropped}putArtifact(e){let t=this.artifactCaps[e.kind]??0;if(t<=0)return;let r=this.artifactsByKind.get(e.kind);r||(r=[],this.artifactsByKind.set(e.kind,r)),this.artifactsById.has(e.id)&&this.removeArtifact(e.id);let n=ze(e.data);for(r.push(e),this.artifactsById.set(e.id,e),this.artifactBytesById.set(e.id,n),this.artifactOrder.push(e.id),this.residentArtifactBytes+=n;r.length>t;){let u=r.shift();u&&(this.forgetArtifact(u.id),this.artifactsDropped+=1)}for(;this.residentArtifactBytes>this.artifactByteCap&&this.artifactOrder.length>1;){let u=this.artifactOrder[0];if(u===void 0)break;this.removeArtifact(u),this.artifactsDropped+=1}}removeArtifact(e){let t=this.artifactsById.get(e);if(t){let r=this.artifactsByKind.get(t.kind);if(r){let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}this.forgetArtifact(e)}forgetArtifact(e){this.artifactsById.delete(e),this.residentArtifactBytes-=this.artifactBytesById.get(e)??0,this.artifactBytesById.delete(e);let t=this.artifactOrder.indexOf(e);t!==-1&&this.artifactOrder.splice(t,1),this.artifactsById.size===0&&(this.residentArtifactBytes=0)}getArtifact(e){return this.artifactsById.get(e)}listArtifacts(e){return[...this.artifactsByKind.get(e)??[]]}approximateSizeBytes(){return this.residentEventBytes+this.residentArtifactBytes}stats(){let e={};for(let[t,r]of this.artifactsByKind)r.length>0&&(e[t]=r.length);return{events:{resident:this.events.length,residentBytes:this.residentEventBytes,ingested:this.ingested,dropped:this.dropped,droppedForBytes:this.droppedForBytes,cap:this.eventCap,byteCap:this.eventByteCap},artifacts:{resident:this.artifactsById.size,residentBytes:this.residentArtifactBytes,dropped:this.artifactsDropped,byteCap:this.artifactByteCap,byKind:e}}}},SD=class{static{s(this,"Ts")}static{o(this,"Session")}constructor(e={}){this.state="idle",this.hooks=[],this.reducerRetention=new Map,this.id=e.sessionId??Pe(),this.storage=e.storage??new ID,this.clamp=e.clamp===!1?void 0:_l(e.clamp??{}),this.redactor=e.redact===!1?void 0:cs(e.redact??{});let t=[this.clamp?.clamp,this.redactor?.redact].filter(r=>r!==void 0);this.bus=new fm({capacity:e.eventBusCapacity,...t.length?{transform:o(r=>t.reduce((n,u)=>u(n),r),"transform")}:{}}),this.graph=new Em,this.resources=new ym,this.reducers=new ME,this.bus.subscribe(r=>{this.storage.appendEvent(r),this.reducers.dispatch(r)})}get lifecycle(){return this.state}storageStats(){let e=Object.fromEntries([...this.reducerRetention].map(([t,r])=>[t,r()]));return{...this.storage.stats?{storage:this.storage.stats()}:{},...this.clamp?{clamp:this.clamp.stats()}:{},...Object.keys(e).length>0?{reducers:e}:{}}}registerReducerRetention(e,t){this.reducerRetention.set(e,t)}start(){this.state==="idle"&&(this.state="active")}onShutdown(e){this.hooks.push(e)}async stop(){if(!(this.state==="closed"||this.state==="stopping")){this.state="stopping";for(let e=this.hooks.length-1;e>=0;e--){let t=this.hooks[e];try{let r=t.stop();r&&typeof r.then=="function"&&await r}catch{}}this.state="closed"}}};import{AsyncProvider as lr,ProviderScope as dr}from"@frontmcp/sdk";var Il;function t3(e){Il=e}s(t3,"N_"),o(t3,"setActiveSession");function Kt(){if(!Il)throw new Error("No LensMCP session is active. Did you call bootstrapLensmcp() before the FrontMCP container started?");return Il}s(Kt,"zn"),o(Kt,"requireSession");var FD=lr({provide:qt,name:"LensmcpSession",description:"The active LensMCP Session instance.",scope:dr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Kt(),"useFactory")}),zD=lr({provide:sr,name:"LensmcpEventBus",description:"The session's normalised event bus.",scope:dr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Kt().bus,"useFactory")}),jD=lr({provide:Q5,name:"LensmcpGraphStore",description:"The typed multi-axis trace graph.",scope:dr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Kt().graph,"useFactory")}),OD=lr({provide:O,name:"LensmcpResourceStore",description:"Registry of agent-readable MCP resources.",scope:dr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Kt().resources,"useFactory")}),RD=lr({provide:eD,name:"LensmcpStorage",description:"Hot-tier storage backend (in-memory ring buffer by default).",scope:dr.GLOBAL,inject:o(()=>[],"inject"),useFactory:o(()=>Kt().storage,"useFactory")}),TD=[FD,zD,jD,OD,RD];function u3(e={}){let t=new SD(e);return t.start(),t3(t),{session:t,providers:TD}}s(u3,"C_"),o(u3,"bootstrapLensmcp");var JA=new RegExp("\x1B\\[[0-9;]*[A-Za-z]","g"),GA=["ai/agents/hazard-analyst/src/hazard-analyst.agent.ts(52,12): error TS2416: Property 'outputSchema' in type 'HazardAnalystAgent' is not assignable to the same property in base type 'BaseAgent<HazardInput, HazardOutput>'.","server/apps/haccp/src/modules/plan/plan.service.ts(118,7): error TS2322: Type 'string' is not assignable to type 'PlanStatus'.","web/libs/ui/src/report/report-renderer.tsx(9,3): warning TS6133: {0} is declared but its value is never read."].join(`
66
+ `);import{createSocket as ND}from"node:dgram";import{closeSync as MD,existsSync as r3,openSync as PD,readSync as UD,statSync as n3}from"node:fs";import{createServer as ZD}from"node:net";import{existsSync as i3,unlinkSync as s3}from"node:fs";var LD=1024*1024;function a3(e){let t=e.onError??(()=>{});try{i3(e.path)&&s3(e.path)}catch{}let r=new Set,n=e.maxFrameBytes??LD,u=ZD(i=>{r.add(i);let a="";i.setEncoding("utf8"),i.on("data",l=>{a+=l;let d;for(;(d=a.indexOf(`
67
+ `))!==-1;){let c=a.slice(0,d);a=a.slice(d+1),c&&e.onMessage(c)}a.length>n&&(t(new Error(`uds: frame exceeded ${n} bytes without a newline \u2014 connection dropped`)),a="",i.destroy())}),i.on("error",l=>t(l)),i.on("close",()=>r.delete(i))});return u.on("error",i=>t(i)),u.listen(e.path,()=>e.onListening?.()),u.unref(),{close:o(()=>new Promise(i=>{for(let a of r)try{a.destroy()}catch{}r.clear();try{u.close(()=>{try{i3(e.path)&&s3(e.path)}catch{}i()})}catch{i()}}),"close")}}s(a3,"Hm"),o(a3,"createUdsServer");function o3(e){let t=e.eventFile??process.env.LENSMCP_EVENT_FILE,r=e.socketPath??process.env.LENSMCP_IPC_SOCKET,n=e.udsPath??process.env.LENSMCP_UDS,u=e.onError??(()=>{}),i=0,a=o(f=>{let h=f.trim();if(!h)return;let g;try{g=JSON.parse(h)}catch{return}if(!(!g||typeof g!="object"||!("id"in g)||!("source"in g)))try{e.sessionId&&g.sessionId==="pending"&&(g.sessionId=e.sessionId,g.context&&g.context.sessionId==="pending"&&(g.context.sessionId=e.sessionId)),e.bus.publish(g),i+=1}catch(E){u(E)}},"publish"),l=[],d=!1,c=!1,p=!1;if(t){d=!0;let f=0,h="",g=!1,E=e.replayBytes??Number(process.env.LENSMCP_REPLAY_BYTES??4*1024*1024);if(r3(t))try{let b=n3(t).size;Number.isFinite(E)&&E>0&&b>0?(f=Math.max(0,b-E),g=f>0):f=b}catch{f=0}let B=Buffer.alloc(64*1024),w=setInterval(o(()=>{if(!r3(t))return;let b;try{b=n3(t).size}catch{return}for(b<f&&(f=0,h="");f<b;){let $;try{$=PD(t,"r")}catch(x){u(x);return}try{let x=Math.min(B.length,b-f),F=UD($,B,0,x,f);if(F<=0)break;f+=F,h+=B.toString("utf8",0,F);let C;for(;(C=h.indexOf(`
68
+ `))!==-1;){let j=h.slice(0,C);if(h=h.slice(C+1),g){g=!1;continue}a(j)}}finally{MD($)}}},"drain"),e.pollMs??50);w.unref?.(),l.push(()=>clearInterval(w))}if(r){let[f,h]=r.split(":"),g=Number(h);if(f&&Number.isFinite(g)){c=!0;let E;try{E=ND("udp4"),E.on("message",B=>a(B.toString("utf8"))),E.on("error",B=>u(B)),E.bind(g,f),E.unref()}catch(B){u(B),c=!1}if(E){let B=E;l.push(()=>new Promise(w=>{try{B.close(()=>w())}catch{w()}}))}}}if(n)try{let f=a3({path:n,onMessage:o(h=>a(h),"onMessage"),onError:u});p=!0,l.push(()=>f.close())}catch(f){u(f)}let m=[];return d&&m.push("file"),c&&m.push("udp"),p&&m.push("uds"),{mode:m.join("+")||"none",count:o(()=>i,"count"),async stop(){for(let f of l)try{await f()}catch{}}}}s(o3,"Ym"),o(o3,"startEventIngest");import{existsSync as qD,readFileSync as l3}from"node:fs";import{dirname as VD,join as JD}from"node:path";function d3(e=process.cwd()){let t=Sl("nx.json",e);if(!t)return je();try{let r=JSON.parse(l3(t,"utf8"));return je(r.lensmcp?.thresholds)}catch{return je()}}s(d3,"Qm"),o(d3,"loadWorkspaceThresholds");function c3(e=process.cwd()){let t=Sl("nx.json",e);if(!t)return Wt;try{let r=JSON.parse(l3(t,"utf8"));return V1(r.lensmcp?.flows)}catch(r){return{...Wt,problems:[`${t} could not be read as JSON (${r instanceof Error?r.message:String(r)}) \u2014 flow config ignored`]}}}s(c3,"ef"),o(c3,"loadWorkspaceFlowsConfig");function Sl(e,t){let r=t;for(let n=0;n<8;n++){let u=JD(r,e);if(qD(u))return u;let i=VD(r);if(i===r)break;r=i}}s(Sl,"V_"),o(Sl,"findUp");import{App as GD}from"@frontmcp/sdk";import{Resource as WD,ResourceContext as KD}from"@frontmcp/sdk";import{existsSync as HD,readFileSync as XD}from"node:fs";import{dirname as YD,join as QD}from"node:path";var ke="perf://rules",ht="pod/heap-budget",gt="pod/retained-generation",p3=512,m3=.9,ew=64,tw=16,uw=16,f3=256,h3=1024*1024,rw="LENSMCP_PERF_RULES",nw="LENSMCP_POD_HEAP_BUDGET_MB",iw={heapBudgetEnabled:!0,retainedEnabled:!0,budgetMb:p3,services:{}},sw=/^(0|off|false|no)$/i,Fl=o(e=>{let t=typeof e=="string"&&e.trim()!==""?Number(e):e;return typeof t=="number"&&Number.isFinite(t)&&t>=16&&t<=1e6?t:void 0},"budget");function ci(e,t){let r=t&&typeof t=="object"&&!Array.isArray(t)?t:{},n=r[ht]&&typeof r[ht]=="object"?r[ht]:{},u=r[gt]&&typeof r[gt]=="object"?r[gt]:{},i=sw.test((e[rw]??"").trim())||r.enabled===!1,a={};if(n.services&&typeof n.services=="object"&&!Array.isArray(n.services))for(let[l,d]of Object.entries(n.services)){let c=Fl(d);c!==void 0&&(a[l]=c)}return{heapBudgetEnabled:!i&&n.enabled!==!1,retainedEnabled:!i&&u.enabled!==!1,budgetMb:Fl(e[nw])??Fl(n.budgetMb)??p3,services:a}}s(ci,"As"),o(ci,"resolvePodRuleThresholds");function g3(e=process.cwd(),t=process.env){let r=e;for(let n=0;n<8;n++){let u=QD(r,".lensmcp","config.json");if(HD(u))try{let a=JSON.parse(XD(u,"utf8"));return ci(t,a?.perfRules)}catch{return ci(t,void 0)}let i=YD(r);if(i===r)break;r=i}return ci(t,void 0)}s(g3,"of"),o(g3,"loadPodRuleThresholds");var cr=o((e,t,r)=>`${e}\0${t}\0${r}`,"key"),Ae=o(e=>Math.round(e/h3),"mb"),zl=0,aw=o(()=>(zl=(zl+1)%65535,`perf-${Date.now().toString(36)}${zl.toString(36)}${Math.random().toString(36).slice(2,7)}`),"eventId"),ow=class{static{s(this,"jn")}static{o(this,"PerfRuleBook")}constructor(e={}){this.options=e,this.findings=new Map,this.pods=new Map,this.heard=!1,this.thresholds=e.thresholds??iw,this.now=e.now??Date.now}ingest(e){return e.source==="perf"?this.ingestRule(e):e.source==="memory"?this.ingestPod(e):!1}ingestRule(e){let t=w1(e.raw);if(!t||t.rule.startsWith("pod/"))return!1;let r=!this.heard;if(this.heard=!0,t.kind==="perf-rule-scan"){let i=!1,a=new Set(t.open);for(let[l,d]of this.findings)d.rule===t.rule&&d.project===t.project&&!a.has(d.subject)&&(this.findings.delete(l),i=!0);return i||r}let n=cr(t.rule,t.project,t.subject);if(t.kind==="perf-rule-retracted")return this.findings.delete(n)||r;let u=this.findings.get(n);return this.findings.set(n,{rule:t.rule,project:t.project,subject:t.subject,severity:t.severity,title:t.title,summary:t.summary,evidence:t.evidence,cost:t.cost,fix:t.fix,verify:t.verify,docs:t.docs,firstSeenAt:u?.firstSeenAt??e.timestamp,lastSeenAt:Math.max(e.timestamp,u?.lastSeenAt??0)}),this.bound(),!0}projectPods(e,t,r){let n=this.pods.get(e);if(!n&&(n={service:t,lastSeenAt:r,readings:new Map,retained:new Map},this.pods.set(e,n),this.pods.size>ew)){let u=[...this.pods.entries()].sort((i,a)=>i[1].lastSeenAt-a[1].lastSeenAt)[0];u&&u[0]!==e&&(this.pods.delete(u[0]),this.close(cr(ht,u[0],u[1].service),"evicted",r),this.close(cr(gt,u[0],u[1].service),"evicted",r))}return n.service=t||n.service,n.lastSeenAt=Math.max(n.lastSeenAt,r),n}ingestPod(e){let t=Dl(e.raw);if(!t)return!1;let r=e.timestamp,n=this.projectPods(t.project,t.service||t.project,r),u=`${t.pod}:${t.pid}`;if(t.kind==="pod-memory"){if(t.previousAlive!==!0&&n.readings.set(u,this.reading(t,r)),t.trigger==="boot"){for(let d of[...n.readings.keys()])d.startsWith(`${t.pod}:`)&&d!==u&&n.readings.delete(d);for(let d of[...n.retained.keys()])d.startsWith(`${t.pod}:`)&&!d.startsWith(`${u}:`)&&n.retained.delete(d)}if(n.readings.size>tw){let d=[...n.readings.entries()].sort((c,p)=>c[1].at-p[1].at)[0];d&&n.readings.delete(d[0])}}else if(t.kind==="pod-memory-retained"){n.retained.set(`${u}:${t.gen}`,this.retainedOf(t,r));let d=[...n.retained.keys()].filter(c=>c.startsWith(`${u}:`));d.length>uw&&n.retained.delete(d[0])}else if(t.kind==="pod-memory-released")n.retained.delete(`${u}:${t.gen}`);else if(t.kind==="pod-memory-exited"){n.readings.delete(u);for(let d of[...n.retained.keys()])d.startsWith(`${u}:`)&&n.retained.delete(d)}let i=!this.heard;this.heard=!0;let a=this.evaluateHeap(t.project,n,r),l=this.evaluateRetained(t.project,n,r);return a||l||i}reading(e,t){return{pod:e.pod,pid:e.pid,service:e.service||e.project,at:e.at??t,trigger:e.trigger,gen:e.gen,swaps:e.swaps,live:e.live,reserved:e.reserved,rss:e.rss,...e.baseline!==void 0?{baseline:e.baseline}:{}}}retainedOf(e,t){return{pod:e.pod,pid:e.pid,gen:e.gen,at:t,ageMs:e.ageMs,swapsSinceClose:e.swapsSinceClose,gcs:e.gcs,alive:Array.isArray(e.alive)?e.alive.slice(0,8):[],...e.counts?{counts:e.counts}:{},live:e.live}}budgetFor(e,t){return this.thresholds.services[t]??this.thresholds.services[e]??this.thresholds.budgetMb}related(e){return[...this.findings.values()].filter(t=>t.project===e&&!t.rule.startsWith("pod/")).map(t=>`${t.rule}: ${t.title}`)}evaluateHeap(e,t,r){let n=t.service,u=cr(ht,e,n),i=this.findings.get(u);if(!this.thresholds.heapBudgetEnabled)return i?this.close(u,"disabled",r):!1;let a=this.budgetFor(e,t.service),l=a*h3,d=[...t.readings.values()].sort((g,E)=>E.live-g.live),c=d.filter(g=>g.live>l),p=d.some(g=>g.live>l*m3);if(c.length===0&&!(i&&p))return i?this.close(u,d.length?"cleared":"pod-exited",r):!1;if(c.length===0)return!1;let m=c[0],f=c.reduce((g,E)=>g+(E.live-l),0),h={rule:ht,project:e,subject:n,severity:m.live>=2*l?"error":"warning",title:`${t.service}: ${Ae(m.live)} MB live heap after a full GC \u2014 over its ${a} MB budget${c.length>1?` (${c.length} pods)`:""}`,summary:`Pod #${m.pod} of ${t.service} holds ${Ae(m.live)} MB of live objects right after a full GC (${Ae(m.reserved)} MB reserved, rss ${Ae(m.rss)} MB${m.baseline!==void 0?`; ${Ae(m.baseline)} MB at boot`:""}, generation ${m.gen} after ${m.swaps} swap${m.swaps===1?"":"s"}). That is not garbage: it is what the app keeps, in every pod of the service.`,evidence:{budgetMb:a,pods:c.map(g=>({pod:g.pod,pid:g.pid,liveMb:Ae(g.live),reservedMb:Ae(g.reserved),rssMb:Ae(g.rss),...g.baseline!==void 0?{baselineMb:Ae(g.baseline)}:{},gen:g.gen,swaps:g.swaps,trigger:g.trigger,at:g.at})),related:this.related(e)},cost:{bytes:f,memoryMb:Ae(f),basis:`live heap after a full GC above the ${a} MB budget, summed over the pods over it`},fix:[`See what the heap is made of: \`memory.explain_pod({ service: '${t.service}' })\`, then \`lensmcp mem ${t.service} --snapshot --analyze\` \u2014 read "bytes by package/module" and the largest retainers.`,`If one shared library dominates (FoodGuard: ~300 MB of zod schemas per pod from a contracts barrel), import it by subpath \u2014 see any bundle/heavy-barrel-import finding for ${e} \u2014 and build large schema catalogs lazily (a function that builds on first use), not at module load.`,"If the bundle text dominates (eval strings, source maps), keep the default `eval` devtool and no `--enable-source-maps` (LENSMCP_DEV_DEVTOOL unset).",`If the heap grows with each swap or request, it is retention, not size: look for module-level caches, registries and listeners that outlive a request (\`memory.explain_leak\`). A service that genuinely needs more raises its budget: \`.lensmcp/config.json\` perfRules["pod/heap-budget"].services["${t.service}"].`],verify:`After the change rebuilds and the pod swaps, its next post-GC report (\`memory.pods\`) shows live heap under ${Math.round(a*m3)} MB and LensMCP retracts this finding (\`observe_current_status\` no longer lists pod/heap-budget for ${t.service}).`,docs:b1[ht],firstSeenAt:i?.firstSeenAt??r,lastSeenAt:r};return this.open(u,h,i)}evaluateRetained(e,t,r){let n=t.service,u=cr(gt,e,n),i=this.findings.get(u),a=[...t.retained.values()].sort((p,m)=>m.ageMs-p.ageMs);if(!this.thresholds.retainedEnabled||a.length===0)return i?this.close(u,this.thresholds.retainedEnabled?"released":"disabled",r):!1;let l=a[0],d=Math.max(1,Math.round(l.ageMs/6e4)),c={rule:gt,project:e,subject:n,severity:"warning",title:`${t.service}: ${a.length===1?`generation ${l.gen} is`:`${a.length} closed generations are`} still in memory ${d} min after the hot swap that closed ${a.length===1?"it":"them"}`,summary:`Pod #${l.pod} closed generation ${l.gen} ${d} min ago, ${l.swapsSinceClose} swap(s) and ${l.gcs} full GC(s) since, and ${l.alive.join(", ")||"its objects"} ${l.alive.length===1?"is":"are"} still alive: something still points into the old app \u2014 a whole copy of it stays resident with every swap that leaks.`,evidence:{generations:a.slice(0,8).map(p=>({pod:p.pod,pid:p.pid,gen:p.gen,ageMs:p.ageMs,swapsSinceClose:p.swapsSinceClose,gcs:p.gcs,alive:p.alive,...p.counts?{counts:p.counts}:{},liveMb:Ae(p.live)}))},cost:{basis:"one copy of the app per retained generation; its size is in the heap snapshot (`lensmcp mem --snapshot --analyze`)"},fix:[`Find what holds it: \`lensmcp mem ${t.service} --snapshot --analyze\` prints the shortest path from the GC roots to generation ${l.gen} \u2014 the first frame outside your app's own objects is the culprit.`,"Usual culprits: a timer or interval never cleared on shutdown; a BullMQ worker, queue event or Redis client never closed in onModuleDestroy / onApplicationShutdown; `process.on(\u2026)` / an EventEmitter listener added per app instance; a module-level registry, cache or singleton keyed by class or holding app instances.","Release it in the app's shutdown hooks (Nest calls them on every hot swap), or move the module-level state into a provider the container owns."],verify:'Save a file to swap again; within ~5 min the pod reports "generation N freed" (`memory.pods`), LensMCP retracts this finding, and `memory://leaks/suspected` no longer lists the generation.',docs:b1[gt],firstSeenAt:i?.firstSeenAt??r,lastSeenAt:r};return this.open(u,c,i)}open(e,t,r){return this.findings.set(e,t),this.bound(),(!r||r.title!==t.title||r.severity!==t.severity)&&this.emit(t,"finding"),!0}close(e,t,r){let n=this.findings.get(e);return n?(this.findings.delete(e),this.emit({...n,lastSeenAt:r},"retracted",t),!0):!1}emit(e,t,r){let n=this.options.publish;if(!n)return;let u=this.options.sessionId??"pending",i=this.now(),a={id:aw(),sessionId:u,timestamp:i,source:"perf",category:"performance",severity:t==="finding"?e.severity:"info",context:{sessionId:u,projectName:e.project},fingerprint:D1(e.rule,e.project,e.subject),title:t==="finding"?`${e.rule}: ${e.title}`:`${e.rule}: cleared for ${e.project} (${e.subject})`,raw:t==="finding"?{kind:"perf-rule-finding",rule:e.rule,project:e.project,subject:e.subject,severity:e.severity,title:e.title,summary:e.summary,evidence:e.evidence,cost:e.cost,fix:e.fix,verify:e.verify,docs:e.docs,detectedAt:i}:{kind:"perf-rule-retracted",rule:e.rule,project:e.project,subject:e.subject,reason:r??"cleared",at:i}};queueMicrotask(()=>{try{n(a)}catch{}})}bound(){if(this.findings.size<=f3)return;let e=[...this.findings.entries()].sort((t,r)=>t[1].lastSeenAt-r[1].lastSeenAt).slice(0,this.findings.size-f3);for(let[t]of e)this.findings.delete(t)}openFindings(){return[...this.findings.values()].sort((e,t)=>e.severity===t.severity?t.lastSeenAt-e.lastSeenAt:e.severity==="error"?-1:1)}report(e){let t=this.openFindings(),r={};for(let n of t)r[n.rule]=(r[n.rule]??0)+1;return{schemaVersion:1,revision:e,updatedAt:new Date(this.now()).toISOString(),producer:this.heard?"connected":"none",detail:this.heard?t.length?`${t.length} open performance finding${t.length===1?"":"s"}: ${Object.entries(r).map(([n,u])=>`${u} ${n}`).join(", ")}`:"no open performance findings":"no performance rule has reported yet \u2014 rules run after a dev-cluster compilation (bundle/*) and on pod memory reports (pod/*); start the gateway",findings:t,counts:r}}};function v3(e,t=700){let r=e.fix.map((n,u)=>`${u+1}) ${n}`).join(" ");return r.length>t?`${r.slice(0,t-40).trimEnd()}\u2026 (all steps: ${ke})`:r}s(v3,"sf"),o(v3,"compactFix");var y3=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord"),E3=o(e=>Array.isArray(e)?e.length:void 0,"arrayLen"),He=o(e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,"asCount"),$e=o(e=>typeof e=="string"?e:void 0,"asString");function ie(e,...t){for(let r of t){let n=E3(e[r])??He(e[r]);if(n!==void 0)return n}}s(ie,"ae"),o(ie,"countOf");var ae=o((e,t,r=`${t}s`)=>`${e} ${e===1?t:r}`,"plural");function pi(e,t,r,n,u){if(t>0)return{state:"failed",count:t,detail:`${ae(t,`${n} error`)} \u2014 read ${u}`};if(r>0)return{state:"warning",count:r,detail:ae(r,`${n} warning`)};let i=$e(e.status);return i==="clean"||i==="passed"?{state:"passed",count:0,detail:`${n} clean`}:{state:"unknown",detail:`${n} has not reported a result yet (status=${i??"absent"})`}}s(pi,"af"),o(pi,"fromStatusField");var mi=[{kind:"typecheck",resource:"typecheck://current",reads:o(()=>["typecheck://errors"],"reads"),blocking:!0,source:"typescript",read:o(e=>pi(e,ie(e,"errorCount","errors")??0,0,"typecheck","typecheck://errors"),"read")},{kind:"lint",resource:"lint://current",reads:o(e=>e==="warning"?["lint://warnings"]:["lint://errors"],"reads"),blocking:!0,source:"eslint",read:o(e=>pi(e,ie(e,"errorCount","errors")??0,ie(e,"warningCount","warnings")??0,"lint","lint://errors"),"read")},{kind:"build",resource:"build://current",reads:o(e=>e==="warning"?["build://current"]:["build://failures"],"reads"),blocking:!0,source:"vite",read:o(e=>{let t=Array.isArray(e.failures)?e.failures.filter(u=>{let i=u?.domain;return i!=="typecheck"&&i!=="lint"}).length:ie(e,"failures","failureCount")??0,r=(E3(e.failures)??t)-t,n=t===0&&r>0&&$e(e.status)==="failing"?{...e,status:"clean"}:e;return pi(n,t,ie(e,"warnings","warningCount")??0,"build","build://failures")},"read")},{kind:"runtime",resource:"runtime://browser/errors",reads:o(()=>["runtime://browser/errors","runtime://browser/failed-requests"],"reads"),blocking:!0,source:"client-runtime",read:o(e=>{let t=ie(e,"count","entries")??0;return t>0?{state:"failed",count:t,detail:`${ae(t,"browser runtime error")} \u2014 read runtime://browser/errors`}:{state:"unknown",count:0,detail:"no browser runtime errors recorded (a browser may never have connected)"}},"read")},{kind:"runtime",resource:"runtime://errors",reads:o(()=>["runtime://errors"],"reads"),blocking:!0,source:"nestjs",read:o(e=>{let t=ie(e,"count","entries")??0,r=Array.isArray(e.entries)?e.entries.filter(u=>u?.outcome==="declared").length:0,n=r>0?` (${t-r} unhandled, ${r} a 5xx the app answered on purpose)`:"";return t>0?{state:"failed",count:t,detail:`${ae(t,"server-side error")}${n} \u2014 read runtime://errors (route, status, request id and stack)`}:{state:"unknown",count:0,detail:"no server-side errors recorded (no pod may have handled a request yet)"}},"read")},{kind:"cluster",resource:"process://cluster",reads:o(()=>["process://cluster"],"reads"),blocking:!0,source:"gateway",read:o(e=>{if((ie(e,"services")??0)===0)return{state:"unknown",detail:"no cluster lifecycle events seen (the gateway may not be running)"};let t=ie(e,"crashLooping")??0,r=ie(e,"wedged")??0,n=ie(e,"buildFailed")??0,u=ie(e,"typeErrors")??0,i=u>0?`${ae(u,"service")} with type errors no typecheck producer reports`:void 0,a=ie(e,"down")??0,l=He(e.restarts)??0,d=Array.isArray(e.services)?e.services.filter(h=>{let g=h??{};return g.buildFailed===!0&&g.state==="up"}).length:0,c=Math.max(0,n-d),p=d>0?`${ae(d,"service")} failing to build while still serving the last good bundle`:void 0,m=[p,i?`${i} (still serving)`:void 0].filter(Boolean);if(t>0||r>0||c>0){let h=[t>0?`${ae(t,"service")} crash-looping`:void 0,r>0?`${ae(r,"service")} wedged`:void 0,c>0?`${ae(c,"service")} failing to build`:void 0].filter(Boolean);return{state:"failed",count:t+r+n+u,detail:`${h.join(", ")} \u2014 read process://cluster (requests to them 502)${m.length?`; ${m.join("; ")}`:""}`}}if(p)return{state:"failed",count:n+u,detail:`${p} \u2014 read process://cluster for the error lines${i?`; ${i} (still serving)`:""}`};if(i)return{state:"failed",count:u,detail:`${i} \u2014 read process://cluster for the lines (the bundle built; the services still serve)`};if(a>0)return{state:"warning",count:a,detail:`${ae(a,"service")} down (idle scale-to-zero is normal; the next request restarts it)`};let f=ie(e,"up")??0;return{state:"passed",count:0,detail:`${ae(f,"service")} up${l>0?`, ${ae(l,"restart")} this session`:""}`}},"read")},{kind:"memory",resource:"memory://leaks/suspected",reads:o(()=>["memory://leaks/suspected","memory://owners/growing"],"reads"),blocking:!1,source:"memory",read:o(e=>{let t=ie(e,"suspected","leaks")??0;return t>0?{state:"warning",count:t,detail:`${ae(t,"suspected leak")} \u2014 read memory://leaks/suspected`}:{state:"passed",count:0,detail:"no suspected leaks"}},"read")},{kind:"visual",resource:"visual://violations/current",reads:o(()=>["visual://violations/current"],"reads"),blocking:!1,source:"visual",read:o(e=>{let t=ie(e,"violations")??0;return t>0?{state:"warning",count:t,detail:`${ae(t,"visual violation")} \u2014 read visual://violations/current`}:{state:"passed",count:0,detail:"no visual violations"}},"read")},{kind:"perf",resource:"perf://slow-routes",reads:o(()=>["perf://slow-routes"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ie(e,"routes")??0,r=He(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ae(t,"route")} over${r?` ${r}ms`:" the slow-route threshold"} \u2014 read perf://slow-routes`}:{state:"passed",count:0,detail:"no slow routes"}},"read")},{kind:"duplicate-requests",resource:"perf://duplicate-requests",reads:o(()=>["perf://duplicate-requests"],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ie(e,"endpoints")??0,r=He(e.peakThreshold);return t>0?{state:"warning",count:t,detail:`${ae(t,"endpoint")} called ${r?`\u2265${r}\xD7`:"several times"} concurrently by one page \u2014 read perf://duplicate-requests`}:{state:"passed",count:0,detail:"no duplicated requests"}},"read")},{kind:"db",resource:"db://slow-queries",reads:o(()=>["db://slow-queries","db://analysis"],"reads"),blocking:!1,source:"db",read:o(e=>{let t=ie(e,"queries")??0,r=He(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ae(t,"query shape")} over${r?` ${r}ms`:" the slow-query threshold"} \u2014 read db://slow-queries`}:{state:"passed",count:0,detail:"no slow query shapes"}},"read")},{kind:"egress",resource:"net://egress/hosts",reads:o(e=>e==="warning"?["net://egress/hosts","net://egress/failures"]:["net://egress/hosts"],"reads"),blocking:!1,source:"external",read:o(e=>{let t=ie(e,"failingHosts")??0,r=ie(e,"slowHosts")??0,n=He(e.thresholdMs);return t>0?{state:"warning",count:t,detail:`${ae(t,"external host")} failing \u2014 read net://egress/failures`}:r>0?{state:"warning",count:r,detail:`${ae(r,"external host")} over${n?` ${n}ms`:" the slow-egress threshold"} \u2014 read net://egress/hosts`}:{state:"passed",count:0,detail:"no failing or slow external calls"}},"read")},{kind:"perf-rules",resource:ke,reads:o(()=>[ke],"reads"),blocking:!1,source:"perf",read:o(e=>{let t=ie(e,"findings")??0;return t>0?{state:"warning",count:t,detail:`${ae(t,"performance finding")} \u2014 read ${ke} (each has a fix and a verify step)`}:{state:"passed",count:0,detail:"no open performance findings"}},"read"),items:o(e=>{let t=(Array.isArray(e.findings)?e.findings:[]).map(y3).filter(n=>!!n),r=t.slice(0,jl).map(n=>{let u=$e(n.rule)??"perf",i=$e(n.project)??"?",a=$e(n.subject)??"?",l=Array.isArray(n.fix)?n.fix.filter(d=>typeof d=="string"):[];return{source:"perf",severity:"warning",title:`${u} \xB7 ${$e(n.title)??i}`,fingerprint:`agent-status:perf-rule:${u}:${i}:${a}`,resource:ke,rule:u,...l.length?{fix:v3({fix:l})}:{},...$e(n.verify)?{verify:$e(n.verify)}:{},...$e(n.docs)?{docs:$e(n.docs)}:{}}});return t.length>jl&&r.push({source:"perf",severity:"warning",title:`${ae(t.length-jl,"more performance finding")} \u2014 read ${ke}`,fingerprint:"agent-status:perf-rules:more",resource:ke}),r},"items")}],jl=5,b3=new WeakMap,i_=mi.map(e=>e.resource);async function D3(e,t){let r={kind:t.kind,resource:t.resource},n;try{n=y3(await e.read(t.resource))}catch{return{...r,producer:"none",state:"unknown",detail:`no producer for ${t.resource} \u2014 this signal is unmonitored, not healthy`,reads:t.reads("unknown")}}if(!n)return{...r,producer:"none",state:"unknown",detail:`${t.resource} produced no readable payload`,reads:t.reads("unknown")};let u=$e(n.producer),i=(e.revision(t.resource)??0)>0,a=u==="none"?"none":u==="connected"||i?"connected":"none",l=$e(n.detail);if(a==="none")return{...r,producer:a,state:"unknown",detail:l??(u==="none"?`${t.resource} reports no producer attached \u2014 this signal is unmonitored, not healthy`:`${t.resource} is registered but has never reported \u2014 this signal is unmonitored, not healthy`),reads:t.reads("unknown")};let d;try{d=t.read(n)}catch{d={state:"unknown",detail:`${t.resource} payload could not be interpreted`}}let c=n.stale===!0,p=c?`${d.detail} (as of ${He(n.ageMs)!==void 0?w3(He(n.ageMs)):"a while ago"}; nothing has re-checked since)`:d.detail,m={...r,producer:a,state:d.state,...d.count===void 0?{}:{count:d.count},...c?{stale:!0}:{},detail:p,reads:t.reads(d.state)};if(t.items&&(d.state==="warning"||d.state==="failed"))try{let f=t.items(n);f.length&&b3.set(m,f)}catch{}return m}s(D3,"kE"),o(D3,"readSignal");function w3(e){return e<6e4?`${Math.max(1,Math.round(e/1e3))}s ago`:e<36e5?`${Math.round(e/6e4)}m ago`:`${Math.round(e/36e5)}h ago`}s(w3,"SE"),o(w3,"describeAge");async function Ol(e){return Promise.all(mi.map(t=>D3(e,t)))}s(Ol,"Os"),o(Ol,"readSignals");var pr=o(e=>mi.find(t=>t.resource===e.resource)??mi.find(t=>t.kind===e.kind),"specFor");function B3(e){return{source:pr(e).source,severity:e.state==="failed"?"error":"warning",title:e.detail,fingerprint:`agent-status:${e.kind}:${e.state}`,resource:e.reads[0]??e.resource}}s(B3,"IE"),o(B3,"toItem");function x3(e){let t={failed:3,warning:2,unknown:1,passed:0},r=o(i=>{let a=e.filter(l=>l.kind===i);return a.length===0?"unknown":a.reduce((l,d)=>t[d.state]>t[l]?d.state:l,a[0].state)},"pick"),n=o(i=>i==="failed"?"failed":i==="passed"||i==="warning"?"passed":"unknown","tri"),u=o(i=>i,"quad");return{typecheck:n(r("typecheck")),lint:n(r("lint")),build:n(r("build")),runtime:u(r("runtime")),visual:u(r("visual")),memory:u(r("memory"))}}s(x3,"RE"),o(x3,"toChecks");function $3(e){let t=e.filter(p=>p.state==="failed"),r=e.filter(p=>p.state==="warning"),n=e.filter(p=>p.state==="passed"),u=o(p=>b3.get(p)??[B3(p)],"itemsOf"),i=t.filter(p=>pr(p).blocking).flatMap(u),a=[...t.filter(p=>!pr(p).blocking),...r].flatMap(u),l=i.length>0?"failing":a.length>0?"warning":n.length>0?"clean":"starting",d=[...t.filter(p=>pr(p).blocking).flatMap(p=>p.reads),...t.filter(p=>!pr(p).blocking).flatMap(p=>p.reads),...r.flatMap(p=>p.reads)],c=[...new Set(d)];return c.length===0&&c.push("events://recent"),{status:l,blocking:i,warnings:a,suggestedReads:c,checks:x3(e)}}s($3,"Y_"),o($3,"deriveVerdict");function C3(e=process.env){let t=e.LENSMCP_TRANSPORT==="http"||e.LENSMCP_TRANSPORT==="socket",r=e.LENSMCP_PORT;return{mode:t?"shared":"embedded",pid:process.pid,startedAt:new Date(Date.now()-Math.round(process.uptime()*1e3)).toISOString(),...t&&r?{url:`http://127.0.0.1:${r}/mcp`}:{}}}s(C3,"EE"),o(C3,"readServerInfo");async function fi(e){let t=await Ol(e.resources),r=$3(t);return{schemaVersion:1,revision:e.revision,updatedAt:new Date().toISOString(),sessionId:e.sessionId,server:C3(),status:r.status,blocking:r.blocking,warnings:r.warnings,suggestedReads:r.suggestedReads,checks:r.checks,signals:t}}s(fi,"Nt"),o(fi,"aggregateStatus");var Rl="agent://current-status",Tl=class extends KD{static{s(this,"lf")}static{o(this,"AgentCurrentStatusResource")}async execute(){let e=this.get(O);try{return await e.read(Rl)}catch{}let t=this.get(qt);return fi({resources:e,sessionId:t.id,revision:e.revision(Rl)??0})}};Tl=_([WD({name:"agent-current-status",uri:Rl,mimeType:"application/json",description:'Workspace health in one read: status (clean/warning/failing/starting), what is BLOCKING (typecheck/lint/build errors, browser runtime errors, wedged or crash-looping services), warnings, and the exact resources to read next. Signals with no producer report `producer: "none"` \u2014 unmonitored, not healthy.'})],Tl);var lw=Tl;import{Resource as dw,ResourceContext as cw}from"@frontmcp/sdk";var Nl=class extends cw{static{s(this,"pf")}static{o(this,"ProcessClusterResource")}async execute(){return this.get(O).read("process://cluster")}};Nl=_([dw({name:"process-cluster",uri:"process://cluster",mimeType:"application/json",description:"Dev-cluster service health: which services are up / down / wedged / crash-looping, which fail to build, restart counts, and the error lines services printed (ERROR in, EADDRINUSE, and error TS\u2026 for a project no typecheck producer reports for \u2014 otherwise type errors are in typecheck://errors). Read this when a request 502s or a dev server stopped responding."})],Nl);var pw=Nl;import{Resource as mw,ResourceContext as fw}from"@frontmcp/sdk";var Ml=class extends fw{static{s(this,"ff")}static{o(this,"PerfRulesResource")}async execute(){return this.get(O).read("perf://rules")}};Ml=_([mw({name:"perf-rules",uri:"perf://rules",mimeType:"application/json",description:"Performance problems the lens detected by rule, each with a stable rule id, the measured evidence, the estimated cost (modules / MB / compile ms), the FIX steps and a VERIFY step: bundle/heavy-barrel-import (a service compiles most of a shared library through its root barrel while using a few symbols), pod/heap-budget (a dev pod's live heap after GC is over its budget), pod/retained-generation (a hot-swapped app copy is still in memory). A finding is retracted when the next build or memory report no longer shows it \u2014 that is how to prove a fix."})],Ml);var hw=Ml;import{Tool as gw,ToolContext as vw}from"@frontmcp/sdk";var k3=["typecheck","lint","build","runtime","cluster"],yw=[...k3,"all"],Ew={typecheck:[{signal:"typecheck://current",resource:"typecheck://errors",keys:["errors"],hint:"TypeScript diagnostics from the watching tsc. Already computed \u2014 no need to run `nx typecheck`."}],lint:[{signal:"lint://current",resource:"lint://errors",keys:["errors"],hint:"ESLint errors from the watching lint pass. Already computed \u2014 no need to run `nx lint`."}],build:[{signal:"build://current",resource:"build://failures",keys:["failures"],hint:"Bundler/compile failures. The dev server is serving a stale or broken bundle until these clear."}],runtime:[{signal:"runtime://browser/errors",resource:"runtime://browser/errors",keys:["entries"],hint:"Uncaught errors from the browser. Pair with flow_list_recent to see what the user did first."},{signal:"runtime://errors",resource:"runtime://errors",keys:["entries"],hint:"Errors a dev service raised while handling a request (a 500 from a curl, an e2e runner or the page) \u2014 route, status, request id and stack. No browser is involved."}],cluster:[{signal:"process://cluster",resource:"process://cluster",keys:["errors"],hint:"Error lines printed by dev services (ERROR in / EADDRINUSE; error TS only for a project no typecheck producer reports for). A wedged or crash-looping service 502s every request routed to it."}]},bw=o(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0,"asRecord");async function A3(e,t){let r;try{r=bw(await e.read(t.resource))}catch{return[]}if(!r)return[];for(let n of t.keys){let u=r[n];if(Array.isArray(u))return u}return[]}s(A3,"DE"),o(A3,"readItems");async function _3(e){let t=e.kind==="all"?k3:[e.kind],r=await Ol(e.resources),n=new Map(r.map(i=>[i.resource,i])),u=[];for(let i of t)for(let a of Ew[i]){let l=n.get(a.signal),d=l?.producer??"none",c=l?.state??"unknown",p=d==="none"?[]:await A3(e.resources,a);u.push({kind:i,resource:a.resource,producer:d,state:c,count:p.length,returned:Math.min(p.length,e.limit),items:p.slice(0,e.limit),detail:l?.detail??`no producer for ${a.resource} \u2014 unmonitored, not healthy`,hint:a.hint})}return{kind:e.kind,totalErrors:u.reduce((i,a)=>i+a.count,0),unmonitored:[...new Set(u.filter(i=>i.producer==="none").map(i=>i.kind))],groups:u}}s(_3,"yf"),o(_3,"collectErrors");var I3={name:"observe.current_status",description:'Workspace health in one call: whether anything is BLOCKING right now (typecheck errors, lint errors, build failures, browser runtime errors, wedged or crash-looping dev services), plus warnings and the exact resources to read next. Warnings include PERFORMANCE problems found by rule (a service compiling a whole shared library through its root barrel, a dev pod over its heap budget, a hot-swapped app copy still in memory), each with its rule id, a fix and how to verify it. Call this FIRST when a build, dev server, or page looks broken \u2014 and before running `nx typecheck` / `nx lint` for a project the dev cluster already watches, because those results are already computed here. Signals reporting `producer: "none"` are UNMONITORED, not healthy. Use observe.errors for the individual error items.'},vt={name:"observe.errors",description:"The actual error items the lens already computed: TypeScript diagnostics, ESLint errors, build failures, uncaught browser errors, server-side request errors (a dev service's 500: route, status, stack), and error lines printed by dev services (ERROR in\u2026, error TS\u2026, EADDRINUSE). Filter with `kind`. Prefer this over running `nx typecheck` / `nx lint` or tailing a dev-server log for a project the dev cluster watches: the watching producers already have the answer, so this costs one call instead of a rebuild. Each group reports `producer` \u2014 `none` means nothing is feeding that check, so an empty list there is NOT proof it is clean.",kinds:yw,defaultKind:"all",defaultLimit:25,maxLimit:200},hi={name:"observe.dismiss_errors",description:"Hide runtime errors that are already UNDERSTOOD and are not a problem to fix \u2014 a 401 your own signed-out test browser caused, a failure from a fixture that exists to throw \u2014 so they stop counting in observe.current_status and the Stop hook. Give the entry `ids` from observe.errors (kind `runtime`), or `all: true`, and a `reason`: it is recorded with the dismissal and shown to the person in the dashboard. This HIDES, it does not fix: each error shows again the next time it happens. It cannot dismiss a failing typecheck, lint, build or a broken service \u2014 those are current verdicts and clear only when the code is fixed. Never dismiss an error you have not explained; undo with observe.restore_errors.",maxIds:250,minReasonChars:8},Pl={name:"observe.restore_errors",description:"Undo a dismissal, so the errors it hid are listed and counted again. Give the dismissal `ids` from runtime://dismissed (or the id of an entry it hid), or `all: true` for every dismissal in effect \u2014 including ones a person made in the dashboard.",maxIds:250},S3="agent://current-status",Ul=class extends vw{static{s(this,"xf")}static{o(this,"ObserveCurrentStatusTool")}async execute(){let e=this.get(O);try{return await e.read(S3)}catch{}let t=this.get(qt);return fi({resources:e,sessionId:t.id,revision:e.revision(S3)??0})}};Ul=_([gw({name:I3.name,description:I3.description,inputSchema:{}})],Ul);var Dw=Ul;import{Tool as ww,ToolContext as Bw,z as F3}from"@frontmcp/sdk";var Zl=class extends Bw{static{s(this,"wf")}static{o(this,"ObserveErrorsTool")}async execute(e){let t=this.get(O);return _3({resources:t,kind:e.kind,limit:e.limit})}};Zl=_([ww({name:vt.name,description:vt.description,inputSchema:{kind:F3.enum(vt.kinds).default(vt.defaultKind).describe("Which failures to return. 'runtime' = browser errors AND a service's own request errors (the 500 case); 'cluster' = dev-service/pod errors (the 502 case). Default 'all'."),limit:F3.number().int().positive().max(vt.maxLimit).default(vt.defaultLimit).describe(`Max items per kind (default ${vt.defaultLimit}). \`count\` still reports the true total.`)}})],Zl);var xw=Zl;import{Tool as $w,ToolContext as Cw,z as mr}from"@frontmcp/sdk";import{appendFileSync as kw,closeSync as Aw,mkdirSync as _w,openSync as Iw,renameSync as Sw,statSync as Fw,unlinkSync as zw}from"node:fs";import{dirname as jw}from"node:path";function z3(e,t){let{fs:r,maxBytes:n,maxFiles:u}=t,i=`${e}.rotate.lock`,a=t.staleLockMs??3e4,l;for(let d=0;d<2&&l===void 0;d++)try{l=r.openSync(i,"wx")}catch{try{if(Date.now()-r.statSync(i).mtimeMs<=a)return"busy";r.unlinkSync(i)}catch{}}if(l===void 0)return"busy";try{try{if(r.statSync(e).size<=n)return"not-needed"}catch{return"not-needed"}try{r.unlinkSync(`${e}.${u}`)}catch{}for(let d=u-1;d>=1;d--)try{r.renameSync(`${e}.${d}`,`${e}.${d+1}`)}catch{}try{r.renameSync(e,`${e}.1`)}catch{}return"rotated"}finally{try{r.closeSync(l)}catch{}try{r.unlinkSync(i)}catch{}}}s(z3,"tw"),o(z3,"rotateBusFile");var j3=o((e,t,r,n,u)=>({id:Pe(),sessionId:e,timestamp:t,source:y1,category:"runtime",severity:"info",context:{sessionId:e},fingerprint:r,title:n,raw:u}),"lensEvent");function O3(e,t){return j3(t,e.until,`${or}:${e.groupId}`,`error dismissed: ${e.title??e.groupId}`,{kind:or,groupId:e.groupId,until:e.until,eventIds:e.eventIds,...e.by?{by:e.by}:{},...e.reason?{reason:e.reason}:{},...e.title?{title:e.title}:{}})}s(O3,"ow"),o(O3,"dismissalEvent");function R3(e,t,r){return j3(t,r,`${ii}:${e}`,"error restored",{kind:ii,groupId:e})}s(R3,"iw"),o(R3,"restoralEvent");var T3=o((e,t,r)=>{let n=Number(process.env[e]);return Number.isFinite(n)&&r(n)?n:t},"envNumber");function Ll(e,t){t.length!==0&&(_w(jw(e),{recursive:!0}),z3(e,{maxBytes:T3("LENSMCP_EVENT_MAX_BYTES",50*1024*1024,r=>r>0),maxFiles:T3("LENSMCP_EVENT_MAX_FILES",5,r=>r>=1&&r<=20),fs:{statSync:Fw,renameSync:Sw,unlinkSync:zw,openSync:Iw,closeSync:Aw}}),kw(e,t.map(r=>JSON.stringify(r)+`
69
+ `).join("")))}s(Ll,"Ps"),o(Ll,"appendBusEvents");var Ow=["runtime://errors","runtime://browser/errors","runtime://browser/failed-requests"],Rw="runtime://dismissed";async function N3(e,t){let r;try{r=await e.read(t)}catch{return[]}let n=r?.entries;return Array.isArray(n)?n.flatMap(u=>{let i=u;if(!i||typeof i.id!="string"||!i.id)return[];let a=typeof i.title=="string"&&i.title?i.title:typeof i.message=="string"?i.message:i.id;return[{id:i.id,title:a,timestamp:typeof i.timestamp=="number"?i.timestamp:0}]}):[]}s(N3,"QE"),o(N3,"entriesOf");async function M3(e,t,r=Date.now()){let n=new Set(t.ids??[]),u=[],i=r;for(let c of Ow)for(let p of await N3(e,c))!t.all&&!n.has(p.id)||u.some(m=>m.id===p.id)||(u.push({id:p.id,title:p.title,resource:c}),i=Math.max(i,p.timestamp));let a=new Set(u.map(c=>c.id)),l=t.reason.trim().slice(0,500),d=[];for(let c=0;c<u.length;c+=200){let p=u.slice(c,c+200),m=p[0]?.title??"";d.push({groupId:`events:${Pe()}`,until:i,eventIds:p.map(f=>f.id),by:t.by??"agent",reason:l,title:p.length===1?m:`${p.length} errors \u2014 ${m}`})}return{drafts:d,items:u,notFound:[...n].filter(c=>!a.has(c))}}s(M3,"aw"),o(M3,"planDismissal");async function P3(e,t){let r;try{r=await e.read(Rw)}catch{r=void 0}let n=r?.dismissals,u=(Array.isArray(n)?n:[]).flatMap(d=>{let c=d;return c&&typeof c.id=="string"?[{id:c.id,eventIds:Array.isArray(c.eventIds)?c.eventIds.filter(p=>typeof p=="string"):[]}]:[]});if(t.all)return{keys:u.map(d=>d.id),notFound:[]};let i=[...new Set(t.ids??[])],a=new Set,l=[];for(let d of i){let c=u.filter(p=>p.id===d||p.eventIds.includes(d));c.length===0&&l.push(d);for(let p of c)a.add(p.id)}return{keys:[...a],notFound:l}}s(P3,"cw"),o(P3,"planRestore");var Tw="Hidden, not fixed. Each of these shows again the next time it happens, and runtime://dismissed lists what is hidden, by whom and why.",ql=class extends Cw{static{s(this,"kf")}static{o(this,"ObserveDismissErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{dismissed:0,items:[],notFound:[],note:"Nothing named: pass `ids` (from observe.errors, kind runtime) or `all: true`."};let t=this.get(O),r=this.get(qt),n=await M3(t,e),u=n.drafts.map(a=>O3(a,r.id)),i=process.env.LENSMCP_EVENT_FILE;if(i)Ll(i,u);else for(let a of u)this.get(sr).publish(a);return{dismissed:n.items.length,items:n.items,notFound:n.notFound,note:n.items.length?Tw:"Nothing was dismissed: none of those ids is in a runtime error list right now."}}};ql=_([$w({name:hi.name,description:hi.description,inputSchema:{ids:mr.array(mr.string().min(1)).max(hi.maxIds).optional().describe("Entry ids to dismiss \u2014 the `id` of items observe.errors returns for kind `runtime`."),all:mr.boolean().optional().describe("Dismiss every runtime error currently listed (server-side, browser, failed requests)."),reason:mr.string().min(hi.minReasonChars).describe("Why these are not a problem to fix. Recorded with the dismissal and shown to the person in the dashboard."),by:mr.enum(["agent","cli"]).default("agent").describe("Who is dismissing. Leave as 'agent'; the lensmcp CLI passes 'cli'.")}})],ql);var Nw=ql;import{Tool as Mw,ToolContext as Pw,z as Vl}from"@frontmcp/sdk";var Jl=class extends Pw{static{s(this,"Rf")}static{o(this,"ObserveRestoreErrorsTool")}async execute(e){if(!e.all&&!e.ids?.length)return{restored:0,notFound:[],note:"Nothing named: pass dismissal `ids` (from runtime://dismissed) or `all: true`."};let t=this.get(O),r=this.get(qt),n=await P3(t,e),u=Date.now(),i=n.keys.map(l=>R3(l,r.id,u)),a=process.env.LENSMCP_EVENT_FILE;if(a)Ll(a,i);else for(let l of i)this.get(sr).publish(l);return{restored:n.keys.length,notFound:n.notFound,note:n.keys.length?"Restored: what those dismissals hid is listed and counted again.":"Nothing was restored: no dismissal matches."}}};Jl=_([Mw({name:Pl.name,description:Pl.description,inputSchema:{ids:Vl.array(Vl.string().min(1)).max(Pl.maxIds).optional().describe("Dismissal ids from runtime://dismissed, or ids of entries a dismissal hid."),all:Vl.boolean().optional().describe("Undo every dismissal in effect.")}})],Jl);var Uw=Jl;import{spawn as Zw}from"node:child_process";import{existsSync as Gl,readFileSync as Lw}from"node:fs";import{join as U3}from"node:path";import{Job as qw,JobContext as Vw,z as ve}from"@frontmcp/sdk";import{existsSync as Jw}from"node:fs";import{dirname as Gw,join as Ww,relative as Kw,resolve as yt,isAbsolute as Hw}from"node:path";var Xw=6;function Z3(e=process.env,t=process.cwd()){return yt(e.LENSMCP_WORKSPACE_ROOT??t)}s(Z3,"lw"),o(Z3,"resolveAllowedRoot");function gi(e,t){let r=Kw(yt(e),yt(t));return r===""||!r.startsWith("..")&&!Hw(r)}s(gi,"Tf"),o(gi,"isWithinRoot");function L3(e,t){let r=yt(e);if(t===void 0)return{ok:!0,cwd:r};let n=yt(r,t);return gi(r,n)?{ok:!0,cwd:n}:{ok:!1,reason:`cwd ${n} is outside this server's workspace (${r}). verify_fix runs a workspace-defined Nx target, so it only runs in the workspace this server was started for. Set LENSMCP_WORKSPACE_ROOT to serve a different one.`}}s(L3,"dw"),o(L3,"confineToWorkspace");function q3(e,t){let r=yt(t),n=yt(e);if(gi(r,n))for(let u=0;u<Xw;u++){if(Jw(Ww(n,"nx.json")))return n;if(n===r)break;let i=Gw(n);if(i===n||!gi(r,i))break;n=i}}s(q3,"pw"),o(q3,"findNxWorkspaceRootWithin");var Yw=/^[@A-Za-z0-9][\w./-]*$/;function V3(e){return e.length<=214&&Yw.test(e)}s(V3,"mw"),o(V3,"isValidProjectName");var Wl=class extends Vw{static{s(this,"zf")}static{o(this,"VerifyFixJob")}async execute(e){let t=Date.now(),r=e.project??process.env.LENSMCP_VERIFY_PROJECT??"example-web",n=Z3(),u=L3(n,e.cwd);if(!u.ok)return this.log(`[verify_fix] refused: ${u.reason}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let i=u.cwd;if(!V3(r))return this.log(`[verify_fix] refused: ${r} is not a valid Nx project name`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let a=q3(i,n);if(!a)return this.log(`No nx.json found between ${i} and ${n}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};let l=J3("nx",[a]);if(!l)return this.log(`Could not find node_modules/.bin/nx under ${a}`),{status:"errored",project:r,durationMs:Date.now()-t,stages:[],reportPath:null};this.log(`[verify_fix] nx run ${r}:agent-verify (cwd=${a})`);let d=Zw(l,["run",`${r}:agent-verify`],{cwd:a,env:{...process.env},stdio:["ignore","pipe","pipe"]}),c=[],p=o(B=>{let w=/\[agent-verify\] ([a-z]+): (passed|failed|skipped|errored)/.exec(B);w&&w[1]&&w[2]&&(c.push({name:w[1],result:w[2],durationMs:0}),this.log(` ${w[1]}: ${w[2]}`))},"captureLine");Kl(d.stdout,p),Kl(d.stderr,p);let m=!1,f=setTimeout(()=>{m=!0;try{d.kill("SIGTERM")}catch{}},e.timeoutMs),h=await new Promise(B=>{d.on("exit",w=>B(w??1))});if(clearTimeout(f),m)return{status:"timeout",project:r,durationMs:Date.now()-t,stages:c,reportPath:null};let g=U3(a,".lensmcp","verifications","latest.json"),E;if(Gl(g))try{E=JSON.parse(Lw(g,"utf-8"))}catch{E=void 0}return{status:E?.status??(h===0?"passed":"failed"),project:r,durationMs:E?.durationMs??Date.now()-t,stages:E?.stages??c,reportPath:Gl(g)?g:null}}};Wl=_([qw({name:"observe.verify_fix",description:"Run the deterministic verification loop (typecheck \u2192 lint \u2192 build) for a host project. Returns a per-stage report; suggested next read on failure is the relevant *://errors resource.",inputSchema:{project:ve.string().describe('Nx project name in the host workspace to verify. Defaults to LENSMCP_VERIFY_PROJECT or "example-web".').optional(),cwd:ve.string().describe("Directory to verify from. MUST be inside the workspace this server was started for (LENSMCP_WORKSPACE_ROOT, else the server's cwd); a path outside it is refused. Defaults to that workspace root.").optional(),timeoutMs:ve.number().int().positive().default(5*6e4).describe("How long to wait for the verify pipeline before declaring it stuck.")},outputSchema:{status:ve.enum(["passed","failed","errored","timeout"]),project:ve.string().nullable(),durationMs:ve.number(),stages:ve.array(ve.object({name:ve.string(),result:ve.enum(["passed","failed","skipped","errored"]),durationMs:ve.number(),exitCode:ve.number().optional(),summary:ve.string().optional()})),reportPath:ve.string().nullable()}})],Wl);var Qw=Wl;function J3(e,t){for(let r of t){let n=U3(r,"node_modules",".bin",e);if(Gl(n))return n}}s(J3,"hT"),o(J3,"locateBin");function Kl(e,t){if(!e)return;let r="";e.setEncoding("utf-8"),e.on("data",n=>{r+=typeof n=="string"?n:n.toString("utf-8");let u;for(;(u=r.indexOf(`
70
+ `))!==-1;){let i=r.slice(0,u);r=r.slice(u+1),t(i)}}),e.on("end",()=>{r.length&&t(r)})}s(Kl,"fw"),o(Kl,"bufferLines");var Hl=class{static{s(this,"Dn")}static{o(this,"AgentApp")}};Hl=_([GD({id:"agent",name:"Agent",description:"Agent-facing summary, suggested reads, verification.",resources:[lw,pw,hw],tools:[Dw,xw,Nw,Uw],jobs:[Qw]})],Hl);var eB={"service-starting":"starting","service-respawn":"starting","lens-app-up":"starting","service-up":"up","cold-start":"up","service-down":"down","idle-kill":"idle","service-recycle":"wedged","pod-recycle":"wedged","service-crash-loop":"crash-looping","lens-handoff-complete":"up","gateway-up":"up","gateway-down":"down","lens-child-starting":"starting","lens-child-up":"up","lens-child-exit":"down"},tB=new Set(["service-respawn","service-recycle","pod-recycle","lens-handoff-complete"]),G3=new Set(["build","types","process"]),W3=o(e=>G3.has(e)?e:"unknown","faultOf"),uB=class{static{s(this,"Cn")}static{o(this,"ClusterHealth")}constructor(){this.services=new Map,this.errors=[],this.typechecked=new Set}ingest(e){if(e.category==="typecheck")return this.noteTypecheck(e);if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw??{},r=typeof t.kind=="string"?t.kind:void 0;if(!r)return!1;let n=typeof t.project=="string"?t.project:void 0;if(!n)return!1;if(r==="service-error"){let a=W3(t.fault),l=this.touch(n,e.timestamp);if(l.faults.add(a),l.lastTitle=e.title,a==="types"&&this.typechecked.has(n))return!0;let d=typeof t.line=="string"?t.line:e.message??e.title;return this.errors.push({project:n,timestamp:e.timestamp,line:d,fingerprint:e.fingerprint,fault:a}),this.errors.length>50&&this.errors.splice(0,this.errors.length-50),!0}if(r==="service-fault-closed"){let a=this.services.get(n),l=Array.isArray(t.closed)?t.closed.filter(d=>G3.has(d)).map(W3):[];return!a||l.length===0?!1:(a.lastSeenAt=e.timestamp,a.lastTitle=e.title,this.resolve(a,l),!0)}if(r==="service-recovered"){let a=this.services.get(n);return a?(a.lastSeenAt=e.timestamp,this.resolve(a),a.lastTitle=e.title,!0):!1}if(r==="lens-handoff-start"){let a=this.touch(n,e.timestamp);return t.oldServing!==!0&&(a.state="starting"),a.lastTitle=e.title,!0}if(r==="lens-handoff-failed"){let a=this.touch(n,e.timestamp);return t.oldKept!==!0&&(a.state="down"),a.lastTitle=e.title,!0}let u=eB[r];if(!u)return!1;let i=this.touch(n,e.timestamp);return i.state=u,i.lastTitle=e.title,tB.has(r)&&(i.restarts+=1),u==="up"&&this.resolve(i),!0}resolve(e,t){if(t)for(let n of t)e.faults.delete(n);else e.faults.clear();let r=o(n=>n.project===e.project&&(!t||t.includes(n.fault)),"gone");this.errors.splice(0,this.errors.length,...this.errors.filter(n=>!r(n)))}noteTypecheck(e){let t=e.raw??{};if(t.kind!=="typecheck-run"||t.phase!=="end"||typeof t.project!="string")return!1;let r=t.project,n=t.status==="clean"||t.status==="failing";return n===this.typechecked.has(r)?!1:(n?(this.typechecked.size>=100&&this.typechecked.delete(this.typechecked.values().next().value),this.typechecked.add(r),this.errors.splice(0,this.errors.length,...this.errors.filter(u=>!(u.project===r&&u.fault==="types")))):this.typechecked.delete(r),this.services.get(r)?.faults.has("types")??!1)}snapshot(){let e=[...this.services.values()].sort((r,n)=>r.project.localeCompare(n.project)).map(({faults:r,...n})=>({...n,buildFailed:r.has("build")||r.has("process")||r.has("unknown"),typeErrors:r.has("types")&&!this.typechecked.has(n.project)})),t=o(r=>e.filter(n=>n.state===r).map(n=>n.project),"byState");return{services:e,up:t("up"),down:t("down"),wedged:t("wedged"),crashLooping:t("crash-looping"),idle:t("idle"),buildFailed:e.filter(r=>r.buildFailed).map(r=>r.project),typeErrors:e.filter(r=>r.typeErrors).map(r=>r.project),restarts:e.reduce((r,n)=>r+n.restarts,0),errors:this.errors.slice()}}touch(e,t){let r=this.services.get(e);if(!r){if(this.services.size>=100){let n;for(let u of this.services.values())(!n||u.lastSeenAt<n.lastSeenAt)&&(n=u);n&&this.services.delete(n.project)}r={project:e,state:"starting",restarts:0,faults:new Set,lastTitle:"",lastSeenAt:t},this.services.set(e,r)}return r.lastSeenAt=t,r}},vi="agent://current-status",yi="process://cluster",rB=250,nB=new Set(["build","lint","typecheck","runtime","cluster","memory","visual","performance"]);function K3(e){let t=new uB,r=e.sessionId??"pending",n=new ow({thresholds:e.podRules??g3(),sessionId:r,publish:o(d=>e.bus.publish(d),"publish")}),u,i=o(()=>{u||(u=setTimeout(()=>{u=void 0,e.resources.markDirty(vi)},rB),u.unref?.())},"scheduleStatusRefresh"),a=o(d=>{let c=t.ingest(d);c&&e.resources.markDirty(yi);let p=n.ingest(d);p&&e.resources.markDirty(ke),(c||p||nB.has(d.category))&&i()},"handler"),l=e.bus.subscribe(a);return e.resources.register(yi,()=>({schemaVersion:1,revision:e.resources.revision(yi)??0,updatedAt:new Date().toISOString(),...t.snapshot()})),e.resources.register(ke,()=>n.report(e.resources.revision(ke)??0)),e.resources.register(vi,()=>fi({resources:e.resources,sessionId:r,revision:e.resources.revision(vi)??0})),{unsubscribe:o(()=>{l(),u&&(clearTimeout(u),u=void 0)},"unsubscribe"),uris:[vi,yi,ke]}}s(K3,"jf"),o(K3,"installAgentReducer");import{App as iB}from"@frontmcp/sdk";import{Resource as sB,ResourceContext as aB}from"@frontmcp/sdk";var Xl=class extends aB{static{s(this,"Pf")}static{o(this,"FlowRecentResource")}async execute(){return this.get(O).read("flow://recent")}};Xl=_([sB({name:"flow-recent",uri:"flow://recent",mimeType:"application/json",description:"Last 50 flows seen this session, most recent first."})],Xl);var oB=Xl;import{Resource as lB,ResourceContext as dB}from"@frontmcp/sdk";var Yl=class extends dB{static{s(this,"Nf")}static{o(this,"FlowCurrentResource")}async execute(){return this.get(O).read("flow://current")}};Yl=_([lB({name:"flow-current",uri:"flow://current",mimeType:"application/json",description:"The most recently active flow (origin + event count + headline)."})],Yl);var cB=Yl;import{Resource as pB,ResourceContext as mB}from"@frontmcp/sdk";var Ql=class extends mB{static{s(this,"Cf")}static{o(this,"FlowOriginsRecentResource")}async execute(){return this.get(O).read("flow://origins/recent")}};Ql=_([pB({name:"flow-origins-recent",uri:"flow://origins/recent",mimeType:"application/json",description:"Last 50 flow-origin events (one per detected flow start)."})],Ql);var fB=Ql;import{Tool as hB,ToolContext as gB,z as Ei}from"@frontmcp/sdk";var H3;function ed(e){H3=e}s(ed,"Ds"),o(ed,"setActiveFlowLookups");function Et(){return H3}s(Et,"ze"),o(Et,"activeFlowLookups");var X3;function td(e){X3=e}s(td,"Cs"),o(td,"setFlowRecoverySource");function ud(){return X3}s(ud,"Un"),o(ud,"flowRecoverySource");import{existsSync as vB}from"node:fs";import{open as yB}from"node:fs/promises";import{basename as EB}from"node:path";var bi="flow://recent",Di="flow://current",wi="flow://origins/recent",Ht=50,Y3=50,rd=2e3,bB=4*1024*1024,nd=32*1024*1024,DB=Ht+10;function id(e){let t={flows:new Map,origins:[],recentOrder:[],retainedEvents:0,retainedBytes:0,evictedEvents:0,evictedForBytes:0,evictedFlows:0},r=e.register??!0,n=o((m,f,h,g=!0)=>{let E=Math.min(f,m.events.length);if(E<=0)return;if(g&&E>0&&(m.events[0]?.raw??{}).kind==="flow-origin"&&m.events.length>1){let w=m.eventBytes[1]??0;if(m.events.splice(1,1),m.eventBytes.splice(1,1),m.retainedBytes=Math.max(0,m.retainedBytes-w),t.retainedEvents=Math.max(0,t.retainedEvents-1),t.retainedBytes=Math.max(0,t.retainedBytes-w),t.evictedEvents+=1,h&&(t.evictedForBytes+=1),E-=1,E<=0)return}let B=0;for(let w=0;w<E;w+=1)B+=m.eventBytes[w]??0;m.events.splice(0,E),m.eventBytes.splice(0,E),m.retainedBytes=Math.max(0,m.retainedBytes-B),t.retainedEvents=Math.max(0,t.retainedEvents-E),t.retainedBytes=Math.max(0,t.retainedBytes-B),t.evictedEvents+=E,h&&(t.evictedForBytes+=E)},"evictPrefix"),u=o(m=>{let f=0,h=m.retainedBytes;for(;h>bB&&f<m.eventBytes.length;)h-=m.eventBytes[f]??0,f+=1;n(m,f,!0)},"enforceEntryByteCap"),i=o(()=>{for(let m=t.recentOrder.length-1;t.retainedBytes>nd&&m>=0;m-=1){let f=t.flows.get(t.recentOrder[m]);if(!f)continue;let h=0,g=t.retainedBytes;for(;g>nd&&h<f.eventBytes.length;)g-=f.eventBytes[h]??0,h+=1;n(f,h,!0)}},"enforceGlobalByteCap"),a=o(m=>{let f=m.context.flowId;if(!f)return;let h=(m.raw??{}).kind;if(h==="subscription-added"||h==="subscription-removed"||h==="hook-run"||h==="store-created"||h==="singleton-instance"||h==="visual-frame")return;let g=h==="flow-origin";(t.seenSince===void 0||m.timestamp<t.seenSince)&&(t.seenSince=m.timestamp);let E=t.flows.get(f);if(!E){E={summary:{flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,startedAt:m.timestamp,lastSeenAt:m.timestamp,eventCount:0,headline:m.title},events:[],eventBytes:[],retainedBytes:0,hasOrigin:!1},t.flows.set(f,E);let b={flowId:f,originType:m.context.originType,originNodeId:m.context.originNodeId,at:m.timestamp,label:m.title,eventId:m.id};t.origins.push(b),t.origins.length>Y3&&t.origins.splice(0,t.origins.length-Y3),e.resources.markDirty(wi)}g&&!E.hasOrigin&&(E.hasOrigin=!0,E.summary.headline=m.title,m.context.originType&&(E.summary.originType=m.context.originType),m.context.originNodeId&&(E.summary.originNodeId=m.context.originNodeId)),m.timestamp<E.summary.startedAt&&(E.summary.startedAt=m.timestamp);let B=di(m);E.events.push(m),E.eventBytes.push(B),E.retainedBytes+=B,t.retainedEvents+=1,t.retainedBytes+=B,E.events.length>rd&&n(E,E.events.length-rd,!1),u(E),E.summary.eventCount+=1,E.summary.lastSeenAt=m.timestamp;let w=t.recentOrder.indexOf(f);if(w>=0&&t.recentOrder.splice(w,1),t.recentOrder.unshift(f),t.recentOrder.length>Ht){let b=t.recentOrder.splice(Ht);for(let $ of b){let x=t.flows.get($);x&&(t.evictedFlows+=1,t.evictedThrough=Math.max(t.evictedThrough??0,x.summary.lastSeenAt),n(x,x.events.length,!1,!1)),t.flows.delete($)}}i(),t.currentFlowId!==f&&(t.currentFlowId=f,e.resources.markDirty(Di)),e.resources.markDirty(bi)},"handler"),l=e.bus.subscribe(a);e.resources.register(bi,()=>({schemaVersion:1,revision:e.resources.revision(bi)??0,updatedAt:new Date().toISOString(),flows:t.recentOrder.map(m=>t.flows.get(m)?.summary).filter(m=>!!m)})),e.resources.register(Di,()=>{let m=t.currentFlowId,f=m?t.flows.get(m):void 0;return{schemaVersion:1,revision:e.resources.revision(Di)??0,updatedAt:new Date().toISOString(),flow:f?.summary??null}}),e.resources.register(wi,()=>({schemaVersion:1,revision:e.resources.revision(wi)??0,updatedAt:new Date().toISOString(),origins:t.origins.slice().reverse()}));let d=e.flows??Wt,c=new Map,p={getFlowEvents(m){return t.flows.get(m)?.events.slice().sort((f,h)=>f.timestamp-h.timestamp)},getFlowSummary(m){return t.flows.get(m)?.summary},recentFlowIds(){return t.recentOrder.slice()},findFlowsByOrigin(m){return[...t.flows.values()].filter(f=>f.summary.originNodeId===m).map(f=>f.summary)},flowsConfig:d,analyzeFlow(m){let f=t.flows.get(m);if(!f)return;let h=`${f.summary.eventCount}:${f.events.length}:${f.summary.lastSeenAt}`,g=c.get(m);if(g&&g.key===h)return c.delete(m),c.set(m,g),g.analysis;let E=J1(p.getFlowEvents(m)??[],d);for(c.delete(m),c.set(m,{key:h,analysis:E});c.size>DB;)c.delete(c.keys().next().value);return E},classifiedRecent(m=Ht){let f=[];for(let h of t.recentOrder){if(f.length>=m)break;let g=t.flows.get(h)?.summary,E=p.analyzeFlow(h);!g||!E||f.push({summary:g,category:E.classification.category,decidedBy:E.classification.decidedBy,...E.classification.subject?{subject:E.classification.subject}:{},tags:E.classification.tags,segmentCount:E.segmentation.stats.segments,phaseCount:E.segmentation.stats.phases,signalCount:E.segmentation.stats.signal})}return f},window(){return{since:(t.evictedThrough!==void 0?Math.max(t.evictedThrough,t.seenSince??0):t.seenSince)??null,flows:t.flows.size,maxFlows:Ht,evicted:t.evictedFlows}}};return r&&ed(p),{unsubscribe:o(()=>{r&&ed(void 0),l()},"unsubscribe"),uris:[bi,Di,wi],lookups:p,retentionStats:o(()=>({residentEvents:t.retainedEvents,residentBytes:t.retainedBytes,evictedEvents:t.evictedEvents,evictedForBytes:t.evictedForBytes,eventCap:Ht*rd,byteCap:nd}),"retentionStats")}}s(id,"Ln"),o(id,"installFlowReducer");var sd={maxBytes:320*1024*1024,maxMs:2e3};function Q3(e=process.env){let t=Number(e.LENSMCP_FLOW_RECOVER_BYTES??""),r=Number(e.LENSMCP_FLOW_RECOVER_MS??""),n=o(u=>(e[u]??"").trim()!=="","set");return{maxBytes:n("LENSMCP_FLOW_RECOVER_BYTES")&&Number.isFinite(t)&&t>=0?t:sd.maxBytes,maxMs:n("LENSMCP_FLOW_RECOVER_MS")&&Number.isFinite(r)&&r>0?r:sd.maxMs}}s(Q3,"qf"),o(Q3,"recoveryBudgetFromEnv");var e6=1024*1024,ad=10;function t6(e,t){let r=[e];for(let n=1;n<=t;n++)r.push(`${e}.${n}`);return r.filter(n=>vB(n))}s(t6,"OT"),o(t6,"busFiles");function u6(e,t){try{let r=JSON.parse(e);return!r||typeof r!="object"||!("id"in r)||!("source"in r)?void 0:r.context?.flowId===t?r:void 0}catch{return}}s(u6,"jT"),o(u6,"eventOf");function r6(e,t,r,n){let u=e.indexOf(t);for(;u!==-1;){let i=e.lastIndexOf(ad,u)+1,a=e.indexOf(ad,u),l=u6(e.toString("utf8",i,a),r);l&&n.push(l),u=e.indexOf(t,a+1)}}s(r6,"PT"),o(r6,"collect");async function n6(e,t,r,n,u){let i=[],a={file:EB(e),size:0,read:0,matched:0},l;try{l=await yB(e,"r")}catch{return{searched:a,events:i}}let d=o(c=>(a.matched=i.length,{searched:a,events:i,...c?{stoppedBy:c}:{}}),"done");try{a.size=(await l.stat()).size;let c=Buffer.allocUnsafe(e6),p=Buffer.alloc(0);for(;a.read<a.size;){if(a.read>=n)return d("bytes");if(Date.now()>=u)return d("time");let m=Math.min(e6,a.size-a.read,n-a.read),{bytesRead:f}=await l.read(c,0,m,a.read);if(f<=0)break;a.read+=f;let h=p.length>0?Buffer.concat([p,c.subarray(0,f)]):c.subarray(0,f),g=h.lastIndexOf(ad);g>=0&&r6(h.subarray(0,g+1),t,r,i),p=Buffer.from(h.subarray(g+1))}}finally{await l.close().catch(()=>{})}return d()}s(n6,"MT"),o(n6,"searchFile");async function i6(e,t,r){let n=Date.now(),u=n+r.maxMs,i=Buffer.from(JSON.stringify(t)),a=[],l=[],d=0,c;for(let p of t6(e.eventFile,e.maxGenerations??20)){let m=await n6(p,i,t,r.maxBytes-d,u);if(a.push(m.searched),d+=m.searched.read,l.push(m.events),m.stoppedBy){c=m.stoppedBy;break}let f=l.some(g=>g.length>0),h=m.events.some(g=>g.raw?.kind==="flow-origin");if(f&&(h||m.events.length===0))break}return{events:l.reverse().flat(),files:a,bytesRead:d,elapsedMs:Date.now()-n,...c?{stoppedBy:c}:{}}}s(i6,"NT"),o(i6,"findFlowOnBus");var wB=4,fr=new Map,od=new Map;function s6(e,t){let r=new fm,n=id({bus:r,resources:new ym,...t.flows?{flows:t.flows}:{},register:!1});for(let u of e)r.publish(t.prepare(u));return n.unsubscribe(),n.lookups}s(s6,"CT"),o(s6,"replay");var a6="There is no bus file to search (LENSMCP_EVENT_FILE is not set for this server).",BB="Searching the bus files is turned off (LENSMCP_FLOW_RECOVER_BYTES=0).";function ld(e,t,r,n=a6){let u=`This server holds the ${t.maxFlows} most recently active flows${t.since!==null?` (every flow active since ${new Date(t.since).toISOString()})`:""}, and on start replays only the recent tail of the bus \u2014 this id is not among them.`,i=r?`Its search of the bus files ran out of budget (${r.stoppedBy==="time"?`${r.budgetMs} ms`:`${r.budgetBytes} bytes`}) before finding the flow.`:n;return{found:!1,flowId:e,reason:"outside-window",window:t,...r?{searched:r}:{},hint:`${u} ${i} The flow may still exist further back: re-run it to capture it fresh, raise LENSMCP_FLOW_RECOVER_BYTES / LENSMCP_FLOW_RECOVER_MS, or search .lensmcp/events.jsonl* for the id.`}}s(ld,"$w"),o(ld,"outsideWindow");async function o6(e,t,r,n,u){let i=await i6(r,t,n);if(i.events.length>0){let a=s6(i.events,r);if(!a.getFlowSummary(t))return{found:!1,flowId:t};let l={lookups:a,recovered:{from:"bus",files:i.files.filter(d=>d.matched>0).map(d=>d.file),events:i.events.length,complete:i.stoppedBy===void 0}};for(fr.set(u,l);fr.size>wB;)fr.delete(fr.keys().next().value);return l}if(i.stoppedBy){let a={files:i.files,bytes:i.bytesRead,budgetBytes:n.maxBytes,budgetMs:n.maxMs,stoppedBy:i.stoppedBy};return ld(t,e.window(),a)}return{found:!1,flowId:t}}s(o6,"LT"),o(o6,"search");async function dd(e,t,r){if(e.getFlowSummary(t))return{lookups:e};let n=r?.budget??sd;if(!r||n.maxBytes<=0){let l=e.window();return l.evicted>0?ld(t,l,void 0,r?BB:a6):{found:!1,flowId:t}}let u=`${r.eventFile}\0${t}`,i=fr.get(u);if(i)return i;let a=od.get(u);return a||(a=o6(e,t,r,n,u).finally(()=>od.delete(u)),od.set(u,a)),a}s(dd,"Gf"),o(dd,"locateFlow");var xB=120;function cd(e,t,r){return{id:e.id,kind:e.kind,label:e.label,category:t,phase:e.phase,startOffsetMs:Math.max(0,e.start-r),durationMs:e.durationMs,events:e.counts.total,signal:e.counts.signal,errors:e.counts.errors,worstSeverity:e.worstSeverity,projects:e.projects,...e.route?{route:e.route}:{},...e.method?{method:e.method}:{},...e.part?{part:e.part}:{},...e.hot?{hot:e.hot}:{},...e.after?{after:e.after}:{},...e.sql?{sql:e.sql}:{}}}s(cd,"Jf"),o(cd,"segmentView");function pd(e,t={}){let{segmentation:r,classification:n,segmentCategories:u}=e,i=Math.max(1,t.maxSegments??xB),a=r.segments.reduce((c,p)=>Math.min(c,p.start),1/0),l=Number.isFinite(a)?a:0,d=r.segments;if(d.length>i){let c=o(m=>m.counts.errors*1e6+m.counts.signal,"rank"),p=new Set([...d].sort((m,f)=>c(f)-c(m)||(m.id<f.id?-1:1)).slice(0,i).map(m=>m.id));d=d.filter(m=>p.has(m.id))}return{flowId:r.flowId,category:n.category,decidedBy:n.decidedBy,...n.subject?{subject:n.subject}:{},tags:n.tags,origin:n.origin,stats:{events:r.stats.events,signal:r.stats.signal,bookkeeping:r.stats.bookkeeping,segments:r.stats.segments,phases:r.stats.phases},phases:r.phases.map(c=>({index:c.index,startOffsetMs:Math.max(0,c.start-l),endOffsetMs:Math.max(0,c.end-l),segmentIds:c.segmentIds})),segments:d.map(c=>cd(c,u[c.id]??"other",l)),segmentsTruncated:d.length<r.segments.length,...r.sql?{sql:r.sql}:{}}}s(pd,"Wf"),o(pd,"overviewOf");function l6(e,t,r){let n=t.segmentation.segments.find(i=>i.id===r);if(!n)return;let u=new Set(n.eventIds);return e.filter(i=>u.has(i.id))}s(l6,"kw"),o(l6,"eventsOfSegment");function d6(e,t){return e.filter(r=>(t.category===void 0||r.category===t.category)&&(t.tag===void 0||r.tags.includes(t.tag))&&(t.subject===void 0||r.subject===t.subject))}s(d6,"Sw"),o(d6,"filterClassified");function c6(e){let t=e.map(r=>({category:r.category,...r.subject?{subject:r.subject}:{},id:r.summary.flowId}));return P1(t).map(r=>({category:r.category,count:r.count,subjects:r.subjects.map(n=>({...n.subject!==void 0?{subject:n.subject}:{},count:n.count,flowIds:n.items.map(u=>u.id)}))}))}s(c6,"Iw"),o(c6,"groupClassified");function p6(e){let t={};for(let r of e)t[r.category]=(t[r.category]??0)+1;return t}s(p6,"Rw"),o(p6,"categoryCounts");async function m6(e,t,r){if(!e)return fd(e,t);let n=await dd(e,t.flowId,r);if(!("lookups"in n))return n;let u=fd(n.lookups,t);return n.recovered?{...u,recovered:n.recovered}:u}s(m6,"zw"),o(m6,"readFlowDetail");function md(e,t){let r=new Map(t.map(n=>[n.id,n.raw]));return e.map(n=>"ai"in n||!r.has(n.id)?n:{...n,raw:r.get(n.id)})}s(md,"Ew"),o(md,"withRaw");function fd(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.getFlowSummary(t.flowId),n=e.getFlowEvents(t.flowId);if(!r||!n)return{found:!1,flowId:t.flowId};let u=e.analyzeFlow(t.flowId);if(t.segmentId){let a=u?l6(n,u,t.segmentId):void 0,l=u?.segmentation.segments.find(p=>p.id===t.segmentId);if(!u||!a||!l)return{found:!1,flowId:t.flowId,segmentId:t.segmentId,reason:"unknown segment id for this flow (the flow may have changed \u2014 re-read overview.segments)",segmentIds:u?.segmentation.segments.map(p=>p.id)??[]};let d=u.segmentation.segments.reduce((p,m)=>Math.min(p,m.start),1/0),{events:c}=Bl(a,{includeRaw:t.includeRaw});return{found:!0,summary:r,segment:cd(l,u.segmentCategories[l.id]??"other",Number.isFinite(d)?d:l.start),truncated:c.length>t.limit,events:t.includeRaw?md(c.slice(0,t.limit),a):c.slice(0,t.limit)}}let{events:i}=Bl(n,{includeRaw:t.includeRaw});if(t.expand){let a=i.find(c=>c.id===t.expand);if(!a)return{found:!1,flowId:t.flowId,expand:t.expand};let l=new Set(a.memberIds??[a.id]),d=n.filter(c=>l.has(c.id));return{found:!0,flowId:t.flowId,expanded:{id:a.id,title:a.title,count:d.length},events:d.map(c=>({id:c.id,timestamp:c.timestamp,source:c.source,category:c.category,severity:c.severity,title:c.title,message:c.message,...t.includeRaw?{raw:c.raw}:{}}))}}return{found:!0,summary:r,...u?{overview:pd(u)}:{},truncated:i.length>t.limit,events:t.includeRaw?md(i.slice(0,t.limit),n):i.slice(0,t.limit)}}s(fd,"Tw"),o(fd,"getFlowDetail");async function f6(e,t,r){if(e){let u=e.classifiedRecent(),i=d6(u,{...t.category?{category:t.category}:{},...t.tag?{tag:t.tag}:{}}),a=i.slice(0,t.limit);return{flows:a.map(l=>({...l.summary,category:l.category,decidedBy:l.decidedBy,...l.subject?{subject:l.subject}:{},tags:l.tags,segmentCount:l.segmentCount,phaseCount:l.phaseCount,signalCount:l.signalCount})),totalKnown:u.length,matching:i.length,categories:p6(u),...t.groupBy==="category"?{groups:c6(a)}:{}}}let n=await r();return{flows:n.flows.slice(0,t.limit),totalKnown:n.flows.length}}s(f6,"Ow"),o(f6,"listRecentFlows");async function h6(e,t,r){if(!e)return hd(e,t);let n=await dd(e,t.flowId,r);if(!("lookups"in n))return n;let u=hd(n.lookups,t);return n.recovered?{...u,recovered:n.recovered}:u}s(h6,"jw"),o(h6,"readFlowSegments");function hd(e,t){if(!e)return{found:!1,reason:"no active flow reducer"};let r=e.analyzeFlow(t.flowId);return r?{found:!0,...pd(r,{maxSegments:t.maxSegments})}:{found:!1,flowId:t.flowId}}s(hd,"Aw"),o(hd,"getFlowSegments");var gd=class extends gB{static{s(this,"Kf")}static{o(this,"FlowListRecentTool")}async execute(e){return f6(Et(),e,async()=>await this.get(O).read("flow://recent"))}};gd=_([hB({name:"flow.list_recent",description:'Lists the last N flows with their origin + event count + headline, and what each one IS: `category` (page-load, user-action, api, ai, test, or one you defined in nx.json#lensmcp.flows), `subject` (the templated page, component or route), `tags` (fan-out, has-error, slow, storm\u2026), `segmentCount`/`phaseCount`. Filter with `category` / `tag`; pass `groupBy: "category"` to also get the flows grouped category \u2192 subject; `categories` always counts every known flow per category. Same data as flow://recent but with a tunable limit.',inputSchema:{limit:Ei.number().int().positive().max(50).default(10).describe("How many flows to return (default 10, max 50)."),category:Ei.string().optional().describe('Only flows in this category, e.g. "page-load" or "checkout".'),tag:Ei.string().optional().describe('Only flows carrying this tag, e.g. "has-error" or "fan-out".'),groupBy:Ei.enum(["none","category"]).default("none").describe('"category" adds `groups`: the returned flows grouped category \u2192 subject.')}})],gd);var $B=gd;import{Tool as CB,ToolContext as kB,z as hr}from"@frontmcp/sdk";var vd=class extends kB{static{s(this,"Hf")}static{o(this,"FlowGetTool")}async execute(e){return m6(Et(),e,ud())}};vd=_([CB({name:"flow.get",description:'Returns one flow as the ordered, parented mechanism tree the dashboard renders: each node has `parent`, `area`, `start`, `durationMs`, and repeated work is collapsed (`count`, `memberIds`). Pass `expand: "<node id>"` to list the individual events a collapsed node stands for, or `includeRaw: true` to add each event\'s full `raw` payload (an AI turn\'s is its `ai` field; a collapsed node carries its first member\'s \u2014 `expand` lists every member\'s). The response also carries `overview`: the flow cut into segments (one backend request each, UI bursts, the origin) grouped into phases, with its category, subject and tags \u2014 for a big flow read that first, then pass `segmentId: "<segment id>"` to get just that unit as a mechanism tree. Before summing SQL counts or time, read `overview.sql`: db-query events are flood-guarded per query shape, so only `status: "complete"` means they are every statement; `gaps` names the requests that fall short and by how much. Each request\'s verdict carries `basis`: `end` (accounted when the request ended) or `settled` (a quiet-period snapshot that later SQL in the same context could still change); `overview.sql.settled` counts the verdicts resting on one. A flow this server no longer holds in memory (it keeps the 50 most recently active, and replays only the recent tail of the bus on start) is read back from the bus files on demand: the same answer, plus `recovered` (`files`, `events`, and `complete: false` when older events may be missing). `found: false` alone means no event of this id is retained anywhere the server can read; `reason: "outside-window"` means it may exist further back than the server can see (`window`, `searched`, `hint`) \u2014 re-run the flow rather than concluding it never happened.',inputSchema:{flowId:hr.string().describe("Flow id from flow://recent."),includeRaw:hr.boolean().default(!1),limit:hr.number().int().positive().max(500).default(200),expand:hr.string().optional().describe("A node id from a previous call: returns the individual events it collapsed."),segmentId:hr.string().optional().describe("A segment id from `overview.segments` (or flow.segments): returns only that unit of the flow, shaped like the whole.")}})],vd);var AB=vd;import{Tool as _B,ToolContext as IB,z as SB}from"@frontmcp/sdk";var yd=class extends IB{static{s(this,"Qf")}static{o(this,"FlowFindByOriginTool")}async execute(e){let t=Et();if(!t)return{found:!1,reason:"no active flow reducer"};let r=t.findFlowsByOrigin(e.originNodeId);return{found:r.length>0,count:r.length,flows:r}}};yd=_([_B({name:"flow.find_by_origin",description:"Returns all flows whose origin node id matches `originNodeId` (e.g. a data-agent-component target).",inputSchema:{originNodeId:SB.string().describe("Origin node id \u2014 usually the value of data-agent-component on the originating element.")}})],yd);var FB=yd;import{Tool as zB,ToolContext as jB,z as OB}from"@frontmcp/sdk";import*as RB from"node:fs";import{dirname as TB,join as g6}from"node:path";var NB="ai",MB=/^ai_[0-9a-z]{8,40}$/,Ed=o(e=>typeof e=="string"&&MB.test(e),"isAiCallId");function v6(e){return g6(TB(e),NB)}s(v6,"YT"),o(v6,"aiContentDir");function y6(e,t){if(!Ed(t))throw new Error("invalid ai call id");return g6(v6(e),`${t}.json`)}s(y6,"QT"),o(y6,"aiContentFile");function E6(e,t){if(Ed(t))try{let r=JSON.parse(RB.readFileSync(y6(e,t),"utf8"));return r&&r.schemaVersion===1&&r.id===t?r:void 0}catch{return}}s(E6,"Nw"),o(E6,"readAiContent");var bd=class extends jB{static{s(this,"th")}static{o(this,"AiGetCallTool")}async execute(e){if(!Ed(e.callId))return{found:!1,reason:"invalid call id"};let t=E6(process.env.LENSMCP_EVENT_FILE??`${process.cwd()}/.lensmcp/events.jsonl`,e.callId);return t?{found:!0,call:t}:{found:!1,callId:e.callId,reason:"no captured content for this call \u2014 it was not captured (LENSMCP_AI_CAPTURE=content), or it has been rotated away"}}};bd=_([zB({name:"ai.get_call",description:"Returns the prompt and completion of ONE AI call (OpenAI, Anthropic, \u2026) captured by the node tap: system prompt, messages, tools offered, completion, tool calls, usage. `callId` is the `ai.contentRef` of a flow node whose kind is `ai-call` (see flow.get). Only exists when the service ran with LENSMCP_AI_CAPTURE=content; the text was redacted and size-capped when it was captured, and `truncated: true` says if anything was cut.",inputSchema:{callId:OB.string().describe('The contentRef of an ai-call flow node, e.g. "ai_0abc12345xyz78".')}})],bd);var PB=bd;import{Tool as UB,ToolContext as ZB,z as b6}from"@frontmcp/sdk";var Dd=class extends ZB{static{s(this,"rh")}static{o(this,"FlowSegmentsTool")}async execute(e){return h6(Et(),e,ud())}};Dd=_([UB({name:"flow.segments",description:'Returns one flow cut into segments and phases \u2014 the right first read for a flow with hundreds or thousands of events. Each segment is a backend request (its browser fetch, every service hop, db/redis/ai work and any queue worker it enqueued), a UI burst (state updates and renders, named by what churned), the origin that started the flow, or background noise; with times relative to the flow start, event/error counts, and a category. Also returns the flow\'s category, subject and tags. Open one unit with flow.get { flowId, segmentId }. A flow no longer in memory is read back from the bus as in flow.get (`recovered`); `reason: "outside-window"` means it may exist further back than the server can see.',inputSchema:{flowId:b6.string().describe("Flow id from flow://recent or flow.list_recent."),maxSegments:b6.number().int().positive().max(500).default(120).describe("Cap on segments listed (failing and heaviest are kept first when it truncates).")}})],Dd);var LB=Dd,wd=class{static{s(this,"Zn")}static{o(this,"FlowApp")}};wd=_([iB({id:"flow",name:"Flow",description:"Causal-chain index: every event carries a flowId; the app surfaces recent flows + origin events. story.compile turns one of these into a phase summary.",resources:[oB,cB,fB],tools:[$B,AB,LB,FB,PB]})],wd);import{App as qB}from"@frontmcp/sdk";import{Resource as VB,ResourceContext as JB}from"@frontmcp/sdk";var Bd=class extends JB{static{s(this,"nh")}static{o(this,"StoryRecentResource")}async execute(){return this.get(O).read("story://recent")}};Bd=_([VB({name:"story-recent",uri:"story://recent",mimeType:"application/json",description:"Last 50 compiled stories (one per flow), most recent first."})],Bd);var GB=Bd;import{Resource as WB,ResourceContext as KB}from"@frontmcp/sdk";var xd=class extends KB{static{s(this,"ih")}static{o(this,"StoryLastResource")}async execute(){return this.get(O).read("story://last")}};xd=_([WB({name:"story-last",uri:"story://last",mimeType:"application/json",description:"The most recently compiled story (full phase list)."})],xd);var HB=xd;import{Tool as XB,ToolContext as YB,z as QB}from"@frontmcp/sdk";var Bi="story://recent",xi="story://last",Ce={byFlowId:new Map,order:[]},D6=!1;function w6(e){return D6||(e.resources.register(Bi,()=>({schemaVersion:1,revision:e.resources.revision(Bi)??0,updatedAt:new Date().toISOString(),stories:Ce.order.map(t=>Ce.byFlowId.get(t)).filter(t=>!!t).map(t=>({flowId:t.flowId,origin:t.origin,phaseCount:t.phases.length,startedAt:t.startedAt,endedAt:t.endedAt,eventCount:t.eventCount,finalState:t.finalState}))})),e.resources.register(xi,()=>{let t=Ce.order[0],r=t?Ce.byFlowId.get(t):void 0;return{schemaVersion:1,revision:e.resources.revision(xi)??0,updatedAt:new Date().toISOString(),story:r??null}}),D6=!0),B6(e.resources),{uris:[Bi,xi]}}s(w6,"ch"),o(w6,"installStoryReducer");var $d;function B6(e){$d=o(t=>{e.markDirty(t)},"markDirty")}s(B6,"lA"),o(B6,"setMarkDirty");function Cd(e){Ce.byFlowId.set(e.flowId,e);let t=Ce.order.indexOf(e.flowId);if(t>=0&&Ce.order.splice(t,1),Ce.order.unshift(e.flowId),Ce.order.length>50){let r=Ce.order.splice(50);for(let n of r)Ce.byFlowId.delete(n)}$d?.(Bi),$d?.(xi)}s(Cd,"Vn"),o(Cd,"recordCompiledStory");function x6(e){return Ce.byFlowId.get(e)}s(x6,"uh"),o(x6,"getCompiledStory");var kd=class extends YB{static{s(this,"lh")}static{o(this,"StoryCompileTool")}async execute(e){let t=Et();if(!t)return{compiled:!1,reason:"no active flow reducer"};let r=t.getFlowEvents(e.flowId);if(!r)return{compiled:!1,flowId:e.flowId};let n=ps(r,{flowId:e.flowId});return n?(Cd(n),{compiled:!0,story:n}):{compiled:!1,flowId:e.flowId}}};kd=_([XB({name:"story.compile",description:"Compile a flow into a `FlowStory` (origin, phases, finalState). Caches the result; subsequent story.get(flowId) calls return it directly.",inputSchema:{flowId:QB.string().describe("Flow id (from flow://recent).")}})],kd);var e2=kd;import{Tool as t2,ToolContext as u2,z as r2}from"@frontmcp/sdk";var Ad=class extends u2{static{s(this,"ph")}static{o(this,"StoryGetTool")}async execute(e){let t=x6(e.flowId);return t?{found:!0,story:t}:{found:!1,flowId:e.flowId}}};Ad=_([t2({name:"story.get",description:"Returns a previously compiled story. If the story has not been compiled yet, returns `found: false`; call story.compile first.",inputSchema:{flowId:r2.string().describe("Flow id.")}})],Ad);var n2=Ad,_d=class{static{s(this,"qn")}static{o(this,"StoryApp")}};_d=_([qB({id:"story",name:"Story",description:"Compiles flows into phase summaries (user-action / loading-ui / backend-request / state-update / final-render).",resources:[GB,HB],tools:[e2,n2]})],_d);import{App as i2}from"@frontmcp/sdk";import{Resource as s2,ResourceContext as a2}from"@frontmcp/sdk";var Id=class extends a2{static{s(this,"fh")}static{o(this,"BuildCurrentResource")}async execute(){return this.get(O).read("build://current")}};Id=_([s2({name:"build-current",uri:"build://current",mimeType:"application/json",description:"Current build status (clean / warning / failing), open failures and warnings."})],Id);var o2=Id;import{Resource as l2,ResourceContext as d2}from"@frontmcp/sdk";var Sd=class extends d2{static{s(this,"gh")}static{o(this,"BuildFailuresResource")}async execute(){return this.get(O).read("build://failures")}};Sd=_([l2({name:"build-failures",uri:"build://failures",mimeType:"application/json",description:"Currently-open build failures (deduped by fingerprint)."})],Sd);var c2=Sd;import{Resource as p2,ResourceContext as m2}from"@frontmcp/sdk";var Fd=class extends m2{static{s(this,"yh")}static{o(this,"BuildRecentResource")}async execute(){return this.get(O).read("build://events/recent")}};Fd=_([p2({name:"build-events-recent",uri:"build://events/recent",mimeType:"application/json",description:"Last 50 build/lint/typecheck/HMR events in chronological order."})],Fd);var f2=Fd,zd=class{static{s(this,"Gn")}static{o(this,"BuildApp")}};zd=_([i2({id:"build",name:"Build",description:"Vite / TS / lint / HMR state.",resources:[o2,c2,f2]})],zd);var $i="build://current",Ci="build://failures",ki="build://events/recent",h2=new Set(["vite","rollup","typescript","eslint"]),$6=new Set(["build","typecheck","lint"]),C6=50,g2="Install the LensMCP Vite plugin (@lensmcp/vite-plugin) in the dev server, or run under the dev cluster, so build events reach this session.";function k6(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(k6,"RA"),o(k6,"readRaw");function A6(e,t){return e==="typecheck"?"tsc":e==="lint"?"eslint":t}s(A6,"EA"),o(A6,"defaultTool");function _6(e){let t={status:"unknown",recent:[],failures:new Map,warnings:new Map,hmrUpdates:0,producers:new Map,sawVerdict:!1},r=o((f,h)=>{let g=t.producers.get(f);t.producers.set(f,{id:f,tool:h.tool,...h.project?{project:h.project}:{},firstReportedAt:g?.firstReportedAt??h.at,lastReportedAt:Math.max(g?.lastReportedAt??0,h.at),lastRunStatus:h.runStatus,errorCount:h.errorCount??g?.errorCount??0,...h.warningCount!==void 0?{warningCount:h.warningCount}:g?.warningCount!==void 0?{warningCount:g.warningCount}:{},...h.durationMs!==void 0?{lastRunDurationMs:h.durationMs}:g?.lastRunDurationMs!==void 0?{lastRunDurationMs:g.lastRunDurationMs}:{},...h.error?{error:h.error}:{}}),ft(t.producers,ar)},"touchProducer"),n=o(f=>{for(let[h,g]of t.failures)f(g)&&t.failures.delete(h);for(let[h,g]of t.warnings)f(g)&&t.warnings.delete(h)},"drop"),u=o((f,h)=>{n(g=>g.domain===f&&(h===void 0||g.project===h))},"clearScope"),i=o((f,h)=>{if(h.length===0)return;let g=new Set(h);n(E=>E.domain===f&&E.file!==void 0&&g.has(E.file))},"clearFiles"),a=o(()=>{if(t.failures.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let f=[...t.producers.values()].some(h=>h.lastRunStatus==="error");t.status=f||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),l=o(()=>{e.resources.markDirty($i),e.resources.markDirty(Ci),e.resources.markDirty(ki)},"markDirty"),d=o(f=>{if([...t.failures.values()].some(h=>h.project===f)||[...t.warnings.values()].some(h=>h.project===f)||[...t.producers.values()].some(h=>h.project===f)){for(let h of $6)u(h,f);for(let[h,g]of t.producers)g.project===f&&t.producers.delete(h);t.sawVerdict=[...t.producers.values()].some(h=>h.lastRunStatus!=="error"),a(),l()}},"supersedeProject"),c=o(f=>{if(f.source==="gateway"&&f.category==="cluster"){let x=f.raw??null,F=x?.kind;(F==="service-starting"||F==="service-respawn")&&x?.project&&d(x.project);return}if(!h2.has(f.source)||!$6.has(f.category))return;let h=f.category,g=k6(f),E=g.project,B=g.tool??A6(h,f.source),w=`${B}:${E??"*"}`,b=typeof g.kind=="string"&&g.kind.endsWith("-run"),$={id:f.id,timestamp:f.timestamp,severity:f.severity,title:f.title,...f.message!==void 0?{message:f.message}:{},...f.location?.file?{file:f.location.file}:g.file?{file:g.file}:{},domain:h,...E?{project:E}:{},fingerprint:f.fingerprint};if(f.severity==="info"&&(b&&g.phase==="start"||f.title.startsWith("tsc clear")||f.title.startsWith("ESLint clear"))){u(h,E),t.lastRunAt=f.timestamp,gr(t,$),r(w,{tool:B,...E?{project:E}:{},at:f.timestamp,runStatus:"running"}),b||(t.sawVerdict=!0),a(),l();return}if(b&&g.phase==="end"){let x=g.status==="error"?"error":g.status==="failing"?"failing":"clean";x==="clean"&&u(h,E),x!=="error"&&(t.sawVerdict=!0),t.lastRunAt=f.timestamp,gr(t,$),r(w,{tool:B,...E?{project:E}:{},at:f.timestamp,runStatus:x,...g.durationMs!==void 0?{durationMs:g.durationMs}:{},...g.errorCount!==void 0?{errorCount:g.errorCount}:{},...g.warningCount!==void 0?{warningCount:g.warningCount}:{},...g.error?{error:g.error}:{}}),a(),l();return}if(g.kind==="hmr"||f.title.startsWith("HMR ")){t.hmrUpdates+=1;let x=[...$.file?[$.file]:[],...f.relatedFiles??[]];i("build",x),t.lastRunAt=f.timestamp,t.sawVerdict=!0,gr(t,$),r(w,{tool:B,...E?{project:E}:{},at:f.timestamp,runStatus:"clean"}),a(),l();return}gr(t,$),f.severity==="error"||f.severity==="fatal"?(t.failures.set($.fingerprint,$),t.warnings.delete($.fingerprint)):f.severity==="warning"?t.failures.has($.fingerprint)||t.warnings.set($.fingerprint,$):(t.failures.delete($.fingerprint),t.warnings.delete($.fingerprint)),t.lastRunAt=f.timestamp,t.sawVerdict=!0,r(w,{tool:B,...E?{project:E}:{},at:f.timestamp,runStatus:t.failures.size>0?"failing":"clean"}),a(),l()},"handler"),p=e.bus.subscribe(c),m=o(()=>ri({producers:[...t.producers.values()],domain:"build",noProducerHint:g2}),"health");return e.resources.register($i,()=>({schemaVersion:1,revision:e.resources.revision($i)??0,updatedAt:new Date().toISOString(),status:t.status,failures:[...t.failures.values()],warnings:[...t.warnings.values()],hmrUpdates:t.hmrUpdates,lastRunAt:t.lastRunAt,...m()})),e.resources.register(Ci,()=>({schemaVersion:1,revision:e.resources.revision(Ci)??0,updatedAt:new Date().toISOString(),failures:[...t.failures.values()],...m()})),e.resources.register(ki,()=>({schemaVersion:1,revision:e.resources.revision(ki)??0,updatedAt:new Date().toISOString(),events:t.recent.slice()})),{unsubscribe:p,uris:[$i,Ci,ki]}}s(_6,"xh"),o(_6,"installBuildReducer");function gr(e,t){e.recent.push(t),e.recent.length>C6&&e.recent.splice(0,e.recent.length-C6)}s(gr,"Ks"),o(gr,"pushRecent");import{App as v2}from"@frontmcp/sdk";import{Resource as y2,ResourceContext as E2}from"@frontmcp/sdk";var jd=class extends E2{static{s(this,"_h")}static{o(this,"LintCurrentResource")}async execute(){return this.get(O).read("lint://current")}};jd=_([y2({name:"lint-current",uri:"lint://current",mimeType:"application/json",description:"Current lint status (clean / warning / failing) + counts."})],jd);var b2=jd;import{Resource as D2,ResourceContext as w2}from"@frontmcp/sdk";var Od=class extends w2{static{s(this,"$h")}static{o(this,"LintErrorsResource")}async execute(){return this.get(O).read("lint://errors")}};Od=_([D2({name:"lint-errors",uri:"lint://errors",mimeType:"application/json",description:"Currently-open ESLint errors (deduped by fingerprint)."})],Od);var B2=Od;import{Resource as x2,ResourceContext as $2}from"@frontmcp/sdk";var Rd=class extends $2{static{s(this,"Sh")}static{o(this,"LintWarningsResource")}async execute(){return this.get(O).read("lint://warnings")}};Rd=_([x2({name:"lint-warnings",uri:"lint://warnings",mimeType:"application/json",description:"Currently-open ESLint warnings."})],Rd);var C2=Rd,Td=class{static{s(this,"Jn")}static{o(this,"LintApp")}};Td=_([v2({id:"lint",name:"Lint",description:"ESLint state.",resources:[b2,B2,C2]})],Td);var Ai="lint://current",_i="lint://errors",Ii="lint://warnings",k2="Nothing runs ESLint in the dev loop, so this is expected. Run `lensmcp lint [paths\u2026]` to publish a run; until then treat lint as UNCHECKED, not passing.";function I6(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(I6,"DA"),o(I6,"readRaw");function S6(e){let t={status:"unknown",errors:new Map,warnings:new Map,producers:new Map,sawVerdict:!1},r=o((p,m)=>{let f=t.producers.get(p);t.producers.set(p,{id:p,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:f?.firstReportedAt??m.at,lastReportedAt:Math.max(f?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??f?.errorCount??0,...m.warningCount!==void 0?{warningCount:m.warningCount}:f?.warningCount!==void 0?{warningCount:f.warningCount}:{},...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:f?.lastRunDurationMs!==void 0?{lastRunDurationMs:f.lastRunDurationMs}:{},...m.error?{error:m.error}:{}}),ft(t.producers,ar)},"touchProducer"),n=o((p,m)=>{let f=o((h,g)=>{for(let[E,B]of h)g(B)&&h.delete(E)},"drop");if(p){f(t.errors,h=>h.project===p),f(t.warnings,h=>h.project===p);return}if(m){f(t.errors,h=>h.file===m),f(t.warnings,h=>h.file===m);return}t.errors.clear(),t.warnings.clear()},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}if(t.warnings.size>0){t.status="warning";return}let p=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),i=o(()=>{e.resources.markDirty(Ai),e.resources.markDirty(_i),e.resources.markDirty(Ii)},"markDirty"),a=o(p=>{if([...t.errors.values()].some(m=>m.project===p)||[...t.warnings.values()].some(m=>m.project===p)||[...t.producers.values()].some(m=>m.project===p)){n(p,void 0);for(let[m,f]of t.producers)f.project===p&&t.producers.delete(m);t.sawVerdict=[...t.producers.values()].some(m=>m.lastRunStatus!=="error"),u(),i()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let b=p.raw??null,$=b?.kind;($==="service-starting"||$==="service-respawn")&&b?.project&&a(b.project);return}if(p.source!=="eslint"||p.category!=="lint")return;let m=I6(p),f=m.project,h=m.tool??"eslint",g=`${h}:${f??"*"}`,E=m.kind==="lint-run";if(p.severity==="info"&&(E&&m.phase==="start"||p.title.startsWith("ESLint clear"))){n(f,p.location?.file),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),i();return}if(E&&m.phase==="end"){let b=m.status==="error"?"error":m.status==="failing"?"failing":"clean";b!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:b,...m.durationMs!==void 0?{durationMs:m.durationMs}:{},...m.errorCount!==void 0?{errorCount:m.errorCount}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}}),u(),i();return}let B=p.title.match(/^\[([^\]]+)\]/),w={id:p.id,timestamp:p.timestamp,severity:p.severity,...m.rule?{rule:m.rule}:B?.[1]?{rule:B[1]}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...f?{project:f}:{},fingerprint:p.fingerprint};if(p.severity==="error"||p.severity==="fatal")t.errors.set(w.fingerprint,w),t.warnings.delete(w.fingerprint);else if(p.severity==="warning")t.errors.has(w.fingerprint)||t.warnings.set(w.fingerprint,w);else return;t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:t.errors.size>0?"failing":"clean"}),u(),i()},"handler"),d=e.bus.subscribe(l),c=o(()=>ri({producers:[...t.producers.values()],domain:"lint",noProducerHint:k2}),"health");return e.resources.register(Ai,()=>({schemaVersion:1,revision:e.resources.revision(Ai)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,warningCount:t.warnings.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(_i,()=>({schemaVersion:1,revision:e.resources.revision(_i)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),e.resources.register(Ii,()=>({schemaVersion:1,revision:e.resources.revision(Ii)??0,updatedAt:new Date().toISOString(),warnings:[...t.warnings.values()],...c()})),{unsubscribe:d,uris:[Ai,_i,Ii]}}s(S6,"Rh"),o(S6,"installLintReducer");import{App as A2}from"@frontmcp/sdk";import{Resource as _2,ResourceContext as I2}from"@frontmcp/sdk";var Nd=class extends I2{static{s(this,"Eh")}static{o(this,"TypecheckCurrentResource")}async execute(){return this.get(O).read("typecheck://current")}};Nd=_([_2({name:"typecheck-current",uri:"typecheck://current",mimeType:"application/json",description:"Current TypeScript typecheck status + error count."})],Nd);var S2=Nd;import{Resource as F2,ResourceContext as z2}from"@frontmcp/sdk";var Md=class extends z2{static{s(this,"Ah")}static{o(this,"TypecheckErrorsResource")}async execute(){return this.get(O).read("typecheck://errors")}};Md=_([F2({name:"typecheck-errors",uri:"typecheck://errors",mimeType:"application/json",description:"Current TypeScript errors (deduped by fingerprint)."})],Md);var j2=Md,Pd=class{static{s(this,"Wn")}static{o(this,"TypecheckApp")}};Pd=_([A2({id:"typecheck",name:"Typecheck",description:"TypeScript diagnostics from `tsc --watch`.",resources:[S2,j2]})],Pd);var Si="typecheck://current",Fi="typecheck://errors",O2="Wire one: the dev cluster publishes from `TsgoCheckPlugin` when `LENSMCP_TYPECHECK=tsgo` (@lensmcp/cluster), or call `startTscCollector()` from @lensmcp/session for a `tsc --watch` workspace.";function F6(e){let t=e.raw;return t&&typeof t=="object"?t:{}}s(F6,"VA"),o(F6,"readRaw");function z6(e){let t={status:"unknown",errors:new Map,producers:new Map,sawVerdict:!1},r=o((p,m)=>{let f=t.producers.get(p),h={id:p,tool:m.tool,...m.project?{project:m.project}:{},firstReportedAt:f?.firstReportedAt??m.at,lastReportedAt:Math.max(f?.lastReportedAt??0,m.at),lastRunStatus:m.runStatus,errorCount:m.errorCount??f?.errorCount??0,...m.durationMs!==void 0?{lastRunDurationMs:m.durationMs}:f?.lastRunDurationMs!==void 0?{lastRunDurationMs:f.lastRunDurationMs}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}};t.producers.set(p,h),ft(t.producers,ar)},"touchProducer"),n=o(p=>{if(!p){t.errors.clear();return}for(let[m,f]of t.errors)f.project===p&&t.errors.delete(m)},"clearScope"),u=o(()=>{if(t.errors.size>0){t.status="failing";return}let p=[...t.producers.values()].some(m=>m.lastRunStatus==="error");t.status=p||!t.sawVerdict?"unknown":"clean"},"recomputeStatus"),i=o(()=>{e.resources.markDirty(Si),e.resources.markDirty(Fi)},"markDirty"),a=o(p=>{let m=[...t.errors.values()].some(h=>h.project===p),f=[...t.producers.values()].some(h=>h.project===p);if(!(!m&&!f)){n(p);for(let[h,g]of t.producers)g.project===p&&t.producers.delete(h);t.sawVerdict=[...t.producers.values()].some(h=>h.lastRunStatus!=="error"),u(),i()}},"supersedeProject"),l=o(p=>{if(p.source==="gateway"&&p.category==="cluster"){let b=p.raw??null,$=b?.kind;($==="service-starting"||$==="service-respawn")&&b?.project&&a(b.project);return}if(p.source!=="typescript"||p.category!=="typecheck")return;let m=F6(p),f=m.project,h=m.tool??"tsc",g=`${h}:${f??"*"}`,E=m.kind==="typecheck-run";if(p.severity==="info"&&(E&&m.phase==="start"||p.title.startsWith("tsc clear"))){n(f),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"running"}),E||(t.sawVerdict=!0),u(),i();return}if(E&&m.phase==="end"){let b=m.status==="error"?"error":m.status==="failing"?"failing":"clean";b!=="error"&&(t.sawVerdict=!0),t.lastRunAt=p.timestamp,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:b,...m.durationMs!==void 0?{durationMs:m.durationMs}:{},...m.errorCount!==void 0?{errorCount:m.errorCount}:{},...m.warningCount!==void 0?{warningCount:m.warningCount}:{},...m.error?{error:m.error}:{}}),u(),i();return}if(p.severity!=="error"&&p.severity!=="fatal")return;let B=p.title.match(/\bTS(\d+):/),w={id:p.id,timestamp:p.timestamp,...m.code?{code:m.code}:B?{code:`TS${B[1]}`}:{},message:p.message??p.title,...p.location?.file?{file:p.location.file}:{},...p.location?.line!==void 0?{line:p.location.line}:{},...p.location?.column!==void 0?{column:p.location.column}:{},...f?{project:f}:{},fingerprint:p.fingerprint};t.errors.set(w.fingerprint,w),t.lastRunAt=p.timestamp,t.sawVerdict=!0,r(g,{tool:h,...f?{project:f}:{},at:p.timestamp,runStatus:"failing"}),u(),i()},"handler"),d=e.bus.subscribe(l),c=o(()=>ri({producers:[...t.producers.values()],domain:"typecheck",noProducerHint:O2}),"health");return e.resources.register(Si,()=>({schemaVersion:1,revision:e.resources.revision(Si)??0,updatedAt:new Date().toISOString(),status:t.status,errorCount:t.errors.size,lastRunAt:t.lastRunAt,...c()})),e.resources.register(Fi,()=>({schemaVersion:1,revision:e.resources.revision(Fi)??0,updatedAt:new Date().toISOString(),errors:[...t.errors.values()],...c()})),{unsubscribe:d,uris:[Si,Fi]}}s(z6,"Oh"),o(z6,"installTypecheckReducer");import{App as R2}from"@frontmcp/sdk";import{Resource as T2,ResourceContext as N2}from"@frontmcp/sdk";var Ud=class extends N2{static{s(this,"jh")}static{o(this,"BundleCurrentResource")}async execute(){return this.get(O).read("bundle://current")}};Ud=_([T2({name:"bundle-current",uri:"bundle://current",mimeType:"application/json",description:"Most recent Vite/Rollup bundle report (chunks + sizes)."})],Ud);var M2=Ud;import{Resource as P2,ResourceContext as U2}from"@frontmcp/sdk";var Zd=class extends U2{static{s(this,"Mh")}static{o(this,"BundleChunksResource")}async execute(){return this.get(O).read("bundle://chunks")}};Zd=_([P2({name:"bundle-chunks",uri:"bundle://chunks",mimeType:"application/json",description:"Per-chunk bundle sizes (most recent build)."})],Zd);var Z2=Zd;import{Resource as L2,ResourceContext as q2}from"@frontmcp/sdk";var Ld=class extends q2{static{s(this,"Dh")}static{o(this,"BundleModulesResource")}async execute(){return this.get(O).read("bundle://modules")}};Ld=_([L2({name:"bundle-modules",uri:"bundle://modules",mimeType:"application/json",description:"Flattened per-module bundle sizes (most recent build)."})],Ld);var V2=Ld;import{Resource as J2,ResourceContext as G2}from"@frontmcp/sdk";var qd=class extends G2{static{s(this,"Uh")}static{o(this,"BundleRegressionsResource")}async execute(){return this.get(O).read("bundle://regressions")}};qd=_([J2({name:"bundle-regressions",uri:"bundle://regressions",mimeType:"application/json",description:"Chunks/modules that grew, were added, or were removed vs the baseline."})],qd);var W2=qd;import{Resource as K2,ResourceContext as H2}from"@frontmcp/sdk";var Vd=class extends H2{static{s(this,"Fh")}static{o(this,"BundleCompareResource")}async execute(){return this.get(O).read("bundle://compare/latest")}};Vd=_([K2({name:"bundle-compare-latest",uri:"bundle://compare/latest",mimeType:"application/json",description:"Most recent build vs baseline: totals + delta."})],Vd);var X2=Vd,Jd=class{static{s(this,"Kn")}static{o(this,"BundleApp")}};Jd=_([R2({id:"bundle",name:"Bundle",description:"Vite/Rollup bundle reports + regressions against baseline.",resources:[M2,Z2,V2,W2,X2]})],Jd);function Gd(e,t){let r=[],n=new Map(e.chunks.map(i=>[i.name,i])),u=new Map(t.chunks.map(i=>[i.name,i]));for(let[i,a]of u){let l=n.get(i);if(!l){r.push({kind:"chunk-added",name:i,afterBytes:a.sizeBytes,deltaBytes:a.sizeBytes});continue}let d=a.sizeBytes-l.sizeBytes;d>256&&r.push({kind:"chunk-grew",name:i,beforeBytes:l.sizeBytes,afterBytes:a.sizeBytes,deltaBytes:d}),r.push(...j6(l,a))}for(let[i,a]of n)u.has(i)||r.push({kind:"chunk-removed",name:i,beforeBytes:a.sizeBytes,deltaBytes:-a.sizeBytes});return r.sort((i,a)=>Math.abs(a.deltaBytes)-Math.abs(i.deltaBytes))}s(Gd,"ta"),o(Gd,"compareReports");function j6(e,t){let r=[],n=new Map(e.modules.map(u=>[u.id,u.sizeBytes]));for(let u of t.modules){let i=n.get(u.id);if(i===void 0)u.sizeBytes>256&&r.push({kind:"module-added",name:`${t.name}::${u.id}`,afterBytes:u.sizeBytes,deltaBytes:u.sizeBytes});else{let a=u.sizeBytes-i;a>256&&r.push({kind:"module-grew",name:`${t.name}::${u.id}`,beforeBytes:i,afterBytes:u.sizeBytes,deltaBytes:a})}}return r}s(j6,"rz"),o(j6,"compareModules");var zi="bundle://current",ji="bundle://chunks",Oi="bundle://modules",vr="bundle://regressions",yr="bundle://compare/latest";function O6(e){let t={baseline:e.initialBaseline,regressions:[]},r=o(u=>{if(u.source!=="rollup"&&u.source!=="vite"||u.category!=="build")return;let i=u.raw;if(!i||typeof i!="object"||!("kind"in i)||i.kind!=="bundle-report")return;let a=i.report;!a||!Array.isArray(a.chunks)||(t.current=a,t.regressions=t.baseline?Gd(t.baseline,a):[],e.resources.markDirty(zi),e.resources.markDirty(ji),e.resources.markDirty(Oi),e.resources.markDirty(vr),e.resources.markDirty(yr))},"handler"),n=e.bus.subscribe(r);return e.resources.register(zi,()=>({schemaVersion:1,revision:e.resources.revision(zi)??0,updatedAt:new Date().toISOString(),report:t.current??null})),e.resources.register(ji,()=>({schemaVersion:1,revision:e.resources.revision(ji)??0,updatedAt:new Date().toISOString(),chunks:t.current?.chunks??[]})),e.resources.register(Oi,()=>{let u=t.current?.chunks.flatMap(i=>i.modules.map(a=>({...a,chunk:i.name})))??[];return{schemaVersion:1,revision:e.resources.revision(Oi)??0,updatedAt:new Date().toISOString(),modules:u}}),e.resources.register(vr,()=>({schemaVersion:1,revision:e.resources.revision(vr)??0,updatedAt:new Date().toISOString(),regressions:t.regressions.slice()})),e.resources.register(yr,()=>({schemaVersion:1,revision:e.resources.revision(yr)??0,updatedAt:new Date().toISOString(),baseline:t.baseline??null,current:t.current??null,deltaBytes:t.baseline&&t.current?t.current.totalBytes-t.baseline.totalBytes:0})),{unsubscribe:n,uris:[zi,ji,Oi,vr,yr],setBaseline:o(u=>{t.baseline=u,t.current&&(t.regressions=Gd(t.baseline,t.current)),e.resources.markDirty(vr),e.resources.markDirty(yr)},"setBaseline")}}s(O6,"Zh"),o(O6,"installBundleReducer");import{App as Y2}from"@frontmcp/sdk";import{Resource as Q2,ResourceContext as ex}from"@frontmcp/sdk";var Wd=class extends ex{static{s(this,"Vh")}static{o(this,"RuntimeBrowserConsoleResource")}async execute(){return this.get(O).read("runtime://browser/console")}};Wd=_([Q2({name:"runtime-browser-console",uri:"runtime://browser/console",mimeType:"application/json",description:"Most recent 200 console.* messages from any tab."})],Wd);var tx=Wd;import{Resource as ux,ResourceContext as rx}from"@frontmcp/sdk";var Kd=class extends rx{static{s(this,"Gh")}static{o(this,"RuntimeBrowserErrorsResource")}async execute(){return this.get(O).read("runtime://browser/errors")}};Kd=_([ux({name:"runtime-browser-errors",uri:"runtime://browser/errors",mimeType:"application/json",description:"Uncaught browser errors + promise rejections, per tab, since that tab's current page load (a reload retracts the previous document's errors)."})],Kd);var nx=Kd;import{Resource as ix,ResourceContext as sx}from"@frontmcp/sdk";var Hd=class extends sx{static{s(this,"Wh")}static{o(this,"RuntimeServerErrorsResource")}async execute(){return this.get(O).read("runtime://errors")}};Hd=_([ix({name:"runtime-errors",uri:"runtime://errors",mimeType:"application/json",description:"Errors raised INSIDE a backend pod, with no browser involved \u2014 the 500s a curl, an e2e runner or a queue job produces. Each entry carries the route, the status, the request id the gateway stamped, and the stack. Use this when a server-side call failed and no browser flow exists to explain it; `runtime://browser/errors` is the browser-side counterpart."})],Hd);var ax=Hd;import{Resource as ox,ResourceContext as lx}from"@frontmcp/sdk";var Xd=class extends lx{static{s(this,"Xh")}static{o(this,"RuntimeBrowserNetworkResource")}async execute(){return this.get(O).read("runtime://browser/network")}};Xd=_([ox({name:"runtime-browser-network",uri:"runtime://browser/network",mimeType:"application/json",description:"Recent fetch / XHR / browser network activity."})],Xd);var dx=Xd;import{Resource as cx,ResourceContext as px}from"@frontmcp/sdk";var Yd=class extends px{static{s(this,"Yh")}static{o(this,"RuntimeBrowserFailedRequestsResource")}async execute(){return this.get(O).read("runtime://browser/failed-requests")}};Yd=_([cx({name:"runtime-browser-failed-requests",uri:"runtime://browser/failed-requests",mimeType:"application/json",description:"Recent failed network requests (status >= 400 or transport errors)."})],Yd);var mx=Yd;import{Resource as fx,ResourceContext as hx}from"@frontmcp/sdk";var Qd=class extends hx{static{s(this,"eg")}static{o(this,"RuntimeDismissedResource")}async execute(){return this.get(O).read("runtime://dismissed")}};Qd=_([fx({name:"runtime-dismissed",uri:"runtime://dismissed",mimeType:"application/json",description:"Errors someone DISMISSED by hand \u2014 in the dashboard, at the CLI, or an agent through observe.dismiss_errors \u2014 with who did it and the reason they gave. A dismissed error is hidden from runtime://errors and the browser error lists, not fixed: it shows again the next time it happens. Read this when an error list is shorter than you expected."})],Qd);var gx=Qd,ec=class{static{s(this,"Yn")}static{o(this,"RuntimeApp")}};ec=_([Y2({id:"runtime",name:"Runtime",description:"Live browser/node runtime state (console, errors, network).",resources:[tx,nx,ax,dx,mx,gx]})],ec);var Xt="runtime://browser/console",Xe="runtime://browser/errors",Yt="runtime://browser/network",Ye="runtime://browser/failed-requests",Qe="runtime://errors",Er="runtime://dismissed",vx=200,R6=100,yx=200,Ex=50,bx=500,Dx="default",wx=1e3,tc=o(e=>e??Dx,"tabOf");function T6(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(T6,"wz"),o(T6,"isDocumentBoundary");function N6(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(N6,"$z"),o(N6,"isTabGone");function M6(e){let t=(e.now??(()=>Date.now()))(),r={console:[],errors:[],network:[],failed:[],serverErrors:[],readyByTab:new Map,dismissed:new Map,changedAt:new Map},n=o((c,p)=>{r.changedAt.set(c,p),e.resources.markDirty(c)},"touch"),u=o((c,p,m)=>{let f=c.filter(h=>!(tc(h.tabId)===p&&h.timestamp<m));f.length!==c.length&&(c.length=0,c.push(...f))},"retract"),i=o(c=>{let p=E1(c);if(p){let f=r.dismissed.get(p.groupId);r.dismissed.delete(p.groupId),p.kind===or&&(r.dismissed.set(p.groupId,{eventIds:new Set(p.eventIds),at:c.timestamp,...p.by?{by:p.by}:{},...p.reason?{reason:p.reason}:{},...p.title?{title:p.title}:{}}),r.dismissed.size>bx&&r.dismissed.delete(r.dismissed.keys().next().value));let h=new Set([...f?.eventIds??[],...r.dismissed.get(p.groupId)?.eventIds??[]]);for(let[g,E]of[[Qe,r.serverErrors],[Xe,r.errors],[Ye,r.failed]])E.some(B=>h.has(B.id))&&n(g,c.timestamp);n(Er,c.timestamp);return}if(P6(c)){let f=c.raw?.project;if(f){let h=r.serverErrors.length;r.serverErrors=r.serverErrors.filter(g=>g.project!==f),r.serverErrors.length!==h&&n(Qe,c.timestamp)}return}if(U6(c)){r.lastServerEventAt=Math.max(r.lastServerEventAt??0,c.timestamp),Qt(r.serverErrors,Z6(c),R6),n(Qe,c.timestamp);return}if(!(c.source==="client-runtime"||c.source==="chrome")&&!(c.source==="react"&&c.category==="network"))return;if(r.lastEventAt=Math.max(r.lastEventAt??0,c.timestamp),N6(c)){let f=tc(c.context.tabId);u(r.errors,f,Number.POSITIVE_INFINITY),u(r.failed,f,Number.POSITIVE_INFINITY),r.readyByTab.delete(f);for(let h of[Xe,Ye,Xt,Yt])n(h,c.timestamp);return}if(T6(c)){let f=tc(c.context.tabId);r.readyByTab.set(f,Math.max(r.readyByTab.get(f)??0,c.timestamp)),r.lastReadyAt=Math.max(r.lastReadyAt??0,c.timestamp);let h=c.timestamp-wx;u(r.errors,f,h),u(r.failed,f,h);for(let g of[Xe,Ye,Xt,Yt])n(g,c.timestamp);return}let m={id:c.id,timestamp:c.timestamp,severity:c.severity,title:c.title,message:c.message,source:c.source,fingerprint:c.fingerprint,tabId:c.context.tabId,url:c.context.url,raw:c.raw};if(c.category==="network"){Qt(r.network,m,yx),n(Yt,c.timestamp),c.severity==="error"&&(Qt(r.failed,m,Ex),n(Ye,c.timestamp));return}(c.severity==="error"||c.severity==="fatal")&&(Qt(r.errors,m,R6),n(Xe,c.timestamp)),c.title?.startsWith("console.")&&(Qt(r.console,m,vx),n(Xt,c.timestamp))},"handler"),a=e.bus.subscribe(i),l=new Set([Qe,Xe,Ye]),d=o((c,p)=>{if(!l.has(c)||r.dismissed.size===0)return rc(e.resources,c,p,r,t,0);let m=new Set([...r.dismissed.values()].flatMap(h=>[...h.eventIds])),f=p.filter(h=>!m.has(h.id));return rc(e.resources,c,f,r,t,p.length-f.length)},"snap");return e.resources.register(Qe,()=>d(Qe,r.serverErrors)),e.resources.register(Xt,()=>d(Xt,r.console)),e.resources.register(Xe,()=>d(Xe,r.errors)),e.resources.register(Yt,()=>d(Yt,r.network)),e.resources.register(Ye,()=>d(Ye,r.failed)),e.resources.register(Er,()=>{let c=new Set([...r.serverErrors,...r.errors,...r.failed].map(m=>m.id)),p=[...r.dismissed].map(([m,f])=>({id:m,at:f.at,...f.by?{by:f.by}:{},...f.reason?{reason:f.reason}:{},...f.title?{title:f.title}:{},eventIds:[...f.eventIds],hiding:[...f.eventIds].filter(h=>c.has(h)).length}));return{schemaVersion:1,revision:e.resources.revision(Er)??0,updatedAt:new Date(r.changedAt.get(Er)??t).toISOString(),count:p.length,dismissals:p,detail:p.length?`${p.length} dismissal${p.length===1?"":"s"} in effect \u2014 hidden, not fixed. Each error shows again the next time it happens; undo one with observe.restore_errors.`:"Nothing has been dismissed."}}),{unsubscribe:a,uris:[Xt,Xe,Yt,Ye,Qe,Er]}}s(M6,"og"),o(M6,"installRuntimeReducer");function uc(e){let t=e.raw??null,r=e.context;return t?.project??r.projectName}s(uc,"Vw"),o(uc,"projectOf");function P6(e){if(e.source!=="gateway"||e.category!=="cluster")return!1;let t=e.raw?.kind;return t==="service-starting"||t==="service-respawn"}s(P6,"kz"),o(P6,"isGenerationBoundary");function U6(e){if(e.source!=="nestjs"||e.severity!=="error"&&e.severity!=="fatal")return!1;let t=e.raw??{};return t.kind==="server-request"||t.kind==="uncaught"?!0:t.kind!=="log"?!1:t.request?.error?!0:/\b[A-Za-z0-9_$]*(?:Error|Exception)\b|\b(?:ERROR|FATAL)\b/.test(e.title??"")}s(U6,"Sz"),o(U6,"isServerError");function Z6(e){let t=(e.raw??{}).request??{},r=t.error;return{id:e.id,timestamp:e.timestamp,severity:e.severity,title:e.title,message:e.message??r?.message,source:e.source,fingerprint:e.fingerprint,...e.context.requestId?{requestId:e.context.requestId}:{},...uc(e)?{project:uc(e)}:{},...typeof t.route=="string"?{route:t.route}:{},...typeof t.status=="number"?{status:t.status}:{},...typeof t.outcome=="string"?{outcome:t.outcome}:{},...r?.stack?{stack:r.stack}:{},raw:e.raw}}s(Z6,"Iz"),o(Z6,"serverEntry");function rc(e,t,r,n,u,i){let a=t===Qe,l=a?n.lastServerEventAt:n.lastEventAt,d=l!==void 0;return{schemaVersion:1,revision:e.revision(t)??0,updatedAt:new Date(n.changedAt.get(t)??u).toISOString(),count:r.length,entries:r.slice(),...i>0?{dismissedCount:i}:{},producer:d?"connected":"none",lastEventAt:l,lastReadyAt:n.lastReadyAt,detail:a?d?r.length===0?"No server-side errors held. Pods HAVE reported, but a new pod generation retracts the errors of the one it replaced \u2014 so this is NOT evidence the routes are healthy: nobody may have re-made the failing request since."+Ri(i):`${r.length} server-side error${r.length===1?"":"s"} from ${new Set(r.map(c=>c.project??"unknown")).size} project${new Set(r.map(c=>c.project??"unknown")).size===1?"":"s"}`+Ri(i):"No pod has ever reported into this session \u2014 this is NOT evidence the backend is healthy, nothing is watching. Run the backend under the dev cluster so pod errors reach this session.":d?`browser attached; ${r.length} entr${r.length===1?"y":"ies"} from ${n.readyByTab.size} open tab${n.readyByTab.size===1?"":"s"}`+(n.lastReadyAt===void 0?" (no page load observed yet)":"")+Ri(i):"No browser has ever reported into this session \u2014 this is NOT evidence the app is healthy, nothing is watching. Open the app under the dev cluster (or the Vite dev server with @lensmcp/vite-plugin installed) so browser events reach this session."}}s(rc,"qw"),o(rc,"snapshot");function Ri(e){return e>0?` \u2014 ${e} more dismissed by hand in the dashboard (hidden, not fixed)`:""}s(Ri,"ng"),o(Ri,"dismissedNote");function Qt(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(Qt,"eo"),o(Qt,"pushBounded");import{App as Bx}from"@frontmcp/sdk";import{Resource as xx,ResourceContext as $x}from"@frontmcp/sdk";var nc=class extends $x{static{s(this,"ig")}static{o(this,"BrowserTabsResource")}async execute(){return this.get(O).read("browser://tabs")}};nc=_([xx({name:"browser-tabs",uri:"browser://tabs",mimeType:"application/json",description:"Open browser tabs with per-tab status, url, and event counts. `status` reflects the tab's CURRENT page load \u2014 a reload resets it."})],nc);var Cx=nc;import{Resource as kx,ResourceContext as Ax}from"@frontmcp/sdk";var ic=class extends Ax{static{s(this,"ag")}static{o(this,"BrowserActiveTabResource")}async execute(){return this.get(O).read("browser://active-tab")}};ic=_([kx({name:"browser-active-tab",uri:"browser://active-tab",mimeType:"application/json",description:"The currently-focused browser tab."})],ic);var _x=ic,sc=class{static{s(this,"to")}static{o(this,"BrowserApp")}};sc=_([Bx({id:"browser",name:"Browser",description:"Per-tab browser state (multi-tab refinement comes in Phase 6).",resources:[Cx,_x]})],sc);var et="browser://tabs",tt="browser://active-tab";function L6(e){if(e.category!=="runtime")return!1;let t=e.raw;return t&&typeof t=="object"&&t.kind==="ready"?!0:e.title==="Client runtime ready"}s(L6,"Oz"),o(L6,"isDocumentBoundary");function q6(e){if(e.category!=="runtime")return!1;let t=e.raw;return!!(t&&typeof t=="object"&&t.kind==="gone")}s(q6,"jz"),o(q6,"isTabGone");function V6(e){let t=(e.now??(()=>Date.now()))(),r={tabs:new Map,changedAt:new Map},n=o(a=>{if(a.source!=="chrome"&&a.source!=="client-runtime")return;let l=a.context.tabId??"default";if(q6(a)){if(r.tabs.delete(l),r.activePageId===l){let c=[...r.tabs.keys()];r.activePageId=c[c.length-1]}r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),r.changedAt.set(et,a.timestamp),r.changedAt.set(tt,a.timestamp),e.resources.markDirty(et),e.resources.markDirty(tt);return}let d=r.tabs.get(l);if(d||(d={pageId:l,url:a.context.url??"",status:"unknown",unreadEvents:0,totalEvents:0,loads:0}),r.tabs.delete(l),r.tabs.set(l,d),r.tabs.size>100){let c=r.tabs.keys().next().value;c!==void 0&&c!==l&&r.tabs.delete(c)}a.context.url&&(d.url=a.context.url),d.totalEvents+=1,d.lastEventAt=a.timestamp,r.activePageId=l,r.lastEventAt=Math.max(r.lastEventAt??0,a.timestamp),L6(a)?(d.status="clean",d.unreadEvents=0,d.loads+=1,d.lastReadyAt=a.timestamp):(d.unreadEvents+=1,a.severity==="error"||a.severity==="fatal"?d.status="failing":d.status!=="failing"&&a.severity==="warning"?d.status="warning":d.status==="unknown"&&(d.status="clean")),r.changedAt.set(et,a.timestamp),r.changedAt.set(tt,a.timestamp),e.resources.markDirty(et),e.resources.markDirty(tt)},"handler"),u=e.bus.subscribe(n),i=o(a=>new Date(r.changedAt.get(a)??t).toISOString(),"stamp");return e.resources.register(et,()=>({schemaVersion:1,revision:e.resources.revision(et)??0,updatedAt:i(et),activePageId:r.activePageId,tabs:[...r.tabs.values()],lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"})),e.resources.register(tt,()=>{let a=r.activePageId;return{schemaVersion:1,revision:e.resources.revision(tt)??0,updatedAt:i(tt),tab:a?r.tabs.get(a)??null:null,lastEventAt:r.lastEventAt,producer:r.lastEventAt===void 0?"none":"connected"}}),{unsubscribe:u,uris:[et,tt]}}s(V6,"ug"),o(V6,"installBrowserReducer");import{App as Ix}from"@frontmcp/sdk";import{Resource as Sx,ResourceContext as Fx}from"@frontmcp/sdk";var ac=class extends Fx{static{s(this,"lg")}static{o(this,"NestProvidersResource")}async execute(){return this.get(O).read("nest://providers")}};ac=_([Sx({name:"nest-providers",uri:"nest://providers",mimeType:"application/json",description:"All known NestJS singleton-instance generations (with lifecycle)."})],ac);var zx=ac;import{Resource as jx,ResourceContext as Ox}from"@frontmcp/sdk";var oc=class extends Ox{static{s(this,"pg")}static{o(this,"NestRequestsResource")}async execute(){return this.get(O).read("nest://requests/recent")}};oc=_([jx({name:"nest-requests-recent",uri:"nest://requests/recent",mimeType:"application/json",description:"Last 50 NestJS server requests with status + duration."})],oc);var Rx=oc,lc=class{static{s(this,"ro")}static{o(this,"NestApp")}};lc=_([Ix({id:"nest",name:"Nest",description:"NestJS providers, request lifecycle, singleton generations.",resources:[zx,Rx]})],lc);var Ti="nest://providers",Ni="nest://requests/recent";function J6(e){let t={providers:new Map,recentRequests:[]},r=o(u=>{if(u.source!=="nestjs")return;let i=u.raw??null;if(i?.kind==="singleton-instance"&&i.provider){let a=i.provider;if(t.providers.delete(a.instanceId),t.providers.set(a.instanceId,{...a}),t.providers.size>500){for(let l of t.providers.keys())if(t.providers.delete(l),t.providers.size<=500)break}e.resources.markDirty(Ti);return}if(i?.kind==="server-request"&&i.request){let a={...i.request,fingerprint:u.fingerprint,id:u.id};t.recentRequests.push(a),t.recentRequests.length>50&&t.recentRequests.splice(0,t.recentRequests.length-50),e.resources.markDirty(Ni);return}},"handler"),n=e.bus.subscribe(r);return e.resources.register(Ti,()=>({schemaVersion:1,revision:e.resources.revision(Ti)??0,updatedAt:new Date().toISOString(),providers:[...t.providers.values()]})),e.resources.register(Ni,()=>({schemaVersion:1,revision:e.resources.revision(Ni)??0,updatedAt:new Date().toISOString(),requests:t.recentRequests.slice()})),{unsubscribe:n,uris:[Ti,Ni]}}s(J6,"fg"),o(J6,"installNestReducer");import{App as Tx}from"@frontmcp/sdk";import{Resource as Nx,ResourceContext as Mx}from"@frontmcp/sdk";var dc=class extends Mx{static{s(this,"hg")}static{o(this,"TraceRecentResource")}async execute(){return this.get(O).read("trace://recent")}};dc=_([Nx({name:"trace-recent",uri:"trace://recent",mimeType:"application/json",description:"Last 100 trace spans (flattened)."})],dc);var Px=dc;import{Resource as Ux,ResourceContext as Zx}from"@frontmcp/sdk";var cc=class extends Zx{static{s(this,"vg")}static{o(this,"TraceFailedResource")}async execute(){return this.get(O).read("trace://failed")}};cc=_([Ux({name:"trace-failed",uri:"trace://failed",mimeType:"application/json",description:"Trace spans that ended with status=error."})],cc);var Lx=cc,pc=class{static{s(this,"no")}static{o(this,"TraceApp")}};pc=_([Tx({id:"trace",name:"Trace",description:"Cross-process span timeline (Phase 3 \u2014 flat; Phase 7 promotes to multi-axis graph).",resources:[Px,Lx]})],pc);var Mi="trace://recent",Pi="trace://failed";function G6(e){let t={recent:[],failed:[]},r=o(u=>{let i=u.raw??null;if(!i||i.kind!=="span"||!i.span?.name)return;let a={id:u.id,traceId:i.span.traceId,parentSpanId:i.span.parentSpanId,flowId:i.span.flowId??u.context.flowId,requestId:i.span.requestId??u.context.requestId,name:i.span.name,source:u.source,startTime:i.span.startTime??u.timestamp,endTime:i.span.endTime,durationMs:i.span.durationMs,status:i.span.status??(u.severity==="error"?"error":"ok")};mc(t.recent,a,100),a.status==="error"&&mc(t.failed,a,50),e.resources.markDirty(Mi),a.status==="error"&&e.resources.markDirty(Pi)},"handler"),n=e.bus.subscribe(r);return e.resources.register(Mi,()=>({schemaVersion:1,revision:e.resources.revision(Mi)??0,updatedAt:new Date().toISOString(),spans:t.recent.slice()})),e.resources.register(Pi,()=>({schemaVersion:1,revision:e.resources.revision(Pi)??0,updatedAt:new Date().toISOString(),spans:t.failed.slice()})),{unsubscribe:n,uris:[Mi,Pi]}}s(G6,"bg"),o(G6,"installTraceReducer");function mc(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(mc,"Gw"),o(mc,"pushBounded");import{App as qx}from"@frontmcp/sdk";import{Resource as Vx,ResourceContext as Jx}from"@frontmcp/sdk";var fc=class extends Jx{static{s(this,"xg")}static{o(this,"PerfSlowRoutesResource")}async execute(){return this.get(O).read("perf://slow-routes")}};fc=_([Vx({name:"perf-slow-routes",uri:"perf://slow-routes",mimeType:"application/json",description:"Routes that are slow NOW (\u2265 threshold on their latest call, or repeatedly lately). A one-off spike is retracted once later calls prove the route recovered; worstEver keeps the history."})],fc);var Gx=fc;import{Resource as Wx,ResourceContext as Kx}from"@frontmcp/sdk";var hc=class extends Kx{static{s(this,"wg")}static{o(this,"PerfDuplicateRequestsResource")}async execute(){return this.get(O).read("perf://duplicate-requests")}};hc=_([Wx({name:"perf-duplicate-requests",uri:"perf://duplicate-requests",mimeType:"application/json",description:"Endpoints one page called SEVERAL TIMES CONCURRENTLY \u2014 the missing-dedupe signal (a hook fetching outside the shared resource cache, multiplied by however many components mount it). Concurrency, not count: sequential repeats are a caching question and are not reported. The threshold sits above 2 so React StrictMode\u2019s double-invoke never fires it. Two consecutive clean loads retract a finding, so a fix clears it without a restart."})],hc);var Hx=hc,gc=class{static{s(this,"oo")}static{o(this,"PerfApp")}};gc=_([qx({id:"perf",name:"Perf",description:"Performance signals: slow server routes, and endpoints one page calls concurrently (the missing-dedupe signal).",resources:[Gx,Hx]})],gc);var Ui="perf://slow-routes",Zi=20,W6=2,Xx=200;function K6(e){let t=je(e.thresholds).slowRouteMs,r=(e.now??(()=>Date.now()))(),n={routes:new Map},u=o(d=>{let c=d.raw??null;if(c?.kind!=="server-request"||!c.request)return;let{method:p,route:m}=c.request,f=c.request.durationMs??0,h=`${p} ${m}`,g=n.routes.get(h);if(g||(g={method:p,route:m,recent:[],samples:0,slowSamples:0,lastDurationMs:f,lastSeenAt:d.timestamp,worstEverMs:0,worstEverAt:d.timestamp}),n.routes.delete(h),n.routes.set(h,g),g.recent.push(f),g.recent.length>Zi&&g.recent.splice(0,g.recent.length-Zi),g.samples+=1,f>=t&&(g.slowSamples+=1),g.lastDurationMs=f,g.lastSeenAt=d.timestamp,f>g.worstEverMs&&(g.worstEverMs=f,g.worstEverAt=d.timestamp),n.routes.size>Xx){let E=n.routes.keys().next().value;E!==void 0&&n.routes.delete(E)}n.lastSampleAt=Math.max(n.lastSampleAt??0,d.timestamp),n.changedAt=d.timestamp,e.resources.markDirty(Ui)},"handler"),i=e.bus.subscribe(u),a=o(d=>d.recent.reduce((c,p)=>p>=t?c+1:c,0),"recentSlowCount"),l=o(d=>d.lastDurationMs>=t||a(d)>=W6,"currentlySlow");return e.resources.register(Ui,()=>{let d=[...n.routes.values()].filter(l);return{schemaVersion:1,revision:e.resources.revision(Ui)??0,updatedAt:new Date(n.changedAt??r).toISOString(),thresholdMs:t,routes:d.map(c=>({method:c.method,route:c.route,worstRecentMs:Math.max(...c.recent),lastDurationMs:c.lastDurationMs,lastSeenAt:c.lastSeenAt,samples:c.samples,slowSamples:c.slowSamples,recentSlowSamples:a(c),worstEverMs:c.worstEverMs,worstEverAt:c.worstEverAt})).sort((c,p)=>p.worstRecentMs-c.worstRecentMs),routesTracked:n.routes.size,recentSampleWindow:Zi,minRecentSlowToKeep:W6,lastSampleAt:n.lastSampleAt,producer:n.lastSampleAt===void 0?"none":"connected",detail:n.lastSampleAt===void 0?"No server request has ever been observed \u2014 this is NOT evidence the backend is fast, nothing is watching. Run the backend under the dev cluster (or with @lensmcp/nest-instrumentation) so request timings reach this session.":`${n.routes.size} route${n.routes.size===1?"":"s"} observed; ${d.length} slow in the last ${Zi} calls each (\u2265${t}ms).`}}),{unsubscribe:i,uris:[Ui]}}s(K6,"kg"),o(K6,"installPerfReducer");var Li="perf://duplicate-requests",vc=10,H6=2,Yx=200,X6=300,Qx=new Set(["t","_","cacheBust","ts"]),e$=8,Y6=2,t$="react";function Q6(e,t){return t.start<=e.end+Y6&&t.end>=e.start-Y6}s(Q6,"eO"),o(Q6,"sameRequest");function ey(e){try{let t=new URL(e,"http://lensmcp.invalid");for(let u of[...t.searchParams.keys()])Qx.has(u)&&t.searchParams.delete(u);let r=t.searchParams.toString(),n=`${t.pathname}${r?`?${r}`:""}`;return t.host==="lensmcp.invalid"?n:`${t.origin}${n}`}catch{return e}}s(ey,"Hw"),o(ey,"normalizeRequestUrl");function ty(e){if(e.length===0)return 0;let t=[];for(let{start:u,end:i}of e)t.push({at:u,delta:1}),t.push({at:i+1,delta:-1});t.sort((u,i)=>u.at-i.at||u.delta-i.delta);let r=0,n=0;for(let{delta:u}of t)r+=u,r>n&&(n=r);return n}s(ty,"Yw"),o(ty,"peakConcurrency");function uy(e){let t=je(e.thresholds).duplicateRequestPeak,r=(e.now??(()=>Date.now()))(),n={endpoints:new Map},u=o((p,m,f)=>{p.open.delete(m),f.windows.length!==0&&(p.recentPeaks.push(f.peak),p.recentPeaks.length>vc&&p.recentPeaks.splice(0,p.recentPeaks.length-vc))},"closeFlow"),i=o(p=>{if(p.source!==t$||p.category!=="network")return;let m=p.raw??null;if(m?.kind!=="fetch-done"&&m?.kind!=="fetch-error"||!m.url||!m.method)return;let f=ey(m.url),h=m.method.toUpperCase();if(typeof m.startedAt!="number")return;let g=m.startedAt,E=g+(typeof m.durationMs=="number"?m.durationMs:0),B=p.context?.originNodeId??null,w=p.context?.flowId??null,b=p.context?.tabId??"-",$=m.requestId??p.context?.requestId,x=$?`${b}|${$}`:void 0,F=`${h} ${f} @ ${B??"-"}`,C=n.endpoints.get(F);C||(C={method:h,url:f,originNodeId:B,open:new Map,recentPeaks:[],totalRequests:0,repeatedReceipts:0,lastSeenAt:p.timestamp,worstEverPeak:0,worstEverAt:p.timestamp}),n.endpoints.delete(F),n.endpoints.set(F,C);let j=C.open.get(b);if(j&&j.flowId!==w&&(u(C,b,j),j=void 0),j||(j={flowId:w,windows:[],byIdentity:new Map,peak:0}),C.open.delete(b),C.open.set(b,j),C.open.size>e$){let[X,le]=C.open.entries().next().value;u(C,X,le)}let q={start:g,end:E},Q=x?j.byIdentity.get(x):void 0;if(Q&&Q6(Q,q))Q.start=Math.min(Q.start,g),Q.end=Math.max(Q.end,E),C.repeatedReceipts+=1;else{let X=x?{...q,identity:x}:q;if(j.windows.push(X),x&&j.byIdentity.set(x,X),j.windows.length>X6)for(let le of j.windows.splice(0,j.windows.length-X6))le.identity&&j.byIdentity.get(le.identity)===le&&j.byIdentity.delete(le.identity);C.totalRequests+=1}if(j.peak=ty(j.windows),C.lastSeenAt=p.timestamp,j.peak>C.worstEverPeak&&(C.worstEverPeak=j.peak,C.worstEverAt=p.timestamp),n.endpoints.size>Yx){let X=n.endpoints.keys().next().value;X!==void 0&&n.endpoints.delete(X)}n.lastSampleAt=Math.max(n.lastSampleAt??0,p.timestamp),n.changedAt=p.timestamp,e.resources.markDirty(Li)},"handler"),a=e.bus.subscribe(i),l=o(p=>[...p.open.values()].filter(m=>m.windows.length>0).map(m=>m.peak),"openPeaks"),d=o(p=>{let m=[...p.recentPeaks,...l(p)],f=0;for(let h=m.length-1;h>=0&&!((m[h]??0)>=t);h-=1)f+=1;return f},"consecutiveCleanFlows"),c=o(p=>p.worstEverPeak>=t&&d(p)<H6,"currentlyDuplicated");return e.resources.register(Li,()=>{let p=[...n.endpoints.values()].filter(c);return{schemaVersion:1,revision:e.resources.revision(Li)??0,updatedAt:new Date(n.changedAt??r).toISOString(),peakThreshold:t,endpoints:p.map(m=>({method:m.method,url:m.url,originNodeId:m.originNodeId,peakConcurrent:l(m).at(-1)??0,cleanFlowsSince:d(m),flowsObserved:m.recentPeaks.length+l(m).length,totalRequests:m.totalRequests,repeatedReceipts:m.repeatedReceipts,worstEverPeak:m.worstEverPeak,worstEverAt:m.worstEverAt,lastSeenAt:m.lastSeenAt})).sort((m,f)=>f.peakConcurrent-m.peakConcurrent),endpointsTracked:n.endpoints.size,recentFlowWindow:vc,minCleanFlowsToRetract:H6,lastSampleAt:n.lastSampleAt,producer:n.lastSampleAt===void 0?"none":"connected",detail:n.lastSampleAt===void 0?"No browser fetch has ever been observed \u2014 this is NOT evidence the app fetches cleanly, nothing is watching. Load a page under the dev cluster so flow-fetch events reach this session.":p.length===0?`${n.endpoints.size} endpoint${n.endpoints.size===1?"":"s"} observed; none exceeded ${t} concurrent identical calls.`:`${p.length} endpoint${p.length===1?"":"s"} called \u2265${t}\xD7 concurrently \u2014 usually a hook fetching outside the shared resource cache, multiplied by however many components mount it.`}}),{unsubscribe:a,uris:[Li]}}s(uy,"Ig"),o(uy,"installDuplicateRequestsReducer");import{App as u$}from"@frontmcp/sdk";import{Resource as r$,ResourceContext as n$}from"@frontmcp/sdk";var yc=class extends n${static{s(this,"Rg")}static{o(this,"DbSlowQueriesResource")}async execute(){return this.get(O).read("db://slow-queries")}};yc=_([r$({name:"db-slow-queries",uri:"db://slow-queries",mimeType:"application/json",description:"Query shapes (project\xB7op\xB7table) whose worst observed duration crosses the slowQueryMs threshold, aggregated live from the pg instrumentation. counts are an undercount for hot shapes (the emitter flood-guards per shape); suppressedEvents carries the drop count."})],yc);var i$=yc;import{Resource as s$,ResourceContext as a$}from"@frontmcp/sdk";var Ec=class extends a${static{s(this,"Tg")}static{o(this,"DbAnalysisResource")}async execute(){return this.get(O).read("db://analysis")}};Ec=_([s$({name:"db-analysis",uri:"db://analysis",mimeType:"application/json",description:"The latest DB analyzer run per project (missing indexes, seq-scan hot spots, unused indexes, migration-parity drift, slow statements) \u2014 ingested from the workspace analyzer's `db-analyze-run` events on the lens bus file."})],Ec);var o$=Ec,bc=class{static{s(this,"io")}static{o(this,"DbApp")}};bc=_([u$({id:"db",name:"Db",description:"Database signals: slow query shapes observed live from the pg instrumentation, and the latest externally-ingested analyzer run (missing indexes, migration parity, unused indexes).",resources:[i$,o$]})],bc);var br="db://slow-queries",qi="db://analysis",ry=50,l$=20,d$=200,c$=1e3,p$=["statements","failed","workMs","recorded","suppressed","unwritten"];function ny(e){let t=e[El];if(!t)return;let r=Array.isArray(t.paths)?t.paths:[];for(let n of r){let u=typeof n=="string"?/^findings\[\] \(\+(\d+) items dropped\)$/.exec(n):null;if(u)return Number(u[1])}return r.some(n=>typeof n=="string"&&n.startsWith("findings"))?0:void 0}s(ny,"lO"),o(ny,"findingsDroppedByClamp");function iy(e){let t=je(e.thresholds).slowQueryMs,r=(e.now??(()=>Date.now()))(),n={shapes:new Map,analyzeRuns:new Map,accounts:new Map,accountsSeen:0,census:{statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0}},u=o(l=>{let d=l.raw??null;if(d){if(d.kind==="db-query"){let c=d.project??"unknown",p=d.op??"query",m=d.table??"query",f=d.durationMs??0,h=`${c}|${p}|${m}`,g=n.shapes.get(h);if(g||(g={project:c,op:p,table:m,count:0,errorCount:0,totalMs:0,maxMs:0,maxAt:l.timestamp,recent:[],rowsTotal:0,lastSql:"",lastDurationMs:0,lastSeenAt:l.timestamp,suppressed:0}),n.shapes.delete(h),n.shapes.set(h,g),g.count+=1,d.error!==void 0&&(g.errorCount+=1),g.totalMs+=f,f>g.maxMs&&(g.maxMs=f,g.maxAt=l.timestamp),g.recent.push(f),g.recent.length>ry&&g.recent.splice(0,g.recent.length-ry),g.rowsTotal+=d.rows??0,d.query&&(g.lastSql=d.query),g.lastDurationMs=f,g.lastSeenAt=l.timestamp,g.suppressed+=d.floodSuppressed??0,n.shapes.size>d$){let E=n.shapes.keys().next().value;E!==void 0&&n.shapes.delete(E)}n.lastQueryAt=Math.max(n.lastQueryAt??0,l.timestamp),n.changedAt=l.timestamp,e.resources.markDirty(br);return}if(d.kind==="db-request-account"){let c=d,p=typeof c.accountId=="string"?c.accountId:l.id,m=typeof c.seq=="number"?c.seq:0,f=n.accounts.get(p);if(f&&f.seq>=m)return;let h={seq:m,statements:0,failed:0,workMs:0,recorded:0,suppressed:0,unwritten:0};for(let g of p$){let E=c[g];h[g]=typeof E=="number"&&Number.isFinite(E)?E:0,n.census[g]+=h[g]-(f?.[g]??0)}if(f||(n.accountsSeen+=1),n.accounts.delete(p),n.accounts.set(p,h),n.accounts.size>c$){let g=n.accounts.keys().next().value;g!==void 0&&n.accounts.delete(g)}n.changedAt=l.timestamp,e.resources.markDirty(br);return}if(d.kind==="db-analyze-run"){let c=d.project??"unknown",p=ny(d);n.analyzeRuns.set(c,{project:c,runAt:d.runAt??l.timestamp,tool:d.tool??"unknown",findings:Array.isArray(d.findings)?d.findings:[],...p!==void 0?{droppedFindings:p}:{}}),ft(n.analyzeRuns,ar),n.lastAnalyzeAt=Math.max(n.lastAnalyzeAt??0,l.timestamp),n.changedAt=l.timestamp,e.resources.markDirty(qi)}}},"handler"),i=e.bus.subscribe(u),a=o(l=>{if(l.length===0)return 0;let d=[...l].sort((c,p)=>c-p);return d[Math.min(d.length-1,Math.floor(d.length*.95))]??0},"p95");return e.resources.register(br,()=>{let l=[...n.shapes.values()].filter(d=>d.maxMs>=t);return{schemaVersion:1,revision:e.resources.revision(br)??0,updatedAt:new Date(n.changedAt??r).toISOString(),thresholdMs:t,queries:l.map(d=>({project:d.project,op:d.op,table:d.table,count:d.count,errorCount:d.errorCount,maxMs:d.maxMs,maxAt:d.maxAt,avgMs:Math.round(d.totalMs/Math.max(d.count,1)*10)/10,p95Ms:a(d.recent),rowsTotal:d.rowsTotal,lastDurationMs:d.lastDurationMs,lastSeenAt:d.lastSeenAt,lastSql:d.lastSql,suppressedEvents:d.suppressed})).sort((d,c)=>c.maxMs-d.maxMs).slice(0,l$),shapesTracked:n.shapes.size,...n.accountsSeen>0?{requestAccounting:{requests:n.accountsSeen,...n.census}}:{},note:"count/avg are an UNDERCOUNT for hot shapes: the emitter flood-guards each query-shape fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events, reported by the next admitted event of the shape \u2014 drops with none after them are missing from it. requestAccounting, when present, is the requests' own census (statements run vs recorded on the bus), exact including those; per flow, read flow.get's overview.sql.",lastSampleAt:n.lastQueryAt,producer:n.lastQueryAt===void 0?"none":"connected",detail:n.lastQueryAt===void 0?"No db-query event has ever been observed \u2014 this is NOT evidence queries are fast, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps pg) so query timings reach this session.":`${n.shapes.size} query shape${n.shapes.size===1?"":"s"} observed; ${l.length} with a worst duration \u2265${t}ms.`}}),e.resources.register(qi,()=>{let l=[...n.analyzeRuns.values()].sort((B,w)=>w.runAt-B.runAt),d=l.flatMap(B=>B.findings),c=d.length,p=d.filter(B=>B.severity==="error").length,m=d.filter(B=>B.severity==="warning").length,f=c-p-m,h=l.filter(B=>B.droppedFindings!==void 0),g=h.reduce((B,w)=>B+(w.droppedFindings??0),0),E=h.length>0;return{schemaVersion:1,revision:e.resources.revision(qi)??0,updatedAt:new Date(n.changedAt??r).toISOString(),runs:l,findingCount:c,errorCount:p,warningCount:m,infoCount:f,...E?{incomplete:!0,droppedFindings:g}:{},lastSampleAt:n.lastAnalyzeAt,producer:n.lastAnalyzeAt===void 0?"none":"connected",detail:n.lastAnalyzeAt===void 0?"No db-analyze run has ever been ingested \u2014 this is NOT evidence the schema is healthy, nothing has analyzed it. Run the workspace's DB analyzer (it appends a `db-analyze-run` event to the lens bus file) to populate this.":`${l.length} analyze run${l.length===1?"":"s"} held (latest per project); ${c} finding${c===1?"":"s"} (${p} error, ${m} warning, ${f} info).`+(E?` INCOMPLETE: ${g>0?`${g} more findings were`:"part of a run was"} cut by the bus payload bound before reaching the lens (an event over 32 KiB keeps only the first 64 items of a list), and the cut takes whatever came last. The analyzer must keep one run under that bound, most severe first.`:"")}}),{unsubscribe:i,uris:[br,qi]}}s(iy,"zg"),o(iy,"installDbReducer");import{App as m$}from"@frontmcp/sdk";import{Resource as f$,ResourceContext as h$}from"@frontmcp/sdk";var Dc=class extends h${static{s(this,"Og")}static{o(this,"NetEgressHostsResource")}async execute(){return this.get(O).read("net://egress/hosts")}};Dc=_([f$({name:"net-egress-hosts",uri:"net://egress/hosts",mimeType:"application/json",description:"External hosts this backend called (pod \u2192 third party), rolled up per project\xB7host with count, error/4xx/5xx counters, p95 and worst duration, plus the top endpoints under each. `slow` and `failing` are retracted by later healthy responses, so a one-off blip does not warn all day."})],Dc);var g$=Dc;import{Resource as v$,ResourceContext as y$}from"@frontmcp/sdk";var wc=class extends y${static{s(this,"Pg")}static{o(this,"NetEgressRecentResource")}async execute(){return this.get(O).read("net://egress/recent")}};wc=_([v$({name:"net-egress-recent",uri:"net://egress/recent",mimeType:"application/json",description:"The last 200 outbound calls with their RAW path and the flowId that caused them \u2014 the evidence behind net://egress/hosts. Query strings are never captured; treat this as the sensitive view, since a path segment can itself be a secret."})],wc);var E$=wc;import{Resource as b$,ResourceContext as D$}from"@frontmcp/sdk";var Bc=class extends D${static{s(this,"Ng")}static{o(this,"NetEgressFailuresResource")}async execute(){return this.get(O).read("net://egress/failures")}};Bc=_([b$({name:"net-egress-failures",uri:"net://egress/failures",mimeType:"application/json",description:"Outbound calls that failed \u2014 transport errors and any status \u2265 400 \u2014 kept in their own ring so a high-volume host cannot evict the one failure you need. Empty is NOT proof nothing failed: check `producer`."})],Bc);var w$=Bc,xc=class{static{s(this,"ao")}static{o(this,"NetApp")}};xc=_([m$({id:"net",name:"Net",description:"Outbound (egress) HTTP the backend makes to THIRD PARTIES \u2014 which external services, how often, how slow, and whether they failed. The server-side twin of runtime://browser/network. Internal service-to-service traffic is deliberately absent: the gateway already attributes it.",resources:[g$,E$,w$]})],xc);var Vi="net://egress/hosts",Ji="net://egress/recent",Gi="net://egress/failures",eu=20,B$=25,x$=200,$$=20,C$=5,sy=200,ay=50,oy=2;function ly(e){return e.length===0?!1:!!(/^\d{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[A-Z][A-Z0-9]*-\d+$/.test(e)||e.length>=16&&/^[A-Za-z0-9_-]+$/.test(e)&&/\d/.test(e))}s(ly,"wO"),o(ly,"isIdSegment");function dy(e){let[t="/"]=e.split("?"),r=t.split("/"),n=[];for(let i of r){if(n.length>12){n.push("\u2026");break}n.push(ly(i)?":id":i)}let u=n.join("/");return u.length===0?"/":u}s(dy,"n$"),o(dy,"templatisePath");function cy(e){let t=je(e.thresholds).slowEgressMs,r=(e.now??(()=>Date.now()))(),n={hosts:new Map,recent:[],failures:[]},u=o(p=>{let m=p.raw??null;if(!m||m.kind!=="egress")return;let f=m.project??"unknown",h=m.host??"unknown",g=(m.method??"GET").toUpperCase(),E=m.durationMs??0,B=typeof m.status=="number"?m.status:void 0,w=m.error===void 0?void 0:String(m.error),b=w!==void 0||B!==void 0&&B>=400,$=m.path??"(path not captured \u2014 upgrade @lensmcp/node-instrumentation)",x=`${f}|${h}`,F=n.hosts.get(x);F||(F={project:f,host:h,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,maxAt:p.timestamp,recent:[],outcomes:[],firstSeenAt:p.timestamp,lastSeenAt:p.timestamp,lastDurationMs:0,lastBad:!1,suppressed:0,endpoints:new Map}),n.hosts.delete(x),n.hosts.set(x,F),F.count+=1,w!==void 0&&(F.errorCount+=1),B!==void 0&&B>=400&&B<500&&(F.status4xx+=1),B!==void 0&&B>=500&&(F.status5xx+=1),F.totalMs+=E,E>F.maxMs&&(F.maxMs=E,F.maxAt=p.timestamp),F.recent.push(E),F.recent.length>eu&&F.recent.splice(0,F.recent.length-eu),F.outcomes.push(b),F.outcomes.length>eu&&F.outcomes.splice(0,F.outcomes.length-eu),F.lastDurationMs=E,F.lastBad=b,F.lastSeenAt=p.timestamp,F.suppressed+=m.floodSuppressed??0;let C=dy($),j=`${g} ${C}`,q=F.endpoints.get(j);if(q||(q={method:g,path:C,count:0,errorCount:0,status4xx:0,status5xx:0,totalMs:0,maxMs:0,recent:[],lastDurationMs:0,lastSeenAt:p.timestamp}),F.endpoints.delete(j),F.endpoints.set(j,q),q.count+=1,w!==void 0&&(q.errorCount+=1,q.lastError=w),B!==void 0&&B>=400&&B<500&&(q.status4xx+=1),B!==void 0&&B>=500&&(q.status5xx+=1),q.totalMs+=E,E>q.maxMs&&(q.maxMs=E),q.recent.push(E),q.recent.length>eu&&q.recent.splice(0,q.recent.length-eu),q.lastStatus=B,q.lastDurationMs=E,q.lastSeenAt=p.timestamp,F.endpoints.size>$$){let le=F.endpoints.keys().next().value;le!==void 0&&F.endpoints.delete(le)}if(n.hosts.size>x$){let le=n.hosts.keys().next().value;le!==void 0&&n.hosts.delete(le)}let Q=p.context??{},X={id:p.id,timestamp:p.timestamp,project:f,method:g,host:h,path:$,...B!==void 0?{status:B}:{},...w!==void 0?{error:w}:{},durationMs:E,...Q.flowId?{flowId:Q.flowId}:{},...Q.requestId?{requestId:Q.requestId}:{}};n.recent.push(X),n.recent.length>sy&&n.recent.splice(0,n.recent.length-sy),b&&(n.failures.push(X),n.failures.length>ay&&n.failures.splice(0,n.failures.length-ay),e.resources.markDirty(Gi)),n.lastSampleAt=Math.max(n.lastSampleAt??0,p.timestamp),n.changedAt=p.timestamp,e.resources.markDirty(Vi),e.resources.markDirty(Ji)},"handler"),i=e.bus.subscribe(u),a=o(p=>{if(p.length===0)return 0;let m=[...p].sort((f,h)=>f-h);return m[Math.min(m.length-1,Math.floor(m.length*.95))]??0},"p95"),l=o(p=>p.lastDurationMs>=t||p.recent.filter(m=>m>=t).length>=oy,"isSlow"),d=o(p=>p.lastBad||p.outcomes.filter(Boolean).length>=oy,"isFailing"),c=o(p=>{let m=p.outcomes.filter(Boolean).length;return d(p)?`${m} of the last ${p.outcomes.length} call${p.outcomes.length===1?"":"s"} failed`:l(p)?`${p.recent.filter(f=>f>=t).length} of the last ${p.recent.length} call${p.recent.length===1?"":"s"} took \u2265${t}ms`:"healthy"},"describe");return e.resources.register(Vi,()=>{let p=[...n.hosts.values()],m=p.filter(d),f=p.filter(h=>!d(h)&&l(h));return{schemaVersion:1,revision:e.resources.revision(Vi)??0,updatedAt:new Date(n.changedAt??r).toISOString(),thresholdMs:t,hosts:p.map(h=>({project:h.project,host:h.host,count:h.count,errorCount:h.errorCount,status4xx:h.status4xx,status5xx:h.status5xx,avgMs:Math.round(h.totalMs/Math.max(h.count,1)*10)/10,p95Ms:a(h.recent),maxMs:h.maxMs,maxAt:h.maxAt,lastDurationMs:h.lastDurationMs,firstSeenAt:h.firstSeenAt,lastSeenAt:h.lastSeenAt,slow:l(h),failing:d(h),detail:c(h),suppressedEvents:h.suppressed,endpoints:[...h.endpoints.values()].map(g=>({method:g.method,path:g.path,count:g.count,errorCount:g.errorCount,status4xx:g.status4xx,status5xx:g.status5xx,avgMs:Math.round(g.totalMs/Math.max(g.count,1)*10)/10,p95Ms:a(g.recent),maxMs:g.maxMs,...g.lastStatus!==void 0?{lastStatus:g.lastStatus}:{},...g.lastError!==void 0?{lastError:g.lastError}:{},lastSeenAt:g.lastSeenAt})).sort((g,E)=>E.maxMs-g.maxMs).slice(0,C$)})).sort((h,g)=>h.failing!==g.failing?h.failing?-1:1:g.maxMs-h.maxMs).slice(0,B$),hostsTracked:n.hosts.size,failingHosts:m.length,slowHosts:f.length,note:"count/avg are an UNDERCOUNT for hot hosts: the emitter flood-guards each host fingerprint at 30 burst / 5 events/s; suppressedEvents is the emitter's own count of dropped events. Query strings are not captured; endpoint paths are templatised (\u2026/:id).",lastSampleAt:n.lastSampleAt,producer:n.lastSampleAt===void 0?"none":"connected",detail:n.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching. Run the backend under the dev cluster (the @lensmcp/cluster serve preload taps fetch and http/https) so outbound calls reach this session. Internal destinations (*.local, loopback, RFC1918) are skipped by design \u2014 the gateway already attributes service-to-service traffic.":`${n.hosts.size} external host${n.hosts.size===1?"":"s"} observed; ${m.length} failing, ${f.length} slower than ${t}ms.`}}),e.resources.register(Ji,()=>({schemaVersion:1,revision:e.resources.revision(Ji)??0,updatedAt:new Date(n.changedAt??r).toISOString(),entries:[...n.recent],count:n.recent.length,note:"Raw paths, as requested. flowId joins an outbound call back to the click that caused it. Treat this as the sensitive view: a path segment can itself be a secret (a presigned key, a reset token), which the templatised rollup collapses but this does not.",lastSampleAt:n.lastSampleAt,producer:n.lastSampleAt===void 0?"none":"connected",detail:n.lastSampleAt===void 0?"No egress event has ever been observed \u2014 this is NOT evidence the app makes no external calls, nothing is watching.":`${n.recent.length} recent outbound call${n.recent.length===1?"":"s"}.`})),e.resources.register(Gi,()=>({schemaVersion:1,revision:e.resources.revision(Gi)??0,updatedAt:new Date(n.changedAt??r).toISOString(),entries:[...n.failures],count:n.failures.length,note:"A separate ring from net://egress/recent on purpose: a host called 200\xD7/min would otherwise evict the one 503 you need.",lastSampleAt:n.lastSampleAt,producer:n.lastSampleAt===void 0?"none":"connected",detail:n.lastSampleAt===void 0?"No egress event has ever been observed \u2014 an empty list here is NOT evidence that nothing failed, nothing is watching.":`${n.failures.length} failed outbound call${n.failures.length===1?"":"s"} held.`})),{unsubscribe:i,uris:[Vi,Ji,Gi]}}s(cy,"Cg"),o(cy,"installNetReducer");import{App as k$}from"@frontmcp/sdk";import{Resource as A$,ResourceContext as _$}from"@frontmcp/sdk";var $c=class extends _${static{s(this,"Ug")}static{o(this,"VisualCurrentResource")}async execute(){return this.get(O).read("visual://current")}};$c=_([A$({name:"visual-current",uri:"visual://current",mimeType:"application/json",description:"Most recent visual-frame (causedBy, changedNodes, stable)."})],$c);var I$=$c;import{Resource as S$,ResourceContext as F$}from"@frontmcp/sdk";var Cc=class extends F${static{s(this,"Fg")}static{o(this,"VisualViolationsCurrentResource")}async execute(){return this.get(O).read("visual://violations/current")}};Cc=_([S$({name:"visual-violations-current",uri:"visual://violations/current",mimeType:"application/json",description:"Violations of the CURRENT frame, regardless of timing mode. Every rule re-runs per frame, so a fixed violation simply stops being reported."})],Cc);var z$=Cc;import{Resource as j$,ResourceContext as O$}from"@frontmcp/sdk";var kc=class extends O${static{s(this,"Zg")}static{o(this,"VisualViolationsStableResource")}async execute(){return this.get(O).read("visual://violations/stable")}};kc=_([j$({name:"visual-violations-stable",uri:"visual://violations/stable",mimeType:"application/json",description:'Violations from rules with timing "after-animation" | "stable-only" | "always".'})],kc);var R$=kc;import{Resource as T$,ResourceContext as N$}from"@frontmcp/sdk";var Ac=class extends N${static{s(this,"qg")}static{o(this,"VisualViolationsDuringAnimationResource")}async execute(){return this.get(O).read("visual://violations/during-animation")}};Ac=_([T$({name:"visual-violations-during-animation",uri:"visual://violations/during-animation",mimeType:"application/json",description:"Violations seen on midpoint (during-animation) samples only."})],Ac);var M$=Ac;import{Resource as P$,ResourceContext as U$}from"@frontmcp/sdk";var _c=class extends U${static{s(this,"Jg")}static{o(this,"VisualRulesResource")}async execute(){return this.get(O).read("visual://rules")}};_c=_([P$({name:"visual-rules",uri:"visual://rules",mimeType:"application/json",description:"All registered visual rules (builtins + lensmcp.rules.json + visual.register_rule)."})],_c);var Z$=_c;import{Resource as L$,ResourceContext as q$}from"@frontmcp/sdk";var Ic=class extends q${static{s(this,"Kg")}static{o(this,"VisualTokensResource")}async execute(){return this.get(O).read("visual://tokens")}};Ic=_([L$({name:"visual-tokens",uri:"visual://tokens",mimeType:"application/json",description:"Resolved design tokens from lensmcp.tokens.json."})],Ic);var V$=Ic;import{Tool as J$,ToolContext as G$,z as py}from"@frontmcp/sdk";import{existsSync as W$,mkdirSync as K$,readFileSync as H$,writeFileSync as X$}from"node:fs";import{dirname as Y$,join as Sc}from"node:path";function Fc(e=process.env,t=process.cwd()){let r=e.LENSMCP_EVENT_FILE;return r?Y$(r):Sc(t,".lensmcp")}s(Fc,"ga"),o(Fc,"captureDir");function my(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(my,"LO"),o(my,"pidAlive");function zc(e,t=my){let r=Sc(e,uD);try{if(!W$(r))return;let n=JSON.parse(H$(r,"utf8"));return typeof n?.pid!="number"||!Number.isFinite(n.pid)?void 0:t(n.pid)?n:void 0}catch{return}}s(zc,"va"),o(zc,"liveRunner");function fy(e,t){try{return K$(e,{recursive:!0}),X$(Sc(e,tD),JSON.stringify(t)),!0}catch{return!1}}s(fy,"o$"),o(fy,"publishCaptureRequest");var jc;async function hy(e,t){let r=jc;if(r)return{fresh:await r.promise,coalesced:!0,requestId:r.requestId};let n=t().finally(()=>{jc=void 0});return jc={promise:n,requestId:e},{fresh:await n,coalesced:!1,requestId:e}}s(hy,"i$"),o(hy,"captureSingleFlight");async function gy(e){let t=e.now??(()=>Date.now()),r=e.sleep??(a=>new Promise(l=>setTimeout(l,a))),n=e.budgetMs??8e3,u=e.pollMs??100,i=t()+n;for(;t()<i;){await r(u);let a=await e.readFrameId();if(a!==void 0&&a!==e.before)return!0}return!1}s(gy,"s$"),o(gy,"waitForFreshFrame");var Oc=class extends G${static{s(this,"Qg")}static{o(this,"VisualCaptureFrameTool")}async execute(e){let t=this.get(sr),r=this.get(O),n=o(async()=>(await r.read("visual://current"))?.frame?.id,"readFrameId"),u=await n(),i=Pe(),a=Date.now();t.publish({id:Pe(),sessionId:"visual.capture_frame",timestamp:a,source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.capture_frame"},fingerprint:`visual-capture-request:${e.cause}`,title:`visual.capture_frame(${e.cause})`,raw:{kind:"visual-capture-request",cause:e.cause,stable:e.stable,requestId:i}});let l=Fc(),d=zc(l),c=!1,p=await hy(i,async()=>(c=fy(l,{requestedAt:a,cause:e.cause,stable:e.stable,requestId:i}),c&&d?await gy({readFrameId:n,before:u}):!1));return{requested:p.coalesced?!0:c,cause:e.cause,stable:e.stable,fresh:p.fresh,coalesced:p.coalesced,requestId:p.requestId,waitedMs:Date.now()-a,runner:d?{pid:d.pid,url:d.url}:void 0,latest:await r.read("visual://current")}}};Oc=_([J$({name:"visual.capture_frame",description:"Capture a fresh visual frame. Signals the host capture runner (which launches a headless browser on demand), waits for the new frame, and returns it. Frames are captured per request \u2014 no browser is held open between calls.",inputSchema:{cause:py.enum(["page-load","route-change","user-action","react-commit","state-update","api-response","hmr-update","animation-tick"]).default("user-action").describe("Hint why this frame is being requested."),stable:py.boolean().default(!0).describe("Whether to treat the captured frame as the stable final state.")}})],Oc);var Q$=Oc;import{Tool as eC,ToolContext as tC,z as uC}from"@frontmcp/sdk";var Rc=class extends tC{static{s(this,"tv")}static{o(this,"VisualInspectNodeTool")}async execute(e){let t=await this.get(O).read("visual://current");if(!t.frame)return{found:!1,uid:e.uid};let r=t.frame.changedNodes.filter(n=>n.uid===e.uid);return{found:r.length>0,uid:e.uid,frameId:t.frame.id,changes:r}}};Rc=_([eC({name:"visual.inspect_node",description:"Returns the changedNodes entry for `uid` from visual://current \u2014 the per-property before/after used to compute the latest frame.",inputSchema:{uid:uC.string().describe('Node uid as it appeared in visual://current.changedNodes (e.g. "hero-card" or "bid:42").')}})],Rc);var rC=Rc;import{Tool as nC,ToolContext as iC,z as sC}from"@frontmcp/sdk";var Tc=class extends iC{static{s(this,"nv")}static{o(this,"VisualCompareFramesTool")}async execute(e){let t=await this.get(O).read("visual://current");return t.frame?e.frameId&&e.frameId!==t.frame.id?{found:!1,reason:"Only the latest frame is retained in Phase 4."}:{found:!0,frameId:t.frame.id,causedBy:t.frame.causedBy,changedCount:t.frame.changedNodes.length,appeared:t.frame.appearedNodes.length,disappeared:t.frame.disappearedNodes.length,changedNodes:t.frame.changedNodes.slice(0,50)}:{found:!1}}};Tc=_([nC({name:"visual.compare_frames",description:"Summarises the last visual-frame. Phase 4 ships a single-frame view (Phase 6 adds story-relative deltas).",inputSchema:{frameId:sC.string().optional().describe("Optional frame id; defaults to the latest.")}})],Tc);var aC=Tc;import{Tool as oC,ToolContext as lC,z as dC}from"@frontmcp/sdk";var Nc=class extends lC{static{s(this,"iv")}static{o(this,"VisualExplainViolationTool")}async execute(e){let t=(await this.get(O).read("visual://violations/current")).violations.find(r=>r.id===e.violationId);return t?{found:!0,violation:t,explanation:vy(t)}:{found:!1,violationId:e.violationId}}};Nc=_([oC({name:"visual.explain_violation",description:"Returns the full violation record (rule id + expected/actual + evidence.cssCause / trace / screenshot crop URIs) for a given violationId.",inputSchema:{violationId:dC.string().describe("Id of the violation as seen in visual://violations/current.")}})],Nc);var cC=Nc;function vy(e){let t=[`Rule ${e.ruleId} (${e.ruleType}) at ${e.element.component??e.element.uid}.`,`Expected: ${JSON.stringify(e.expected)}`,`Actual: ${JSON.stringify(e.actual)}`];return e.evidence.cssCause&&t.push(`CSS cause: ${e.evidence.cssCause.selector} { ${e.evidence.cssCause.declaration??"?"} }`+(e.evidence.cssCause.file?` @ ${e.evidence.cssCause.file}:${e.evidence.cssCause.line??"?"}`:"")),e.evidence.trace&&t.push(`Trace: ${e.evidence.trace}`),e.evidence.screenshotCrop&&t.push(`Crop: ${e.evidence.screenshotCrop}`),t.join(`
71
+ `)}s(vy,"YO"),o(vy,"buildExplanation");import{Tool as pC,ToolContext as mC,z as Be}from"@frontmcp/sdk";import{mkdirSync as fC,readFileSync as hC,renameSync as gC,writeFileSync as vC}from"node:fs";import{join as yC}from"node:path";var EC=500;function yy(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}s(yy,"ij"),o(yy,"pidAlive");function Ey(e){try{let t=JSON.parse(hC(e,"utf8"));return Array.isArray(t?.rules)?t.rules:[]}catch{return[]}}s(Ey,"sj"),o(Ey,"readEntries");function by(e,t,r={}){let n=r.pid??process.pid,u=r.isAlive??yy,i=yC(e,rD),a=[...Ey(i).filter(d=>typeof d?.registeredBy=="number"&&typeof d?.rule?.id=="string"&&d.rule.id!==t.id&&(d.registeredBy===n||u(d.registeredBy))),{rule:t,registeredBy:n,registeredAt:(r.now??Date.now)()}].slice(-EC);fC(e,{recursive:!0});let l=`${i}.${n}.tmp`;return vC(l,JSON.stringify({schemaVersion:1,rules:a})),gC(l,i),a}s(by,"c$"),o(by,"registerSessionRule");var Mc=class extends mC{static{s(this,"av")}static{o(this,"VisualRegisterRuleTool")}async execute(e){let t=this.get(sr),r=this.get(O),n={id:e.id,type:e.type,target:e.target,severity:e.severity,timing:e.timing,expected:e.expected,breakpoints:e.breakpoints};t.publish({id:Pe(),sessionId:"visual.register_rule",timestamp:Date.now(),source:"visual",category:"visual",severity:"info",context:{sessionId:"visual.register_rule"},fingerprint:`visual-rule-registered:${e.id}`,title:`visual.register_rule(${e.id})`,raw:{kind:"visual-rule-registered",rule:n}});let u=Fc(),i=!1,a;try{by(u,n),i=zc(u)!==void 0,a=i?"The capture runner evaluates this rule on the next captured frame (visual.capture_frame).":"No capture runner is listening, so nothing will evaluate this rule until one starts (the dev cluster gateway or agent-dev). It is listed, not enforced."}catch(l){a=`Could not hand the rule to the capture runner (${l.message}). It is listed, but will NOT be evaluated.`}return{registered:!0,evaluated:i,note:a,rule:{id:e.id,type:e.type,target:e.target},rules:await r.read("visual://rules")}}};Mc=_([pC({name:"visual.register_rule",description:"Register (or replace) a visual rule. It is handed to the capture runner, which evaluates it on every frame captured from now on, for as long as this lens server runs. The result says whether a runner is listening; if `evaluated` is false the rule is only listed, and no violation can come of it.",inputSchema:{id:Be.string().describe("Stable rule id; replaces a prior rule with the same id."),type:Be.enum(["grid-spacing","alignment","overflow","text-clipping","color-contrast","token-usage","z-index","responsive","custom"]).describe("Built-in rule type to evaluate."),target:Be.string().optional().describe('CSS-like selector / role:label / [data-agent-component="\u2026"]; default = every node.'),severity:Be.enum(["info","warning","error"]).default("warning"),timing:Be.enum(["always","after-animation","stable-only","during-animation"]).default("always"),expected:Be.record(Be.string(),Be.unknown()).default({}).describe('Rule-type-specific expectations (e.g. { gap: "spacing.6" }).'),breakpoints:Be.record(Be.string(),Be.record(Be.string(),Be.unknown())).optional().describe("Per-breakpoint expectation overrides for the responsive rule type.")}})],Mc);var bC=Mc,Pc=class{static{s(this,"co")}static{o(this,"VisualApp")}};Pc=_([k$({id:"visual",name:"Visual",description:"Visual rule engine: DOMSnapshot/LayerTree diffs, grid/alignment/overflow/contrast/z-index rules, design tokens.",resources:[I$,z$,R$,M$,Z$,V$],tools:[Q$,rC,aC,cC,bC]})],Pc);var Dr="visual://current",wr="visual://violations/current",Br="visual://violations/stable",xr="visual://violations/during-animation",$r="visual://rules",Cr="visual://tokens";function Dy(e){let t=(e.now??(()=>Date.now()))(),r={violations:[],rules:[],framesSeen:0,changedAt:new Map},n=o((f,h)=>{r.changedAt.set(f,h),e.resources.markDirty(f)},"touch"),u=o(f=>{n(wr,f),n(Br,f),n(xr,f)},"touchViolationViews"),i=o(f=>{let h=f.raw??null;if(h?.kind)switch(h.kind){case"visual-frame":{let g=h.frame;if(!g)return;r.currentFrame=g,r.lastFrameAt=f.timestamp,r.framesSeen+=1,r.rulesEvaluated=typeof h.rulesEvaluated=="number"?h.rulesEvaluated:void 0,n(Dr,f.timestamp);let E=r.violations.length;r.violations=r.violations.filter(B=>B.frameId===g.id),E!==r.violations.length&&u(f.timestamp);return}case"visual-violation":if(!h.violation)return;r.violations.push(h.violation),r.violations.length>50&&r.violations.splice(0,r.violations.length-50),u(f.timestamp);return;case"visual-rule-registered":{let g=h.rule;if(!g)return;let E=r.rules.findIndex(B=>B.id===g.id);E>=0&&r.rules.splice(E,1),r.rules.push(g),r.rules.length>500&&r.rules.splice(0,r.rules.length-500),n($r,f.timestamp);return}case"visual-tokens-loaded":if(!h.tokens)return;r.tokens=h.tokens,n(Cr,f.timestamp);return;default:return}},"handler"),a=e.bus.subscribe(i),l=o(f=>new Date(r.changedAt.get(f)??t).toISOString(),"stamp"),d="No visual frame has ever been captured \u2014 an empty violation list is NOT evidence the UI is correct, nothing is looking. Drive a capture (visual_capture_frame) or run the browser-capture loop so frames reach this session.",c=o(()=>`${r.framesSeen} frame${r.framesSeen===1?"":"s"} captured`,"frameCount"),p=o(()=>({framesSeen:r.framesSeen,lastFrameAt:r.lastFrameAt,currentFrameId:r.currentFrame?.id,...r.rulesEvaluated!==void 0?{rulesEvaluated:r.rulesEvaluated}:{},producer:r.framesSeen===0?"none":"connected",detail:r.framesSeen===0?d:r.rulesEvaluated===void 0?`${c()}; ${r.rules.length} rule${r.rules.length===1?"":"s"} registered.`:`${c()}; ${r.rulesEvaluated} rule${r.rulesEvaluated===1?"":"s"} evaluated on the current one.`}),"frameHealth"),m=o(()=>{let f=p();return r.framesSeen===0||r.rulesEvaluated===void 0?r.framesSeen===0?f:{...f,detail:`${f.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}:r.rulesEvaluated===0?{...f,producer:"none",detail:`${c()}, but NO rule was evaluated on the current one \u2014 an empty violation list is NOT evidence the UI is correct, nothing is being checked. Add rules to \`lensmcp.rules.json\` at the workspace root, or register one with visual.register_rule.`}:{...f,detail:`${f.detail} Violations are those of the CURRENT frame \u2014 every rule is re-run per frame, so anything fixed simply stops being reported.`}},"violationHealth");return e.resources.register(Dr,()=>({schemaVersion:1,revision:e.resources.revision(Dr)??0,updatedAt:l(Dr),frame:r.currentFrame??null,...p()})),e.resources.register(wr,()=>({schemaVersion:1,revision:e.resources.revision(wr)??0,updatedAt:l(wr),violations:r.violations.slice(),...m()})),e.resources.register(Br,()=>({schemaVersion:1,revision:e.resources.revision(Br)??0,updatedAt:l(Br),violations:r.violations.filter(f=>f.timing==="after-animation"||f.timing==="stable-only"||f.timing==="always"),...m()})),e.resources.register(xr,()=>({schemaVersion:1,revision:e.resources.revision(xr)??0,updatedAt:l(xr),violations:r.violations.filter(f=>f.timing==="during-animation"),...m()})),e.resources.register($r,()=>({schemaVersion:1,revision:e.resources.revision($r)??0,updatedAt:l($r),rules:r.rules.slice()})),e.resources.register(Cr,()=>({schemaVersion:1,revision:e.resources.revision(Cr)??0,updatedAt:l(Cr),tokens:r.tokens??null})),{unsubscribe:a,uris:[Dr,wr,Br,xr,$r,Cr]}}s(Dy,"uv"),o(Dy,"installVisualReducer");import{App as DC}from"@frontmcp/sdk";import{Resource as wC,ResourceContext as BC}from"@frontmcp/sdk";var Uc=class extends BC{static{s(this,"lv")}static{o(this,"ReactPagesCurrentResource")}async execute(){return this.get(O).read("react://pages/current")}};Uc=_([wC({name:"react-pages-current",uri:"react://pages/current",mimeType:"application/json",description:"The most recently active React page (from <LensmcpRoot>)."})],Uc);var xC=Uc;import{Resource as $C,ResourceContext as CC}from"@frontmcp/sdk";var Zc=class extends CC{static{s(this,"pv")}static{o(this,"ReactComponentsHotResource")}async execute(){return this.get(O).read("react://components/hot")}};Zc=_([$C({name:"react-components-hot",uri:"react://components/hot",mimeType:"application/json",description:"Components ranked by render count this session."})],Zc);var kC=Zc;import{Resource as AC,ResourceContext as _C}from"@frontmcp/sdk";var Lc=class extends _C{static{s(this,"fv")}static{o(this,"ReactRendersSlowResource")}async execute(){return this.get(O).read("react://renders/slow")}};Lc=_([AC({name:"react-renders-slow",uri:"react://renders/slow",mimeType:"application/json",description:"Renders with actualDurationMs >= threshold (default 16ms)."})],Lc);var IC=Lc;import{Resource as SC,ResourceContext as FC}from"@frontmcp/sdk";var qc=class extends FC{static{s(this,"gv")}static{o(this,"ReactRendersRecentResource")}async execute(){return this.get(O).read("react://renders/recent")}};qc=_([SC({name:"react-renders-recent",uri:"react://renders/recent",mimeType:"application/json",description:"Last 100 render commits with attribution (why)."})],qc);var zC=qc;import{Resource as jC,ResourceContext as OC}from"@frontmcp/sdk";var Vc=class extends OC{static{s(this,"yv")}static{o(this,"ReactEffectsRecentResource")}async execute(){return this.get(O).read("react://effects/recent")}};Vc=_([jC({name:"react-effects-recent",uri:"react://effects/recent",mimeType:"application/json",description:"Last 100 useEffect runs/cleanups from tracedUseEffect."})],Vc);var RC=Vc;import{Resource as TC,ResourceContext as NC}from"@frontmcp/sdk";var Jc=class extends NC{static{s(this,"xv")}static{o(this,"ReactMemosRecomputedResource")}async execute(){return this.get(O).read("react://memos/recomputed")}};Jc=_([TC({name:"react-memos-recomputed",uri:"react://memos/recomputed",mimeType:"application/json",description:"Recent useMemo recomputations (depsHash changed)."})],Jc);var MC=Jc;import{Resource as PC,ResourceContext as UC}from"@frontmcp/sdk";var Gc=class extends UC{static{s(this,"wv")}static{o(this,"ReactHooksRecentResource")}async execute(){return this.get(O).read("react://hooks/recent")}};Gc=_([PC({name:"react-hooks-recent",uri:"react://hooks/recent",mimeType:"application/json",description:"Recent hook-run events (useMemo / useCallback)."})],Gc);var ZC=Gc;import{Tool as LC,ToolContext as qC,z as Wc}from"@frontmcp/sdk";var Kc=class extends qC{static{s(this,"Sv")}static{o(this,"GraphExplainRerenderTool")}async execute(e){let t=await this.get(O).read("react://renders/recent"),r;if(e.renderNodeId)r=t.renders.find(u=>u.id===e.renderNodeId);else if(e.componentInstanceId)for(let u=t.renders.length-1;u>=0;u--){let i=t.renders[u];if(i&&i.componentInstanceId===e.componentInstanceId){r=i;break}}else if(e.componentLogicalId)for(let u=t.renders.length-1;u>=0;u--){let i=t.renders[u];if(i&&i.componentLogicalId===e.componentLogicalId){r=i;break}}if(!r)return{found:!1,searched:e};let n=(r.why??[]).map(u=>({...u,summary:wy(u)}));return{found:!0,renderNodeId:r.id,componentInstanceId:r.componentInstanceId,componentLogicalId:r.componentLogicalId,componentName:r.componentName,page:r.page,route:r.route,phase:r.phase,actualDurationMs:r.actualDurationMs,why:n,parentRenderId:r.parentRenderId}}};Kc=_([LC({name:"graph.explain_rerender",description:"Returns the most recent render record for a component (by `renderNodeId`, `componentInstanceId`, or `componentLogicalId`), with its `why` causal list (valtio-path / parent-render / hook-dep-changed / props / context / react-state / force).",inputSchema:{renderNodeId:Wc.string().optional().describe("Exact render commit id from react://renders/recent."),componentInstanceId:Wc.string().optional().describe("Component instance id; resolves to that instance\u2019s last render."),componentLogicalId:Wc.string().optional().describe("Component logical id (e.g. react:component:src/App.tsx:CardGrid); resolves to its most recent render across HMR generations.")}})],Kc);var VC=Kc;function wy(e){switch(e.type){case"valtio-path":return`valtio path ${String(e.path)} changed (${e.changedKeys?.join(",")??""})`;case"react-state":return`useState hook #${String(e.hookIndex)} changed`;case"context":return`context ${String(e.contextName)} changed`;case"props":return`prop(s) changed: ${e.changedKeys?.join(",")??""}`;case"parent-render":return`parent render ${String(e.parentRenderId)} triggered this`;case"hook-dep-changed":return`hook ${String(e.hookInstanceId)} deps changed`;case"force":return`forced render: ${String(e.reason)}`;default:return`unknown cause: ${JSON.stringify(e)}`}}s(wy,"Ij"),o(wy,"summariseWhy");var Hc=class{static{s(this,"go")}static{o(this,"ReactApp")}};Hc=_([DC({id:"react",name:"React",description:"React render attribution: pages, hot components, slow renders, hook + effect + memo events. Hosts graph.explain_rerender.",resources:[xC,kC,IC,zC,RC,MC,ZC],tools:[VC]})],Hc);var kr="react://pages/current",Wi="react://components/hot",Ki="react://renders/slow",Hi="react://renders/recent",Xi="react://effects/recent",Yi="react://memos/recomputed",Qi="react://hooks/recent",es=100,Xc=50,By=500;function xy(e){let t=je(e.thresholds).slowRenderMs,r={rendersRecent:[],rendersSlow:[],effectsRecent:[],hooksRecent:[],memosRecomputed:[],rendersByInstance:new Map,hotByLogical:new Map},n=o(i=>{if(i.source!=="react")return;let a=i.raw??null;if(a?.kind)switch(a.kind){case"render":{let l=a.render;if(!l)return;if(tu(r.rendersRecent,l,es),r.rendersByInstance.delete(l.componentInstanceId),r.rendersByInstance.set(l.componentInstanceId,l),r.rendersByInstance.size>By){for(let c of r.rendersByInstance.keys())if(r.rendersByInstance.delete(c),r.rendersByInstance.size<=By)break}l.actualDurationMs>=t&&(tu(r.rendersSlow,l,Xc),r.rendersSlow.sort((c,p)=>p.actualDurationMs-c.actualDurationMs),r.rendersSlow.length>Xc&&(r.rendersSlow.length=Xc));let d=r.hotByLogical.get(l.componentLogicalId);d?(d.renderCount+=1,d.totalActualMs+=l.actualDurationMs,d.lastRenderId=l.id):r.hotByLogical.set(l.componentLogicalId,{componentLogicalId:l.componentLogicalId,componentName:l.componentName,renderCount:1,totalActualMs:l.actualDurationMs,lastRenderId:l.id}),(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:i.timestamp},e.resources.markDirty(kr)),e.resources.markDirty(Hi),e.resources.markDirty(Wi),l.actualDurationMs>=t&&e.resources.markDirty(Ki);return}case"effect-run":{let l=a.effect;if(!l)return;tu(r.effectsRecent,l,es),e.resources.markDirty(Xi);return}case"hook-run":{let l=a.hook;if(!l)return;tu(r.hooksRecent,l,es),e.resources.markDirty(Qi),l.recomputed&&l.hookType==="useMemo"&&(tu(r.memosRecomputed,l,es),e.resources.markDirty(Yi));return}case"component-mount":case"component-unmount":{let l=a.component;if(!l)return;(l.page||l.route)&&(r.currentPage={page:l.page??"(unknown)",route:l.route,updatedAt:i.timestamp},e.resources.markDirty(kr));return}default:return}},"handler"),u=e.bus.subscribe(n);return e.resources.register(kr,()=>({schemaVersion:1,revision:e.resources.revision(kr)??0,updatedAt:new Date().toISOString(),page:r.currentPage??null})),e.resources.register(Wi,()=>({schemaVersion:1,revision:e.resources.revision(Wi)??0,updatedAt:new Date().toISOString(),components:[...r.hotByLogical.values()].sort((i,a)=>a.renderCount-i.renderCount)})),e.resources.register(Ki,()=>({schemaVersion:1,revision:e.resources.revision(Ki)??0,updatedAt:new Date().toISOString(),thresholdMs:t,renders:r.rendersSlow.slice()})),e.resources.register(Hi,()=>({schemaVersion:1,revision:e.resources.revision(Hi)??0,updatedAt:new Date().toISOString(),renders:r.rendersRecent.slice()})),e.resources.register(Xi,()=>({schemaVersion:1,revision:e.resources.revision(Xi)??0,updatedAt:new Date().toISOString(),effects:r.effectsRecent.slice()})),e.resources.register(Yi,()=>({schemaVersion:1,revision:e.resources.revision(Yi)??0,updatedAt:new Date().toISOString(),memos:r.memosRecomputed.slice()})),e.resources.register(Qi,()=>({schemaVersion:1,revision:e.resources.revision(Qi)??0,updatedAt:new Date().toISOString(),hooks:r.hooksRecent.slice()})),{unsubscribe:u,uris:[kr,Wi,Ki,Hi,Xi,Yi,Qi],lookups:{latestRenderFor(i){return r.rendersByInstance.get(i)},latestRenderForLogical(i){if(r.hotByLogical.get(i))for(let a=r.rendersRecent.length-1;a>=0;a--){let l=r.rendersRecent[a];if(l&&l.componentLogicalId===i)return l}}}}}s(xy,"Ev"),o(xy,"installReactReducer");function tu(e,t,r){e.push(t),e.length>r&&e.splice(0,e.length-r)}s(tu,"yo"),o(tu,"pushBounded");import{App as JC}from"@frontmcp/sdk";import{Resource as GC,ResourceContext as WC}from"@frontmcp/sdk";var Yc=class extends WC{static{s(this,"Tv")}static{o(this,"ValtioUpdatesRecentResource")}async execute(){return this.get(O).read("valtio://updates/recent")}};Yc=_([GC({name:"valtio-updates-recent",uri:"valtio://updates/recent",mimeType:"application/json",description:"Last 100 Valtio state-update events with path + changedKeys + subscribers."})],Yc);var KC=Yc;import{Resource as HC,ResourceContext as XC}from"@frontmcp/sdk";var Qc=class extends XC{static{s(this,"zv")}static{o(this,"ValtioStoresResource")}async execute(){return this.get(O).read("valtio://stores")}};Qc=_([HC({name:"valtio-stores",uri:"valtio://stores",mimeType:"application/json",description:"Registered Valtio stores (created via lensmcp-wrapped proxy())."})],Qc);var YC=Qc;import{Resource as QC,ResourceContext as e7}from"@frontmcp/sdk";var ep=class extends e7{static{s(this,"jv")}static{o(this,"ValtioSubscribersResource")}async execute(){return this.get(O).read("valtio://subscribers")}};ep=_([QC({name:"valtio-subscribers",uri:"valtio://subscribers",mimeType:"application/json",description:"Per-(storeId, path) list of component instance ids currently subscribed via tracked useSnapshot."})],ep);var t7=ep,tp=class{static{s(this,"bo")}static{o(this,"ValtioApp")}};tp=_([JC({id:"valtio",name:"Valtio",description:"Valtio store + subscription tracking. Phase 5 ships updates/stores/subscribers; per-path subscriber walks land via graph.explain_rerender.",resources:[KC,YC,t7]})],tp);var ts="valtio://updates/recent",us="valtio://stores",Ar="valtio://subscribers",$y=100,Cy=1e3,u7=1e3,r7=256,n7=256;function ky(e,t){if(e.size<=t)return;let r=e.values();for(;e.size>t;){let n=r.next();if(n.done)break;e.delete(n.value)}}s(ky,"Cj"),o(ky,"capSet");function up(e){let t=Array.isArray(e.paths)?e.paths.filter(r=>typeof r=="string"):void 0;return t&&t.length>0?t.slice(0,r7):typeof e.path=="string"?[e.path]:[]}s(up,"p$"),o(up,"subscriptionPaths");function rp(e){return e.componentLogicalId??e.componentInstanceId??"react:component:anonymous"}s(rp,"m$"),o(rp,"subscriberId");function Ay(e){let t={updates:[],stores:new Map,subscribers:new Map,latestUpdateByPath:new Map},r=o(u=>{if(u.source!=="valtio")return;let i=u.raw??null;if(i?.kind)switch(i.kind){case"state-update":{let a=i.update;if(!a)return;let l={...a,emittedAt:u.timestamp};t.updates.push(l),t.updates.length>$y&&t.updates.splice(0,t.updates.length-$y);let d=`${a.storeId}::${a.path}`;if(t.latestUpdateByPath.delete(d),t.latestUpdateByPath.set(d,l),t.latestUpdateByPath.size>Cy){for(let c of t.latestUpdateByPath.keys())if(t.latestUpdateByPath.delete(c),t.latestUpdateByPath.size<=Cy)break}e.resources.markDirty(ts);return}case"store-created":{let a=i.store;if(!a)return;t.stores.set(a.storeId,{...a,createdAt:u.timestamp}),e.resources.markDirty(us);return}case"subscription-added":{let a=i.subscription;if(!a||!a.componentInstanceId)return;let l=rp(a);for(let d of up(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);p||(p=new Map,t.subscribers.set(c,p));let m=p.get(l);m||(m=new Set,p.set(l,m)),m.add(a.componentInstanceId),ft(p,ar),ky(m,n7)}ft(t.subscribers,u7),e.resources.markDirty(Ar);return}case"subscription-removed":{let a=i.subscription;if(!a||!a.componentInstanceId)return;let l=rp(a);for(let d of up(a)){let c=`${a.storeId}::${d}`,p=t.subscribers.get(c);if(!p)continue;let m=p.get(l);m&&(m.delete(a.componentInstanceId),m.size===0&&p.delete(l)),p.size===0&&t.subscribers.delete(c)}e.resources.markDirty(Ar);return}default:return}},"handler"),n=e.bus.subscribe(r);return e.resources.register(ts,()=>({schemaVersion:1,revision:e.resources.revision(ts)??0,updatedAt:new Date().toISOString(),updates:t.updates.slice()})),e.resources.register(us,()=>({schemaVersion:1,revision:e.resources.revision(us)??0,updatedAt:new Date().toISOString(),stores:[...t.stores.values()]})),e.resources.register(Ar,()=>({schemaVersion:1,revision:e.resources.revision(Ar)??0,updatedAt:new Date().toISOString(),subscriptions:[...t.subscribers.entries()].map(([u,i])=>{let[a,l]=u.split("::");return{storeId:a,path:l,componentInstanceIds:[...i.keys()]}})})),{unsubscribe:n,uris:[ts,us,Ar],lookups:{latestUpdateForPath(u,i){return t.latestUpdateByPath.get(`${u}::${i}`)},subscribersFor(u,i){return[...t.subscribers.get(`${u}::${i}`)?.keys()??[]]}}}}s(Ay,"Mv"),o(Ay,"installValtioReducer");import{App as i7}from"@frontmcp/sdk";import{Resource as s7,ResourceContext as a7}from"@frontmcp/sdk";var np=class extends a7{static{s(this,"Nv")}static{o(this,"GraphPatternsResource")}async execute(){return this.get(O).read("graph://patterns")}};np=_([s7({name:"graph-patterns",uri:"graph://patterns",mimeType:"application/json",description:"Recent detected anti-patterns (db-in-loop, n+1-query, render-storm)."})],np);var o7=np;import{Resource as l7,ResourceContext as d7}from"@frontmcp/sdk";var ip=class extends d7{static{s(this,"Cv")}static{o(this,"GraphEventLoopLagResource")}async execute(){return this.get(O).read("graph://performance/event-loop-lag")}};ip=_([l7({name:"graph-event-loop-lag",uri:"graph://performance/event-loop-lag",mimeType:"application/json",description:"Recent event-loop-lag samples + the max lag seen."})],ip);var c7=ip;import{Tool as p7,ToolContext as m7,z as f7}from"@frontmcp/sdk";var _y;function sp(e){_y=e}s(sp,"Ra"),o(sp,"setActiveGraphBuffer");function _r(){return _y?.events??[]}s(_r,"kt"),o(_r,"currentEvents");function bt(){let e=new Em;return Y1(e,_r()),e}s(bt,"je"),o(bt,"buildGraph");var ap=class extends m7{static{s(this,"Lv")}static{o(this,"GraphGetNodeTool")}async execute(e){let t=bt().getNode(e.nodeId);return t?{found:!0,node:t}:{found:!1,nodeId:e.nodeId}}};ap=_([p7({name:"graph.get_node",description:"Returns a single graph node by id (built from the current event window).",inputSchema:{nodeId:f7.string().describe("Node id (usually the originating event id).")}})],ap);var h7=ap;import{Tool as g7,ToolContext as v7,z as uu}from"@frontmcp/sdk";var y7=["ownership","caused","async","data","render","state","network","backend","db","visual","performance","memory","lifecycle"],op=class extends v7{static{s(this,"Bv")}static{o(this,"GraphTraverseTool")}async execute(e){let t=bt().traverse({from:e.from,lens:e.lens,depth:e.depth,direction:e.direction,maxNodes:e.maxNodes});return{nodeCount:t.nodes.length,edgeCount:t.edges.length,nodes:t.nodes.map(r=>({id:r.id,type:r.type,name:r.name,durationMs:r.durationMs,flowId:r.context.flowId})),edges:t.edges.map(r=>({from:r.from,to:r.to,axis:r.axis,type:r.type}))}}};op=_([g7({name:"graph.traverse",description:'Walk the multi-axis trace graph from a node along one or more edge axes (the "lens"). Bounded by depth + node count.',inputSchema:{from:uu.string().describe("Start node id."),lens:uu.array(uu.enum(y7)).min(1).describe('Edge axes to follow (e.g. ["caused","backend"]).'),depth:uu.number().int().positive().max(12).default(4),direction:uu.enum(["out","in","both"]).default("both"),maxNodes:uu.number().int().positive().max(1e3).default(200)}})],op);var E7=op;import{Tool as b7,ToolContext as D7,z as w7}from"@frontmcp/sdk";var lp=class extends D7{static{s(this,"Vv")}static{o(this,"GraphFindDbInLoopTool")}async execute(e){let t=Al(_r(),{threshold:e.threshold});return{count:t.length,matches:t}}};lp=_([b7({name:"graph.find_db_in_loop",description:"Scan the current event window for loops that issued more than `threshold` DB calls (N+1-ish backend anti-pattern).",inputSchema:{threshold:w7.number().int().positive().default(5)}})],lp);var B7=lp;import{Tool as x7,ToolContext as $7,z as C7}from"@frontmcp/sdk";var dp=class extends $7{static{s(this,"Gv")}static{o(this,"GraphFindSlowPathTool")}async execute(e){let t=bt(),r=new Map,n=_r(),u=e.from?[e.from]:n.filter(l=>l.context.originNodeId===void 0&&l.context.flowId).map(l=>l.id);for(let l of n){let d=t.traverse({from:l.id,lens:["caused","async","backend"],depth:1,direction:"out",maxNodes:50});r.set(l.id,d.edges.filter(c=>c.from===l.id).map(c=>c.to))}let i=o(l=>t.getNode(l)?.durationMs??0,"durationOf"),a=K1(u.length?u:n.map(l=>l.id),r,i);return{totalDurationMs:a.totalDurationMs,path:a.path.map(l=>{let d=t.getNode(l);return{id:l,name:d?.name,type:d?.type,durationMs:d?.durationMs}})}}};dp=_([x7({name:"graph.find_slow_path",description:"Find the slowest cumulative chain on the caused/async/backend axes starting from a node (or every flow origin if `from` is omitted).",inputSchema:{from:C7.string().optional().describe("Start node id; defaults to all flow origins.")}})],dp);var k7=dp;import{Tool as A7,ToolContext as _7,z as Iy}from"@frontmcp/sdk";var cp=class extends _7{static{s(this,"Wv")}static{o(this,"GraphTraceFromOriginTool")}async execute(e){let t=bt(),r=e.originNodeId;if(!t.getNode(r)){let i=_r().find(a=>a.context.originNodeId===e.originNodeId||a.raw?.origin?.nodeId===e.originNodeId);i&&(r=i.id)}let n=t.getNode(r);if(!n)return{found:!1,originNodeId:e.originNodeId};let u=t.traverse({from:r,lens:["caused","render","state","backend","async"],depth:e.depth,direction:"out",maxNodes:500});return{found:!0,origin:{id:r,name:n.name,type:n.type},nodeCount:u.nodes.length,nodes:u.nodes.map(i=>({id:i.id,type:i.type,name:i.name,durationMs:i.durationMs}))}}};cp=_([A7({name:"graph.trace_from_origin",description:'Given an origin node id (e.g. a data-agent-component value or an event id), returns every node reachable on the caused/render/state/backend axes \u2014 "what did this cause?".',inputSchema:{originNodeId:Iy.string().describe("Origin node id, logicalId, or originating event id."),depth:Iy.number().int().positive().max(12).default(6)}})],cp);var I7=cp;import{Tool as S7,ToolContext as F7,z as Sy}from"@frontmcp/sdk";var pp=class extends F7{static{s(this,"Xv")}static{o(this,"GraphFindStateUpdatesCausedByTool")}async execute(e){let t=bt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","state"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(n=>n.type==="state-update");return{found:!0,count:r.length,stateUpdates:r.map(n=>({id:n.id,name:n.name,logicalId:n.logicalId}))}}};pp=_([S7({name:"graph.find_state_updates_caused_by",description:'From an origin node, returns the state-update nodes reachable on the caused/state axes \u2014 "what state changed because of this?".',inputSchema:{from:Sy.string().describe("Origin node id."),depth:Sy.number().int().positive().max(12).default(6)}})],pp);var z7=pp;import{Tool as j7,ToolContext as O7,z as Fy}from"@frontmcp/sdk";var mp=class extends O7{static{s(this,"Yv")}static{o(this,"GraphFindBackendWorkCausedByClickTool")}async execute(e){let t=bt();if(!t.getNode(e.from))return{found:!1,from:e.from};let r=t.traverse({from:e.from,lens:["caused","backend","async"],depth:e.depth,direction:"out",maxNodes:500}).nodes.filter(n=>n.type==="server-request");return{found:!0,count:r.length,requests:r.map(n=>({id:n.id,name:n.name,durationMs:n.durationMs}))}}};mp=_([j7({name:"graph.find_backend_work_caused_by_click",description:'From a UI origin node, returns the server-request nodes reachable on the caused/backend/async axes \u2014 "what backend work did this click trigger?".',inputSchema:{from:Fy.string().describe("UI origin node id (e.g. the user-action event id)."),depth:Fy.number().int().positive().max(12).default(8)}})],mp);var R7=mp,fp=class{static{s(this,"_o")}static{o(this,"GraphApp")}};fp=_([i7({id:"graph",name:"Graph",description:"Multi-axis causal graph: traverse by lens, trace from origin, find slow paths + db-in-loop / n+1 / render-storm patterns.",resources:[o7,c7],tools:[h7,E7,B7,k7,I7,z7,R7]})],fp);var ru="graph://patterns",nu="graph://performance/event-loop-lag",hp=2e3,zy=8*1024*1024,T7=100,jy=100;function Oy(e){let t=je(e.thresholds),r=(e.now??(()=>Date.now()))(),n={events:[]},u=[],i=0,a=0,l=0,d=new Set,c=[],p=new Map,m,f=new Map,h=o(x=>{switch(x.kind){case"n+1-query":return`n+1:${String(x.details.signature??"")}`;case"render-storm":return`storm:${String(x.details.componentInstanceId??"")}`;case"db-in-loop":return`dbloop:${x.evidence[0]??""}`;default:return`${x.kind}:${x.evidence.join(",")}`}},"patternKey"),g=o(x=>{p.set(ru,x),e.resources.markDirty(ru)},"markPatterns"),E=o((x,F)=>{let C=h(x);if(f.delete(C),f.set(C,x),f.size>T7){let j=f.keys().next().value;j!==void 0&&f.delete(j)}g(F)},"pushPattern"),B=o(x=>{let F=!1;for(let[C,j]of f){if(j.evidence.length===0)continue;let q=j.evidence.filter(Q=>d.has(Q));if(q.length===0){f.delete(C),F=!0;continue}q.length!==j.evidence.length&&(j.evidence=q,F=!0)}F&&g(x)},"dropUnevidencedPatterns"),w=o(x=>{m=x.timestamp;let F=di(x);n.events.push(x),u.push(F),i+=F,d.add(x.id);let C=Math.max(0,n.events.length-hp),j=i;for(let X=0;X<C;X+=1)j-=u[X]??0;let q=0;for(;j>zy&&C<u.length;)j-=u[C]??0,C+=1,q+=1;if(C>0){let X=n.events.splice(0,C);u.splice(0,C),i=Math.max(0,j),a+=X.length,l+=q;for(let le of X)d.delete(le.id);B(x.timestamp)}let Q=x.raw??null;if(Q?.kind==="loop")for(let X of Al(n.events,{threshold:t.dbInLoop}))E(X,x.timestamp);if(Q?.kind==="db-query")for(let X of G1(n.events,{threshold:t.nPlusOne}))E(X,x.timestamp);if(x.source==="react"&&Q?.kind==="render")for(let X of W1(n.events,{threshold:t.renderStorm}))E(X,x.timestamp);x.source==="perf"&&Q?.kind==="event-loop-lag"&&typeof Q.lagMs=="number"&&(c.push({at:x.timestamp,lagMs:Q.lagMs,source:x.source}),c.length>jy&&c.splice(0,c.length-jy),p.set(nu,x.timestamp),e.resources.markDirty(nu))},"handler"),b=e.bus.subscribe(w);sp(n);let $=o(x=>new Date(p.get(x)??r).toISOString(),"stamp");return e.resources.register(ru,()=>({schemaVersion:1,revision:e.resources.revision(ru)??0,updatedAt:$(ru),patterns:[...f.values()],eventsBuffered:n.events.length,eventBufferCapacity:hp,lastEventAt:m,producer:m===void 0?"none":"connected"})),e.resources.register(nu,()=>({schemaVersion:1,revision:e.resources.revision(nu)??0,updatedAt:$(nu),samples:c.slice(),maxLagMs:c.reduce((x,F)=>Math.max(x,F.lagMs),0),lastEventAt:m})),{unsubscribe:o(()=>{sp(void 0),b()},"unsubscribe"),uris:[ru,nu],retentionStats:o(()=>({residentEvents:n.events.length,residentBytes:i,evictedEvents:a,evictedForBytes:l,eventCap:hp,byteCap:zy}),"retentionStats")}}s(Oy,"ty"),o(Oy,"installGraphReducer");import{App as N7}from"@frontmcp/sdk";import{Resource as M7,ResourceContext as P7}from"@frontmcp/sdk";var gp=class extends P7{static{s(this,"ry")}static{o(this,"MemoryCurrentResource")}async execute(){return this.get(O).read("memory://current")}};gp=_([M7({name:"memory-current",uri:"memory://current",mimeType:"application/json",description:"Last process-memory sample (heapUsed / rss)."})],gp);var U7=gp;import{Resource as Z7,ResourceContext as L7}from"@frontmcp/sdk";var vp=class extends L7{static{s(this,"oy")}static{o(this,"MemoryOwnersResource")}async execute(){return this.get(O).read("memory://owners")}};vp=_([Z7({name:"memory-owners",uri:"memory://owners",mimeType:"application/json",description:"All tracked container owners with current item count + byte estimate."})],vp);var q7=vp;import{Resource as V7,ResourceContext as J7}from"@frontmcp/sdk";var yp=class extends J7{static{s(this,"sy")}static{o(this,"MemoryOwnersGrowingResource")}async execute(){return this.get(O).read("memory://owners/growing")}};yp=_([V7({name:"memory-owners-growing",uri:"memory://owners/growing",mimeType:"application/json",description:"Top 20 container owners by growth-since-start."})],yp);var G7=yp;import{Resource as W7,ResourceContext as K7}from"@frontmcp/sdk";var Ep=class extends K7{static{s(this,"cy")}static{o(this,"MemoryLeaksSuspectedResource")}async execute(){return this.get(O).read("memory://leaks/suspected")}};Ep=_([W7({name:"memory-leaks-suspected",uri:"memory://leaks/suspected",mimeType:"application/json",description:"Suspected leaks: per-flow retentions + stale-generation singletons."})],Ep);var H7=Ep;import{Resource as X7,ResourceContext as Y7}from"@frontmcp/sdk";var bp=class extends Y7{static{s(this,"ly")}static{o(this,"MemoryPodsResource")}async execute(){return this.get(O).read("memory://pods")}};bp=_([X7({name:"memory-pods",uri:"memory://pods",mimeType:"application/json",description:"Each dev-cluster pod's heap after a full GC (boot, after every hot swap, after bursts), a short per-service history, and closed generations proven still in memory."})],bp);var Q7=bp;import{Tool as ek,ToolContext as tk,z as uk}from"@frontmcp/sdk";var Ry;function Dp(e){Ry=e}s(Dp,"Ea"),o(Dp,"setActiveMemoryLookups");function iu(){return Ry}s(iu,"Ze"),o(iu,"activeMemoryLookups");var wp=class extends tk{static{s(this,"py")}static{o(this,"MemoryFindGrowthByFlowTool")}async execute(e){let t=iu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.growthByFlow(e.flowId);return{found:!0,flowId:e.flowId,owners:r}}};wp=_([ek({name:"memory.find_growth_by_flow",description:'Returns the container owners mutated during a flow and how much each grew \u2014 "what did this flow allocate?".',inputSchema:{flowId:uk.string().describe("Flow id.")}})],wp);var rk=wp;import{Tool as nk,ToolContext as ik,z as sk}from"@frontmcp/sdk";var Bp=class extends ik{static{s(this,"fy")}static{o(this,"MemoryFindFlowsThatMutatedOwnerTool")}async execute(e){let t=iu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.flowsThatMutatedOwner(e.ownerId);return{found:!0,ownerId:e.ownerId,flowIds:r}}};Bp=_([nk({name:"memory.find_flows_that_mutated_owner",description:"Returns the flow ids that mutated a given container owner.",inputSchema:{ownerId:sk.string().describe("Owner id (<ownerInstanceId>::<fieldName>).")}})],Bp);var ak=Bp;import{Tool as ok,ToolContext as lk,z as dk}from"@frontmcp/sdk";var xp=class extends lk{static{s(this,"gy")}static{o(this,"MemoryExplainLeakTool")}async execute(e){let t=iu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.getLeak(e.leakIndex);if(!r)return{found:!1,leakIndex:e.leakIndex};let n,u;if(r.kind==="retention"){let i=r.detail;n=`Owner ${i.ownerId} grew by ${i.growth} items during flow ${i.flowId} and did not shrink after the flow settled.`,u="Add a TTL / max-size eviction policy to this container, or clear it when the owning scope is disposed. If it is a request-scoped cache, move it off the singleton."}else{let i=r.detail;n=`${r.service??r.project} pod #${r.pod} (pid ${r.pid}): hot-swap generation ${i.gen} is still in memory ${Math.round(i.ageMs/1e3)}s after its app was closed, through ${i.gcs} full GCs and ${i.swapsSinceClose} swap(s) \u2014 still alive: ${(i.alive??[]).join(", ")}. Not garbage: something still points into it.`,u=`Run \`lensmcp mem ${r.service??r.project} --snapshot --analyze\` for the shortest path from the GC roots to it. Usual retainers: a listener on a process-global emitter, a module-level cache or registry, a timer the old app's onModuleDestroy does not clear. memory.explain_pod reads the pod's whole picture.`}return{found:!0,leak:r,narrative:n,recommendation:u}}};xp=_([ok({name:"memory.explain_leak",description:"Returns a narrative explanation of a suspected leak (by index in memory://leaks/suspected): which owner and flow grew, or which pod generation outlived its close \u2014 and a remediation hint.",inputSchema:{leakIndex:dk.number().int().nonnegative().describe("Index into memory://leaks/suspected.")}})],xp);var ck=xp;import{Tool as pk,ToolContext as mk,z as Ty}from"@frontmcp/sdk";var Ny=6,$p=class extends mk{static{s(this,"yy")}static{o(this,"MemoryPodsTool")}async execute(e){let t=iu();if(!t)return{found:!1,reason:"no active memory reducer"};if(e.service){let n=t.podsOf(e.service);return n?{found:!0,...n,history:n.history.slice(-(e.history??Ny))}:{found:!1,service:e.service,known:t.pods().map(u=>u.service).slice(0,32),reason:"no pod of that service has reported \u2014 pods report at boot and after every hot swap"}}let r=t.pods().slice(0,32).map(n=>({project:n.project,service:n.service,lastSeenAt:n.lastSeenAt,pods:n.pods}));return{found:r.length>0,services:r}}};$p=_([pk({name:"memory.pods",description:"What each dev-cluster pod weighs: heap after a full GC, reserved heap, rss, boot baseline, swaps, and any closed hot-swap generation proven still in memory. Give `service` for that service's recent per-swap history.",inputSchema:{service:Ty.string().optional().describe("Nx project or cluster service name. Omit for every service (latest reading per pod, no history)."),history:Ty.number().int().min(0).max(12).optional().describe(`Recent readings to include for one service (default ${Ny}).`)}})],$p);var fk=$p;import{Tool as hk,ToolContext as gk,z as My}from"@frontmcp/sdk";var rs=o(e=>e>=1073741824?`${(e/1073741824).toFixed(1)} GB`:`${Math.round(e/1048576)} MB`,"mb"),Py=o(e=>e<9e4?`${Math.round(e/1e3)}s`:`${Math.round(e/6e4)} min`,"age");function Uy(e,t,r=Date.now()){let n=t.latest,u=[];if(!n)return{service:e.service,pod:t.pod,pid:t.pid,narrative:`${e.service} pod #${t.pod} (pid ${t.pid}) has not reported a reading yet.`,findings:u,recommendation:"It reports at boot and after every swap \u2014 check `lensmcp mem` once it has booted."};let i=n.baseline??(n.trigger==="boot"?n.live:void 0),a=i?n.live/i:void 0,l=`${e.service} pod #${t.pod} (pid ${t.pid}): ${rs(n.live)} live after a full GC (${n.trigger}, ${Py(r-n.at)} ago), generation ${n.gen} after ${n.swaps} swap${n.swaps===1?"":"s"}`;i&&a!==void 0&&(l+=` \u2014 ${a.toFixed(1)}\xD7 the ${rs(i)} it booted with`),l+=".",a!==void 0&&a>=2.5?u.push(`At ${a.toFixed(1)}\xD7 its boot heap it is near the recycle bound (3\xD7 by default): the pod will be replaced by a fresh process if it grows further.`):a!==void 0&&a>=1.4&&u.push(`More than one generation's worth of live heap (${a.toFixed(1)}\xD7): a generation still draining or pinned, or state the app accumulated since boot.`),n.used-n.live>=64*1048576&&u.push(`That collection gave back ${rs(n.used-n.live)} of garbage \u2014 what an idle pod kept before it collected on its own.`),n.reserved-n.live>=128*1048576&&u.push(`V8 holds ${rs(n.reserved-n.live)} reserved beyond the live heap; that is the allocator's slack, which a later GC shrinks \u2014 not a leak.`),n.previousAlive===!0?u.push(`Generation ${n.previousGen} \u2014 the one the last swap replaced \u2014 was still in memory at this reading.`):n.previousAlive===!1&&u.push(`Generation ${n.previousGen} \u2014 the one the last swap replaced \u2014 has been collected.`),n.containers!==void 0&&n.containers>1&&u.push(`${n.containers} Nest DI containers are alive: more than one app's worth.`);for(let c of t.retained){let p=c.counts&&Object.keys(c.counts).length?` Live then: ${Object.entries(c.counts).map(([m,f])=>`${m} ${f}`).join(", ")}.`:"";u.push(`RETAINED: generation ${c.gen} is still in memory ${Py(r-c.closedAt)} after its app was closed, through ${c.gcs} full GCs and ${c.swapsSinceClose} swap${c.swapsSinceClose===1?"":"s"} (still alive: ${c.alive.join(", ")}).${p}`)}n.sourceMaps&&u.push("The pod runs with source maps enabled: with an eval devtool the bundle is held as text several times (`lensmcp doctor` checks it).");let d=t.retained.length?`Something still points into the retained generation. \`lensmcp mem ${e.service} --snapshot --analyze\` prints the shortest path from the GC roots to it \u2014 usually a listener on a process-global emitter, a module-level cache or registry, or a timer an onModuleDestroy does not clear. Until it is fixed the pod is replaced once the generation has been retained for LENSMCP_SWAP_RECYCLE_RETAINED_MS (10 min by default).`:a!==void 0&&a>=2?`No closed generation is retained, so this is growth inside the serving app. Compare readings across swaps with \`lensmcp mem ${e.service}\`; \`lensmcp mem ${e.service} --snapshot --analyze\` lists the largest retainers by class and by package.`:"Nothing to act on: one generation in memory, and the previous one collected.";return{service:e.service,pod:t.pod,pid:t.pid,narrative:l,findings:u,recommendation:d}}s(Uy,"xy"),o(Uy,"explainPod");var Cp=class extends gk{static{s(this,"_y")}static{o(this,"MemoryExplainPodTool")}async execute(e){let t=iu();if(!t)return{found:!1,reason:"no active memory reducer"};let r=t.podsOf(e.service);if(!r)return{found:!1,service:e.service,reason:"no pod of that service has reported"};let n=r.pods.filter(u=>e.pod===void 0||u.pod===e.pod).slice(0,8);return n.length===0?{found:!1,service:e.service,pods:r.pods.map(u=>u.pod),reason:`no pod #${e.pod}`}:{found:!0,explanations:n.map(u=>Uy(r,u))}}};Cp=_([hk({name:"memory.explain_pod",description:"Explains one dev-cluster pod's memory in a few sentences: how many app generations its live heap is, whether the last hot swap's copy was collected, reserved-heap slack, and any closed generation proven still in memory \u2014 with the next step (e.g. a heap snapshot).",inputSchema:{service:My.string().describe("Nx project or cluster service name."),pod:My.number().int().positive().optional().describe("Pod id (the N of Child#N). Omit for every pod of the service (at most 8).")}})],Cp);var vk=Cp,kp=class{static{s(this,"wo")}static{o(this,"MemoryApp")}};kp=_([N7({id:"memory",name:"Memory",description:"Container-owner growth tracking, suspect-leak detection, and dev-cluster pod heaps (post-GC readings, retained hot-swap generations). Hosts memory.explain_leak, memory.pods, memory.explain_pod.",resources:[U7,q7,G7,H7,Q7],tools:[rk,ak,ck,fk,vk]})],kp);var yk=64,Ek=16,Zy=12,bk=16,Ly=24*36e5;function Dt(e,t,r,n){return`pod-retained:${e}:${t}:${r}:${n}`}s(Dt,"Dr"),o(Dt,"retainedLeakKey");var Dk=o((e,t)=>`${e}:${t}`,"podKey");function Ap(e,t){let r={};for(let[n,u]of Object.entries(e))t.includes(n)||(r[n]=u);return r}s(Ap,"R$"),o(Ap,"stripIdentity");var wk=class{static{s(this,"Aa")}static{o(this,"PodMemoryState")}constructor(){this.services=new Map}apply(e){if(e.source!=="memory")return;let t=Dl(e.raw);if(!t)return;let r=e.timestamp;this.lastEventAt=Math.max(this.lastEventAt??0,r);let n={pods:!0,retainedAdded:[],retainedRemoved:[]},u=this.service(t.project,t.service||t.project,r),i=Dk(t.pod,t.pid);if(t.kind==="pod-memory-exited"){let l=u.pods.get(i);if(l)for(let d of l.retained.keys())n.retainedRemoved.push(Dt(t.project,t.pod,t.pid,d));return u.pods.delete(i),n}let a=u.pods.get(i);if(!a){if(t.kind==="pod-memory"&&t.trigger==="boot"){for(let[l,d]of u.pods)if(d.pod===t.pod){for(let c of d.retained.keys())n.retainedRemoved.push(Dt(t.project,d.pod,d.pid,c));u.pods.delete(l)}}if(a={pod:t.pod,pid:t.pid,podGeneration:t.podGeneration??1,lastSeenAt:r,retained:new Map},u.pods.set(i,a),u.pods.size>Ek){let l=[...u.pods.entries()].sort((d,c)=>d[1].lastSeenAt-c[1].lastSeenAt)[0];if(l){for(let d of l[1].retained.keys())n.retainedRemoved.push(Dt(t.project,l[1].pod,l[1].pid,d));u.pods.delete(l[0])}}}if(a.lastSeenAt=r,t.kind==="pod-memory")a.latest=Ap(t,["project","service","pod","pid","podGeneration","floodSuppressed"]),u.history.push({at:t.at??r,pod:t.pod,pid:t.pid,trigger:t.trigger,gen:t.gen,swaps:t.swaps,live:t.live,used:t.used,reserved:t.reserved,rss:t.rss,...t.previousGen!==void 0?{previousGen:t.previousGen}:{},previousAlive:t.previousAlive??null,retained:t.retained??0}),u.history.length>Zy&&u.history.splice(0,u.history.length-Zy);else if(t.kind==="pod-memory-retained"){let l={...Ap(t,["project","service","floodSuppressed"]),at:r};a.retained.delete(t.gen),a.retained.set(t.gen,l),a.retained.size>bk&&a.retained.delete(a.retained.keys().next().value),n.retainedAdded.push({key:Dt(t.project,t.pod,t.pid,t.gen),project:t.project,service:u.service,pod:t.pod,pid:t.pid,generation:l})}else t.kind==="pod-memory-released"&&(a.retained.delete(t.gen),n.retainedRemoved.push(Dt(t.project,t.pod,t.pid,t.gen)));return this.sweep(r,n,t.project),n}views(){return[...this.services.values()].sort((e,t)=>e.project.localeCompare(t.project)).map(e=>this.view(e))}find(e){let t=this.services.get(e)??[...this.services.values()].find(r=>r.service===e);return t?this.view(t):void 0}view(e){return{project:e.project,service:e.service,lastSeenAt:e.lastSeenAt,pods:[...e.pods.values()].sort((t,r)=>t.pod-r.pod).map(t=>({pod:t.pod,pid:t.pid,podGeneration:t.podGeneration,lastSeenAt:t.lastSeenAt,...t.latest?{latest:t.latest}:{},retained:[...t.retained.values()]})),history:[...e.history]}}service(e,t,r){let n=this.services.get(e);if(!n&&(n={project:e,service:t,lastSeenAt:r,pods:new Map,history:[]},this.services.set(e,n),this.services.size>yk)){let u=[...this.services.values()].sort((i,a)=>i.lastSeenAt-a.lastSeenAt)[0];u&&u!==n&&this.services.delete(u.project)}return n.lastSeenAt=Math.max(n.lastSeenAt,r),n.service=t,n}sweep(e,t,r){for(let n of this.services.values()){for(let[u,i]of n.pods)if(!(e-i.lastSeenAt<=Ly)){for(let a of i.retained.keys())t.retainedRemoved.push(Dt(n.project,i.pod,i.pid,a));n.pods.delete(u)}n.pods.size===0&&n.project!==r&&e-n.lastSeenAt>Ly&&this.services.delete(n.project)}}},Ir="memory://current",Sr="memory://owners",Fr="memory://owners/growing",wt="memory://leaks/suspected",zr="memory://pods",Bk=200,qy=50,xk=500;function Vy(e){let t=(e.now??(()=>Date.now()))(),r={owners:new Map,leaks:new Map,changedAt:new Map},n=new wk,u=o((w,b)=>{r.changedAt.set(w,b),e.resources.markDirty(w)},"touch"),i=o((w,b)=>{if(r.leaks.delete(w),r.leaks.set(w,b),r.leaks.size>Bk){let $=r.leaks.keys().next().value;$!==void 0&&r.leaks.delete($)}},"pushLeak"),a=new Map,l=o((w,b)=>{w!==b&&(a.delete(w),a.set(w,b),a.size>5e3&&a.delete(a.keys().next().value))},"noteRequestFlow"),d=o((w,b)=>{if(w.flowIds.add(b),w.flowIds.size>qy){for(let $ of w.flowIds)if(w.flowIds.delete($),w.flowIds.size<=qy)break}},"noteFlow"),c=o((w,b,$)=>{let x=r.owners.get(w);if(x||(x={ownerId:w,itemCount:b,estimatedBytes:0,startCount:b,mutations:0,flowIds:new Set,lastMutatedAt:$}),r.owners.delete(w),r.owners.set(w,x),r.owners.size>xk){let F=r.owners.keys().next().value;F!==void 0&&F!==w&&r.owners.delete(F)}return x},"ensure"),p=o((w,b)=>{let $=!1;for(let[x,F]of r.leaks){if(F.kind!=="retention"||F.ownerId!==w)continue;let C=F.detail.startCount;typeof C=="number"&&b<=C&&(r.leaks.delete(x),$=!0)}return $},"retractReleasedRetentions"),m=o(w=>{let b=n.apply(w);if(!b)return!1;r.lastEventAt=Math.max(r.lastEventAt??0,w.timestamp),u(zr,w.timestamp);let $=!1;for(let x of b.retainedRemoved)$=r.leaks.delete(x)||$;for(let x of b.retainedAdded)i(x.key,{kind:"retained-generation",project:x.project,service:x.service,pod:x.pod,pid:x.pid,generation:x.generation.gen,detail:{...x.generation},at:w.timestamp}),$=!0;return $&&u(wt,w.timestamp),!0},"applyPodMemory"),f=o(w=>{if(w.source!=="memory"&&w.source!=="perf"||m(w))return;let b=w.raw??null;if(b?.kind)switch(r.lastEventAt=Math.max(r.lastEventAt??0,w.timestamp),b.kind){case"memory-mutation":{if(!b.mutation)return;let $=b.mutation,x=c($.ownerNodeId,$.beforeCount??$.afterCount,w.timestamp);x.itemCount=$.afterCount,x.estimatedBytes=$.afterCount*64,x.mutations+=1,x.lastMutatedAt=w.timestamp,w.context.flowId&&d(x,w.context.flowId),w.context.requestId&&w.context.flowId&&l(w.context.requestId,w.context.flowId),u(Sr,w.timestamp),u(Fr,w.timestamp),p($.ownerNodeId,$.afterCount)&&u(wt,w.timestamp);return}case"memory-retention":{if(!b.retention)return;let $=b.retention,x=$.requestId?$.flowId:a.get($.flowId)??$.flowId;i(`retention:${$.ownerId}:${x}`,{kind:"retention",ownerId:$.ownerId,flowId:x,detail:{...$,flowId:x},at:w.timestamp}),u(wt,w.timestamp);return}case"process-memory":{if(!b.memory)return;r.current={...b.role?{role:b.role}:{},heapUsed:b.memory.heapUsed,heapTotal:b.memory.heapTotal,rss:b.memory.rss,external:b.memory.external,arrayBuffers:b.memory.arrayBuffers,at:w.timestamp},u(Ir,w.timestamp);return}default:return}},"handler"),h=e.bus.subscribe(f),g=o(w=>new Date(r.changedAt.get(w)??t).toISOString(),"stamp"),E=o(()=>({lastEventAt:r.lastEventAt,ownersTracked:r.owners.size,producer:r.lastEventAt===void 0?"none":"connected",detail:r.lastEventAt===void 0?"No memory event has ever been observed \u2014 an empty leak list is NOT evidence there is no leak, nothing is watching. Run under the dev cluster with @lensmcp/memory-tracker wired.":`${r.owners.size} owner${r.owners.size===1?"":"s"} tracked; ${r.leaks.size} suspected leak${r.leaks.size===1?"":"s"}.`}),"health");e.resources.register(Ir,()=>({schemaVersion:1,revision:e.resources.revision(Ir)??0,updatedAt:g(Ir),current:r.current??null})),e.resources.register(Sr,()=>({schemaVersion:1,revision:e.resources.revision(Sr)??0,updatedAt:g(Sr),owners:[...r.owners.values()].map(_p),...E()})),e.resources.register(Fr,()=>({schemaVersion:1,revision:e.resources.revision(Fr)??0,updatedAt:g(Fr),owners:[...r.owners.values()].map(_p).filter(w=>w.growthSinceStart>0).sort((w,b)=>b.growthSinceStart-w.growthSinceStart).slice(0,20),...E()})),e.resources.register(wt,()=>({schemaVersion:1,revision:e.resources.revision(wt)??0,updatedAt:g(wt),suspected:[...r.leaks.values()],...E()})),e.resources.register(zr,()=>({schemaVersion:1,revision:e.resources.revision(zr)??0,updatedAt:g(zr),services:n.views(),lastEventAt:n.lastEventAt,producer:n.lastEventAt===void 0?"none":"connected",detail:n.lastEventAt===void 0?"No pod has reported its heap \u2014 these readings come from the dev cluster (`@lensmcp/cluster` devserver pods, which report at boot and after every hot swap). An empty list is not evidence the pods are small.":"Bytes. `live` is the heap after a full GC; `used` the heap just before it; `reserved` what V8 keeps. A `retained` generation was closed and is PROVEN still in memory \u2014 see memory.explain_pod."}));let B={ownersMutatedByFlow(w){return[...r.owners.values()].filter(b=>b.flowIds.has(w))},growthByFlow(w){return[...r.owners.values()].filter(b=>b.flowIds.has(w)).map(b=>({ownerId:b.ownerId,growth:b.itemCount-b.startCount}))},flowsThatMutatedOwner(w){let b=r.owners.get(w);return b?[...b.flowIds]:[]},getLeak(w){return[...r.leaks.values()][w]},allLeaks(){return[...r.leaks.values()]},pods(){return n.views()},podsOf(w){return n.find(w)}};return Dp(B),{unsubscribe:o(()=>{Dp(void 0),h()},"unsubscribe"),uris:[Ir,Sr,Fr,wt,zr],lookups:B}}s(Vy,"$y"),o(Vy,"installMemoryReducer");function _p(e){return{ownerId:e.ownerId,itemCount:e.itemCount,estimatedBytes:e.estimatedBytes,mutations:e.mutations,startCount:e.startCount,growthSinceStart:e.itemCount-e.startCount,lastMutatedAt:e.lastMutatedAt,flowIds:[...e.flowIds]}}s(_p,"T$"),o(_p,"toOwnerView");function Jy(){let{session:e,providers:t}=u3(),r=d3(),n=c3();for(let B of n.problems)console.error(`[lensmcp] nx.json lensmcp.flows: ${B}`);_6({bus:e.bus,resources:e.resources}),S6({bus:e.bus,resources:e.resources}),z6({bus:e.bus,resources:e.resources}),O6({bus:e.bus,resources:e.resources}),M6({bus:e.bus,resources:e.resources}),V6({bus:e.bus,resources:e.resources}),J6({bus:e.bus,resources:e.resources}),G6({bus:e.bus,resources:e.resources}),K6({bus:e.bus,resources:e.resources,thresholds:r}),uy({bus:e.bus,resources:e.resources,thresholds:r}),iy({bus:e.bus,resources:e.resources,thresholds:r}),cy({bus:e.bus,resources:e.resources,thresholds:r}),Dy({bus:e.bus,resources:e.resources}),xy({bus:e.bus,resources:e.resources,thresholds:r}),Ay({bus:e.bus,resources:e.resources});let u=id({bus:e.bus,resources:e.resources,flows:n});e.registerReducerRetention("flow",u.retentionStats),w6({resources:e.resources});let i=Oy({bus:e.bus,resources:e.resources,thresholds:r});e.registerReducerRetention("graph",i.retentionStats),Vy({bus:e.bus,resources:e.resources}),K3({bus:e.bus,resources:e.resources,sessionId:e.id});let a=3e4,l=512*1024*1024,d=0,c=o(()=>{let B=process.memoryUsage(),w=Date.now(),b=B.rss>=l;b&&w-d>=5*6e4&&(d=w,console.warn(`[lensmcp] high process memory: rss=${Math.round(B.rss/1024/1024)}MB heap=${Math.round(B.heapUsed/1024/1024)}MB`)),e.bus.publish({id:Pe(),sessionId:e.id,timestamp:w,source:"perf",category:"runtime",severity:b?"warning":"info",context:{sessionId:e.id},fingerprint:Dm({kind:"process-memory",identity:process.env.LENSMCP_PROCESS_ROLE??"session"}),title:`LensMCP process memory (${process.env.LENSMCP_PROCESS_ROLE??"session"})`,raw:{kind:"process-memory",role:process.env.LENSMCP_PROCESS_ROLE??"session",memory:{rss:B.rss,heapUsed:B.heapUsed,heapTotal:B.heapTotal,external:B.external,arrayBuffers:B.arrayBuffers}}})},"publishProcessMemory");c();let p=setInterval(c,a);p.unref?.(),e.onShutdown({name:"process-memory",stop:o(()=>clearInterval(p),"stop")});let m=1200,f=new Map,h=e.bus.subscribe(B=>{let w=B.context.flowId;if(!w)return;let b=f.get(w);b&&clearTimeout(b);let $=setTimeout(()=>{f.delete(w);try{let x=Et()?.getFlowEvents(w);if(!x||x.length===0)return;let F=ps(x,{flowId:w});F&&Cd(F)}catch{}},m);$.unref?.(),f.set(w,$)});e.onShutdown({name:"story-autocompile",stop:o(()=>{h();for(let B of f.values())clearTimeout(B);f.clear()},"stop")});let g=o3({bus:e.bus,sessionId:e.id,onError:o(B=>console.error("[lensmcp] ingest error:",B),"onError")});g.mode!=="none"&&console.error(`[lensmcp] event ingest active (mode=${g.mode})`),e.onShutdown({name:"event-ingest",stop:o(()=>g.stop(),"stop")});let E=process.env.LENSMCP_EVENT_FILE;return E&&(td({eventFile:E,flows:n,budget:Q3(),prepare:Gy(e.id)}),e.onShutdown({name:"flow-recovery",stop:o(()=>td(void 0),"stop")})),{session:e,providers:t,ingest:g,flows:n}}s(Jy,"A$"),o(Jy,"createLensSession");function Gy(e){let t=_l({}),r=cs({});return n=>(n.sessionId==="pending"&&(n.sessionId=e,n.context&&n.context.sessionId==="pending"&&(n.context.sessionId=e)),r.redact(t.clamp(n)))}s(Gy,"UP"),o(Gy,"ingestPreparation");import{App as $k}from"@frontmcp/sdk";import{Tool as Ck,ToolContext as kk}from"@frontmcp/sdk";var Ip=class extends kk{static{s(this,"ky")}static{o(this,"LensmcpSessionTool")}async execute(){let e=this.get(qt),t=this.get(O),r=Wy(e);return{schemaVersion:1,revision:0,updatedAt:new Date().toISOString(),sessionId:e.id,supportedResources:t.list(),supportedTools:["lensmcp.session","observe.current_status"],supportedJobs:[],supportedChannels:[],subscribedByDefault:["agent://current-status"],transports:["stdio"],host:{platform:process.platform,node:process.version},project:{name:"lensmcp"},...r?{storage:r}:{}}}};Ip=_([Ck({name:"lensmcp.session",description:"Returns the LensMCP session bootstrap response (schema version, supported resources/tools, transport info, host info).",inputSchema:{}})],Ip);var Ak=Ip;function Wy(e){let t=e.storageStats?.();if(!t?.storage&&!t?.clamp)return;let r=t.storage?.events,n=t.storage?.artifacts;return{eventsResident:r?.resident??0,eventsResidentBytes:r?.residentBytes??0,eventsIngested:r?.ingested??e.storage.totalEventsIngested(),eventsDropped:r?.dropped??e.storage.totalEventsDropped(),...r?{eventsDroppedForBytes:r.droppedForBytes,eventCap:r.cap,eventByteCap:r.byteCap}:{},...n?{artifactsResident:n.resident,artifactsResidentBytes:n.residentBytes,artifactsDropped:n.dropped,artifactByteCap:n.byteCap}:{},...t.clamp?{truncatedEvents:t.clamp.truncated,truncatedBytesReclaimed:t.clamp.bytesReclaimed,rawByteLimit:t.clamp.rawByteLimit}:{},...t.reducers?{reducers:t.reducers}:{}}}s(Wy,"BP"),o(Wy,"readStorageStats");import{Skill as _k}from"@frontmcp/sdk";var Sp=class{static{s(this,"Ro")}static{o(this,"UsingLensmcpSkill")}};Sp=_([_k({name:"using-lensmcp",description:"Drive the LensMCP lens to observe a running Vite+React+NestJS app: the install\u2192agent-dev\u2192read loop, which resource/tool answers which question, how to check build health (typecheck/lint/build/runtime/service errors) without re-running nx, and how to trace a user action across the stack.",tags:["lensmcp","observability","debugging","how-to"],priority:100,toolValidation:"ignore",tools:["observe.current_status","observe.errors","observe.dismiss_errors","graph.find_db_in_loop","graph.explain_rerender","graph.trace_from_origin","graph.find_backend_work_caused_by_click","graph.find_slow_path"],examples:[{scenario:"Verify a change to a running app instead of guessing from source",expectedOutcome:"Read nest://requests/recent + perf://slow-routes (and graph://patterns for DB issues) to see what the endpoint actually did."},{scenario:"Explain why a component re-rendered after an interaction",expectedOutcome:"Call graph.explain_rerender for the component, then graph.trace_from_origin from the click flow."}],instructions:"# Using LensMCP\n\nLensMCP is an MCP server that gives you **deterministic observability into a\nrunning Vite + React + NestJS app**. Reach for it after you change code, to\nsee what the running app actually did \u2014 not to read source. It is **zero\nconfig**: no app-code edits are required; the lens is wired in at the build\nand bootstrap layer.\n\n## The loop\n\n1. **Install once** (per workspace): `npx -y lensmcp install` \u2014 registers\n the plugin + this MCP server in the workspace .mcp.json. Then\n `nx g @lensmcp/nx-plugin:setup-vite <web>` and `:setup-nest <api>` wire each\n project (rewrites main.ts \u2192 createLensmcpNestApp; adds the Vite plugin).\n2. **Run** with capture: `nx run <project>:agent-dev` \u2014 starts the app and\n auto-captures backend spans, React renders, Valtio state, browser console/\n network, and (when a dev URL is set) real Chrome DOM/visual snapshots.\n3. **Read** the resources / call the tools below to answer your question.\n4. **If resources look empty**, run `npx lensmcp doctor --json` first \u2014 it\n reports Node, plugin registration, .mcp.json, per-project wiring, and\n agent-dev targets, each with a fix hint.\n\nResources are **live snapshots** of the running app; re-read them after you\nact. Thresholds (when a signal fires) are tunable in\n`nx.json#lensmcp.thresholds` (dbInLoop, nPlusOne, renderStorm, slowRouteMs,\nslowRenderMs).\n\n## Start here \u2014 one call for \"is anything broken?\"\n\n- Tool `observe.current_status` \u2014 the whole-workspace verdict: what is BLOCKING right\n now (typecheck / lint / build errors, browser runtime errors, wedged or crash-looping\n dev services), plus the exact resources that explain each one.\n- Tool `observe.errors` \u2014 the actual failing items, `kind`-filtered\n (`typecheck | lint | build | runtime | cluster | all`).\n\nCall these **before** running `nx typecheck` / `nx lint` for a project the dev cluster\nalready watches, and before tailing a dev-server log: the watching producers have already\ncomputed the answer.\n\n**`producer: \"none\"` is not a pass.** Every signal reports whether anything is feeding it.\nWhen it is `none`, nothing is watching and an empty error list proves nothing \u2014 treat that\ncheck as UNCHECKED and run the real command (the `detail` field names the producer to wire).\nA `stale: true` signal means \"clean as of `ageMs` ago\"; re-run if you have edited since.\n\n**A runtime error you have already EXPLAINED** \u2014 the 401 your own signed-out test browser caused,\na failure from a fixture that exists to throw \u2014 does not have to keep blocking. Tool\n`observe.dismiss_errors` (entry `ids` from `observe.errors` kind `runtime`, plus a `reason`)\nhides it. It hides, it does not fix: the error shows again the next time it happens, the reason\nis shown to the person in the dashboard, and it cannot reach a failing typecheck / lint / build\nor a broken service. Never dismiss an error you have not explained; `runtime://dismissed` lists\nwhat is hidden and `observe.restore_errors` undoes.\n\n## Decision map \u2014 question \u2192 where to look\n\n**Does it build / typecheck / lint?**\n- Tool `observe.errors` (`kind: 'typecheck' | 'lint' | 'build'`) \u2014 the items, with producer state.\n- Raw: `build://current`, `build://failures`; `typecheck://errors`; `lint://errors`, `lint://warnings`.\n\n**A request 502s / a dev service died or stopped responding?**\n- Tool `observe.errors` (`kind: 'cluster'`) or `process://cluster` \u2014 which services are up /\n down / wedged / crash-looping, restart counts, and the error lines they printed. Read this\n instead of grepping the gateway log.\n\n**Backend: what ran, and what was slow?**\n- `nest://requests/recent` \u2014 recent server requests (method, route, status, ms, flowId).\n- `perf://slow-routes` \u2014 slowest routes (\u2265 slowRouteMs).\n- `nest://providers` \u2014 every provider + scope (SINGLETON/REQUEST/TRANSIENT).\n- `trace://recent`, `trace://failed` \u2014 method-call spans.\n\n**Backend: DB problems (N+1, a query inside a loop)?**\n- `graph://patterns` \u2014 detected db-in-loop / n+1 / render-storm.\n- Tool `graph.find_db_in_loop` \u2014 on-demand scan with a threshold.\n\n**React: hot/slow components and why they render?**\n- `react://components/hot` \u2014 render counts; `react://renders/slow` \u2014 slow renders.\n- `react://renders/recent`, `react://effects/recent`, `react://hooks/recent`, `react://memos/recomputed`.\n- Tool `graph.explain_rerender` \u2014 why a specific component re-rendered.\n\n**State (Valtio)?**\n- `valtio://stores`, `valtio://updates/recent`, `valtio://subscribers` \u2014 per-path\n subscriptions (which component reads which store path).\n\n**Memory leak suspicion?**\n- `memory://leaks/suspected`, `memory://owners/growing`, `memory://owners`, `memory://current`.\n\n**Visual / runtime (browser)?**\n- `runtime://browser/console`, `runtime://browser/errors`, `runtime://browser/network`, `runtime://browser/failed-requests`.\n- `visual://violations/current`, `visual://violations/during-animation`, `visual://tokens`, `visual://rules`.\n- `browser://active-tab`, `browser://tabs`.\n\n**Bundle size regressed?**\n- `bundle://regressions`, `bundle://compare/latest`, `bundle://chunks`, `bundle://modules`.\n\n## Trace a user action across the whole stack\n\nA user interaction (onClick/onSubmit/onChange) is auto-wrapped so it starts a\n**flow**: the browser stamps `x-lensmcp-flow-id` on outgoing fetches, and the\nbackend stamps the same flowId on its spans. So you can ask \"what did this\nclick cause?\":\n\n- `flow://recent`, `flow://current`, `flow://origins/recent` \u2014 flows + their origins.\n- Tool `flow.list_recent` \u2014 flows with their `category` (page-load, user-action, api, ai, test, or\n one defined in `nx.json#lensmcp.flows`), `subject` (the page / component / route) and `tags`\n (has-error, fan-out, slow\u2026); filter with `category` / `tag`.\n- Tool `flow.segments` \u2014 **start here for a big flow**: a flow can hold thousands of events (a dozen\n independent requests, a mount burst, a store hydrating). This returns it as a few dozen segments in\n phases, with counts, errors and times; then `flow.get { flowId, segmentId }` opens one unit.\n- Tool `graph.trace_from_origin` \u2014 full causal chain from an origin node.\n- Tool `graph.find_backend_work_caused_by_click` \u2014 the backend spans/queries a click triggered.\n- Tool `graph.find_state_updates_caused_by` \u2014 Valtio updates a flow caused.\n- `story://last`, `story://recent` + the story tools \u2014 a compiled, human-readable\n narrative of one flow end to end.\n\n## Tips\n\n- Prefer asking a precise question and reading the **one** resource/tool that\n answers it over dumping everything.\n- After a fix, re-run the same read to confirm the signal cleared (e.g. the\n db-in-loop pattern is gone from `graph://patterns`, or the route dropped\n out of `perf://slow-routes`).\n- `events://recent` is the raw firehose \u2014 use it only when a specific\n resource doesn't exist for what you need."})],Sp);var Fp=class{static{s(this,"Eo")}static{o(this,"MetaApp")}};Fp=_([$k({id:"lensmcp",name:"LensMCP Meta",description:'Session, health, and config tools, plus the "how to use LensMCP" skill.',tools:[Ak],skills:[Sp]})],Fp);import{App as Ik}from"@frontmcp/sdk";import{Resource as Sk,ResourceContext as Fk}from"@frontmcp/sdk";var Ky="events://recent",zp=class extends Fk{static{s(this,"Iy")}static{o(this,"EventsRecentResource")}async execute(){return{schemaVersion:1,revision:this.get(O).revision(Ky)??0,updatedAt:new Date().toISOString(),events:[]}}};zp=_([Sk({name:"events-recent",uri:Ky,mimeType:"application/json",description:"Recent normalised timeline events."})],zp);var zk=zp,jp=class{static{s(this,"To")}static{o(this,"EventsApp")}};jp=_([Ik({id:"events",name:"Events",description:"Normalised timeline of recent events.",resources:[zk]})],jp);import{App as jk}from"@frontmcp/sdk";import{Resource as Ok,ResourceContext as Rk}from"@frontmcp/sdk";var Op="render://current",Rp=class extends Rk{static{s(this,"Ty")}static{o(this,"RenderCurrentResource")}async execute(){let e=this.get(O),t=e.revision(Op)??0;try{return await e.read(Op)}catch{return{schemaVersion:1,revision:t,updatedAt:new Date().toISOString(),snapshot:null,note:"render:// will be populated in Phase 4 (DOMSnapshot + LayerTree + Accessibility)."}}}};Rp=_([Ok({name:"render-current",uri:Op,mimeType:"application/json",description:"Most recent accessibility-tree snapshot of the active page. Phase 1 ships an empty placeholder; the full DOMSnapshot + LayerTree integration lands in Phase 4."})],Rp);var Tk=Rp,Tp=class{static{s(this,"Ao")}static{o(this,"RenderApp")}};Tp=_([jk({id:"render",name:"Render",description:"Accessibility tree + (Phase 4) DOMSnapshot + LayerTree.",resources:[Tk]})],Tp);import{App as Nk}from"@frontmcp/sdk";import{Tool as Mk,ToolContext as Pk}from"@frontmcp/sdk";import{existsSync as Uk,readFileSync as Hy}from"node:fs";import{dirname as Np,join as Mp}from"node:path";import{fileURLToPath as Zk}from"node:url";function Xy(){let e=process.env.LENSMCP_EVENT_FILE;return e?Np(e):Mp(process.cwd(),".lensmcp")}s(Xy,"QP"),o(Xy,"lensmcpDir");function Yy(){try{let e=Hy(Mp(Xy(),"setup-state.json"),"utf8"),t=JSON.parse(e);return typeof t?.version=="string"?t:void 0}catch{return}}s(Yy,"eM"),o(Yy,"readSetupState");function Pp(){let e=Np(Zk(import.meta.url));for(let t=0;t<6;t++){let r=Mp(e,"package.json");if(Uk(r))try{let u=JSON.parse(Hy(r,"utf8")).version;if(u)return u}catch{}let n=Np(e);if(n===e)break;e=n}return"0.0.0"}s(Pp,"jy"),o(Pp,"installedVersion");function Up(){let e=Pp(),t=Yy();return t?t.version!==e?{ready:!1,installedVersion:e,setupVersion:t.version,reason:"version-mismatch"}:{ready:!0,installedVersion:e,setupVersion:t.version}:{ready:!1,installedVersion:e,reason:"never-setup"}}s(Up,"za"),o(Up,"checkReadiness");function Zp(){let e=process.env.LENSMCP_NO_SETUP_GATE;return e==="1"||e==="true"}s(Zp,"Oa"),o(Zp,"gateDisabled");function Lp(e){return`LensMCP is not ready: ${e.reason==="version-mismatch"&&e.setupVersion?`last set up for v${e.setupVersion}`:"not set up on this machine yet"}, but v${e.installedVersion} is installed. Ask the user to run \`lensmcp setup\` once in their terminal \u2014 it installs the plugin wiring and trusts the dev CA + /etc/hosts (sudo prompts inline; idempotent) \u2014 then retry. Call the \`setup.status\` tool any time to re-check.`}s(Lp,"ja"),o(Lp,"setupRequiredMessage");var qp=class extends Pk{static{s(this,"Py")}static{o(this,"SetupStatusTool")}async execute(){let e=Up();return{ready:e.ready,installedVersion:e.installedVersion,setupVersion:e.setupVersion??null,reason:e.reason??null,gateDisabled:Zp(),message:e.ready?`LensMCP is set up for v${e.installedVersion}. The lens is open.`:Lp(e),fix:e.ready?null:"lensmcp setup"}}};qp=_([Mk({name:"setup.status",description:"Report whether LensMCP is set up for the installed version on this machine. Always available (exempt from the setup-gate) so the agent can diagnose. If `ready` is false, ask the user to run `lensmcp setup`.",inputSchema:{}})],qp);var Lk=qp,Vp=class{static{s(this,"Pa")}static{o(this,"SetupApp")}};Vp=_([Nk({id:"lensmcp-setup",name:"LensMCP Setup Gate",description:"Readiness gate: blocks lens tools until the workspace has run `lensmcp setup`, plus the always-open `setup.status` diagnostic.",tools:[Lk]})],Vp);import{Plugin as qk,ToolHook as Vk}from"@frontmcp/sdk";function Qy(e){return e.state?.input?.name??e.state?.tool?.metadata?.name??e.state?.tool?.fullName??e.toolName??""}s(Qy,"P$"),o(Qy,"toolNameOf");var{Will:Jk}=Vk,Gk=new Set(["setup.status","lensmcp.session"]),ns=class{static{s(this,"zo")}static{o(this,"SetupGatePlugin")}enforceSetup(e){if(Zp())return;let t;try{t=Up()}catch{return}t.ready||e.fail(new Error(Lp(t)))}};_([Jk("execute",{priority:1e4,filter:o(e=>!Gk.has(Qy(e)),"filter")}),Rr("design:type",Function),Rr("design:paramtypes",[Object]),Rr("design:returntype",void 0)],ns.prototype,"enforceSetup",null),ns=_([qk({name:"lensmcp-setup-gate",description:"Blocks lens tools until the workspace has run `lensmcp setup` for the installed lensmcp version (after install or upgrade). Fails open on error."})],ns);function eE(e){let t=Number(process.env.LENSMCP_PARENT_PID??0);!Number.isInteger(t)||t<=0||setInterval(()=>{process.ppid!==t&&(console.error(`[lensmcp] ${e}: parent gateway (pid ${t}) is gone \u2014 exiting to free the port.`),process.exit(0))},5e3).unref()}s(eE,"M$"),o(eE,"watchParentGateway");import{existsSync as tE,readFileSync as Wk,realpathSync as Kk}from"node:fs";import{basename as Hk,dirname as Xk,join as su}from"node:path";var Yk={dashboard:4321,mcpHttp:4500,bridge:5747};function is(e){try{return JSON.parse(Wk(e,"utf8"))}catch{return}}s(is,"My"),o(is,"readJson");function uE(e,t){let r=2166136261;for(let n=0;n<e.length;n++)r^=e.charCodeAt(n),r=Math.imul(r,16777619);return Math.abs(r|0)%t}s(uE,"mM"),o(uE,"hashToRange");function Bt(e){return e.toLowerCase().replace(/^@[^/]+\//,"").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")||"workspace"}s(Bt,"Cr"),o(Bt,"slugify");function rE(e){let t=is(su(e,"nx.json"));if(t?.lensmcp?.key)return Bt(t.lensmcp.key);let r=is(su(e,"package.json"));return r?.name?Bt(r.name):t?.name?Bt(t.name):Bt(Hk(e))}s(rE,"fM"),o(rE,"resolveWorkspaceKey");function nE(e){return Yk.mcpHttp+uE(e,200)}s(nE,"hM"),o(nE,"deriveMcpHttpPort");function iE(e){let t,r=e;for(;;){if(tE(su(r,".lensmcp","config.json")))return r;t===void 0&&tE(su(r,"nx.json"))&&(t=r);let n=Xk(r);if(n===r)break;r=n}return t??e}s(iE,"gM"),o(iE,"findWorkspaceRoot");function Jp(e,t=process.env){let r=iE(e),n=is(su(r,".lensmcp","config.json")),u=n?.key?Bt(n.key):rE(r),i=typeof n?.ports?.mcpHttp=="number"?n.ports.mcpHttp:nE(u);return{root:r,key:u,mcpHttpPort:i,eventFile:t.LENSMCP_EVENT_FILE??su(r,".lensmcp","events.jsonl")}}s(Jp,"D$"),o(Jp,"resolveWorkspaceScope");var Qk="/lensmcp/identity",eA="lensmcp-mcp-identity";function sE(e){try{return Kk(e)}catch{return e}}s(sE,"yM"),o(sE,"canonicalRoot");function aE(e=process.env,t=process.cwd(),r){let n=Jp(t,e),u=sE(e.LENSMCP_WORKSPACE_ROOT??n.root),i=e.LENSMCP_WORKSPACE_KEY?Bt(e.LENSMCP_WORKSPACE_KEY):e.LENSMCP_WORKSPACE_ROOT?Jp(u,e).key:n.key;return{kind:eA,key:i,root:u,eventFile:n.eventFile,pid:process.pid,port:e.LENSMCP_PORT?Number(e.LENSMCP_PORT):void 0,version:r}}s(aE,"U$"),o(aE,"resolveServerIdentity");import{chmodSync as oE,lstatSync as lE,mkdirSync as tA,unlinkSync as uA}from"node:fs";import{homedir as rA}from"node:os";import{dirname as nA,join as iA}from"node:path";function dE(e=process.env){return iA(e.LENSMCP_HOME||rA(),".lensmcp","mcp.sock")}s(dE,"kM"),o(dE,"defaultMcpSocketPath");function cE(e=process.env){return e.LENSMCP_SOCKET_PATH||dE(e)}s(cE,"B$"),o(cE,"resolveMcpSocketPath");function Gp(e){try{tA(e,{recursive:!0,mode:448})}catch{}try{let t=lE(e);return t.isDirectory()?((t.mode&63)!==0&&oE(e,448),!0):!1}catch{return!1}}s(Gp,"Ny"),o(Gp,"ensureOwnerOnlyDir");function pE(e){let t;try{t=lE(e)}catch{return{cleared:!1}}if(!t.isSocket())return{cleared:!1,refused:t.isSymbolicLink()?"a symlink":t.isDirectory()?"a directory":"a regular file"};try{return uA(e),{cleared:!0}}catch(r){return{cleared:!1,refused:r instanceof Error?r.message:String(r)}}}s(pE,"SM"),o(pE,"clearStaleSocket");function mE(e){let t=nA(e);if(!Gp(t))return{ok:!1,reason:`${t} is not a usable owner-only directory`};let r=pE(e);return r.refused?{ok:!1,reason:`${e} already exists and is ${r.refused}`}:{ok:!0}}s(mE,"Z$"),o(mE,"prepareSocketPath");function fE(e){try{return oE(e,384),!0}catch{return!1}}s(fE,"V$"),o(fE,"secureSocket");import{createHmac as sA,randomBytes as hE}from"node:crypto";import{chmodSync as aA,closeSync as oA,linkSync as lA,lstatSync as dA,openSync as cA,readFileSync as pA,renameSync as mA,unlinkSync as fA,writeSync as hA}from"node:fs";import{homedir as gA}from"node:os";import{dirname as vA,join as yA}from"node:path";function ss(e=process.env){return yA(e.LENSMCP_HOME||gA(),".lensmcp","mcp-token")}s(ss,"Ma"),o(ss,"mcpTokenPath");function Wp(e){let t;try{t=dA(e)}catch{return{}}if(!t.isFile())return{refused:`${e} is ${t.isSymbolicLink()?"a symlink":"not a regular file"}`};if(typeof process.getuid=="function"&&t.uid!==process.getuid())return{refused:`${e} belongs to another account`};if((t.mode&63)!==0)try{aA(e,384)}catch{return{refused:`${e} is readable by other accounts and could not be made 0600`}}try{let r=pA(e,"utf8").trim();return r?{token:r}:{}}catch(r){return{refused:`${e} could not be read: ${r instanceof Error?r.message:String(r)}`}}}s(Wp,"W$"),o(Wp,"readTokenFile");function gE(e){let t=hE(32).toString("hex"),r=`${e}.${process.pid}.${hE(4).toString("hex")}.tmp`;try{let n=cA(r,"wx",384);try{hA(n,`${t}
72
+ `)}finally{oA(n)}try{return lA(r,e),{token:t,source:"created"}}catch(i){if(i.code!=="EEXIST")throw i}let u=Wp(e);return u.refused?{source:"unavailable",reason:u.refused}:u.token?{token:u.token,source:"file"}:(mA(r,e),{token:t,source:"created"})}catch(n){return{source:"unavailable",reason:n instanceof Error?n.message:String(n)}}finally{try{fA(r)}catch{}}}s(gE,"UM"),o(gE,"createTokenFile");function vE(e,t){if(e.LENSMCP_ALLOW_INSECURE==="1")return{source:"disabled"};let r=e.LENSMCP_MCP_TOKEN?.trim();if(r)return{token:r,source:"env"};let n=ss(e),u=Wp(n);if(u.refused)return{source:"unavailable",reason:u.refused};if(u.token)return{token:u.token,source:"file"};if(!t.create)return{source:"absent"};let i=vA(n);return Gp(i)?gE(n):{source:"unavailable",reason:`${i} is not a usable owner-only directory`}}s(vE,"K$"),o(vE,"resolveMcpToken");var EA=/^[0-9a-f]{16,128}$/;function yE(e,t,r){return sA("sha256",e).update(`lensmcp-mcp-identity
73
+ ${t}
74
+ ${r}`).digest("hex")}s(yE,"H$"),o(yE,"mcpIdentityProof");var EE=["localhost","127.0.0.1","[::1]"];function as(e){return e==="loopback"||e==="127.0.0.1"||e==="::1"||e==="localhost"}s(as,"Na"),o(as,"isLoopbackBind");function Kp(e){return(e??"").split(",").map(t=>t.trim()).filter(Boolean)}s(Kp,"J$"),o(Kp,"listFromEnv");function bE(e,t,r){let n=Kp(r.FRONTMCP_ALLOWED_HOSTS),u=[...EE.map(i=>`http://${i}:${t}`),...Kp(r.LENSMCP_MCP_ALLOWED_ORIGINS)];return as(e)?{enabled:!0,allowedHosts:[...EE.flatMap(i=>[i,`${i}:${t}`]),...n],allowedOrigins:u}:{enabled:!0,...n.length?{allowedHosts:n}:{},allowedOrigins:u}}s(bE,"Y$"),o(bE,"mcpRebindingPolicy"),eE("mcp");var{session:bA,providers:DA}=Jy(),au=process.env.LENSMCP_TRANSPORT??"stdio",wA=[Vp,Fp,Hl,jp,zd,Td,Pd,Jd,ec,sc,Tp,lc,pc,gc,bc,xc,Pc,Hc,tp,wd,_d,fp,kp],Hp={info:{name:"LensMCP MCP",version:"1.0.0"},apps:wA,providers:[...DA],plugins:[ns]},Xp=class{static{s(this,"Cy")}static{o(this,"LensmcpMcpServer")}};Xp=_([$E({...Hp,serve:!1})],Xp);var BA=Xp;if(au==="stdio")lm.runStdio({...Hp,logging:{level:dm.Warn}}).catch(e=>{process.stderr.write(`[lensmcp] runStdio failed: ${e instanceof Error?e.stack??e.message:String(e)}
75
+ `),process.exit(1)});else{let e=process.env.LENSMCP_HTTP_PATH??"/mcp",t=aE(process.env,process.cwd(),Pp()),r=Number(process.env.LENSMCP_PORT??3e3),n=au==="http"?vE(process.env,{create:!0}):void 0;n?.source==="unavailable"&&(console.error(`[lensmcp] FATAL: refusing to serve MCP over HTTP without a credential \u2014 could not establish ${ss(process.env)}: ${n.reason}. Set LENSMCP_MCP_TOKEN, or LENSMCP_ALLOW_INSECURE=1 to serve without one.`),process.exit(1));let u=n?.token;n?.source==="disabled"&&console.error("[lensmcp] WARNING: LENSMCP_ALLOW_INSECURE=1 \u2014 the MCP HTTP transport requires NO credential. Any account on this machine can call every tool, command-running jobs included.");let i={method:"GET",path:Qk,handler:o((m,f)=>{let h=m.query?.nonce,g={...t,...u?{auth:"token"}:{},...u&&typeof h=="string"&&EA.test(h)?{proof:yE(u,r,h)}:{}};f.setHeader("content-type","application/json"),f.setHeader("cache-control","no-store"),f.end(JSON.stringify(g))},"handler")},a=process.env.LENSMCP_MCP_BIND??"loopback";au==="http"&&!as(a)&&console.error(`[lensmcp] WARNING: MCP HTTP transport bound to ${a} \u2014 reachable beyond this machine. It exposes workspace telemetry and command-running jobs to anyone holding the MCP token. Unset LENSMCP_MCP_BIND to restore loopback.`);let l=cE(process.env);if(au==="socket"){let m=mE(l);m.ok||(console.error(`[lensmcp] FATAL: refusing to serve MCP on ${l} \u2014 ${m.reason}. Every tool on this endpoint, including command-running jobs, would be reachable by whoever controls that path.`),process.exit(1))}let d=au==="socket"?{socketPath:l,entryPath:e,routes:[i]}:{port:r,entryPath:e,routes:[i],security:{bindAddress:a,dnsRebindingProtection:bE(a,r,process.env)}},c=u?{mode:"static",tokens:[u],realm:"lensmcp"}:void 0,p=lm.bootstrap({...Hp,logging:{level:dm.Info},http:d,...c?{auth:c}:{}});u&&console.error(`[lensmcp] MCP HTTP transport requires a bearer token \u2014 ${n?.source==="env"?"LENSMCP_MCP_TOKEN":ss(process.env)}${as(a)?"":" (and is reachable beyond this machine)"}`),au==="socket"&&p.then(()=>{fE(l)?console.error(`[lensmcp] MCP socket \u2192 ${l} (0600, owner-only directory)`):console.error(`[lensmcp] WARNING: could not set 0600 on ${l}. Its directory's permissions are now the only thing keeping other accounts out.`)},()=>{})}function Yp(e){bA.stop().catch(()=>{}).finally(()=>{process.exit(e==="SIGINT"?130:0)})}s(Yp,"tk"),o(Yp,"shutdown"),process.on("SIGINT",Yp),process.on("SIGTERM",Yp);export{BA as default};