@zibby/core 0.1.31 → 0.1.34

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 (94) hide show
  1. package/dist/agents/base.js +319 -14
  2. package/dist/backend-client.js +1 -1
  3. package/dist/constants/tool-names.js +1 -1
  4. package/dist/constants/zibby-scratch.js +1 -1
  5. package/dist/constants.js +1 -1
  6. package/dist/enrichment/base.js +1 -1
  7. package/dist/enrichment/enrichers/accessibility-enricher.js +1 -1
  8. package/dist/enrichment/enrichers/dom-enricher.js +1 -1
  9. package/dist/enrichment/enrichers/page-state-enricher.js +1 -1
  10. package/dist/enrichment/enrichers/position-enricher.js +1 -1
  11. package/dist/enrichment/index.js +4 -1
  12. package/dist/enrichment/mcp-integration.js +4 -1
  13. package/dist/enrichment/mcp-ref-enricher.js +1 -1
  14. package/dist/enrichment/pipeline.js +2 -2
  15. package/dist/enrichment/trace-text-enricher.js +2 -1
  16. package/dist/framework/agents/assistant-strategy.js +69 -5
  17. package/dist/framework/agents/base.js +1 -1
  18. package/dist/framework/agents/claude-strategy.js +107 -4
  19. package/dist/framework/agents/codex-strategy.js +23 -4
  20. package/dist/framework/agents/cursor-strategy.js +138 -20
  21. package/dist/framework/agents/gemini-strategy.js +34 -7
  22. package/dist/framework/agents/index.js +285 -6
  23. package/dist/framework/agents/middleware/assistant-round-pipeline.js +2 -2
  24. package/dist/framework/agents/providers/base.js +1 -1
  25. package/dist/framework/agents/providers/index.js +4 -1
  26. package/dist/framework/agents/providers/openai-transport.js +4 -2
  27. package/dist/framework/agents/providers/openai.js +1 -1
  28. package/dist/framework/agents/providers/transport-base.js +1 -1
  29. package/dist/framework/agents/utils/auth-resolver.js +1 -1
  30. package/dist/framework/agents/utils/cursor-output-formatter.js +25 -1
  31. package/dist/framework/agents/utils/openai-proxy-formatter.js +75 -5
  32. package/dist/framework/agents/utils/payload-budget.js +2 -2
  33. package/dist/framework/agents/utils/structured-output-formatter.js +8 -4
  34. package/dist/framework/code-generator.js +309 -10
  35. package/dist/framework/constants.js +1 -1
  36. package/dist/framework/context-loader.js +2 -2
  37. package/dist/framework/function-bridge.js +60 -1
  38. package/dist/framework/function-skill-registry.js +1 -1
  39. package/dist/framework/graph-compiler.js +314 -1
  40. package/dist/framework/graph.js +305 -4
  41. package/dist/framework/index.js +331 -1
  42. package/dist/framework/mcp-client.js +56 -2
  43. package/dist/framework/node-registry.js +294 -3
  44. package/dist/framework/node.js +297 -4
  45. package/dist/framework/output-parser.js +2 -2
  46. package/dist/framework/skill-registry.js +1 -1
  47. package/dist/framework/state-utils.js +5 -1
  48. package/dist/framework/state.js +1 -1
  49. package/dist/framework/tool-resolver.js +1 -1
  50. package/dist/index.js +512 -5
  51. package/dist/package.json +1 -1
  52. package/dist/runtime/generation/base.js +1 -1
  53. package/dist/runtime/generation/index.js +58 -3
  54. package/dist/runtime/generation/mcp-ref-strategy.js +17 -17
  55. package/dist/runtime/generation/stable-id-strategy.js +14 -14
  56. package/dist/runtime/stable-id-runtime.js +1 -1
  57. package/dist/runtime/verification/base.js +1 -1
  58. package/dist/runtime/verification/index.js +3 -3
  59. package/dist/runtime/verification/playwright-json-strategy.js +1 -1
  60. package/dist/runtime/zibby-runtime.js +1 -1
  61. package/dist/sync/index.js +1 -1
  62. package/dist/sync/uploader.js +1 -1
  63. package/dist/tools/run-playwright-test.js +3 -3
  64. package/dist/utils/adf-converter.js +1 -1
  65. package/dist/utils/ast-utils.js +9 -1
  66. package/dist/utils/ci-setup.js +4 -4
  67. package/dist/utils/cursor-mcp-isolated-home.js +1 -1
  68. package/dist/utils/cursor-utils.js +1 -1
  69. package/dist/utils/live-frame-discovery.js +1 -1
  70. package/dist/utils/logger.js +1 -1
  71. package/dist/utils/mcp-config-writer.js +4 -4
  72. package/dist/utils/mission-control-from-run-states.js +1 -1
  73. package/dist/utils/node-schema-parser.js +9 -1
  74. package/dist/utils/parallel-config.js +1 -1
  75. package/dist/utils/post-process-events.js +2 -1
  76. package/dist/utils/repo-clone.js +1 -0
  77. package/dist/utils/result-handler.js +1 -1
  78. package/dist/utils/ripple-effect.js +1 -1
  79. package/dist/utils/run-capacity-coordinator.js +3 -1
  80. package/dist/utils/run-capacity-queue.js +2 -2
  81. package/dist/utils/run-index-merge.js +1 -1
  82. package/dist/utils/run-index-post-cli.js +4 -1
  83. package/dist/utils/run-registry.js +3 -3
  84. package/dist/utils/run-state-session.js +2 -2
  85. package/dist/utils/selector-generator.js +4 -4
  86. package/dist/utils/session-state-constants.js +1 -1
  87. package/dist/utils/session-state-live-runs.js +1 -1
  88. package/dist/utils/streaming-parser.js +3 -3
  89. package/dist/utils/test-post-processor.js +14 -11
  90. package/dist/utils/timeline.js +6 -6
  91. package/dist/utils/trace-parser.js +2 -2
  92. package/dist/utils/video-organizer.js +3 -3
  93. package/package.json +1 -1
  94. package/templates/browser-test-automation/result-handler.mjs +4 -39
package/dist/index.js CHANGED
@@ -1,8 +1,515 @@
1
- import{readFileSync as O,existsSync as M}from"fs";import{join as S,resolve as j,isAbsolute as K}from"path";import{DEFAULT_OUTPUT_BASE as Q,SESSIONS_DIR as G,RESULT_FILE as Z}from"./framework/constants.js";import{postCliRunIndex as C,postCliInterruptedRunIndex as W,createCliRunIndexPipelineProgressAppender as q}from"./utils/run-index-post-cli.js";import{WorkflowAgent as R,workflow as Y}from"./agents/base.js";import{resolveWorkflowSession as ee,clearInheritedSessionEnvForFreshRun as te,readStudioPinnedSessionPathFromEnv as oe}from"./framework/graph.js";import{WorkflowGraph as he,resolveWorkflowSession as we,generateWorkflowSessionId as ye,clearInheritedSessionEnvForFreshRun as Ee,shouldTrustInheritedSessionEnv as xe,readStudioPinnedSessionPathFromEnv as Ae,syncProcessEnvToSession as Pe}from"./framework/graph.js";import{ResultHandler as Ie}from"./utils/result-handler.js";import{z as Re}from"zod/v3";import{invokeAgent as _e,getAgentStrategy as ke,AssistantStrategy as ve,CursorAgentStrategy as Le,ClaudeAgentStrategy as Fe,CodexAgentStrategy as Ne,GeminiAgentStrategy as Ue,AgentStrategy as Oe}from"./framework/agents/index.js";import{ToolCallProvider as je,OpenAIToolProvider as Ge}from"./framework/agents/providers/index.js";import{McpClientManager as De}from"./framework/mcp-client.js";import{SKILLS as ze}from"./framework/constants.js";import{registerSkill as Be,getSkill as Je,hasSkill as Xe,getAllSkills as He,listSkillIds as Ke}from"./framework/skill-registry.js";export*from"./constants/tool-names.js";import{resolveIntegrationToken as qe,clearTokenCache as Ye}from"./backend-client.js";import{organizeVideos as tt}from"./utils/video-organizer.js";import{ZibbyUploader as rt,createUploader as nt}from"./sync/index.js";import{patchCursorAgentForCI as it,checkCursorAgentPatched as at,getApprovalKeys as lt,saveApprovalKeys as ct}from"./utils/ci-setup.js";import{DEFAULT_MODELS as pt,AGENT_TYPES as ft,LOG_LEVELS as dt}from"./constants.js";import{DEFAULT_OUTPUT_BASE as gt,SESSIONS_DIR as St,SESSION_INFO_FILE as ht,RESULT_FILE as wt,RAW_OUTPUT_FILE as yt,EVENTS_FILE as Et,CI_ENV_VARS as xt}from"./framework/constants.js";import{RIPPLE_EFFECT_SCRIPT as Pt,injectRippleEffect as Tt,generateRippleHelperCode as It}from"./utils/ripple-effect.js";import{checkCursorAgentInstalled as Rt,getCursorAgentInstallInstructions as bt}from"./utils/cursor-utils.js";import{SelectorGenerator as kt}from"./utils/selector-generator.js";import{TestPostProcessor as Lt}from"./utils/test-post-processor.js";import{TraceParser as Nt}from"./utils/trace-parser.js";import{StreamingParser as Ot}from"./utils/streaming-parser.js";import{ZibbyRuntime as jt}from"./runtime/zibby-runtime.js";import{StableIdRuntime as Wt}from"./runtime/stable-id-runtime.js";import{logger as $t,Logger as zt,LOG_LEVELS as Vt}from"./utils/logger.js";import{timeline as Jt}from"./utils/timeline.js";import{resolveMaxParallelRuns as Ht,DEFAULT_MAX_CONCURRENT_RUNS as Kt,MIN_MAX_CONCURRENT_RUNS as Qt,MAX_MAX_CONCURRENT_RUNS as Zt}from"./utils/parallel-config.js";import{postProcessEvents as Yt}from"./utils/post-process-events.js";import{runPlaywrightTestTool as to,resetExecutionCount as oo}from"./tools/run-playwright-test.js";import{testGenerationManager as no,TestGenerationStrategy as so,MCPRefStrategy as io,StableIdStrategy as ao}from"./runtime/generation/index.js";import{testVerificationManager as co,TestVerificationStrategy as uo,PlaywrightJsonVerificationStrategy as po}from"./runtime/verification/index.js";import{EventEnricher as mo,EnrichmentPipeline as go,PositionEnricher as So,AccessibilityEnricher as ho,PageStateEnricher as wo,DOMEnricher as yo,createDefaultPipeline as Eo,createMinimalPipeline as xo,createCustomPipeline as Ao}from"./enrichment/index.js";import{enrichRecordedEvents as To,LiveEnrichmentRecorder as Io}from"./enrichment/mcp-integration.js";const D=t=>{t?.message?.includes("Connection closed")||t?.message?.includes("MCP error -32000")||t?.code===-32e3||console.error("Unhandled rejection:",t)};process.listeners("unhandledRejection").includes(D)||process.on("unhandledRejection",D);async function re(t,e={}){const{agent:l,mcp:f,headless:h,cwd:r=process.cwd(),specPath:o,sessionPath:c,sessionTimestamp:n,...p}=e,a=O(t,"utf-8"),E=null,{agent:$,error:b}=await ie(r,p);let s=$;if(!s&&e.fallbackAgentModule){const u=e.fallbackAgentModule,m=u.BrowserTestAutomationAgent||u.default;m&&(s=new m(p))}if(!s&&b&&console.warn(`\u26A0\uFE0F Failed to load local agent: ${b}`),!s)throw new Error(`No agent found. Please run:
1
+ var $8=Object.create;var Bb=Object.defineProperty;var E8=Object.getOwnPropertyDescriptor;var I8=Object.getOwnPropertyNames;var P8=Object.getPrototypeOf,T8=Object.prototype.hasOwnProperty;var Tt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var P=(t,e)=>()=>(t&&(e=t(t=0)),e);var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ln=(t,e)=>{for(var r in e)Bb(t,r,{get:e[r],enumerable:!0})},O8=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of I8(e))!T8.call(t,i)&&i!==r&&Bb(t,i,{get:()=>e[i],enumerable:!(n=E8(e,i))||n.enumerable});return t};var Xu=(t,e,r)=>(r=t!=null?$8(P8(t)):{},O8(e||!t||!t.__esModule?Bb(r,"default",{value:t,enumerable:!0}):r,t));var ir,ri,Oi,Jm,Gb,z8,j8,N8,Kb,no=P(()=>{ir=".zibby/output",ri="sessions",Oi=".session-info.json",Jm=".zibby-studio-stop",Gb="result.json",z8="raw_stream_output.txt",j8="events.json",N8={BROWSER:"browser",JIRA:"jira",GITHUB:"github",SLACK:"slack",MEMORY:"memory",CHAT_MEMORY:"chat-memory",RUNNER:"runner",SKILL_INSTALLER:"skill-installer",CORE_TOOLS:"core-tools",WORKFLOW_BUILDER:"workflow-builder"},Kb=["CI_JOB_ID","GITHUB_RUN_ID","CIRCLE_WORKFLOW_ID","BUILD_ID"]});var io,rd=P(()=>{io=class t{constructor(){this.buffer="",this.extractedResult=null,this.rawText="",this.zodSchema=null,this.lastOutputLength=0,this.onToolCall=null,this._lastToolEmit=null}processChunk(e){if(!e)return null;this.buffer+=e;let r=this.buffer.split(`
2
+ `);this.buffer=r.pop()||"";let n="";for(let i of r)if(i.trim())try{let o=JSON.parse(i);this._emitToolCalls(o);let a=this.extractText(o);if(a){if(this.rawText&&a.startsWith(this.rawText)){let s=a.substring(this.rawText.length);this.rawText=a,n+=s}else(!this.rawText.includes(a)||a.length<20)&&(this.rawText+=a,n+=a);this.tryExtractResult(this.rawText)}else this.isValidResult(o)&&(this.rawText+=`${i}
3
+ `,n+=`${i}
4
+ `,this.extractedResult=o)}catch{if(i.includes('"text"')||i.includes('"content"')){let a=i.match(/"text"\s*:\s*"([^"]*)/),s=i.match(/"content"\s*:\s*"([^"]*)/),c=a?a[1]:s?s[1]:null;c&&!this.rawText.includes(c)&&(n+=c,this.rawText+=c)}}return n||null}flush(){if(!this.buffer.trim())return null;let e="";try{let r=JSON.parse(this.buffer);this._emitToolCalls(r);let n=this.extractText(r);n&&(this.rawText+=n,e+=n,this.tryExtractResult(n))}catch{this.rawText+=this.buffer,e+=this.buffer,this.tryExtractResult(this.buffer)}return this.buffer="",e||null}_emitToolCalls(e){if(!this.onToolCall)return;let r=(a,s)=>{if(!a)return;let c=`${a}:${JSON.stringify(s??{})}`;this._lastToolEmit!==c&&(this._lastToolEmit=c,this.onToolCall(a,s??void 0))},n=a=>{if(a!=null){if(typeof a=="object"&&!Array.isArray(a))return a;if(typeof a=="string")try{return JSON.parse(a)}catch{return}}};if(e.type==="tool_use"||e.type==="tool_call"){if(e.name){r(e.name,n(e.input??e.arguments));return}let a=e.tool_call;if(a&&typeof a=="object"&&!Array.isArray(a)){let s=Object.keys(a);if(s.length===1){let c=s[0],l=a[c],u=l&&typeof l=="object"?l.args??l.input??l:void 0;r(c,n(u))}return}return}if(Array.isArray(e.tool_calls)){for(let a of e.tool_calls)r(a.name,n(a.input??a.arguments));return}let i=e.message??e;if(Array.isArray(i?.tool_calls)){for(let a of i.tool_calls)r(a.name,n(a.input??a.arguments));return}let o=i?.content??e.content;if(Array.isArray(o))for(let a of o)(a.type==="tool_use"||a.type==="tool_call")&&a.name&&r(a.name,n(a.input??a.arguments))}extractText(e){if(e.type==="assistant"&&e.message?.content){let r=e.message.content;if(Array.isArray(r))return r.filter(n=>n.type==="text"&&n.text).map(n=>n.text).join("")}return e.type==="thinking"&&e.text||e.text?e.text:e.content&&typeof e.content=="string"?e.content:e.delta?e.delta:null}tryExtractResult(e){if(!e||typeof e!="string")return;let r=[],n=/```json\s*\n?([\s\S]*?)\n?```/g,i;for(;(i=n.exec(e))!==null;){let d=i[1].trim();try{JSON.parse(d),r.push({text:d,source:"markdown"})}catch{}}let o=0,a=0;for(;o<e.length&&(o=e.indexOf("{",o),o!==-1);){let d=0,f=o;for(let p=o;p<e.length;p++)if(e[p]==="{")d++;else if(e[p]==="}"&&(d--,d===0)){f=p,r.push({text:e.substring(o,f+1),source:"brace"}),a++;break}o=f+1}let s=this.extractedResult,c=s?JSON.stringify(s).length:0,l=0,u=-1;for(let d=0;d<r.length;d++){let f=r[d];try{let p=f.text.replace(/,(\s*[}\]])/g,"$1"),m=JSON.parse(p);this.isValidResult(m)&&(l++,c=JSON.stringify(m).length,s=m,u=d)}catch{}}s&&(this.extractedResult=s)}isValidResult(e){if(!e||typeof e!="object"||Array.isArray(e)||e.session_id||e.timestamp_ms||e.type||e.call_id||e.tool_call||e.result&&typeof e.result=="object"&&(e.result.success&&typeof e.result.success=="object"||e.result.error&&typeof e.result.error=="object")||e.args&&typeof e.args=="object")return!1;if(this.zodSchema)try{return this.zodSchema.parse(e),!0}catch{return!1}return!0}getResult(){return this.extractedResult}getRawText(){return this.rawText}static extractResult(e,r=null){let n=new t;n.zodSchema=r,n.processChunk(e),n.flush();let i=n.getResult();return!i&&process.env.LOG_LEVEL==="debug"&&console.error("[StreamingParser] No result extracted from",e?.length||0,"chars"),i}}});var pR={};Ln(pR,{WorkflowState:()=>nd});function ix(t){if(iQ.has(t))throw new Error(`Invalid state key: "${t}"`)}var iQ,nd,ox=P(()=>{iQ=new Set(["__proto__","constructor","prototype"]);nd=class{constructor(e={}){this._state=Object.create(null),Object.assign(this._state,{messages:[],errors:[],artifacts:{},metadata:{},...e}),this._history=[]}get(e){return this._state[e]}set(e,r){ix(e),this._history.push({...this._state}),this._state[e]=r}update(e){let r=Object.getOwnPropertyNames(e);for(let n of r)ix(n);this._history.push({...this._state});for(let n of r)this._state[n]=e[n]}append(e,r){ix(e),this._history.push({...this._state}),Array.isArray(this._state[e])||(this._state[e]=[]),this._state[e].push(r)}getAll(){return{...this._state}}rollback(){this._history.length>0&&(this._state=this._history.pop())}}});var nh,fR=P(()=>{nh=class{constructor(e){this.schema=e}parse(e){let r=e.match(/```json\s*([\s\S]*?)\s*```/);if(r)return this.validate(JSON.parse(r[1]));let n=e.match(/\{[\s\S]*\}/);return n?this.validate(JSON.parse(n[0])):this.validate({result:e.trim()})}validate(e){let r=[];for(let[n,i]of Object.entries(this.schema)){if(i.required&&!(n in e)&&r.push(`Missing required field: ${n}`),n in e&&i.type){let o=typeof e[n];o!==i.type&&r.push(`Field '${n}' expected ${i.type}, got ${o}`)}if(i.validate&&n in e){let o=i.validate(e[n]);o&&r.push(`Field '${n}': ${o}`)}}if(r.length>0)throw new Error(`Output validation failed:
5
+ ${r.join(`
6
+ `)}`);return e}}});import id from"chalk";var zi,ih,Z,ni=P(()=>{zi={debug:0,info:1,warn:2,error:3,silent:4},ih=class{constructor(){this._level=this._getLogLevel()}_getLogLevel(){if(process.env.ZIBBY_DEBUG==="true")return zi.debug;if(process.env.ZIBBY_VERBOSE==="true")return zi.info;let e=process.env.LOG_LEVEL?.toLowerCase();return e&&e in zi?zi[e]:zi.info}_shouldLog(e){return zi[e]>=this._level}_formatMessage(e,r,n={}){let i=new Date().toISOString(),a=`${this._getPrefix(e)} ${r}`;return Object.keys(n).length>0&&(a+=id.dim(` ${JSON.stringify(n)}`)),a}_getPrefix(e){return{debug:id.gray("[DEBUG]"),info:id.cyan("[INFO]"),warn:id.yellow("[WARN]"),error:id.red("\u274C [ERROR]")}[e]||""}debug(e,r){this._shouldLog("debug")&&console.log(this._formatMessage("debug",e,r))}info(e,r){this._shouldLog("info")&&console.log(this._formatMessage("info",e,r))}warn(e,r){this._shouldLog("warn")&&console.warn(this._formatMessage("warn",e,r))}error(e,r){this._shouldLog("error")&&console.error(this._formatMessage("error",e,r))}setLevel(e){e in zi&&(this._level=zi[e])}getLevel(){return Object.keys(zi).find(e=>zi[e]===this._level)}},Z=new ih});import Tr from"chalk";function _R(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function bR(t,e){return(r,n,i)=>{if(typeof r!="string")return t(r,n,i);let o=process.stdout.columns||120,a="";for(let s=0;s<r.length;s++){let c=r[s];e.lineStart&&(a+=vR,e.col=yR,e.lineStart=!1),c===`
7
+ `?(a+=c,e.lineStart=!0,e.col=0,e.inEsc=!1):c==="\x1B"?(e.inEsc=!0,a+=c):e.inEsc?(a+=c,(c>="A"&&c<="Z"||c>="a"&&c<="z")&&(e.inEsc=!1)):(e.col++,a+=c,e.col>=o&&(a+=`
8
+ ${vR}`,e.col=yR))}return t(a,n,i)}}var oQ,od,aQ,mR,ax,hR,gR,sx,vR,yR,cx,Wt,Ya=P(()=>{oQ="__WORKFLOW_GRAPH_LOG__",od=Tr.gray("\u2502"),aQ=Tr.gray("\u250C"),mR=Tr.gray("\u2514"),ax=Tr.green("\u25C6"),hR=Tr.hex("#c084fc")("\u25C6"),gR=Tr.hex("#2dd4bf")("\u25C6"),sx=Tr.red("\u25C6"),vR=`${od} `,yR=2;cx=class{constructor(){this._currentNode=null,this._origStdoutWrite=null,this._origStderrWrite=null;let e=String(process.env.ZIBBY_RUN_SOURCE||"").trim().toLowerCase(),r=String(process.env.ZIBBY_WORKFLOW_GRAPH_LOG_MARKERS||"").trim()==="1";this._emitWorkflowGraphMarkers=r||e==="studio"}get isInsideNode(){return this._currentNode!==null}_startIntercepting(){this._origStdoutWrite=process.stdout.write.bind(process.stdout),this._origStderrWrite=process.stderr.write.bind(process.stderr);let e={lineStart:!0,col:0,inEsc:!1},r={lineStart:!0,col:0,inEsc:!1};this._outState=e,this._errState=r,process.stdout.write=bR(this._origStdoutWrite,e),process.stderr.write=bR(this._origStderrWrite,r)}_stopIntercepting(){this._origStdoutWrite&&(this._outState&&!this._outState.lineStart&&this._origStdoutWrite(`
9
+ `),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
10
+ `),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(e){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${e}
11
+ `)}_emitGraphLogMarker(e){if(!this._emitWorkflowGraphMarkers)return;let r=`${oQ}${JSON.stringify(e)}
12
+ `;this._origStdoutWrite?this._origStdoutWrite(r):process.stdout.write(r)}_writeDot(e,r){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
13
+ `),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${e} ${r}
14
+ `)):process.stdout.write.bind(process.stdout)(`${e} ${r}
15
+ `)}step(e){this._origStdoutWrite?this._writeDot(ax,e):process.stdout.write.bind(process.stdout)(`${od} ${ax} ${e}
16
+ `)}stepTool(e){this._origStdoutWrite?this._writeDot(hR,e):process.stdout.write.bind(process.stdout)(`${od} ${hR} ${e}
17
+ `)}stepMemory(e){let r=Tr.hex("#2dd4bf")(e);this._origStdoutWrite?this._writeDot(gR,r):process.stdout.write.bind(process.stdout)(`${od} ${gR} ${r}
18
+ `)}stepFail(e){this._origStdoutWrite?this._writeDot(sx,Tr.red(e)):process.stdout.write.bind(process.stdout)(`${od} ${sx} ${Tr.red(e)}
19
+ `)}nodeStart(e){this._currentNode=e,this._emitGraphLogMarker({phase:"node_begin",node:e}),this._rawWrite(`${aQ} ${e}`),this._startIntercepting()}nodeComplete(e,r={}){this._stopIntercepting();let{duration:n,details:i}=r;if(i)for(let a of i)this._rawWrite(`${ax} ${a}`);let o=n?Tr.dim(` ${_R(n)}`):"";this._rawWrite(`${mR} ${Tr.green("done")}${o}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}nodeFailed(e,r,n={}){this._stopIntercepting();let{duration:i}=n,o=i?Tr.dim(` ${_R(i)}`):"";this._rawWrite(`${sx} ${Tr.red(r)}`),this._rawWrite(`${mR} ${Tr.red("failed")}${o}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}route(e,r){this._rawWrite(Tr.dim(` ${e} \u2192 ${r}`)),this._rawWrite("")}graphComplete(){this._rawWrite(Tr.green.bold("\u2713 Workflow completed"))}},Wt=new cx});var rn,Ja=P(()=>{rn=class{constructor(e,r,n=0){this.name=e,this.description=r,this.priority=n}async invoke(e,r={}){throw new Error("AgentStrategy.invoke() must be implemented by subclass")}canHandle(e){throw new Error("AgentStrategy.canHandle() must be implemented by subclass")}getName(){return this.name}getDescription(){return this.description}getPriority(){return this.priority}}});var qr,sQ,cQ,lx,ux,xR,oh,ra=P(()=>{qr={ASSISTANT:"gpt-5.4-nano-2026-03-17",CLAUDE:"claude-sonnet-4-6",CURSOR:"auto",CODEX:"o4-mini",GEMINI:"gemini-2.5-pro",OPENAI_POSTPROCESSING:"gpt-4o-mini"},sQ={ASSISTANT:"assistant",CLAUDE:"claude",CURSOR:"cursor",CODEX:"codex",GEMINI:"gemini"},cQ={DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error",SILENT:"silent"},lx={auto:"claude-sonnet-4-6","sonnet-4.6":"claude-sonnet-4-6","sonnet-4-6":"claude-sonnet-4-6","opus-4.6":"claude-opus-4-6","opus-4-6":"claude-opus-4-6","sonnet-4.5":"claude-sonnet-4-5-20250929","sonnet-4-5":"claude-sonnet-4-5-20250929","opus-4.5":"claude-opus-4-20250514","opus-4-5":"claude-opus-4-20250514","claude-sonnet-4-6":"claude-sonnet-4-6","claude-opus-4-6":"claude-opus-4-6","claude-sonnet-4-5-20250929":"claude-sonnet-4-5-20250929","claude-opus-4-20250514":"claude-opus-4-20250514"},ux={auto:"o4-mini","o4-mini":"o4-mini",o3:"o3","o3-mini":"o3-mini","codex-mini":"codex-mini-latest","gpt-4o":"gpt-4o","gpt-4o-mini":"gpt-4o-mini","gpt-5.2-codex":"gpt-5.2-codex","gpt-5.2":"gpt-5.2","gpt-5.3":"gpt-5.3","gpt-5.4":"gpt-5.4"},xR={auto:"gemini-2.5-pro","gemini-2.5-pro":"gemini-2.5-pro","gemini-2.5-flash":"gemini-2.5-flash"},oh={CURSOR_AGENT_DEFAULT:1200*1e3,OPENAI_REQUEST:18e4}});var dx={};Ln(dx,{getAllSkills:()=>ah,getSkill:()=>Fr,hasSkill:()=>SR,listSkillIds:()=>kR,registerSkill:()=>wR});function wR(t){if(!t||typeof t.id!="string")throw new Error("Skill definition must include a string id");ad.set(t.id,Object.freeze({...t}))}function Fr(t){return ad.get(t)||null}function SR(t){return ad.has(t)}function ah(){return new Map(ad)}function kR(){return Array.from(ad.keys())}var ad,$o=P(()=>{ad=new Map});var fx,lQ,px,mx,sh=P(()=>{fx=Symbol("Let zodToJsonSchema decide on which parser to use"),lQ=(t,e)=>{if(e.description)try{return{...t,...JSON.parse(e.description)}}catch{}return t},px={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},mx=t=>typeof t=="string"?{...px,name:t}:{...px,...t}});var hx,gx=P(()=>{sh();hx=t=>{let e=mx(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}}});function ch(t,e,r,n){n?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function pt(t,e,r,n,i){t[e]=r,ch(t,e,n,i)}var na=P(()=>{});var sd,lh=P(()=>{sd=(t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")}});var ut,vx,pe,oo,cd=P(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ut||(ut={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(vx||(vx={}));pe=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=t=>{switch(typeof t){case"undefined":return pe.undefined;case"string":return pe.string;case"number":return Number.isNaN(t)?pe.nan:pe.number;case"boolean":return pe.boolean;case"function":return pe.function;case"bigint":return pe.bigint;case"symbol":return pe.symbol;case"object":return Array.isArray(t)?pe.array:t===null?pe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?pe.promise:typeof Map<"u"&&t instanceof Map?pe.map:typeof Set<"u"&&t instanceof Set?pe.set:typeof Date<"u"&&t instanceof Date?pe.date:pe.object;default:return pe.unknown}}});var J,uQ,bn,uh=P(()=>{cd();J=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),uQ=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),bn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r=Object.create(null),n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};bn.create=t=>new bn(t)});var dQ,Eo,yx=P(()=>{uh();cd();dQ=(t,e)=>{let r;switch(t.code){case J.invalid_type:t.received===pe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ut.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${ut.joinValues(t.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ut.joinValues(t.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${ut.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ut.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case J.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case J.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=e.defaultError,ut.assertNever(t)}return{message:r}},Eo=dQ});function pQ(t){$R=t}function Pc(){return $R}var $R,dh=P(()=>{yx();$R=Eo});function se(t,e){let r=Pc(),n=ld({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Eo?void 0:Eo].filter(i=>!!i)});t.common.issues.push(n)}var ld,fQ,Or,Oe,Xa,Vr,ph,fh,ia,Tc,_x=P(()=>{dh();yx();ld=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",c=n.filter(l=>!!l).slice().reverse();for(let l of c)s=l(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}},fQ=[];Or=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Oe;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Oe;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},Oe=Object.freeze({status:"aborted"}),Xa=t=>({status:"dirty",value:t}),Vr=t=>({status:"valid",value:t}),ph=t=>t.status==="aborted",fh=t=>t.status==="dirty",ia=t=>t.status==="valid",Tc=t=>typeof Promise<"u"&&t instanceof Promise});var ER=P(()=>{});var _e,IR=P(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(_e||(_e={}))});function Ve(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{let{message:c}=t;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:i}}function zR(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function OQ(t){return new RegExp(`^${zR(t)}$`)}function jR(t){let e=`${OR}T${zR(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function zQ(t,e){return!!((e==="v4"||!e)&&SQ.test(t)||(e==="v6"||!e)&&$Q.test(t))}function jQ(t,e){if(!_Q.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function NQ(t,e){return!!((e==="v4"||!e)&&kQ.test(t)||(e==="v6"||!e)&&EQ.test(t))}function RQ(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function Oc(t){if(t instanceof xn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=ii.create(Oc(n))}return new xn({...t._def,shape:()=>e})}else return t instanceof To?new To({...t._def,type:Oc(t.element)}):t instanceof ii?ii.create(Oc(t.unwrap())):t instanceof so?so.create(Oc(t.unwrap())):t instanceof ao?ao.create(t.items.map(e=>Oc(e))):t}function xx(t,e){let r=oo(t),n=oo(e);if(t===e)return{valid:!0,data:t};if(r===pe.object&&n===pe.object){let i=ut.objectKeys(e),o=ut.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let c=xx(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===pe.array&&n===pe.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],c=xx(a,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===pe.date&&n===pe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function NR(t,e){return new us({values:t,typeName:X.ZodEnum,...Ve(e)})}function TR(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function RR(t,e={},r){return t?aa.create().superRefine((n,i)=>{let o=t(n);if(o instanceof Promise)return o.then(a=>{if(!a){let s=TR(e,n),c=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:c})}});if(!o){let a=TR(e,n),s=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:s})}}):aa.create()}var oi,PR,Je,mQ,hQ,gQ,vQ,yQ,_Q,bQ,xQ,wQ,bx,SQ,kQ,$Q,EQ,IQ,PQ,OR,TQ,oa,es,ts,rs,ns,zc,is,os,aa,Po,ji,jc,To,xn,as,Io,mh,ss,ao,hh,Nc,Rc,gh,cs,ls,us,ds,sa,ai,ii,so,ps,fs,Cc,CQ,ud,dd,ms,AQ,X,UQ,CR,AR,DQ,MQ,UR,LQ,ZQ,qQ,FQ,VQ,WQ,BQ,GQ,KQ,DR,HQ,QQ,YQ,JQ,XQ,e7,t7,r7,n7,i7,o7,a7,s7,c7,l7,u7,d7,p7,f7,m7,h7,g7,v7,y7,MR=P(()=>{uh();dh();IR();_x();cd();oi=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},PR=(t,e)=>{if(ia(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new bn(t.common.issues);return this._error=r,this._error}}};Je=class{get description(){return this._def.description}_getType(e){return oo(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Or,ctx:{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Tc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},i=this._parseSync({data:e,path:n.path,parent:n});return PR(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return ia(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>ia(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(Tc(i)?i:Promise.resolve(i));return PR(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:J.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new ai({schema:this,typeName:X.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ii.create(this,this._def)}nullable(){return so.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return To.create(this)}promise(){return sa.create(this,this._def)}or(e){return as.create([this,e],this._def)}and(e){return ss.create(this,e,this._def)}transform(e){return new ai({...Ve(this._def),schema:this,typeName:X.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ps({...Ve(this._def),innerType:this,defaultValue:r,typeName:X.ZodDefault})}brand(){return new ud({typeName:X.ZodBranded,type:this,...Ve(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new fs({...Ve(this._def),innerType:this,catchValue:r,typeName:X.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return dd.create(this,e)}readonly(){return ms.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mQ=/^c[^\s-]{8,}$/i,hQ=/^[0-9a-z]+$/,gQ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vQ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yQ=/^[a-z0-9_-]{21}$/i,_Q=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bQ=/^[-+]?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)?)??$/,xQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",SQ=/^(?:(?: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])$/,kQ=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,$Q=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,EQ=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,IQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PQ=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,OR="((\\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])))",TQ=new RegExp(`^${OR}$`);oa=class t extends Je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==pe.string){let o=this._getOrReturnCtx(e);return se(o,{code:J.invalid_type,expected:pe.string,received:o.parsedType}),Oe}let n=new Or,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:J.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:J.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?se(i,{code:J.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&se(i,{code:J.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")xQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"email",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")bx||(bx=new RegExp(wQ,"u")),bx.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"emoji",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")vQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"uuid",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")yQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"nanoid",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")mQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")hQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid2",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")gQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ulid",code:J.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),se(i,{validation:"url",code:J.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"regex",code:J.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?jR(o).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?TQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?OQ(o).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:J.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?bQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"duration",code:J.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?zQ(e.data,o.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ip",code:J.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?jQ(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"jwt",code:J.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?NQ(e.data,o.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cidr",code:J.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?IQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64",code:J.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?PQ.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64url",code:J.invalid_string,message:o.message}),n.dirty()):ut.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:J.invalid_string,..._e.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._e.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._e.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._e.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._e.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._e.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._e.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._e.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._e.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._e.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._e.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._e.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._e.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._e.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,..._e.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,..._e.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",..._e.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,..._e.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,..._e.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,..._e.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,..._e.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,..._e.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,..._e.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,..._e.errToObj(r)})}nonempty(e){return this.min(1,_e.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};oa.create=t=>new oa({checks:[],typeName:X.ZodString,coerce:t?.coerce??!1,...Ve(t)});es=class t extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==pe.number){let o=this._getOrReturnCtx(e);return se(o,{code:J.invalid_type,expected:pe.number,received:o.parsedType}),Oe}let n,i=new Or;for(let o of this._def.checks)o.kind==="int"?ut.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:J.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?RQ(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:J.not_finite,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_e.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:_e.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ut.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};es.create=t=>new es({checks:[],typeName:X.ZodNumber,coerce:t?.coerce||!1,...Ve(t)});ts=class t extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==pe.bigint)return this._getInvalidInput(e);let n,i=new Or;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ut.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return se(r,{code:J.invalid_type,expected:pe.bigint,received:r.parsedType}),Oe}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ts.create=t=>new ts({checks:[],typeName:X.ZodBigInt,coerce:t?.coerce??!1,...Ve(t)});rs=class extends Je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==pe.boolean){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.boolean,received:n.parsedType}),Oe}return Vr(e.data)}};rs.create=t=>new rs({typeName:X.ZodBoolean,coerce:t?.coerce||!1,...Ve(t)});ns=class t extends Je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==pe.date){let o=this._getOrReturnCtx(e);return se(o,{code:J.invalid_type,expected:pe.date,received:o.parsedType}),Oe}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return se(o,{code:J.invalid_date}),Oe}let n=new Or,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:J.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:J.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):ut.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:_e.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:_e.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};ns.create=t=>new ns({checks:[],coerce:t?.coerce||!1,typeName:X.ZodDate,...Ve(t)});zc=class extends Je{_parse(e){if(this._getType(e)!==pe.symbol){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.symbol,received:n.parsedType}),Oe}return Vr(e.data)}};zc.create=t=>new zc({typeName:X.ZodSymbol,...Ve(t)});is=class extends Je{_parse(e){if(this._getType(e)!==pe.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.undefined,received:n.parsedType}),Oe}return Vr(e.data)}};is.create=t=>new is({typeName:X.ZodUndefined,...Ve(t)});os=class extends Je{_parse(e){if(this._getType(e)!==pe.null){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.null,received:n.parsedType}),Oe}return Vr(e.data)}};os.create=t=>new os({typeName:X.ZodNull,...Ve(t)});aa=class extends Je{constructor(){super(...arguments),this._any=!0}_parse(e){return Vr(e.data)}};aa.create=t=>new aa({typeName:X.ZodAny,...Ve(t)});Po=class extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vr(e.data)}};Po.create=t=>new Po({typeName:X.ZodUnknown,...Ve(t)});ji=class extends Je{_parse(e){let r=this._getOrReturnCtx(e);return se(r,{code:J.invalid_type,expected:pe.never,received:r.parsedType}),Oe}};ji.create=t=>new ji({typeName:X.ZodNever,...Ve(t)});jc=class extends Je{_parse(e){if(this._getType(e)!==pe.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.void,received:n.parsedType}),Oe}return Vr(e.data)}};jc.create=t=>new jc({typeName:X.ZodVoid,...Ve(t)});To=class t extends Je{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==pe.array)return se(r,{code:J.invalid_type,expected:pe.array,received:r.parsedType}),Oe;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(se(r,{code:a?J.too_big:J.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(se(r,{code:J.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(se(r,{code:J.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new oi(r,a,r.path,s)))).then(a=>Or.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new oi(r,a,r.path,s)));return Or.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:_e.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:_e.toString(r)}})}nonempty(e){return this.min(1,e)}};To.create=(t,e)=>new To({type:t,minLength:null,maxLength:null,exactLength:null,typeName:X.ZodArray,...Ve(e)});xn=class t extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ut.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==pe.object){let l=this._getOrReturnCtx(e);return se(l,{code:J.invalid_type,expected:pe.object,received:l.parsedType}),Oe}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof ji&&this._def.unknownKeys==="strip"))for(let l in i.data)a.includes(l)||s.push(l);let c=[];for(let l of a){let u=o[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new oi(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof ji){let l=this._def.unknownKeys;if(l==="passthrough")for(let u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(se(i,{code:J.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let u of s){let d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new oi(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let u of c){let d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>Or.mergeObjectSync(n,l)):Or.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return _e.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:_e.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:X.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of ut.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of ut.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Oc(this)}partial(e){let r={};for(let n of ut.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of ut.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof ii;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return NR(ut.objectKeys(this.shape))}};xn.create=(t,e)=>new xn({shape:()=>t,unknownKeys:"strip",catchall:ji.create(),typeName:X.ZodObject,...Ve(e)});xn.strictCreate=(t,e)=>new xn({shape:()=>t,unknownKeys:"strict",catchall:ji.create(),typeName:X.ZodObject,...Ve(e)});xn.lazycreate=(t,e)=>new xn({shape:t,unknownKeys:"strip",catchall:ji.create(),typeName:X.ZodObject,...Ve(e)});as=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new bn(s.ctx.common.issues));return se(r,{code:J.invalid_union,unionErrors:a}),Oe}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let c of n){let l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new bn(c));return se(r,{code:J.invalid_union,unionErrors:s}),Oe}}get options(){return this._def.options}};as.create=(t,e)=>new as({options:t,typeName:X.ZodUnion,...Ve(e)});Io=t=>t instanceof cs?Io(t.schema):t instanceof ai?Io(t.innerType()):t instanceof ls?[t.value]:t instanceof us?t.options:t instanceof ds?ut.objectValues(t.enum):t instanceof ps?Io(t._def.innerType):t instanceof is?[void 0]:t instanceof os?[null]:t instanceof ii?[void 0,...Io(t.unwrap())]:t instanceof so?[null,...Io(t.unwrap())]:t instanceof ud||t instanceof ms?Io(t.unwrap()):t instanceof fs?Io(t._def.innerType):[],mh=class t extends Je{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.object)return se(r,{code:J.invalid_type,expected:pe.object,received:r.parsedType}),Oe;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Oe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=Io(o.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t({typeName:X.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ve(n)})}};ss=class extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(ph(o)||ph(a))return Oe;let s=xx(o.value,a.value);return s.valid?((fh(o)||fh(a))&&r.dirty(),{status:r.value,value:s.data}):(se(n,{code:J.invalid_intersection_types}),Oe)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ss.create=(t,e,r)=>new ss({left:t,right:e,typeName:X.ZodIntersection,...Ve(r)});ao=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.array)return se(n,{code:J.invalid_type,expected:pe.array,received:n.parsedType}),Oe;if(n.data.length<this._def.items.length)return se(n,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Oe;!this._def.rest&&n.data.length>this._def.items.length&&(se(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new oi(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Or.mergeArray(r,a)):Or.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ao.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ao({items:t,typeName:X.ZodTuple,rest:null,...Ve(e)})};hh=class t extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.object)return se(n,{code:J.invalid_type,expected:pe.object,received:n.parsedType}),Oe;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new oi(n,s,n.path,s)),value:a._parse(new oi(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Or.mergeObjectAsync(r,i):Or.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Je?new t({keyType:e,valueType:r,typeName:X.ZodRecord,...Ve(n)}):new t({keyType:oa.create(),valueType:e,typeName:X.ZodRecord,...Ve(r)})}},Nc=class extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.map)return se(n,{code:J.invalid_type,expected:pe.map,received:n.parsedType}),Oe;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:i._parse(new oi(n,s,n.path,[l,"key"])),value:o._parse(new oi(n,c,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Oe;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Oe;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}};Nc.create=(t,e,r)=>new Nc({valueType:e,keyType:t,typeName:X.ZodMap,...Ve(r)});Rc=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.set)return se(n,{code:J.invalid_type,expected:pe.set,received:n.parsedType}),Oe;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(se(n,{code:J.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(se(n,{code:J.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let l=new Set;for(let u of c){if(u.status==="aborted")return Oe;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((c,l)=>o._parse(new oi(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:_e.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Rc.create=(t,e)=>new Rc({valueType:t,minSize:null,maxSize:null,typeName:X.ZodSet,...Ve(e)});gh=class t extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.function)return se(r,{code:J.invalid_type,expected:pe.function,received:r.parsedType}),Oe;function n(s,c){return ld({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Pc(),Eo].filter(l=>!!l),issueData:{code:J.invalid_arguments,argumentsError:c}})}function i(s,c){return ld({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Pc(),Eo].filter(l=>!!l),issueData:{code:J.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof sa){let s=this;return Vr(async function(...c){let l=new bn([]),u=await s._def.args.parseAsync(c,o).catch(p=>{throw l.addIssue(n(c,p)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(p=>{throw l.addIssue(i(d,p)),l})})}else{let s=this;return Vr(function(...c){let l=s._def.args.safeParse(c,o);if(!l.success)throw new bn([n(c,l.error)]);let u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new bn([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:ao.create(e).rest(Po.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||ao.create([]).rest(Po.create()),returns:r||Po.create(),typeName:X.ZodFunction,...Ve(n)})}},cs=class extends Je{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};cs.create=(t,e)=>new cs({getter:t,typeName:X.ZodLazy,...Ve(e)});ls=class extends Je{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return se(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),Oe}return{status:"valid",value:e.data}}get value(){return this._def.value}};ls.create=(t,e)=>new ls({value:t,typeName:X.ZodLiteral,...Ve(e)});us=class t extends Je{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return se(r,{expected:ut.joinValues(n),received:r.parsedType,code:J.invalid_type}),Oe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return se(r,{received:r.data,code:J.invalid_enum_value,options:n}),Oe}return Vr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};us.create=NR;ds=class extends Je{_parse(e){let r=ut.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==pe.string&&n.parsedType!==pe.number){let i=ut.objectValues(r);return se(n,{expected:ut.joinValues(i),received:n.parsedType,code:J.invalid_type}),Oe}if(this._cache||(this._cache=new Set(ut.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=ut.objectValues(r);return se(n,{received:n.data,code:J.invalid_enum_value,options:i}),Oe}return Vr(e.data)}get enum(){return this._def.values}};ds.create=(t,e)=>new ds({values:t,typeName:X.ZodNativeEnum,...Ve(e)});sa=class extends Je{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.promise&&r.common.async===!1)return se(r,{code:J.invalid_type,expected:pe.promise,received:r.parsedType}),Oe;let n=r.parsedType===pe.promise?r.data:Promise.resolve(r.data);return Vr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};sa.create=(t,e)=>new sa({type:t,typeName:X.ZodPromise,...Ve(e)});ai=class extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===X.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{se(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return Oe;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Oe:c.status==="dirty"?Xa(c.value):r.value==="dirty"?Xa(c.value):c});{if(r.value==="aborted")return Oe;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?Oe:s.status==="dirty"?Xa(s.value):r.value==="dirty"?Xa(s.value):s}}if(i.type==="refinement"){let a=s=>{let c=i.refinement(s,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Oe:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Oe:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ia(a))return Oe;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>ia(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):Oe);ut.assertNever(i)}};ai.create=(t,e,r)=>new ai({schema:t,typeName:X.ZodEffects,effect:e,...Ve(r)});ai.createWithPreprocess=(t,e,r)=>new ai({schema:e,effect:{type:"preprocess",transform:t},typeName:X.ZodEffects,...Ve(r)});ii=class extends Je{_parse(e){return this._getType(e)===pe.undefined?Vr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ii.create=(t,e)=>new ii({innerType:t,typeName:X.ZodOptional,...Ve(e)});so=class extends Je{_parse(e){return this._getType(e)===pe.null?Vr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};so.create=(t,e)=>new so({innerType:t,typeName:X.ZodNullable,...Ve(e)});ps=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===pe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ps.create=(t,e)=>new ps({innerType:t,typeName:X.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});fs=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Tc(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new bn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new bn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};fs.create=(t,e)=>new fs({innerType:t,typeName:X.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});Cc=class extends Je{_parse(e){if(this._getType(e)!==pe.nan){let n=this._getOrReturnCtx(e);return se(n,{code:J.invalid_type,expected:pe.nan,received:n.parsedType}),Oe}return{status:"valid",value:e.data}}};Cc.create=t=>new Cc({typeName:X.ZodNaN,...Ve(t)});CQ=Symbol("zod_brand"),ud=class extends Je{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},dd=class t extends Je{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Oe:o.status==="dirty"?(r.dirty(),Xa(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Oe:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:X.ZodPipeline})}},ms=class extends Je{_parse(e){let r=this._def.innerType._parse(e),n=i=>(ia(i)&&(i.value=Object.freeze(i.value)),i);return Tc(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};ms.create=(t,e)=>new ms({innerType:t,typeName:X.ZodReadonly,...Ve(e)});AQ={object:xn.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(X||(X={}));UQ=(t,e={message:`Input not instance of ${t.name}`})=>RR(r=>r instanceof t,e),CR=oa.create,AR=es.create,DQ=Cc.create,MQ=ts.create,UR=rs.create,LQ=ns.create,ZQ=zc.create,qQ=is.create,FQ=os.create,VQ=aa.create,WQ=Po.create,BQ=ji.create,GQ=jc.create,KQ=To.create,DR=xn.create,HQ=xn.strictCreate,QQ=as.create,YQ=mh.create,JQ=ss.create,XQ=ao.create,e7=hh.create,t7=Nc.create,r7=Rc.create,n7=gh.create,i7=cs.create,o7=ls.create,a7=us.create,s7=ds.create,c7=sa.create,l7=ai.create,u7=ii.create,d7=so.create,p7=ai.createWithPreprocess,f7=dd.create,m7=()=>CR().optional(),h7=()=>AR().optional(),g7=()=>UR().optional(),v7={string:(t=>oa.create({...t,coerce:!0})),number:(t=>es.create({...t,coerce:!0})),boolean:(t=>rs.create({...t,coerce:!0})),bigint:(t=>ts.create({...t,coerce:!0})),date:(t=>ns.create({...t,coerce:!0}))},y7=Oe});var wx={};Ln(wx,{BRAND:()=>CQ,DIRTY:()=>Xa,EMPTY_PATH:()=>fQ,INVALID:()=>Oe,NEVER:()=>y7,OK:()=>Vr,ParseStatus:()=>Or,Schema:()=>Je,ZodAny:()=>aa,ZodArray:()=>To,ZodBigInt:()=>ts,ZodBoolean:()=>rs,ZodBranded:()=>ud,ZodCatch:()=>fs,ZodDate:()=>ns,ZodDefault:()=>ps,ZodDiscriminatedUnion:()=>mh,ZodEffects:()=>ai,ZodEnum:()=>us,ZodError:()=>bn,ZodFirstPartyTypeKind:()=>X,ZodFunction:()=>gh,ZodIntersection:()=>ss,ZodIssueCode:()=>J,ZodLazy:()=>cs,ZodLiteral:()=>ls,ZodMap:()=>Nc,ZodNaN:()=>Cc,ZodNativeEnum:()=>ds,ZodNever:()=>ji,ZodNull:()=>os,ZodNullable:()=>so,ZodNumber:()=>es,ZodObject:()=>xn,ZodOptional:()=>ii,ZodParsedType:()=>pe,ZodPipeline:()=>dd,ZodPromise:()=>sa,ZodReadonly:()=>ms,ZodRecord:()=>hh,ZodSchema:()=>Je,ZodSet:()=>Rc,ZodString:()=>oa,ZodSymbol:()=>zc,ZodTransformer:()=>ai,ZodTuple:()=>ao,ZodType:()=>Je,ZodUndefined:()=>is,ZodUnion:()=>as,ZodUnknown:()=>Po,ZodVoid:()=>jc,addIssueToContext:()=>se,any:()=>VQ,array:()=>KQ,bigint:()=>MQ,boolean:()=>UR,coerce:()=>v7,custom:()=>RR,date:()=>LQ,datetimeRegex:()=>jR,defaultErrorMap:()=>Eo,discriminatedUnion:()=>YQ,effect:()=>l7,enum:()=>a7,function:()=>n7,getErrorMap:()=>Pc,getParsedType:()=>oo,instanceof:()=>UQ,intersection:()=>JQ,isAborted:()=>ph,isAsync:()=>Tc,isDirty:()=>fh,isValid:()=>ia,late:()=>AQ,lazy:()=>i7,literal:()=>o7,makeIssue:()=>ld,map:()=>t7,nan:()=>DQ,nativeEnum:()=>s7,never:()=>BQ,null:()=>FQ,nullable:()=>d7,number:()=>AR,object:()=>DR,objectUtil:()=>vx,oboolean:()=>g7,onumber:()=>h7,optional:()=>u7,ostring:()=>m7,pipeline:()=>f7,preprocess:()=>p7,promise:()=>c7,quotelessJson:()=>uQ,record:()=>e7,set:()=>r7,setErrorMap:()=>pQ,strictObject:()=>HQ,string:()=>CR,symbol:()=>ZQ,transformer:()=>l7,tuple:()=>XQ,undefined:()=>qQ,union:()=>QQ,unknown:()=>WQ,util:()=>ut,void:()=>GQ});var Sx=P(()=>{dh();_x();ER();cd();MR();uh()});var Ac=P(()=>{Sx();Sx()});function Ht(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?sd(e,t.currentPath):e.join("/")}}var si=P(()=>{lh()});function kx(t,e){let r={type:"array"};return t.type?._def&&t.type?._def?.typeName!==X.ZodAny&&(r.items=ze(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&pt(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&pt(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(pt(r,"minItems",t.exactLength.value,t.exactLength.message,e),pt(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}var $x=P(()=>{Ac();na();gr()});function Ex(t,e){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?pt(r,"minimum",n.value,n.message,e):pt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),pt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?pt(r,"maximum",n.value,n.message,e):pt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),pt(r,"maximum",n.value,n.message,e));break;case"multipleOf":pt(r,"multipleOf",n.value,n.message,e);break}return r}var Ix=P(()=>{na()});function Px(){return{type:"boolean"}}var Tx=P(()=>{});function pd(t,e){return ze(t.type._def,e)}var vh=P(()=>{gr()});var Ox,zx=P(()=>{gr();Ox=(t,e)=>ze(t.innerType._def,e)});function yh(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,o)=>yh(t,e,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return b7(t,e)}}var b7,jx=P(()=>{na();b7=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let n of t.checks)switch(n.kind){case"min":pt(r,"minimum",n.value,n.message,e);break;case"max":pt(r,"maximum",n.value,n.message,e);break}return r}});function Nx(t,e){return{...ze(t.innerType._def,e),default:t.defaultValue()}}var Rx=P(()=>{gr()});function Cx(t,e){return e.effectStrategy==="input"?ze(t.schema._def,e):Ht(e)}var Ax=P(()=>{gr();si()});function Ux(t){return{type:"string",enum:Array.from(t.values)}}var Dx=P(()=>{});function Mx(t,e){let r=[ze(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),ze(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(o=>!!o),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(o=>{if(x7(o))i.push(...o.allOf),o.unevaluatedProperties===void 0&&(n=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:s,...c}=o;a=c}else n=void 0;i.push(a)}}),i.length?{allOf:i,...n}:void 0}var x7,Lx=P(()=>{gr();x7=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function Zx(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var qx=P(()=>{});function fd(t,e){let r={type:"string"};if(t.checks)for(let n of t.checks)switch(n.kind){case"min":pt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e);break;case"max":pt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Ni(r,"email",n.message,e);break;case"format:idn-email":Ni(r,"idn-email",n.message,e);break;case"pattern:zod":nn(r,ci.email,n.message,e);break}break;case"url":Ni(r,"uri",n.message,e);break;case"uuid":Ni(r,"uuid",n.message,e);break;case"regex":nn(r,n.regex,n.message,e);break;case"cuid":nn(r,ci.cuid,n.message,e);break;case"cuid2":nn(r,ci.cuid2,n.message,e);break;case"startsWith":nn(r,RegExp(`^${Vx(n.value,e)}`),n.message,e);break;case"endsWith":nn(r,RegExp(`${Vx(n.value,e)}$`),n.message,e);break;case"datetime":Ni(r,"date-time",n.message,e);break;case"date":Ni(r,"date",n.message,e);break;case"time":Ni(r,"time",n.message,e);break;case"duration":Ni(r,"duration",n.message,e);break;case"length":pt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e),pt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"includes":{nn(r,RegExp(Vx(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&Ni(r,"ipv4",n.message,e),n.version!=="v4"&&Ni(r,"ipv6",n.message,e);break}case"base64url":nn(r,ci.base64url,n.message,e);break;case"jwt":nn(r,ci.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&nn(r,ci.ipv4Cidr,n.message,e),n.version!=="v4"&&nn(r,ci.ipv6Cidr,n.message,e);break}case"emoji":nn(r,ci.emoji(),n.message,e);break;case"ulid":{nn(r,ci.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Ni(r,"binary",n.message,e);break}case"contentEncoding:base64":{pt(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{nn(r,ci.base64,n.message,e);break}}break}case"nanoid":nn(r,ci.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Vx(t,e){return e.patternStrategy==="escape"?S7(t):t}function S7(t){let e="";for(let r=0;r<t.length;r++)w7.has(t[r])||(e+="\\"),e+=t[r];return e}function Ni(t,e,r,n){t.format||t.anyOf?.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&n.errorMessages&&{errorMessage:{format:r}}})):pt(t,"format",e,r,n)}function nn(t,e,r,n){t.pattern||t.allOf?.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:LR(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):pt(t,"pattern",LR(e,n),r,n)}function LR(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source,i="",o=!1,a=!1,s=!1;for(let c=0;c<n.length;c++){if(o){i+=n[c],o=!1;continue}if(r.i){if(a){if(n[c].match(/[a-z]/)){s?(i+=n[c],i+=`${n[c-2]}-${n[c]}`.toUpperCase(),s=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(i+=n[c],s=!0):i+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){i+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){i+=`(^|(?<=[\r
20
+ ]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
21
+ ]))`;continue}}if(r.s&&n[c]==="."){i+=a?`${n[c]}\r
22
+ `:`[${n[c]}\r
23
+ ]`;continue}i+=n[c],n[c]==="\\"?o=!0:a&&n[c]==="]"?a=!1:!a&&n[c]==="["&&(a=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return i}var Fx,ci,w7,_h=P(()=>{na();ci={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Fx===void 0&&(Fx=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Fx),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};w7=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function md(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===X.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((n,i)=>({...n,[i]:ze(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",i]})??Ht(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:ze(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return r;if(t.keyType?._def.typeName===X.ZodString&&t.keyType._def.checks?.length){let{type:n,...i}=fd(t.keyType._def,e);return{...r,propertyNames:i}}else{if(t.keyType?._def.typeName===X.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===X.ZodBranded&&t.keyType._def.type._def.typeName===X.ZodString&&t.keyType._def.type._def.checks?.length){let{type:n,...i}=pd(t.keyType._def,e);return{...r,propertyNames:i}}}return r}var bh=P(()=>{Ac();gr();_h();vh();si()});function Wx(t,e){if(e.mapStrategy==="record")return md(t,e);let r=ze(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Ht(e),n=ze(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Ht(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Bx=P(()=>{gr();bh();si()});function Gx(t){let e=t.values,n=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),i=Array.from(new Set(n.map(o=>typeof o)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}var Kx=P(()=>{});function Hx(t){return t.target==="openAi"?void 0:{not:Ht({...t,currentPath:[...t.currentPath,"not"]})}}var Qx=P(()=>{si()});function Yx(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Jx=P(()=>{});function Xx(t,e){if(e.target==="openApi3")return ZR(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in Uc&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((i,o)=>{let a=Uc[o._def.typeName];return a&&!i.includes(a)?[...i,a]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((i,o)=>{let a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...i,a];case"bigint":return[...i,"integer"];case"object":if(o._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){let i=n.filter((o,a,s)=>s.indexOf(o)===a);return{type:i.length>1?i:i[0],enum:r.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(o=>!n.includes(o))],[])};return ZR(t,e)}var Uc,ZR,xh=P(()=>{gr();Uc={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};ZR=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((n,i)=>ze(n._def,{...e,currentPath:[...e.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!e.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function ew(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:Uc[t.innerType._def.typeName],nullable:!0}:{type:[Uc[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=ze(t.innerType._def,{...e,currentPath:[...e.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=ze(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var tw=P(()=>{gr();xh()});function rw(t,e){let r={type:"number"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"int":r.type="integer",ch(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?pt(r,"minimum",n.value,n.message,e):pt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),pt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?pt(r,"maximum",n.value,n.message,e):pt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),pt(r,"maximum",n.value,n.message,e));break;case"multipleOf":pt(r,"multipleOf",n.value,n.message,e);break}return r}var nw=P(()=>{na()});function iw(t,e){let r=e.target==="openAi",n={type:"object",properties:{}},i=[],o=t.shape();for(let s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let l=$7(c);l&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let u=ze(c._def,{...e,currentPath:[...e.currentPath,"properties",s],propertyPath:[...e.currentPath,"properties",s]});u!==void 0&&(n.properties[s]=u,l||i.push(s))}i.length&&(n.required=i);let a=k7(t,e);return a!==void 0&&(n.additionalProperties=a),n}function k7(t,e){if(t.catchall._def.typeName!=="ZodNever")return ze(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function $7(t){try{return t.isOptional()}catch{return!0}}var ow=P(()=>{gr()});var aw,sw=P(()=>{gr();si();aw=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return ze(t.innerType._def,e);let r=ze(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ht(e)},r]}:Ht(e)}});var cw,lw=P(()=>{gr();cw=(t,e)=>{if(e.pipeStrategy==="input")return ze(t.in._def,e);if(e.pipeStrategy==="output")return ze(t.out._def,e);let r=ze(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),n=ze(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}}});function uw(t,e){return ze(t.type._def,e)}var dw=P(()=>{gr()});function pw(t,e){let n={type:"array",uniqueItems:!0,items:ze(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&pt(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&pt(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}var fw=P(()=>{na();gr()});function mw(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>ze(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:ze(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>ze(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var hw=P(()=>{gr()});function gw(t){return{not:Ht(t)}}var vw=P(()=>{si()});function yw(t){return Ht(t)}var _w=P(()=>{si()});var bw,xw=P(()=>{gr();bw=(t,e)=>ze(t.innerType._def,e)});var ww,Sw=P(()=>{Ac();si();$x();Ix();Tx();vh();zx();jx();Rx();Ax();Dx();Lx();qx();Bx();Kx();Qx();Jx();tw();nw();ow();sw();lw();dw();bh();fw();_h();hw();vw();xh();_w();xw();ww=(t,e,r)=>{switch(e){case X.ZodString:return fd(t,r);case X.ZodNumber:return rw(t,r);case X.ZodObject:return iw(t,r);case X.ZodBigInt:return Ex(t,r);case X.ZodBoolean:return Px();case X.ZodDate:return yh(t,r);case X.ZodUndefined:return gw(r);case X.ZodNull:return Yx(r);case X.ZodArray:return kx(t,r);case X.ZodUnion:case X.ZodDiscriminatedUnion:return Xx(t,r);case X.ZodIntersection:return Mx(t,r);case X.ZodTuple:return mw(t,r);case X.ZodRecord:return md(t,r);case X.ZodLiteral:return Zx(t,r);case X.ZodEnum:return Ux(t);case X.ZodNativeEnum:return Gx(t);case X.ZodNullable:return ew(t,r);case X.ZodOptional:return aw(t,r);case X.ZodMap:return Wx(t,r);case X.ZodSet:return pw(t,r);case X.ZodLazy:return()=>t.getter()._def;case X.ZodPromise:return uw(t,r);case X.ZodNaN:case X.ZodNever:return Hx(r);case X.ZodEffects:return Cx(t,r);case X.ZodAny:return Ht(r);case X.ZodUnknown:return yw(r);case X.ZodDefault:return Nx(t,r);case X.ZodBranded:return pd(t,r);case X.ZodReadonly:return bw(t,r);case X.ZodCatch:return Ox(t,r);case X.ZodPipeline:return cw(t,r);case X.ZodFunction:case X.ZodVoid:case X.ZodSymbol:return;default:return(n=>{})(e)}}});function ze(t,e,r=!1){let n=e.seen.get(t);if(e.override){let s=e.override?.(t,e,n,r);if(s!==fx)return s}if(n&&!r){let s=E7(n,e);if(s!==void 0)return s}let i={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,i);let o=ww(t,t.typeName,e),a=typeof o=="function"?ze(o(),e):o;if(a&&I7(t,e,a),e.postProcess){let s=e.postProcess(a,t,e);return i.jsonSchema=a,s}return i.jsonSchema=a,a}var E7,I7,gr=P(()=>{sh();Sw();lh();si();E7=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:sd(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,n)=>e.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Ht(e)):e.$refStrategy==="seen"?Ht(e):void 0}},I7=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r)});var qR=P(()=>{});var on,kw=P(()=>{gr();gx();si();on=(t,e)=>{let r=hx(e),n=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,u])=>({...c,[l]:ze(u._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??Ht(r)}),{}):void 0,i=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,o=ze(t._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??Ht(r),a=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;a!==void 0&&(o.title=a),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let s=i===void 0?n?{...o,[r.definitionPath]:n}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:o}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s}});var FR={};Ln(FR,{addErrorMessage:()=>ch,default:()=>P7,defaultOptions:()=>px,getDefaultOptions:()=>mx,getRefs:()=>hx,getRelativePath:()=>sd,ignoreOverride:()=>fx,jsonDescription:()=>lQ,parseAnyDef:()=>Ht,parseArrayDef:()=>kx,parseBigintDef:()=>Ex,parseBooleanDef:()=>Px,parseBrandedDef:()=>pd,parseCatchDef:()=>Ox,parseDateDef:()=>yh,parseDef:()=>ze,parseDefaultDef:()=>Nx,parseEffectsDef:()=>Cx,parseEnumDef:()=>Ux,parseIntersectionDef:()=>Mx,parseLiteralDef:()=>Zx,parseMapDef:()=>Wx,parseNativeEnumDef:()=>Gx,parseNeverDef:()=>Hx,parseNullDef:()=>Yx,parseNullableDef:()=>ew,parseNumberDef:()=>rw,parseObjectDef:()=>iw,parseOptionalDef:()=>aw,parsePipelineDef:()=>cw,parsePromiseDef:()=>uw,parseReadonlyDef:()=>bw,parseRecordDef:()=>md,parseSetDef:()=>pw,parseStringDef:()=>fd,parseTupleDef:()=>mw,parseUndefinedDef:()=>gw,parseUnionDef:()=>Xx,parseUnknownDef:()=>yw,primitiveMappings:()=>Uc,selectParser:()=>ww,setResponseValueAndErrors:()=>pt,zodPatterns:()=>ci,zodToJsonSchema:()=>on});var P7,ca=P(()=>{sh();gx();na();lh();gr();qR();si();$x();Ix();Tx();vh();zx();jx();Rx();Ax();Dx();Lx();qx();Bx();Kx();Qx();Jx();tw();nw();ow();sw();lw();dw();xw();bh();fw();_h();hw();vw();xh();_w();Sw();kw();kw();P7=on});var Dc,$w=P(()=>{ca();Dc=class{static generateFileOutputInstructions(e,r){let n;typeof e?.parse=="function"?n=on(e,{target:"openApi3"}):n=e;let i=this._buildExample(n);return`
24
+ \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
25
+ \u{1F6A8} MANDATORY: WRITE RESULT TO FILE \u{1F6A8}
26
+ \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
27
+ You MUST write your final result as pure JSON to this EXACT file path:
28
+
29
+ ${r}
30
+
31
+ Use your file writing tool (WriteFile or ApplyPatch) to create this file.
32
+ DO NOT just output JSON to stdout. The file MUST exist when you finish.
33
+ DO NOT skip this step. The workflow WILL FAIL if the file is missing.
34
+
35
+ Required JSON structure:
36
+ ${JSON.stringify(i,null,2)}
37
+
38
+ JSON types (strict \u2014 validators reject wrong types):
39
+ - Use bare JSON numbers for numeric fields (e.g. 3000). Do NOT quote them as strings (wrong: "3000").
40
+ - Use true/false without quotes for booleans.
41
+ - Use unquoted null where a field may be null.
42
+
43
+ Rules: valid JSON only, no markdown wrapping, no extra text in the file.`}static _buildExample(e){if(!e)return{};let r=e.type;if(r==="object"&&e.properties){let n={};for(let[i,o]of Object.entries(e.properties))n[i]=this._buildExample(o);return n}if(r==="array"&&e.items)return[this._buildExample(e.items)];if(r==="string")return"<string>";if(r==="number"||r==="integer")return 0;if(r==="boolean")return!1;if(e.description)return`<${e.description}>`;if(e.nullable||e.oneOf||e.anyOf){let n=e.oneOf?.find(i=>i.type!=="null")||e.anyOf?.find(i=>i.type!=="null");return n?this._buildExample(n):null}return"<value>"}}});function hd(t,e){return function(){return t.apply(e,arguments)}}var Ew=P(()=>{"use strict"});function gd(t){return t!==null&&!Mc(t)&&t.constructor!==null&&!Mc(t.constructor)&&wn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}function O7(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&KR(t.buffer),e}function Z7(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function yd(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),Lc(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(gd(t))return;let o=r?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length,s;for(n=0;n<a;n++)s=o[n],e.call(null,t[s],s,t)}}function QR(t,e){if(gd(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}function Iw(){let{caseless:t,skipUndefined:e}=YR(this)&&this||{},r={},n=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;let a=t&&QR(r,o)||o;wh(r[a])&&wh(i)?r[a]=Iw(r[a],i):wh(i)?r[a]=Iw({},i):Lc(i)?r[a]=i.slice():(!e||!Mc(i))&&(r[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&yd(arguments[i],n);return r}function dY(t){return!!(t&&wn(t.append)&&t[GR]==="FormData"&&t[Sh])}var T7,Pw,Sh,GR,kh,Ri,$h,Lc,Mc,KR,z7,wn,HR,vd,j7,wh,N7,R7,C7,A7,U7,D7,M7,L7,VR,WR,q7,F7,V7,W7,B7,G7,K7,hs,YR,H7,Q7,Y7,J7,X7,eY,tY,rY,nY,iY,oY,BR,aY,JR,sY,cY,lY,uY,pY,fY,mY,XR,hY,gY,j,Bt=P(()=>{"use strict";Ew();({toString:T7}=Object.prototype),{getPrototypeOf:Pw}=Object,{iterator:Sh,toStringTag:GR}=Symbol,kh=(t=>e=>{let r=T7.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=t=>(t=t.toLowerCase(),e=>kh(e)===t),$h=t=>e=>typeof e===t,{isArray:Lc}=Array,Mc=$h("undefined");KR=Ri("ArrayBuffer");z7=$h("string"),wn=$h("function"),HR=$h("number"),vd=t=>t!==null&&typeof t=="object",j7=t=>t===!0||t===!1,wh=t=>{if(kh(t)!=="object")return!1;let e=Pw(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(GR in t)&&!(Sh in t)},N7=t=>{if(!vd(t)||gd(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},R7=Ri("Date"),C7=Ri("File"),A7=t=>!!(t&&typeof t.uri<"u"),U7=t=>t&&typeof t.getParts<"u",D7=Ri("Blob"),M7=Ri("FileList"),L7=t=>vd(t)&&wn(t.pipe);VR=Z7(),WR=typeof VR.FormData<"u"?VR.FormData:void 0,q7=t=>{let e;return t&&(WR&&t instanceof WR||wn(t.append)&&((e=kh(t))==="formdata"||e==="object"&&wn(t.toString)&&t.toString()==="[object FormData]"))},F7=Ri("URLSearchParams"),[V7,W7,B7,G7]=["ReadableStream","Request","Response","Headers"].map(Ri),K7=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YR=t=>!Mc(t)&&t!==hs;H7=(t,e,r,{allOwnKeys:n}={})=>(yd(e,(i,o)=>{r&&wn(i)?Object.defineProperty(t,o,{value:hd(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Q7=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Y7=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},J7=(t,e,r,n)=>{let i,o,a,s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!n||n(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=r!==!1&&Pw(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},X7=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},eY=t=>{if(!t)return null;if(Lc(t))return t;let e=t.length;if(!HR(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},tY=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Pw(Uint8Array)),rY=(t,e)=>{let n=(t&&t[Sh]).call(t),i;for(;(i=n.next())&&!i.done;){let o=i.value;e.call(t,o[0],o[1])}},nY=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},iY=Ri("HTMLFormElement"),oY=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),BR=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),aY=Ri("RegExp"),JR=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};yd(r,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(n[o]=a||i)}),Object.defineProperties(t,n)},sY=t=>{JR(t,(e,r)=>{if(wn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(wn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},cY=(t,e)=>{let r={},n=i=>{i.forEach(o=>{r[o]=!0})};return Lc(t)?n(t):n(String(t).split(e)),r},lY=()=>{},uY=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;pY=t=>{let e=new Array(10),r=(n,i)=>{if(vd(n)){if(e.indexOf(n)>=0)return;if(gd(n))return n;if(!("toJSON"in n)){e[i]=n;let o=Lc(n)?[]:{};return yd(n,(a,s)=>{let c=r(a,i+1);!Mc(c)&&(o[s]=c)}),e[i]=void 0,o}}return n};return r(t,0)},fY=Ri("AsyncFunction"),mY=t=>t&&(vd(t)||wn(t))&&wn(t.then)&&wn(t.catch),XR=((t,e)=>t?setImmediate:e?((r,n)=>(hs.addEventListener("message",({source:i,data:o})=>{i===hs&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),hs.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",wn(hs.postMessage)),hY=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||XR,gY=t=>t!=null&&wn(t[Sh]),j={isArray:Lc,isArrayBuffer:KR,isBuffer:gd,isFormData:q7,isArrayBufferView:O7,isString:z7,isNumber:HR,isBoolean:j7,isObject:vd,isPlainObject:wh,isEmptyObject:N7,isReadableStream:V7,isRequest:W7,isResponse:B7,isHeaders:G7,isUndefined:Mc,isDate:R7,isFile:C7,isReactNativeBlob:A7,isReactNative:U7,isBlob:D7,isRegExp:aY,isFunction:wn,isStream:L7,isURLSearchParams:F7,isTypedArray:tY,isFileList:M7,forEach:yd,merge:Iw,extend:H7,trim:K7,stripBOM:Q7,inherits:Y7,toFlatObject:J7,kindOf:kh,kindOfTest:Ri,endsWith:X7,toArray:eY,forEachEntry:rY,matchAll:nY,isHTMLForm:iY,hasOwnProperty:BR,hasOwnProp:BR,reduceDescriptors:JR,freezeMethods:sY,toObjectSet:cY,toCamelCase:oY,noop:lY,toFiniteNumber:uY,findKey:QR,global:hs,isContextDefined:YR,isSpecCompliantForm:dY,toJSONObject:pY,isAsyncFn:fY,isThenable:mY,setImmediate:XR,asap:hY,isIterable:gY}});var an,ae,Zn=P(()=>{"use strict";Bt();an=class t extends Error{static from(e,r,n,i,o,a){let s=new t(e.message,r||e.code,n,i,o);return s.cause=e,s.name=e.name,e.status!=null&&s.status==null&&(s.status=e.status),a&&Object.assign(s,a),s}constructor(e,r,n,i,o){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}};an.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";an.ERR_BAD_OPTION="ERR_BAD_OPTION";an.ECONNABORTED="ECONNABORTED";an.ETIMEDOUT="ETIMEDOUT";an.ERR_NETWORK="ERR_NETWORK";an.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";an.ERR_DEPRECATED="ERR_DEPRECATED";an.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";an.ERR_BAD_REQUEST="ERR_BAD_REQUEST";an.ERR_CANCELED="ERR_CANCELED";an.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";an.ERR_INVALID_URL="ERR_INVALID_URL";ae=an});var rC=z((e1e,tC)=>{var eC=Tt("stream").Stream,vY=Tt("util");tC.exports=Ci;function Ci(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}vY.inherits(Ci,eC);Ci.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(Ci.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Ci.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ci.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ci.prototype.pause=function(){this.source.pause()};Ci.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Ci.prototype.pipe=function(){var t=eC.prototype.pipe.apply(this,arguments);return this.resume(),t};Ci.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Ci.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var aC=z((t1e,oC)=>{var yY=Tt("util"),iC=Tt("stream").Stream,nC=rC();oC.exports=ar;function ar(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}yY.inherits(ar,iC);ar.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ar.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ar.prototype.append=function(t){var e=ar.isStreamLike(t);if(e){if(!(t instanceof nC)){var r=nC.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};ar.prototype.pipe=function(t,e){return iC.prototype.pipe.call(this,t,e),this.resume(),t};ar.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};ar.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=ar.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ar.prototype._pipeNext=function(t){this._currentStream=t;var e=ar.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};ar.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ar.prototype.write=function(t){this.emit("data",t)};ar.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ar.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};ar.prototype.end=function(){this._reset(),this.emit("end")};ar.prototype.destroy=function(){this._reset(),this.emit("close")};ar.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ar.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ar.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};ar.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var sC=z((r1e,_Y)=>{_Y.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var lC=z((n1e,cC)=>{cC.exports=sC()});var pC=z(Sn=>{"use strict";var Eh=lC(),bY=Tt("path").extname,uC=/^\s*([^;\s]*)(?:;|\s|$)/,xY=/^text\//i;Sn.charset=dC;Sn.charsets={lookup:dC};Sn.contentType=wY;Sn.extension=SY;Sn.extensions=Object.create(null);Sn.lookup=kY;Sn.types=Object.create(null);$Y(Sn.extensions,Sn.types);function dC(t){if(!t||typeof t!="string")return!1;var e=uC.exec(t),r=e&&Eh[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&xY.test(e[1])?"UTF-8":!1}function wY(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?Sn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=Sn.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function SY(t){if(!t||typeof t!="string")return!1;var e=uC.exec(t),r=e&&Sn.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function kY(t){if(!t||typeof t!="string")return!1;var e=bY("x."+t).toLowerCase().substr(1);return e&&Sn.types[e]||!1}function $Y(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(Eh).forEach(function(i){var o=Eh[i],a=o.extensions;if(!(!a||!a.length)){t[i]=a;for(var s=0;s<a.length;s++){var c=a[s];if(e[c]){var l=r.indexOf(Eh[e[c]].source),u=r.indexOf(o.source);if(e[c]!=="application/octet-stream"&&(l>u||l===u&&e[c].substr(0,12)==="application/"))continue}e[c]=i}}})}});var mC=z((o1e,fC)=>{fC.exports=EY;function EY(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var Tw=z((a1e,gC)=>{var hC=mC();gC.exports=IY;function IY(t){var e=!1;return hC(function(){e=!0}),function(n,i){e?t(n,i):hC(function(){t(n,i)})}}});var Ow=z((s1e,vC)=>{vC.exports=PY;function PY(t){Object.keys(t.jobs).forEach(TY.bind(t)),t.jobs={}}function TY(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var zw=z((c1e,_C)=>{var yC=Tw(),OY=Ow();_C.exports=zY;function zY(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=jY(e,i,t[i],function(o,a){i in r.jobs&&(delete r.jobs[i],o?OY(r):r.results[i]=a,n(o,r.results))})}function jY(t,e,r,n){var i;return t.length==2?i=t(r,yC(n)):i=t(r,e,yC(n)),i}});var jw=z((l1e,bC)=>{bC.exports=NY;function NY(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,o){return e(t[i],t[o])}),n}});var Nw=z((u1e,xC)=>{var RY=Ow(),CY=Tw();xC.exports=AY;function AY(t){Object.keys(this.jobs).length&&(this.index=this.size,RY(this),CY(t)(null,this.results))}});var SC=z((d1e,wC)=>{var UY=zw(),DY=jw(),MY=Nw();wC.exports=LY;function LY(t,e,r){for(var n=DY(t);n.index<(n.keyedList||t).length;)UY(t,e,n,function(i,o){if(i){r(i,o);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return MY.bind(n,r)}});var Rw=z((p1e,Ih)=>{var kC=zw(),ZY=jw(),qY=Nw();Ih.exports=FY;Ih.exports.ascending=$C;Ih.exports.descending=VY;function FY(t,e,r,n){var i=ZY(t,r);return kC(t,e,i,function o(a,s){if(a){n(a,s);return}if(i.index++,i.index<(i.keyedList||t).length){kC(t,e,i,o);return}n(null,i.results)}),qY.bind(i,n)}function $C(t,e){return t<e?-1:t>e?1:0}function VY(t,e){return-1*$C(t,e)}});var IC=z((f1e,EC)=>{var WY=Rw();EC.exports=BY;function BY(t,e,r){return WY(t,e,null,r)}});var TC=z((m1e,PC)=>{PC.exports={parallel:SC(),serial:IC(),serialOrdered:Rw()}});var Cw=z((h1e,OC)=>{"use strict";OC.exports=Object});var jC=z((g1e,zC)=>{"use strict";zC.exports=Error});var RC=z((v1e,NC)=>{"use strict";NC.exports=EvalError});var AC=z((y1e,CC)=>{"use strict";CC.exports=RangeError});var DC=z((_1e,UC)=>{"use strict";UC.exports=ReferenceError});var LC=z((b1e,MC)=>{"use strict";MC.exports=SyntaxError});var Ph=z((x1e,ZC)=>{"use strict";ZC.exports=TypeError});var FC=z((w1e,qC)=>{"use strict";qC.exports=URIError});var WC=z((S1e,VC)=>{"use strict";VC.exports=Math.abs});var GC=z((k1e,BC)=>{"use strict";BC.exports=Math.floor});var HC=z(($1e,KC)=>{"use strict";KC.exports=Math.max});var YC=z((E1e,QC)=>{"use strict";QC.exports=Math.min});var XC=z((I1e,JC)=>{"use strict";JC.exports=Math.pow});var tA=z((P1e,eA)=>{"use strict";eA.exports=Math.round});var nA=z((T1e,rA)=>{"use strict";rA.exports=Number.isNaN||function(e){return e!==e}});var oA=z((O1e,iA)=>{"use strict";var GY=nA();iA.exports=function(e){return GY(e)||e===0?e:e<0?-1:1}});var sA=z((z1e,aA)=>{"use strict";aA.exports=Object.getOwnPropertyDescriptor});var Aw=z((j1e,cA)=>{"use strict";var Th=sA();if(Th)try{Th([],"length")}catch{Th=null}cA.exports=Th});var uA=z((N1e,lA)=>{"use strict";var Oh=Object.defineProperty||!1;if(Oh)try{Oh({},"a",{value:1})}catch{Oh=!1}lA.exports=Oh});var Uw=z((R1e,dA)=>{"use strict";dA.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var mA=z((C1e,fA)=>{"use strict";var pA=typeof Symbol<"u"&&Symbol,KY=Uw();fA.exports=function(){return typeof pA!="function"||typeof Symbol!="function"||typeof pA("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:KY()}});var Dw=z((A1e,hA)=>{"use strict";hA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Mw=z((U1e,gA)=>{"use strict";var HY=Cw();gA.exports=HY.getPrototypeOf||null});var _A=z((D1e,yA)=>{"use strict";var QY="Function.prototype.bind called on incompatible ",YY=Object.prototype.toString,JY=Math.max,XY="[object Function]",vA=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},eJ=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},tJ=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};yA.exports=function(e){var r=this;if(typeof r!="function"||YY.apply(r)!==XY)throw new TypeError(QY+r);for(var n=eJ(arguments,1),i,o=function(){if(this instanceof i){var u=r.apply(this,vA(n,arguments));return Object(u)===u?u:this}return r.apply(e,vA(n,arguments))},a=JY(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(i=Function("binder","return function ("+tJ(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var _d=z((M1e,bA)=>{"use strict";var rJ=_A();bA.exports=Function.prototype.bind||rJ});var zh=z((L1e,xA)=>{"use strict";xA.exports=Function.prototype.call});var Lw=z((Z1e,wA)=>{"use strict";wA.exports=Function.prototype.apply});var kA=z((q1e,SA)=>{"use strict";SA.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var EA=z((F1e,$A)=>{"use strict";var nJ=_d(),iJ=Lw(),oJ=zh(),aJ=kA();$A.exports=aJ||nJ.call(oJ,iJ)});var PA=z((V1e,IA)=>{"use strict";var sJ=_d(),cJ=Ph(),lJ=zh(),uJ=EA();IA.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new cJ("a function is required");return uJ(sJ,lJ,e)}});var RA=z((W1e,NA)=>{"use strict";var dJ=PA(),TA=Aw(),zA;try{zA=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Zw=!!zA&&TA&&TA(Object.prototype,"__proto__"),jA=Object,OA=jA.getPrototypeOf;NA.exports=Zw&&typeof Zw.get=="function"?dJ([Zw.get]):typeof OA=="function"?function(e){return OA(e==null?e:jA(e))}:!1});var MA=z((B1e,DA)=>{"use strict";var CA=Dw(),AA=Mw(),UA=RA();DA.exports=CA?function(e){return CA(e)}:AA?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return AA(e)}:UA?function(e){return UA(e)}:null});var jh=z((G1e,LA)=>{"use strict";var pJ=Function.prototype.call,fJ=Object.prototype.hasOwnProperty,mJ=_d();LA.exports=mJ.call(pJ,fJ)});var GA=z((K1e,BA)=>{"use strict";var dt,hJ=Cw(),gJ=jC(),vJ=RC(),yJ=AC(),_J=DC(),Vc=LC(),Fc=Ph(),bJ=FC(),xJ=WC(),wJ=GC(),SJ=HC(),kJ=YC(),$J=XC(),EJ=tA(),IJ=oA(),VA=Function,qw=function(t){try{return VA('"use strict"; return ('+t+").constructor;")()}catch{}},bd=Aw(),PJ=uA(),Fw=function(){throw new Fc},TJ=bd?(function(){try{return arguments.callee,Fw}catch{try{return bd(arguments,"callee").get}catch{return Fw}}})():Fw,Zc=mA()(),Er=MA(),OJ=Mw(),zJ=Dw(),WA=Lw(),xd=zh(),qc={},jJ=typeof Uint8Array>"u"||!Er?dt:Er(Uint8Array),gs={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?dt:ArrayBuffer,"%ArrayIteratorPrototype%":Zc&&Er?Er([][Symbol.iterator]()):dt,"%AsyncFromSyncIteratorPrototype%":dt,"%AsyncFunction%":qc,"%AsyncGenerator%":qc,"%AsyncGeneratorFunction%":qc,"%AsyncIteratorPrototype%":qc,"%Atomics%":typeof Atomics>"u"?dt:Atomics,"%BigInt%":typeof BigInt>"u"?dt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":gJ,"%eval%":eval,"%EvalError%":vJ,"%Float16Array%":typeof Float16Array>"u"?dt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?dt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?dt:FinalizationRegistry,"%Function%":VA,"%GeneratorFunction%":qc,"%Int8Array%":typeof Int8Array>"u"?dt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?dt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Zc&&Er?Er(Er([][Symbol.iterator]())):dt,"%JSON%":typeof JSON=="object"?JSON:dt,"%Map%":typeof Map>"u"?dt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Zc||!Er?dt:Er(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hJ,"%Object.getOwnPropertyDescriptor%":bd,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?dt:Promise,"%Proxy%":typeof Proxy>"u"?dt:Proxy,"%RangeError%":yJ,"%ReferenceError%":_J,"%Reflect%":typeof Reflect>"u"?dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?dt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Zc||!Er?dt:Er(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Zc&&Er?Er(""[Symbol.iterator]()):dt,"%Symbol%":Zc?Symbol:dt,"%SyntaxError%":Vc,"%ThrowTypeError%":TJ,"%TypedArray%":jJ,"%TypeError%":Fc,"%Uint8Array%":typeof Uint8Array>"u"?dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?dt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?dt:Uint32Array,"%URIError%":bJ,"%WeakMap%":typeof WeakMap>"u"?dt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?dt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?dt:WeakSet,"%Function.prototype.call%":xd,"%Function.prototype.apply%":WA,"%Object.defineProperty%":PJ,"%Object.getPrototypeOf%":OJ,"%Math.abs%":xJ,"%Math.floor%":wJ,"%Math.max%":SJ,"%Math.min%":kJ,"%Math.pow%":$J,"%Math.round%":EJ,"%Math.sign%":IJ,"%Reflect.getPrototypeOf%":zJ};if(Er)try{null.error}catch(t){ZA=Er(Er(t)),gs["%Error.prototype%"]=ZA}var ZA,NJ=function t(e){var r;if(e==="%AsyncFunction%")r=qw("async function () {}");else if(e==="%GeneratorFunction%")r=qw("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=qw("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Er&&(r=Er(i.prototype))}return gs[e]=r,r},qA={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},wd=_d(),Nh=jh(),RJ=wd.call(xd,Array.prototype.concat),CJ=wd.call(WA,Array.prototype.splice),FA=wd.call(xd,String.prototype.replace),Rh=wd.call(xd,String.prototype.slice),AJ=wd.call(xd,RegExp.prototype.exec),UJ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DJ=/\\(\\)?/g,MJ=function(e){var r=Rh(e,0,1),n=Rh(e,-1);if(r==="%"&&n!=="%")throw new Vc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Vc("invalid intrinsic syntax, expected opening `%`");var i=[];return FA(e,UJ,function(o,a,s,c){i[i.length]=s?FA(c,DJ,"$1"):a||o}),i},LJ=function(e,r){var n=e,i;if(Nh(qA,n)&&(i=qA[n],n="%"+i[0]+"%"),Nh(gs,n)){var o=gs[n];if(o===qc&&(o=NJ(n)),typeof o>"u"&&!r)throw new Fc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Vc("intrinsic "+e+" does not exist!")};BA.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Fc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Fc('"allowMissing" argument must be a boolean');if(AJ(/^%?[^%]*%?$/,e)===null)throw new Vc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=MJ(e),i=n.length>0?n[0]:"",o=LJ("%"+i+"%",r),a=o.name,s=o.value,c=!1,l=o.alias;l&&(i=l[0],CJ(n,RJ([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var f=n[u],p=Rh(f,0,1),m=Rh(f,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new Vc("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),i+="."+f,a="%"+i+"%",Nh(gs,a))s=gs[a];else if(s!=null){if(!(f in s)){if(!r)throw new Fc("base intrinsic for "+e+" exists, but the property is not available.");return}if(bd&&u+1>=n.length){var v=bd(s,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[f]}else d=Nh(s,f),s=s[f];d&&!c&&(gs[a]=s)}}return s}});var HA=z((H1e,KA)=>{"use strict";var ZJ=Uw();KA.exports=function(){return ZJ()&&!!Symbol.toStringTag}});var JA=z((Q1e,YA)=>{"use strict";var qJ=GA(),QA=qJ("%Object.defineProperty%",!0),FJ=HA()(),VJ=jh(),WJ=Ph(),Ch=FJ?Symbol.toStringTag:null;YA.exports=function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new WJ("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ch&&(n||!VJ(e,Ch))&&(QA?QA(e,Ch,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[Ch]=r)}});var eU=z((Y1e,XA)=>{"use strict";XA.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var rU=z((J1e,tU)=>{"use strict";var Gw=aC(),BJ=Tt("util"),Vw=Tt("path"),GJ=Tt("http"),KJ=Tt("https"),HJ=Tt("url").parse,QJ=Tt("fs"),YJ=Tt("stream").Stream,JJ=Tt("crypto"),Ww=pC(),XJ=TC(),eX=JA(),la=jh(),Bw=eU();function yt(t){if(!(this instanceof yt))return new yt(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Gw.call(this),t=t||{};for(var e in t)this[e]=t[e]}BJ.inherits(yt,Gw);yt.LINE_BREAK=`\r
44
+ `;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Gw.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),o=this._multiPartFooter();n(i),n(e),n(o),this._trackLength(i,e,r)};yt.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+yt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&la(e,"httpVersion"))&&!(e instanceof YJ))&&(r.knownLength||this._valuesToMeasure.push(e))};yt.prototype._lengthRetriever=function(t,e){la(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):QJ.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):la(t,"httpVersion")?e(null,Number(t.headers["content-length"])):la(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};yt.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),o="",a={"Content-Disposition":["form-data",'name="'+t+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Bw(a,r.header);var s;for(var c in a)if(la(a,c)){if(s=a[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(o+=c+": "+s.join("; ")+yt.LINE_BREAK)}return"--"+this.getBoundary()+yt.LINE_BREAK+o+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Vw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Vw.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&la(t,"httpVersion")&&(r=Vw.basename(t.client._httpMessage.path||"")),r)return'filename="'+r+'"'};yt.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=Ww.lookup(t.name)),!r&&t&&t.path&&(r=Ww.lookup(t.path)),!r&&t&&t.readable&&la(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Ww.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=yt.DEFAULT_CONTENT_TYPE),r};yt.prototype._multiPartFooter=function(){return function(t){var e=yt.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};yt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+yt.LINE_BREAK};yt.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)la(t,e)&&(r[e.toLowerCase()]=t[e]);return r};yt.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};yt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};yt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(yt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};yt.prototype._generateBoundary=function(){this._boundary="--------------------------"+JJ.randomBytes(12).toString("hex")};yt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};yt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};yt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}XJ.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};yt.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=HJ(t),n=Bw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=Bw(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=KJ.request(n):r=GJ.request(n),this.getLength(function(o,a){if(o&&o!=="Unknown stream"){this._error(o);return}if(a&&r.setHeader("Content-Length",a),this.pipe(r),e){var s,c=function(l,u){return r.removeListener("error",c),r.removeListener("response",s),e.call(this,l,u)};s=c.bind(this,null),r.on("error",c),r.on("response",s)}}.bind(this)),r};yt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};yt.prototype.toString=function(){return"[object FormData]"};eX(yt.prototype,"FormData");tU.exports=yt});var nU,Ah,Kw=P(()=>{nU=Xu(rU(),1),Ah=nU.default});function Qw(t){return j.isPlainObject(t)||j.isArray(t)}function iU(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function Hw(t,e,r){return t?t.concat(e).map(function(i,o){return i=iU(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function tX(t){return j.isArray(t)&&!t.some(Qw)}function nX(t,e,r){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new(Ah||FormData),r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!j.isUndefined(g[v])});let n=r.metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(e);if(!j.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(j.isDate(m))return m.toISOString();if(j.isBoolean(m))return m.toString();if(!c&&j.isBlob(m))throw new ae("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(m)||j.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,v,g){let h=m;if(j.isReactNative(e)&&j.isReactNativeBlob(m))return e.append(Hw(g,v,o),l(m)),!1;if(m&&!g&&typeof m=="object"){if(j.endsWith(v,"{}"))v=n?v:v.slice(0,-2),m=JSON.stringify(m);else if(j.isArray(m)&&tX(m)||(j.isFileList(m)||j.endsWith(v,"[]"))&&(h=j.toArray(m)))return v=iU(v),h.forEach(function(_,b){!(j.isUndefined(_)||_===null)&&e.append(a===!0?Hw([v],b,o):a===null?v:v+"[]",l(_))}),!1}return Qw(m)?!0:(e.append(Hw(g,v,o),l(m)),!1)}let d=[],f=Object.assign(rX,{defaultVisitor:u,convertValue:l,isVisitable:Qw});function p(m,v){if(!j.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),j.forEach(m,function(h,y){(!(j.isUndefined(h)||h===null)&&i.call(e,h,j.isString(y)?y.trim():y,v,f))===!0&&p(h,v?v.concat(y):[y])}),d.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return p(t),e}var rX,ua,Sd=P(()=>{"use strict";Bt();Zn();Kw();rX=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});ua=nX});function oU(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function aU(t,e){this._pairs=[],t&&ua(t,this,e)}var sU,cU,lU=P(()=>{"use strict";Sd();sU=aU.prototype;sU.append=function(e,r){this._pairs.push([e,r])};sU.toString=function(e){let r=e?function(n){return e.call(this,n,oU)}:oU;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};cU=aU});function iX(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vs(t,e,r){if(!e)return t;let n=r&&r.encode||iX,i=j.isFunction(r)?{serialize:r}:r,o=i&&i.serialize,a;if(o?a=o(e,i):a=j.isURLSearchParams(e)?e.toString():new cU(e,i).toString(n),a){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}var Uh=P(()=>{"use strict";Bt();lU()});var Yw,Jw,uU=P(()=>{"use strict";Bt();Yw=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){j.forEach(this.handlers,function(n){n!==null&&e(n)})}},Jw=Yw});var da,kd=P(()=>{"use strict";da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import oX from"url";var dU,pU=P(()=>{"use strict";dU=oX.URLSearchParams});import aX from"crypto";var Xw,fU,mU,sX,hU,gU=P(()=>{pU();Kw();Xw="abcdefghijklmnopqrstuvwxyz",fU="0123456789",mU={DIGIT:fU,ALPHA:Xw,ALPHA_DIGIT:Xw+Xw.toUpperCase()+fU},sX=(t=16,e=mU.ALPHA_DIGIT)=>{let r="",{length:n}=e,i=new Uint32Array(t);aX.randomFillSync(i);for(let o=0;o<t;o++)r+=e[i[o]%n];return r},hU={isNode:!0,classes:{URLSearchParams:dU,FormData:Ah,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:mU,generateString:sX,protocols:["http","https","file","data"]}});var r0={};Ln(r0,{hasBrowserEnv:()=>t0,hasStandardBrowserEnv:()=>cX,hasStandardBrowserWebWorkerEnv:()=>lX,navigator:()=>e0,origin:()=>uX});var t0,e0,cX,lX,uX,vU=P(()=>{t0=typeof window<"u"&&typeof document<"u",e0=typeof navigator=="object"&&navigator||void 0,cX=t0&&(!e0||["ReactNative","NativeScript","NS"].indexOf(e0.product)<0),lX=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uX=t0&&window.location.href||"http://localhost"});var It,Ai=P(()=>{gU();vU();It={...r0,...hU}});function n0(t,e){return ua(t,new It.classes.URLSearchParams,{visitor:function(r,n,i,o){return It.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}var yU=P(()=>{"use strict";Bt();Sd();Ai()});function dX(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function pX(t){let e={},r=Object.keys(t),n,i=r.length,o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function fX(t){function e(r,n,i,o){let a=r[o++];if(a==="__proto__")return!0;let s=Number.isFinite(+a),c=o>=r.length;return a=!a&&j.isArray(i)?i.length:a,c?(j.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!s):((!i[a]||!j.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],o)&&j.isArray(i[a])&&(i[a]=pX(i[a])),!s)}if(j.isFormData(t)&&j.isFunction(t.entries)){let r={};return j.forEachEntry(t,(n,i)=>{e(dX(n),i,r,0)}),r}return null}var Dh,i0=P(()=>{"use strict";Bt();Dh=fX});function mX(t,e,r){if(j.isString(t))try{return(e||JSON.parse)(t),j.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var o0,Wc,Mh=P(()=>{"use strict";Bt();Zn();kd();Sd();yU();Ai();i0();o0={transitional:da,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i?JSON.stringify(Dh(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e)||j.isReadableStream(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return n0(e,this.formSerializer).toString();if((s=j.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return ua(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),mX(e)):e}],transformResponse:[function(e){let r=this.transitional||o0.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(j.isResponse(e)||j.isReadableStream(e))return e;if(e&&j.isString(e)&&(n&&!this.responseType||i)){let a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?ae.from(s,ae.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],t=>{o0.headers[t]={}});Wc=o0});var hX,_U,bU=P(()=>{"use strict";Bt();hX=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_U=t=>{let e={},r,n,i;return t&&t.split(`
45
+ `).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&hX[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e}});function wU(t,e){if(!(t===!1||t==null)){if(j.isArray(t)){t.forEach(r=>wU(r,e));return}if(!gX(String(t)))throw new Error(`Invalid character in header content ["${e}"]`)}}function $d(t){return t&&String(t).trim().toLowerCase()}function vX(t){let e=t.length;for(;e>0;){let r=t.charCodeAt(e-1);if(r!==10&&r!==13)break;e-=1}return e===t.length?t:t.slice(0,e)}function Lh(t){return t===!1||t==null?t:j.isArray(t)?t.map(Lh):vX(String(t))}function yX(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}function a0(t,e,r,n,i){if(j.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!j.isString(e)){if(j.isString(n))return e.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(e)}}function bX(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function xX(t,e){let r=j.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,a){return this[n].call(this,e,i,o,a)},configurable:!0})})}var xU,gX,_X,Bc,or,co=P(()=>{"use strict";Bt();bU();xU=Symbol("internals"),gX=t=>!/[\r\n]/.test(t);_X=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());Bc=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function o(s,c,l){let u=$d(c);if(!u)throw new Error("header name must be a non-empty string");let d=j.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(wU(s,c),i[d||c]=Lh(s))}let a=(s,c)=>j.forEach(s,(l,u)=>o(l,u,c));if(j.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(j.isString(e)&&(e=e.trim())&&!_X(e))a(_U(e),r);else if(j.isObject(e)&&j.isIterable(e)){let s={},c,l;for(let u of e){if(!j.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[l=u[0]]=(c=s[l])?j.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}a(s,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=$d(e),e){let n=j.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return yX(i);if(j.isFunction(r))return r.call(this,i,n);if(j.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=$d(e),e){let n=j.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||a0(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function o(a){if(a=$d(a),a){let s=j.findKey(n,a);s&&(!r||a0(n,n[s],s,r))&&(delete n[s],i=!0)}}return j.isArray(e)?e.forEach(o):o(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let o=r[n];(!e||a0(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){let r=this,n={};return j.forEach(this,(i,o)=>{let a=j.findKey(n,o);if(a){r[a]=Lh(i),delete r[o];return}let s=e?bX(o):String(o).trim();s!==o&&delete r[o],r[s]=Lh(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return j.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
46
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[xU]=this[xU]={accessors:{}}).accessors,i=this.prototype;function o(a){let s=$d(a);n[s]||(xX(i,a),n[s]=!0)}return j.isArray(e)?e.forEach(o):o(e),this}};Bc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(Bc.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});j.freezeMethods(Bc);or=Bc});function Ed(t,e){let r=this||Wc,n=e||r,i=or.from(n.headers),o=n.data;return j.forEach(t,function(s){o=s.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}var SU=P(()=>{"use strict";Bt();Mh();co()});function Id(t){return!!(t&&t.__CANCEL__)}var s0=P(()=>{"use strict"});var c0,qn,ys=P(()=>{"use strict";Zn();c0=class extends ae{constructor(e,r,n){super(e??"canceled",ae.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},qn=c0});function lo(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new ae("Request failed with status code "+r.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}var Zh=P(()=>{"use strict";Zn()});function l0(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}var kU=P(()=>{"use strict"});function u0(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var $U=P(()=>{"use strict"});function _s(t,e,r){let n=!l0(e);return t&&(n||r==!1)?u0(t,e):e}var qh=P(()=>{"use strict";kU();$U()});function SX(t){try{return new URL(t)}catch{return null}}function EU(t){var e=(typeof t=="string"?SX(t):t)||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||wX[r]||0,!kX(n,i)))return"";var o=d0(r+"_proxy")||d0("all_proxy");return o&&o.indexOf("://")===-1&&(o=r+"://"+o),o}function kX(t,e){var r=d0("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),o=i?i[1]:n,a=i?parseInt(i[2]):0;return a&&a!==e?!0:/^[.*]/.test(o)?(o.charAt(0)==="*"&&(o=o.slice(1)),!t.endsWith(o)):t!==o}):!0}function d0(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var wX,IU=P(()=>{"use strict";wX={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var TU=z((eRe,PU)=>{var Gc=1e3,Kc=Gc*60,Hc=Kc*60,bs=Hc*24,$X=bs*7,EX=bs*365.25;PU.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return IX(t);if(r==="number"&&isFinite(t))return e.long?TX(t):PX(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function IX(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*EX;case"weeks":case"week":case"w":return r*$X;case"days":case"day":case"d":return r*bs;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Hc;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kc;case"seconds":case"second":case"secs":case"sec":case"s":return r*Gc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function PX(t){var e=Math.abs(t);return e>=bs?Math.round(t/bs)+"d":e>=Hc?Math.round(t/Hc)+"h":e>=Kc?Math.round(t/Kc)+"m":e>=Gc?Math.round(t/Gc)+"s":t+"ms"}function TX(t){var e=Math.abs(t);return e>=bs?Fh(t,e,bs,"day"):e>=Hc?Fh(t,e,Hc,"hour"):e>=Kc?Fh(t,e,Kc,"minute"):e>=Gc?Fh(t,e,Gc,"second"):t+" ms"}function Fh(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var p0=z((tRe,OU)=>{function OX(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=s,r.humanize=TU(),r.destroy=l,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let d=0;for(let f=0;f<u.length;f++)d=(d<<5)-d+u.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(u){let d,f=null,p,m;function v(...g){if(!v.enabled)return;let h=v,y=Number(new Date),_=y-(d||y);h.diff=_,h.prev=d,h.curr=y,d=y,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let b=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(w,S)=>{if(w==="%%")return"%";b++;let $=r.formatters[S];if(typeof $=="function"){let T=g[b];w=$.call(h,T),g.splice(b,1),b--}return w}),r.formatArgs.call(h,g),(h.log||r.log).apply(h,g)}return v.namespace=u,v.useColors=r.useColors(),v.color=r.selectColor(u),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(u)),m),set:g=>{f=g}}),typeof r.init=="function"&&r.init(v),v}function n(u,d){let f=r(this.namespace+(typeof d>"u"?":":d)+u);return f.log=this.log,f}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function o(u,d){let f=0,p=0,m=-1,v=0;for(;f<u.length;)if(p<d.length&&(d[p]===u[f]||d[p]==="*"))d[p]==="*"?(m=p,v=f,p++):(f++,p++);else if(m!==-1)p=m+1,v++,f=v;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function a(){let u=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),u}function s(u){for(let d of r.skips)if(o(u,d))return!1;for(let d of r.names)if(o(u,d))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}OU.exports=OX});var zU=z((kn,Vh)=>{kn.formatArgs=jX;kn.save=NX;kn.load=RX;kn.useColors=zX;kn.storage=CX();kn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();kn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zX(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function jX(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Vh.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}kn.log=console.debug||console.log||(()=>{});function NX(t){try{t?kn.storage.setItem("debug",t):kn.storage.removeItem("debug")}catch{}}function RX(){let t;try{t=kn.storage.getItem("debug")||kn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function CX(){try{return localStorage}catch{}}Vh.exports=p0()(kn);var{formatters:AX}=Vh.exports;AX.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var NU=z((rRe,jU)=>{"use strict";jU.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var AU=z((nRe,CU)=>{"use strict";var UX=Tt("os"),RU=Tt("tty"),li=NU(),{env:Ir}=process,pa;li("no-color")||li("no-colors")||li("color=false")||li("color=never")?pa=0:(li("color")||li("colors")||li("color=true")||li("color=always"))&&(pa=1);"FORCE_COLOR"in Ir&&(Ir.FORCE_COLOR==="true"?pa=1:Ir.FORCE_COLOR==="false"?pa=0:pa=Ir.FORCE_COLOR.length===0?1:Math.min(parseInt(Ir.FORCE_COLOR,10),3));function f0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function m0(t,e){if(pa===0)return 0;if(li("color=16m")||li("color=full")||li("color=truecolor"))return 3;if(li("color=256"))return 2;if(t&&!e&&pa===void 0)return 0;let r=pa||0;if(Ir.TERM==="dumb")return r;if(process.platform==="win32"){let n=UX.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ir)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ir)||Ir.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ir)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ir.TEAMCITY_VERSION)?1:0;if(Ir.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ir){let n=parseInt((Ir.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ir.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ir.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ir.TERM)||"COLORTERM"in Ir?1:r}function DX(t){let e=m0(t,t&&t.isTTY);return f0(e)}CU.exports={supportsColor:DX,stdout:f0(m0(!0,RU.isatty(1))),stderr:f0(m0(!0,RU.isatty(2)))}});var DU=z((Pr,Bh)=>{var MX=Tt("tty"),Wh=Tt("util");Pr.init=BX;Pr.log=FX;Pr.formatArgs=ZX;Pr.save=VX;Pr.load=WX;Pr.useColors=LX;Pr.destroy=Wh.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Pr.colors=[6,2,3,4,5,1];try{let t=AU();t&&(t.stderr||t).level>=2&&(Pr.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Pr.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function LX(){return"colors"in Pr.inspectOpts?!!Pr.inspectOpts.colors:MX.isatty(process.stderr.fd)}function ZX(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
47
+ `).join(`
48
+ `+o),t.push(i+"m+"+Bh.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=qX()+e+" "+t[0]}function qX(){return Pr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function FX(...t){return process.stderr.write(Wh.formatWithOptions(Pr.inspectOpts,...t)+`
49
+ `)}function VX(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function WX(){return process.env.DEBUG}function BX(t){t.inspectOpts={};let e=Object.keys(Pr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Pr.inspectOpts[e[r]]}Bh.exports=p0()(Pr);var{formatters:UU}=Bh.exports;UU.o=function(t){return this.inspectOpts.colors=this.useColors,Wh.inspect(t,this.inspectOpts).split(`
50
+ `).map(e=>e.trim()).join(" ")};UU.O=function(t){return this.inspectOpts.colors=this.useColors,Wh.inspect(t,this.inspectOpts)}});var MU=z((iRe,h0)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?h0.exports=zU():h0.exports=DU()});var ZU=z((oRe,LU)=>{var Pd;LU.exports=function(){if(!Pd){try{Pd=MU()("follow-redirects")}catch{}typeof Pd!="function"&&(Pd=function(){})}Pd.apply(null,arguments)}});var BU=z((aRe,I0)=>{var Od=Tt("url"),Td=Od.URL,GX=Tt("http"),KX=Tt("https"),b0=Tt("stream").Writable,x0=Tt("assert"),qU=ZU();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=ws(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var w0=!1;try{x0(new Td(""))}catch(t){w0=t.code==="ERR_INVALID_URL"}var HX=["Authorization","Proxy-Authorization","Cookie"],QX=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],S0=["abort","aborted","connect","error","socket","timeout"],k0=Object.create(null);S0.forEach(function(t){k0[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var v0=zd("ERR_INVALID_URL","Invalid URL",TypeError),y0=zd("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),YX=zd("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",y0),JX=zd("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),XX=zd("ERR_STREAM_WRITE_AFTER_END","write after end"),eee=b0.prototype.destroy||VU;function $n(t,e){b0.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof y0?i:new y0({cause:i}))}},this._headerFilter=new RegExp("^(?:"+HX.concat(t.sensitiveHeaders).map(aee).join("|")+")$","i"),this._performRequest()}$n.prototype=Object.create(b0.prototype);$n.prototype.abort=function(){E0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};$n.prototype.destroy=function(t){return E0(this._currentRequest,t),eee.call(this,t),this};$n.prototype.write=function(t,e,r){if(this._ending)throw new XX;if(!xs(t)&&!iee(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(ws(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new JX),this.abort())};$n.prototype.end=function(t,e,r){if(ws(t)?(r=t,t=e=null):ws(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};$n.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};$n.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};$n.prototype.setTimeout=function(t,e){var r=this;function n(a){a.setTimeout(t),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function i(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(a)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),r.removeListener("close",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){$n.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty($n.prototype,t,{get:function(){return this._currentRequest[t]}})});$n.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),nee(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};$n.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of S0)n.on(i,k0[i]);if(this._currentUrl=/^\//.test(this._options.path)?Od.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;(function c(l){if(n===a._currentRequest)if(l)a.emit("error",l);else if(o<s.length){var u=s[o++];n.finished||n.write(u.data,u.encoding,c)}else a._ended&&n.end()})()}};$n.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(E0(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new YX;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],g0(/^content-/i,this._options.headers));var a=g0(/^host$/i,this._options.headers),s=$0(this._currentUrl),c=a||s.host,l=/^\w+:/.test(r)?this._currentUrl:Od.format(Object.assign(s,{host:c})),u=tee(r,l);if(qU("redirecting to",u.href),this._isRedirect=!0,_0(u,this._options),(u.protocol!==s.protocol&&u.protocol!=="https:"||u.host!==c&&!ree(u.host,c))&&g0(this._headerFilter,this._options.headers),ws(i)){var d={headers:t.headers,statusCode:e},f={url:l,method:o,headers:n};i(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function FU(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],a=e[n]=Object.create(o);function s(l,u,d){return oee(l)?l=_0(l):xs(l)?l=_0($0(l)):(d=u,u=WU(l),l={protocol:i}),ws(u)&&(d=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,u),u.nativeProtocols=r,!xs(u.host)&&!xs(u.hostname)&&(u.hostname="::1"),x0.equal(u.protocol,i,"protocol mismatch"),qU("options",u),new $n(u,d)}function c(l,u,d){var f=a.request(l,u,d);return f.end(),f}Object.defineProperties(a,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function VU(){}function $0(t){var e;if(w0)e=new Td(t);else if(e=WU(Od.parse(t)),!xs(e.protocol))throw new v0({input:t});return e}function tee(t,e){return w0?new Td(t,e):$0(Od.resolve(e,t))}function WU(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new v0({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new v0({input:t.href||t});return t}function _0(t,e){var r=e||{};for(var n of QX)r[n]=t[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function g0(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function zd(t,e,r){function n(i){ws(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function E0(t,e){for(var r of S0)t.removeListener(r,k0[r]);t.on("error",VU),t.destroy(e)}function ree(t,e){x0(xs(t)&&xs(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function nee(t){return t instanceof Array}function xs(t){return typeof t=="string"||t instanceof String}function ws(t){return typeof t=="function"}function iee(t){return typeof t=="object"&&"length"in t}function oee(t){return Td&&t instanceof Td}function aee(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}I0.exports=FU({http:GX,https:KX});I0.exports.wrap=FU});var Ss,Gh=P(()=>{Ss="1.15.0"});function jd(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var P0=P(()=>{"use strict"});function T0(t,e,r){let n=r&&r.Blob||It.classes.Blob,i=jd(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let o=see.exec(t);if(!o)throw new ae("Invalid URL",ae.ERR_INVALID_URL);let a=o[1],s=o[2],c=o[3],l=Buffer.from(decodeURIComponent(c),s?"base64":"utf8");if(e){if(!n)throw new ae("Blob is not supported",ae.ERR_NOT_SUPPORT);return new n([l],{type:a})}return l}throw new ae("Unsupported protocol "+i,ae.ERR_NOT_SUPPORT)}var see,GU=P(()=>{"use strict";Zn();P0();Ai();see=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import cee from"stream";var O0,z0,j0,KU=P(()=>{"use strict";Bt();O0=Symbol("internals"),z0=class extends cee.Transform{constructor(e){e=j.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!j.isUndefined(i[n])),super({readableHighWaterMark:e.chunkSize});let r=this[O0]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[O0];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let i=this[O0],o=i.maxRate,a=this.readableHighWaterMark,s=i.timeWindow,c=1e3/s,l=o/c,u=i.minChunkSize!==!1?Math.max(i.minChunkSize,l*.01):0,d=(p,m)=>{let v=Buffer.byteLength(p);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(p)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},f=(p,m)=>{let v=Buffer.byteLength(p),g=null,h=a,y,_=0;if(o){let b=Date.now();(!i.ts||(_=b-i.ts)>=s)&&(i.ts=b,y=l-i.bytes,i.bytes=y<0?-y:0,_=0),y=l-i.bytes}if(o){if(y<=0)return setTimeout(()=>{m(null,p)},s-_);y<h&&(h=y)}h&&v>h&&v-h>u&&(g=p.subarray(h),p=p.subarray(0,h)),d(p,g?()=>{process.nextTick(m,null,g)}:m)};f(e,function p(m,v){if(m)return n(m);v?f(v,p):n(null)})}},j0=z0});var HU,lee,Kh,N0=P(()=>{({asyncIterator:HU}=Symbol),lee=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[HU]?yield*t[HU]():yield t},Kh=lee});import uee from"util";import{Readable as dee}from"stream";var pee,Nd,ks,fee,mee,R0,hee,QU,YU=P(()=>{Bt();N0();Ai();pee=It.ALPHABET.ALPHA_DIGIT+"-_",Nd=typeof TextEncoder=="function"?new TextEncoder:new uee.TextEncoder,ks=`\r
51
+ `,fee=Nd.encode(ks),mee=2,R0=class{constructor(e,r){let{escapeName:n}=this.constructor,i=j.isString(r),o=`Content-Disposition: form-data; name="${n(e)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${ks}`;i?r=Nd.encode(String(r).replace(/\r?\n|\r\n?/g,ks)):o+=`Content-Type: ${r.type||"application/octet-stream"}${ks}`,this.headers=Nd.encode(o+ks),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+mee,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;j.isTypedArray(e)?yield e:yield*Kh(e),yield fee}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},hee=(t,e,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:o=n+"-"+It.generateString(i,pee)}=r||{};if(!j.isFormData(t))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let a=Nd.encode("--"+o+ks),s=Nd.encode("--"+o+"--"+ks),c=s.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let p=new R0(d,f);return c+=p.size,p});c+=a.byteLength*l.length,c=j.toFiniteNumber(c);let u={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(u["Content-Length"]=c),e&&e(u),dee.from((async function*(){for(let d of l)yield a,yield*d.encode();yield s})())},QU=hee});import gee from"stream";var C0,JU,XU=P(()=>{"use strict";C0=class extends gee.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(e,r,n)}},JU=C0});var vee,eD,tD=P(()=>{Bt();vee=(t,e)=>j.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(i=>{try{e?n(null,...e(i)):n(null,i)}catch(o){n(o)}},n)}:t,eD=vee});function A0(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||yee[e.protocol.split(":",1)[0]]||0,i=rD(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(o=>{if(!o)return!1;let[a,s]=_ee(o);return a=rD(a),!a||s&&s!==n?!1:(a.charAt(0)==="*"&&(a=a.slice(1)),a.charAt(0)==="."?i.endsWith(a):i===a)})}var yee,_ee,rD,nD=P(()=>{yee={http:80,https:443,ws:80,wss:443,ftp:21},_ee=t=>{let e=t,r=0;if(e.charAt(0)==="["){let o=e.indexOf("]");if(o!==-1){let a=e.slice(1,o),s=e.slice(o+1);return s.charAt(0)===":"&&/^\d+$/.test(s.slice(1))&&(r=Number.parseInt(s.slice(1),10)),[a,r]}}let n=e.indexOf(":"),i=e.lastIndexOf(":");return n!==-1&&n===i&&/^\d+$/.test(e.slice(i+1))&&(r=Number.parseInt(e.slice(i+1),10),e=e.slice(0,i)),[e,r]},rD=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t.replace(/\.+$/,""))});function bee(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,o=0,a;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),u=n[o];a||(a=l),r[i]=c,n[i]=l;let d=o,f=0;for(;d!==i;)f+=r[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),l-a<e)return;let p=u&&l-u;return p?Math.round(f*1e3/p):void 0}}var iD,oD=P(()=>{"use strict";iD=bee});function xee(t,e){let r=0,n=1e3/e,i,o,a=(l,u=Date.now())=>{r=u,i=null,o&&(clearTimeout(o),o=null),t(...l)};return[(...l)=>{let u=Date.now(),d=u-r;d>=n?a(l,u):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},n-d)))},()=>i&&a(i)]}var aD,sD=P(()=>{aD=xee});var Oo,Qc,Yc,Hh=P(()=>{oD();sD();Bt();Oo=(t,e,r=3)=>{let n=0,i=iD(50,250);return aD(o=>{let a=o.loaded,s=o.lengthComputable?o.total:void 0,c=a-n,l=i(c),u=a<=s;n=a;let d={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},r)},Qc=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Yc=t=>(...e)=>j.asap(()=>t(...e))});function U0(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let o=n.length,a=n.length;for(let f=0;f<a;f++)if(n.charCodeAt(f)===37&&f+2<a){let p=n.charCodeAt(f+1),m=n.charCodeAt(f+2);(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(o-=2,f+=2)}let s=0,c=a-1,l=f=>f>=2&&n.charCodeAt(f-2)===37&&n.charCodeAt(f-1)===51&&(n.charCodeAt(f)===68||n.charCodeAt(f)===100);c>=0&&(n.charCodeAt(c)===61?(s++,c--):l(c)&&(s++,c-=3)),s===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&s++;let d=Math.floor(o/4)*3-(s||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var cD=P(()=>{});import wee from"http";import See from"https";import mD from"http2";import hD from"util";import ma from"zlib";import fa from"stream";import{EventEmitter as kee}from"events";function Oee(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function vD(t,e,r){let n=e;if(!n&&n!==!1){let i=EU(r);i&&(A0(r)||(n=new URL(i)))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){if(!!(n.auth.username||n.auth.password))n.auth=(n.auth.username||"")+":"+(n.auth.password||"");else if(typeof n.auth=="object")throw new ae("Invalid proxy authorization",ae.ERR_BAD_OPTION,{proxy:n});let a=Buffer.from(n.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+a}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=n.hostname||n.host;t.hostname=i,t.host=i,t.port=n.port,t.path=r,n.protocol&&(t.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}t.beforeRedirects.proxy=function(o){vD(o,e,o.href)}}var gD,lD,$ee,uD,Eee,Iee,Pee,dD,pD,D0,Tee,zee,jee,Nee,fD,Ree,yD,_D=P(()=>{Bt();Zh();qh();Uh();IU();gD=Xu(BU(),1);Gh();kd();Zn();ys();Ai();GU();co();KU();YU();N0();XU();tD();nD();Hh();cD();lD={flush:ma.constants.Z_SYNC_FLUSH,finishFlush:ma.constants.Z_SYNC_FLUSH},$ee={flush:ma.constants.BROTLI_OPERATION_FLUSH,finishFlush:ma.constants.BROTLI_OPERATION_FLUSH},uD=j.isFunction(ma.createBrotliDecompress),{http:Eee,https:Iee}=gD.default,Pee=/https:?/,dD=It.protocols.map(t=>t+":"),pD=(t,[e,r])=>(t.on("end",r).on("error",r),e),D0=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let u=n.length;for(let d=0;d<u;d++){let[f,p]=n[d];if(!f.destroyed&&!f.closed&&hD.isDeepStrictEqual(p,r))return f}}let i=mD.connect(e,r),o,a=()=>{if(o)return;o=!0;let u=n,d=u.length,f=d;for(;f--;)if(u[f][0]===i){d===1?delete this.sessions[e]:u.splice(f,1),i.closed||i.close();return}},s=i.request,{sessionTimeout:c}=r;if(c!=null){let u,d=0;i.request=function(){let f=s.apply(this,arguments);return d++,u&&(clearTimeout(u),u=null),f.once("close",()=>{--d||(u=setTimeout(()=>{u=null,a()},c))}),f}}i.once("close",a);let l=[i,r];return n?n.push(l):n=this.sessions[e]=[l],i}},Tee=new D0;zee=typeof process<"u"&&j.kindOf(process)==="process",jee=t=>new Promise((e,r)=>{let n,i,o=(c,l)=>{i||(i=!0,n&&n(c,l))},a=c=>{o(c),e(c)},s=c=>{o(c,!0),r(c)};t(a,s,c=>n=c).catch(s)}),Nee=({address:t,family:e})=>{if(!j.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},fD=(t,e)=>Nee(j.isObject(t)?t:{address:t,family:e}),Ree={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:i}=t,o=Tee.getSession(r,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=mD.constants,u={[a]:t.protocol.replace(":",""),[s]:t.method,[c]:t.path};j.forEach(i,(f,p)=>{p.charAt(0)!==":"&&(u[p]=f)});let d=o.request(u);return d.once("response",f=>{let p=d;f=Object.assign({},f);let m=f[l];delete f[l],p.headers=f,p.statusCode=+m,e(p)}),d}},yD=zee&&function(e){return jee(async function(n,i,o){let{data:a,lookup:s,family:c,httpVersion:l=1,http2Options:u}=e,{responseType:d,responseEncoding:f}=e,p=e.method.toUpperCase(),m,v=!1,g;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let h=l===2;if(s){let W=eD(s,E=>j.isArray(E)?E:[E]);s=(E,q,R)=>{W(E,q,(k,O,B)=>{if(k)return R(k);let ie=j.isArray(O)?O.map(me=>fD(me)):[fD(O,B)];q.all?R(k,ie):R(k,ie[0].address,ie[0].family)})}}let y=new kee;function _(W){try{y.emit("abort",!W||W.type?new qn(null,e,g):W)}catch(E){console.warn("emit error",E)}}y.once("abort",i);let b=()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),y.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),o((W,E)=>{if(m=!0,E){v=!0,b();return}let{data:q}=W;if(q instanceof fa.Readable||q instanceof fa.Duplex){let R=fa.finished(q,()=>{R(),b()})}else b()});let x=_s(e.baseURL,e.url,e.allowAbsoluteUrls),w=new URL(x,It.hasBrowserEnv?It.origin:void 0),S=w.protocol||dD[0];if(S==="data:"){if(e.maxContentLength>-1){let E=String(e.url||x||"");if(U0(E)>e.maxContentLength)return i(new ae("maxContentLength size of "+e.maxContentLength+" exceeded",ae.ERR_BAD_RESPONSE,e))}let W;if(p!=="GET")return lo(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=T0(e.url,d==="blob",{Blob:e.env&&e.env.Blob})}catch(E){throw ae.from(E,ae.ERR_BAD_REQUEST,e)}return d==="text"?(W=W.toString(f),(!f||f==="utf8")&&(W=j.stripBOM(W))):d==="stream"&&(W=fa.Readable.from(W)),lo(n,i,{data:W,status:200,statusText:"OK",headers:new or,config:e})}if(dD.indexOf(S)===-1)return i(new ae("Unsupported protocol "+S,ae.ERR_BAD_REQUEST,e));let $=or.from(e.headers).normalize();$.set("User-Agent","axios/"+Ss,!1);let{onUploadProgress:T,onDownloadProgress:A}=e,I=e.maxRate,U,L;if(j.isSpecCompliantForm(a)){let W=$.getContentType(/boundary=([-_\w\d]{10,70})/i);a=QU(a,E=>{$.set(E)},{tag:`axios-${Ss}-boundary`,boundary:W&&W[1]||void 0})}else if(j.isFormData(a)&&j.isFunction(a.getHeaders)){if($.set(a.getHeaders()),!$.hasContentLength())try{let W=await hD.promisify(a.getLength).call(a);Number.isFinite(W)&&W>=0&&$.setContentLength(W)}catch{}}else if(j.isBlob(a)||j.isFile(a))a.size&&$.setContentType(a.type||"application/octet-stream"),$.setContentLength(a.size||0),a=fa.Readable.from(Kh(a));else if(a&&!j.isStream(a)){if(!Buffer.isBuffer(a))if(j.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(j.isString(a))a=Buffer.from(a,"utf-8");else return i(new ae("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ae.ERR_BAD_REQUEST,e));if($.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return i(new ae("Request body larger than maxBodyLength limit",ae.ERR_BAD_REQUEST,e))}let N=j.toFiniteNumber($.getContentLength());j.isArray(I)?(U=I[0],L=I[1]):U=L=I,a&&(T||U)&&(j.isStream(a)||(a=fa.Readable.from(a,{objectMode:!1})),a=fa.pipeline([a,new j0({maxRate:j.toFiniteNumber(U)})],j.noop),T&&a.on("progress",pD(a,Qc(N,Oo(Yc(T),!1,3)))));let Y;if(e.auth){let W=e.auth.username||"",E=e.auth.password||"";Y=W+":"+E}if(!Y&&w.username){let W=w.username,E=w.password;Y=W+":"+E}Y&&$.delete("authorization");let H;try{H=vs(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(W){let E=new Error(W.message);return E.config=e,E.url=e.url,E.exists=!0,i(E)}$.set("Accept-Encoding","gzip, compress, deflate"+(uD?", br":""),!1);let ye={path:H,method:p,headers:$.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Y,protocol:S,family:c,beforeRedirect:Oee,beforeRedirects:{},http2Options:u};!j.isUndefined(s)&&(ye.lookup=s),e.socketPath?ye.socketPath=e.socketPath:(ye.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,ye.port=w.port,vD(ye,e.proxy,S+"//"+w.hostname+(w.port?":"+w.port:"")+ye.path));let Pe,ue=Pee.test(ye.protocol);if(ye.agent=ue?e.httpsAgent:e.httpAgent,h?Pe=Ree:e.transport?Pe=e.transport:e.maxRedirects===0?Pe=ue?See:wee:(e.maxRedirects&&(ye.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ye.beforeRedirects.config=e.beforeRedirect),Pe=ue?Iee:Eee),e.maxBodyLength>-1?ye.maxBodyLength=e.maxBodyLength:ye.maxBodyLength=1/0,e.insecureHTTPParser&&(ye.insecureHTTPParser=e.insecureHTTPParser),g=Pe.request(ye,function(E){if(g.destroyed)return;let q=[E],R=j.toFiniteNumber(E.headers["content-length"]);if(A||L){let ie=new j0({maxRate:j.toFiniteNumber(L)});A&&ie.on("progress",pD(ie,Qc(R,Oo(Yc(A),!0,3)))),q.push(ie)}let k=E,O=E.req||g;if(e.decompress!==!1&&E.headers["content-encoding"])switch((p==="HEAD"||E.statusCode===204)&&delete E.headers["content-encoding"],(E.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":q.push(ma.createUnzip(lD)),delete E.headers["content-encoding"];break;case"deflate":q.push(new JU),q.push(ma.createUnzip(lD)),delete E.headers["content-encoding"];break;case"br":uD&&(q.push(ma.createBrotliDecompress($ee)),delete E.headers["content-encoding"])}k=q.length>1?fa.pipeline(q,j.noop):q[0];let B={status:E.statusCode,statusText:E.statusMessage,headers:new or(E.headers),config:e,request:O};if(d==="stream")B.data=k,lo(n,i,B);else{let ie=[],me=0;k.on("data",function(Te){ie.push(Te),me+=Te.length,e.maxContentLength>-1&&me>e.maxContentLength&&(v=!0,k.destroy(),_(new ae("maxContentLength size of "+e.maxContentLength+" exceeded",ae.ERR_BAD_RESPONSE,e,O)))}),k.on("aborted",function(){if(v)return;let Te=new ae("stream has been aborted",ae.ERR_BAD_RESPONSE,e,O);k.destroy(Te),i(Te)}),k.on("error",function(Te){g.destroyed||i(ae.from(Te,null,e,O))}),k.on("end",function(){try{let Te=ie.length===1?ie[0]:Buffer.concat(ie);d!=="arraybuffer"&&(Te=Te.toString(f),(!f||f==="utf8")&&(Te=j.stripBOM(Te))),B.data=Te}catch(Te){return i(ae.from(Te,null,e,B.request,B))}lo(n,i,B)})}y.once("abort",ie=>{k.destroyed||(k.emit("error",ie),k.destroy())})}),y.once("abort",W=>{g.close?g.close():g.destroy(W)}),g.on("error",function(E){i(ae.from(E,null,e,g))}),g.on("socket",function(E){E.setKeepAlive(!0,1e3*60)}),e.timeout){let W=parseInt(e.timeout,10);if(Number.isNaN(W)){_(new ae("error trying to parse `config.timeout` to int",ae.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(W,function(){if(m)return;let q=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",R=e.transitional||da;e.timeoutErrorMessage&&(q=e.timeoutErrorMessage),_(new ae(q,R.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,g))})}else g.setTimeout(0);if(j.isStream(a)){let W=!1,E=!1;a.on("end",()=>{W=!0}),a.once("error",q=>{E=!0,g.destroy(q)}),a.on("close",()=>{!W&&!E&&_(new qn("Request stream has been aborted",e,g))}),a.pipe(g)}else a&&g.write(a),g.end()})}});var bD,xD=P(()=>{Ai();bD=It.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,It.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0});var wD,SD=P(()=>{Bt();Ai();wD=It.hasStandardBrowserEnv?{write(t,e,r,n,i,o,a){if(typeof document>"u")return;let s=[`${t}=${encodeURIComponent(e)}`];j.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),j.isString(n)&&s.push(`path=${n}`),j.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),j.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}}});function Ui(t,e){e=e||{};let r={};function n(l,u,d,f){return j.isPlainObject(l)&&j.isPlainObject(u)?j.merge.call({caseless:f},l,u):j.isPlainObject(u)?j.merge({},u):j.isArray(u)?u.slice():u}function i(l,u,d,f){if(j.isUndefined(u)){if(!j.isUndefined(l))return n(void 0,l,d,f)}else return n(l,u,d,f)}function o(l,u){if(!j.isUndefined(u))return n(void 0,u)}function a(l,u){if(j.isUndefined(u)){if(!j.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,d){if(d in e)return n(l,u);if(d in t)return n(void 0,l)}let c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u,d)=>i(kD(l),kD(u),d,!0)};return j.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;let d=j.hasOwnProp(c,u)?c[u]:i,f=d(t[u],e[u],u);j.isUndefined(f)&&d!==s||(r[u]=f)}),r}var kD,Qh=P(()=>{"use strict";Bt();co();kD=t=>t instanceof or?{...t}:t});var Yh,M0=P(()=>{Ai();Bt();xD();SD();qh();Qh();co();Uh();Yh=t=>{let e=Ui({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;if(e.headers=a=or.from(a),e.url=vs(_s(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),j.isFormData(r)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(j.isFunction(r.getHeaders)){let c=r.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([u,d])=>{l.includes(u.toLowerCase())&&a.set(u,d)})}}if(It.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(e)),n||n!==!1&&bD(e.url))){let c=i&&o&&wD.read(o);c&&a.set(i,c)}return e}});var Cee,$D,ED=P(()=>{Bt();Zh();kd();Zn();ys();P0();Ai();co();Hh();M0();Cee=typeof XMLHttpRequest<"u",$D=Cee&&function(t){return new Promise(function(r,n){let i=Yh(t),o=i.data,a=or.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:l}=i,u,d,f,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function h(){if(!g)return;let _=or.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:_,config:t,request:g};lo(function(S){r(S),v()},function(S){n(S),v()},x),g=null}"onloadend"in g?g.onloadend=h:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(h)},g.onabort=function(){g&&(n(new ae("Request aborted",ae.ECONNABORTED,t,g)),g=null)},g.onerror=function(b){let x=b&&b.message?b.message:"Network Error",w=new ae(x,ae.ERR_NETWORK,t,g);w.event=b||null,n(w),g=null},g.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",x=i.transitional||da;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new ae(b,x.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,t,g)),g=null},o===void 0&&a.setContentType(null),"setRequestHeader"in g&&j.forEach(a.toJSON(),function(b,x){g.setRequestHeader(x,b)}),j.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),l&&([f,m]=Oo(l,!0),g.addEventListener("progress",f)),c&&g.upload&&([d,p]=Oo(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=_=>{g&&(n(!_||_.type?new qn(null,t,g):_),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));let y=jd(i.url);if(y&&It.protocols.indexOf(y)===-1){n(new ae("Unsupported protocol "+y+":",ae.ERR_BAD_REQUEST,t));return}g.send(o||null)})}});var Aee,ID,PD=P(()=>{ys();Zn();Bt();Aee=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,o=function(l){if(!i){i=!0,s();let u=l instanceof Error?l:this.reason;n.abort(u instanceof ae?u:new qn(u instanceof Error?u.message:u))}},a=e&&setTimeout(()=>{a=null,o(new ae(`timeout of ${e}ms exceeded`,ae.ETIMEDOUT))},e),s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));let{signal:c}=n;return c.unsubscribe=()=>j.asap(s),c}},ID=Aee});var Uee,Dee,Mee,L0,TD=P(()=>{Uee=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},Dee=async function*(t,e){for await(let r of Mee(t))yield*Uee(r,e)},Mee=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},L0=(t,e,r,n)=>{let i=Dee(t,e),o=0,a,s=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:l,value:u}=await i.next();if(l){s(),c.close();return}let d=u.byteLength;if(r){let f=o+=d;r(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),i.return()}},{highWaterMark:2})}});var OD,Jh,Lee,zD,jD,ND,Zee,qee,Z0,YCe,RD=P(()=>{Ai();Bt();Zn();PD();TD();co();Hh();M0();Zh();OD=64*1024,{isFunction:Jh}=j,Lee=(({Request:t,Response:e})=>({Request:t,Response:e}))(j.global),{ReadableStream:zD,TextEncoder:jD}=j.global,ND=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Zee=t=>{t=j.merge.call({skipUndefined:!0},Lee,t);let{fetch:e,Request:r,Response:n}=t,i=e?Jh(e):typeof fetch=="function",o=Jh(r),a=Jh(n);if(!i)return!1;let s=i&&Jh(zD),c=i&&(typeof jD=="function"?(m=>v=>m.encode(v))(new jD):async m=>new Uint8Array(await new r(m).arrayBuffer())),l=o&&s&&ND(()=>{let m=!1,v=new zD,g=new r(It.origin,{body:v,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return v.cancel(),m&&!g}),u=a&&s&&ND(()=>j.isReadableStream(new n("").body)),d={stream:u&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(v,g)=>{let h=v&&v[m];if(h)return h.call(v);throw new ae(`Response type '${m}' is not supported`,ae.ERR_NOT_SUPPORT,g)})});let f=async m=>{if(m==null)return 0;if(j.isBlob(m))return m.size;if(j.isSpecCompliantForm(m))return(await new r(It.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(j.isArrayBufferView(m)||j.isArrayBuffer(m))return m.byteLength;if(j.isURLSearchParams(m)&&(m=m+""),j.isString(m))return(await c(m)).byteLength},p=async(m,v)=>{let g=j.toFiniteNumber(m.getContentLength());return g??f(v)};return async m=>{let{url:v,method:g,data:h,signal:y,cancelToken:_,timeout:b,onDownloadProgress:x,onUploadProgress:w,responseType:S,headers:$,withCredentials:T="same-origin",fetchOptions:A}=Yh(m),I=e||fetch;S=S?(S+"").toLowerCase():"text";let U=ID([y,_&&_.toAbortSignal()],b),L=null,N=U&&U.unsubscribe&&(()=>{U.unsubscribe()}),Y;try{if(w&&l&&g!=="get"&&g!=="head"&&(Y=await p($,h))!==0){let E=new r(v,{method:"POST",body:h,duplex:"half"}),q;if(j.isFormData(h)&&(q=E.headers.get("content-type"))&&$.setContentType(q),E.body){let[R,k]=Qc(Y,Oo(Yc(w)));h=L0(E.body,OD,R,k)}}j.isString(T)||(T=T?"include":"omit");let H=o&&"credentials"in r.prototype,ye={...A,signal:U,method:g.toUpperCase(),headers:$.normalize().toJSON(),body:h,duplex:"half",credentials:H?T:void 0};L=o&&new r(v,ye);let Pe=await(o?I(L,A):I(v,ye)),ue=u&&(S==="stream"||S==="response");if(u&&(x||ue&&N)){let E={};["status","statusText","headers"].forEach(O=>{E[O]=Pe[O]});let q=j.toFiniteNumber(Pe.headers.get("content-length")),[R,k]=x&&Qc(q,Oo(Yc(x),!0))||[];Pe=new n(L0(Pe.body,OD,R,()=>{k&&k(),N&&N()}),E)}S=S||"text";let W=await d[j.findKey(d,S)||"text"](Pe,m);return!ue&&N&&N(),await new Promise((E,q)=>{lo(E,q,{data:W,headers:or.from(Pe.headers),status:Pe.status,statusText:Pe.statusText,config:m,request:L})})}catch(H){throw N&&N(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new ae("Network Error",ae.ERR_NETWORK,m,L,H&&H.response),{cause:H.cause||H}):ae.from(H,H&&H.code,m,L,H&&H.response)}}},qee=new Map,Z0=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:i}=e,o=[n,i,r],a=o.length,s=a,c,l,u=qee;for(;s--;)c=o[s],l=u.get(c),l===void 0&&u.set(c,l=s?new Map:Zee(e)),u=l;return l},YCe=Z0()});function Wee(t,e){t=j.isArray(t)?t:[t];let{length:r}=t,n,i,o={};for(let a=0;a<r;a++){n=t[a];let s;if(i=n,!Vee(n)&&(i=q0[(s=String(n)).toLowerCase()],i===void 0))throw new ae(`Unknown adapter '${s}'`);if(i&&(j.isFunction(i)||(i=i.get(e))))break;o[s||"#"+a]=i}if(!i){let a=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),s=r?a.length>1?`since :
52
+ `+a.map(CD).join(`
53
+ `):" "+CD(a[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}var q0,CD,Vee,Xh,F0=P(()=>{Bt();_D();ED();RD();Zn();q0={http:yD,xhr:$D,fetch:{get:Z0}};j.forEach(q0,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});CD=t=>`- ${t}`,Vee=t=>j.isFunction(t)||t===null||t===!1;Xh={getAdapter:Wee,adapters:q0}});function V0(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qn(null,t)}function eg(t){return V0(t),t.headers=or.from(t.headers),t.data=Ed.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Xh.getAdapter(t.adapter||Wc.adapter,t)(t).then(function(n){return V0(t),n.data=Ed.call(t,t.transformResponse,n),n.headers=or.from(n.headers),n},function(n){return Id(n)||(V0(t),n&&n.response&&(n.response.data=Ed.call(t,t.transformResponse,n.response),n.response.headers=or.from(n.response.headers))),Promise.reject(n)})}var AD=P(()=>{"use strict";SU();s0();Mh();ys();co();F0()});function Bee(t,e,r){if(typeof t!="object")throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let o=n[i],a=e[o];if(a){let s=t[o],c=s===void 0||a(s,o,t);if(c!==!0)throw new ae("option "+o+" must be "+c,ae.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ae("Unknown option "+o,ae.ERR_BAD_OPTION)}}var tg,UD,Rd,DD=P(()=>{"use strict";Gh();Zn();tg={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{tg[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});UD={};tg.transitional=function(e,r,n){function i(o,a){return"[Axios v"+Ss+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,s)=>{if(e===!1)throw new ae(i(a," has been removed"+(r?" in "+r:"")),ae.ERR_DEPRECATED);return r&&!UD[a]&&(UD[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,s):!0}};tg.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};Rd={assertOptions:Bee,validators:tg}});var ui,Jc,Cd,MD=P(()=>{"use strict";Bt();Uh();uU();AD();Qh();qh();DD();co();kd();ui=Rd.validators,Jc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Jw,response:new Jw}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let o=(()=>{if(!i.stack)return"";let a=i.stack.indexOf(`
54
+ `);return a===-1?"":i.stack.slice(a+1)})();try{if(!n.stack)n.stack=o;else if(o){let a=o.indexOf(`
55
+ `),s=a===-1?-1:o.indexOf(`
56
+ `,a+1),c=s===-1?"":o.slice(s+1);String(n.stack).endsWith(c)||(n.stack+=`
57
+ `+o)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ui(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Rd.assertOptions(n,{silentJSONParsing:ui.transitional(ui.boolean),forcedJSONParsing:ui.transitional(ui.boolean),clarifyTimeoutError:ui.transitional(ui.boolean),legacyInterceptorReqResOrdering:ui.transitional(ui.boolean)},!1),i!=null&&(j.isFunction(i)?r.paramsSerializer={serialize:i}:Rd.assertOptions(i,{encode:ui.function,serialize:ui.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Rd.assertOptions(r,{baseUrl:ui.spelling("baseURL"),withXsrfToken:ui.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&j.merge(o.common,o[r.method]);o&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),r.headers=or.concat(a,o);let s=[],c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;let g=r.transitional||da;g&&g.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});let l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let u,d=0,f;if(!c){let m=[eg.bind(this),void 0];for(m.unshift(...s),m.push(...l),f=m.length,u=Promise.resolve(r);d<f;)u=u.then(m[d++],m[d++]);return u}f=s.length;let p=r;for(;d<f;){let m=s[d++],v=s[d++];try{p=m(p)}catch(g){v.call(this,g);break}}try{u=eg.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(e){e=Ui(this.defaults,e);let r=_s(e.baseURL,e.url,e.allowAbsoluteUrls);return vs(r,e.params,e.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(e){Jc.prototype[e]=function(r,n){return this.request(Ui(n||{},{method:e,url:r,data:(n||{}).data}))}});j.forEach(["post","put","patch"],function(e){function r(n){return function(o,a,s){return this.request(Ui(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Jc.prototype[e]=r(),Jc.prototype[e+"Form"]=r(!0)});Cd=Jc});var W0,LD,ZD=P(()=>{"use strict";ys();W0=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});let n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o,a=new Promise(s=>{n.subscribe(s),o=s}).then(i);return a.cancel=function(){n.unsubscribe(o)},a},e(function(o,a,s){n.reason||(n.reason=new qn(o,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},LD=W0});function B0(t){return function(r){return t.apply(null,r)}}var qD=P(()=>{"use strict"});function G0(t){return j.isObject(t)&&t.isAxiosError===!0}var FD=P(()=>{"use strict";Bt()});var K0,VD,WD=P(()=>{K0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(K0).forEach(([t,e])=>{K0[e]=t});VD=K0});function BD(t){let e=new Cd(t),r=hd(Cd.prototype.request,e);return j.extend(r,Cd.prototype,e,{allOwnKeys:!0}),j.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return BD(Ui(t,i))},r}var vr,rg,GD=P(()=>{"use strict";Bt();Ew();MD();Qh();Mh();i0();ys();ZD();s0();Gh();Sd();Zn();qD();FD();co();F0();WD();vr=BD(Wc);vr.Axios=Cd;vr.CanceledError=qn;vr.CancelToken=LD;vr.isCancel=Id;vr.VERSION=Ss;vr.toFormData=ua;vr.AxiosError=ae;vr.Cancel=vr.CanceledError;vr.all=function(e){return Promise.all(e)};vr.spread=B0;vr.isAxiosError=G0;vr.mergeConfig=Ui;vr.AxiosHeaders=or;vr.formToJSON=t=>Dh(j.isHTMLForm(t)?new FormData(t):t);vr.getAdapter=Xh.getAdapter;vr.HttpStatusCode=VD;vr.default=vr;rg=vr});var KAe,HAe,QAe,YAe,JAe,XAe,eUe,tUe,rUe,nUe,iUe,oUe,aUe,sUe,cUe,lUe,KD=P(()=>{GD();({Axios:KAe,AxiosError:HAe,CanceledError:QAe,isCancel:YAe,CancelToken:JAe,VERSION:XAe,all:eUe,Cancel:tUe,isAxiosError:rUe,spread:nUe,toFormData:iUe,AxiosHeaders:oUe,HttpStatusCode:aUe,formToJSON:sUe,getAdapter:cUe,mergeConfig:lUe}=rg)});function C(t,e,r){function n(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,c);let l=a.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let f=u[d];f in s||(s[f]=l[f].bind(s))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function a(s){var c;let l=r?.Parent?new o:this;n(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function br(t){return t&&Object.assign(ng,t),ng}var HD,uo,$s,ng,Xc=P(()=>{HD=Object.freeze({status:"aborted"});uo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$s=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},ng={}});var ee={};Ln(ee,{BIGINT_FORMAT_RANGES:()=>iS,Class:()=>Q0,NUMBER_FORMAT_RANGES:()=>nS,aborted:()=>ya,allowsEval:()=>X0,assert:()=>Yee,assertEqual:()=>Gee,assertIs:()=>Hee,assertNever:()=>Qee,assertNotEqual:()=>Kee,assignProp:()=>ga,base64ToUint8Array:()=>n4,base64urlToUint8Array:()=>cte,cached:()=>tl,captureStackTrace:()=>og,cleanEnum:()=>ste,cleanRegex:()=>Dd,clone:()=>sn,cloneDef:()=>Xee,createTransparentProxy:()=>ote,defineLazy:()=>Ge,esc:()=>ig,escapeRegex:()=>di,extend:()=>XD,finalizeIssue:()=>En,floatSafeRemainder:()=>Y0,getElementAtPath:()=>ete,getEnumValues:()=>Ud,getLengthableOrigin:()=>Zd,getParsedType:()=>ite,getSizableOrigin:()=>Ld,hexToUint8Array:()=>ute,isObject:()=>Es,isPlainObject:()=>va,issue:()=>rl,joinValues:()=>je,jsonStringifyReplacer:()=>el,merge:()=>ate,mergeDefs:()=>zo,normalizeParams:()=>ce,nullish:()=>ha,numKeys:()=>nte,objectClone:()=>Jee,omit:()=>JD,optionalKeys:()=>rS,parsedType:()=>Re,partial:()=>t4,pick:()=>YD,prefixIssues:()=>Fn,primitiveTypes:()=>tS,promiseAllObject:()=>tte,propertyKeyTypes:()=>Md,randomString:()=>rte,required:()=>r4,safeExtend:()=>e4,shallowClone:()=>eS,slugify:()=>J0,stringifyPrimitive:()=>Ne,uint8ArrayToBase64:()=>i4,uint8ArrayToBase64url:()=>lte,uint8ArrayToHex:()=>dte,unwrapMessage:()=>Ad});function Gee(t){return t}function Kee(t){return t}function Hee(t){}function Qee(t){throw new Error("Unexpected value in exhaustive check")}function Yee(t){}function Ud(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function je(t,e="|"){return t.map(r=>Ne(r)).join(e)}function el(t,e){return typeof e=="bigint"?e.toString():e}function tl(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ha(t){return t==null}function Dd(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Y0(t,e){let r=(t.toString().split(".")[1]||"").length,n=e.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let o=r>i?r:i,a=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return a%s/10**o}function Ge(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==QD)return n===void 0&&(n=QD,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function Jee(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function ga(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zo(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function Xee(t){return zo(t._zod.def)}function ete(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function tte(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function rte(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function ig(t){return JSON.stringify(t)}function J0(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Es(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function va(t){if(Es(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Es(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function eS(t){return va(t)?{...t}:Array.isArray(t)?[...t]:t}function nte(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function di(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sn(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function ce(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ote(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function Ne(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function rS(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function YD(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=zo(t._zod.def,{get shape(){let a={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(a[s]=r.shape[s])}return ga(this,"shape",a),a},checks:[]});return sn(t,o)}function JD(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=zo(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete a[s]}return ga(this,"shape",a),a},checks:[]});return sn(t,o)}function XD(t,e){if(!va(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let a in e)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=zo(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return ga(this,"shape",o),o}});return sn(t,i)}function e4(t,e){if(!va(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=zo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return ga(this,"shape",n),n}});return sn(t,r)}function ate(t,e){let r=zo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return ga(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return sn(t,r)}function t4(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=zo(e._zod.def,{get shape(){let s=e._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=t?new t({type:"optional",innerType:s[l]}):s[l];return ga(this,"shape",c),c},checks:[]});return sn(e,a)}function r4(t,e,r){let n=zo(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(let a in i)o[a]=new t({type:"nonoptional",innerType:i[a]});return ga(this,"shape",o),o}});return sn(e,n)}function ya(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Fn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Ad(t){return typeof t=="string"?t:t?.message}function En(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Ad(t.inst?._zod.def?.error?.(t))??Ad(e?.error?.(t))??Ad(r.customError?.(t))??Ad(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function Ld(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Zd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Re(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function rl(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function ste(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function n4(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function i4(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function cte(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return n4(e+r)}function lte(t){return i4(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ute(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function dte(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var QD,og,X0,ite,Md,tS,nS,iS,Q0,we=P(()=>{QD=Symbol("evaluating");og="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};X0=tl(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});ite=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Md=new Set(["string","number","symbol"]),tS=new Set(["string","number","bigint","boolean","symbol","undefined"]);nS={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]},iS={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Q0=class{constructor(...e){}}});function sg(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function cg(t,e=r=>r.message){let r={_errors:[]},n=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let a=r,s=0;for(;s<o.path.length;){let c=o.path[s];s===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(e(o))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return n(t),r}var o4,ag,qd,oS=P(()=>{Xc();we();o4=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,el,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ag=C("$ZodError",o4),qd=C("$ZodError",o4,{Parent:Error})});var Fd,Vd,Wd,Bd,Gd,nl,Kd,Hd,a4,s4,c4,l4,u4,d4,p4,f4,aS=P(()=>{Xc();oS();we();Fd=t=>(e,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new uo;if(a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>En(c,o,br())));throw og(s,i?.callee),s}return a.value},Vd=Fd(qd),Wd=t=>async(e,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>En(c,o,br())));throw og(s,i?.callee),s}return a.value},Bd=Wd(qd),Gd=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new uo;return o.issues.length?{success:!1,error:new(t??ag)(o.issues.map(a=>En(a,i,br())))}:{success:!0,data:o.value}},nl=Gd(qd),Kd=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>En(a,i,br())))}:{success:!0,data:o.value}},Hd=Kd(qd),a4=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Fd(t)(e,r,i)},s4=t=>(e,r,n)=>Fd(t)(e,r,n),c4=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Wd(t)(e,r,i)},l4=t=>async(e,r,n)=>Wd(t)(e,r,n),u4=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gd(t)(e,r,i)},d4=t=>(e,r,n)=>Gd(t)(e,r,n),p4=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Kd(t)(e,r,i)},f4=t=>async(e,r,n)=>Kd(t)(e,r,n)});var pi={};Ln(pi,{base64:()=>wS,base64url:()=>lg,bigint:()=>PS,boolean:()=>OS,browserEmail:()=>bte,cidrv4:()=>bS,cidrv6:()=>xS,cuid:()=>sS,cuid2:()=>cS,date:()=>kS,datetime:()=>ES,domain:()=>Ste,duration:()=>fS,e164:()=>SS,email:()=>hS,emoji:()=>gS,extendedDuration:()=>fte,guid:()=>mS,hex:()=>kte,hostname:()=>wte,html5Email:()=>vte,idnEmail:()=>_te,integer:()=>TS,ipv4:()=>vS,ipv6:()=>yS,ksuid:()=>dS,lowercase:()=>NS,mac:()=>_S,md5_base64:()=>Ete,md5_base64url:()=>Ite,md5_hex:()=>$te,nanoid:()=>pS,null:()=>zS,number:()=>ug,rfc5322Email:()=>yte,sha1_base64:()=>Tte,sha1_base64url:()=>Ote,sha1_hex:()=>Pte,sha256_base64:()=>jte,sha256_base64url:()=>Nte,sha256_hex:()=>zte,sha384_base64:()=>Cte,sha384_base64url:()=>Ate,sha384_hex:()=>Rte,sha512_base64:()=>Dte,sha512_base64url:()=>Mte,sha512_hex:()=>Ute,string:()=>IS,time:()=>$S,ulid:()=>lS,undefined:()=>jS,unicodeEmail:()=>m4,uppercase:()=>RS,uuid:()=>Is,uuid4:()=>mte,uuid6:()=>hte,uuid7:()=>gte,xid:()=>uS});function gS(){return new RegExp(xte,"u")}function g4(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $S(t){return new RegExp(`^${g4(t)}$`)}function ES(t){let e=g4({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${h4}T(?:${n})$`)}function Qd(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Yd(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var sS,cS,lS,uS,dS,pS,fS,fte,mS,Is,mte,hte,gte,hS,vte,yte,m4,_te,bte,xte,vS,yS,_S,bS,xS,wS,lg,wte,Ste,SS,h4,kS,IS,PS,TS,ug,OS,zS,jS,NS,RS,kte,$te,Ete,Ite,Pte,Tte,Ote,zte,jte,Nte,Rte,Cte,Ate,Ute,Dte,Mte,dg=P(()=>{we();sS=/^[cC][^\s-]{8,}$/,cS=/^[0-9a-z]+$/,lS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uS=/^[0-9a-vA-V]{20}$/,dS=/^[A-Za-z0-9]{27}$/,pS=/^[a-zA-Z0-9_-]{21}$/,fS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fte=/^[-+]?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)?)??$/,mS=/^([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})$/,Is=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,mte=Is(4),hte=Is(6),gte=Is(7),hS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vte=/^[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])?)*$/,yte=/^(([^<>()\[\]\\.,;:\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,}))$/,m4=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,_te=m4,bte=/^[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])?)*$/,xte="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";vS=/^(?:(?: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])$/,yS=/^(([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}|:))$/,_S=t=>{let e=di(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},bS=/^((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])$/,xS=/^(([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])$/,wS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lg=/^[A-Za-z0-9_-]*$/,wte=/^(?=.{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])?)*\.?$/,Ste=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,SS=/^\+[1-9]\d{6,14}$/,h4="(?:(?:\\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])))",kS=new RegExp(`^${h4}$`);IS=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},PS=/^-?\d+n?$/,TS=/^-?\d+$/,ug=/^-?\d+(?:\.\d+)?$/,OS=/^(?:true|false)$/i,zS=/^null$/i,jS=/^undefined$/i,NS=/^[^A-Z]*$/,RS=/^[^a-z]*$/,kte=/^[0-9a-fA-F]*$/;$te=/^[0-9a-fA-F]{32}$/,Ete=Qd(22,"=="),Ite=Yd(22),Pte=/^[0-9a-fA-F]{40}$/,Tte=Qd(27,"="),Ote=Yd(27),zte=/^[0-9a-fA-F]{64}$/,jte=Qd(43,"="),Nte=Yd(43),Rte=/^[0-9a-fA-F]{96}$/,Cte=Qd(64,""),Ate=Yd(64),Ute=/^[0-9a-fA-F]{128}$/,Dte=Qd(86,"=="),Mte=Yd(86)});function v4(t,e,r){t.issues.length&&e.issues.push(...Fn(r,t.issues))}var Ut,y4,CS,AS,_4,b4,x4,w4,S4,k4,$4,E4,I4,Jd,P4,T4,O4,z4,j4,N4,R4,C4,A4,pg=P(()=>{Xc();dg();we();Ut=C("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),y4={number:"number",bigint:"bigint",object:"date"},CS=C("$ZodCheckLessThan",(t,e)=>{Ut.init(t,e);let r=y4[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),AS=C("$ZodCheckGreaterThan",(t,e)=>{Ut.init(t,e);let r=y4[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),_4=C("$ZodCheckMultipleOf",(t,e)=>{Ut.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Y0(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),b4=C("$ZodCheckNumberFormat",(t,e)=>{Ut.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=nS[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=i,s.maximum=o,r&&(s.pattern=TS)}),t._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),x4=C("$ZodCheckBigIntFormat",(t,e)=>{Ut.init(t,e);let[r,n]=iS[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),w4=C("$ZodCheckMaxSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:Ld(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),S4=C("$ZodCheckMinSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:Ld(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),k4=C("$ZodCheckSizeEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,o=i.size;if(o===e.size)return;let a=o>e.size;n.issues.push({origin:Ld(i),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),$4=C("$ZodCheckMaxLength",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let a=Zd(i);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),E4=C("$ZodCheckMinLength",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let a=Zd(i);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),I4=C("$ZodCheckLengthEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ha(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,o=i.length;if(o===e.length)return;let a=Zd(i),s=o>e.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),Jd=C("$ZodCheckStringFormat",(t,e)=>{var r,n;Ut.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),P4=C("$ZodCheckRegex",(t,e)=>{Jd.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),T4=C("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=NS),Jd.init(t,e)}),O4=C("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=RS),Jd.init(t,e)}),z4=C("$ZodCheckIncludes",(t,e)=>{Ut.init(t,e);let r=di(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),j4=C("$ZodCheckStartsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`^${di(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),N4=C("$ZodCheckEndsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`.*${di(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});R4=C("$ZodCheckProperty",(t,e)=>{Ut.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>v4(i,r,e.property));v4(n,r,e.property)}}),C4=C("$ZodCheckMimeType",(t,e)=>{Ut.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),A4=C("$ZodCheckOverwrite",(t,e)=>{Ut.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var fg,US=P(()=>{fg=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
58
+ `).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),o=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,i.join(`
59
+ `))}}});var D4,DS=P(()=>{D4={major:4,minor:3,patch:6}});function Q4(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Lte(t){if(!lg.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Q4(r)}function Zte(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}function M4(t,e,r){t.issues.length&&e.issues.push(...Fn(r,t.issues)),e.value[r]=t.value}function yg(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Fn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function Y4(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=rS(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function J4(t,e,r,n,i,o){let a=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout==="optional";for(let d in e){if(s.has(d))continue;if(l==="never"){a.push(d);continue}let f=c.run({value:e[d],issues:[]},n);f instanceof Promise?t.push(f.then(p=>yg(p,r,d,e,u))):yg(f,r,d,e,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}function L4(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!ya(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>En(a,n,br())))}),e)}function Z4(t,e,r,n){let i=t.filter(o=>o.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>En(a,n,br())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function MS(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(va(t)&&va(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let a=MS(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],a=MS(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function q4(t,e,r){let n=new Map,i;for(let s of e.issues)if(s.code==="unrecognized_keys"){i??(i=s);for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(s);let o=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&i&&t.issues.push({...i,keys:o}),ya(t))return t;let a=MS(e.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return t.value=a.data,t}function mg(t,e,r){t.issues.length&&e.issues.push(...Fn(r,t.issues)),e.value[r]=t.value}function F4(t,e,r,n,i,o,a){t.issues.length&&(Md.has(typeof n)?r.issues.push(...Fn(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(s=>En(s,a,br()))})),e.issues.length&&(Md.has(typeof n)?r.issues.push(...Fn(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(s=>En(s,a,br()))})),r.value.set(t.value,e.value)}function V4(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function W4(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}function B4(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function G4(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function hg(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}function gg(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>vg(t,o,e.out,r)):vg(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>vg(t,o,e.in,r)):vg(t,i,e.in,r)}}function vg(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function K4(t){return t.value=Object.freeze(t.value),t}function H4(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(rl(i))}}var Ze,Ps,jt,LS,ZS,qS,FS,VS,WS,BS,GS,KS,HS,QS,YS,JS,XS,ek,tk,rk,nk,ik,ok,ak,sk,ck,lk,uk,_g,dk,Xd,bg,pk,fk,mk,hk,gk,vk,yk,_k,bk,xk,X4,eM,ep,wk,Sk,kk,xg,$k,Ek,Ik,Pk,Tk,Ok,zk,wg,jk,Nk,Rk,Ck,Ak,Uk,Dk,Mk,Lk,tp,Zk,qk,Fk,Vk,Wk,Bk,Gk=P(()=>{pg();Xc();US();aS();dg();we();DS();we();Ze=C("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=D4;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(a,s,c)=>{let l=ya(a),u;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(l)continue;let f=a.issues.length,p=d._zod.check(a);if(p instanceof Promise&&c?.async===!1)throw new uo;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,a.issues.length!==f&&(l||(l=ya(a,f)))});else{if(a.issues.length===f)continue;l||(l=ya(a,f))}}return u?u.then(()=>a):a},o=(a,s,c)=>{if(ya(a))return a.aborted=!0,a;let l=i(s,n,c);if(l instanceof Promise){if(c.async===!1)throw new uo;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(a,s)=>{if(s.skipChecks)return t._zod.parse(a,s);if(s.direction==="backward"){let l=t._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,a,s)):o(l,a,s)}let c=t._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new uo;return c.then(l=>i(l,n,s))}return i(c,n,s)}}Ge(t,"~standard",()=>({validate:i=>{try{let o=nl(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Hd(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ps=C("$ZodString",(t,e)=>{Ze.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??IS(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),jt=C("$ZodStringFormat",(t,e)=>{Jd.init(t,e),Ps.init(t,e)}),LS=C("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=mS),jt.init(t,e)}),ZS=C("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Is(n))}else e.pattern??(e.pattern=Is());jt.init(t,e)}),qS=C("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=hS),jt.init(t,e)}),FS=C("$ZodURL",(t,e)=>{jt.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),VS=C("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=gS()),jt.init(t,e)}),WS=C("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=pS),jt.init(t,e)}),BS=C("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=sS),jt.init(t,e)}),GS=C("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=cS),jt.init(t,e)}),KS=C("$ZodULID",(t,e)=>{e.pattern??(e.pattern=lS),jt.init(t,e)}),HS=C("$ZodXID",(t,e)=>{e.pattern??(e.pattern=uS),jt.init(t,e)}),QS=C("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=dS),jt.init(t,e)}),YS=C("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=ES(e)),jt.init(t,e)}),JS=C("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=kS),jt.init(t,e)}),XS=C("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=$S(e)),jt.init(t,e)}),ek=C("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=fS),jt.init(t,e)}),tk=C("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=vS),jt.init(t,e),t._zod.bag.format="ipv4"}),rk=C("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=yS),jt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),nk=C("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=_S(e.delimiter)),jt.init(t,e),t._zod.bag.format="mac"}),ik=C("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=bS),jt.init(t,e)}),ok=C("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=xS),jt.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});ak=C("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=wS),jt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Q4(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});sk=C("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=lg),jt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Lte(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),ck=C("$ZodE164",(t,e)=>{e.pattern??(e.pattern=SS),jt.init(t,e)});lk=C("$ZodJWT",(t,e)=>{jt.init(t,e),t._zod.check=r=>{Zte(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),uk=C("$ZodCustomStringFormat",(t,e)=>{jt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),_g=C("$ZodNumber",(t,e)=>{Ze.init(t,e),t._zod.pattern=t._zod.bag.pattern??ug,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),dk=C("$ZodNumberFormat",(t,e)=>{b4.init(t,e),_g.init(t,e)}),Xd=C("$ZodBoolean",(t,e)=>{Ze.init(t,e),t._zod.pattern=OS,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),bg=C("$ZodBigInt",(t,e)=>{Ze.init(t,e),t._zod.pattern=PS,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),pk=C("$ZodBigIntFormat",(t,e)=>{x4.init(t,e),bg.init(t,e)}),fk=C("$ZodSymbol",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),mk=C("$ZodUndefined",(t,e)=>{Ze.init(t,e),t._zod.pattern=jS,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),hk=C("$ZodNull",(t,e)=>{Ze.init(t,e),t._zod.pattern=zS,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),gk=C("$ZodAny",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),vk=C("$ZodUnknown",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),yk=C("$ZodNever",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),_k=C("$ZodVoid",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),bk=C("$ZodDate",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});xk=C("$ZodArray",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?o.push(c.then(l=>M4(l,r,a))):M4(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});X4=C("$ZodObject",(t,e)=>{if(Ze.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...s};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=tl(()=>Y4(e));Ge(t._zod,"propValues",()=>{let s=e.shape,c={};for(let l in s){let u=s[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let i=Es,o=e.catchall,a;t._zod.parse=(s,c)=>{a??(a=n.value);let l=s.value;if(!i(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),s;s.value={};let u=[],d=a.shape;for(let f of a.keys){let p=d[f],m=p._zod.optout==="optional",v=p._zod.run({value:l[f],issues:[]},c);v instanceof Promise?u.push(v.then(g=>yg(g,s,f,l,m))):yg(v,s,f,l,m)}return o?J4(u,l,s,c,n.value,t):u.length?Promise.all(u).then(()=>s):s}}),eM=C("$ZodObjectJIT",(t,e)=>{X4.init(t,e);let r=t._zod.parse,n=tl(()=>Y4(e)),i=f=>{let p=new fg(["shape","payload","ctx"]),m=n.value,v=_=>{let b=ig(_);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};p.write("const input = payload.value;");let g=Object.create(null),h=0;for(let _ of m.keys)g[_]=`key_${h++}`;p.write("const newResult = {};");for(let _ of m.keys){let b=g[_],x=ig(_),S=f[_]?._zod?.optout==="optional";p.write(`const ${b} = ${v(_)};`),S?p.write(`
60
+ if (${b}.issues.length) {
61
+ if (${x} in input) {
62
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
63
+ ...iss,
64
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
65
+ })));
66
+ }
67
+ }
68
+
69
+ if (${b}.value === undefined) {
70
+ if (${x} in input) {
71
+ newResult[${x}] = undefined;
72
+ }
73
+ } else {
74
+ newResult[${x}] = ${b}.value;
75
+ }
76
+
77
+ `):p.write(`
78
+ if (${b}.issues.length) {
79
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
80
+ ...iss,
81
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
82
+ })));
83
+ }
84
+
85
+ if (${b}.value === undefined) {
86
+ if (${x} in input) {
87
+ newResult[${x}] = undefined;
88
+ }
89
+ } else {
90
+ newResult[${x}] = ${b}.value;
91
+ }
92
+
93
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");let y=p.compile();return(_,b)=>y(f,_,b)},o,a=Es,s=!ng.jitless,l=s&&X0.value,u=e.catchall,d;t._zod.parse=(f,p)=>{d??(d=n.value);let m=f.value;return a(m)?s&&l&&p?.async===!1&&p.jitless!==!0?(o||(o=i(e.shape)),f=o(f,p),u?J4([],m,f,p,d,t):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});ep=C("$ZodUnion",(t,e)=>{Ze.init(t,e),Ge(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ge(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ge(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ge(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>Dd(o.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let c of e.options){let l=c._zod.run({value:i.value,issues:[]},o);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>L4(c,i,t,o)):L4(s,i,t,o)}});wk=C("$ZodXor",(t,e)=>{ep.init(t,e),e.inclusive=!1;let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let c of e.options){let l=c._zod.run({value:i.value,issues:[]},o);l instanceof Promise?(s.push(l),a=!0):s.push(l)}return a?Promise.all(s).then(c=>Z4(c,i,t,o)):Z4(s,i,t,o)}}),Sk=C("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,ep.init(t,e);let r=t._zod.parse;Ge(t._zod,"propValues",()=>{let i={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){i[s]||(i[s]=new Set);for(let l of c)i[s].add(l)}}return i});let n=tl(()=>{let i=e.options,o=new Map;for(let a of i){let s=a._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});t._zod.parse=(i,o)=>{let a=i.value;if(!Es(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=n.value.get(a?.[e.discriminator]);return s?s._zod.run(i,o):e.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:a,path:[e.discriminator],inst:t}),i)}}),kk=C("$ZodIntersection",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),a=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>q4(r,c,l)):q4(r,o,a)}});xg=C("$ZodTuple",(t,e)=>{Ze.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[],s=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!e.rest){let u=o.length>r.length,d=o.length<c-1;if(u||d)return n.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),n}let l=-1;for(let u of r){if(l++,l>=o.length&&l>=c)continue;let d=u._zod.run({value:o[l],issues:[]},i);d instanceof Promise?a.push(d.then(f=>mg(f,n,l))):mg(d,n,l)}if(e.rest){let u=o.slice(r.length);for(let d of u){l++;let f=e.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?a.push(f.then(p=>mg(p,n,l))):mg(f,n,l)}}return a.length?Promise.all(a).then(()=>n):n}});$k=C("$ZodRecord",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!va(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[],a=e.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let u=e.valueType._zod.run({value:i[l],issues:[]},n);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...Fn(l,d.issues)),r.value[l]=d.value})):(u.issues.length&&r.issues.push(...Fn(l,u.issues)),r.value[l]=u.value)}let c;for(let l in i)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let c=e.keyType._zod.run({value:s,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ug.test(s)&&c.issues.length){let d=e.keyType._zod.run({value:Number(s),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){e.mode==="loose"?r.value[s]=i[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>En(d,n,br())),input:s,path:[s],inst:t});continue}let u=e.valueType._zod.run({value:i[s],issues:[]},n);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...Fn(s,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...Fn(s,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Ek=C("$ZodMap",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[a,s]of i){let c=e.keyType._zod.run({value:a,issues:[]},n),l=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{F4(u,d,r,a,i,t,n)})):F4(c,l,r,a,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});Ik=C("$ZodSet",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of i){let s=e.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?o.push(s.then(c=>V4(c,r))):V4(s,r)}return o.length?Promise.all(o).then(()=>r):r}});Pk=C("$ZodEnum",(t,e)=>{Ze.init(t,e);let r=Ud(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>Md.has(typeof i)).map(i=>typeof i=="string"?di(i):i.toString()).join("|")})$`),t._zod.parse=(i,o)=>{let a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:t}),i}}),Tk=C("$ZodLiteral",(t,e)=>{if(Ze.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?di(n):n?di(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}}),Ok=C("$ZodFile",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),zk=C("$ZodTransform",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new $s(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new uo;return r.value=i,r}});wg=C("$ZodOptional",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ge(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ge(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Dd(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>W4(o,r.value)):W4(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),jk=C("$ZodExactOptional",(t,e)=>{wg.init(t,e),Ge(t._zod,"values",()=>e.innerType._zod.values),Ge(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),Nk=C("$ZodNullable",(t,e)=>{Ze.init(t,e),Ge(t._zod,"optin",()=>e.innerType._zod.optin),Ge(t._zod,"optout",()=>e.innerType._zod.optout),Ge(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Dd(r.source)}|null)$`):void 0}),Ge(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),Rk=C("$ZodDefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",Ge(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>B4(o,e)):B4(i,e)}});Ck=C("$ZodPrefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",Ge(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),Ak=C("$ZodNonOptional",(t,e)=>{Ze.init(t,e),Ge(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>G4(o,t)):G4(i,t)}});Uk=C("$ZodSuccess",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new $s("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),Dk=C("$ZodCatch",(t,e)=>{Ze.init(t,e),Ge(t._zod,"optin",()=>e.innerType._zod.optin),Ge(t._zod,"optout",()=>e.innerType._zod.optout),Ge(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>En(a,n,br()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>En(o,n,br()))},input:r.value}),r.issues=[]),r)}}),Mk=C("$ZodNaN",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Lk=C("$ZodPipe",(t,e)=>{Ze.init(t,e),Ge(t._zod,"values",()=>e.in._zod.values),Ge(t._zod,"optin",()=>e.in._zod.optin),Ge(t._zod,"optout",()=>e.out._zod.optout),Ge(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>hg(a,e.in,n)):hg(o,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>hg(o,e.out,n)):hg(i,e.out,n)}});tp=C("$ZodCodec",(t,e)=>{Ze.init(t,e),Ge(t._zod,"values",()=>e.in._zod.values),Ge(t._zod,"optin",()=>e.in._zod.optin),Ge(t._zod,"optout",()=>e.out._zod.optout),Ge(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(a=>gg(a,e,n)):gg(o,e,n)}else{let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>gg(a,e,n)):gg(o,e,n)}}});Zk=C("$ZodReadonly",(t,e)=>{Ze.init(t,e),Ge(t._zod,"propValues",()=>e.innerType._zod.propValues),Ge(t._zod,"values",()=>e.innerType._zod.values),Ge(t._zod,"optin",()=>e.innerType?._zod?.optin),Ge(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(K4):K4(i)}});qk=C("$ZodTemplateLiteral",(t,e)=>{Ze.init(t,e);let r=[];for(let n of e.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 i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||tS.has(typeof n))r.push(di(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)}),Fk=C("$ZodFunction",(t,e)=>(Ze.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?Vd(t._def.input,n):n,o=Reflect.apply(r,this,i);return t._def.output?Vd(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await Bd(t._def.input,n):n,o=await Reflect.apply(r,this,i);return t._def.output?await Bd(t._def.output,o):o}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new xg({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t)),Vk=C("$ZodPromise",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),Wk=C("$ZodLazy",(t,e)=>{Ze.init(t,e),Ge(t._zod,"innerType",()=>e.getter()),Ge(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Ge(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Ge(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Ge(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),Bk=C("$ZodCustom",(t,e)=>{Ut.init(t,e),Ze.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>H4(o,r,n,t));H4(i,r,n,t)}})});var tM=P(()=>{we()});var rM=P(()=>{we()});var nM=P(()=>{we()});var iM=P(()=>{we()});var oM=P(()=>{we()});var aM=P(()=>{we()});var sM=P(()=>{we()});var cM=P(()=>{we()});function Kk(){return{localeError:Fte()}}var Fte,Hk=P(()=>{we();Fte=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,a=Re(i.input),s=n[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Ne(i.values[0])}`:`Invalid option: expected one of ${je(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${je(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});var lM=P(()=>{we()});var uM=P(()=>{we()});var dM=P(()=>{we()});var pM=P(()=>{we()});var fM=P(()=>{we()});var mM=P(()=>{we()});var hM=P(()=>{we()});var gM=P(()=>{we()});var vM=P(()=>{we()});var yM=P(()=>{we()});var _M=P(()=>{we()});var bM=P(()=>{we()});var xM=P(()=>{we()});var wM=P(()=>{we()});var Qk=P(()=>{we()});var SM=P(()=>{Qk()});var kM=P(()=>{we()});var $M=P(()=>{we()});var EM=P(()=>{we()});var IM=P(()=>{we()});var PM=P(()=>{we()});var TM=P(()=>{we()});var OM=P(()=>{we()});var zM=P(()=>{we()});var jM=P(()=>{we()});var NM=P(()=>{we()});var RM=P(()=>{we()});var CM=P(()=>{we()});var AM=P(()=>{we()});var UM=P(()=>{we()});var DM=P(()=>{we()});var MM=P(()=>{we()});var Yk=P(()=>{we()});var LM=P(()=>{Yk()});var ZM=P(()=>{we()});var qM=P(()=>{we()});var FM=P(()=>{we()});var VM=P(()=>{we()});var WM=P(()=>{we()});var BM=P(()=>{we()});var Sg=P(()=>{tM();rM();nM();iM();oM();aM();sM();cM();Hk();lM();uM();dM();pM();fM();mM();hM();gM();vM();yM();_M();bM();xM();wM();SM();Qk();kM();$M();EM();IM();PM();TM();OM();zM();jM();NM();RM();CM();AM();UM();DM();MM();LM();Yk();ZM();qM();FM();VM();WM();BM()});function e$(){return new Xk}var GM,Xk,cn,rp=P(()=>{Xk=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(GM=globalThis).__zod_globalRegistry??(GM.__zod_globalRegistry=e$());cn=globalThis.__zod_globalRegistry});function t$(t,e){return new t({type:"string",...ce(e)})}function kg(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ce(e)})}function np(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ce(e)})}function $g(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ce(e)})}function Eg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ce(e)})}function Ig(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ce(e)})}function Pg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ce(e)})}function ip(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ce(e)})}function Tg(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ce(e)})}function Og(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ce(e)})}function zg(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ce(e)})}function jg(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ce(e)})}function Ng(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ce(e)})}function Rg(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ce(e)})}function Cg(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ce(e)})}function Ag(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ce(e)})}function Ug(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ce(e)})}function r$(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...ce(e)})}function Dg(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ce(e)})}function Mg(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ce(e)})}function Lg(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ce(e)})}function Zg(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ce(e)})}function qg(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ce(e)})}function Fg(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ce(e)})}function n$(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ce(e)})}function i$(t,e){return new t({type:"string",format:"date",check:"string_format",...ce(e)})}function o$(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ce(e)})}function a$(t,e){return new t({type:"string",format:"duration",check:"string_format",...ce(e)})}function s$(t,e){return new t({type:"number",checks:[],...ce(e)})}function c$(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ce(e)})}function l$(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...ce(e)})}function u$(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...ce(e)})}function d$(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...ce(e)})}function p$(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...ce(e)})}function f$(t,e){return new t({type:"boolean",...ce(e)})}function m$(t,e){return new t({type:"bigint",...ce(e)})}function h$(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ce(e)})}function g$(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ce(e)})}function v$(t,e){return new t({type:"symbol",...ce(e)})}function y$(t,e){return new t({type:"undefined",...ce(e)})}function _$(t,e){return new t({type:"null",...ce(e)})}function b$(t){return new t({type:"any"})}function x$(t){return new t({type:"unknown"})}function w$(t,e){return new t({type:"never",...ce(e)})}function S$(t,e){return new t({type:"void",...ce(e)})}function k$(t,e){return new t({type:"date",...ce(e)})}function $$(t,e){return new t({type:"nan",...ce(e)})}function jo(t,e){return new CS({check:"less_than",...ce(e),value:t,inclusive:!1})}function Vn(t,e){return new CS({check:"less_than",...ce(e),value:t,inclusive:!0})}function No(t,e){return new AS({check:"greater_than",...ce(e),value:t,inclusive:!1})}function ln(t,e){return new AS({check:"greater_than",...ce(e),value:t,inclusive:!0})}function E$(t){return No(0,t)}function I$(t){return jo(0,t)}function P$(t){return Vn(0,t)}function T$(t){return ln(0,t)}function Ts(t,e){return new _4({check:"multiple_of",...ce(e),value:t})}function Os(t,e){return new w4({check:"max_size",...ce(e),maximum:t})}function Ro(t,e){return new S4({check:"min_size",...ce(e),minimum:t})}function il(t,e){return new k4({check:"size_equals",...ce(e),size:t})}function ol(t,e){return new $4({check:"max_length",...ce(e),maximum:t})}function _a(t,e){return new E4({check:"min_length",...ce(e),minimum:t})}function al(t,e){return new I4({check:"length_equals",...ce(e),length:t})}function op(t,e){return new P4({check:"string_format",format:"regex",...ce(e),pattern:t})}function ap(t){return new T4({check:"string_format",format:"lowercase",...ce(t)})}function sp(t){return new O4({check:"string_format",format:"uppercase",...ce(t)})}function cp(t,e){return new z4({check:"string_format",format:"includes",...ce(e),includes:t})}function lp(t,e){return new j4({check:"string_format",format:"starts_with",...ce(e),prefix:t})}function up(t,e){return new N4({check:"string_format",format:"ends_with",...ce(e),suffix:t})}function O$(t,e,r){return new R4({check:"property",property:t,schema:e,...ce(r)})}function dp(t,e){return new C4({check:"mime_type",mime:t,...ce(e)})}function po(t){return new A4({check:"overwrite",tx:t})}function pp(t){return po(e=>e.normalize(t))}function fp(){return po(t=>t.trim())}function mp(){return po(t=>t.toLowerCase())}function hp(){return po(t=>t.toUpperCase())}function Vg(){return po(t=>J0(t))}function KM(t,e,r){return new t({type:"array",element:e,...ce(r)})}function z$(t,e){return new t({type:"file",...ce(e)})}function j$(t,e,r){let n=ce(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function N$(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ce(r)})}function R$(t){let e=Gte(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(rl(n,r.value,e._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(rl(i))}},t(r.value,r)));return e}function Gte(t,e){let r=new Ut({check:"custom",...ce(e)});return r._zod.check=t,r}function C$(t){let e=new Ut({check:"describe"});return e._zod.onattach=[r=>{let n=cn.get(r)??{};cn.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function A$(t){let e=new Ut({check:"meta"});return e._zod.onattach=[r=>{let n=cn.get(r)??{};cn.add(r,{...n,...t})}],e._zod.check=()=>{},e}function U$(t,e){let r=ce(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(n),a=new Set(i),s=t.Codec??tp,c=t.Boolean??Xd,l=t.String??Ps,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:d,transform:((p,m)=>{let v=p;return r.case!=="sensitive"&&(v=v.toLowerCase()),o.has(v)?!0:a.has(v)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function sl(t,e,r,n={}){let i=ce(n),o={...ce(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}var HM=P(()=>{pg();rp();Gk();we()});function cl(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??cn,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Nt(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,a);let s=t._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,u);else{let f=a.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,u)}let d=t._zod.parent;d&&(a.ref||(a.ref=d),Nt(d,e,u),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(a.schema,c),e.io==="input"&&un(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function ll(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let a of t.seen.entries()){let s=t.metadataRegistry.get(a[0])?.id;if(s){let c=n.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let i=a=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(a[0])?.id,f=t.external.uri??(m=>m);if(d)return{ref:f(d)};let p=a[1].defId??a[1].schema.id??`schema${t.counter++}`;return a[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${p}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,u=a[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:l+u}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=i(a);s.def={...s.schema},l&&(s.defId=l);let u=s.schema;for(let d in u)delete u[d];u.$ref=c};if(t.cycles==="throw")for(let a of t.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
94
+
95
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of t.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(t.external){let l=t.external.registry.get(a[0])?.id;if(e!==a[0]&&l){o(a);continue}}if(t.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&t.reused==="ref"){o(a);continue}}}function ul(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let s=t.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,l={...c},u=s.ref;if(s.ref=null,u){n(u);let f=t.seen.get(u),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,l),a._zod.parent===u)for(let v in c)v==="$ref"||v==="allOf"||v in l||delete c[v];if(p.$ref&&f.def)for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}let d=a._zod.parent;if(d&&d!==u){n(d);let f=t.seen.get(d);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let p in c)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(c[p])===JSON.stringify(f.def[p])&&delete c[p]}t.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.external?.defs??{};for(let a of t.seen.entries()){let s=a[1];s.def&&s.defId&&(o[s.defId]=s.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:gp(e,"input",t.processors),output:gp(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function un(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return un(n.element,r);if(n.type==="set")return un(n.valueType,r);if(n.type==="lazy")return un(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 un(n.innerType,r);if(n.type==="intersection")return un(n.left,r)||un(n.right,r);if(n.type==="record"||n.type==="map")return un(n.keyType,r)||un(n.valueType,r);if(n.type==="pipe")return un(n.in,r)||un(n.out,r);if(n.type==="object"){for(let i in n.shape)if(un(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(un(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(un(i,r))return!0;return!!(n.rest&&un(n.rest,r))}return!1}var QM,gp,vp=P(()=>{rp();QM=(t,e={})=>r=>{let n=cl({...r,processors:e});return Nt(t,n),ll(n,t),ul(n,t)},gp=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=cl({...i??{},target:o,io:e,processors:r});return Nt(t,a),ll(a,t),ul(a,t)}});function dl(t,e){if("_idmap"in t){let n=t,i=cl({...e,processors:D$}),o={};for(let c of n._idmap.entries()){let[l,u]=c;Nt(u,i)}let a={},s={registry:n,uri:e?.uri,defs:o};i.external=s;for(let c of n._idmap.entries()){let[l,u]=c;ll(i,u),a[l]=ul(i,u)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let r=cl({...e,processors:D$});return Nt(t,r),ll(r,t),ul(r,t)}var Kte,M$,L$,Z$,q$,F$,V$,W$,B$,G$,K$,H$,Q$,Y$,J$,X$,eE,tE,rE,nE,iE,oE,aE,sE,cE,lE,Wg,uE,dE,pE,fE,mE,hE,gE,vE,yE,_E,bE,Bg,xE,D$,pl=P(()=>{vp();we();Kte={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},M$=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:l}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=Kte[s]??s,i.format===""&&delete i.format,s==="time"&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},L$=(t,e,r,n)=>{let i=r,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof o=="number"&&(i.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof a=="number"&&(i.maximum=a,typeof l=="number"&&e.target!=="draft-04"&&(l<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},Z$=(t,e,r,n)=>{r.type="boolean"},q$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},F$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},V$=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},W$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},B$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},G$=(t,e,r,n)=>{r.not={}},K$=(t,e,r,n)=>{},H$=(t,e,r,n)=>{},Q$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Y$=(t,e,r,n)=>{let i=t._zod.def,o=Ud(i.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},J$=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let a of i.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},X$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},eE=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},tE=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=t._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(i,o)},rE=(t,e,r,n)=>{r.type="boolean"},nE=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},iE=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},oE=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aE=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},sE=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},cE=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:a,maximum:s}=t._zod.bag;typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Nt(o.element,e,{...n,path:[...n.path,"items"]})},lE=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let a=o.shape;for(let l in a)i.properties[l]=Nt(a[l],e,{...n,path:[...n.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let u=o.shape[l]._zod;return e.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Nt(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},Wg=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,a=i.options.map((s,c)=>Nt(s,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},uE=(t,e,r,n)=>{let i=t._zod.def,o=Nt(i.left,e,{...n,path:[...n.path,"allOf",0]}),a=Nt(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=c},dE=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,p)=>Nt(f,e,{...n,path:[...n.path,a,p]})),l=o.rest?Nt(o.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,l&&(i.items=l)):e.target==="openapi-3.0"?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(i.minItems=u),typeof d=="number"&&(i.maxItems=d)},pE=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=Nt(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=Nt(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Nt(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let l=a._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}},fE=(t,e,r,n)=>{let i=t._zod.def,o=Nt(i.innerType,e,n),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},mE=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},hE=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},gE=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},vE=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},yE=(t,e,r,n)=>{let i=t._zod.def,o=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Nt(o,e,n);let a=e.seen.get(t);a.ref=o},_E=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0},bE=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},Bg=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},xE=(t,e,r,n)=>{let i=t._zod.innerType;Nt(i,e,n);let o=e.seen.get(t);o.ref=i},D$={string:M$,number:L$,boolean:Z$,bigint:q$,symbol:F$,null:V$,undefined:W$,void:B$,never:G$,any:K$,unknown:H$,date:Q$,enum:Y$,literal:J$,nan:X$,template_literal:eE,file:tE,success:rE,custom:nE,function:iE,transform:oE,map:aE,set:sE,array:cE,object:lE,union:Wg,intersection:uE,tuple:dE,record:pE,nullable:fE,nonoptional:mE,default:hE,prefault:gE,catch:vE,pipe:yE,readonly:_E,promise:bE,optional:Bg,lazy:xE}});var YM=P(()=>{pl();vp()});var JM=P(()=>{});var dr=P(()=>{Xc();aS();oS();Gk();pg();DS();we();dg();Sg();rp();US();HM();vp();pl();YM();JM()});var Gg={};Ln(Gg,{endsWith:()=>up,gt:()=>No,gte:()=>ln,includes:()=>cp,length:()=>al,lowercase:()=>ap,lt:()=>jo,lte:()=>Vn,maxLength:()=>ol,maxSize:()=>Os,mime:()=>dp,minLength:()=>_a,minSize:()=>Ro,multipleOf:()=>Ts,negative:()=>I$,nonnegative:()=>T$,nonpositive:()=>P$,normalize:()=>pp,overwrite:()=>po,positive:()=>E$,property:()=>O$,regex:()=>op,size:()=>il,slugify:()=>Vg,startsWith:()=>lp,toLowerCase:()=>mp,toUpperCase:()=>hp,trim:()=>fp,uppercase:()=>sp});var Kg=P(()=>{dr()});var zs={};Ln(zs,{ZodISODate:()=>kE,ZodISODateTime:()=>wE,ZodISODuration:()=>PE,ZodISOTime:()=>EE,date:()=>$E,datetime:()=>SE,duration:()=>TE,time:()=>IE});function SE(t){return n$(wE,t)}function $E(t){return i$(kE,t)}function IE(t){return o$(EE,t)}function TE(t){return a$(PE,t)}var wE,kE,EE,PE,yp=P(()=>{dr();bp();wE=C("ZodISODateTime",(t,e)=>{YS.init(t,e),Dt.init(t,e)});kE=C("ZodISODate",(t,e)=>{JS.init(t,e),Dt.init(t,e)});EE=C("ZodISOTime",(t,e)=>{XS.init(t,e),Dt.init(t,e)});PE=C("ZodISODuration",(t,e)=>{ek.init(t,e),Dt.init(t,e)})});var XM,IMe,Wn,OE=P(()=>{dr();dr();we();XM=(t,e)=>{ag.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>cg(t,r)},flatten:{value:r=>sg(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,el,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,el,2)}},isEmpty:{get(){return t.issues.length===0}}})},IMe=C("ZodError",XM),Wn=C("ZodError",XM,{Parent:Error})});var eL,tL,rL,nL,iL,oL,aL,sL,cL,lL,uL,dL,zE=P(()=>{dr();OE();eL=Fd(Wn),tL=Wd(Wn),rL=Gd(Wn),nL=Kd(Wn),iL=a4(Wn),oL=s4(Wn),aL=c4(Wn),sL=l4(Wn),cL=u4(Wn),lL=d4(Wn),uL=p4(Wn),dL=f4(Wn)});var _p={};Ln(_p,{ZodAny:()=>gL,ZodArray:()=>bL,ZodBase64:()=>BE,ZodBase64URL:()=>GE,ZodBigInt:()=>rv,ZodBigIntFormat:()=>QE,ZodBoolean:()=>tv,ZodCIDRv4:()=>VE,ZodCIDRv6:()=>WE,ZodCUID:()=>UE,ZodCUID2:()=>DE,ZodCatch:()=>LL,ZodCodec:()=>nI,ZodCustom:()=>cv,ZodCustomStringFormat:()=>wp,ZodDate:()=>JE,ZodDefault:()=>RL,ZodDiscriminatedUnion:()=>wL,ZodE164:()=>KE,ZodEmail:()=>RE,ZodEmoji:()=>CE,ZodEnum:()=>xp,ZodExactOptional:()=>zL,ZodFile:()=>TL,ZodFunction:()=>HL,ZodGUID:()=>Hg,ZodIPv4:()=>qE,ZodIPv6:()=>FE,ZodIntersection:()=>SL,ZodJWT:()=>HE,ZodKSUID:()=>ZE,ZodLazy:()=>BL,ZodLiteral:()=>PL,ZodMAC:()=>pL,ZodMap:()=>EL,ZodNaN:()=>qL,ZodNanoID:()=>AE,ZodNever:()=>yL,ZodNonOptional:()=>tI,ZodNull:()=>hL,ZodNullable:()=>NL,ZodNumber:()=>ev,ZodNumberFormat:()=>fl,ZodObject:()=>iv,ZodOptional:()=>eI,ZodPipe:()=>rI,ZodPrefault:()=>AL,ZodPromise:()=>KL,ZodReadonly:()=>FL,ZodRecord:()=>sv,ZodSet:()=>IL,ZodString:()=>Jg,ZodStringFormat:()=>Dt,ZodSuccess:()=>ML,ZodSymbol:()=>fL,ZodTemplateLiteral:()=>WL,ZodTransform:()=>OL,ZodTuple:()=>kL,ZodType:()=>Ke,ZodULID:()=>ME,ZodURL:()=>Xg,ZodUUID:()=>Co,ZodUndefined:()=>mL,ZodUnion:()=>ov,ZodUnknown:()=>vL,ZodVoid:()=>_L,ZodXID:()=>LE,ZodXor:()=>xL,_ZodString:()=>NE,_default:()=>CL,_function:()=>Jre,any:()=>Rre,array:()=>ot,base64:()=>vre,base64url:()=>yre,bigint:()=>Tre,boolean:()=>yr,catch:()=>ZL,check:()=>Xre,cidrv4:()=>hre,cidrv6:()=>gre,codec:()=>Hre,cuid:()=>sre,cuid2:()=>cre,custom:()=>iI,date:()=>Are,describe:()=>ene,discriminatedUnion:()=>av,e164:()=>_re,email:()=>Yte,emoji:()=>ore,enum:()=>Br,exactOptional:()=>jL,file:()=>Wre,float32:()=>$re,float64:()=>Ere,function:()=>Jre,guid:()=>Jte,hash:()=>kre,hex:()=>Sre,hostname:()=>wre,httpUrl:()=>ire,instanceof:()=>rne,int:()=>jE,int32:()=>Ire,int64:()=>Ore,intersection:()=>Sp,ipv4:()=>pre,ipv6:()=>mre,json:()=>ine,jwt:()=>bre,keyof:()=>Ure,ksuid:()=>dre,lazy:()=>GL,literal:()=>Se,looseObject:()=>Wr,looseRecord:()=>Zre,mac:()=>fre,map:()=>qre,meta:()=>tne,nan:()=>Kre,nanoid:()=>are,nativeEnum:()=>Vre,never:()=>YE,nonoptional:()=>DL,null:()=>nv,nullable:()=>Qg,nullish:()=>Bre,number:()=>Pt,object:()=>fe,optional:()=>Gt,partialRecord:()=>Lre,pipe:()=>Yg,prefault:()=>UL,preprocess:()=>lv,promise:()=>Yre,readonly:()=>VL,record:()=>Rt,refine:()=>QL,set:()=>Fre,strictObject:()=>Dre,string:()=>G,stringFormat:()=>xre,stringbool:()=>nne,success:()=>Gre,superRefine:()=>YL,symbol:()=>jre,templateLiteral:()=>Qre,transform:()=>XE,tuple:()=>$L,uint32:()=>Pre,uint64:()=>zre,ulid:()=>lre,undefined:()=>Nre,union:()=>Lt,unknown:()=>Mt,url:()=>nre,uuid:()=>Xte,uuidv4:()=>ere,uuidv6:()=>tre,uuidv7:()=>rre,void:()=>Cre,xid:()=>ure,xor:()=>Mre});function G(t){return t$(Jg,t)}function Yte(t){return kg(RE,t)}function Jte(t){return np(Hg,t)}function Xte(t){return $g(Co,t)}function ere(t){return Eg(Co,t)}function tre(t){return Ig(Co,t)}function rre(t){return Pg(Co,t)}function nre(t){return ip(Xg,t)}function ire(t){return ip(Xg,{protocol:/^https?$/,hostname:pi.domain,...ee.normalizeParams(t)})}function ore(t){return Tg(CE,t)}function are(t){return Og(AE,t)}function sre(t){return zg(UE,t)}function cre(t){return jg(DE,t)}function lre(t){return Ng(ME,t)}function ure(t){return Rg(LE,t)}function dre(t){return Cg(ZE,t)}function pre(t){return Ag(qE,t)}function fre(t){return r$(pL,t)}function mre(t){return Ug(FE,t)}function hre(t){return Dg(VE,t)}function gre(t){return Mg(WE,t)}function vre(t){return Lg(BE,t)}function yre(t){return Zg(GE,t)}function _re(t){return qg(KE,t)}function bre(t){return Fg(HE,t)}function xre(t,e,r={}){return sl(wp,t,e,r)}function wre(t){return sl(wp,"hostname",pi.hostname,t)}function Sre(t){return sl(wp,"hex",pi.hex,t)}function kre(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=pi[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return sl(wp,n,i,e)}function Pt(t){return s$(ev,t)}function jE(t){return c$(fl,t)}function $re(t){return l$(fl,t)}function Ere(t){return u$(fl,t)}function Ire(t){return d$(fl,t)}function Pre(t){return p$(fl,t)}function yr(t){return f$(tv,t)}function Tre(t){return m$(rv,t)}function Ore(t){return h$(QE,t)}function zre(t){return g$(QE,t)}function jre(t){return v$(fL,t)}function Nre(t){return y$(mL,t)}function nv(t){return _$(hL,t)}function Rre(){return b$(gL)}function Mt(){return x$(vL)}function YE(t){return w$(yL,t)}function Cre(t){return S$(_L,t)}function Are(t){return k$(JE,t)}function ot(t,e){return KM(bL,t,e)}function Ure(t){let e=t._zod.def.shape;return Br(Object.keys(e))}function fe(t,e){let r={type:"object",shape:t??{},...ee.normalizeParams(e)};return new iv(r)}function Dre(t,e){return new iv({type:"object",shape:t,catchall:YE(),...ee.normalizeParams(e)})}function Wr(t,e){return new iv({type:"object",shape:t,catchall:Mt(),...ee.normalizeParams(e)})}function Lt(t,e){return new ov({type:"union",options:t,...ee.normalizeParams(e)})}function Mre(t,e){return new xL({type:"union",options:t,inclusive:!1,...ee.normalizeParams(e)})}function av(t,e,r){return new wL({type:"union",options:e,discriminator:t,...ee.normalizeParams(r)})}function Sp(t,e){return new SL({type:"intersection",left:t,right:e})}function $L(t,e,r){let n=e instanceof Ze,i=n?r:e,o=n?e:null;return new kL({type:"tuple",items:t,rest:o,...ee.normalizeParams(i)})}function Rt(t,e,r){return new sv({type:"record",keyType:t,valueType:e,...ee.normalizeParams(r)})}function Lre(t,e,r){let n=sn(t);return n._zod.values=void 0,new sv({type:"record",keyType:n,valueType:e,...ee.normalizeParams(r)})}function Zre(t,e,r){return new sv({type:"record",keyType:t,valueType:e,mode:"loose",...ee.normalizeParams(r)})}function qre(t,e,r){return new EL({type:"map",keyType:t,valueType:e,...ee.normalizeParams(r)})}function Fre(t,e){return new IL({type:"set",valueType:t,...ee.normalizeParams(e)})}function Br(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new xp({type:"enum",entries:r,...ee.normalizeParams(e)})}function Vre(t,e){return new xp({type:"enum",entries:t,...ee.normalizeParams(e)})}function Se(t,e){return new PL({type:"literal",values:Array.isArray(t)?t:[t],...ee.normalizeParams(e)})}function Wre(t){return z$(TL,t)}function XE(t){return new OL({type:"transform",transform:t})}function Gt(t){return new eI({type:"optional",innerType:t})}function jL(t){return new zL({type:"optional",innerType:t})}function Qg(t){return new NL({type:"nullable",innerType:t})}function Bre(t){return Gt(Qg(t))}function CL(t,e){return new RL({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():ee.shallowClone(e)}})}function UL(t,e){return new AL({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():ee.shallowClone(e)}})}function DL(t,e){return new tI({type:"nonoptional",innerType:t,...ee.normalizeParams(e)})}function Gre(t){return new ML({type:"success",innerType:t})}function ZL(t,e){return new LL({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function Kre(t){return $$(qL,t)}function Yg(t,e){return new rI({type:"pipe",in:t,out:e})}function Hre(t,e,r){return new nI({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function VL(t){return new FL({type:"readonly",innerType:t})}function Qre(t,e){return new WL({type:"template_literal",parts:t,...ee.normalizeParams(e)})}function GL(t){return new BL({type:"lazy",getter:t})}function Yre(t){return new KL({type:"promise",innerType:t})}function Jre(t){return new HL({type:"function",input:Array.isArray(t?.input)?$L(t?.input):t?.input??ot(Mt()),output:t?.output??Mt()})}function Xre(t){let e=new Ut({check:"custom"});return e._zod.check=t,e}function iI(t,e){return j$(cv,t??(()=>!0),e)}function QL(t,e={}){return N$(cv,t,e)}function YL(t){return R$(t)}function rne(t,e={}){let r=new cv({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ee.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function ine(t){let e=GL(()=>Lt([G(t),Pt(),yr(),nv(),ot(e),Rt(G(),e)]));return e}function lv(t,e){return Yg(XE(t),e)}var Ke,NE,Jg,Dt,RE,Hg,Co,Xg,CE,AE,UE,DE,ME,LE,ZE,qE,pL,FE,VE,WE,BE,GE,KE,HE,wp,ev,fl,tv,rv,QE,fL,mL,hL,gL,vL,yL,_L,JE,bL,iv,ov,xL,wL,SL,kL,sv,EL,IL,xp,PL,TL,OL,eI,zL,NL,RL,AL,tI,ML,LL,qL,rI,nI,FL,WL,BL,KL,HL,cv,ene,tne,nne,bp=P(()=>{dr();dr();pl();vp();Kg();yp();zE();Ke=C("ZodType",(t,e)=>(Ze.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:gp(t,"input"),output:gp(t,"output")}}),t.toJSONSchema=QM(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(ee.mergeDefs(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>sn(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>eL(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>rL(t,r,n),t.parseAsync=async(r,n)=>tL(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>nL(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>iL(t,r,n),t.decode=(r,n)=>oL(t,r,n),t.encodeAsync=async(r,n)=>aL(t,r,n),t.decodeAsync=async(r,n)=>sL(t,r,n),t.safeEncode=(r,n)=>cL(t,r,n),t.safeDecode=(r,n)=>lL(t,r,n),t.safeEncodeAsync=async(r,n)=>uL(t,r,n),t.safeDecodeAsync=async(r,n)=>dL(t,r,n),t.refine=(r,n)=>t.check(QL(r,n)),t.superRefine=r=>t.check(YL(r)),t.overwrite=r=>t.check(po(r)),t.optional=()=>Gt(t),t.exactOptional=()=>jL(t),t.nullable=()=>Qg(t),t.nullish=()=>Gt(Qg(t)),t.nonoptional=r=>DL(t,r),t.array=()=>ot(t),t.or=r=>Lt([t,r]),t.and=r=>Sp(t,r),t.transform=r=>Yg(t,XE(r)),t.default=r=>CL(t,r),t.prefault=r=>UL(t,r),t.catch=r=>ZL(t,r),t.pipe=r=>Yg(t,r),t.readonly=()=>VL(t),t.describe=r=>{let n=t.clone();return cn.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return cn.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return cn.get(t);let n=t.clone();return cn.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),NE=C("_ZodString",(t,e)=>{Ps.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,o)=>M$(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(op(...n)),t.includes=(...n)=>t.check(cp(...n)),t.startsWith=(...n)=>t.check(lp(...n)),t.endsWith=(...n)=>t.check(up(...n)),t.min=(...n)=>t.check(_a(...n)),t.max=(...n)=>t.check(ol(...n)),t.length=(...n)=>t.check(al(...n)),t.nonempty=(...n)=>t.check(_a(1,...n)),t.lowercase=n=>t.check(ap(n)),t.uppercase=n=>t.check(sp(n)),t.trim=()=>t.check(fp()),t.normalize=(...n)=>t.check(pp(...n)),t.toLowerCase=()=>t.check(mp()),t.toUpperCase=()=>t.check(hp()),t.slugify=()=>t.check(Vg())}),Jg=C("ZodString",(t,e)=>{Ps.init(t,e),NE.init(t,e),t.email=r=>t.check(kg(RE,r)),t.url=r=>t.check(ip(Xg,r)),t.jwt=r=>t.check(Fg(HE,r)),t.emoji=r=>t.check(Tg(CE,r)),t.guid=r=>t.check(np(Hg,r)),t.uuid=r=>t.check($g(Co,r)),t.uuidv4=r=>t.check(Eg(Co,r)),t.uuidv6=r=>t.check(Ig(Co,r)),t.uuidv7=r=>t.check(Pg(Co,r)),t.nanoid=r=>t.check(Og(AE,r)),t.guid=r=>t.check(np(Hg,r)),t.cuid=r=>t.check(zg(UE,r)),t.cuid2=r=>t.check(jg(DE,r)),t.ulid=r=>t.check(Ng(ME,r)),t.base64=r=>t.check(Lg(BE,r)),t.base64url=r=>t.check(Zg(GE,r)),t.xid=r=>t.check(Rg(LE,r)),t.ksuid=r=>t.check(Cg(ZE,r)),t.ipv4=r=>t.check(Ag(qE,r)),t.ipv6=r=>t.check(Ug(FE,r)),t.cidrv4=r=>t.check(Dg(VE,r)),t.cidrv6=r=>t.check(Mg(WE,r)),t.e164=r=>t.check(qg(KE,r)),t.datetime=r=>t.check(SE(r)),t.date=r=>t.check($E(r)),t.time=r=>t.check(IE(r)),t.duration=r=>t.check(TE(r))});Dt=C("ZodStringFormat",(t,e)=>{jt.init(t,e),NE.init(t,e)}),RE=C("ZodEmail",(t,e)=>{qS.init(t,e),Dt.init(t,e)});Hg=C("ZodGUID",(t,e)=>{LS.init(t,e),Dt.init(t,e)});Co=C("ZodUUID",(t,e)=>{ZS.init(t,e),Dt.init(t,e)});Xg=C("ZodURL",(t,e)=>{FS.init(t,e),Dt.init(t,e)});CE=C("ZodEmoji",(t,e)=>{VS.init(t,e),Dt.init(t,e)});AE=C("ZodNanoID",(t,e)=>{WS.init(t,e),Dt.init(t,e)});UE=C("ZodCUID",(t,e)=>{BS.init(t,e),Dt.init(t,e)});DE=C("ZodCUID2",(t,e)=>{GS.init(t,e),Dt.init(t,e)});ME=C("ZodULID",(t,e)=>{KS.init(t,e),Dt.init(t,e)});LE=C("ZodXID",(t,e)=>{HS.init(t,e),Dt.init(t,e)});ZE=C("ZodKSUID",(t,e)=>{QS.init(t,e),Dt.init(t,e)});qE=C("ZodIPv4",(t,e)=>{tk.init(t,e),Dt.init(t,e)});pL=C("ZodMAC",(t,e)=>{nk.init(t,e),Dt.init(t,e)});FE=C("ZodIPv6",(t,e)=>{rk.init(t,e),Dt.init(t,e)});VE=C("ZodCIDRv4",(t,e)=>{ik.init(t,e),Dt.init(t,e)});WE=C("ZodCIDRv6",(t,e)=>{ok.init(t,e),Dt.init(t,e)});BE=C("ZodBase64",(t,e)=>{ak.init(t,e),Dt.init(t,e)});GE=C("ZodBase64URL",(t,e)=>{sk.init(t,e),Dt.init(t,e)});KE=C("ZodE164",(t,e)=>{ck.init(t,e),Dt.init(t,e)});HE=C("ZodJWT",(t,e)=>{lk.init(t,e),Dt.init(t,e)});wp=C("ZodCustomStringFormat",(t,e)=>{uk.init(t,e),Dt.init(t,e)});ev=C("ZodNumber",(t,e)=>{_g.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,o)=>L$(t,n,i,o),t.gt=(n,i)=>t.check(No(n,i)),t.gte=(n,i)=>t.check(ln(n,i)),t.min=(n,i)=>t.check(ln(n,i)),t.lt=(n,i)=>t.check(jo(n,i)),t.lte=(n,i)=>t.check(Vn(n,i)),t.max=(n,i)=>t.check(Vn(n,i)),t.int=n=>t.check(jE(n)),t.safe=n=>t.check(jE(n)),t.positive=n=>t.check(No(0,n)),t.nonnegative=n=>t.check(ln(0,n)),t.negative=n=>t.check(jo(0,n)),t.nonpositive=n=>t.check(Vn(0,n)),t.multipleOf=(n,i)=>t.check(Ts(n,i)),t.step=(n,i)=>t.check(Ts(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});fl=C("ZodNumberFormat",(t,e)=>{dk.init(t,e),ev.init(t,e)});tv=C("ZodBoolean",(t,e)=>{Xd.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Z$(t,r,n,i)});rv=C("ZodBigInt",(t,e)=>{bg.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,o)=>q$(t,n,i,o),t.gte=(n,i)=>t.check(ln(n,i)),t.min=(n,i)=>t.check(ln(n,i)),t.gt=(n,i)=>t.check(No(n,i)),t.gte=(n,i)=>t.check(ln(n,i)),t.min=(n,i)=>t.check(ln(n,i)),t.lt=(n,i)=>t.check(jo(n,i)),t.lte=(n,i)=>t.check(Vn(n,i)),t.max=(n,i)=>t.check(Vn(n,i)),t.positive=n=>t.check(No(BigInt(0),n)),t.negative=n=>t.check(jo(BigInt(0),n)),t.nonpositive=n=>t.check(Vn(BigInt(0),n)),t.nonnegative=n=>t.check(ln(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Ts(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});QE=C("ZodBigIntFormat",(t,e)=>{pk.init(t,e),rv.init(t,e)});fL=C("ZodSymbol",(t,e)=>{fk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>F$(t,r,n,i)});mL=C("ZodUndefined",(t,e)=>{mk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>W$(t,r,n,i)});hL=C("ZodNull",(t,e)=>{hk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>V$(t,r,n,i)});gL=C("ZodAny",(t,e)=>{gk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>K$(t,r,n,i)});vL=C("ZodUnknown",(t,e)=>{vk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>H$(t,r,n,i)});yL=C("ZodNever",(t,e)=>{yk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>G$(t,r,n,i)});_L=C("ZodVoid",(t,e)=>{_k.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>B$(t,r,n,i)});JE=C("ZodDate",(t,e)=>{bk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Q$(t,n,i,o),t.min=(n,i)=>t.check(ln(n,i)),t.max=(n,i)=>t.check(Vn(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});bL=C("ZodArray",(t,e)=>{xk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>cE(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(_a(r,n)),t.nonempty=r=>t.check(_a(1,r)),t.max=(r,n)=>t.check(ol(r,n)),t.length=(r,n)=>t.check(al(r,n)),t.unwrap=()=>t.element});iv=C("ZodObject",(t,e)=>{eM.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>lE(t,r,n,i),ee.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Br(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Mt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Mt()}),t.strict=()=>t.clone({...t._zod.def,catchall:YE()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>ee.extend(t,r),t.safeExtend=r=>ee.safeExtend(t,r),t.merge=r=>ee.merge(t,r),t.pick=r=>ee.pick(t,r),t.omit=r=>ee.omit(t,r),t.partial=(...r)=>ee.partial(eI,t,r[0]),t.required=(...r)=>ee.required(tI,t,r[0])});ov=C("ZodUnion",(t,e)=>{ep.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Wg(t,r,n,i),t.options=e.options});xL=C("ZodXor",(t,e)=>{ov.init(t,e),wk.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Wg(t,r,n,i),t.options=e.options});wL=C("ZodDiscriminatedUnion",(t,e)=>{ov.init(t,e),Sk.init(t,e)});SL=C("ZodIntersection",(t,e)=>{kk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>uE(t,r,n,i)});kL=C("ZodTuple",(t,e)=>{xg.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>dE(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});sv=C("ZodRecord",(t,e)=>{$k.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>pE(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});EL=C("ZodMap",(t,e)=>{Ek.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>aE(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ro(...r)),t.nonempty=r=>t.check(Ro(1,r)),t.max=(...r)=>t.check(Os(...r)),t.size=(...r)=>t.check(il(...r))});IL=C("ZodSet",(t,e)=>{Ik.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sE(t,r,n,i),t.min=(...r)=>t.check(Ro(...r)),t.nonempty=r=>t.check(Ro(1,r)),t.max=(...r)=>t.check(Os(...r)),t.size=(...r)=>t.check(il(...r))});xp=C("ZodEnum",(t,e)=>{Pk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(n,i,o)=>Y$(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...e,checks:[],...ee.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new xp({...e,checks:[],...ee.normalizeParams(i),entries:o})}});PL=C("ZodLiteral",(t,e)=>{Tk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>J$(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});TL=C("ZodFile",(t,e)=>{Ok.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>tE(t,r,n,i),t.min=(r,n)=>t.check(Ro(r,n)),t.max=(r,n)=>t.check(Os(r,n)),t.mime=(r,n)=>t.check(dp(Array.isArray(r)?r:[r],n))});OL=C("ZodTransform",(t,e)=>{zk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>oE(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new $s(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ee.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),r.issues.push(ee.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});eI=C("ZodOptional",(t,e)=>{wg.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Bg(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});zL=C("ZodExactOptional",(t,e)=>{jk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Bg(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});NL=C("ZodNullable",(t,e)=>{Nk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>fE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});RL=C("ZodDefault",(t,e)=>{Rk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>hE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});AL=C("ZodPrefault",(t,e)=>{Ck.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>gE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});tI=C("ZodNonOptional",(t,e)=>{Ak.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>mE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});ML=C("ZodSuccess",(t,e)=>{Uk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>rE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});LL=C("ZodCatch",(t,e)=>{Dk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>vE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});qL=C("ZodNaN",(t,e)=>{Mk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>X$(t,r,n,i)});rI=C("ZodPipe",(t,e)=>{Lk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>yE(t,r,n,i),t.in=e.in,t.out=e.out});nI=C("ZodCodec",(t,e)=>{rI.init(t,e),tp.init(t,e)});FL=C("ZodReadonly",(t,e)=>{Zk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>_E(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});WL=C("ZodTemplateLiteral",(t,e)=>{qk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>eE(t,r,n,i)});BL=C("ZodLazy",(t,e)=>{Wk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xE(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});KL=C("ZodPromise",(t,e)=>{Vk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});HL=C("ZodFunction",(t,e)=>{Fk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>iE(t,r,n,i)});cv=C("ZodCustom",(t,e)=>{Bk.init(t,e),Ke.init(t,e),t._zod.processJSONSchema=(r,n,i)=>nE(t,r,n,i)});ene=C$,tne=A$;nne=(...t)=>U$({Codec:nI,Boolean:tv,String:Jg},...t)});var JL,e2=P(()=>{dr();dr();JL||(JL={})});var CMe,t2=P(()=>{rp();Kg();yp();bp();CMe={..._p,...Gg,iso:zs}});var r2=P(()=>{dr();bp()});var kp=P(()=>{dr();bp();Kg();OE();zE();e2();dr();Hk();dr();pl();t2();Sg();yp();yp();r2();br(Kk())});var i2=P(()=>{kp();kp()});import{homedir as gne}from"os";import{join as vne}from"path";import{existsSync as yne,readFileSync as _ne}from"fs";function bne(){if(process.env.OPENAI_PROXY_TOKEN)return Z.debug("[Auth] Using OPENAI_PROXY_TOKEN (ECS execution)"),process.env.OPENAI_PROXY_TOKEN;if(process.env.ZIBBY_USER_TOKEN)return Z.debug("[Auth] Using ZIBBY_USER_TOKEN (CI/CD PAT)"),process.env.ZIBBY_USER_TOKEN;try{let t=vne(gne(),".zibby","config.json");if(yne(t)){let e=JSON.parse(_ne(t,"utf-8"));if(e.sessionToken)return Z.debug("[Auth] Using session token from zibby login"),e.sessionToken}}catch(t){Z.debug(`[Auth] Could not read zibby login session: ${t.message}`)}return null}function xne(){return process.env.OPENAI_PROXY_URL?process.env.OPENAI_PROXY_URL.replace(/\/v1\/?$/,""):"https://api-prod.zibby.app/openai-proxy"}function ml(t){if(!(typeof t!="object"||t===null)){if(Object.keys(t).length===0){t.type="object",t.additionalProperties=!0;return}if(t.type||(t.properties?t.type="object":t.items&&(t.type="array")),t.type==="object")if(t.properties){for(let[e,r]of Object.entries(t.properties))r.type==="object"&&r.additionalProperties&&r.additionalProperties!==!1&&(!r.properties||Object.keys(r.properties).length===0)&&(t.properties[e]={type:["object","null"]});t.additionalProperties=!1,t.required=Object.keys(t.properties),Object.values(t.properties).forEach(ml)}else"additionalProperties"in t||(t.additionalProperties=!0);t.type==="array"&&t.items&&ml(t.items),t.anyOf&&t.anyOf.forEach(ml),t.oneOf&&t.oneOf.forEach(ml),t.allOf&&t.allOf.forEach(ml)}}async function o2(t,e){Z.info("\u{1F527} [OpenAI Proxy] Formatting structured output...");let r=bne();if(!r)throw new Error("Authentication required for structured output processing.\n Local development: Run `zibby login`\n CI/CD: Set ZIBBY_USER_TOKEN environment variable (Personal Access Token from UI settings)");let n=xne();Z.info(`\u{1F517} Using OpenAI proxy: ${n}`);let i=dl(e),o=i;if(i.$ref&&i.definitions){let u=i.$ref.split("/").pop();o=i.definitions[u]||i,Z.debug(`Extracted schema from $ref: ${u}`)}delete o.$schema,ml(o);let a=4e5,s=t;t.length>a&&(Z.warn(`\u26A0\uFE0F [OpenAI Proxy] Raw text (${t.length} chars) exceeds limit, keeping last ${a} chars`),s=`... [truncated early content] ...
96
+ ${t.slice(-a)}`);let c=`Extract and format the following information into structured JSON matching the schema.
97
+
98
+ RAW CONTENT:
99
+ ${s}
100
+
101
+ Extract all relevant information and format it according to the schema. If any required fields are missing, do your best to infer them from the content.`,l={model:qr.OPENAI_POSTPROCESSING,messages:[{role:"user",content:c}],response_format:{type:"json_schema",json_schema:{name:"extract",schema:o,strict:!0}}};Z.info(`\u{1F4E4} Sending to OpenAI proxy: model=${qr.OPENAI_POSTPROCESSING}, schema keys=${Object.keys(o.properties||{}).join(", ")}`),Z.debug(` Schema size: ${JSON.stringify(o).length} chars`),Z.debug(` Prompt size: ${c.length} chars`);try{let u={"Content-Type":"application/json"};process.env.OPENAI_PROXY_TOKEN?(u["x-proxy-token"]=r,u["x-execution-id"]=process.env.EXECUTION_ID||""):(u.Authorization=`Bearer ${r}`,u["x-api-key"]=process.env.ZIBBY_API_KEY||"",u["x-execution-id"]=process.env.EXECUTION_ID||"");let f=(await rg.post(n,l,{headers:u,timeout:oh.OPENAI_REQUEST})).data?.choices?.[0]?.message?.content;if(!f)throw new Error("OpenAI proxy returned empty response");let p=JSON.parse(f);return Z.info("\u2705 Successfully formatted with OpenAI proxy"),{structured:p,raw:t}}catch(u){if(u.response){let d=u.response.status,f=u.response.data;throw Z.error(`\u274C OpenAI proxy request failed: ${d}`),Z.error(` Status: ${d}`),Z.error(` Response: ${JSON.stringify(f,null,2)}`),d===401||d===403?new Error(`Authentication failed for OpenAI proxy.
102
+ Run \`zibby login\` or set ZIBBY_USER_TOKEN environment variable.
103
+ Response: ${JSON.stringify(f)}`,{cause:u}):new Error(`Failed to format Cursor output: ${f?.error?.message||"Unknown error"}`,{cause:u})}throw Z.error(`\u274C OpenAI proxy request failed: ${u.message}`),new Error(`Failed to format output: ${u.message}`,{cause:u})}}var a2=P(()=>{KD();i2();ni();ra()});import{copyFileSync as wne,existsSync as oI,lstatSync as Sne,mkdirSync as s2,rmSync as kne,symlinkSync as $ne,unlinkSync as Ene}from"fs";import{join as Ao}from"path";import{homedir as Ine}from"os";import{randomBytes as Pne}from"crypto";function c2(t){return!(!t||typeof t!="string"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="1"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="true")}function l2(t){let e=Ao(t||process.cwd(),".zibby","tmp");s2(e,{recursive:!0});let r=`${process.pid}-${Date.now()}-${Pne(4).toString("hex")}`,n=Ao(e,`cursor-agent-home-${r}`),i=Ao(n,".cursor");s2(i,{recursive:!0});let o=Ine(),a=Ao(o,".cursor");if(oI(a))for(let s of Tne){let c=Ao(a,s);if(oI(c))try{wne(c,Ao(i,s))}catch{}}if(process.platform==="darwin"){let s=Ao(o,"Library");if(oI(s))try{$ne(s,Ao(n,"Library"))}catch{}}return n}function u2(t){if(!(!t||typeof t!="string"))try{let e=Ao(t,"Library");try{Sne(e).isSymbolicLink()&&Ene(e)}catch{}kne(t,{recursive:!0,force:!0})}catch{}}var Tne,d2=P(()=>{Tne=["cli-config.json","config.json","auth.json","argv.json"]});import{spawn as One,execSync as js}from"child_process";import{writeFileSync as p2,readFileSync as f2,mkdirSync as m2,existsSync as $p,accessSync as h2,constants as g2,unlinkSync as zne}from"fs";import{join as Mi,resolve as jne}from"path";import{homedir as Ep}from"os";var hl,v2=P(()=>{Ja();ni();ra();no();$o();rd();$w();a2();Ya();d2();hl=class extends rn{constructor(){super("cursor","Cursor (CLI)",100)}canHandle(e){let r=[Mi(Ep(),".local","bin","cursor-agent"),Mi(Ep(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"];for(let n of r)try{if(n.startsWith("/")){h2(n,g2.X_OK);let i=js(`"${n}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(i&&i.length>0)return Z.debug(`[Cursor] Found agent at: ${n} (version: ${i.trim().slice(0,50)})`),!0}else{let i=js(`which ${n}`,{encoding:"utf-8",timeout:2e3,stdio:"pipe"}).trim();if(!i)continue;let o=js(`${n} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(o&&o.length>0)return Z.debug(`[Cursor] Found '${n}' in PATH at ${i} (version: ${o.trim().slice(0,50)})`),!0}}catch{continue}return Z.warn("[Cursor] \u274C Cursor Agent CLI not found or not working. Run: agent --version"),!1}async invoke(e,r={}){let{workspace:n=process.cwd(),print:i=!1,schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:l=oh.CURSOR_AGENT_DEFAULT,config:u={}}=r,d=u?.agent?.strictMode||!1,f=r.model??u?.agent?.cursor?.model??qr.CURSOR;Z.debug(`[Cursor] Invoking (model: ${f}, timeout: ${l/1e3}s, skills: ${JSON.stringify(a)})`);let m=(this._setupMcpConfig(s,n,u,a,c)||{}).isolatedMcpHome??null,v=[Mi(Ep(),".local","bin","cursor-agent"),Mi(Ep(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"],g=null;for(let A of v)try{if(A.startsWith("/"))h2(A,g2.X_OK),js(`"${A}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});else{if(!js(`which ${A}`,{encoding:"utf-8",timeout:2e3}).trim())throw new Error("not in PATH");js(`${A} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"})}g=A,Z.debug(`[Agent] Using binary: ${A}`);break}catch(I){Z.debug(`[Agent] Binary '${A}' check failed: ${I.message}`);continue}if(!g)throw new Error(`Cursor Agent CLI not found or not working.
104
+
105
+ Checked paths:
106
+ ${v.map(A=>` - ${A}`).join(`
107
+ `)}
108
+
109
+ Install cursor-agent:
110
+ curl https://cursor.com/install -fsS | bash
111
+
112
+ Then add to PATH:
113
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
114
+
115
+ Test with: agent --version`);let h=null;if(o){let A=`zibby-result-${Date.now()}.json`;h=Mi(n,".zibby","tmp",A);let I=Mi(n,".zibby","tmp");$p(I)||m2(I,{recursive:!0});let U=Dc.generateFileOutputInstructions(o,h);e=`${e}
116
+
117
+ ${U}`}let y=process.env.CURSOR_API_KEY,_=y?` | key: ***${y.slice(-4)}`:" | key: not set";console.log(`
118
+ \u25C6 Model: ${f||"auto"}${_}
119
+ `);let b=(await import("chalk")).default;console.log(`
120
+ ${b.bold("Prompt sent to LLM:")}`),console.log(b.dim("\u2500".repeat(60))),console.log(b.dim(e)),console.log(b.dim("\u2500".repeat(60)));let x=["--print","--force","--approve-mcps","--output-format","stream-json","--stream-partial-output","--model",f||"auto"];if(process.env.CURSOR_API_KEY&&x.push("--api-key",process.env.CURSOR_API_KEY),x.push(e),Z.debug(`[Agent] Prompt: ${e.length} chars, model: ${f||"auto"}`),Z.debug(`[Agent] Workspace: ${n}`),process.env.LOG_LEVEL==="debug"||process.env.ZIBBY_LOG_CURSOR_CLI==="1")try{console.log(`\u{1F527} Cursor CLI --model ${f||"auto"} (from .zibby.config.js agent.cursor.model)
121
+ `)}catch{}let w,S=null;try{let A=s||(process.env.ZIBBY_SESSION_PATH?String(process.env.ZIBBY_SESSION_PATH).trim():null);w=await this._spawnWithStreaming(g,x,n,l,null,A,m)}catch(A){S=A}let $=w?.stdout||"";if(o){let A=typeof o.parse=="function",I=null,U=!!(h&&$p(h));if(h&&Z.info(`[Agent] Result file: ${U?"present":"missing"} at ${h}`),U)try{let N=f2(h,"utf-8").trim();I=JSON.parse(N),Z.info(`[Agent] Parsed JSON from result file OK (${N.length} chars) \u2192 object ready for validation`),S&&Z.debug("[Agent] Agent exited non-zero but result file was written \u2014 recovering")}catch(N){Z.warn(`\u26A0\uFE0F [Agent] Result file exists on disk but is not valid JSON: ${N.message}`)}else if(S)Z.warn(`[Agent] Result file missing at ${h} (agent process error \u2014 may still recover if strictMode repairs)`);else throw Z.error(`\u274C [Agent] Result file was never created at ${h}`),new Error(`Agent did not write required result file at ${h}`);if(I&&A)try{let N=o.parse(I);return Z.info("\u2705 [Agent] Zod validation passed for structured result file"),d&&Z.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:N}}catch(N){Z.warn(`\u26A0\uFE0F [Agent] JSON parsed but Zod rejected it (wrong types/shape): ${N.message?.slice(0,400)}`)}else{if(I)return Z.info("\u2705 [Agent] File-based output extracted (no Zod parse fn) \u2014 accepting as structured"),d&&Z.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:I};U&&Z.error("\u274C [Agent] Result file exists but produced no in-memory JSON (parse failed earlier)")}if(d&&!S){let N=w.parsedText,Y=I?JSON.stringify(I):N;Z.info(`[Agent] strictMode: calling OpenAI proxy to fix structured output (${Y.length} chars in)`);try{let H=await o2(Y,o);if(A){let ye=o.parse(H.structured);return Z.info("\u2705 [Agent] Proxy output passed Zod validation"),{raw:$,structured:ye}}return{raw:$,...H}}catch(H){if(Z.warn(`\u26A0\uFE0F [Agent] strictMode proxy failed: ${H.message}`),I)return Z.warn("[Agent] Using agent's original result file as fallback"),{raw:$,structured:I}}}if(S)throw S;let L=U?I==null?"file existed but JSON.parse failed \u2014 see WARN log above":A?"JSON was valid but Zod validation failed \u2014 see WARN log above":"no structured object after read (unexpected)":"file never appeared (agent may not have run Write tool to the path above)";throw Z.error(`\u274C [Agent] No validated structured output: ${L}`),Z.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error(`Agent did not produce a valid result file at ${h}. Enable strictMode for proxy fallback.`)}if(S)throw S;return this._extractFinalResult($)||w?.parsedText||$}_extractFinalResult(e){if(!e)return null;let r=e.split(`
122
+ `),n=null;for(let i of r){let o=i.trim();if(o)try{let a=JSON.parse(o);if(a.type==="assistant"&&a.message?.content){let s=a.message.content;if(Array.isArray(s)){let c=s.filter(l=>l.type==="text"&&l.text).map(l=>l.text).join("");c&&(n=c)}else typeof s=="string"&&s&&(n=s)}}catch{}}return n?.trim()||null}_setupMcpConfig(e,r,n,i=null,o=null){let a=n?.headless,s=Mi(Ep(),".cursor"),c=Mi(s,"mcp.json"),l={};if($p(c))try{l=JSON.parse(f2(c,"utf-8"))}catch{}let u=l.mcpServers||{},d=n?.paths?.output||ir,f=Mi(r||process.cwd(),d,Oi),p=Array.isArray(i)?i.map(g=>Fr(g)).filter(Boolean):[...ah()].map(([,g])=>g),m=new Set;for(let g of p)typeof g.resolve=="function"&&(m.has(g.serverName)||(m.add(g.serverName),this._ensureSkillConfigured(u,g,e,f,o,a)));if(e){let g=Fr("browser");g&&typeof g.resolve=="function"&&!m.has(g.serverName)&&this._ensureSkillConfigured(u,g,e,f,"execute_live",a)}if(Object.keys(u).length===0)return Z.debug("[MCP] No MCP servers configured - agent will run without tool access"),{isolatedMcpHome:null};let v=`${JSON.stringify({mcpServers:u},null,2)}
123
+ `;if(c2(e)){let g=l2(r||process.cwd()),h=Mi(g,".cursor","mcp.json");return p2(h,v,"utf8"),Z.debug(`[MCP] Isolated cursor-agent HOME (session-scoped mcp.json): ${g} | servers: ${Object.keys(u).join(", ")}`),{isolatedMcpHome:g}}return $p(s)||m2(s,{recursive:!0}),p2(c,v,"utf8"),Z.debug(`[MCP] Global ~/.cursor/mcp.json | servers: ${Object.keys(u).join(", ")}`),{isolatedMcpHome:null}}_ensureSkillConfigured(e,r,n,i,o=null,a){let s=r.cursorKey||r.serverName,c=e[s]?s:e[r.serverName]?r.serverName:null;if(c&&n){let u=typeof r.resolve=="function"?r.resolve({sessionPath:n,nodeName:o,headless:a}):null;u?.args?e[c].args=u.args:e[c].args=(e[c].args||[]).map(p=>p.startsWith("--output-dir=")?`--output-dir=${n}`:p);let d=u?.env||{},f=r.sessionEnvKey?{[r.sessionEnvKey]:i}:{};e[c].env={...e[c].env||{},...d,...f},Z.debug(`[MCP] Updated ${c} session \u2192 ${n}`);return}if(c)return;let l=r.resolve({sessionPath:n,nodeName:o,headless:a});l&&(e[s]={...l,...r.sessionEnvKey&&{env:{...l.env||{},[r.sessionEnvKey]:i}}},Z.debug(`[MCP] Configured ${s}`))}_spawnWithStreaming(e,r,n,i,o=null,a=null,s=null){return new Promise((c,l)=>{let u=Date.now(),d="",f="",p=Date.now(),m=0,v=!1,g=null,h=!1,y=!1,_=null;if(a)try{_=Mi(jne(String(a)),Jm)}catch{_=null}let b=!1,x=()=>{b||(b=!0,u2(s))},w={...process.env};s&&(w.HOME=s,process.platform==="win32"&&(w.USERPROFILE=s),Z.debug(`[Agent] cursor-agent HOME=${s} (isolated MCP config)`));let S=One(e,r,{cwd:n,shell:!1,stdio:["pipe","pipe","pipe"],env:w});Z.debug(`[Agent] PID: ${S.pid}`),S.stdin.on("error",N=>{N.code!=="EPIPE"&&Z.warn(`[Agent] stdin error: ${N.message}`)}),S.stdout.on("error",N=>{N.code!=="EPIPE"&&Z.warn(`[Agent] stdout error: ${N.message}`)}),S.stderr.on("error",N=>{N.code!=="EPIPE"&&Z.warn(`[Agent] stderr error: ${N.message}`)}),o?(S.stdin.write(o,N=>{N&&N.code!=="EPIPE"&&Z.warn(`[Agent] Failed to write to stdin: ${N.message}`),S.stdin.end()}),Z.debug(`[Agent] Prompt also piped to stdin (${o.length} chars)`)):S.stdin.end();let $=null;_&&($=setInterval(()=>{if(!(v||y))try{if($p(_)){v=!0,g="studio-stop";try{zne(_)}catch{}Z.warn("\u{1F6D1} Studio stop requested \u2014 terminating Cursor agent (and MCP browser session)"),S.kill("SIGTERM"),setTimeout(()=>{S.killed||S.kill("SIGKILL")},2e3)}}catch{}},600));let T=new Set,A=new Date(u).toISOString().replace(/\.\d+Z$/,""),I=setInterval(()=>{let N=Math.round((Date.now()-u)/1e3),Y=Math.round((Date.now()-p)/1e3),H=[];try{let Pe=Math.ceil(N/60)+1,ue=js(`find "${n}" -type f -mmin -${Pe} -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/target/*' 2>/dev/null | head -20`,{encoding:"utf-8",timeout:5e3}).trim();if(ue)for(let W of ue.split(`
124
+ `)){let E=W.replace(`${n}/`,"");T.has(E)||(T.add(E),H.push(E))}}catch{}let ye="";H.length>0&&(ye=` | \u{1F4C1} new: ${H.map(ue=>ue.split("/").pop()).join(", ")}`),T.size>0&&(ye+=` | \u{1F4E6} total: ${T.size} files`),Z.debug(`\u{1F493} [Agent] Running for ${N}s | ${m} lines output${ye}`),m===0&&N>=30&&T.size===0&&(N<35&&Z.warn(`\u26A0\uFE0F [Agent] No output after ${N}s \u2014 agent may be stuck. Check your CURSOR_API_KEY.`),N>=60&&(v=!0,g=g||"stall",Z.error(`\u274C [Agent] No response after ${N}s \u2014 killing. Verify CURSOR_API_KEY is valid and agent CLI works: agent --version`),S.kill("SIGTERM"),setTimeout(()=>{S.killed||S.kill("SIGKILL")},3e3)))},3e4),U=setTimeout(()=>{v=!0,g=g||"timeout";let N=Math.round((Date.now()-u)/1e3);Z.error(`\u23F1\uFE0F [Agent] Timeout after ${N}s \u2014 killing process (PID: ${S.pid})`),d.trim()&&Z.warn(`\u{1F4E4} [Agent] Partial output (${d.length} chars) before timeout:
125
+ ${d.slice(-2e3)}`),S.kill("SIGTERM"),setTimeout(()=>{S.killed||S.kill("SIGKILL")},5e3)},i),L=new io;L.onToolCall=(N,Y)=>{let H=N,ye=Y;if(N==="mcpToolCall"&&Y?.name)H=Y.name.replace(/^mcp_+[^_]+_+/,""),H.includes("-")&&H.split("-")[0]===H.split("-")[1]&&(H=H.split("-")[0]),ye=Y.args??Y.input??Y;else{if(N==="readToolCall"||N==="editToolCall"||N==="writeToolCall")return;(N.startsWith("mcp__")||N.includes("ToolCall"))&&(H=N.replace(/^mcp_+[^_]+_+/,"").replace(/ToolCall$/,""))}if(H.includes("memory")?Wt.stepMemory(`Tool: ${H}`):Wt.stepTool(`Tool: ${H}`),ye!=null&&typeof ye=="object"&&Object.keys(ye).length>0&&!y){let ue=JSON.stringify(ye),W=ue.length>100?`${ue.substring(0,100)}...`:ue;console.log(` Input: ${W}`)}},S.stdout.on("data",N=>{let Y=N.toString();d+=Y,p=Date.now(),h||(h=!0);let H=L.processChunk(Y);H&&!y&&process.stdout.write(H);let ye=Y.split(`
126
+ `).filter(Pe=>Pe.trim());m+=ye.length}),S.stderr.on("data",N=>{let Y=N.toString();f+=Y,p=Date.now(),h||(h=!0);let H=Y.split(`
127
+ `).filter(ye=>ye.trim());for(let ye of H)Z.warn(`\u26A0\uFE0F [Agent stderr] ${ye}`)}),S.on("close",(N,Y)=>{y=!0,x(),clearTimeout(U),clearInterval(I),$&&clearInterval($),L.flush();let H=Math.round((Date.now()-u)/1e3);if(Z.debug(`[Agent] Exited: code=${N}, signal=${Y}, elapsed=${H}s, output=${d.length} chars`),v){if(g==="studio-stop"){l(new Error("Stopped from Zibby Studio"));return}l(new Error(`Cursor Agent timed out after ${H}s (limit: ${i/1e3}s). ${m} lines produced. Last output ${Math.round((Date.now()-p)/1e3)}s ago. ${d.trim()?`
128
+ Partial output (last 500 chars):
129
+ ${d.slice(-500)}`:"No output captured."}`));return}if(N!==0){l(new Error(`Cursor Agent failed: exit code ${N}, signal ${Y}. ${f.trim()?`
130
+ Stderr: ${f.slice(-1e3)}`:""}${d.trim()?`
131
+ Stdout (last 500 chars): ${d.slice(-500)}`:""}`));return}let ye=L.getResult(),Pe=ye?JSON.stringify(ye,null,2):L.getRawText()||d||"";c({stdout:d||f||"",parsedText:Pe})}),S.on("error",N=>{x(),clearTimeout(U),clearInterval(I),$&&clearInterval($),l(new Error(`Cursor Agent spawn error: ${N.message}
132
+ Binary: ${e}
133
+ This usually means the binary is not in PATH. Try:
134
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc`))})})}}});import{execFile as Zie}from"child_process";import{randomUUID as qie}from"crypto";import{copyFile as Fie,mkdir as aI,readFile as Vie,rm as Wie,writeFile as Tv}from"fs/promises";import{createRequire as Bie}from"module";import{homedir as xI,tmpdir as Gie}from"os";import{dirname as _2,isAbsolute as CZ,join as Li,relative as Kie,resolve as Ov,sep as AZ}from"path";import{fileURLToPath as Hie}from"url";import{setMaxListeners as Qie}from"events";import{spawn as eoe}from"child_process";import{createInterface as toe}from"readline";import{homedir as Lae}from"os";import{join as Zae}from"path";import{randomUUID as zse}from"crypto";import{appendFile as jse,mkdir as Nse}from"fs/promises";import{join as Q2}from"path";import{realpathSync as Y2}from"fs";import{cwd as Cse}from"process";import{randomUUID as u6}from"crypto";import{appendFile as qse,mkdir as Fse,symlink as Vse,unlink as Wse}from"fs/promises";import{dirname as d6,join as p6}from"path";import*as qe from"fs";import{mkdir as Jse,open as Xse,readdir as ece,readFile as X2,rename as tce,rmdir as rce,rm as nce,stat as ice,unlink as oce}from"fs/promises";import{execFile as Ice}from"child_process";import{promisify as Pce}from"util";import{createHash as Cce}from"crypto";import{userInfo as Ace}from"os";function Une(t){return this[t]}function Zne(t,e){this[t]=Lne.bind(null,e)}function UZ(t=Yie){let e=new AbortController;return Qie(t,e.signal),e}function Jie(t,e,r){return new Promise((n,i)=>{if(e?.aborted){r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n();return}let o=setTimeout((s,c,l)=>{s?.removeEventListener("abort",c),l()},t,e,a,n);function a(){clearTimeout(o),r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n()}e?.addEventListener("abort",a,{once:!0}),r?.unref&&o.unref()})}function Xie(t,e){t(Error(e))}function sI(t,e,r){let n,i=new Promise((o,a)=>{n=setTimeout(Xie,e,a,r),typeof n=="object"&&n.unref?.()});return Promise.race([t,i]).finally(()=>{n!==void 0&&clearTimeout(n)})}function DZ(){return process.versions.bun!==void 0}function loe(t){var e=soe.call(t,Ip),r=t[Ip];try{t[Ip]=void 0;var n=!0}catch{}var i=coe.call(t);return n&&(e?t[Ip]=r:delete t[Ip]),i}function foe(t){return poe.call(t)}function voe(t){return t==null?t===void 0?goe:hoe:b2&&b2 in Object(t)?uoe(t):moe(t)}function _oe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function koe(t){if(!LZ(t))return!1;var e=yoe(t);return e==xoe||e==woe||e==boe||e==Soe}function Ioe(t){return!!x2&&x2 in t}function zoe(t){if(t!=null){try{return Ooe.call(t)}catch{}try{return t+""}catch{}}return""}function Loe(t){if(!LZ(t)||Poe(t))return!1;var e=$oe(t)?Moe:Roe;return e.test(joe(t))}function qoe(t,e){return t?.[e]}function Voe(t,e){var r=Foe(t,e);return Zoe(r)?r:void 0}function Boe(){this.__data__=Qp?Qp(null):{},this.size=0}function Koe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Xoe(t){var e=this.__data__;if(Qp){var r=e[t];return r===Qoe?void 0:r}return Joe.call(e,t)?e[t]:void 0}function nae(t){var e=this.__data__;return Qp?e[t]!==void 0:rae.call(e,t)}function aae(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Qp&&e===void 0?oae:e,this}function Bl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function cae(){this.__data__=[],this.size=0}function uae(t,e){return t===e||t!==t&&e!==e}function pae(t,e){for(var r=t.length;r--;)if(dae(t[r][0],e))return r;return-1}function hae(t){var e=this.__data__,r=Py(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():mae.call(e,r,1),--this.size,!0}function vae(t){var e=this.__data__,r=Py(e,t);return r<0?void 0:e[r][1]}function _ae(t){return Py(this.__data__,t)>-1}function xae(t,e){var r=this.__data__,n=Py(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Gl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Eae(){this.size=0,this.__data__={hash:new w2,map:new($ae||Sae),string:new w2}}function Pae(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Oae(t,e){var r=t.__data__;return Tae(e)?r[typeof e=="string"?"string":"hash"]:r.map}function zae(t){var e=Ty(this,t).delete(t);return this.size-=e?1:0,e}function Nae(t){return Ty(this,t).get(t)}function Cae(t){return Ty(this,t).has(t)}function Uae(t,e){var r=Ty(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Kl(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function XI(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Mae);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(XI.Cache||qZ),r}function Us(t){if(!t)return!1;if(typeof t=="boolean")return t;let e=String(t).toLowerCase().trim();return["1","true","yes","on"].includes(e)}function he(t,e,r,n,i){if(n==="m")throw TypeError("Private method is not writable");if(n==="a"&&!i)throw TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function F(t,e,r,n){if(r==="a"&&!n)throw TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Yp(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}function kI(t){return typeof t!="object"?{}:t??{}}function k2(t){if(!t)return!0;for(let e in t)return!1;return!0}function Vae(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Kae(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}function Qae(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:r}of t){let n=r.exec(navigator.userAgent);if(n){let i=n[1]||0,o=n[2]||0,a=n[3]||0;return{browser:e,version:`${i}.${o}.${a}`}}}return null}function Jae(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function WZ(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function BZ(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return WZ({start(){},async pull(r){let{done:n,value:i}=await e.next();n?r.close():r.enqueue(i)},async cancel(){await e.return?.()}})}function tP(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let r=await e.read();return r?.done&&e.releaseLock(),r}catch(r){throw e.releaseLock(),r}},async return(){let r=e.cancel();return e.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Xae(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),r=e.cancel();e.releaseLock(),await r}function tse(t){return Object.entries(t).filter(([e,r])=>typeof r<"u").map(([e,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(e)}=`;throw new Ue(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}function rse(t){let e=0;for(let i of t)e+=i.length;let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}function rP(t){let e;return(P2??(e=new globalThis.TextEncoder,P2=e.encode.bind(e)))(t)}function O2(t){let e;return(T2??(e=new globalThis.TextDecoder,T2=e.decode.bind(e)))(t)}function nse(t,e){for(let r=e??0;r<t.length;r++){if(t[r]===10)return{preceding:r,index:r+1,carriage:!1};if(t[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function ise(t){for(let e=0;e<t.length-1;e++){if(t[e]===10&&t[e+1]===10||t[e]===13&&t[e+1]===13)return e+2;if(t[e]===13&&t[e+1]===10&&e+3<t.length&&t[e+2]===13&&t[e+3]===10)return e+4}return-1}function Vp(){}function uv(t,e,r){return!e||Gv[t]>Gv[r]?Vp:e[t].bind(e)}function dn(t){let e=t.logger,r=t.logLevel??"off";if(!e)return ose;let n=j2.get(e);if(n&&n[0]===r)return n[1];let i={error:uv("error",e,r),warn:uv("warn",e,r),info:uv("info",e,r),debug:uv("debug",e,r)};return j2.set(e,[r,i]),i}async function*ase(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ue("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ue("Attempted to iterate over a response with no body");let r=new $I,n=new Ms,i=tP(t.body);for await(let o of sse(i))for(let a of n.decode(o)){let s=r.decode(a);s&&(yield s)}for(let o of n.flush()){let a=r.decode(o);a&&(yield a)}}async function*sse(t){let e=new Uint8Array;for await(let r of t){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?rP(r):r,i=new Uint8Array(e.length+n.length);i.set(e),i.set(n,e.length),e=i;let o;for(;(o=ise(e))!==-1;)yield e.slice(0,o),e=e.slice(o)}e.length>0&&(yield e)}function cse(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}async function GZ(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:i,startTime:o}=e,a=await(async()=>{if(e.options.stream)return dn(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller):Ls.fromSSEResponse(r,e.controller);if(r.status===204)return null;if(e.options.__binaryResponse)return r;let s=r.headers.get("content-type")?.split(";")[0]?.trim();if(s?.includes("application/json")||s?.endsWith("+json")){if(r.headers.get("content-length")==="0")return;let c=await r.json();return KZ(c,r)}return await r.text()})();return dn(t).debug(`[${n}] response parsed`,As({retryOfRequestLogID:i,url:r.url,status:r.status,body:a,durationMs:Date.now()-o})),a}function KZ(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}function $l(t,e,r){return HZ(),new File(t,e??"unknown_file",r)}function zv(t,e){let r=typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"";return e?r.split(/[\\/]/).pop()||void 0:r}function lse(t){let e=typeof t=="function"?t:t.fetch,r=N2.get(e);if(r)return r;let n=(async()=>{try{let i="Response"in e?e.Response:(await e("data:,")).constructor,o=new FormData;return o.toString()!==await new i(o).text()}catch{return!0}})();return N2.set(e,n),n}async function mse(t,e,r){if(HZ(),t=await t,e||(e=zv(t,!0)),pse(t))return t instanceof File&&e==null&&r==null?t:$l([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(fse(t)){let i=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),$l(await PI(i),e,r)}let n=await PI(t);if(!r?.type){let i=n.find(o=>typeof o=="object"&&"type"in o&&o.type);typeof i=="string"&&(r={...r,type:i})}return $l(n,e,r)}async function PI(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(YZ(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(QZ(t))for await(let r of t)e.push(...await PI(r));else{let r=t?.constructor?.name;throw Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${hse(t)}`)}return e}function hse(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(e=>`"${e}"`).join(", ")}]`}function*gse(t){if(!t)return;if(JZ in t){let{values:n,nulls:i}=t;yield*n.entries();for(let o of i)yield[o,null];return}let e=!1,r;t instanceof Headers?r=t.entries():S2(t)?r=t:(e=!0,r=Object.entries(t??{}));for(let n of r){let i=n[0];if(typeof i!="string")throw TypeError("expected header name to be a string");let o=S2(n[1])?n[1]:[n[1]],a=!1;for(let s of o)s!==void 0&&(e&&!a&&(a=!0,yield[i,null]),yield[i,s])}}function jv(t){return typeof t=="object"&&t!==null&&Kp in t}function XZ(t,e){let r=new Set;if(t)for(let n of t)jv(n)&&r.add(n[Kp]);if(e){for(let n of e)if(jv(n)&&r.add(n[Kp]),Array.isArray(n.content))for(let i of n.content)jv(i)&&r.add(i[Kp])}return Array.from(r)}function e6(t,e){let r=XZ(t,e);return r.length===0?{}:{"x-stainless-helper":r.join(", ")}}function vse(t){return jv(t)?{"x-stainless-helper":t[Kp]}:{}}function t6(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}function n6(t){return t?.output_format??t?.output_config?.format}function C2(t,e,r){let n=n6(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>{if(i.type==="text"){let o=Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(o,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return i}),parsed_output:null}:i6(t,e,r)}function i6(t,e,r){let n=null,i=t.content.map(o=>{if(o.type==="text"){let a=_se(e,o.text);n===null&&(n=a);let s=Object.defineProperty({...o},"parsed_output",{value:a,enumerable:!1});return Object.defineProperty(s,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),a},enumerable:!1})}return o});return{...t,content:i,parsed_output:n}}function _se(t,e){let r=n6(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ue(`Failed to parse structured output: ${n}`)}}function M2(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}function Z2(){let t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}async function $se(t,e=t.messages.at(-1)){if(!e||e.role!=="assistant"||!e.content||typeof e.content=="string")return null;let r=e.content.filter(n=>n.type==="tool_use");return r.length===0?null:{role:"user",content:await Promise.all(r.map(async n=>{let i=t.tools.find(o=>("name"in o?o.name:o.mcp_server_name)===n.name);if(!i||!("run"in i))return{type:"tool_result",tool_use_id:n.id,content:`Error: Tool '${n.name}' not found`,is_error:!0};try{let o=n.input;"parse"in i&&i.parse&&(o=i.parse(o));let a=await i.run(o);return{type:"tool_result",tool_use_id:n.id,content:a}}catch(o){return{type:"tool_result",tool_use_id:n.id,content:o instanceof Xv?o.content:`Error: ${o instanceof Error?o.message:String(o)}`,is_error:!0}}}))}}function F2(t){if(!t.output_format)return t;if(t.output_config?.format)throw new Ue("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:e,...r}=t;return{...r,output_config:{...t.output_config,format:e}}}function a6(t){return t?.output_config?.format}function V2(t,e,r){let n=a6(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>i.type==="text"?Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1}):i),parsed_output:null}:s6(t,e,r)}function s6(t,e,r){let n=null,i=t.content.map(o=>{if(o.type==="text"){let a=Ise(e,o.text);return n===null&&(n=a),Object.defineProperty({...o},"parsed_output",{value:a,enumerable:!1})}return o});return{...t,content:i,parsed_output:n}}function Ise(t,e){let r=a6(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ue(`Failed to parse structured output: ${n}`)}}function K2(t){return t.type==="tool_use"||t.type==="server_tool_use"}function l6(t){return t instanceof Error?t:Error(String(t))}function Rv(t){return t instanceof Error?t.message:String(t)}function Hp(t){if(t&&typeof t=="object"&&"code"in t&&typeof t.code=="string")return t.code}function oP(t){return Hp(t)==="ENOENT"}function Rse(){if(_l)return _l;if(!Us(process.env.DEBUG_CLAUDE_AGENT_SDK))return El=null,_l=Promise.resolve(),_l;let t=Q2(eP(),"debug");return El=Q2(t,`sdk-${zse()}.txt`),process.stderr.write(`SDK debug logs: ${El}
135
+ `),_l=Nse(t,{recursive:!0}).then(()=>{}).catch(()=>{}),_l}function fo(t){if(El===null)return;let e=`${new Date().toISOString()} ${t}
136
+ `;Rse().then(()=>{El&&jse(El,e).catch(()=>{})})}function aP(){let t=new Set;return{subscribe(e){return t.add(e),()=>{t.delete(e)}},emit(...e){let r;for(let n of t)try{n(...e)}catch(i){(r??=[]).push(i)}if(r)throw r.length===1?r[0]:AggregateError(r,"Signal listener(s) threw")},clear(){t.clear()}}}function Ase(){let t="";if(typeof process<"u"&&typeof process.cwd=="function"&&typeof Y2=="function"){let e=Cse();try{t=Y2(e).normalize("NFC")}catch{t=e.normalize("NFC")}}return{originalCwd:t,projectRoot:t,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:t,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,hasStreamingInput:!1,kairosActive:!1,strictToolResultPairing:!1,memoryToggledOff:!1,teamMemoryServerStatus:void 0,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:u6(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],loopChainStartedAt:Object.create(null),sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,sdkOAuthTokenRefreshCallback:null,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,activeRoutine:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Dse(){return Use.sessionId}function Bse({writeFn:t,flushIntervalMs:e=1e3,maxBufferSize:r=100,maxBufferBytes:n=1/0,immediateMode:i=!1}){let o=[],a=0,s=null,c=null;function l(){s&&(clearTimeout(s),s=null)}function u(){c&&(t(c.join("")),c=null),o.length!==0&&(t(o.join("")),o=[],a=0,l())}function d(){s||(s=setTimeout(u,e))}function f(){if(c){c.push(...o),o=[],a=0,l();return}let p=o;o=[],a=0,l(),c=p,setImmediate(()=>{let m=c;c=null,m&&t(m.join(""))})}return{write(p){if(i){t(p);return}o.push(p),a+=p.length,d(),(o.length>=r||a>=n)&&f()},flush:u,dispose(){u()}}}function Gse(t){return J2.add(t),()=>J2.delete(t)}function Hse(t){let e=[],r=t.match(/^MCP server ["']([^"']+)["']/);if(r&&r[1])e.push("mcp"),e.push(r[1].toLowerCase());else{let o=t.match(/^([^:[]+):/);o&&o[1]&&e.push(o[1].trim().toLowerCase())}let n=t.match(/^\[([^\]]+)]/);n&&n[1]&&e.push(n[1].trim().toLowerCase()),t.toLowerCase().includes("1p event:")&&e.push("1p");let i=t.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let o=i[1].trim().toLowerCase();o.length<30&&!o.includes(" ")&&e.push(o)}return Array.from(new Set(e))}function Qse(t,e){return e?t.length===0?!1:e.isExclusive?!t.some(r=>e.exclude.includes(r)):t.some(r=>e.include.includes(r)):!0}function Yse(t,e){if(!e)return!0;let r=Hse(t);return Qse(r,e)}function eZ(){return sce}function cce(t,e){t.destroyed||t.write(e)}function lce(t){cce(process.stderr,t)}function fce(t){if(!RI()||typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let e=pce();return Yse(t,e)}async function hce(t,e,r,n){t&&await Fse(e,{recursive:!0}).catch(()=>{}),await qse(r,n),g6()}function gce(){}function vce(){if(!Ev){let t=null;Ev=Bse({writeFn:e=>{let r=h6(),n=d6(r),i=t!==n;if(t=n,RI()){if(i)try{eZ().mkdirSync(n)}catch{}eZ().appendFileSync(r,e),g6();return}yI=yI.then(hce.bind(null,i,n,r,e)).catch(gce)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:RI()}),Gse(async()=>{Ev?.dispose(),await yI})}return Ev}function Hn(t,{level:e}={level:"debug"}){if(NI[e]<NI[uce()]||!fce(t))return;mce&&t.includes(`
137
+ `)&&(t=In(t));let r=`${new Date().toISOString()} [${e.toUpperCase()}] ${t.trim()}
138
+ `;if(f6()){lce(r);return}vce().write(r)}function h6(){return m6()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??p6(eP(),"debug",`${Dse()}.txt`)}function _ce(){return yce}function In(t,e,r){let n=[];try{let a=sr(n,lr`JSON.stringify(${t})`,0);return JSON.stringify(t,e,r)}catch(a){var i=a,o=1}finally{cr(n,i,o)}}function bce(t){let e=t.trim();return e.startsWith("{")&&e.endsWith("}")}function xce(t,e){let r={...t};if(e){let n=e.enabled===!0&&e.failIfUnavailable===void 0?{...e,failIfUnavailable:!0}:e,i=r.settings;if(i&&!bce(i))throw Error("Cannot use both a settings file path and the sandbox option. Include the sandbox configuration in your settings file instead.");let o={sandbox:n};if(i)try{o={...sP(i),sandbox:n}}catch{}r.settings=In(o)}return r}function Sce(){for(let t of sy)t.killed||t.kill("SIGTERM")}function kce(t){sy.add(t),!tZ&&(tZ=!0,process.on("exit",Sce))}function $ce(t){return![".js",".mjs",".tsx",".ts",".jsx"].some(e=>t.endsWith(e))}function Ece(t,e=process.platform,r=process.arch){let n;e==="linux"?n=[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl/cli`,`@anthropic-ai/claude-agent-sdk-linux-${r}/cli`]:e==="win32"?n=[`@anthropic-ai/claude-agent-sdk-win32-${r}/cli.exe`]:n=[`@anthropic-ai/claude-agent-sdk-${e}-${r}/cli`];for(let i of n)try{return t(i)}catch{}return null}function Tce(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return e}function zce(t){return typeof t!="string"?null:Oce.test(t)?t:null}function jce(t){return Math.abs(Tce(t)).toString(36)}function Nce(t){let e=t.replace(/[^a-zA-Z0-9]/g,"-");return e.length<=rZ?e:`${e.slice(0,rZ)}-${jce(t)}`}function Uce(){return"prod"}function Fce(){let t=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,"")??"http://localhost:8000",e=process.env.CLAUDE_LOCAL_OAUTH_APPS_BASE?.replace(/\/$/,"")??"http://localhost:4000",r=process.env.CLAUDE_LOCAL_OAUTH_CONSOLE_BASE?.replace(/\/$/,"")??"http://localhost:3000";return{BASE_API_URL:t,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${e}/oauth/authorize`,CLAUDE_AI_ORIGIN:e,TOKEN_URL:`${t}/v1/oauth/token`,API_KEY_URL:`${t}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${t}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${r}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${r}/oauth/code/callback`,CLIENT_ID:"22422756-60c9-4084-8eb7-27705fd5cf9a",OAUTH_FILE_SUFFIX:"-local-oauth",MCP_PROXY_URL:"http://localhost:8205",MCP_PROXY_PATH:"/v1/toolbox/shttp/mcp/{server_id}"}}function Wce(){let t=(()=>{switch(Uce()){case"local":return Fce();case"staging":return qce??nZ;case"prod":return nZ}})(),e=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(e){let n=e.replace(/\/$/,"");if(!Vce.includes(n))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");t={...t,BASE_API_URL:n,CONSOLE_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_ORIGIN:n,TOKEN_URL:`${n}/v1/oauth/token`,API_KEY_URL:`${n}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${n}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${n}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let r=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return r&&(t={...t,CLIENT_ID:r}),t}function Gce(t=""){let e=eP(),r=process.env.CLAUDE_CONFIG_DIR?`-${Cce("sha256").update(e).digest("hex").substring(0,8)}`:"";return`Claude Code${Wce().OAUTH_FILE_SUFFIX}${t}${r}`}function Kce(){try{return process.env.USER||Ace().username}catch{return"claude-code-user"}}function LI(){return Qce}function le(t,e){let r=LI(),n=ZI({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ef?void 0:ef].filter(i=>!!i)});t.common.issues.push(n)}function We(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{let{message:s}=t;return o.code==="invalid_enum_value"?{message:s??a.defaultError}:typeof a.data>"u"?{message:s??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:s??r??a.defaultError}},description:i}}function _6(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function fle(t){return new RegExp(`^${_6(t)}$`)}function mle(t){let e=`${y6}T${_6(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function hle(t,e){return!!((e==="v4"||!e)&&ale.test(t)||(e==="v6"||!e)&&cle.test(t))}function gle(t,e){if(!rle.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function vle(t,e){return!!((e==="v4"||!e)&&sle.test(t)||(e==="v6"||!e)&&lle.test(t))}function yle(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function wl(t){if(t instanceof Xn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Zi.create(wl(n))}return new Xn({...t._def,shape:()=>e})}else return t instanceof Ia?new Ia({...t._def,type:wl(t.element)}):t instanceof Zi?Zi.create(wl(t.unwrap())):t instanceof Fo?Fo.create(wl(t.unwrap())):t instanceof qo?qo.create(t.items.map(e=>wl(e))):t}function FI(t,e){let r=Sa(t),n=Sa(e);if(t===e)return{valid:!0,data:t};if(r===ve.object&&n===ve.object){let i=St.objectKeys(e),o=St.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let c=FI(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===ve.array&&n===ve.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],c=FI(a,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===ve.date&&n===ve.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function b6(t,e){return new Dl({values:t,typeName:Ae.ZodEnum,...We(e)})}function D(t,e,r){function n(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(t),e(s,c);for(let u in a.prototype)u in s||Object.defineProperty(s,u,{value:a.prototype[u].bind(s)});s._zod.constr=a,s._zod.def=c}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function a(s){var c;let l=r?.Parent?new o:this;n(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function hn(t){return t&&Object.assign(dy,t),dy}function _le(t){return t}function ble(t){return t}function xle(t){}function wle(t){throw Error()}function Sle(t){}function cP(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,n])=>e.indexOf(+r)===-1).map(([r,n])=>n)}function oe(t,e="|"){return t.map(r=>He(r)).join(e)}function k6(t,e){return typeof e=="bigint"?e.toString():e}function Oy(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}throw Error("cached value already set")}}}function Gs(t){return t==null}function zy(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function $6(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function zt(t,e,r){Object.defineProperty(t,e,{get(){{let n=r();return t[e]=n,n}throw Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function lP(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function kle(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function $le(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function Ele(t=10){let e="";for(let r=0;r<t;r++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function Sl(t){return JSON.stringify(t)}function pf(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ff(t){if(pf(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(pf(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ile(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function Ks(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bi(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function re(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Tle(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function He(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function P6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Ole(t,e){let r={},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&(r[i]=n.shape[i])}return Bi(t,{...t._zod.def,shape:r,checks:[]})}function zle(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&delete r[i]}return Bi(t,{...t._zod.def,shape:r,checks:[]})}function jle(t,e){if(!ff(e))throw Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return lP(this,"shape",n),n},checks:[]};return Bi(t,r)}function Nle(t,e){return Bi(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return lP(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function Rle(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let o in r){if(!(o in n))throw Error(`Unrecognized key: "${o}"`);r[o]&&(i[o]=t?new t({type:"optional",innerType:n[o]}):n[o])}else for(let o in n)i[o]=t?new t({type:"optional",innerType:n[o]}):n[o];return Bi(e,{...e._zod.def,shape:i,checks:[]})}function Cle(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let o in r){if(!(o in i))throw Error(`Unrecognized key: "${o}"`);r[o]&&(i[o]=new t({type:"nonoptional",innerType:n[o]}))}else for(let o in n)i[o]=new t({type:"nonoptional",innerType:n[o]});return Bi(e,{...e._zod.def,shape:i,checks:[]})}function Il(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function hi(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Gp(t){return typeof t=="string"?t:t?.message}function Vi(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Gp(t.inst?._zod.def?.error?.(t))??Gp(e?.error?.(t))??Gp(r.customError?.(t))??Gp(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,!e?.reportInput&&delete n.input,n}function jy(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Ny(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function z6(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Ale(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function pP(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function fP(t,e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let l=a.path[c];c!==a.path.length-1?s[l]=s[l]||{_errors:[]}:(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))),s=s[l],c++}}};return i(t),n}function N6(t,e){let r=e||function(o){return o.message},n={errors:[]},i=(o,a=[])=>{var s,c;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>i({issues:u},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let u=[...a,...l.path];if(u.length===0){n.errors.push(r(l));continue}let d=n,f=0;for(;f<u.length;){let p=u[f],m=f===u.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(c=d.items)[p]??(c[p]={errors:[]}),d=d.items[p]),m&&d.errors.push(r(l)),f++}}};return i(t),n}function R6(t){let e=[];for(let r of t)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function C6(t){let e=[],r=[...t.issues].sort((n,i)=>n.path.length-i.path.length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${R6(n.path)}`);return e.join(`
139
+ `)}function W6(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}function tq(t){return typeof t.precision=="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function rq(t){return new RegExp(`^${tq(t)}$`)}function nq(t){let e=tq({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${X6}T(?:${n})$`)}function cZ(t,e,r){t.issues.length&&e.issues.push(...hi(r,t.issues))}function kP(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Xq(t){if(!xP.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return kP(r)}function rF(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}function lZ(t,e,r){t.issues.length&&e.issues.push(...hi(r,t.issues)),e.value[r]=t.value}function Iv(t,e,r){t.issues.length&&e.issues.push(...hi(r,t.issues)),e.value[r]=t.value}function uZ(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...hi(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function dZ(t,e,r,n){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(o=>Vi(o,n,hn())))}),e}function GI(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ff(t)&&ff(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let a=GI(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],a=GI(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function pZ(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Il(t))return t;let n=GI(e.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}function Pv(t,e,r){t.issues.length&&e.issues.push(...hi(r,t.issues)),e.value[r]=t.value}function fZ(t,e,r,n,i,o,a){t.issues.length&&(py.has(typeof n)?r.issues.push(...hi(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:o,issues:t.issues.map(s=>Vi(s,a,hn()))})),e.issues.length&&(py.has(typeof n)?r.issues.push(...hi(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(s=>Vi(s,a,hn()))})),r.value.set(t.value,e.value)}function mZ(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function hZ(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function gZ(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function vZ(t,e,r){return Il(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}function yZ(t){return t.value=Object.freeze(t.value),t}function _Z(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(z6(i))}}function Kle(){return{localeError:Gle()}}function Qle(){return{localeError:Hle()}}function bZ(t,e,r,n){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?e:o>=2&&o<=4?r:n}function Jle(){return{localeError:Yle()}}function eue(){return{localeError:Xle()}}function rue(){return{localeError:tue()}}function iue(){return{localeError:nue()}}function CF(){return{localeError:aue()}}function lue(){return{localeError:cue()}}function due(){return{localeError:uue()}}function fue(){return{localeError:pue()}}function hue(){return{localeError:mue()}}function vue(){return{localeError:gue()}}function _ue(){return{localeError:yue()}}function xue(){return{localeError:bue()}}function Sue(){return{localeError:wue()}}function $ue(){return{localeError:kue()}}function Iue(){return{localeError:Eue()}}function Tue(){return{localeError:Pue()}}function zue(){return{localeError:Oue()}}function Nue(){return{localeError:jue()}}function Cue(){return{localeError:Rue()}}function Uue(){return{localeError:Aue()}}function Mue(){return{localeError:Due()}}function Zue(){return{localeError:Lue()}}function Fue(){return{localeError:que()}}function Wue(){return{localeError:Vue()}}function Gue(){return{localeError:Bue()}}function Hue(){return{localeError:Kue()}}function xZ(t,e,r,n){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?e:o>=2&&o<=4?r:n}function Yue(){return{localeError:Que()}}function Xue(){return{localeError:Jue()}}function tde(){return{localeError:ede()}}function nde(){return{localeError:rde()}}function ode(){return{localeError:ide()}}function cde(){return{localeError:sde()}}function ude(){return{localeError:lde()}}function pde(){return{localeError:dde()}}function mde(){return{localeError:fde()}}function gde(){return{localeError:hde()}}function yde(){return{localeError:vde()}}function RP(){return new mf}function DF(t,e){return new t({type:"string",...re(e)})}function MF(t,e){return new t({type:"string",coerce:!0,...re(e)})}function CP(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...re(e)})}function vy(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...re(e)})}function AP(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...re(e)})}function UP(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(e)})}function DP(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(e)})}function MP(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(e)})}function LP(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...re(e)})}function ZP(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...re(e)})}function qP(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(e)})}function FP(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...re(e)})}function VP(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(e)})}function WP(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...re(e)})}function BP(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...re(e)})}function GP(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(e)})}function KP(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(e)})}function HP(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(e)})}function QP(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(e)})}function YP(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(e)})}function JP(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...re(e)})}function XP(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...re(e)})}function eT(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...re(e)})}function tT(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...re(e)})}function ZF(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(e)})}function qF(t,e){return new t({type:"string",format:"date",check:"string_format",...re(e)})}function FF(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...re(e)})}function VF(t,e){return new t({type:"string",format:"duration",check:"string_format",...re(e)})}function WF(t,e){return new t({type:"number",checks:[],...re(e)})}function BF(t,e){return new t({type:"number",coerce:!0,checks:[],...re(e)})}function GF(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...re(e)})}function KF(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...re(e)})}function HF(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...re(e)})}function QF(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...re(e)})}function YF(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...re(e)})}function JF(t,e){return new t({type:"boolean",...re(e)})}function XF(t,e){return new t({type:"boolean",coerce:!0,...re(e)})}function e9(t,e){return new t({type:"bigint",...re(e)})}function t9(t,e){return new t({type:"bigint",coerce:!0,...re(e)})}function r9(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...re(e)})}function n9(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...re(e)})}function i9(t,e){return new t({type:"symbol",...re(e)})}function o9(t,e){return new t({type:"undefined",...re(e)})}function a9(t,e){return new t({type:"null",...re(e)})}function s9(t){return new t({type:"any"})}function yy(t){return new t({type:"unknown"})}function c9(t,e){return new t({type:"never",...re(e)})}function l9(t,e){return new t({type:"void",...re(e)})}function u9(t,e){return new t({type:"date",...re(e)})}function d9(t,e){return new t({type:"date",coerce:!0,...re(e)})}function p9(t,e){return new t({type:"nan",...re(e)})}function Vs(t,e){return new wP({check:"less_than",...re(e),value:t,inclusive:!1})}function qi(t,e){return new wP({check:"less_than",...re(e),value:t,inclusive:!0})}function Ws(t,e){return new SP({check:"greater_than",...re(e),value:t,inclusive:!1})}function Qn(t,e){return new SP({check:"greater_than",...re(e),value:t,inclusive:!0})}function f9(t){return Ws(0,t)}function m9(t){return Vs(0,t)}function h9(t){return qi(0,t)}function g9(t){return Qn(0,t)}function hf(t,e){return new mq({check:"multiple_of",...re(e),value:t})}function Cy(t,e){return new vq({check:"max_size",...re(e),maximum:t})}function gf(t,e){return new yq({check:"min_size",...re(e),minimum:t})}function rT(t,e){return new _q({check:"size_equals",...re(e),size:t})}function Ay(t,e){return new bq({check:"max_length",...re(e),maximum:t})}function Vl(t,e){return new xq({check:"min_length",...re(e),minimum:t})}function Uy(t,e){return new wq({check:"length_equals",...re(e),length:t})}function nT(t,e){return new Sq({check:"string_format",format:"regex",...re(e),pattern:t})}function iT(t){return new kq({check:"string_format",format:"lowercase",...re(t)})}function oT(t){return new $q({check:"string_format",format:"uppercase",...re(t)})}function aT(t,e){return new Eq({check:"string_format",format:"includes",...re(e),includes:t})}function sT(t,e){return new Iq({check:"string_format",format:"starts_with",...re(e),prefix:t})}function cT(t,e){return new Pq({check:"string_format",format:"ends_with",...re(e),suffix:t})}function v9(t,e,r){return new Tq({check:"property",property:t,schema:e,...re(r)})}function lT(t,e){return new Oq({check:"mime_type",mime:t,...re(e)})}function Hs(t){return new zq({check:"overwrite",tx:t})}function uT(t){return Hs(e=>e.normalize(t))}function dT(){return Hs(t=>t.trim())}function pT(){return Hs(t=>t.toLowerCase())}function fT(){return Hs(t=>t.toUpperCase())}function mT(t,e,r){return new t({type:"array",element:e,...re(r)})}function _de(t,e,r){return new t({type:"union",options:e,...re(r)})}function bde(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...re(n)})}function xde(t,e,r){return new t({type:"intersection",left:e,right:r})}function y9(t,e,r,n){let i=r instanceof Fe;return new t({type:"tuple",items:e,rest:i?r:null,...re(i?n:r)})}function wde(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...re(n)})}function Sde(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...re(n)})}function kde(t,e,r){return new t({type:"set",valueType:e,...re(r)})}function $de(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...re(r)})}function Ede(t,e,r){return new t({type:"enum",entries:e,...re(r)})}function Ide(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...re(r)})}function _9(t,e){return new t({type:"file",...re(e)})}function Pde(t,e){return new t({type:"transform",transform:e})}function Tde(t,e){return new t({type:"optional",innerType:e})}function Ode(t,e){return new t({type:"nullable",innerType:e})}function zde(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function jde(t,e,r){return new t({type:"nonoptional",innerType:e,...re(r)})}function Nde(t,e){return new t({type:"success",innerType:e})}function Rde(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Cde(t,e,r){return new t({type:"pipe",in:e,out:r})}function Ade(t,e){return new t({type:"readonly",innerType:e})}function Ude(t,e,r){return new t({type:"template_literal",parts:e,...re(r)})}function Dde(t,e){return new t({type:"lazy",getter:e})}function Mde(t,e){return new t({type:"promise",innerType:e})}function b9(t,e,r){let n=re(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function x9(t,e,r){return new t({type:"custom",check:"custom",fn:e,...re(r)})}function w9(t,e){let r=re(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(n),a=new Set(i),s=t.Pipe??jP,c=t.Boolean??EP,l=t.String??xf,u=new(t.Transform??zP)({type:"transform",transform:(f,p)=>{let m=f;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:a.has(m)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:p.value,inst:u}),{})},error:r.error}),d=new s({type:"pipe",in:new l({type:"string",error:r.error}),out:u,error:r.error});return new s({type:"pipe",in:d,out:new c({type:"boolean",error:r.error}),error:r.error})}function S9(t,e,r,n={}){let i=re(n),o={...re(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}function k9(t){return new _y({type:"function",input:Array.isArray(t?.input)?y9(Ry,t?.input):t?.input??mT(PP,yy(gy)),output:t?.output??yy(gy)})}function $9(t,e){if(t instanceof mf){let n=new vf(e),i={};for(let s of t._idmap.entries()){let[c,l]=s;n.process(l)}let o={},a={registry:t,uri:e?.uri||(s=>s),defs:i};for(let s of t._idmap.entries()){let[c,l]=s;o[c]=n.emit(l,{...e,external:a})}if(Object.keys(i).length>0){let s=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[s]:i}}return{schemas:o}}let r=new vf(e);return r.process(t),r.emit(t,e)}function wr(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return wr(n.element,r);case"object":{for(let i in n.shape)if(wr(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(wr(i,r))return!0;return!1}case"intersection":return wr(n.left,r)||wr(n.right,r);case"tuple":{for(let i of n.items)if(wr(i,r))return!0;return!!(n.rest&&wr(n.rest,r))}case"record":return wr(n.keyType,r)||wr(n.valueType,r);case"map":return wr(n.keyType,r)||wr(n.valueType,r);case"set":return wr(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return wr(n.innerType,r);case"lazy":return wr(n.getter(),r);case"default":return wr(n.innerType,r);case"prefault":return wr(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return wr(n.in,r)||wr(n.out,r);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${n.type}`)}function E9(t){return ZF(gT,t)}function I9(t){return qF(vT,t)}function P9(t){return FF(yT,t)}function T9(t){return VF(_T,t)}function K(t){return DF(Dy,t)}function Fde(t){return CP(xT,t)}function Vde(t){return vy(by,t)}function Wde(t){return AP(Zo,t)}function Bde(t){return UP(Zo,t)}function Gde(t){return DP(Zo,t)}function Kde(t){return MP(Zo,t)}function Hde(t){return LP(wT,t)}function Qde(t){return ZP(ST,t)}function Yde(t){return qP(kT,t)}function Jde(t){return FP($T,t)}function Xde(t){return VP(ET,t)}function epe(t){return WP(IT,t)}function tpe(t){return BP(PT,t)}function rpe(t){return GP(TT,t)}function npe(t){return KP(OT,t)}function ipe(t){return HP(zT,t)}function ope(t){return QP(jT,t)}function ape(t){return YP(NT,t)}function spe(t){return JP(RT,t)}function cpe(t){return XP(CT,t)}function lpe(t){return eT(AT,t)}function upe(t){return tT(UT,t)}function dpe(t,e,r={}){return S9(C9,t,e,r)}function Ot(t){return WF(My,t)}function KI(t){return GF(Hl,t)}function ppe(t){return KF(Hl,t)}function fpe(t){return HF(Hl,t)}function mpe(t){return QF(Hl,t)}function hpe(t){return YF(Hl,t)}function Sr(t){return JF(Ly,t)}function gpe(t){return e9(Zy,t)}function vpe(t){return r9(DT,t)}function ype(t){return n9(DT,t)}function _pe(t){return i9(A9,t)}function bpe(t){return o9(U9,t)}function MT(t){return a9(D9,t)}function xpe(){return s9(M9)}function rr(){return yy(L9)}function qy(t){return c9(Z9,t)}function wpe(t){return l9(q9,t)}function Spe(t){return u9(LT,t)}function mt(t,e){return mT(F9,t,e)}function kpe(t){let e=t._zod.def.shape;return ke(Object.keys(e))}function ge(t,e){let r={type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},...ft.normalizeParams(e)};return new Fy(r)}function $pe(t,e){return new Fy({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:qy(),...ft.normalizeParams(e)})}function pn(t,e){return new Fy({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:rr(),...ft.normalizeParams(e)})}function qt(t,e){return new ZT({type:"union",options:t,...ft.normalizeParams(e)})}function qT(t,e,r){return new V9({type:"union",options:e,discriminator:t,...ft.normalizeParams(r)})}function Vy(t,e){return new W9({type:"intersection",left:t,right:e})}function Epe(t,e,r){let n=e instanceof Fe,i=n?r:e;return new B9({type:"tuple",items:t,rest:n?e:null,...ft.normalizeParams(i)})}function Zt(t,e,r){return new FT({type:"record",keyType:t,valueType:e,...ft.normalizeParams(r)})}function Ipe(t,e,r){return new FT({type:"record",keyType:qt([t,qy()]),valueType:e,...ft.normalizeParams(r)})}function Ppe(t,e,r){return new G9({type:"map",keyType:t,valueType:e,...ft.normalizeParams(r)})}function Tpe(t,e){return new K9({type:"set",valueType:t,...ft.normalizeParams(e)})}function Tn(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new yf({type:"enum",entries:r,...ft.normalizeParams(e)})}function Ope(t,e){return new yf({type:"enum",entries:t,...ft.normalizeParams(e)})}function ke(t,e){return new H9({type:"literal",values:Array.isArray(t)?t:[t],...ft.normalizeParams(e)})}function zpe(t){return _9(Q9,t)}function WT(t){return new VT({type:"transform",transform:t})}function Qt(t){return new BT({type:"optional",innerType:t})}function xy(t){return new Y9({type:"nullable",innerType:t})}function jpe(t){return Qt(xy(t))}function X9(t,e){return new J9({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function tV(t,e){return new eV({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function rV(t,e){return new GT({type:"nonoptional",innerType:t,...ft.normalizeParams(e)})}function Npe(t){return new nV({type:"success",innerType:t})}function oV(t,e){return new iV({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function Rpe(t){return p9(aV,t)}function wy(t,e){return new KT({type:"pipe",in:t,out:e})}function cV(t){return new sV({type:"readonly",innerType:t})}function Cpe(t,e){return new lV({type:"template_literal",parts:t,...ft.normalizeParams(e)})}function dV(t){return new uV({type:"lazy",getter:t})}function Ape(t){return new pV({type:"promise",innerType:t})}function fV(t,e){let r=new pr({check:"custom",...ft.normalizeParams(e)});return r._zod.check=t,r}function mV(t,e){return b9(Wy,t??(()=>!0),e)}function hV(t,e={}){return x9(Wy,t,e)}function gV(t,e){let r=fV(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(ft.issue(i,n.value,r._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),n.issues.push(ft.issue(o))}},t(n.value,n)),e);return r}function Upe(t,e={error:`Input not instance of ${t.name}`}){let r=new Wy({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ft.normalizeParams(e)});return r._zod.bag.Class=t,r}function Mpe(t){let e=dV(()=>qt([K(t),Ot(),Sr(),MT(),mt(e),Zt(K(),e)]));return e}function HT(t,e){return wy(WT(t),e)}function Zpe(t){hn({customError:t})}function qpe(){return hn().customError}function Fpe(t){return MF(Dy,t)}function Vpe(t){return BF(My,t)}function Wpe(t){return XF(Ly,t)}function Bpe(t){return t9(Zy,t)}function Gpe(t){return d9(LT,t)}function Dme(t){let e;return()=>e??=t()}async function Mme(t,e){try{await Fie(t,e)}catch(r){if(!oP(r))throw r}}async function Lme(t,e){if(!t)return;let r=t;try{let n=sP(t);n?.claudeAiOauth?.refreshToken&&(delete n.claudeAiOauth.refreshToken,r=In(n))}catch{}await Tv(e,r,{mode:384})}function Zme(){if(process.platform!=="darwin")return Promise.resolve(void 0);let t=Gce(Bce);return new Promise(e=>{Zie("security",["find-generic-password","-a",Kce(),"-w","-s",t],{encoding:"utf-8",timeout:5e3},(r,n)=>e(r?void 0:n.trim()||void 0))})}async function qme(t,e,r,n,i=6e4){if(!zce(e))return;let o=Ov(r??"."),a=Nce(o),s=await sI(t.load({projectKey:a,sessionId:e}),i,`SessionStore.load() timed out after ${i}ms for session ${e}`);if(!s||s.length===0)return;let c=Li(Gie(),`claude-resume-${qie()}`);try{let l=Li(c,"projects",a);await aI(l,{recursive:!0});let u=Li(l,`${e}.jsonl`);await Tv(u,EZ(s),{mode:384});let d=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,f=d??Li(xI(),".claude"),p;try{p=await Vie(Li(f,".credentials.json"),"utf-8")}catch(m){if(!oP(m))throw m}if(!d&&!(n?.ANTHROPIC_API_KEY??process.env.ANTHROPIC_API_KEY)&&!(n?.CLAUDE_CODE_OAUTH_TOKEN??process.env.CLAUDE_CODE_OAUTH_TOKEN)&&(p=await Zme()??p),await Lme(p,Li(c,".credentials.json")),await Mme(Li(d??xI(),".claude.json"),Li(c,".claude.json")),t.listSubkeys){let m=Li(l,e),v=await sI(t.listSubkeys({projectKey:a,sessionId:e}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${e}`);for(let g of v){let h=Ov(m,g+".jsonl");if(!g||CZ(g)||g.split(/[\\/]/).includes("..")||!h.startsWith(m+AZ)){Hn(`[SessionStore] skipping unsafe subpath from listSubkeys: ${g}`,{level:"warn"});continue}let y=await sI(t.load({projectKey:a,sessionId:e,subpath:g}),i,`SessionStore.load() timed out after ${i}ms for session ${e} subpath ${g}`);if(!y||y.length===0)continue;let _=[],b=[];for(let x of y)Wme(x)?_.push(x):b.push(x);if(b.length>0&&(await aI(_2(h),{recursive:!0}),await Tv(h,EZ(b),{mode:384})),_.length>0){let x=_.at(-1),w=Ov(m,g+".meta.json");await aI(_2(w),{recursive:!0});let{type:S,...$}=x;await Tv(w,In($),{mode:384})}}}return c}catch(l){throw await qV(c),l}}function kZ(t,e,r,n){let{systemPrompt:i,settings:o,settingSources:a,sandbox:s,...c}=t??{},l,u,d;i===void 0?l="":typeof i=="string"?l=i:i.type==="preset"&&(u=i.append,d=i.excludeDynamicSections);let f=c.pathToClaudeCodeExecutable;if(!f){let Ec=Hie(import.meta.url),ko=Bie(Ec),Ym=Ece(Wb=>ko.resolve(Wb));if(Ym)f=Ym;else try{f=ko.resolve("./cli.js")}catch{throw Error(`Native CLI binary for ${process.platform}-${process.arch} not found. Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set options.pathToClaudeCodeExecutable.`)}}process.env.CLAUDE_AGENT_SDK_VERSION="0.2.105";let{abortController:p=UZ(),additionalDirectories:m=[],agent:v,agents:g,allowedTools:h=[],betas:y,canUseTool:_,continue:b,cwd:x,debug:w,debugFile:S,disallowedTools:$=[],tools:T,env:A,executable:I=DZ()?"bun":"node",executableArgs:U=[],extraArgs:L={},fallbackModel:N,enableFileCheckpointing:Y,toolConfig:H,forkSession:ye,hooks:Pe,includeHookEvents:ue,includePartialMessages:W,onElicitation:E,persistSession:q,sessionStore:R,thinking:k,effort:O,maxThinkingTokens:B,maxTurns:ie,maxBudgetUsd:me,taskBudget:lt,mcpServers:Te,model:nr,outputFormat:M,permissionMode:V="default",allowDangerouslySkipPermissions:Q=!1,permissionPromptToolName:ne,plugins:xe,getOAuthToken:Be,workload:hr,resume:Dn,resumeSessionAt:Lr,sessionId:Zr,stderr:_r,strictMcpConfig:Xo}=c;if(R&&q===!1)throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. Use CLAUDE_CONFIG_DIR=/tmp for ephemeral local writes with external mirroring.");let en=M?.type==="json_schema"?M.schema:void 0,Mn=A?{...A}:{...process.env};Mn.CLAUDE_CODE_ENTRYPOINT||(Mn.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),Y&&(Mn.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),Be&&(Mn.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),H?.askUserQuestion?.previewFormat&&(Mn.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=H.askUserQuestion.previewFormat);let ea={},$c=new Map;if(Te)for(let[Ec,ko]of Object.entries(Te))ko.type==="sdk"&&ko.instance?$c.set(Ec,ko.instance):ea[Ec]=ko;let ta;if(k)switch(k.type){case"adaptive":ta={type:"adaptive",display:k.display};break;case"enabled":ta={type:"enabled",budgetTokens:k.budgetTokens,display:k.display};break;case"disabled":ta={type:"disabled"};break}else B!==void 0&&(ta=B===0?{type:"disabled"}:{type:"enabled",budgetTokens:B});r&&(Mn.CLAUDE_CONFIG_DIR=r);let Ju=new CI({abortController:p,additionalDirectories:m,agent:v,betas:y,cwd:x,debug:w,debugFile:S,executable:I,executableArgs:U,extraArgs:hr?{...L,workload:hr}:L,pathToClaudeCodeExecutable:f,env:Mn,forkSession:ye,stderr:_r,thinkingConfig:ta,effort:O,maxTurns:ie,maxBudgetUsd:me,taskBudget:lt,model:nr,fallbackModel:N,jsonSchema:en,permissionMode:V,allowDangerouslySkipPermissions:Q,permissionPromptToolName:ne,continueConversation:b,resume:Dn,resumeSessionAt:Lr,sessionId:Zr,settings:typeof o=="object"?In(o):o,settingSources:a,allowedTools:h,disallowedTools:$,tools:T,mcpServers:ea,strictMcpConfig:Xo,canUseTool:!!_,hooks:!!Pe,includeHookEvents:ue,includePartialMessages:W,persistSession:q,sessionMirror:!!R,plugins:xe,sandbox:s,spawnClaudeCodeProcess:c.spawnClaudeCodeProcess,deferSpawn:n}),Vb={systemPrompt:l,appendSystemPrompt:u,excludeDynamicSections:d,agents:g,promptSuggestions:c.promptSuggestions,agentProgressSummaries:c.agentProgressSummaries},GN=new DI(Ju,e,_,Pe,p,$c,en,Vb,E,Be);if(R){let Ec=new MI(async(ko,Ym)=>{let Wb=Li(Mn.CLAUDE_CONFIG_DIR??Li(xI(),".claude"),"projects"),KN=Bme(ko,Wb);KN&&await R.append(KN,Ym)});GN.setTranscriptMirrorBatcher(Ec)}return{queryInstance:GN,transport:Ju,abortController:p,processEnv:Mn}}function $Z(t,e,r,n){typeof r=="string"?e.write(In({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
140
+ `):t.streamInput(r).catch(i=>n.abort(i))}async function qV(t){for(let e=0;;e++)try{return await Wie(t,{recursive:!0,force:!0})}catch(r){if(e>=4||!Fme.has(Hp(r)??""))return;await Jie((e+1)*100)}}function Vme(t,e){t.waitForExit().catch(()=>{}).finally(()=>qV(e))}function FV({prompt:t,options:e}){if(e?.resume&&e?.sessionStore){let{queryInstance:o,transport:a,abortController:s,processEnv:c}=kZ({...e},typeof t=="string",void 0,!0),l=Ov(e.cwd??".");return qme(e.sessionStore,e.resume,l,e.env,e.loadTimeoutMs).then(u=>{u&&(a.updateEnv({CLAUDE_CONFIG_DIR:u}),c.CLAUDE_CONFIG_DIR=u,o.addCleanupCallback(()=>Vme(a,u))),o.isClosed()||a.spawn()}).catch(u=>{let d=l6(u);a.spawnAbort(d),o.setError(d)}),$Z(o,a,t,s),o}let{queryInstance:r,transport:n,abortController:i}=kZ(e,typeof t=="string");return $Z(r,n,t,i),r}function EZ(t){return t.map(e=>In(e)).join(`
141
+ `)+`
142
+ `}function Wme(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="agent_metadata"}function Bme(t,e){let r=Kie(e,t);if(r.startsWith("..")||CZ(r))return null;let n=r.split(AZ);if(n.length<2)return null;let i=n[0],o=n[1];if(n.length===2&&o.endsWith(".jsonl"))return{projectKey:i,sessionId:o.replace(/\.jsonl$/,"")};if(n.length>=4){let a=n.slice(2),s=a.length-1;return a[s]=a.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:o,subpath:a.join("/")}}return null}var Nne,Rne,bI,Cne,Ane,Dne,Mne,IZ,de,Lne,Bs,qne,Fne,sr,cr,Cv,y2,et,kt,Ta,ky,Vne,PZ,TZ,Av,Wne,Wi,Bne,Gne,OZ,Kne,$y,Ey,HI,Iy,QI,Hne,Qne,Yne,Jne,Xne,eie,tie,rie,nie,iie,oie,aie,sie,cie,lie,uie,die,pie,YI,fie,mie,hie,gie,zZ,jZ,vie,yie,_ie,bie,xie,NZ,wie,Sie,kie,$ie,Eie,Iie,Pie,Tie,Oie,zie,jie,Nie,Rie,Cie,Aie,Uie,RZ,Die,Mie,Lie,Yie,ka,roe,noe,ioe,ooe,JI,aoe,Uv,MZ,soe,coe,Ip,uoe,doe,poe,moe,hoe,goe,b2,yoe,LZ,boe,xoe,woe,Soe,$oe,Eoe,cI,x2,Poe,Toe,Ooe,joe,Noe,Roe,Coe,Aoe,Uoe,Doe,Moe,Zoe,Foe,ZZ,Woe,Qp,Goe,Hoe,Qoe,Yoe,Joe,eae,tae,rae,iae,oae,sae,w2,lae,dae,Py,fae,mae,gae,yae,bae,wae,Sae,kae,$ae,Iae,Tae,Ty,jae,Rae,Aae,Dae,qZ,Mae,Oa,eP,FZ,wI,Ue,fn,Yn,Pl,Dv,Mv,Lv,Zv,qv,Fv,Vv,Wv,Bv,qae,Fae,SI,S2,Wae,VZ,Bae,bl,Gae,Hae,$2,E2,I2,Yae,ese,P2,T2,Gn,Kn,Ms,Gv,z2,ose,j2,As,Pp,Ls,$I,Wp,Kv,dv,Hv,EI,Zs,Qv,HZ,QZ,nP,N2,use,dse,II,YZ,pse,fse,Jn,JZ,ht,Kp,R2,yse,zr,Yv,Jv,r6,bse,xl,xse,wse,o6,fi,ba,gl,Tp,pv,Op,zp,fv,jp,Uo,Np,mv,hv,Ns,gv,vv,Rp,lI,A2,yv,uI,dI,pI,U2,D2,TI,Xv,Sse,kse,Cp,vl,Rs,xr,Ap,Bn,Lo,xa,Up,L2,OI,ey,ty,ry,q2,Ese,qs,ny,Jp,Ea,iy,mi,wa,yl,Dp,_v,Mp,Lp,bv,Zp,Do,qp,xv,wv,Cs,Sv,kv,Fp,fI,W2,mI,hI,gI,vI,B2,G2,zI,oy,Xp,H2,Pse,ay,$v,jI,iP,Nv,c6,Tse,Ose,ur,Tl,El,_l,Use,Mse,FLe,Lse,VLe,Zse,WLe,J2,Kse,ace,sce,NI,uce,dce,RI,pce,f6,m6,mce,Ev,yI,g6,HLe,yce,lr,sP,wce,sy,tZ,CI,AI,UI,DI,MI,JLe,Oce,rZ,XLe,e2e,Rce,t2e,Dce,v6,Mce,Lce,Zce,i2e,nZ,qce,Vce,Bce,St,iZ,ve,Sa,te,gi,Hce,ef,Qce,ZI,mn,Ce,Bp,Pn,oZ,aZ,Ol,cy,be,vi,sZ,tt,Yce,Jce,Xce,ele,tle,rle,nle,ile,ole,_I,ale,sle,cle,lle,ule,dle,y6,ple,zl,tf,rf,nf,of,af,jl,Nl,sf,$a,mo,cf,Ia,Xn,Rl,Mo,qI,Cl,qo,VI,lf,uf,WI,Al,Ul,Dl,Ml,Fs,Fi,Zi,Fo,Ll,Zl,df,ly,uy,ql,o2e,Ae,a2e,s2e,c2e,l2e,u2e,d2e,p2e,f2e,m2e,h2e,g2e,v2e,y2e,_2e,b2e,x2e,w2e,S2e,k2e,$2e,E2e,I2e,P2e,T2e,O2e,z2e,j2e,N2e,R2e,C2e,A2e,U2e,D2e,M2e,x6,w6,S6,Pa,dy,ft,uP,E6,Ple,py,I6,T6,O6,BI,j6,dP,_f,mP,fy,hP,my,gP,vP,yP,_P,bP,A6,U6,D6,M6,L6,Z6,q6,Ule,F6,Fl,Dle,Mle,Lle,V6,Zle,qle,Fle,Vle,Wle,B6,G6,K6,H6,Q6,xP,Y6,Ble,J6,X6,eq,iq,oq,aq,sq,cq,lq,uq,dq,pq,pr,fq,wP,SP,mq,hq,gq,vq,yq,_q,bq,xq,wq,bf,Sq,kq,$q,Eq,Iq,Pq,Tq,Oq,zq,hy,jq,Fe,xf,Kt,Nq,Rq,Cq,Aq,Uq,Dq,Mq,Lq,Zq,qq,Fq,Vq,Wq,Bq,Gq,Kq,Hq,Qq,Yq,Jq,eF,tF,nF,iF,$P,oF,EP,IP,aF,sF,cF,lF,uF,gy,dF,pF,fF,PP,TP,OP,mF,hF,Ry,gF,vF,yF,_F,bF,xF,zP,wF,SF,kF,$F,EF,IF,PF,TF,jP,OF,zF,jF,NF,RF,NP,Gle,Hle,Yle,Xle,tue,nue,oue,aue,sue,cue,uue,pue,mue,gue,yue,bue,wue,kue,Eue,Pue,Oue,jue,Rue,Aue,Due,Lue,que,Vue,Bue,Kue,Que,Jue,ede,rde,ide,ade,sde,lde,dde,fde,hde,vde,AF,UF,mf,Ds,LF,_y,vf,Lde,Zde,L2e,kl,hT,gT,vT,yT,_T,O9,qde,wf,z9,j9,N9,R9,rt,bT,Dy,Yt,xT,by,Zo,wT,ST,kT,$T,ET,IT,PT,TT,OT,zT,jT,NT,RT,CT,AT,UT,C9,My,Hl,Ly,Zy,DT,A9,U9,D9,M9,L9,Z9,q9,LT,F9,Fy,ZT,V9,W9,B9,FT,G9,K9,yf,H9,Q9,VT,BT,Y9,J9,eV,GT,nV,iV,aV,KT,sV,lV,uV,pV,Wy,Dpe,Lpe,vV,Kpe,By,kr,yV,_V,Z2e,Hpe,Qpe,QT,ei,Gy,jr,yi,_i,Nr,Ky,Ype,Jpe,bV,wZ,xV,q2e,F2e,wV,Xpe,SV,efe,Sf,Wl,kV,tfe,rfe,nfe,ife,ofe,afe,sfe,cfe,lfe,ufe,$V,dfe,pfe,EV,ffe,kf,$f,mfe,Ef,IV,hfe,PV,TV,OV,zV,V2e,jV,NV,RV,W2e,CV,AV,YT,UV,If,Ql,DV,gfe,vfe,yfe,_fe,bfe,JT,xfe,wfe,Sfe,kfe,$fe,Efe,Ife,Pfe,Tfe,Ofe,zfe,jfe,Nfe,Rfe,Cfe,Afe,XT,eO,tO,Ufe,Dfe,Mfe,rO,Lfe,Zfe,qfe,Ffe,Vfe,MV,Wfe,Bfe,LV,B2e,Gfe,Kfe,Hfe,G2e,ZV,Qfe,Yfe,Jfe,Xfe,eme,tme,rme,nme,ime,Sy,ome,ame,sme,cme,lme,ume,dme,pme,fme,mme,hme,gme,vme,yme,_me,bme,xme,wme,Sme,kme,$me,Eme,Ime,Pme,Tme,Ome,zme,jme,Nme,Rme,Cme,Ame,Ume,K2e,H2e,Q2e,Y2e,J2e,X2e,eZe,tZe,rZe,SZ,nZe,Fme,VV=P(()=>{Nne=Object.create,{getPrototypeOf:Rne,defineProperty:bI,getOwnPropertyNames:Cne}=Object,Ane=Object.prototype.hasOwnProperty;IZ=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var i=e?Dne??=new WeakMap:Mne??=new WeakMap,o=i.get(t);if(o)return o}r=t!=null?Nne(Rne(t)):{};let a=e||!t||!t.__esModule?bI(r,"default",{value:t,enumerable:!0}):r;for(let s of Cne(t))Ane.call(a,s)||bI(a,s,{get:Une.bind(t,s),enumerable:!0});return n&&i.set(t,a),a},de=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Lne=t=>t;Bs=(t,e)=>{for(var r in e)bI(t,r,{get:e[r],enumerable:!0,configurable:!0,set:Zne.bind(e,r)})},qne=Symbol.dispose||Symbol.for("Symbol.dispose"),Fne=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),sr=(t,e,r)=>{if(e!=null){if(typeof e!="object"&&typeof e!="function")throw TypeError('Object expected to be assigned to "using" declaration');var n;if(r&&(n=e[Fne]),n===void 0&&(n=e[qne]),typeof n!="function")throw TypeError("Object not disposable");t.push([r,n,e])}else r&&t.push([r]);return e},cr=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,c,l){return l=Error(c),l.name="SuppressedError",l.error=a,l.suppressed=s,l},i=a=>e=r?new n(a,e,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=t.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,c=>(i(c),o()))}catch(c){i(c)}if(r)throw e};return o()},Cv=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(y){if(super(),!t.IDENTIFIER.test(y))throw Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((_,b)=>`${_}${b}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((_,b)=>(b instanceof r&&(_[b.str]=(_[b.str]||0)+1),_),{})}}t._Code=n,t.nil=new n("");function i(h,...y){let _=[h[0]],b=0;for(;b<y.length;)s(_,y[b]),_.push(h[++b]);return new n(_)}t._=i;var o=new n("+");function a(h,...y){let _=[p(h[0])],b=0;for(;b<y.length;)_.push(o),s(_,y[b]),_.push(o,p(h[++b]));return c(_),new n(_)}t.str=a;function s(h,y){y instanceof n?h.push(...y._items):y instanceof r?h.push(y):h.push(d(y))}t.addCodeArg=s;function c(h){let y=1;for(;y<h.length-1;){if(h[y]===o){let _=l(h[y-1],h[y+1]);if(_!==void 0){h.splice(y-1,3,_);continue}h[y++]="+"}y++}}function l(h,y){if(y==='""')return h;if(h==='""')return y;if(typeof h=="string")return y instanceof r||h[h.length-1]!=='"'?void 0:typeof y!="string"?`${h.slice(0,-1)}${y}"`:y[0]==='"'?h.slice(0,-1)+y.slice(1):void 0;if(typeof y=="string"&&y[0]==='"'&&!(h instanceof r))return`"${h}${y.slice(1)}`}function u(h,y){return y.emptyStr()?h:h.emptyStr()?y:a`${h}${y}`}t.strConcat=u;function d(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:p(Array.isArray(h)?h.join(","):h)}function f(h){return new n(p(h))}t.stringify=f;function p(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=p;function m(h){return typeof h=="string"&&t.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}t.getProperty=m;function v(h){if(typeof h=="string"&&t.IDENTIFIER.test(h))return new n(`${h}`);throw Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}t.getEsmExportName=v;function g(h){return new n(h.toString())}t.regexpCode=g}),y2=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Cv();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof e.Name?l:this.name(l)}name(l){return new e.Name(this._newName(l))}_newName(l){let u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}t.Scope=i;class o extends e.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:d}){this.value=l,this.scopePath=e._`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=o;var a=e._`\n`;class s extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:e.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var d;if(u.ref===void 0)throw Error("CodeGen: ref must be passed in value");let f=this.toName(l),{prefix:p}=f,m=(d=u.key)!==null&&d!==void 0?d:u.ref,v=this._values[p];if(v){let y=v.get(m);if(y)return y}else v=this._values[p]=new Map;v.set(m,f);let g=this._scope[p]||(this._scope[p]=[]),h=g.length;return g[h]=u.ref,f.setValue(u,{property:p,itemIndex:h}),f}getValue(l,u){let d=this._values[l];if(d)return d.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw Error(`CodeGen: name "${d}" has no value`);return e._`${l}${d.scopePath}`})}scopeCode(l=this._values,u,d){return this._reduceValues(l,f=>{if(f.value===void 0)throw Error(`CodeGen: name "${f}" has no value`);return f.value.code},u,d)}_reduceValues(l,u,d={},f){let p=e.nil;for(let m in l){let v=l[m];if(!v)continue;let g=d[m]=d[m]||new Map;v.forEach(h=>{if(g.has(h))return;g.set(h,n.Started);let y=u(h);if(y){let _=this.opts.es5?t.varKinds.var:t.varKinds.const;p=e._`${p}${_} ${h} = ${y};${this.opts._n}`}else if(y=f?.(h))p=e._`${p}${y}${this.opts._n}`;else throw new r(h);g.set(h,n.Completed)})}return p}}t.ValueScope=s}),et=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Cv(),r=y2(),n=Cv();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=y2();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(k,O){return this}}class a extends o{constructor(k,O,B){super(),this.varKind=k,this.name=O,this.rhs=B}render({es5:k,_n:O}){let B=k?r.varKinds.var:this.varKind,ie=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ie};`+O}optimizeNames(k,O){if(k[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,k,O)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(k,O,B){super(),this.lhs=k,this.rhs=O,this.sideEffects=B}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,O){if(!(this.lhs instanceof e.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=N(this.rhs,k,O),this}get names(){let k=this.lhs instanceof e.Name?{}:{...this.lhs.names};return L(k,this.rhs)}}class c extends s{constructor(k,O,B,ie){super(k,B,ie),this.op=O}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class l extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class u extends o{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class d extends o{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class f extends o{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,O){return this.code=N(this.code,k,O),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends o{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((O,B)=>O+B.render(k),"")}optimizeNodes(){let{nodes:k}=this,O=k.length;for(;O--;){let B=k[O].optimizeNodes();Array.isArray(B)?k.splice(O,1,...B):B?k[O]=B:k.splice(O,1)}return k.length>0?this:void 0}optimizeNames(k,O){let{nodes:B}=this,ie=B.length;for(;ie--;){let me=B[ie];me.optimizeNames(k,O)||(Y(k,me.names),B.splice(ie,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((k,O)=>U(k,O.names),{})}}class m extends p{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class v extends p{}class g extends m{}g.kind="else";class h extends m{constructor(k,O){super(O),this.condition=k}render(k){let O=`if(${this.condition})`+super.render(k);return this.else&&(O+="else "+this.else.render(k)),O}optimizeNodes(){super.optimizeNodes();let k=this.condition;if(k===!0)return this.nodes;let O=this.else;if(O){let B=O.optimizeNodes();O=this.else=Array.isArray(B)?new g(B):B}if(O)return k===!1?O instanceof h?O:O.nodes:this.nodes.length?this:new h(H(k),O instanceof h?[O]:O.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,O){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(k,O),!!(super.optimizeNames(k,O)||this.else))return this.condition=N(this.condition,k,O),this}get names(){let k=super.names;return L(k,this.condition),this.else&&U(k,this.else.names),k}}h.kind="if";class y extends m{}y.kind="for";class _ extends y{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,O){if(super.optimizeNames(k,O))return this.iteration=N(this.iteration,k,O),this}get names(){return U(super.names,this.iteration.names)}}class b extends y{constructor(k,O,B,ie){super(),this.varKind=k,this.name=O,this.from=B,this.to=ie}render(k){let O=k.es5?r.varKinds.var:this.varKind,{name:B,from:ie,to:me}=this;return`for(${O} ${B}=${ie}; ${B}<${me}; ${B}++)`+super.render(k)}get names(){let k=L(super.names,this.from);return L(k,this.to)}}class x extends y{constructor(k,O,B,ie){super(),this.loop=k,this.varKind=O,this.name=B,this.iterable=ie}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,O){if(super.optimizeNames(k,O))return this.iterable=N(this.iterable,k,O),this}get names(){return U(super.names,this.iterable.names)}}class w extends m{constructor(k,O,B){super(),this.name=k,this.args=O,this.async=B}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}w.kind="func";class S extends p{render(k){return"return "+super.render(k)}}S.kind="return";class $ extends m{render(k){let O="try"+super.render(k);return this.catch&&(O+=this.catch.render(k)),this.finally&&(O+=this.finally.render(k)),O}optimizeNodes(){var k,O;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(k,O){var B,ie;return super.optimizeNames(k,O),(B=this.catch)===null||B===void 0||B.optimizeNames(k,O),(ie=this.finally)===null||ie===void 0||ie.optimizeNames(k,O),this}get names(){let k=super.names;return this.catch&&U(k,this.catch.names),this.finally&&U(k,this.finally.names),k}}class T extends m{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}T.kind="catch";class A extends m{render(k){return"finally"+super.render(k)}}A.kind="finally";class I{constructor(k,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
143
+ `:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,O){let B=this._extScope.value(k,O);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(k,O){return this._extScope.getValue(k,O)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,O,B,ie){let me=this._scope.toName(O);return B!==void 0&&ie&&(this._constants[me.str]=B),this._leafNode(new a(k,me,B)),me}const(k,O,B){return this._def(r.varKinds.const,k,O,B)}let(k,O,B){return this._def(r.varKinds.let,k,O,B)}var(k,O,B){return this._def(r.varKinds.var,k,O,B)}assign(k,O,B){return this._leafNode(new s(k,O,B))}add(k,O){return this._leafNode(new c(k,t.operators.ADD,O))}code(k){return typeof k=="function"?k():k!==e.nil&&this._leafNode(new f(k)),this}object(...k){let O=["{"];for(let[B,ie]of k)O.length>1&&O.push(","),O.push(B),(B!==ie||this.opts.es5)&&(O.push(":"),(0,e.addCodeArg)(O,ie));return O.push("}"),new e._Code(O)}if(k,O,B){if(this._blockNode(new h(k)),O&&B)this.code(O).else().code(B).endIf();else if(O)this.code(O).endIf();else if(B)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new h(k))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(h,g)}_for(k,O){return this._blockNode(k),O&&this.code(O).endFor(),this}for(k,O){return this._for(new _(k),O)}forRange(k,O,B,ie,me=this.opts.es5?r.varKinds.var:r.varKinds.let){let lt=this._scope.toName(k);return this._for(new b(me,lt,O,B),()=>ie(lt))}forOf(k,O,B,ie=r.varKinds.const){let me=this._scope.toName(k);if(this.opts.es5){let lt=O instanceof e.Name?O:this.var("_arr",O);return this.forRange("_i",0,e._`${lt}.length`,Te=>{this.var(me,e._`${lt}[${Te}]`),B(me)})}return this._for(new x("of",ie,me,O),()=>B(me))}forIn(k,O,B,ie=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,e._`Object.keys(${O})`,B);let me=this._scope.toName(k);return this._for(new x("in",ie,me,O),()=>B(me))}endFor(){return this._endBlockNode(y)}label(k){return this._leafNode(new l(k))}break(k){return this._leafNode(new u(k))}return(k){let O=new S;if(this._blockNode(O),this.code(k),O.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(k,O,B){if(!O&&!B)throw Error('CodeGen: "try" without "catch" and "finally"');let ie=new $;if(this._blockNode(ie),this.code(k),O){let me=this.name("e");this._currNode=ie.catch=new T(me),O(me)}return B&&(this._currNode=ie.finally=new A,this.code(B)),this._endBlockNode(T,A)}throw(k){return this._leafNode(new d(k))}block(k,O){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(O),this}endBlock(k){let O=this._blockStarts.pop();if(O===void 0)throw Error("CodeGen: not in self-balancing block");let B=this._nodes.length-O;if(B<0||k!==void 0&&B!==k)throw Error(`CodeGen: wrong number of nodes: ${B} vs ${k} expected`);return this._nodes.length=O,this}func(k,O=e.nil,B,ie){return this._blockNode(new w(k,O,B)),ie&&this.code(ie).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,O){let B=this._currNode;if(B instanceof k||O&&B instanceof O)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${O?`${k.kind}/${O.kind}`:k.kind}"`)}_elseNode(k){let O=this._currNode;if(!(O instanceof h))throw Error('CodeGen: "else" without "if"');return this._currNode=O.else=k,this}get _root(){return this._nodes[0]}get _currNode(){let k=this._nodes;return k[k.length-1]}set _currNode(k){let O=this._nodes;O[O.length-1]=k}}t.CodeGen=I;function U(R,k){for(let O in k)R[O]=(R[O]||0)+(k[O]||0);return R}function L(R,k){return k instanceof e._CodeOrName?U(R,k.names):R}function N(R,k,O){if(R instanceof e.Name)return B(R);if(!ie(R))return R;return new e._Code(R._items.reduce((me,lt)=>(lt instanceof e.Name&&(lt=B(lt)),lt instanceof e._Code?me.push(...lt._items):me.push(lt),me),[]));function B(me){let lt=O[me.str];return lt===void 0||k[me.str]!==1?me:(delete k[me.str],lt)}function ie(me){return me instanceof e._Code&&me._items.some(lt=>lt instanceof e.Name&&k[lt.str]===1&&O[lt.str]!==void 0)}}function Y(R,k){for(let O in k)R[O]=(R[O]||0)-(k[O]||0)}function H(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:e._`!${q(R)}`}t.not=H;var ye=E(t.operators.AND);function Pe(...R){return R.reduce(ye)}t.and=Pe;var ue=E(t.operators.OR);function W(...R){return R.reduce(ue)}t.or=W;function E(R){return(k,O)=>k===e.nil?O:O===e.nil?k:e._`${q(k)} ${R} ${q(O)}`}function q(R){return R instanceof e.Name?R:e._`(${R})`}}),kt=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=et(),r=Cv();function n(w){let S={};for(let $ of w)S[$]=!0;return S}t.toHash=n;function i(w,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(o(w,S),!a(S,w.self.RULES.all))}t.alwaysValidSchema=i;function o(w,S=w.schema){let{opts:$,self:T}=w;if(!$.strictSchema||typeof S=="boolean")return;let A=T.RULES.keywords;for(let I in S)A[I]||x(w,`unknown keyword: "${I}"`)}t.checkUnknownRules=o;function a(w,S){if(typeof w=="boolean")return!w;for(let $ in w)if(S[$])return!0;return!1}t.schemaHasRules=a;function s(w,S){if(typeof w=="boolean")return!w;for(let $ in w)if($!=="$ref"&&S.all[$])return!0;return!1}t.schemaHasRulesButRef=s;function c({topSchemaRef:w,schemaPath:S},$,T,A){if(!A){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return e._`${$}`}return e._`${w}${S}${(0,e.getProperty)(T)}`}t.schemaRefOrVal=c;function l(w){return f(decodeURIComponent(w))}t.unescapeFragment=l;function u(w){return encodeURIComponent(d(w))}t.escapeFragment=u;function d(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function f(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=f;function p(w,S){if(Array.isArray(w))for(let $ of w)S($);else S(w)}t.eachItem=p;function m({mergeNames:w,mergeToName:S,mergeValues:$,resultToName:T}){return(A,I,U,L)=>{let N=U===void 0?I:U instanceof e.Name?(I instanceof e.Name?w(A,I,U):S(A,I,U),U):I instanceof e.Name?(S(A,U,I),I):$(I,U);return L===e.Name&&!(N instanceof e.Name)?T(A,N):N}}t.mergeEvaluated={props:m({mergeNames:(w,S,$)=>w.if(e._`${$} !== true && ${S} !== undefined`,()=>{w.if(e._`${S} === true`,()=>w.assign($,!0),()=>w.assign($,e._`${$} || {}`).code(e._`Object.assign(${$}, ${S})`))}),mergeToName:(w,S,$)=>w.if(e._`${$} !== true`,()=>{S===!0?w.assign($,!0):(w.assign($,e._`${$} || {}`),g(w,$,S))}),mergeValues:(w,S)=>w===!0?!0:{...w,...S},resultToName:v}),items:m({mergeNames:(w,S,$)=>w.if(e._`${$} !== true && ${S} !== undefined`,()=>w.assign($,e._`${S} === true ? true : ${$} > ${S} ? ${$} : ${S}`)),mergeToName:(w,S,$)=>w.if(e._`${$} !== true`,()=>w.assign($,S===!0?!0:e._`${$} > ${S} ? ${$} : ${S}`)),mergeValues:(w,S)=>w===!0?!0:Math.max(w,S),resultToName:(w,S)=>w.var("items",S)})};function v(w,S){if(S===!0)return w.var("props",!0);let $=w.var("props",e._`{}`);return S!==void 0&&g(w,$,S),$}t.evaluatedPropsToName=v;function g(w,S,$){Object.keys($).forEach(T=>w.assign(e._`${S}${(0,e.getProperty)(T)}`,!0))}t.setEvaluated=g;var h={};function y(w,S){return w.scopeValue("func",{ref:S,code:h[S.code]||(h[S.code]=new r._Code(S.code))})}t.useFunc=y;var _;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(_||(t.Type=_={}));function b(w,S,$){if(w instanceof e.Name){let T=S===_.Num;return $?T?e._`"[" + ${w} + "]"`:e._`"['" + ${w} + "']"`:T?e._`"/" + ${w}`:e._`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(w).toString():"/"+d(w)}t.getErrorPath=b;function x(w,S,$=w.opts.strictSchema){if($){if(S=`strict mode: ${S}`,$===!0)throw Error(S);w.self.logger.warn(S)}}t.checkStrictMode=x}),Ta=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),ky=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=et(),r=kt(),n=Ta();t.keywordError={message:({keyword:g})=>e.str`must pass "${g}" keyword validation`},t.keyword$DataError={message:({keyword:g,schemaType:h})=>h?e.str`"${g}" keyword must be ${h} ($data)`:e.str`"${g}" keyword is invalid ($data)`};function i(g,h=t.keywordError,y,_){let{it:b}=g,{gen:x,compositeRule:w,allErrors:S}=b,$=d(g,h,y);_??(w||S)?c(x,$):l(b,e._`[${$}]`)}t.reportError=i;function o(g,h=t.keywordError,y){let{it:_}=g,{gen:b,compositeRule:x,allErrors:w}=_,S=d(g,h,y);c(b,S),!(x||w)&&l(_,n.default.vErrors)}t.reportExtraError=o;function a(g,h){g.assign(n.default.errors,h),g.if(e._`${n.default.vErrors} !== null`,()=>g.if(h,()=>g.assign(e._`${n.default.vErrors}.length`,h),()=>g.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function s({gen:g,keyword:h,schemaValue:y,data:_,errsCount:b,it:x}){if(b===void 0)throw Error("ajv implementation error");let w=g.name("err");g.forRange("i",b,n.default.errors,S=>{g.const(w,e._`${n.default.vErrors}[${S}]`),g.if(e._`${w}.instancePath === undefined`,()=>g.assign(e._`${w}.instancePath`,(0,e.strConcat)(n.default.instancePath,x.errorPath))),g.assign(e._`${w}.schemaPath`,e.str`${x.errSchemaPath}/${h}`),x.opts.verbose&&(g.assign(e._`${w}.schema`,y),g.assign(e._`${w}.data`,_))})}t.extendErrors=s;function c(g,h){let y=g.const("err",h);g.if(e._`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,e._`[${y}]`),e._`${n.default.vErrors}.push(${y})`),g.code(e._`${n.default.errors}++`)}function l(g,h){let{gen:y,validateName:_,schemaEnv:b}=g;b.$async?y.throw(e._`new ${g.ValidationError}(${h})`):(y.assign(e._`${_}.errors`,h),y.return(!1))}var u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(g,h,y){let{createErrors:_}=g.it;return _===!1?e._`{}`:f(g,h,y)}function f(g,h,y={}){let{gen:_,it:b}=g,x=[p(b,y),m(g,y)];return v(g,h,x),_.object(...x)}function p({errorPath:g},{instancePath:h}){let y=h?e.str`${g}${(0,r.getErrorPath)(h,r.Type.Str)}`:g;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,y)]}function m({keyword:g,it:{errSchemaPath:h}},{schemaPath:y,parentSchema:_}){let b=_?h:e.str`${h}/${g}`;return y&&(b=e.str`${b}${(0,r.getErrorPath)(y,r.Type.Str)}`),[u.schemaPath,b]}function v(g,{params:h,message:y},_){let{keyword:b,data:x,schemaValue:w,it:S}=g,{opts:$,propertyName:T,topSchemaRef:A,schemaPath:I}=S;_.push([u.keyword,b],[u.params,typeof h=="function"?h(g):h||e._`{}`]),$.messages&&_.push([u.message,typeof y=="function"?y(g):y]),$.verbose&&_.push([u.schema,w],[u.parentSchema,e._`${A}${I}`],[n.default.data,x]),T&&_.push([u.propertyName,T])}}),Vne=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=ky(),r=et(),n=Ta(),i={message:"boolean schema is false"};function o(c){let{gen:l,schema:u,validateName:d}=c;u===!1?s(c,!1):typeof u=="object"&&u.$async===!0?l.return(n.default.data):(l.assign(r._`${d}.errors`,null),l.return(!0))}t.topBoolOrEmptySchema=o;function a(c,l){let{gen:u,schema:d}=c;d===!1?(u.var(l,!1),s(c)):u.var(l,!0)}t.boolOrEmptySchema=a;function s(c,l){let{gen:u,data:d}=c,f={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(f,i,void 0,l)}}),PZ=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function i(){let o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=i}),TZ=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:i,self:o},a){let s=o.RULES.types[a];return s&&s!==!0&&r(i,s)}t.schemaHasRulesForType=e;function r(i,o){return o.rules.some(a=>n(i,a))}t.shouldUseGroup=r;function n(i,o){var a;return i[o.keyword]!==void 0||((a=o.definition.implements)===null||a===void 0?void 0:a.some(s=>i[s]!==void 0))}t.shouldUseRule=n}),Av=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=PZ(),r=TZ(),n=ky(),i=et(),o=kt(),a;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(a||(t.DataType=a={}));function s(_){let b=c(_.type);if(b.includes("null")){if(_.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!b.length&&_.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');_.nullable===!0&&b.push("null")}return b}t.getSchemaTypes=s;function c(_){let b=Array.isArray(_)?_:_?[_]:[];if(b.every(e.isJSONType))return b;throw Error("type must be JSONType or JSONType[]: "+b.join(","))}t.getJSONTypes=c;function l(_,b){let{gen:x,data:w,opts:S}=_,$=d(b,S.coerceTypes),T=b.length>0&&!($.length===0&&b.length===1&&(0,r.schemaHasRulesForType)(_,b[0]));if(T){let A=v(b,w,S.strictNumbers,a.Wrong);x.if(A,()=>{$.length?f(_,b,$):h(_)})}return T}t.coerceAndCheckDataType=l;var u=new Set(["string","number","integer","boolean","null"]);function d(_,b){return b?_.filter(x=>u.has(x)||b==="array"&&x==="array"):[]}function f(_,b,x){let{gen:w,data:S,opts:$}=_,T=w.let("dataType",i._`typeof ${S}`),A=w.let("coerced",i._`undefined`);$.coerceTypes==="array"&&w.if(i._`${T} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>w.assign(S,i._`${S}[0]`).assign(T,i._`typeof ${S}`).if(v(b,S,$.strictNumbers),()=>w.assign(A,S))),w.if(i._`${A} !== undefined`);for(let U of x)(u.has(U)||U==="array"&&$.coerceTypes==="array")&&I(U);w.else(),h(_),w.endIf(),w.if(i._`${A} !== undefined`,()=>{w.assign(S,A),p(_,A)});function I(U){switch(U){case"string":w.elseIf(i._`${T} == "number" || ${T} == "boolean"`).assign(A,i._`"" + ${S}`).elseIf(i._`${S} === null`).assign(A,i._`""`);return;case"number":w.elseIf(i._`${T} == "boolean" || ${S} === null
144
+ || (${T} == "string" && ${S} && ${S} == +${S})`).assign(A,i._`+${S}`);return;case"integer":w.elseIf(i._`${T} === "boolean" || ${S} === null
145
+ || (${T} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(A,i._`+${S}`);return;case"boolean":w.elseIf(i._`${S} === "false" || ${S} === 0 || ${S} === null`).assign(A,!1).elseIf(i._`${S} === "true" || ${S} === 1`).assign(A,!0);return;case"null":w.elseIf(i._`${S} === "" || ${S} === 0 || ${S} === false`),w.assign(A,null);return;case"array":w.elseIf(i._`${T} === "string" || ${T} === "number"
146
+ || ${T} === "boolean" || ${S} === null`).assign(A,i._`[${S}]`)}}}function p({gen:_,parentData:b,parentDataProperty:x},w){_.if(i._`${b} !== undefined`,()=>_.assign(i._`${b}[${x}]`,w))}function m(_,b,x,w=a.Correct){let S=w===a.Correct?i.operators.EQ:i.operators.NEQ,$;switch(_){case"null":return i._`${b} ${S} null`;case"array":$=i._`Array.isArray(${b})`;break;case"object":$=i._`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":$=T(i._`!(${b} % 1) && !isNaN(${b})`);break;case"number":$=T();break;default:return i._`typeof ${b} ${S} ${_}`}return w===a.Correct?$:(0,i.not)($);function T(A=i.nil){return(0,i.and)(i._`typeof ${b} == "number"`,A,x?i._`isFinite(${b})`:i.nil)}}t.checkDataType=m;function v(_,b,x,w){if(_.length===1)return m(_[0],b,x,w);let S,$=(0,o.toHash)(_);if($.array&&$.object){let T=i._`typeof ${b} != "object"`;S=$.null?T:i._`!${b} || ${T}`,delete $.null,delete $.array,delete $.object}else S=i.nil;$.number&&delete $.integer;for(let T in $)S=(0,i.and)(S,m(T,b,x,w));return S}t.checkDataTypes=v;var g={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:b})=>typeof _=="string"?i._`{type: ${_}}`:i._`{type: ${b}}`};function h(_){let b=y(_);(0,n.reportError)(b,g)}t.reportTypeError=h;function y(_){let{gen:b,data:x,schema:w}=_,S=(0,o.schemaRefOrVal)(_,w,"type");return{gen:b,keyword:"type",data:x,schema:w.type,schemaCode:S,schemaValue:S,parentSchema:w,params:{},it:_}}}),Wne=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=et(),r=kt();function n(o,a){let{properties:s,items:c}=o.schema;if(a==="object"&&s)for(let l in s)i(o,l,s[l].default);else a==="array"&&Array.isArray(c)&&c.forEach((l,u)=>i(o,u,l.default))}t.assignDefaults=n;function i(o,a,s){let{gen:c,compositeRule:l,data:u,opts:d}=o;if(s===void 0)return;let f=e._`${u}${(0,e.getProperty)(a)}`;if(l){(0,r.checkStrictMode)(o,`default is ignored for: ${f}`);return}let p=e._`${f} === undefined`;d.useDefaults==="empty"&&(p=e._`${p} || ${f} === null || ${f} === ""`),c.if(p,e._`${f} = ${(0,e.stringify)(s)}`)}}),Wi=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=et(),r=kt(),n=Ta(),i=kt();function o(_,b){let{gen:x,data:w,it:S}=_;x.if(d(x,w,b,S.opts.ownProperties),()=>{_.setParams({missingProperty:e._`${b}`},!0),_.error()})}t.checkReportMissingProp=o;function a({gen:_,data:b,it:{opts:x}},w,S){return(0,e.or)(...w.map($=>(0,e.and)(d(_,b,$,x.ownProperties),e._`${S} = ${$}`)))}t.checkMissingProp=a;function s(_,b){_.setParams({missingProperty:b},!0),_.error()}t.reportMissingProp=s;function c(_){return _.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}t.hasPropFunc=c;function l(_,b,x){return e._`${c(_)}.call(${b}, ${x})`}t.isOwnProperty=l;function u(_,b,x,w){let S=e._`${b}${(0,e.getProperty)(x)} !== undefined`;return w?e._`${S} && ${l(_,b,x)}`:S}t.propertyInData=u;function d(_,b,x,w){let S=e._`${b}${(0,e.getProperty)(x)} === undefined`;return w?(0,e.or)(S,(0,e.not)(l(_,b,x))):S}t.noPropertyInData=d;function f(_){return _?Object.keys(_).filter(b=>b!=="__proto__"):[]}t.allSchemaProperties=f;function p(_,b){return f(b).filter(x=>!(0,r.alwaysValidSchema)(_,b[x]))}t.schemaProperties=p;function m({schemaCode:_,data:b,it:{gen:x,topSchemaRef:w,schemaPath:S,errorPath:$},it:T},A,I,U){let L=U?e._`${_}, ${b}, ${w}${S}`:b,N=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,$)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&N.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let Y=e._`${L}, ${x.object(...N)}`;return I!==e.nil?e._`${A}.call(${I}, ${Y})`:e._`${A}(${Y})`}t.callValidateCode=m;var v=e._`new RegExp`;function g({gen:_,it:{opts:b}},x){let w=b.unicodeRegExp?"u":"",{regExp:S}=b.code,$=S(x,w);return _.scopeValue("pattern",{key:$.toString(),ref:$,code:e._`${S.code==="new RegExp"?v:(0,i.useFunc)(_,S)}(${x}, ${w})`})}t.usePattern=g;function h(_){let{gen:b,data:x,keyword:w,it:S}=_,$=b.name("valid");if(S.allErrors){let A=b.let("valid",!0);return T(()=>b.assign(A,!1)),A}return b.var($,!0),T(()=>b.break()),$;function T(A){let I=b.const("len",e._`${x}.length`);b.forRange("i",0,I,U=>{_.subschema({keyword:w,dataProp:U,dataPropType:r.Type.Num},$),b.if((0,e.not)($),A)})}}t.validateArray=h;function y(_){let{gen:b,schema:x,keyword:w,it:S}=_;if(!Array.isArray(x))throw Error("ajv implementation error");if(x.some(A=>(0,r.alwaysValidSchema)(S,A))&&!S.opts.unevaluated)return;let $=b.let("valid",!1),T=b.name("_valid");b.block(()=>x.forEach((A,I)=>{let U=_.subschema({keyword:w,schemaProp:I,compositeRule:!0},T);b.assign($,e._`${$} || ${T}`),!_.mergeValidEvaluated(U,T)&&b.if((0,e.not)($))})),_.result($,()=>_.reset(),()=>_.error(!0))}t.validateUnion=y}),Bne=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=et(),r=Ta(),n=Wi(),i=ky();function o(p,m){let{gen:v,keyword:g,schema:h,parentSchema:y,it:_}=p,b=m.macro.call(_.self,h,y,_),x=u(v,g,b);_.opts.validateSchema!==!1&&_.self.validateSchema(b,!0);let w=v.name("valid");p.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${_.errSchemaPath}/${g}`,topSchemaRef:x,compositeRule:!0},w),p.pass(w,()=>p.error(!0))}t.macroKeywordCode=o;function a(p,m){var v;let{gen:g,keyword:h,schema:y,parentSchema:_,$data:b,it:x}=p;l(x,m);let w=!b&&m.compile?m.compile.call(x.self,y,_,x):m.validate,S=u(g,h,w),$=g.let("valid");p.block$data($,T),p.ok((v=m.valid)!==null&&v!==void 0?v:$);function T(){if(m.errors===!1)U(),m.modifying&&s(p),L(()=>p.error());else{let N=m.async?A():I();m.modifying&&s(p),L(()=>c(p,N))}}function A(){let N=g.let("ruleErrs",null);return g.try(()=>U(e._`await `),Y=>g.assign($,!1).if(e._`${Y} instanceof ${x.ValidationError}`,()=>g.assign(N,e._`${Y}.errors`),()=>g.throw(Y))),N}function I(){let N=e._`${S}.errors`;return g.assign(N,null),U(e.nil),N}function U(N=m.async?e._`await `:e.nil){let Y=x.opts.passContext?r.default.this:r.default.self,H=!("compile"in m&&!b||m.schema===!1);g.assign($,e._`${N}${(0,n.callValidateCode)(p,S,Y,H)}`,m.modifying)}function L(N){var Y;g.if((0,e.not)((Y=m.valid)!==null&&Y!==void 0?Y:$),N)}}t.funcKeywordCode=a;function s(p){let{gen:m,data:v,it:g}=p;m.if(g.parentData,()=>m.assign(v,e._`${g.parentData}[${g.parentDataProperty}]`))}function c(p,m){let{gen:v}=p;v.if(e._`Array.isArray(${m})`,()=>{v.assign(r.default.vErrors,e._`${r.default.vErrors} === null ? ${m} : ${r.default.vErrors}.concat(${m})`).assign(r.default.errors,e._`${r.default.vErrors}.length`),(0,i.extendErrors)(p)},()=>p.error())}function l({schemaEnv:p},m){if(m.async&&!p.$async)throw Error("async keyword in sync schema")}function u(p,m,v){if(v===void 0)throw Error(`keyword "${m}" failed to compile`);return p.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function d(p,m,v=!1){return!m.length||m.some(g=>g==="array"?Array.isArray(p):g==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==g||v&&typeof p>"u")}t.validSchemaType=d;function f({schema:p,opts:m,self:v,errSchemaPath:g},h,y){if(Array.isArray(h.keyword)?!h.keyword.includes(y):h.keyword!==y)throw Error("ajv implementation error");let _=h.dependencies;if(_?.some(b=>!Object.prototype.hasOwnProperty.call(p,b)))throw Error(`parent schema must have dependencies of ${y}: ${_.join(",")}`);if(h.validateSchema&&!h.validateSchema(p[y])){let b=`keyword "${y}" value is invalid at path "${g}": `+v.errorsText(h.validateSchema.errors);if(m.validateSchema==="log")v.logger.error(b);else throw Error(b)}}t.validateKeywordUsage=f}),Gne=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=et(),r=kt();function n(a,{keyword:s,schemaProp:c,schema:l,schemaPath:u,errSchemaPath:d,topSchemaRef:f}){if(s!==void 0&&l!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let p=a.schema[s];return c===void 0?{schema:p,schemaPath:e._`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:p[c],schemaPath:e._`${a.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,r.escapeFragment)(c)}`}}if(l!==void 0){if(u===void 0||d===void 0||f===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:u,topSchemaRef:f,errSchemaPath:d}}throw Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function i(a,s,{dataProp:c,dataPropType:l,data:u,dataTypes:d,propertyName:f}){if(u!==void 0&&c!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:p}=s;if(c!==void 0){let{errorPath:v,dataPathArr:g,opts:h}=s,y=p.let("data",e._`${s.data}${(0,e.getProperty)(c)}`,!0);m(y),a.errorPath=e.str`${v}${(0,r.getErrorPath)(c,l,h.jsPropertySyntax)}`,a.parentDataProperty=e._`${c}`,a.dataPathArr=[...g,a.parentDataProperty]}if(u!==void 0){let v=u instanceof e.Name?u:p.let("data",u,!0);m(v),f!==void 0&&(a.propertyName=f)}d&&(a.dataTypes=d);function m(v){a.data=v,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,v]}}t.extendSubschemaData=i;function o(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:l,createErrors:u,allErrors:d}){l!==void 0&&(a.compositeRule=l),u!==void 0&&(a.createErrors=u),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=s,a.jtdMetadata=c}t.extendSubschemaMode=o}),OZ=de((t,e)=>{e.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var o,a,s;if(Array.isArray(n)){if(o=n.length,o!=i.length)return!1;for(a=o;a--!==0;)if(!r(n[a],i[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(s=Object.keys(n),o=s.length,o!==Object.keys(i).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(i,s[a]))return!1;for(a=o;a--!==0;){var c=s[a];if(!r(n[c],i[c]))return!1}return!0}return n!==n&&i!==i}}),Kne=de((t,e)=>{var r=e.exports=function(o,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var c=typeof s=="function"?s:s.pre||function(){},l=s.post||function(){};n(a,c,l,o,"",o)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(o,a,s,c,l,u,d,f,p,m){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,l,u,d,f,p,m);for(var v in c){var g=c[v];if(Array.isArray(g)){if(v in r.arrayKeywords)for(var h=0;h<g.length;h++)n(o,a,s,g[h],l+"/"+v+"/"+h,u,l,v,c,h)}else if(v in r.propsKeywords){if(g&&typeof g=="object")for(var y in g)n(o,a,s,g[y],l+"/"+v+"/"+i(y),u,l,v,c,y)}else(v in r.keywords||o.allKeys&&!(v in r.skipKeywords))&&n(o,a,s,g,l+"/"+v,u,l,v,c)}s(c,l,u,d,f,p,m)}}function i(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}}),$y=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=kt(),r=OZ(),n=Kne(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(g,h=!0){return typeof g=="boolean"?!0:h===!0?!s(g):h?c(g)<=h:!1}t.inlineRef=o;var a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(let h in g){if(a.has(h))return!0;let y=g[h];if(Array.isArray(y)&&y.some(s)||typeof y=="object"&&s(y))return!0}return!1}function c(g){let h=0;for(let y in g){if(y==="$ref")return 1/0;if(h++,!i.has(y)&&(typeof g[y]=="object"&&(0,e.eachItem)(g[y],_=>h+=c(_)),h===1/0))return 1/0}return h}function l(g,h="",y){y!==!1&&(h=f(h));let _=g.parse(h);return u(g,_)}t.getFullPath=l;function u(g,h){return g.serialize(h).split("#")[0]+"#"}t._getFullPath=u;var d=/#\/?$/;function f(g){return g?g.replace(d,""):""}t.normalizeId=f;function p(g,h,y){return y=f(y),g.resolve(h,y)}t.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function v(g,h){if(typeof g=="boolean")return{};let{schemaId:y,uriResolver:_}=this.opts,b=f(g[y]||h),x={"":b},w=l(_,b,!1),S={},$=new Set;return n(g,{allKeys:!0},(I,U,L,N)=>{if(N===void 0)return;let Y=w+U,H=x[N];typeof I[y]=="string"&&(H=ye.call(this,I[y])),Pe.call(this,I.$anchor),Pe.call(this,I.$dynamicAnchor),x[U]=H;function ye(ue){let W=this.opts.uriResolver.resolve;if(ue=f(H?W(H,ue):ue),$.has(ue))throw A(ue);$.add(ue);let E=this.refs[ue];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?T(I,E.schema,ue):ue!==f(Y)&&(ue[0]==="#"?(T(I,S[ue],ue),S[ue]=I):this.refs[ue]=Y),ue}function Pe(ue){if(typeof ue=="string"){if(!m.test(ue))throw Error(`invalid anchor "${ue}"`);ye.call(this,`#${ue}`)}}}),S;function T(I,U,L){if(U!==void 0&&!r(I,U))throw A(L)}function A(I){return Error(`reference "${I}" resolves to more than one schema`)}}t.getSchemaRefs=v}),Ey=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Vne(),r=Av(),n=TZ(),i=Av(),o=Wne(),a=Bne(),s=Gne(),c=et(),l=Ta(),u=$y(),d=kt(),f=ky();function p(M){if(w(M)&&($(M),x(M))){h(M);return}m(M,()=>(0,e.topBoolOrEmptySchema)(M))}t.validateFunctionCode=p;function m({gen:M,validateName:V,schema:Q,schemaEnv:ne,opts:xe},Be){xe.code.es5?M.func(V,c._`${l.default.data}, ${l.default.valCxt}`,ne.$async,()=>{M.code(c._`"use strict"; ${_(Q,xe)}`),g(M,xe),M.code(Be)}):M.func(V,c._`${l.default.data}, ${v(xe)}`,ne.$async,()=>M.code(_(Q,xe)).code(Be))}function v(M){return c._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${M.dynamicRef?c._`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(M,V){M.if(l.default.valCxt,()=>{M.var(l.default.instancePath,c._`${l.default.valCxt}.${l.default.instancePath}`),M.var(l.default.parentData,c._`${l.default.valCxt}.${l.default.parentData}`),M.var(l.default.parentDataProperty,c._`${l.default.valCxt}.${l.default.parentDataProperty}`),M.var(l.default.rootData,c._`${l.default.valCxt}.${l.default.rootData}`),V.dynamicRef&&M.var(l.default.dynamicAnchors,c._`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{M.var(l.default.instancePath,c._`""`),M.var(l.default.parentData,c._`undefined`),M.var(l.default.parentDataProperty,c._`undefined`),M.var(l.default.rootData,l.default.data),V.dynamicRef&&M.var(l.default.dynamicAnchors,c._`{}`)})}function h(M){let{schema:V,opts:Q,gen:ne}=M;m(M,()=>{Q.$comment&&V.$comment&&N(M),I(M),ne.let(l.default.vErrors,null),ne.let(l.default.errors,0),Q.unevaluated&&y(M),T(M),Y(M)})}function y(M){let{gen:V,validateName:Q}=M;M.evaluated=V.const("evaluated",c._`${Q}.evaluated`),V.if(c._`${M.evaluated}.dynamicProps`,()=>V.assign(c._`${M.evaluated}.props`,c._`undefined`)),V.if(c._`${M.evaluated}.dynamicItems`,()=>V.assign(c._`${M.evaluated}.items`,c._`undefined`))}function _(M,V){let Q=typeof M=="object"&&M[V.schemaId];return Q&&(V.code.source||V.code.process)?c._`/*# sourceURL=${Q} */`:c.nil}function b(M,V){if(w(M)&&($(M),x(M))){S(M,V);return}(0,e.boolOrEmptySchema)(M,V)}function x({schema:M,self:V}){if(typeof M=="boolean")return!M;for(let Q in M)if(V.RULES.all[Q])return!0;return!1}function w(M){return typeof M.schema!="boolean"}function S(M,V){let{schema:Q,gen:ne,opts:xe}=M;xe.$comment&&Q.$comment&&N(M),U(M),L(M);let Be=ne.const("_errs",l.default.errors);T(M,Be),ne.var(V,c._`${Be} === ${l.default.errors}`)}function $(M){(0,d.checkUnknownRules)(M),A(M)}function T(M,V){if(M.opts.jtd)return ye(M,[],!1,V);let Q=(0,r.getSchemaTypes)(M.schema),ne=(0,r.coerceAndCheckDataType)(M,Q);ye(M,Q,!ne,V)}function A(M){let{schema:V,errSchemaPath:Q,opts:ne,self:xe}=M;V.$ref&&ne.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(V,xe.RULES)&&xe.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function I(M){let{schema:V,opts:Q}=M;V.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,d.checkStrictMode)(M,"default is ignored in the schema root")}function U(M){let V=M.schema[M.opts.schemaId];V&&(M.baseId=(0,u.resolveUrl)(M.opts.uriResolver,M.baseId,V))}function L(M){if(M.schema.$async&&!M.schemaEnv.$async)throw Error("async schema in sync schema")}function N({gen:M,schemaEnv:V,schema:Q,errSchemaPath:ne,opts:xe}){let Be=Q.$comment;if(xe.$comment===!0)M.code(c._`${l.default.self}.logger.log(${Be})`);else if(typeof xe.$comment=="function"){let hr=c.str`${ne}/$comment`,Dn=M.scopeValue("root",{ref:V.root});M.code(c._`${l.default.self}.opts.$comment(${Be}, ${hr}, ${Dn}.schema)`)}}function Y(M){let{gen:V,schemaEnv:Q,validateName:ne,ValidationError:xe,opts:Be}=M;Q.$async?V.if(c._`${l.default.errors} === 0`,()=>V.return(l.default.data),()=>V.throw(c._`new ${xe}(${l.default.vErrors})`)):(V.assign(c._`${ne}.errors`,l.default.vErrors),Be.unevaluated&&H(M),V.return(c._`${l.default.errors} === 0`))}function H({gen:M,evaluated:V,props:Q,items:ne}){Q instanceof c.Name&&M.assign(c._`${V}.props`,Q),ne instanceof c.Name&&M.assign(c._`${V}.items`,ne)}function ye(M,V,Q,ne){let{gen:xe,schema:Be,data:hr,allErrors:Dn,opts:Lr,self:Zr}=M,{RULES:_r}=Zr;if(Be.$ref&&(Lr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Be,_r))){xe.block(()=>me(M,"$ref",_r.all.$ref.definition));return}Lr.jtd||ue(M,V),xe.block(()=>{for(let en of _r.rules)Xo(en);Xo(_r.post)});function Xo(en){(0,n.shouldUseGroup)(Be,en)&&(en.type?(xe.if((0,i.checkDataType)(en.type,hr,Lr.strictNumbers)),Pe(M,en),V.length===1&&V[0]===en.type&&Q&&(xe.else(),(0,i.reportTypeError)(M)),xe.endIf()):Pe(M,en),Dn||xe.if(c._`${l.default.errors} === ${ne||0}`))}}function Pe(M,V){let{gen:Q,schema:ne,opts:{useDefaults:xe}}=M;xe&&(0,o.assignDefaults)(M,V.type),Q.block(()=>{for(let Be of V.rules)(0,n.shouldUseRule)(ne,Be)&&me(M,Be.keyword,Be.definition,V.type)})}function ue(M,V){M.schemaEnv.meta||!M.opts.strictTypes||(W(M,V),!M.opts.allowUnionTypes&&E(M,V),q(M,M.dataTypes))}function W(M,V){if(V.length){if(!M.dataTypes.length){M.dataTypes=V;return}V.forEach(Q=>{k(M.dataTypes,Q)||B(M,`type "${Q}" not allowed by context "${M.dataTypes.join(",")}"`)}),O(M,V)}}function E(M,V){V.length>1&&!(V.length===2&&V.includes("null"))&&B(M,"use allowUnionTypes to allow union type keyword")}function q(M,V){let Q=M.self.RULES.all;for(let ne in Q){let xe=Q[ne];if(typeof xe=="object"&&(0,n.shouldUseRule)(M.schema,xe)){let{type:Be}=xe.definition;Be.length&&!Be.some(hr=>R(V,hr))&&B(M,`missing type "${Be.join(",")}" for keyword "${ne}"`)}}}function R(M,V){return M.includes(V)||V==="number"&&M.includes("integer")}function k(M,V){return M.includes(V)||V==="integer"&&M.includes("number")}function O(M,V){let Q=[];for(let ne of M.dataTypes)k(V,ne)?Q.push(ne):V.includes("integer")&&ne==="number"&&Q.push("integer");M.dataTypes=Q}function B(M,V){let Q=M.schemaEnv.baseId+M.errSchemaPath;V+=` at "${Q}" (strictTypes)`,(0,d.checkStrictMode)(M,V,M.opts.strictTypes)}class ie{constructor(V,Q,ne){if((0,a.validateKeywordUsage)(V,Q,ne),this.gen=V.gen,this.allErrors=V.allErrors,this.keyword=ne,this.data=V.data,this.schema=V.schema[ne],this.$data=Q.$data&&V.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(V,this.schema,ne,this.$data),this.schemaType=Q.schemaType,this.parentSchema=V.schema,this.params={},this.it=V,this.def=Q,this.$data)this.schemaCode=V.gen.const("vSchema",nr(this.$data,V));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw Error(`${ne} value must be ${JSON.stringify(Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=V.gen.const("_errs",l.default.errors))}result(V,Q,ne){this.failResult((0,c.not)(V),Q,ne)}failResult(V,Q,ne){this.gen.if(V),ne?ne():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(V,Q){this.failResult((0,c.not)(V),void 0,Q)}fail(V){if(V===void 0){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(V),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(V){if(!this.$data)return this.fail(V);let{schemaCode:Q}=this;this.fail(c._`${Q} !== undefined && (${(0,c.or)(this.invalid$data(),V)})`)}error(V,Q,ne){if(Q){this.setParams(Q),this._error(V,ne),this.setParams({});return}this._error(V,ne)}_error(V,Q){(V?f.reportExtraError:f.reportError)(this,this.def.error,Q)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(V){this.allErrors||this.gen.if(V)}setParams(V,Q){Q?Object.assign(this.params,V):this.params=V}block$data(V,Q,ne=c.nil){this.gen.block(()=>{this.check$data(V,ne),Q()})}check$data(V=c.nil,Q=c.nil){if(!this.$data)return;let{gen:ne,schemaCode:xe,schemaType:Be,def:hr}=this;ne.if((0,c.or)(c._`${xe} === undefined`,Q)),V!==c.nil&&ne.assign(V,!0),(Be.length||hr.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),V!==c.nil&&ne.assign(V,!1)),ne.else()}invalid$data(){let{gen:V,schemaCode:Q,schemaType:ne,def:xe,it:Be}=this;return(0,c.or)(hr(),Dn());function hr(){if(ne.length){if(!(Q instanceof c.Name))throw Error("ajv implementation error");let Lr=Array.isArray(ne)?ne:[ne];return c._`${(0,i.checkDataTypes)(Lr,Q,Be.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function Dn(){if(xe.validateSchema){let Lr=V.scopeValue("validate$data",{ref:xe.validateSchema});return c._`!${Lr}(${Q})`}return c.nil}}subschema(V,Q){let ne=(0,s.getSubschema)(this.it,V);(0,s.extendSubschemaData)(ne,this.it,V),(0,s.extendSubschemaMode)(ne,V);let xe={...this.it,...ne,items:void 0,props:void 0};return b(xe,Q),xe}mergeEvaluated(V,Q){let{it:ne,gen:xe}=this;ne.opts.unevaluated&&(ne.props!==!0&&V.props!==void 0&&(ne.props=d.mergeEvaluated.props(xe,V.props,ne.props,Q)),ne.items!==!0&&V.items!==void 0&&(ne.items=d.mergeEvaluated.items(xe,V.items,ne.items,Q)))}mergeValidEvaluated(V,Q){let{it:ne,gen:xe}=this;if(ne.opts.unevaluated&&(ne.props!==!0||ne.items!==!0))return xe.if(Q,()=>this.mergeEvaluated(V,c.Name)),!0}}t.KeywordCxt=ie;function me(M,V,Q,ne){let xe=new ie(M,Q,V);"code"in Q?Q.code(xe,ne):xe.$data&&Q.validate?(0,a.funcKeywordCode)(xe,Q):"macro"in Q?(0,a.macroKeywordCode)(xe,Q):(Q.compile||Q.validate)&&(0,a.funcKeywordCode)(xe,Q)}var lt=/^\/(?:[^~]|~0|~1)*$/,Te=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function nr(M,{dataLevel:V,dataNames:Q,dataPathArr:ne}){let xe,Be;if(M==="")return l.default.rootData;if(M[0]==="/"){if(!lt.test(M))throw Error(`Invalid JSON-pointer: ${M}`);xe=M,Be=l.default.rootData}else{let Zr=Te.exec(M);if(!Zr)throw Error(`Invalid JSON-pointer: ${M}`);let _r=+Zr[1];if(xe=Zr[2],xe==="#"){if(_r>=V)throw Error(Lr("property/index",_r));return ne[V-_r]}if(_r>V)throw Error(Lr("data",_r));if(Be=Q[V-_r],!xe)return Be}let hr=Be,Dn=xe.split("/");for(let Zr of Dn)Zr&&(Be=c._`${Be}${(0,c.getProperty)((0,d.unescapeJsonPointer)(Zr))}`,hr=c._`${hr} && ${Be}`);return hr;function Lr(Zr,_r){return`Cannot access ${Zr} ${_r} levels up, current level is ${V}`}}t.getData=nr}),HI=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),Iy=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=$y();class r extends Error{constructor(i,o,a,s){super(s||`can't resolve reference ${a} from id ${o}`),this.missingRef=(0,e.resolveUrl)(i,o,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}t.default=r}),QI=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=et(),r=HI(),n=Ta(),i=$y(),o=kt(),a=Ey();class s{constructor(y){var _;this.refs={},this.dynamicAnchors={};let b;typeof y.schema=="object"&&(b=y.schema),this.schema=y.schema,this.schemaId=y.schemaId,this.root=y.root||this,this.baseId=(_=y.baseId)!==null&&_!==void 0?_:(0,i.normalizeId)(b?.[y.schemaId||"$id"]),this.schemaPath=y.schemaPath,this.localRefs=y.localRefs,this.meta=y.meta,this.$async=b?.$async,this.refs={}}}t.SchemaEnv=s;function c(h){let y=d.call(this,h);if(y)return y;let _=(0,i.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:b,lines:x}=this.opts.code,{ownProperties:w}=this.opts,S=new e.CodeGen(this.scope,{es5:b,lines:x,ownProperties:w}),$;h.$async&&($=S.scopeValue("Error",{ref:r.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));let T=S.scopeName("validate");h.validateName=T;let A={gen:S,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,e.stringify)(h.schema)}:{ref:h.schema}),validateName:T,ValidationError:$,schema:h.schema,schemaEnv:h,rootId:_,baseId:h.baseId||_,schemaPath:e.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this},I;try{this._compilations.add(h),(0,a.validateFunctionCode)(A),S.optimize(this.opts.code.optimize);let U=S.toString();I=`${S.scopeRefs(n.default.scope)}return ${U}`,this.opts.code.process&&(I=this.opts.code.process(I,h));let L=Function(`${n.default.self}`,`${n.default.scope}`,I)(this,this.scope.get());if(this.scope.value(T,{ref:L}),L.errors=null,L.schema=h.schema,L.schemaEnv=h,h.$async&&(L.$async=!0),this.opts.code.source===!0&&(L.source={validateName:T,validateCode:U,scopeValues:S._values}),this.opts.unevaluated){let{props:N,items:Y}=A;L.evaluated={props:N instanceof e.Name?void 0:N,items:Y instanceof e.Name?void 0:Y,dynamicProps:N instanceof e.Name,dynamicItems:Y instanceof e.Name},L.source&&(L.source.evaluated=(0,e.stringify)(L.evaluated))}return h.validate=L,h}catch(U){throw delete h.validate,delete h.validateName,I&&this.logger.error("Error compiling schema, function code:",I),U}finally{this._compilations.delete(h)}}t.compileSchema=c;function l(h,y,_){var b;_=(0,i.resolveUrl)(this.opts.uriResolver,y,_);let x=h.refs[_];if(x)return x;let w=p.call(this,h,_);if(w===void 0){let S=(b=h.localRefs)===null||b===void 0?void 0:b[_],{schemaId:$}=this.opts;S&&(w=new s({schema:S,schemaId:$,root:h,baseId:y}))}if(w!==void 0)return h.refs[_]=u.call(this,w)}t.resolveRef=l;function u(h){return(0,i.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:c.call(this,h)}function d(h){for(let y of this._compilations)if(f(y,h))return y}t.getCompilingSchema=d;function f(h,y){return h.schema===y.schema&&h.root===y.root&&h.baseId===y.baseId}function p(h,y){let _;for(;typeof(_=this.refs[y])=="string";)y=_;return _||this.schemas[y]||m.call(this,h,y)}function m(h,y){let _=this.opts.uriResolver.parse(y),b=(0,i._getFullPath)(this.opts.uriResolver,_),x=(0,i.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&b===x)return g.call(this,_,h);let w=(0,i.normalizeId)(b),S=this.refs[w]||this.schemas[w];if(typeof S=="string"){let $=m.call(this,h,S);return typeof $?.schema!="object"?void 0:g.call(this,_,$)}if(typeof S?.schema=="object"){if(S.validate||c.call(this,S),w===(0,i.normalizeId)(y)){let{schema:$}=S,{schemaId:T}=this.opts,A=$[T];return A&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,A)),new s({schema:$,schemaId:T,root:h,baseId:x})}return g.call(this,_,S)}}t.resolveSchema=m;var v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(h,{baseId:y,schema:_,root:b}){var x;if(((x=h.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let $ of h.fragment.slice(1).split("/")){if(typeof _=="boolean")return;let T=_[(0,o.unescapeFragment)($)];if(T===void 0)return;_=T;let A=typeof _=="object"&&_[this.opts.schemaId];!v.has($)&&A&&(y=(0,i.resolveUrl)(this.opts.uriResolver,y,A))}let w;if(typeof _!="boolean"&&_.$ref&&!(0,o.schemaHasRulesButRef)(_,this.RULES)){let $=(0,i.resolveUrl)(this.opts.uriResolver,y,_.$ref);w=m.call(this,b,$)}let{schemaId:S}=this.opts;if(w=w||new s({schema:_,schemaId:S,root:b,baseId:y}),w.schema!==w.root.schema)return w}}),Hne=de((t,e)=>{e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Qne=de((t,e)=>{var r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};e.exports={HEX:r}}),Yne=de((t,e)=>{var{HEX:r}=Qne(),n=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function i(h){if(l(h,".")<3)return{host:h,isIPV4:!1};let y=h.match(n)||[],[_]=y;return _?{host:c(_,"."),isIPV4:!0}:{host:h,isIPV4:!1}}function o(h,y=!1){let _="",b=!0;for(let x of h){if(r[x]===void 0)return;x!=="0"&&b===!0&&(b=!1),b||(_+=x)}return y&&_.length===0&&(_="0"),_}function a(h){let y=0,_={error:!1,address:"",zone:""},b=[],x=[],w=!1,S=!1,$=!1;function T(){if(x.length){if(w===!1){let A=o(x);if(A!==void 0)b.push(A);else return _.error=!0,!1}x.length=0}return!0}for(let A=0;A<h.length;A++){let I=h[A];if(!(I==="["||I==="]"))if(I===":"){if(S===!0&&($=!0),!T())break;if(y++,b.push(":"),y>7){_.error=!0;break}A-1>=0&&h[A-1]===":"&&(S=!0);continue}else if(I==="%"){if(!T())break;w=!0}else{x.push(I);continue}}return x.length&&(w?_.zone=x.join(""):$?b.push(x.join("")):b.push(o(x))),_.address=b.join(""),_}function s(h){if(l(h,":")<2)return{host:h,isIPV6:!1};let y=a(h);if(y.error)return{host:h,isIPV6:!1};{let{address:_,address:b}=y;return y.zone&&(_+="%"+y.zone,b+="%25"+y.zone),{host:_,escapedHost:b,isIPV6:!0}}}function c(h,y){let _="",b=!0,x=h.length;for(let w=0;w<x;w++){let S=h[w];S==="0"&&b?(w+1<=x&&h[w+1]===y||w+1===x)&&(_+=S,b=!1):(S===y?b=!0:b=!1,_+=S)}return _}function l(h,y){let _=0;for(let b=0;b<h.length;b++)h[b]===y&&_++;return _}var u=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,f=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;function m(h){let y=[];for(;h.length;)if(h.match(u))h=h.replace(u,"");else if(h.match(d))h=h.replace(d,"/");else if(h.match(f))h=h.replace(f,"/"),y.pop();else if(h==="."||h==="..")h="";else{let _=h.match(p);if(_){let b=_[0];h=h.slice(b.length),y.push(b)}else throw Error("Unexpected dot segment condition")}return y.join("")}function v(h,y){let _=y!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=_(h.scheme)),h.userinfo!==void 0&&(h.userinfo=_(h.userinfo)),h.host!==void 0&&(h.host=_(h.host)),h.path!==void 0&&(h.path=_(h.path)),h.query!==void 0&&(h.query=_(h.query)),h.fragment!==void 0&&(h.fragment=_(h.fragment)),h}function g(h){let y=[];if(h.userinfo!==void 0&&(y.push(h.userinfo),y.push("@")),h.host!==void 0){let _=unescape(h.host),b=i(_);if(b.isIPV4)_=b.host;else{let x=s(b.host);x.isIPV6===!0?_=`[${x.escapedHost}]`:_=h.host}y.push(_)}return(typeof h.port=="number"||typeof h.port=="string")&&(y.push(":"),y.push(String(h.port))),y.length?y.join(""):void 0}e.exports={recomposeAuthority:g,normalizeComponentEncoding:v,removeDotSegments:m,normalizeIPv4:i,normalizeIPv6:s,stringArrayToHexStripped:o}}),Jne=de((t,e)=>{var r=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function i(b){return typeof b.secure=="boolean"?b.secure:String(b.scheme).toLowerCase()==="wss"}function o(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function a(b){let x=String(b.scheme).toLowerCase()==="https";return(b.port===(x?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function s(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function c(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){let[x,w]=b.resourceName.split("?");b.path=x&&x!=="/"?x:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function l(b,x){if(!b.path)return b.error="URN can not be parsed",b;let w=b.path.match(n);if(w){let S=x.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];let $=`${S}:${x.nid||b.nid}`,T=_[$];b.path=void 0,T&&(b=T.parse(b,x))}else b.error=b.error||"URN can not be parsed.";return b}function u(b,x){let w=x.scheme||b.scheme||"urn",S=b.nid.toLowerCase(),$=`${w}:${x.nid||S}`,T=_[$];T&&(b=T.serialize(b,x));let A=b,I=b.nss;return A.path=`${S||x.nid}:${I}`,x.skipEscape=!0,A}function d(b,x){let w=b;return w.uuid=w.nss,w.nss=void 0,!x.tolerant&&(!w.uuid||!r.test(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function f(b){let x=b;return x.nss=(b.uuid||"").toLowerCase(),x}var p={scheme:"http",domainHost:!0,parse:o,serialize:a},m={scheme:"https",domainHost:p.domainHost,parse:o,serialize:a},v={scheme:"ws",domainHost:!0,parse:s,serialize:c},g={scheme:"wss",domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},h={scheme:"urn",parse:l,serialize:u,skipNormalize:!0},y={scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0},_={http:p,https:m,ws:v,wss:g,urn:h,"urn:uuid":y};e.exports=_}),Xne=de((t,e)=>{var{normalizeIPv6:r,normalizeIPv4:n,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:a}=Yne(),s=Jne();function c(y,_){return typeof y=="string"?y=f(g(y,_),_):typeof y=="object"&&(y=g(f(y,_),_)),y}function l(y,_,b){let x=Object.assign({scheme:"null"},b),w=u(g(y,x),g(_,x),x,!0);return f(w,{...x,skipEscape:!0})}function u(y,_,b,x){let w={};return x||(y=g(f(y,b),b),_=g(f(_,b),b)),b=b||{},!b.tolerant&&_.scheme?(w.scheme=_.scheme,w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=i(_.path||""),w.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(w.userinfo=_.userinfo,w.host=_.host,w.port=_.port,w.path=i(_.path||""),w.query=_.query):(_.path?(_.path.charAt(0)==="/"?w.path=i(_.path):((y.userinfo!==void 0||y.host!==void 0||y.port!==void 0)&&!y.path?w.path="/"+_.path:y.path?w.path=y.path.slice(0,y.path.lastIndexOf("/")+1)+_.path:w.path=_.path,w.path=i(w.path)),w.query=_.query):(w.path=y.path,_.query!==void 0?w.query=_.query:w.query=y.query),w.userinfo=y.userinfo,w.host=y.host,w.port=y.port),w.scheme=y.scheme),w.fragment=_.fragment,w}function d(y,_,b){return typeof y=="string"?(y=unescape(y),y=f(a(g(y,b),!0),{...b,skipEscape:!0})):typeof y=="object"&&(y=f(a(y,!0),{...b,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=f(a(g(_,b),!0),{...b,skipEscape:!0})):typeof _=="object"&&(_=f(a(_,!0),{...b,skipEscape:!0})),y.toLowerCase()===_.toLowerCase()}function f(y,_){let b={host:y.host,scheme:y.scheme,userinfo:y.userinfo,port:y.port,path:y.path,query:y.query,nid:y.nid,nss:y.nss,uuid:y.uuid,fragment:y.fragment,reference:y.reference,resourceName:y.resourceName,secure:y.secure,error:""},x=Object.assign({},_),w=[],S=s[(x.scheme||b.scheme||"").toLowerCase()];S&&S.serialize&&S.serialize(b,x),b.path!==void 0&&(x.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),x.reference!=="suffix"&&b.scheme&&w.push(b.scheme,":");let $=o(b);if($!==void 0&&(x.reference!=="suffix"&&w.push("//"),w.push($),b.path&&b.path.charAt(0)!=="/"&&w.push("/")),b.path!==void 0){let T=b.path;!x.absolutePath&&(!S||!S.absolutePath)&&(T=i(T)),$===void 0&&(T=T.replace(/^\/\//u,"/%2F")),w.push(T)}return b.query!==void 0&&w.push("?",b.query),b.fragment!==void 0&&w.push("#",b.fragment),w.join("")}var p=Array.from({length:127},(y,_)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(_)));function m(y){let _=0;for(let b=0,x=y.length;b<x;++b)if(_=y.charCodeAt(b),_>126||p[_])return!0;return!1}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(y,_){let b=Object.assign({},_),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=y.indexOf("%")!==-1,S=!1;b.reference==="suffix"&&(y=(b.scheme?b.scheme+":":"")+"//"+y);let $=y.match(v);if($){if(x.scheme=$[1],x.userinfo=$[3],x.host=$[4],x.port=parseInt($[5],10),x.path=$[6]||"",x.query=$[7],x.fragment=$[8],isNaN(x.port)&&(x.port=$[5]),x.host){let A=n(x.host);if(A.isIPV4===!1){let I=r(A.host);x.host=I.host.toLowerCase(),S=I.isIPV6}else x.host=A.host,S=!0}x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==x.reference&&(x.error=x.error||"URI is not a "+b.reference+" reference.");let T=s[(b.scheme||x.scheme||"").toLowerCase()];if(!b.unicodeSupport&&(!T||!T.unicodeSupport)&&x.host&&(b.domainHost||T&&T.domainHost)&&S===!1&&m(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase())}catch(A){x.error=x.error||"Host's domain name can not be converted to ASCII: "+A}(!T||T&&!T.skipNormalize)&&(w&&x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),w&&x.host!==void 0&&(x.host=unescape(x.host)),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),T&&T.parse&&T.parse(x,b)}else x.error=x.error||"URI can not be parsed.";return x}var h={SCHEMES:s,normalize:c,resolve:l,resolveComponents:u,equal:d,serialize:f,parse:g};e.exports=h,e.exports.default=h,e.exports.fastUri=h}),eie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xne();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),tie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Ey();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=HI(),i=Iy(),o=PZ(),a=QI(),s=et(),c=$y(),l=Av(),u=kt(),d=Hne(),f=eie(),p=(W,E)=>new RegExp(W,E);p.code="new RegExp";var m=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function _(W){var E,q,R,k,O,B,ie,me,lt,Te,nr,M,V,Q,ne,xe,Be,hr,Dn,Lr,Zr,_r,Xo,en,Mn;let ea=W.strict,$c=(E=W.code)===null||E===void 0?void 0:E.optimize,ta=$c===!0||$c===void 0?1:$c||0,Ju=(R=(q=W.code)===null||q===void 0?void 0:q.regExp)!==null&&R!==void 0?R:p,Vb=(k=W.uriResolver)!==null&&k!==void 0?k:f.default;return{strictSchema:(B=(O=W.strictSchema)!==null&&O!==void 0?O:ea)!==null&&B!==void 0?B:!0,strictNumbers:(me=(ie=W.strictNumbers)!==null&&ie!==void 0?ie:ea)!==null&&me!==void 0?me:!0,strictTypes:(Te=(lt=W.strictTypes)!==null&&lt!==void 0?lt:ea)!==null&&Te!==void 0?Te:"log",strictTuples:(M=(nr=W.strictTuples)!==null&&nr!==void 0?nr:ea)!==null&&M!==void 0?M:"log",strictRequired:(Q=(V=W.strictRequired)!==null&&V!==void 0?V:ea)!==null&&Q!==void 0?Q:!1,code:W.code?{...W.code,optimize:ta,regExp:Ju}:{optimize:ta,regExp:Ju},loopRequired:(ne=W.loopRequired)!==null&&ne!==void 0?ne:y,loopEnum:(xe=W.loopEnum)!==null&&xe!==void 0?xe:y,meta:(Be=W.meta)!==null&&Be!==void 0?Be:!0,messages:(hr=W.messages)!==null&&hr!==void 0?hr:!0,inlineRefs:(Dn=W.inlineRefs)!==null&&Dn!==void 0?Dn:!0,schemaId:(Lr=W.schemaId)!==null&&Lr!==void 0?Lr:"$id",addUsedSchema:(Zr=W.addUsedSchema)!==null&&Zr!==void 0?Zr:!0,validateSchema:(_r=W.validateSchema)!==null&&_r!==void 0?_r:!0,validateFormats:(Xo=W.validateFormats)!==null&&Xo!==void 0?Xo:!0,unicodeRegExp:(en=W.unicodeRegExp)!==null&&en!==void 0?en:!0,int32range:(Mn=W.int32range)!==null&&Mn!==void 0?Mn:!0,uriResolver:Vb}}class b{constructor(E={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts={...E,..._(E)};let{es5:q,lines:R}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:q,lines:R}),this.logger=U(E.logger);let k=E.validateFormats;E.validateFormats=!1,this.RULES=(0,o.getRules)(),x.call(this,g,E,"NOT SUPPORTED"),x.call(this,h,E,"DEPRECATED","warn"),this._metaOpts=A.call(this),E.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&T.call(this,E.keywords),typeof E.meta=="object"&&this.addMetaSchema(E.meta),S.call(this),E.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:E,meta:q,schemaId:R}=this.opts,k=d;R==="id"&&(k={...d},k.id=k.$id,delete k.$id),q&&E&&this.addMetaSchema(k,k[R],!1)}defaultMeta(){let{meta:E,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof E=="object"?E[q]||E:void 0}validate(E,q){let R;if(typeof E=="string"){if(R=this.getSchema(E),!R)throw Error(`no schema with key or ref "${E}"`)}else R=this.compile(E);let k=R(q);return"$async"in R||(this.errors=R.errors),k}compile(E,q){let R=this._addSchema(E,q);return R.validate||this._compileSchemaEnv(R)}compileAsync(E,q){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:R}=this.opts;return k.call(this,E,q);async function k(Te,nr){await O.call(this,Te.$schema);let M=this._addSchema(Te,nr);return M.validate||B.call(this,M)}async function O(Te){Te&&!this.getSchema(Te)&&await k.call(this,{$ref:Te},!0)}async function B(Te){try{return this._compileSchemaEnv(Te)}catch(nr){if(!(nr instanceof i.default))throw nr;return ie.call(this,nr),await me.call(this,nr.missingSchema),B.call(this,Te)}}function ie({missingSchema:Te,missingRef:nr}){if(this.refs[Te])throw Error(`AnySchema ${Te} is loaded but ${nr} cannot be resolved`)}async function me(Te){let nr=await lt.call(this,Te);this.refs[Te]||await O.call(this,nr.$schema),this.refs[Te]||this.addSchema(nr,Te,q)}async function lt(Te){let nr=this._loading[Te];if(nr)return nr;try{return await(this._loading[Te]=R(Te))}finally{delete this._loading[Te]}}}addSchema(E,q,R,k=this.opts.validateSchema){if(Array.isArray(E)){for(let B of E)this.addSchema(B,void 0,R,k);return this}let O;if(typeof E=="object"){let{schemaId:B}=this.opts;if(O=E[B],O!==void 0&&typeof O!="string")throw Error(`schema ${B} must be string`)}return q=(0,c.normalizeId)(q||O),this._checkUnique(q),this.schemas[q]=this._addSchema(E,R,q,k,!0),this}addMetaSchema(E,q,R=this.opts.validateSchema){return this.addSchema(E,q,!0,R),this}validateSchema(E,q){if(typeof E=="boolean")return!0;let R;if(R=E.$schema,R!==void 0&&typeof R!="string")throw Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let k=this.validate(R,E);if(!k&&q){let O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw Error(O)}return k}getSchema(E){let q;for(;typeof(q=w.call(this,E))=="string";)E=q;if(q===void 0){let{schemaId:R}=this.opts,k=new a.SchemaEnv({schema:{},schemaId:R});if(q=a.resolveSchema.call(this,k,E),!q)return;this.refs[E]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(typeof E){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let q=w.call(this,E);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[E],delete this.refs[E],this}case"object":{let q=E;this._cache.delete(q);let R=E[this.opts.schemaId];return R&&(R=(0,c.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(E){for(let q of E)this.addKeyword(q);return this}addKeyword(E,q){let R;if(typeof E=="string")R=E,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=R);else if(typeof E=="object"&&q===void 0){if(q=E,R=q.keyword,Array.isArray(R)&&!R.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(N.call(this,R,q),!q)return(0,u.eachItem)(R,O=>Y.call(this,O)),this;ye.call(this,q);let k={...q,type:(0,l.getJSONTypes)(q.type),schemaType:(0,l.getJSONTypes)(q.schemaType)};return(0,u.eachItem)(R,k.type.length===0?O=>Y.call(this,O,k):O=>k.type.forEach(B=>Y.call(this,O,k,B))),this}getKeyword(E){let q=this.RULES.all[E];return typeof q=="object"?q.definition:!!q}removeKeyword(E){let{RULES:q}=this;delete q.keywords[E],delete q.all[E];for(let R of q.rules){let k=R.rules.findIndex(O=>O.keyword===E);k>=0&&R.rules.splice(k,1)}return this}addFormat(E,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[E]=q,this}errorsText(E=this.errors,{separator:q=", ",dataVar:R="data"}={}){return!E||E.length===0?"No errors":E.map(k=>`${R}${k.instancePath} ${k.message}`).reduce((k,O)=>k+q+O)}$dataMetaSchema(E,q){let R=this.RULES.all;E=JSON.parse(JSON.stringify(E));for(let k of q){let O=k.split("/").slice(1),B=E;for(let ie of O)B=B[ie];for(let ie in R){let me=R[ie];if(typeof me!="object")continue;let{$data:lt}=me.definition,Te=B[ie];lt&&Te&&(B[ie]=ue(Te))}}return E}_removeAllSchemas(E,q){for(let R in E){let k=E[R];(!q||q.test(R))&&(typeof k=="string"?delete E[R]:k&&!k.meta&&(this._cache.delete(k.schema),delete E[R]))}}_addSchema(E,q,R,k=this.opts.validateSchema,O=this.opts.addUsedSchema){let B,{schemaId:ie}=this.opts;if(typeof E=="object")B=E[ie];else{if(this.opts.jtd)throw Error("schema must be object");if(typeof E!="boolean")throw Error("schema must be object or boolean")}let me=this._cache.get(E);if(me!==void 0)return me;R=(0,c.normalizeId)(B||R);let lt=c.getSchemaRefs.call(this,E,R);return me=new a.SchemaEnv({schema:E,schemaId:ie,meta:q,baseId:R,localRefs:lt}),this._cache.set(me.schema,me),O&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=me),k&&this.validateSchema(E,!0),me}_checkUnique(E){if(this.schemas[E]||this.refs[E])throw Error(`schema with key or id "${E}" already exists`)}_compileSchemaEnv(E){if(E.meta?this._compileMetaSchema(E):a.compileSchema.call(this,E),!E.validate)throw Error("ajv implementation error");return E.validate}_compileMetaSchema(E){let q=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,E)}finally{this.opts=q}}}b.ValidationError=n.default,b.MissingRefError=i.default,t.default=b;function x(W,E,q,R="error"){for(let k in W){let O=k;O in E&&this.logger[R](`${q}: option ${k}. ${W[O]}`)}}function w(W){return W=(0,c.normalizeId)(W),this.schemas[W]||this.refs[W]}function S(){let W=this.opts.schemas;if(W)if(Array.isArray(W))this.addSchema(W);else for(let E in W)this.addSchema(W[E],E)}function $(){for(let W in this.opts.formats){let E=this.opts.formats[W];E&&this.addFormat(W,E)}}function T(W){if(Array.isArray(W)){this.addVocabulary(W);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let E in W){let q=W[E];q.keyword||(q.keyword=E),this.addKeyword(q)}}function A(){let W={...this.opts};for(let E of m)delete W[E];return W}var I={log(){},warn(){},error(){}};function U(W){if(W===!1)return I;if(W===void 0)return console;if(W.log&&W.warn&&W.error)return W;throw Error("logger must implement log, warn and error methods")}var L=/^[a-z_$][a-z0-9_$:-]*$/i;function N(W,E){let{RULES:q}=this;if((0,u.eachItem)(W,R=>{if(q.keywords[R])throw Error(`Keyword ${R} is already defined`);if(!L.test(R))throw Error(`Keyword ${R} has invalid name`)}),!!E&&E.$data&&!("code"in E||"validate"in E))throw Error('$data keyword must have "code" or "validate" function')}function Y(W,E,q){var R;let k=E?.post;if(q&&k)throw Error('keyword with "post" flag cannot have "type"');let{RULES:O}=this,B=k?O.post:O.rules.find(({type:me})=>me===q);if(B||(B={type:q,rules:[]},O.rules.push(B)),O.keywords[W]=!0,!E)return;let ie={keyword:W,definition:{...E,type:(0,l.getJSONTypes)(E.type),schemaType:(0,l.getJSONTypes)(E.schemaType)}};E.before?H.call(this,B,ie,E.before):B.rules.push(ie),O.all[W]=ie,(R=E.implements)===null||R===void 0||R.forEach(me=>this.addKeyword(me))}function H(W,E,q){let R=W.rules.findIndex(k=>k.keyword===q);R>=0?W.rules.splice(R,0,E):(W.rules.push(E),this.logger.warn(`rule ${q} is not defined`))}function ye(W){let{metaSchema:E}=W;E!==void 0&&(W.$data&&this.opts.$data&&(E=ue(E)),W.validateSchema=this.compile(E,!0))}var Pe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ue(W){return{anyOf:[W,Pe]}}}),rie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),nie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Iy(),r=Wi(),n=et(),i=Ta(),o=QI(),a=kt(),s={keyword:"$ref",schemaType:"string",code(u){let{gen:d,schema:f,it:p}=u,{baseId:m,schemaEnv:v,validateName:g,opts:h,self:y}=p,{root:_}=v;if((f==="#"||f==="#/")&&m===_.baseId)return x();let b=o.resolveRef.call(y,_,m,f);if(b===void 0)throw new e.default(p.opts.uriResolver,m,f);if(b instanceof o.SchemaEnv)return w(b);return S(b);function x(){if(v===_)return l(u,g,v,v.$async);let $=d.scopeValue("root",{ref:_});return l(u,n._`${$}.validate`,_,_.$async)}function w($){let T=c(u,$);l(u,T,$,$.$async)}function S($){let T=d.scopeValue("schema",h.code.source===!0?{ref:$,code:(0,n.stringify)($)}:{ref:$}),A=d.name("valid"),I=u.subschema({schema:$,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:f},A);u.mergeEvaluated(I),u.ok(A)}}};function c(u,d){let{gen:f}=u;return d.validate?f.scopeValue("validate",{ref:d.validate}):n._`${f.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=c;function l(u,d,f,p){let{gen:m,it:v}=u,{allErrors:g,schemaEnv:h,opts:y}=v,_=y.passContext?i.default.this:n.nil;p?b():x();function b(){if(!h.$async)throw Error("async schema referenced by sync schema");let $=m.let("valid");m.try(()=>{m.code(n._`await ${(0,r.callValidateCode)(u,d,_)}`),S(d),!g&&m.assign($,!0)},T=>{m.if(n._`!(${T} instanceof ${v.ValidationError})`,()=>m.throw(T)),w(T),!g&&m.assign($,!1)}),u.ok($)}function x(){u.result((0,r.callValidateCode)(u,d,_),()=>S(d),()=>w(d))}function w($){let T=n._`${$}.errors`;m.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${T} : ${i.default.vErrors}.concat(${T})`),m.assign(i.default.errors,n._`${i.default.vErrors}.length`)}function S($){var T;if(!v.opts.unevaluated)return;let A=(T=f?.validate)===null||T===void 0?void 0:T.evaluated;if(v.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(v.props=a.mergeEvaluated.props(m,A.props,v.props));else{let I=m.var("props",n._`${$}.evaluated.props`);v.props=a.mergeEvaluated.props(m,I,v.props,n.Name)}if(v.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(v.items=a.mergeEvaluated.items(m,A.items,v.items));else{let I=m.var("items",n._`${$}.evaluated.items`);v.items=a.mergeEvaluated.items(m,I,v.items,n.Name)}}}t.callRef=l,t.default=s}),iie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=rie(),r=nie(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),oie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:a,schemaCode:s})=>e.str`must be ${n[a].okStr} ${s}`,params:({keyword:a,schemaCode:s})=>e._`{comparison: ${n[a].okStr}, limit: ${s}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(a){let{keyword:s,data:c,schemaCode:l}=a;a.fail$data(e._`${c} ${n[s].fail} ${l} || isNaN(${c})`)}};t.default=o}),aie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message:({schemaCode:i})=>e.str`must be multiple of ${i}`,params:({schemaCode:i})=>e._`{multipleOf: ${i}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(i){let{gen:o,data:a,schemaCode:s,it:c}=i,l=c.opts.multipleOfPrecision,u=o.let("res"),d=l?e._`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:e._`${u} !== parseInt(${u})`;i.fail$data(e._`(${s} === 0 || (${u} = ${a}/${s}, ${d}))`)}};t.default=n}),sie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){let n=r.length,i=0,o=0,a;for(;o<n;)i++,a=r.charCodeAt(o++),a>=55296&&a<=56319&&o<n&&(a=r.charCodeAt(o),(a&64512)===56320&&o++);return i}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),cie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n=sie(),i={message({keyword:a,schemaCode:s}){let c=a==="maxLength"?"more":"fewer";return e.str`must NOT have ${c} than ${s} characters`},params:({schemaCode:a})=>e._`{limit: ${a}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:i,code(a){let{keyword:s,data:c,schemaCode:l,it:u}=a,d=s==="maxLength"?e.operators.GT:e.operators.LT,f=u.opts.unicode===!1?e._`${c}.length`:e._`${(0,r.useFunc)(a.gen,n.default)}(${c})`;a.fail$data(e._`${f} ${d} ${l}`)}};t.default=o}),lie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r=kt(),n=et(),i={message:({schemaCode:a})=>n.str`must match pattern "${a}"`,params:({schemaCode:a})=>n._`{pattern: ${a}}`},o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i,code(a){let{gen:s,data:c,$data:l,schema:u,schemaCode:d,it:f}=a,p=f.opts.unicodeRegExp?"u":"";if(l){let{regExp:m}=f.opts.code,v=m.code==="new RegExp"?n._`new RegExp`:(0,r.useFunc)(s,m),g=s.let("valid");s.try(()=>s.assign(g,n._`${v}(${d}, ${p}).test(${c})`),()=>s.assign(g,!1)),a.fail$data(n._`!${g}`)}else{let m=(0,e.usePattern)(a,u);a.fail$data(n._`!${m}.test(${c})`)}}};t.default=o}),uie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:o}){let a=i==="maxProperties"?"more":"fewer";return e.str`must NOT have ${a} than ${o} properties`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(i){let{keyword:o,data:a,schemaCode:s}=i,c=o==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data(e._`Object.keys(${a}).length ${c} ${s}`)}};t.default=n}),die=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r=et(),n=kt(),i={message:({params:{missingProperty:a}})=>r.str`must have required property '${a}'`,params:({params:{missingProperty:a}})=>r._`{missingProperty: ${a}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:i,code(a){let{gen:s,schema:c,schemaCode:l,data:u,$data:d,it:f}=a,{opts:p}=f;if(!d&&c.length===0)return;let m=c.length>=p.loopRequired;if(f.allErrors?v():g(),p.strictRequired){let _=a.parentSchema.properties,{definedProperties:b}=a.it;for(let x of c)if(_?.[x]===void 0&&!b.has(x)){let w=f.schemaEnv.baseId+f.errSchemaPath,S=`required property "${x}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(f,S,f.opts.strictRequired)}}function v(){if(m||d)a.block$data(r.nil,h);else for(let _ of c)(0,e.checkReportMissingProp)(a,_)}function g(){let _=s.let("missing");if(m||d){let b=s.let("valid",!0);a.block$data(b,()=>y(_,b)),a.ok(b)}else s.if((0,e.checkMissingProp)(a,c,_)),(0,e.reportMissingProp)(a,_),s.else()}function h(){s.forOf("prop",l,_=>{a.setParams({missingProperty:_}),s.if((0,e.noPropertyInData)(s,u,_,p.ownProperties),()=>a.error())})}function y(_,b){a.setParams({missingProperty:_}),s.forOf(_,l,()=>{s.assign(b,(0,e.propertyInData)(s,u,_,p.ownProperties)),s.if((0,r.not)(b),()=>{a.error(),s.break()})},r.nil)}}};t.default=o}),pie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:o}){let a=i==="maxItems"?"more":"fewer";return e.str`must NOT have ${a} than ${o} items`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(i){let{keyword:o,data:a,schemaCode:s}=i,c=o==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data(e._`${a}.length ${c} ${s}`)}};t.default=n}),YI=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=OZ();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),fie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Av(),r=et(),n=kt(),i=YI(),o={message:({params:{i:s,j:c}})=>r.str`must NOT have duplicate items (items ## ${c} and ${s} are identical)`,params:({params:{i:s,j:c}})=>r._`{i: ${s}, j: ${c}}`},a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(s){let{gen:c,data:l,$data:u,schema:d,parentSchema:f,schemaCode:p,it:m}=s;if(!u&&!d)return;let v=c.let("valid"),g=f.items?(0,e.getSchemaTypes)(f.items):[];s.block$data(v,h,r._`${p} === false`),s.ok(v);function h(){let x=c.let("i",r._`${l}.length`),w=c.let("j");s.setParams({i:x,j:w}),c.assign(v,!0),c.if(r._`${x} > 1`,()=>(y()?_:b)(x,w))}function y(){return g.length>0&&!g.some(x=>x==="object"||x==="array")}function _(x,w){let S=c.name("item"),$=(0,e.checkDataTypes)(g,S,m.opts.strictNumbers,e.DataType.Wrong),T=c.const("indices",r._`{}`);c.for(r._`;${x}--;`,()=>{c.let(S,r._`${l}[${x}]`),c.if($,r._`continue`),g.length>1&&c.if(r._`typeof ${S} == "string"`,r._`${S} += "_"`),c.if(r._`typeof ${T}[${S}] == "number"`,()=>{c.assign(w,r._`${T}[${S}]`),s.error(),c.assign(v,!1).break()}).code(r._`${T}[${S}] = ${x}`)})}function b(x,w){let S=(0,n.useFunc)(c,i.default),$=c.name("outer");c.label($).for(r._`;${x}--;`,()=>c.for(r._`${w} = ${x}; ${w}--;`,()=>c.if(r._`${S}(${l}[${x}], ${l}[${w}])`,()=>{s.error(),c.assign(v,!1).break($)})))}}};t.default=a}),mie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n=YI(),i={message:"must be equal to constant",params:({schemaCode:a})=>e._`{allowedValue: ${a}}`},o={keyword:"const",$data:!0,error:i,code(a){let{gen:s,data:c,$data:l,schemaCode:u,schema:d}=a;l||d&&typeof d=="object"?a.fail$data(e._`!${(0,r.useFunc)(s,n.default)}(${c}, ${u})`):a.fail(e._`${d} !== ${c}`)}};t.default=o}),hie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n=YI(),i={message:"must be equal to one of the allowed values",params:({schemaCode:a})=>e._`{allowedValues: ${a}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:i,code(a){let{gen:s,data:c,$data:l,schema:u,schemaCode:d,it:f}=a;if(!l&&u.length===0)throw Error("enum must have non-empty array");let p=u.length>=f.opts.loopEnum,m,v=()=>m??(m=(0,r.useFunc)(s,n.default)),g;if(p||l)g=s.let("valid"),a.block$data(g,h);else{if(!Array.isArray(u))throw Error("ajv implementation error");let _=s.const("vSchema",d);g=(0,e.or)(...u.map((b,x)=>y(_,x)))}a.pass(g);function h(){s.assign(g,!1),s.forOf("v",d,_=>s.if(e._`${v()}(${c}, ${_})`,()=>s.assign(g,!0).break()))}function y(_,b){let x=u[b];return typeof x=="object"&&x!==null?e._`${v()}(${c}, ${_}[${b}])`:e._`${c} === ${x}`}}};t.default=o}),gie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=oie(),r=aie(),n=cie(),i=lie(),o=uie(),a=die(),s=pie(),c=fie(),l=mie(),u=hie(),d=[e.default,r.default,n.default,i.default,o.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];t.default=d}),zZ=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=et(),r=kt(),n={message:({params:{len:a}})=>e.str`must NOT have more than ${a} items`,params:({params:{len:a}})=>e._`{limit: ${a}}`},i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(a){let{parentSchema:s,it:c}=a,{items:l}=s;if(!Array.isArray(l)){(0,r.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(a,l)}};function o(a,s){let{gen:c,schema:l,data:u,keyword:d,it:f}=a;f.items=!0;let p=c.const("len",e._`${u}.length`);if(l===!1)a.setParams({len:s.length}),a.pass(e._`${p} <= ${s.length}`);else if(typeof l=="object"&&!(0,r.alwaysValidSchema)(f,l)){let v=c.var("valid",e._`${p} <= ${s.length}`);c.if((0,e.not)(v),()=>m(v)),a.ok(v)}function m(v){c.forRange("i",s.length,p,g=>{a.subschema({keyword:d,dataProp:g,dataPropType:r.Type.Num},v),!f.allErrors&&c.if((0,e.not)(v),()=>c.break())})}}t.validateAdditionalItems=o,t.default=i}),jZ=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=et(),r=kt(),n=Wi(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return o(a,"additionalItems",s);c.items=!0,!(0,r.alwaysValidSchema)(c,s)&&a.ok((0,n.validateArray)(a))}};function o(a,s,c=a.schema){let{gen:l,parentSchema:u,data:d,keyword:f,it:p}=a;g(u),p.opts.unevaluated&&c.length&&p.items!==!0&&(p.items=r.mergeEvaluated.items(l,c.length,p.items));let m=l.name("valid"),v=l.const("len",e._`${d}.length`);c.forEach((h,y)=>{(0,r.alwaysValidSchema)(p,h)||(l.if(e._`${v} > ${y}`,()=>a.subschema({keyword:f,schemaProp:y,dataProp:y},m)),a.ok(m))});function g(h){let{opts:y,errSchemaPath:_}=p,b=c.length,x=b===h.minItems&&(b===h.maxItems||h[s]===!1);if(y.strictTuples&&!x){let w=`"${f}" is ${b}-tuple, but minItems or maxItems/${s} are not specified or different at path "${_}"`;(0,r.checkStrictMode)(p,w,y.strictTuples)}}}t.validateTuple=o,t.default=i}),vie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=jZ(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),yie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n=Wi(),i=zZ(),o={message:({params:{len:s}})=>e.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>e._`{limit: ${s}}`},a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(s){let{schema:c,parentSchema:l,it:u}=s,{prefixItems:d}=l;u.items=!0,!(0,r.alwaysValidSchema)(u,c)&&(d?(0,i.validateAdditionalItems)(s,d):s.ok((0,n.validateArray)(s)))}};t.default=a}),_ie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n={message:({params:{min:o,max:a}})=>a===void 0?e.str`must contain at least ${o} valid item(s)`:e.str`must contain at least ${o} and no more than ${a} valid item(s)`,params:({params:{min:o,max:a}})=>a===void 0?e._`{minContains: ${o}}`:e._`{minContains: ${o}, maxContains: ${a}}`},i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){let{gen:a,schema:s,parentSchema:c,data:l,it:u}=o,d,f,{minContains:p,maxContains:m}=c;u.opts.next?(d=p===void 0?1:p,f=m):d=1;let v=a.const("len",e._`${l}.length`);if(o.setParams({min:d,max:f}),f===void 0&&d===0){(0,r.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&d>f){(0,r.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(u,s)){let b=e._`${v} >= ${d}`;f!==void 0&&(b=e._`${b} && ${v} <= ${f}`),o.pass(b);return}u.items=!0;let g=a.name("valid");f===void 0&&d===1?y(g,()=>a.if(g,()=>a.break())):d===0?(a.let(g,!0),f!==void 0&&a.if(e._`${l}.length > 0`,h)):(a.let(g,!1),h()),o.result(g,()=>o.reset());function h(){let b=a.name("_valid"),x=a.let("count",0);y(b,()=>a.if(b,()=>_(x)))}function y(b,x){a.forRange("i",0,v,w=>{o.subschema({keyword:"contains",dataProp:w,dataPropType:r.Type.Num,compositeRule:!0},b),x()})}function _(b){a.code(e._`${b}++`),f===void 0?a.if(e._`${b} >= ${d}`,()=>a.assign(g,!0).break()):(a.if(e._`${b} > ${f}`,()=>a.assign(g,!1).break()),d===1?a.assign(g,!0):a.if(e._`${b} >= ${d}`,()=>a.assign(g,!0)))}}};t.default=i}),bie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=et(),r=kt(),n=Wi();t.error={message:({params:{property:c,depsCount:l,deps:u}})=>{let d=l===1?"property":"properties";return e.str`must have ${d} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:d}})=>e._`{property: ${c},
147
+ missingProperty: ${d},
148
+ depsCount: ${l},
149
+ deps: ${u}}`};var i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){let[l,u]=o(c);a(c,l),s(c,u)}};function o({schema:c}){let l={},u={};for(let d in c){if(d==="__proto__")continue;let f=Array.isArray(c[d])?l:u;f[d]=c[d]}return[l,u]}function a(c,l=c.schema){let{gen:u,data:d,it:f}=c;if(Object.keys(l).length===0)return;let p=u.let("missing");for(let m in l){let v=l[m];if(v.length===0)continue;let g=(0,n.propertyInData)(u,d,m,f.opts.ownProperties);c.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),f.allErrors?u.if(g,()=>{for(let h of v)(0,n.checkReportMissingProp)(c,h)}):(u.if(e._`${g} && (${(0,n.checkMissingProp)(c,v,p)})`),(0,n.reportMissingProp)(c,p),u.else())}}t.validatePropertyDeps=a;function s(c,l=c.schema){let{gen:u,data:d,keyword:f,it:p}=c,m=u.name("valid");for(let v in l)(0,r.alwaysValidSchema)(p,l[v])||(u.if((0,n.propertyInData)(u,d,v,p.opts.ownProperties),()=>{let g=c.subschema({keyword:f,schemaProp:v},m);c.mergeValidEvaluated(g,m)},()=>u.var(m,!0)),c.ok(m))}t.validateSchemaDeps=s,t.default=i}),xie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n={message:"property name must be valid",params:({params:o})=>e._`{propertyName: ${o.propertyName}}`},i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){let{gen:a,schema:s,data:c,it:l}=o;if((0,r.alwaysValidSchema)(l,s))return;let u=a.name("valid");a.forIn("key",c,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),a.if((0,e.not)(u),()=>{o.error(!0),!l.allErrors&&a.break()})}),o.ok(u)}};t.default=i}),NZ=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r=et(),n=Ta(),i=kt(),o={message:"must NOT have additional properties",params:({params:s})=>r._`{additionalProperty: ${s.additionalProperty}}`},a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(s){let{gen:c,schema:l,parentSchema:u,data:d,errsCount:f,it:p}=s;if(!f)throw Error("ajv implementation error");let{allErrors:m,opts:v}=p;if(p.props=!0,v.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(p,l))return;let g=(0,e.allSchemaProperties)(u.properties),h=(0,e.allSchemaProperties)(u.patternProperties);y(),s.ok(r._`${f} === ${n.default.errors}`);function y(){c.forIn("key",d,S=>{!g.length&&!h.length?x(S):c.if(_(S),()=>x(S))})}function _(S){let $;if(g.length>8){let T=(0,i.schemaRefOrVal)(p,u.properties,"properties");$=(0,e.isOwnProperty)(c,T,S)}else g.length?$=(0,r.or)(...g.map(T=>r._`${S} === ${T}`)):$=r.nil;return h.length&&($=(0,r.or)($,...h.map(T=>r._`${(0,e.usePattern)(s,T)}.test(${S})`))),(0,r.not)($)}function b(S){c.code(r._`delete ${d}[${S}]`)}function x(S){if(v.removeAdditional==="all"||v.removeAdditional&&l===!1){b(S);return}if(l===!1){s.setParams({additionalProperty:S}),s.error(),!m&&c.break();return}if(typeof l=="object"&&!(0,i.alwaysValidSchema)(p,l)){let $=c.name("valid");v.removeAdditional==="failing"?(w(S,$,!1),c.if((0,r.not)($),()=>{s.reset(),b(S)})):(w(S,$),!m&&c.if((0,r.not)($),()=>c.break()))}}function w(S,$,T){let A={keyword:"additionalProperties",dataProp:S,dataPropType:i.Type.Str};T===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(A,$)}}};t.default=a}),wie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ey(),r=Wi(),n=kt(),i=NZ(),o={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:l,data:u,it:d}=a;d.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));let f=(0,r.allSchemaProperties)(c);for(let h of f)d.definedProperties.add(h);d.opts.unevaluated&&f.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(s,(0,n.toHash)(f),d.props));let p=f.filter(h=>!(0,n.alwaysValidSchema)(d,c[h]));if(p.length===0)return;let m=s.name("valid");for(let h of p)v(h)?g(h):(s.if((0,r.propertyInData)(s,u,h,d.opts.ownProperties)),g(h),!d.allErrors&&s.else().var(m,!0),s.endIf()),a.it.definedProperties.add(h),a.ok(m);function v(h){return d.opts.useDefaults&&!d.compositeRule&&c[h].default!==void 0}function g(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},m)}}};t.default=o}),Sie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r=et(),n=kt(),i=kt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:l,parentSchema:u,it:d}=a,{opts:f}=d,p=(0,e.allSchemaProperties)(c),m=p.filter(x=>(0,n.alwaysValidSchema)(d,c[x]));if(p.length===0||m.length===p.length&&(!d.opts.unevaluated||d.props===!0))return;let v=f.strictSchema&&!f.allowMatchingProperties&&u.properties,g=s.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,i.evaluatedPropsToName)(s,d.props));let{props:h}=d;y();function y(){for(let x of p)v&&_(x),d.allErrors?b(x):(s.var(g,!0),b(x),s.if(g))}function _(x){for(let w in v)new RegExp(x).test(w)&&(0,n.checkStrictMode)(d,`property ${w} matches pattern ${x} (use allowMatchingProperties)`)}function b(x){s.forIn("key",l,w=>{s.if(r._`${(0,e.usePattern)(a,x)}.test(${w})`,()=>{let S=m.includes(x);S||a.subschema({keyword:"patternProperties",schemaProp:x,dataProp:w,dataPropType:i.Type.Str},g),d.opts.unevaluated&&h!==!0?s.assign(r._`${h}[${w}]`,!0):!S&&!d.allErrors&&s.if((0,r.not)(g),()=>s.break())})})}}};t.default=o}),kie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:i,schema:o,it:a}=n;if((0,e.alwaysValidSchema)(a,o)){n.fail();return}let s=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),n.failResult(s,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),$ie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),Eie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>e._`{passingSchemas: ${o.passing}}`},i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){let{gen:a,schema:s,parentSchema:c,it:l}=o;if(!Array.isArray(s))throw Error("ajv implementation error");if(l.opts.discriminator&&c.discriminator)return;let u=s,d=a.let("valid",!1),f=a.let("passing",null),p=a.name("_valid");o.setParams({passing:f}),a.block(m),o.result(d,()=>o.reset(),()=>o.error(!0));function m(){u.forEach((v,g)=>{let h;(0,r.alwaysValidSchema)(l,v)?a.var(p,!0):h=o.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},p),g>0&&a.if(e._`${p} && ${d}`).assign(d,!1).assign(f,e._`[${f}, ${g}]`).else(),a.if(p,()=>{a.assign(d,!0),a.assign(f,g),h&&o.mergeEvaluated(h,e.Name)})})}}};t.default=i}),Iie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:"allOf",schemaType:"array",code(n){let{gen:i,schema:o,it:a}=n;if(!Array.isArray(o))throw Error("ajv implementation error");let s=i.name("valid");o.forEach((c,l)=>{if((0,e.alwaysValidSchema)(a,c))return;let u=n.subschema({keyword:"allOf",schemaProp:l},s);n.ok(s),n.mergeEvaluated(u)})}};t.default=r}),Pie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=kt(),n={message:({params:a})=>e.str`must match "${a.ifClause}" schema`,params:({params:a})=>e._`{failingKeyword: ${a.ifClause}}`},i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(a){let{gen:s,parentSchema:c,it:l}=a;c.then===void 0&&c.else===void 0&&(0,r.checkStrictMode)(l,'"if" without "then" and "else" is ignored');let u=o(l,"then"),d=o(l,"else");if(!u&&!d)return;let f=s.let("valid",!0),p=s.name("_valid");if(m(),a.reset(),u&&d){let g=s.let("ifClause");a.setParams({ifClause:g}),s.if(p,v("then",g),v("else",g))}else u?s.if(p,v("then")):s.if((0,e.not)(p),v("else"));a.pass(f,()=>a.error(!0));function m(){let g=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);a.mergeEvaluated(g)}function v(g,h){return()=>{let y=a.subschema({keyword:g},p);s.assign(f,p),a.mergeValidEvaluated(y,f),h?s.assign(h,e._`${g}`):a.setParams({ifClause:g})}}}};function o(a,s){let c=a.schema[s];return c!==void 0&&!(0,r.alwaysValidSchema)(a,c)}t.default=i}),Tie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kt(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:o}){i.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),Oie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zZ(),r=vie(),n=jZ(),i=yie(),o=_ie(),a=bie(),s=xie(),c=NZ(),l=wie(),u=Sie(),d=kie(),f=$ie(),p=Eie(),m=Iie(),v=Pie(),g=Tie();function h(y=!1){let _=[d.default,f.default,p.default,m.default,v.default,g.default,s.default,c.default,a.default,l.default,u.default];return y?_.push(r.default,i.default):_.push(e.default,n.default),_.push(o.default),_}t.default=h}),zie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message:({schemaCode:i})=>e.str`must match format "${i}"`,params:({schemaCode:i})=>e._`{format: ${i}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(i,o){let{gen:a,data:s,$data:c,schema:l,schemaCode:u,it:d}=i,{opts:f,errSchemaPath:p,schemaEnv:m,self:v}=d;if(!f.validateFormats)return;c?g():h();function g(){let y=a.scopeValue("formats",{ref:v.formats,code:f.code.formats}),_=a.const("fDef",e._`${y}[${u}]`),b=a.let("fType"),x=a.let("format");a.if(e._`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>a.assign(b,e._`${_}.type || "string"`).assign(x,e._`${_}.validate`),()=>a.assign(b,e._`"string"`).assign(x,_)),i.fail$data((0,e.or)(w(),S()));function w(){return f.strictSchema===!1?e.nil:e._`${u} && !${x}`}function S(){let $=m.$async?e._`(${_}.async ? await ${x}(${s}) : ${x}(${s}))`:e._`${x}(${s})`,T=e._`(typeof ${x} == "function" ? ${$} : ${x}.test(${s}))`;return e._`${x} && ${x} !== true && ${b} === ${o} && !${T}`}}function h(){let y=v.formats[l];if(!y){w();return}if(y===!0)return;let[_,b,x]=S(y);_===o&&i.pass($());function w(){if(f.strictSchema===!1){v.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${l}" ignored in schema at path "${p}"`}}function S(T){let A=T instanceof RegExp?(0,e.regexpCode)(T):f.code.formats?e._`${f.code.formats}${(0,e.getProperty)(l)}`:void 0,I=a.scopeValue("formats",{key:l,ref:T,code:A});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,e._`${I}.validate`]:["string",T,I]}function $(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!m.$async)throw Error("async format in sync schema");return e._`await ${x}(${s})`}return typeof b=="function"?e._`${x}(${s})`:e._`${x}.test(${s})`}}}};t.default=n}),jie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zie(),r=[e.default];t.default=r}),Nie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Rie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=iie(),r=gie(),n=Oie(),i=jie(),o=Nie(),a=[e.default,r.default,(0,n.default)(),i.default,o.metadataVocabulary,o.contentVocabulary];t.default=a}),Cie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),Aie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=Cie(),n=QI(),i=Iy(),o=kt(),a={message:({params:{discrError:c,tagName:l}})=>c===r.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:c,tag:l,tagName:u}})=>e._`{error: ${c}, tag: ${u}, tagValue: ${l}}`},s={keyword:"discriminator",type:"object",schemaType:"object",error:a,code(c){let{gen:l,data:u,schema:d,parentSchema:f,it:p}=c,{oneOf:m}=f;if(!p.opts.discriminator)throw Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!m)throw Error("discriminator: requires oneOf keyword");let g=l.let("valid",!1),h=l.const("tag",e._`${u}${(0,e.getProperty)(v)}`);l.if(e._`typeof ${h} == "string"`,()=>y(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:v})),c.ok(g);function y(){let x=b();l.if(!1);for(let w in x)l.elseIf(e._`${h} === ${w}`),l.assign(g,_(x[w]));l.else(),c.error(!1,{discrError:r.DiscrError.Mapping,tag:h,tagName:v}),l.endIf()}function _(x){let w=l.name("valid"),S=c.subschema({keyword:"oneOf",schemaProp:x},w);return c.mergeEvaluated(S,e.Name),w}function b(){var x;let w={},S=T(f),$=!0;for(let U=0;U<m.length;U++){let L=m[U];if(L?.$ref&&!(0,o.schemaHasRulesButRef)(L,p.self.RULES)){let Y=L.$ref;if(L=n.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,Y),L instanceof n.SchemaEnv&&(L=L.schema),L===void 0)throw new i.default(p.opts.uriResolver,p.baseId,Y)}let N=(x=L?.properties)===null||x===void 0?void 0:x[v];if(typeof N!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);$=$&&(S||T(L)),A(N,U)}if(!$)throw Error(`discriminator: "${v}" must be required`);return w;function T({required:U}){return Array.isArray(U)&&U.includes(v)}function A(U,L){if(U.const)I(U.const,L);else if(U.enum)for(let N of U.enum)I(N,L);else throw Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function I(U,L){if(typeof U!="string"||U in w)throw Error(`discriminator: "${v}" values must be unique strings`);w[U]=L}}}};t.default=s}),Uie=de((t,e)=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),RZ=de((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=tie(),n=Rie(),i=Aie(),o=Uie(),a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let m=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(m,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=Ey();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=HI();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=Iy();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),Die=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(I,U){return{validate:I,compare:U}}t.fullFormats={date:e(o,a),time:e(c(!0),l),"date-time":e(f(!0),p),"iso-time":e(c(),u),"iso-date-time":e(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:"number",validate:w},int64:{type:"number",validate:S},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(I){return I%4===0&&(I%100!==0||I%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(I){let U=n.exec(I);if(!U)return!1;let L=+U[1],N=+U[2],Y=+U[3];return N>=1&&N<=12&&Y>=1&&Y<=(N===2&&r(L)?29:i[N])}function a(I,U){if(I&&U)return I>U?1:I<U?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(I){return function(U){let L=s.exec(U);if(!L)return!1;let N=+L[1],Y=+L[2],H=+L[3],ye=L[4],Pe=L[5]==="-"?-1:1,ue=+(L[6]||0),W=+(L[7]||0);if(ue>23||W>59||I&&!ye)return!1;if(N<=23&&Y<=59&&H<60)return!0;let E=Y-W*Pe,q=N-ue*Pe-(E<0?1:0);return(q===23||q===-1)&&(E===59||E===-1)&&H<61}}function l(I,U){if(!(I&&U))return;let L=new Date("2020-01-01T"+I).valueOf(),N=new Date("2020-01-01T"+U).valueOf();if(L&&N)return L-N}function u(I,U){if(!(I&&U))return;let L=s.exec(I),N=s.exec(U);if(L&&N)return I=L[1]+L[2]+L[3],U=N[1]+N[2]+N[3],I>U?1:I<U?-1:0}var d=/t|\s/i;function f(I){let U=c(I);return function(L){let N=L.split(d);return N.length===2&&o(N[0])&&U(N[1])}}function p(I,U){if(!(I&&U))return;let L=new Date(I).valueOf(),N=new Date(U).valueOf();if(L&&N)return L-N}function m(I,U){if(!(I&&U))return;let[L,N]=I.split(d),[Y,H]=U.split(d),ye=a(L,Y);if(ye!==void 0)return ye||l(N,H)}var v=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h(I){return v.test(I)&&g.test(I)}var y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(I){return y.lastIndex=0,y.test(I)}var b=-2147483648,x=2147483647;function w(I){return Number.isInteger(I)&&I<=x&&I>=b}function S(I){return Number.isInteger(I)}function $(){return!0}var T=/[^\\]\\Z/;function A(I){if(T.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}}),Mie=de(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=RZ(),r=et(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:s,schemaCode:c})=>r.str`should be ${i[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>r._`{comparison: ${i[s].okStr}, limit: ${c}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(s){let{gen:c,data:l,schemaCode:u,keyword:d,it:f}=s,{opts:p,self:m}=f;if(!p.validateFormats)return;let v=new e.KeywordCxt(f,m.RULES.all.format.definition,"format");v.$data?g():h();function g(){let _=c.scopeValue("formats",{ref:m.formats,code:p.code.formats}),b=c.const("fmt",r._`${_}[${v.schemaCode}]`);s.fail$data((0,r.or)(r._`typeof ${b} != "object"`,r._`${b} instanceof RegExp`,r._`typeof ${b}.compare != "function"`,y(b)))}function h(){let _=v.schema,b=m.formats[_];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw Error(`"${d}": format "${_}" does not define "compare" function`);let x=c.scopeValue("formats",{key:_,ref:b,code:p.code.formats?r._`${p.code.formats}${(0,r.getProperty)(_)}`:void 0});s.fail$data(y(x))}function y(_){return r._`${_}.compare(${l}, ${u}) ${i[d].fail} 0`}},dependencies:["format"]};var a=s=>(s.addKeyword(t.formatLimitDefinition),s);t.default=a}),Lie=de((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=Die(),n=Mie(),i=et(),o=new i.Name("fullFormats"),a=new i.Name("fastFormats"),s=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;let[d,f]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],p=u.formats||r.formatNames;return c(l,p,d,f),u.keywords&&(0,n.default)(l),l};s.get=(l,u="full")=>{let d=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!d)throw Error(`Unknown format "${l}"`);return d};function c(l,u,d,f){var p,m;(p=(m=l.opts.code).formats)!==null&&p!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${f}`);for(let v of u)l.addFormat(v,d[v])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}),Yie=50;ka=class extends Error{};roe=typeof global=="object"&&global&&global.Object===Object&&global,noe=roe,ioe=typeof self=="object"&&self&&self.Object===Object&&self,ooe=noe||ioe||Function("return this")(),JI=ooe,aoe=JI.Symbol,Uv=aoe,MZ=Object.prototype,soe=MZ.hasOwnProperty,coe=MZ.toString,Ip=Uv?Uv.toStringTag:void 0;uoe=loe,doe=Object.prototype,poe=doe.toString;moe=foe,hoe="[object Null]",goe="[object Undefined]",b2=Uv?Uv.toStringTag:void 0;yoe=voe;LZ=_oe,boe="[object AsyncFunction]",xoe="[object Function]",woe="[object GeneratorFunction]",Soe="[object Proxy]";$oe=koe,Eoe=JI["__core-js_shared__"],cI=Eoe,x2=(function(){var t=/[^.]+$/.exec(cI&&cI.keys&&cI.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();Poe=Ioe,Toe=Function.prototype,Ooe=Toe.toString;joe=zoe,Noe=/[\\^$.*+?()[\]{}|]/g,Roe=/^\[object .+?Constructor\]$/,Coe=Function.prototype,Aoe=Object.prototype,Uoe=Coe.toString,Doe=Aoe.hasOwnProperty,Moe=RegExp("^"+Uoe.call(Doe).replace(Noe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Zoe=Loe;Foe=qoe;ZZ=Voe,Woe=ZZ(Object,"create"),Qp=Woe;Goe=Boe;Hoe=Koe,Qoe="__lodash_hash_undefined__",Yoe=Object.prototype,Joe=Yoe.hasOwnProperty;eae=Xoe,tae=Object.prototype,rae=tae.hasOwnProperty;iae=nae,oae="__lodash_hash_undefined__";sae=aae;Bl.prototype.clear=Goe;Bl.prototype.delete=Hoe;Bl.prototype.get=eae;Bl.prototype.has=iae;Bl.prototype.set=sae;w2=Bl;lae=cae;dae=uae;Py=pae,fae=Array.prototype,mae=fae.splice;gae=hae;yae=vae;bae=_ae;wae=xae;Gl.prototype.clear=lae;Gl.prototype.delete=gae;Gl.prototype.get=yae;Gl.prototype.has=bae;Gl.prototype.set=wae;Sae=Gl,kae=ZZ(JI,"Map"),$ae=kae;Iae=Eae;Tae=Pae;Ty=Oae;jae=zae;Rae=Nae;Aae=Cae;Dae=Uae;Kl.prototype.clear=Iae;Kl.prototype.delete=jae;Kl.prototype.get=Rae;Kl.prototype.has=Aae;Kl.prototype.set=Dae;qZ=Kl,Mae="Expected a function";XI.Cache=qZ;Oa=XI,eP=Oa(()=>(process.env.CLAUDE_CONFIG_DIR??Zae(Lae(),".claude")).normalize("NFC"),()=>process.env.CLAUDE_CONFIG_DIR);FZ=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return FZ=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),r=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))};wI=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return Error(JSON.stringify(t))}catch{}}return Error(t)},Ue=class extends Error{},fn=class t extends Ue{constructor(e,r,n,i,o){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=i,this.requestID=i?.get("request-id"),this.error=r,this.type=o??null}static makeMessage(e,r,n){let i=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return e&&i?`${e} ${i}`:e?`${e} status code (no body)`:i||"(no status code or body)"}static generate(e,r,n,i){if(!e||!i)return new Pl({message:n,cause:wI(r)});let o=r,a=o?.error?.type;return e===400?new Mv(e,o,n,i,a):e===401?new Lv(e,o,n,i,a):e===403?new Zv(e,o,n,i,a):e===404?new qv(e,o,n,i,a):e===409?new Fv(e,o,n,i,a):e===422?new Vv(e,o,n,i,a):e===429?new Wv(e,o,n,i,a):e>=500?new Bv(e,o,n,i,a):new t(e,o,n,i,a)}},Yn=class extends fn{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},Pl=class extends fn{constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},Dv=class extends Pl{constructor({message:e}={}){super({message:e??"Request timed out."})}},Mv=class extends fn{},Lv=class extends fn{},Zv=class extends fn{},qv=class extends fn{},Fv=class extends fn{},Vv=class extends fn{},Wv=class extends fn{},Bv=class extends fn{},qae=/^[a-z][a-z0-9+.-]*:/i,Fae=t=>qae.test(t),SI=t=>(SI=Array.isArray,SI(t)),S2=SI;Wae=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new Ue(`${t} must be an integer`);if(e<0)throw new Ue(`${t} must be a positive integer`);return e},VZ=t=>{try{return JSON.parse(t)}catch{return}},Bae=t=>new Promise(e=>setTimeout(e,t)),bl="0.81.0",Gae=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";Hae=()=>{let t=Kae();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":bl,"X-Stainless-OS":E2(Deno.build.os),"X-Stainless-Arch":$2(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":bl,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":bl,"X-Stainless-OS":E2(globalThis.process.platform??"unknown"),"X-Stainless-Arch":$2(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=Qae();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":bl,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":bl,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};$2=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",E2=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),Yae=()=>I2??(I2=Hae());ese=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});Ms=class{constructor(){Gn.set(this,void 0),Kn.set(this,void 0),he(this,Gn,new Uint8Array,"f"),he(this,Kn,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?rP(e):e;he(this,Gn,rse([F(this,Gn,"f"),r]),"f");let n=[],i;for(;(i=nse(F(this,Gn,"f"),F(this,Kn,"f")))!=null;){if(i.carriage&&F(this,Kn,"f")==null){he(this,Kn,i.index,"f");continue}if(F(this,Kn,"f")!=null&&(i.index!==F(this,Kn,"f")+1||i.carriage)){n.push(O2(F(this,Gn,"f").subarray(0,F(this,Kn,"f")-1))),he(this,Gn,F(this,Gn,"f").subarray(F(this,Kn,"f")),"f"),he(this,Kn,null,"f");continue}let o=F(this,Kn,"f")!==null?i.preceding-1:i.preceding,a=O2(F(this,Gn,"f").subarray(0,o));n.push(a),he(this,Gn,F(this,Gn,"f").subarray(i.index),"f"),he(this,Kn,null,"f")}return n}flush(){return F(this,Gn,"f").length?this.decode(`
150
+ `):[]}};Gn=new WeakMap,Kn=new WeakMap;Ms.NEWLINE_CHARS=new Set([`
151
+ `,"\r"]);Ms.NEWLINE_REGEXP=/\r\n|[\n\r]/g;Gv={off:0,error:200,warn:300,info:400,debug:500},z2=(t,e,r)=>{if(t){if(Vae(Gv,t))return t;dn(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(Gv))}`)}};ose={error:Vp,warn:Vp,info:Vp,debug:Vp},j2=new WeakMap;As=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,r])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t),Ls=class t{constructor(e,r,n){this.iterator=e,Pp.set(this,void 0),this.controller=r,he(this,Pp,n,"f")}static fromSSEResponse(e,r,n){let i=!1,o=n?dn(n):console;async function*a(){if(i)throw new Ue("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of ase(e,r)){if(c.event==="completion")try{yield JSON.parse(c.data)}catch(l){throw o.error("Could not parse message into JSON:",c.data),o.error("From chunk:",c.raw),l}if(c.event==="message_start"||c.event==="message_delta"||c.event==="message_stop"||c.event==="content_block_start"||c.event==="content_block_delta"||c.event==="content_block_stop")try{yield JSON.parse(c.data)}catch(l){throw o.error("Could not parse message into JSON:",c.data),o.error("From chunk:",c.raw),l}if(c.event!=="ping"&&c.event==="error"){let l=VZ(c.data)??c.data,u=l?.error?.type;throw new fn(void 0,l,void 0,e.headers,u)}}s=!0}catch(c){if(Yp(c))return;throw c}finally{s||r.abort()}}return new t(a,r,n)}static fromReadableStream(e,r,n){let i=!1;async function*o(){let s=new Ms,c=tP(e);for await(let l of c)for(let u of s.decode(l))yield u;for(let l of s.flush())yield l}async function*a(){if(i)throw new Ue("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of o())s||c&&(yield JSON.parse(c));s=!0}catch(c){if(Yp(c))return;throw c}finally{s||r.abort()}}return new t(a,r,n)}[(Pp=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),i=o=>({next:()=>{if(o.length===0){let a=n.next();e.push(a),r.push(a)}return o.shift()}});return[new t(()=>i(e),this.controller,F(this,Pp,"f")),new t(()=>i(r),this.controller,F(this,Pp,"f"))]}toReadableStream(){let e=this,r;return WZ({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:o}=await r.next();if(o)return n.close();let a=rP(JSON.stringify(i)+`
152
+ `);n.enqueue(a)}catch(i){n.error(i)}},async cancel(){await r.return?.()}})}};$I=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let o={event:this.event,data:this.data.join(`
153
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],o}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,i]=cse(e,":");return i.startsWith(" ")&&(i=i.substring(1)),r==="event"?this.event=i:r==="data"&&this.data.push(i),null}};Kv=class t extends Promise{constructor(e,r,n=GZ){super(i=>{i(null)}),this.responsePromise=r,this.parseResponse=n,Wp.set(this,void 0),he(this,Wp,e,"f")}_thenUnwrap(e){return new t(F(this,Wp,"f"),this.responsePromise,async(r,n)=>KZ(e(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(F(this,Wp,"f"),e))),this.parsedPromise}then(e,r){return this.parse().then(e,r)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};Wp=new WeakMap;Hv=class{constructor(e,r,n,i){dv.set(this,void 0),he(this,dv,e,"f"),this.options=i,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new Ue("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await F(this,dv,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(dv=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},EI=class extends Kv{constructor(e,r,n){super(e,r,async(i,o)=>new n(i,o.response,await GZ(i,o),o.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},Zs=class extends Hv{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let r=this.first_id;return r?{...this.options,query:{...kI(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...kI(this.options.query),after_id:e}}:null}},Qv=class extends Hv{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.next_page=n.next_page||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...kI(this.options.query),page:e}}:null}},HZ=()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};QZ=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",nP=async(t,e,r=!0)=>({...t,body:await use(t.body,e,r)}),N2=new WeakMap;use=async(t,e,r=!0)=>{if(!await lse(e))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let n=new FormData;return await Promise.all(Object.entries(t||{}).map(([i,o])=>II(n,i,o,r))),n},dse=t=>t instanceof Blob&&"name"in t,II=async(t,e,r,n)=>{if(r!==void 0){if(r==null)throw TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")t.append(e,String(r));else if(r instanceof Response){let i={},o=r.headers.get("Content-Type");o&&(i={type:o}),t.append(e,$l([await r.blob()],zv(r,n),i))}else if(QZ(r))t.append(e,$l([await new Response(BZ(r)).blob()],zv(r,n)));else if(dse(r))t.append(e,$l([r],zv(r,n),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(i=>II(t,e+"[]",i,n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([i,o])=>II(t,`${e}[${i}]`,o,n)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},YZ=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",pse=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&YZ(t),fse=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";Jn=class{constructor(e){this._client=e}},JZ=Symbol.for("brand.privateNullableHeaders");ht=t=>{let e=new Headers,r=new Set;for(let n of t){let i=new Set;for(let[o,a]of gse(n)){let s=o.toLowerCase();i.has(s)||(e.delete(o),i.add(s)),a===null?(e.delete(o),r.add(s)):(e.append(o,a),r.delete(s))}}return{[JZ]:!0,values:e,nulls:r}},Kp=Symbol("anthropic.sdk.stainlessHelper");R2=Object.freeze(Object.create(null)),yse=(t=t6)=>function(e,...r){if(e.length===1)return e[0];let n=!1,i=[],o=e.reduce((l,u,d)=>{/[?#]/.test(u)&&(n=!0);let f=r[d],p=(n?encodeURIComponent:t)(""+f);return d!==r.length&&(f==null||typeof f=="object"&&f.toString===Object.getPrototypeOf(Object.getPrototypeOf(f.hasOwnProperty??R2)??R2)?.toString)&&(p=f+"",i.push({start:l.length+u.length,length:p.length,error:`Value of type ${Object.prototype.toString.call(f).slice(8,-1)} is not a valid path parameter`})),l+u+(d===r.length?"":p)},""),a=o.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(a))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(i.sort((l,u)=>l.start-u.start),i.length>0){let l=0,u=i.reduce((d,f)=>{let p=" ".repeat(f.start-l),m="^".repeat(f.length);return l=f.start+f.length,d+p+m},"");throw new Ue(`Path parameters result in path with invalid segments:
154
+ ${i.map(d=>d.error).join(`
155
+ `)}
156
+ ${o}
157
+ ${u}`)}return o},zr=yse(t6),Yv=class extends Jn{list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/files",Zs,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/files/${e}`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/files/${e}/content`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/files/${e}`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(e,r){let{betas:n,...i}=e;return this._client.post("/v1/files",nP({body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},vse(i.file),r?.headers])},this._client))}},Jv=class extends Jn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/models/${e}?beta=true`,{...n,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models?beta=true",Zs,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},r6={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192};bse=t=>{let e=0,r=[];for(;e<t.length;){let n=t[e];if(n==="\\"){e++;continue}if(n==="{"){r.push({type:"brace",value:"{"}),e++;continue}if(n==="}"){r.push({type:"brace",value:"}"}),e++;continue}if(n==="["){r.push({type:"paren",value:"["}),e++;continue}if(n==="]"){r.push({type:"paren",value:"]"}),e++;continue}if(n===":"){r.push({type:"separator",value:":"}),e++;continue}if(n===","){r.push({type:"delimiter",value:","}),e++;continue}if(n==='"'){let a="",s=!1;for(n=t[++e];n!=='"';){if(e===t.length){s=!0;break}if(n==="\\"){if(e++,e===t.length){s=!0;break}a+=n+t[e],n=t[++e]}else a+=n,n=t[++e]}n=t[++e],!s&&r.push({type:"string",value:a});continue}if(n&&/\s/.test(n)){e++;continue}let i=/[0-9]/;if(n&&i.test(n)||n==="-"||n==="."){let a="";for(n==="-"&&(a+=n,n=t[++e]);n&&i.test(n)||n===".";)a+=n,n=t[++e];r.push({type:"number",value:a});continue}let o=/[a-z]/i;if(n&&o.test(n)){let a="";for(;n&&o.test(n)&&e!==t.length;)a+=n,n=t[++e];if(a=="true"||a=="false"||a==="null")r.push({type:"name",value:a});else{e++;continue}continue}e++}return r},xl=t=>{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),xl(t);case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),xl(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),xl(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),xl(t);break;case"delimiter":return t=t.slice(0,t.length-1),xl(t)}return t},xse=t=>{let e=[];return t.map(r=>{r.type==="brace"&&(r.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(r=>{r==="}"?t.push({type:"brace",value:"}"}):r==="]"&&t.push({type:"paren",value:"]"})}),t},wse=t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},o6=t=>JSON.parse(wse(xse(xl(bse(t))))),D2="__json_buf";TI=class t{constructor(e,r){fi.add(this),this.messages=[],this.receivedMessages=[],ba.set(this,void 0),gl.set(this,null),this.controller=new AbortController,Tp.set(this,void 0),pv.set(this,()=>{}),Op.set(this,()=>{}),zp.set(this,void 0),fv.set(this,()=>{}),jp.set(this,()=>{}),Uo.set(this,{}),Np.set(this,!1),mv.set(this,!1),hv.set(this,!1),Ns.set(this,!1),gv.set(this,void 0),vv.set(this,void 0),Rp.set(this,void 0),yv.set(this,n=>{if(he(this,mv,!0,"f"),Yp(n)&&(n=new Yn),n instanceof Yn)return he(this,hv,!0,"f"),this._emit("abort",n);if(n instanceof Ue)return this._emit("error",n);if(n instanceof Error){let i=new Ue(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ue(String(n)))}),he(this,Tp,new Promise((n,i)=>{he(this,pv,n,"f"),he(this,Op,i,"f")}),"f"),he(this,zp,new Promise((n,i)=>{he(this,fv,n,"f"),he(this,jp,i,"f")}),"f"),F(this,Tp,"f").catch(()=>{}),F(this,zp,"f").catch(()=>{}),he(this,gl,e,"f"),he(this,Rp,r?.logger??console,"f")}get response(){return F(this,gv,"f")}get request_id(){return F(this,vv,"f")}async withResponse(){he(this,Ns,!0,"f");let e=await F(this,Tp,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let o=new t(r,{logger:i});for(let a of r.messages)o._addMessageParam(a);return he(o,gl,{...r,stream:!0},"f"),o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},F(this,yv,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,o;i&&(i.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),i.addEventListener("abort",o));try{F(this,fi,"m",uI).call(this);let{response:a,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(a);for await(let c of s)F(this,fi,"m",dI).call(this,c);if(s.controller.signal?.aborted)throw new Yn;F(this,fi,"m",pI).call(this)}finally{i&&o&&i.removeEventListener("abort",o)}}_connected(e){this.ended||(he(this,gv,e,"f"),he(this,vv,e?.headers.get("request-id"),"f"),F(this,pv,"f").call(this,e),this._emit("connect"))}get ended(){return F(this,Np,"f")}get errored(){return F(this,mv,"f")}get aborted(){return F(this,hv,"f")}abort(){this.controller.abort()}on(e,r){return(F(this,Uo,"f")[e]||(F(this,Uo,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=F(this,Uo,"f")[e];if(!n)return this;let i=n.findIndex(o=>o.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(F(this,Uo,"f")[e]||(F(this,Uo,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{he(this,Ns,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){he(this,Ns,!0,"f"),await F(this,zp,"f")}get currentMessage(){return F(this,ba,"f")}async finalMessage(){return await this.done(),F(this,fi,"m",lI).call(this)}async finalText(){return await this.done(),F(this,fi,"m",A2).call(this)}_emit(e,...r){if(F(this,Np,"f"))return;e==="end"&&(he(this,Np,!0,"f"),F(this,fv,"f").call(this));let n=F(this,Uo,"f")[e];if(n&&(F(this,Uo,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!F(this,Ns,"f")&&!n?.length&&Promise.reject(i),F(this,Op,"f").call(this,i),F(this,jp,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!F(this,Ns,"f")&&!n?.length&&Promise.reject(i),F(this,Op,"f").call(this,i),F(this,jp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",F(this,fi,"m",lI).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{F(this,fi,"m",uI).call(this),this._connected(null);let o=Ls.fromReadableStream(e,this.controller);for await(let a of o)F(this,fi,"m",dI).call(this,a);if(o.controller.signal?.aborted)throw new Yn;F(this,fi,"m",pI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(ba=new WeakMap,gl=new WeakMap,Tp=new WeakMap,pv=new WeakMap,Op=new WeakMap,zp=new WeakMap,fv=new WeakMap,jp=new WeakMap,Uo=new WeakMap,Np=new WeakMap,mv=new WeakMap,hv=new WeakMap,Ns=new WeakMap,gv=new WeakMap,vv=new WeakMap,Rp=new WeakMap,yv=new WeakMap,fi=new WeakSet,lI=function(){if(this.receivedMessages.length===0)throw new Ue("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},A2=function(){if(this.receivedMessages.length===0)throw new Ue("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ue("stream ended without producing a content block with type=text");return e.join(" ")},uI=function(){this.ended||he(this,ba,void 0,"f")},dI=function(e){if(this.ended)return;let r=F(this,fi,"m",U2).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{M2(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}case"compaction_delta":{n.type==="compaction"&&n.content&&this._emit("compaction",n.content);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(C2(r,F(this,gl,"f"),{logger:F(this,Rp,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{he(this,ba,r,"f");break}case"content_block_start":case"message_delta":break}},pI=function(){if(this.ended)throw new Ue("stream has ended, this shouldn't happen");let e=F(this,ba,"f");if(!e)throw new Ue("request ended without sending any chunks");return he(this,ba,void 0,"f"),C2(e,F(this,gl,"f"),{logger:F(this,Rp,"f")})},U2=function(e){let r=F(this,ba,"f");if(e.type==="message_start"){if(r)throw new Ue(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ue(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.container=e.delta.container,r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,r.context_management=e.context_management,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),e.usage.iterations!=null&&(r.usage.iterations=e.usage.iterations),r;case"content_block_start":return r.content.push(e.content_block),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&M2(n)){let i=n[D2]||"";i+=e.delta.partial_json;let o={...n};if(Object.defineProperty(o,D2,{value:i,enumerable:!1,writable:!0}),i)try{o.input=o6(i)}catch(a){let s=new Ue(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${a}. JSON: ${i}`);F(this,yv,"f").call(this,s)}r.content[e.index]=o}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}case"compaction_delta":{n?.type==="compaction"&&(r.content[e.index]={...n,content:(n.content||"")+e.delta.content});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let o=r.shift();o?o.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,o)=>r.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Ls(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},Xv=class extends Error{constructor(e){let r=typeof e=="string"?e:e.map(n=>n.type==="text"?n.text:`[${n.type}]`).join(" ");super(r),this.name="ToolError",this.content=e}},Sse=1e5,kse=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
158
+ 1. Task Overview
159
+ The user's core request and success criteria
160
+ Any clarifications or constraints they specified
161
+ 2. Current State
162
+ What has been completed so far
163
+ Files created, modified, or analyzed (with paths if relevant)
164
+ Key outputs or artifacts produced
165
+ 3. Important Discoveries
166
+ Technical constraints or requirements uncovered
167
+ Decisions made and their rationale
168
+ Errors encountered and how they were resolved
169
+ What approaches were tried that didn't work (and why)
170
+ 4. Next Steps
171
+ Specific actions needed to complete the task
172
+ Any blockers or open questions to resolve
173
+ Priority order if multiple steps remain
174
+ 5. Context to Preserve
175
+ User preferences or style requirements
176
+ Domain-specific details that aren't obvious
177
+ Any promises made to the user
178
+ Be concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
179
+ Wrap your summary in <summary></summary> tags.`;ey=class{constructor(e,r,n){Cp.add(this),this.client=e,vl.set(this,!1),Rs.set(this,!1),xr.set(this,void 0),Ap.set(this,void 0),Bn.set(this,void 0),Lo.set(this,void 0),xa.set(this,void 0),Up.set(this,0),he(this,xr,{params:{...r,messages:structuredClone(r.messages)}},"f");let i=["BetaToolRunner",...XZ(r.tools,r.messages)].join(", ");he(this,Ap,{...n,headers:ht([{"x-stainless-helper":i},n?.headers])},"f"),he(this,xa,Z2(),"f")}async*[(vl=new WeakMap,Rs=new WeakMap,xr=new WeakMap,Ap=new WeakMap,Bn=new WeakMap,Lo=new WeakMap,xa=new WeakMap,Up=new WeakMap,Cp=new WeakSet,L2=async function(){let e=F(this,xr,"f").params.compactionControl;if(!e||!e.enabled)return!1;let r=0;if(F(this,Bn,"f")!==void 0)try{let c=await F(this,Bn,"f");r=c.usage.input_tokens+(c.usage.cache_creation_input_tokens??0)+(c.usage.cache_read_input_tokens??0)+c.usage.output_tokens}catch{return!1}let n=e.contextTokenThreshold??Sse;if(r<n)return!1;let i=e.model??F(this,xr,"f").params.model,o=e.summaryPrompt??kse,a=F(this,xr,"f").params.messages;if(a[a.length-1].role==="assistant"){let c=a[a.length-1];if(Array.isArray(c.content)){let l=c.content.filter(u=>u.type!=="tool_use");l.length===0?a.pop():c.content=l}}let s=await this.client.beta.messages.create({model:i,messages:[...a,{role:"user",content:[{type:"text",text:o}]}],max_tokens:F(this,xr,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if(s.content[0]?.type!=="text")throw new Ue("Expected text response for compaction");return F(this,xr,"f").params.messages=[{role:"user",content:s.content}],!0},Symbol.asyncIterator)](){var e;if(F(this,vl,"f"))throw new Ue("Cannot iterate over a consumed stream");he(this,vl,!0,"f"),he(this,Rs,!0,"f"),he(this,Lo,void 0,"f");try{for(;;){let r;try{if(F(this,xr,"f").params.max_iterations&&F(this,Up,"f")>=F(this,xr,"f").params.max_iterations)break;he(this,Rs,!1,"f"),he(this,Lo,void 0,"f"),he(this,Up,(e=F(this,Up,"f"),e++,e),"f"),he(this,Bn,void 0,"f");let{max_iterations:n,compactionControl:i,...o}=F(this,xr,"f").params;if(o.stream?(r=this.client.beta.messages.stream({...o},F(this,Ap,"f")),he(this,Bn,r.finalMessage(),"f"),F(this,Bn,"f").catch(()=>{}),yield r):(he(this,Bn,this.client.beta.messages.create({...o,stream:!1},F(this,Ap,"f")),"f"),yield F(this,Bn,"f")),!await F(this,Cp,"m",L2).call(this)){if(!F(this,Rs,"f")){let{role:s,content:c}=await F(this,Bn,"f");F(this,xr,"f").params.messages.push({role:s,content:c})}let a=await F(this,Cp,"m",OI).call(this,F(this,xr,"f").params.messages.at(-1));if(a)F(this,xr,"f").params.messages.push(a);else if(!F(this,Rs,"f"))break}}finally{r&&r.abort()}}if(!F(this,Bn,"f"))throw new Ue("ToolRunner concluded without a message from the server");F(this,xa,"f").resolve(await F(this,Bn,"f"))}catch(r){throw he(this,vl,!1,"f"),F(this,xa,"f").promise.catch(()=>{}),F(this,xa,"f").reject(r),he(this,xa,Z2(),"f"),r}}setMessagesParams(e){typeof e=="function"?F(this,xr,"f").params=e(F(this,xr,"f").params):F(this,xr,"f").params=e,he(this,Rs,!0,"f"),he(this,Lo,void 0,"f")}async generateToolResponse(){let e=await F(this,Bn,"f")??this.params.messages.at(-1);return e?F(this,Cp,"m",OI).call(this,e):null}done(){return F(this,xa,"f").promise}async runUntilDone(){if(!F(this,vl,"f"))for await(let e of this);return this.done()}get params(){return F(this,xr,"f").params}pushMessages(...e){this.setMessagesParams(r=>({...r,messages:[...r.messages,...e]}))}then(e,r){return this.runUntilDone().then(e,r)}};OI=async function(t){return F(this,Lo,"f")!==void 0?F(this,Lo,"f"):(he(this,Lo,$se(F(this,xr,"f").params,t),"f"),F(this,Lo,"f"))};ty=class t{constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new Ms;for await(let r of this.iterator)for(let n of e.decode(r))yield JSON.parse(n);for(let r of e.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,r){if(!e.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ue("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ue("Attempted to iterate over a response with no body");return new t(tP(e.body),r)}},ry=class extends Jn{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/messages/batches?beta=true",{body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/messages/batches/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",Zs,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/messages/batches/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(e,r={},n){let{betas:i}=r??{};return this._client.post(zr`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(e,r={},n){let i=await this.retrieve(e);if(!i.results_url)throw new Ue(`No batch \`results_url\`; Has it finished processing? ${i.processing_status} - ${i.id}`);let{betas:o}=r??{};return this._client.get(i.results_url,{...n,headers:ht([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((a,s)=>ty.fromResponse(s.response,s.controller))}},q2={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},Ese=["claude-opus-4-6"],qs=class extends Jn{constructor(){super(...arguments),this.batches=new ry(this._client)}create(e,r){let n=F2(e),{betas:i,...o}=n;o.model in q2&&console.warn(`The model '${o.model}' is deprecated and will reach end-of-life on ${q2[o.model]}
180
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),o.model in Ese&&o.thinking&&o.thinking.type==="enabled"&&console.warn(`Using Claude with ${o.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let a=this._client._options.timeout;if(!o.stream&&a==null){let c=r6[o.model]??void 0;a=this._client.calculateNonstreamingTimeout(o.max_tokens,c)}let s=e6(o.tools,o.messages);return this._client.post("/v1/messages?beta=true",{body:o,timeout:a??6e5,...r,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},s,r?.headers]),stream:n.stream??!1})}parse(e,r){return r={...r,headers:ht([{"anthropic-beta":[...e.betas??[],"structured-outputs-2025-12-15"].toString()},r?.headers])},this.create(e,r).then(n=>i6(n,e,{logger:this._client.logger??console}))}stream(e,r){return TI.createMessage(this,e,r)}countTokens(e,r){let n=F2(e),{betas:i,...o}=n;return this._client.post("/v1/messages/count_tokens?beta=true",{body:o,...r,headers:ht([{"anthropic-beta":[...i??[],"token-counting-2024-11-01"].toString()},r?.headers])})}toolRunner(e,r){return new ey(this._client,e,r)}};qs.Batches=ry;qs.BetaToolRunner=ey;qs.ToolError=Xv;ny=class extends Jn{create(e,r={},n){let{betas:i,...o}=r??{};return this._client.post(zr`/v1/skills/${e}/versions?beta=true`,nP({body:o,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])},this._client))}retrieve(e,r,n){let{skill_id:i,betas:o}=r;return this._client.get(zr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...o??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e,r={},n){let{betas:i,...o}=r??{};return this._client.getAPIList(zr`/v1/skills/${e}/versions?beta=true`,Qv,{query:o,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}delete(e,r,n){let{skill_id:i,betas:o}=r;return this._client.delete(zr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...o??[],"skills-2025-10-02"].toString()},n?.headers])})}},Jp=class extends Jn{constructor(){super(...arguments),this.versions=new ny(this._client)}create(e={},r){let{betas:n,...i}=e??{};return this._client.post("/v1/skills?beta=true",nP({body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])},this._client,!1))}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/skills/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/skills?beta=true",Qv,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/skills/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}};Jp.Versions=ny;Ea=class extends Jn{constructor(){super(...arguments),this.models=new Jv(this._client),this.messages=new qs(this._client),this.files=new Yv(this._client),this.skills=new Jp(this._client)}};Ea.Models=Jv;Ea.Messages=qs;Ea.Files=Yv;Ea.Skills=Jp;iy=class extends Jn{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/complete",{body:i,timeout:this._client._options.timeout??6e5,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}};G2="__json_buf";zI=class t{constructor(e,r){mi.add(this),this.messages=[],this.receivedMessages=[],wa.set(this,void 0),yl.set(this,null),this.controller=new AbortController,Dp.set(this,void 0),_v.set(this,()=>{}),Mp.set(this,()=>{}),Lp.set(this,void 0),bv.set(this,()=>{}),Zp.set(this,()=>{}),Do.set(this,{}),qp.set(this,!1),xv.set(this,!1),wv.set(this,!1),Cs.set(this,!1),Sv.set(this,void 0),kv.set(this,void 0),Fp.set(this,void 0),mI.set(this,n=>{if(he(this,xv,!0,"f"),Yp(n)&&(n=new Yn),n instanceof Yn)return he(this,wv,!0,"f"),this._emit("abort",n);if(n instanceof Ue)return this._emit("error",n);if(n instanceof Error){let i=new Ue(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ue(String(n)))}),he(this,Dp,new Promise((n,i)=>{he(this,_v,n,"f"),he(this,Mp,i,"f")}),"f"),he(this,Lp,new Promise((n,i)=>{he(this,bv,n,"f"),he(this,Zp,i,"f")}),"f"),F(this,Dp,"f").catch(()=>{}),F(this,Lp,"f").catch(()=>{}),he(this,yl,e,"f"),he(this,Fp,r?.logger??console,"f")}get response(){return F(this,Sv,"f")}get request_id(){return F(this,kv,"f")}async withResponse(){he(this,Cs,!0,"f");let e=await F(this,Dp,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let o=new t(r,{logger:i});for(let a of r.messages)o._addMessageParam(a);return he(o,yl,{...r,stream:!0},"f"),o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},F(this,mI,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,o;i&&(i.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),i.addEventListener("abort",o));try{F(this,mi,"m",hI).call(this);let{response:a,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(a);for await(let c of s)F(this,mi,"m",gI).call(this,c);if(s.controller.signal?.aborted)throw new Yn;F(this,mi,"m",vI).call(this)}finally{i&&o&&i.removeEventListener("abort",o)}}_connected(e){this.ended||(he(this,Sv,e,"f"),he(this,kv,e?.headers.get("request-id"),"f"),F(this,_v,"f").call(this,e),this._emit("connect"))}get ended(){return F(this,qp,"f")}get errored(){return F(this,xv,"f")}get aborted(){return F(this,wv,"f")}abort(){this.controller.abort()}on(e,r){return(F(this,Do,"f")[e]||(F(this,Do,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=F(this,Do,"f")[e];if(!n)return this;let i=n.findIndex(o=>o.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(F(this,Do,"f")[e]||(F(this,Do,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{he(this,Cs,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){he(this,Cs,!0,"f"),await F(this,Lp,"f")}get currentMessage(){return F(this,wa,"f")}async finalMessage(){return await this.done(),F(this,mi,"m",fI).call(this)}async finalText(){return await this.done(),F(this,mi,"m",W2).call(this)}_emit(e,...r){if(F(this,qp,"f"))return;e==="end"&&(he(this,qp,!0,"f"),F(this,bv,"f").call(this));let n=F(this,Do,"f")[e];if(n&&(F(this,Do,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!F(this,Cs,"f")&&!n?.length&&Promise.reject(i),F(this,Mp,"f").call(this,i),F(this,Zp,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!F(this,Cs,"f")&&!n?.length&&Promise.reject(i),F(this,Mp,"f").call(this,i),F(this,Zp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",F(this,mi,"m",fI).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{F(this,mi,"m",hI).call(this),this._connected(null);let o=Ls.fromReadableStream(e,this.controller);for await(let a of o)F(this,mi,"m",gI).call(this,a);if(o.controller.signal?.aborted)throw new Yn;F(this,mi,"m",vI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(wa=new WeakMap,yl=new WeakMap,Dp=new WeakMap,_v=new WeakMap,Mp=new WeakMap,Lp=new WeakMap,bv=new WeakMap,Zp=new WeakMap,Do=new WeakMap,qp=new WeakMap,xv=new WeakMap,wv=new WeakMap,Cs=new WeakMap,Sv=new WeakMap,kv=new WeakMap,Fp=new WeakMap,mI=new WeakMap,mi=new WeakSet,fI=function(){if(this.receivedMessages.length===0)throw new Ue("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},W2=function(){if(this.receivedMessages.length===0)throw new Ue("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ue("stream ended without producing a content block with type=text");return e.join(" ")},hI=function(){this.ended||he(this,wa,void 0,"f")},gI=function(e){if(this.ended)return;let r=F(this,mi,"m",B2).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{K2(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(V2(r,F(this,yl,"f"),{logger:F(this,Fp,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{he(this,wa,r,"f");break}case"content_block_start":case"message_delta":break}},vI=function(){if(this.ended)throw new Ue("stream has ended, this shouldn't happen");let e=F(this,wa,"f");if(!e)throw new Ue("request ended without sending any chunks");return he(this,wa,void 0,"f"),V2(e,F(this,yl,"f"),{logger:F(this,Fp,"f")})},B2=function(e){let r=F(this,wa,"f");if(e.type==="message_start"){if(r)throw new Ue(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ue(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),r;case"content_block_start":return r.content.push({...e.content_block}),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&K2(n)){let i=n[G2]||"";i+=e.delta.partial_json;let o={...n};Object.defineProperty(o,G2,{value:i,enumerable:!1,writable:!0}),i&&(o.input=o6(i)),r.content[e.index]=o}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let o=r.shift();o?o.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,o)=>r.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Ls(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},oy=class extends Jn{create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get(zr`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",Zs,{query:e,...r})}delete(e,r){return this._client.delete(zr`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post(zr`/v1/messages/batches/${e}/cancel`,r)}async results(e,r){let n=await this.retrieve(e);if(!n.results_url)throw new Ue(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:ht([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((i,o)=>ty.fromResponse(o.response,o.controller))}},Xp=class extends Jn{constructor(){super(...arguments),this.batches=new oy(this._client)}create(e,r){e.model in H2&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${H2[e.model]}
181
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),e.model in Pse&&e.thinking&&e.thinking.type==="enabled"&&console.warn(`Using Claude with ${e.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let n=this._client._options.timeout;if(!e.stream&&n==null){let o=r6[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,o)}let i=e6(e.tools,e.messages);return this._client.post("/v1/messages",{body:e,timeout:n??6e5,...r,headers:ht([i,r?.headers]),stream:e.stream??!1})}parse(e,r){return this.create(e,r).then(n=>s6(n,e,{logger:this._client.logger??console}))}stream(e,r){return zI.createMessage(this,e,r,{logger:this._client.logger??console})}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},H2={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026"},Pse=["claude-opus-4-6"];Xp.Batches=oy;ay=class extends Jn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/models/${e}`,{...n,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models",Zs,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},$v=t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()},Tse="\\n\\nHuman:",Ose="\\n\\nAssistant:",ur=class{constructor({baseURL:e=$v("ANTHROPIC_BASE_URL"),apiKey:r=$v("ANTHROPIC_API_KEY")??null,authToken:n=$v("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){jI.add(this),Nv.set(this,void 0);let o={apiKey:r,authToken:n,...i,baseURL:e||"https://api.anthropic.com"};if(!o.dangerouslyAllowBrowser&&Gae())throw new Ue(`It looks like you're running in a browser-like environment.
182
+
183
+ This is disabled by default, as it risks exposing your secret API credentials to attackers.
184
+ If you understand the risks and have appropriate mitigations in place,
185
+ you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
186
+
187
+ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
188
+ `);this.baseURL=o.baseURL,this.timeout=o.timeout??iP.DEFAULT_TIMEOUT,this.logger=o.logger??console;let a="warn";this.logLevel=a,this.logLevel=z2(o.logLevel,"ClientOptions.logLevel",this)??z2($v("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??a,this.fetchOptions=o.fetchOptions,this.maxRetries=o.maxRetries??2,this.fetch=o.fetch??Jae(),he(this,Nv,ese,"f"),this._options=o,this.apiKey=typeof r=="string"?r:null,this.authToken=n}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:r}){if(!(e.get("x-api-key")||e.get("authorization"))&&!(this.apiKey&&e.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!r.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(e){return ht([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(this.apiKey!=null)return ht([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(this.authToken!=null)return ht([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return tse(e)}getUserAgent(){return`${this.constructor.name}/JS ${bl}`}defaultIdempotencyKey(){return`stainless-node-retry-${FZ()}`}makeStatusError(e,r,n,i){return fn.generate(e,r,n,i)}buildURL(e,r,n){let i=!F(this,jI,"m",c6).call(this)&&n||this.baseURL,o=Fae(e)?new URL(e):new URL(i+(i.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),a=this.defaultQuery(),s=Object.fromEntries(o.searchParams);return(!k2(a)||!k2(s))&&(r={...s,...a,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(o.search=this.stringifyQuery(r)),o.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new Ue("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:r,options:n}){}get(e,r){return this.methodRequest("get",e,r)}post(e,r){return this.methodRequest("post",e,r)}patch(e,r){return this.methodRequest("patch",e,r)}put(e,r){return this.methodRequest("put",e,r)}delete(e,r){return this.methodRequest("delete",e,r)}methodRequest(e,r,n){return this.request(Promise.resolve(n).then(i=>({method:e,path:r,...i})))}request(e,r=null){return new Kv(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let i=await e,o=i.maxRetries??this.maxRetries;r==null&&(r=o),await this.prepareOptions(i);let{req:a,url:s,timeout:c}=await this.buildRequest(i,{retryCount:o-r});await this.prepareRequest(a,{url:s,options:i});let l="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),u=n===void 0?"":`, retryOf: ${n}`,d=Date.now();if(dn(this).debug(`[${l}] sending request`,As({retryOfRequestLogID:n,method:i.method,url:s,options:i,headers:a.headers})),i.signal?.aborted)throw new Yn;let f=new AbortController,p=await this.fetchWithTimeout(s,a,c,f).catch(wI),m=Date.now();if(p instanceof globalThis.Error){let h=`retrying, ${r} attempts remaining`;if(i.signal?.aborted)throw new Yn;let y=Yp(p)||/timed? ?out/i.test(String(p)+("cause"in p?String(p.cause):""));if(r)return dn(this).info(`[${l}] connection ${y?"timed out":"failed"} - ${h}`),dn(this).debug(`[${l}] connection ${y?"timed out":"failed"} (${h})`,As({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),this.retryRequest(i,r,n??l);throw dn(this).info(`[${l}] connection ${y?"timed out":"failed"} - error; no more retries left`),dn(this).debug(`[${l}] connection ${y?"timed out":"failed"} (error; no more retries left)`,As({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),y?new Dv:new Pl({cause:p})}let v=[...p.headers.entries()].filter(([h])=>h==="request-id").map(([h,y])=>", "+h+": "+JSON.stringify(y)).join(""),g=`[${l}${u}${v}] ${a.method} ${s} ${p.ok?"succeeded":"failed"} with status ${p.status} in ${m-d}ms`;if(!p.ok){let h=await this.shouldRetry(p);if(r&&h){let w=`retrying, ${r} attempts remaining`;return await Xae(p.body),dn(this).info(`${g} - ${w}`),dn(this).debug(`[${l}] response error (${w})`,As({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),this.retryRequest(i,r,n??l,p.headers)}let y=h?"error; no more retries left":"error; not retryable";dn(this).info(`${g} - ${y}`);let _=await p.text().catch(w=>wI(w).message),b=VZ(_),x=b?void 0:_;throw dn(this).debug(`[${l}] response error (${y})`,As({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,message:x,durationMs:Date.now()-d})),this.makeStatusError(p.status,b,x,p.headers)}return dn(this).info(g),dn(this).debug(`[${l}] response start`,As({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),{response:p,options:i,controller:f,requestLogID:l,retryOfRequestLogID:n,startTime:d}}getAPIList(e,r,n){return this.requestAPIList(r,n&&"then"in n?n.then(i=>({method:"get",path:e,...i})):{method:"get",path:e,...n})}requestAPIList(e,r){let n=this.makeRequest(r,null,void 0);return new EI(this,n,e)}async fetchWithTimeout(e,r,n,i){let{signal:o,method:a,...s}=r||{},c=this._makeAbort(i);o&&o.addEventListener("abort",c,{once:!0});let l=setTimeout(c,n),u=globalThis.ReadableStream&&s.body instanceof globalThis.ReadableStream||typeof s.body=="object"&&s.body!==null&&Symbol.asyncIterator in s.body,d={signal:i.signal,...u?{duplex:"half"}:{},method:"GET",...s};a&&(d.method=a.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(l)}}async shouldRetry(e){let r=e.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,r,n,i){let o,a=i?.get("retry-after-ms");if(a){let c=parseFloat(a);Number.isNaN(c)||(o=c)}let s=i?.get("retry-after");if(s&&!o){let c=parseFloat(s);Number.isNaN(c)?o=Date.parse(s)-Date.now():o=c*1e3}if(o===void 0){let c=e.maxRetries??this.maxRetries;o=this.calculateDefaultRetryTimeoutMillis(r,c)}return await Bae(o),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let n=r-e,i=Math.min(.5*Math.pow(2,n),8),o=1-Math.random()*.25;return i*o*1e3}calculateNonstreamingTimeout(e,r){if(36e5*e/128e3>6e5||r!=null&&e>r)throw new Ue("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}async buildRequest(e,{retryCount:r=0}={}){let n={...e},{method:i,path:o,query:a,defaultBaseURL:s}=n,c=this.buildURL(o,a,s);"timeout"in n&&Wae("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:l,body:u}=this.buildBody({options:n}),d=await this.buildHeaders({options:e,method:i,bodyHeaders:l,retryCount:r});return{req:{method:i,headers:d,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&u instanceof globalThis.ReadableStream&&{duplex:"half"},...u&&{body:u},...this.fetchOptions??{},...n.fetchOptions??{}},url:c,timeout:n.timeout}}async buildHeaders({options:e,method:r,bodyHeaders:n,retryCount:i}){let o={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),o[this.idempotencyHeader]=e.idempotencyKey);let a=ht([o,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(i),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...Yae(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(a),a.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:r}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=ht([r]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&n.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:BZ(e)}:typeof e=="object"&&n.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e)}:F(this,Nv,"f").call(this,{body:e,headers:n})}};iP=ur,Nv=new WeakMap,jI=new WeakSet,c6=function(){return this.baseURL!=="https://api.anthropic.com"};ur.Anthropic=iP;ur.HUMAN_PROMPT=Tse;ur.AI_PROMPT=Ose;ur.DEFAULT_TIMEOUT=6e5;ur.AnthropicError=Ue;ur.APIError=fn;ur.APIConnectionError=Pl;ur.APIConnectionTimeoutError=Dv;ur.APIUserAbortError=Yn;ur.NotFoundError=qv;ur.ConflictError=Fv;ur.RateLimitError=Wv;ur.BadRequestError=Mv;ur.AuthenticationError=Lv;ur.InternalServerError=Bv;ur.PermissionDeniedError=Zv;ur.UnprocessableEntityError=Vv;ur.toFile=mse;Tl=class extends ur{constructor(){super(...arguments),this.completions=new iy(this),this.messages=new Xp(this),this.models=new ay(this),this.beta=new Ea(this)}};Tl.Completions=iy;Tl.Messages=Xp;Tl.Models=ay;Tl.Beta=Ea;_l=null;Use=Ase();Mse=aP(),FLe=Mse.subscribe,Lse=aP(),VLe=Lse.subscribe,Zse=aP(),WLe=Zse.subscribe;J2=new Set;Kse=Oa(t=>{if(!t||t.trim()==="")return null;let e=t.split(",").map(o=>o.trim()).filter(Boolean);if(e.length===0)return null;let r=e.some(o=>o.startsWith("!")),n=e.some(o=>!o.startsWith("!"));if(r&&n)return null;let i=e.map(o=>o.replace(/^!/,"").toLowerCase());return{include:r?[]:i,exclude:r?i:[],isExclusive:r}});ace={cwd(){return process.cwd()},existsSync(t){let e=[];try{let i=sr(e,lr`fs.existsSync(${t})`,0);return qe.existsSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},async stat(t){return ice(t)},async readdir(t){return ece(t,{withFileTypes:!0})},async unlink(t){return oce(t)},async rmdir(t){return rce(t)},async rm(t,e){return nce(t,e)},async mkdir(t,e){try{await Jse(t,{recursive:!0,...e})}catch(r){if(Hp(r)!=="EEXIST")throw r}},async readFile(t,e){return X2(t,{encoding:e.encoding})},async rename(t,e){return tce(t,e)},statSync(t){let e=[];try{let i=sr(e,lr`fs.statSync(${t})`,0);return qe.statSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},lstatSync(t){let e=[];try{let i=sr(e,lr`fs.lstatSync(${t})`,0);return qe.lstatSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},readFileSync(t,e){let r=[];try{let o=sr(r,lr`fs.readFileSync(${t})`,0);return qe.readFileSync(t,{encoding:e.encoding})}catch(o){var n=o,i=1}finally{cr(r,n,i)}},readFileBytesSync(t){let e=[];try{let i=sr(e,lr`fs.readFileBytesSync(${t})`,0);return qe.readFileSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},readSync(t,e){let r=[];try{let o=sr(r,lr`fs.readSync(${t}, ${e.length} bytes)`,0),a;try{a=qe.openSync(t,"r");let s=Buffer.alloc(e.length),c=qe.readSync(a,s,0,e.length,0);return{buffer:s,bytesRead:c}}finally{a&&qe.closeSync(a)}}catch(o){var n=o,i=1}finally{cr(r,n,i)}},appendFileSync(t,e,r){let n=[];try{let a=sr(n,lr`fs.appendFileSync(${t}, ${e.length} chars)`,0);if(r?.mode!==void 0)try{let s=qe.openSync(t,"ax",r.mode);try{qe.appendFileSync(s,e)}finally{qe.closeSync(s)}return}catch(s){if(Hp(s)!=="EEXIST")throw s}qe.appendFileSync(t,e)}catch(a){var i=a,o=1}finally{cr(n,i,o)}},copyFileSync(t,e){let r=[];try{let o=sr(r,lr`fs.copyFileSync(${t} → ${e})`,0);qe.copyFileSync(t,e)}catch(o){var n=o,i=1}finally{cr(r,n,i)}},unlinkSync(t){let e=[];try{let i=sr(e,lr`fs.unlinkSync(${t})`,0);qe.unlinkSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},renameSync(t,e){let r=[];try{let o=sr(r,lr`fs.renameSync(${t} → ${e})`,0);qe.renameSync(t,e)}catch(o){var n=o,i=1}finally{cr(r,n,i)}},linkSync(t,e){let r=[];try{let o=sr(r,lr`fs.linkSync(${t} → ${e})`,0);qe.linkSync(t,e)}catch(o){var n=o,i=1}finally{cr(r,n,i)}},symlinkSync(t,e,r){let n=[];try{let a=sr(n,lr`fs.symlinkSync(${t} → ${e})`,0);qe.symlinkSync(t,e,r)}catch(a){var i=a,o=1}finally{cr(n,i,o)}},readlinkSync(t){let e=[];try{let i=sr(e,lr`fs.readlinkSync(${t})`,0);return qe.readlinkSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},realpathSync(t){let e=[];try{let i=sr(e,lr`fs.realpathSync(${t})`,0);return qe.realpathSync(t).normalize("NFC")}catch(i){var r=i,n=1}finally{cr(e,r,n)}},mkdirSync(t,e){let r=[];try{let o=sr(r,lr`fs.mkdirSync(${t})`,0),a={recursive:!0};e?.mode!==void 0&&(a.mode=e.mode);try{qe.mkdirSync(t,a)}catch(s){if(Hp(s)!=="EEXIST")throw s}}catch(o){var n=o,i=1}finally{cr(r,n,i)}},readdirSync(t){let e=[];try{let i=sr(e,lr`fs.readdirSync(${t})`,0);return qe.readdirSync(t,{withFileTypes:!0})}catch(i){var r=i,n=1}finally{cr(e,r,n)}},readdirStringSync(t){let e=[];try{let i=sr(e,lr`fs.readdirStringSync(${t})`,0);return qe.readdirSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},isDirEmptySync(t){let e=[];try{let i=sr(e,lr`fs.isDirEmptySync(${t})`,0);return this.readdirSync(t).length===0}catch(i){var r=i,n=1}finally{cr(e,r,n)}},rmdirSync(t){let e=[];try{let i=sr(e,lr`fs.rmdirSync(${t})`,0);qe.rmdirSync(t)}catch(i){var r=i,n=1}finally{cr(e,r,n)}},rmSync(t,e){let r=[];try{let o=sr(r,lr`fs.rmSync(${t})`,0);qe.rmSync(t,e)}catch(o){var n=o,i=1}finally{cr(r,n,i)}},createWriteStream(t){return qe.createWriteStream(t)},async readFileBytes(t,e){if(e===void 0)return X2(t);let r=await Xse(t,"r");try{let{size:n}=await r.stat(),i=Math.min(n,e),o=Buffer.allocUnsafe(i),a=0;for(;a<i;){let{bytesRead:s}=await r.read(o,a,i-a,a);if(s===0)break;a+=s}return a<i?o.subarray(0,a):o}finally{await r.close()}}},sce=ace;NI={verbose:0,debug:1,info:2,warn:3,error:4},uce=Oa(()=>{let t=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return t&&Object.hasOwn(NI,t)?t:"debug"}),dce=!1,RI=Oa(()=>dce||Us(process.env.DEBUG)||Us(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||f6()||process.argv.some(t=>t.startsWith("--debug="))||m6()!==null),pce=Oa(()=>{let t=process.argv.find(r=>r.startsWith("--debug="));if(!t)return null;let e=t.substring(8);return Kse(e)}),f6=Oa(()=>process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")),m6=Oa(()=>{for(let t=0;t<process.argv.length;t++){let e=process.argv[t];if(e.startsWith("--debug-file="))return e.substring(13);if(e==="--debug-file"&&t+1<process.argv.length)return process.argv[t+1]}return null});mce=!1,Ev=null,yI=Promise.resolve();g6=Oa(async()=>{try{let t=h6(),e=d6(t),r=p6(e,"latest");await Wse(r).catch(()=>{}),await Vse(t,r)}catch{}}),HLe=(()=>{let t=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(t!==void 0){let e=Number(t);if(!Number.isNaN(e)&&e>=0)return e}return 1/0})(),yce={[Symbol.dispose](){}};lr=_ce;sP=(t,e)=>{let r=[];try{let o=sr(r,lr`JSON.parse(${t})`,0);return typeof e>"u"?JSON.parse(t):JSON.parse(t,e)}catch(o){var n=o,i=1}finally{cr(r,n,i)}};wce=2e3,sy=new Set,tZ=!1;CI=class{options;process;processStdin;processStdout;ready=!1;abortController;exitError;exitListeners=[];abortHandler;pendingWrites=[];pendingEndInput=!1;spawnResolve;spawnReject;spawnPromise;constructor(e){this.options=e,this.abortController=e.abortController||UZ(),e.deferSpawn?(this.spawnPromise=new Promise((r,n)=>{this.spawnResolve=r,this.spawnReject=n}),this.spawnPromise.catch(()=>{})):this.initialize()}spawn(){try{this.initialize()}catch(r){throw this.spawnAbort(l6(r)),r}let e=this.pendingWrites;this.pendingWrites=[],this.spawnResolve&&(this.spawnResolve(),this.spawnResolve=void 0,this.spawnReject=void 0);for(let r of e)this.write(r);this.pendingEndInput&&(this.pendingEndInput=!1,this.processStdin?.end())}spawnAbort(e){this.spawnReject&&(this.spawnReject(e),this.spawnReject=void 0,this.spawnResolve=void 0,this.pendingWrites=[])}updateEnv(e){this.options.env?Object.assign(this.options.env,e):this.options.env={...e}}getDefaultExecutable(){return DZ()?"bun":"node"}spawnLocalProcess(e){let{command:r,args:n,cwd:i,env:o,signal:a}=e,s=Us(o.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr?"pipe":"ignore",c=eoe(r,n,{cwd:i,stdio:["pipe","pipe",s],signal:a,env:o,windowsHide:!0});return(Us(o.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr)&&c.stderr.on("data",l=>{let u=l.toString();fo(u),this.options.stderr&&this.options.stderr(u)}),{stdin:c.stdin,stdout:c.stdout,get killed(){return c.killed},get exitCode(){return c.exitCode},kill:c.kill.bind(c),on:c.on.bind(c),once:c.once.bind(c),off:c.off.bind(c)}}initialize(){try{let{additionalDirectories:e=[],agent:r,betas:n,cwd:i,executable:o=this.getDefaultExecutable(),executableArgs:a=[],extraArgs:s={},pathToClaudeCodeExecutable:c,env:l={...process.env},thinkingConfig:u,maxTurns:d,maxBudgetUsd:f,taskBudget:p,model:m,fallbackModel:v,jsonSchema:g,permissionMode:h,allowDangerouslySkipPermissions:y,permissionPromptToolName:_,continueConversation:b,resume:x,settingSources:w,allowedTools:S=[],disallowedTools:$=[],tools:T,mcpServers:A,strictMcpConfig:I,canUseTool:U,includePartialMessages:L,plugins:N,sandbox:Y}=this.options,H=["--output-format","stream-json","--verbose","--input-format","stream-json"];if(u){switch(u.type){case"enabled":u.budgetTokens===void 0?H.push("--thinking","adaptive"):H.push("--max-thinking-tokens",u.budgetTokens.toString());break;case"disabled":H.push("--thinking","disabled");break;case"adaptive":H.push("--thinking","adaptive");break}u.type!=="disabled"&&u.display&&H.push("--thinking-display",u.display)}if(this.options.effort&&H.push("--effort",this.options.effort),d&&H.push("--max-turns",d.toString()),f!==void 0&&H.push("--max-budget-usd",f.toString()),p&&H.push("--task-budget",p.total.toString()),m&&H.push("--model",m),r&&H.push("--agent",r),n&&n.length>0&&H.push("--betas",n.join(",")),g&&H.push("--json-schema",In(g)),this.options.debugFile?H.push("--debug-file",this.options.debugFile):this.options.debug&&H.push("--debug"),Us(l.DEBUG_CLAUDE_AGENT_SDK)&&H.push("--debug-to-stderr"),U){if(_)throw Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other.");H.push("--permission-prompt-tool","stdio")}else _&&H.push("--permission-prompt-tool",_);if(b&&H.push("--continue"),x&&H.push("--resume",x),this.options.assistant&&H.push("--assistant"),this.options.channels&&this.options.channels.length>0&&H.push("--channels",...this.options.channels),S.length>0&&H.push("--allowedTools",S.join(",")),$.length>0&&H.push("--disallowedTools",$.join(",")),T!==void 0&&(Array.isArray(T)?T.length===0?H.push("--tools",""):H.push("--tools",T.join(",")):H.push("--tools","default")),A&&Object.keys(A).length>0&&H.push("--mcp-config",In({mcpServers:A})),w!==void 0&&H.push(`--setting-sources=${w.join(",")}`),I&&H.push("--strict-mcp-config"),h&&H.push("--permission-mode",h),y&&H.push("--allow-dangerously-skip-permissions"),v){if(m&&v===m)throw Error("Fallback model cannot be the same as the main model. Please specify a different model for fallbackModel option.");H.push("--fallback-model",v)}this.options.includeHookEvents&&H.push("--include-hook-events"),L&&H.push("--include-partial-messages"),this.options.sessionMirror&&H.push("--session-mirror");for(let R of e)H.push("--add-dir",R);if(N&&N.length>0)for(let R of N)if(R.type==="local")H.push("--plugin-dir",R.path);else throw Error(`Unsupported plugin type: ${R.type}`);this.options.forkSession&&H.push("--fork-session"),this.options.resumeSessionAt&&H.push("--resume-session-at",this.options.resumeSessionAt),this.options.sessionId&&H.push("--session-id",this.options.sessionId),this.options.persistSession===!1&&H.push("--no-session-persistence");let ye={...s??{}};this.options.settings&&(ye.settings=this.options.settings);let Pe=xce(ye,Y);for(let[R,k]of Object.entries(Pe))k===null?H.push(`--${R}`):H.push(`--${R}`,k);l.CLAUDE_CODE_ENTRYPOINT||(l.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),delete l.NODE_OPTIONS,Us(l.DEBUG_CLAUDE_AGENT_SDK)?l.DEBUG="1":delete l.DEBUG;let ue=$ce(c),W=ue?c:o,E=ue?[...a,...H]:[...a,c,...H],q={command:W,args:E,cwd:i,env:l,signal:this.abortController.signal};this.options.spawnClaudeCodeProcess?(fo(`Spawning Claude Code (custom): ${W} ${E.join(" ")}`),this.process=this.options.spawnClaudeCodeProcess(q)):(fo(`Spawning Claude Code: ${W} ${E.join(" ")}`),this.process=this.spawnLocalProcess(q)),this.processStdin=this.process.stdin,this.processStdout=this.process.stdout,kce(this.process),this.abortHandler=()=>{this.process&&!this.process.killed&&this.process.kill("SIGTERM")},this.abortController.signal.addEventListener("abort",this.abortHandler),this.process.on("error",R=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ka("Claude Code process aborted by user");else if(oP(R)){let k=ue?`Claude Code native binary not found at ${c}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.`:`Claude Code executable not found at ${c}. Is options.pathToClaudeCodeExecutable set?`;this.exitError=ReferenceError(k),fo(this.exitError.message)}else this.exitError=Error(`Failed to spawn Claude Code process: ${R.message}`),fo(this.exitError.message)}),this.process.on("exit",(R,k)=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ka("Claude Code process aborted by user");else{let O=this.getProcessExitError(R,k);O&&(this.exitError=O,fo(O.message))}}),this.ready=!0}catch(e){throw this.ready=!1,e}}getProcessExitError(e,r){if(e!==0&&e!==null)return Error(`Claude Code process exited with code ${e}`);if(r)return Error(`Claude Code process terminated by signal ${r}`)}write(e){if(this.abortController.signal.aborted)throw new ka("Operation aborted");if(this.spawnResolve){this.pendingWrites.push(e);return}if(!this.ready||!this.processStdin)throw Error("ProcessTransport is not ready for writing");if(this.processStdin.writableEnded){fo("[ProcessTransport] Dropping write to ended stdin stream");return}if(this.process?.killed||this.process?.exitCode!==null)throw Error("Cannot write to terminated process");if(this.exitError)throw Error(`Cannot write to process that exited with error: ${this.exitError.message}`);fo(`[ProcessTransport] Writing to stdin: ${e.substring(0,100)}`);try{this.processStdin.write(e)||fo("[ProcessTransport] Write buffer full, data queued")}catch(r){throw this.ready=!1,Error(`Failed to write to process stdin: ${Rv(r)}`)}}close(){this.spawnAbort(Error("Query closed before spawn")),this.processStdin&&(this.processStdin.end(),this.processStdin=void 0),this.abortHandler&&(this.abortController.signal.removeEventListener("abort",this.abortHandler),this.abortHandler=void 0);for(let{handler:r}of this.exitListeners)this.process?.off("exit",r);this.exitListeners=[];let e=this.process;e&&!e.killed&&e.exitCode===null?(setTimeout(r=>{r.killed||r.exitCode!==null||(r.kill("SIGTERM"),setTimeout(n=>{n.exitCode===null&&n.kill("SIGKILL")},5e3,r).unref())},wce,e).unref(),e.once("exit",()=>sy.delete(e))):e&&sy.delete(e),this.ready=!1}isReady(){return this.ready}async*readMessages(){if(this.spawnPromise&&(await this.spawnPromise,this.spawnPromise=void 0),!this.processStdout)throw Error("ProcessTransport output stream not available");if(this.exitError)throw this.exitError;let e=toe({input:this.processStdout}),r=this.process?(()=>{let n=this.process,i=()=>e.close();return n.on("error",i),()=>n.off("error",i)})():void 0;this.exitError&&e.close();try{for await(let n of e)if(n.trim()){let i;try{i=sP(n)}catch{fo(`Non-JSON stdout: ${n}`);continue}yield i}if(this.exitError)throw this.exitError;await this.waitForExit()}catch(n){throw n}finally{r?.(),e.close()}}endInput(){if(this.spawnResolve){this.pendingEndInput=!0;return}this.processStdin&&this.processStdin.end()}getInputStream(){return this.processStdin}onExit(e){if(!this.process)return()=>{};let r=(n,i)=>{let o=this.getProcessExitError(n,i);e(o)};return this.process.on("exit",r),this.exitListeners.push({callback:e,handler:r}),()=>{this.process&&this.process.off("exit",r);let n=this.exitListeners.findIndex(i=>i.handler===r);n!==-1&&this.exitListeners.splice(n,1)}}async waitForExit(){if(!this.process){if(this.exitError)throw this.exitError;return}if(this.process.exitCode!==null||this.process.killed||this.exitError){if(this.exitError)throw this.exitError;return}return new Promise((e,r)=>{let n=(o,a)=>{if(this.abortController.signal.aborted){r(new ka("Operation aborted"));return}let s=this.getProcessExitError(o,a);s?r(s):e()};this.process.once("exit",n);let i=o=>{this.process.off("exit",n),r(o)};this.process.once("error",i),this.process.once("exit",()=>{this.process.off("error",i)})})}};AI=class{returned;queue=[];readResolve;readReject;isDone=!1;hasError;started=!1;constructor(e){this.returned=e}[Symbol.asyncIterator](){if(this.started)throw Error("Stream can only be iterated once");return this.started=!0,this}next(){return this.queue.length>0?Promise.resolve({done:!1,value:this.queue.shift()}):this.isDone?Promise.resolve({done:!0,value:void 0}):this.hasError?Promise.reject(this.hasError):new Promise((e,r)=>{this.readResolve=e,this.readReject=r})}enqueue(e){if(this.readResolve){let r=this.readResolve;this.readResolve=void 0,this.readReject=void 0,r({done:!1,value:e})}else this.queue.push(e)}done(){if(this.isDone=!0,this.readResolve){let e=this.readResolve;this.readResolve=void 0,this.readReject=void 0,e({done:!0,value:void 0})}}error(e){if(this.hasError=e,this.readReject){let r=this.readReject;this.readResolve=void 0,this.readReject=void 0,r(e)}}return(){return this.isDone=!0,this.returned&&this.returned(),Promise.resolve({done:!0,value:void 0})}},UI=class{sendMcpMessage;isClosed=!1;constructor(e){this.sendMcpMessage=e}onclose;onerror;onmessage;async start(){}async send(e){if(this.isClosed)throw Error("Transport is closed");this.sendMcpMessage(e)}async close(){this.isClosed||(this.isClosed=!0,this.onclose?.())}},DI=class{transport;isSingleUserTurn;canUseTool;hooks;abortController;jsonSchema;initConfig;onElicitation;getOAuthToken;pendingControlResponses=new Map;cleanupPerformed=!1;sdkMessages;inputStream=new AI;initialization;cancelControllers=new Map;hookCallbacks=new Map;nextCallbackId=0;sdkMcpTransports=new Map;sdkMcpServerInstances=new Map;pendingMcpResponses=new Map;firstResultReceivedResolve;firstResultReceived=!1;lastErrorResultText;transcriptMirrorBatcher;cleanupCallbacks=[];cleanupPromise;setIsSingleUserTurn(e){this.isSingleUserTurn=e}setTranscriptMirrorBatcher(e){this.transcriptMirrorBatcher=e}addCleanupCallback(e){this.cleanupPerformed?e():this.cleanupCallbacks.push(e)}isClosed(){return this.cleanupPerformed}hasBidirectionalNeeds(){return this.sdkMcpTransports.size>0||this.hooks!==void 0&&Object.keys(this.hooks).length>0||this.canUseTool!==void 0||this.onElicitation!==void 0||this.getOAuthToken!==void 0}constructor(e,r,n,i,o,a=new Map,s,c,l,u){this.transport=e,this.isSingleUserTurn=r,this.canUseTool=n,this.hooks=i,this.abortController=o,this.jsonSchema=s,this.initConfig=c,this.onElicitation=l,this.getOAuthToken=u;for(let[d,f]of a)this.connectSdkMcpServer(d,f);this.sdkMessages=this.readSdkMessages(),this.readMessages(),this.initialization=this.initialize(),this.initialization.catch(()=>{})}setError(e){this.inputStream.error(e)}async stopTask(e){await this.request({subtype:"stop_task",task_id:e})}close(){this.cleanup()}cleanup(e){return this.cleanupPromise?this.cleanupPromise:(this.cleanupPerformed=!0,this.cleanupPromise=this.performCleanup(e),this.cleanupPromise)}async performCleanup(e){for(let r of this.cleanupCallbacks)try{r()}catch{}if(this.cleanupCallbacks=[],this.transcriptMirrorBatcher)try{await this.transcriptMirrorBatcher.flush()}catch{}try{for(let n of this.cancelControllers.values())n.abort();this.cancelControllers.clear(),this.transport.close();let r=e??Error("Query closed before response received");for(let{reject:n}of this.pendingControlResponses.values())n(r);this.pendingControlResponses.clear();for(let{reject:n}of this.pendingMcpResponses.values())n(r);this.pendingMcpResponses.clear(),this.hookCallbacks.clear();for(let n of this.sdkMcpTransports.values())n.close().catch(()=>{});this.sdkMcpTransports.clear(),e?this.inputStream.error(e):this.inputStream.done()}catch{}}next(...[e]){return this.sdkMessages.next(e)}async return(e){return await this.cleanup(),this.sdkMessages.return(e)}async throw(e){return await this.cleanup(),this.sdkMessages.throw(e)}[Symbol.asyncIterator](){return this.sdkMessages}async[Symbol.asyncDispose](){await this.cleanup()}async readMessages(){try{for await(let e of this.transport.readMessages()){if(e.type==="control_response"){let r=this.pendingControlResponses.get(e.response.request_id);r&&r.handler(e.response);continue}else if(e.type==="control_request"){this.handleControlRequest(e);continue}else if(e.type==="control_cancel_request"){this.handleControlCancelRequest(e);continue}else{if(e.type==="keep_alive")continue;if(e.type==="transcript_mirror"){this.transcriptMirrorBatcher?.enqueue(e.filePath,e.entries);continue}}e.type==="system"&&e.subtype==="post_turn_summary"||(e.type==="result"?(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.lastErrorResultText=e.is_error?e.subtype==="success"?e.result:e.errors.join("; "):void 0,this.firstResultReceived=!0,this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.isSingleUserTurn&&(Hn("[Query.readMessages] First result received for single-turn query, closing stdin"),this.transport.endInput())):e.type==="system"&&e.subtype==="session_state_changed"||(this.lastErrorResultText=void 0),this.inputStream.enqueue(e))}this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.inputStream.done(),this.cleanup()}catch(e){if(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.lastErrorResultText!==void 0&&!(e instanceof ka)){let r=Error(`Claude Code returned an error result: ${this.lastErrorResultText}`);Hn(`[Query.readMessages] Replacing exit error with result text. Original: ${Rv(e)}`),this.inputStream.error(r),this.cleanup(r);return}this.inputStream.error(e),this.cleanup(e)}}async handleControlRequest(e){let r=new AbortController;this.cancelControllers.set(e.request_id,r);try{let n=await this.processControlRequest(e,r.signal);if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"success",request_id:e.request_id,response:n}};await Promise.resolve(this.transport.write(In(i)+`
189
+ `))}catch(n){if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"error",request_id:e.request_id,error:Rv(n)}};try{await Promise.resolve(this.transport.write(In(i)+`
190
+ `))}catch(o){Hn(`[Query.handleControlRequest] Error-response write failed: ${Rv(o)}`,{level:"error"})}}finally{this.cancelControllers.delete(e.request_id)}}handleControlCancelRequest(e){let r=this.cancelControllers.get(e.request_id);r&&(r.abort(),this.cancelControllers.delete(e.request_id))}async processControlRequest(e,r){if(e.request.subtype==="can_use_tool"){if(!this.canUseTool)throw Error("canUseTool callback is not provided.");return{...await this.canUseTool(e.request.tool_name,e.request.input,{signal:r,suggestions:e.request.permission_suggestions,blockedPath:e.request.blocked_path,decisionReason:e.request.decision_reason,title:e.request.title,displayName:e.request.display_name,description:e.request.description,toolUseID:e.request.tool_use_id,agentID:e.request.agent_id}),toolUseID:e.request.tool_use_id}}else{if(e.request.subtype==="hook_callback")return await this.handleHookCallbacks(e.request.callback_id,e.request.input,e.request.tool_use_id,r);if(e.request.subtype==="mcp_message"){let n=e.request,i=this.sdkMcpTransports.get(n.server_name);if(!i)throw Error(`SDK MCP server not found: ${n.server_name}`);return"method"in n.message&&"id"in n.message&&n.message.id!==null?{mcp_response:await this.handleMcpControlRequest(n.server_name,n,i)}:(i.onmessage&&i.onmessage(n.message),{mcp_response:{jsonrpc:"2.0",result:{},id:0}})}else if(e.request.subtype==="elicitation"){let n=e.request;return this.onElicitation?await this.onElicitation({serverName:n.mcp_server_name,message:n.message,mode:n.mode,url:n.url,elicitationId:n.elicitation_id,requestedSchema:n.requested_schema,title:n.title,displayName:n.display_name,description:n.description},{signal:r}):{action:"decline"}}else if(e.request.subtype==="oauth_token_refresh"){if(!this.getOAuthToken)throw Error("getOAuthToken callback is not provided.");return{accessToken:await this.getOAuthToken({signal:r})??null}}}throw Error("Unsupported control request subtype: "+e.request.subtype)}async*readSdkMessages(){try{for await(let e of this.inputStream)yield e}finally{await this.cleanup()}}async initialize(){let e;if(this.hooks){e={};for(let[i,o]of Object.entries(this.hooks))o.length>0&&(e[i]=o.map(a=>{let s=[];for(let c of a.hooks){let l=`hook_${this.nextCallbackId++}`;this.hookCallbacks.set(l,c),s.push(l)}return{matcher:a.matcher,hookCallbackIds:s,timeout:a.timeout}}))}let r=this.sdkMcpTransports.size>0?Array.from(this.sdkMcpTransports.keys()):void 0,n={subtype:"initialize",hooks:e,sdkMcpServers:r,jsonSchema:this.jsonSchema,systemPrompt:this.initConfig?.systemPrompt,appendSystemPrompt:this.initConfig?.appendSystemPrompt,excludeDynamicSections:this.initConfig?.excludeDynamicSections,agents:this.initConfig?.agents,promptSuggestions:this.initConfig?.promptSuggestions,agentProgressSummaries:this.initConfig?.agentProgressSummaries};return(await this.request(n)).response}async interrupt(){await this.request({subtype:"interrupt"})}async setPermissionMode(e){await this.request({subtype:"set_permission_mode",mode:e})}async setModel(e){await this.request({subtype:"set_model",model:e})}async setMaxThinkingTokens(e){await this.request({subtype:"set_max_thinking_tokens",max_thinking_tokens:e})}async applyFlagSettings(e){await this.request({subtype:"apply_flag_settings",settings:e})}async getSettings(){return(await this.request({subtype:"get_settings"})).response}async rewindFiles(e,r){return(await this.request({subtype:"rewind_files",user_message_id:e,dry_run:r?.dryRun})).response}async cancelAsyncMessage(e){return(await this.request({subtype:"cancel_async_message",message_uuid:e})).response.cancelled}async seedReadState(e,r){await this.request({subtype:"seed_read_state",path:e,mtime:r})}async enableRemoteControl(e,r){return(await this.request({subtype:"remote_control",enabled:e,...r!==void 0&&{name:r}})).response}async generateSessionTitle(e,r){return(await this.request({subtype:"generate_session_title",description:e,persist:r?.persist})).response.title}async askSideQuestion(e){let r=(await this.request({subtype:"side_question",question:e})).response;return r.response===null?null:{response:r.response,synthetic:r.synthetic??!1}}processPendingPermissionRequests(e){for(let r of e)r.request.subtype==="can_use_tool"&&this.handleControlRequest(r).catch(()=>{})}request(e){let r=Math.random().toString(36).substring(2,15),n={request_id:r,type:"control_request",request:e};return new Promise((i,o)=>{this.pendingControlResponses.set(r,{handler:a=>{this.pendingControlResponses.delete(r),a.subtype==="success"?i(a):(o(Error(a.error)),a.pending_permission_requests&&this.processPendingPermissionRequests(a.pending_permission_requests))},reject:o}),Promise.resolve(this.transport.write(In(n)+`
191
+ `)).catch(a=>{this.pendingControlResponses.delete(r),o(a)})})}initializationResult(){return this.initialization}async supportedCommands(){return(await this.initialization).commands}async supportedModels(){return(await this.initialization).models}async supportedAgents(){return(await this.initialization).agents}async reconnectMcpServer(e){await this.request({subtype:"mcp_reconnect",serverName:e})}async toggleMcpServer(e,r){await this.request({subtype:"mcp_toggle",serverName:e,enabled:r})}async enableChannel(e){await this.request({subtype:"channel_enable",serverName:e})}async mcpAuthenticate(e){return(await this.request({subtype:"mcp_authenticate",serverName:e})).response}async mcpClearAuth(e){return(await this.request({subtype:"mcp_clear_auth",serverName:e})).response}async mcpSubmitOAuthCallbackUrl(e,r){return(await this.request({subtype:"mcp_oauth_callback_url",serverName:e,callbackUrl:r})).response}async claudeAuthenticate(e){return(await this.request({subtype:"claude_authenticate",loginWithClaudeAi:e})).response}async claudeOAuthCallback(e,r){return(await this.request({subtype:"claude_oauth_callback",authorizationCode:e,state:r})).response}async claudeOAuthWaitForCompletion(){return(await this.request({subtype:"claude_oauth_wait_for_completion"})).response}async mcpServerStatus(){return(await this.request({subtype:"mcp_status"})).response.mcpServers}async getContextUsage(){return(await this.request({subtype:"get_context_usage"})).response}async reloadPlugins(){return(await this.request({subtype:"reload_plugins"})).response}async setMcpServers(e){let r={},n={};for(let[s,c]of Object.entries(e))c.type==="sdk"&&"instance"in c?r[s]=c.instance:n[s]=c;let i=new Set(this.sdkMcpServerInstances.keys()),o=new Set(Object.keys(r));for(let s of i)o.has(s)||await this.disconnectSdkMcpServer(s);for(let[s,c]of Object.entries(r))i.has(s)||this.connectSdkMcpServer(s,c);let a={};for(let s of Object.keys(r))a[s]={type:"sdk",name:s};return(await this.request({subtype:"mcp_set_servers",servers:{...n,...a}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(e){Hn("[Query.streamInput] Starting to process input stream");try{let r=0;for await(let n of e){if(r++,Hn(`[Query.streamInput] Processing message ${r}: ${n.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(In(n)+`
192
+ `))}Hn(`[Query.streamInput] Finished processing ${r} messages from input stream`),r>0&&this.hasBidirectionalNeeds()&&(Hn("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),Hn("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(r){if(!(r instanceof ka))throw r}}waitForFirstResult(){return this.firstResultReceived?(Hn("[Query.waitForFirstResult] Result already received, returning immediately"),Promise.resolve()):new Promise(e=>{if(this.abortController?.signal.aborted){e();return}this.abortController?.signal.addEventListener("abort",()=>e(),{once:!0}),this.firstResultReceivedResolve=e})}handleHookCallbacks(e,r,n,i){let o=this.hookCallbacks.get(e);if(!o)throw Error(`No hook callback found for ID: ${e}`);return o(r,n,{signal:i})}connectSdkMcpServer(e,r){let n=new UI(i=>this.sendMcpServerMessageToCli(e,i));this.sdkMcpTransports.set(e,n),this.sdkMcpServerInstances.set(e,r),r.connect(n).catch(i=>{this.sdkMcpTransports.get(e)===n&&this.sdkMcpTransports.delete(e),this.sdkMcpServerInstances.get(e)===r&&this.sdkMcpServerInstances.delete(e),Hn(`[Query.connectSdkMcpServer] Failed to connect MCP server '${e}': ${i}`,{level:"error"})})}async disconnectSdkMcpServer(e){let r=this.sdkMcpTransports.get(e);r&&(await r.close(),this.sdkMcpTransports.delete(e)),this.sdkMcpServerInstances.delete(e)}sendMcpServerMessageToCli(e,r){if("id"in r&&r.id!==null&&r.id!==void 0){let i=`${e}:${r.id}`,o=this.pendingMcpResponses.get(i);if(o){o.resolve(r),this.pendingMcpResponses.delete(i);return}}let n={type:"control_request",request_id:u6(),request:{subtype:"mcp_message",server_name:e,message:r}};Promise.resolve(this.transport.write(In(n)+`
193
+ `)).catch(i=>{Hn(`[Query.sendMcpServerMessageToCli] Transport write failed: ${i}`,{level:"error"})})}handleMcpControlRequest(e,r,n){let i="id"in r.message?r.message.id:null,o=`${e}:${i}`;return new Promise((a,s)=>{let c=()=>{this.pendingMcpResponses.delete(o)},l=d=>{c(),a(d)},u=d=>{c(),s(d)};if(this.pendingMcpResponses.set(o,{resolve:l,reject:u}),n.onmessage)n.onmessage(r.message);else{c(),s(Error("No message handler registered"));return}})}},MI=class{send;pending=[];flushPromise=null;constructor(e){this.send=e}enqueue(e,r){this.pending.push({filePath:e,entries:r})}async flush(){this.flushPromise&&await this.flushPromise;let e=this.pending.splice(0);e.length!==0&&(this.flushPromise=this.doFlush(e),await this.flushPromise,this.flushPromise=null)}async doFlush(e){let r=new Map;for(let n of e){let i=r.get(n.filePath);i?i.push(...n.entries):r.set(n.filePath,n.entries.slice())}for(let[n,i]of r)try{await this.send(n,i)}catch(o){Hn(`[TranscriptMirrorBatcher] flush failed for ${n}: ${o}`,{level:"error"})}}},JLe=Pce(Ice);Oce=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;rZ=200;XLe=Buffer.from('{"type":"attribution-snapshot"'),e2e=Buffer.from('{"type":"system"'),Rce=10,t2e=Buffer.from([Rce]);Dce="user:inference",v6="user:profile",Mce="org:create_api_key",Lce=[Mce,v6],Zce=[v6,Dce,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],i2e=Array.from(new Set([...Lce,...Zce])),nZ={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},qce=void 0;Vce=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];Bce="-credentials";(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw Error()}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(St||(St={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(iZ||(iZ={}));ve=St.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sa=t=>{switch(typeof t){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(t)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(t)?ve.array:t===null?ve.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ve.promise:typeof Map<"u"&&t instanceof Map?ve.map:typeof Set<"u"&&t instanceof Set?ve.set:typeof Date<"u"&&t instanceof Date?ve.date:ve.object;default:return ve.unknown}},te=St.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gi=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let l=a.path[c];c!==a.path.length-1?s[l]=s[l]||{_errors:[]}:(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))),s=s[l],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,St.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};gi.create=t=>new gi(t);Hce=(t,e)=>{let r;switch(t.code){case te.invalid_type:t.received===ve.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,St.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:r=`Unrecognized key(s) in object: ${St.joinValues(t.keys,", ")}`;break;case te.invalid_union:r="Invalid input";break;case te.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${St.joinValues(t.options)}`;break;case te.invalid_enum_value:r=`Invalid enum value. Expected ${St.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:r="Invalid function arguments";break;case te.invalid_return_type:r="Invalid function return type";break;case te.invalid_date:r="Invalid date";break;case te.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:St.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case te.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case te.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case te.custom:r="Invalid input";break;case te.invalid_intersection_types:r="Intersection results could not be merged";break;case te.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:r="Number must be finite";break;default:r=e.defaultError,St.assertNever(t)}return{message:r}},ef=Hce,Qce=ef;ZI=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",c=n.filter(l=>!!l).slice().reverse();for(let l of c)s=l(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}};mn=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Ce;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ce;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},Ce=Object.freeze({status:"aborted"}),Bp=t=>({status:"dirty",value:t}),Pn=t=>({status:"valid",value:t}),oZ=t=>t.status==="aborted",aZ=t=>t.status==="dirty",Ol=t=>t.status==="valid",cy=t=>typeof Promise<"u"&&t instanceof Promise;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(be||(be={}));vi=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},sZ=(t,e)=>{if(Ol(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new gi(t.common.issues);return this._error=r,this._error}}};tt=class{get description(){return this._def.description}_getType(e){return Sa(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new mn,ctx:{common:e.parent.common,data:e.data,parsedType:Sa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(cy(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},i=this._parseSync({data:e,path:n.path,parent:n});return sZ(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return Ol(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>Ol(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sa(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(cy(i)?i:Promise.resolve(i));return sZ(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:te.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Fi({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Zi.create(this,this._def)}nullable(){return Fo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ia.create(this)}promise(){return Fs.create(this,this._def)}or(e){return Rl.create([this,e],this._def)}and(e){return Cl.create(this,e,this._def)}transform(e){return new Fi({...We(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ll({...We(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new ly({typeName:Ae.ZodBranded,type:this,...We(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Zl({...We(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return uy.create(this,e)}readonly(){return ql.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Yce=/^c[^\s-]{8,}$/i,Jce=/^[0-9a-z]+$/,Xce=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ele=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,tle=/^[a-z0-9_-]{21}$/i,rle=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nle=/^[-+]?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)?)??$/,ile=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ole="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ale=/^(?:(?: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])$/,sle=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,cle=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,lle=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ule=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dle=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,y6="((\\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])))",ple=new RegExp(`^${y6}$`);zl=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ve.string){let i=this._getOrReturnCtx(e);return le(i,{code:te.invalid_type,expected:ve.string,received:i.parsedType}),Ce}let r=new mn,n;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),le(n,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),le(n,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(n=this._getOrReturnCtx(e,n),o?le(n,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&le(n,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")ile.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"email",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")_I||(_I=new RegExp(ole,"u")),_I.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"emoji",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ele.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"uuid",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")tle.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"nanoid",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Yce.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"cuid",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Jce.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"cuid2",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Xce.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"ulid",code:te.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),le(n,{validation:"url",code:te.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,!i.regex.test(e.data)&&(n=this._getOrReturnCtx(e,n),le(n,{validation:"regex",code:te.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?mle(i).test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ple.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?fle(i).test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{code:te.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?nle.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"duration",code:te.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?hle(e.data,i.version)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"ip",code:te.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?gle(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"jwt",code:te.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?vle(e.data,i.version)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"cidr",code:te.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ule.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"base64",code:te.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?dle.test(e.data)||(n=this._getOrReturnCtx(e,n),le(n,{validation:"base64url",code:te.invalid_string,message:i.message}),r.dirty()):St.assertNever(i);return{status:r.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:te.invalid_string,...be.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...be.errToObj(e)})}url(e){return this._addCheck({kind:"url",...be.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...be.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...be.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...be.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...be.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...be.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...be.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...be.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...be.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...be.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...be.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...be.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...be.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...be.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...be.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...be.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...be.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...be.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...be.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...be.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...be.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...be.errToObj(r)})}nonempty(e){return this.min(1,be.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};zl.create=t=>new zl({checks:[],typeName:Ae.ZodString,coerce:t?.coerce??!1,...We(t)});tf=class t extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ve.number){let i=this._getOrReturnCtx(e);return le(i,{code:te.invalid_type,expected:ve.number,received:i.parsedType}),Ce}let r,n=new mn;for(let i of this._def.checks)i.kind==="int"?St.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),le(r,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?yle(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),le(r,{code:te.not_finite,message:i.message}),n.dirty()):St.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,be.toString(r))}gt(e,r){return this.setLimit("min",e,!1,be.toString(r))}lte(e,r){return this.setLimit("max",e,!0,be.toString(r))}lt(e,r){return this.setLimit("max",e,!1,be.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:be.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:be.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:be.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:be.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:be.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:be.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&St.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};tf.create=t=>new tf({checks:[],typeName:Ae.ZodNumber,coerce:t?.coerce||!1,...We(t)});rf=class t extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ve.bigint)return this._getInvalidInput(e);let r,n=new mn;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),le(r,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):St.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.bigint,received:r.parsedType}),Ce}gte(e,r){return this.setLimit("min",e,!0,be.toString(r))}gt(e,r){return this.setLimit("min",e,!1,be.toString(r))}lte(e,r){return this.setLimit("max",e,!0,be.toString(r))}lt(e,r){return this.setLimit("max",e,!1,be.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:be.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:be.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};rf.create=t=>new rf({checks:[],typeName:Ae.ZodBigInt,coerce:t?.coerce??!1,...We(t)});nf=class extends tt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ve.boolean){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.boolean,received:r.parsedType}),Ce}return Pn(e.data)}};nf.create=t=>new nf({typeName:Ae.ZodBoolean,coerce:t?.coerce||!1,...We(t)});of=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ve.date){let i=this._getOrReturnCtx(e);return le(i,{code:te.invalid_type,expected:ve.date,received:i.parsedType}),Ce}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return le(i,{code:te.invalid_date}),Ce}let r=new mn,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),le(n,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),le(n,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):St.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:be.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:be.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};of.create=t=>new of({checks:[],coerce:t?.coerce||!1,typeName:Ae.ZodDate,...We(t)});af=class extends tt{_parse(e){if(this._getType(e)!==ve.symbol){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.symbol,received:r.parsedType}),Ce}return Pn(e.data)}};af.create=t=>new af({typeName:Ae.ZodSymbol,...We(t)});jl=class extends tt{_parse(e){if(this._getType(e)!==ve.undefined){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.undefined,received:r.parsedType}),Ce}return Pn(e.data)}};jl.create=t=>new jl({typeName:Ae.ZodUndefined,...We(t)});Nl=class extends tt{_parse(e){if(this._getType(e)!==ve.null){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.null,received:r.parsedType}),Ce}return Pn(e.data)}};Nl.create=t=>new Nl({typeName:Ae.ZodNull,...We(t)});sf=class extends tt{constructor(){super(...arguments),this._any=!0}_parse(e){return Pn(e.data)}};sf.create=t=>new sf({typeName:Ae.ZodAny,...We(t)});$a=class extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Pn(e.data)}};$a.create=t=>new $a({typeName:Ae.ZodUnknown,...We(t)});mo=class extends tt{_parse(e){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.never,received:r.parsedType}),Ce}};mo.create=t=>new mo({typeName:Ae.ZodNever,...We(t)});cf=class extends tt{_parse(e){if(this._getType(e)!==ve.undefined){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.void,received:r.parsedType}),Ce}return Pn(e.data)}};cf.create=t=>new cf({typeName:Ae.ZodVoid,...We(t)});Ia=class t extends tt{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==ve.array)return le(r,{code:te.invalid_type,expected:ve.array,received:r.parsedType}),Ce;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(le(r,{code:a?te.too_big:te.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(le(r,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(le(r,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new vi(r,a,r.path,s)))).then(a=>mn.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new vi(r,a,r.path,s)));return mn.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:be.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:be.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:be.toString(r)}})}nonempty(e){return this.min(1,e)}};Ia.create=(t,e)=>new Ia({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...We(e)});Xn=class t extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=St.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==ve.object){let c=this._getOrReturnCtx(e);return le(c,{code:te.invalid_type,expected:ve.object,received:c.parsedType}),Ce}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof mo&&this._def.unknownKeys==="strip"))for(let c in n.data)o.includes(c)||a.push(c);let s=[];for(let c of o){let l=i[c],u=n.data[c];s.push({key:{status:"valid",value:c},value:l._parse(new vi(n,u,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof mo){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)s.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(c==="strict")a.length>0&&(le(n,{code:te.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let u=n.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new vi(n,u,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of s){let u=await l.key,d=await l.value;c.push({key:u,value:d,alwaysSet:l.alwaysSet})}return c}).then(c=>mn.mergeObjectSync(r,c)):mn.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(e){return be.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:be.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of St.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of St.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return wl(this)}partial(e){let r={};for(let n of St.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of St.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Zi;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return b6(St.objectKeys(this.shape))}};Xn.create=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strip",catchall:mo.create(),typeName:Ae.ZodObject,...We(e)});Xn.strictCreate=(t,e)=>new Xn({shape:()=>t,unknownKeys:"strict",catchall:mo.create(),typeName:Ae.ZodObject,...We(e)});Xn.lazycreate=(t,e)=>new Xn({shape:t,unknownKeys:"strip",catchall:mo.create(),typeName:Ae.ZodObject,...We(e)});Rl=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new gi(s.ctx.common.issues));return le(r,{code:te.invalid_union,unionErrors:a}),Ce}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let c of n){let l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new gi(c));return le(r,{code:te.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}};Rl.create=(t,e)=>new Rl({options:t,typeName:Ae.ZodUnion,...We(e)});Mo=t=>t instanceof Al?Mo(t.schema):t instanceof Fi?Mo(t.innerType()):t instanceof Ul?[t.value]:t instanceof Dl?t.options:t instanceof Ml?St.objectValues(t.enum):t instanceof Ll?Mo(t._def.innerType):t instanceof jl?[void 0]:t instanceof Nl?[null]:t instanceof Zi?[void 0,...Mo(t.unwrap())]:t instanceof Fo?[null,...Mo(t.unwrap())]:t instanceof ly||t instanceof ql?Mo(t.unwrap()):t instanceof Zl?Mo(t._def.innerType):[],qI=class t extends tt{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.object)return le(r,{code:te.invalid_type,expected:ve.object,received:r.parsedType}),Ce;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(le(r,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=Mo(o.shape[e]);if(!a.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t({typeName:Ae.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...We(n)})}};Cl=class extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(oZ(o)||oZ(a))return Ce;let s=FI(o.value,a.value);return s.valid?((aZ(o)||aZ(a))&&r.dirty(),{status:r.value,value:s.data}):(le(n,{code:te.invalid_intersection_types}),Ce)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Cl.create=(t,e,r)=>new Cl({left:t,right:e,typeName:Ae.ZodIntersection,...We(r)});qo=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.array)return le(n,{code:te.invalid_type,expected:ve.array,received:n.parsedType}),Ce;if(n.data.length<this._def.items.length)return le(n,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&n.data.length>this._def.items.length&&(le(n,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let s=this._def.items[a]||this._def.rest;return s?s._parse(new vi(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>mn.mergeArray(r,o)):mn.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};qo.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new qo({items:t,typeName:Ae.ZodTuple,rest:null,...We(e)})};VI=class t extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.object)return le(n,{code:te.invalid_type,expected:ve.object,received:n.parsedType}),Ce;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new vi(n,s,n.path,s)),value:a._parse(new vi(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?mn.mergeObjectAsync(r,i):mn.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof tt?new t({keyType:e,valueType:r,typeName:Ae.ZodRecord,...We(n)}):new t({keyType:zl.create(),valueType:e,typeName:Ae.ZodRecord,...We(r)})}},lf=class extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.map)return le(n,{code:te.invalid_type,expected:ve.map,received:n.parsedType}),Ce;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:i._parse(new vi(n,s,n.path,[l,"key"])),value:o._parse(new vi(n,c,n.path,[l,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Ce;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let{key:l,value:u}=c;if(l.status==="aborted"||u.status==="aborted")return Ce;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}};lf.create=(t,e,r)=>new lf({valueType:e,keyType:t,typeName:Ae.ZodMap,...We(r)});uf=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.set)return le(n,{code:te.invalid_type,expected:ve.set,received:n.parsedType}),Ce;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(le(n,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(le(n,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let l=new Set;for(let u of c){if(u.status==="aborted")return Ce;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}let s=[...n.data.values()].map((c,l)=>o._parse(new vi(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:be.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:be.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};uf.create=(t,e)=>new uf({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...We(e)});WI=class t extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.function)return le(r,{code:te.invalid_type,expected:ve.function,received:r.parsedType}),Ce;function n(s,c){return ZI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,LI(),ef].filter(l=>!!l),issueData:{code:te.invalid_arguments,argumentsError:c}})}function i(s,c){return ZI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,LI(),ef].filter(l=>!!l),issueData:{code:te.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Fs){let s=this;return Pn(async function(...c){let l=new gi([]),u=await s._def.args.parseAsync(c,o).catch(f=>{throw l.addIssue(n(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(f=>{throw l.addIssue(i(d,f)),l})})}else{let s=this;return Pn(function(...c){let l=s._def.args.safeParse(c,o);if(!l.success)throw new gi([n(c,l.error)]);let u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new gi([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:qo.create(e).rest($a.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||qo.create([]).rest($a.create()),returns:r||$a.create(),typeName:Ae.ZodFunction,...We(n)})}},Al=class extends tt{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Al.create=(t,e)=>new Al({getter:t,typeName:Ae.ZodLazy,...We(e)});Ul=class extends tt{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return le(r,{received:r.data,code:te.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ul.create=(t,e)=>new Ul({value:t,typeName:Ae.ZodLiteral,...We(e)});Dl=class t extends tt{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return le(r,{expected:St.joinValues(n),received:r.parsedType,code:te.invalid_type}),Ce}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return le(r,{received:r.data,code:te.invalid_enum_value,options:n}),Ce}return Pn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};Dl.create=b6;Ml=class extends tt{_parse(e){let r=St.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ve.string&&n.parsedType!==ve.number){let i=St.objectValues(r);return le(n,{expected:St.joinValues(i),received:n.parsedType,code:te.invalid_type}),Ce}if(this._cache||(this._cache=new Set(St.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=St.objectValues(r);return le(n,{received:n.data,code:te.invalid_enum_value,options:i}),Ce}return Pn(e.data)}get enum(){return this._def.values}};Ml.create=(t,e)=>new Ml({values:t,typeName:Ae.ZodNativeEnum,...We(e)});Fs=class extends tt{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.promise&&r.common.async===!1)return le(r,{code:te.invalid_type,expected:ve.promise,received:r.parsedType}),Ce;let n=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return Pn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Fs.create=(t,e)=>new Fs({type:t,typeName:Ae.ZodPromise,...We(e)});Fi=class extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{le(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return Ce;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Ce:c.status==="dirty"||r.value==="dirty"?Bp(c.value):c});{if(r.value==="aborted")return Ce;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?Ce:s.status==="dirty"||r.value==="dirty"?Bp(s.value):s}}if(i.type==="refinement"){let a=s=>{let c=i.refinement(s,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ce:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Ce:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ol(a))return Ce;let s=i.transform(a.value,o);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Ol(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):Ce);St.assertNever(i)}};Fi.create=(t,e,r)=>new Fi({schema:t,typeName:Ae.ZodEffects,effect:e,...We(r)});Fi.createWithPreprocess=(t,e,r)=>new Fi({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...We(r)});Zi=class extends tt{_parse(e){return this._getType(e)===ve.undefined?Pn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Zi.create=(t,e)=>new Zi({innerType:t,typeName:Ae.ZodOptional,...We(e)});Fo=class extends tt{_parse(e){return this._getType(e)===ve.null?Pn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Fo.create=(t,e)=>new Fo({innerType:t,typeName:Ae.ZodNullable,...We(e)});Ll=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===ve.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ll.create=(t,e)=>new Ll({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...We(e)});Zl=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return cy(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gi(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gi(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Zl.create=(t,e)=>new Zl({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...We(e)});df=class extends tt{_parse(e){if(this._getType(e)!==ve.nan){let r=this._getOrReturnCtx(e);return le(r,{code:te.invalid_type,expected:ve.nan,received:r.parsedType}),Ce}return{status:"valid",value:e.data}}};df.create=t=>new df({typeName:Ae.ZodNaN,...We(t)});ly=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},uy=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ce:i.status==="dirty"?(r.dirty(),Bp(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ce:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Ae.ZodPipeline})}},ql=class extends tt{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Ol(i)&&(i.value=Object.freeze(i.value)),i);return cy(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};ql.create=(t,e)=>new ql({innerType:t,typeName:Ae.ZodReadonly,...We(e)});o2e={object:Xn.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));a2e=zl.create,s2e=tf.create,c2e=df.create,l2e=rf.create,u2e=nf.create,d2e=of.create,p2e=af.create,f2e=jl.create,m2e=Nl.create,h2e=sf.create,g2e=$a.create,v2e=mo.create,y2e=cf.create,_2e=Ia.create,b2e=Xn.create,x2e=Xn.strictCreate,w2e=Rl.create,S2e=qI.create,k2e=Cl.create,$2e=qo.create,E2e=VI.create,I2e=lf.create,P2e=uf.create,T2e=WI.create,O2e=Al.create,z2e=Ul.create,j2e=Dl.create,N2e=Ml.create,R2e=Fs.create,C2e=Fi.create,A2e=Zi.create,U2e=Fo.create,D2e=Fi.createWithPreprocess,M2e=uy.create,x6={};Bs(x6,{version:()=>jq,util:()=>ft,treeifyError:()=>N6,toJSONSchema:()=>$9,toDotPath:()=>R6,safeParseAsync:()=>_P,safeParse:()=>vP,registry:()=>RP,regexes:()=>bP,prettifyError:()=>C6,parseAsync:()=>my,parse:()=>fy,locales:()=>NP,isValidJWT:()=>rF,isValidBase64URL:()=>Xq,isValidBase64:()=>kP,globalRegistry:()=>Ds,globalConfig:()=>dy,function:()=>k9,formatError:()=>fP,flattenError:()=>pP,config:()=>hn,clone:()=>Bi,_xid:()=>BP,_void:()=>l9,_uuidv7:()=>MP,_uuidv6:()=>DP,_uuidv4:()=>UP,_uuid:()=>AP,_url:()=>LP,_uppercase:()=>oT,_unknown:()=>yy,_union:()=>_de,_undefined:()=>o9,_ulid:()=>WP,_uint64:()=>n9,_uint32:()=>YF,_tuple:()=>y9,_trim:()=>dT,_transform:()=>Pde,_toUpperCase:()=>fT,_toLowerCase:()=>pT,_templateLiteral:()=>Ude,_symbol:()=>i9,_success:()=>Nde,_stringbool:()=>w9,_stringFormat:()=>S9,_string:()=>DF,_startsWith:()=>sT,_size:()=>rT,_set:()=>kde,_safeParseAsync:()=>yP,_safeParse:()=>gP,_regex:()=>nT,_refine:()=>x9,_record:()=>wde,_readonly:()=>Ade,_property:()=>v9,_promise:()=>Mde,_positive:()=>f9,_pipe:()=>Cde,_parseAsync:()=>hP,_parse:()=>mP,_overwrite:()=>Hs,_optional:()=>Tde,_number:()=>WF,_nullable:()=>Ode,_null:()=>a9,_normalize:()=>uT,_nonpositive:()=>h9,_nonoptional:()=>jde,_nonnegative:()=>g9,_never:()=>c9,_negative:()=>m9,_nativeEnum:()=>Ede,_nanoid:()=>qP,_nan:()=>p9,_multipleOf:()=>hf,_minSize:()=>gf,_minLength:()=>Vl,_min:()=>Qn,_mime:()=>lT,_maxSize:()=>Cy,_maxLength:()=>Ay,_max:()=>qi,_map:()=>Sde,_lte:()=>qi,_lt:()=>Vs,_lowercase:()=>iT,_literal:()=>Ide,_length:()=>Uy,_lazy:()=>Dde,_ksuid:()=>GP,_jwt:()=>tT,_isoTime:()=>FF,_isoDuration:()=>VF,_isoDateTime:()=>ZF,_isoDate:()=>qF,_ipv6:()=>HP,_ipv4:()=>KP,_intersection:()=>xde,_int64:()=>r9,_int32:()=>QF,_int:()=>GF,_includes:()=>aT,_guid:()=>vy,_gte:()=>Qn,_gt:()=>Ws,_float64:()=>HF,_float32:()=>KF,_file:()=>_9,_enum:()=>$de,_endsWith:()=>cT,_emoji:()=>ZP,_email:()=>CP,_e164:()=>eT,_discriminatedUnion:()=>bde,_default:()=>zde,_date:()=>u9,_custom:()=>b9,_cuid2:()=>VP,_cuid:()=>FP,_coercedString:()=>MF,_coercedNumber:()=>BF,_coercedDate:()=>d9,_coercedBoolean:()=>XF,_coercedBigint:()=>t9,_cidrv6:()=>YP,_cidrv4:()=>QP,_catch:()=>Rde,_boolean:()=>JF,_bigint:()=>e9,_base64url:()=>XP,_base64:()=>JP,_array:()=>mT,_any:()=>s9,TimePrecision:()=>LF,NEVER:()=>w6,JSONSchemaGenerator:()=>vf,JSONSchema:()=>Lde,Doc:()=>hy,$output:()=>AF,$input:()=>UF,$constructor:()=>D,$brand:()=>S6,$ZodXID:()=>qq,$ZodVoid:()=>pF,$ZodUnknown:()=>gy,$ZodUnion:()=>OP,$ZodUndefined:()=>cF,$ZodUUID:()=>Rq,$ZodURL:()=>Aq,$ZodULID:()=>Zq,$ZodType:()=>Fe,$ZodTuple:()=>Ry,$ZodTransform:()=>zP,$ZodTemplateLiteral:()=>zF,$ZodSymbol:()=>sF,$ZodSuccess:()=>IF,$ZodStringFormat:()=>Kt,$ZodString:()=>xf,$ZodSet:()=>yF,$ZodRegistry:()=>mf,$ZodRecord:()=>gF,$ZodRealError:()=>_f,$ZodReadonly:()=>OF,$ZodPromise:()=>jF,$ZodPrefault:()=>$F,$ZodPipe:()=>jP,$ZodOptional:()=>wF,$ZodObject:()=>TP,$ZodNumberFormat:()=>oF,$ZodNumber:()=>$P,$ZodNullable:()=>SF,$ZodNull:()=>lF,$ZodNonOptional:()=>EF,$ZodNever:()=>dF,$ZodNanoID:()=>Dq,$ZodNaN:()=>TF,$ZodMap:()=>vF,$ZodLiteral:()=>bF,$ZodLazy:()=>NF,$ZodKSUID:()=>Fq,$ZodJWT:()=>nF,$ZodIntersection:()=>hF,$ZodISOTime:()=>Bq,$ZodISODuration:()=>Gq,$ZodISODateTime:()=>Vq,$ZodISODate:()=>Wq,$ZodIPv6:()=>Hq,$ZodIPv4:()=>Kq,$ZodGUID:()=>Nq,$ZodFunction:()=>_y,$ZodFile:()=>xF,$ZodError:()=>dP,$ZodEnum:()=>_F,$ZodEmoji:()=>Uq,$ZodEmail:()=>Cq,$ZodE164:()=>tF,$ZodDiscriminatedUnion:()=>mF,$ZodDefault:()=>kF,$ZodDate:()=>fF,$ZodCustomStringFormat:()=>iF,$ZodCustom:()=>RF,$ZodCheckUpperCase:()=>$q,$ZodCheckStringFormat:()=>bf,$ZodCheckStartsWith:()=>Iq,$ZodCheckSizeEquals:()=>_q,$ZodCheckRegex:()=>Sq,$ZodCheckProperty:()=>Tq,$ZodCheckOverwrite:()=>zq,$ZodCheckNumberFormat:()=>hq,$ZodCheckMultipleOf:()=>mq,$ZodCheckMinSize:()=>yq,$ZodCheckMinLength:()=>xq,$ZodCheckMimeType:()=>Oq,$ZodCheckMaxSize:()=>vq,$ZodCheckMaxLength:()=>bq,$ZodCheckLowerCase:()=>kq,$ZodCheckLessThan:()=>wP,$ZodCheckLengthEquals:()=>wq,$ZodCheckIncludes:()=>Eq,$ZodCheckGreaterThan:()=>SP,$ZodCheckEndsWith:()=>Pq,$ZodCheckBigIntFormat:()=>gq,$ZodCheck:()=>pr,$ZodCatch:()=>PF,$ZodCUID2:()=>Lq,$ZodCUID:()=>Mq,$ZodCIDRv6:()=>Yq,$ZodCIDRv4:()=>Qq,$ZodBoolean:()=>EP,$ZodBigIntFormat:()=>aF,$ZodBigInt:()=>IP,$ZodBase64URL:()=>eF,$ZodBase64:()=>Jq,$ZodAsyncError:()=>Pa,$ZodArray:()=>PP,$ZodAny:()=>uF});w6=Object.freeze({status:"aborted"});S6=Symbol("zod_brand"),Pa=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},dy={};ft={};Bs(ft,{unwrapMessage:()=>Gp,stringifyPrimitive:()=>He,required:()=>Cle,randomString:()=>Ele,propertyKeyTypes:()=>py,promiseAllObject:()=>$le,primitiveTypes:()=>I6,prefixIssues:()=>hi,pick:()=>Ole,partial:()=>Rle,optionalKeys:()=>P6,omit:()=>zle,numKeys:()=>Ile,nullish:()=>Gs,normalizeParams:()=>re,merge:()=>Nle,jsonStringifyReplacer:()=>k6,joinValues:()=>oe,issue:()=>z6,isPlainObject:()=>ff,isObject:()=>pf,getSizableOrigin:()=>jy,getParsedType:()=>Ple,getLengthableOrigin:()=>Ny,getEnumValues:()=>cP,getElementAtPath:()=>kle,floatSafeRemainder:()=>$6,finalizeIssue:()=>Vi,extend:()=>jle,escapeRegex:()=>Ks,esc:()=>Sl,defineLazy:()=>zt,createTransparentProxy:()=>Tle,clone:()=>Bi,cleanRegex:()=>zy,cleanEnum:()=>Ale,captureStackTrace:()=>uP,cached:()=>Oy,assignProp:()=>lP,assertNotEqual:()=>ble,assertNever:()=>wle,assertIs:()=>xle,assertEqual:()=>_le,assert:()=>Sle,allowsEval:()=>E6,aborted:()=>Il,NUMBER_FORMAT_RANGES:()=>T6,Class:()=>BI,BIGINT_FORMAT_RANGES:()=>O6});uP=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};E6=Oy(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});Ple=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw Error(`Unknown data type: ${e}`)}},py=new Set(["string","number","symbol"]),I6=new Set(["string","number","bigint","boolean","symbol","undefined"]);T6={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]},O6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};BI=class{constructor(...e){}},j6=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,k6,2)},enumerable:!0})},dP=D("$ZodError",j6),_f=D("$ZodError",j6,{Parent:Error});mP=t=>(e,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Pa;if(a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>Vi(c,o,hn())));throw uP(s,i?.callee),s}return a.value},fy=mP(_f),hP=t=>async(e,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>Vi(c,o,hn())));throw uP(s,i?.callee),s}return a.value},my=hP(_f),gP=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new Pa;return o.issues.length?{success:!1,error:new(t??dP)(o.issues.map(a=>Vi(a,i,hn())))}:{success:!0,data:o.value}},vP=gP(_f),yP=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>Vi(a,i,hn())))}:{success:!0,data:o.value}},_P=yP(_f),bP={};Bs(bP,{xid:()=>M6,uuid7:()=>Lle,uuid6:()=>Mle,uuid4:()=>Dle,uuid:()=>Fl,uppercase:()=>pq,unicodeEmail:()=>Fle,undefined:()=>uq,ulid:()=>D6,time:()=>rq,string:()=>iq,rfc5322Email:()=>qle,number:()=>sq,null:()=>lq,nanoid:()=>Z6,lowercase:()=>dq,ksuid:()=>L6,ipv6:()=>G6,ipv4:()=>B6,integer:()=>aq,html5Email:()=>Zle,hostname:()=>Y6,guid:()=>F6,extendedDuration:()=>Ule,emoji:()=>W6,email:()=>V6,e164:()=>J6,duration:()=>q6,domain:()=>Ble,datetime:()=>nq,date:()=>eq,cuid2:()=>U6,cuid:()=>A6,cidrv6:()=>H6,cidrv4:()=>K6,browserEmail:()=>Vle,boolean:()=>cq,bigint:()=>oq,base64url:()=>xP,base64:()=>Q6,_emoji:()=>Wle});A6=/^[cC][^\s-]{8,}$/,U6=/^[0-9a-z]+$/,D6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,M6=/^[0-9a-vA-V]{20}$/,L6=/^[A-Za-z0-9]{27}$/,Z6=/^[a-zA-Z0-9_-]{21}$/,q6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ule=/^[-+]?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)?)??$/,F6=/^([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})$/,Fl=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Dle=Fl(4),Mle=Fl(6),Lle=Fl(7),V6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Zle=/^[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])?)*$/,qle=/^(([^<>()\[\]\\.,;:\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,}))$/,Fle=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Vle=/^[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])?)*$/,Wle="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";B6=/^(?:(?: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])$/,G6=/^(([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})$/,K6=/^((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])$/,H6=/^(([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])$/,Q6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xP=/^[A-Za-z0-9_-]*$/,Y6=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Ble=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,J6=/^\+(?:[0-9]){6,14}[0-9]$/,X6="(?:(?:\\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])))",eq=new RegExp(`^${X6}$`);iq=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},oq=/^\d+n?$/,aq=/^\d+$/,sq=/^-?\d+(?:\.\d+)?/i,cq=/true|false/i,lq=/null/i,uq=/undefined/i,dq=/^[^A-Z]*$/,pq=/^[^a-z]*$/,pr=D("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),fq={number:"number",bigint:"bigint",object:"date"},wP=D("$ZodCheckLessThan",(t,e)=>{pr.init(t,e);let r=fq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),SP=D("$ZodCheckGreaterThan",(t,e)=>{pr.init(t,e);let r=fq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),mq=D("$ZodCheckMultipleOf",(t,e)=>{pr.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):$6(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),hq=D("$ZodCheckNumberFormat",(t,e)=>{pr.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=T6[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=i,s.maximum=o,r&&(s.pattern=aq)}),t._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:e.format,code:"invalid_type",input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inst:t})}}),gq=D("$ZodCheckBigIntFormat",(t,e)=>{pr.init(t,e);let[r,n]=O6[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inst:t})}}),vq=D("$ZodCheckMaxSize",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;n.size<=e.maximum||r.issues.push({origin:jy(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),yq=D("$ZodCheckMinSize",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;n.size>=e.minimum||r.issues.push({origin:jy(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),_q=D("$ZodCheckSizeEquals",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=r=>{let n=r.value,i=n.size;if(i===e.size)return;let o=i>e.size;r.issues.push({origin:jy(n),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),bq=D("$ZodCheckMaxLength",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;if(n.length<=e.maximum)return;let i=Ny(n);r.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),xq=D("$ZodCheckMinLength",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;if(n.length>=e.minimum)return;let i=Ny(n);r.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),wq=D("$ZodCheckLengthEquals",(t,e)=>{pr.init(t,e),t._zod.when=r=>{let n=r.value;return!Gs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=r=>{let n=r.value,i=n.length;if(i===e.length)return;let o=Ny(n),a=i>e.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),bf=D("$ZodCheckStringFormat",(t,e)=>{var r,n;pr.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Sq=D("$ZodCheckRegex",(t,e)=>{bf.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),kq=D("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=dq),bf.init(t,e)}),$q=D("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=pq),bf.init(t,e)}),Eq=D("$ZodCheckIncludes",(t,e)=>{pr.init(t,e);let r=Ks(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Iq=D("$ZodCheckStartsWith",(t,e)=>{pr.init(t,e);let r=new RegExp(`^${Ks(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Pq=D("$ZodCheckEndsWith",(t,e)=>{pr.init(t,e);let r=new RegExp(`.*${Ks(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});Tq=D("$ZodCheckProperty",(t,e)=>{pr.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>cZ(i,r,e.property));cZ(n,r,e.property)}}),Oq=D("$ZodCheckMimeType",(t,e)=>{pr.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t})}}),zq=D("$ZodCheckOverwrite",(t,e)=>{pr.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),hy=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
194
+ `).filter(o=>o),n=Math.min(...r.map(o=>o.length-o.trimStart().length)),i=r.map(o=>o.slice(n)).map(o=>" ".repeat(this.indent*2)+o);for(let o of i)this.content.push(o)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
195
+ `))}},jq={major:4,minor:0,patch:0},Fe=D("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=jq;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(o,a,s)=>{let c=Il(o),l;for(let u of a){if(u._zod.when){if(!u._zod.when(o))continue}else if(c)continue;let d=o.issues.length,f=u._zod.check(o);if(f instanceof Promise&&s?.async===!1)throw new Pa;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,o.issues.length!==d&&(c||(c=Il(o,d)))});else{if(o.issues.length===d)continue;c||(c=Il(o,d))}}return l?l.then(()=>o):o};t._zod.run=(o,a)=>{let s=t._zod.parse(o,a);if(s instanceof Promise){if(a.async===!1)throw new Pa;return s.then(c=>i(c,n,a))}return i(s,n,a)}}t["~standard"]={validate:i=>{try{let o=vP(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return _P(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),xf=D("$ZodString",(t,e)=>{Fe.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??iq(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Kt=D("$ZodStringFormat",(t,e)=>{bf.init(t,e),xf.init(t,e)}),Nq=D("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=F6),Kt.init(t,e)}),Rq=D("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Fl(r))}else e.pattern??(e.pattern=Fl());Kt.init(t,e)}),Cq=D("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=V6),Kt.init(t,e)}),Aq=D("$ZodURL",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{try{let n=r.value,i=new URL(n),o=i.href;e.hostname&&(e.hostname.lastIndex=0,!e.hostname.test(i.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Y6.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,!e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Uq=D("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=W6()),Kt.init(t,e)}),Dq=D("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Z6),Kt.init(t,e)}),Mq=D("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=A6),Kt.init(t,e)}),Lq=D("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=U6),Kt.init(t,e)}),Zq=D("$ZodULID",(t,e)=>{e.pattern??(e.pattern=D6),Kt.init(t,e)}),qq=D("$ZodXID",(t,e)=>{e.pattern??(e.pattern=M6),Kt.init(t,e)}),Fq=D("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=L6),Kt.init(t,e)}),Vq=D("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=nq(e)),Kt.init(t,e)}),Wq=D("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=eq),Kt.init(t,e)}),Bq=D("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=rq(e)),Kt.init(t,e)}),Gq=D("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=q6),Kt.init(t,e)}),Kq=D("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=B6),Kt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Hq=D("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=G6),Kt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),Qq=D("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=K6),Kt.init(t,e)}),Yq=D("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=H6),Kt.init(t,e),t._zod.check=r=>{let[n,i]=r.value.split("/");try{if(!i)throw Error();let o=Number(i);if(`${o}`!==i||o<0||o>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});Jq=D("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Q6),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{kP(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});eF=D("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=xP),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Xq(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),tF=D("$ZodE164",(t,e)=>{e.pattern??(e.pattern=J6),Kt.init(t,e)});nF=D("$ZodJWT",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{rF(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),iF=D("$ZodCustomStringFormat",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),$P=D("$ZodNumber",(t,e)=>{Fe.init(t,e),t._zod.pattern=t._zod.bag.pattern??sq,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),oF=D("$ZodNumber",(t,e)=>{hq.init(t,e),$P.init(t,e)}),EP=D("$ZodBoolean",(t,e)=>{Fe.init(t,e),t._zod.pattern=cq,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),IP=D("$ZodBigInt",(t,e)=>{Fe.init(t,e),t._zod.pattern=oq,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),aF=D("$ZodBigInt",(t,e)=>{gq.init(t,e),IP.init(t,e)}),sF=D("$ZodSymbol",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),cF=D("$ZodUndefined",(t,e)=>{Fe.init(t,e),t._zod.pattern=uq,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),lF=D("$ZodNull",(t,e)=>{Fe.init(t,e),t._zod.pattern=lq,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),uF=D("$ZodAny",(t,e)=>{Fe.init(t,e),t._zod.parse=r=>r}),gy=D("$ZodUnknown",(t,e)=>{Fe.init(t,e),t._zod.parse=r=>r}),dF=D("$ZodNever",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),pF=D("$ZodVoid",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),fF=D("$ZodDate",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});PP=D("$ZodArray",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?o.push(c.then(l=>lZ(l,r,a))):lZ(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});TP=D("$ZodObject",(t,e)=>{Fe.init(t,e);let r=Oy(()=>{let u=Object.keys(e.shape);for(let f of u)if(!(e.shape[f]instanceof Fe))throw Error(`Invalid element at key "${f}": expected a Zod schema`);let d=P6(e.shape);return{shape:e.shape,keys:u,keySet:new Set(u),numKeys:u.length,optionalKeys:new Set(d)}});zt(t._zod,"propValues",()=>{let u=e.shape,d={};for(let f in u){let p=u[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(let m of p.values)d[f].add(m)}}return d});let n=u=>{let d=new hy(["shape","payload","ctx"]),f=r.value,p=h=>{let y=Sl(h);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),v=0;for(let h of f.keys)m[h]=`key_${v++}`;d.write("const newResult = {}");for(let h of f.keys)if(f.optionalKeys.has(h)){let y=m[h];d.write(`const ${y} = ${p(h)};`);let _=Sl(h);d.write(`
196
+ if (${y}.issues.length) {
197
+ if (input[${_}] === undefined) {
198
+ if (${_} in input) {
199
+ newResult[${_}] = undefined;
200
+ }
201
+ } else {
202
+ payload.issues = payload.issues.concat(
203
+ ${y}.issues.map((iss) => ({
204
+ ...iss,
205
+ path: iss.path ? [${_}, ...iss.path] : [${_}],
206
+ }))
207
+ );
208
+ }
209
+ } else if (${y}.value === undefined) {
210
+ if (${_} in input) newResult[${_}] = undefined;
211
+ } else {
212
+ newResult[${_}] = ${y}.value;
213
+ }
214
+ `)}else{let y=m[h];d.write(`const ${y} = ${p(h)};`),d.write(`
215
+ if (${y}.issues.length) payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
216
+ ...iss,
217
+ path: iss.path ? [${Sl(h)}, ...iss.path] : [${Sl(h)}]
218
+ })));`),d.write(`newResult[${Sl(h)}] = ${y}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let g=d.compile();return(h,y)=>g(u,h,y)},i,o=pf,a=!dy.jitless,s=a&&E6.value,c=e.catchall,l;t._zod.parse=(u,d)=>{l??(l=r.value);let f=u.value;if(!o(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),u;let p=[];if(a&&s&&d?.async===!1&&d.jitless!==!0)i||(i=n(e.shape)),u=i(u,d);else{u.value={};let y=l.shape;for(let _ of l.keys){let b=y[_],x=b._zod.run({value:f[_],issues:[]},d),w=b._zod.optin==="optional"&&b._zod.optout==="optional";x instanceof Promise?p.push(x.then(S=>w?uZ(S,u,_,f):Iv(S,u,_))):w?uZ(x,u,_,f):Iv(x,u,_)}}if(!c)return p.length?Promise.all(p).then(()=>u):u;let m=[],v=l.keySet,g=c._zod,h=g.def.type;for(let y of Object.keys(f)){if(v.has(y))continue;if(h==="never"){m.push(y);continue}let _=g.run({value:f[y],issues:[]},d);_ instanceof Promise?p.push(_.then(b=>Iv(b,u,y))):Iv(_,u,y)}return m.length&&u.issues.push({code:"unrecognized_keys",keys:m,input:f,inst:t}),p.length?Promise.all(p).then(()=>u):u}});OP=D("$ZodUnion",(t,e)=>{Fe.init(t,e),zt(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),zt(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),zt(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),zt(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>zy(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let i=!1,o=[];for(let a of e.options){let s=a._zod.run({value:r.value,issues:[]},n);if(s instanceof Promise)o.push(s),i=!0;else{if(s.issues.length===0)return s;o.push(s)}}return i?Promise.all(o).then(a=>dZ(a,r,t,n)):dZ(o,r,t,n)}}),mF=D("$ZodDiscriminatedUnion",(t,e)=>{OP.init(t,e);let r=t._zod.parse;zt(t._zod,"propValues",()=>{let i={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){i[s]||(i[s]=new Set);for(let l of c)i[s].add(l)}}return i});let n=Oy(()=>{let i=e.options,o=new Map;for(let a of i){let s=a._zod.propValues[e.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});t._zod.parse=(i,o)=>{let a=i.value;if(!pf(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=n.value.get(a?.[e.discriminator]);return s?s._zod.run(i,o):e.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[e.discriminator],inst:t}),i)}}),hF=D("$ZodIntersection",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),a=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>pZ(r,s,c)):pZ(r,o,a)}});Ry=D("$ZodTuple",(t,e)=>{Fe.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(i=>i._zod.optin!=="optional");t._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[];if(!e.rest){let l=a.length>r.length,u=a.length<n-1;if(l||u)return i.issues.push({input:a,inst:t,origin:"array",...l?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),i}let c=-1;for(let l of r){if(c++,c>=a.length&&c>=n)continue;let u=l._zod.run({value:a[c],issues:[]},o);u instanceof Promise?s.push(u.then(d=>Pv(d,i,c))):Pv(u,i,c)}if(e.rest){let l=a.slice(r.length);for(let u of l){c++;let d=e.rest._zod.run({value:u,issues:[]},o);d instanceof Promise?s.push(d.then(f=>Pv(f,i,c))):Pv(d,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});gF=D("$ZodRecord",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!ff(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[];if(e.keyType._zod.values){let a=e.keyType._zod.values;r.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=e.valueType._zod.run({value:i[c],issues:[]},n);l instanceof Promise?o.push(l.then(u=>{u.issues.length&&r.issues.push(...hi(c,u.issues)),r.value[c]=u.value})):(l.issues.length&&r.issues.push(...hi(c,l.issues)),r.value[c]=l.value)}let s;for(let c in i)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:s})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let s=e.keyType._zod.run({value:a,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(l=>Vi(l,n,hn())),input:a,path:[a],inst:t}),r.value[s.value]=s.value;continue}let c=e.valueType._zod.run({value:i[a],issues:[]},n);c instanceof Promise?o.push(c.then(l=>{l.issues.length&&r.issues.push(...hi(a,l.issues)),r.value[s.value]=l.value})):(c.issues.length&&r.issues.push(...hi(a,c.issues)),r.value[s.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),vF=D("$ZodMap",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[a,s]of i){let c=e.keyType._zod.run({value:a,issues:[]},n),l=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{fZ(u,d,r,a,i,t,n)})):fZ(c,l,r,a,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});yF=D("$ZodSet",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of i){let s=e.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?o.push(s.then(c=>mZ(c,r))):mZ(s,r)}return o.length?Promise.all(o).then(()=>r):r}});_F=D("$ZodEnum",(t,e)=>{Fe.init(t,e);let r=cP(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>py.has(typeof n)).map(n=>typeof n=="string"?Ks(n):n.toString()).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return t._zod.values.has(o)||n.issues.push({code:"invalid_value",values:r,input:o,inst:t}),n}}),bF=D("$ZodLiteral",(t,e)=>{Fe.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?Ks(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),r}}),xF=D("$ZodFile",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),zP=D("$ZodTransform",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new Pa;return r.value=i,r}}),wF=D("$ZodOptional",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",t._zod.optout="optional",zt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),zt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${zy(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),SF=D("$ZodNullable",(t,e)=>{Fe.init(t,e),zt(t._zod,"optin",()=>e.innerType._zod.optin),zt(t._zod,"optout",()=>e.innerType._zod.optout),zt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${zy(r.source)}|null)$`):void 0}),zt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),kF=D("$ZodDefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>hZ(o,e)):hZ(i,e)}});$F=D("$ZodPrefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),EF=D("$ZodNonOptional",(t,e)=>{Fe.init(t,e),zt(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>gZ(o,t)):gZ(i,t)}});IF=D("$ZodSuccess",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),PF=D("$ZodCatch",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",zt(t._zod,"optout",()=>e.innerType._zod.optout),zt(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>Vi(a,n,hn()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>Vi(o,n,hn()))},input:r.value}),r.issues=[]),r)}}),TF=D("$ZodNaN",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),jP=D("$ZodPipe",(t,e)=>{Fe.init(t,e),zt(t._zod,"values",()=>e.in._zod.values),zt(t._zod,"optin",()=>e.in._zod.optin),zt(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>vZ(o,e,n)):vZ(i,e,n)}});OF=D("$ZodReadonly",(t,e)=>{Fe.init(t,e),zt(t._zod,"propValues",()=>e.innerType._zod.propValues),zt(t._zod,"values",()=>e.innerType._zod.values),zt(t._zod,"optin",()=>e.innerType._zod.optin),zt(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(yZ):yZ(i)}});zF=D("$ZodTemplateLiteral",(t,e)=>{Fe.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Fe){if(!n._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||I6.has(typeof n))r.push(Ks(`${n}`));else throw Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"template_literal",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),n)}),jF=D("$ZodPromise",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),NF=D("$ZodLazy",(t,e)=>{Fe.init(t,e),zt(t._zod,"innerType",()=>e.getter()),zt(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),zt(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),zt(t._zod,"optin",()=>t._zod.innerType._zod.optin),zt(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),RF=D("$ZodCustom",(t,e)=>{pr.init(t,e),Fe.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>_Z(o,r,n,t));_Z(i,r,n,t)}});NP={};Bs(NP,{zhTW:()=>yde,zhCN:()=>gde,vi:()=>mde,ur:()=>pde,ua:()=>ude,tr:()=>cde,th:()=>ode,ta:()=>nde,sv:()=>tde,sl:()=>Xue,ru:()=>Yue,pt:()=>Hue,ps:()=>Wue,pl:()=>Gue,ota:()=>Fue,no:()=>Zue,nl:()=>Mue,ms:()=>Uue,mk:()=>Cue,ko:()=>Nue,kh:()=>zue,ja:()=>Tue,it:()=>Iue,id:()=>$ue,hu:()=>Sue,he:()=>xue,frCA:()=>_ue,fr:()=>vue,fi:()=>hue,fa:()=>fue,es:()=>due,eo:()=>lue,en:()=>CF,de:()=>iue,cs:()=>rue,ca:()=>eue,be:()=>Jle,az:()=>Qle,ar:()=>Kle});Gle=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return i=>{switch(i.code){case"invalid_type":return`\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.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(i.input)}`;case"invalid_value":return i.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 ${He(i.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: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.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 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.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 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${i.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${oe(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.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 ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};Hle=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i.expected}, daxil olan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${He(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};Yle=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0456\u045E";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(i.input)}`;case"invalid_value":return i.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 ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),c=bZ(s,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 ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),c=bZ(s,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 ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};Xle=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${i.expected}, s'ha rebut ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${He(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${oe(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",a=e(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};tue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i.expected}, obdr\u017Eeno ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${He(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${oe(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};nue=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${i.expected}, erhalten ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${He(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};oue=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},aue=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${oue(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${He(n.values[0])}`:`Invalid option: expected one of ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${o.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};sue=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},cue=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}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"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${sue(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${He(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};uue=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"arreglo";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype)return i.constructor.name}}return o},n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${i.expected}, recibido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${He(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Demasiado grande: se esperaba que ${i.origin??"valor"} tuviera ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i.origin??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Demasiado peque\xF1o: se esperaba que ${i.origin} tuviera ${o}${i.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${i.origin} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i.origin}`;default:return"Entrada inv\xE1lida"}}};pue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0622\u0631\u0627\u06CC\u0647";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return i=>{switch(i.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(i.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${He(i.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 ${oe(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??i.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 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${oe(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.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 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};mue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${He(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${oe(i.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"}}};gue=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : ${i.expected} attendu, ${r(i.input)} re\xE7u`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${He(i.values[0])} attendu`:`Option invalide : une valeur parmi ${oe(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Trop grand : ${i.origin??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Trop petit : ${i.origin} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${oe(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};yue=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${i.expected}, re\xE7u ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${He(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",a=e(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",a=e(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${oe(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};bue=()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return i=>{switch(i.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${i.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${He(i.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${o.prefix}"`:o.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${o.suffix}"`:o.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${o.includes}"`:o.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${o.pattern}`:`${n[o.format]??i.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}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 ${i.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${i.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${i.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i.origin}`;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${i.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};wue=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(i))return"t\xF6mb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i.expected}, a kapott \xE9rt\xE9k ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${He(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};kue=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${He(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};Eue=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${He(i.values[0])}`:`Opzione non valida: atteso uno tra ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};Pue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(i))return"\u914D\u5217";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(i.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${He(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${oe(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(i.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(i.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.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${i.keys.length>1?"\u7FA4":""}: ${oe(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};Oue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(i))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(i===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return i=>{switch(i.code){case"invalid_type":return`\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.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(i.input)}`;case"invalid_value":return i.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 ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${oe(i.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 ${i.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 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};jue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return i=>{switch(i.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(i.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${He(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${oe(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${a}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${oe(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};Rue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(i))return"\u043D\u0438\u0437\u0430";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return i=>{switch(i.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.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 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.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 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`${i.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"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.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 ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};Aue=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${He(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${oe(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};Due=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${He(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};Lue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${He(i.values[0])}`:`Ugyldig valg: forventet en av ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};que=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`F\xE2sit giren: umulan ${i.expected}, al\u0131nan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${He(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};Vue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0627\u0631\u06D0";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return i=>{switch(i.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(i.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${He(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${oe(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.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 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};Bue=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return i=>{switch(i.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i.expected}, otrzymano ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${He(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};Kue=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${i.expected}, recebido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${He(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};Que=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),c=xZ(s,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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),c=xZ(s,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 ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.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 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};Jue=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${i.expected}, prejeto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${He(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};ede=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${i.expected}, fick ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${He(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};rde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(i))return"\u0B85\u0BA3\u0BBF";if(i===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`\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.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(i.input)}`;case"invalid_value":return i.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 ${He(i.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 ${oe(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.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 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.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 ${i.origin} ${o}${i.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 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.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${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.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`${i.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"}}};ide=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(i))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(i===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return i=>{switch(i.code){case"invalid_type":return`\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.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??i.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 ${i.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: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.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 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};ade=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},sde=()=>{let t={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 e(n){return t[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\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"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${ade(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${He(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};lde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return i=>{switch(i.code){case"invalid_type":return`\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.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.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 ${He(i.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 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${i.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 ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.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 ${i.origin} ${a.verb} ${o}${i.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 ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.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 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};dde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(i))return"\u0622\u0631\u06D2";if(i===null)return"\u0646\u0644";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return i=>{switch(i.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(i.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${He(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${oe(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.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: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.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${i.keys.length>1?"\u0632":""}: ${oe(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};fde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(i))return"m\u1EA3ng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return i=>{switch(i.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${He(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??i.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 ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${oe(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.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 ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};hde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(i))return"\u6570\u7EC4";if(i===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${He(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};vde=()=>{let t={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 e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i.expected}\uFF0C\u4F46\u6536\u5230 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${He(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${oe(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};AF=Symbol("ZodOutput"),UF=Symbol("ZodInput"),mf=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};Ds=RP();LF={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};_y=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=(...n)=>{let i=this._def.input?fy(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let o=e(...i);return this._def.output?fy(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=async(...n)=>{let i=this._def.input?await my(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let o=await e(...i);return this._def.output?my(this._def.output,o,void 0,{callee:r}):o};return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new Ry({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){return new this.constructor({type:"function",input:this._def.input,output:e})}};vf=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??Ds,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path},d=e._zod.parent;if(d)s.ref=d,this.process(d,u),this.seen.get(d).isParent=!0;else{let f=s.schema;switch(i.type){case"string":{let p=f;p.type="string";let{minimum:m,maximum:v,format:g,patterns:h,contentEncoding:y}=e._zod.bag;if(typeof m=="number"&&(p.minLength=m),typeof v=="number"&&(p.maxLength=v),g&&(p.format=o[g]??g,p.format===""&&delete p.format),y&&(p.contentEncoding=y),h&&h.size>0){let _=[...h];_.length===1?p.pattern=_[0].source:_.length>1&&(s.schema.allOf=[..._.map(b=>({...this.target==="draft-7"?{type:"string"}:{},pattern:b.source}))])}break}case"number":{let p=f,{minimum:m,maximum:v,format:g,multipleOf:h,exclusiveMaximum:y,exclusiveMinimum:_}=e._zod.bag;typeof g=="string"&&g.includes("int")?p.type="integer":p.type="number",typeof _=="number"&&(p.exclusiveMinimum=_),typeof m=="number"&&(p.minimum=m,typeof _=="number"&&(_>=m?delete p.minimum:delete p.exclusiveMinimum)),typeof y=="number"&&(p.exclusiveMaximum=y),typeof v=="number"&&(p.maximum=v,typeof y=="number"&&(y<=v?delete p.maximum:delete p.exclusiveMaximum)),typeof h=="number"&&(p.multipleOf=h);break}case"boolean":{let p=f;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema");break}case"null":{f.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{f.not={};break}case"void":{if(this.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema");break}case"array":{let p=f,{minimum:m,maximum:v}=e._zod.bag;typeof m=="number"&&(p.minItems=m),typeof v=="number"&&(p.maxItems=v),p.type="array",p.items=this.process(i.element,{...u,path:[...u.path,"items"]});break}case"object":{let p=f;p.type="object",p.properties={};let m=i.shape;for(let h in m)p.properties[h]=this.process(m[h],{...u,path:[...u.path,"properties",h]});let v=new Set(Object.keys(m)),g=new Set([...v].filter(h=>{let y=i.shape[h]._zod;return this.io==="input"?y.optin===void 0:y.optout===void 0}));g.size>0&&(p.required=Array.from(g)),i.catchall?._zod.def.type==="never"?p.additionalProperties=!1:i.catchall?i.catchall&&(p.additionalProperties=this.process(i.catchall,{...u,path:[...u.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=f;p.anyOf=i.options.map((m,v)=>this.process(m,{...u,path:[...u.path,"anyOf",v]}));break}case"intersection":{let p=f,m=this.process(i.left,{...u,path:[...u.path,"allOf",0]}),v=this.process(i.right,{...u,path:[...u.path,"allOf",1]}),g=y=>"allOf"in y&&Object.keys(y).length===1,h=[...g(m)?m.allOf:[m],...g(v)?v.allOf:[v]];p.allOf=h;break}case"tuple":{let p=f;p.type="array";let m=i.items.map((h,y)=>this.process(h,{...u,path:[...u.path,"prefixItems",y]}));if(this.target==="draft-2020-12"?p.prefixItems=m:p.items=m,i.rest){let h=this.process(i.rest,{...u,path:[...u.path,"items"]});this.target==="draft-2020-12"?p.items=h:p.additionalItems=h}i.rest&&(p.items=this.process(i.rest,{...u,path:[...u.path,"items"]}));let{minimum:v,maximum:g}=e._zod.bag;typeof v=="number"&&(p.minItems=v),typeof g=="number"&&(p.maxItems=g);break}case"record":{let p=f;p.type="object",p.propertyNames=this.process(i.keyType,{...u,path:[...u.path,"propertyNames"]}),p.additionalProperties=this.process(i.valueType,{...u,path:[...u.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema");break}case"enum":{let p=f,m=cP(i.entries);m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),p.enum=m;break}case"literal":{let p=f,m=[];for(let v of i.values)if(v===void 0){if(this.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(v))}else m.push(v);if(m.length!==0)if(m.length===1){let v=m[0];p.type=v===null?"null":typeof v,p.const=v}else m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),m.every(v=>typeof v=="boolean")&&(p.type="string"),m.every(v=>v===null)&&(p.type="null"),p.enum=m;break}case"file":{let p=f,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:g,mime:h}=e._zod.bag;v!==void 0&&(m.minLength=v),g!==void 0&&(m.maxLength=g),h?h.length===1?(m.contentMediaType=h[0],Object.assign(p,m)):p.anyOf=h.map(y=>({...m,contentMediaType:y})):Object.assign(p,m);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(i.innerType,u);f.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,u),s.ref=i.innerType;break}case"success":{let p=f;p.type="boolean";break}case"default":{this.process(i.innerType,u),s.ref=i.innerType,f.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,u),s.ref=i.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,u),s.ref=i.innerType;let p;try{p=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}f.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=f,m=e._zod.pattern;if(!m)throw Error("Pattern not found in template literal");p.type="string",p.pattern=m.source;break}case"pipe":{let p=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(p,u),s.ref=p;break}case"readonly":{this.process(i.innerType,u),s.ref=i.innerType,f.readOnly=!0;break}case"promise":{this.process(i.innerType,u),s.ref=i.innerType;break}case"optional":{this.process(i.innerType,u),s.ref=i.innerType;break}case"lazy":{let p=e._zod.innerType;this.process(p,u),s.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),this.io==="input"&&wr(e)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(e).schema}emit(e,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},i=this.seen.get(e);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let o=u=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(u[0])?.id;if(m)return{ref:n.external.uri(m)};let v=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=v,{defId:v,ref:`${n.external.uri("__shared")}#/${d}/${v}`}}if(u[1]===i)return{ref:"#"};let f=`#/${d}/`,p=u[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:f+p}},a=u=>{if(u[1].schema.$ref)return;let d=u[1],{ref:f,defId:p}=o(u);d.def={...d.schema},p&&(d.defId=p);let m=d.schema;for(let v in m)delete m[v];m.$ref=f};for(let u of this.seen.entries()){let d=u[1];if(e===u[0]){a(u);continue}if(n.external){let f=n.external.registry.get(u[0])?.id;if(e!==u[0]&&f){a(u);continue}}if(this.metadataRegistry.get(u[0])?.id){a(u);continue}if(d.cycle){if(n.cycles==="throw")throw Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
219
+
220
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);n.cycles==="ref"&&a(u);continue}if(d.count>1&&n.reused==="ref"){a(u);continue}}let s=(u,d)=>{let f=this.seen.get(u),p=f.def??f.schema,m={...p};if(f.ref===null)return;let v=f.ref;if(f.ref=null,v){s(v,d);let g=this.seen.get(v).schema;g.$ref&&d.target==="draft-7"?(p.allOf=p.allOf??[],p.allOf.push(g)):(Object.assign(p,g),Object.assign(p,m))}f.isParent||this.override({zodSchema:u,jsonSchema:p,path:f.path??[]})};for(let u of[...this.seen.entries()].reverse())s(u[0],{target:this.target});let c={};this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(c,i.def);let l=n.external?.defs??{};for(let u of this.seen.entries()){let d=u[1];d.def&&d.defId&&(l[d.defId]=d.def)}!n.external&&Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw Error("Error converting schema to JSON.")}}};Lde={},Zde=D("ZodMiniType",(t,e)=>{if(!t._zod)throw Error("Uninitialized schema in ZodMiniType.");Fe.init(t,e),t.def=e,t.parse=(r,n)=>fy(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>vP(t,r,n),t.parseAsync=async(r,n)=>my(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>_P(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Bi(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t)}),L2e=D("ZodMiniObject",(t,e)=>{TP.init(t,e),Zde.init(t,e),ft.defineLazy(t,"shape",()=>e.shape)}),kl={};Bs(kl,{xid:()=>tpe,void:()=>wpe,uuidv7:()=>Kde,uuidv6:()=>Gde,uuidv4:()=>Bde,uuid:()=>Wde,url:()=>Hde,uppercase:()=>oT,unknown:()=>rr,union:()=>qt,undefined:()=>bpe,ulid:()=>epe,uint64:()=>ype,uint32:()=>hpe,tuple:()=>Epe,trim:()=>dT,treeifyError:()=>N6,transform:()=>WT,toUpperCase:()=>fT,toLowerCase:()=>pT,toJSONSchema:()=>$9,templateLiteral:()=>Cpe,symbol:()=>_pe,superRefine:()=>gV,success:()=>Npe,stringbool:()=>Dpe,stringFormat:()=>dpe,string:()=>K,strictObject:()=>$pe,startsWith:()=>sT,size:()=>rT,setErrorMap:()=>Zpe,set:()=>Tpe,safeParseAsync:()=>R9,safeParse:()=>N9,registry:()=>RP,regexes:()=>bP,regex:()=>nT,refine:()=>hV,record:()=>Zt,readonly:()=>cV,property:()=>v9,promise:()=>Ape,prettifyError:()=>C6,preprocess:()=>HT,prefault:()=>tV,positive:()=>f9,pipe:()=>wy,partialRecord:()=>Ipe,parseAsync:()=>j9,parse:()=>z9,overwrite:()=>Hs,optional:()=>Qt,object:()=>ge,number:()=>Ot,nullish:()=>jpe,nullable:()=>xy,null:()=>MT,normalize:()=>uT,nonpositive:()=>h9,nonoptional:()=>rV,nonnegative:()=>g9,never:()=>qy,negative:()=>m9,nativeEnum:()=>Ope,nanoid:()=>Yde,nan:()=>Rpe,multipleOf:()=>hf,minSize:()=>gf,minLength:()=>Vl,mime:()=>lT,maxSize:()=>Cy,maxLength:()=>Ay,map:()=>Ppe,lte:()=>qi,lt:()=>Vs,lowercase:()=>iT,looseObject:()=>pn,locales:()=>NP,literal:()=>ke,length:()=>Uy,lazy:()=>dV,ksuid:()=>rpe,keyof:()=>kpe,jwt:()=>upe,json:()=>Mpe,iso:()=>hT,ipv6:()=>ipe,ipv4:()=>npe,intersection:()=>Vy,int64:()=>vpe,int32:()=>mpe,int:()=>KI,instanceof:()=>Upe,includes:()=>aT,guid:()=>Vde,gte:()=>Qn,gt:()=>Ws,globalRegistry:()=>Ds,getErrorMap:()=>qpe,function:()=>k9,formatError:()=>fP,float64:()=>fpe,float32:()=>ppe,flattenError:()=>pP,file:()=>zpe,enum:()=>Tn,endsWith:()=>cT,emoji:()=>Qde,email:()=>Fde,e164:()=>lpe,discriminatedUnion:()=>qT,date:()=>Spe,custom:()=>mV,cuid2:()=>Xde,cuid:()=>Jde,core:()=>x6,config:()=>hn,coerce:()=>vV,clone:()=>Bi,cidrv6:()=>ape,cidrv4:()=>ope,check:()=>fV,catch:()=>oV,boolean:()=>Sr,bigint:()=>gpe,base64url:()=>cpe,base64:()=>spe,array:()=>mt,any:()=>xpe,_default:()=>X9,_ZodString:()=>bT,ZodXID:()=>PT,ZodVoid:()=>q9,ZodUnknown:()=>L9,ZodUnion:()=>ZT,ZodUndefined:()=>U9,ZodUUID:()=>Zo,ZodURL:()=>wT,ZodULID:()=>IT,ZodType:()=>rt,ZodTuple:()=>B9,ZodTransform:()=>VT,ZodTemplateLiteral:()=>lV,ZodSymbol:()=>A9,ZodSuccess:()=>nV,ZodStringFormat:()=>Yt,ZodString:()=>Dy,ZodSet:()=>K9,ZodRecord:()=>FT,ZodRealError:()=>wf,ZodReadonly:()=>sV,ZodPromise:()=>pV,ZodPrefault:()=>eV,ZodPipe:()=>KT,ZodOptional:()=>BT,ZodObject:()=>Fy,ZodNumberFormat:()=>Hl,ZodNumber:()=>My,ZodNullable:()=>Y9,ZodNull:()=>D9,ZodNonOptional:()=>GT,ZodNever:()=>Z9,ZodNanoID:()=>kT,ZodNaN:()=>aV,ZodMap:()=>G9,ZodLiteral:()=>H9,ZodLazy:()=>uV,ZodKSUID:()=>TT,ZodJWT:()=>UT,ZodIssueCode:()=>Lpe,ZodIntersection:()=>W9,ZodISOTime:()=>yT,ZodISODuration:()=>_T,ZodISODateTime:()=>gT,ZodISODate:()=>vT,ZodIPv6:()=>zT,ZodIPv4:()=>OT,ZodGUID:()=>by,ZodFile:()=>Q9,ZodError:()=>qde,ZodEnum:()=>yf,ZodEmoji:()=>ST,ZodEmail:()=>xT,ZodE164:()=>AT,ZodDiscriminatedUnion:()=>V9,ZodDefault:()=>J9,ZodDate:()=>LT,ZodCustomStringFormat:()=>C9,ZodCustom:()=>Wy,ZodCatch:()=>iV,ZodCUID2:()=>ET,ZodCUID:()=>$T,ZodCIDRv6:()=>NT,ZodCIDRv4:()=>jT,ZodBoolean:()=>Ly,ZodBigIntFormat:()=>DT,ZodBigInt:()=>Zy,ZodBase64URL:()=>CT,ZodBase64:()=>RT,ZodArray:()=>F9,ZodAny:()=>M9,TimePrecision:()=>LF,NEVER:()=>w6,$output:()=>AF,$input:()=>UF,$brand:()=>S6});hT={};Bs(hT,{time:()=>P9,duration:()=>T9,datetime:()=>E9,date:()=>I9,ZodISOTime:()=>yT,ZodISODuration:()=>_T,ZodISODateTime:()=>gT,ZodISODate:()=>vT});gT=D("ZodISODateTime",(t,e)=>{Vq.init(t,e),Yt.init(t,e)});vT=D("ZodISODate",(t,e)=>{Wq.init(t,e),Yt.init(t,e)});yT=D("ZodISOTime",(t,e)=>{Bq.init(t,e),Yt.init(t,e)});_T=D("ZodISODuration",(t,e)=>{Gq.init(t,e),Yt.init(t,e)});O9=(t,e)=>{dP.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>fP(t,r)},flatten:{value:r=>pP(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},qde=D("ZodError",O9),wf=D("ZodError",O9,{Parent:Error}),z9=mP(wf),j9=hP(wf),N9=gP(wf),R9=yP(wf),rt=D("ZodType",(t,e)=>(Fe.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Bi(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.parse=(r,n)=>z9(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>N9(t,r,n),t.parseAsync=async(r,n)=>j9(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>R9(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(hV(r,n)),t.superRefine=r=>t.check(gV(r)),t.overwrite=r=>t.check(Hs(r)),t.optional=()=>Qt(t),t.nullable=()=>xy(t),t.nullish=()=>Qt(xy(t)),t.nonoptional=r=>rV(t,r),t.array=()=>mt(t),t.or=r=>qt([t,r]),t.and=r=>Vy(t,r),t.transform=r=>wy(t,WT(r)),t.default=r=>X9(t,r),t.prefault=r=>tV(t,r),t.catch=r=>oV(t,r),t.pipe=r=>wy(t,r),t.readonly=()=>cV(t),t.describe=r=>{let n=t.clone();return Ds.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return Ds.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Ds.get(t);let n=t.clone();return Ds.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),bT=D("_ZodString",(t,e)=>{xf.init(t,e),rt.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(nT(...n)),t.includes=(...n)=>t.check(aT(...n)),t.startsWith=(...n)=>t.check(sT(...n)),t.endsWith=(...n)=>t.check(cT(...n)),t.min=(...n)=>t.check(Vl(...n)),t.max=(...n)=>t.check(Ay(...n)),t.length=(...n)=>t.check(Uy(...n)),t.nonempty=(...n)=>t.check(Vl(1,...n)),t.lowercase=n=>t.check(iT(n)),t.uppercase=n=>t.check(oT(n)),t.trim=()=>t.check(dT()),t.normalize=(...n)=>t.check(uT(...n)),t.toLowerCase=()=>t.check(pT()),t.toUpperCase=()=>t.check(fT())}),Dy=D("ZodString",(t,e)=>{xf.init(t,e),bT.init(t,e),t.email=r=>t.check(CP(xT,r)),t.url=r=>t.check(LP(wT,r)),t.jwt=r=>t.check(tT(UT,r)),t.emoji=r=>t.check(ZP(ST,r)),t.guid=r=>t.check(vy(by,r)),t.uuid=r=>t.check(AP(Zo,r)),t.uuidv4=r=>t.check(UP(Zo,r)),t.uuidv6=r=>t.check(DP(Zo,r)),t.uuidv7=r=>t.check(MP(Zo,r)),t.nanoid=r=>t.check(qP(kT,r)),t.guid=r=>t.check(vy(by,r)),t.cuid=r=>t.check(FP($T,r)),t.cuid2=r=>t.check(VP(ET,r)),t.ulid=r=>t.check(WP(IT,r)),t.base64=r=>t.check(JP(RT,r)),t.base64url=r=>t.check(XP(CT,r)),t.xid=r=>t.check(BP(PT,r)),t.ksuid=r=>t.check(GP(TT,r)),t.ipv4=r=>t.check(KP(OT,r)),t.ipv6=r=>t.check(HP(zT,r)),t.cidrv4=r=>t.check(QP(jT,r)),t.cidrv6=r=>t.check(YP(NT,r)),t.e164=r=>t.check(eT(AT,r)),t.datetime=r=>t.check(E9(r)),t.date=r=>t.check(I9(r)),t.time=r=>t.check(P9(r)),t.duration=r=>t.check(T9(r))});Yt=D("ZodStringFormat",(t,e)=>{Kt.init(t,e),bT.init(t,e)}),xT=D("ZodEmail",(t,e)=>{Cq.init(t,e),Yt.init(t,e)});by=D("ZodGUID",(t,e)=>{Nq.init(t,e),Yt.init(t,e)});Zo=D("ZodUUID",(t,e)=>{Rq.init(t,e),Yt.init(t,e)});wT=D("ZodURL",(t,e)=>{Aq.init(t,e),Yt.init(t,e)});ST=D("ZodEmoji",(t,e)=>{Uq.init(t,e),Yt.init(t,e)});kT=D("ZodNanoID",(t,e)=>{Dq.init(t,e),Yt.init(t,e)});$T=D("ZodCUID",(t,e)=>{Mq.init(t,e),Yt.init(t,e)});ET=D("ZodCUID2",(t,e)=>{Lq.init(t,e),Yt.init(t,e)});IT=D("ZodULID",(t,e)=>{Zq.init(t,e),Yt.init(t,e)});PT=D("ZodXID",(t,e)=>{qq.init(t,e),Yt.init(t,e)});TT=D("ZodKSUID",(t,e)=>{Fq.init(t,e),Yt.init(t,e)});OT=D("ZodIPv4",(t,e)=>{Kq.init(t,e),Yt.init(t,e)});zT=D("ZodIPv6",(t,e)=>{Hq.init(t,e),Yt.init(t,e)});jT=D("ZodCIDRv4",(t,e)=>{Qq.init(t,e),Yt.init(t,e)});NT=D("ZodCIDRv6",(t,e)=>{Yq.init(t,e),Yt.init(t,e)});RT=D("ZodBase64",(t,e)=>{Jq.init(t,e),Yt.init(t,e)});CT=D("ZodBase64URL",(t,e)=>{eF.init(t,e),Yt.init(t,e)});AT=D("ZodE164",(t,e)=>{tF.init(t,e),Yt.init(t,e)});UT=D("ZodJWT",(t,e)=>{nF.init(t,e),Yt.init(t,e)});C9=D("ZodCustomStringFormat",(t,e)=>{iF.init(t,e),Yt.init(t,e)});My=D("ZodNumber",(t,e)=>{$P.init(t,e),rt.init(t,e),t.gt=(n,i)=>t.check(Ws(n,i)),t.gte=(n,i)=>t.check(Qn(n,i)),t.min=(n,i)=>t.check(Qn(n,i)),t.lt=(n,i)=>t.check(Vs(n,i)),t.lte=(n,i)=>t.check(qi(n,i)),t.max=(n,i)=>t.check(qi(n,i)),t.int=n=>t.check(KI(n)),t.safe=n=>t.check(KI(n)),t.positive=n=>t.check(Ws(0,n)),t.nonnegative=n=>t.check(Qn(0,n)),t.negative=n=>t.check(Vs(0,n)),t.nonpositive=n=>t.check(qi(0,n)),t.multipleOf=(n,i)=>t.check(hf(n,i)),t.step=(n,i)=>t.check(hf(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});Hl=D("ZodNumberFormat",(t,e)=>{oF.init(t,e),My.init(t,e)});Ly=D("ZodBoolean",(t,e)=>{EP.init(t,e),rt.init(t,e)});Zy=D("ZodBigInt",(t,e)=>{IP.init(t,e),rt.init(t,e),t.gte=(n,i)=>t.check(Qn(n,i)),t.min=(n,i)=>t.check(Qn(n,i)),t.gt=(n,i)=>t.check(Ws(n,i)),t.gte=(n,i)=>t.check(Qn(n,i)),t.min=(n,i)=>t.check(Qn(n,i)),t.lt=(n,i)=>t.check(Vs(n,i)),t.lte=(n,i)=>t.check(qi(n,i)),t.max=(n,i)=>t.check(qi(n,i)),t.positive=n=>t.check(Ws(BigInt(0),n)),t.negative=n=>t.check(Vs(BigInt(0),n)),t.nonpositive=n=>t.check(qi(BigInt(0),n)),t.nonnegative=n=>t.check(Qn(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(hf(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});DT=D("ZodBigIntFormat",(t,e)=>{aF.init(t,e),Zy.init(t,e)});A9=D("ZodSymbol",(t,e)=>{sF.init(t,e),rt.init(t,e)});U9=D("ZodUndefined",(t,e)=>{cF.init(t,e),rt.init(t,e)});D9=D("ZodNull",(t,e)=>{lF.init(t,e),rt.init(t,e)});M9=D("ZodAny",(t,e)=>{uF.init(t,e),rt.init(t,e)});L9=D("ZodUnknown",(t,e)=>{gy.init(t,e),rt.init(t,e)});Z9=D("ZodNever",(t,e)=>{dF.init(t,e),rt.init(t,e)});q9=D("ZodVoid",(t,e)=>{pF.init(t,e),rt.init(t,e)});LT=D("ZodDate",(t,e)=>{fF.init(t,e),rt.init(t,e),t.min=(n,i)=>t.check(Qn(n,i)),t.max=(n,i)=>t.check(qi(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});F9=D("ZodArray",(t,e)=>{PP.init(t,e),rt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(Vl(r,n)),t.nonempty=r=>t.check(Vl(1,r)),t.max=(r,n)=>t.check(Ay(r,n)),t.length=(r,n)=>t.check(Uy(r,n)),t.unwrap=()=>t.element});Fy=D("ZodObject",(t,e)=>{TP.init(t,e),rt.init(t,e),ft.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Tn(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:rr()}),t.loose=()=>t.clone({...t._zod.def,catchall:rr()}),t.strict=()=>t.clone({...t._zod.def,catchall:qy()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>ft.extend(t,r),t.merge=r=>ft.merge(t,r),t.pick=r=>ft.pick(t,r),t.omit=r=>ft.omit(t,r),t.partial=(...r)=>ft.partial(BT,t,r[0]),t.required=(...r)=>ft.required(GT,t,r[0])});ZT=D("ZodUnion",(t,e)=>{OP.init(t,e),rt.init(t,e),t.options=e.options});V9=D("ZodDiscriminatedUnion",(t,e)=>{ZT.init(t,e),mF.init(t,e)});W9=D("ZodIntersection",(t,e)=>{hF.init(t,e),rt.init(t,e)});B9=D("ZodTuple",(t,e)=>{Ry.init(t,e),rt.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});FT=D("ZodRecord",(t,e)=>{gF.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});G9=D("ZodMap",(t,e)=>{vF.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});K9=D("ZodSet",(t,e)=>{yF.init(t,e),rt.init(t,e),t.min=(...r)=>t.check(gf(...r)),t.nonempty=r=>t.check(gf(1,r)),t.max=(...r)=>t.check(Cy(...r)),t.size=(...r)=>t.check(rT(...r))});yf=D("ZodEnum",(t,e)=>{_F.init(t,e),rt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw Error(`Key ${a} not found in enum`);return new yf({...e,checks:[],...ft.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw Error(`Key ${a} not found in enum`);return new yf({...e,checks:[],...ft.normalizeParams(i),entries:o})}});H9=D("ZodLiteral",(t,e)=>{bF.init(t,e),rt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});Q9=D("ZodFile",(t,e)=>{xF.init(t,e),rt.init(t,e),t.min=(r,n)=>t.check(gf(r,n)),t.max=(r,n)=>t.check(Cy(r,n)),t.mime=(r,n)=>t.check(lT(Array.isArray(r)?r:[r],n))});VT=D("ZodTransform",(t,e)=>{zP.init(t,e),rt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(ft.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(ft.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});BT=D("ZodOptional",(t,e)=>{wF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});Y9=D("ZodNullable",(t,e)=>{SF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});J9=D("ZodDefault",(t,e)=>{kF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});eV=D("ZodPrefault",(t,e)=>{$F.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});GT=D("ZodNonOptional",(t,e)=>{EF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});nV=D("ZodSuccess",(t,e)=>{IF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});iV=D("ZodCatch",(t,e)=>{PF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});aV=D("ZodNaN",(t,e)=>{TF.init(t,e),rt.init(t,e)});KT=D("ZodPipe",(t,e)=>{jP.init(t,e),rt.init(t,e),t.in=e.in,t.out=e.out});sV=D("ZodReadonly",(t,e)=>{OF.init(t,e),rt.init(t,e)});lV=D("ZodTemplateLiteral",(t,e)=>{zF.init(t,e),rt.init(t,e)});uV=D("ZodLazy",(t,e)=>{NF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.getter()});pV=D("ZodPromise",(t,e)=>{jF.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});Wy=D("ZodCustom",(t,e)=>{RF.init(t,e),rt.init(t,e)});Dpe=(...t)=>w9({Pipe:KT,Boolean:Ly,String:Dy,Transform:VT},...t);Lpe={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"};vV={};Bs(vV,{string:()=>Fpe,number:()=>Vpe,date:()=>Gpe,boolean:()=>Wpe,bigint:()=>Bpe});hn(CF());Kpe="io.modelcontextprotocol/related-task",By="2.0",kr=mV(t=>t!==null&&(typeof t=="object"||typeof t=="function")),yV=qt([K(),Ot().int()]),_V=K(),Z2e=pn({ttl:Ot().optional(),pollInterval:Ot().optional()}),Hpe=ge({ttl:Ot().optional()}),Qpe=ge({taskId:K()}),QT=pn({progressToken:yV.optional(),[Kpe]:Qpe.optional()}),ei=ge({_meta:QT.optional()}),Gy=ei.extend({task:Hpe.optional()}),jr=ge({method:K(),params:ei.loose().optional()}),yi=ge({_meta:QT.optional()}),_i=ge({method:K(),params:yi.loose().optional()}),Nr=pn({_meta:QT.optional()}),Ky=qt([K(),Ot().int()]),Ype=ge({jsonrpc:ke(By),id:Ky,...jr.shape}).strict(),Jpe=ge({jsonrpc:ke(By),..._i.shape}).strict(),bV=ge({jsonrpc:ke(By),id:Ky,result:Nr}).strict();(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(wZ||(wZ={}));xV=ge({jsonrpc:ke(By),id:Ky.optional(),error:ge({code:Ot().int(),message:K(),data:rr().optional()})}).strict(),q2e=qt([Ype,Jpe,bV,xV]),F2e=qt([bV,xV]),wV=Nr.strict(),Xpe=yi.extend({requestId:Ky.optional(),reason:K().optional()}),SV=_i.extend({method:ke("notifications/cancelled"),params:Xpe}),efe=ge({src:K(),mimeType:K().optional(),sizes:mt(K()).optional(),theme:Tn(["light","dark"]).optional()}),Sf=ge({icons:mt(efe).optional()}),Wl=ge({name:K(),title:K().optional()}),kV=Wl.extend({...Wl.shape,...Sf.shape,version:K(),websiteUrl:K().optional(),description:K().optional()}),tfe=Vy(ge({applyDefaults:Sr().optional()}),Zt(K(),rr())),rfe=HT(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Vy(ge({form:tfe.optional(),url:kr.optional()}),Zt(K(),rr()).optional())),nfe=pn({list:kr.optional(),cancel:kr.optional(),requests:pn({sampling:pn({createMessage:kr.optional()}).optional(),elicitation:pn({create:kr.optional()}).optional()}).optional()}),ife=pn({list:kr.optional(),cancel:kr.optional(),requests:pn({tools:pn({call:kr.optional()}).optional()}).optional()}),ofe=ge({experimental:Zt(K(),kr).optional(),sampling:ge({context:kr.optional(),tools:kr.optional()}).optional(),elicitation:rfe.optional(),roots:ge({listChanged:Sr().optional()}).optional(),tasks:nfe.optional(),extensions:Zt(K(),kr).optional()}),afe=ei.extend({protocolVersion:K(),capabilities:ofe,clientInfo:kV}),sfe=jr.extend({method:ke("initialize"),params:afe}),cfe=ge({experimental:Zt(K(),kr).optional(),logging:kr.optional(),completions:kr.optional(),prompts:ge({listChanged:Sr().optional()}).optional(),resources:ge({subscribe:Sr().optional(),listChanged:Sr().optional()}).optional(),tools:ge({listChanged:Sr().optional()}).optional(),tasks:ife.optional(),extensions:Zt(K(),kr).optional()}),lfe=Nr.extend({protocolVersion:K(),capabilities:cfe,serverInfo:kV,instructions:K().optional()}),ufe=_i.extend({method:ke("notifications/initialized"),params:yi.optional()}),$V=jr.extend({method:ke("ping"),params:ei.optional()}),dfe=ge({progress:Ot(),total:Qt(Ot()),message:Qt(K())}),pfe=ge({...yi.shape,...dfe.shape,progressToken:yV}),EV=_i.extend({method:ke("notifications/progress"),params:pfe}),ffe=ei.extend({cursor:_V.optional()}),kf=jr.extend({params:ffe.optional()}),$f=Nr.extend({nextCursor:_V.optional()}),mfe=Tn(["working","input_required","completed","failed","cancelled"]),Ef=ge({taskId:K(),status:mfe,ttl:qt([Ot(),MT()]),createdAt:K(),lastUpdatedAt:K(),pollInterval:Qt(Ot()),statusMessage:Qt(K())}),IV=Nr.extend({task:Ef}),hfe=yi.merge(Ef),PV=_i.extend({method:ke("notifications/tasks/status"),params:hfe}),TV=jr.extend({method:ke("tasks/get"),params:ei.extend({taskId:K()})}),OV=Nr.merge(Ef),zV=jr.extend({method:ke("tasks/result"),params:ei.extend({taskId:K()})}),V2e=Nr.loose(),jV=kf.extend({method:ke("tasks/list")}),NV=$f.extend({tasks:mt(Ef)}),RV=jr.extend({method:ke("tasks/cancel"),params:ei.extend({taskId:K()})}),W2e=Nr.merge(Ef),CV=ge({uri:K(),mimeType:Qt(K()),_meta:Zt(K(),rr()).optional()}),AV=CV.extend({text:K()}),YT=K().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),UV=CV.extend({blob:YT}),If=Tn(["user","assistant"]),Ql=ge({audience:mt(If).optional(),priority:Ot().min(0).max(1).optional(),lastModified:hT.datetime({offset:!0}).optional()}),DV=ge({...Wl.shape,...Sf.shape,uri:K(),description:Qt(K()),mimeType:Qt(K()),size:Qt(Ot()),annotations:Ql.optional(),_meta:Qt(pn({}))}),gfe=ge({...Wl.shape,...Sf.shape,uriTemplate:K(),description:Qt(K()),mimeType:Qt(K()),annotations:Ql.optional(),_meta:Qt(pn({}))}),vfe=kf.extend({method:ke("resources/list")}),yfe=$f.extend({resources:mt(DV)}),_fe=kf.extend({method:ke("resources/templates/list")}),bfe=$f.extend({resourceTemplates:mt(gfe)}),JT=ei.extend({uri:K()}),xfe=JT,wfe=jr.extend({method:ke("resources/read"),params:xfe}),Sfe=Nr.extend({contents:mt(qt([AV,UV]))}),kfe=_i.extend({method:ke("notifications/resources/list_changed"),params:yi.optional()}),$fe=JT,Efe=jr.extend({method:ke("resources/subscribe"),params:$fe}),Ife=JT,Pfe=jr.extend({method:ke("resources/unsubscribe"),params:Ife}),Tfe=yi.extend({uri:K()}),Ofe=_i.extend({method:ke("notifications/resources/updated"),params:Tfe}),zfe=ge({name:K(),description:Qt(K()),required:Qt(Sr())}),jfe=ge({...Wl.shape,...Sf.shape,description:Qt(K()),arguments:Qt(mt(zfe)),_meta:Qt(pn({}))}),Nfe=kf.extend({method:ke("prompts/list")}),Rfe=$f.extend({prompts:mt(jfe)}),Cfe=ei.extend({name:K(),arguments:Zt(K(),K()).optional()}),Afe=jr.extend({method:ke("prompts/get"),params:Cfe}),XT=ge({type:ke("text"),text:K(),annotations:Ql.optional(),_meta:Zt(K(),rr()).optional()}),eO=ge({type:ke("image"),data:YT,mimeType:K(),annotations:Ql.optional(),_meta:Zt(K(),rr()).optional()}),tO=ge({type:ke("audio"),data:YT,mimeType:K(),annotations:Ql.optional(),_meta:Zt(K(),rr()).optional()}),Ufe=ge({type:ke("tool_use"),name:K(),id:K(),input:Zt(K(),rr()),_meta:Zt(K(),rr()).optional()}),Dfe=ge({type:ke("resource"),resource:qt([AV,UV]),annotations:Ql.optional(),_meta:Zt(K(),rr()).optional()}),Mfe=DV.extend({type:ke("resource_link")}),rO=qt([XT,eO,tO,Mfe,Dfe]),Lfe=ge({role:If,content:rO}),Zfe=Nr.extend({description:K().optional(),messages:mt(Lfe)}),qfe=_i.extend({method:ke("notifications/prompts/list_changed"),params:yi.optional()}),Ffe=ge({title:K().optional(),readOnlyHint:Sr().optional(),destructiveHint:Sr().optional(),idempotentHint:Sr().optional(),openWorldHint:Sr().optional()}),Vfe=ge({taskSupport:Tn(["required","optional","forbidden"]).optional()}),MV=ge({...Wl.shape,...Sf.shape,description:K().optional(),inputSchema:ge({type:ke("object"),properties:Zt(K(),kr).optional(),required:mt(K()).optional()}).catchall(rr()),outputSchema:ge({type:ke("object"),properties:Zt(K(),kr).optional(),required:mt(K()).optional()}).catchall(rr()).optional(),annotations:Ffe.optional(),execution:Vfe.optional(),_meta:Zt(K(),rr()).optional()}),Wfe=kf.extend({method:ke("tools/list")}),Bfe=$f.extend({tools:mt(MV)}),LV=Nr.extend({content:mt(rO).default([]),structuredContent:Zt(K(),rr()).optional(),isError:Sr().optional()}),B2e=LV.or(Nr.extend({toolResult:rr()})),Gfe=Gy.extend({name:K(),arguments:Zt(K(),rr()).optional()}),Kfe=jr.extend({method:ke("tools/call"),params:Gfe}),Hfe=_i.extend({method:ke("notifications/tools/list_changed"),params:yi.optional()}),G2e=ge({autoRefresh:Sr().default(!0),debounceMs:Ot().int().nonnegative().default(300)}),ZV=Tn(["debug","info","notice","warning","error","critical","alert","emergency"]),Qfe=ei.extend({level:ZV}),Yfe=jr.extend({method:ke("logging/setLevel"),params:Qfe}),Jfe=yi.extend({level:ZV,logger:K().optional(),data:rr()}),Xfe=_i.extend({method:ke("notifications/message"),params:Jfe}),eme=ge({name:K().optional()}),tme=ge({hints:mt(eme).optional(),costPriority:Ot().min(0).max(1).optional(),speedPriority:Ot().min(0).max(1).optional(),intelligencePriority:Ot().min(0).max(1).optional()}),rme=ge({mode:Tn(["auto","required","none"]).optional()}),nme=ge({type:ke("tool_result"),toolUseId:K().describe("The unique identifier for the corresponding tool call."),content:mt(rO).default([]),structuredContent:ge({}).loose().optional(),isError:Sr().optional(),_meta:Zt(K(),rr()).optional()}),ime=qT("type",[XT,eO,tO]),Sy=qT("type",[XT,eO,tO,Ufe,nme]),ome=ge({role:If,content:qt([Sy,mt(Sy)]),_meta:Zt(K(),rr()).optional()}),ame=Gy.extend({messages:mt(ome),modelPreferences:tme.optional(),systemPrompt:K().optional(),includeContext:Tn(["none","thisServer","allServers"]).optional(),temperature:Ot().optional(),maxTokens:Ot().int(),stopSequences:mt(K()).optional(),metadata:kr.optional(),tools:mt(MV).optional(),toolChoice:rme.optional()}),sme=jr.extend({method:ke("sampling/createMessage"),params:ame}),cme=Nr.extend({model:K(),stopReason:Qt(Tn(["endTurn","stopSequence","maxTokens"]).or(K())),role:If,content:ime}),lme=Nr.extend({model:K(),stopReason:Qt(Tn(["endTurn","stopSequence","maxTokens","toolUse"]).or(K())),role:If,content:qt([Sy,mt(Sy)])}),ume=ge({type:ke("boolean"),title:K().optional(),description:K().optional(),default:Sr().optional()}),dme=ge({type:ke("string"),title:K().optional(),description:K().optional(),minLength:Ot().optional(),maxLength:Ot().optional(),format:Tn(["email","uri","date","date-time"]).optional(),default:K().optional()}),pme=ge({type:Tn(["number","integer"]),title:K().optional(),description:K().optional(),minimum:Ot().optional(),maximum:Ot().optional(),default:Ot().optional()}),fme=ge({type:ke("string"),title:K().optional(),description:K().optional(),enum:mt(K()),default:K().optional()}),mme=ge({type:ke("string"),title:K().optional(),description:K().optional(),oneOf:mt(ge({const:K(),title:K()})),default:K().optional()}),hme=ge({type:ke("string"),title:K().optional(),description:K().optional(),enum:mt(K()),enumNames:mt(K()).optional(),default:K().optional()}),gme=qt([fme,mme]),vme=ge({type:ke("array"),title:K().optional(),description:K().optional(),minItems:Ot().optional(),maxItems:Ot().optional(),items:ge({type:ke("string"),enum:mt(K())}),default:mt(K()).optional()}),yme=ge({type:ke("array"),title:K().optional(),description:K().optional(),minItems:Ot().optional(),maxItems:Ot().optional(),items:ge({anyOf:mt(ge({const:K(),title:K()}))}),default:mt(K()).optional()}),_me=qt([vme,yme]),bme=qt([hme,gme,_me]),xme=qt([bme,ume,dme,pme]),wme=Gy.extend({mode:ke("form").optional(),message:K(),requestedSchema:ge({type:ke("object"),properties:Zt(K(),xme),required:mt(K()).optional()})}),Sme=Gy.extend({mode:ke("url"),message:K(),elicitationId:K(),url:K().url()}),kme=qt([wme,Sme]),$me=jr.extend({method:ke("elicitation/create"),params:kme}),Eme=yi.extend({elicitationId:K()}),Ime=_i.extend({method:ke("notifications/elicitation/complete"),params:Eme}),Pme=Nr.extend({action:Tn(["accept","decline","cancel"]),content:HT(t=>t===null?void 0:t,Zt(K(),qt([K(),Ot(),Sr(),mt(K())])).optional())}),Tme=ge({type:ke("ref/resource"),uri:K()}),Ome=ge({type:ke("ref/prompt"),name:K()}),zme=ei.extend({ref:qt([Ome,Tme]),argument:ge({name:K(),value:K()}),context:ge({arguments:Zt(K(),K()).optional()}).optional()}),jme=jr.extend({method:ke("completion/complete"),params:zme}),Nme=Nr.extend({completion:pn({values:mt(K()).max(100),total:Qt(Ot().int()),hasMore:Qt(Sr())})}),Rme=ge({uri:K().startsWith("file://"),name:K().optional(),_meta:Zt(K(),rr()).optional()}),Cme=jr.extend({method:ke("roots/list"),params:ei.optional()}),Ame=Nr.extend({roots:mt(Rme)}),Ume=_i.extend({method:ke("notifications/roots/list_changed"),params:yi.optional()}),K2e=qt([$V,sfe,jme,Yfe,Afe,Nfe,vfe,_fe,wfe,Efe,Pfe,Kfe,Wfe,TV,zV,jV,RV]),H2e=qt([SV,EV,ufe,Ume,PV]),Q2e=qt([wV,cme,lme,Pme,Ame,OV,NV,IV]),Y2e=qt([$V,sme,$me,Cme,TV,zV,jV,RV]),J2e=qt([SV,EV,Xfe,Ofe,kfe,Hfe,qfe,PV,Ime]),X2e=qt([wV,lfe,Nme,Zfe,Rfe,yfe,bfe,Sfe,LV,Bfe,OV,NV,IV]),eZe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),tZe=IZ(RZ(),1),rZe=IZ(Lie(),1);(function(t){t.Completable="McpCompletable"})(SZ||(SZ={}));nZe=Dme(()=>kl.object({session_id:kl.string(),ws_url:kl.string(),work_dir:kl.string().optional(),session_key:kl.string().optional()}));Fme=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"])});var Yl,WV=P(()=>{Ja();VV();ca();ni();Ya();ra();$o();Yl=class extends rn{constructor(){super("claude","Claude (Anthropic API)",50)}canHandle(e){let r=!!process.env.ANTHROPIC_API_KEY;return r||Z.debug("ClaudeAgentStrategy: ANTHROPIC_API_KEY not set"),r}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,images:a=[],skills:s=null,sessionPath:c=null,nodeName:l=null,timeout:u,config:d={}}=r,f=n;(!f||f==="auto")&&(Z.debug(`Model is '${f||"undefined"}', using default: ${qr.CLAUDE}`),f=qr.CLAUDE);let p=lx[f]||f;lx[f]&&f!==p&&Z.debug(`Mapped model: ${f} \u2192 ${p}`),Z.debug(`Invoking Claude Agent SDK with model: ${p}, skills: ${JSON.stringify(s)}`);let m=process.env.ANTHROPIC_API_KEY,v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
221
+ \u25C6 Model: ${p}${v}
222
+ `);let g=(await import("chalk")).default;console.log(`
223
+ ${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let{allowedTools:h,mcpServers:y}=this._resolveSkills(s,{sessionPath:c,workspace:i,nodeName:l});try{let _={cwd:i,allowedTools:h,permissionMode:"bypassPermissions",model:p,...Object.keys(y).length>0&&{mcpServers:y}};if(o){let U=typeof o.parse=="function"?on(o,{target:"openApi3"}):o;_.outputFormat={type:"json_schema",schema:U},Z.debug("Structured output enforced via SDK outputFormat")}Z.debug(`Agent SDK options: ${JSON.stringify({cwd:_.cwd,toolCount:h.length,permissionMode:_.permissionMode,model:_.model,hasOutputFormat:!!_.outputFormat})}`);let b="",x=0,w=[];Z.debug("Starting Claude Agent SDK query stream");let S;try{S=FV({prompt:e,options:_})}catch(I){throw Z.error(`Failed to initialize Claude Agent SDK: ${I.message}`),I}let $=null,T=0,A=3;try{for await(let I of S){if(w.push(I),I.type==="error"||I.error){let L=I.error?.message||I.error||I.message||"Unknown API error";throw new Error(typeof L=="string"?L:JSON.stringify(L))}let U=JSON.stringify(I.message?.content||I.text||"").slice(0,200);if(U===$){if(T++,T>=A){let L=(I.message?.content?.[0]?.text||I.text||"unknown").slice(0,100);throw new Error(`API stuck in loop (${T}x repeated): ${L}`)}}else $=U,T=1;if(I.type==="assistant"||I.constructor?.name==="AssistantMessage"){let L=I.message?.content||I.content||[];for(let N of L)if(N.type==="thinking"&&N.thinking)console.log(`${N.thinking.substring(0,200)}${N.thinking.length>200?"...":""}`);else if(N.type==="text"&&N.text)b+=N.text,N.text.length<500?console.log(`${N.text}`):console.log(`${N.text.substring(0,200)}... (${N.text.length} chars)`);else if(N.type==="tool_use"){x++,N.name.includes("memory")?Wt.stepMemory(`Tool: ${N.name}`):Wt.stepTool(`Tool: ${N.name}`);let H=JSON.stringify(N.input).substring(0,100);console.log(` Input: ${H}${JSON.stringify(N.input).length>100?"...":""}`)}}else if(!(I.type==="user"&&I.tool_use_result)){if(I.type==="result"||I.constructor?.name==="ResultMessage"){let L=I.result||I.text||I.content||b;if(o){if(I.structured_output){Z.debug("Using SDK native structured_output");let Y=typeof o.parse=="function"?o.parse(I.structured_output):I.structured_output;return{raw:L,structured:Y}}if(L){let N=this._extractJson(L,o);if(N)return{raw:L,structured:N}}Z.warn(`Could not extract structured output \u2014 returning raw text (${(L||"").length} chars)`)}return L||""}}}if(Z.warn(`Agent SDK ended without result. Collected ${w.length} messages`),b.length>0)return Z.debug("Returning accumulated text from messages"),b;throw new Error("Claude Agent SDK query ended without result")}catch(I){throw Z.error(`Error during query stream: ${I.message}`),I}}catch(_){throw Z.error("Claude Agent SDK call failed",{error:_.message}),_}}_resolveSkills(e,r){if(e===null)return Z.debug("No skills \u2014 pure LLM mode"),{allowedTools:[],mcpServers:{}};if(!Array.isArray(e)||e.length===0)return Z.debug("Default IDE skills for code generation"),{allowedTools:["Read","Write","Bash","Grep","Glob"],mcpServers:{}};let n=[],i={};for(let o of e){let a=Fr(o);if(!a){Z.warn(`Unknown skill "${o}" \u2014 skipping`);continue}if(a.allowedTools&&n.push(...a.allowedTools),typeof a.resolve=="function"){let s=a.resolve(r);s&&(i[a.serverName]=s,Z.debug(`MCP: ${a.serverName} \u2192 ${s.command} ${s.args[0]}`))}}return{allowedTools:n,mcpServers:i}}_extractJson(e,r){let n=[()=>{if(e.includes("===JSON_START===")){let i=e.indexOf("===JSON_START===")+16,o=e.indexOf("===JSON_END===");return e.substring(i,o).trim()}},()=>e.match(/```json\s*\n([\s\S]*?)\n```/)?.[1]?.trim(),()=>{if(!e.startsWith("{"))return e.match(/```\s*\n([\s\S]*?)\n```/)?.[1]?.trim()},()=>e.trim(),()=>{let i=e.indexOf("{"),o=e.lastIndexOf("}");if(i!==-1&&o>i)return e.substring(i,o+1)}];for(let i of n)try{let o=i();if(!o)continue;let a=JSON.parse(o);if(typeof a!="object"||a===null)continue;return typeof r.parse=="function"?r.parse(a):a}catch{}return null}}});var YV={};Ln(YV,{Codex:()=>she,Thread:()=>iO});import{promises as nO}from"fs";import Gme from"os";import BV from"path";import{spawn as Yme}from"child_process";import Hy from"path";import Jme from"readline";import{createRequire as HV}from"module";async function Kme(t){if(t===void 0)return{cleanup:async()=>{}};if(!Hme(t))throw new Error("outputSchema must be a plain JSON object");let e=await nO.mkdtemp(BV.join(Gme.tmpdir(),"codex-output-schema-")),r=BV.join(e,"schema.json"),n=async()=>{try{await nO.rm(e,{recursive:!0,force:!0})}catch{}};try{return await nO.writeFile(r,JSON.stringify(t),"utf8"),{schemaPath:r,cleanup:n}}catch(i){throw await n(),i}}function Hme(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Qme(t){if(typeof t=="string")return{prompt:t,images:[]};let e=[],r=[];for(let n of t)n.type==="text"?e.push(n.text):n.type==="local_image"&&r.push(n.path);return{prompt:e.join(`
224
+
225
+ `),images:r}}function nhe(t){let e=[];return QV(t,"",e),e}function QV(t,e,r){if(!oO(t))if(e){r.push(`${e}=${Pf(t,e)}`);return}else throw new Error("Codex config overrides must be a plain object");let n=Object.entries(t);if(!(!e&&n.length===0)){if(e&&n.length===0){r.push(`${e}={}`);return}for(let[i,o]of n){if(!i)throw new Error("Codex config override keys must be non-empty strings");if(o===void 0)continue;let a=e?`${e}.${i}`:i;oO(o)?QV(o,a,r):r.push(`${a}=${Pf(o,a)}`)}}}function Pf(t,e){if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"){if(!Number.isFinite(t))throw new Error(`Codex config override at ${e} must be a finite number`);return`${t}`}else{if(typeof t=="boolean")return t?"true":"false";if(Array.isArray(t))return`[${t.map((n,i)=>Pf(n,`${e}[${i}]`)).join(", ")}]`;if(oO(t)){let r=[];for(let[n,i]of Object.entries(t)){if(!n)throw new Error("Codex config override keys must be non-empty strings");i!==void 0&&r.push(`${ohe(n)} = ${Pf(i,`${e}.${n}`)}`)}return`{${r.join(", ")}}`}else{if(t===null)throw new Error(`Codex config override at ${e} cannot be null`);{let r=typeof t;throw new Error(`Unsupported Codex config override value at ${e}: ${r}`)}}}}function ohe(t){return ihe.test(t)?t:JSON.stringify(t)}function oO(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ahe(){let{platform:t,arch:e}=process,r=null;switch(t){case"linux":case"android":switch(e){case"x64":r="x86_64-unknown-linux-musl";break;case"arm64":r="aarch64-unknown-linux-musl";break;default:break}break;case"darwin":switch(e){case"x64":r="x86_64-apple-darwin";break;case"arm64":r="aarch64-apple-darwin";break;default:break}break;case"win32":switch(e){case"x64":r="x86_64-pc-windows-msvc";break;case"arm64":r="aarch64-pc-windows-msvc";break;default:break}break;default:break}if(!r)throw new Error(`Unsupported platform: ${t} (${e})`);let n=ehe[r];if(!n)throw new Error(`Unsupported target triple: ${r}`);let i;try{let c=the.resolve(`${KV}/package.json`),u=HV(c).resolve(`${n}/package.json`);i=Hy.join(Hy.dirname(u),"vendor")}catch{throw new Error(`Unable to locate Codex CLI binaries. Ensure ${KV} is installed with optional dependencies.`)}let o=Hy.join(i,r),a=process.platform==="win32"?"codex.exe":"codex";return Hy.join(o,"codex",a)}var iO,GV,Xme,KV,ehe,the,rhe,ihe,she,JV=P(()=>{iO=class{_exec;_options;_id;_threadOptions;get id(){return this._id}constructor(t,e,r,n=null){this._exec=t,this._options=e,this._id=n,this._threadOptions=r}async runStreamed(t,e={}){return{events:this.runStreamedInternal(t,e)}}async*runStreamedInternal(t,e={}){let{schemaPath:r,cleanup:n}=await Kme(e.outputSchema),i=this._threadOptions,{prompt:o,images:a}=Qme(t),s=this._exec.run({input:o,baseUrl:this._options.baseUrl,apiKey:this._options.apiKey,threadId:this._id,images:a,model:i?.model,sandboxMode:i?.sandboxMode,workingDirectory:i?.workingDirectory,skipGitRepoCheck:i?.skipGitRepoCheck,outputSchemaFile:r,modelReasoningEffort:i?.modelReasoningEffort,signal:e.signal,networkAccessEnabled:i?.networkAccessEnabled,webSearchMode:i?.webSearchMode,webSearchEnabled:i?.webSearchEnabled,approvalPolicy:i?.approvalPolicy,additionalDirectories:i?.additionalDirectories});try{for await(let c of s){let l;try{l=JSON.parse(c)}catch(u){throw new Error(`Failed to parse item: ${c}`,{cause:u})}l.type==="thread.started"&&(this._id=l.thread_id),yield l}}finally{await n()}}async run(t,e={}){let r=this.runStreamedInternal(t,e),n=[],i="",o=null,a=null;for await(let s of r)if(s.type==="item.completed")s.item.type==="agent_message"&&(i=s.item.text),n.push(s.item);else if(s.type==="turn.completed")o=s.usage;else if(s.type==="turn.failed"){a=s.error;break}if(a)throw new Error(a.message);return{items:n,finalResponse:i,usage:o}}};GV="CODEX_INTERNAL_ORIGINATOR_OVERRIDE",Xme="codex_sdk_ts",KV="@openai/codex",ehe={"x86_64-unknown-linux-musl":"@openai/codex-linux-x64","aarch64-unknown-linux-musl":"@openai/codex-linux-arm64","x86_64-apple-darwin":"@openai/codex-darwin-x64","aarch64-apple-darwin":"@openai/codex-darwin-arm64","x86_64-pc-windows-msvc":"@openai/codex-win32-x64","aarch64-pc-windows-msvc":"@openai/codex-win32-arm64"},the=HV(import.meta.url),rhe=class{executablePath;envOverride;configOverrides;constructor(t=null,e,r){this.executablePath=t||ahe(),this.envOverride=e,this.configOverrides=r}async*run(t){let e=["exec","--experimental-json"];if(this.configOverrides)for(let c of nhe(this.configOverrides))e.push("--config",c);if(t.baseUrl&&e.push("--config",`openai_base_url=${Pf(t.baseUrl,"openai_base_url")}`),t.model&&e.push("--model",t.model),t.sandboxMode&&e.push("--sandbox",t.sandboxMode),t.workingDirectory&&e.push("--cd",t.workingDirectory),t.additionalDirectories?.length)for(let c of t.additionalDirectories)e.push("--add-dir",c);if(t.skipGitRepoCheck&&e.push("--skip-git-repo-check"),t.outputSchemaFile&&e.push("--output-schema",t.outputSchemaFile),t.modelReasoningEffort&&e.push("--config",`model_reasoning_effort="${t.modelReasoningEffort}"`),t.networkAccessEnabled!==void 0&&e.push("--config",`sandbox_workspace_write.network_access=${t.networkAccessEnabled}`),t.webSearchMode?e.push("--config",`web_search="${t.webSearchMode}"`):t.webSearchEnabled===!0?e.push("--config",'web_search="live"'):t.webSearchEnabled===!1&&e.push("--config",'web_search="disabled"'),t.approvalPolicy&&e.push("--config",`approval_policy="${t.approvalPolicy}"`),t.threadId&&e.push("resume",t.threadId),t.images?.length)for(let c of t.images)e.push("--image",c);let r={};if(this.envOverride)Object.assign(r,this.envOverride);else for(let[c,l]of Object.entries(process.env))l!==void 0&&(r[c]=l);r[GV]||(r[GV]=Xme),t.apiKey&&(r.CODEX_API_KEY=t.apiKey);let n=Yme(this.executablePath,e,{env:r,signal:t.signal}),i=null;if(n.once("error",c=>i=c),!n.stdin)throw n.kill(),new Error("Child process has no stdin");if(n.stdin.write(t.input),n.stdin.end(),!n.stdout)throw n.kill(),new Error("Child process has no stdout");let o=[];n.stderr&&n.stderr.on("data",c=>{o.push(c)});let a=new Promise(c=>{n.once("exit",(l,u)=>{c({code:l,signal:u})})}),s=Jme.createInterface({input:n.stdout,crlfDelay:1/0});try{for await(let u of s)yield u;if(i)throw i;let{code:c,signal:l}=await a;if(c!==0||l){let u=Buffer.concat(o),d=l?`signal ${l}`:`code ${c??1}`;throw new Error(`Codex Exec exited with ${d}: ${u.toString("utf8")}`)}}finally{s.close(),n.removeAllListeners();try{n.killed||n.kill()}catch{}}}};ihe=/^[A-Za-z0-9_-]+$/;she=class{exec;options;constructor(t={}){let{codexPathOverride:e,env:r,config:n}=t;this.exec=new rhe(e,r,n),this.options=t}startThread(t={}){return new iO(this.exec,this.options,t)}resumeThread(t,e={}){return new iO(this.exec,this.options,e,t)}}});import{execSync as che}from"child_process";var Jl,XV=P(()=>{Ja();ca();ni();Ya();ra();$o();Jl=class extends rn{constructor(){super("codex","Codex (OpenAI)",75)}canHandle(e){if(!!!(process.env.OPENAI_API_KEY||process.env.CODEX_API_KEY))return Z.debug("CodexAgentStrategy: OPENAI_API_KEY or CODEX_API_KEY not set"),!1;try{return che("codex --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return Z.warn("[Codex] codex CLI not found. Install: npm install -g @openai/codex"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:l,config:u={}}=r,{Codex:d}=await Promise.resolve().then(()=>(JV(),YV)),f=n;(!f||f==="auto")&&(Z.debug(`Model is '${f||"undefined"}', using default: ${qr.CODEX}`),f=qr.CODEX);let p=ux[f]||f;ux[f]&&f!==p&&Z.debug(`Mapped model: ${f} \u2192 ${p}`),Z.debug(`Invoking Codex SDK with model: ${p}, skills: ${JSON.stringify(a)}`);let m=process.env.CODEX_API_KEY||process.env.OPENAI_API_KEY;m&&!process.env.CODEX_API_KEY&&(process.env.CODEX_API_KEY=m);let v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
226
+ \u25C6 Model: ${p}${v}
227
+ `);let g=(await import("chalk")).default;console.log(`
228
+ ${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let h=this._resolveSkillsToMcp(a,{sessionPath:s,workspace:i,nodeName:c}),y={};Object.keys(h).length>0&&(y.mcp_servers=h,Z.debug(`[Codex] MCP servers: ${Object.keys(h).join(", ")}`));let b=new d({...Object.keys(y).length>0&&{config:y}}).startThread({workingDirectory:i,skipGitRepoCheck:!0,approvalPolicy:"never",sandboxMode:"danger-full-access",networkAccessEnabled:!0}),x=o&&typeof o.parse=="function",w={};if(o)try{let S=x?on(o,{target:"openAi"}):o;w.outputSchema=S,Z.debug("Structured output via SDK outputSchema")}catch(S){Z.warn(`[Codex] Schema conversion failed, will extract from text: ${S.message}`)}try{let{events:S}=await b.runStreamed(e,w),$=0,T="";for await(let A of S){let I=A.type;if(I==="item.completed"){let U=A.item,L=U?.type;if(L==="mcp_tool_call"){$++;let N=`${U.server}/${U.tool}`;if(Wt.stepTool(`Tool: ${N}`),U.arguments){let Y=JSON.stringify(U.arguments),H=Y.length>100?`${Y.substring(0,100)}...`:Y;console.log(` Input: ${H}`)}}else if(L==="tool_call"||L==="function_call"||L==="command_execution"){$++;let N=U.name||U.tool||U.command||"unknown";Wt.stepTool(`Tool: ${N}`)}else L==="agent_message"&&(T=U.text||"",T.length<500?console.log(T):console.log(`${T.substring(0,200)}... (${T.length} chars)`))}else I==="turn.completed"?Z.debug(`[Codex] Turn completed. Usage: ${JSON.stringify(A.usage||{})}`):Z.debug(`[Codex] Event: ${I} ${JSON.stringify(A).slice(0,300)}`)}if(Z.debug(`[Codex] Last agent message (${T.length} chars): ${T.slice(0,500)}`),o){if(!T)throw new Error("Codex agent returned no response");let A=JSON.parse(T),I=x?o.parse(A):A;return Z.debug("\u2705 [Codex] Structured output validated"),{raw:T,structured:I}}return T||""}catch(S){let $=S.message||String(S);throw Z.error(`\u274C [Codex] SDK call failed: ${$}`),$.includes("exited with code")&&(Z.error("\u{1F4A1} [Codex] Verify: codex --version && echo $OPENAI_API_KEY"),Z.error("\u{1F4A1} [Codex] If codex is missing: npm install -g @openai/codex")),S}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let o=Fr(i);if(!o){Z.warn(`[Codex] Unknown skill "${i}" \u2014 skipping`);continue}if(typeof o.resolve!="function")continue;let a=o.resolve(r);if(!a)continue;let s=o.serverName||i,c={command:a.command};a.args?.length&&(c.args=a.args),a.env&&Object.keys(a.env).length>0&&(c.env=a.env),n[s]=c,Z.debug(`[Codex] MCP: ${s} \u2192 ${a.command} ${(a.args||[]).join(" ")}`)}return n}}});import{execSync as lhe,spawn as uhe}from"child_process";import{existsSync as eW,mkdirSync as tW,readFileSync as rW,rmSync as dhe,writeFileSync as nW}from"fs";import{join as Qs}from"path";function phe(t){if(!t)return null;let e=String(t),r=e.match(/```(?:json)?\s*([\s\S]*?)```/i);if(r?.[1])try{return JSON.parse(r[1].trim())}catch{}let n=e.indexOf("{");if(n<0)return null;let i=0,o=!1,a=!1,s=-1;for(let c=n;c<e.length;c++){let l=e[c];if(o){a?a=!1:l==="\\"?a=!0:l==='"'&&(o=!1);continue}if(l==='"'){o=!0;continue}if(l==="{"){i===0&&(s=c),i+=1;continue}if(l==="}"){if(i===0)continue;if(i-=1,i===0&&s>=0){let u=e.slice(s,c+1);try{return JSON.parse(u)}catch{s=-1}}}}return null}function fhe(t){let e=String(t||"").trim();if(!e)return null;try{return JSON.parse(e)}catch{return phe(e)}}function mhe(t){try{let e=JSON.parse(t);if(typeof e=="string")return e;if(typeof e?.response=="string")return e.response;if(typeof e?.text=="string")return e.text;if(typeof e?.output=="string")return e.output;if(Array.isArray(e?.candidates)&&e.candidates.length>0){let r=e.candidates[0];if(typeof r?.content=="string")return r.content;if(Array.isArray(r?.content?.parts)){let n=r.content.parts.map(i=>typeof i?.text=="string"?i.text:"").join("");if(n.trim())return n}}}catch{}return t}var Xl,iW=P(()=>{Ja();ca();ni();ra();$o();$w();rd();Xl=class extends rn{constructor(){super("gemini","Gemini (Google)",70)}canHandle(e){if(!!!(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY))return Z.debug("GeminiAgentStrategy: GEMINI_API_KEY or GOOGLE_API_KEY not set"),!1;try{return lhe("gemini --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return Z.warn("[Gemini] gemini CLI not found. Install: npm install -g @google/gemini-cli"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:l=600*1e3}=r,u=n;(!u||u==="auto")&&(u=qr.GEMINI);let d=xR[u]||u,f=String(process.env.GEMINI_API_KEY||"").trim(),p=String(process.env.GOOGLE_API_KEY||"").trim(),m=this._resolveSkillsToMcp(a,{sessionPath:s,workspace:i,nodeName:c}),v=Object.keys(m).length>0,g=e,h=o&&typeof o.parse=="function",y=null;if(o){let U;try{let L=h?on(o,{target:"openAi"}):o;U=JSON.stringify(L,null,2)}catch{U="{}"}if(v){g+=`
229
+
230
+ Write valid JSON that matches this schema:
231
+ ${U}`;let L=`zibby-result-${Date.now()}.json`,N=Qs(i,".zibby","tmp");y=Qs(N,L),tW(N,{recursive:!0}),g+=Dc.generateFileOutputInstructions(o,y)}else g+=`
232
+
233
+ Return ONLY valid JSON (no markdown, no commentary) that matches this schema:
234
+ ${U}`}let _=this._createGeminiConfigDir(i,m),b=["--output-format","json"];d&&d!=="auto"&&b.push("--model",d);let x=Object.keys(m);if(x.length>0){b.push("--approval-mode","yolo");for(let U of x)b.push("--allowed-mcp-server-names",U);Z.info(`[Gemini] Enabling MCP servers: ${x.join(", ")}`)}else a&&a.length>0&&Z.warn(`[Gemini] Skills requested but no MCP servers configured: ${a.join(", ")}`);b.push("-p",g);let w={...process.env,GEMINI_CLI_HOME:_};f?(w.GEMINI_API_KEY=f,delete w.GOOGLE_API_KEY):p&&(w.GOOGLE_API_KEY=p,delete w.GEMINI_API_KEY),Z.debug(`[Gemini] Command: gemini ${b.slice(0,8).join(" ")}... (${b.length} total args)`),Z.debug(`[Gemini] Config home: ${_}`),Z.debug(`[Gemini] GEMINI_CLI_HOME env: ${w.GEMINI_CLI_HOME}`);let S="",$=null;try{S=await new Promise((L,N)=>{let Y=uhe("gemini",b,{cwd:i,env:w,stdio:["ignore","pipe","pipe"]}),H="",ye="",Pe=setTimeout(()=>{try{Y.kill("SIGTERM")}catch{}},l);Y.stdout.on("data",ue=>{H+=ue.toString()}),Y.stderr.on("data",ue=>{ye+=ue.toString()}),Y.on("error",ue=>{clearTimeout(Pe),N(ue)}),Y.on("close",ue=>{if(clearTimeout(Pe),ue===0)return L(H.trim());N(new Error(`gemini failed with code ${ue}: ${(ye||H).trim()}`))})})}catch(U){$=U}finally{try{dhe(_,{recursive:!0,force:!0})}catch{}}let T=mhe(S).trim();if(!o){if($)throw $;return T}if(y){let U=eW(y);if(Z.info(`[Gemini] Result file: ${U?"present":"missing"} at ${y}`),U)try{let L=rW(y,"utf-8").trim(),N=JSON.parse(L),Y=h?o.parse(N):N;return Z.info("[Gemini] Structured output recovered from result file"),{raw:T,structured:Y}}catch(L){Z.warn(`[Gemini] Result file parse/validation failed: ${L.message}`)}else $||Z.warn("[Gemini] Result file missing; falling back to stream-parsed JSON")}let A=null;if(o){let U=new io;U.zodSchema=o,U.processChunk(T),U.flush(),A=U.getResult()}if(Z.info(`[Gemini] Raw stdout length: ${S.length} chars`),Z.info(`[Gemini] Extracted text length: ${T.length} chars`),Z.info(`[Gemini] StreamParser result: ${A?"extracted":"null"}`),A||(T.length<2e3?Z.info(`[Gemini] Raw text preview:
235
+ ${T}`):Z.info(`[Gemini] Raw text preview (first 1000 chars):
236
+ ${T.slice(0,1e3)}`),A=fhe(T)),!A)throw $||(Z.error("[Gemini] Failed to extract valid JSON from output"),Z.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error("Gemini did not return valid JSON for structured output. Enable strictMode for proxy fallback."));let I=h?o.parse(A):A;return{raw:T,structured:I}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let o=Fr(i);if(!o||typeof o.resolve!="function")continue;let a=o.resolve(r);if(!a)continue;let s=o.cursorKey||o.serverName||i,c={command:a.command};a.args?.length&&(c.args=a.args),a.env&&Object.keys(a.env).length>0&&(c.env=a.env),a.cwd&&(c.cwd=a.cwd),n[s]=c}return n}_createGeminiConfigDir(e,r){let n=`${Date.now()}-${Math.random().toString(16).slice(2,10)}`,i=Qs(e||process.cwd(),".zibby","tmp",`gemini-home-${n}`),o=Qs(i,".gemini");tW(o,{recursive:!0});let a=Qs(o,"settings.json"),s={},c=Qs(process.env.HOME||"",".gemini","settings.json");if(eW(c))try{s=JSON.parse(rW(c,"utf-8"))}catch{s={}}let l={...s,mcpServers:{...s.mcpServers&&typeof s.mcpServers=="object"?s.mcpServers:{},...r||{}}};nW(a,`${JSON.stringify(l,null,2)}
237
+ `,"utf-8");let u=Qs(e||process.cwd(),".zibby","tmp","gemini-settings-debug.json");try{nW(u,`${JSON.stringify(l,null,2)}
238
+ `,"utf-8")}catch{}return Z.debug(`[Gemini] Created isolated config with ${Object.keys(l.mcpServers||{}).length} MCP servers`),Z.debug(`[Gemini] MCP servers: ${JSON.stringify(Object.keys(l.mcpServers||{}),null,2)}`),i}}});var eu,aO=P(()=>{eu=class{formatTools(e){throw new Error("formatTools() must be implemented")}hasToolCalls(e){throw new Error("hasToolCalls() must be implemented")}parseToolCalls(e){throw new Error("parseToolCalls() must be implemented")}getTextContent(e){throw new Error("getTextContent() must be implemented")}buildAssistantMessage(e){throw new Error("buildAssistantMessage() must be implemented")}buildToolResultMessage(e,r){throw new Error("buildToolResultMessage() must be implemented")}injectToolsIntoBody(e,r){throw new Error("injectToolsIntoBody() must be implemented")}}});var Ys,oW=P(()=>{aO();Ys=class extends eu{formatTools(e){return e.map(r=>({type:"function",function:{name:r.name,description:r.description,parameters:r.parameters||r.input_schema||{type:"object",properties:{}}}}))}hasToolCalls(e){let r=e.choices?.[0]?.message;return!!(r?.tool_calls&&r.tool_calls.length>0)}parseToolCalls(e){return(e.choices?.[0]?.message?.tool_calls||[]).map(n=>({id:n.id,name:n.function.name,args:JSON.parse(n.function.arguments||"{}")}))}getTextContent(e){return e.choices?.[0]?.message?.content||""}buildAssistantMessage(e){return e.choices?.[0]?.message}buildToolResultMessage(e,r){return{role:"tool",tool_call_id:e,content:typeof r=="string"?r:JSON.stringify(r)}}injectToolsIntoBody(e,r){return r.length>0&&(e.tools=r),e}}});var Tf,sO=P(()=>{Tf=class{async fetchCompletion(e,r,n={}){throw new Error("fetchCompletion() must be implemented")}async fetchStreamingCompletion(e,r,n={}){throw new Error("fetchStreamingCompletion() must be implemented")}}});function Qy(t){return Buffer.byteLength(JSON.stringify(t),"utf8")}function Yy(t,e){let r=String(t||"");if(r.length<=e)return r;let n=Math.max(0,e-28);return`${r.slice(0,n)}
239
+
240
+ [truncated for size budget]`}function cO(t,e=0){if(!t||typeof t!="object"||e>8)return t;if(Array.isArray(t))return t.map(n=>cO(n,e+1));let r={};for(let[n,i]of Object.entries(t))n==="description"||n==="title"||n==="examples"||n==="default"||(r[n]=cO(i,e+1));return r}function hhe(t=[]){return t.map(e=>({...e,function:{...e.function,description:Yy(e.function?.description||"",180),parameters:cO(e.function?.parameters||{type:"object",properties:{}})}}))}function aW(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let o of i.tool_calls)e.add(o.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:a,...s}=i;return{...s,content:s.content||""}})}function lO(t,e={}){let r=e.maxBytes||49e3,n=e.systemMaxChars||12e3,i={...t,messages:Array.isArray(t.messages)?[...t.messages]:[],tools:Array.isArray(t.tools)?hhe(t.tools):t.tools};i.messages.length>0&&i.messages[0]?.role==="system"&&(i.messages[0]={...i.messages[0],content:Yy(i.messages[0].content,n)});let o=!1;for(;Qy(i)>r&&i.messages.length>2;)i.messages.splice(1,1),o=!0;if(o&&(i.messages=aW(i.messages)),Qy(i)>r&&i.messages.length>0&&(i.messages[0]={...i.messages[0],content:Yy(i.messages[0].content,6e3)},o=!0),Qy(i)>r){let a=i.messages.find(c=>c.role==="system")||i.messages[0],s=i.messages.slice(-2);i.messages=aW([a,...s].filter(Boolean).map((c,l)=>({...c,content:Yy(c.content,l===0?4e3:8e3)}))),o=!0}return{body:i,meta:{bytes:Qy(i),trimmed:o,maxBytes:r,messageCount:i.messages.length}}}var sW=P(()=>{});var cW,tu,lW=P(()=>{sO();sW();cW=t=>Buffer.byteLength(JSON.stringify(t),"utf8"),tu=class extends Tf{async fetchCompletion(e,r,n={}){let i=cW(e),{body:o,meta:a}=lO(e,n.payloadCompaction);n.onBudget?.({streaming:!1,beforeBytes:i,meta:a});let s=this.#e(n),c=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,l=await fetch(c,{method:"POST",headers:r.headers,body:JSON.stringify(o),signal:s});if(!l.ok){let u=await l.text();throw l.status===401||l.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${l.status}: ${u}`)}return l.json()}async fetchStreamingCompletion(e,r,n={}){let i={...e,stream:!0},o=cW(i),{body:a,meta:s}=lO(i,n.payloadCompaction);n.onBudget?.({streaming:!0,beforeBytes:o,meta:s});let c=this.#e(n),l=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,u=await fetch(l,{method:"POST",headers:r.headers,body:JSON.stringify(a),signal:c});if(!u.ok){let g=await u.text();throw u.status===401||u.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${u.status}: ${g}`)}let d=u.body.getReader(),f=new TextDecoder,p="",m="",v=new Map;for(;;){let{done:g,value:h}=await d.read();if(g)break;p+=f.decode(h,{stream:!0});let y=p.split(`
241
+ `);p=y.pop();for(let _ of y){if(!_.startsWith("data: "))continue;let b=_.slice(6).trim();if(b==="[DONE]")continue;let x;try{x=JSON.parse(b)}catch{continue}let w=x.choices?.[0]?.delta;if(w&&(w.content&&(m+=w.content,n.onToken&&n.onToken(w.content)),w.tool_calls))for(let S of w.tool_calls){let $=S.index??0;v.has($)||v.set($,{id:"",name:"",args:""});let T=v.get($);S.id&&(T.id=S.id),S.function?.name&&(T.name=S.function.name),S.function?.arguments!=null&&(T.args+=S.function.arguments)}}}if(v.size>0){let g=[...v.entries()].sort(([h],[y])=>h-y).map(([,h])=>({id:h.id,type:"function",function:{name:h.name,arguments:h.args}}));return{choices:[{message:{role:"assistant",content:m||null,tool_calls:g}}]}}return{choices:[{message:{role:"assistant",content:m}}]}}#e(e={}){let r=[e.signal,e.timeout?AbortSignal.timeout(e.timeout):null].filter(Boolean);return r.length>1?AbortSignal.any(r):r[0]||void 0}}});var uO=P(()=>{aO();oW();sO();lW()});var dO=P(()=>{dr()});var Jy=P(()=>{dr();we();dO()});var dW=P(()=>{dr()});var pO=P(()=>{dr();Jy()});var pW=P(()=>{dr();Jy()});var fO=P(()=>{dr();dO();Jy();dW();dr();pl();Sg();pO();pO();pW()});var mO=P(()=>{fO();fO()});function ru(t){return!!t._zod}function Gi(t,e){return ru(t)?nl(t,e):t.safeParse(e)}function Xy(t){if(!t)return;let e;if(ru(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function mW(t){if(ru(t)){let o=t._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var e_=P(()=>{Ac();mO()});var hO=P(()=>{kp();kp()});var hW=P(()=>{hO();hO()});var vO,gW,za,r_,$r,vW,yW,A6e,xhe,whe,yO,ti,Of,_W,Rr,bi,xi,Cr,n_,bW,_O,xW,wW,bO,zf,De,xO,SW,kW,U6e,Js,She,i_,khe,jf,nu,$W,$he,Ehe,Ihe,Phe,The,Ohe,zhe,jhe,wO,Nhe,o_,Rhe,Che,a_,Ahe,Nf,Rf,Uhe,Cf,Xs,Dhe,Af,s_,c_,l_,D6e,u_,d_,p_,EW,IW,PW,SO,TW,Uf,iu,OW,Mhe,Lhe,kO,Zhe,$O,EO,qhe,Fhe,IO,PO,Vhe,Whe,Bhe,Ghe,Khe,Hhe,Qhe,Yhe,Jhe,TO,Xhe,ege,OO,zO,jO,tge,rge,nge,NO,ige,RO,CO,oge,age,zW,sge,AO,ou,M6e,cge,lge,UO,jW,NW,uge,dge,pge,fge,mge,hge,gge,vge,yge,t_,_ge,bge,DO,MO,LO,xge,wge,Sge,kge,$ge,Ege,Ige,Pge,Tge,Oge,zge,jge,Nge,Rge,Cge,ZO,Age,Uge,qO,Dge,Mge,Lge,Zge,FO,qge,Fge,Vge,Wge,L6e,Z6e,q6e,F6e,V6e,W6e,Ie,gO,Df=P(()=>{hW();vO="2025-11-25",gW=[vO,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],za="io.modelcontextprotocol/related-task",r_="2.0",$r=iI(t=>t!==null&&(typeof t=="object"||typeof t=="function")),vW=Lt([G(),Pt().int()]),yW=G(),A6e=Wr({ttl:Pt().optional(),pollInterval:Pt().optional()}),xhe=fe({ttl:Pt().optional()}),whe=fe({taskId:G()}),yO=Wr({progressToken:vW.optional(),[za]:whe.optional()}),ti=fe({_meta:yO.optional()}),Of=ti.extend({task:xhe.optional()}),_W=t=>Of.safeParse(t).success,Rr=fe({method:G(),params:ti.loose().optional()}),bi=fe({_meta:yO.optional()}),xi=fe({method:G(),params:bi.loose().optional()}),Cr=Wr({_meta:yO.optional()}),n_=Lt([G(),Pt().int()]),bW=fe({jsonrpc:Se(r_),id:n_,...Rr.shape}).strict(),_O=t=>bW.safeParse(t).success,xW=fe({jsonrpc:Se(r_),...xi.shape}).strict(),wW=t=>xW.safeParse(t).success,bO=fe({jsonrpc:Se(r_),id:n_,result:Cr}).strict(),zf=t=>bO.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(De||(De={}));xO=fe({jsonrpc:Se(r_),id:n_.optional(),error:fe({code:Pt().int(),message:G(),data:Mt().optional()})}).strict(),SW=t=>xO.safeParse(t).success,kW=Lt([bW,xW,bO,xO]),U6e=Lt([bO,xO]),Js=Cr.strict(),She=bi.extend({requestId:n_.optional(),reason:G().optional()}),i_=xi.extend({method:Se("notifications/cancelled"),params:She}),khe=fe({src:G(),mimeType:G().optional(),sizes:ot(G()).optional(),theme:Br(["light","dark"]).optional()}),jf=fe({icons:ot(khe).optional()}),nu=fe({name:G(),title:G().optional()}),$W=nu.extend({...nu.shape,...jf.shape,version:G(),websiteUrl:G().optional(),description:G().optional()}),$he=Sp(fe({applyDefaults:yr().optional()}),Rt(G(),Mt())),Ehe=lv(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Sp(fe({form:$he.optional(),url:$r.optional()}),Rt(G(),Mt()).optional())),Ihe=Wr({list:$r.optional(),cancel:$r.optional(),requests:Wr({sampling:Wr({createMessage:$r.optional()}).optional(),elicitation:Wr({create:$r.optional()}).optional()}).optional()}),Phe=Wr({list:$r.optional(),cancel:$r.optional(),requests:Wr({tools:Wr({call:$r.optional()}).optional()}).optional()}),The=fe({experimental:Rt(G(),$r).optional(),sampling:fe({context:$r.optional(),tools:$r.optional()}).optional(),elicitation:Ehe.optional(),roots:fe({listChanged:yr().optional()}).optional(),tasks:Ihe.optional(),extensions:Rt(G(),$r).optional()}),Ohe=ti.extend({protocolVersion:G(),capabilities:The,clientInfo:$W}),zhe=Rr.extend({method:Se("initialize"),params:Ohe}),jhe=fe({experimental:Rt(G(),$r).optional(),logging:$r.optional(),completions:$r.optional(),prompts:fe({listChanged:yr().optional()}).optional(),resources:fe({subscribe:yr().optional(),listChanged:yr().optional()}).optional(),tools:fe({listChanged:yr().optional()}).optional(),tasks:Phe.optional(),extensions:Rt(G(),$r).optional()}),wO=Cr.extend({protocolVersion:G(),capabilities:jhe,serverInfo:$W,instructions:G().optional()}),Nhe=xi.extend({method:Se("notifications/initialized"),params:bi.optional()}),o_=Rr.extend({method:Se("ping"),params:ti.optional()}),Rhe=fe({progress:Pt(),total:Gt(Pt()),message:Gt(G())}),Che=fe({...bi.shape,...Rhe.shape,progressToken:vW}),a_=xi.extend({method:Se("notifications/progress"),params:Che}),Ahe=ti.extend({cursor:yW.optional()}),Nf=Rr.extend({params:Ahe.optional()}),Rf=Cr.extend({nextCursor:yW.optional()}),Uhe=Br(["working","input_required","completed","failed","cancelled"]),Cf=fe({taskId:G(),status:Uhe,ttl:Lt([Pt(),nv()]),createdAt:G(),lastUpdatedAt:G(),pollInterval:Gt(Pt()),statusMessage:Gt(G())}),Xs=Cr.extend({task:Cf}),Dhe=bi.merge(Cf),Af=xi.extend({method:Se("notifications/tasks/status"),params:Dhe}),s_=Rr.extend({method:Se("tasks/get"),params:ti.extend({taskId:G()})}),c_=Cr.merge(Cf),l_=Rr.extend({method:Se("tasks/result"),params:ti.extend({taskId:G()})}),D6e=Cr.loose(),u_=Nf.extend({method:Se("tasks/list")}),d_=Rf.extend({tasks:ot(Cf)}),p_=Rr.extend({method:Se("tasks/cancel"),params:ti.extend({taskId:G()})}),EW=Cr.merge(Cf),IW=fe({uri:G(),mimeType:Gt(G()),_meta:Rt(G(),Mt()).optional()}),PW=IW.extend({text:G()}),SO=G().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),TW=IW.extend({blob:SO}),Uf=Br(["user","assistant"]),iu=fe({audience:ot(Uf).optional(),priority:Pt().min(0).max(1).optional(),lastModified:zs.datetime({offset:!0}).optional()}),OW=fe({...nu.shape,...jf.shape,uri:G(),description:Gt(G()),mimeType:Gt(G()),size:Gt(Pt()),annotations:iu.optional(),_meta:Gt(Wr({}))}),Mhe=fe({...nu.shape,...jf.shape,uriTemplate:G(),description:Gt(G()),mimeType:Gt(G()),annotations:iu.optional(),_meta:Gt(Wr({}))}),Lhe=Nf.extend({method:Se("resources/list")}),kO=Rf.extend({resources:ot(OW)}),Zhe=Nf.extend({method:Se("resources/templates/list")}),$O=Rf.extend({resourceTemplates:ot(Mhe)}),EO=ti.extend({uri:G()}),qhe=EO,Fhe=Rr.extend({method:Se("resources/read"),params:qhe}),IO=Cr.extend({contents:ot(Lt([PW,TW]))}),PO=xi.extend({method:Se("notifications/resources/list_changed"),params:bi.optional()}),Vhe=EO,Whe=Rr.extend({method:Se("resources/subscribe"),params:Vhe}),Bhe=EO,Ghe=Rr.extend({method:Se("resources/unsubscribe"),params:Bhe}),Khe=bi.extend({uri:G()}),Hhe=xi.extend({method:Se("notifications/resources/updated"),params:Khe}),Qhe=fe({name:G(),description:Gt(G()),required:Gt(yr())}),Yhe=fe({...nu.shape,...jf.shape,description:Gt(G()),arguments:Gt(ot(Qhe)),_meta:Gt(Wr({}))}),Jhe=Nf.extend({method:Se("prompts/list")}),TO=Rf.extend({prompts:ot(Yhe)}),Xhe=ti.extend({name:G(),arguments:Rt(G(),G()).optional()}),ege=Rr.extend({method:Se("prompts/get"),params:Xhe}),OO=fe({type:Se("text"),text:G(),annotations:iu.optional(),_meta:Rt(G(),Mt()).optional()}),zO=fe({type:Se("image"),data:SO,mimeType:G(),annotations:iu.optional(),_meta:Rt(G(),Mt()).optional()}),jO=fe({type:Se("audio"),data:SO,mimeType:G(),annotations:iu.optional(),_meta:Rt(G(),Mt()).optional()}),tge=fe({type:Se("tool_use"),name:G(),id:G(),input:Rt(G(),Mt()),_meta:Rt(G(),Mt()).optional()}),rge=fe({type:Se("resource"),resource:Lt([PW,TW]),annotations:iu.optional(),_meta:Rt(G(),Mt()).optional()}),nge=OW.extend({type:Se("resource_link")}),NO=Lt([OO,zO,jO,nge,rge]),ige=fe({role:Uf,content:NO}),RO=Cr.extend({description:G().optional(),messages:ot(ige)}),CO=xi.extend({method:Se("notifications/prompts/list_changed"),params:bi.optional()}),oge=fe({title:G().optional(),readOnlyHint:yr().optional(),destructiveHint:yr().optional(),idempotentHint:yr().optional(),openWorldHint:yr().optional()}),age=fe({taskSupport:Br(["required","optional","forbidden"]).optional()}),zW=fe({...nu.shape,...jf.shape,description:G().optional(),inputSchema:fe({type:Se("object"),properties:Rt(G(),$r).optional(),required:ot(G()).optional()}).catchall(Mt()),outputSchema:fe({type:Se("object"),properties:Rt(G(),$r).optional(),required:ot(G()).optional()}).catchall(Mt()).optional(),annotations:oge.optional(),execution:age.optional(),_meta:Rt(G(),Mt()).optional()}),sge=Nf.extend({method:Se("tools/list")}),AO=Rf.extend({tools:ot(zW)}),ou=Cr.extend({content:ot(NO).default([]),structuredContent:Rt(G(),Mt()).optional(),isError:yr().optional()}),M6e=ou.or(Cr.extend({toolResult:Mt()})),cge=Of.extend({name:G(),arguments:Rt(G(),Mt()).optional()}),lge=Rr.extend({method:Se("tools/call"),params:cge}),UO=xi.extend({method:Se("notifications/tools/list_changed"),params:bi.optional()}),jW=fe({autoRefresh:yr().default(!0),debounceMs:Pt().int().nonnegative().default(300)}),NW=Br(["debug","info","notice","warning","error","critical","alert","emergency"]),uge=ti.extend({level:NW}),dge=Rr.extend({method:Se("logging/setLevel"),params:uge}),pge=bi.extend({level:NW,logger:G().optional(),data:Mt()}),fge=xi.extend({method:Se("notifications/message"),params:pge}),mge=fe({name:G().optional()}),hge=fe({hints:ot(mge).optional(),costPriority:Pt().min(0).max(1).optional(),speedPriority:Pt().min(0).max(1).optional(),intelligencePriority:Pt().min(0).max(1).optional()}),gge=fe({mode:Br(["auto","required","none"]).optional()}),vge=fe({type:Se("tool_result"),toolUseId:G().describe("The unique identifier for the corresponding tool call."),content:ot(NO).default([]),structuredContent:fe({}).loose().optional(),isError:yr().optional(),_meta:Rt(G(),Mt()).optional()}),yge=av("type",[OO,zO,jO]),t_=av("type",[OO,zO,jO,tge,vge]),_ge=fe({role:Uf,content:Lt([t_,ot(t_)]),_meta:Rt(G(),Mt()).optional()}),bge=Of.extend({messages:ot(_ge),modelPreferences:hge.optional(),systemPrompt:G().optional(),includeContext:Br(["none","thisServer","allServers"]).optional(),temperature:Pt().optional(),maxTokens:Pt().int(),stopSequences:ot(G()).optional(),metadata:$r.optional(),tools:ot(zW).optional(),toolChoice:gge.optional()}),DO=Rr.extend({method:Se("sampling/createMessage"),params:bge}),MO=Cr.extend({model:G(),stopReason:Gt(Br(["endTurn","stopSequence","maxTokens"]).or(G())),role:Uf,content:yge}),LO=Cr.extend({model:G(),stopReason:Gt(Br(["endTurn","stopSequence","maxTokens","toolUse"]).or(G())),role:Uf,content:Lt([t_,ot(t_)])}),xge=fe({type:Se("boolean"),title:G().optional(),description:G().optional(),default:yr().optional()}),wge=fe({type:Se("string"),title:G().optional(),description:G().optional(),minLength:Pt().optional(),maxLength:Pt().optional(),format:Br(["email","uri","date","date-time"]).optional(),default:G().optional()}),Sge=fe({type:Br(["number","integer"]),title:G().optional(),description:G().optional(),minimum:Pt().optional(),maximum:Pt().optional(),default:Pt().optional()}),kge=fe({type:Se("string"),title:G().optional(),description:G().optional(),enum:ot(G()),default:G().optional()}),$ge=fe({type:Se("string"),title:G().optional(),description:G().optional(),oneOf:ot(fe({const:G(),title:G()})),default:G().optional()}),Ege=fe({type:Se("string"),title:G().optional(),description:G().optional(),enum:ot(G()),enumNames:ot(G()).optional(),default:G().optional()}),Ige=Lt([kge,$ge]),Pge=fe({type:Se("array"),title:G().optional(),description:G().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:fe({type:Se("string"),enum:ot(G())}),default:ot(G()).optional()}),Tge=fe({type:Se("array"),title:G().optional(),description:G().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:fe({anyOf:ot(fe({const:G(),title:G()}))}),default:ot(G()).optional()}),Oge=Lt([Pge,Tge]),zge=Lt([Ege,Ige,Oge]),jge=Lt([zge,xge,wge,Sge]),Nge=Of.extend({mode:Se("form").optional(),message:G(),requestedSchema:fe({type:Se("object"),properties:Rt(G(),jge),required:ot(G()).optional()})}),Rge=Of.extend({mode:Se("url"),message:G(),elicitationId:G(),url:G().url()}),Cge=Lt([Nge,Rge]),ZO=Rr.extend({method:Se("elicitation/create"),params:Cge}),Age=bi.extend({elicitationId:G()}),Uge=xi.extend({method:Se("notifications/elicitation/complete"),params:Age}),qO=Cr.extend({action:Br(["accept","decline","cancel"]),content:lv(t=>t===null?void 0:t,Rt(G(),Lt([G(),Pt(),yr(),ot(G())])).optional())}),Dge=fe({type:Se("ref/resource"),uri:G()}),Mge=fe({type:Se("ref/prompt"),name:G()}),Lge=ti.extend({ref:Lt([Mge,Dge]),argument:fe({name:G(),value:G()}),context:fe({arguments:Rt(G(),G()).optional()}).optional()}),Zge=Rr.extend({method:Se("completion/complete"),params:Lge}),FO=Cr.extend({completion:Wr({values:ot(G()).max(100),total:Gt(Pt().int()),hasMore:Gt(yr())})}),qge=fe({uri:G().startsWith("file://"),name:G().optional(),_meta:Rt(G(),Mt()).optional()}),Fge=Rr.extend({method:Se("roots/list"),params:ti.optional()}),Vge=Cr.extend({roots:ot(qge)}),Wge=xi.extend({method:Se("notifications/roots/list_changed"),params:bi.optional()}),L6e=Lt([o_,zhe,Zge,dge,ege,Jhe,Lhe,Zhe,Fhe,Whe,Ghe,lge,sge,s_,l_,u_,p_]),Z6e=Lt([i_,a_,Nhe,Wge,Af]),q6e=Lt([Js,MO,LO,qO,Vge,c_,d_,Xs]),F6e=Lt([o_,DO,ZO,Fge,s_,l_,u_,p_]),V6e=Lt([i_,a_,fge,Hhe,PO,UO,CO,Af,Uge]),W6e=Lt([Js,wO,FO,RO,TO,kO,$O,IO,ou,AO,c_,d_,Xs]),Ie=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===De.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new gO(i.elicitations,r)}return new t(e,r,n)}},gO=class extends Ie{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(De.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});function ja(t){return t==="completed"||t==="failed"||t==="cancelled"}var RW=P(()=>{});function VO(t){let r=Xy(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=mW(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function WO(t,e){let r=Gi(t,e);if(!r.success)throw r.error;return r.data}var CW=P(()=>{mO();e_();ca()});function AW(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function UW(t,e){let r={...t};for(let n in e){let i=n,o=e[i];if(o===void 0)continue;let a=r[i];AW(a)&&AW(o)?r[i]={...a,...o}:r[i]=o}return r}var Bge,f_,DW=P(()=>{e_();Df();RW();CW();Bge=6e4,f_=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(i_,r=>{this._oncancel(r)}),this.setNotificationHandler(a_,r=>{this._onprogress(r)}),this.setRequestHandler(o_,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(s_,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ie(De.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(l_,async(r,n)=>{let i=async()=>{let o=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,n.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,l=c.id,u=this._requestResolvers.get(l);if(u)if(this._requestResolvers.delete(l),s.type==="response")u(c);else{let d=c,f=new Ie(d.error.code,d.error.message,d.error.data);u(f)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${l}`))}continue}await this._transport?.send(s.message,{relatedRequestId:n.requestId})}}let a=await this._taskStore.getTask(o,n.sessionId);if(!a)throw new Ie(De.InvalidParams,`Task not found: ${o}`);if(!ja(a.status))return await this._waitForTaskUpdate(o,n.signal),await i();if(ja(a.status)){let s=await this._taskStore.getTaskResult(o,n.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[za]:{taskId:o}}}}return await i()};return await i()}),this.setRequestHandler(u_,async(r,n)=>{try{let{tasks:i,nextCursor:o}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:i,nextCursor:o,_meta:{}}}catch(i){throw new Ie(De.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(p_,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ie(De.InvalidParams,`Task not found: ${r.params.taskId}`);if(ja(i.status))throw new Ie(De.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Ie(De.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(i){throw i instanceof Ie?i:new Ie(De.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),Ie.fromError(De.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=o=>{n?.(o),this._onerror(o)};let i=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{i?.(o,a),zf(o)||SW(o)?this._onresponse(o):_O(o)?this._onrequest(o,a):wW(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._timeoutInfo.values())clearTimeout(n.timeoutId);this._timeoutInfo.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=Ie.fromError(De.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,o=e.params?._meta?.[za]?.taskId;if(n===void 0){let u={jsonrpc:"2.0",id:e.id,error:{code:De.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:u,timestamp:Date.now()},i?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):i?.send(u).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let s=_W(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,l={signal:a.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async u=>{if(a.signal.aborted)return;let d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(u,d)},sendRequest:async(u,d,f)=>{if(a.signal.aborted)throw new Ie(De.ConnectionClosed,"Request was cancelled");let p={...f,relatedRequestId:e.id};o&&!p.relatedTask&&(p.relatedTask={taskId:o});let m=p.relatedTask?.taskId??o;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(u,d,p)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).then(async u=>{if(a.signal.aborted)return;let d={result:u,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)},async u=>{if(a.signal.aborted)return;let d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(u.code)?u.code:De.InternalError,message:u.message??"Internal error",...u.data!==void 0&&{data:u.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)}).catch(u=>this._onerror(new Error(`Failed to send response: ${u}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),a(c);return}o(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),zf(e))n(e);else{let a=new Ie(e.error.code,e.error.message,e.error.data);n(a)}return}let i=this._responseHandlers.get(r);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(zf(e)&&e.result&&typeof e.result=="object"){let a=e.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),zf(e))i(e);else{let a=Ie.fromError(e.error.code,e.error.message,e.error.data);i(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(e,r,n)}}catch(a){yield{type:"error",error:a instanceof Ie?a:new Ie(De.InternalError,String(a))}}return}let o;try{let a=await this.request(e,Xs,n);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new Ie(De.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},n);if(yield{type:"taskStatus",task:s},ja(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)}:s.status==="failed"?yield{type:"error",error:new Ie(De.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new Ie(De.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(l=>setTimeout(l,c)),n?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof Ie?a:new Ie(De.InternalError,String(a))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=n??{};return new Promise((l,u)=>{let d=y=>{u(y)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(y){d(y);return}n?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:f};n?.onprogress&&(this._progressHandlers.set(f,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[za]:c}});let m=y=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(y)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(b=>this._onerror(new Error(`Failed to send cancellation: ${b}`)));let _=y instanceof Ie?y:new Ie(De.RequestTimeout,String(y));u(_)};this._responseHandlers.set(f,y=>{if(!n?.signal?.aborted){if(y instanceof Error)return u(y);try{let _=Gi(r,y.result);_.success?l(_.data):u(_.error)}catch(_){u(_)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});let v=n?.timeout??Bge,g=()=>m(Ie.fromError(De.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let h=c?.taskId;if(h){let y=_=>{let b=this._responseHandlers.get(f);b?b(_):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,y),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(f),u(_)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(y=>{this._cleanupTimeout(f),u(y)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},c_,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},d_,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},EW,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[za]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[za]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...e,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[za]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(e,r){let n=VO(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,o)=>{let a=WO(e,i);return Promise.resolve(r(a,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=VO(e);this._notificationHandlers.set(n,i=>{let o=WO(e,i);return Promise.resolve(r(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,i)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let i of n)if(i.type==="request"&&_O(i.message)){let o=i.message.id,a=this._requestResolvers.get(o);a?(a(new Ie(De.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let i=await this._taskStore?.getTask(e);i?.pollInterval&&(n=i.pollInterval)}catch{}return new Promise((i,o)=>{if(r.aborted){o(new Ie(De.InvalidRequest,"Request cancelled"));return}let a=setTimeout(i,n);r.addEventListener("abort",()=>{clearTimeout(a),o(new Ie(De.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},r)},getTask:async i=>{let o=await n.getTask(i,r);if(!o)throw new Ie(De.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(i,o,a)=>{await n.storeTaskResult(i,o,a,r);let s=await n.getTask(i,r);if(s){let c=Af.parse({method:"notifications/tasks/status",params:s});await this.notification(c),ja(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,o,a)=>{let s=await n.getTask(i,r);if(!s)throw new Ie(De.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(ja(s.status))throw new Ie(De.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,o,a,r);let c=await n.getTask(i,r);if(c){let l=Af.parse({method:"notifications/tasks/status",params:c});await this.notification(l),ja(c.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}}});var Zf=z($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.regexpCode=$t.getEsmExportName=$t.getProperty=$t.safeStringify=$t.stringify=$t.strConcat=$t.addCodeArg=$t.str=$t._=$t.nil=$t._Code=$t.Name=$t.IDENTIFIER=$t._CodeOrName=void 0;var Mf=class{};$t._CodeOrName=Mf;$t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ec=class extends Mf{constructor(e){if(super(),!$t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$t.Name=ec;var wi=class extends Mf{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof ec&&(r[n.str]=(r[n.str]||0)+1),r),{})}};$t._Code=wi;$t.nil=new wi("");function MW(t,...e){let r=[t[0]],n=0;for(;n<e.length;)GO(r,e[n]),r.push(t[++n]);return new wi(r)}$t._=MW;var BO=new wi("+");function LW(t,...e){let r=[Lf(t[0])],n=0;for(;n<e.length;)r.push(BO),GO(r,e[n]),r.push(BO,Lf(t[++n]));return Gge(r),new wi(r)}$t.str=LW;function GO(t,e){e instanceof wi?t.push(...e._items):e instanceof ec?t.push(e):t.push(Qge(e))}$t.addCodeArg=GO;function Gge(t){let e=1;for(;e<t.length-1;){if(t[e]===BO){let r=Kge(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Kge(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ec||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ec))return`"${t}${e.slice(1)}`}function Hge(t,e){return e.emptyStr()?t:t.emptyStr()?e:LW`${t}${e}`}$t.strConcat=Hge;function Qge(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Lf(Array.isArray(t)?t.join(","):t)}function Yge(t){return new wi(Lf(t))}$t.stringify=Yge;function Lf(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$t.safeStringify=Lf;function Jge(t){return typeof t=="string"&&$t.IDENTIFIER.test(t)?new wi(`.${t}`):MW`[${t}]`}$t.getProperty=Jge;function Xge(t){if(typeof t=="string"&&$t.IDENTIFIER.test(t))return new wi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}$t.getEsmExportName=Xge;function eve(t){return new wi(t.toString())}$t.regexpCode=eve});var QO=z(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ValueScope=zn.ValueScopeName=zn.Scope=zn.varKinds=zn.UsedValueState=void 0;var On=Zf(),KO=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},m_;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(m_||(zn.UsedValueState=m_={}));zn.varKinds={const:new On.Name("const"),let:new On.Name("let"),var:new On.Name("var")};var h_=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof On.Name?e:this.name(e)}name(e){return new On.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};zn.Scope=h_;var g_=class extends On.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,On._)`.${new On.Name(r)}[${n}]`}};zn.ValueScopeName=g_;var tve=(0,On._)`\n`,HO=class extends h_{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?tve:On.nil}}get(){return this._scope}name(e){return new g_(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let u=s.get(a);if(u)return u}else s=this._values[o]=new Map;s.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,On._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=On.nil;for(let a in e){let s=e[a];if(!s)continue;let c=n[a]=n[a]||new Map;s.forEach(l=>{if(c.has(l))return;c.set(l,m_.Started);let u=r(l);if(u){let d=this.opts.es5?zn.varKinds.var:zn.varKinds.const;o=(0,On._)`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=i?.(l))o=(0,On._)`${o}${u}${this.opts._n}`;else throw new KO(l);c.set(l,m_.Completed)})}return o}};zn.ValueScope=HO});var at=z(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.or=nt.and=nt.not=nt.CodeGen=nt.operators=nt.varKinds=nt.ValueScopeName=nt.ValueScope=nt.Scope=nt.Name=nt.regexpCode=nt.stringify=nt.getProperty=nt.nil=nt.strConcat=nt.str=nt._=void 0;var gt=Zf(),Ki=QO(),Na=Zf();Object.defineProperty(nt,"_",{enumerable:!0,get:function(){return Na._}});Object.defineProperty(nt,"str",{enumerable:!0,get:function(){return Na.str}});Object.defineProperty(nt,"strConcat",{enumerable:!0,get:function(){return Na.strConcat}});Object.defineProperty(nt,"nil",{enumerable:!0,get:function(){return Na.nil}});Object.defineProperty(nt,"getProperty",{enumerable:!0,get:function(){return Na.getProperty}});Object.defineProperty(nt,"stringify",{enumerable:!0,get:function(){return Na.stringify}});Object.defineProperty(nt,"regexpCode",{enumerable:!0,get:function(){return Na.regexpCode}});Object.defineProperty(nt,"Name",{enumerable:!0,get:function(){return Na.Name}});var b_=QO();Object.defineProperty(nt,"Scope",{enumerable:!0,get:function(){return b_.Scope}});Object.defineProperty(nt,"ValueScope",{enumerable:!0,get:function(){return b_.ValueScope}});Object.defineProperty(nt,"ValueScopeName",{enumerable:!0,get:function(){return b_.ValueScopeName}});Object.defineProperty(nt,"varKinds",{enumerable:!0,get:function(){return b_.varKinds}});nt.operators={GT:new gt._Code(">"),GTE:new gt._Code(">="),LT:new gt._Code("<"),LTE:new gt._Code("<="),EQ:new gt._Code("==="),NEQ:new gt._Code("!=="),NOT:new gt._Code("!"),OR:new gt._Code("||"),AND:new gt._Code("&&"),ADD:new gt._Code("+")};var Vo=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},YO=class extends Vo{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ki.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=su(this.rhs,e,r)),this}get names(){return this.rhs instanceof gt._CodeOrName?this.rhs.names:{}}},v_=class extends Vo{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof gt.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=su(this.rhs,e,r),this}get names(){let e=this.lhs instanceof gt.Name?{}:{...this.lhs.names};return __(e,this.rhs)}},JO=class extends v_{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},XO=class extends Vo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},ez=class extends Vo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},tz=class extends Vo{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},rz=class extends Vo{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=su(this.code,e,r),this}get names(){return this.code instanceof gt._CodeOrName?this.code.names:{}}},qf=class extends Vo{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(rve(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>nc(e,r.names),{})}},Wo=class extends qf{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},nz=class extends qf{},au=class extends Wo{};au.kind="else";var tc=class t extends Wo{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new au(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(ZW(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=su(this.condition,e,r),this}get names(){let e=super.names;return __(e,this.condition),this.else&&nc(e,this.else.names),e}};tc.kind="if";var rc=class extends Wo{};rc.kind="for";var iz=class extends rc{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=su(this.iteration,e,r),this}get names(){return nc(super.names,this.iteration.names)}},oz=class extends rc{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ki.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=__(super.names,this.from);return __(e,this.to)}},y_=class extends rc{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=su(this.iterable,e,r),this}get names(){return nc(super.names,this.iterable.names)}},Ff=class extends Wo{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ff.kind="func";var Vf=class extends qf{render(e){return"return "+super.render(e)}};Vf.kind="return";var az=class extends Wo{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&nc(e,this.catch.names),this.finally&&nc(e,this.finally.names),e}},Wf=class extends Wo{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Wf.kind="catch";var Bf=class extends Wo{render(e){return"finally"+super.render(e)}};Bf.kind="finally";var sz=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
242
+ `:""},this._extScope=e,this._scope=new Ki.Scope({parent:e}),this._nodes=[new nz]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new YO(e,o,n)),o}const(e,r,n){return this._def(Ki.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ki.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ki.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new v_(e,r,n))}add(e,r){return this._leafNode(new JO(e,nt.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==gt.nil&&this._leafNode(new rz(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,gt.addCodeArg)(r,i));return r.push("}"),new gt._Code(r)}if(e,r,n){if(this._blockNode(new tc(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new tc(e))}else(){return this._elseNode(new au)}endIf(){return this._endBlockNode(tc,au)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new iz(e),r)}forRange(e,r,n,i,o=this.opts.es5?Ki.varKinds.var:Ki.varKinds.let){let a=this._scope.toName(e);return this._for(new oz(o,a,r,n),()=>i(a))}forOf(e,r,n,i=Ki.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof gt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,gt._)`${a}.length`,s=>{this.var(o,(0,gt._)`${a}[${s}]`),n(o)})}return this._for(new y_("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?Ki.varKinds.var:Ki.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,gt._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new y_("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(rc)}label(e){return this._leafNode(new XO(e))}break(e){return this._leafNode(new ez(e))}return(e){let r=new Vf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Vf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new az;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Wf(o),r(o)}return n&&(this._currNode=i.finally=new Bf,this.code(n)),this._endBlockNode(Wf,Bf)}throw(e){return this._leafNode(new tz(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=gt.nil,n,i){return this._blockNode(new Ff(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ff)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof tc))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};nt.CodeGen=sz;function nc(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function __(t,e){return e instanceof gt._CodeOrName?nc(t,e.names):t}function su(t,e,r){if(t instanceof gt.Name)return n(t);if(!i(t))return t;return new gt._Code(t._items.reduce((o,a)=>(a instanceof gt.Name&&(a=n(a)),a instanceof gt._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof gt._Code&&o._items.some(a=>a instanceof gt.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function rve(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function ZW(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,gt._)`!${cz(t)}`}nt.not=ZW;var nve=qW(nt.operators.AND);function ive(...t){return t.reduce(nve)}nt.and=ive;var ove=qW(nt.operators.OR);function ave(...t){return t.reduce(ove)}nt.or=ave;function qW(t){return(e,r)=>e===gt.nil?r:r===gt.nil?e:(0,gt._)`${cz(e)} ${t} ${cz(r)}`}function cz(t){return t instanceof gt.Name?t:(0,gt._)`(${t})`}});var _t=z(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.checkStrictMode=st.getErrorPath=st.Type=st.useFunc=st.setEvaluated=st.evaluatedPropsToName=st.mergeEvaluated=st.eachItem=st.unescapeJsonPointer=st.escapeJsonPointer=st.escapeFragment=st.unescapeFragment=st.schemaRefOrVal=st.schemaHasRulesButRef=st.schemaHasRules=st.checkUnknownRules=st.alwaysValidSchema=st.toHash=void 0;var Ft=at(),sve=Zf();function cve(t){let e={};for(let r of t)e[r]=!0;return e}st.toHash=cve;function lve(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(WW(t,e),!BW(e,t.self.RULES.all))}st.alwaysValidSchema=lve;function WW(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||HW(t,`unknown keyword: "${o}"`)}st.checkUnknownRules=WW;function BW(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}st.schemaHasRules=BW;function uve(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}st.schemaHasRulesButRef=uve;function dve({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Ft._)`${r}`}return(0,Ft._)`${t}${e}${(0,Ft.getProperty)(n)}`}st.schemaRefOrVal=dve;function pve(t){return GW(decodeURIComponent(t))}st.unescapeFragment=pve;function fve(t){return encodeURIComponent(uz(t))}st.escapeFragment=fve;function uz(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}st.escapeJsonPointer=uz;function GW(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}st.unescapeJsonPointer=GW;function mve(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}st.eachItem=mve;function FW({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let c=a===void 0?o:a instanceof Ft.Name?(o instanceof Ft.Name?t(i,o,a):e(i,o,a),a):o instanceof Ft.Name?(e(i,a,o),o):r(o,a);return s===Ft.Name&&!(c instanceof Ft.Name)?n(i,c):c}}st.mergeEvaluated={props:FW({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Ft._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Ft._)`${r} || {}`).code((0,Ft._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Ft._)`${r} || {}`),dz(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:KW}),items:FW({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Ft._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Ft._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function KW(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Ft._)`{}`);return e!==void 0&&dz(t,r,e),r}st.evaluatedPropsToName=KW;function dz(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Ft._)`${e}${(0,Ft.getProperty)(n)}`,!0))}st.setEvaluated=dz;var VW={};function hve(t,e){return t.scopeValue("func",{ref:e,code:VW[e.code]||(VW[e.code]=new sve._Code(e.code))})}st.useFunc=hve;var lz;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(lz||(st.Type=lz={}));function gve(t,e,r){if(t instanceof Ft.Name){let n=e===lz.Num;return r?n?(0,Ft._)`"[" + ${t} + "]"`:(0,Ft._)`"['" + ${t} + "']"`:n?(0,Ft._)`"/" + ${t}`:(0,Ft._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ft.getProperty)(t).toString():"/"+uz(t)}st.getErrorPath=gve;function HW(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}st.checkStrictMode=HW});var Bo=z(pz=>{"use strict";Object.defineProperty(pz,"__esModule",{value:!0});var Gr=at(),vve={data:new Gr.Name("data"),valCxt:new Gr.Name("valCxt"),instancePath:new Gr.Name("instancePath"),parentData:new Gr.Name("parentData"),parentDataProperty:new Gr.Name("parentDataProperty"),rootData:new Gr.Name("rootData"),dynamicAnchors:new Gr.Name("dynamicAnchors"),vErrors:new Gr.Name("vErrors"),errors:new Gr.Name("errors"),this:new Gr.Name("this"),self:new Gr.Name("self"),scope:new Gr.Name("scope"),json:new Gr.Name("json"),jsonPos:new Gr.Name("jsonPos"),jsonLen:new Gr.Name("jsonLen"),jsonPart:new Gr.Name("jsonPart")};pz.default=vve});var Gf=z(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.extendErrors=Kr.resetErrorsCount=Kr.reportExtraError=Kr.reportError=Kr.keyword$DataError=Kr.keywordError=void 0;var bt=at(),x_=_t(),gn=Bo();Kr.keywordError={message:({keyword:t})=>(0,bt.str)`must pass "${t}" keyword validation`};Kr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,bt.str)`"${t}" keyword must be ${e} ($data)`:(0,bt.str)`"${t}" keyword is invalid ($data)`};function yve(t,e=Kr.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,c=JW(t,e,r);n??(a||s)?QW(o,c):YW(i,(0,bt._)`[${c}]`)}Kr.reportError=yve;function _ve(t,e=Kr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=JW(t,e,r);QW(i,s),o||a||YW(n,gn.default.vErrors)}Kr.reportExtraError=_ve;function bve(t,e){t.assign(gn.default.errors,e),t.if((0,bt._)`${gn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,bt._)`${gn.default.vErrors}.length`,e),()=>t.assign(gn.default.vErrors,null)))}Kr.resetErrorsCount=bve;function xve({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,gn.default.errors,s=>{t.const(a,(0,bt._)`${gn.default.vErrors}[${s}]`),t.if((0,bt._)`${a}.instancePath === undefined`,()=>t.assign((0,bt._)`${a}.instancePath`,(0,bt.strConcat)(gn.default.instancePath,o.errorPath))),t.assign((0,bt._)`${a}.schemaPath`,(0,bt.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,bt._)`${a}.schema`,r),t.assign((0,bt._)`${a}.data`,n))})}Kr.extendErrors=xve;function QW(t,e){let r=t.const("err",e);t.if((0,bt._)`${gn.default.vErrors} === null`,()=>t.assign(gn.default.vErrors,(0,bt._)`[${r}]`),(0,bt._)`${gn.default.vErrors}.push(${r})`),t.code((0,bt._)`${gn.default.errors}++`)}function YW(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,bt._)`new ${t.ValidationError}(${e})`):(r.assign((0,bt._)`${n}.errors`,e),r.return(!1))}var ic={keyword:new bt.Name("keyword"),schemaPath:new bt.Name("schemaPath"),params:new bt.Name("params"),propertyName:new bt.Name("propertyName"),message:new bt.Name("message"),schema:new bt.Name("schema"),parentSchema:new bt.Name("parentSchema")};function JW(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,bt._)`{}`:wve(t,e,r)}function wve(t,e,r={}){let{gen:n,it:i}=t,o=[Sve(i,r),kve(t,r)];return $ve(t,e,o),n.object(...o)}function Sve({errorPath:t},{instancePath:e}){let r=e?(0,bt.str)`${t}${(0,x_.getErrorPath)(e,x_.Type.Str)}`:t;return[gn.default.instancePath,(0,bt.strConcat)(gn.default.instancePath,r)]}function kve({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,bt.str)`${e}/${t}`;return r&&(i=(0,bt.str)`${i}${(0,x_.getErrorPath)(r,x_.Type.Str)}`),[ic.schemaPath,i]}function $ve(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:c,propertyName:l,topSchemaRef:u,schemaPath:d}=s;n.push([ic.keyword,i],[ic.params,typeof e=="function"?e(t):e||(0,bt._)`{}`]),c.messages&&n.push([ic.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([ic.schema,a],[ic.parentSchema,(0,bt._)`${u}${d}`],[gn.default.data,o]),l&&n.push([ic.propertyName,l])}});var eB=z(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.boolOrEmptySchema=cu.topBoolOrEmptySchema=void 0;var Eve=Gf(),Ive=at(),Pve=Bo(),Tve={message:"boolean schema is false"};function Ove(t){let{gen:e,schema:r,validateName:n}=t;r===!1?XW(t,!1):typeof r=="object"&&r.$async===!0?e.return(Pve.default.data):(e.assign((0,Ive._)`${n}.errors`,null),e.return(!0))}cu.topBoolOrEmptySchema=Ove;function zve(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),XW(t)):r.var(e,!0)}cu.boolOrEmptySchema=zve;function XW(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Eve.reportError)(i,Tve,void 0,e)}});var fz=z(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.getRules=lu.isJSONType=void 0;var jve=["string","number","integer","boolean","null","object","array"],Nve=new Set(jve);function Rve(t){return typeof t=="string"&&Nve.has(t)}lu.isJSONType=Rve;function Cve(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}lu.getRules=Cve});var mz=z(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.shouldUseRule=Ra.shouldUseGroup=Ra.schemaHasRulesForType=void 0;function Ave({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&tB(t,n)}Ra.schemaHasRulesForType=Ave;function tB(t,e){return e.rules.some(r=>rB(t,r))}Ra.shouldUseGroup=tB;function rB(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Ra.shouldUseRule=rB});var Kf=z(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.reportTypeError=Hr.checkDataTypes=Hr.checkDataType=Hr.coerceAndCheckDataType=Hr.getJSONTypes=Hr.getSchemaTypes=Hr.DataType=void 0;var Uve=fz(),Dve=mz(),Mve=Gf(),Qe=at(),nB=_t(),uu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(uu||(Hr.DataType=uu={}));function Lve(t){let e=iB(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Hr.getSchemaTypes=Lve;function iB(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Uve.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Hr.getJSONTypes=iB;function Zve(t,e){let{gen:r,data:n,opts:i}=t,o=qve(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,Dve.schemaHasRulesForType)(t,e[0]));if(a){let s=gz(e,n,i.strictNumbers,uu.Wrong);r.if(s,()=>{o.length?Fve(t,e,o):vz(t)})}return a}Hr.coerceAndCheckDataType=Zve;var oB=new Set(["string","number","integer","boolean","null"]);function qve(t,e){return e?t.filter(r=>oB.has(r)||e==="array"&&r==="array"):[]}function Fve(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,Qe._)`typeof ${i}`),s=n.let("coerced",(0,Qe._)`undefined`);o.coerceTypes==="array"&&n.if((0,Qe._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Qe._)`${i}[0]`).assign(a,(0,Qe._)`typeof ${i}`).if(gz(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,Qe._)`${s} !== undefined`);for(let l of r)(oB.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),vz(t),n.endIf(),n.if((0,Qe._)`${s} !== undefined`,()=>{n.assign(i,s),Vve(t,s)});function c(l){switch(l){case"string":n.elseIf((0,Qe._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Qe._)`"" + ${i}`).elseIf((0,Qe._)`${i} === null`).assign(s,(0,Qe._)`""`);return;case"number":n.elseIf((0,Qe._)`${a} == "boolean" || ${i} === null
243
+ || (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Qe._)`+${i}`);return;case"integer":n.elseIf((0,Qe._)`${a} === "boolean" || ${i} === null
244
+ || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Qe._)`+${i}`);return;case"boolean":n.elseIf((0,Qe._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Qe._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Qe._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Qe._)`${a} === "string" || ${a} === "number"
245
+ || ${a} === "boolean" || ${i} === null`).assign(s,(0,Qe._)`[${i}]`)}}}function Vve({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Qe._)`${e} !== undefined`,()=>t.assign((0,Qe._)`${e}[${r}]`,n))}function hz(t,e,r,n=uu.Correct){let i=n===uu.Correct?Qe.operators.EQ:Qe.operators.NEQ,o;switch(t){case"null":return(0,Qe._)`${e} ${i} null`;case"array":o=(0,Qe._)`Array.isArray(${e})`;break;case"object":o=(0,Qe._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Qe._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Qe._)`typeof ${e} ${i} ${t}`}return n===uu.Correct?o:(0,Qe.not)(o);function a(s=Qe.nil){return(0,Qe.and)((0,Qe._)`typeof ${e} == "number"`,s,r?(0,Qe._)`isFinite(${e})`:Qe.nil)}}Hr.checkDataType=hz;function gz(t,e,r,n){if(t.length===1)return hz(t[0],e,r,n);let i,o=(0,nB.toHash)(t);if(o.array&&o.object){let a=(0,Qe._)`typeof ${e} != "object"`;i=o.null?a:(0,Qe._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Qe.nil;o.number&&delete o.integer;for(let a in o)i=(0,Qe.and)(i,hz(a,e,r,n));return i}Hr.checkDataTypes=gz;var Wve={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Qe._)`{type: ${t}}`:(0,Qe._)`{type: ${e}}`};function vz(t){let e=Bve(t);(0,Mve.reportError)(e,Wve)}Hr.reportTypeError=vz;function Bve(t){let{gen:e,data:r,schema:n}=t,i=(0,nB.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var sB=z(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.assignDefaults=void 0;var du=at(),Gve=_t();function Kve(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)aB(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>aB(t,o,i.default))}w_.assignDefaults=Kve;function aB(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,du._)`${o}${(0,du.getProperty)(e)}`;if(i){(0,Gve.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,du._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,du._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,du._)`${s} = ${(0,du.stringify)(r)}`)}});var Si=z(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Jt=at(),yz=_t(),Ca=Bo(),Hve=_t();function Qve(t,e){let{gen:r,data:n,it:i}=t;r.if(bz(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Jt._)`${e}`},!0),t.error()})}Ct.checkReportMissingProp=Qve;function Yve({gen:t,data:e,it:{opts:r}},n,i){return(0,Jt.or)(...n.map(o=>(0,Jt.and)(bz(t,e,o,r.ownProperties),(0,Jt._)`${i} = ${o}`)))}Ct.checkMissingProp=Yve;function Jve(t,e){t.setParams({missingProperty:e},!0),t.error()}Ct.reportMissingProp=Jve;function cB(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Jt._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=cB;function _z(t,e,r){return(0,Jt._)`${cB(t)}.call(${e}, ${r})`}Ct.isOwnProperty=_z;function Xve(t,e,r,n){let i=(0,Jt._)`${e}${(0,Jt.getProperty)(r)} !== undefined`;return n?(0,Jt._)`${i} && ${_z(t,e,r)}`:i}Ct.propertyInData=Xve;function bz(t,e,r,n){let i=(0,Jt._)`${e}${(0,Jt.getProperty)(r)} === undefined`;return n?(0,Jt.or)(i,(0,Jt.not)(_z(t,e,r))):i}Ct.noPropertyInData=bz;function lB(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ct.allSchemaProperties=lB;function eye(t,e){return lB(e).filter(r=>!(0,yz.alwaysValidSchema)(t,e[r]))}Ct.schemaProperties=eye;function tye({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,c,l){let u=l?(0,Jt._)`${t}, ${e}, ${n}${i}`:e,d=[[Ca.default.instancePath,(0,Jt.strConcat)(Ca.default.instancePath,o)],[Ca.default.parentData,a.parentData],[Ca.default.parentDataProperty,a.parentDataProperty],[Ca.default.rootData,Ca.default.rootData]];a.opts.dynamicRef&&d.push([Ca.default.dynamicAnchors,Ca.default.dynamicAnchors]);let f=(0,Jt._)`${u}, ${r.object(...d)}`;return c!==Jt.nil?(0,Jt._)`${s}.call(${c}, ${f})`:(0,Jt._)`${s}(${f})`}Ct.callValidateCode=tye;var rye=(0,Jt._)`new RegExp`;function nye({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Jt._)`${i.code==="new RegExp"?rye:(0,Hve.useFunc)(t,i)}(${r}, ${n})`})}Ct.usePattern=nye;function iye(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let c=e.const("len",(0,Jt._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:yz.Type.Num},o),e.if((0,Jt.not)(o),s)})}}Ct.validateArray=iye;function oye(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,yz.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let u=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},s);e.assign(a,(0,Jt._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,Jt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}Ct.validateUnion=oye});var pB=z(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.validateKeywordUsage=ho.validSchemaType=ho.funcKeywordCode=ho.macroKeywordCode=void 0;var vn=at(),oc=Bo(),aye=Si(),sye=Gf();function cye(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),c=dB(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let l=r.name("valid");t.subschema({schema:s,schemaPath:vn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}ho.macroKeywordCode=cye;function lye(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:c}=t;dye(c,e);let l=!s&&e.compile?e.compile.call(c.self,o,a,c):e.validate,u=dB(n,i,l),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&uB(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&uB(t),g(()=>uye(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,vn._)`await `),y=>n.assign(d,!1).if((0,vn._)`${y} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,vn._)`${y}.errors`),()=>n.throw(y))),h}function m(){let h=(0,vn._)`${u}.errors`;return n.assign(h,null),v(vn.nil),h}function v(h=e.async?(0,vn._)`await `:vn.nil){let y=c.opts.passContext?oc.default.this:oc.default.self,_=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,vn._)`${h}${(0,aye.callValidateCode)(t,u,y,_)}`,e.modifying)}function g(h){var y;n.if((0,vn.not)((y=e.valid)!==null&&y!==void 0?y:d),h)}}ho.funcKeywordCode=lye;function uB(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,vn._)`${n.parentData}[${n.parentDataProperty}]`))}function uye(t,e){let{gen:r}=t;r.if((0,vn._)`Array.isArray(${e})`,()=>{r.assign(oc.default.vErrors,(0,vn._)`${oc.default.vErrors} === null ? ${e} : ${oc.default.vErrors}.concat(${e})`).assign(oc.default.errors,(0,vn._)`${oc.default.vErrors}.length`),(0,sye.extendErrors)(t)},()=>t.error())}function dye({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function dB(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,vn.stringify)(r)})}function pye(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}ho.validSchemaType=pye;function fye({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ho.validateKeywordUsage=fye});var mB=z(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.extendSubschemaMode=Aa.extendSubschemaData=Aa.getSubschema=void 0;var go=at(),fB=_t();function mye(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,go._)`${t.schemaPath}${(0,go.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,go._)`${t.schemaPath}${(0,go.getProperty)(e)}${(0,go.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,fB.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Aa.getSubschema=mye;function hye(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:l,dataPathArr:u,opts:d}=e,f=s.let("data",(0,go._)`${e.data}${(0,go.getProperty)(r)}`,!0);c(f),t.errorPath=(0,go.str)`${l}${(0,fB.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,go._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let l=i instanceof go.Name?i:s.let("data",i,!0);c(l),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Aa.extendSubschemaData=hye;function gye(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Aa.extendSubschemaMode=gye});var Hf=z((gqe,hB)=>{"use strict";hB.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var vB=z((vqe,gB)=>{"use strict";var Ua=gB.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};S_(e,n,i,t,"",t)};Ua.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ua.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ua.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ua.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function S_(t,e,r,n,i,o,a,s,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,c,l);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Ua.arrayKeywords)for(var f=0;f<d.length;f++)S_(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Ua.propsKeywords){if(d&&typeof d=="object")for(var p in d)S_(t,e,r,d[p],i+"/"+u+"/"+vye(p),o,i,u,n,p)}else(u in Ua.keywords||t.allKeys&&!(u in Ua.skipKeywords))&&S_(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,c,l)}}function vye(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qf=z(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.getSchemaRefs=jn.resolveUrl=jn.normalizeId=jn._getFullPath=jn.getFullPath=jn.inlineRef=void 0;var yye=_t(),_ye=Hf(),bye=vB(),xye=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function wye(t,e=!0){return typeof t=="boolean"?!0:e===!0?!xz(t):e?yB(t)<=e:!1}jn.inlineRef=wye;var Sye=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function xz(t){for(let e in t){if(Sye.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(xz)||typeof r=="object"&&xz(r))return!0}return!1}function yB(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!xye.has(r)&&(typeof t[r]=="object"&&(0,yye.eachItem)(t[r],n=>e+=yB(n)),e===1/0))return 1/0}return e}function _B(t,e="",r){r!==!1&&(e=pu(e));let n=t.parse(e);return bB(t,n)}jn.getFullPath=_B;function bB(t,e){return t.serialize(e).split("#")[0]+"#"}jn._getFullPath=bB;var kye=/#\/?$/;function pu(t){return t?t.replace(kye,""):""}jn.normalizeId=pu;function $ye(t,e,r){return r=pu(r),t.resolve(e,r)}jn.resolveUrl=$ye;var Eye=/^[a-z_][-a-z0-9._]*$/i;function Iye(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=pu(t[r]||e),o={"":i},a=_B(n,i,!1),s={},c=new Set;return bye(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=a+f,g=o[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),y.call(this,d.$anchor),y.call(this,d.$dynamicAnchor),o[f]=g;function h(_){let b=this.opts.uriResolver.resolve;if(_=pu(g?b(g,_):_),c.has(_))throw u(_);c.add(_);let x=this.refs[_];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?l(d,x.schema,_):_!==pu(v)&&(_[0]==="#"?(l(d,s[_],_),s[_]=d):this.refs[_]=v),_}function y(_){if(typeof _=="string"){if(!Eye.test(_))throw new Error(`invalid anchor "${_}"`);h.call(this,`#${_}`)}}}),s;function l(d,f,p){if(f!==void 0&&!_ye(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}jn.getSchemaRefs=Iye});var Xf=z(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.getData=Da.KeywordCxt=Da.validateFunctionCode=void 0;var $B=eB(),xB=Kf(),Sz=mz(),k_=Kf(),Pye=sB(),Jf=pB(),wz=mB(),$e=at(),Me=Bo(),Tye=Qf(),Go=_t(),Yf=Gf();function Oye(t){if(PB(t)&&(TB(t),IB(t))){Nye(t);return}EB(t,()=>(0,$B.topBoolOrEmptySchema)(t))}Da.validateFunctionCode=Oye;function EB({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,$e._)`${Me.default.data}, ${Me.default.valCxt}`,n.$async,()=>{t.code((0,$e._)`"use strict"; ${wB(r,i)}`),jye(t,i),t.code(o)}):t.func(e,(0,$e._)`${Me.default.data}, ${zye(i)}`,n.$async,()=>t.code(wB(r,i)).code(o))}function zye(t){return(0,$e._)`{${Me.default.instancePath}="", ${Me.default.parentData}, ${Me.default.parentDataProperty}, ${Me.default.rootData}=${Me.default.data}${t.dynamicRef?(0,$e._)`, ${Me.default.dynamicAnchors}={}`:$e.nil}}={}`}function jye(t,e){t.if(Me.default.valCxt,()=>{t.var(Me.default.instancePath,(0,$e._)`${Me.default.valCxt}.${Me.default.instancePath}`),t.var(Me.default.parentData,(0,$e._)`${Me.default.valCxt}.${Me.default.parentData}`),t.var(Me.default.parentDataProperty,(0,$e._)`${Me.default.valCxt}.${Me.default.parentDataProperty}`),t.var(Me.default.rootData,(0,$e._)`${Me.default.valCxt}.${Me.default.rootData}`),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,$e._)`${Me.default.valCxt}.${Me.default.dynamicAnchors}`)},()=>{t.var(Me.default.instancePath,(0,$e._)`""`),t.var(Me.default.parentData,(0,$e._)`undefined`),t.var(Me.default.parentDataProperty,(0,$e._)`undefined`),t.var(Me.default.rootData,Me.default.data),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,$e._)`{}`)})}function Nye(t){let{schema:e,opts:r,gen:n}=t;EB(t,()=>{r.$comment&&e.$comment&&zB(t),Dye(t),n.let(Me.default.vErrors,null),n.let(Me.default.errors,0),r.unevaluated&&Rye(t),OB(t),Zye(t)})}function Rye(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,$e._)`${r}.evaluated`),e.if((0,$e._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,$e._)`${t.evaluated}.props`,(0,$e._)`undefined`)),e.if((0,$e._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,$e._)`${t.evaluated}.items`,(0,$e._)`undefined`))}function wB(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,$e._)`/*# sourceURL=${r} */`:$e.nil}function Cye(t,e){if(PB(t)&&(TB(t),IB(t))){Aye(t,e);return}(0,$B.boolOrEmptySchema)(t,e)}function IB({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function PB(t){return typeof t.schema!="boolean"}function Aye(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&zB(t),Mye(t),Lye(t);let o=n.const("_errs",Me.default.errors);OB(t,o),n.var(e,(0,$e._)`${o} === ${Me.default.errors}`)}function TB(t){(0,Go.checkUnknownRules)(t),Uye(t)}function OB(t,e){if(t.opts.jtd)return SB(t,[],!1,e);let r=(0,xB.getSchemaTypes)(t.schema),n=(0,xB.coerceAndCheckDataType)(t,r);SB(t,r,!n,e)}function Uye(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Go.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Dye(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Go.checkStrictMode)(t,"default is ignored in the schema root")}function Mye(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Tye.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Lye(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function zB({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,$e._)`${Me.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,$e.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,$e._)`${Me.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function Zye(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,$e._)`${Me.default.errors} === 0`,()=>e.return(Me.default.data),()=>e.throw((0,$e._)`new ${i}(${Me.default.vErrors})`)):(e.assign((0,$e._)`${n}.errors`,Me.default.vErrors),o.unevaluated&&qye(t),e.return((0,$e._)`${Me.default.errors} === 0`))}function qye({gen:t,evaluated:e,props:r,items:n}){r instanceof $e.Name&&t.assign((0,$e._)`${e}.props`,r),n instanceof $e.Name&&t.assign((0,$e._)`${e}.items`,n)}function SB(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:c,self:l}=t,{RULES:u}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Go.schemaHasRulesButRef)(o,u))){i.block(()=>NB(t,"$ref",u.all.$ref.definition));return}c.jtd||Fye(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,Sz.shouldUseGroup)(o,f)&&(f.type?(i.if((0,k_.checkDataType)(f.type,a,c.strictNumbers)),kB(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,k_.reportTypeError)(t)),i.endIf()):kB(t,f),s||i.if((0,$e._)`${Me.default.errors} === ${n||0}`))}}function kB(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Pye.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Sz.shouldUseRule)(n,o)&&NB(t,o.keyword,o.definition,e.type)})}function Fye(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Vye(t,e),t.opts.allowUnionTypes||Wye(t,e),Bye(t,t.dataTypes))}function Vye(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{jB(t.dataTypes,r)||kz(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Kye(t,e)}}function Wye(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&kz(t,"use allowUnionTypes to allow union type keyword")}function Bye(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Sz.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>Gye(e,a))&&kz(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function Gye(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function jB(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Kye(t,e){let r=[];for(let n of t.dataTypes)jB(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function kz(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Go.checkStrictMode)(t,e,t.opts.strictTypes)}var $_=class{constructor(e,r,n){if((0,Jf.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Go.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",RB(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Jf.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Me.default.errors))}result(e,r,n){this.failResult((0,$e.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,$e.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,$e._)`${r} !== undefined && (${(0,$e.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Yf.reportExtraError:Yf.reportError)(this,this.def.error,r)}$dataError(){(0,Yf.reportError)(this,this.def.$dataError||Yf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Yf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=$e.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=$e.nil,r=$e.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,$e.or)((0,$e._)`${i} === undefined`,r)),e!==$e.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==$e.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,$e.or)(a(),s());function a(){if(n.length){if(!(r instanceof $e.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,$e._)`${(0,k_.checkDataTypes)(c,r,o.opts.strictNumbers,k_.DataType.Wrong)}`}return $e.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,$e._)`!${c}(${r})`}return $e.nil}}subschema(e,r){let n=(0,wz.getSubschema)(this.it,e);(0,wz.extendSubschemaData)(n,this.it,e),(0,wz.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Cye(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Go.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Go.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,$e.Name)),!0}};Da.KeywordCxt=$_;function NB(t,e,r,n){let i=new $_(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Jf.funcKeywordCode)(i,r):"macro"in r?(0,Jf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Jf.funcKeywordCode)(i,r)}var Hye=/^\/(?:[^~]|~0|~1)*$/,Qye=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function RB(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Me.default.rootData;if(t[0]==="/"){if(!Hye.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Me.default.rootData}else{let l=Qye.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+l[1];if(i=l[2],i==="#"){if(u>=e)throw new Error(c("property/index",u));return n[e-u]}if(u>e)throw new Error(c("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let l of s)l&&(o=(0,$e._)`${o}${(0,$e.getProperty)((0,Go.unescapeJsonPointer)(l))}`,a=(0,$e._)`${a} && ${o}`);return a;function c(l,u){return`Cannot access ${l} ${u} levels up, current level is ${e}`}}Da.getData=RB});var E_=z(Ez=>{"use strict";Object.defineProperty(Ez,"__esModule",{value:!0});var $z=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Ez.default=$z});var em=z(Tz=>{"use strict";Object.defineProperty(Tz,"__esModule",{value:!0});var Iz=Qf(),Pz=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Iz.resolveUrl)(e,r,n),this.missingSchema=(0,Iz.normalizeId)((0,Iz.getFullPath)(e,this.missingRef))}};Tz.default=Pz});var P_=z(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.resolveSchema=ki.getCompilingSchema=ki.resolveRef=ki.compileSchema=ki.SchemaEnv=void 0;var Hi=at(),Yye=E_(),ac=Bo(),Qi=Qf(),CB=_t(),Jye=Xf(),fu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Qi.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ki.SchemaEnv=fu;function zz(t){let e=AB.call(this,t);if(e)return e;let r=(0,Qi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Hi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:Yye.default,code:(0,Hi._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:ac.default.data,parentData:ac.default.parentData,parentDataProperty:ac.default.parentDataProperty,dataNames:[ac.default.data],dataPathArr:[Hi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Hi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Hi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Hi._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,Jye.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(ac.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${ac.default.self}`,`${ac.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:v}=l;p.evaluated={props:m instanceof Hi.Name?void 0:m,items:v instanceof Hi.Name?void 0:v,dynamicProps:m instanceof Hi.Name,dynamicItems:v instanceof Hi.Name},p.source&&(p.source.evaluated=(0,Hi.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}ki.compileSchema=zz;function Xye(t,e,r){var n;r=(0,Qi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=r_e.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new fu({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=e_e.call(this,o)}ki.resolveRef=Xye;function e_e(t){return(0,Qi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:zz.call(this,t)}function AB(t){for(let e of this._compilations)if(t_e(e,t))return e}ki.getCompilingSchema=AB;function t_e(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function r_e(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||I_.call(this,t,e)}function I_(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Qi._getFullPath)(this.opts.uriResolver,r),i=(0,Qi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Oz.call(this,r,t);let o=(0,Qi.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=I_.call(this,t,a);return typeof s?.schema!="object"?void 0:Oz.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||zz.call(this,a),o===(0,Qi.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];return l&&(i=(0,Qi.resolveUrl)(this.opts.uriResolver,i,l)),new fu({schema:s,schemaId:c,root:t,baseId:i})}return Oz.call(this,r,a)}}ki.resolveSchema=I_;var n_e=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Oz(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,CB.unescapeFragment)(s)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!n_e.has(s)&&l&&(e=(0,Qi.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,CB.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Qi.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=I_.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new fu({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var UB=z((Sqe,i_e)=>{i_e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Nz=z((kqe,ZB)=>{"use strict";var o_e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),MB=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function jz(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var a_e=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function DB(t){return t.length=0,!0}function s_e(t,e,r){if(t.length){let n=jz(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function c_e(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,s=s_e;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(a=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(l==="%"){if(!s(i,n,r))break;s=DB}else{i.push(l);continue}}return i.length&&(s===DB?r.zone=i.join(""):a?n.push(i.join("")):n.push(jz(i))),r.address=n.join(""),r}function LB(t){if(l_e(t,":")<2)return{host:t,isIPV6:!1};let e=c_e(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function l_e(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function u_e(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function d_e(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function p_e(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!MB(r)){let n=LB(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}ZB.exports={nonSimpleDomain:a_e,recomposeAuthority:p_e,normalizeComponentEncoding:d_e,removeDotSegments:u_e,isIPv4:MB,isUUID:o_e,normalizeIPv6:LB,stringArrayToHexStripped:jz}});var BB=z(($qe,WB)=>{"use strict";var{isUUID:f_e}=Nz(),m_e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,h_e=["http","https","ws","wss","urn","urn:uuid"];function g_e(t){return h_e.indexOf(t)!==-1}function Rz(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function qB(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function FB(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function v_e(t){return t.secure=Rz(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function y_e(t){if((t.port===(Rz(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function __e(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(m_e);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=Cz(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function b_e(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=Cz(i);o&&(t=o.serialize(t,e));let a=t,s=t.nss;return a.path=`${n||e.nid}:${s}`,e.skipEscape=!0,a}function x_e(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!f_e(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function w_e(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var VB={scheme:"http",domainHost:!0,parse:qB,serialize:FB},S_e={scheme:"https",domainHost:VB.domainHost,parse:qB,serialize:FB},T_={scheme:"ws",domainHost:!0,parse:v_e,serialize:y_e},k_e={scheme:"wss",domainHost:T_.domainHost,parse:T_.parse,serialize:T_.serialize},$_e={scheme:"urn",parse:__e,serialize:b_e,skipNormalize:!0},E_e={scheme:"urn:uuid",parse:x_e,serialize:w_e,skipNormalize:!0},O_={http:VB,https:S_e,ws:T_,wss:k_e,urn:$_e,"urn:uuid":E_e};Object.setPrototypeOf(O_,null);function Cz(t){return t&&(O_[t]||O_[t.toLowerCase()])||void 0}WB.exports={wsIsSecure:Rz,SCHEMES:O_,isValidSchemeName:g_e,getSchemeHandler:Cz}});var Uz=z((Eqe,j_)=>{"use strict";var{normalizeIPv6:I_e,removeDotSegments:tm,recomposeAuthority:P_e,normalizeComponentEncoding:z_,isIPv4:T_e,nonSimpleDomain:O_e}=Nz(),{SCHEMES:z_e,getSchemeHandler:GB}=BB();function j_e(t,e){return typeof t=="string"?t=vo(Ko(t,e),e):typeof t=="object"&&(t=Ko(vo(t,e),e)),t}function N_e(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=KB(Ko(t,n),Ko(e,n),n,!0);return n.skipEscape=!0,vo(i,n)}function KB(t,e,r,n){let i={};return n||(t=Ko(vo(t,r),r),e=Ko(vo(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=tm(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=tm(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=tm(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=tm(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function R_e(t,e,r){return typeof t=="string"?(t=unescape(t),t=vo(z_(Ko(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=vo(z_(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=vo(z_(Ko(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=vo(z_(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function vo(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=GB(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=P_e(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(s=tm(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),i.push(s)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var C_e=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Ko(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(C_e);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host)if(T_e(n.host)===!1){let c=I_e(n.host);n.host=c.host.toLowerCase(),i=c.isIPV6}else i=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=GB(r.scheme||n.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&i===!1&&O_e(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Az={SCHEMES:z_e,normalize:j_e,resolve:N_e,resolveComponent:KB,equal:R_e,serialize:vo,parse:Ko};j_.exports=Az;j_.exports.default=Az;j_.exports.fastUri=Az});var QB=z(Dz=>{"use strict";Object.defineProperty(Dz,"__esModule",{value:!0});var HB=Uz();HB.code='require("ajv/dist/runtime/uri").default';Dz.default=HB});var i3=z(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.CodeGen=Ar.Name=Ar.nil=Ar.stringify=Ar.str=Ar._=Ar.KeywordCxt=void 0;var A_e=Xf();Object.defineProperty(Ar,"KeywordCxt",{enumerable:!0,get:function(){return A_e.KeywordCxt}});var mu=at();Object.defineProperty(Ar,"_",{enumerable:!0,get:function(){return mu._}});Object.defineProperty(Ar,"str",{enumerable:!0,get:function(){return mu.str}});Object.defineProperty(Ar,"stringify",{enumerable:!0,get:function(){return mu.stringify}});Object.defineProperty(Ar,"nil",{enumerable:!0,get:function(){return mu.nil}});Object.defineProperty(Ar,"Name",{enumerable:!0,get:function(){return mu.Name}});Object.defineProperty(Ar,"CodeGen",{enumerable:!0,get:function(){return mu.CodeGen}});var U_e=E_(),t3=em(),D_e=fz(),rm=P_(),M_e=at(),nm=Qf(),N_=Kf(),Lz=_t(),YB=UB(),L_e=QB(),r3=(t,e)=>new RegExp(t,e);r3.code="new RegExp";var Z_e=["removeAdditional","useDefaults","coerceTypes"],q_e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),F_e={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},V_e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},JB=200;function W_e(t){var e,r,n,i,o,a,s,c,l,u,d,f,p,m,v,g,h,y,_,b,x,w,S,$,T;let A=t.strict,I=(e=t.code)===null||e===void 0?void 0:e.optimize,U=I===!0||I===void 0?1:I||0,L=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:r3,N=(i=t.uriResolver)!==null&&i!==void 0?i:L_e.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:A)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:A)!==null&&c!==void 0?c:!0,strictTypes:(u=(l=t.strictTypes)!==null&&l!==void 0?l:A)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:U,regExp:L}:{optimize:U,regExp:L},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:JB,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:JB,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(y=t.messages)!==null&&y!==void 0?y:!0,inlineRefs:(_=t.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(b=t.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(S=t.validateFormats)!==null&&S!==void 0?S:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:N}}var im=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...W_e(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new M_e.ValueScope({scope:{},prefixes:q_e,es5:r,lines:n}),this.logger=Y_e(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,D_e.getRules)(),XB.call(this,F_e,e,"NOT SUPPORTED"),XB.call(this,V_e,e,"DEPRECATED","warn"),this._metaOpts=H_e.call(this),e.formats&&G_e.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&K_e.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),B_e.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=YB;n==="id"&&(i={...YB},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof t3.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function c(u){let d=await l.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function l(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,nm.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=e3.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new rm.SchemaEnv({schema:{},schemaId:n});if(r=rm.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=e3.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,nm.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X_e.call(this,n,r),!r)return(0,Lz.eachItem)(n,o=>Mz.call(this,o)),this;tbe.call(this,r);let i={...r,type:(0,N_.getJSONTypes)(r.type),schemaType:(0,N_.getJSONTypes)(r.schemaType)};return(0,Lz.eachItem)(n,i.type.length===0?o=>Mz.call(this,o,i):o=>i.type.forEach(a=>Mz.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:l}=c.definition,u=a[s];l&&u&&(a[s]=n3(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,nm.normalizeId)(a||n);let l=nm.getSchemaRefs.call(this,e,n);return c=new rm.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):rm.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{rm.compileSchema.call(this,e)}finally{this.opts=r}}};im.ValidationError=U_e.default;im.MissingRefError=t3.default;Ar.default=im;function XB(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function e3(t){return t=(0,nm.normalizeId)(t),this.schemas[t]||this.refs[t]}function B_e(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function G_e(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function K_e(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function H_e(){let t={...this.opts};for(let e of Z_e)delete t[e];return t}var Q_e={log(){},warn(){},error(){}};function Y_e(t){if(t===!1)return Q_e;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var J_e=/^[a-z_$][a-z0-9_$:-]*$/i;function X_e(t,e){let{RULES:r}=this;if((0,Lz.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!J_e.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Mz(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,N_.getJSONTypes)(e.type),schemaType:(0,N_.getJSONTypes)(e.schemaType)}};e.before?ebe.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function ebe(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function tbe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=n3(e)),t.validateSchema=this.compile(e,!0))}var rbe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function n3(t){return{anyOf:[t,rbe]}}});var o3=z(Zz=>{"use strict";Object.defineProperty(Zz,"__esModule",{value:!0});var nbe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Zz.default=nbe});var l3=z(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.callRef=sc.getValidate=void 0;var ibe=em(),a3=Si(),Nn=at(),hu=Bo(),s3=P_(),R_=_t(),obe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let u=s3.resolveRef.call(c,l,i,r);if(u===void 0)throw new ibe.default(n.opts.uriResolver,i,r);if(u instanceof s3.SchemaEnv)return f(u);return p(u);function d(){if(o===l)return C_(t,a,o,o.$async);let m=e.scopeValue("root",{ref:l});return C_(t,(0,Nn._)`${m}.validate`,l,l.$async)}function f(m){let v=c3(t,m);C_(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,Nn.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:Nn.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function c3(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Nn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}sc.getValidate=c3;function C_(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:c}=o,l=c.passContext?hu.default.this:Nn.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Nn._)`await ${(0,a3.callValidateCode)(t,e,l)}`),p(e),a||i.assign(m,!0)},v=>{i.if((0,Nn._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),f(v),a||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,a3.callValidateCode)(t,e,l),()=>p(e),()=>f(e))}function f(m){let v=(0,Nn._)`${m}.errors`;i.assign(hu.default.vErrors,(0,Nn._)`${hu.default.vErrors} === null ? ${v} : ${hu.default.vErrors}.concat(${v})`),i.assign(hu.default.errors,(0,Nn._)`${hu.default.vErrors}.length`)}function p(m){var v;if(!o.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=R_.mergeEvaluated.props(i,g.props,o.props));else{let h=i.var("props",(0,Nn._)`${m}.evaluated.props`);o.props=R_.mergeEvaluated.props(i,h,o.props,Nn.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=R_.mergeEvaluated.items(i,g.items,o.items));else{let h=i.var("items",(0,Nn._)`${m}.evaluated.items`);o.items=R_.mergeEvaluated.items(i,h,o.items,Nn.Name)}}}sc.callRef=C_;sc.default=obe});var u3=z(qz=>{"use strict";Object.defineProperty(qz,"__esModule",{value:!0});var abe=o3(),sbe=l3(),cbe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",abe.default,sbe.default];qz.default=cbe});var d3=z(Fz=>{"use strict";Object.defineProperty(Fz,"__esModule",{value:!0});var A_=at(),Ma=A_.operators,U_={maximum:{okStr:"<=",ok:Ma.LTE,fail:Ma.GT},minimum:{okStr:">=",ok:Ma.GTE,fail:Ma.LT},exclusiveMaximum:{okStr:"<",ok:Ma.LT,fail:Ma.GTE},exclusiveMinimum:{okStr:">",ok:Ma.GT,fail:Ma.LTE}},lbe={message:({keyword:t,schemaCode:e})=>(0,A_.str)`must be ${U_[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,A_._)`{comparison: ${U_[t].okStr}, limit: ${e}}`},ube={keyword:Object.keys(U_),type:"number",schemaType:"number",$data:!0,error:lbe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,A_._)`${r} ${U_[e].fail} ${n} || isNaN(${r})`)}};Fz.default=ube});var p3=z(Vz=>{"use strict";Object.defineProperty(Vz,"__esModule",{value:!0});var om=at(),dbe={message:({schemaCode:t})=>(0,om.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,om._)`{multipleOf: ${t}}`},pbe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:dbe,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,om._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,om._)`${a} !== parseInt(${a})`;t.fail$data((0,om._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};Vz.default=pbe});var m3=z(Wz=>{"use strict";Object.defineProperty(Wz,"__esModule",{value:!0});function f3(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Wz.default=f3;f3.code='require("ajv/dist/runtime/ucs2length").default'});var h3=z(Bz=>{"use strict";Object.defineProperty(Bz,"__esModule",{value:!0});var cc=at(),fbe=_t(),mbe=m3(),hbe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,cc.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,cc._)`{limit: ${t}}`},gbe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:hbe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?cc.operators.GT:cc.operators.LT,a=i.opts.unicode===!1?(0,cc._)`${r}.length`:(0,cc._)`${(0,fbe.useFunc)(t.gen,mbe.default)}(${r})`;t.fail$data((0,cc._)`${a} ${o} ${n}`)}};Bz.default=gbe});var g3=z(Gz=>{"use strict";Object.defineProperty(Gz,"__esModule",{value:!0});var vbe=Si(),ybe=_t(),gu=at(),_be={message:({schemaCode:t})=>(0,gu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,gu._)`{pattern: ${t}}`},bbe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:_be,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?(0,gu._)`new RegExp`:(0,ybe.useFunc)(e,c),u=e.let("valid");e.try(()=>e.assign(u,(0,gu._)`${l}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,gu._)`!${u}`)}else{let c=(0,vbe.usePattern)(t,i);t.fail$data((0,gu._)`!${c}.test(${r})`)}}};Gz.default=bbe});var v3=z(Kz=>{"use strict";Object.defineProperty(Kz,"__esModule",{value:!0});var am=at(),xbe={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,am.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,am._)`{limit: ${t}}`},wbe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:xbe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?am.operators.GT:am.operators.LT;t.fail$data((0,am._)`Object.keys(${r}).length ${i} ${n}`)}};Kz.default=wbe});var y3=z(Hz=>{"use strict";Object.defineProperty(Hz,"__esModule",{value:!0});var sm=Si(),cm=at(),Sbe=_t(),kbe={message:({params:{missingProperty:t}})=>(0,cm.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,cm._)`{missingProperty: ${t}}`},$be={keyword:"required",type:"object",schemaType:"array",$data:!0,error:kbe,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?l():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=a.schemaEnv.baseId+a.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,Sbe.checkStrictMode)(a,h,a.opts.strictRequired)}}function l(){if(c||o)t.block$data(cm.nil,d);else for(let p of r)(0,sm.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(c||o){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,sm.checkMissingProp)(t,r,p)),(0,sm.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,sm.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,sm.propertyInData)(e,i,p,s.ownProperties)),e.if((0,cm.not)(m),()=>{t.error(),e.break()})},cm.nil)}}};Hz.default=$be});var _3=z(Qz=>{"use strict";Object.defineProperty(Qz,"__esModule",{value:!0});var lm=at(),Ebe={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,lm.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,lm._)`{limit: ${t}}`},Ibe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Ebe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?lm.operators.GT:lm.operators.LT;t.fail$data((0,lm._)`${r}.length ${i} ${n}`)}};Qz.default=Ibe});var D_=z(Yz=>{"use strict";Object.defineProperty(Yz,"__esModule",{value:!0});var b3=Hf();b3.code='require("ajv/dist/runtime/equal").default';Yz.default=b3});var x3=z(Xz=>{"use strict";Object.defineProperty(Xz,"__esModule",{value:!0});var Jz=Kf(),Ur=at(),Pbe=_t(),Tbe=D_(),Obe={message:({params:{i:t,j:e}})=>(0,Ur.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ur._)`{i: ${t}, j: ${e}}`},zbe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Obe,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,Jz.getSchemaTypes)(o.items):[];t.block$data(c,u,(0,Ur._)`${a} === false`),t.ok(c);function u(){let m=e.let("i",(0,Ur._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Ur._)`${m} > 1`,()=>(d()?f:p)(m,v))}function d(){return l.length>0&&!l.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,Jz.checkDataTypes)(l,g,s.opts.strictNumbers,Jz.DataType.Wrong),y=e.const("indices",(0,Ur._)`{}`);e.for((0,Ur._)`;${m}--;`,()=>{e.let(g,(0,Ur._)`${r}[${m}]`),e.if(h,(0,Ur._)`continue`),l.length>1&&e.if((0,Ur._)`typeof ${g} == "string"`,(0,Ur._)`${g} += "_"`),e.if((0,Ur._)`typeof ${y}[${g}] == "number"`,()=>{e.assign(v,(0,Ur._)`${y}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Ur._)`${y}[${g}] = ${m}`)})}function p(m,v){let g=(0,Pbe.useFunc)(e,Tbe.default),h=e.name("outer");e.label(h).for((0,Ur._)`;${m}--;`,()=>e.for((0,Ur._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Ur._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};Xz.default=zbe});var w3=z(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});var ej=at(),jbe=_t(),Nbe=D_(),Rbe={message:"must be equal to constant",params:({schemaCode:t})=>(0,ej._)`{allowedValue: ${t}}`},Cbe={keyword:"const",$data:!0,error:Rbe,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,ej._)`!${(0,jbe.useFunc)(e,Nbe.default)}(${r}, ${i})`):t.fail((0,ej._)`${o} !== ${r}`)}};tj.default=Cbe});var S3=z(rj=>{"use strict";Object.defineProperty(rj,"__esModule",{value:!0});var um=at(),Abe=_t(),Ube=D_(),Dbe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,um._)`{allowedValues: ${t}}`},Mbe={keyword:"enum",schemaType:"array",$data:!0,error:Dbe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,c,l=()=>c??(c=(0,Abe.useFunc)(e,Ube.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,um.or)(...i.map((m,v)=>f(p,v)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,um._)`${l()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,um._)`${l()}(${r}, ${p}[${m}])`:(0,um._)`${r} === ${v}`}}};rj.default=Mbe});var k3=z(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var Lbe=d3(),Zbe=p3(),qbe=h3(),Fbe=g3(),Vbe=v3(),Wbe=y3(),Bbe=_3(),Gbe=x3(),Kbe=w3(),Hbe=S3(),Qbe=[Lbe.default,Zbe.default,qbe.default,Fbe.default,Vbe.default,Wbe.default,Bbe.default,Gbe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Kbe.default,Hbe.default];nj.default=Qbe});var oj=z(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.validateAdditionalItems=void 0;var lc=at(),ij=_t(),Ybe={message:({params:{len:t}})=>(0,lc.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,lc._)`{limit: ${t}}`},Jbe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ybe,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,ij.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}$3(t,n)}};function $3(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,lc._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,lc._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,ij.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,lc._)`${s} <= ${e.length}`);r.if((0,lc.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:ij.Type.Num},l),a.allErrors||r.if((0,lc.not)(l),()=>r.break())})}}dm.validateAdditionalItems=$3;dm.default=Jbe});var aj=z(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.validateTuple=void 0;var E3=at(),M_=_t(),Xbe=Si(),exe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return I3(t,"additionalItems",e);r.items=!0,!(0,M_.alwaysValidSchema)(r,e)&&t.ok((0,Xbe.validateArray)(t))}};function I3(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=M_.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),l=n.const("len",(0,E3._)`${o}.length`);r.forEach((d,f)=>{(0,M_.alwaysValidSchema)(s,d)||(n.if((0,E3._)`${l} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},c)),t.ok(c))});function u(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,M_.checkStrictMode)(s,g,f.strictTuples)}}}pm.validateTuple=I3;pm.default=exe});var P3=z(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var txe=aj(),rxe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,txe.validateTuple)(t,"items")};sj.default=rxe});var O3=z(cj=>{"use strict";Object.defineProperty(cj,"__esModule",{value:!0});var T3=at(),nxe=_t(),ixe=Si(),oxe=oj(),axe={message:({params:{len:t}})=>(0,T3.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,T3._)`{limit: ${t}}`},sxe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:axe,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,nxe.alwaysValidSchema)(n,e)&&(i?(0,oxe.validateAdditionalItems)(t,i):t.ok((0,ixe.validateArray)(t)))}};cj.default=sxe});var z3=z(lj=>{"use strict";Object.defineProperty(lj,"__esModule",{value:!0});var $i=at(),L_=_t(),cxe={message:({params:{min:t,max:e}})=>e===void 0?(0,$i.str)`must contain at least ${t} valid item(s)`:(0,$i.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,$i._)`{minContains: ${t}}`:(0,$i._)`{minContains: ${t}, maxContains: ${e}}`},lxe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:cxe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,s=l):a=1;let u=e.const("len",(0,$i._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,L_.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,L_.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,L_.alwaysValidSchema)(o,r)){let v=(0,$i._)`${u} >= ${a}`;s!==void 0&&(v=(0,$i._)`${v} && ${u} <= ${s}`),t.pass(v);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,$i._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,u,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:L_.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,$i._)`${v}++`),s===void 0?e.if((0,$i._)`${v} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,$i._)`${v} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,$i._)`${v} >= ${a}`,()=>e.assign(d,!0)))}}};lj.default=lxe});var R3=z(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.validateSchemaDeps=yo.validatePropertyDeps=yo.error=void 0;var uj=at(),uxe=_t(),fm=Si();yo.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,uj.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,uj._)`{property: ${t},
246
+ missingProperty: ${n},
247
+ depsCount: ${e},
248
+ deps: ${r}}`};var dxe={keyword:"dependencies",type:"object",schemaType:"object",error:yo.error,code(t){let[e,r]=pxe(t);j3(t,e),N3(t,r)}};function pxe({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function j3(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,fm.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of s)(0,fm.checkReportMissingProp)(t,l)}):(r.if((0,uj._)`${c} && (${(0,fm.checkMissingProp)(t,s,o)})`),(0,fm.reportMissingProp)(t,o),r.else())}}yo.validatePropertyDeps=j3;function N3(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,uxe.alwaysValidSchema)(o,e[s])||(r.if((0,fm.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}yo.validateSchemaDeps=N3;yo.default=dxe});var A3=z(dj=>{"use strict";Object.defineProperty(dj,"__esModule",{value:!0});var C3=at(),fxe=_t(),mxe={message:"property name must be valid",params:({params:t})=>(0,C3._)`{propertyName: ${t.propertyName}}`},hxe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mxe,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,fxe.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,C3.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};dj.default=hxe});var fj=z(pj=>{"use strict";Object.defineProperty(pj,"__esModule",{value:!0});var Z_=Si(),Yi=at(),gxe=Bo(),q_=_t(),vxe={message:"must NOT have additional properties",params:({params:t})=>(0,Yi._)`{additionalProperty: ${t.additionalProperty}}`},yxe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:vxe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,q_.alwaysValidSchema)(a,r))return;let l=(0,Z_.allSchemaProperties)(n.properties),u=(0,Z_.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Yi._)`${o} === ${gxe.default.errors}`);function d(){e.forIn("key",i,g=>{!l.length&&!u.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(l.length>8){let y=(0,q_.schemaRefOrVal)(a,n.properties,"properties");h=(0,Z_.isOwnProperty)(e,y,g)}else l.length?h=(0,Yi.or)(...l.map(y=>(0,Yi._)`${g} === ${y}`)):h=Yi.nil;return u.length&&(h=(0,Yi.or)(h,...u.map(y=>(0,Yi._)`${(0,Z_.usePattern)(t,y)}.test(${g})`))),(0,Yi.not)(h)}function p(g){e.code((0,Yi._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,q_.alwaysValidSchema)(a,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Yi.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,Yi.not)(h),()=>e.break()))}}function v(g,h,y){let _={keyword:"additionalProperties",dataProp:g,dataPropType:q_.Type.Str};y===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(_,h)}}};pj.default=yxe});var M3=z(hj=>{"use strict";Object.defineProperty(hj,"__esModule",{value:!0});var _xe=Xf(),U3=Si(),mj=_t(),D3=fj(),bxe={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&D3.default.code(new _xe.KeywordCxt(o,D3.default,"additionalProperties"));let a=(0,U3.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=mj.mergeEvaluated.props(e,(0,mj.toHash)(a),o.props));let s=a.filter(d=>!(0,mj.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)l(d)?u(d):(e.if((0,U3.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};hj.default=bxe});var F3=z(gj=>{"use strict";Object.defineProperty(gj,"__esModule",{value:!0});var L3=Si(),F_=at(),Z3=_t(),q3=_t(),xxe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,L3.allSchemaProperties)(r),c=s.filter(v=>(0,Z3.alwaysValidSchema)(o,r[v]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof F_.Name)&&(o.props=(0,q3.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let v of s)l&&p(v),o.allErrors?m(v):(e.var(u,!0),m(v),e.if(u))}function p(v){for(let g in l)new RegExp(v).test(g)&&(0,Z3.checkStrictMode)(o,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,F_._)`${(0,L3.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:q3.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,F_._)`${d}[${g}]`,!0):!h&&!o.allErrors&&e.if((0,F_.not)(u),()=>e.break())})})}}};gj.default=xxe});var V3=z(vj=>{"use strict";Object.defineProperty(vj,"__esModule",{value:!0});var wxe=_t(),Sxe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,wxe.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};vj.default=Sxe});var W3=z(yj=>{"use strict";Object.defineProperty(yj,"__esModule",{value:!0});var kxe=Si(),$xe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kxe.validateUnion,error:{message:"must match a schema in anyOf"}};yj.default=$xe});var B3=z(_j=>{"use strict";Object.defineProperty(_j,"__esModule",{value:!0});var V_=at(),Exe=_t(),Ixe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,V_._)`{passingSchemas: ${t.passing}}`},Pxe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Ixe,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(l),t.result(a,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((u,d)=>{let f;(0,Exe.alwaysValidSchema)(i,u)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,V_._)`${c} && ${a}`).assign(a,!1).assign(s,(0,V_._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,V_.Name)})})}}};_j.default=Pxe});var G3=z(bj=>{"use strict";Object.defineProperty(bj,"__esModule",{value:!0});var Txe=_t(),Oxe={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,Txe.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};bj.default=Oxe});var Q3=z(xj=>{"use strict";Object.defineProperty(xj,"__esModule",{value:!0});var W_=at(),H3=_t(),zxe={message:({params:t})=>(0,W_.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,W_._)`{failingKeyword: ${t.ifClause}}`},jxe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:zxe,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,H3.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=K3(n,"then"),o=K3(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,l("then",u),l("else",u))}else i?e.if(s,l("then")):e.if((0,W_.not)(s),l("else"));t.pass(a,()=>t.error(!0));function c(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function l(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,W_._)`${u}`):t.setParams({ifClause:u})}}}};function K3(t,e){let r=t.schema[e];return r!==void 0&&!(0,H3.alwaysValidSchema)(t,r)}xj.default=jxe});var Y3=z(wj=>{"use strict";Object.defineProperty(wj,"__esModule",{value:!0});var Nxe=_t(),Rxe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Nxe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};wj.default=Rxe});var J3=z(Sj=>{"use strict";Object.defineProperty(Sj,"__esModule",{value:!0});var Cxe=oj(),Axe=P3(),Uxe=aj(),Dxe=O3(),Mxe=z3(),Lxe=R3(),Zxe=A3(),qxe=fj(),Fxe=M3(),Vxe=F3(),Wxe=V3(),Bxe=W3(),Gxe=B3(),Kxe=G3(),Hxe=Q3(),Qxe=Y3();function Yxe(t=!1){let e=[Wxe.default,Bxe.default,Gxe.default,Kxe.default,Hxe.default,Qxe.default,Zxe.default,qxe.default,Lxe.default,Fxe.default,Vxe.default];return t?e.push(Axe.default,Dxe.default):e.push(Cxe.default,Uxe.default),e.push(Mxe.default),e}Sj.default=Yxe});var X3=z(kj=>{"use strict";Object.defineProperty(kj,"__esModule",{value:!0});var fr=at(),Jxe={message:({schemaCode:t})=>(0,fr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,fr._)`{format: ${t}}`},Xxe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Jxe,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:l,schemaEnv:u,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,fr._)`${m}[${a}]`),g=r.let("fType"),h=r.let("format");r.if((0,fr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,fr._)`${v}.type || "string"`).assign(h,(0,fr._)`${v}.validate`),()=>r.assign(g,(0,fr._)`"string"`).assign(h,v)),t.fail$data((0,fr.or)(y(),_()));function y(){return c.strictSchema===!1?fr.nil:(0,fr._)`${a} && !${h}`}function _(){let b=u.$async?(0,fr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,fr._)`${h}(${n})`,x=(0,fr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,fr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[o];if(!m){y();return}if(m===!0)return;let[v,g,h]=_(m);v===e&&t.pass(b());function y(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function _(x){let w=x instanceof RegExp?(0,fr.regexpCode)(x):c.code.formats?(0,fr._)`${c.code.formats}${(0,fr.getProperty)(o)}`:void 0,S=r.scopeValue("formats",{key:o,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,fr._)`${S}.validate`]:["string",x,S]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!u.$async)throw new Error("async format in sync schema");return(0,fr._)`await ${h}(${n})`}return typeof g=="function"?(0,fr._)`${h}(${n})`:(0,fr._)`${h}.test(${n})`}}}};kj.default=Xxe});var eG=z($j=>{"use strict";Object.defineProperty($j,"__esModule",{value:!0});var ewe=X3(),twe=[ewe.default];$j.default=twe});var tG=z(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.contentVocabulary=vu.metadataVocabulary=void 0;vu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nG=z(Ej=>{"use strict";Object.defineProperty(Ej,"__esModule",{value:!0});var rwe=u3(),nwe=k3(),iwe=J3(),owe=eG(),rG=tG(),awe=[rwe.default,nwe.default,(0,iwe.default)(),owe.default,rG.metadataVocabulary,rG.contentVocabulary];Ej.default=awe});var oG=z(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.DiscrError=void 0;var iG;(function(t){t.Tag="tag",t.Mapping="mapping"})(iG||(B_.DiscrError=iG={}))});var sG=z(Pj=>{"use strict";Object.defineProperty(Pj,"__esModule",{value:!0});var yu=at(),Ij=oG(),aG=P_(),swe=em(),cwe=_t(),lwe={message:({params:{discrError:t,tagName:e}})=>t===Ij.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,yu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},uwe={keyword:"discriminator",type:"object",schemaType:"object",error:lwe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,yu._)`${r}${(0,yu.getProperty)(s)}`);e.if((0,yu._)`typeof ${l} == "string"`,()=>u(),()=>t.error(!1,{discrError:Ij.DiscrError.Tag,tag:l,tagName:s})),t.ok(c);function u(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,yu._)`${l} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:Ij.DiscrError.Mapping,tag:l,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,yu.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let b=0;b<a.length;b++){let x=a[b];if(x?.$ref&&!(0,cwe.schemaHasRulesButRef)(x,o.self.RULES)){let S=x.$ref;if(x=aG.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,S),x instanceof aG.SchemaEnv&&(x=x.schema),x===void 0)throw new swe.default(o.opts.uriResolver,o.baseId,S)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),y(w,b)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(s)}function y(b,x){if(b.const)_(b.const,x);else if(b.enum)for(let w of b.enum)_(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function _(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[b]=x}}}};Pj.default=uwe});var cG=z((mFe,dwe)=>{dwe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var uG=z((Xt,Tj)=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.MissingRefError=Xt.ValidationError=Xt.CodeGen=Xt.Name=Xt.nil=Xt.stringify=Xt.str=Xt._=Xt.KeywordCxt=Xt.Ajv=void 0;var pwe=i3(),fwe=nG(),mwe=sG(),lG=cG(),hwe=["/properties"],G_="http://json-schema.org/draft-07/schema",_u=class extends pwe.default{_addVocabularies(){super._addVocabularies(),fwe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(mwe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(lG,hwe):lG;this.addMetaSchema(e,G_,!1),this.refs["http://json-schema.org/schema"]=G_}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(G_)?G_:void 0)}};Xt.Ajv=_u;Tj.exports=Xt=_u;Tj.exports.Ajv=_u;Object.defineProperty(Xt,"__esModule",{value:!0});Xt.default=_u;var gwe=Xf();Object.defineProperty(Xt,"KeywordCxt",{enumerable:!0,get:function(){return gwe.KeywordCxt}});var bu=at();Object.defineProperty(Xt,"_",{enumerable:!0,get:function(){return bu._}});Object.defineProperty(Xt,"str",{enumerable:!0,get:function(){return bu.str}});Object.defineProperty(Xt,"stringify",{enumerable:!0,get:function(){return bu.stringify}});Object.defineProperty(Xt,"nil",{enumerable:!0,get:function(){return bu.nil}});Object.defineProperty(Xt,"Name",{enumerable:!0,get:function(){return bu.Name}});Object.defineProperty(Xt,"CodeGen",{enumerable:!0,get:function(){return bu.CodeGen}});var vwe=E_();Object.defineProperty(Xt,"ValidationError",{enumerable:!0,get:function(){return vwe.default}});var ywe=em();Object.defineProperty(Xt,"MissingRefError",{enumerable:!0,get:function(){return ywe.default}})});var yG=z(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.formatNames=bo.fastFormats=bo.fullFormats=void 0;function _o(t,e){return{validate:t,compare:e}}bo.fullFormats={date:_o(mG,Nj),time:_o(zj(!0),Rj),"date-time":_o(dG(!0),gG),"iso-time":_o(zj(),hG),"iso-date-time":_o(dG(),vG),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:kwe,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:zwe,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:$we,int32:{type:"number",validate:Pwe},int64:{type:"number",validate:Twe},float:{type:"number",validate:fG},double:{type:"number",validate:fG},password:!0,binary:!0};bo.fastFormats={...bo.fullFormats,date:_o(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Nj),time:_o(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Rj),"date-time":_o(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,gG),"iso-time":_o(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,hG),"iso-date-time":_o(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,vG),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};bo.formatNames=Object.keys(bo.fullFormats);function _we(t){return t%4===0&&(t%100!==0||t%400===0)}var bwe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xwe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mG(t){let e=bwe.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&_we(r)?29:xwe[n])}function Nj(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Oj=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function zj(t){return function(r){let n=Oj.exec(r);if(!n)return!1;let i=+n[1],o=+n[2],a=+n[3],s=n[4],c=n[5]==="-"?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||t&&!s)return!1;if(i<=23&&o<=59&&a<60)return!0;let d=o-u*c,f=i-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function Rj(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function hG(t,e){if(!(t&&e))return;let r=Oj.exec(t),n=Oj.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var jj=/t|\s/i;function dG(t){let e=zj(t);return function(n){let i=n.split(jj);return i.length===2&&mG(i[0])&&e(i[1])}}function gG(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function vG(t,e){if(!(t&&e))return;let[r,n]=t.split(jj),[i,o]=e.split(jj),a=Nj(r,i);if(a!==void 0)return a||Rj(n,o)}var wwe=/\/|:/,Swe=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function kwe(t){return wwe.test(t)&&Swe.test(t)}var pG=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function $we(t){return pG.lastIndex=0,pG.test(t)}var Ewe=-(2**31),Iwe=2**31-1;function Pwe(t){return Number.isInteger(t)&&t<=Iwe&&t>=Ewe}function Twe(t){return Number.isInteger(t)}function fG(){return!0}var Owe=/[^\\]\\Z/;function zwe(t){if(Owe.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var gm=z(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.regexpCode=Et.getEsmExportName=Et.getProperty=Et.safeStringify=Et.stringify=Et.strConcat=Et.addCodeArg=Et.str=Et._=Et.nil=Et._Code=Et.Name=Et.IDENTIFIER=Et._CodeOrName=void 0;var mm=class{};Et._CodeOrName=mm;Et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var uc=class extends mm{constructor(e){if(super(),!Et.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Et.Name=uc;var Ei=class extends mm{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof uc&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Et._Code=Ei;Et.nil=new Ei("");function _G(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Aj(r,e[n]),r.push(t[++n]);return new Ei(r)}Et._=_G;var Cj=new Ei("+");function bG(t,...e){let r=[hm(t[0])],n=0;for(;n<e.length;)r.push(Cj),Aj(r,e[n]),r.push(Cj,hm(t[++n]));return jwe(r),new Ei(r)}Et.str=bG;function Aj(t,e){e instanceof Ei?t.push(...e._items):e instanceof uc?t.push(e):t.push(Cwe(e))}Et.addCodeArg=Aj;function jwe(t){let e=1;for(;e<t.length-1;){if(t[e]===Cj){let r=Nwe(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Nwe(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof uc||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof uc))return`"${t}${e.slice(1)}`}function Rwe(t,e){return e.emptyStr()?t:t.emptyStr()?e:bG`${t}${e}`}Et.strConcat=Rwe;function Cwe(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:hm(Array.isArray(t)?t.join(","):t)}function Awe(t){return new Ei(hm(t))}Et.stringify=Awe;function hm(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Et.safeStringify=hm;function Uwe(t){return typeof t=="string"&&Et.IDENTIFIER.test(t)?new Ei(`.${t}`):_G`[${t}]`}Et.getProperty=Uwe;function Dwe(t){if(typeof t=="string"&&Et.IDENTIFIER.test(t))return new Ei(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Et.getEsmExportName=Dwe;function Mwe(t){return new Ei(t.toString())}Et.regexpCode=Mwe});var Mj=z(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ValueScope=Cn.ValueScopeName=Cn.Scope=Cn.varKinds=Cn.UsedValueState=void 0;var Rn=gm(),Uj=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},K_;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(K_||(Cn.UsedValueState=K_={}));Cn.varKinds={const:new Rn.Name("const"),let:new Rn.Name("let"),var:new Rn.Name("var")};var H_=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Rn.Name?e:this.name(e)}name(e){return new Rn.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Cn.Scope=H_;var Q_=class extends Rn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Rn._)`.${new Rn.Name(r)}[${n}]`}};Cn.ValueScopeName=Q_;var Lwe=(0,Rn._)`\n`,Dj=class extends H_{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Lwe:Rn.nil}}get(){return this._scope}name(e){return new Q_(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let u=s.get(a);if(u)return u}else s=this._values[o]=new Map;s.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Rn._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Rn.nil;for(let a in e){let s=e[a];if(!s)continue;let c=n[a]=n[a]||new Map;s.forEach(l=>{if(c.has(l))return;c.set(l,K_.Started);let u=r(l);if(u){let d=this.opts.es5?Cn.varKinds.var:Cn.varKinds.const;o=(0,Rn._)`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=i?.(l))o=(0,Rn._)`${o}${u}${this.opts._n}`;else throw new Uj(l);c.set(l,K_.Completed)})}return o}};Cn.ValueScope=Dj});var Xe=z(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.or=it.and=it.not=it.CodeGen=it.operators=it.varKinds=it.ValueScopeName=it.ValueScope=it.Scope=it.Name=it.regexpCode=it.stringify=it.getProperty=it.nil=it.strConcat=it.str=it._=void 0;var vt=gm(),Ji=Mj(),La=gm();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return La._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return La.str}});Object.defineProperty(it,"strConcat",{enumerable:!0,get:function(){return La.strConcat}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return La.nil}});Object.defineProperty(it,"getProperty",{enumerable:!0,get:function(){return La.getProperty}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return La.stringify}});Object.defineProperty(it,"regexpCode",{enumerable:!0,get:function(){return La.regexpCode}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return La.Name}});var eb=Mj();Object.defineProperty(it,"Scope",{enumerable:!0,get:function(){return eb.Scope}});Object.defineProperty(it,"ValueScope",{enumerable:!0,get:function(){return eb.ValueScope}});Object.defineProperty(it,"ValueScopeName",{enumerable:!0,get:function(){return eb.ValueScopeName}});Object.defineProperty(it,"varKinds",{enumerable:!0,get:function(){return eb.varKinds}});it.operators={GT:new vt._Code(">"),GTE:new vt._Code(">="),LT:new vt._Code("<"),LTE:new vt._Code("<="),EQ:new vt._Code("==="),NEQ:new vt._Code("!=="),NOT:new vt._Code("!"),OR:new vt._Code("||"),AND:new vt._Code("&&"),ADD:new vt._Code("+")};var Ho=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Lj=class extends Ho{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ji.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=wu(this.rhs,e,r)),this}get names(){return this.rhs instanceof vt._CodeOrName?this.rhs.names:{}}},Y_=class extends Ho{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof vt.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=wu(this.rhs,e,r),this}get names(){let e=this.lhs instanceof vt.Name?{}:{...this.lhs.names};return X_(e,this.rhs)}},Zj=class extends Y_{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},qj=class extends Ho{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Fj=class extends Ho{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Vj=class extends Ho{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Wj=class extends Ho{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=wu(this.code,e,r),this}get names(){return this.code instanceof vt._CodeOrName?this.code.names:{}}},vm=class extends Ho{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(Zwe(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>fc(e,r.names),{})}},Qo=class extends vm{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Bj=class extends vm{},xu=class extends Qo{};xu.kind="else";var dc=class t extends Qo{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new xu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(xG(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=wu(this.condition,e,r),this}get names(){let e=super.names;return X_(e,this.condition),this.else&&fc(e,this.else.names),e}};dc.kind="if";var pc=class extends Qo{};pc.kind="for";var Gj=class extends pc{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=wu(this.iteration,e,r),this}get names(){return fc(super.names,this.iteration.names)}},Kj=class extends pc{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ji.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=X_(super.names,this.from);return X_(e,this.to)}},J_=class extends pc{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=wu(this.iterable,e,r),this}get names(){return fc(super.names,this.iterable.names)}},ym=class extends Qo{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};ym.kind="func";var _m=class extends vm{render(e){return"return "+super.render(e)}};_m.kind="return";var Hj=class extends Qo{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&fc(e,this.catch.names),this.finally&&fc(e,this.finally.names),e}},bm=class extends Qo{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};bm.kind="catch";var xm=class extends Qo{render(e){return"finally"+super.render(e)}};xm.kind="finally";var Qj=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
249
+ `:""},this._extScope=e,this._scope=new Ji.Scope({parent:e}),this._nodes=[new Bj]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Lj(e,o,n)),o}const(e,r,n){return this._def(Ji.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ji.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ji.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Y_(e,r,n))}add(e,r){return this._leafNode(new Zj(e,it.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==vt.nil&&this._leafNode(new Wj(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,vt.addCodeArg)(r,i));return r.push("}"),new vt._Code(r)}if(e,r,n){if(this._blockNode(new dc(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new dc(e))}else(){return this._elseNode(new xu)}endIf(){return this._endBlockNode(dc,xu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Gj(e),r)}forRange(e,r,n,i,o=this.opts.es5?Ji.varKinds.var:Ji.varKinds.let){let a=this._scope.toName(e);return this._for(new Kj(o,a,r,n),()=>i(a))}forOf(e,r,n,i=Ji.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof vt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,vt._)`${a}.length`,s=>{this.var(o,(0,vt._)`${a}[${s}]`),n(o)})}return this._for(new J_("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?Ji.varKinds.var:Ji.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,vt._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new J_("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(pc)}label(e){return this._leafNode(new qj(e))}break(e){return this._leafNode(new Fj(e))}return(e){let r=new _m;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_m)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Hj;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new bm(o),r(o)}return n&&(this._currNode=i.finally=new xm,this.code(n)),this._endBlockNode(bm,xm)}throw(e){return this._leafNode(new Vj(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=vt.nil,n,i){return this._blockNode(new ym(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(ym)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof dc))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};it.CodeGen=Qj;function fc(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function X_(t,e){return e instanceof vt._CodeOrName?fc(t,e.names):t}function wu(t,e,r){if(t instanceof vt.Name)return n(t);if(!i(t))return t;return new vt._Code(t._items.reduce((o,a)=>(a instanceof vt.Name&&(a=n(a)),a instanceof vt._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof vt._Code&&o._items.some(a=>a instanceof vt.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Zwe(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function xG(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,vt._)`!${Yj(t)}`}it.not=xG;var qwe=wG(it.operators.AND);function Fwe(...t){return t.reduce(qwe)}it.and=Fwe;var Vwe=wG(it.operators.OR);function Wwe(...t){return t.reduce(Vwe)}it.or=Wwe;function wG(t){return(e,r)=>e===vt.nil?r:r===vt.nil?e:(0,vt._)`${Yj(e)} ${t} ${Yj(r)}`}function Yj(t){return t instanceof vt.Name?t:(0,vt._)`(${t})`}});var xt=z(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.checkStrictMode=ct.getErrorPath=ct.Type=ct.useFunc=ct.setEvaluated=ct.evaluatedPropsToName=ct.mergeEvaluated=ct.eachItem=ct.unescapeJsonPointer=ct.escapeJsonPointer=ct.escapeFragment=ct.unescapeFragment=ct.schemaRefOrVal=ct.schemaHasRulesButRef=ct.schemaHasRules=ct.checkUnknownRules=ct.alwaysValidSchema=ct.toHash=void 0;var Vt=Xe(),Bwe=gm();function Gwe(t){let e={};for(let r of t)e[r]=!0;return e}ct.toHash=Gwe;function Kwe(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:($G(t,e),!EG(e,t.self.RULES.all))}ct.alwaysValidSchema=Kwe;function $G(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||TG(t,`unknown keyword: "${o}"`)}ct.checkUnknownRules=$G;function EG(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ct.schemaHasRules=EG;function Hwe(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ct.schemaHasRulesButRef=Hwe;function Qwe({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Vt._)`${r}`}return(0,Vt._)`${t}${e}${(0,Vt.getProperty)(n)}`}ct.schemaRefOrVal=Qwe;function Ywe(t){return IG(decodeURIComponent(t))}ct.unescapeFragment=Ywe;function Jwe(t){return encodeURIComponent(Xj(t))}ct.escapeFragment=Jwe;function Xj(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ct.escapeJsonPointer=Xj;function IG(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ct.unescapeJsonPointer=IG;function Xwe(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ct.eachItem=Xwe;function SG({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let c=a===void 0?o:a instanceof Vt.Name?(o instanceof Vt.Name?t(i,o,a):e(i,o,a),a):o instanceof Vt.Name?(e(i,a,o),o):r(o,a);return s===Vt.Name&&!(c instanceof Vt.Name)?n(i,c):c}}ct.mergeEvaluated={props:SG({mergeNames:(t,e,r)=>t.if((0,Vt._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Vt._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Vt._)`${r} || {}`).code((0,Vt._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Vt._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Vt._)`${r} || {}`),e1(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:PG}),items:SG({mergeNames:(t,e,r)=>t.if((0,Vt._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Vt._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Vt._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Vt._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function PG(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Vt._)`{}`);return e!==void 0&&e1(t,r,e),r}ct.evaluatedPropsToName=PG;function e1(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Vt._)`${e}${(0,Vt.getProperty)(n)}`,!0))}ct.setEvaluated=e1;var kG={};function e0e(t,e){return t.scopeValue("func",{ref:e,code:kG[e.code]||(kG[e.code]=new Bwe._Code(e.code))})}ct.useFunc=e0e;var Jj;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Jj||(ct.Type=Jj={}));function t0e(t,e,r){if(t instanceof Vt.Name){let n=e===Jj.Num;return r?n?(0,Vt._)`"[" + ${t} + "]"`:(0,Vt._)`"['" + ${t} + "']"`:n?(0,Vt._)`"/" + ${t}`:(0,Vt._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Vt.getProperty)(t).toString():"/"+Xj(t)}ct.getErrorPath=t0e;function TG(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ct.checkStrictMode=TG});var Yo=z(t1=>{"use strict";Object.defineProperty(t1,"__esModule",{value:!0});var Qr=Xe(),r0e={data:new Qr.Name("data"),valCxt:new Qr.Name("valCxt"),instancePath:new Qr.Name("instancePath"),parentData:new Qr.Name("parentData"),parentDataProperty:new Qr.Name("parentDataProperty"),rootData:new Qr.Name("rootData"),dynamicAnchors:new Qr.Name("dynamicAnchors"),vErrors:new Qr.Name("vErrors"),errors:new Qr.Name("errors"),this:new Qr.Name("this"),self:new Qr.Name("self"),scope:new Qr.Name("scope"),json:new Qr.Name("json"),jsonPos:new Qr.Name("jsonPos"),jsonLen:new Qr.Name("jsonLen"),jsonPart:new Qr.Name("jsonPart")};t1.default=r0e});var wm=z(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.extendErrors=Yr.resetErrorsCount=Yr.reportExtraError=Yr.reportError=Yr.keyword$DataError=Yr.keywordError=void 0;var wt=Xe(),tb=xt(),yn=Yo();Yr.keywordError={message:({keyword:t})=>(0,wt.str)`must pass "${t}" keyword validation`};Yr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,wt.str)`"${t}" keyword must be ${e} ($data)`:(0,wt.str)`"${t}" keyword is invalid ($data)`};function n0e(t,e=Yr.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,c=jG(t,e,r);n??(a||s)?OG(o,c):zG(i,(0,wt._)`[${c}]`)}Yr.reportError=n0e;function i0e(t,e=Yr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=jG(t,e,r);OG(i,s),o||a||zG(n,yn.default.vErrors)}Yr.reportExtraError=i0e;function o0e(t,e){t.assign(yn.default.errors,e),t.if((0,wt._)`${yn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,wt._)`${yn.default.vErrors}.length`,e),()=>t.assign(yn.default.vErrors,null)))}Yr.resetErrorsCount=o0e;function a0e({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,yn.default.errors,s=>{t.const(a,(0,wt._)`${yn.default.vErrors}[${s}]`),t.if((0,wt._)`${a}.instancePath === undefined`,()=>t.assign((0,wt._)`${a}.instancePath`,(0,wt.strConcat)(yn.default.instancePath,o.errorPath))),t.assign((0,wt._)`${a}.schemaPath`,(0,wt.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,wt._)`${a}.schema`,r),t.assign((0,wt._)`${a}.data`,n))})}Yr.extendErrors=a0e;function OG(t,e){let r=t.const("err",e);t.if((0,wt._)`${yn.default.vErrors} === null`,()=>t.assign(yn.default.vErrors,(0,wt._)`[${r}]`),(0,wt._)`${yn.default.vErrors}.push(${r})`),t.code((0,wt._)`${yn.default.errors}++`)}function zG(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,wt._)`new ${t.ValidationError}(${e})`):(r.assign((0,wt._)`${n}.errors`,e),r.return(!1))}var mc={keyword:new wt.Name("keyword"),schemaPath:new wt.Name("schemaPath"),params:new wt.Name("params"),propertyName:new wt.Name("propertyName"),message:new wt.Name("message"),schema:new wt.Name("schema"),parentSchema:new wt.Name("parentSchema")};function jG(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,wt._)`{}`:s0e(t,e,r)}function s0e(t,e,r={}){let{gen:n,it:i}=t,o=[c0e(i,r),l0e(t,r)];return u0e(t,e,o),n.object(...o)}function c0e({errorPath:t},{instancePath:e}){let r=e?(0,wt.str)`${t}${(0,tb.getErrorPath)(e,tb.Type.Str)}`:t;return[yn.default.instancePath,(0,wt.strConcat)(yn.default.instancePath,r)]}function l0e({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,wt.str)`${e}/${t}`;return r&&(i=(0,wt.str)`${i}${(0,tb.getErrorPath)(r,tb.Type.Str)}`),[mc.schemaPath,i]}function u0e(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:c,propertyName:l,topSchemaRef:u,schemaPath:d}=s;n.push([mc.keyword,i],[mc.params,typeof e=="function"?e(t):e||(0,wt._)`{}`]),c.messages&&n.push([mc.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([mc.schema,a],[mc.parentSchema,(0,wt._)`${u}${d}`],[yn.default.data,o]),l&&n.push([mc.propertyName,l])}});var RG=z(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.boolOrEmptySchema=Su.topBoolOrEmptySchema=void 0;var d0e=wm(),p0e=Xe(),f0e=Yo(),m0e={message:"boolean schema is false"};function h0e(t){let{gen:e,schema:r,validateName:n}=t;r===!1?NG(t,!1):typeof r=="object"&&r.$async===!0?e.return(f0e.default.data):(e.assign((0,p0e._)`${n}.errors`,null),e.return(!0))}Su.topBoolOrEmptySchema=h0e;function g0e(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),NG(t)):r.var(e,!0)}Su.boolOrEmptySchema=g0e;function NG(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,d0e.reportError)(i,m0e,void 0,e)}});var r1=z(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.getRules=ku.isJSONType=void 0;var v0e=["string","number","integer","boolean","null","object","array"],y0e=new Set(v0e);function _0e(t){return typeof t=="string"&&y0e.has(t)}ku.isJSONType=_0e;function b0e(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}ku.getRules=b0e});var n1=z(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.shouldUseRule=Za.shouldUseGroup=Za.schemaHasRulesForType=void 0;function x0e({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&CG(t,n)}Za.schemaHasRulesForType=x0e;function CG(t,e){return e.rules.some(r=>AG(t,r))}Za.shouldUseGroup=CG;function AG(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Za.shouldUseRule=AG});var Sm=z(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.reportTypeError=Jr.checkDataTypes=Jr.checkDataType=Jr.coerceAndCheckDataType=Jr.getJSONTypes=Jr.getSchemaTypes=Jr.DataType=void 0;var w0e=r1(),S0e=n1(),k0e=wm(),Ye=Xe(),UG=xt(),$u;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})($u||(Jr.DataType=$u={}));function $0e(t){let e=DG(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Jr.getSchemaTypes=$0e;function DG(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(w0e.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Jr.getJSONTypes=DG;function E0e(t,e){let{gen:r,data:n,opts:i}=t,o=I0e(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,S0e.schemaHasRulesForType)(t,e[0]));if(a){let s=o1(e,n,i.strictNumbers,$u.Wrong);r.if(s,()=>{o.length?P0e(t,e,o):a1(t)})}return a}Jr.coerceAndCheckDataType=E0e;var MG=new Set(["string","number","integer","boolean","null"]);function I0e(t,e){return e?t.filter(r=>MG.has(r)||e==="array"&&r==="array"):[]}function P0e(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,Ye._)`typeof ${i}`),s=n.let("coerced",(0,Ye._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ye._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ye._)`${i}[0]`).assign(a,(0,Ye._)`typeof ${i}`).if(o1(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,Ye._)`${s} !== undefined`);for(let l of r)(MG.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),a1(t),n.endIf(),n.if((0,Ye._)`${s} !== undefined`,()=>{n.assign(i,s),T0e(t,s)});function c(l){switch(l){case"string":n.elseIf((0,Ye._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Ye._)`"" + ${i}`).elseIf((0,Ye._)`${i} === null`).assign(s,(0,Ye._)`""`);return;case"number":n.elseIf((0,Ye._)`${a} == "boolean" || ${i} === null
250
+ || (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Ye._)`+${i}`);return;case"integer":n.elseIf((0,Ye._)`${a} === "boolean" || ${i} === null
251
+ || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Ye._)`+${i}`);return;case"boolean":n.elseIf((0,Ye._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Ye._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Ye._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Ye._)`${a} === "string" || ${a} === "number"
252
+ || ${a} === "boolean" || ${i} === null`).assign(s,(0,Ye._)`[${i}]`)}}}function T0e({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Ye._)`${e} !== undefined`,()=>t.assign((0,Ye._)`${e}[${r}]`,n))}function i1(t,e,r,n=$u.Correct){let i=n===$u.Correct?Ye.operators.EQ:Ye.operators.NEQ,o;switch(t){case"null":return(0,Ye._)`${e} ${i} null`;case"array":o=(0,Ye._)`Array.isArray(${e})`;break;case"object":o=(0,Ye._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Ye._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Ye._)`typeof ${e} ${i} ${t}`}return n===$u.Correct?o:(0,Ye.not)(o);function a(s=Ye.nil){return(0,Ye.and)((0,Ye._)`typeof ${e} == "number"`,s,r?(0,Ye._)`isFinite(${e})`:Ye.nil)}}Jr.checkDataType=i1;function o1(t,e,r,n){if(t.length===1)return i1(t[0],e,r,n);let i,o=(0,UG.toHash)(t);if(o.array&&o.object){let a=(0,Ye._)`typeof ${e} != "object"`;i=o.null?a:(0,Ye._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ye.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ye.and)(i,i1(a,e,r,n));return i}Jr.checkDataTypes=o1;var O0e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ye._)`{type: ${t}}`:(0,Ye._)`{type: ${e}}`};function a1(t){let e=z0e(t);(0,k0e.reportError)(e,O0e)}Jr.reportTypeError=a1;function z0e(t){let{gen:e,data:r,schema:n}=t,i=(0,UG.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var ZG=z(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.assignDefaults=void 0;var Eu=Xe(),j0e=xt();function N0e(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)LG(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>LG(t,o,i.default))}rb.assignDefaults=N0e;function LG(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,Eu._)`${o}${(0,Eu.getProperty)(e)}`;if(i){(0,j0e.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Eu._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Eu._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Eu._)`${s} = ${(0,Eu.stringify)(r)}`)}});var Ii=z(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateUnion=At.validateArray=At.usePattern=At.callValidateCode=At.schemaProperties=At.allSchemaProperties=At.noPropertyInData=At.propertyInData=At.isOwnProperty=At.hasPropFunc=At.reportMissingProp=At.checkMissingProp=At.checkReportMissingProp=void 0;var er=Xe(),s1=xt(),qa=Yo(),R0e=xt();function C0e(t,e){let{gen:r,data:n,it:i}=t;r.if(l1(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,er._)`${e}`},!0),t.error()})}At.checkReportMissingProp=C0e;function A0e({gen:t,data:e,it:{opts:r}},n,i){return(0,er.or)(...n.map(o=>(0,er.and)(l1(t,e,o,r.ownProperties),(0,er._)`${i} = ${o}`)))}At.checkMissingProp=A0e;function U0e(t,e){t.setParams({missingProperty:e},!0),t.error()}At.reportMissingProp=U0e;function qG(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,er._)`Object.prototype.hasOwnProperty`})}At.hasPropFunc=qG;function c1(t,e,r){return(0,er._)`${qG(t)}.call(${e}, ${r})`}At.isOwnProperty=c1;function D0e(t,e,r,n){let i=(0,er._)`${e}${(0,er.getProperty)(r)} !== undefined`;return n?(0,er._)`${i} && ${c1(t,e,r)}`:i}At.propertyInData=D0e;function l1(t,e,r,n){let i=(0,er._)`${e}${(0,er.getProperty)(r)} === undefined`;return n?(0,er.or)(i,(0,er.not)(c1(t,e,r))):i}At.noPropertyInData=l1;function FG(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}At.allSchemaProperties=FG;function M0e(t,e){return FG(e).filter(r=>!(0,s1.alwaysValidSchema)(t,e[r]))}At.schemaProperties=M0e;function L0e({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,c,l){let u=l?(0,er._)`${t}, ${e}, ${n}${i}`:e,d=[[qa.default.instancePath,(0,er.strConcat)(qa.default.instancePath,o)],[qa.default.parentData,a.parentData],[qa.default.parentDataProperty,a.parentDataProperty],[qa.default.rootData,qa.default.rootData]];a.opts.dynamicRef&&d.push([qa.default.dynamicAnchors,qa.default.dynamicAnchors]);let f=(0,er._)`${u}, ${r.object(...d)}`;return c!==er.nil?(0,er._)`${s}.call(${c}, ${f})`:(0,er._)`${s}(${f})`}At.callValidateCode=L0e;var Z0e=(0,er._)`new RegExp`;function q0e({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,er._)`${i.code==="new RegExp"?Z0e:(0,R0e.useFunc)(t,i)}(${r}, ${n})`})}At.usePattern=q0e;function F0e(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let c=e.const("len",(0,er._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:s1.Type.Num},o),e.if((0,er.not)(o),s)})}}At.validateArray=F0e;function V0e(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,s1.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,l)=>{let u=t.subschema({keyword:n,schemaProp:l,compositeRule:!0},s);e.assign(a,(0,er._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,er.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}At.validateUnion=V0e});var BG=z(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.validateKeywordUsage=xo.validSchemaType=xo.funcKeywordCode=xo.macroKeywordCode=void 0;var _n=Xe(),hc=Yo(),W0e=Ii(),B0e=wm();function G0e(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),c=WG(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let l=r.name("valid");t.subschema({schema:s,schemaPath:_n.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}xo.macroKeywordCode=G0e;function K0e(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:c}=t;Q0e(c,e);let l=!s&&e.compile?e.compile.call(c.self,o,a,c):e.validate,u=WG(n,i,l),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&VG(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&VG(t),g(()=>H0e(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,_n._)`await `),y=>n.assign(d,!1).if((0,_n._)`${y} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,_n._)`${y}.errors`),()=>n.throw(y))),h}function m(){let h=(0,_n._)`${u}.errors`;return n.assign(h,null),v(_n.nil),h}function v(h=e.async?(0,_n._)`await `:_n.nil){let y=c.opts.passContext?hc.default.this:hc.default.self,_=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,_n._)`${h}${(0,W0e.callValidateCode)(t,u,y,_)}`,e.modifying)}function g(h){var y;n.if((0,_n.not)((y=e.valid)!==null&&y!==void 0?y:d),h)}}xo.funcKeywordCode=K0e;function VG(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,_n._)`${n.parentData}[${n.parentDataProperty}]`))}function H0e(t,e){let{gen:r}=t;r.if((0,_n._)`Array.isArray(${e})`,()=>{r.assign(hc.default.vErrors,(0,_n._)`${hc.default.vErrors} === null ? ${e} : ${hc.default.vErrors}.concat(${e})`).assign(hc.default.errors,(0,_n._)`${hc.default.vErrors}.length`),(0,B0e.extendErrors)(t)},()=>t.error())}function Q0e({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function WG(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,_n.stringify)(r)})}function Y0e(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}xo.validSchemaType=Y0e;function J0e({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}xo.validateKeywordUsage=J0e});var KG=z(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.extendSubschemaMode=Fa.extendSubschemaData=Fa.getSubschema=void 0;var wo=Xe(),GG=xt();function X0e(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,wo._)`${t.schemaPath}${(0,wo.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,wo._)`${t.schemaPath}${(0,wo.getProperty)(e)}${(0,wo.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,GG.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Fa.getSubschema=X0e;function eSe(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:l,dataPathArr:u,opts:d}=e,f=s.let("data",(0,wo._)`${e.data}${(0,wo.getProperty)(r)}`,!0);c(f),t.errorPath=(0,wo.str)`${l}${(0,GG.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,wo._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let l=i instanceof wo.Name?i:s.let("data",i,!0);c(l),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Fa.extendSubschemaData=eSe;function tSe(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Fa.extendSubschemaMode=tSe});var QG=z((OFe,HG)=>{"use strict";var Va=HG.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};nb(e,n,i,t,"",t)};Va.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Va.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Va.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Va.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function nb(t,e,r,n,i,o,a,s,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,c,l);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Va.arrayKeywords)for(var f=0;f<d.length;f++)nb(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Va.propsKeywords){if(d&&typeof d=="object")for(var p in d)nb(t,e,r,d[p],i+"/"+u+"/"+rSe(p),o,i,u,n,p)}else(u in Va.keywords||t.allKeys&&!(u in Va.skipKeywords))&&nb(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,c,l)}}function rSe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var km=z(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.getSchemaRefs=An.resolveUrl=An.normalizeId=An._getFullPath=An.getFullPath=An.inlineRef=void 0;var nSe=xt(),iSe=Hf(),oSe=QG(),aSe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sSe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!u1(t):e?YG(t)<=e:!1}An.inlineRef=sSe;var cSe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u1(t){for(let e in t){if(cSe.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(u1)||typeof r=="object"&&u1(r))return!0}return!1}function YG(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!aSe.has(r)&&(typeof t[r]=="object"&&(0,nSe.eachItem)(t[r],n=>e+=YG(n)),e===1/0))return 1/0}return e}function JG(t,e="",r){r!==!1&&(e=Iu(e));let n=t.parse(e);return XG(t,n)}An.getFullPath=JG;function XG(t,e){return t.serialize(e).split("#")[0]+"#"}An._getFullPath=XG;var lSe=/#\/?$/;function Iu(t){return t?t.replace(lSe,""):""}An.normalizeId=Iu;function uSe(t,e,r){return r=Iu(r),t.resolve(e,r)}An.resolveUrl=uSe;var dSe=/^[a-z_][-a-z0-9._]*$/i;function pSe(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Iu(t[r]||e),o={"":i},a=JG(n,i,!1),s={},c=new Set;return oSe(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=a+f,g=o[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),y.call(this,d.$anchor),y.call(this,d.$dynamicAnchor),o[f]=g;function h(_){let b=this.opts.uriResolver.resolve;if(_=Iu(g?b(g,_):_),c.has(_))throw u(_);c.add(_);let x=this.refs[_];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?l(d,x.schema,_):_!==Iu(v)&&(_[0]==="#"?(l(d,s[_],_),s[_]=d):this.refs[_]=v),_}function y(_){if(typeof _=="string"){if(!dSe.test(_))throw new Error(`invalid anchor "${_}"`);h.call(this,`#${_}`)}}}),s;function l(d,f,p){if(f!==void 0&&!iSe(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}An.getSchemaRefs=pSe});var Im=z(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.getData=Wa.KeywordCxt=Wa.validateFunctionCode=void 0;var iK=RG(),eK=Sm(),p1=n1(),ib=Sm(),fSe=ZG(),Em=BG(),d1=KG(),Ee=Xe(),Le=Yo(),mSe=km(),Jo=xt(),$m=wm();function hSe(t){if(sK(t)&&(cK(t),aK(t))){ySe(t);return}oK(t,()=>(0,iK.topBoolOrEmptySchema)(t))}Wa.validateFunctionCode=hSe;function oK({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,Ee._)`${Le.default.data}, ${Le.default.valCxt}`,n.$async,()=>{t.code((0,Ee._)`"use strict"; ${tK(r,i)}`),vSe(t,i),t.code(o)}):t.func(e,(0,Ee._)`${Le.default.data}, ${gSe(i)}`,n.$async,()=>t.code(tK(r,i)).code(o))}function gSe(t){return(0,Ee._)`{${Le.default.instancePath}="", ${Le.default.parentData}, ${Le.default.parentDataProperty}, ${Le.default.rootData}=${Le.default.data}${t.dynamicRef?(0,Ee._)`, ${Le.default.dynamicAnchors}={}`:Ee.nil}}={}`}function vSe(t,e){t.if(Le.default.valCxt,()=>{t.var(Le.default.instancePath,(0,Ee._)`${Le.default.valCxt}.${Le.default.instancePath}`),t.var(Le.default.parentData,(0,Ee._)`${Le.default.valCxt}.${Le.default.parentData}`),t.var(Le.default.parentDataProperty,(0,Ee._)`${Le.default.valCxt}.${Le.default.parentDataProperty}`),t.var(Le.default.rootData,(0,Ee._)`${Le.default.valCxt}.${Le.default.rootData}`),e.dynamicRef&&t.var(Le.default.dynamicAnchors,(0,Ee._)`${Le.default.valCxt}.${Le.default.dynamicAnchors}`)},()=>{t.var(Le.default.instancePath,(0,Ee._)`""`),t.var(Le.default.parentData,(0,Ee._)`undefined`),t.var(Le.default.parentDataProperty,(0,Ee._)`undefined`),t.var(Le.default.rootData,Le.default.data),e.dynamicRef&&t.var(Le.default.dynamicAnchors,(0,Ee._)`{}`)})}function ySe(t){let{schema:e,opts:r,gen:n}=t;oK(t,()=>{r.$comment&&e.$comment&&uK(t),SSe(t),n.let(Le.default.vErrors,null),n.let(Le.default.errors,0),r.unevaluated&&_Se(t),lK(t),ESe(t)})}function _Se(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Ee._)`${r}.evaluated`),e.if((0,Ee._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Ee._)`${t.evaluated}.props`,(0,Ee._)`undefined`)),e.if((0,Ee._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Ee._)`${t.evaluated}.items`,(0,Ee._)`undefined`))}function tK(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Ee._)`/*# sourceURL=${r} */`:Ee.nil}function bSe(t,e){if(sK(t)&&(cK(t),aK(t))){xSe(t,e);return}(0,iK.boolOrEmptySchema)(t,e)}function aK({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function sK(t){return typeof t.schema!="boolean"}function xSe(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&uK(t),kSe(t),$Se(t);let o=n.const("_errs",Le.default.errors);lK(t,o),n.var(e,(0,Ee._)`${o} === ${Le.default.errors}`)}function cK(t){(0,Jo.checkUnknownRules)(t),wSe(t)}function lK(t,e){if(t.opts.jtd)return rK(t,[],!1,e);let r=(0,eK.getSchemaTypes)(t.schema),n=(0,eK.coerceAndCheckDataType)(t,r);rK(t,r,!n,e)}function wSe(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Jo.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function SSe(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Jo.checkStrictMode)(t,"default is ignored in the schema root")}function kSe(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,mSe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function $Se(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function uK({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,Ee._)`${Le.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,Ee.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,Ee._)`${Le.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function ESe(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,Ee._)`${Le.default.errors} === 0`,()=>e.return(Le.default.data),()=>e.throw((0,Ee._)`new ${i}(${Le.default.vErrors})`)):(e.assign((0,Ee._)`${n}.errors`,Le.default.vErrors),o.unevaluated&&ISe(t),e.return((0,Ee._)`${Le.default.errors} === 0`))}function ISe({gen:t,evaluated:e,props:r,items:n}){r instanceof Ee.Name&&t.assign((0,Ee._)`${e}.props`,r),n instanceof Ee.Name&&t.assign((0,Ee._)`${e}.items`,n)}function rK(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:c,self:l}=t,{RULES:u}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Jo.schemaHasRulesButRef)(o,u))){i.block(()=>pK(t,"$ref",u.all.$ref.definition));return}c.jtd||PSe(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,p1.shouldUseGroup)(o,f)&&(f.type?(i.if((0,ib.checkDataType)(f.type,a,c.strictNumbers)),nK(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,ib.reportTypeError)(t)),i.endIf()):nK(t,f),s||i.if((0,Ee._)`${Le.default.errors} === ${n||0}`))}}function nK(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,fSe.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,p1.shouldUseRule)(n,o)&&pK(t,o.keyword,o.definition,e.type)})}function PSe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(TSe(t,e),t.opts.allowUnionTypes||OSe(t,e),zSe(t,t.dataTypes))}function TSe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{dK(t.dataTypes,r)||f1(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),NSe(t,e)}}function OSe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&f1(t,"use allowUnionTypes to allow union type keyword")}function zSe(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,p1.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>jSe(e,a))&&f1(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function jSe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function dK(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function NSe(t,e){let r=[];for(let n of t.dataTypes)dK(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function f1(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Jo.checkStrictMode)(t,e,t.opts.strictTypes)}var ob=class{constructor(e,r,n){if((0,Em.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Jo.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",fK(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Em.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Le.default.errors))}result(e,r,n){this.failResult((0,Ee.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Ee.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,Ee._)`${r} !== undefined && (${(0,Ee.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?$m.reportExtraError:$m.reportError)(this,this.def.error,r)}$dataError(){(0,$m.reportError)(this,this.def.$dataError||$m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Ee.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Ee.nil,r=Ee.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,Ee.or)((0,Ee._)`${i} === undefined`,r)),e!==Ee.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Ee.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,Ee.or)(a(),s());function a(){if(n.length){if(!(r instanceof Ee.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Ee._)`${(0,ib.checkDataTypes)(c,r,o.opts.strictNumbers,ib.DataType.Wrong)}`}return Ee.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ee._)`!${c}(${r})`}return Ee.nil}}subschema(e,r){let n=(0,d1.getSubschema)(this.it,e);(0,d1.extendSubschemaData)(n,this.it,e),(0,d1.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return bSe(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Jo.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Jo.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,Ee.Name)),!0}};Wa.KeywordCxt=ob;function pK(t,e,r,n){let i=new ob(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Em.funcKeywordCode)(i,r):"macro"in r?(0,Em.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Em.funcKeywordCode)(i,r)}var RSe=/^\/(?:[^~]|~0|~1)*$/,CSe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fK(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Le.default.rootData;if(t[0]==="/"){if(!RSe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Le.default.rootData}else{let l=CSe.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+l[1];if(i=l[2],i==="#"){if(u>=e)throw new Error(c("property/index",u));return n[e-u]}if(u>e)throw new Error(c("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let l of s)l&&(o=(0,Ee._)`${o}${(0,Ee.getProperty)((0,Jo.unescapeJsonPointer)(l))}`,a=(0,Ee._)`${a} && ${o}`);return a;function c(l,u){return`Cannot access ${l} ${u} levels up, current level is ${e}`}}Wa.getData=fK});var ab=z(h1=>{"use strict";Object.defineProperty(h1,"__esModule",{value:!0});var m1=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};h1.default=m1});var Pm=z(y1=>{"use strict";Object.defineProperty(y1,"__esModule",{value:!0});var g1=km(),v1=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,g1.resolveUrl)(e,r,n),this.missingSchema=(0,g1.normalizeId)((0,g1.getFullPath)(e,this.missingRef))}};y1.default=v1});var cb=z(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.resolveSchema=Pi.getCompilingSchema=Pi.resolveRef=Pi.compileSchema=Pi.SchemaEnv=void 0;var Xi=Xe(),ASe=ab(),gc=Yo(),eo=km(),mK=xt(),USe=Im(),Pu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,eo.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Pi.SchemaEnv=Pu;function b1(t){let e=hK.call(this,t);if(e)return e;let r=(0,eo.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Xi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:ASe.default,code:(0,Xi._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:gc.default.data,parentData:gc.default.parentData,parentDataProperty:gc.default.parentDataProperty,dataNames:[gc.default.data],dataPathArr:[Xi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Xi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Xi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Xi._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,USe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(gc.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${gc.default.self}`,`${gc.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:v}=l;p.evaluated={props:m instanceof Xi.Name?void 0:m,items:v instanceof Xi.Name?void 0:v,dynamicProps:m instanceof Xi.Name,dynamicItems:v instanceof Xi.Name},p.source&&(p.source.evaluated=(0,Xi.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}Pi.compileSchema=b1;function DSe(t,e,r){var n;r=(0,eo.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=ZSe.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Pu({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=MSe.call(this,o)}Pi.resolveRef=DSe;function MSe(t){return(0,eo.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:b1.call(this,t)}function hK(t){for(let e of this._compilations)if(LSe(e,t))return e}Pi.getCompilingSchema=hK;function LSe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function ZSe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||sb.call(this,t,e)}function sb(t,e){let r=this.opts.uriResolver.parse(e),n=(0,eo._getFullPath)(this.opts.uriResolver,r),i=(0,eo.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return _1.call(this,r,t);let o=(0,eo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=sb.call(this,t,a);return typeof s?.schema!="object"?void 0:_1.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||b1.call(this,a),o===(0,eo.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];return l&&(i=(0,eo.resolveUrl)(this.opts.uriResolver,i,l)),new Pu({schema:s,schemaId:c,root:t,baseId:i})}return _1.call(this,r,a)}}Pi.resolveSchema=sb;var qSe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _1(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,mK.unescapeFragment)(s)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!qSe.has(s)&&l&&(e=(0,eo.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,mK.schemaHasRulesButRef)(r,this.RULES)){let s=(0,eo.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=sb.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new Pu({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var gK=z((AFe,FSe)=>{FSe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var yK=z(x1=>{"use strict";Object.defineProperty(x1,"__esModule",{value:!0});var vK=Uz();vK.code='require("ajv/dist/runtime/uri").default';x1.default=vK});var EK=z(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.CodeGen=Dr.Name=Dr.nil=Dr.stringify=Dr.str=Dr._=Dr.KeywordCxt=void 0;var VSe=Im();Object.defineProperty(Dr,"KeywordCxt",{enumerable:!0,get:function(){return VSe.KeywordCxt}});var Tu=Xe();Object.defineProperty(Dr,"_",{enumerable:!0,get:function(){return Tu._}});Object.defineProperty(Dr,"str",{enumerable:!0,get:function(){return Tu.str}});Object.defineProperty(Dr,"stringify",{enumerable:!0,get:function(){return Tu.stringify}});Object.defineProperty(Dr,"nil",{enumerable:!0,get:function(){return Tu.nil}});Object.defineProperty(Dr,"Name",{enumerable:!0,get:function(){return Tu.Name}});Object.defineProperty(Dr,"CodeGen",{enumerable:!0,get:function(){return Tu.CodeGen}});var WSe=ab(),SK=Pm(),BSe=r1(),Tm=cb(),GSe=Xe(),Om=km(),lb=Sm(),S1=xt(),_K=gK(),KSe=yK(),kK=(t,e)=>new RegExp(t,e);kK.code="new RegExp";var HSe=["removeAdditional","useDefaults","coerceTypes"],QSe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),YSe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},JSe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},bK=200;function XSe(t){var e,r,n,i,o,a,s,c,l,u,d,f,p,m,v,g,h,y,_,b,x,w,S,$,T;let A=t.strict,I=(e=t.code)===null||e===void 0?void 0:e.optimize,U=I===!0||I===void 0?1:I||0,L=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:kK,N=(i=t.uriResolver)!==null&&i!==void 0?i:KSe.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:A)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:A)!==null&&c!==void 0?c:!0,strictTypes:(u=(l=t.strictTypes)!==null&&l!==void 0?l:A)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:U,regExp:L}:{optimize:U,regExp:L},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:bK,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:bK,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(y=t.messages)!==null&&y!==void 0?y:!0,inlineRefs:(_=t.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(b=t.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(S=t.validateFormats)!==null&&S!==void 0?S:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:N}}var zm=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...XSe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new GSe.ValueScope({scope:{},prefixes:QSe,es5:r,lines:n}),this.logger=oke(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,BSe.getRules)(),xK.call(this,YSe,e,"NOT SUPPORTED"),xK.call(this,JSe,e,"DEPRECATED","warn"),this._metaOpts=nke.call(this),e.formats&&tke.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&rke.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),eke.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=_K;n==="id"&&(i={..._K},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof SK.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function c(u){let d=await l.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function l(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Om.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=wK.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Tm.SchemaEnv({schema:{},schemaId:n});if(r=Tm.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=wK.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Om.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ske.call(this,n,r),!r)return(0,S1.eachItem)(n,o=>w1.call(this,o)),this;lke.call(this,r);let i={...r,type:(0,lb.getJSONTypes)(r.type),schemaType:(0,lb.getJSONTypes)(r.schemaType)};return(0,S1.eachItem)(n,i.type.length===0?o=>w1.call(this,o,i):o=>i.type.forEach(a=>w1.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:l}=c.definition,u=a[s];l&&u&&(a[s]=$K(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,Om.normalizeId)(a||n);let l=Om.getSchemaRefs.call(this,e,n);return c=new Tm.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Tm.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Tm.compileSchema.call(this,e)}finally{this.opts=r}}};zm.ValidationError=WSe.default;zm.MissingRefError=SK.default;Dr.default=zm;function xK(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function wK(t){return t=(0,Om.normalizeId)(t),this.schemas[t]||this.refs[t]}function eke(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function tke(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function rke(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function nke(){let t={...this.opts};for(let e of HSe)delete t[e];return t}var ike={log(){},warn(){},error(){}};function oke(t){if(t===!1)return ike;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var ake=/^[a-z_$][a-z0-9_$:-]*$/i;function ske(t,e){let{RULES:r}=this;if((0,S1.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!ake.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function w1(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,lb.getJSONTypes)(e.type),schemaType:(0,lb.getJSONTypes)(e.schemaType)}};e.before?cke.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function cke(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function lke(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=$K(e)),t.validateSchema=this.compile(e,!0))}var uke={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function $K(t){return{anyOf:[t,uke]}}});var IK=z(k1=>{"use strict";Object.defineProperty(k1,"__esModule",{value:!0});var dke={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};k1.default=dke});var zK=z(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.callRef=vc.getValidate=void 0;var pke=Pm(),PK=Ii(),Un=Xe(),Ou=Yo(),TK=cb(),ub=xt(),fke={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let u=TK.resolveRef.call(c,l,i,r);if(u===void 0)throw new pke.default(n.opts.uriResolver,i,r);if(u instanceof TK.SchemaEnv)return f(u);return p(u);function d(){if(o===l)return db(t,a,o,o.$async);let m=e.scopeValue("root",{ref:l});return db(t,(0,Un._)`${m}.validate`,l,l.$async)}function f(m){let v=OK(t,m);db(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,Un.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:Un.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function OK(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Un._)`${r.scopeValue("wrapper",{ref:e})}.validate`}vc.getValidate=OK;function db(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:c}=o,l=c.passContext?Ou.default.this:Un.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Un._)`await ${(0,PK.callValidateCode)(t,e,l)}`),p(e),a||i.assign(m,!0)},v=>{i.if((0,Un._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),f(v),a||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,PK.callValidateCode)(t,e,l),()=>p(e),()=>f(e))}function f(m){let v=(0,Un._)`${m}.errors`;i.assign(Ou.default.vErrors,(0,Un._)`${Ou.default.vErrors} === null ? ${v} : ${Ou.default.vErrors}.concat(${v})`),i.assign(Ou.default.errors,(0,Un._)`${Ou.default.vErrors}.length`)}function p(m){var v;if(!o.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=ub.mergeEvaluated.props(i,g.props,o.props));else{let h=i.var("props",(0,Un._)`${m}.evaluated.props`);o.props=ub.mergeEvaluated.props(i,h,o.props,Un.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=ub.mergeEvaluated.items(i,g.items,o.items));else{let h=i.var("items",(0,Un._)`${m}.evaluated.items`);o.items=ub.mergeEvaluated.items(i,h,o.items,Un.Name)}}}vc.callRef=db;vc.default=fke});var jK=z($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});var mke=IK(),hke=zK(),gke=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",mke.default,hke.default];$1.default=gke});var NK=z(E1=>{"use strict";Object.defineProperty(E1,"__esModule",{value:!0});var pb=Xe(),Ba=pb.operators,fb={maximum:{okStr:"<=",ok:Ba.LTE,fail:Ba.GT},minimum:{okStr:">=",ok:Ba.GTE,fail:Ba.LT},exclusiveMaximum:{okStr:"<",ok:Ba.LT,fail:Ba.GTE},exclusiveMinimum:{okStr:">",ok:Ba.GT,fail:Ba.LTE}},vke={message:({keyword:t,schemaCode:e})=>(0,pb.str)`must be ${fb[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,pb._)`{comparison: ${fb[t].okStr}, limit: ${e}}`},yke={keyword:Object.keys(fb),type:"number",schemaType:"number",$data:!0,error:vke,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,pb._)`${r} ${fb[e].fail} ${n} || isNaN(${r})`)}};E1.default=yke});var RK=z(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});var jm=Xe(),_ke={message:({schemaCode:t})=>(0,jm.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,jm._)`{multipleOf: ${t}}`},bke={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:_ke,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,jm._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,jm._)`${a} !== parseInt(${a})`;t.fail$data((0,jm._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};I1.default=bke});var AK=z(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0});function CK(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}P1.default=CK;CK.code='require("ajv/dist/runtime/ucs2length").default'});var UK=z(T1=>{"use strict";Object.defineProperty(T1,"__esModule",{value:!0});var yc=Xe(),xke=xt(),wke=AK(),Ske={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,yc.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,yc._)`{limit: ${t}}`},kke={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Ske,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?yc.operators.GT:yc.operators.LT,a=i.opts.unicode===!1?(0,yc._)`${r}.length`:(0,yc._)`${(0,xke.useFunc)(t.gen,wke.default)}(${r})`;t.fail$data((0,yc._)`${a} ${o} ${n}`)}};T1.default=kke});var DK=z(O1=>{"use strict";Object.defineProperty(O1,"__esModule",{value:!0});var $ke=Ii(),Eke=xt(),zu=Xe(),Ike={message:({schemaCode:t})=>(0,zu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,zu._)`{pattern: ${t}}`},Pke={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Ike,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?(0,zu._)`new RegExp`:(0,Eke.useFunc)(e,c),u=e.let("valid");e.try(()=>e.assign(u,(0,zu._)`${l}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,zu._)`!${u}`)}else{let c=(0,$ke.usePattern)(t,i);t.fail$data((0,zu._)`!${c}.test(${r})`)}}};O1.default=Pke});var MK=z(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});var Nm=Xe(),Tke={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Nm.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Nm._)`{limit: ${t}}`},Oke={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Tke,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Nm.operators.GT:Nm.operators.LT;t.fail$data((0,Nm._)`Object.keys(${r}).length ${i} ${n}`)}};z1.default=Oke});var LK=z(j1=>{"use strict";Object.defineProperty(j1,"__esModule",{value:!0});var Rm=Ii(),Cm=Xe(),zke=xt(),jke={message:({params:{missingProperty:t}})=>(0,Cm.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Cm._)`{missingProperty: ${t}}`},Nke={keyword:"required",type:"object",schemaType:"array",$data:!0,error:jke,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?l():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=a.schemaEnv.baseId+a.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,zke.checkStrictMode)(a,h,a.opts.strictRequired)}}function l(){if(c||o)t.block$data(Cm.nil,d);else for(let p of r)(0,Rm.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(c||o){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,Rm.checkMissingProp)(t,r,p)),(0,Rm.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,Rm.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,Rm.propertyInData)(e,i,p,s.ownProperties)),e.if((0,Cm.not)(m),()=>{t.error(),e.break()})},Cm.nil)}}};j1.default=Nke});var ZK=z(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});var Am=Xe(),Rke={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Am.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Am._)`{limit: ${t}}`},Cke={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Rke,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Am.operators.GT:Am.operators.LT;t.fail$data((0,Am._)`${r}.length ${i} ${n}`)}};N1.default=Cke});var mb=z(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});var qK=Hf();qK.code='require("ajv/dist/runtime/equal").default';R1.default=qK});var FK=z(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});var C1=Sm(),Mr=Xe(),Ake=xt(),Uke=mb(),Dke={message:({params:{i:t,j:e}})=>(0,Mr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Mr._)`{i: ${t}, j: ${e}}`},Mke={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Dke,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),l=o.items?(0,C1.getSchemaTypes)(o.items):[];t.block$data(c,u,(0,Mr._)`${a} === false`),t.ok(c);function u(){let m=e.let("i",(0,Mr._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Mr._)`${m} > 1`,()=>(d()?f:p)(m,v))}function d(){return l.length>0&&!l.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,C1.checkDataTypes)(l,g,s.opts.strictNumbers,C1.DataType.Wrong),y=e.const("indices",(0,Mr._)`{}`);e.for((0,Mr._)`;${m}--;`,()=>{e.let(g,(0,Mr._)`${r}[${m}]`),e.if(h,(0,Mr._)`continue`),l.length>1&&e.if((0,Mr._)`typeof ${g} == "string"`,(0,Mr._)`${g} += "_"`),e.if((0,Mr._)`typeof ${y}[${g}] == "number"`,()=>{e.assign(v,(0,Mr._)`${y}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Mr._)`${y}[${g}] = ${m}`)})}function p(m,v){let g=(0,Ake.useFunc)(e,Uke.default),h=e.name("outer");e.label(h).for((0,Mr._)`;${m}--;`,()=>e.for((0,Mr._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Mr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};A1.default=Mke});var VK=z(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});var U1=Xe(),Lke=xt(),Zke=mb(),qke={message:"must be equal to constant",params:({schemaCode:t})=>(0,U1._)`{allowedValue: ${t}}`},Fke={keyword:"const",$data:!0,error:qke,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,U1._)`!${(0,Lke.useFunc)(e,Zke.default)}(${r}, ${i})`):t.fail((0,U1._)`${o} !== ${r}`)}};D1.default=Fke});var WK=z(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});var Um=Xe(),Vke=xt(),Wke=mb(),Bke={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Um._)`{allowedValues: ${t}}`},Gke={keyword:"enum",schemaType:"array",$data:!0,error:Bke,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,c,l=()=>c??(c=(0,Vke.useFunc)(e,Wke.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,Um.or)(...i.map((m,v)=>f(p,v)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,Um._)`${l()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,Um._)`${l()}(${r}, ${p}[${m}])`:(0,Um._)`${r} === ${v}`}}};M1.default=Gke});var BK=z(L1=>{"use strict";Object.defineProperty(L1,"__esModule",{value:!0});var Kke=NK(),Hke=RK(),Qke=UK(),Yke=DK(),Jke=MK(),Xke=LK(),e$e=ZK(),t$e=FK(),r$e=VK(),n$e=WK(),i$e=[Kke.default,Hke.default,Qke.default,Yke.default,Jke.default,Xke.default,e$e.default,t$e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},r$e.default,n$e.default];L1.default=i$e});var q1=z(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.validateAdditionalItems=void 0;var _c=Xe(),Z1=xt(),o$e={message:({params:{len:t}})=>(0,_c.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_c._)`{limit: ${t}}`},a$e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:o$e,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Z1.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}GK(t,n)}};function GK(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,_c._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,_c._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,Z1.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,_c._)`${s} <= ${e.length}`);r.if((0,_c.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:Z1.Type.Num},l),a.allErrors||r.if((0,_c.not)(l),()=>r.break())})}}Dm.validateAdditionalItems=GK;Dm.default=a$e});var F1=z(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.validateTuple=void 0;var KK=Xe(),hb=xt(),s$e=Ii(),c$e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return HK(t,"additionalItems",e);r.items=!0,!(0,hb.alwaysValidSchema)(r,e)&&t.ok((0,s$e.validateArray)(t))}};function HK(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=hb.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),l=n.const("len",(0,KK._)`${o}.length`);r.forEach((d,f)=>{(0,hb.alwaysValidSchema)(s,d)||(n.if((0,KK._)`${l} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},c)),t.ok(c))});function u(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,hb.checkStrictMode)(s,g,f.strictTuples)}}}Mm.validateTuple=HK;Mm.default=c$e});var QK=z(V1=>{"use strict";Object.defineProperty(V1,"__esModule",{value:!0});var l$e=F1(),u$e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,l$e.validateTuple)(t,"items")};V1.default=u$e});var JK=z(W1=>{"use strict";Object.defineProperty(W1,"__esModule",{value:!0});var YK=Xe(),d$e=xt(),p$e=Ii(),f$e=q1(),m$e={message:({params:{len:t}})=>(0,YK.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,YK._)`{limit: ${t}}`},h$e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:m$e,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,d$e.alwaysValidSchema)(n,e)&&(i?(0,f$e.validateAdditionalItems)(t,i):t.ok((0,p$e.validateArray)(t)))}};W1.default=h$e});var XK=z(B1=>{"use strict";Object.defineProperty(B1,"__esModule",{value:!0});var Ti=Xe(),gb=xt(),g$e={message:({params:{min:t,max:e}})=>e===void 0?(0,Ti.str)`must contain at least ${t} valid item(s)`:(0,Ti.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ti._)`{minContains: ${t}}`:(0,Ti._)`{minContains: ${t}, maxContains: ${e}}`},v$e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:g$e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,s=l):a=1;let u=e.const("len",(0,Ti._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,gb.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,gb.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,gb.alwaysValidSchema)(o,r)){let v=(0,Ti._)`${u} >= ${a}`;s!==void 0&&(v=(0,Ti._)`${v} && ${u} <= ${s}`),t.pass(v);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,Ti._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,u,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:gb.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,Ti._)`${v}++`),s===void 0?e.if((0,Ti._)`${v} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Ti._)`${v} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Ti._)`${v} >= ${a}`,()=>e.assign(d,!0)))}}};B1.default=v$e});var rH=z(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.validateSchemaDeps=So.validatePropertyDeps=So.error=void 0;var G1=Xe(),y$e=xt(),Lm=Ii();So.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,G1.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,G1._)`{property: ${t},
253
+ missingProperty: ${n},
254
+ depsCount: ${e},
255
+ deps: ${r}}`};var _$e={keyword:"dependencies",type:"object",schemaType:"object",error:So.error,code(t){let[e,r]=b$e(t);eH(t,e),tH(t,r)}};function b$e({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function eH(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,Lm.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of s)(0,Lm.checkReportMissingProp)(t,l)}):(r.if((0,G1._)`${c} && (${(0,Lm.checkMissingProp)(t,s,o)})`),(0,Lm.reportMissingProp)(t,o),r.else())}}So.validatePropertyDeps=eH;function tH(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,y$e.alwaysValidSchema)(o,e[s])||(r.if((0,Lm.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}So.validateSchemaDeps=tH;So.default=_$e});var iH=z(K1=>{"use strict";Object.defineProperty(K1,"__esModule",{value:!0});var nH=Xe(),x$e=xt(),w$e={message:"property name must be valid",params:({params:t})=>(0,nH._)`{propertyName: ${t.propertyName}}`},S$e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:w$e,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,x$e.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,nH.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};K1.default=S$e});var Q1=z(H1=>{"use strict";Object.defineProperty(H1,"__esModule",{value:!0});var vb=Ii(),to=Xe(),k$e=Yo(),yb=xt(),$$e={message:"must NOT have additional properties",params:({params:t})=>(0,to._)`{additionalProperty: ${t.additionalProperty}}`},E$e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$$e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,yb.alwaysValidSchema)(a,r))return;let l=(0,vb.allSchemaProperties)(n.properties),u=(0,vb.allSchemaProperties)(n.patternProperties);d(),t.ok((0,to._)`${o} === ${k$e.default.errors}`);function d(){e.forIn("key",i,g=>{!l.length&&!u.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(l.length>8){let y=(0,yb.schemaRefOrVal)(a,n.properties,"properties");h=(0,vb.isOwnProperty)(e,y,g)}else l.length?h=(0,to.or)(...l.map(y=>(0,to._)`${g} === ${y}`)):h=to.nil;return u.length&&(h=(0,to.or)(h,...u.map(y=>(0,to._)`${(0,vb.usePattern)(t,y)}.test(${g})`))),(0,to.not)(h)}function p(g){e.code((0,to._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,yb.alwaysValidSchema)(a,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,to.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,to.not)(h),()=>e.break()))}}function v(g,h,y){let _={keyword:"additionalProperties",dataProp:g,dataPropType:yb.Type.Str};y===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(_,h)}}};H1.default=E$e});var sH=z(J1=>{"use strict";Object.defineProperty(J1,"__esModule",{value:!0});var I$e=Im(),oH=Ii(),Y1=xt(),aH=Q1(),P$e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&aH.default.code(new I$e.KeywordCxt(o,aH.default,"additionalProperties"));let a=(0,oH.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Y1.mergeEvaluated.props(e,(0,Y1.toHash)(a),o.props));let s=a.filter(d=>!(0,Y1.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)l(d)?u(d):(e.if((0,oH.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};J1.default=P$e});var dH=z(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});var cH=Ii(),_b=Xe(),lH=xt(),uH=xt(),T$e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,cH.allSchemaProperties)(r),c=s.filter(v=>(0,lH.alwaysValidSchema)(o,r[v]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof _b.Name)&&(o.props=(0,uH.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let v of s)l&&p(v),o.allErrors?m(v):(e.var(u,!0),m(v),e.if(u))}function p(v){for(let g in l)new RegExp(v).test(g)&&(0,lH.checkStrictMode)(o,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,_b._)`${(0,cH.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:uH.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,_b._)`${d}[${g}]`,!0):!h&&!o.allErrors&&e.if((0,_b.not)(u),()=>e.break())})})}}};X1.default=T$e});var pH=z(eN=>{"use strict";Object.defineProperty(eN,"__esModule",{value:!0});var O$e=xt(),z$e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,O$e.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};eN.default=z$e});var fH=z(tN=>{"use strict";Object.defineProperty(tN,"__esModule",{value:!0});var j$e=Ii(),N$e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:j$e.validateUnion,error:{message:"must match a schema in anyOf"}};tN.default=N$e});var mH=z(rN=>{"use strict";Object.defineProperty(rN,"__esModule",{value:!0});var bb=Xe(),R$e=xt(),C$e={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,bb._)`{passingSchemas: ${t.passing}}`},A$e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:C$e,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(l),t.result(a,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((u,d)=>{let f;(0,R$e.alwaysValidSchema)(i,u)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,bb._)`${c} && ${a}`).assign(a,!1).assign(s,(0,bb._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,bb.Name)})})}}};rN.default=A$e});var hH=z(nN=>{"use strict";Object.defineProperty(nN,"__esModule",{value:!0});var U$e=xt(),D$e={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,U$e.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};nN.default=D$e});var yH=z(iN=>{"use strict";Object.defineProperty(iN,"__esModule",{value:!0});var xb=Xe(),vH=xt(),M$e={message:({params:t})=>(0,xb.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,xb._)`{failingKeyword: ${t.ifClause}}`},L$e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:M$e,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,vH.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=gH(n,"then"),o=gH(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,l("then",u),l("else",u))}else i?e.if(s,l("then")):e.if((0,xb.not)(s),l("else"));t.pass(a,()=>t.error(!0));function c(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function l(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,xb._)`${u}`):t.setParams({ifClause:u})}}}};function gH(t,e){let r=t.schema[e];return r!==void 0&&!(0,vH.alwaysValidSchema)(t,r)}iN.default=L$e});var _H=z(oN=>{"use strict";Object.defineProperty(oN,"__esModule",{value:!0});var Z$e=xt(),q$e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Z$e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};oN.default=q$e});var bH=z(aN=>{"use strict";Object.defineProperty(aN,"__esModule",{value:!0});var F$e=q1(),V$e=QK(),W$e=F1(),B$e=JK(),G$e=XK(),K$e=rH(),H$e=iH(),Q$e=Q1(),Y$e=sH(),J$e=dH(),X$e=pH(),eEe=fH(),tEe=mH(),rEe=hH(),nEe=yH(),iEe=_H();function oEe(t=!1){let e=[X$e.default,eEe.default,tEe.default,rEe.default,nEe.default,iEe.default,H$e.default,Q$e.default,K$e.default,Y$e.default,J$e.default];return t?e.push(V$e.default,B$e.default):e.push(F$e.default,W$e.default),e.push(G$e.default),e}aN.default=oEe});var xH=z(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});var mr=Xe(),aEe={message:({schemaCode:t})=>(0,mr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,mr._)`{format: ${t}}`},sEe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:aEe,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:l,schemaEnv:u,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,mr._)`${m}[${a}]`),g=r.let("fType"),h=r.let("format");r.if((0,mr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,mr._)`${v}.type || "string"`).assign(h,(0,mr._)`${v}.validate`),()=>r.assign(g,(0,mr._)`"string"`).assign(h,v)),t.fail$data((0,mr.or)(y(),_()));function y(){return c.strictSchema===!1?mr.nil:(0,mr._)`${a} && !${h}`}function _(){let b=u.$async?(0,mr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,mr._)`${h}(${n})`,x=(0,mr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,mr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[o];if(!m){y();return}if(m===!0)return;let[v,g,h]=_(m);v===e&&t.pass(b());function y(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function _(x){let w=x instanceof RegExp?(0,mr.regexpCode)(x):c.code.formats?(0,mr._)`${c.code.formats}${(0,mr.getProperty)(o)}`:void 0,S=r.scopeValue("formats",{key:o,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,mr._)`${S}.validate`]:["string",x,S]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!u.$async)throw new Error("async format in sync schema");return(0,mr._)`await ${h}(${n})`}return typeof g=="function"?(0,mr._)`${h}(${n})`:(0,mr._)`${h}.test(${n})`}}}};sN.default=sEe});var wH=z(cN=>{"use strict";Object.defineProperty(cN,"__esModule",{value:!0});var cEe=xH(),lEe=[cEe.default];cN.default=lEe});var SH=z(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.contentVocabulary=ju.metadataVocabulary=void 0;ju.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ju.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var $H=z(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});var uEe=jK(),dEe=BK(),pEe=bH(),fEe=wH(),kH=SH(),mEe=[uEe.default,dEe.default,(0,pEe.default)(),fEe.default,kH.metadataVocabulary,kH.contentVocabulary];lN.default=mEe});var IH=z(wb=>{"use strict";Object.defineProperty(wb,"__esModule",{value:!0});wb.DiscrError=void 0;var EH;(function(t){t.Tag="tag",t.Mapping="mapping"})(EH||(wb.DiscrError=EH={}))});var TH=z(dN=>{"use strict";Object.defineProperty(dN,"__esModule",{value:!0});var Nu=Xe(),uN=IH(),PH=cb(),hEe=Pm(),gEe=xt(),vEe={message:({params:{discrError:t,tagName:e}})=>t===uN.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Nu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},yEe={keyword:"discriminator",type:"object",schemaType:"object",error:vEe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Nu._)`${r}${(0,Nu.getProperty)(s)}`);e.if((0,Nu._)`typeof ${l} == "string"`,()=>u(),()=>t.error(!1,{discrError:uN.DiscrError.Tag,tag:l,tagName:s})),t.ok(c);function u(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,Nu._)`${l} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:uN.DiscrError.Mapping,tag:l,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,Nu.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let b=0;b<a.length;b++){let x=a[b];if(x?.$ref&&!(0,gEe.schemaHasRulesButRef)(x,o.self.RULES)){let S=x.$ref;if(x=PH.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,S),x instanceof PH.SchemaEnv&&(x=x.schema),x===void 0)throw new hEe.default(o.opts.uriResolver,o.baseId,S)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),y(w,b)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(s)}function y(b,x){if(b.const)_(b.const,x);else if(b.enum)for(let w of b.enum)_(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function _(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[b]=x}}}};dN.default=yEe});var OH=z((k9e,_Ee)=>{_Ee.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var jH=z((tr,pN)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=tr.Ajv=void 0;var bEe=EK(),xEe=$H(),wEe=TH(),zH=OH(),SEe=["/properties"],Sb="http://json-schema.org/draft-07/schema",Ru=class extends bEe.default{_addVocabularies(){super._addVocabularies(),xEe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(wEe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(zH,SEe):zH;this.addMetaSchema(e,Sb,!1),this.refs["http://json-schema.org/schema"]=Sb}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Sb)?Sb:void 0)}};tr.Ajv=Ru;pN.exports=tr=Ru;pN.exports.Ajv=Ru;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=Ru;var kEe=Im();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return kEe.KeywordCxt}});var Cu=Xe();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return Cu._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return Cu.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return Cu.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return Cu.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return Cu.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return Cu.CodeGen}});var $Ee=ab();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return $Ee.default}});var EEe=Pm();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return EEe.default}})});var NH=z(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.formatLimitDefinition=void 0;var IEe=jH(),ro=Xe(),Ga=ro.operators,kb={formatMaximum:{okStr:"<=",ok:Ga.LTE,fail:Ga.GT},formatMinimum:{okStr:">=",ok:Ga.GTE,fail:Ga.LT},formatExclusiveMaximum:{okStr:"<",ok:Ga.LT,fail:Ga.GTE},formatExclusiveMinimum:{okStr:">",ok:Ga.GT,fail:Ga.LTE}},PEe={message:({keyword:t,schemaCode:e})=>(0,ro.str)`should be ${kb[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ro._)`{comparison: ${kb[t].okStr}, limit: ${e}}`};Au.formatLimitDefinition={keyword:Object.keys(kb),type:"string",schemaType:"string",$data:!0,error:PEe,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:o}=t,{opts:a,self:s}=o;if(!a.validateFormats)return;let c=new IEe.KeywordCxt(o,s.RULES.all.format.definition,"format");c.$data?l():u();function l(){let f=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),p=e.const("fmt",(0,ro._)`${f}[${c.schemaCode}]`);t.fail$data((0,ro.or)((0,ro._)`typeof ${p} != "object"`,(0,ro._)`${p} instanceof RegExp`,(0,ro._)`typeof ${p}.compare != "function"`,d(p)))}function u(){let f=c.schema,p=s.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let m=e.scopeValue("formats",{key:f,ref:p,code:a.code.formats?(0,ro._)`${a.code.formats}${(0,ro.getProperty)(f)}`:void 0});t.fail$data(d(m))}function d(f){return(0,ro._)`${f}.compare(${r}, ${n}) ${kb[i].fail} 0`}},dependencies:["format"]};var TEe=t=>(t.addKeyword(Au.formatLimitDefinition),t);Au.default=TEe});var UH=z((Zm,AH)=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var Uu=yG(),OEe=NH(),fN=Xe(),RH=new fN.Name("fullFormats"),zEe=new fN.Name("fastFormats"),mN=(t,e={keywords:!0})=>{if(Array.isArray(e))return CH(t,e,Uu.fullFormats,RH),t;let[r,n]=e.mode==="fast"?[Uu.fastFormats,zEe]:[Uu.fullFormats,RH],i=e.formats||Uu.formatNames;return CH(t,i,r,n),e.keywords&&(0,OEe.default)(t),t};mN.get=(t,e="full")=>{let n=(e==="fast"?Uu.fastFormats:Uu.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function CH(t,e,r,n){var i,o;(i=(o=t.opts.code).formats)!==null&&i!==void 0||(o.formats=(0,fN._)`require("ajv-formats/dist/formats").${n}`);for(let a of e)t.addFormat(a,r[a])}AH.exports=Zm=mN;Object.defineProperty(Zm,"__esModule",{value:!0});Zm.default=mN});function jEe(){let t=new DH.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,MH.default)(t),t}var DH,MH,$b,LH=P(()=>{DH=Xu(uG(),1),MH=Xu(UH(),1);$b=class{constructor(e){this._ajv=e??jEe()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var Eb,ZH=P(()=>{Df();Eb=class{constructor(e){this._client=e}async*callToolStream(e,r=ou,n){let i=this._client,o={...n,task:n?.task??(i.isToolTask(e.name)?{}:void 0)},a=i.requestStream({method:"tools/call",params:e},r,o),s=i.getToolOutputValidator(e.name);for await(let c of a){if(c.type==="result"&&s){let l=c.result;if(!l.structuredContent&&!l.isError){yield{type:"error",error:new Ie(De.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(l.structuredContent)try{let u=s(l.structuredContent);if(!u.valid){yield{type:"error",error:new Ie(De.InvalidParams,`Structured content does not match the tool's output schema: ${u.errorMessage}`)};return}}catch(u){if(u instanceof Ie){yield{type:"error",error:u};return}yield{type:"error",error:new Ie(De.InvalidParams,`Failed to validate structured content: ${u instanceof Error?u.message:String(u)}`)};return}}yield c}}async getTask(e,r){return this._client.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._client.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._client.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._client.cancelTask({taskId:e},r)}requestStream(e,r,n){return this._client.requestStream(e,r,n)}}});function qH(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function FH(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var VH=P(()=>{});function Ib(t,e){if(!(!t||e===null||typeof e!="object")){if(t.type==="object"&&t.properties&&typeof t.properties=="object"){let r=e,n=t.properties;for(let i of Object.keys(n)){let o=n[i];r[i]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[i]=o.default),r[i]!==void 0&&Ib(o,r[i])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&Ib(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&Ib(r,e)}}function NEe(t){if(!t)return{supportsFormMode:!1,supportsUrlMode:!1};let e=t.form!==void 0,r=t.url!==void 0;return{supportsFormMode:e||!e&&!r,supportsUrlMode:r}}var Pb,WH=P(()=>{DW();Df();LH();e_();ZH();VH();Pb=class extends f_{constructor(e,r){super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new $b,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",UO,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",CO,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",PO,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Eb(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=UW(this._capabilities,e)}setRequestHandler(e,r){let i=Xy(e)?.method;if(!i)throw new Error("Schema is missing a method literal");let o;if(ru(i)){let s=i;o=s._zod?.def?.value??s.value}else{let s=i;o=s._def?.value??s.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");let a=o;if(a==="elicitation/create"){let s=async(c,l)=>{let u=Gi(ZO,c);if(!u.success){let y=u.error instanceof Error?u.error.message:String(u.error);throw new Ie(De.InvalidParams,`Invalid elicitation request: ${y}`)}let{params:d}=u.data;d.mode=d.mode??"form";let{supportsFormMode:f,supportsUrlMode:p}=NEe(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new Ie(De.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!p)throw new Ie(De.InvalidParams,"Client does not support URL-mode elicitation requests");let m=await Promise.resolve(r(c,l));if(d.task){let y=Gi(Xs,m);if(!y.success){let _=y.error instanceof Error?y.error.message:String(y.error);throw new Ie(De.InvalidParams,`Invalid task creation result: ${_}`)}return y.data}let v=Gi(qO,m);if(!v.success){let y=v.error instanceof Error?v.error.message:String(v.error);throw new Ie(De.InvalidParams,`Invalid elicitation result: ${y}`)}let g=v.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&g.action==="accept"&&g.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{Ib(h,g.content)}catch{}return g};return super.setRequestHandler(e,s)}if(a==="sampling/createMessage"){let s=async(c,l)=>{let u=Gi(DO,c);if(!u.success){let g=u.error instanceof Error?u.error.message:String(u.error);throw new Ie(De.InvalidParams,`Invalid sampling request: ${g}`)}let{params:d}=u.data,f=await Promise.resolve(r(c,l));if(d.task){let g=Gi(Xs,f);if(!g.success){let h=g.error instanceof Error?g.error.message:String(g.error);throw new Ie(De.InvalidParams,`Invalid task creation result: ${h}`)}return g.data}let m=d.tools||d.toolChoice?LO:MO,v=Gi(m,f);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new Ie(De.InvalidParams,`Invalid sampling result: ${g}`)}return v.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,r)}assertCapability(e,r){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:vO,capabilities:this._capabilities,clientInfo:this._clientInfo}},wO,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!gW.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){qH(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&FH(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},Js,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},FO,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Js,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},RO,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},TO,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},kO,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},$O,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},IO,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Js,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Js,r)}async callTool(e,r=ou,n){if(this.isToolTaskRequired(e.name))throw new Ie(De.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let i=await this.request({method:"tools/call",params:e},r,n),o=this.getToolOutputValidator(e.name);if(o){if(!i.structuredContent&&!i.isError)throw new Ie(De.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{let a=o(i.structuredContent);if(!a.valid)throw new Ie(De.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){throw a instanceof Ie?a:new Ie(De.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return i}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of e){if(r.outputSchema){let i=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,i)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let n=await this.request({method:"tools/list",params:e},AO,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,i){let o=jW.safeParse(n);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:s}=o.data,{onChanged:c}=n,l=async()=>{if(!a){c(null,null);return}try{let d=await i();c(null,d)}catch(d){let f=d instanceof Error?d:new Error(String(d));c(f,null)}},u=()=>{if(s){let d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);let f=setTimeout(l,s);this._listChangedDebounceTimers.set(e,f)}else l()};this.setNotificationHandler(r,u)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var QH=z((U9e,HH)=>{HH.exports=KH;KH.sync=CEe;var BH=Tt("fs");function REe(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function GH(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:REe(e,r)}function KH(t,e,r){BH.stat(t,function(n,i){r(n,n?!1:GH(i,t,e))})}function CEe(t,e){return GH(BH.statSync(t),t,e)}});var t5=z((D9e,e5)=>{e5.exports=JH;JH.sync=AEe;var YH=Tt("fs");function JH(t,e,r){YH.stat(t,function(n,i){r(n,n?!1:XH(i,e))})}function AEe(t,e){return XH(YH.statSync(t),e)}function XH(t,e){return t.isFile()&&UEe(t,e)}function UEe(t,e){var r=t.mode,n=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),a=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),s=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=s|c,d=r&l||r&c&&i===a||r&s&&n===o||r&u&&o===0;return d}});var n5=z((L9e,r5)=>{var M9e=Tt("fs"),Tb;process.platform==="win32"||global.TESTING_WINDOWS?Tb=QH():Tb=t5();r5.exports=hN;hN.sync=DEe;function hN(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){hN(t,e||{},function(o,a){o?i(o):n(a)})})}Tb(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function DEe(t,e){try{return Tb.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var u5=z((Z9e,l5)=>{var Du=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",i5=Tt("path"),MEe=Du?";":":",o5=n5(),a5=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),s5=(t,e)=>{let r=e.colon||MEe,n=t.match(/\//)||Du&&t.match(/\\/)?[""]:[...Du?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=Du?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Du?i.split(r):[""];return Du&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},c5=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:o}=s5(t,e),a=[],s=l=>new Promise((u,d)=>{if(l===n.length)return e.all&&a.length?u(a):d(a5(t));let f=n[l],p=/^".*"$/.test(f)?f.slice(1,-1):f,m=i5.join(p,t),v=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;u(c(v,l,0))}),c=(l,u,d)=>new Promise((f,p)=>{if(d===i.length)return f(s(u+1));let m=i[d];o5(l+m,{pathExt:o},(v,g)=>{if(!v&&g)if(e.all)a.push(l+m);else return f(l+m);return f(c(l,u,d+1))})});return r?s(0).then(l=>r(null,l),r):s(0)},LEe=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=s5(t,e),o=[];for(let a=0;a<r.length;a++){let s=r[a],c=/^".*"$/.test(s)?s.slice(1,-1):s,l=i5.join(c,t),u=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let f=u+n[d];try{if(o5.sync(f,{pathExt:i}))if(e.all)o.push(f);else return f}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw a5(t)};l5.exports=c5;c5.sync=LEe});var p5=z((q9e,gN)=>{"use strict";var d5=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};gN.exports=d5;gN.exports.default=d5});var g5=z((F9e,h5)=>{"use strict";var f5=Tt("path"),ZEe=u5(),qEe=p5();function m5(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let a;try{a=ZEe.sync(t.command,{path:r[qEe({env:r})],pathExt:e?f5.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=f5.resolve(i?t.options.cwd:"",a)),a}function FEe(t){return m5(t)||m5(t,!0)}h5.exports=FEe});var v5=z((V9e,yN)=>{"use strict";var vN=/([()\][%!^"`<>&|;, *?])/g;function VEe(t){return t=t.replace(vN,"^$1"),t}function WEe(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(vN,"^$1"),e&&(t=t.replace(vN,"^$1")),t}yN.exports.command=VEe;yN.exports.argument=WEe});var _5=z((W9e,y5)=>{"use strict";y5.exports=/^#!(.*)/});var x5=z((B9e,b5)=>{"use strict";var BEe=_5();b5.exports=(t="")=>{let e=t.match(BEe);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var S5=z((G9e,w5)=>{"use strict";var _N=Tt("fs"),GEe=x5();function KEe(t){let r=Buffer.alloc(150),n;try{n=_N.openSync(t,"r"),_N.readSync(n,r,0,150,0),_N.closeSync(n)}catch{}return GEe(r.toString())}w5.exports=KEe});var I5=z((K9e,E5)=>{"use strict";var HEe=Tt("path"),k5=g5(),$5=v5(),QEe=S5(),YEe=process.platform==="win32",JEe=/\.(?:com|exe)$/i,XEe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function eIe(t){t.file=k5(t);let e=t.file&&QEe(t.file);return e?(t.args.unshift(t.file),t.command=e,k5(t)):t.file}function tIe(t){if(!YEe)return t;let e=eIe(t),r=!JEe.test(e);if(t.options.forceShell||r){let n=XEe.test(e);t.command=HEe.normalize(t.command),t.command=$5.command(t.command),t.args=t.args.map(o=>$5.argument(o,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function rIe(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:tIe(n)}E5.exports=rIe});var O5=z((H9e,T5)=>{"use strict";var bN=process.platform==="win32";function xN(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function nIe(t,e){if(!bN)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let o=P5(i,e);if(o)return r.call(t,"error",o)}return r.apply(t,arguments)}}function P5(t,e){return bN&&t===1&&!e.file?xN(e.original,"spawn"):null}function iIe(t,e){return bN&&t===1&&!e.file?xN(e.original,"spawnSync"):null}T5.exports={hookChildProcess:nIe,verifyENOENT:P5,verifyENOENTSync:iIe,notFoundError:xN}});var N5=z((Q9e,Mu)=>{"use strict";var z5=Tt("child_process"),wN=I5(),SN=O5();function j5(t,e,r){let n=wN(t,e,r),i=z5.spawn(n.command,n.args,n.options);return SN.hookChildProcess(i,n),i}function oIe(t,e,r){let n=wN(t,e,r),i=z5.spawnSync(n.command,n.args,n.options);return i.error=i.error||SN.verifyENOENTSync(i.status,n),i}Mu.exports=j5;Mu.exports.spawn=j5;Mu.exports.sync=oIe;Mu.exports._parse=wN;Mu.exports._enoent=SN});function aIe(t){return kW.parse(JSON.parse(t))}function R5(t){return JSON.stringify(t)+`
256
+ `}var Ob,C5=P(()=>{Df();Ob=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
257
+ `);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),aIe(r)}clear(){this._buffer=void 0}}});import kN from"node:process";import{PassThrough as sIe}from"node:stream";function lIe(){let t={};for(let e of cIe){let r=kN.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}var A5,cIe,zb,U5=P(()=>{A5=Xu(N5(),1);C5();cIe=kN.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];zb=class{constructor(e){this._readBuffer=new Ob,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new sIe)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,A5.default)(this._serverParams.command,this._serverParams.args??[],{env:{...lIe(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:kN.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=R5(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}}});var qm,$N=P(()=>{WH();U5();ni();qm=class{#e=new Map;async ensureServer(e,r){if(this.#e.has(e))return this.#e.get(e);let{command:n,args:i=[],env:o={}}=r;Z.debug(`[MCP] Starting ${e}: ${n} ${i.join(" ")}`);let a=new zb({command:n,args:i,env:{...process.env,...o}}),s=new Pb({name:`zibby-chat-${e}`,version:"1.0.0"},{capabilities:{}});await s.connect(a);let c={client:s,transport:a,serverConfig:r};return this.#e.set(e,c),c}async callTool(e,r,n={}){let i=this.#e.get(e);if(!i)throw new Error(`MCP server "${e}" not running`);Z.debug(`[MCP] ${e}.${r}(${JSON.stringify(n).slice(0,200)})`);let o=await i.client.callTool({name:r,arguments:n});return{text:o.content?.filter(s=>s.type==="text").map(s=>s.text).join(`
258
+ `)||"",isError:o.isError||!1}}isRunning(e){return this.#e.has(e)}async stopServer(e){let r=this.#e.get(e);if(r){try{await r.client.close()}catch(n){Z.debug(`[MCP] Error closing ${e}: ${n.message}`)}this.#e.delete(e)}}async stopAll(){let e=[...this.#e.keys()];await Promise.allSettled(e.map(r=>this.stopServer(r)))}}});import{existsSync as uIe,readFileSync as dIe}from"fs";import{join as pIe}from"path";import{homedir as fIe}from"os";function mIe(){try{let t=pIe(fIe(),".zibby","config.json");return uIe(t)?JSON.parse(dIe(t,"utf-8")):{}}catch{return{}}}function jb(t){return String(t||"").replace(/\/v1\/?$/,"")}function hIe(t,e){let r=process.env.OPENAI_PROXY_URL;if(r)return jb(r);if(t==="session")return e.proxyUrl?jb(e.proxyUrl):`${(process.env.ZIBBY_API_URL||"https://api-prod.zibby.app").replace(/\/$/,"")}/openai-proxy`;if(t==="byok"){let n=process.env.OPENAI_BASE_URL;return jb(n||"https://api.openai.com")}return jb(r||"")}function EN(){let t=mIe(),e=process.env.ZIBBY_USER_TOKEN||t.sessionToken||null,r=process.env.OPENAI_API_KEY||null,n=(process.env.ASSISTANT_AUTH_MODE||"").trim().toLowerCase(),i=process.env.OPENAI_PROXY_NO_AUTH==="true",o=process.env.OPENAI_PROXY_URL,a="session";n==="byok"||n==="local"||n==="session"?a=n:e?a="session":r?a="byok":o&&i&&(a="local");let s=hIe(a,t),c={"Content-Type":"application/json"};if(a==="session"){if(!e)return{ok:!1,mode:a,reason:"missing_session_token"};c.Authorization=`Bearer ${e}`}else if(a==="byok"){if(!r)return{ok:!1,mode:a,reason:"missing_openai_api_key"};c.Authorization=`Bearer ${r}`}else if(a==="local"){if(!s)return{ok:!1,mode:a,reason:"missing_openai_proxy_url"};!i&&r&&(c.Authorization=`Bearer ${r}`)}return s?{ok:!0,mode:a,baseUrl:s,headers:c,tokenPreview:c.Authorization?`***${c.Authorization.slice(-4)}`:"none"}:{ok:!1,mode:a,reason:"missing_base_url"}}var D5=P(()=>{});function Nb(t,e){let r=String(t??"");return r.length<=e?r:`${r.slice(0,Math.max(0,e-30))}
259
+
260
+ [tool result truncated for size]`}function gIe(t,e){if(typeof t=="string")return Nb(t,e);try{return Nb(JSON.stringify(t),e)}catch{return Nb(String(t),e)}}function M5(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let o of i.tool_calls)e.add(o.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:a,...s}=i;return{...s,content:s.content||""}})}function vIe(t){let e=Array.isArray(t?.messages)?t.messages:[],r=e.find(o=>o.role==="system"),n=e.slice(-4).map(o=>({...o,content:Nb(o.content,o.role==="tool"?1200:2500)}));n=M5(n);let i={...t,messages:[r,...n].filter(Boolean)};return delete i.tools,i}async function yIe({body:t,streaming:e,auth:r,options:n,fetchCompletion:i,fetchStreamingCompletion:o,onFallbackLog:a}){try{return e?await o(t,r,n):await i(t,r,n)}catch(s){let c=String(s?.message||s||"");if(!/proxy error 413|payload too large/i.test(c))throw s;let l=vIe(t);return typeof a=="function"&&a(t,l),{data:e?await o(l,r,n):await i(l,r,n),fallback:l}}}async function L5({body:t,auth:e,options:r,streaming:n,toolContext:i,activeSkills:o,round:a,verbose:s,dependencies:c,config:l={}}){let u=l.maxToolResultChars||3e3,{fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p,hasToolCalls:m,getTextContent:v,parseToolCalls:g,buildAssistantMessage:h,buildToolResultMessage:y,executeTool:_,onToolCallLog:b,injectTools:x}=c;Array.isArray(t?.messages)&&(t.messages=M5(t.messages));let w=await yIe({body:t,streaming:n,auth:e,options:r,fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p}),S=w?.data||w;if(!m(S))return{done:!0,text:v(S),body:w?.fallback||t};let $=g(S),T=w?.fallback||t;T.messages.push(h(S)),s&&typeof b=="function"&&b($);let A=await Promise.all($.map((I,U)=>(typeof r.onToolCall=="function"&&r.onToolCall(I.name,I.args,{round:a,index:U,total:$.length}),_(I,i))));for(let I=0;I<$.length;I++){let L=$[I].name==="get_skill_context"?typeof A[I]=="string"?A[I]:JSON.stringify(A[I]):gIe(A[I],u);T.messages.push(y($[I].id,L))}return typeof r.onToolCall=="function"&&r.onToolCall(null),x(T,o),{done:!1,body:T}}var Z5=P(()=>{});function Zu(t){!t||typeof t!="object"||(t.type==="object"&&t.properties&&(t.required=Object.keys(t.properties),t.additionalProperties=!1,Object.values(t.properties).forEach(Zu)),t.type==="array"&&t.items&&Zu(t.items),t.anyOf&&t.anyOf.forEach(Zu),t.oneOf&&t.oneOf.forEach(Zu),t.allOf&&t.allOf.forEach(Zu))}function Rb(t){return Array.isArray(t)?new Set(t.map(e=>String(e||"").trim()).filter(Boolean)):new Set}function wIe(t){return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):[]}var _Ie,bIe,IN,q5,Lu,xIe,qu,F5=P(()=>{Ja();ni();ra();uO();$N();$o();D5();Z5();_Ie=qr.ASSISTANT,bIe=15,IN="get_skill_context";q5={maxBytes:49e3,systemMaxChars:12e3},Lu=()=>process.env.ZIBBY_VERBOSE==="true"||process.env.ZIBBY_DEBUG==="true",xIe=t=>Buffer.byteLength(JSON.stringify(t),"utf8");qu=class extends rn{#e;#t;#r=new qm;constructor(e=null){super("assistant","Zibby Assistant",200),e&&typeof e=="object"&&(e.toolProvider||e.completionProvider)?(this.#e=e.toolProvider||new Ys,this.#t=e.completionProvider||new tu):(this.#e=e||new Ys,this.#t=new tu)}canHandle(e){return EN().ok}async invoke(e,r={}){let n=r.model&&r.model!=="auto"?r.model:_Ie,i=EN();if(!i.ok)throw i.reason==="missing_session_token"?new Error("Login required. Run `zibby login` to authenticate."):i.reason==="missing_openai_api_key"?new Error("Missing OPENAI_API_KEY for BYOK mode."):i.reason==="missing_openai_proxy_url"?new Error("Missing OPENAI_PROXY_URL for local mode."):new Error(`Assistant auth unavailable (${i.reason}).`);let o=r.messages||[{role:"user",content:e}],a=i.baseUrl,s=Lu();if(s?await this.#m(o,n,a,i.tokenPreview||"none"):Z.debug(`[Assistant] ${a} | model: ${n} | messages: ${o.length}`),r.schema)return this.#l(n,o,i,r);let c=r.activeSkills||[],l=this.#d(r),u=this.#p(c,l),d=this.#f(u),f=this.#u(r),p={...r,payloadCompaction:f},m={activeSkills:u,options:p,executionRegistry:d,capabilityPolicy:l},v=!!r.stream,g={model:n,messages:[...o],stream:!1};this.#i(g,u,l);for(let h=0;h<bIe;h++){if(r.signal?.aborted)throw new Error("Aborted");let y=await L5({body:g,auth:i,options:p,streaming:v,toolContext:m,activeSkills:u,round:h,verbose:s,dependencies:{fetchCompletion:this.#o.bind(this),fetchStreamingCompletion:this.#c.bind(this),onFallbackLog:(_,b)=>{Lu()&&console.log(`413 fallback: messages ${_.messages.length} -> ${b.messages.length}, bytes=${xIe(b)}`)},hasToolCalls:_=>this.#e.hasToolCalls(_),getTextContent:_=>this.#e.getTextContent(_),parseToolCalls:_=>this.#e.parseToolCalls(_),buildAssistantMessage:_=>this.#e.buildAssistantMessage(_),buildToolResultMessage:(_,b)=>this.#e.buildToolResultMessage(_,b),executeTool:(_,b)=>this.#s(_,b),onToolCallLog:async _=>{let b=(await import("chalk")).default;console.log(b.dim(` ${_.map(x=>`${x.name}(${JSON.stringify(x.args).slice(0,80)})`).join(", ")}`))},injectTools:(_,b)=>this.#i(_,b,l)},config:{maxToolResultChars:r.maxToolResultChars||3e3}});if(y.done)return y.text;g.messages=y.body.messages,y.body.tools?g.tools=y.body.tools:delete g.tools}return"I hit my tool-calling limit for this turn. Please try again."}async cleanup(){await this.#r.stopAll()}#i(e,r,n=null){let i=this.#a(r,n),o=this.#e.formatTools(i);this.#e.injectToolsIntoBody(e,o)}#a(e,r=null){let n=[],i=new Set;for(let o of e){let a=Fr(o);if(a?.tools?.length)for(let s of a.tools)this.#n(s.name,r)&&(i.has(s.name)||(i.add(s.name),n.push({name:s.name,description:s.description,parameters:s.parameters||s.input_schema||{type:"object",properties:{}}})))}return!r?.disableSkillContextTool&&this.#n(IN,r)&&n.push({name:IN,description:"Fetch full prompt guidance/instructions for one installed skill on demand. Use this before making complex tool decisions if guidance is needed.",parameters:{type:"object",properties:{skillId:{type:"string",description:"Installed skill id to inspect (e.g. jira, github, runner, chat-memory)"}},required:["skillId"]}}),n}async#s(e,r){let{activeSkills:n,options:i,executionRegistry:o,capabilityPolicy:a}=r;if(!this.#n(e.name,a))return`Tool "${e.name}" blocked by policy`;if(e.name===IN){let l=String(e.args?.skillId||"").trim();if(!l)return JSON.stringify({error:"skillId is required"});if(!n.includes(l))return JSON.stringify({error:`Skill "${l}" is not active`,activeSkills:n});let u=Fr(l);if(!u)return JSON.stringify({error:`Skill "${l}" not found`});let d=typeof u.promptFragment=="function"?u.promptFragment():u.promptFragment||"",f=(u.tools||[]).map(m=>m.name),p=JSON.stringify({skillId:l,description:u.description||"",toolNames:f,promptFragment:d||""});return Lu()&&(console.log(`
261
+ \u{1F4D6} get_skill_context("${l}") \u2192 ${p.length} chars (fragment: ${d.length} chars)`),console.log(` tools: [${f.join(", ")}]`),console.log(` fragment preview: ${d.slice(0,200).replace(/\n/g,"\\n")}\u2026
262
+ `)),p}let s=o?.get(e.name)||null;if(!s)return`Unknown tool: ${e.name}`;let c=Fr(s.skillId);if(!c)return`Skill "${s.skillId}" not found for tool "${e.name}"`;if(s.mode==="handler")try{return c.handleToolCall(e.name,e.args,r)}catch(l){return`Error in ${e.name}: ${l.message}`}if(s.mode==="mcp")try{if(!this.#r.isRunning(c.serverName)){let u=c.resolve(i);if(!u)return`Skill "${s.skillId}" is not available (cannot start server)`;await this.#r.ensureServer(c.serverName,u)}let l=await this.#r.callTool(c.serverName,e.name,e.args);return l.text||(l.isError?"Tool call failed":"Done")}catch(l){return`MCP error (${c.serverName}): ${l.message}`}return`Skill "${s.skillId}" owns tool "${e.name}" but has no execution mode`}async#c(e,r,n){return this.#t.fetchStreamingCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:o})=>{Lu()&&console.log(`payload bytes (stream) before=${i} after=${o.bytes} trimmed=${o.trimmed} messages=${o.messageCount}`)}})}async#o(e,r,n){return this.#t.fetchCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:o})=>{Lu()&&console.log(`payload bytes before=${i} after=${o.bytes} trimmed=${o.trimmed} messages=${o.messageCount}`)}})}async#l(e,r,n,i){let{zodToJsonSchema:o}=await Promise.resolve().then(()=>(ca(),FR)),a=typeof i.schema?.parse=="function",s=a?o(i.schema):i.schema;delete s.$schema,Zu(s);let c={model:e,messages:r,stream:!1,response_format:{type:"json_schema",json_schema:{name:"extract",schema:s,strict:!0}}},l=await this.#o(c,n,i),u=this.#e.getTextContent(l),d=JSON.parse(u),f=a?i.schema.parse(d):d;return{raw:u,structured:f}}#u(e={}){let r=e?.config?.agent?.assistant?.payloadCompaction||{};return{maxBytes:Number(r.maxBytes||e.maxPayloadBytes||q5.maxBytes),systemMaxChars:Number(r.systemMaxChars||q5.systemMaxChars)}}#d(e={}){let r=e?.config?.agent?.assistant?.toolPolicy||{};return{allowTools:Rb(r.allowTools||e.allowTools),denyTools:Rb(r.denyTools||e.denyTools),denyPrefixes:wIe(r.denyPrefixes||e.denyToolPrefixes),includeSkills:Rb(r.includeSkills||e.includeSkills),excludeSkills:Rb(r.excludeSkills||e.excludeSkills),disableSkillContextTool:!!(r.disableSkillContextTool||e.disableSkillContextTool)}}#p(e,r){let n=r?.includeSkills||new Set,i=r?.excludeSkills||new Set;return n.size===0&&i.size===0?e:e.filter(o=>!(n.size>0&&!n.has(o)||i.has(o)))}#n(e,r){let n=String(e||"").trim();if(!n)return!1;let i=r?.allowTools;if(i&&i.size>0&&!i.has(n))return!1;let o=r?.denyTools;return!(o&&o.has(n)||(r?.denyPrefixes||[]).some(s=>n.startsWith(s)))}#f(e){let r=new Map,n=[];for(let i of e){let o=Fr(i);if(!o?.tools?.length)continue;let a=typeof o.handleToolCall=="function"?"handler":o.serverName&&typeof o.resolve=="function"?"mcp":null;if(a)for(let s of o.tools){let c=String(s?.name||"").trim();if(c){if(r.has(c)){n.push({tool:c,winner:r.get(c).skillId,skipped:i});continue}r.set(c,{skillId:i,mode:a})}}}if(n.length>0&&Lu()){let i=n.slice(0,5).map(o=>`${o.tool}:${o.winner}>${o.skipped}`).join(", ");console.log(`tool registry collisions: ${i}${n.length>5?" ...":""}`)}return r}async#m(e,r,n,i){console.log(`
263
+ \u25C6 Model: ${r} | proxy: ${n} | token: ${i||"none"}
264
+ `);let o=(await import("chalk")).default;console.log(o.bold("Prompt sent to LLM:")),console.log(o.dim("\u2500".repeat(60)));let a=!1;for(let s of e)if(s.role==="system")console.log(o.dim(`[System] ${s.content||""}`));else{a||(console.log(o.dim("\u2500\u2500\u2500 chat history \u2500\u2500\u2500")),a=!0);let c=s.role==="user"?"Human":"AI",l=s.content?.length>200?`${s.content.slice(0,200)}...`:s.content||"";console.log(o.dim(`[${c}] ${l}`))}console.log(o.dim("\u2500".repeat(60)))}}});var TN={};Ln(TN,{AgentStrategy:()=>rn,AssistantStrategy:()=>qu,ClaudeAgentStrategy:()=>Yl,CodexAgentStrategy:()=>Jl,CursorAgentStrategy:()=>hl,GeminiAgentStrategy:()=>Xl,getAgentStrategy:()=>PN,invokeAgent:()=>W5});function PN(t={}){let{state:e={},preferredAgent:r=null}=t,n=r||e.agentType||process.env.AGENT_TYPE;if(!n)throw new Error("No agent specified. Set agent.claude, agent.cursor, agent.codex, or agent.gemini in .zibby.config.js");Z.debug(`Agent selection: requested=${n}`);let i=V5.find(o=>o.getName()===n);if(!i)throw new Error(`Unknown agent '${n}'. Available: ${V5.map(o=>o.getName()).join(", ")}`);if(Z.debug(`Checking if ${n} can handle this environment...`),!i.canHandle(t)){let a={assistant:"Run `zibby login` to authenticate",claude:"Set ANTHROPIC_API_KEY in .env",cursor:"Install cursor-agent CLI or set CURSOR_API_KEY",codex:"Install codex CLI (npm i -g @openai/codex) and set OPENAI_API_KEY in .env",gemini:"Install gemini CLI (npm i -g @google/gemini-cli) and set GEMINI_API_KEY in .env"}[n]||"Check your environment configuration";throw new Error(`Agent '${n}' is not available. ${a}`)}return Z.debug(`Using agent: ${i.getName()}`),i}async function W5(t,e={},r={}){try{await import("@zibby/skills")}catch{}let n=PN(e),i=e.state?.config||r.config||{},o=i.models||{},a=r.nodeName&&o[r.nodeName]||null,s=o.default||null,c=n.name,l=i.agent?.[c]?.model||null,u=a||s||l||r.model||null,d={...r,model:u,workspace:e.state?.workspace||r.workspace,schema:r.schema||e.schema,images:r.images||e.images||[],skills:r.skills||e.skills||[],config:i},f=d.skills||[];if(f.length>0&&!r.skipPromptFragments){let{getSkill:m}=await Promise.resolve().then(()=>($o(),dx)),v=f.map(g=>{let h=m(g)?.promptFragment;return typeof h=="function"?h():h}).filter(Boolean);v.length>0&&(t+=`
265
+
266
+ ${v.join(`
267
+
268
+ `)}`)}let p=e.state?._currentNodeConfig?.extraPromptInstructions?.trim();return p&&(t+=`
269
+
270
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
271
+ \u26A0\uFE0F PRIORITY OVERRIDE \u2014 THE FOLLOWING INSTRUCTIONS TAKE PRECEDENCE OVER ALL PREVIOUS CONTENT
272
+ \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
273
+
274
+ ${p}
275
+ `),Z.debug(`Prompt length: ${t.length} chars`),process.env.STAGE!=="prod"&&Z.debug(`Full prompt:
276
+ ${t}`),n.invoke(t,d)}var V5,Cb=P(()=>{v2();WV();XV();iW();F5();ni();Ja();V5=[new qu,new hl,new Yl,new Jl,new Xl]});var K5={};Ln(K5,{ConditionalNode:()=>Fm,Node:()=>bc});import{writeFileSync as ON,readFileSync as B5,existsSync as G5,mkdirSync as SIe}from"fs";import{join as zN,dirname as kIe}from"path";import Ab from"chalk";var bc,Fm,jN=P(()=>{fR();ni();Ya();no();bc=class{constructor(e){if(this.config=e,this.name=e.name,this.prompt=e.prompt,this.outputSchema=e.outputSchema,!this.outputSchema&&!e._isCustomCode)throw new Error(`Node '${this.name}' must define outputSchema (Zod schema). This defines the contract for what the node returns to state.`);this.isZodSchema=this.outputSchema&&typeof this.outputSchema._def<"u",this.parser=e.outputSchema&&!this.isZodSchema?new nh(e.outputSchema):null,this.retries=e.retries||0,this.onComplete=e.onComplete,this.customExecute=e.execute}async execute(e,r){let n=()=>r&&typeof r.getAll=="function"?r.getAll():e,i=d=>r&&typeof r.get=="function"?r.get(d):e?.[d];if(typeof this.customExecute=="function"){Z.info("\u26A1 Using custom execute method (skipping LLM)");try{let d=await this.customExecute(e);return typeof d=="object"&&d!==null&&d.success===!1?{success:!1,error:d.error||"Node execution failed",raw:d.raw||null}:this.isZodSchema?(Z.debug("Validating return value against outputSchema..."),{success:!0,output:this.outputSchema.parse(d),raw:null}):{success:!0,output:d,raw:null}}catch(d){return Z.error(`\u274C Node '${this.name}' execution failed: ${d.message}`),d.name==="ZodError"&&Z.error(`Schema validation errors: ${JSON.stringify(d.errors,null,2)}`),{success:!1,error:d.message,raw:null}}}let o=typeof this.prompt=="function"?this.prompt(n()):this.prompt,a=i("_skillHints");a&&(o=`${a}
277
+
278
+ ${o}`);let s=n(),c=s.cwd||process.cwd(),l=s.sessionPath;try{if(l){let d=zN(l,Oi);if(G5(d)){let p=JSON.parse(B5(d,"utf-8"));p.currentNode=this.name,ON(d,JSON.stringify(p,null,2),"utf-8")}let f=zN(l,"..",Oi);if(G5(f))try{let p=JSON.parse(B5(f,"utf-8"));p.currentNode=this.name,ON(f,JSON.stringify(p,null,2),"utf-8")}catch{}}}catch(d){Z.debug(`Could not update session info: ${d.message}`)}let u=null;for(let d=0;d<=this.retries;d++)try{Z.debug(`Node.execute attempt ${d} for '${this.name}'`);let f=n(),p=f.config||{},m={state:f},v={workspace:c,schema:this.isZodSchema?this.outputSchema:null,skills:this.config.skills||[],sessionPath:l,config:p,nodeName:this.name,timeout:this.config?.timeout||3e5},g=e?._coreInvokeAgent;g||(g=(await Promise.resolve().then(()=>(Cb(),TN))).invokeAgent);let h=await g(o,m,v),y,_;if(typeof h=="string"?(y=h,_=null):h.structured?(y=h.raw||JSON.stringify(h.structured,null,2),_=h.structured):(y=h.raw||JSON.stringify(h,null,2),_=h.extracted||null),l)try{let b=zN(l,this.name,"raw_stream_output.txt");SIe(kIe(b),{recursive:!0}),ON(b,typeof y=="string"?y:JSON.stringify(y),"utf-8")}catch(b){Z.debug(`Could not save raw output: ${b.message}`)}if(this.isZodSchema&&_){console.log(`
279
+ \u{1F50D} ${Ab.cyan("Validated output:")} ${Ab.white(JSON.stringify(_,null,2))}`);let b=_;if(typeof this.onComplete=="function")try{b=await this.onComplete(n(),_)}catch(x){Z.warn(`onComplete hook failed: ${x.message}`)}return{success:!0,output:b,raw:y}}if(typeof this.onComplete=="function")try{return{success:!0,output:await this.onComplete(n(),{raw:y}),raw:y}}catch(b){throw new Error(`onComplete failed: ${b.message}`,{cause:b})}if(this.parser){let b=this.parser.parse(y);return console.log(`
280
+ \u{1F50D} ${Ab.cyan("Parsed output:")} ${Ab.white(JSON.stringify(b,null,2))}`),Wt.step("Output parsed"),{success:!0,output:b,raw:y}}return{success:!0,output:y,raw:y}}catch(f){u=f,d<this.retries&&Z.info(`Node '${this.name}' failed, retrying (${d+1}/${this.retries})...`)}return{success:!1,error:u.message,raw:null}}},Fm=class extends bc{constructor(e){super({...e,_isCustomCode:!0}),this.condition=e.condition}async execute(e,r){let n=r&&typeof r.getAll=="function"?r.getAll():e;return{success:!0,output:{nextNode:this.condition(n)},raw:null}}}});no();import{readFileSync as b8,existsSync as x8}from"fs";import{join as Yu,resolve as w8,isAbsolute as ZPe}from"path";import{existsSync as td,readdirSync as nR,statSync as V8}from"fs";import{join as tn,relative as Yb,sep as ed,resolve as Qa}from"path";no();import{appendFileSync as R8,readFileSync as C8,existsSync as HN,mkdirSync as A8}from"fs";import{join as Xm}from"path";var QN="run-index.jsonl";function YN(t,e=ir){let r=Xm(t,e);return Xm(r,QN)}function eh(t){if(!t||!t.sessionId)return;let e=t.cwd||process.cwd(),r=t.outputBase||ir,n=Xm(e,r);HN(n)||A8(n,{recursive:!0});let i=Xm(n,QN),o=`${JSON.stringify(t)}
281
+ `;R8(i,o,"utf8")}function JN(t){if(!t||!HN(t))return[];let e;try{e=C8(t,"utf8")}catch{return[]}let r=[];for(let n of e.split(`
282
+ `)){let i=n.trim();if(i)try{r.push(JSON.parse(i))}catch{}}return r}import{existsSync as U8,mkdirSync as D8,readFileSync as M8,readdirSync as XPe,statSync as eTe,writeFileSync as L8}from"fs";import{join as Z8}from"path";var q8="zibby-run-state.json";function XN(t){return Z8(t,q8)}function Hb(t){if(!t||typeof t!="string")return null;let e=XN(t);if(!U8(e))return null;try{let r=M8(e,"utf8"),n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}}function th(t,e){if(!t||typeof t!="string")return;try{D8(t,{recursive:!0})}catch{return}let n={...Hb(t)||{v:1},...e,v:1,updatedAt:Date.now()};try{L8(XN(t),`${JSON.stringify(n)}
283
+ `,"utf8")}catch(i){console.warn(`[zibby run-state] ${i.message}`)}}function F8(t){return t?.recordKind==="progress"}function eR(t){let e=Number(t)||0;return e<=0?0:e<1e12?e*1e3:e}function tR(t,e={}){let r=e.maxProgressAgeMs!=null&&Number.isFinite(e.maxProgressAgeMs)?Math.max(0,e.maxProgressAgeMs):21e5,n=typeof e.now=="number"?e.now:Date.now(),{summary:i,progress:o}=t||{};if(!o)return!1;let a=eR(o.ts);if(r>0&&a>0&&n-a>r)return!1;if(!i)return a>0;let s=eR(i.ts);return a>s}function rR(t){let e=new Map;for(let r of t||[]){if(!r?.sessionId)continue;let n=e.get(r.sessionId);n||(n={summary:null,progress:null});let i=Number(r.ts)||0;F8(r)?(!n.progress||i>=(Number(n.progress.ts)||0))&&(n.progress=r):(!n.summary||i>=(Number(n.summary.ts)||0))&&(n.summary=r),e.set(r.sessionId,n)}return e}no();var Qb=Object.freeze(["preflight","execute_live","generate_script"]);function Jb(t){let e=process.env.ZIBBY_STUDIO_TEST_CASE_ID;return e!=null&&String(e).trim()!==""?String(e).trim():t!=null?String(t):""}var W8=[tn("generate_script","generated-test.spec.js"),tn("generate_script","generated-test.spec.ts"),tn("generate_script","playwright.spec.ts"),tn("generate_script","test.spec.ts")];function B8(t){let e=[tn(t,"execute_live","videos"),tn(t,"execute_live"),t];for(let r of e){if(!td(r))continue;let n;try{n=nR(r)}catch{continue}let i=n.find(o=>o.endsWith(".webm"));if(i)return tn(r,i)}return null}function G8(t){let e=[tn(t,"execute_live","events.json"),tn(t,"events.json")];for(let r of e)if(td(r))return r;return null}function K8(t){for(let e of W8){let r=tn(t,e);if(td(r))return r}return null}function H8(t){return!t||!td(t)?{videoPathAbs:null,eventsPathAbs:null,scriptPathAbs:null}:{videoPathAbs:B8(t),eventsPathAbs:G8(t),scriptPathAbs:K8(t)}}function iR(t){let e=t.cwd||process.cwd(),r=t.outputBase||ir,o=((t.result||{}).state||{}).sessionPath;if(!o||typeof o!="string")return null;let a=o.split(/[/\\]/).filter(Boolean).pop();if(!a)return null;let{videoPathAbs:s,eventsPathAbs:c,scriptPathAbs:l}=H8(o),u=f=>{if(!f)return null;try{return Yb(e,f).split(ed).join("/")}catch{return null}},d=null;if(t.specPath)try{let f=Qa(e,t.specPath);d=Yb(e,f).split(ed).join("/")}catch{d=String(t.specPath).split(ed).join("/")}return{v:1,recordKind:"summary",ts:Date.now(),sessionId:a,status:t.status??(t.success?"completed":"failed"),cwd:e,outputBase:r,sessionPathAbs:o,sessionDirRel:u(o),videoPathAbs:s||null,eventsPathAbs:c||null,scriptPathAbs:l||null,videoRel:u(s),eventsRel:u(c),scriptRel:u(l),specRel:d,source:process.env.ZIBBY_RUN_SOURCE||"cli",studioTestCaseId:Jb(a)||null,errorMessage:t.errorMessage||null}}function oR({cwd:t,config:e,result:r,success:n,specPath:i,errorMessage:o}){try{let a=iR({cwd:t||process.cwd(),result:r,success:n,outputBase:e?.paths?.output||ir,specPath:i,errorMessage:o});a&&(eh(a),a.sessionPathAbs&&th(a.sessionPathAbs,{sessionId:a.sessionId,studioTestCaseId:a.studioTestCaseId||a.sessionId,status:a.status,activeNode:null,activeStageIndex:null,errorMessage:a.errorMessage||null,runSource:a.source||"cli",cwd:a.cwd,outputBase:a.outputBase,sessionPathAbs:a.sessionPathAbs}))}catch(a){console.warn(`[zibby browser-test run-index] ${a.message}`)}}function Q8({sessionPath:t,sessionId:e,cwd:r,outputBase:n=ir}={}){let i=r||process.cwd(),o=n||ir,a=e!=null&&String(e).trim()!==""?String(e).trim():null,s=process.env.ZIBBY_RUN_SOURCE==="studio",c=process.env.ZIBBY_SESSION_PATH&&String(process.env.ZIBBY_SESSION_PATH).trim();if(s&&c)return Qa(c);let l=t&&String(t).trim();if(l)return Qa(l);let u=process.env.ZIBBY_SESSIONS_ROOT&&String(process.env.ZIBBY_SESSIONS_ROOT).trim();return u&&a?Qa(tn(u,a)):process.env.ZIBBY_SESSION_PATH&&String(process.env.ZIBBY_SESSION_PATH).trim()?Qa(String(process.env.ZIBBY_SESSION_PATH).trim()):Qa(tn(i,o,ri,a||"invalid"))}function Y8(t){try{let e=t?.currentNode;if(!e||!Qb.includes(e))return;let r=t.sessionPath,n=t.sessionId||r&&String(r).split(/[/\\]/).filter(Boolean).pop()||null;if(!n)return;let i=t.cwd||process.cwd(),o=t.outputBase||ir,a=Qb.indexOf(e),s=t?.specPath!=null?String(t.specPath).trim():"",c=t?.taskDescription!=null?String(t.taskDescription):"",l=null;if(s)try{let d=Qa(i,s);l=Yb(i,d).split(ed).join("/")}catch{l=s.split(ed).join("/")}let u=Q8({sessionPath:r,sessionId:n,cwd:i,outputBase:o});eh({v:1,recordKind:"progress",ts:Date.now(),sessionId:n,cwd:i,outputBase:o,sessionPathAbs:u,activeNode:e,activeStageIndex:a,specRel:l,taskDescription:c||null,studioTestCaseId:Jb(n)||null,source:process.env.ZIBBY_RUN_SOURCE||"cli"}),th(u,{sessionId:n,studioTestCaseId:Jb(n)||n,status:"running",activeNode:e,activeStageIndex:a,sessionPathAbs:u,cwd:i,outputBase:o,specPath:l||null,task:c||null,taskDescription:c||null,runSource:process.env.ZIBBY_RUN_SOURCE||"cli",pid:typeof process.pid=="number"?process.pid:null})}catch(e){console.warn(`[zibby browser-test run-index progress] ${e.message}`)}}function aR({cwd:t,config:e}={}){let r=t||process.cwd(),n=e?.paths?.output||ir;return i=>{Y8({cwd:i?.cwd||r,outputBase:i?.outputBase||n,sessionPath:i?.sessionPath,sessionId:i?.sessionId,currentNode:i?.currentNode,specPath:i?.specPath,taskDescription:i?.taskDescription})}}function sR(t={}){try{let e=t.cwd||process.cwd(),r=t.config?.paths?.output||t.outputBase||ir,n=YN(e,r),i=JN(n),o=rR(i),a=new Set,s=t.errorMessage||"Run stopped (SIGINT/SIGTERM) before a normal summary was written.",c=(d,f)=>{if(!d||!f||a.has(d))return;a.add(d);let p=iR({cwd:e,outputBase:r,result:{state:{sessionPath:f}},success:!1,specPath:null,status:"interrupted",errorMessage:s});p&&(eh(p),th(f,{sessionId:d,studioTestCaseId:p.studioTestCaseId||d,status:"interrupted",activeNode:null,activeStageIndex:null,errorMessage:p.errorMessage||null,runSource:p.source||"cli",cwd:e,outputBase:r,sessionPathAbs:f}))};for(let[d,f]of o){if(!tR(f))continue;let p=f.progress;if(!p)continue;let m=String(d),v=p.sessionPathAbs&&String(p.sessionPathAbs)||tn(e,r,ri,m);c(m,v)}let l=tn(e,r,ri);if(!td(l))return;let u;try{u=nR(l)}catch{return}for(let d of u){let f=tn(l,d),p;try{p=V8(f)}catch{continue}if(!p.isDirectory())continue;let m=Hb(f);!m||m.status!=="running"||c(String(d),f)}}catch(e){console.warn(`[zibby browser-test run-index interrupt] ${e.message}`)}}function rh(t){oR(t)}function Xb(t){sR(t)}function cR(t){return aR(t)}import{spawn as TIe}from"child_process";import{mkdirSync as t8,existsSync as OIe,writeFileSync as zIe}from"fs";import{join as RN}from"path";import{existsSync as lR,readFileSync as J8}from"fs";import{join as ex,dirname as uR}from"path";var Ic=class{static async loadContext(e,r,n={}){let i={},o=n.filenames||["CONTEXT.md","AGENTS.md"];if(e){let s=uR(ex(r,e));for(let c of o){let l=await this.findAndMergeContextFiles(c,s,r);if(l){let u=c.replace(/\.[^.]+$/,"").toLowerCase();i[u]=l}}}let a=n.discovery||{};for(let[s,c]of Object.entries(a))try{let l=ex(r,c);if(lR(l)){let u=await this.loadFile(l);i[s]=u}}catch(l){console.warn(`\u26A0\uFE0F Could not load context '${s}' from '${c}': ${l.message}`)}return i}static async findAndMergeContextFiles(e,r,n){let i=[],o=r;for(;o.startsWith(n);){let a=ex(o,e);if(lR(a))try{let c=await this.loadFile(a);i.unshift(c)}catch(c){console.warn(`\u26A0\uFE0F Could not load ${e} from ${a}: ${c.message}`)}let s=uR(o);if(s===o)break;o=s}return i.length===0?null:i.every(a=>typeof a=="string")?i.join(`
284
+
285
+ ---
286
+
287
+ `):i.every(a=>typeof a=="object")?Object.assign({},...i):i[i.length-1]}static async loadFile(e){let r=J8(e,"utf-8");if(e.endsWith(".json"))return JSON.parse(r);if(e.endsWith(".js")||e.endsWith(".mjs")){let{pathToFileURL:n}=await import("url"),i=await import(n(e).href);return i.default||i}return r}};rd();import{exec as X8}from"child_process";import{promisify as eQ}from"util";import{existsSync as tQ}from"fs";import{join as tx}from"path";import{homedir as rx}from"os";var dR=eQ(X8);async function nx(){try{return await dR("cursor-agent --version"),"cursor-agent"}catch{let e=[tx(rx(),".local","bin","cursor-agent"),tx(rx(),".cursor","bin","cursor-agent"),tx(rx(),".cursor-agent","bin","cursor-agent")];for(let r of e)if(tQ(r))try{return await dR(`"${r}" --version`),r}catch{}return null}}async function rQ(){return await nx()!==null}function nQ(){return`
288
+ \u274C cursor-agent CLI not found!
289
+
290
+ To use the Cursor agent, install it from:
291
+ \u{1F4E6} https://github.com/getcursor/cursor-agent
292
+
293
+ Installation:
294
+ curl https://cursor.com/install -fsS | bash
295
+
296
+ After installation:
297
+ 1. Add ~/.local/bin to your PATH:
298
+ For zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
299
+ For bash: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
300
+
301
+ 2. Or restart your terminal/shell
302
+
303
+ Then retry your command.
304
+ `}no();ox();jN();ca();no();Ya();import{mkdirSync as Q5,existsSync as NN,writeFileSync as H5,unlinkSync as $Ie}from"fs";import{join as xc,resolve as Y5}from"path";import{config as EIe}from"dotenv";import IIe from"handlebars";function PIe({traceFrom:t,sessionId:e,sessionPath:r,idSource:n,mkdirFresh:i}){if(process.env.ZIBBY_SESSION_LOG==="0"||process.env.ZIBBY_SESSION_LOG==="false")return;let o=typeof process.ppid=="number"?process.ppid:"n/a",a=`[zibby:session] from=${t} pid=${process.pid} ppid=${o} sessionId=${e} source=${n} mkdir=${i?"yes":"no"} path=${r}`;if(console.log(a),(process.env.ZIBBY_TRACE_SESSION==="1"||process.env.ZIBBY_TRACE_SESSION==="true")&&process.env.ZIBBY_SESSION_LOG!=="0"&&process.env.ZIBBY_SESSION_LOG!=="false"){let l=(new Error("session trace").stack||"").split(`
305
+ `).slice(2,14).join(`
306
+ `);console.log(`[zibby:session] stack (${t}):
307
+ ${l}`)}}function J5(){return process.env.ZIBBY_RUN_SOURCE==="studio"||process.env.ZIBBY_KEEP_SESSION_ENV==="1"||process.env.ZIBBY_KEEP_SESSION_ENV==="true"}function Ub(){if(process.env.ZIBBY_RUN_SOURCE!=="studio")return;let t=process.env.ZIBBY_SESSION_PATH;if(!(t==null||String(t).trim()===""))try{return Y5(String(t).trim())}catch{return String(t).trim()}}function Db(){J5()||(delete process.env.ZIBBY_SESSION_PATH,delete process.env.ZIBBY_SESSION_ID)}function X5({sessionPath:t,sessionId:e}){t&&typeof t=="string"&&(process.env.ZIBBY_SESSION_PATH=t),e!=null&&String(e).trim()!==""&&(process.env.ZIBBY_SESSION_ID=String(e).trim())}function e8(t={}){let e=Kb.map(o=>process.env[o]).find(Boolean),r=Math.random().toString(36).slice(2,6),n=e||`${Date.now()}_${r}`,i=t.paths?.sessionPrefix;return i?`${i}_${n}`:n}function Mb({cwd:t=process.cwd(),config:e={},initialState:r={},traceFrom:n="resolveWorkflowSession"}={}){let i=r.sessionPath,o=r.sessionTimestamp,a="initialState.sessionPath";if(!i&&process.env.ZIBBY_SESSION_PATH)try{let l=Y5(String(process.env.ZIBBY_SESSION_PATH));l&&(i=l,a="ZIBBY_SESSION_PATH")}catch{}let s;if(i)s=String(i).split(/[/\\]/).filter(Boolean).pop(),o==null&&(o=Date.now());else{let l=process.env.ZIBBY_SESSION_ID&&String(process.env.ZIBBY_SESSION_ID).trim();if(l)s=l,a="ZIBBY_SESSION_ID";else{let d=e.sessionId!=null?String(e.sessionId).trim():"";d&&d!=="last"?(s=d,a="config.sessionId"):(s=e8(e),a="generated")}o=o??Date.now();let u=e.paths?.output||ir;i=xc(t,u,ri,s)}let c=!NN(i);return c&&Q5(i,{recursive:!0}),PIe({traceFrom:n,sessionId:s,sessionPath:i,idSource:a,mkdirFresh:c}),X5({sessionPath:i,sessionId:s}),{sessionPath:i,sessionId:s,sessionTimestamp:o}}var Vm=class{constructor(e={}){this.nodes=new Map,this.edges=new Map,this.entryPoint=null,this.middleware=Array.isArray(e.middleware)?[...e.middleware]:[],e.nodeMiddleware&&this.middleware.push(e.nodeMiddleware),this.nodeTypeMap=new Map,this.conditionalCodeMap=new Map,this.stateSchema=e.stateSchema||null,this.nodePrompts=new Map,this.nodeOptions=new Map,this._invokeAgent=e.invokeAgent||null}setStateSchema(e){return this.stateSchema=e,this}getStateSchema(){return this.stateSchema}addNode(e,r,n={}){let i=r instanceof bc?r:new bc(r);return i.name=e,this.nodes.set(e,i),n.prompt&&this.nodePrompts.set(e,n.prompt),Object.keys(n).length>0&&this.nodeOptions.set(e,n),this}addConditionalNode(e,r){let n=new Fm({...r,name:e});return this.nodes.set(e,n),this}addEdge(e,r){return this.edges.set(e,r),this}setNodeType(e,r){return this.nodeTypeMap.set(e,r),this}addConditionalEdges(e,r,{labels:n}={}){return this.edges.set(e,{conditional:!0,routes:r,labels:n}),typeof r=="function"&&this.conditionalCodeMap.set(e,r.toString()),this}setEntryPoint(e){return this.entryPoint=e,this}use(e){return typeof e=="function"&&this.middleware.push(e),this}_composeMiddleware(e,r,n,i,o){let a=n;for(let s=e.length-1;s>=0;s--){let c=e[s],l=a;a=()=>c(r,l,i,o)}return a()}serialize(){let e=[],r={};for(let[o,a]of this.nodes){let s=this.nodeTypeMap.get(o)||o;e.push({id:o,type:s,data:{nodeType:s,label:o}});let c=a._isCustomCode||!1,l={};c&&typeof a.execute=="function"&&(l.customCode=a.execute.toString());let u=this.nodePrompts.get(o);if(u&&(l.prompt=u),typeof a.customExecute=="function"&&(l.executeCode=a.customExecute.toString()),a.outputSchema)try{if(typeof a.outputSchema._def<"u"){let p=on(a.outputSchema,{target:"openApi3"}),m=this._flattenJsonSchemaToVariables(p);l.outputSchema={jsonSchema:p,variables:m}}else l.outputSchema={schema:a.outputSchema}}catch(f){console.warn(`Failed to convert schema for ${o}:`,f.message)}let d=(this.resolvedToolsMap||{})[o];d?.toolIds&&(l.tools=d.toolIds),Object.keys(l).length>0&&(r[o]=l)}let n=[];for(let[o,a]of this.edges)if(typeof a=="string")n.push({source:o,target:a});else if(a.conditional){let s=this.conditionalCodeMap.get(o)||a.routes.toString(),c=this._inferConditionalTargets(a.routes),l=a.labels||{};for(let u of c){let d={source:o,target:u,data:{conditionalCode:s}};l[u]&&(d.label=l[u]),n.push(d)}}let i=null;if(this.stateSchema)try{i=on(this.stateSchema,{target:"openApi3"})}catch{i=this.stateSchema}return{nodes:e,edges:n,nodeConfigs:r,stateSchema:i}}_inferConditionalTargets(e){let r=e.toString(),n=new Set,i=/return\s+['"]([^'"]+)['"]/g,o;for(;(o=i.exec(r))!==null;)n.add(o[1]);return[...n]}_flattenJsonSchemaToVariables(e,r=""){let n=e;if(e.$ref&&e.definitions){let i=e.$ref.replace("#/definitions/","");n=e.definitions[i]||e}return this._flattenSchema(n,r)}_flattenSchema(e,r=""){if(!e||typeof e!="object")return[];let n=[],i=e.properties||{},o=e.required||[];for(let[a,s]of Object.entries(i)){let c=r?`${r}.${a}`:a,l=!o.includes(a);if(n.push({path:c,type:s.type||"unknown",label:s.description||this._formatLabel(a),optional:l}),s.type==="object"&&s.properties){let u=this._flattenSchema(s,c);n.push(...u)}if(s.type==="array"&&s.items?.type==="object"&&s.items.properties){let u=this._flattenSchema(s.items,`${c}[]`);n.push(...u)}}return n}_formatLabel(e){return e.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim()}_summarizeNodeOutput(e,r){if(!r||typeof r!="object")return[];let n=[];r.success!==void 0&&n.push(`Result: ${r.success?"passed":"failed"}`);for(let[i,o]of Object.entries(r))if(!(i==="success"||i==="raw"||i==="nextNode")){if(typeof o=="string"&&o.length<=80)n.push(`${i}: ${o}`);else if(Array.isArray(o)){let a=o.length,s=o.filter(l=>l?.passed===!0).length;if(o.some(l=>l?.passed!==void 0)){let l=a-s;n.push(`${i}: ${s}/${a} passed${l?`, ${l} failed`:""}`)}else n.push(`${i}: ${a} items`)}if(n.length>=4)break}return n}async run(e,r={}){if(!this.entryPoint)throw new Error("No entry point set for graph");let n=r.cwd||process.cwd();EIe({path:xc(n,".env")});let i=r.config||{};if(!i||Object.keys(i).length===0)try{let x=xc(n,".zibby.config.js");NN(x)&&(i=(await import(x)).default||{})}catch{}process.env.EXECUTION_ID&&!i.agent?.strictMode&&(i.agent={...i.agent,strictMode:!0});let o=r.agentType;if(!o){let x=i?.agent;x?.provider?o=x.provider:x?.gemini?o="gemini":x?.claude?o="claude":x?.cursor?o="cursor":x?.codex?o="codex":o=process.env.AGENT_TYPE||"cursor"}let a=r.contextConfig||e?.config?.contextConfig||e?.config?.context||i?.context||{};if(this.stateSchema){let x=this.stateSchema.safeParse(r);if(!x.success){let w=x.error.issues.map(S=>`${S.path.join(".")}: ${S.message}`);throw console.error("\u274C Initial state validation failed:"),w.forEach(S=>console.error(` - ${S}`)),new Error(`State validation failed: ${w.join(", ")}`)}Wt.step("State validated against schema")}let s=Ub(),c=r.sessionPath||s;c||Db();let{sessionPath:l,sessionTimestamp:u,sessionId:d}=Mb({cwd:n,config:i,traceFrom:"WorkflowGraph.run",initialState:{sessionPath:c,sessionTimestamp:r.sessionTimestamp}});Wt.step(`Session ${d}`);let f=await Ic.loadContext(r.specPath||"",n,a);Object.keys(f).length>0&&Wt.step(`Context loaded: ${Object.keys(f).join(", ")}`);let p=r.outputPath;!p&&r.specPath&&(e?.calculateOutputPath?p=e.calculateOutputPath(r.specPath):console.warn(`\u26A0\uFE0F outputPath not resolved (specPath=${r.specPath})`));let m=new nd({...r,config:i,agentType:o,outputPath:p,sessionPath:l,sessionTimestamp:u,context:f,resolvedTools:this.resolvedToolsMap||{}}),v=new Map;try{await import("@zibby/skills")}catch{}let{getSkill:g}=await Promise.resolve().then(()=>($o(),dx)),h=new Set;for(let[,x]of this.nodes)for(let w of x.config?.skills||[])h.add(w);for(let x of h){let w=g(x);if(typeof w?.middleware=="function")try{let S=await w.middleware();typeof S=="function"&&v.set(x,S)}catch{}}let y=this.entryPoint,_=[];for(;y&&y!=="END";){let x=xc(l,Jm);if(NN(x)){console.warn(`
308
+ \u{1F6D1} Studio stop requested \u2014 ending workflow.`);try{$Ie(x)}catch{}if(e&&typeof e.cleanup=="function")try{await e.cleanup()}catch{}return Wt.step("Workflow stopped by Studio"),{success:!0,state:m.getAll(),executionLog:_,stoppedByStudio:!0}}let w=this.nodes.get(y);if(!w)throw new Error(`Node '${y}' not found in graph`);let S=JSON.stringify({sessionPath:l,sessionTimestamp:u,currentNode:y,createdAt:new Date().toISOString(),config:m.get("config")}),$=xc(l,Oi);H5($,S,"utf-8");let T=m.get("config")?.paths?.output||ir,A=xc(n,T,Oi);Q5(xc(n,T),{recursive:!0});try{H5(A,S,"utf-8")}catch{}let I=r.onPipelineProgress;if(typeof I=="function")try{I({cwd:n,sessionPath:l,sessionId:d,outputBase:m.get("config")?.paths?.output||ir,currentNode:y})}catch{}let U=(this.resolvedToolsMap||{})[y]||null;m.set("_currentNodeTools",U);let L=m.get("nodeConfigs")||{};m.set("_currentNodeConfig",L[y]||{}),Wt.nodeStart(y);let N=Date.now(),Y=this.nodePrompts.get(y);if(!this._invokeAgent){let ue=await Promise.resolve().then(()=>(Cb(),TN));this._invokeAgent=ue.invokeAgent}let H=this._invokeAgent,Pe={state:m,invokeAgent:async(ue={},W={})=>{let E=W.prompt||"";if(Y)try{E=IIe.compile(Y,{noEscape:!0})(ue)}catch(k){throw console.error(`\u274C Template rendering failed for node '${y}':`,k.message),new Error(`Template rendering failed: ${k.message}`,{cause:k})}else if(!E)throw new Error(`No prompt template configured for node '${y}' and no prompt provided in options`);let q={state:m.getAll(),images:W.images||[]},R={model:W.model||m.get("model"),workspace:m.get("workspace"),schema:W.schema,...W};return H(E,q,R)},_coreInvokeAgent:H,agent:e,nodeId:y,promptTemplate:Y,getPromptTemplate:()=>Y,...m.getAll()};try{let ue=(w.config?.skills||[]).map(O=>v.get(O)).filter(Boolean),W=[...this.middleware,...ue],E;W.length>0?E=await this._composeMiddleware(W,y,async()=>w.execute(Pe,m),m.getAll(),m):E=await w.execute(Pe,m);let q=Date.now()-N;if(_.push({node:y,success:E.success,duration:q,timestamp:new Date().toISOString()}),!E.success){if(String(E.error||"").includes("Stopped from Zibby Studio")){if(Wt.step("Workflow stopped by Studio"),m.set("stoppedByStudio",!0),e&&typeof e.cleanup=="function")try{await e.cleanup()}catch{}return{success:!0,state:m.getAll(),executionLog:_,stoppedByStudio:!0}}m.append("errors",{node:y,error:E.error});let B=w.config?.retries||0,ie=`${y}_retries`,me=m.getAll()[ie]||0;if(me<B){Wt.stepInfo(`Retrying (attempt ${me+1}/${B})`),m.update({[ie]:me+1,[`${y}_raw`]:E.raw});continue}throw Wt.nodeFailed(y,E.error,{duration:q}),new Error(`Node '${y}' failed after ${me} attempts: ${E.error}`)}m.update({[y]:E.output});let R=this._summarizeNodeOutput(y,E.output);Wt.nodeComplete(y,{duration:q,details:R});let k=this.edges.get(y);if(!k)y="END";else if(k.conditional){let O=m.getAll(),B=k.routes(O);Wt.route(y,B),y=B}else y=k}catch(ue){throw Wt.isInsideNode&&Wt.nodeFailed(y,ue.message,{duration:Date.now()-N}),m.set("failed",!0),m.set("failedAt",y),ue}}Wt.graphComplete();let b={success:!0,state:m.getAll(),executionLog:_};return e&&typeof e.onComplete=="function"&&await e.onComplete(b),b}};var Fu=class t{constructor(e={}){this.config=e,this.adapter=null,this.paths=e.paths||{specs:"test-specs",generated:"tests"},this.agentCommand=e.agentCommand||"cursor-agent",this.buildArgs=e.buildArgs||((r,n=!0)=>{let i=["-p",r,"--approve-mcps","--force"];return n&&(i.push("--output-format","stream-json"),i.push("--stream-partial-output")),i})}static extractJsonFromStream(e){return io.extractResult(e)}async initialize(e){this.adapter=e,e&&!e.isConnected()&&await e.connect()}buildGraph(){throw new Error("buildGraph() must be implemented by subclass")}async onComplete(e){}async run(e,r={}){let n=this.buildGraph(),i=typeof e=="object"&&!Array.isArray(e)?{input:e,...e,...r}:{input:e,...r};return await n.run(this,i)}async executeNode(e,r){let{prompt:n,outputSchema:i,model:o}=e,a=typeof n=="function"?n(r):n;console.log(`
309
+ \u{1F4DD} Prompt:
310
+ ${a}
311
+ `);let s=await this.executePrompt(a,r.cwd,3e5,o);console.log(`
312
+ \u{1F4E4} Raw Output:
313
+ ${s}
314
+ `);let c=null;if(i)try{if(c=t.extractJsonFromStream(s),!c)throw new Error("No valid result JSON found in output");console.log(`
315
+ \u2705 Parsed Output:
316
+ ${JSON.stringify(c,null,2)}
317
+ `)}catch(l){console.warn(`\u26A0\uFE0F Failed to parse output as JSON: ${l.message}`)}return{success:!0,output:c,raw:s}}async cleanup(){this.adapter&&this.adapter.isConnected()&&await this.adapter.disconnect()}async executePrompt(e,r=process.cwd(),n=3e5,i=null,o=!0){let a=this.agentCommand;if(a==="cursor-agent"){let s=await nx();s&&(a=s)}return new Promise((s,c)=>{let l="",u=this.buildArgs(e,o);i&&u.push("--model",i);let d={...process.env},f=TIe(a,u,{cwd:r,env:d,stdio:["inherit","pipe","inherit"],shell:!1,detached:!1}),p=setTimeout(()=>{console.log(`
318
+ \u23F1\uFE0F Timeout reached (${n/1e3}s) - killing agent...`),f.kill("SIGTERM"),setTimeout(()=>{f.killed||(console.log("\u26A0\uFE0F Forcing kill (SIGKILL)..."),f.kill("SIGKILL"))},2e3),c(new Error(`Agent timed out after ${n/1e3}s. The agent may be stuck or waiting for user input.`))},n),m=0,v=Date.now(),g=setInterval(()=>{if(l.length>m)m=l.length,v=Date.now();else{let b=Date.now()-v;b>1e4&&console.log(`\u23F3 AI agent is thinking... (${Math.floor(b/1e3)}s, ${l.length} bytes so far)`)}},1e4),h=()=>{clearTimeout(p),clearInterval(g),f&&!f.killed&&(f.kill("SIGTERM"),setTimeout(()=>{f.killed||f.kill("SIGKILL")},2e3))},y=()=>{console.log(`
319
+
320
+ \u{1F6D1} Interrupted by user (Ctrl+C)`),h(),c(new Error("Interrupted by user"))};process.on("SIGINT",y);let _=new io;f.stdout.on("data",b=>{let x=b.toString();l+=x;let w=_.processChunk(x);w&&(process.stdout.write(w,"utf8",()=>{process.stdout.isTTY&&process.stdout._flush&&process.stdout._flush()}),v=Date.now(),m+=w.length)}),f.on("close",b=>{process.off("SIGINT",y),clearTimeout(p),clearInterval(g);let x=_.flush();x&&process.stdout.write(x),l=_.getRawText();let w=_.getResult();b===0?s({raw:l,extracted:w}):c(new Error(`Agent exited with code ${b}`))}),f.on("error",b=>{process.off("SIGINT",y),clearTimeout(p),clearInterval(g),c(new Error(`Failed to spawn agent: ${b.message}`))})})}async runSingleNode(e,r,n){let i=r[e];if(!i)throw new Error(`Unknown node: ${e}. Available nodes: ${Object.keys(r).join(", ")}`);let{cwd:o}=n;if(!o)throw new Error("cwd is required for single node execution");let a=n.sessionPath,s=n.sessionTimestamp,c=n.config||{};if(!a){let y=process.env.CI_JOB_ID||process.env.GITHUB_RUN_ID||process.env.CIRCLE_WORKFLOW_ID||process.env.BUILD_ID||Date.now().toString(),_=c.paths?.sessionPrefix,b=_?`${_}_${y}`:y;s=s||Date.now();let x=c.paths?.output||ir;a=RN(o,x,ri,b),OIe(a)||t8(a,{recursive:!0})}let l=c.paths?.output||ir,u=RN(o,l,Oi);t8(RN(o,l),{recursive:!0}),zIe(u,JSON.stringify({sessionPath:a,sessionTimestamp:s||a.split("/").pop(),currentNode:e,createdAt:new Date().toISOString()}),"utf-8"),console.log(`
321
+ ${"=".repeat(80)}`),console.log(`\u{1F3AF} SINGLE NODE EXECUTION: ${e}`),console.log(`\u{1F4C1} Session: ${a.split("/").pop()}${n.sessionPath?" (reusing)":""}`),console.log(`${"=".repeat(80)}
322
+ `);let d=await Ic.loadContext(n.specPath||"",o,n.contextConfig||{}),{Node:f}=await Promise.resolve().then(()=>(jN(),K5)),{WorkflowState:p}=await Promise.resolve().then(()=>(ox(),pR)),m=new p({...n,sessionPath:a,sessionTimestamp:s,context:d}),g=await new f(i).execute(this,m);return console.log(`
323
+ ${"=".repeat(80)}`),console.log(`\u2705 Node ${e} completed`),console.log(`${"=".repeat(80)}
324
+ `),{success:!0,output:g.output,outputPath:n.outputPath,state:g}}calculateOutputPath(e){let{specs:r,generated:n}=this.paths;if(!e)return`${n}/generated-test.spec.js`;let i=e.replace(new RegExp(`^${r}/`),"").replace(/\.[^.]+$/,".spec.js");return`${n}/${i}`.replace(/\/+/g,"/")}};function jIe(t,e={}){let r=new Fu(e);return r.buildGraph=function(){let n=new Vm;return t(n),n},e.onComplete&&(r.onComplete=e.onComplete),r}ni();import{writeFileSync as r8,existsSync as NIe,mkdirSync as RIe}from"fs";import{join as CN}from"path";var AN=class t{static saveTitle(e,r){let n=e.state.sessionPath;if(!n)return;let i=t._findInState(e.state,"title")||t._findInState(e.state,"result");if(!(!i||typeof i!="string"))try{let o=CN(n,"title.txt");r8(o,i,"utf-8"),Z.info(`Saved title to session: "${i}"`)}catch(o){console.warn("\u26A0\uFE0F Could not save title file:",o.message)}}static _findInState(e,r){for(let[,n]of Object.entries(e))if(n&&typeof n=="object"&&n[r]!==void 0)return n[r]}static async saveExecutionData(e){let r=e.state.sessionPath;if(r)for(let[n,i]of Object.entries(e.state)){if(!i||typeof i!="object")continue;let o=Array.isArray(i.actions)&&i.actions.length>0,a=typeof i.scriptPath=="string"&&i.scriptPath.trim().length>0;if(!(!o&&!a))try{let s=CN(r,n);NIe(s)||RIe(s,{recursive:!0});let c=CN(s,"result.json");r8(c,JSON.stringify(i,null,2),"utf-8"),Z.info(`Saved execution data to ${n} folder`),await this.onNodeSaved(s,i)}catch(s){console.warn(`\u26A0\uFE0F Could not save execution data for ${n}:`,s.message)}}}static async onNodeSaved(e,r){}static logResult(e,r){let n=Object.entries(e.state).filter(([,a])=>a&&typeof a=="object"&&a.success!==void 0),i=n.length>0&&n.every(([,a])=>a.success),o=n.some(([,a])=>a.success===!1);if(i)Z.info("Workflow completed successfully."),r&&Z.info(`Output: ${r}`);else if(o){let a=n.filter(([,s])=>!s.success).map(([s])=>s);Z.info(`Workflow completed with failures in: ${a.join(", ")}`),r&&Z.info(`Output: ${r}`)}return i}static handle(e,r,n){return this.saveTitle(e,r),this.saveExecutionData(e),this.logResult(e,n)}};Ac();Cb();uO();$N();no();$o();var CIe={READ_FILE:"read_file",WRITE_FILE:"write_file",LIST_DIRECTORY:"list_directory",RUN_COMMAND:"run_command",OPEN_URL:"open_url",WAIT:"wait"},AIe={LIST_PROJECTS:"jira_list_projects",SEARCH:"jira_search",GET_ISSUE:"jira_get_issue",CREATE_ISSUE:"jira_create_issue",LIST_SPRINTS:"jira_list_sprints",GET_SPRINT_ISSUES:"jira_get_sprint_issues",GET_COMMENTS:"jira_get_comments",ADD_COMMENT:"jira_add_comment",EDIT_ISSUE:"jira_edit_issue",TRANSITION_ISSUE:"jira_transition_issue"},UIe={GET_USER:"github_get_user",LIST_ORGS:"github_list_orgs",LIST_REPOS:"github_list_repos",CLONE:"github_clone",SEARCH_REPOS:"github_search_repos",SEARCH_ISSUES:"github_search_issues",SEARCH_CODE:"github_search_code",GET_PR:"github_get_pr",GET_PR_DIFF:"github_get_pr_diff",LIST_PR_FILES:"github_list_pr_files",LIST_PR_COMMENTS:"github_list_pr_comments",LIST_COMMITS:"github_list_commits",GET_COMMIT:"github_get_commit",GET_FILE:"github_get_file",CREATE_ISSUE:"github_create_issue"},DIe={LIST_CHANNELS:"slack_list_channels",POST_MESSAGE:"slack_post_message",REPLY_TO_THREAD:"slack_reply_to_thread",ADD_REACTION:"slack_add_reaction",GET_CHANNEL_HISTORY:"slack_get_channel_history",GET_THREAD_REPLIES:"slack_get_thread_replies",GET_USERS:"slack_get_users",GET_USER_PROFILE:"slack_get_user_profile"},MIe={GENERATE:"run_generate",TEST:"run_test",STATUS:"run_status",CANCEL:"run_cancel",WAIT:"run_wait",ARTIFACTS:"run_artifacts",LIST_SPECS:"list_specs"},LIe={GET_TEST_HISTORY:"memory_get_test_history",GET_SELECTORS:"memory_get_selectors",GET_PAGE_MODEL:"memory_get_page_model",GET_NAVIGATION:"memory_get_navigation",SAVE_INSIGHT:"memory_save_insight"},ZIe={STORE:"memory_store",RECALL:"memory_recall",BRIEF:"memory_brief",END_SESSION:"memory_end_session",TASK_LOG:"task_log",TASK_HISTORY:"task_history"},qIe={INSTALL:"install_skill",UNINSTALL:"uninstall_skill",LIST_AVAILABLE:"list_available_skills"},oWe={...CIe,...AIe,...UIe,...DIe,...MIe,...LIe,...ZIe,...qIe};import{existsSync as FIe,readFileSync as VIe}from"fs";import{homedir as WIe}from"os";import{join as BIe}from"path";var Lb=new Map;function GIe(){if(process.env.ZIBBY_USER_TOKEN)return process.env.ZIBBY_USER_TOKEN;try{let t=BIe(WIe(),".zibby","config.json");return FIe(t)&&JSON.parse(VIe(t,"utf-8")).sessionToken||null}catch{return null}}function KIe(){return process.env.ZIBBY_ACCOUNT_API_URL?process.env.ZIBBY_ACCOUNT_API_URL.replace(/\/$/,""):(process.env.ZIBBY_ENV||"prod")==="local"?"http://localhost:3001":process.env.ZIBBY_PROD_ACCOUNT_API_URL||"https://account-api-prod.zibby.app"}async function HIe(t){let e=Date.now(),r=Lb.get(t);if(r&&r.expiresAt>e)return r.data;let n=GIe();if(!n)throw new Error("No session token. Run `zibby login` first.");let i=`${KIe()}/integrations/token/${t}`,o=await fetch(i,{method:"GET",headers:{Authorization:`Bearer ${n}`}});if(!o.ok){let c=await o.text().catch(()=>"");throw o.status===404?new Error(`${t} is not connected. Connect it at https://studio.zibby.app/integrations`):o.status===401||o.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Failed to resolve ${t} token (${o.status}): ${c}`)}let a=await o.json();if(!a||typeof a!="object")throw new Error(`Invalid response from ${t} token endpoint: expected object, got ${typeof a}`);if(t==="jira"){if(!a.token||typeof a.token!="string")throw new Error(`Invalid jira token response: token is ${typeof a.token}, expected string`);if(!a.cloudId)throw new Error("Invalid jira token response: missing cloudId")}else if(t==="github"&&(!a.token||typeof a.token!="string"))throw new Error(`Invalid github token response: token is ${typeof a.token}, expected string`);let s=((a.expiresInSec||3e3)-120)*1e3;return Lb.set(t,{data:a,expiresAt:e+s}),a}function QIe(t){t?Lb.delete(t):Lb.clear()}import{readdir as YIe,access as n8,copyFile as JIe,constants as i8}from"fs/promises";import{join as Zb,relative as XIe}from"path";async function ePe(t={}){let{testResultsDir:e="test-results",testsDir:r="tests",projectRoot:n=process.cwd(),verbose:i=!0}=t;i&&console.log(`\u{1F3A5} Organizing test videos...
325
+ `);let o=Zb(n,e),a=Zb(n,r);try{let s=await YIe(o),c=0;for(let l of s){if(l.startsWith("."))continue;let u=Zb(o,l,"video.webm");try{await n8(u,i8.F_OK)}catch{continue}let d=l.replace(/-chromium$/,"").replace(/-firefox$/,"").replace(/-webkit$/,""),f=await tPe(a,d);if(f){let p=f.replace(/\.spec\.(js|ts)$/,".spec.webm");await JIe(u,p),i&&console.log(`\u2705 ${XIe(n,p)}`),c++}else i&&console.log(`\u26A0\uFE0F Could not find test file for: ${l}`)}return i&&(console.log(`
326
+ \u{1F3AC} Organized ${c} video(s)`),console.log(`\u{1F4C2} Videos are now next to their test files in ${r}/`)),{movedCount:c,success:!0}}catch(s){return i&&console.error("\u274C Error organizing videos:",s.message),{movedCount:0,success:!1,error:s.message}}}async function tPe(t,e){let r=e.split("-");for(let n=r.length;n>0;n--){let o=r.slice(0,n).join("/");for(let a of["js","ts"]){let s=Zb(t,`${o}.spec.${a}`);try{return await n8(s,i8.F_OK),s}catch{}}}return null}var Wm=class{constructor(e,r={}){this.apiKey=e,this.baseUrl=r.baseUrl||process.env.ZIBBY_API_URL||"https://api-prod.zibby.app",this.enabled=!!e}isEnabled(){return this.enabled}};function o8(){let t=process.env.ZIBBY_API_KEY;return new Wm(t)}import{execSync as rPe}from"child_process";import{existsSync as nPe,mkdirSync as iPe}from"fs";import{join as oPe}from"path";async function aPe(t={}){let{baseDir:e="/workspace/repos",repos:r=null,depth:n=1,branch:i=null}=t,o=process.env.REPOS;if(!o)throw new Error("REPOS environment variable not set. Are you running in a Zibby workflow container?");let a;try{a=JSON.parse(o)}catch(l){throw new Error(`Failed to parse REPOS env var: ${l.message}`,{cause:l})}if(!Array.isArray(a)||a.length===0)throw new Error("No repositories configured for this project");let s=r?a.filter(l=>r.includes(l.name)):a;if(s.length===0)throw new Error(`No matching repositories found. Available: ${a.map(l=>l.name).join(", ")}`);nPe(e)||iPe(e,{recursive:!0});let c={};return await Promise.all(s.map(async l=>{let u=l.provider||"github",d=u==="gitlab"?process.env.GITLAB_TOKEN:process.env.GITHUB_TOKEN;if(!d){console.error(`${u.toUpperCase()}_TOKEN not set, skipping ${l.name}`),c[l.name]=null;return}let f=l.name.replace(/\//g,"-"),p=oPe(e,f),m=l.cloneUrl||l.url;if(!m){console.error(`Repository "${l.name}" has no clone URL`),c[l.name]=null;return}let v;u==="gitlab"?v=m.replace(/^https:\/\//,`https://oauth2:${d}@`):v=m.replace(/^https:\/\//,`https://x-access-token:${d}@`);let g=["clone"];n>0&&g.push("--depth",n.toString()),i&&g.push("--branch",i),g.push(v,p);let h=`git ${g.join(" ")}`;console.log(`Cloning ${l.name} (${u}) to ${p}...`);try{rPe(h,{stdio:"pipe",env:{...process.env,GIT_TERMINAL_PROMPT:"0"}}),console.log(`Repository ${l.name} cloned successfully`),c[l.name]=p}catch(y){let _=y.message.replace(d,"***").replace(v,m);console.error(`Failed to clone ${l.name}: ${_}`),c[l.name]=null}})),c}import{spawn as a8}from"child_process";import{readFileSync as sPe,writeFileSync as cPe,existsSync as qb}from"fs";import{homedir as s8}from"os";import{join as Vu}from"path";async function lPe(){let t=Vu(s8(),".local/share/cursor-agent/versions");if(!qb(t))throw new Error(`cursor-agent not found at ${t}. Please install cursor-agent first.`);return console.log(`\u{1F527} Patching cursor-agent for CI/CD...
327
+ `),new Promise((e,r)=>{let n=Vu(__dirname,"../../scripts/patch-cursor-mcp.py");if(!qb(n)){r(new Error("Patch script not found"));return}let i=a8("python3",[n],{stdio:"inherit"});i.on("close",o=>{o===0?e({success:!0}):r(new Error(`Patch failed with code ${o}`))}),i.on("error",o=>{r(o)})})}function uPe(){let t=Vu(s8(),".local/share/cursor-agent/versions");if(!qb(t))return{patched:!1,installed:!1};try{let e=Tt("fs").readdirSync(t);if(e.length===0)return{patched:!1,installed:!1};let r=e.sort().reverse()[0],n=Vu(t,r,"index.js");return qb(n)?{patched:sPe(n,"utf-8").includes("AUTO-APPROVE MCP TOOLS FOR CI/CD"),installed:!0,path:n}:{patched:!1,installed:!1}}catch(e){return{patched:!1,installed:!1,error:e.message}}}async function dPe(t){return console.log(`\u{1F511} Getting MCP approval keys...
328
+ `),new Promise((e,r)=>{let n=a8("cursor-agent",["mcp","list"],{cwd:t,stdio:"pipe"}),i="";n.stdout.on("data",o=>{i+=o.toString(),process.stdout.write(o)}),n.stderr.on("data",o=>{process.stderr.write(o)}),n.on("close",o=>{if(o===0){let a=pPe(i);e({success:!0,keys:a,output:i})}else r(new Error(`Failed to get approval keys (exit code ${o})`))}),n.on("error",o=>{r(o)})})}function pPe(t){let e={},r=/🔑 APPROVAL KEY:\s+(\S+)\s+=>\s+(\S+)/g,n;for(;(n=r.exec(t))!==null;)e[n[1]]=n[2];return e}function fPe(t,e){let r=Vu(t,".cursor/projects"),n=Vu(r,"mcp-approvals.json");cPe(n,JSON.stringify(e,null,2)),console.log(`
329
+ \u2705 Saved approval keys to: ${n}
330
+ `)}ra();no();var c8=`
331
+ const style = document.createElement('style');
332
+ style.textContent = \`
333
+ @keyframes zibby-ripple {
334
+ 0% {
335
+ transform: scale(0);
336
+ opacity: 0.7;
337
+ }
338
+ 100% {
339
+ transform: scale(4);
340
+ opacity: 0;
341
+ }
342
+ }
343
+ .zibby-ripple {
344
+ position: absolute;
345
+ border-radius: 50%;
346
+ background: rgba(59, 130, 246, 0.7);
347
+ pointer-events: none;
348
+ animation: zibby-ripple 0.6s ease-out;
349
+ z-index: 999999;
350
+ }
351
+ .zibby-typing-indicator {
352
+ position: absolute;
353
+ border-radius: 50%;
354
+ border: 2px solid rgba(59, 130, 246, 0.8);
355
+ background: rgba(59, 130, 246, 0.1);
356
+ pointer-events: none;
357
+ z-index: 999999;
358
+ animation: zibby-pulse 1s ease-in-out infinite;
359
+ }
360
+ @keyframes zibby-pulse {
361
+ 0%, 100% { opacity: 1; }
362
+ 50% { opacity: 0.5; }
363
+ }
364
+ \`;
365
+
366
+ document.addEventListener('DOMContentLoaded', () => {
367
+ if (document.head && !document.getElementById('zibby-ripple-style')) {
368
+ style.id = 'zibby-ripple-style';
369
+ document.head.appendChild(style);
370
+ }
371
+ });
372
+
373
+ if (document.head && !document.getElementById('zibby-ripple-style')) {
374
+ style.id = 'zibby-ripple-style';
375
+ document.head.appendChild(style);
376
+ }
377
+
378
+ window.__zibbyShowRipple = function(x, y, isTyping = false) {
379
+ const ripple = document.createElement('div');
380
+ ripple.className = 'zibby-ripple';
381
+ ripple.style.left = (x - 10) + 'px';
382
+ ripple.style.top = (y - 10) + 'px';
383
+ ripple.style.width = '20px';
384
+ ripple.style.height = '20px';
385
+
386
+ if (document.body) {
387
+ document.body.appendChild(ripple);
388
+ setTimeout(() => ripple.remove(), 600);
389
+ }
390
+ };
391
+ `;function mPe(t){return t.addInitScript(c8)}function hPe(){return`
392
+ async function showRipple(page, locator) {
393
+ const box = await locator.boundingBox().catch(() => null);
394
+ if (box) {
395
+ const x = box.x + box.width / 2;
396
+ const y = box.y + box.height / 2;
397
+ await page.evaluate((coords) => {
398
+ if (window.__zibbyShowRipple) {
399
+ window.__zibbyShowRipple(coords.x, coords.y, false);
400
+ }
401
+ }, { x, y }).catch(() => {});
402
+ }
403
+ }
404
+ `.trim()}var Bm=class{static generate(e,r="element"){let{selectors:n}=e;if(!n||typeof n!="object")return this.generateFallbackSelector(e,r);let i=[];return n.role&&i.push(this.generateRoleSelector(n.role)),n.attributes&&i.push(this.generateAttributeSelector(n.attributes)),n.partialMatch&&i.push(this.generatePartialMatchSelector(n.partialMatch)),n.structure&&i.push(this.generateStructuralSelector(n.structure)),i.length===0?this.generateFallbackSelector(e,r):i.length===1?`const ${r} = ${i[0]};`:`const ${r} = ${i[0]}
405
+ ${i.slice(1).map(a=>` .or(${a})`).join(`
406
+ `)};`}static generateRoleSelector(e){let{role:r,name:n}=e;if(!r)return null;if(n){let i=this.escapeRegex(n);return`page.getByRole('${r}', { name: /${i}/i })`}return`page.getByRole('${r}')`}static generateAttributeSelector(e){if(!e||typeof e!="object")return null;let r=Object.entries(e).filter(([i,o])=>o!=null).map(([i,o])=>i==="placeholder"||i==="aria-label"?i==="placeholder"?`page.getByPlaceholder('${this.escapeString(o)}')`:`page.locator('[${i}="${this.escapeString(o)}"]')`:`[${i}="${this.escapeString(o)}"]`);if(e.placeholder)return`page.getByPlaceholder('${this.escapeString(e.placeholder)}')`;let n=r.filter(i=>!i.startsWith("page.")).join("");return n?`page.locator('${n}')`:null}static generatePartialMatchSelector(e){if(!e||typeof e!="object")return null;let r=Object.entries(e).filter(([n,i])=>i!==void 0).map(([n,i])=>{let o=i.replace(/^\^/,"");return`[${n}^="${this.escapeString(o)}"]`});return r.length>0?`page.locator('${r.join("")}')`:null}static generateStructuralSelector(e){return!e||typeof e!="string"?null:`page.locator('${this.escapeString(e)}')`}static generateFallbackSelector(e,r){let{description:n,type:i}=e;if(i==="fill"||i==="type")return`const ${r} = page.locator('input').first();`;if(i==="click"){if(n.toLowerCase().includes("button"))return`const ${r} = page.locator('button').first();`;if(n.toLowerCase().includes("link"))return`const ${r} = page.locator('a').first();`}return`const ${r} = page.locator('body');`}static escapeString(e){return typeof e!="string"?String(e):e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}static escapeRegex(e){return typeof e!="string"?String(e):e.replace(/[.*+?^${}()[\]\\]/g,"\\$&")}static generateActionCode(e,r){let{type:n,value:i,description:o,selectors:a}=e,s=`element${r}`,c=this.generate(e,s),l=this.generateActionMethod(n,s,i);return`${c}
407
+ ${l}`}static generateActionMethod(e,r,n){switch(e){case"fill":case"type":return`await ${r}.fill('${this.escapeString(n||"")}');`;case"click":return`await ${r}.click();`;case"navigate":return`await page.goto('${this.escapeString(n||"")}');`;case"wait":return`await page.waitForTimeout(${parseInt(n)||2e3});`;default:return`// Unknown action type: ${e}`}}static generateAssertionCode(e,r){let{description:n,expected:i,actual:o,passed:a}=e;return n.toLowerCase().includes("url")?`await expect(page).toHaveURL(/${this.escapeRegex(o)}/);`:n.toLowerCase().includes("visible")?"await expect(page.locator('body')).toBeVisible();":`// ${n}`}};import Gm from"fs/promises";var UN=class{static async generateFromEvents(e,r,n,i){try{console.log("[TestPostProcessor] \u{1F3AF} Generating test from events.json (100% accurate)");let{readFileSync:o}=await import("fs"),a=JSON.parse(o(r,"utf-8")),s=a.filter(p=>["navigate","type","fill","click","select_option"].includes(p.type)),c=s.filter(p=>p.type!=="navigate");console.log(`[TestPostProcessor] Found ${s.length} action events, ${n.length} trace actions`);let l=`import { ZibbyRuntime } from '@zibby/core';
408
+ import { test, expect } from '@playwright/test';
409
+
410
+ `;l+=`test('${i}', async ({ page }) => {
411
+ `,l+=` const timestamp = Date.now();
412
+
413
+ `;let u=0;for(let p of s)if(p.type==="navigate")l+=` await page.goto('${p.data.params.url}');
414
+
415
+ `;else if(p.type==="type"||p.type==="fill"){let{element:m,text:v}=p.data.params,g=n[u]?.strategies||[];l+=` await ZibbyRuntime.step(page, ${JSON.stringify({name:m,action:"fill",value:v,strategies:g},null,2)});
416
+
417
+ `,u++}else if(p.type==="click"){let{element:m}=p.data.params,v=n[u]?.strategies||[];l+=` await ZibbyRuntime.step(page, ${JSON.stringify({name:m,action:"click",value:"",strategies:v},null,2)});
418
+
419
+ `,u++}else if(p.type==="select_option"){let{element:m,values:v}=p.data.params,g=n[u]?.strategies||[],h={name:m,action:"selectOption",value:Array.isArray(v)?v[0]:v,strategies:g};l+=` await ZibbyRuntime.step(page, ${JSON.stringify(h,null,2)});
420
+
421
+ `,u++}l+=`});
422
+ `;let{dirname:d}=await import("path"),{mkdirSync:f}=await import("fs");return f(d(e),{recursive:!0}),await Gm.writeFile(e,l,"utf-8"),console.log(`[TestPostProcessor] \u2705 Generated test with ${a.filter(p=>["type","fill","click","select_option"].includes(p.type)).length} actions`),!0}catch(o){return console.warn("[TestPostProcessor] Failed to generate from events:",o.message),!1}}static async enhanceSelectorsWithTrace(e,r,n){try{console.log("[TestPostProcessor] \u{1F6E1}\uFE0F Applying Zibby Safe Action Wrappers...");let i=await Gm.readFile(e,"utf-8");i.includes("ZibbyRuntime")||(i=`import { ZibbyRuntime } from '@zibby/core';
423
+ ${i}`);for(let o=0;o<r.length;o++){let a=r[o],s=`element${o}`,c=new RegExp(`const ${s}\\b\\s*=\\s*page\\.[^;]+;(\\s*await ${s}\\.waitFor\\([^)]*\\);)?\\s*await ${s}\\.(click|fill|type|selectOption|pressSequentially)\\(([^)]*)\\);`,"s"),l=i.match(c);if(!l)continue;let u={name:a.name||`Action ${o}`,action:a.method==="type"?"fill":a.method,value:l[3].trim().replace(/^['"]|['"]$/g,""),strategies:a.strategies||[]},d=`await ZibbyRuntime.step(page, ${JSON.stringify(u,null,2)});`;i=i.replace(l[0],d)}return await Gm.writeFile(e,i,"utf-8"),console.log("[TestPostProcessor] \u2705 Successfully converted test to Resilient Zibby format"),!0}catch(i){return console.warn("[TestPostProcessor] Failed to apply safe wrappers:",i.message),!1}}static async enhanceSelectors(e,r){try{let{actions:n=[]}=r;if(!n.length)return!1;let i=await Gm.readFile(e,"utf-8"),o=this.buildSelectorMap(n);return i=this.replaceSimpleSelectors(i,o),await Gm.writeFile(e,i,"utf-8"),!0}catch(n){return console.warn("Failed to enhance selectors:",n),!1}}static buildSelectorMap(e){let r=new Map;for(let n=0;n<e.length;n++){let i=e[n];if(!i.selectors||i.type==="navigate")continue;let o=`element${n}`,s=Bm.generate(i,o).match(/= (.+);/s);if(s){let c=s[1].trim(),l=`${i.type}:${this.normalizeDescription(i.description)}`;r.set(l,c),i.selectors.role&&r.set(`role:${i.selectors.role.name}`,c),i.selectors.attributes?.placeholder&&r.set(`placeholder:${i.selectors.attributes.placeholder}`,c)}}return r}static replaceSimpleSelectors(e,r){let n=e,i=[/await page\.(getByRole|getByPlaceholder|getByText|getByLabel|locator)\([^)]+\)\.(fill|click|type)\([^)]*\)/g];for(let o of i)n=n.replace(o,a=>{for(let[s,c]of r.entries())if(a.includes(s.split(":")[1])){let l=a.match(/\.(fill|click|type)\(([^)]*)\)/);if(l){let[,u,d]=l,f="element";return`const ${f} = ${c};
424
+ await ${f}.${u}(${d})`}}return a});return n}static normalizeDescription(e){return e?e.toLowerCase().replace(/[^a-z0-9]+/g," ").trim():""}};import{readFileSync as gPe,existsSync as l8,readdirSync as u8}from"fs";import{join as DN}from"path";import{execSync as vPe}from"child_process";import{tmpdir as yPe}from"os";var Km=class{static async parseTraceZip(e){let r;if(e.endsWith(".zip")&&l8(e)){let n=DN(yPe(),`trace-${Date.now()}`);vPe(`unzip -q "${e}" -d "${n}"`,{stdio:"pipe"});let o=u8(n).find(a=>a.endsWith(".trace"));if(!o)throw new Error("No .trace file found in zip");r=DN(n,o)}else if(l8(e)){let i=u8(e).find(o=>o.endsWith(".trace"));if(!i)throw new Error("No .trace file found");r=DN(e,i)}else throw new Error(`Trace not found at ${e}`);try{let i=gPe(r,"utf-8").trim().split(`
425
+ `),o=[],a=new Map,s=new Map;for(let c of i)try{let l=JSON.parse(c);if(l.type==="snapshot"&&l.snapshot&&l.snapshot.accessibility){let u=new Map;for(let d of l.snapshot.accessibility)d.ref&&u.set(d.ref,d);a.set(l.snapshotName,u)}if(l.type==="frame-snapshot"&&l.snapshot){let u=Buffer.from(l.snapshot.html||"","base64").toString("utf-8");u&&u.length>100&&s.set(l.pageId||"default",u)}}catch{}for(let c of i)try{let l=JSON.parse(c);if(l.type==="before"&&l.params&&l.params.selector){let u=l.method;if(["click","fill","type","selectOption"].includes(u)){let d=l.params.selector,f=l.params.text||l.params.value||"",p=[],m=null,v=null,g=null,h=d.match(/aria-ref=([a-z0-9]+)/i);if(h&&l.snapshotName){let I=h[1],U=a.get(l.snapshotName);if(U&&U.has(I)){let L=U.get(I);m=L.name||null,v=L.role||null,g=L.label||null,console.log(`[TraceParser] \u2705 Found ACTUAL element data: text="${m}", role="${v}"`)}}let y=d.match(/internal:text="([^"]+)"/i),_=d.match(/internal:label="([^"]+)"/i),b=d.match(/internal:placeholder="([^"]+)"/i),x=d.match(/internal:role=([^ ]+)/i),w=d.match(/internal:describe="([^"]+)"/i),S=d.match(/name="([^"]+)"/i);if(y){p.push({type:"text",text:y[1]});let I=y[1].split(" ");I.length>1&&(p.push({type:"text",text:I[0],fuzzy:!0}),p.push({type:"text",text:I[I.length-1],fuzzy:!0}))}if(_&&p.push({type:"label",label:_[1]}),b&&p.push({type:"placeholder",placeholder:b[1]}),m){p.unshift({type:"text",text:m,source:"accessibility-tree"});let I=m.split(" ");I.length>1&&p.push({type:"text",text:I[0],fuzzy:!0,source:"accessibility-tree"})}if(v||x){let I=v||x[1],U=m||(S?S[1]:y?y[1]:null);p.unshift({type:"role",role:I,name:U,source:m?"accessibility-tree":"selector"})}if(g&&p.unshift({type:"label",label:g,source:"accessibility-tree"}),w){let I=w[1],U=["link","button","textbox","menuitem","submenu","combobox","checkbox","radio","tab","treeitem","menu item"],L=null,N=I;for(let Y of U)if(I.toLowerCase().endsWith(` ${Y}`)){L=Y.replace(" ",""),N=I.substring(0,I.length-Y.length-1);break}if(L){p.push({type:"role",role:L,name:N});let Y=N.replace(/\s*\([^)]+\)\s*$/,"");p.push({type:"text",text:Y}),p.push({type:"text",text:N});let H=N.split(" ");H.length>1&&(p.push({type:"text",text:H[0],fuzzy:!0}),p.push({type:"text",text:H.slice(0,2).join(" "),fuzzy:!0}))}else{let Y=I.replace(/\s*\([^)]+\)\s*$/,"");p.push({type:"text",text:Y}),p.push({type:"text",text:I})}}let $=this.extractDOMStrategies(d,s,y?.[1]||w?.[1],l.pageId);p.push(...$);let T=this.extractStructuralContext(d);(T.parent||T.sibling)&&p.forEach(I=>{["role","text","label","testid"].includes(I.type)&&(T.parent&&(I.parent=T.parent),T.sibling&&(I.sibling=T.sibling))}),p.push({type:"css",value:d});let A=m||y?y[1]:w?w[1].replace(/\s*\([^)]+\)\s*$/,""):`Action ${o.length}`;o.push({method:u,name:A,action:u==="type"?"fill":u,value:f,strategies:p,timestamp:l.startTime,actualText:m,actualRole:v,actualAriaLabel:g})}}}catch{}return o}catch(n){throw new Error(`Failed to parse trace: ${n.message}`,{cause:n})}}static extractDOMStrategies(e,r,n,i){let o=[];if(!r||r.size===0||!n)return o;try{let a=r.get(i);if(!a)return o;let s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`data-testid=["']([^"']+)["'][^>]*>[^<]*${s}`,"i"),l=a.match(c);l&&o.push({type:"testid",value:l[1],priority:"high"});let u=new RegExp(`class=["']([^"']+)["'][^>]*>[^<]*${s}`,"gi"),d=a.matchAll(u);for(let m of d){let v=m[1].split(/\s+/).filter(g=>g&&!g.match(/^(css|jss|makeStyles|MuiBox|MuiStack)-\w+/)&&g.length>2);v.length>0&&(o.push({type:"class",value:v.join("."),priority:"medium"}),v.length===1&&o.push({type:"class",value:v[0],priority:"medium"}))}let f=new RegExp(`id=["']([^"']+)["'][^>]*>[^<]*${s}`,"i"),p=a.match(f);p&&!p[1].match(/^(root|app|\d+|[a-f0-9-]{20,})$/i)&&o.push({type:"id",value:p[1],priority:"high"})}catch(a){console.warn(`[TraceParser] DOM extraction failed: ${a.message}`)}return o}static extractStructuralContext(e){let r={parent:null,sibling:null},n=e.split(">>").map(a=>a.trim());if(n.length>1){let s=n[n.length-2].replace(/internal:text="[^"]+"\s*/gi,"").replace(/internal:role=\S+\s*/gi,"").replace(/internal:label="[^"]+"\s*/gi,"").trim();s&&(s.match(/^(form|section|nav|header|aside|main|article)\b/)||s.includes("[")||s.match(/[#.]\w/))&&(r.parent=s)}let o=n[n.length-1].match(/([^+~]+)\s*[+~]\s*(.+)/);return o&&(r.sibling=o[1].trim()),r}};rd();var MN=class{static async step(e,r){let{name:n,action:i,value:o,strategies:a,options:s={timeout:1e4},enrichedData:c}=r;console.log(`[Zibby] \u26A1 Executing step: ${n}`),await this.waitForPageStability(e,s.timeout);let l=await this.findBestMatch(e,a,n);if(!l)throw new Error(`[Zibby] \u274C Failed to find "${n}" using ${a.length} strategies`);c?.position&&await this.verifyPosition(l,c.position),await this.performActionWithRetry(e,l,i,o,3),console.log(`[Zibby] \u2728 Step "${n}" completed.`)}static async waitForPageStability(e,r=1e4){try{await e.waitForLoadState("networkidle",{timeout:3e3}).catch(()=>{}),await e.evaluate(()=>new Promise(n=>{let i,o=new MutationObserver(()=>{clearTimeout(i),i=setTimeout(()=>{o.disconnect(),n()},500)});o.observe(document.body,{childList:!0,subtree:!0,attributes:!0}),i=setTimeout(()=>{o.disconnect(),n()},500)})).catch(()=>{})}catch{}}static async verifyPosition(e,r){try{let n=await e.boundingBox();if(!n)return;let i=Math.abs(n.x-r.x),o=Math.abs(n.y-r.y);(i>50||o>50)&&(console.log(`[Zibby] \u26A0\uFE0F Element moved: expected (${r.x}, ${r.y}), got (${n.x}, ${n.y})`),await new Promise(a=>setTimeout(a,500)))}catch{}}static async performActionWithRetry(e,r,n,i,o=3){for(let a=1;a<=o;a++)try{n==="click"?await r.click():n==="fill"?await r.fill(i||""):n==="type"?await r.pressSequentially(i||""):n==="selectOption"&&await r.selectOption(i||"");return}catch(s){if(a===o)throw s;console.log(`[Zibby] \u26A0\uFE0F Action failed (attempt ${a}/${o}), retrying...`),await new Promise(c=>setTimeout(c,1e3*a))}}static async findBestMatch(e,r,n){let o=Date.now(),a=r.map(async(l,u)=>{try{let f=await this.getLocator(e,l).all();return f.length===0?[]:(await Promise.all(f.map(async(m,v)=>{try{if(!await m.isVisible({timeout:100}))return null;let h=await this.scoreCandidate(m,l,e);return{element:m,strategy:l,score:h,strategyIdx:u,elIdx:v}}catch{return null}}))).filter(m=>m!==null)}catch{return[]}}),s=(await Promise.all(a)).flat();if(s.length===0)return console.log(`[Zibby] \u274C No visible candidates found for "${n}"`),null;s.sort((l,u)=>u.score-l.score);let c=s[0];return console.log(`[Zibby] \u2705 Found element using ${c.strategy.type} (score: ${c.score.toFixed(2)}, ${s.length} candidates)`),c.element}static async scoreCandidate(e,r,n){let i=0;if(i+={testid:120,id:110,role:100,label:90,class:85,placeholder:85,text:80,css:50}[r.type]||50,r.priority==="high"&&(i+=20),r.priority==="medium"&&(i+=10),r.fuzzy&&(i-=15),r.parent)try{await e.locator("xpath=ancestor::*").first().evaluate((c,l)=>c.matches(l),r.parent)&&(i+=30)}catch{}if(r.sibling)try{await e.evaluate((s,c)=>s.parentElement?.querySelector(c)!==null,r.sibling)&&(i+=20)}catch{}try{let a=await e.boundingBox();a&&a.y<1e3&&(i+=10)}catch{}try{let a=await e.evaluate(s=>{let c=0,l=s;for(;l;)l.tagName==="IFRAME"&&c++,l=l.parentElement;return c});i-=a*5}catch{}return i}static getLocator(e,r){let n;switch(r.type){case"testid":n=e.getByTestId(r.value);break;case"id":n=e.locator(`#${r.value}`);break;case"class":n=e.locator(`.${r.value.replace(/\./g,".")}`);break;case"text":r.fuzzy?n=e.getByText(new RegExp(r.text,"i")):n=e.getByText(r.text,{exact:!1});break;case"role":n=e.getByRole(r.role,{name:r.name,exact:!1});break;case"label":n=e.getByLabel(r.label,{exact:!1});break;case"placeholder":n=e.getByPlaceholder(r.placeholder);break;default:{let i=r.value?.replace(/aria-ref=e\d+ >> /g,"")||r.css;n=e.locator(i);break}}return r.parent&&(n=n.filter({has:e.locator(r.parent)})),n}};var LN=class{static async beforeEach(e){await this.injectStableIds(e),e.on("load",async()=>{await this.injectStableIds(e)})}static async afterNavigation(e){await e.waitForLoadState("domcontentloaded").catch(()=>{}),await this.injectStableIds(e)}static async clickWithRetry(e,r,n={}){let i=n.timeout||1e4,o=`[data-zibby-id="${r}"]`,a=Date.now();for(;Date.now()-a<i;){await this.injectStableIds(e);let s=e.locator(o);if(await s.count()>0)try{await s.click({timeout:2e3});return}catch(c){if(c.message.includes("intercepts pointer")){await s.click({force:!0});return}}await e.waitForTimeout(200)}throw new Error(`Element ${o} not found after ${i}ms`)}static async fillWithRetry(e,r,n,i=1e4){let o=`[data-zibby-id="${r}"]`,a=Date.now();for(;Date.now()-a<i;){await this.injectStableIds(e);let s=e.locator(o);if(await s.count()>0){await s.fill(n);return}await e.waitForTimeout(200)}throw new Error(`Element ${o} not found after ${i}ms`)}static async selectWithRetry(e,r,n,i=1e4){let o=`[data-zibby-id="${r}"]`,a=Date.now();for(;Date.now()-a<i;){await this.injectStableIds(e);let s=e.locator(o);if(await s.count()>0){await s.selectOption(n);return}await e.waitForTimeout(200)}throw new Error(`Element ${o} not found after ${i}ms`)}static async injectStableIds(e){try{await e.evaluate(()=>{function r(c){if(c.getAttribute("aria-label"))return c.getAttribute("aria-label").trim();let l=c.getAttribute("aria-labelledby");if(l){let f=document.getElementById(l);if(f)return f.textContent.trim()}if(c.id){let f=document.querySelector(`label[for="${c.id}"]`);if(f)return f.textContent.trim()}let u=c.closest("label");if(u){let f=u.cloneNode(!0);f.querySelectorAll("input, select, textarea").forEach(m=>m.remove());let p=f.textContent.trim();if(p)return p}if(c.placeholder)return c.placeholder;let d=c.tagName.toLowerCase();return d==="button"||d==="a"||c.getAttribute("role")==="button"?(c.textContent||"").trim().slice(0,50):c.title?c.title:d==="input"&&(c.type==="submit"||c.type==="button")&&c.value||""}function n(c){let l=[],u=c.closest("form");if(u)if(u.id)l.push(`form#${u.id}`);else if(u.name)l.push(`form[name=${u.name}]`);else if(u.action)try{let v=new URL(u.action,window.location.origin).pathname;l.push(`form[action=${v}]`)}catch{l.push(`form[action=${u.getAttribute("action")}]`)}else{let v=document.querySelectorAll("form"),g=Array.from(v).indexOf(u);l.push(`form:nth(${g})`)}let d=c.closest('header, nav, main, footer, aside, [role="banner"], [role="navigation"], [role="main"], [role="contentinfo"]');if(d){let v=d.tagName.toLowerCase(),g=d.getAttribute("role");l.push(g||v)}let f=c.closest('section, article, [role="region"]');if(f){let v=f.querySelector("h1, h2, h3, h4, h5, h6");v&&l.push(`section:${v.textContent.trim().slice(0,30)}`)}let p=c.closest("fieldset");if(p){let v=p.querySelector("legend");v&&l.push(`fieldset:${v.textContent.trim()}`)}let m=c.closest('dialog, [role="dialog"], [role="alertdialog"]');if(m){let v=m.querySelector('[role="heading"], h1, h2, h3');v?l.push(`dialog:${v.textContent.trim().slice(0,30)}`):l.push("dialog")}return l.join("/")}function i(c){let l=c.tagName.toLowerCase(),u=c.id||"",d=c.name||"",f=c.type||"",p=c.getAttribute("role")||"",m="";if(c.href)try{m=new URL(c.href,window.location.origin).pathname.slice(0,50)}catch{m=c.getAttribute("href")?.slice(0,50)||""}let v=r(c).slice(0,50).replace(/\s+/g," "),g=n(c),h=[l,u,d,f,p,m,v,g].join("|"),y=5381;for(let _=0;_<h.length;_++)y=(y<<5)+y^h.charCodeAt(_);return`zibby-${(y>>>0).toString(36)}`}let o=["button","a","input","select","textarea","label[for]",'[role="button"]','[role="link"]','[role="textbox"]','[role="checkbox"]','[role="radio"]','[role="combobox"]','[role="menuitem"]','[role="tab"]','[role="option"]','[role="switch"]','[role="slider"]',"[onclick]","[data-action]"].join(", "),a=new Map,s=0;document.querySelectorAll(o).forEach(c=>{let l=window.getComputedStyle(c);if(l.display==="none"||l.visibility==="hidden")return;let u=i(c),d=u,f=a.get(d)||0;f>0&&(u=`${d}-${f}`),a.set(d,f+1),c.setAttribute("data-zibby-id",u),s++}),console.log(`[Zibby] Injected ${s} stable IDs`)})}catch{}}};ni();Ya();var _Pe=8,bPe=1,xPe=64;function wPe(t){if(!t||typeof t!="object")return 8;let e=t.parallel;if(!e||typeof e!="object")return 8;let r=e.maxConcurrentRuns??e.maxConcurrent,n=Number(r);if(!Number.isFinite(n))return 8;let i=Math.floor(n);return i<1?8:Math.min(64,i)}import{readFileSync as kPe,writeFileSync as p8,existsSync as $Pe}from"fs";import{join as f8}from"path";var Xr=class{constructor(e={}){this.config=e,this.enabled=e.enabled!==!1,this.priority=e.priority||50}getName(){throw new Error("EventEnricher.getName() must be implemented")}canEnrich(e){return this.enabled}async enrich(e,r){throw new Error("EventEnricher.enrich() must be implemented")}handleError(e,r){return console.warn(`[${this.getName()}] Enrichment failed for event ${r.type}:`,e.message),null}};import{existsSync as SPe}from"fs";import{join as d8}from"path";var wc=class extends Xr{constructor(e={}){super(e),this.priority=190,this.traceData=null}getName(){return"TraceText"}getPriority(){return this.priority}async loadTrace(e){if(this.traceData)return;let r=d8(e,"traces"),n=d8(e,"trace.zip");if(SPe(n))try{this.traceData=await Km.parseTraceZip(n),console.log(`[TraceTextEnricher] \u2705 Loaded trace with ${this.traceData.length} actions`)}catch(i){console.log(`[TraceTextEnricher] \u26A0\uFE0F Failed to parse trace: ${i.message}`)}}async enrich(e,r){let n=e.data?.params?.ref,i=e.id;if(n===void 0&&i===void 0||(!this.traceData&&r.sessionPath&&await this.loadTrace(r.sessionPath),!this.traceData))return null;let o=this.traceData[i];if(!o)return console.log(`[TraceTextEnricher] \u26A0\uFE0F No trace action for event ${i}`),null;let a=o.actualText||this._extractTextFromSelector(o.selector),s=o.actualRole,c=o.actualAriaLabel;return a||s||c?(console.log(`[TraceTextEnricher] \u2705 Event ${i}: text="${a}", role="${s}", label="${c}"`),{traceActualText:a,traceActualRole:s,traceActualAriaLabel:c,traceSelector:o.selector,traceStrategies:o.strategies}):null}_extractTextFromSelector(e){if(!e)return null;let r=e.match(/internal:label="([^"]+)"/);if(r)return r[1];let n=e.match(/internal:text="([^"]+)"/);if(n)return n[1];let i=e.match(/getByText\(['"]([^'"]+)['"]\)/);if(i)return i[1];let o=e.match(/name:\s*['"]([^'"]+)['"]/);return o?o[1]:null}};async function EPe(t){let e=f8(t,"events.json"),r=f8(t,"events-enriched.json");if(!$Pe(e))return console.log("[PostProcess] No events.json found"),{enriched:0,failed:0};try{let n=JSON.parse(kPe(e,"utf-8")),i=new wc,o=0,a=0;for(let s of n)try{let c=await i.enrich(s,{sessionPath:t});c&&(s.enrichedData={...s.enrichedData||{},...c},o++)}catch(c){console.log(`[PostProcess] Failed to enrich event ${s.id}: ${c.message}`),a++}return o>0&&(p8(r,JSON.stringify(n,null,2)),p8(e,JSON.stringify(n,null,2)),console.log(`[PostProcess] \u2705 Enriched ${o} events (${a} failed)`)),{enriched:o,failed:a}}catch(n){return console.log(`[PostProcess] \u274C Failed to post-process events: ${n.message}`),{enriched:0,failed:0}}}import{spawn as IPe}from"child_process";import{existsSync as PPe}from"fs";import{dirname as TPe,resolve as m8,relative as OPe}from"path";var Fb=new Map,Hm=8,h8={name:"run_playwright_test",description:`Run a Playwright test file and return results. Use this after writing a test to verify it works. If it fails, fix the issues and run again. Maximum ${Hm} attempts per session.`,inputSchema:{type:"object",properties:{scriptPath:{type:"string",description:"Path to the Playwright test file (e.g., tests/login.spec.js)"}},required:["scriptPath"]},async execute({scriptPath:t},e){let n=`${e?.sessionId||"default"}:${t}`,i=(Fb.get(n)||0)+1;if(Fb.set(n,i),i>Hm)return{success:!1,executionCount:i,maxReached:!0,error:`Maximum ${Hm} executions reached. Stop retrying and return your best result.`};let o=e?.projectRoot||process.cwd(),a=m8(o,t),s=OPe(o,a);return s.startsWith("..")||m8(a)!==a&&s.includes("..")?{success:!1,executionCount:i,error:"Path traversal detected: scriptPath must be within the project root."}:PPe(a)?new Promise(c=>{let l=TPe(a),u=IPe("npx",["playwright","test",a,"--reporter=line"],{cwd:o,env:{...process.env,FORCE_COLOR:"0"}}),d="",f="";u.stdout.on("data",m=>{d+=m.toString()}),u.stderr.on("data",m=>{f+=m.toString()});let p=setTimeout(()=>{u.kill("SIGTERM"),c({success:!1,executionCount:i,error:"Test timed out after 60 seconds",stdout:d.slice(-2e3),stderr:f.slice(-1e3)})},6e4);u.on("close",m=>{clearTimeout(p);let g=`${d}
426
+ ${f}`.split(`
427
+ `),h="",y=null;for(let _=0;_<g.length;_++){let b=g[_];if(b.includes("Error:")||b.includes("error:")||b.includes("\u2718")){h+=`${b}
428
+ `;for(let x=_+1;x<Math.min(_+5,g.length);x++)h+=`${g[x]}
429
+ `}if(b.includes("at ")&&b.includes(".spec.")){let x=b.match(/:(\d+):\d+/);x&&(y=parseInt(x[1]))}}c(m===0?{success:!0,executionCount:i,message:"All tests passed!",output:d.slice(-500)}:{success:!1,executionCount:i,remainingAttempts:Hm-i,error:h.slice(0,1500)||"Test failed (see output)",failedAtLine:y,stdout:d.slice(-1500),stderr:f.slice(-500),hint:i<Hm?"Fix the error and run again.":"Last attempt - make your best fix."})}),u.on("error",m=>{clearTimeout(p),c({success:!1,executionCount:i,error:`Failed to run test: ${m.message}`})})}):{success:!1,executionCount:i,error:`Test file not found: ${a}. Make sure you wrote the file first using the write tool.`}},resetCount(t){for(let e of Fb.keys())e.startsWith(`${t}:`)&&Fb.delete(e)}};function zPe(t){h8.resetCount(t)}var Ka=class{async generate(e){throw new Error("TestGenerationStrategy.generate() must be implemented")}canGenerate(e){throw new Error("TestGenerationStrategy.canGenerate() must be implemented")}getName(){throw new Error("TestGenerationStrategy.getName() must be implemented")}getPriority(){return 0}};import{readFileSync as g8,writeFileSync as jPe}from"fs";var Wu=class extends Ka{constructor(){super("mcp-ref","MCP Reference Replay (Exact 1:1)",200)}canGenerate(e){let r=e.eventsPath||`${e.sessionPath}/execute_live/events.json`;try{return JSON.parse(g8(r,"utf-8")).some(o=>o.data?.params?.element)?(console.log("[MCPRefStrategy] \u2705 MCP element descriptions available"),!0):(console.log("[MCPRefStrategy] \u274C No MCP element descriptions found in events"),!1)}catch(n){return console.log("[MCPRefStrategy] \u274C Failed to read events:",n.message),!1}}getName(){return"MCP Reference Replay (Exact 1:1)"}getPriority(){return 200}async generate(e){let{testFilePath:r,sessionPath:n,state:i}=e,o=`${n}/execute_live/events.json`,a=i?.title||"Generated Test";console.log("[MCPRefStrategy] \u{1F3AF} Generating test using MCP element descriptions (1:1 replay)"),console.log(`[MCPRefStrategy] events: ${o}`),console.log(`[MCPRefStrategy] output: ${r}`);let c=JSON.parse(g8(o,"utf-8")).filter(u=>["navigate","type","fill","click","select_option"].includes(u.type)),l=`import { test, expect } from '@playwright/test';
430
+ `;l+=`import { ZibbyRuntime } from '@zibby/core';
431
+
432
+ `,l+=`test('${a}', async ({ page }) => {
433
+ `,l+=` const timestamp = Date.now();
434
+
435
+ `;for(let u of c){let d=u.data?.params?.element||"element",f=u.data?.params?.ref,p=u.enrichedData?.traceActualText,m=u.enrichedData?.traceActualRole,v=u.enrichedData?.traceActualAriaLabel,g=u.enrichedData?.actualText,h=p||g,y=m||u.enrichedData?.actualRole,_=h||d,b=h||this._extractName(d),x=y||this._extractRole(d),w=p?" [accessibility-tree]":g?" [live]":" [AI]";if(u.type==="navigate")l+=` await page.goto('${u.data.params.url}');
436
+
437
+ `;else if(u.type==="click")l+=` // ${d}${h?` (actual: "${h}")${w}`:""}
438
+ `,l+=` await ZibbyRuntime.step(page, {
439
+ `,l+=` name: '${this._escapeString(d)}',
440
+ `,l+=` action: 'click',
441
+ `,l+=` strategies: [
442
+ `,l+=` { type: 'role', role: '${x}', name: '${this._escapeString(b)}' },
443
+ `,l+=` { type: 'text', text: '${this._escapeString(b)}' }
444
+ `,l+=` ]
445
+ `,l+=` });
446
+
447
+ `;else if(u.type==="fill"||u.type==="type"){let S=u.data.params.text;l+=` // ${d}${h?` (actual: "${h}")${w}`:""}
448
+ `,l+=` await ZibbyRuntime.step(page, {
449
+ `,l+=` name: '${this._escapeString(d)}',
450
+ `,l+=` action: 'fill',
451
+ `,l+=` value: '${this._escapeString(S)}',
452
+ `,l+=` strategies: [
453
+ `,l+=` { type: 'role', role: '${x}', name: '${this._escapeString(b)}' },
454
+ `,l+=` { type: 'attributes', placeholder: '${this._escapeString(b)}' }
455
+ `,l+=` ]
456
+ `,l+=` });
457
+
458
+ `}else if(u.type==="select_option"){let S=u.data.params.values,$=Array.isArray(S)?S[0]:S;l+=` // ${d}${h?` (actual: "${h}")${w}`:""}
459
+ `,l+=` await ZibbyRuntime.step(page, {
460
+ `,l+=` name: '${this._escapeString(d)}',
461
+ `,l+=` action: 'select',
462
+ `,l+=` value: '${this._escapeString($)}',
463
+ `,l+=` strategies: [
464
+ `,l+=` { type: 'role', role: 'combobox', name: '${this._escapeString(b)}' }
465
+ `,l+=` ]
466
+ `,l+=` });
467
+
468
+ `}}return l+=`});
469
+ `,jPe(r,l),console.log(`[MCPRefStrategy] \u2705 Generated test with ${c.length} actions using MCP descriptions`),{success:!0,testPath:r,method:"MCP Reference Replay (1:1)",actionsGenerated:c.length}}_extractRole(e){let r=e.toLowerCase();return r.includes("button")?"button":r.includes("textbox")?"textbox":r.includes("link")?"link":r.includes("checkbox")?"checkbox":r.includes("radio")?"radio":r.includes("combobox")?"combobox":r.includes("heading")?"heading":"button"}_extractName(e){return e.replace(/\s+(button|textbox|link|checkbox|radio|combobox)$/i,"").trim()}_escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_escapeString(e){return e.replace(/'/g,"\\'").replace(/\n/g,"\\n")}};import{readFileSync as v8,writeFileSync as NPe}from"fs";var Bu=class extends Ka{constructor(){super("stable-id","Stable ID Injection (Experimental)",300)}canGenerate(e){let r=e.eventsPath||`${e.sessionPath}/execute_live/events.json`;try{return JSON.parse(v8(r,"utf-8")).some(o=>o.stableId||o.data?.stableId)?(console.log("[StableIdStrategy] \u2705 Stable IDs available"),!0):(console.log("[StableIdStrategy] \u274C No stable IDs found in events"),!1)}catch(n){return console.log("[StableIdStrategy] \u274C Failed to read events:",n.message),!1}}getName(){return"Stable ID Injection (Experimental)"}getPriority(){return 300}async generate(e){let{testFilePath:r,sessionPath:n,state:i}=e,o=`${n}/execute_live/events.json`,a=i?.title||"Generated Test";console.log("[StableIdStrategy] \u{1F3AF} Generating test using stable IDs"),console.log(`[StableIdStrategy] events: ${o}`),console.log(`[StableIdStrategy] output: ${r}`);let c=JSON.parse(v8(o,"utf-8")).filter(f=>["navigate","type","fill","click","select_option","select"].includes(f.type)),l=`import { test, expect } from '@playwright/test';
470
+ `;l+=`import { StableIdRuntime } from '@zibby/core';
471
+
472
+ `,l+=`test('${a}', async ({ page }) => {
473
+ `;let u=!1,d=null;for(let f=0;f<c.length;f++){let p=c[f],m=p.stableId||p.data?.stableId,v=p.data?.element||p.data?.params?.element||"element";if(p.type==="click"&&m&&m===d){console.log(`[StableIdStrategy] Skipping duplicate click on ${m}`);continue}if(p.type==="navigate"){let g=p.data?.url||p.data?.params?.url;g&&!u&&(l+=` await page.goto('${g}');
474
+ `,l+=` await StableIdRuntime.injectStableIds(page);
475
+
476
+ `)}else if(p.type==="click")if(u=!0,d=m,m)l+=` await StableIdRuntime.clickWithRetry(page, '${m}');
477
+ `;else{let g=this._generateSemanticSelector(v);l+=` await ${g}.click();
478
+ `,l+=` await StableIdRuntime.afterNavigation(page);
479
+ `}else if(p.type==="fill"||p.type==="type"){u=!1;let g=p.data?.text||p.data?.params?.text||"";m?l+=` await StableIdRuntime.fillWithRetry(page, '${m}', '${this._escapeString(g)}');
480
+ `:l+=` await page.getByPlaceholder('${this._escapeString(v)}').fill('${this._escapeString(g)}');
481
+ `}else if(p.type==="select_option"||p.type==="select"){u=!1;let g=p.data?.values||p.data?.params?.values,h=Array.isArray(g)?g[0]:g||"";m?l+=` await StableIdRuntime.selectWithRetry(page, '${m}', '${this._escapeString(h)}');
482
+ `:l+=` await page.locator('select').selectOption('${this._escapeString(h)}');
483
+ `}}return l+=`});
484
+ `,NPe(r,l),console.log(`[StableIdStrategy] \u2705 Generated test with ${c.length} actions using stable IDs`),{success:!0,testPath:r,method:"Stable ID Injection (Experimental)",actionsGenerated:c.length}}_escapeString(e){return e.replace(/'/g,"\\'").replace(/\n/g,"\\n")}_generateSemanticSelector(e){let r=e.toLowerCase(),n="locator",i=e;return r.includes("button")?(n="button",i=e.replace(/\s*button\s*/gi,"").trim()):r.includes("link")?(n="link",i=e.replace(/\s*link\s*/gi,"").trim()):r.includes("textbox")?(n="textbox",i=e.replace(/\s*textbox\s*/gi,"").trim()):r.includes("checkbox")?(n="checkbox",i=e.replace(/\s*checkbox\s*/gi,"").trim()):(r.includes("combobox")||r.includes("dropdown")||r.includes("select"))&&(n="combobox",i=e.replace(/\s*(combobox|dropdown|select)\s*/gi,"").trim()),n!=="locator"&&i?`page.getByRole('${n}', { name: '${this._escapeString(i)}' })`:`page.getByText('${this._escapeString(e)}')`}};var ZN=class{constructor(){this.strategies=[new Bu,new Wu],this.strategies.sort((e,r)=>r.getPriority()-e.getPriority())}registerStrategy(e){this.strategies.push(e),this.strategies.sort((r,n)=>n.getPriority()-r.getPriority())}async generate(e){console.log(`
485
+ \u{1F4CB} Available generation strategies (${this.strategies.length}):`),this.strategies.forEach(r=>{let n=r.canGenerate(e);console.log(` ${n?"\u2713":"\u2717"} ${r.getName()} (priority: ${r.getPriority()})`)});for(let r of this.strategies)if(r.canGenerate(e))return console.log(`
486
+ \u{1F3AF} Selected: ${r.getName()}`),r.generate(e);throw new Error("No generation strategy available for this context")}getStrategy(e){return this.strategies.find(r=>r.getName().includes(e))||null}},RPe=new ZN;var Gu=class{async verify(e){throw new Error("TestVerificationStrategy.verify() must be implemented")}canVerify(e){throw new Error("TestVerificationStrategy.canVerify() must be implemented")}getName(){throw new Error("TestVerificationStrategy.getName() must be implemented")}getPriority(){return 0}};import{execSync as CPe}from"child_process";import{existsSync as APe}from"fs";var Ku=class extends Gu{getName(){return"Playwright JSON Reporter"}getPriority(){return 100}canVerify(e){let{testFilePath:r}=e;return APe(r)}async verify(e){let{testFilePath:r,cwd:n,timeout:i=3e4}=e;try{console.log(`\u{1F9EA} Running test: ${r}`);let o=`npx playwright test ${r} --reporter=json --timeout=${i}`,a=CPe(o,{cwd:n,encoding:"utf-8",stdio:["pipe","pipe","pipe"],timeout:i+1e4}),c=JSON.parse(a).stats||{};return{success:c.unexpected===0,passed:c.expected||0,failed:c.unexpected||0,error:null,errorDetails:null}}catch(o){let a=o.stdout||o.stderr||o.message;try{let s=JSON.parse(a),c=s.stats||{},l="Test execution failed";if(s.suites&&s.suites.length>0){let d=s.suites[0];if(d.specs&&d.specs.length>0){let f=d.specs[0];if(f.tests&&f.tests.length>0){let p=f.tests[0];if(p.results&&p.results.length>0){let m=p.results[0];m.error&&(l=m.error.message||l)}}}}let u=l.includes("Executable doesn't exist")||l.includes("browserType.launch")||l.includes("Please run the following command")||l.includes("npx playwright install")||a.includes("Executable doesn't exist")||a.includes("npx playwright install");return{success:!1,passed:c.expected||0,failed:c.unexpected||0,error:l,errorDetails:l,isEnvironmentError:u}}catch{let c=a.match(/Error: (.+)/),l=c?c[1]:"Test execution failed",u=l.includes("Executable doesn't exist")||l.includes("browserType.launch")||l.includes("Please run the following command")||l.includes("npx playwright install")||a.includes("Executable doesn't exist")||a.includes("npx playwright install");return{success:!1,passed:0,failed:1,error:l,errorDetails:l,isEnvironmentError:u}}}}};var qN=class{constructor(){this.strategies=[new Ku],this.strategies.sort((e,r)=>r.getPriority()-e.getPriority())}registerStrategy(e){this.strategies.push(e),this.strategies.sort((r,n)=>n.getPriority()-r.getPriority())}async verify(e){console.log(`
487
+ \u{1F4CB} Available verification strategies (${this.strategies.length}):`),this.strategies.forEach(r=>{let n=r.canVerify(e);console.log(` ${n?"\u2713":"\u2717"} ${r.getName()} (priority: ${r.getPriority()})`)});for(let r of this.strategies)if(r.canVerify(e))return console.log(`
488
+ \u{1F3AF} Selected: ${r.getName()}`),r.verify(e);throw new Error("No verification strategy available for this context")}getStrategy(e){return this.strategies.find(r=>r.getName().includes(e))||null}},UPe=new qN;var Ha=class{constructor(e={}){this.enrichers=[],this.config=e,this.stats={totalEvents:0,enrichedEvents:0,skippedEvents:0,errors:{}}}register(e){return this.enrichers.push(e),this.enrichers.sort((r,n)=>n.getPriority()-r.getPriority()),this}unregister(e){return this.enrichers=this.enrichers.filter(r=>r.getName()!==e),this}get(e){return this.enrichers.find(r=>r.getName()===e)}setEnabled(e,r){let n=this.get(e);return n&&(n.enabled=r),this}async enrich(e,r){this.stats.totalEvents++;let n={...e},i=[],o=[],a=[];for(let s of this.enrichers)try{if(!s.canEnrich(r)){o.push(s.getName());continue}let c=Date.now(),l=await s.enrich(e,r),u=Date.now()-c;l?(Object.assign(n,l),i.push({name:s.getName(),duration:u})):o.push(s.getName())}catch(c){console.warn(`[EnrichmentPipeline] ${s.getName()} failed:`,c.message),a.push(s.getName()),this.stats.errors[s.getName()]=(this.stats.errors[s.getName()]||0)+1}return n._enrichment={version:"1.0",timestamp:new Date().toISOString(),enrichers:{run:i,skipped:o,failed:a}},i.length>0?this.stats.enrichedEvents++:this.stats.skippedEvents++,n}async enrichBatch(e,r){let n=[];for(let i of e){let o=await this.enrich(i,r);n.push(o)}return n}getStats(){return{...this.stats,enrichers:this.enrichers.map(e=>({name:e.getName(),enabled:e.enabled,priority:e.getPriority(),errors:this.stats.errors[e.getName()]||0}))}}resetStats(){this.stats={totalEvents:0,enrichedEvents:0,skippedEvents:0,errors:{}}}logStatus(){console.log(`
489
+ \u{1F4CA} Enrichment Pipeline Status:`),console.log(` Total events: ${this.stats.totalEvents}`),console.log(` Enriched: ${this.stats.enrichedEvents}`),console.log(` Skipped: ${this.stats.skippedEvents}`),console.log(`
490
+ Registered enrichers (${this.enrichers.length}):`);for(let e of this.enrichers){let r=e.enabled?"\u2713":"\u2717",n=this.stats.errors[e.getName()]||0,i=n>0?` (${n} errors)`:"";console.log(` ${r} ${e.getName()} (priority: ${e.getPriority()})${i}`)}console.log()}};var Hu=class extends Xr{getName(){return"PositionEnricher"}getPriority(){return 90}canEnrich(e){return!this.enabled||!e.element||!e.event?!1:["click","fill","type","selectOption","hover"].includes(e.event.type)}async enrich(e,r){try{let{page:n,element:i}=r,o=await i.boundingBox();if(!o)return null;let a=await n.evaluate(()=>({scrollX:window.scrollX,scrollY:window.scrollY,width:window.innerWidth,height:window.innerHeight})),s=o.y>=a.scrollY&&o.y+o.height<=a.scrollY+a.height&&o.x>=0&&o.x+o.width<=a.width;return{position:{boundingBox:o,viewport:a,inViewport:s,centerPoint:{x:Math.round(o.x+o.width/2),y:Math.round(o.y+o.height/2)}}}}catch(n){return this.handleError(n,e)}}};import y8 from"crypto";var Sc=class extends Xr{getName(){return"AccessibilityEnricher"}getPriority(){return 100}canEnrich(e){return!this.enabled||!e.element||!e.event?!1:["click","fill","type","selectOption","hover"].includes(e.event.type)}async enrich(e,r){try{let{page:n,element:i}=r,o=await n.accessibility.snapshot(),a=await this.findAxNode(i,o);if(!a)return null;let s=await this.getAxContext(a,o),c=this.hashAxSubtree(a),l=this.hashAxPath(s.path);return{accessibility:{role:a.role,name:a.name||"",level:s.level,parent:s.parent,siblings:s.siblings,axTreeHash:c,axPathHash:l}}}catch(n){return this.handleError(n,e)}}async findAxNode(e,r){let n=await e.evaluate(i=>({role:i.getAttribute("role")||i.tagName.toLowerCase(),name:i.getAttribute("aria-label")||i.textContent?.trim()||"",tagName:i.tagName.toLowerCase()}));return this.searchAxTree(r,n)}searchAxTree(e,r){if(!e)return null;if(e.role===r.role&&(e.name||"").includes(r.name.substring(0,20)))return e;if(e.children)for(let n of e.children){let i=this.searchAxTree(n,r);if(i)return i}return null}getAxContext(e,r){let n={level:0,parent:null,siblings:[],path:[]},i=this.findParent(e,r);return i&&(n.parent={role:i.role,name:i.name},n.siblings=(i.children||[]).filter(o=>o!==e).map(o=>({role:o.role,name:o.name})).slice(0,3)),n.level=this.calculateLevel(e,r),n.path=this.buildPath(e,r),n}findParent(e,r,n=r){if(!n||!n.children)return null;if(n.children.includes(e))return n;for(let i of n.children){let o=this.findParent(e,r,i);if(o)return o}return null}calculateLevel(e,r,n=r,i=0){if(n===e)return i;if(n.children)for(let o of n.children){let a=this.calculateLevel(e,r,o,i+1);if(a>=0)return a}return-1}buildPath(e,r,n=r,i=[]){if(n===e)return[...i,{role:n.role,name:n.name}];if(n.children)for(let o of n.children){let a=this.buildPath(e,r,o,[...i,{role:n.role,name:n.name}]);if(a)return a}return null}hashAxSubtree(e){let r=JSON.stringify({role:e.role,name:e.name,children:(e.children||[]).map(n=>({role:n.role,name:n.name}))});return y8.createHash("md5").update(r).digest("hex").substring(0,12)}hashAxPath(e){let r=e.map(n=>`${n.role}:${n.name}`).join("/");return y8.createHash("md5").update(r).digest("hex").substring(0,12)}};var kc=class extends Xr{constructor(e={}){super(e),this.pendingRequests=new Set,this.setupNetworkTracking=!1}getName(){return"PageStateEnricher"}getPriority(){return 95}canEnrich(e){return this.enabled&&e.page}async setupTracking(e){this.setupNetworkTracking||(e.on("request",r=>{["document","xhr","fetch"].includes(r.resourceType())&&this.pendingRequests.add(r.url())}),e.on("requestfinished",r=>{this.pendingRequests.delete(r.url())}),e.on("requestfailed",r=>{this.pendingRequests.delete(r.url())}),this.setupNetworkTracking=!0)}async enrich(e,r){try{let{page:n}=r;await this.setupTracking(n);let i=await n.evaluate(()=>({readyState:document.readyState,domContentLoaded:document.readyState!=="loading",loadComplete:document.readyState==="complete",url:document.location.href})),o=await this.checkDOMStability(n);return{page:{networkIdle:this.pendingRequests.size===0,pendingRequests:this.pendingRequests.size,domStable:o,...i}}}catch(n){return this.handleError(n,e)}}async checkDOMStability(e,r=500){try{return await e.evaluate(i=>new Promise(o=>{let a,s=0,c=new MutationObserver(()=>{s++,clearTimeout(a),a=setTimeout(()=>{c.disconnect(),o(s===0)},i)});c.observe(document.body,{childList:!0,subtree:!0,attributes:!0}),a=setTimeout(()=>{c.disconnect(),o(!0)},i)}),r)}catch{return!1}}reset(){this.pendingRequests.clear(),this.setupNetworkTracking=!1}};var Qu=class extends Xr{getName(){return"DOMEnricher"}getPriority(){return 85}canEnrich(e){return!this.enabled||!e.element||!e.event?!1:["click","fill","type","selectOption","hover"].includes(e.event.type)}async enrich(e,r){try{let{element:n}=r,i=await n.evaluate(o=>{let a=p=>{let m=[],v=p;for(;v&&v!==document.body;){let g=v.tagName.toLowerCase(),h=v.parentElement;if(h){let y=Array.from(h.children).filter(_=>_.tagName===v.tagName);if(y.length>1){let _=y.indexOf(v)+1;g+=`:nth-child(${_})`}}m.unshift(g),v=v.parentElement}return`body > ${m.join(" > ")}`},s=p=>{let m=[],v=p;for(;v&&v!==document.body;){let g=1,h=v.previousSibling;for(;h;)h.nodeType===1&&h.tagName===v.tagName&&g++,h=h.previousSibling;let y=v.tagName.toLowerCase();m.unshift(`${y}[${g}]`),v=v.parentElement}return`/html/body/${m.join("/")}`},c={};for(let p of o.attributes)c[p.name]=p.value;let l=window.getComputedStyle(o),u={display:l.display,visibility:l.visibility,opacity:l.opacity,pointerEvents:l.pointerEvents},d=0,f=o.parentElement;for(;f;)d++,f=f.parentElement;return{path:a(o),xpath:s(o),depth:d,parent:o.parentElement?o.parentElement.tagName.toLowerCase():null,tagName:o.tagName.toLowerCase(),attributes:c,state:{visible:l.display!=="none"&&l.visibility!=="hidden",enabled:!o.disabled,focused:document.activeElement===o,...u}}});return{dom:{path:i.path,xpath:i.xpath,depth:i.depth,parent:i.parent,selector:this.buildSmartSelector(i)},attributes:i.attributes,state:i.state}}catch(n){return this.handleError(n,e)}}buildSmartSelector(e){let r=e.tagName;if(e.attributes.id)return`#${e.attributes.id}`;if(e.attributes["data-test-id"])return`[data-test-id="${e.attributes["data-test-id"]}"]`;if(e.attributes.class){let n=e.attributes.class.split(" ").filter(i=>i&&!i.match(/^(active|focus|hover|disabled)/));n.length>0&&(r+=`.${n.slice(0,2).join(".")}`)}return e.parent&&(r=`${e.parent} > ${r}`),r}};var Qm=class extends Xr{constructor(e={}){super(e),this.priority=200}getName(){return"MCPRef"}getPriority(){return this.priority}async enrich(e,r){let n=e.data?.params?.ref,i=e.data?.params?.element;if(!n&&!i)return null;let o=null,a=null,s=null;if(r?.element)try{let c=await r.element.evaluate(l=>({text:l.textContent?.trim()||"",innerText:l.innerText?.trim()||"",value:l.value||"",label:l.getAttribute("aria-label")||l.getAttribute("label")||"",role:l.getAttribute("role")||l.tagName.toLowerCase(),placeholder:l.getAttribute("placeholder")||"",title:l.getAttribute("title")||""}));o=c.text||c.innerText||c.value||c.placeholder,a=c.role,s=c.label||c.title,console.log(`[MCPRefEnricher] \u2705 Captured actual text: "${o}" (AI said: "${i}")`)}catch(c){console.log(`[MCPRefEnricher] \u26A0\uFE0F Could not extract actual text: ${c.message}`)}return{mcpRef:n,mcpElement:i,actualText:o,actualRole:a,actualLabel:s,recordedSelector:o||i}}};function FN(t={}){let e=new Ha(t);return t.enableMCPRef!==!1&&e.register(new Qm(t)),t.enableTraceText!==!1&&e.register(new wc(t)),t.enableAccessibility!==!1&&e.register(new Sc(t)),t.enablePageState!==!1&&e.register(new kc(t)),t.enablePosition!==!1&&e.register(new Hu(t)),t.enableDOM!==!1&&e.register(new Qu(t)),e}function VN(t={}){let e=new Ha(t);return e.register(new Sc(t)),e.register(new kc(t)),e}function DPe(t,e={}){let r=new Ha(e);for(let n of t)r.register(n);return r}import{readFileSync as MPe,writeFileSync as WN}from"fs";import{join as _8}from"path";async function LPe(t,e={}){let r=_8(t,"events.json"),n=_8(t,"trace.zip");try{let i=JSON.parse(MPe(r,"utf-8")),o=i.map(s=>({...s,_enrichmentNote:"Full enrichment requires live Playwright access. Use EnrichmentPipeline during test execution."})),a=`${r}.backup`;return WN(a,JSON.stringify(i,null,2)),WN(r,JSON.stringify(o,null,2)),{enrichedCount:o.length,skippedCount:0,errors:[]}}catch(i){return console.error("[EnrichmentIntegration] Failed to enrich events:",i.message),{enrichedCount:0,skippedCount:0,errors:[i.message]}}}var BN=class{constructor(e={}){this.pipeline=e.minimal?VN(e):FN(e),this.events=[],this.config=e}async recordEvent(e,r,n){let i={id:this.events.length,type:e,timestamp:new Date().toISOString(),data:r},o=await this.pipeline.enrich(i,{...n,event:i});return this.events.push(o),o}saveEvents(e){WN(e,JSON.stringify(this.events,null,2)),console.log(`[LiveEnrichment] Saved ${this.events.length} enriched events to ${e}`),this.pipeline.logStatus()}getStats(){return this.pipeline.getStats()}};var S8=t=>{t?.message?.includes("Connection closed")||t?.message?.includes("MCP error -32000")||t?.code===-32e3||console.error("Unhandled rejection:",t)};process.listeners("unhandledRejection").includes(S8)||process.on("unhandledRejection",S8);async function qPe(t,e={}){let{agent:r,mcp:n,headless:i,cwd:o=process.cwd(),specPath:a,sessionPath:s,sessionTimestamp:c,...l}=e,u=b8(t,"utf-8"),d=null,{agent:f,error:p}=await WPe(o,l),m=f;if(!m&&e.fallbackAgentModule){let h=e.fallbackAgentModule,y=h.BrowserTestAutomationAgent||h.default;y&&(m=new y(l))}if(!m&&p&&console.warn(`\u26A0\uFE0F Failed to load local agent: ${p}`),!m)throw new Error(`No agent found. Please run:
2
491
  zibby init
3
492
 
4
- This will create .zibby/graph.mjs with your workflow definition.`);await s.initialize(E);let A=!1;const x=()=>{if(!A)try{W({cwd:r||process.cwd(),config:e}),A=!0}catch(u){console.warn("[zibby] run-index interrupt row:",u?.message||u)}};process.on("SIGINT",x),process.on("SIGTERM",x);try{if(e.singleNode){console.log(`
493
+ This will create .zibby/graph.mjs with your workflow definition.`);await m.initialize(d);let v=!1,g=()=>{if(!v)try{Xb({cwd:o||process.cwd(),config:e}),v=!0}catch(h){console.warn("[zibby] run-index interrupt row:",h?.message||h)}};process.on("SIGINT",g),process.on("SIGTERM",g);try{if(e.singleNode){console.log(`
5
494
  \u{1F3AF} Running Single Node: ${e.singleNode} (Framework Mode)
6
- `);const i=s.calculateOutputPath(o||t),k=s.buildGraph(),v={};for(const[d,w]of k.nodes.entries())v[d]=w.config||w;let L={};if(e.sessionId){let d=e.sessionId;const w=e.paths?.output||Q;if(d==="last"){const y=S(r,w,G);if(M(y)){const{readdirSync:X,statSync:N}=await import("fs"),U=X(y).filter(g=>N(S(y,g)).isDirectory()).map(g=>({name:g,time:N(S(y,g)).mtimeMs})).sort((g,H)=>H.time-g.time);U.length>0?(d=U[0].name,console.log(`\u{1F4C2} Using latest session: ${d}`)):console.log(`\u26A0\uFE0F No sessions found in ${y}`)}}const I=S(r,w,G,d),J=S(I,"execute_live"),F=S(J,Z);M(F)?(console.log(`\u{1F4C2} Loading session: ${d}`),L={sessionPath:I,execute_live_output:JSON.parse(O(F,"utf-8"))}):console.log(`\u26A0\uFE0F Session not found: ${I}`)}const T=await s.runSingleNode(e.singleNode,v,{testSpec:a,outputPath:i,cwd:r||process.cwd(),contextConfig:e.contextConfig,specPath:o||t,config:e,...L});return typeof s.onComplete=="function"&&await s.onComplete(T),C({cwd:r,config:e,result:T,success:!0,specPath:o||t}),T}let u;typeof e.onPipelineProgress=="function"?u=e.onPipelineProgress:e.runIndex?.pipelineProgress!==!1&&(u=q({cwd:r||process.cwd(),config:e}));const m=r||process.cwd(),z=c!=null&&String(c).trim()!==""?(()=>{const i=String(c).trim();try{return K(i)?j(i):j(m,i)}catch{return i}})():void 0,V=oe(),B=z??V;te();const _=ee({cwd:m,config:e,traceFrom:"runTest",initialState:{sessionPath:B,sessionTimestamp:n}});let P;try{P=await s.run(a,{testSpec:a,specPath:o||t,cwd:m,config:e,sessionPath:_.sessionPath,sessionTimestamp:_.sessionTimestamp,...u?{onPipelineProgress:u}:{}})}catch(i){throw typeof i?.message=="string"&&i.message.includes("Interrupted by user")&&W({cwd:r||process.cwd(),config:e}),A||C({cwd:r,config:e,result:i?.partialResult||{},success:!1,specPath:o||t,errorMessage:i?.message}),i}return C({cwd:r,config:e,result:P,success:!0,specPath:o||t}),P}finally{process.off("SIGINT",x),process.off("SIGTERM",x),await s.cleanup()}}function ne(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}function se(t,e){if(t[e])return t[e];const l=ne(e);if(t[l])return t[l];const f=`${l}Workflow`;return t[f]?t[f]:null}async function de(t=process.cwd()){try{const{join:e}=await import("path"),{existsSync:l}=await import("fs"),{pathToFileURL:f}=await import("url"),h=e(t,".zibby/graph.mjs");if(!l(h))return{available:[],default:null,error:"No .zibby/graph.mjs found"};const r=await import(f(h).href),o=Object.keys(r).filter(n=>n!=="default"&&typeof r[n]=="function"&&r[n].prototype instanceof R),c=r.BrowserTestAutomationAgent?"BrowserTestAutomationAgent":r.CursorAgent?"CursorAgent":r.default?"default":o[0]||null;return{available:o,default:c,error:null}}catch(e){return{available:[],default:null,error:e.message}}}async function ie(t,e){try{const{join:l}=await import("path"),{existsSync:f}=await import("fs"),{pathToFileURL:h}=await import("url"),r=l(t,".zibby/graph.mjs");if(!f(r))return{agent:null,error:null};const o=await import(h(r).href),c=e.workflow;let n;if(c){if(n=se(o,c),!n){const a=Object.keys(o).filter(E=>E!=="default"&&typeof o[E]=="function");throw new Error(`Workflow "${c}" not found.
7
- Available workflows: ${a.join(", ")}
8
- Supported formats: QuickSmokeWorkflow, QuickSmoke, quick-smoke`)}const p=Object.keys(o).find(a=>o[a]===n);console.log(`\u2713 Using workflow: ${p} (from --workflow ${c})`)}else{if(n=o.BrowserTestAutomationAgent||o.CursorAgent||o.default,!n){const p=Object.keys(o).filter(a=>a!=="default"&&typeof o[a]=="function"&&o[a].prototype instanceof R);p.length>0&&(n=o[p[0]],console.log(`\u2713 Using workflow: ${p[0]} (auto-detected)`))}if(!n)return{agent:null,error:"Could not find any WorkflowAgent export in local graph.js"};n.name?.includes("auto-detected")||console.log("\u2713 Using local agent from .zibby/graph.mjs")}return{agent:new n(e),error:null}}catch(l){return{agent:null,error:l.message}}}class me{constructor(e={}){this.config=e}async run(e){return re(e.spec||e.specPath,{...this.config,...e})}}export{ft as AGENT_TYPES,ho as AccessibilityEnricher,Oe as AgentStrategy,ve as AssistantStrategy,xt as CI_ENV_VARS,dt as CORE_LOG_LEVELS,Fe as ClaudeAgentStrategy,Ne as CodexAgentStrategy,Le as CursorAgentStrategy,Kt as DEFAULT_MAX_CONCURRENT_RUNS,pt as DEFAULT_MODELS,gt as DEFAULT_OUTPUT_BASE,yo as DOMEnricher,Et as EVENTS_FILE,go as EnrichmentPipeline,mo as EventEnricher,Ue as GeminiAgentStrategy,Vt as LOG_LEVELS,Io as LiveEnrichmentRecorder,zt as Logger,Zt as MAX_MAX_CONCURRENT_RUNS,io as MCPRefStrategy,Qt as MIN_MAX_CONCURRENT_RUNS,De as McpClientManager,Ge as OpenAIToolProvider,wo as PageStateEnricher,po as PlaywrightJsonVerificationStrategy,So as PositionEnricher,yt as RAW_OUTPUT_FILE,wt as RESULT_FILE,Pt as RIPPLE_EFFECT_SCRIPT,Ie as ResultHandler,St as SESSIONS_DIR,ht as SESSION_INFO_FILE,ze as SKILLS,kt as SelectorGenerator,Wt as StableIdRuntime,ao as StableIdStrategy,Ot as StreamingParser,me as TestAutomation,so as TestGenerationStrategy,Lt as TestPostProcessor,uo as TestVerificationStrategy,je as ToolCallProvider,Nt as TraceParser,R as WorkflowAgent,he as WorkflowGraph,jt as ZibbyRuntime,rt as ZibbyUploader,Rt as checkCursorAgentInstalled,at as checkCursorAgentPatched,Ee as clearInheritedSessionEnvForFreshRun,Ye as clearTokenCache,Ao as createCustomPipeline,Eo as createDefaultPipeline,xo as createMinimalPipeline,nt as createUploader,To as enrichRecordedEvents,It as generateRippleHelperCode,ye as generateWorkflowSessionId,ke as getAgentStrategy,He as getAllSkills,lt as getApprovalKeys,bt as getCursorAgentInstallInstructions,Je as getSkill,Xe as hasSkill,Tt as injectRippleEffect,_e as invokeAgent,Ke as listSkillIds,de as listWorkflows,$t as logger,tt as organizeVideos,it as patchCursorAgentForCI,Yt as postProcessEvents,Ae as readStudioPinnedSessionPathFromEnv,Be as registerSkill,oo as resetExecutionCount,qe as resolveIntegrationToken,Ht as resolveMaxParallelRuns,we as resolveWorkflowSession,to as runPlaywrightTestTool,re as runTest,ct as saveApprovalKeys,xe as shouldTrustInheritedSessionEnv,Pe as syncProcessEnvToSession,no as testGenerationManager,co as testVerificationManager,Jt as timeline,Y as workflow,Re as z};
495
+ `);let $=m.calculateOutputPath(a||t),T=m.buildGraph(),A={};for(let[L,N]of T.nodes.entries())A[L]=N.config||N;let I={};if(e.sessionId){let L=e.sessionId,N=e.paths?.output||ir;if(L==="last"){let Pe=Yu(o,N,ri);if(x8(Pe)){let{readdirSync:ue,statSync:W}=await import("fs"),E=ue(Pe).filter(q=>W(Yu(Pe,q)).isDirectory()).map(q=>({name:q,time:W(Yu(Pe,q)).mtimeMs})).sort((q,R)=>R.time-q.time);E.length>0?(L=E[0].name,console.log(`\u{1F4C2} Using latest session: ${L}`)):console.log(`\u26A0\uFE0F No sessions found in ${Pe}`)}}let Y=Yu(o,N,ri,L),H=Yu(Y,"execute_live"),ye=Yu(H,Gb);x8(ye)?(console.log(`\u{1F4C2} Loading session: ${L}`),I={sessionPath:Y,execute_live_output:JSON.parse(b8(ye,"utf-8"))}):console.log(`\u26A0\uFE0F Session not found: ${Y}`)}let U=await m.runSingleNode(e.singleNode,A,{testSpec:u,outputPath:$,cwd:o||process.cwd(),contextConfig:e.contextConfig,specPath:a||t,config:e,...I});return typeof m.onComplete=="function"&&await m.onComplete(U),rh({cwd:o,config:e,result:U,success:!0,specPath:a||t}),U}let h;typeof e.onPipelineProgress=="function"?h=e.onPipelineProgress:e.runIndex?.pipelineProgress!==!1&&(h=cR({cwd:o||process.cwd(),config:e}));let y=o||process.cwd(),_=s!=null&&String(s).trim()!==""?(()=>{let $=String(s).trim();try{return ZPe($)?w8($):w8(y,$)}catch{return $}})():void 0,b=Ub(),x=_??b;Db();let w=Mb({cwd:y,config:e,traceFrom:"runTest",initialState:{sessionPath:x,sessionTimestamp:c}}),S;try{S=await m.run(u,{testSpec:u,specPath:a||t,cwd:y,config:e,sessionPath:w.sessionPath,sessionTimestamp:w.sessionTimestamp,...h?{onPipelineProgress:h}:{}})}catch($){throw typeof $?.message=="string"&&$.message.includes("Interrupted by user")&&Xb({cwd:o||process.cwd(),config:e}),v||rh({cwd:o,config:e,result:$?.partialResult||{},success:!1,specPath:a||t,errorMessage:$?.message}),$}return rh({cwd:o,config:e,result:S,success:!0,specPath:a||t}),S}finally{process.off("SIGINT",g),process.off("SIGTERM",g),await m.cleanup()}}function FPe(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")}function VPe(t,e){if(t[e])return t[e];let r=FPe(e);if(t[r])return t[r];let n=`${r}Workflow`;return t[n]?t[n]:null}async function o3e(t=process.cwd()){try{let{join:e}=await import("path"),{existsSync:r}=await import("fs"),{pathToFileURL:n}=await import("url"),i=e(t,".zibby/graph.mjs");if(!r(i))return{available:[],default:null,error:"No .zibby/graph.mjs found"};let o=await import(n(i).href),a=Object.keys(o).filter(c=>c!=="default"&&typeof o[c]=="function"&&o[c].prototype instanceof Fu),s=o.BrowserTestAutomationAgent?"BrowserTestAutomationAgent":o.CursorAgent?"CursorAgent":o.default?"default":a[0]||null;return{available:a,default:s,error:null}}catch(e){return{available:[],default:null,error:e.message}}}async function WPe(t,e){try{let{join:r}=await import("path"),{existsSync:n}=await import("fs"),{pathToFileURL:i}=await import("url"),o=r(t,".zibby/graph.mjs");if(!n(o))return{agent:null,error:null};let a=await import(i(o).href),s=e.workflow,c;if(s){if(c=VPe(a,s),!c){let u=Object.keys(a).filter(d=>d!=="default"&&typeof a[d]=="function");throw new Error(`Workflow "${s}" not found.
496
+ Available workflows: ${u.join(", ")}
497
+ Supported formats: QuickSmokeWorkflow, QuickSmoke, quick-smoke`)}let l=Object.keys(a).find(u=>a[u]===c);console.log(`\u2713 Using workflow: ${l} (from --workflow ${s})`)}else{if(c=a.BrowserTestAutomationAgent||a.CursorAgent||a.default,!c){let l=Object.keys(a).filter(u=>u!=="default"&&typeof a[u]=="function"&&a[u].prototype instanceof Fu);l.length>0&&(c=a[l[0]],console.log(`\u2713 Using workflow: ${l[0]} (auto-detected)`))}if(!c)return{agent:null,error:"Could not find any WorkflowAgent export in local graph.js"};c.name?.includes("auto-detected")||console.log("\u2713 Using local agent from .zibby/graph.mjs")}return{agent:new c(e),error:null}}catch(r){return{agent:null,error:r.message}}}var k8=class{constructor(e={}){this.config=e}async run(e){return qPe(e.spec||e.specPath,{...this.config,...e})}};export{sQ as AGENT_TYPES,oWe as ALL_TOOLS,Sc as AccessibilityEnricher,rn as AgentStrategy,qu as AssistantStrategy,ZIe as CHAT_MEMORY_TOOLS,Kb as CI_ENV_VARS,cQ as CORE_LOG_LEVELS,CIe as CORE_TOOLS,Yl as ClaudeAgentStrategy,Jl as CodexAgentStrategy,hl as CursorAgentStrategy,_Pe as DEFAULT_MAX_CONCURRENT_RUNS,qr as DEFAULT_MODELS,ir as DEFAULT_OUTPUT_BASE,Qu as DOMEnricher,j8 as EVENTS_FILE,Ha as EnrichmentPipeline,Xr as EventEnricher,UIe as GITHUB_TOOLS,Xl as GeminiAgentStrategy,AIe as JIRA_TOOLS,zi as LOG_LEVELS,BN as LiveEnrichmentRecorder,ih as Logger,xPe as MAX_MAX_CONCURRENT_RUNS,Wu as MCPRefStrategy,LIe as MEMORY_TOOLS,bPe as MIN_MAX_CONCURRENT_RUNS,qm as McpClientManager,Ys as OpenAIToolProvider,kc as PageStateEnricher,Ku as PlaywrightJsonVerificationStrategy,Hu as PositionEnricher,z8 as RAW_OUTPUT_FILE,Gb as RESULT_FILE,c8 as RIPPLE_EFFECT_SCRIPT,MIe as RUNNER_TOOLS,AN as ResultHandler,ri as SESSIONS_DIR,Oi as SESSION_INFO_FILE,N8 as SKILLS,qIe as SKILL_TOOLS,DIe as SLACK_TOOLS,Bm as SelectorGenerator,LN as StableIdRuntime,Bu as StableIdStrategy,io as StreamingParser,k8 as TestAutomation,Ka as TestGenerationStrategy,UN as TestPostProcessor,Gu as TestVerificationStrategy,eu as ToolCallProvider,Km as TraceParser,Fu as WorkflowAgent,Vm as WorkflowGraph,MN as ZibbyRuntime,Wm as ZibbyUploader,rQ as checkCursorAgentInstalled,uPe as checkCursorAgentPatched,Db as clearInheritedSessionEnvForFreshRun,QIe as clearTokenCache,aPe as cloneRepo,DPe as createCustomPipeline,FN as createDefaultPipeline,VN as createMinimalPipeline,o8 as createUploader,LPe as enrichRecordedEvents,hPe as generateRippleHelperCode,e8 as generateWorkflowSessionId,PN as getAgentStrategy,ah as getAllSkills,dPe as getApprovalKeys,nQ as getCursorAgentInstallInstructions,Fr as getSkill,SR as hasSkill,mPe as injectRippleEffect,W5 as invokeAgent,kR as listSkillIds,o3e as listWorkflows,Z as logger,ePe as organizeVideos,lPe as patchCursorAgentForCI,EPe as postProcessEvents,Ub as readStudioPinnedSessionPathFromEnv,wR as registerSkill,zPe as resetExecutionCount,HIe as resolveIntegrationToken,wPe as resolveMaxParallelRuns,Mb as resolveWorkflowSession,h8 as runPlaywrightTestTool,qPe as runTest,fPe as saveApprovalKeys,J5 as shouldTrustInheritedSessionEnv,X5 as syncProcessEnvToSession,RPe as testGenerationManager,UPe as testVerificationManager,Wt as timeline,jIe as workflow,wx as z};
498
+ /*! Bundled license information:
499
+
500
+ mime-db/index.js:
501
+ (*!
502
+ * mime-db
503
+ * Copyright(c) 2014 Jonathan Ong
504
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
505
+ * MIT Licensed
506
+ *)
507
+
508
+ mime-types/index.js:
509
+ (*!
510
+ * mime-types
511
+ * Copyright(c) 2014 Jonathan Ong
512
+ * Copyright(c) 2015 Douglas Christopher Wilson
513
+ * MIT Licensed
514
+ *)
515
+ */