@ripla/godd-mcp 0.1.2-beta-20260312091403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +412 -0
- package/dist/godd.cjs +465 -0
- package/dist/godd.js +34845 -0
- package/dist/index.js +224 -0
- package/notes-api/.env.example +29 -0
- package/notes-api/README.md +65 -0
- package/notes-api/alembic/README +1 -0
- package/notes-api/alembic/env.py +62 -0
- package/notes-api/alembic/script.py.mako +28 -0
- package/notes-api/alembic/versions/001_initial_notes_tables.py +71 -0
- package/notes-api/alembic.ini +149 -0
- package/notes-api/app/__init__.py +1 -0
- package/notes-api/app/config.py +90 -0
- package/notes-api/app/database.py +31 -0
- package/notes-api/app/main.py +55 -0
- package/notes-api/app/models/__init__.py +17 -0
- package/notes-api/app/models/audit.py +38 -0
- package/notes-api/app/models/base.py +38 -0
- package/notes-api/app/models/session.py +32 -0
- package/notes-api/app/models/setting.py +16 -0
- package/notes-api/app/models/user.py +38 -0
- package/notes-api/app/routers/__init__.py +1 -0
- package/notes-api/app/routers/auth.py +205 -0
- package/notes-api/app/routers/files.py +76 -0
- package/notes-api/app/routers/pr.py +92 -0
- package/notes-api/app/routers/settings.py +44 -0
- package/notes-api/app/routers/tree.py +22 -0
- package/notes-api/app/routers/users.py +145 -0
- package/notes-api/app/schemas/__init__.py +1 -0
- package/notes-api/app/schemas/auth.py +45 -0
- package/notes-api/app/schemas/user.py +41 -0
- package/notes-api/app/security.py +94 -0
- package/notes-api/app/services/__init__.py +1 -0
- package/notes-api/app/services/audit.py +25 -0
- package/notes-api/app/services/business_date.py +38 -0
- package/notes-api/app/services/github.py +140 -0
- package/notes-api/app/services/github_pr.py +120 -0
- package/notes-api/app/services/pr_chain.py +225 -0
- package/notes-api/app/startup.py +66 -0
- package/notes-api/docker/Dockerfile +14 -0
- package/notes-api/docker/Dockerfile.test +14 -0
- package/notes-api/pyproject.toml +53 -0
- package/notes-api/tests/conftest.py +21 -0
- package/notes-api/tests/test_business_date.py +32 -0
- package/notes-api/tests/test_health.py +11 -0
- package/notes-api/uv.lock +1012 -0
- package/notes-app/README.md +30 -0
- package/notes-app/docker/Dockerfile.prod +12 -0
- package/notes-app/docker/Dockerfile.test +12 -0
- package/notes-app/eslint.config.js +23 -0
- package/notes-app/index.html +12 -0
- package/notes-app/nginx.conf +23 -0
- package/notes-app/package.json +37 -0
- package/notes-app/pnpm-lock.yaml +3124 -0
- package/notes-app/src/App.tsx +13 -0
- package/notes-app/src/main.tsx +13 -0
- package/notes-app/src/pages/LoginPage.test.tsx +15 -0
- package/notes-app/src/pages/LoginPage.tsx +10 -0
- package/notes-app/src/pages/MainPage.tsx +14 -0
- package/notes-app/src/styles/globals.css +1 -0
- package/notes-app/src/vite-env.d.ts +1 -0
- package/notes-app/tsconfig.json +24 -0
- package/notes-app/tsconfig.node.json +10 -0
- package/notes-app/vite.config.js +21 -0
- package/notes-app/vite.config.ts +22 -0
- package/notes-app/vitest.config.ts +16 -0
- package/package.json +58 -0
- package/stacks/django-vue.yaml +33 -0
- package/stacks/fastapi-react.yaml +160 -0
- package/stacks/flutter-firebase.yaml +58 -0
- package/stacks/nextjs-prisma.yaml +33 -0
- package/stacks/schema.json +144 -0
- package/templates/agents/architect.hbs +183 -0
- package/templates/agents/auto-documenter.hbs +36 -0
- package/templates/agents/backend-developer.hbs +175 -0
- package/templates/agents/code-reviewer.hbs +29 -0
- package/templates/agents/database-developer.hbs +52 -0
- package/templates/agents/debug-specialist.hbs +39 -0
- package/templates/agents/environment-setup.hbs +41 -0
- package/templates/agents/frontend-developer.hbs +45 -0
- package/templates/agents/integration-qa.hbs +26 -0
- package/templates/agents/performance-qa.hbs +24 -0
- package/templates/agents/pr-writer.hbs +53 -0
- package/templates/agents/quality-lead.hbs +26 -0
- package/templates/agents/requirements-analyst.hbs +26 -0
- package/templates/agents/security-analyst.hbs +21 -0
- package/templates/agents/security-reviewer.hbs +20 -0
- package/templates/agents/ssot-updater.hbs +45 -0
- package/templates/agents/technical-writer.hbs +28 -0
- package/templates/agents/unit-test-engineer.hbs +19 -0
- package/templates/agents/user-clone.hbs +43 -0
- package/templates/github-actions/aws/deploy-notes.yml.hbs +118 -0
- package/templates/github-actions/azure/deploy-notes.yml.hbs +78 -0
- package/templates/github-actions/gcp/deploy-notes.yml.hbs +76 -0
- package/templates/github-actions/vercel-railway/deploy-notes.yml.hbs +49 -0
- package/templates/mindsets/agent-stdio.hbs +51 -0
- package/templates/mindsets/dart.hbs +39 -0
- package/templates/mindsets/ddd-clean-architecture.hbs +52 -0
- package/templates/mindsets/electron.hbs +41 -0
- package/templates/mindsets/fastapi.hbs +40 -0
- package/templates/mindsets/flutter.hbs +56 -0
- package/templates/mindsets/kotlin.hbs +46 -0
- package/templates/mindsets/postgresql.hbs +39 -0
- package/templates/mindsets/python.hbs +39 -0
- package/templates/mindsets/react.hbs +51 -0
- package/templates/mindsets/swift.hbs +46 -0
- package/templates/mindsets/terraform.hbs +53 -0
- package/templates/mindsets/typescript.hbs +34 -0
- package/templates/mindsets/vite.hbs +37 -0
- package/templates/notes-compose.yml +79 -0
- package/templates/partials/cogito-geo.hbs +84 -0
- package/templates/partials/cogito-godd.hbs +22 -0
- package/templates/partials/cogito-grammar.hbs +105 -0
- package/templates/partials/cogito-particle.hbs +76 -0
- package/templates/partials/cogito-root-ai.hbs +79 -0
- package/templates/partials/cogito-root-arch.hbs +75 -0
- package/templates/partials/cogito-root-core.hbs +75 -0
- package/templates/partials/cogito-root-daily.hbs +58 -0
- package/templates/partials/cogito-root-dev.hbs +71 -0
- package/templates/partials/cogito-root-devops.hbs +71 -0
- package/templates/partials/cogito-root-framework.hbs +80 -0
- package/templates/partials/cogito-root-lang.hbs +74 -0
- package/templates/partials/godd-core.hbs +50 -0
- package/templates/partials/project-context.hbs +52 -0
- package/templates/partials/ssot-header.hbs +40 -0
- package/templates/partials/ssot-rules.hbs +30 -0
- package/templates/prompts/adr.hbs +39 -0
- package/templates/prompts/agent-dev-workflow.hbs +34 -0
- package/templates/prompts/analyze-report.hbs +36 -0
- package/templates/prompts/auto-documentation.hbs +37 -0
- package/templates/prompts/check.hbs +52 -0
- package/templates/prompts/commit.hbs +96 -0
- package/templates/prompts/dev.hbs +127 -0
- package/templates/prompts/docs-init.hbs +95 -0
- package/templates/prompts/docs-update.hbs +51 -0
- package/templates/prompts/git-workflow.hbs +125 -0
- package/templates/prompts/impact-analysis.hbs +43 -0
- package/templates/prompts/install.hbs +40 -0
- package/templates/prompts/new-branch.hbs +61 -0
- package/templates/prompts/notes-deploy.hbs +72 -0
- package/templates/prompts/pr-analyze.hbs +44 -0
- package/templates/prompts/pr-create.hbs +125 -0
- package/templates/prompts/push-execute.hbs +83 -0
- package/templates/prompts/push.hbs +24 -0
- package/templates/prompts/release-notes.hbs +38 -0
- package/templates/prompts/requirements-to-business-flow.hbs +29 -0
- package/templates/prompts/requirements-to-tickets.hbs +26 -0
- package/templates/prompts/review.hbs +126 -0
- package/templates/prompts/setup.hbs +247 -0
- package/templates/prompts/spec.hbs +35 -0
- package/templates/prompts/specification-to-tickets.hbs +24 -0
- package/templates/prompts/submit.hbs +143 -0
- package/templates/prompts/sync.hbs +63 -0
- package/templates/prompts/test-plan.hbs +56 -0
- package/templates/terraform/aws/alb.tf.hbs +58 -0
- package/templates/terraform/aws/backend.tf.hbs +10 -0
- package/templates/terraform/aws/cloudfront.tf.hbs +96 -0
- package/templates/terraform/aws/ecr.tf.hbs +30 -0
- package/templates/terraform/aws/ecs.tf.hbs +136 -0
- package/templates/terraform/aws/iam.tf.hbs +88 -0
- package/templates/terraform/aws/local.tf.hbs +34 -0
- package/templates/terraform/aws/output.tf.hbs +49 -0
- package/templates/terraform/aws/provider.tf.hbs +26 -0
- package/templates/terraform/aws/rds.tf.hbs +38 -0
- package/templates/terraform/aws/s3.tf.hbs +34 -0
- package/templates/terraform/aws/secrets.tf.hbs +38 -0
- package/templates/terraform/aws/security_groups.tf.hbs +72 -0
- package/templates/terraform/aws/vpc.tf.hbs +63 -0
- package/templates/terraform/azure/backend.tf.hbs +8 -0
- package/templates/terraform/azure/iam.tf.hbs +36 -0
- package/templates/terraform/azure/main.tf.hbs +199 -0
- package/templates/terraform/azure/output.tf.hbs +19 -0
- package/templates/terraform/azure/provider.tf.hbs +19 -0
- package/templates/terraform/gcp/backend.tf.hbs +6 -0
- package/templates/terraform/gcp/iam.tf.hbs +47 -0
- package/templates/terraform/gcp/main.tf.hbs +171 -0
- package/templates/terraform/gcp/output.tf.hbs +15 -0
- package/templates/terraform/gcp/provider.tf.hbs +19 -0
- package/templates/terraform/vercel-railway/main.tf.hbs +64 -0
- package/templates/terraform/vercel-railway/output.tf.hbs +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire}from"module";const require=createRequire(import.meta.url);
|
|
3
|
+
var GS=Object.create;var fu=Object.defineProperty;var KS=Object.getOwnPropertyDescriptor;var WS=Object.getOwnPropertyNames;var JS=Object.getPrototypeOf,YS=Object.prototype.hasOwnProperty;var Cn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),hu=(e,t)=>{for(var r in t)fu(e,r,{get:t[r],enumerable:!0})},QS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of WS(t))!YS.call(e,o)&&o!==r&&fu(e,o,{get:()=>t[o],enumerable:!(n=KS(t,o))||n.enumerable});return e};var mu=(e,t,r)=>(r=e!=null?GS(JS(e)):{},QS(t||!e||!e.__esModule?fu(r,"default",{value:e,enumerable:!0}):r,e));var ti=k(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.regexpCode=re.getEsmExportName=re.getProperty=re.safeStringify=re.stringify=re.strConcat=re.addCodeArg=re.str=re._=re.nil=re._Code=re.Name=re.IDENTIFIER=re._CodeOrName=void 0;var Xo=class{};re._CodeOrName=Xo;re.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ln=class extends Xo{constructor(t){if(super(),!re.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};re.Name=ln;var _t=class extends Xo{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof ln&&(r[n.str]=(r[n.str]||0)+1),r),{})}};re._Code=_t;re.nil=new _t("");function ov(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Xp(r,t[n]),r.push(e[++n]);return new _t(r)}re._=ov;var Qp=new _t("+");function iv(e,...t){let r=[ei(e[0])],n=0;for(;n<t.length;)r.push(Qp),Xp(r,t[n]),r.push(Qp,ei(e[++n]));return QP(r),new _t(r)}re.str=iv;function Xp(e,t){t instanceof _t?e.push(...t._items):t instanceof ln?e.push(t):e.push(tE(t))}re.addCodeArg=Xp;function QP(e){let t=1;for(;t<e.length-1;){if(e[t]===Qp){let r=XP(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function XP(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof ln||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof ln))return`"${e}${t.slice(1)}`}function eE(e,t){return t.emptyStr()?e:e.emptyStr()?t:iv`${e}${t}`}re.strConcat=eE;function tE(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ei(Array.isArray(e)?e.join(","):e)}function rE(e){return new _t(ei(e))}re.stringify=rE;function ei(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}re.safeStringify=ei;function nE(e){return typeof e=="string"&&re.IDENTIFIER.test(e)?new _t(`.${e}`):ov`[${e}]`}re.getProperty=nE;function oE(e){if(typeof e=="string"&&re.IDENTIFIER.test(e))return new _t(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}re.getEsmExportName=oE;function iE(e){return new _t(e.toString())}re.regexpCode=iE});var rd=k(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.ValueScope=rt.ValueScopeName=rt.Scope=rt.varKinds=rt.UsedValueState=void 0;var tt=ti(),ed=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Xs;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Xs||(rt.UsedValueState=Xs={}));rt.varKinds={const:new tt.Name("const"),let:new tt.Name("let"),var:new tt.Name("var")};var ea=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof tt.Name?t:this.name(t)}name(t){return new tt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};rt.Scope=ea;var ta=class extends tt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,tt._)`.${new tt.Name(r)}[${n}]`}};rt.ValueScopeName=ta;var sE=(0,tt._)`\n`,td=class extends ea{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?sE:tt.nil}}get(){return this._scope}name(t){return new ta(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:i}=o,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,o.setValue(r,{property:i,itemIndex:u}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,tt._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let i=tt.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Xs.Started);let p=r(u);if(p){let l=this.opts.es5?rt.varKinds.var:rt.varKinds.const;i=(0,tt._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,tt._)`${i}${p}${this.opts._n}`;else throw new ed(u);c.set(u,Xs.Completed)})}return i}};rt.ValueScope=td});var H=k(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.or=G.and=G.not=G.CodeGen=G.operators=G.varKinds=G.ValueScopeName=G.ValueScope=G.Scope=G.Name=G.regexpCode=G.stringify=G.getProperty=G.nil=G.strConcat=G.str=G._=void 0;var ee=ti(),zt=rd(),Sr=ti();Object.defineProperty(G,"_",{enumerable:!0,get:function(){return Sr._}});Object.defineProperty(G,"str",{enumerable:!0,get:function(){return Sr.str}});Object.defineProperty(G,"strConcat",{enumerable:!0,get:function(){return Sr.strConcat}});Object.defineProperty(G,"nil",{enumerable:!0,get:function(){return Sr.nil}});Object.defineProperty(G,"getProperty",{enumerable:!0,get:function(){return Sr.getProperty}});Object.defineProperty(G,"stringify",{enumerable:!0,get:function(){return Sr.stringify}});Object.defineProperty(G,"regexpCode",{enumerable:!0,get:function(){return Sr.regexpCode}});Object.defineProperty(G,"Name",{enumerable:!0,get:function(){return Sr.Name}});var ia=rd();Object.defineProperty(G,"Scope",{enumerable:!0,get:function(){return ia.Scope}});Object.defineProperty(G,"ValueScope",{enumerable:!0,get:function(){return ia.ValueScope}});Object.defineProperty(G,"ValueScopeName",{enumerable:!0,get:function(){return ia.ValueScopeName}});Object.defineProperty(G,"varKinds",{enumerable:!0,get:function(){return ia.varKinds}});G.operators={GT:new ee._Code(">"),GTE:new ee._Code(">="),LT:new ee._Code("<"),LTE:new ee._Code("<="),EQ:new ee._Code("==="),NEQ:new ee._Code("!=="),NOT:new ee._Code("!"),OR:new ee._Code("||"),AND:new ee._Code("&&"),ADD:new ee._Code("+")};var tr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},nd=class extends tr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?zt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Kn(this.rhs,t,r)),this}get names(){return this.rhs instanceof ee._CodeOrName?this.rhs.names:{}}},ra=class extends tr{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ee.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Kn(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ee.Name?{}:{...this.lhs.names};return oa(t,this.rhs)}},od=class extends ra{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},id=class extends tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},sd=class extends tr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ad=class extends tr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},cd=class extends tr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Kn(this.code,t,r),this}get names(){return this.code instanceof ee._CodeOrName?this.code.names:{}}},ri=class extends tr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(t,r)||(aE(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>fn(t,r.names),{})}},rr=class extends ri{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},ud=class extends ri{},Gn=class extends rr{};Gn.kind="else";var pn=class e extends rr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Gn(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(sv(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Kn(this.condition,t,r),this}get names(){let t=super.names;return oa(t,this.condition),this.else&&fn(t,this.else.names),t}};pn.kind="if";var dn=class extends rr{};dn.kind="for";var ld=class extends dn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Kn(this.iteration,t,r),this}get names(){return fn(super.names,this.iteration.names)}},pd=class extends dn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?zt.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=oa(super.names,this.from);return oa(t,this.to)}},na=class extends dn{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Kn(this.iterable,t,r),this}get names(){return fn(super.names,this.iterable.names)}},ni=class extends rr{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ni.kind="func";var oi=class extends ri{render(t){return"return "+super.render(t)}};oi.kind="return";var dd=class extends rr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&fn(t,this.catch.names),this.finally&&fn(t,this.finally.names),t}},ii=class extends rr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ii.kind="catch";var si=class extends rr{render(t){return"finally"+super.render(t)}};si.kind="finally";var fd=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
4
|
+
`:""},this._extScope=t,this._scope=new zt.Scope({parent:t}),this._nodes=[new ud]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new nd(t,i,n)),i}const(t,r,n){return this._def(zt.varKinds.const,t,r,n)}let(t,r,n){return this._def(zt.varKinds.let,t,r,n)}var(t,r,n){return this._def(zt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new ra(t,r,n))}add(t,r){return this._leafNode(new od(t,G.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ee.nil&&this._leafNode(new cd(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ee.addCodeArg)(r,o));return r.push("}"),new ee._Code(r)}if(t,r,n){if(this._blockNode(new pn(t)),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(t){return this._elseNode(new pn(t))}else(){return this._elseNode(new Gn)}endIf(){return this._endBlockNode(pn,Gn)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new ld(t),r)}forRange(t,r,n,o,i=this.opts.es5?zt.varKinds.var:zt.varKinds.let){let s=this._scope.toName(t);return this._for(new pd(i,s,r,n),()=>o(s))}forOf(t,r,n,o=zt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ee.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ee._)`${s}.length`,a=>{this.var(i,(0,ee._)`${s}[${a}]`),n(i)})}return this._for(new na("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?zt.varKinds.var:zt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ee._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new na("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(dn)}label(t){return this._leafNode(new id(t))}break(t){return this._leafNode(new sd(t))}return(t){let r=new oi;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(oi)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new dd;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new ii(i),r(i)}return n&&(this._currNode=o.finally=new si,this.code(n)),this._endBlockNode(ii,si)}throw(t){return this._leafNode(new ad(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ee.nil,n,o){return this._blockNode(new ni(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ni)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof pn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};G.CodeGen=fd;function fn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function oa(e,t){return t instanceof ee._CodeOrName?fn(e,t.names):e}function Kn(e,t,r){if(e instanceof ee.Name)return n(e);if(!o(e))return e;return new ee._Code(e._items.reduce((i,s)=>(s instanceof ee.Name&&(s=n(s)),s instanceof ee._Code?i.push(...s._items):i.push(s),i),[]));function n(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function o(i){return i instanceof ee._Code&&i._items.some(s=>s instanceof ee.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function aE(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function sv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ee._)`!${hd(e)}`}G.not=sv;var cE=av(G.operators.AND);function uE(...e){return e.reduce(cE)}G.and=uE;var lE=av(G.operators.OR);function pE(...e){return e.reduce(lE)}G.or=pE;function av(e){return(t,r)=>t===ee.nil?r:r===ee.nil?t:(0,ee._)`${hd(t)} ${e} ${hd(r)}`}function hd(e){return e instanceof ee.Name?e:(0,ee._)`(${e})`}});var ne=k(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.checkStrictMode=W.getErrorPath=W.Type=W.useFunc=W.setEvaluated=W.evaluatedPropsToName=W.mergeEvaluated=W.eachItem=W.unescapeJsonPointer=W.escapeJsonPointer=W.escapeFragment=W.unescapeFragment=W.schemaRefOrVal=W.schemaHasRulesButRef=W.schemaHasRules=W.checkUnknownRules=W.alwaysValidSchema=W.toHash=void 0;var ae=H(),dE=ti();function fE(e){let t={};for(let r of e)t[r]=!0;return t}W.toHash=fE;function hE(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(lv(e,t),!pv(t,e.self.RULES.all))}W.alwaysValidSchema=hE;function lv(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let i in t)o[i]||hv(e,`unknown keyword: "${i}"`)}W.checkUnknownRules=lv;function pv(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}W.schemaHasRules=pv;function mE(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}W.schemaHasRulesButRef=mE;function gE({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ae._)`${r}`}return(0,ae._)`${e}${t}${(0,ae.getProperty)(n)}`}W.schemaRefOrVal=gE;function yE(e){return dv(decodeURIComponent(e))}W.unescapeFragment=yE;function _E(e){return encodeURIComponent(gd(e))}W.escapeFragment=_E;function gd(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}W.escapeJsonPointer=gd;function dv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}W.unescapeJsonPointer=dv;function vE(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}W.eachItem=vE;function cv({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof ae.Name?(i instanceof ae.Name?e(o,i,s):t(o,i,s),s):i instanceof ae.Name?(t(o,s,i),i):r(i,s);return a===ae.Name&&!(c instanceof ae.Name)?n(o,c):c}}W.mergeEvaluated={props:cv({mergeNames:(e,t,r)=>e.if((0,ae._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,ae._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,ae._)`${r} || {}`).code((0,ae._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,ae._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,ae._)`${r} || {}`),yd(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:fv}),items:cv({mergeNames:(e,t,r)=>e.if((0,ae._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,ae._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,ae._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,ae._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function fv(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,ae._)`{}`);return t!==void 0&&yd(e,r,t),r}W.evaluatedPropsToName=fv;function yd(e,t,r){Object.keys(r).forEach(n=>e.assign((0,ae._)`${t}${(0,ae.getProperty)(n)}`,!0))}W.setEvaluated=yd;var uv={};function xE(e,t){return e.scopeValue("func",{ref:t,code:uv[t.code]||(uv[t.code]=new dE._Code(t.code))})}W.useFunc=xE;var md;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(md||(W.Type=md={}));function bE(e,t,r){if(e instanceof ae.Name){let n=t===md.Num;return r?n?(0,ae._)`"[" + ${e} + "]"`:(0,ae._)`"['" + ${e} + "']"`:n?(0,ae._)`"/" + ${e}`:(0,ae._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ae.getProperty)(e).toString():"/"+gd(e)}W.getErrorPath=bE;function hv(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}W.checkStrictMode=hv});var nr=k(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var Ze=H(),kE={data:new Ze.Name("data"),valCxt:new Ze.Name("valCxt"),instancePath:new Ze.Name("instancePath"),parentData:new Ze.Name("parentData"),parentDataProperty:new Ze.Name("parentDataProperty"),rootData:new Ze.Name("rootData"),dynamicAnchors:new Ze.Name("dynamicAnchors"),vErrors:new Ze.Name("vErrors"),errors:new Ze.Name("errors"),this:new Ze.Name("this"),self:new Ze.Name("self"),scope:new Ze.Name("scope"),json:new Ze.Name("json"),jsonPos:new Ze.Name("jsonPos"),jsonLen:new Ze.Name("jsonLen"),jsonPart:new Ze.Name("jsonPart")};_d.default=kE});var ai=k(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.extendErrors=qe.resetErrorsCount=qe.reportExtraError=qe.reportError=qe.keyword$DataError=qe.keywordError=void 0;var te=H(),sa=ne(),Ge=nr();qe.keywordError={message:({keyword:e})=>(0,te.str)`must pass "${e}" keyword validation`};qe.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,te.str)`"${e}" keyword must be ${t} ($data)`:(0,te.str)`"${e}" keyword is invalid ($data)`};function wE(e,t=qe.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=yv(e,t,r);n??(s||a)?mv(i,c):gv(o,(0,te._)`[${c}]`)}qe.reportError=wE;function SE(e,t=qe.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=yv(e,t,r);mv(o,a),i||s||gv(n,Ge.default.vErrors)}qe.reportExtraError=SE;function TE(e,t){e.assign(Ge.default.errors,t),e.if((0,te._)`${Ge.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,te._)`${Ge.default.vErrors}.length`,t),()=>e.assign(Ge.default.vErrors,null)))}qe.resetErrorsCount=TE;function $E({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,Ge.default.errors,a=>{e.const(s,(0,te._)`${Ge.default.vErrors}[${a}]`),e.if((0,te._)`${s}.instancePath === undefined`,()=>e.assign((0,te._)`${s}.instancePath`,(0,te.strConcat)(Ge.default.instancePath,i.errorPath))),e.assign((0,te._)`${s}.schemaPath`,(0,te.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,te._)`${s}.schema`,r),e.assign((0,te._)`${s}.data`,n))})}qe.extendErrors=$E;function mv(e,t){let r=e.const("err",t);e.if((0,te._)`${Ge.default.vErrors} === null`,()=>e.assign(Ge.default.vErrors,(0,te._)`[${r}]`),(0,te._)`${Ge.default.vErrors}.push(${r})`),e.code((0,te._)`${Ge.default.errors}++`)}function gv(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,te._)`new ${e.ValidationError}(${t})`):(r.assign((0,te._)`${n}.errors`,t),r.return(!1))}var hn={keyword:new te.Name("keyword"),schemaPath:new te.Name("schemaPath"),params:new te.Name("params"),propertyName:new te.Name("propertyName"),message:new te.Name("message"),schema:new te.Name("schema"),parentSchema:new te.Name("parentSchema")};function yv(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,te._)`{}`:PE(e,t,r)}function PE(e,t,r={}){let{gen:n,it:o}=e,i=[EE(o,r),zE(e,r)];return CE(e,t,i),n.object(...i)}function EE({errorPath:e},{instancePath:t}){let r=t?(0,te.str)`${e}${(0,sa.getErrorPath)(t,sa.Type.Str)}`:e;return[Ge.default.instancePath,(0,te.strConcat)(Ge.default.instancePath,r)]}function zE({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,te.str)`${t}/${e}`;return r&&(o=(0,te.str)`${o}${(0,sa.getErrorPath)(r,sa.Type.Str)}`),[hn.schemaPath,o]}function CE(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:p,schemaPath:l}=a;n.push([hn.keyword,o],[hn.params,typeof t=="function"?t(e):t||(0,te._)`{}`]),c.messages&&n.push([hn.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([hn.schema,s],[hn.parentSchema,(0,te._)`${p}${l}`],[Ge.default.data,i]),u&&n.push([hn.propertyName,u])}});var vv=k(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.boolOrEmptySchema=Wn.topBoolOrEmptySchema=void 0;var IE=ai(),RE=H(),OE=nr(),AE={message:"boolean schema is false"};function NE(e){let{gen:t,schema:r,validateName:n}=e;r===!1?_v(e,!1):typeof r=="object"&&r.$async===!0?t.return(OE.default.data):(t.assign((0,RE._)`${n}.errors`,null),t.return(!0))}Wn.topBoolOrEmptySchema=NE;function jE(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),_v(e)):r.var(t,!0)}Wn.boolOrEmptySchema=jE;function _v(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,IE.reportError)(o,AE,void 0,t)}});var vd=k(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.getRules=Jn.isJSONType=void 0;var ME=["string","number","integer","boolean","null","object","array"],DE=new Set(ME);function LE(e){return typeof e=="string"&&DE.has(e)}Jn.isJSONType=LE;function ZE(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Jn.getRules=ZE});var xd=k(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.shouldUseRule=Tr.shouldUseGroup=Tr.schemaHasRulesForType=void 0;function qE({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&xv(e,n)}Tr.schemaHasRulesForType=qE;function xv(e,t){return t.rules.some(r=>bv(e,r))}Tr.shouldUseGroup=xv;function bv(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Tr.shouldUseRule=bv});var ci=k(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.reportTypeError=Fe.checkDataTypes=Fe.checkDataType=Fe.coerceAndCheckDataType=Fe.getJSONTypes=Fe.getSchemaTypes=Fe.DataType=void 0;var FE=vd(),UE=xd(),BE=ai(),B=H(),kv=ne(),Yn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Yn||(Fe.DataType=Yn={}));function VE(e){let t=wv(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Fe.getSchemaTypes=VE;function wv(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(FE.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Fe.getJSONTypes=wv;function HE(e,t){let{gen:r,data:n,opts:o}=e,i=GE(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,UE.schemaHasRulesForType)(e,t[0]));if(s){let a=kd(t,n,o.strictNumbers,Yn.Wrong);r.if(a,()=>{i.length?KE(e,t,i):wd(e)})}return s}Fe.coerceAndCheckDataType=HE;var Sv=new Set(["string","number","integer","boolean","null"]);function GE(e,t){return t?e.filter(r=>Sv.has(r)||t==="array"&&r==="array"):[]}function KE(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,B._)`typeof ${o}`),a=n.let("coerced",(0,B._)`undefined`);i.coerceTypes==="array"&&n.if((0,B._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,B._)`${o}[0]`).assign(s,(0,B._)`typeof ${o}`).if(kd(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,B._)`${a} !== undefined`);for(let u of r)(Sv.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),wd(e),n.endIf(),n.if((0,B._)`${a} !== undefined`,()=>{n.assign(o,a),WE(e,a)});function c(u){switch(u){case"string":n.elseIf((0,B._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,B._)`"" + ${o}`).elseIf((0,B._)`${o} === null`).assign(a,(0,B._)`""`);return;case"number":n.elseIf((0,B._)`${s} == "boolean" || ${o} === null
|
|
5
|
+
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,B._)`+${o}`);return;case"integer":n.elseIf((0,B._)`${s} === "boolean" || ${o} === null
|
|
6
|
+
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,B._)`+${o}`);return;case"boolean":n.elseIf((0,B._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,B._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,B._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,B._)`${s} === "string" || ${s} === "number"
|
|
7
|
+
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,B._)`[${o}]`)}}}function WE({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,B._)`${t} !== undefined`,()=>e.assign((0,B._)`${t}[${r}]`,n))}function bd(e,t,r,n=Yn.Correct){let o=n===Yn.Correct?B.operators.EQ:B.operators.NEQ,i;switch(e){case"null":return(0,B._)`${t} ${o} null`;case"array":i=(0,B._)`Array.isArray(${t})`;break;case"object":i=(0,B._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,B._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,B._)`typeof ${t} ${o} ${e}`}return n===Yn.Correct?i:(0,B.not)(i);function s(a=B.nil){return(0,B.and)((0,B._)`typeof ${t} == "number"`,a,r?(0,B._)`isFinite(${t})`:B.nil)}}Fe.checkDataType=bd;function kd(e,t,r,n){if(e.length===1)return bd(e[0],t,r,n);let o,i=(0,kv.toHash)(e);if(i.array&&i.object){let s=(0,B._)`typeof ${t} != "object"`;o=i.null?s:(0,B._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=B.nil;i.number&&delete i.integer;for(let s in i)o=(0,B.and)(o,bd(s,t,r,n));return o}Fe.checkDataTypes=kd;var JE={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,B._)`{type: ${e}}`:(0,B._)`{type: ${t}}`};function wd(e){let t=YE(e);(0,BE.reportError)(t,JE)}Fe.reportTypeError=wd;function YE(e){let{gen:t,data:r,schema:n}=e,o=(0,kv.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var $v=k(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.assignDefaults=void 0;var Qn=H(),QE=ne();function XE(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)Tv(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>Tv(e,i,o.default))}aa.assignDefaults=XE;function Tv(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,Qn._)`${i}${(0,Qn.getProperty)(t)}`;if(o){(0,QE.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Qn._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Qn._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Qn._)`${a} = ${(0,Qn.stringify)(r)}`)}});var vt=k(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.validateUnion=se.validateArray=se.usePattern=se.callValidateCode=se.schemaProperties=se.allSchemaProperties=se.noPropertyInData=se.propertyInData=se.isOwnProperty=se.hasPropFunc=se.reportMissingProp=se.checkMissingProp=se.checkReportMissingProp=void 0;var de=H(),Sd=ne(),$r=nr(),ez=ne();function tz(e,t){let{gen:r,data:n,it:o}=e;r.if($d(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,de._)`${t}`},!0),e.error()})}se.checkReportMissingProp=tz;function rz({gen:e,data:t,it:{opts:r}},n,o){return(0,de.or)(...n.map(i=>(0,de.and)($d(e,t,i,r.ownProperties),(0,de._)`${o} = ${i}`)))}se.checkMissingProp=rz;function nz(e,t){e.setParams({missingProperty:t},!0),e.error()}se.reportMissingProp=nz;function Pv(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,de._)`Object.prototype.hasOwnProperty`})}se.hasPropFunc=Pv;function Td(e,t,r){return(0,de._)`${Pv(e)}.call(${t}, ${r})`}se.isOwnProperty=Td;function oz(e,t,r,n){let o=(0,de._)`${t}${(0,de.getProperty)(r)} !== undefined`;return n?(0,de._)`${o} && ${Td(e,t,r)}`:o}se.propertyInData=oz;function $d(e,t,r,n){let o=(0,de._)`${t}${(0,de.getProperty)(r)} === undefined`;return n?(0,de.or)(o,(0,de.not)(Td(e,t,r))):o}se.noPropertyInData=$d;function Ev(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}se.allSchemaProperties=Ev;function iz(e,t){return Ev(t).filter(r=>!(0,Sd.alwaysValidSchema)(e,t[r]))}se.schemaProperties=iz;function sz({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,de._)`${e}, ${t}, ${n}${o}`:t,l=[[$r.default.instancePath,(0,de.strConcat)($r.default.instancePath,i)],[$r.default.parentData,s.parentData],[$r.default.parentDataProperty,s.parentDataProperty],[$r.default.rootData,$r.default.rootData]];s.opts.dynamicRef&&l.push([$r.default.dynamicAnchors,$r.default.dynamicAnchors]);let d=(0,de._)`${p}, ${r.object(...l)}`;return c!==de.nil?(0,de._)`${a}.call(${c}, ${d})`:(0,de._)`${a}(${d})`}se.callValidateCode=sz;var az=(0,de._)`new RegExp`;function cz({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,de._)`${o.code==="new RegExp"?az:(0,ez.useFunc)(e,o)}(${r}, ${n})`})}se.usePattern=cz;function uz(e){let{gen:t,data:r,keyword:n,it:o}=e,i=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,de._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:Sd.Type.Num},i),t.if((0,de.not)(i),a)})}}se.validateArray=uz;function lz(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Sd.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let p=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,de._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,de.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}se.validateUnion=lz});var Iv=k(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.validateKeywordUsage=qt.validSchemaType=qt.funcKeywordCode=qt.macroKeywordCode=void 0;var Ke=H(),mn=nr(),pz=vt(),dz=ai();function fz(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=Cv(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:Ke.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}qt.macroKeywordCode=fz;function hz(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;gz(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=Cv(n,o,u),l=n.let("valid");e.block$data(l,d),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function d(){if(t.errors===!1)m(),t.modifying&&zv(e),y(()=>e.error());else{let v=t.async?h():f();t.modifying&&zv(e),y(()=>mz(e,v))}}function h(){let v=n.let("ruleErrs",null);return n.try(()=>m((0,Ke._)`await `),_=>n.assign(l,!1).if((0,Ke._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(v,(0,Ke._)`${_}.errors`),()=>n.throw(_))),v}function f(){let v=(0,Ke._)`${p}.errors`;return n.assign(v,null),m(Ke.nil),v}function m(v=t.async?(0,Ke._)`await `:Ke.nil){let _=c.opts.passContext?mn.default.this:mn.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,Ke._)`${v}${(0,pz.callValidateCode)(e,p,_,S)}`,t.modifying)}function y(v){var _;n.if((0,Ke.not)((_=t.valid)!==null&&_!==void 0?_:l),v)}}qt.funcKeywordCode=hz;function zv(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ke._)`${n.parentData}[${n.parentDataProperty}]`))}function mz(e,t){let{gen:r}=e;r.if((0,Ke._)`Array.isArray(${t})`,()=>{r.assign(mn.default.vErrors,(0,Ke._)`${mn.default.vErrors} === null ? ${t} : ${mn.default.vErrors}.concat(${t})`).assign(mn.default.errors,(0,Ke._)`${mn.default.vErrors}.length`),(0,dz.extendErrors)(e)},()=>e.error())}function gz({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Cv(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ke.stringify)(r)})}function yz(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}qt.validSchemaType=yz;function _z({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}qt.validateKeywordUsage=_z});var Ov=k(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.extendSubschemaMode=Pr.extendSubschemaData=Pr.getSubschema=void 0;var Ft=H(),Rv=ne();function vz(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Ft._)`${e.schemaPath}${(0,Ft.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Ft._)`${e.schemaPath}${(0,Ft.getProperty)(t)}${(0,Ft.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Rv.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Pr.getSubschema=vz;function xz(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:p,opts:l}=t,d=a.let("data",(0,Ft._)`${t.data}${(0,Ft.getProperty)(r)}`,!0);c(d),e.errorPath=(0,Ft.str)`${u}${(0,Rv.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,Ft._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof Ft.Name?o:a.let("data",o,!0);c(u),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Pr.extendSubschemaData=xz;function bz(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Pr.extendSubschemaMode=bz});var Pd=k((u6,Av)=>{"use strict";Av.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var jv=k((l6,Nv)=>{"use strict";var Er=Nv.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};ca(t,n,o,e,"",e)};Er.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Er.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Er.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Er.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 ca(e,t,r,n,o,i,s,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,i,s,a,c,u);for(var p in n){var l=n[p];if(Array.isArray(l)){if(p in Er.arrayKeywords)for(var d=0;d<l.length;d++)ca(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in Er.propsKeywords){if(l&&typeof l=="object")for(var h in l)ca(e,t,r,l[h],o+"/"+p+"/"+kz(h),i,o,p,n,h)}else(p in Er.keywords||e.allKeys&&!(p in Er.skipKeywords))&&ca(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function kz(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ui=k(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.getSchemaRefs=nt.resolveUrl=nt.normalizeId=nt._getFullPath=nt.getFullPath=nt.inlineRef=void 0;var wz=ne(),Sz=Pd(),Tz=jv(),$z=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Pz(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Ed(e):t?Mv(e)<=t:!1}nt.inlineRef=Pz;var Ez=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Ed(e){for(let t in e){if(Ez.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Ed)||typeof r=="object"&&Ed(r))return!0}return!1}function Mv(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!$z.has(r)&&(typeof e[r]=="object"&&(0,wz.eachItem)(e[r],n=>t+=Mv(n)),t===1/0))return 1/0}return t}function Dv(e,t="",r){r!==!1&&(t=Xn(t));let n=e.parse(t);return Lv(e,n)}nt.getFullPath=Dv;function Lv(e,t){return e.serialize(t).split("#")[0]+"#"}nt._getFullPath=Lv;var zz=/#\/?$/;function Xn(e){return e?e.replace(zz,""):""}nt.normalizeId=Xn;function Cz(e,t,r){return r=Xn(r),e.resolve(t,r)}nt.resolveUrl=Cz;var Iz=/^[a-z_][-a-z0-9._]*$/i;function Rz(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Xn(e[r]||t),i={"":o},s=Dv(n,o,!1),a={},c=new Set;return Tz(e,{allKeys:!0},(l,d,h,f)=>{if(f===void 0)return;let m=s+d,y=i[f];typeof l[r]=="string"&&(y=v.call(this,l[r])),_.call(this,l.$anchor),_.call(this,l.$dynamicAnchor),i[d]=y;function v(S){let $=this.opts.uriResolver.resolve;if(S=Xn(y?$(y,S):S),c.has(S))throw p(S);c.add(S);let M=this.refs[S];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?u(l,M.schema,S):S!==Xn(m)&&(S[0]==="#"?(u(l,a[S],S),a[S]=l):this.refs[S]=m),S}function _(S){if(typeof S=="string"){if(!Iz.test(S))throw new Error(`invalid anchor "${S}"`);v.call(this,`#${S}`)}}}),a;function u(l,d,h){if(d!==void 0&&!Sz(l,d))throw p(h)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}nt.getSchemaRefs=Rz});var di=k(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.getData=zr.KeywordCxt=zr.validateFunctionCode=void 0;var Bv=vv(),Zv=ci(),Cd=xd(),ua=ci(),Oz=$v(),pi=Iv(),zd=Ov(),A=H(),F=nr(),Az=ui(),or=ne(),li=ai();function Nz(e){if(Gv(e)&&(Kv(e),Hv(e))){Dz(e);return}Vv(e,()=>(0,Bv.topBoolOrEmptySchema)(e))}zr.validateFunctionCode=Nz;function Vv({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,A._)`${F.default.data}, ${F.default.valCxt}`,n.$async,()=>{e.code((0,A._)`"use strict"; ${qv(r,o)}`),Mz(e,o),e.code(i)}):e.func(t,(0,A._)`${F.default.data}, ${jz(o)}`,n.$async,()=>e.code(qv(r,o)).code(i))}function jz(e){return(0,A._)`{${F.default.instancePath}="", ${F.default.parentData}, ${F.default.parentDataProperty}, ${F.default.rootData}=${F.default.data}${e.dynamicRef?(0,A._)`, ${F.default.dynamicAnchors}={}`:A.nil}}={}`}function Mz(e,t){e.if(F.default.valCxt,()=>{e.var(F.default.instancePath,(0,A._)`${F.default.valCxt}.${F.default.instancePath}`),e.var(F.default.parentData,(0,A._)`${F.default.valCxt}.${F.default.parentData}`),e.var(F.default.parentDataProperty,(0,A._)`${F.default.valCxt}.${F.default.parentDataProperty}`),e.var(F.default.rootData,(0,A._)`${F.default.valCxt}.${F.default.rootData}`),t.dynamicRef&&e.var(F.default.dynamicAnchors,(0,A._)`${F.default.valCxt}.${F.default.dynamicAnchors}`)},()=>{e.var(F.default.instancePath,(0,A._)`""`),e.var(F.default.parentData,(0,A._)`undefined`),e.var(F.default.parentDataProperty,(0,A._)`undefined`),e.var(F.default.rootData,F.default.data),t.dynamicRef&&e.var(F.default.dynamicAnchors,(0,A._)`{}`)})}function Dz(e){let{schema:t,opts:r,gen:n}=e;Vv(e,()=>{r.$comment&&t.$comment&&Jv(e),Uz(e),n.let(F.default.vErrors,null),n.let(F.default.errors,0),r.unevaluated&&Lz(e),Wv(e),Hz(e)})}function Lz(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,A._)`${r}.evaluated`),t.if((0,A._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,A._)`${e.evaluated}.props`,(0,A._)`undefined`)),t.if((0,A._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,A._)`${e.evaluated}.items`,(0,A._)`undefined`))}function qv(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,A._)`/*# sourceURL=${r} */`:A.nil}function Zz(e,t){if(Gv(e)&&(Kv(e),Hv(e))){qz(e,t);return}(0,Bv.boolOrEmptySchema)(e,t)}function Hv({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Gv(e){return typeof e.schema!="boolean"}function qz(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&Jv(e),Bz(e),Vz(e);let i=n.const("_errs",F.default.errors);Wv(e,i),n.var(t,(0,A._)`${i} === ${F.default.errors}`)}function Kv(e){(0,or.checkUnknownRules)(e),Fz(e)}function Wv(e,t){if(e.opts.jtd)return Fv(e,[],!1,t);let r=(0,Zv.getSchemaTypes)(e.schema),n=(0,Zv.coerceAndCheckDataType)(e,r);Fv(e,r,!n,t)}function Fz(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,or.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Uz(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,or.checkStrictMode)(e,"default is ignored in the schema root")}function Bz(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Az.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Vz(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Jv({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,A._)`${F.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,A.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,A._)`${F.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function Hz(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,A._)`${F.default.errors} === 0`,()=>t.return(F.default.data),()=>t.throw((0,A._)`new ${o}(${F.default.vErrors})`)):(t.assign((0,A._)`${n}.errors`,F.default.vErrors),i.unevaluated&&Gz(e),t.return((0,A._)`${F.default.errors} === 0`))}function Gz({gen:e,evaluated:t,props:r,items:n}){r instanceof A.Name&&e.assign((0,A._)`${t}.props`,r),n instanceof A.Name&&e.assign((0,A._)`${t}.items`,n)}function Fv(e,t,r,n){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:p}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,or.schemaHasRulesButRef)(i,p))){o.block(()=>Qv(e,"$ref",p.all.$ref.definition));return}c.jtd||Kz(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,Cd.shouldUseGroup)(i,d)&&(d.type?(o.if((0,ua.checkDataType)(d.type,s,c.strictNumbers)),Uv(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,ua.reportTypeError)(e)),o.endIf()):Uv(e,d),a||o.if((0,A._)`${F.default.errors} === ${n||0}`))}}function Uv(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,Oz.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Cd.shouldUseRule)(n,i)&&Qv(e,i.keyword,i.definition,t.type)})}function Kz(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Wz(e,t),e.opts.allowUnionTypes||Jz(e,t),Yz(e,e.dataTypes))}function Wz(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Yv(e.dataTypes,r)||Id(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Xz(e,t)}}function Jz(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Id(e,"use allowUnionTypes to allow union type keyword")}function Yz(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Cd.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>Qz(t,s))&&Id(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Qz(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Yv(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Xz(e,t){let r=[];for(let n of e.dataTypes)Yv(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Id(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,or.checkStrictMode)(e,t,e.opts.strictTypes)}var la=class{constructor(t,r,n){if((0,pi.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,or.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Xv(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,pi.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=t.gen.const("_errs",F.default.errors))}result(t,r,n){this.failResult((0,A.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,A.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,A._)`${r} !== undefined && (${(0,A.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?li.reportExtraError:li.reportError)(this,this.def.error,r)}$dataError(){(0,li.reportError)(this,this.def.$dataError||li.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,li.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=A.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=A.nil,r=A.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,A.or)((0,A._)`${o} === undefined`,r)),t!==A.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==A.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,A.or)(s(),a());function s(){if(n.length){if(!(r instanceof A.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,A._)`${(0,ua.checkDataTypes)(c,r,i.opts.strictNumbers,ua.DataType.Wrong)}`}return A.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,A._)`!${c}(${r})`}return A.nil}}subschema(t,r){let n=(0,zd.getSubschema)(this.it,t);(0,zd.extendSubschemaData)(n,this.it,t),(0,zd.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return Zz(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=or.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=or.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,A.Name)),!0}};zr.KeywordCxt=la;function Qv(e,t,r,n){let o=new la(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,pi.funcKeywordCode)(o,r):"macro"in r?(0,pi.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,pi.funcKeywordCode)(o,r)}var eC=/^\/(?:[^~]|~0|~1)*$/,tC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xv(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return F.default.rootData;if(e[0]==="/"){if(!eC.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=F.default.rootData}else{let u=tC.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+u[1];if(o=u[2],o==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(i=r[t-p],!o)return i}let s=i,a=o.split("/");for(let u of a)u&&(i=(0,A._)`${i}${(0,A.getProperty)((0,or.unescapeJsonPointer)(u))}`,s=(0,A._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}zr.getData=Xv});var pa=k(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Rd=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Od.default=Rd});var fi=k(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var Ad=ui(),Nd=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Ad.resolveUrl)(t,r,n),this.missingSchema=(0,Ad.normalizeId)((0,Ad.getFullPath)(t,this.missingRef))}};jd.default=Nd});var fa=k(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.resolveSchema=xt.getCompilingSchema=xt.resolveRef=xt.compileSchema=xt.SchemaEnv=void 0;var Ct=H(),rC=pa(),gn=nr(),It=ui(),e0=ne(),nC=di(),eo=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,It.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};xt.SchemaEnv=eo;function Dd(e){let t=t0.call(this,e);if(t)return t;let r=(0,It.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Ct.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:rC.default,code:(0,Ct._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:gn.default.data,parentData:gn.default.parentData,parentDataProperty:gn.default.parentDataProperty,dataNames:[gn.default.data],dataPathArr:[Ct.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ct.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Ct.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ct._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,nC.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(gn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let h=new Function(`${gn.default.self}`,`${gn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:f,items:m}=u;h.evaluated={props:f instanceof Ct.Name?void 0:f,items:m instanceof Ct.Name?void 0:m,dynamicProps:f instanceof Ct.Name,dynamicItems:m instanceof Ct.Name},h.source&&(h.source.evaluated=(0,Ct.stringify)(h.evaluated))}return e.validate=h,e}catch(l){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),l}finally{this._compilations.delete(e)}}xt.compileSchema=Dd;function oC(e,t,r){var n;r=(0,It.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=aC.call(this,e,r);if(i===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(i=new eo({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=iC.call(this,i)}xt.resolveRef=oC;function iC(e){return(0,It.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Dd.call(this,e)}function t0(e){for(let t of this._compilations)if(sC(t,e))return t}xt.getCompilingSchema=t0;function sC(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function aC(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||da.call(this,e,t)}function da(e,t){let r=this.opts.uriResolver.parse(t),n=(0,It._getFullPath)(this.opts.uriResolver,r),o=(0,It.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Md.call(this,r,e);let i=(0,It.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=da.call(this,e,s);return typeof a?.schema!="object"?void 0:Md.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Dd.call(this,s),i===(0,It.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,It.resolveUrl)(this.opts.uriResolver,o,u)),new eo({schema:a,schemaId:c,root:e,baseId:o})}return Md.call(this,r,s)}}xt.resolveSchema=da;var cC=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Md(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,e0.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!cC.has(a)&&u&&(t=(0,It.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,e0.schemaHasRulesButRef)(r,this.RULES)){let a=(0,It.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=da.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new eo({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var r0=k((g6,uC)=>{uC.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 Zd=k((y6,s0)=>{"use strict";var lC=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o0=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 Ld(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var pC=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function n0(e){return e.length=0,!0}function dC(e,t,r){if(e.length){let n=Ld(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function fC(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=dC;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(o,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),n.push(":");continue}else if(u==="%"){if(!a(o,n,r))break;a=n0}else{o.push(u);continue}}return o.length&&(a===n0?r.zone=o.join(""):s?n.push(o.join("")):n.push(Ld(o))),r.address=n.join(""),r}function i0(e){if(hC(e,":")<2)return{host:e,isIPV6:!1};let t=fC(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function hC(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function mC(e){let t=e,r=[],n=-1,o=0;for(;o=t.length;){if(o===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(o===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(o===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function gC(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function yC(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!o0(r)){let n=i0(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}s0.exports={nonSimpleDomain:pC,recomposeAuthority:yC,normalizeComponentEncoding:gC,removeDotSegments:mC,isIPv4:o0,isUUID:lC,normalizeIPv6:i0,stringArrayToHexStripped:Ld}});var p0=k((_6,l0)=>{"use strict";var{isUUID:_C}=Zd(),vC=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,xC=["http","https","ws","wss","urn","urn:uuid"];function bC(e){return xC.indexOf(e)!==-1}function qd(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function a0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function c0(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function kC(e){return e.secure=qd(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function wC(e){if((e.port===(qd(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function SC(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(vC);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,i=Fd(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function TC(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=Fd(o);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function $C(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!_C(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function PC(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var u0={scheme:"http",domainHost:!0,parse:a0,serialize:c0},EC={scheme:"https",domainHost:u0.domainHost,parse:a0,serialize:c0},ha={scheme:"ws",domainHost:!0,parse:kC,serialize:wC},zC={scheme:"wss",domainHost:ha.domainHost,parse:ha.parse,serialize:ha.serialize},CC={scheme:"urn",parse:SC,serialize:TC,skipNormalize:!0},IC={scheme:"urn:uuid",parse:$C,serialize:PC,skipNormalize:!0},ma={http:u0,https:EC,ws:ha,wss:zC,urn:CC,"urn:uuid":IC};Object.setPrototypeOf(ma,null);function Fd(e){return e&&(ma[e]||ma[e.toLowerCase()])||void 0}l0.exports={wsIsSecure:qd,SCHEMES:ma,isValidSchemeName:bC,getSchemeHandler:Fd}});var h0=k((v6,ya)=>{"use strict";var{normalizeIPv6:RC,removeDotSegments:hi,recomposeAuthority:OC,normalizeComponentEncoding:ga,isIPv4:AC,nonSimpleDomain:NC}=Zd(),{SCHEMES:jC,getSchemeHandler:d0}=p0();function MC(e,t){return typeof e=="string"?e=Ut(ir(e,t),t):typeof e=="object"&&(e=ir(Ut(e,t),t)),e}function DC(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=f0(ir(e,n),ir(t,n),n,!0);return n.skipEscape=!0,Ut(o,n)}function f0(e,t,r,n){let o={};return n||(e=ir(Ut(e,r),r),t=ir(Ut(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=hi(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=hi(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=hi(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=hi(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function LC(e,t,r){return typeof e=="string"?(e=unescape(e),e=Ut(ga(ir(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Ut(ga(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Ut(ga(ir(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Ut(ga(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Ut(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],i=d0(n.scheme||r.scheme);i&&i.serialize&&i.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&&o.push(r.scheme,":");let s=OC(r);if(s!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(s),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=hi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var ZC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ir(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(ZC);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(AC(n.host)===!1){let c=RC(n.host);n.host=c.host.toLowerCase(),o=c.isIPV6}else o=!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 s=d0(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&NC(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.skipNormalize)&&(e.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)))),s&&s.parse&&s.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Ud={SCHEMES:jC,normalize:MC,resolve:DC,resolveComponent:f0,equal:LC,serialize:Ut,parse:ir};ya.exports=Ud;ya.exports.default=Ud;ya.exports.fastUri=Ud});var g0=k(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var m0=h0();m0.code='require("ajv/dist/runtime/uri").default';Bd.default=m0});var S0=k(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.CodeGen=Ne.Name=Ne.nil=Ne.stringify=Ne.str=Ne._=Ne.KeywordCxt=void 0;var qC=di();Object.defineProperty(Ne,"KeywordCxt",{enumerable:!0,get:function(){return qC.KeywordCxt}});var to=H();Object.defineProperty(Ne,"_",{enumerable:!0,get:function(){return to._}});Object.defineProperty(Ne,"str",{enumerable:!0,get:function(){return to.str}});Object.defineProperty(Ne,"stringify",{enumerable:!0,get:function(){return to.stringify}});Object.defineProperty(Ne,"nil",{enumerable:!0,get:function(){return to.nil}});Object.defineProperty(Ne,"Name",{enumerable:!0,get:function(){return to.Name}});Object.defineProperty(Ne,"CodeGen",{enumerable:!0,get:function(){return to.CodeGen}});var FC=pa(),b0=fi(),UC=vd(),mi=fa(),BC=H(),gi=ui(),_a=ci(),Hd=ne(),y0=r0(),VC=g0(),k0=(e,t)=>new RegExp(e,t);k0.code="new RegExp";var HC=["removeAdditional","useDefaults","coerceTypes"],GC=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),KC={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."},WC={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_0=200;function JC(e){var t,r,n,o,i,s,a,c,u,p,l,d,h,f,m,y,v,_,S,$,M,ve,pe,Dr,Lr;let pt=e.strict,fr=(t=e.code)===null||t===void 0?void 0:t.optimize,dt=fr===!0||fr===void 0?1:fr||0,To=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:k0,zn=(o=e.uriResolver)!==null&&o!==void 0?o:VC.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:pt)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:pt)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:pt)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:pt)!==null&&d!==void 0?d:"log",strictRequired:(f=(h=e.strictRequired)!==null&&h!==void 0?h:pt)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:dt,regExp:To}:{optimize:dt,regExp:To},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:_0,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:_0,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:($=e.schemaId)!==null&&$!==void 0?$:"$id",addUsedSchema:(M=e.addUsedSchema)!==null&&M!==void 0?M:!0,validateSchema:(ve=e.validateSchema)!==null&&ve!==void 0?ve:!0,validateFormats:(pe=e.validateFormats)!==null&&pe!==void 0?pe:!0,unicodeRegExp:(Dr=e.unicodeRegExp)!==null&&Dr!==void 0?Dr:!0,int32range:(Lr=e.int32range)!==null&&Lr!==void 0?Lr:!0,uriResolver:zn}}var yi=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...JC(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new BC.ValueScope({scope:{},prefixes:GC,es5:r,lines:n}),this.logger=rI(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,UC.getRules)(),v0.call(this,KC,t,"NOT SUPPORTED"),v0.call(this,WC,t,"DEPRECATED","warn"),this._metaOpts=eI.call(this),t.formats&&QC.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&XC.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),YC.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=y0;n==="id"&&(o={...y0},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(p,l){await i.call(this,p.$schema);let d=this._addSchema(p,l);return d.validate||s.call(this,d)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(l){if(!(l instanceof b0.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:l}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${l} cannot be resolved`)}async function c(p){let l=await u.call(this,p);this.refs[p]||await i.call(this,l.$schema),this.refs[p]||this.addSchema(l,p,r)}async function u(p){let l=this._loading[p];if(l)return l;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,o);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,gi.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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 o=this.validate(n,t);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(t){let r;for(;typeof(r=x0.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new mi.SchemaEnv({schema:{},schemaId:n});if(r=mi.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=x0.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,gi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(oI.call(this,n,r),!r)return(0,Hd.eachItem)(n,i=>Vd.call(this,i)),this;sI.call(this,r);let o={...r,type:(0,_a.getJSONTypes)(r.type),schemaType:(0,_a.getJSONTypes)(r.schemaType)};return(0,Hd.eachItem)(n,o.type.length===0?i=>Vd.call(this,i,o):i=>o.type.forEach(s=>Vd.call(this,i,o,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let i=o.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,p=s[a];u&&p&&(s[a]=w0(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,gi.normalizeId)(s||n);let u=gi.getSchemaRefs.call(this,t,n);return c=new mi.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):mi.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{mi.compileSchema.call(this,t)}finally{this.opts=r}}};yi.ValidationError=FC.default;yi.MissingRefError=b0.default;Ne.default=yi;function v0(e,t,r,n="error"){for(let o in e){let i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function x0(e){return e=(0,gi.normalizeId)(e),this.schemas[e]||this.refs[e]}function YC(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function QC(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function XC(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function eI(){let e={...this.opts};for(let t of HC)delete e[t];return e}var tI={log(){},warn(){},error(){}};function rI(e){if(e===!1)return tI;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var nI=/^[a-z_$][a-z0-9_$:-]*$/i;function oI(e,t){let{RULES:r}=this;if((0,Hd.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!nI.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Vd(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,_a.getJSONTypes)(t.type),schemaType:(0,_a.getJSONTypes)(t.schemaType)}};t.before?iI.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function iI(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function sI(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=w0(t)),e.validateSchema=this.compile(t,!0))}var aI={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function w0(e){return{anyOf:[e,aI]}}});var T0=k(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var cI={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Gd.default=cI});var z0=k(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.callRef=yn.getValidate=void 0;var uI=fi(),$0=vt(),ot=H(),ro=nr(),P0=fa(),va=ne(),lI={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=n,{root:u}=i;if((r==="#"||r==="#/")&&o===u.baseId)return l();let p=P0.resolveRef.call(c,u,o,r);if(p===void 0)throw new uI.default(n.opts.uriResolver,o,r);if(p instanceof P0.SchemaEnv)return d(p);return h(p);function l(){if(i===u)return xa(e,s,i,i.$async);let f=t.scopeValue("root",{ref:u});return xa(e,(0,ot._)`${f}.validate`,u,u.$async)}function d(f){let m=E0(e,f);xa(e,m,f,f.$async)}function h(f){let m=t.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,ot.stringify)(f)}:{ref:f}),y=t.name("valid"),v=e.subschema({schema:f,dataTypes:[],schemaPath:ot.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(v),e.ok(y)}}};function E0(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,ot._)`${r.scopeValue("wrapper",{ref:t})}.validate`}yn.getValidate=E0;function xa(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?ro.default.this:ot.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=o.let("valid");o.try(()=>{o.code((0,ot._)`await ${(0,$0.callValidateCode)(e,t,u)}`),h(t),s||o.assign(f,!0)},m=>{o.if((0,ot._)`!(${m} instanceof ${i.ValidationError})`,()=>o.throw(m)),d(m),s||o.assign(f,!1)}),e.ok(f)}function l(){e.result((0,$0.callValidateCode)(e,t,u),()=>h(t),()=>d(t))}function d(f){let m=(0,ot._)`${f}.errors`;o.assign(ro.default.vErrors,(0,ot._)`${ro.default.vErrors} === null ? ${m} : ${ro.default.vErrors}.concat(${m})`),o.assign(ro.default.errors,(0,ot._)`${ro.default.vErrors}.length`)}function h(f){var m;if(!i.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=va.mergeEvaluated.props(o,y.props,i.props));else{let v=o.var("props",(0,ot._)`${f}.evaluated.props`);i.props=va.mergeEvaluated.props(o,v,i.props,ot.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=va.mergeEvaluated.items(o,y.items,i.items));else{let v=o.var("items",(0,ot._)`${f}.evaluated.items`);i.items=va.mergeEvaluated.items(o,v,i.items,ot.Name)}}}yn.callRef=xa;yn.default=lI});var C0=k(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});var pI=T0(),dI=z0(),fI=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",pI.default,dI.default];Kd.default=fI});var I0=k(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var ba=H(),Cr=ba.operators,ka={maximum:{okStr:"<=",ok:Cr.LTE,fail:Cr.GT},minimum:{okStr:">=",ok:Cr.GTE,fail:Cr.LT},exclusiveMaximum:{okStr:"<",ok:Cr.LT,fail:Cr.GTE},exclusiveMinimum:{okStr:">",ok:Cr.GT,fail:Cr.LTE}},hI={message:({keyword:e,schemaCode:t})=>(0,ba.str)`must be ${ka[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ba._)`{comparison: ${ka[e].okStr}, limit: ${t}}`},mI={keyword:Object.keys(ka),type:"number",schemaType:"number",$data:!0,error:hI,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,ba._)`${r} ${ka[t].fail} ${n} || isNaN(${r})`)}};Wd.default=mI});var R0=k(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var _i=H(),gI={message:({schemaCode:e})=>(0,_i.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,_i._)`{multipleOf: ${e}}`},yI={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gI,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,_i._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,_i._)`${s} !== parseInt(${s})`;e.fail$data((0,_i._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Jd.default=yI});var A0=k(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});function O0(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}Yd.default=O0;O0.code='require("ajv/dist/runtime/ucs2length").default'});var N0=k(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var _n=H(),_I=ne(),vI=A0(),xI={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,_n.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,_n._)`{limit: ${e}}`},bI={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:xI,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?_n.operators.GT:_n.operators.LT,s=o.opts.unicode===!1?(0,_n._)`${r}.length`:(0,_n._)`${(0,_I.useFunc)(e.gen,vI.default)}(${r})`;e.fail$data((0,_n._)`${s} ${i} ${n}`)}};Qd.default=bI});var j0=k(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});var kI=vt(),wa=H(),wI={message:({schemaCode:e})=>(0,wa.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,wa._)`{pattern: ${e}}`},SI={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:wI,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,wa._)`(new RegExp(${o}, ${s}))`:(0,kI.usePattern)(e,n);e.fail$data((0,wa._)`!${a}.test(${t})`)}};Xd.default=SI});var M0=k(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var vi=H(),TI={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,vi.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,vi._)`{limit: ${e}}`},$I={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:TI,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?vi.operators.GT:vi.operators.LT;e.fail$data((0,vi._)`Object.keys(${r}).length ${o} ${n}`)}};ef.default=$I});var D0=k(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var xi=vt(),bi=H(),PI=ne(),EI={message:({params:{missingProperty:e}})=>(0,bi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,bi._)`{missingProperty: ${e}}`},zI={keyword:"required",type:"object",schemaType:"array",$data:!0,error:EI,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():p(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:f}=e.it;for(let m of r)if(h?.[m]===void 0&&!f.has(m)){let y=s.schemaEnv.baseId+s.errSchemaPath,v=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,PI.checkStrictMode)(s,v,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(bi.nil,l);else for(let h of r)(0,xi.checkReportMissingProp)(e,h)}function p(){let h=t.let("missing");if(c||i){let f=t.let("valid",!0);e.block$data(f,()=>d(h,f)),e.ok(f)}else t.if((0,xi.checkMissingProp)(e,r,h)),(0,xi.reportMissingProp)(e,h),t.else()}function l(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,xi.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function d(h,f){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(f,(0,xi.propertyInData)(t,o,h,a.ownProperties)),t.if((0,bi.not)(f),()=>{e.error(),t.break()})},bi.nil)}}};tf.default=zI});var L0=k(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var ki=H(),CI={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,ki.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,ki._)`{limit: ${e}}`},II={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:CI,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?ki.operators.GT:ki.operators.LT;e.fail$data((0,ki._)`${r}.length ${o} ${n}`)}};rf.default=II});var Sa=k(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var Z0=Pd();Z0.code='require("ajv/dist/runtime/equal").default';nf.default=Z0});var q0=k(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var of=ci(),je=H(),RI=ne(),OI=Sa(),AI={message:({params:{i:e,j:t}})=>(0,je.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,je._)`{i: ${e}, j: ${t}}`},NI={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:AI,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:i,schemaCode:s,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),u=i.items?(0,of.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,je._)`${s} === false`),e.ok(c);function p(){let f=t.let("i",(0,je._)`${r}.length`),m=t.let("j");e.setParams({i:f,j:m}),t.assign(c,!0),t.if((0,je._)`${f} > 1`,()=>(l()?d:h)(f,m))}function l(){return u.length>0&&!u.some(f=>f==="object"||f==="array")}function d(f,m){let y=t.name("item"),v=(0,of.checkDataTypes)(u,y,a.opts.strictNumbers,of.DataType.Wrong),_=t.const("indices",(0,je._)`{}`);t.for((0,je._)`;${f}--;`,()=>{t.let(y,(0,je._)`${r}[${f}]`),t.if(v,(0,je._)`continue`),u.length>1&&t.if((0,je._)`typeof ${y} == "string"`,(0,je._)`${y} += "_"`),t.if((0,je._)`typeof ${_}[${y}] == "number"`,()=>{t.assign(m,(0,je._)`${_}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,je._)`${_}[${y}] = ${f}`)})}function h(f,m){let y=(0,RI.useFunc)(t,OI.default),v=t.name("outer");t.label(v).for((0,je._)`;${f}--;`,()=>t.for((0,je._)`${m} = ${f}; ${m}--;`,()=>t.if((0,je._)`${y}(${r}[${f}], ${r}[${m}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};sf.default=NI});var F0=k(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var af=H(),jI=ne(),MI=Sa(),DI={message:"must be equal to constant",params:({schemaCode:e})=>(0,af._)`{allowedValue: ${e}}`},LI={keyword:"const",$data:!0,error:DI,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,af._)`!${(0,jI.useFunc)(t,MI.default)}(${r}, ${o})`):e.fail((0,af._)`${i} !== ${r}`)}};cf.default=LI});var U0=k(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var wi=H(),ZI=ne(),qI=Sa(),FI={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,wi._)`{allowedValues: ${e}}`},UI={keyword:"enum",schemaType:"array",$data:!0,error:FI,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:s}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,ZI.useFunc)(t,qI.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,l);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",i);p=(0,wi.or)(...o.map((f,m)=>d(h,m)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,h=>t.if((0,wi._)`${u()}(${r}, ${h})`,()=>t.assign(p,!0).break()))}function d(h,f){let m=o[f];return typeof m=="object"&&m!==null?(0,wi._)`${u()}(${r}, ${h}[${f}])`:(0,wi._)`${r} === ${m}`}}};uf.default=UI});var B0=k(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var BI=I0(),VI=R0(),HI=N0(),GI=j0(),KI=M0(),WI=D0(),JI=L0(),YI=q0(),QI=F0(),XI=U0(),eR=[BI.default,VI.default,HI.default,GI.default,KI.default,WI.default,JI.default,YI.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},QI.default,XI.default];lf.default=eR});var df=k(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateAdditionalItems=void 0;var vn=H(),pf=ne(),tR={message:({params:{len:e}})=>(0,vn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,vn._)`{limit: ${e}}`},rR={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tR,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,pf.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}V0(e,n)}};function V0(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,vn._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,vn._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,pf.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,vn._)`${a} <= ${t.length}`);r.if((0,vn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:pf.Type.Num},u),s.allErrors||r.if((0,vn.not)(u),()=>r.break())})}}Si.validateAdditionalItems=V0;Si.default=rR});var ff=k(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.validateTuple=void 0;var H0=H(),Ta=ne(),nR=vt(),oR={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return G0(e,"additionalItems",t);r.items=!0,!(0,Ta.alwaysValidSchema)(r,t)&&e.ok((0,nR.validateArray)(e))}};function G0(e,t,r=e.schema){let{gen:n,parentSchema:o,data:i,keyword:s,it:a}=e;p(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ta.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,H0._)`${i}.length`);r.forEach((l,d)=>{(0,Ta.alwaysValidSchema)(a,l)||(n.if((0,H0._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:h}=a,f=r.length,m=f===l.minItems&&(f===l.maxItems||l[t]===!1);if(d.strictTuples&&!m){let y=`"${s}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Ta.checkStrictMode)(a,y,d.strictTuples)}}}Ti.validateTuple=G0;Ti.default=oR});var K0=k(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var iR=ff(),sR={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,iR.validateTuple)(e,"items")};hf.default=sR});var J0=k(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var W0=H(),aR=ne(),cR=vt(),uR=df(),lR={message:({params:{len:e}})=>(0,W0.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,W0._)`{limit: ${e}}`},pR={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:lR,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,aR.alwaysValidSchema)(n,t)&&(o?(0,uR.validateAdditionalItems)(e,o):e.ok((0,cR.validateArray)(e)))}};mf.default=pR});var Y0=k(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});var bt=H(),$a=ne(),dR={message:({params:{min:e,max:t}})=>t===void 0?(0,bt.str)`must contain at least ${e} valid item(s)`:(0,bt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,bt._)`{minContains: ${e}}`:(0,bt._)`{minContains: ${e}, maxContains: ${t}}`},fR={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:dR,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e,s,a,{minContains:c,maxContains:u}=n;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let p=t.const("len",(0,bt._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,$a.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,$a.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,$a.alwaysValidSchema)(i,r)){let m=(0,bt._)`${p} >= ${s}`;a!==void 0&&(m=(0,bt._)`${m} && ${p} <= ${a}`),e.pass(m);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?h(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,bt._)`${o}.length > 0`,d)):(t.let(l,!1),d()),e.result(l,()=>e.reset());function d(){let m=t.name("_valid"),y=t.let("count",0);h(m,()=>t.if(m,()=>f(y)))}function h(m,y){t.forRange("i",0,p,v=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:$a.Type.Num,compositeRule:!0},m),y()})}function f(m){t.code((0,bt._)`${m}++`),a===void 0?t.if((0,bt._)`${m} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,bt._)`${m} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,bt._)`${m} >= ${s}`,()=>t.assign(l,!0)))}}};gf.default=fR});var ex=k(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.validateSchemaDeps=Bt.validatePropertyDeps=Bt.error=void 0;var yf=H(),hR=ne(),$i=vt();Bt.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,yf.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,yf._)`{property: ${e},
|
|
8
|
+
missingProperty: ${n},
|
|
9
|
+
depsCount: ${t},
|
|
10
|
+
deps: ${r}}`};var mR={keyword:"dependencies",type:"object",schemaType:"object",error:Bt.error,code(e){let[t,r]=gR(e);Q0(e,t),X0(e,r)}};function gR({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function Q0(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,$i.propertyInData)(r,n,s,o.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let u of a)(0,$i.checkReportMissingProp)(e,u)}):(r.if((0,yf._)`${c} && (${(0,$i.checkMissingProp)(e,a,i)})`),(0,$i.reportMissingProp)(e,i),r.else())}}Bt.validatePropertyDeps=Q0;function X0(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,hR.alwaysValidSchema)(i,t[a])||(r.if((0,$i.propertyInData)(r,n,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}Bt.validateSchemaDeps=X0;Bt.default=mR});var rx=k(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var tx=H(),yR=ne(),_R={message:"property name must be valid",params:({params:e})=>(0,tx._)`{propertyName: ${e.propertyName}}`},vR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:_R,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,yR.alwaysValidSchema)(o,r))return;let i=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,tx.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};_f.default=vR});var xf=k(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var Pa=vt(),Rt=H(),xR=nr(),Ea=ne(),bR={message:"must NOT have additional properties",params:({params:e})=>(0,Rt._)`{additionalProperty: ${e.additionalProperty}}`},kR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:bR,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Ea.alwaysValidSchema)(s,r))return;let u=(0,Pa.allSchemaProperties)(n.properties),p=(0,Pa.allSchemaProperties)(n.patternProperties);l(),e.ok((0,Rt._)`${i} === ${xR.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?f(y):t.if(d(y),()=>f(y))})}function d(y){let v;if(u.length>8){let _=(0,Ea.schemaRefOrVal)(s,n.properties,"properties");v=(0,Pa.isOwnProperty)(t,_,y)}else u.length?v=(0,Rt.or)(...u.map(_=>(0,Rt._)`${y} === ${_}`)):v=Rt.nil;return p.length&&(v=(0,Rt.or)(v,...p.map(_=>(0,Rt._)`${(0,Pa.usePattern)(e,_)}.test(${y})`))),(0,Rt.not)(v)}function h(y){t.code((0,Rt._)`delete ${o}[${y}]`)}function f(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Ea.alwaysValidSchema)(s,r)){let v=t.name("valid");c.removeAdditional==="failing"?(m(y,v,!1),t.if((0,Rt.not)(v),()=>{e.reset(),h(y)})):(m(y,v),a||t.if((0,Rt.not)(v),()=>t.break()))}}function m(y,v,_){let S={keyword:"additionalProperties",dataProp:y,dataPropType:Ea.Type.Str};_===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,v)}}};vf.default=kR});var ix=k(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var wR=di(),nx=vt(),bf=ne(),ox=xf(),SR={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ox.default.code(new wR.KeywordCxt(i,ox.default,"additionalProperties"));let s=(0,nx.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=bf.mergeEvaluated.props(t,(0,bf.toHash)(s),i.props));let a=s.filter(l=>!(0,bf.alwaysValidSchema)(i,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a)u(l)?p(l):(t.if((0,nx.propertyInData)(t,o,l,i.opts.ownProperties)),p(l),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(c);function u(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function p(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};kf.default=SR});var ux=k(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var sx=vt(),za=H(),ax=ne(),cx=ne(),TR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:i}=e,{opts:s}=i,a=(0,sx.allSchemaProperties)(r),c=a.filter(m=>(0,ax.alwaysValidSchema)(i,r[m]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=t.name("valid");i.props!==!0&&!(i.props instanceof za.Name)&&(i.props=(0,cx.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let m of a)u&&h(m),i.allErrors?f(m):(t.var(p,!0),f(m),t.if(p))}function h(m){for(let y in u)new RegExp(m).test(y)&&(0,ax.checkStrictMode)(i,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function f(m){t.forIn("key",n,y=>{t.if((0,za._)`${(0,sx.usePattern)(e,m)}.test(${y})`,()=>{let v=c.includes(m);v||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:cx.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,za._)`${l}[${y}]`,!0):!v&&!i.allErrors&&t.if((0,za.not)(p),()=>t.break())})})}}};wf.default=TR});var lx=k(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var $R=ne(),PR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,$R.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Sf.default=PR});var px=k(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var ER=vt(),zR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ER.validateUnion,error:{message:"must match a schema in anyOf"}};Tf.default=zR});var dx=k($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Ca=H(),CR=ne(),IR={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ca._)`{passingSchemas: ${e.passing}}`},RR={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IR,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((p,l)=>{let d;(0,CR.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,Ca._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Ca._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,Ca.Name)})})}}};$f.default=RR});var fx=k(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var OR=ne(),AR={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((i,s)=>{if((0,OR.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};Pf.default=AR});var gx=k(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Ia=H(),mx=ne(),NR={message:({params:e})=>(0,Ia.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Ia._)`{failingKeyword: ${e.ifClause}}`},jR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:NR,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,mx.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=hx(n,"then"),i=hx(n,"else");if(!o&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&i){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,u("then",p),u("else",p))}else o?t.if(a,u("then")):t.if((0,Ia.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function u(p,l){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),l?t.assign(l,(0,Ia._)`${p}`):e.setParams({ifClause:p})}}}};function hx(e,t){let r=e.schema[t];return r!==void 0&&!(0,mx.alwaysValidSchema)(e,r)}Ef.default=jR});var yx=k(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var MR=ne(),DR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,MR.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};zf.default=DR});var _x=k(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var LR=df(),ZR=K0(),qR=ff(),FR=J0(),UR=Y0(),BR=ex(),VR=rx(),HR=xf(),GR=ix(),KR=ux(),WR=lx(),JR=px(),YR=dx(),QR=fx(),XR=gx(),e4=yx();function t4(e=!1){let t=[WR.default,JR.default,YR.default,QR.default,XR.default,e4.default,VR.default,HR.default,BR.default,GR.default,KR.default];return e?t.push(ZR.default,FR.default):t.push(LR.default,qR.default),t.push(UR.default),t}Cf.default=t4});var vx=k(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var Se=H(),r4={message:({schemaCode:e})=>(0,Se.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Se._)`{format: ${e}}`},n4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r4,code(e,t){let{gen:r,data:n,$data:o,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:l}=a;if(!c.validateFormats)return;o?d():h();function d(){let f=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),m=r.const("fDef",(0,Se._)`${f}[${s}]`),y=r.let("fType"),v=r.let("format");r.if((0,Se._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Se._)`${m}.type || "string"`).assign(v,(0,Se._)`${m}.validate`),()=>r.assign(y,(0,Se._)`"string"`).assign(v,m)),e.fail$data((0,Se.or)(_(),S()));function _(){return c.strictSchema===!1?Se.nil:(0,Se._)`${s} && !${v}`}function S(){let $=p.$async?(0,Se._)`(${m}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,Se._)`${v}(${n})`,M=(0,Se._)`(typeof ${v} == "function" ? ${$} : ${v}.test(${n}))`;return(0,Se._)`${v} && ${v} !== true && ${y} === ${t} && !${M}`}}function h(){let f=l.formats[i];if(!f){_();return}if(f===!0)return;let[m,y,v]=S(f);m===t&&e.pass($());function _(){if(c.strictSchema===!1){l.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function S(M){let ve=M instanceof RegExp?(0,Se.regexpCode)(M):c.code.formats?(0,Se._)`${c.code.formats}${(0,Se.getProperty)(i)}`:void 0,pe=r.scopeValue("formats",{key:i,ref:M,code:ve});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,Se._)`${pe}.validate`]:["string",M,pe]}function $(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Se._)`await ${v}(${n})`}return typeof y=="function"?(0,Se._)`${v}(${n})`:(0,Se._)`${v}.test(${n})`}}}};If.default=n4});var xx=k(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var o4=vx(),i4=[o4.default];Rf.default=i4});var bx=k(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.contentVocabulary=no.metadataVocabulary=void 0;no.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];no.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var wx=k(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var s4=C0(),a4=B0(),c4=_x(),u4=xx(),kx=bx(),l4=[s4.default,a4.default,(0,c4.default)(),u4.default,kx.metadataVocabulary,kx.contentVocabulary];Of.default=l4});var Tx=k(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.DiscrError=void 0;var Sx;(function(e){e.Tag="tag",e.Mapping="mapping"})(Sx||(Ra.DiscrError=Sx={}))});var Px=k(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var oo=H(),Af=Tx(),$x=fa(),p4=fi(),d4=ne(),f4={message:({params:{discrError:e,tagName:t}})=>e===Af.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,oo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},h4={keyword:"discriminator",type:"object",schemaType:"object",error:f4,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:i}=e,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,oo._)`${r}${(0,oo.getProperty)(a)}`);t.if((0,oo._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:Af.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let h=d();t.if(!1);for(let f in h)t.elseIf((0,oo._)`${u} === ${f}`),t.assign(c,l(h[f]));t.else(),e.error(!1,{discrError:Af.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(h){let f=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},f);return e.mergeEvaluated(m,oo.Name),f}function d(){var h;let f={},m=v(o),y=!0;for(let $=0;$<s.length;$++){let M=s[$];if(M?.$ref&&!(0,d4.schemaHasRulesButRef)(M,i.self.RULES)){let pe=M.$ref;if(M=$x.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,pe),M instanceof $x.SchemaEnv&&(M=M.schema),M===void 0)throw new p4.default(i.opts.uriResolver,i.baseId,pe)}let ve=(h=M?.properties)===null||h===void 0?void 0:h[a];if(typeof ve!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||v(M)),_(ve,$)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return f;function v({required:$}){return Array.isArray($)&&$.includes(a)}function _($,M){if($.const)S($.const,M);else if($.enum)for(let ve of $.enum)S(ve,M);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S($,M){if(typeof $!="string"||$ in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[$]=M}}}};Nf.default=h4});var Ex=k((a8,m4)=>{m4.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 Mf=k((fe,jf)=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.MissingRefError=fe.ValidationError=fe.CodeGen=fe.Name=fe.nil=fe.stringify=fe.str=fe._=fe.KeywordCxt=fe.Ajv=void 0;var g4=S0(),y4=wx(),_4=Px(),zx=Ex(),v4=["/properties"],Oa="http://json-schema.org/draft-07/schema",io=class extends g4.default{_addVocabularies(){super._addVocabularies(),y4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(_4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(zx,v4):zx;this.addMetaSchema(t,Oa,!1),this.refs["http://json-schema.org/schema"]=Oa}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Oa)?Oa:void 0)}};fe.Ajv=io;jf.exports=fe=io;jf.exports.Ajv=io;Object.defineProperty(fe,"__esModule",{value:!0});fe.default=io;var x4=di();Object.defineProperty(fe,"KeywordCxt",{enumerable:!0,get:function(){return x4.KeywordCxt}});var so=H();Object.defineProperty(fe,"_",{enumerable:!0,get:function(){return so._}});Object.defineProperty(fe,"str",{enumerable:!0,get:function(){return so.str}});Object.defineProperty(fe,"stringify",{enumerable:!0,get:function(){return so.stringify}});Object.defineProperty(fe,"nil",{enumerable:!0,get:function(){return so.nil}});Object.defineProperty(fe,"Name",{enumerable:!0,get:function(){return so.Name}});Object.defineProperty(fe,"CodeGen",{enumerable:!0,get:function(){return so.CodeGen}});var b4=pa();Object.defineProperty(fe,"ValidationError",{enumerable:!0,get:function(){return b4.default}});var k4=fi();Object.defineProperty(fe,"MissingRefError",{enumerable:!0,get:function(){return k4.default}})});var Mx=k(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.formatNames=Ht.fastFormats=Ht.fullFormats=void 0;function Vt(e,t){return{validate:e,compare:t}}Ht.fullFormats={date:Vt(Ox,qf),time:Vt(Lf(!0),Ff),"date-time":Vt(Cx(!0),Nx),"iso-time":Vt(Lf(),Ax),"iso-date-time":Vt(Cx(),jx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E4,"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:N4,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:z4,int32:{type:"number",validate:R4},int64:{type:"number",validate:O4},float:{type:"number",validate:Rx},double:{type:"number",validate:Rx},password:!0,binary:!0};Ht.fastFormats={...Ht.fullFormats,date:Vt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,qf),time:Vt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ff),"date-time":Vt(/^\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,Nx),"iso-time":Vt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ax),"iso-date-time":Vt(/^\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,jx),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};Ht.formatNames=Object.keys(Ht.fullFormats);function w4(e){return e%4===0&&(e%100!==0||e%400===0)}var S4=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,T4=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ox(e){let t=S4.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&w4(r)?29:T4[n])}function qf(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Df=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Lf(e){return function(r){let n=Df.exec(r);if(!n)return!1;let o=+n[1],i=+n[2],s=+n[3],a=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),p=+(n[7]||0);if(u>23||p>59||e&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let l=i-p*c,d=o-u*c-(l<0?1:0);return(d===23||d===-1)&&(l===59||l===-1)&&s<61}}function Ff(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function Ax(e,t){if(!(e&&t))return;let r=Df.exec(e),n=Df.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Zf=/t|\s/i;function Cx(e){let t=Lf(e);return function(n){let o=n.split(Zf);return o.length===2&&Ox(o[0])&&t(o[1])}}function Nx(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function jx(e,t){if(!(e&&t))return;let[r,n]=e.split(Zf),[o,i]=t.split(Zf),s=qf(r,o);if(s!==void 0)return s||Ff(n,i)}var $4=/\/|:/,P4=/^(?:[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 E4(e){return $4.test(e)&&P4.test(e)}var Ix=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function z4(e){return Ix.lastIndex=0,Ix.test(e)}var C4=-(2**31),I4=2**31-1;function R4(e){return Number.isInteger(e)&&e<=I4&&e>=C4}function O4(e){return Number.isInteger(e)}function Rx(){return!0}var A4=/[^\\]\\Z/;function N4(e){if(A4.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Dx=k(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.formatLimitDefinition=void 0;var j4=Mf(),Ot=H(),Ir=Ot.operators,Aa={formatMaximum:{okStr:"<=",ok:Ir.LTE,fail:Ir.GT},formatMinimum:{okStr:">=",ok:Ir.GTE,fail:Ir.LT},formatExclusiveMaximum:{okStr:"<",ok:Ir.LT,fail:Ir.GTE},formatExclusiveMinimum:{okStr:">",ok:Ir.GT,fail:Ir.LTE}},M4={message:({keyword:e,schemaCode:t})=>(0,Ot.str)`should be ${Aa[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ot._)`{comparison: ${Aa[e].okStr}, limit: ${t}}`};ao.formatLimitDefinition={keyword:Object.keys(Aa),type:"string",schemaType:"string",$data:!0,error:M4,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new j4.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():p();function u(){let d=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=t.const("fmt",(0,Ot._)`${d}[${c.schemaCode}]`);e.fail$data((0,Ot.or)((0,Ot._)`typeof ${h} != "object"`,(0,Ot._)`${h} instanceof RegExp`,(0,Ot._)`typeof ${h}.compare != "function"`,l(h)))}function p(){let d=c.schema,h=a.formats[d];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let f=t.scopeValue("formats",{key:d,ref:h,code:s.code.formats?(0,Ot._)`${s.code.formats}${(0,Ot.getProperty)(d)}`:void 0});e.fail$data(l(f))}function l(d){return(0,Ot._)`${d}.compare(${r}, ${n}) ${Aa[o].fail} 0`}},dependencies:["format"]};var D4=e=>(e.addKeyword(ao.formatLimitDefinition),e);ao.default=D4});var Fx=k((Pi,qx)=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var co=Mx(),L4=Dx(),Uf=H(),Lx=new Uf.Name("fullFormats"),Z4=new Uf.Name("fastFormats"),Bf=(e,t={keywords:!0})=>{if(Array.isArray(t))return Zx(e,t,co.fullFormats,Lx),e;let[r,n]=t.mode==="fast"?[co.fastFormats,Z4]:[co.fullFormats,Lx],o=t.formats||co.formatNames;return Zx(e,o,r,n),t.keywords&&(0,L4.default)(e),e};Bf.get=(e,t="full")=>{let n=(t==="fast"?co.fastFormats:co.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Zx(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Uf._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}qx.exports=Pi=Bf;Object.defineProperty(Pi,"__esModule",{value:!0});Pi.default=Bf});var Je=k(ut=>{"use strict";ut.__esModule=!0;ut.extend=uk;ut.indexOf=TN;ut.escapeExpression=$N;ut.isEmpty=PN;ut.createFrame=EN;ut.blockParams=zN;ut.appendContextPath=CN;var bN={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},kN=/[&<>"'`=]/g,wN=/[&<>"'`=]/;function SN(e){return bN[e]}function uk(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var ph=Object.prototype.toString;ut.toString=ph;var lh=function(t){return typeof t=="function"};lh(/x/)&&(ut.isFunction=lh=function(e){return typeof e=="function"&&ph.call(e)==="[object Function]"});ut.isFunction=lh;var lk=Array.isArray||function(e){return e&&typeof e=="object"?ph.call(e)==="[object Array]":!1};ut.isArray=lk;function TN(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function $N(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return wN.test(e)?e.replace(kN,SN):e}function PN(e){return!e&&e!==0?!0:!!(lk(e)&&e.length===0)}function EN(e){var t=uk({},e);return t._parent=e,t}function zN(e,t){return e.path=t,e}function CN(e,t){return(e?e+".":"")+t}});var kt=k((Ja,pk)=>{"use strict";Ja.__esModule=!0;var dh=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function fh(e,t){var r=t&&t.loc,n=void 0,o=void 0,i=void 0,s=void 0;r&&(n=r.start.line,o=r.end.line,i=r.start.column,s=r.end.column,e+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,e),c=0;c<dh.length;c++)this[dh[c]]=a[dh[c]];Error.captureStackTrace&&Error.captureStackTrace(this,fh);try{r&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=i,this.endColumn=s))}catch{}}fh.prototype=new Error;Ja.default=fh;pk.exports=Ja.default});var fk=k((Ya,dk)=>{"use strict";Ya.__esModule=!0;var hh=Je();Ya.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,o=r.fn;if(t===!0)return o(this);if(t===!1||t==null)return n(this);if(hh.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var i=hh.createFrame(r.data);i.contextPath=hh.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};dk.exports=Ya.default});var mk=k((Qa,hk)=>{"use strict";Qa.__esModule=!0;function IN(e){return e&&e.__esModule?e:{default:e}}var Ni=Je(),RN=kt(),ON=IN(RN);Qa.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new ON.default("Must pass iterator to #each");var n=r.fn,o=r.inverse,i=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=Ni.appendContextPath(r.data.contextPath,r.ids[0])+"."),Ni.isFunction(t)&&(t=t.call(this)),r.data&&(a=Ni.createFrame(r.data));function u(f,m,y){a&&(a.key=f,a.index=m,a.first=m===0,a.last=!!y,c&&(a.contextPath=c+f)),s=s+n(t[f],{data:a,blockParams:Ni.blockParams([t[f],f],[c+f,null])})}if(t&&typeof t=="object")if(Ni.isArray(t))for(var p=t.length;i<p;i++)i in t&&u(i,i,i===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var l=[],d=t[Symbol.iterator](),h=d.next();!h.done;h=d.next())l.push(h.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var f=void 0;Object.keys(t).forEach(function(m){f!==void 0&&u(f,i-1),f=m,i++}),f!==void 0&&u(f,i-1,!0)})();return i===0&&(s=o(this)),s})};hk.exports=Qa.default});var yk=k((Xa,gk)=>{"use strict";Xa.__esModule=!0;function AN(e){return e&&e.__esModule?e:{default:e}}var NN=kt(),jN=AN(NN);Xa.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new jN.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};gk.exports=Xa.default});var bk=k((ec,xk)=>{"use strict";ec.__esModule=!0;function MN(e){return e&&e.__esModule?e:{default:e}}var _k=Je(),DN=kt(),vk=MN(DN);ec.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new vk.default("#if requires exactly one argument");return _k.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||_k.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new vk.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};xk.exports=ec.default});var wk=k((tc,kk)=>{"use strict";tc.__esModule=!0;tc.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var o=1;r.hash.level!=null?o=r.hash.level:r.data&&r.data.level!=null&&(o=r.data.level),t[0]=o,e.log.apply(e,t)})};kk.exports=tc.default});var Tk=k((rc,Sk)=>{"use strict";rc.__esModule=!0;rc.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Sk.exports=rc.default});var Pk=k((nc,$k)=>{"use strict";nc.__esModule=!0;function LN(e){return e&&e.__esModule?e:{default:e}}var ji=Je(),ZN=kt(),qN=LN(ZN);nc.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new qN.default("#with requires exactly one argument");ji.isFunction(t)&&(t=t.call(this));var n=r.fn;if(ji.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=ji.createFrame(r.data),o.contextPath=ji.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:ji.blockParams([t],[o&&o.contextPath])})})};$k.exports=nc.default});var mh=k(oc=>{"use strict";oc.__esModule=!0;oc.registerDefaultHelpers=rj;oc.moveHelperToHooks=nj;function kn(e){return e&&e.__esModule?e:{default:e}}var FN=fk(),UN=kn(FN),BN=mk(),VN=kn(BN),HN=yk(),GN=kn(HN),KN=bk(),WN=kn(KN),JN=wk(),YN=kn(JN),QN=Tk(),XN=kn(QN),ej=Pk(),tj=kn(ej);function rj(e){UN.default(e),VN.default(e),GN.default(e),WN.default(e),YN.default(e),XN.default(e),tj.default(e)}function nj(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var zk=k((ic,Ek)=>{"use strict";ic.__esModule=!0;var oj=Je();ic.default=function(e){e.registerDecorator("inline",function(t,r,n,o){var i=t;return r.partials||(r.partials={},i=function(s,a){var c=n.partials;n.partials=oj.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};Ek.exports=ic.default});var Ck=k(gh=>{"use strict";gh.__esModule=!0;gh.registerDefaultDecorators=cj;function ij(e){return e&&e.__esModule?e:{default:e}}var sj=zk(),aj=ij(sj);function cj(e){aj.default(e)}});var yh=k((sc,Ik)=>{"use strict";sc.__esModule=!0;var uj=Je(),ho={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=uj.indexOf(ho.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=ho.lookupLevel(t),typeof console<"u"&&ho.lookupLevel(ho.level)<=t){var r=ho.methodMap[t];console[r]||(r="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[r].apply(console,o)}}};sc.default=ho;Ik.exports=sc.default});var Rk=k(_h=>{"use strict";_h.__esModule=!0;_h.createNewLookupObject=pj;var lj=Je();function pj(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return lj.extend.apply(void 0,[Object.create(null)].concat(t))}});var vh=k(Mi=>{"use strict";Mi.__esModule=!0;Mi.createProtoAccessControl=mj;Mi.resultIsAllowed=gj;Mi.resetLoggedProperties=_j;function dj(e){return e&&e.__esModule?e:{default:e}}var Ok=Rk(),fj=yh(),hj=dj(fj),ac=Object.create(null);function mj(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:Ok.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Ok.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function gj(e,t,r){return Ak(typeof e=="function"?t.methods:t.properties,r)}function Ak(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(yj(t),!1)}function yj(e){ac[e]!==!0&&(ac[e]=!0,hj.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
|
|
11
|
+
You can add a runtime option to disable the check or this warning:
|
|
12
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function _j(){Object.keys(ac).forEach(function(e){delete ac[e]})}});var uc=k(Kt=>{"use strict";Kt.__esModule=!0;Kt.HandlebarsEnvironment=kh;function Nk(e){return e&&e.__esModule?e:{default:e}}var wn=Je(),vj=kt(),xh=Nk(vj),xj=mh(),bj=Ck(),kj=yh(),cc=Nk(kj),wj=vh(),Sj="4.7.8";Kt.VERSION=Sj;var Tj=8;Kt.COMPILER_REVISION=Tj;var $j=7;Kt.LAST_COMPATIBLE_COMPILER_REVISION=$j;var Pj={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Kt.REVISION_CHANGES=Pj;var bh="[object Object]";function kh(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},xj.registerDefaultHelpers(this),bj.registerDefaultDecorators(this)}kh.prototype={constructor:kh,logger:cc.default,log:cc.default.log,registerHelper:function(t,r){if(wn.toString.call(t)===bh){if(r)throw new xh.default("Arg not supported with multiple helpers");wn.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(wn.toString.call(t)===bh)wn.extend(this.partials,t);else{if(typeof r>"u")throw new xh.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(wn.toString.call(t)===bh){if(r)throw new xh.default("Arg not supported with multiple decorators");wn.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){wj.resetLoggedProperties()}};var Ej=cc.default.log;Kt.log=Ej;Kt.createFrame=wn.createFrame;Kt.logger=cc.default});var Mk=k((lc,jk)=>{"use strict";lc.__esModule=!0;function wh(e){this.string=e}wh.prototype.toString=wh.prototype.toHTML=function(){return""+this.string};lc.default=wh;jk.exports=lc.default});var Dk=k(Sh=>{"use strict";Sh.__esModule=!0;Sh.wrapHelper=zj;function zj(e,t){if(typeof e!="function")return e;var r=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return r}});var Uk=k(Nr=>{"use strict";Nr.__esModule=!0;Nr.checkRevision=Nj;Nr.template=jj;Nr.wrapProgram=pc;Nr.resolvePartial=Mj;Nr.invokePartial=Dj;Nr.noop=qk;function Cj(e){return e&&e.__esModule?e:{default:e}}function Ij(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var Rj=Je(),ar=Ij(Rj),Oj=kt(),cr=Cj(Oj),ur=uc(),Lk=mh(),Aj=Dk(),Zk=vh();function Nj(e){var t=e&&e[0]||1,r=ur.COMPILER_REVISION;if(!(t>=ur.LAST_COMPATIBLE_COMPILER_REVISION&&t<=ur.COMPILER_REVISION))if(t<ur.LAST_COMPATIBLE_COMPILER_REVISION){var n=ur.REVISION_CHANGES[r],o=ur.REVISION_CHANGES[t];throw new cr.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new cr.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function jj(e,t){if(!t)throw new cr.default("No environment passed to template");if(!e||!e.main)throw new cr.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=ar.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=ar.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),p=t.VM.invokePartial.call(this,s,a,u);if(p==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),p=c.partials[c.name](a,u)),p!=null){if(c.indent){for(var l=p.split(`
|
|
13
|
+
`),d=0,h=l.length;d<h&&!(!l[d]&&d+1===h);d++)l[d]=c.indent+l[d];p=l.join(`
|
|
14
|
+
`)}return p}else throw new cr.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(a,c,u){if(!a||!(c in a))throw new cr.default('"'+c+'" not defined in '+a,{loc:u});return o.lookupProperty(a,c)},lookupProperty:function(a,c){var u=a[c];if(u==null||Object.prototype.hasOwnProperty.call(a,c)||Zk.resultIsAllowed(u,o.protoAccessControl,c))return u},lookup:function(a,c){for(var u=a.length,p=0;p<u;p++){var l=a[p]&&o.lookupProperty(a[p],c);if(l!=null)return a[p][c]}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:ar.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,u,p,l){var d=this.programs[a],h=this.fn(a);return c||l||p||u?d=pc(this,a,h,c,u,p,l):d||(d=this.programs[a]=pc(this,a,h)),d},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var u=a||c;return a&&c&&a!==c&&(u=ar.extend({},c,a)),u},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function i(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;i._setup(a),!a.partial&&e.useData&&(c=Lj(s,c));var u=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function l(d){return""+e.main(o,d,o.helpers,o.partials,c,p,u)}return l=Fk(e.main,l,o,a.depths||[],c,p),l(s,a)}return i.isTop=!0,i._setup=function(s){if(s.partial)o.protoAccessControl=s.protoAccessControl,o.helpers=s.helpers,o.partials=s.partials,o.decorators=s.decorators,o.hooks=s.hooks;else{var a=ar.extend({},t.helpers,s.helpers);Zj(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=ar.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=Zk.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Lk.moveHelperToHooks(o,"helperMissing",c),Lk.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new cr.default("must pass block params");if(e.useDepths&&!u)throw new cr.default("must pass parent depths");return pc(o,s,e[s],a,0,c,u)},i}function pc(e,t,r,n,o,i,s){function a(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,u.data||n,i&&[u.blockParams].concat(i),p)}return a=Fk(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function Mj(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}function Dj(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==qk&&(function(){r.data=ur.createFrame(r.data);var i=r.fn;o=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=ur.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=ar.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new cr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function qk(){return""}function Lj(e,t){return(!t||!("root"in t))&&(t=t?ur.createFrame(t):{},t.root=e),t}function Fk(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),ar.extend(t,s)}return t}function Zj(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=qj(n,t)})}function qj(e,t){var r=t.lookupProperty;return Aj.wrapHelper(e,function(n){return ar.extend({lookupProperty:r},n)})}});var Th=k((dc,Bk)=>{"use strict";dc.__esModule=!0;dc.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};Bk.exports=dc.default});var Wk=k((fc,Kk)=>{"use strict";fc.__esModule=!0;function Ph(e){return e&&e.__esModule?e:{default:e}}function Eh(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var Fj=uc(),Vk=Eh(Fj),Uj=Mk(),Bj=Ph(Uj),Vj=kt(),Hj=Ph(Vj),Gj=Je(),$h=Eh(Gj),Kj=Uk(),Hk=Eh(Kj),Wj=Th(),Jj=Ph(Wj);function Gk(){var e=new Vk.HandlebarsEnvironment;return $h.extend(e,Vk),e.SafeString=Bj.default,e.Exception=Hj.default,e.Utils=$h,e.escapeExpression=$h.escapeExpression,e.VM=Hk,e.template=function(t){return Hk.template(t,e)},e}var Di=Gk();Di.create=Gk;Jj.default(Di);Di.default=Di;fc.default=Di;Kk.exports=fc.default});var zh=k((hc,Yk)=>{"use strict";hc.__esModule=!0;var Jk={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!Jk.helpers.scopedId(t)&&!t.depth}}};hc.default=Jk;Yk.exports=hc.default});var Xk=k((mc,Qk)=>{"use strict";mc.__esModule=!0;var Yj=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,i,s,a,c,u,p){var l=u.length-1;switch(c){case 1:return u[l-1];case 2:this.$=a.prepareProgram(u[l]);break;case 3:this.$=u[l];break;case 4:this.$=u[l];break;case 5:this.$=u[l];break;case 6:this.$=u[l];break;case 7:this.$=u[l];break;case 8:this.$=u[l];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[l]),strip:a.stripFlags(u[l],u[l]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[l],value:u[l],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[l-2],u[l-1],u[l],this._$);break;case 12:this.$={path:u[l-3],params:u[l-2],hash:u[l-1]};break;case 13:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!1,this._$);break;case 14:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!0,this._$);break;case 15:this.$={open:u[l-5],path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 16:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 17:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 18:this.$={strip:a.stripFlags(u[l-1],u[l-1]),program:u[l]};break;case 19:var d=a.prepareBlock(u[l-2],u[l-1],u[l],u[l],!1,this._$),h=a.prepareProgram([d],u[l-1].loc);h.chained=!0,this.$={strip:u[l-2].strip,program:h,chain:!0};break;case 20:this.$=u[l];break;case 21:this.$={path:u[l-1],strip:a.stripFlags(u[l-2],u[l])};break;case 22:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 23:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[l-3],params:u[l-2],hash:u[l-1],indent:"",strip:a.stripFlags(u[l-4],u[l]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[l-2],u[l-1],u[l],this._$);break;case 26:this.$={path:u[l-3],params:u[l-2],hash:u[l-1],strip:a.stripFlags(u[l-4],u[l])};break;case 27:this.$=u[l];break;case 28:this.$=u[l];break;case 29:this.$={type:"SubExpression",path:u[l-3],params:u[l-2],hash:u[l-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[l],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[l-2]),value:u[l],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[l-1]);break;case 33:this.$=u[l];break;case 34:this.$=u[l];break;case 35:this.$={type:"StringLiteral",value:u[l],original:u[l],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[l]),original:Number(u[l]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[l]==="true",original:u[l]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[l];break;case 41:this.$=u[l];break;case 42:this.$=a.preparePath(!0,u[l],this._$);break;case 43:this.$=a.preparePath(!1,u[l],this._$);break;case 44:u[l-2].push({part:a.id(u[l]),original:u[l],separator:u[l-1]}),this.$=u[l-2];break;case 45:this.$=[{part:a.id(u[l]),original:u[l]}];break;case 46:this.$=[];break;case 47:u[l-1].push(u[l]);break;case 48:this.$=[];break;case 49:u[l-1].push(u[l]);break;case 50:this.$=[];break;case 51:u[l-1].push(u[l]);break;case 58:this.$=[];break;case 59:u[l-1].push(u[l]);break;case 64:this.$=[];break;case 65:u[l-1].push(u[l]);break;case 70:this.$=[];break;case 71:u[l-1].push(u[l]);break;case 78:this.$=[];break;case 79:u[l-1].push(u[l]);break;case 82:this.$=[];break;case 83:u[l-1].push(u[l]);break;case 86:this.$=[];break;case 87:u[l-1].push(u[l]);break;case 90:this.$=[];break;case 91:u[l-1].push(u[l]);break;case 94:this.$=[];break;case 95:u[l-1].push(u[l]);break;case 98:this.$=[u[l]];break;case 99:u[l-1].push(u[l]);break;case 100:this.$=[u[l]];break;case 101:u[l-1].push(u[l]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,i){throw new Error(o)},parse:function(o){var i=this,s=[0],a=[null],c=[],u=this.table,p="",l=0,d=0,h=0,f=2,m=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var y=this.lexer.yylloc;c.push(y);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function _(jt){s.length=s.length-2*jt,a.length=a.length-jt,c.length=c.length-jt}function S(){var jt;return jt=i.lexer.lex()||1,typeof jt!="number"&&(jt=i.symbols_[jt]||jt),jt}for(var $,M,ve,pe,Dr,Lr,pt={},fr,dt,To,zn;;){if(ve=s[s.length-1],this.defaultActions[ve]?pe=this.defaultActions[ve]:(($===null||typeof $>"u")&&($=S()),pe=u[ve]&&u[ve][$]),typeof pe>"u"||!pe.length||!pe[0]){var du="";if(!h){zn=[];for(fr in u[ve])this.terminals_[fr]&&fr>2&&zn.push("'"+this.terminals_[fr]+"'");this.lexer.showPosition?du="Parse error on line "+(l+1)+`:
|
|
15
|
+
`+this.lexer.showPosition()+`
|
|
16
|
+
Expecting `+zn.join(", ")+", got '"+(this.terminals_[$]||$)+"'":du="Parse error on line "+(l+1)+": Unexpected "+($==1?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(du,{text:this.lexer.match,token:this.terminals_[$]||$,line:this.lexer.yylineno,loc:y,expected:zn})}}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ve+", token: "+$);switch(pe[0]){case 1:s.push($),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(pe[1]),$=null,M?($=M,M=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,h>0&&h--);break;case 2:if(dt=this.productions_[pe[1]][1],pt.$=a[a.length-dt],pt._$={first_line:c[c.length-(dt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(dt||1)].first_column,last_column:c[c.length-1].last_column},v&&(pt._$.range=[c[c.length-(dt||1)].range[0],c[c.length-1].range[1]]),Lr=this.performAction.call(pt,p,d,l,this.yy,pe[1],a,c),typeof Lr<"u")return Lr;dt&&(s=s.slice(0,-1*dt*2),a=a.slice(0,-1*dt),c=c.slice(0,-1*dt)),s.push(this.productions_[pe[1]][0]),a.push(pt.$),c.push(pt._$),To=u[s[s.length-2]][s[s.length-1]],s.push(To);break;case 3:return!0}}return!0}},t=(function(){var n={EOF:1,parseError:function(i,s){if(this.yy.parser)this.yy.parser.parseError(i,s);else throw new Error(i)},setInput:function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var s=i.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var s=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),s=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
17
|
+
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,s,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),d=0;d<l.length&&(a=this._input.match(this.rules[l[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
18
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return typeof i<"u"?i:this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(i){this.begin(i)}};return n.options={},n.performAction=function(i,s,a,c){function u(l,d){return s.yytext=s.yytext.substring(l,s.yyleng-d+l)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();mc.default=Yj;Qk.exports=mc.default});var vc=k((_c,rw)=>{"use strict";_c.__esModule=!0;function Qj(e){return e&&e.__esModule?e:{default:e}}var Xj=kt(),Ch=Qj(Xj);function gc(){this.parents=[]}gc.prototype={constructor:gc,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!gc.prototype[n.type])throw new Ch.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new Ch.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new Ch.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:yc,Decorator:yc,BlockStatement:ew,DecoratorBlock:ew,PartialStatement:tw,PartialBlockStatement:function(t){tw.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yc,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function yc(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function ew(e){yc.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function tw(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}_c.default=gc;rw.exports=_c.default});var ow=k((xc,nw)=>{"use strict";xc.__esModule=!0;function e3(e){return e&&e.__esModule?e:{default:e}}var t3=vc(),r3=e3(t3);function Wt(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}Wt.prototype=new r3.default;Wt.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,o=0,i=n.length;o<i;o++){var s=n[o],a=this.accept(s);if(a){var c=Ih(n,o,r),u=Rh(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&Sn(n,o,!0),a.open&&jr(n,o,!0),t&&d&&(Sn(n,o),jr(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(Sn((s.program||s.inverse).body),jr(n,o)),t&&l&&(Sn(n,o),jr((s.inverse||s.program).body))}}return e};Wt.prototype.BlockStatement=Wt.prototype.DecoratorBlock=Wt.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,o=r;if(r&&r.chained)for(n=r.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:Rh(t.body),closeStandalone:Ih((n||t).body)};if(e.openStrip.close&&Sn(t.body,null,!0),r){var s=e.inverseStrip;s.open&&jr(t.body,null,!0),s.close&&Sn(n.body,null,!0),e.closeStrip.open&&jr(o.body,null,!0),!this.options.ignoreStandalone&&Ih(t.body)&&Rh(n.body)&&(jr(t.body),Sn(n.body))}else e.closeStrip.open&&jr(t.body,null,!0);return i};Wt.prototype.Decorator=Wt.prototype.MustacheStatement=function(e){return e.strip};Wt.prototype.PartialStatement=Wt.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function Ih(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],o=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Rh(e,t,r){t===void 0&&(t=-1);var n=e[t+1],o=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Sn(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var o=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==o}}function jr(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var o=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==o,n.leftStripped}}xc.default=Wt;nw.exports=xc.default});var iw=k(wt=>{"use strict";wt.__esModule=!0;wt.SourceLocation=i3;wt.id=s3;wt.stripFlags=a3;wt.stripComment=c3;wt.preparePath=u3;wt.prepareMustache=l3;wt.prepareRawBlock=p3;wt.prepareBlock=d3;wt.prepareProgram=f3;wt.preparePartialBlock=h3;function n3(e){return e&&e.__esModule?e:{default:e}}var o3=kt(),Oh=n3(o3);function Ah(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Oh.default(e.path.original+" doesn't match "+t,r)}}function i3(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function s3(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function a3(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function c3(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function u3(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",o=[],i=0,s=0,a=t.length;s<a;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,!u&&(c===".."||c==="."||c==="this")){if(o.length>0)throw new Oh.default("Invalid path: "+n,{loc:r});c===".."&&i++}else o.push(c)}return{type:"PathExpression",data:e,depth:i,parts:o,original:n,loc:r}}function l3(e,t,r,n,o,i){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:o,loc:this.locInfo(i)}}function p3(e,t,r,n){Ah(e,r),n=this.locInfo(n);var o={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function d3(e,t,r,n,o,i){n&&n.path&&Ah(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Oh.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return o&&(o=a,a=t,t=o),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function f3(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function h3(e,t,r,n){return Ah(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var cw=k(Li=>{"use strict";Li.__esModule=!0;Li.parseWithoutProcessing=aw;Li.parse=k3;function m3(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function sw(e){return e&&e.__esModule?e:{default:e}}var g3=Xk(),Nh=sw(g3),y3=ow(),_3=sw(y3),v3=iw(),x3=m3(v3),b3=Je();Li.parser=Nh.default;var bc={};b3.extend(bc,x3);function aw(e,t){if(e.type==="Program")return e;Nh.default.yy=bc,bc.locInfo=function(n){return new bc.SourceLocation(t&&t.srcName,n)};var r=Nh.default.parse(e);return r}function k3(e,t){var r=aw(e,t),n=new _3.default(t);return n.accept(r)}});var dw=k(Ui=>{"use strict";Ui.__esModule=!0;Ui.Compiler=jh;Ui.precompile=$3;Ui.compile=P3;function lw(e){return e&&e.__esModule?e:{default:e}}var w3=kt(),qi=lw(w3),Fi=Je(),S3=zh(),Zi=lw(S3),T3=[].slice;function jh(){}jh.prototype={compiler:jh,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var o=this.opcodes[n],i=t.opcodes[n];if(o.opcode!==i.opcode||!pw(o.args,i.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Fi.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[o]=n,this.useDepths=this.useDepths||n.useDepths,o},accept:function(t){if(!this[t.type])throw new qi.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,o=0;o<n;o++)this.accept(r[o]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){uw(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var o=this.classifySexpr(t);o==="helper"?this.helperSexpr(t,r,n):o==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,o.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new qi.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,i=t.name.type==="SubExpression";i&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",i,o,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){uw(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var o=t.path,i=o.parts[0],s=r!=null||n!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",i,s)},simpleSexpr:function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var o=this.setupFullMustacheParams(t,r,n),i=t.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",o.length,s);else{if(this.options.knownHelpersOnly)throw new qi.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",o.length,i.original,Zi.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=Zi.default.helpers.scopedId(t),o=!t.depth&&!n&&this.blockParamIndex(r);o?this.opcode("lookupBlockParam",o,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.pairs,n=0,o=r.length;for(this.opcode("pushHash");n<o;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:T3.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=Zi.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&Zi.default.helpers.helperExpression(t),i=!n&&(o||r);if(i&&!o){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?o=!0:a.knownHelpersOnly&&(i=!1)}return o?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!Zi.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,o)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,o){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),i},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var o=this.options.blockParams[r],i=o&&Fi.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function $3(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new qi.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),o=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(o,t)}function P3(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new qi.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=Fi.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function o(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}function i(s,a){return n||(n=o()),n.call(this,s,a)}return i._setup=function(s){return n||(n=o()),n._setup(s)},i._child=function(s,a,c,u){return n||(n=o()),n._child(s,a,c,u)},i}function pw(e,t){if(e===t)return!0;if(Fi.isArray(e)&&Fi.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!pw(e[r],t[r]))return!1;return!0}}function uw(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var hw=k(Mh=>{var fw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Mh.encode=function(e){if(0<=e&&e<fw.length)return fw[e];throw new TypeError("Must be between 0 and 63: "+e)};Mh.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,a=43,c=47,u=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+u:i<=e&&e<=s?e-i+p:e==a?62:e==c?63:-1}});var Zh=k(Lh=>{var mw=hw(),Dh=5,gw=1<<Dh,yw=gw-1,_w=gw;function E3(e){return e<0?(-e<<1)+1:(e<<1)+0}function z3(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Lh.encode=function(t){var r="",n,o=E3(t);do n=o&yw,o>>>=Dh,o>0&&(n|=_w),r+=mw.encode(n);while(o>0);return r};Lh.decode=function(t,r,n){var o=t.length,i=0,s=0,a,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=mw.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&_w),c&=yw,i=i+(c<<s),s+=Dh}while(a);n.value=z3(i),n.rest=r}});var yo=k(Be=>{function C3(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Be.getArg=C3;var vw=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,I3=/^data:.+\,.+$/;function Bi(e){var t=e.match(vw);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Be.urlParse=Bi;function mo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Be.urlGenerate=mo;function qh(e){var t=e,r=Bi(e);if(r){if(!r.path)return e;t=r.path}for(var n=Be.isAbsolute(t),o=t.split(/\/+/),i,s=0,a=o.length-1;a>=0;a--)i=o[a],i==="."?o.splice(a,1):i===".."?s++:s>0&&(i===""?(o.splice(a+1,s),s=0):(o.splice(a,2),s--));return t=o.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,mo(r)):t}Be.normalize=qh;function xw(e,t){e===""&&(e="."),t===""&&(t=".");var r=Bi(t),n=Bi(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),mo(r);if(r||t.match(I3))return t;if(n&&!n.host&&!n.path)return n.host=t,mo(n);var o=t.charAt(0)==="/"?t:qh(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,mo(n)):o}Be.join=xw;Be.isAbsolute=function(e){return e.charAt(0)==="/"||vw.test(e)};function R3(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Be.relative=R3;var bw=(function(){var e=Object.create(null);return!("__proto__"in e)})();function kw(e){return e}function O3(e){return ww(e)?"$"+e:e}Be.toSetString=bw?kw:O3;function A3(e){return ww(e)?e.slice(1):e}Be.fromSetString=bw?kw:A3;function ww(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function N3(e,t,r){var n=go(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:go(e.name,t.name)}Be.compareByOriginalPositions=N3;function j3(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=go(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:go(e.name,t.name)}Be.compareByGeneratedPositionsDeflated=j3;function go(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function M3(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=go(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:go(e.name,t.name)}Be.compareByGeneratedPositionsInflated=M3;function D3(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Be.parseSourceMapInput=D3;function L3(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Bi(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=xw(mo(n),t)}return qh(t)}Be.computeSourceURL=L3});var Bh=k(Sw=>{var Fh=yo(),Uh=Object.prototype.hasOwnProperty,Tn=typeof Map<"u";function lr(){this._array=[],this._set=Tn?new Map:Object.create(null)}lr.fromArray=function(t,r){for(var n=new lr,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};lr.prototype.size=function(){return Tn?this._set.size:Object.getOwnPropertyNames(this._set).length};lr.prototype.add=function(t,r){var n=Tn?t:Fh.toSetString(t),o=Tn?this.has(t):Uh.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(Tn?this._set.set(t,i):this._set[n]=i)};lr.prototype.has=function(t){if(Tn)return this._set.has(t);var r=Fh.toSetString(t);return Uh.call(this._set,r)};lr.prototype.indexOf=function(t){if(Tn){var r=this._set.get(t);if(r>=0)return r}else{var n=Fh.toSetString(t);if(Uh.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};lr.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};lr.prototype.toArray=function(){return this._array.slice()};Sw.ArraySet=lr});var Pw=k($w=>{var Tw=yo();function Z3(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||Tw.compareByGeneratedPositionsInflated(e,t)<=0}function kc(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}kc.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};kc.prototype.add=function(t){Z3(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};kc.prototype.toArray=function(){return this._sorted||(this._array.sort(Tw.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};$w.MappingList=kc});var Vh=k(Ew=>{var Vi=Zh(),$e=yo(),wc=Bh().ArraySet,q3=Pw().MappingList;function St(e){e||(e={}),this._file=$e.getArg(e,"file",null),this._sourceRoot=$e.getArg(e,"sourceRoot",null),this._skipValidation=$e.getArg(e,"skipValidation",!1),this._sources=new wc,this._names=new wc,this._mappings=new q3,this._sourcesContents=null}St.prototype._version=3;St.fromSourceMap=function(t){var r=t.sourceRoot,n=new St({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=$e.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=$e.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};St.prototype.addMapping=function(t){var r=$e.getArg(t,"generated"),n=$e.getArg(t,"original",null),o=$e.getArg(t,"source",null),i=$e.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};St.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=$e.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[$e.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[$e.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};St.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=$e.relative(i,o));var s=new wc,a=new wc;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=$e.join(n,c.source)),i!=null&&(c.source=$e.relative(i,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var l=c.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=$e.join(n,c)),i!=null&&(c=$e.relative(i,c)),this.setSourceContent(c,u))},this)};St.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};St.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,a="",c,u,p,l,d=this._mappings.toArray(),h=0,f=d.length;h<f;h++){if(u=d[h],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!$e.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Vi.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Vi.encode(l-s),s=l,c+=Vi.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Vi.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Vi.encode(p-i),i=p)),a+=c}return a};St.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=$e.relative(r,n));var o=$e.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};St.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};St.prototype.toString=function(){return JSON.stringify(this.toJSON())};Ew.SourceMapGenerator=St});var zw=k($n=>{$n.GREATEST_LOWER_BOUND=1;$n.LEAST_UPPER_BOUND=2;function Hh(e,t,r,n,o,i){var s=Math.floor((t-e)/2)+e,a=o(r,n[s],!0);return a===0?s:a>0?t-s>1?Hh(s,t,r,n,o,i):i==$n.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?Hh(e,s,r,n,o,i):i==$n.LEAST_UPPER_BOUND?s:e<0?-1:e}$n.search=function(t,r,n,o){if(r.length===0)return-1;var i=Hh(-1,r.length,t,r,n,o||$n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var Iw=k(Cw=>{function Gh(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function F3(e,t){return Math.round(e+Math.random()*(t-e))}function Kh(e,t,r,n){if(r<n){var o=F3(r,n),i=r-1;Gh(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,Gh(e,i,a));Gh(e,i+1,a);var c=i+1;Kh(e,t,r,c-1),Kh(e,t,c+1,n)}}Cw.quickSort=function(e,t){Kh(e,t,0,e.length-1)}});var Ow=k(Sc=>{var C=yo(),Wh=zw(),_o=Bh().ArraySet,U3=Zh(),Hi=Iw().quickSort;function he(e,t){var r=e;return typeof e=="string"&&(r=C.parseSourceMapInput(e)),r.sections!=null?new At(r,t):new De(r,t)}he.fromSourceMap=function(e,t){return De.fromSourceMap(e,t)};he.prototype._version=3;he.prototype.__generatedMappings=null;Object.defineProperty(he.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});he.prototype.__originalMappings=null;Object.defineProperty(he.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});he.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};he.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};he.GENERATED_ORDER=1;he.ORIGINAL_ORDER=2;he.GREATEST_LOWER_BOUND=1;he.LEAST_UPPER_BOUND=2;he.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||he.GENERATED_ORDER,s;switch(i){case he.GENERATED_ORDER:s=this._generatedMappings;break;case he.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=C.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,o)};he.prototype.allGeneratedPositionsFor=function(t){var r=C.getArg(t,"line"),n={source:C.getArg(t,"source"),originalLine:r,originalColumn:C.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",C.compareByOriginalPositions,Wh.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)o.push({line:C.getArg(s,"generatedLine",null),column:C.getArg(s,"generatedColumn",null),lastColumn:C.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:C.getArg(s,"generatedLine",null),column:C.getArg(s,"generatedColumn",null),lastColumn:C.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};Sc.SourceMapConsumer=he;function De(e,t){var r=e;typeof e=="string"&&(r=C.parseSourceMapInput(e));var n=C.getArg(r,"version"),o=C.getArg(r,"sources"),i=C.getArg(r,"names",[]),s=C.getArg(r,"sourceRoot",null),a=C.getArg(r,"sourcesContent",null),c=C.getArg(r,"mappings"),u=C.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=C.normalize(s)),o=o.map(String).map(C.normalize).map(function(p){return s&&C.isAbsolute(s)&&C.isAbsolute(p)?C.relative(s,p):p}),this._names=_o.fromArray(i.map(String),!0),this._sources=_o.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return C.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}De.prototype=Object.create(he.prototype);De.prototype.consumer=he;De.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=C.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};De.fromSourceMap=function(t,r){var n=Object.create(De.prototype),o=n._names=_o.fromArray(t._names.toArray(),!0),i=n._sources=_o.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return C.computeSourceURL(n.sourceRoot,h,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,p=s.length;u<p;u++){var l=s[u],d=new Rw;d.generatedLine=l.generatedLine,d.generatedColumn=l.generatedColumn,l.source&&(d.source=i.indexOf(l.source),d.originalLine=l.originalLine,d.originalColumn=l.originalColumn,l.name&&(d.name=o.indexOf(l.name)),c.push(d)),a.push(d)}return Hi(n.__originalMappings,C.compareByOriginalPositions),n};De.prototype._version=3;Object.defineProperty(De.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Rw(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}De.prototype._parseMappings=function(t,r){for(var n=1,o=0,i=0,s=0,a=0,c=0,u=t.length,p=0,l={},d={},h=[],f=[],m,y,v,_,S;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(m=new Rw,m.generatedLine=n,_=p;_<u&&!this._charIsMappingSeparator(t,_);_++);if(y=t.slice(p,_),v=l[y],v)p+=y.length;else{for(v=[];p<_;)U3.decode(t,p,d),S=d.value,p=d.rest,v.push(S);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");l[y]=v}m.generatedColumn=o+v[0],o=m.generatedColumn,v.length>1&&(m.source=a+v[1],a+=v[1],m.originalLine=i+v[2],i=m.originalLine,m.originalLine+=1,m.originalColumn=s+v[3],s=m.originalColumn,v.length>4&&(m.name=c+v[4],c+=v[4])),f.push(m),typeof m.originalLine=="number"&&h.push(m)}Hi(f,C.compareByGeneratedPositionsDeflated),this.__generatedMappings=f,Hi(h,C.compareByOriginalPositions),this.__originalMappings=h};De.prototype._findMapping=function(t,r,n,o,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return Wh.search(t,r,i,s)};De.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};De.prototype.originalPositionFor=function(t){var r={generatedLine:C.getArg(t,"line"),generatedColumn:C.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",C.compareByGeneratedPositionsDeflated,C.getArg(t,"bias",he.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=C.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=C.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=C.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:C.getArg(o,"originalLine",null),column:C.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};De.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};De.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var o=t;this.sourceRoot!=null&&(o=C.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=C.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||i.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')};De.prototype.generatedPositionFor=function(t){var r=C.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:C.getArg(t,"line"),originalColumn:C.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",C.compareByOriginalPositions,C.getArg(t,"bias",he.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:C.getArg(i,"generatedLine",null),column:C.getArg(i,"generatedColumn",null),lastColumn:C.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Sc.BasicSourceMapConsumer=De;function At(e,t){var r=e;typeof e=="string"&&(r=C.parseSourceMapInput(e));var n=C.getArg(r,"version"),o=C.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new _o,this._names=new _o;var i={line:-1,column:0};this._sections=o.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=C.getArg(s,"offset"),c=C.getArg(a,"line"),u=C.getArg(a,"column");if(c<i.line||c===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new he(C.getArg(s,"map"),t)}})}At.prototype=Object.create(he.prototype);At.prototype.constructor=he;At.prototype._version=3;Object.defineProperty(At.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});At.prototype.originalPositionFor=function(t){var r={generatedLine:C.getArg(t,"line"),generatedColumn:C.getArg(t,"column")},n=Wh.search(r,this._sections,function(i,s){var a=i.generatedLine-s.generatedOffset.generatedLine;return a||i.generatedColumn-s.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};At.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};At.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var o=this._sections[n],i=o.consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};At.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(C.getArg(t,"source"))!==-1){var o=n.consumer.generatedPositionFor(t);if(o){var i={line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};At.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],c=o.consumer._sources.at(a.source);c=C.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=o.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var p={source:c,generatedLine:a.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(o.generatedOffset.generatedLine===a.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}Hi(this.__generatedMappings,C.compareByGeneratedPositionsDeflated),Hi(this.__originalMappings,C.compareByOriginalPositions)};Sc.IndexedSourceMapConsumer=At});var Nw=k(Aw=>{var B3=Vh().SourceMapGenerator,Tc=yo(),V3=/(\r?\n)/,H3=10,vo="$$$isSourceNode$$$";function lt(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=o??null,this[vo]=!0,n!=null&&this.add(n)}lt.fromStringWithSourceMap=function(t,r,n){var o=new lt,i=t.split(V3),s=0,a=function(){var d=f(),h=f()||"";return d+h;function f(){return s<i.length?i[s++]:void 0}},c=1,u=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)l(p,a()),c++,u=0;else{var h=i[s]||"",f=h.substr(0,d.generatedColumn-u);i[s]=h.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,f),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var h=i[s]||"";o.add(h.substr(0,d.generatedColumn)),i[s]=h.substr(d.generatedColumn),u=d.generatedColumn}p=d},this),s<i.length&&(p&&l(p,a()),o.add(i.splice(s).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=Tc.join(n,d)),o.setSourceContent(d,h))}),o;function l(d,h){if(d===null||d.source===void 0)o.add(h);else{var f=n?Tc.join(n,d.source):d.source;o.add(new lt(d.originalLine,d.originalColumn,f,h,d.name))}}};lt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[vo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};lt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[vo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};lt.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[vo]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};lt.prototype.join=function(t){var r,n,o=this.children.length;if(o>0){for(r=[],n=0;n<o-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};lt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[vo]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};lt.prototype.setSourceContent=function(t,r){this.sourceContents[Tc.toSetString(t)]=r};lt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][vo]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t(Tc.fromSetString(o[r]),this.sourceContents[o[r]])};lt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};lt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new B3(t),o=!1,i=null,s=null,a=null,c=null;return this.walk(function(u,p){r.code+=u,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),i=p.source,s=p.line,a=p.column,c=p.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var l=0,d=u.length;l<d;l++)u.charCodeAt(l)===H3?(r.line++,r.column=0,l+1===d?(i=null,o=!1):o&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(u,p){n.setSourceContent(u,p)}),{code:r.code,map:n}};Aw.SourceNode=lt});var jw=k($c=>{$c.SourceMapGenerator=Vh().SourceMapGenerator;$c.SourceMapConsumer=Ow().SourceMapConsumer;$c.SourceNode=Nw().SourceNode});var Zw=k((Pc,Lw)=>{"use strict";Pc.__esModule=!0;var Yh=Je(),Pn=void 0;try{(typeof define!="function"||!define.amd)&&(Mw=jw(),Pn=Mw.SourceNode)}catch{}var Mw;Pn||(Pn=function(e,t,r,n){this.src="",n&&this.add(n)},Pn.prototype={add:function(t){Yh.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){Yh.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Jh(e,t,r){if(Yh.isArray(e)){for(var n=[],o=0,i=e.length;o<i;o++)n.push(t.wrap(e[o],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function Dw(e){this.srcFile=e,this.source=[]}Dw.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
|
|
19
|
+
`])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new Pn(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Pn?t:(t=Jh(t,this,r),new Pn(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(i){var s=Jh(t[i],r);s!=="undefined"&&n.push([r.quotedString(i),":",s])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var r=this.empty(),n=0,o=t.length;n<o;n++)n&&r.add(","),r.add(Jh(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};Pc.default=Dw;Lw.exports=Pc.default});var Vw=k((Ec,Bw)=>{"use strict";Ec.__esModule=!0;function Uw(e){return e&&e.__esModule?e:{default:e}}var qw=uc(),G3=kt(),Qh=Uw(G3),K3=Je(),W3=Zw(),Fw=Uw(W3);function xo(e){this.value=e}function bo(){}bo.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=qw.COMPILER_REVISION,r=qw.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return K3.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,o){this.environment=t,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,a=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c<u;c++)s=i[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Qh.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
20
|
+
`]),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
21
|
+
`),this.decorators.push(`}
|
|
22
|
+
`),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(o);if(this.isChild)return p;var l={compiler:this.compilerInfo(),main:p};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var d=this.context,h=d.programs,f=d.decorators;for(c=0,u=h.length;c<u;c++)h[c]&&(l[c]=h[c],f[c]&&(l[c+"_d"]=f[c],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new Fw.default(this.options.srcName),this.decorators=new Fw.default(this.options.srcName)},createFunctionContext:function(t){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var i=0;Object.keys(this.aliases).forEach(function(c){var u=r.aliases[c];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+c,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
|
|
23
|
+
`,a,"}"])},mergeSource:function(t){var r=this.environment.isSimple,n=!this.forceBuffer,o=void 0,i=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(i?s.prepend("buffer += "):o=!0,a.add(";"),s=a=void 0),i=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(o?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(o?"":`;
|
|
24
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
25
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
27
|
+
return parent[propertyName];
|
|
28
|
+
}
|
|
29
|
+
return undefined
|
|
30
|
+
}
|
|
31
|
+
`.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,o){var i=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[i++])):this.pushContext(),this.resolvePath("context",t,i,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,o,i){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(J3(this.options.strict&&i,this,r,n,t));return}for(var a=r.length;n<a;n++)this.replaceStack(function(c){var u=s.nameLookup(c,r[n],t);return o?[" && ",u]:[" != null ? ",u," : ",c]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",o])," || fn;"])},invokeHelper:function(t,r,n){var o=this.popStack(),i=this.setupHelper(t,r),s=[];n&&s.push(i.name),s.push(o),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",i.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var o=1;o<t.length;o++)n.push(r,t[o]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,r),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),s=["(","(helper = ",i," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"])},invokePartial:function(t,r,n){var o=[],i=this.setupParams(r,1,o);t&&(r=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?o.unshift(r):o.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),o.push(i),this.push(this.source.functionCall("container.invokePartial","",o))},assignToHash:function(t){var r=this.popStack(),n=void 0,o=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(o=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[t]=n),o&&(s.types[t]=o),i&&(s.ids[t]=i),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:bo,compileChildren:function(t,r){for(var n=t.children,o=void 0,i=void 0,s=0,a=n.length;s<a;s++){o=n[s],i=new this.compiler;var c=this.matchExistingProgram(o);if(c==null){this.context.programs.push("");var u=this.context.programs.length;o.index=u,o.name="program"+u,this.context.programs[u]=i.compile(o,r,this.context,!this.precompile),this.context.decorators[u]=i.decorators,this.context.environments[u]=o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,o.useDepths=this.useDepths,o.useBlockParams=this.useBlockParams}else o.index=c.index,o.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var o=this.context.environments[r];if(o&&o.equals(t))return o}},programExpression:function(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof xo||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new xo(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,o=void 0,i=void 0;if(!this.isInline())throw new Qh.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof xo)n=[s.value],r=["(",n],i=!0;else{o=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);i||this.popStack(),o&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var o=t[r];if(o instanceof xo)this.compileStack.push(o);else{var i=this.incrStack();this.pushSource([i," = ",o,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof xo)return n.value;if(!r){if(!this.stackSlot)throw new Qh.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof xo?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var o=[],i=this.setupHelperArgs(r,t,o,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:o,paramsInit:i,name:s,callParams:[a].concat(o)}},setupParams:function(t,r,n){var o={},i=[],s=[],a=[],c=!n,u=void 0;c&&(n=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var p=this.popStack(),l=this.popStack();(l||p)&&(o.fn=l||"container.noop",o.inverse=p||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),i[d]=this.popStack());return c&&(o.args=this.source.generateArray(n)),this.trackIds&&(o.ids=this.source.generateArray(a)),this.stringParams&&(o.types=this.source.generateArray(s),o.contexts=this.source.generateArray(i)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o},setupHelperArgs:function(t,r,n,o){var i=this.setupParams(t,r,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),o?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}};(function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=bo.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();bo.isValidJavaScriptVariableName=function(e){return!bo.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function J3(e,t,r,n,o){var i=t.popStack(),s=r.length;for(e&&s--;n<s;n++)i=t.nameLookup(i,r[n],o);return e?[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[n]),", ",JSON.stringify(t.source.currentLocation)," )"]:i}Ec.default=bo;Bw.exports=Ec.default});var Kw=k((zc,Gw)=>{"use strict";zc.__esModule=!0;function Gi(e){return e&&e.__esModule?e:{default:e}}var Y3=Wk(),Q3=Gi(Y3),X3=zh(),eM=Gi(X3),Xh=cw(),em=dw(),tM=Vw(),rM=Gi(tM),nM=vc(),oM=Gi(nM),iM=Th(),sM=Gi(iM),aM=Q3.default.create;function Hw(){var e=aM();return e.compile=function(t,r){return em.compile(t,r,e)},e.precompile=function(t,r){return em.precompile(t,r,e)},e.AST=eM.default,e.Compiler=em.Compiler,e.JavaScriptCompiler=rM.default,e.Parser=Xh.parser,e.parse=Xh.parse,e.parseWithoutProcessing=Xh.parseWithoutProcessing,e}var ko=Hw();ko.create=Hw;sM.default(ko);ko.Visitor=oM.default;ko.default=ko;zc.default=ko;Gw.exports=zc.default});var Ww=k(Cc=>{"use strict";Cc.__esModule=!0;Cc.print=pM;Cc.PrintVisitor=we;function cM(e){return e&&e.__esModule?e:{default:e}}var uM=vc(),lM=cM(uM);function pM(e){return new we().accept(e)}function we(){this.padding=0}we.prototype=new lM.default;we.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
|
|
32
|
+
`,t};we.prototype.Program=function(e){var t="",r=e.body,n=void 0,o=void 0;if(e.blockParams){var i="BLOCK PARAMS: [";for(n=0,o=e.blockParams.length;n<o;n++)i+=" "+e.blockParams[n];i+=" ]",t+=this.pad(i)}for(n=0,o=r.length;n<o;n++)t+=this.accept(r[n]);return this.padding--,t};we.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};we.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};we.prototype.BlockStatement=we.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};we.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};we.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};we.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};we.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};we.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,o=0,i=t.length;o<i;o++)r.push(this.accept(t[o]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};we.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};we.prototype.StringLiteral=function(e){return'"'+e.value+'"'};we.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};we.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};we.prototype.UndefinedLiteral=function(){return"UNDEFINED"};we.prototype.NullLiteral=function(){return"NULL"};we.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,o=t.length;n<o;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};we.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Xw=k((_q,Qw)=>{var Ic=Kw().default,Yw=Ww();Ic.PrintVisitor=Yw.PrintVisitor;Ic.print=Yw.print;Qw.exports=Ic;function Jw(e,t){var r=Cn("fs"),n=r.readFileSync(t,"utf8");e.exports=Ic.compile(n)}typeof Cn<"u"&&Cn.extensions&&(Cn.extensions[".handlebars"]=Jw,Cn.extensions[".hbs"]=Jw)});var g={};hu(g,{BRAND:()=>S2,DIRTY:()=>Zr,EMPTY_PATH:()=>r2,INVALID:()=>L,NEVER:()=>a1,OK:()=>Le,ParseStatus:()=>Ce,Schema:()=>V,ZodAny:()=>gr,ZodArray:()=>Xt,ZodBigInt:()=>Fr,ZodBoolean:()=>Ur,ZodBranded:()=>Po,ZodCatch:()=>en,ZodDate:()=>Br,ZodDefault:()=>Xr,ZodDiscriminatedUnion:()=>es,ZodEffects:()=>ht,ZodEnum:()=>Yr,ZodError:()=>Ye,ZodFirstPartyTypeKind:()=>T,ZodFunction:()=>rs,ZodIntersection:()=>Kr,ZodIssueCode:()=>w,ZodLazy:()=>Wr,ZodLiteral:()=>Jr,ZodMap:()=>jn,ZodNaN:()=>Dn,ZodNativeEnum:()=>Qr,ZodNever:()=>Tt,ZodNull:()=>Hr,ZodNullable:()=>Lt,ZodNumber:()=>qr,ZodObject:()=>Xe,ZodOptional:()=>Qe,ZodParsedType:()=>E,ZodPipeline:()=>Eo,ZodPromise:()=>yr,ZodReadonly:()=>tn,ZodRecord:()=>ts,ZodSchema:()=>V,ZodSet:()=>Mn,ZodString:()=>mr,ZodSymbol:()=>An,ZodTransformer:()=>ht,ZodTuple:()=>Dt,ZodType:()=>V,ZodUndefined:()=>Vr,ZodUnion:()=>Gr,ZodUnknown:()=>Qt,ZodVoid:()=>Nn,addIssueToContext:()=>P,any:()=>O2,array:()=>M2,bigint:()=>E2,boolean:()=>xg,coerce:()=>s1,custom:()=>yg,date:()=>z2,datetimeRegex:()=>mg,defaultErrorMap:()=>Jt,discriminatedUnion:()=>Z2,effect:()=>Q2,enum:()=>W2,function:()=>H2,getErrorMap:()=>In,getParsedType:()=>Mt,instanceof:()=>$2,intersection:()=>q2,isAborted:()=>Qi,isAsync:()=>Rn,isDirty:()=>Xi,isValid:()=>hr,late:()=>T2,lazy:()=>G2,literal:()=>K2,makeIssue:()=>$o,map:()=>B2,nan:()=>P2,nativeEnum:()=>J2,never:()=>N2,null:()=>R2,nullable:()=>e1,number:()=>vg,object:()=>vu,objectUtil:()=>gu,oboolean:()=>i1,onumber:()=>o1,optional:()=>X2,ostring:()=>n1,pipeline:()=>r1,preprocess:()=>t1,promise:()=>Y2,quotelessJson:()=>XS,record:()=>U2,set:()=>V2,setErrorMap:()=>t2,strictObject:()=>D2,string:()=>_g,symbol:()=>C2,transformer:()=>Q2,tuple:()=>F2,undefined:()=>I2,union:()=>L2,unknown:()=>A2,util:()=>J,void:()=>j2});var J;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(J||(J={}));var gu;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(gu||(gu={}));var E=J.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mt=e=>{switch(typeof e){case"undefined":return E.undefined;case"string":return E.string;case"number":return Number.isNaN(e)?E.nan:E.number;case"boolean":return E.boolean;case"function":return E.function;case"bigint":return E.bigint;case"symbol":return E.symbol;case"object":return Array.isArray(e)?E.array:e===null?E.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?E.promise:typeof Map<"u"&&e instanceof Map?E.map:typeof Set<"u"&&e instanceof Set?E.set:typeof Date<"u"&&e instanceof Date?E.date:E.object;default:return E.unknown}};var w=J.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"]),XS=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ye=class e extends Error{get errors(){return this.issues}constructor(t){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=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,J.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ye.create=e=>new Ye(e);var e2=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===E.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,J.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${J.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${J.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${J.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:J.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,J.assertNever(e)}return{message:r}},Jt=e2;var lg=Jt;function t2(e){lg=e}function In(){return lg}var $o=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},r2=[];function P(e,t){let r=In(),n=$o({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Jt?void 0:Jt].filter(o=>!!o)});e.common.issues.push(n)}var Ce=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return L;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return L;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}},L=Object.freeze({status:"aborted"}),Zr=e=>({status:"dirty",value:e}),Le=e=>({status:"valid",value:e}),Qi=e=>e.status==="aborted",Xi=e=>e.status==="dirty",hr=e=>e.status==="valid",Rn=e=>typeof Promise<"u"&&e instanceof Promise;var I;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(I||(I={}));var ft=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}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}},pg=(e,t)=>{if(hr(t))return{success:!0,data:t.value};if(!e.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 Ye(e.common.issues);return this._error=r,this._error}}};function U(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}var V=class{get description(){return this._def.description}_getType(t){return Mt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Mt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ce,ctx:{common:t.parent.common,data:t.data,parsedType:Mt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Rn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mt(t)},o=this._parseSync({data:t,path:n.path,parent:n});return pg(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mt(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return hr(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:t,path:[],parent:r}).then(n=>hr(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mt(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Rn(o)?o:Promise.resolve(o));return pg(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:w.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new ht({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Qe.create(this,this._def)}nullable(){return Lt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xt.create(this)}promise(){return yr.create(this,this._def)}or(t){return Gr.create([this,t],this._def)}and(t){return Kr.create(this,t,this._def)}transform(t){return new ht({...U(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Xr({...U(this._def),innerType:this,defaultValue:r,typeName:T.ZodDefault})}brand(){return new Po({typeName:T.ZodBranded,type:this,...U(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new en({...U(this._def),innerType:this,catchValue:r,typeName:T.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Eo.create(this,t)}readonly(){return tn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},n2=/^c[^\s-]{8,}$/i,o2=/^[0-9a-z]+$/,i2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,s2=/^[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,a2=/^[a-z0-9_-]{21}$/i,c2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,u2=/^[-+]?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)?)??$/,l2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,p2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yu,d2=/^(?:(?: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])$/,f2=/^(?:(?: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])$/,h2=/^(([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]))$/,m2=/^(([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])$/,g2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,y2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fg="((\\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])))",_2=new RegExp(`^${fg}$`);function hg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function v2(e){return new RegExp(`^${hg(e)}$`)}function mg(e){let t=`${fg}T${hg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function x2(e,t){return!!((t==="v4"||!t)&&d2.test(e)||(t==="v6"||!t)&&h2.test(e))}function b2(e,t){if(!c2.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function k2(e,t){return!!((t==="v4"||!t)&&f2.test(e)||(t==="v6"||!t)&&m2.test(e))}var mr=class e extends V{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==E.string){let i=this._getOrReturnCtx(t);return P(i,{code:w.invalid_type,expected:E.string,received:i.parsedType}),L}let n=new Ce,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),P(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),P(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?P(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&P(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")l2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"email",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")yu||(yu=new RegExp(p2,"u")),yu.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"emoji",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")s2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"uuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")a2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"nanoid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")n2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"cuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")o2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"cuid2",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")i2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"ulid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),P(o,{validation:"url",code:w.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"regex",code:w.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?mg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?_2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?v2(i).test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{code:w.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?u2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"duration",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?x2(t.data,i.version)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"ip",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?b2(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"jwt",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?k2(t.data,i.version)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"cidr",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?g2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"base64",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?y2.test(t.data)||(o=this._getOrReturnCtx(t,o),P(o,{validation:"base64url",code:w.invalid_string,message:i.message}),n.dirty()):J.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:w.invalid_string,...I.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...I.errToObj(t)})}url(t){return this._addCheck({kind:"url",...I.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...I.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...I.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...I.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...I.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...I.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...I.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...I.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...I.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...I.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...I.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...I.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...I.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...I.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...I.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...I.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...I.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...I.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...I.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...I.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...I.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...I.errToObj(r)})}nonempty(t){return this.min(1,I.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};mr.create=e=>new mr({checks:[],typeName:T.ZodString,coerce:e?.coerce??!1,...U(e)});function w2(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var qr=class e extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==E.number){let i=this._getOrReturnCtx(t);return P(i,{code:w.invalid_type,expected:E.number,received:i.parsedType}),L}let n,o=new Ce;for(let i of this._def.checks)i.kind==="int"?J.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),P(n,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?w2(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),P(n,{code:w.not_finite,message:i.message}),o.dirty()):J.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,I.toString(r))}gt(t,r){return this.setLimit("min",t,!1,I.toString(r))}lte(t,r){return this.setLimit("max",t,!0,I.toString(r))}lt(t,r){return this.setLimit("max",t,!1,I.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:I.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:I.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&J.isInteger(t.value))}get isFinite(){let t=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"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};qr.create=e=>new qr({checks:[],typeName:T.ZodNumber,coerce:e?.coerce||!1,...U(e)});var Fr=class e extends V{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==E.bigint)return this._getInvalidInput(t);let n,o=new Ce;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),P(n,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):J.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return P(r,{code:w.invalid_type,expected:E.bigint,received:r.parsedType}),L}gte(t,r){return this.setLimit("min",t,!0,I.toString(r))}gt(t,r){return this.setLimit("min",t,!1,I.toString(r))}lte(t,r){return this.setLimit("max",t,!0,I.toString(r))}lt(t,r){return this.setLimit("max",t,!1,I.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Fr.create=e=>new Fr({checks:[],typeName:T.ZodBigInt,coerce:e?.coerce??!1,...U(e)});var Ur=class extends V{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==E.boolean){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.boolean,received:n.parsedType}),L}return Le(t.data)}};Ur.create=e=>new Ur({typeName:T.ZodBoolean,coerce:e?.coerce||!1,...U(e)});var Br=class e extends V{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==E.date){let i=this._getOrReturnCtx(t);return P(i,{code:w.invalid_type,expected:E.date,received:i.parsedType}),L}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return P(i,{code:w.invalid_date}),L}let n=new Ce,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),P(o,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),P(o,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):J.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:I.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:I.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Br.create=e=>new Br({checks:[],coerce:e?.coerce||!1,typeName:T.ZodDate,...U(e)});var An=class extends V{_parse(t){if(this._getType(t)!==E.symbol){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.symbol,received:n.parsedType}),L}return Le(t.data)}};An.create=e=>new An({typeName:T.ZodSymbol,...U(e)});var Vr=class extends V{_parse(t){if(this._getType(t)!==E.undefined){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.undefined,received:n.parsedType}),L}return Le(t.data)}};Vr.create=e=>new Vr({typeName:T.ZodUndefined,...U(e)});var Hr=class extends V{_parse(t){if(this._getType(t)!==E.null){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.null,received:n.parsedType}),L}return Le(t.data)}};Hr.create=e=>new Hr({typeName:T.ZodNull,...U(e)});var gr=class extends V{constructor(){super(...arguments),this._any=!0}_parse(t){return Le(t.data)}};gr.create=e=>new gr({typeName:T.ZodAny,...U(e)});var Qt=class extends V{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Le(t.data)}};Qt.create=e=>new Qt({typeName:T.ZodUnknown,...U(e)});var Tt=class extends V{_parse(t){let r=this._getOrReturnCtx(t);return P(r,{code:w.invalid_type,expected:E.never,received:r.parsedType}),L}};Tt.create=e=>new Tt({typeName:T.ZodNever,...U(e)});var Nn=class extends V{_parse(t){if(this._getType(t)!==E.undefined){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.void,received:n.parsedType}),L}return Le(t.data)}};Nn.create=e=>new Nn({typeName:T.ZodVoid,...U(e)});var Xt=class e extends V{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==E.array)return P(r,{code:w.invalid_type,expected:E.array,received:r.parsedType}),L;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(P(r,{code:s?w.too_big:w.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(P(r,{code:w.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(P(r,{code:w.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new ft(r,s,r.path,a)))).then(s=>Ce.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new ft(r,s,r.path,a)));return Ce.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:I.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:I.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:I.toString(r)}})}nonempty(t){return this.min(1,t)}};Xt.create=(e,t)=>new Xt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...U(t)});function On(e){if(e instanceof Xe){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Qe.create(On(n))}return new Xe({...e._def,shape:()=>t})}else return e instanceof Xt?new Xt({...e._def,type:On(e.element)}):e instanceof Qe?Qe.create(On(e.unwrap())):e instanceof Lt?Lt.create(On(e.unwrap())):e instanceof Dt?Dt.create(e.items.map(t=>On(t))):e}var Xe=class e extends V{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=J.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==E.object){let u=this._getOrReturnCtx(t);return P(u,{code:w.invalid_type,expected:E.object,received:u.parsedType}),L}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Tt&&this._def.unknownKeys==="strip"))for(let u in o.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let p=i[u],l=o.data[u];c.push({key:{status:"valid",value:u},value:p._parse(new ft(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Tt){let u=this._def.unknownKeys;if(u==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(u==="strict")a.length>0&&(P(o,{code:w.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let p of a){let l=o.data[p];c.push({key:{status:"valid",value:p},value:u._parse(new ft(o,l,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let p of c){let l=await p.key,d=await p.value;u.push({key:l,value:d,alwaysSet:p.alwaysSet})}return u}).then(u=>Ce.mergeObjectSync(n,u)):Ce.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:I.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:T.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of J.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of J.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return On(this)}partial(t){let r={};for(let n of J.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of J.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Qe;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return gg(J.objectKeys(this.shape))}};Xe.create=(e,t)=>new Xe({shape:()=>e,unknownKeys:"strip",catchall:Tt.create(),typeName:T.ZodObject,...U(t)});Xe.strictCreate=(e,t)=>new Xe({shape:()=>e,unknownKeys:"strict",catchall:Tt.create(),typeName:T.ZodObject,...U(t)});Xe.lazycreate=(e,t)=>new Xe({shape:e,unknownKeys:"strip",catchall:Tt.create(),typeName:T.ZodObject,...U(t)});var Gr=class extends V{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Ye(a.ctx.common.issues));return P(r,{code:w.invalid_union,unionErrors:s}),L}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:u});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Ye(c));return P(r,{code:w.invalid_union,unionErrors:a}),L}}get options(){return this._def.options}};Gr.create=(e,t)=>new Gr({options:e,typeName:T.ZodUnion,...U(t)});var Yt=e=>e instanceof Wr?Yt(e.schema):e instanceof ht?Yt(e.innerType()):e instanceof Jr?[e.value]:e instanceof Yr?e.options:e instanceof Qr?J.objectValues(e.enum):e instanceof Xr?Yt(e._def.innerType):e instanceof Vr?[void 0]:e instanceof Hr?[null]:e instanceof Qe?[void 0,...Yt(e.unwrap())]:e instanceof Lt?[null,...Yt(e.unwrap())]:e instanceof Po||e instanceof tn?Yt(e.unwrap()):e instanceof en?Yt(e._def.innerType):[],es=class e extends V{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.object)return P(r,{code:w.invalid_type,expected:E.object,received:r.parsedType}),L;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(P(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let s=Yt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:T.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...U(n)})}};function _u(e,t){let r=Mt(e),n=Mt(t);if(e===t)return{valid:!0,data:e};if(r===E.object&&n===E.object){let o=J.objectKeys(t),i=J.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=_u(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===E.array&&n===E.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=_u(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===E.date&&n===E.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Kr=class extends V{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Qi(i)||Qi(s))return L;let a=_u(i.value,s.value);return a.valid?((Xi(i)||Xi(s))&&r.dirty(),{status:r.value,value:a.data}):(P(n,{code:w.invalid_intersection_types}),L)};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(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Kr.create=(e,t,r)=>new Kr({left:e,right:t,typeName:T.ZodIntersection,...U(r)});var Dt=class e extends V{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.array)return P(n,{code:w.invalid_type,expected:E.array,received:n.parsedType}),L;if(n.data.length<this._def.items.length)return P(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L;!this._def.rest&&n.data.length>this._def.items.length&&(P(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ft(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Ce.mergeArray(r,s)):Ce.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Dt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dt({items:e,typeName:T.ZodTuple,rest:null,...U(t)})};var ts=class e extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.object)return P(n,{code:w.invalid_type,expected:E.object,received:n.parsedType}),L;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new ft(n,a,n.path,a)),value:s._parse(new ft(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ce.mergeObjectAsync(r,o):Ce.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof V?new e({keyType:t,valueType:r,typeName:T.ZodRecord,...U(n)}):new e({keyType:mr.create(),valueType:t,typeName:T.ZodRecord,...U(r)})}},jn=class extends V{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.map)return P(n,{code:w.invalid_type,expected:E.map,received:n.parsedType}),L;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new ft(n,a,n.path,[u,"key"])),value:i._parse(new ft(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,p=await c.value;if(u.status==="aborted"||p.status==="aborted")return L;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,p=c.value;if(u.status==="aborted"||p.status==="aborted")return L;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};jn.create=(e,t,r)=>new jn({valueType:t,keyType:e,typeName:T.ZodMap,...U(r)});var Mn=class e extends V{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.set)return P(n,{code:w.invalid_type,expected:E.set,received:n.parsedType}),L;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(P(n,{code:w.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(P(n,{code:w.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let p of c){if(p.status==="aborted")return L;p.status==="dirty"&&r.dirty(),u.add(p.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new ft(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:I.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:I.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Mn.create=(e,t)=>new Mn({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...U(t)});var rs=class e extends V{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.function)return P(r,{code:w.invalid_type,expected:E.function,received:r.parsedType}),L;function n(a,c){return $o({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,In(),Jt].filter(u=>!!u),issueData:{code:w.invalid_arguments,argumentsError:c}})}function o(a,c){return $o({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,In(),Jt].filter(u=>!!u),issueData:{code:w.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof yr){let a=this;return Le(async function(...c){let u=new Ye([]),p=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(n(c,h)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(h=>{throw u.addIssue(o(l,h)),u})})}else{let a=this;return Le(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Ye([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new Ye([o(p,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Dt.create(t).rest(Qt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Dt.create([]).rest(Qt.create()),returns:r||Qt.create(),typeName:T.ZodFunction,...U(n)})}},Wr=class extends V{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Wr.create=(e,t)=>new Wr({getter:e,typeName:T.ZodLazy,...U(t)});var Jr=class extends V{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return P(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),L}return{status:"valid",value:t.data}}get value(){return this._def.value}};Jr.create=(e,t)=>new Jr({value:e,typeName:T.ZodLiteral,...U(t)});function gg(e,t){return new Yr({values:e,typeName:T.ZodEnum,...U(t)})}var Yr=class e extends V{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return P(r,{expected:J.joinValues(n),received:r.parsedType,code:w.invalid_type}),L}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return P(r,{received:r.data,code:w.invalid_enum_value,options:n}),L}return Le(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Yr.create=gg;var Qr=class extends V{_parse(t){let r=J.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==E.string&&n.parsedType!==E.number){let o=J.objectValues(r);return P(n,{expected:J.joinValues(o),received:n.parsedType,code:w.invalid_type}),L}if(this._cache||(this._cache=new Set(J.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=J.objectValues(r);return P(n,{received:n.data,code:w.invalid_enum_value,options:o}),L}return Le(t.data)}get enum(){return this._def.values}};Qr.create=(e,t)=>new Qr({values:e,typeName:T.ZodNativeEnum,...U(t)});var yr=class extends V{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.promise&&r.common.async===!1)return P(r,{code:w.invalid_type,expected:E.promise,received:r.parsedType}),L;let n=r.parsedType===E.promise?r.data:Promise.resolve(r.data);return Le(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};yr.create=(e,t)=>new yr({type:e,typeName:T.ZodPromise,...U(t)});var ht=class extends V{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{P(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return L;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?L:c.status==="dirty"?Zr(c.value):r.value==="dirty"?Zr(c.value):c});{if(r.value==="aborted")return L;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?L:a.status==="dirty"?Zr(a.value):r.value==="dirty"?Zr(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);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 a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?L:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?L:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!hr(s))return L;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>hr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):L);J.assertNever(o)}};ht.create=(e,t,r)=>new ht({schema:e,typeName:T.ZodEffects,effect:t,...U(r)});ht.createWithPreprocess=(e,t,r)=>new ht({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...U(r)});var Qe=class extends V{_parse(t){return this._getType(t)===E.undefined?Le(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Qe.create=(e,t)=>new Qe({innerType:e,typeName:T.ZodOptional,...U(t)});var Lt=class extends V{_parse(t){return this._getType(t)===E.null?Le(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Lt.create=(e,t)=>new Lt({innerType:e,typeName:T.ZodNullable,...U(t)});var Xr=class extends V{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===E.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Xr.create=(e,t)=>new Xr({innerType:e,typeName:T.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...U(t)});var en=class extends V{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Rn(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ye(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ye(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};en.create=(e,t)=>new en({innerType:e,typeName:T.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...U(t)});var Dn=class extends V{_parse(t){if(this._getType(t)!==E.nan){let n=this._getOrReturnCtx(t);return P(n,{code:w.invalid_type,expected:E.nan,received:n.parsedType}),L}return{status:"valid",value:t.data}}};Dn.create=e=>new Dn({typeName:T.ZodNaN,...U(e)});var S2=Symbol("zod_brand"),Po=class extends V{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Eo=class e extends V{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);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"?L:i.status==="dirty"?(r.dirty(),Zr(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?L:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:T.ZodPipeline})}},tn=class extends V{_parse(t){let r=this._def.innerType._parse(t),n=o=>(hr(o)&&(o.value=Object.freeze(o.value)),o);return Rn(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};tn.create=(e,t)=>new tn({innerType:e,typeName:T.ZodReadonly,...U(t)});function dg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function yg(e,t={},r){return e?gr.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=dg(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=dg(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):gr.create()}var T2={object:Xe.lazycreate},T;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(T||(T={}));var $2=(e,t={message:`Input not instance of ${e.name}`})=>yg(r=>r instanceof e,t),_g=mr.create,vg=qr.create,P2=Dn.create,E2=Fr.create,xg=Ur.create,z2=Br.create,C2=An.create,I2=Vr.create,R2=Hr.create,O2=gr.create,A2=Qt.create,N2=Tt.create,j2=Nn.create,M2=Xt.create,vu=Xe.create,D2=Xe.strictCreate,L2=Gr.create,Z2=es.create,q2=Kr.create,F2=Dt.create,U2=ts.create,B2=jn.create,V2=Mn.create,H2=rs.create,G2=Wr.create,K2=Jr.create,W2=Yr.create,J2=Qr.create,Y2=yr.create,Q2=ht.create,X2=Qe.create,e1=Lt.create,t1=ht.createWithPreprocess,r1=Eo.create,n1=()=>_g().optional(),o1=()=>vg().optional(),i1=()=>xg().optional(),s1={string:(e=>mr.create({...e,coerce:!0})),number:(e=>qr.create({...e,coerce:!0})),boolean:(e=>Ur.create({...e,coerce:!0})),bigint:(e=>Fr.create({...e,coerce:!0})),date:(e=>Br.create({...e,coerce:!0}))};var a1=L;var c1=Object.freeze({status:"aborted"});function b(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var u1=Symbol("zod_brand"),er=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ns={};function st(e){return e&&Object.assign(ns,e),ns}var Y={};hu(Y,{BIGINT_FORMAT_RANGES:()=>kg,Class:()=>bu,NUMBER_FORMAT_RANGES:()=>Eu,aborted:()=>nn,allowsEval:()=>Tu,assert:()=>h1,assertEqual:()=>l1,assertIs:()=>d1,assertNever:()=>f1,assertNotEqual:()=>p1,assignProp:()=>Su,cached:()=>Io,captureStackTrace:()=>is,cleanEnum:()=>P1,cleanRegex:()=>Oo,clone:()=>at,createTransparentProxy:()=>x1,defineLazy:()=>ce,esc:()=>rn,escapeRegex:()=>_r,extend:()=>w1,finalizeIssue:()=>$t,floatSafeRemainder:()=>wu,getElementAtPath:()=>m1,getEnumValues:()=>Co,getLengthableOrigin:()=>Ao,getParsedType:()=>v1,getSizableOrigin:()=>wg,isObject:()=>Ln,isPlainObject:()=>Zn,issue:()=>zu,joinValues:()=>os,jsonStringifyReplacer:()=>ku,merge:()=>S1,normalizeParams:()=>Z,nullish:()=>Ro,numKeys:()=>_1,omit:()=>k1,optionalKeys:()=>Pu,partial:()=>T1,pick:()=>b1,prefixIssues:()=>Zt,primitiveTypes:()=>bg,promiseAllObject:()=>g1,propertyKeyTypes:()=>$u,randomString:()=>y1,required:()=>$1,stringifyPrimitive:()=>ss,unwrapMessage:()=>zo});function l1(e){return e}function p1(e){return e}function d1(e){}function f1(e){throw new Error}function h1(e){}function Co(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function os(e,t="|"){return e.map(r=>ss(r)).join(t)}function ku(e,t){return typeof t=="bigint"?t.toString():t}function Io(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ro(e){return e==null}function Oo(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function wu(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function ce(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Su(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function m1(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function g1(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function y1(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function rn(e){return JSON.stringify(e)}var is=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Ln(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Tu=Io(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Zn(e){if(Ln(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(Ln(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _1(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var v1=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},$u=new Set(["string","number","symbol"]),bg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function _r(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function at(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Z(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function x1(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function ss(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Pu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Eu={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]},kg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function b1(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return at(e,{...e._zod.def,shape:r,checks:[]})}function k1(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return at(e,{...e._zod.def,shape:r,checks:[]})}function w1(e,t){if(!Zn(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return Su(this,"shape",n),n},checks:[]};return at(e,r)}function S1(e,t){return at(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return Su(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function T1(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=e?new e({type:"optional",innerType:n[i]}):n[i])}else for(let i in n)o[i]=e?new e({type:"optional",innerType:n[i]}):n[i];return at(t,{...t._zod.def,shape:o,checks:[]})}function $1(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)o[i]=new e({type:"nonoptional",innerType:n[i]});return at(t,{...t._zod.def,shape:o,checks:[]})}function nn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Zt(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function zo(e){return typeof e=="string"?e:e?.message}function $t(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=zo(e.inst?._zod.def?.error?.(e))??zo(t?.error?.(e))??zo(r.customError?.(e))??zo(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function wg(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ao(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function zu(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function P1(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var bu=class{constructor(...t){}};var Sg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,ku,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},as=b("$ZodError",Sg),No=b("$ZodError",Sg,{Parent:Error});function Cu(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Iu(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}var Ru=e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new er;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>$t(c,i,st())));throw is(a,o?.callee),a}return s.value},Ou=Ru(No),Au=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>$t(c,i,st())));throw is(a,o?.callee),a}return s.value},Nu=Au(No),ju=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new er;return i.issues.length?{success:!1,error:new(e??as)(i.issues.map(s=>$t(s,o,st())))}:{success:!0,data:i.value}},on=ju(No),Mu=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>$t(s,o,st())))}:{success:!0,data:i.value}},sn=Mu(No);var Tg=/^[cC][^\s-]{8,}$/,$g=/^[0-9a-z]+$/,Pg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eg=/^[0-9a-vA-V]{20}$/,zg=/^[A-Za-z0-9]{27}$/,Cg=/^[a-zA-Z0-9_-]{21}$/,Ig=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Rg=/^([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})$/,Du=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var Og=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var z1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ag(){return new RegExp(z1,"u")}var Ng=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jg=/^(([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})$/,Mg=/^((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])$/,Dg=/^(([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])$/,Lg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Lu=/^[A-Za-z0-9_-]*$/,Zg=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var qg=/^\+(?:[0-9]){6,14}[0-9]$/,Fg="(?:(?:\\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])))",Ug=new RegExp(`^${Fg}$`);function Bg(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Vg(e){return new RegExp(`^${Bg(e)}$`)}function Hg(e){let t=Bg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Fg}T(?:${n})$`)}var Gg=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var Kg=/^\d+$/,Wg=/^-?\d+(?:\.\d+)?/i,Jg=/true|false/i,Yg=/null/i;var Qg=/^[^A-Z]*$/,Xg=/^[^a-z]*$/;var Ie=b("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ey={number:"number",bigint:"bigint",object:"date"},Zu=b("$ZodCheckLessThan",(e,t)=>{Ie.init(e,t);let r=ey[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qu=b("$ZodCheckGreaterThan",(e,t)=>{Ie.init(e,t);let r=ey[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ty=b("$ZodCheckMultipleOf",(e,t)=>{Ie.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):wu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ry=b("$ZodCheckNumberFormat",(e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Eu[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=Kg)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}});var ny=b("$ZodCheckMaxLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ro(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let s=Ao(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oy=b("$ZodCheckMinLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ro(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=Ao(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),iy=b("$ZodCheckLengthEquals",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ro(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let s=Ao(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),jo=b("$ZodCheckStringFormat",(e,t)=>{var r,n;Ie.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),sy=b("$ZodCheckRegex",(e,t)=>{jo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ay=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qg),jo.init(e,t)}),cy=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xg),jo.init(e,t)}),uy=b("$ZodCheckIncludes",(e,t)=>{Ie.init(e,t);let r=_r(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ly=b("$ZodCheckStartsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`^${_r(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),py=b("$ZodCheckEndsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`.*${_r(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});var dy=b("$ZodCheckOverwrite",(e,t)=>{Ie.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var us=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
33
|
+
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
|
|
34
|
+
`))}};var hy={major:4,minor:0,patch:0};var ie=b("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hy;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(i,s,a)=>{let c=nn(i),u;for(let p of s){if(p._zod.def.when){if(!p._zod.def.when(i))continue}else if(c)continue;let l=i.issues.length,d=p._zod.check(i);if(d instanceof Promise&&a?.async===!1)throw new er;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=nn(i,l)))});else{if(i.issues.length===l)continue;c||(c=nn(i,l))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new er;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=on(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return sn(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Mo=b("$ZodString",(e,t)=>{ie.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Gg(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ue=b("$ZodStringFormat",(e,t)=>{jo.init(e,t),Mo.init(e,t)}),Uu=b("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Rg),ue.init(e,t)}),Bu=b("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Du(n))}else t.pattern??(t.pattern=Du());ue.init(e,t)}),Vu=b("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Og),ue.init(e,t)}),Hu=b("$ZodURL",(e,t)=>{ue.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),i=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Zg.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Gu=b("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ag()),ue.init(e,t)}),Ku=b("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Cg),ue.init(e,t)}),Wu=b("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Tg),ue.init(e,t)}),Ju=b("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=$g),ue.init(e,t)}),Yu=b("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Pg),ue.init(e,t)}),Qu=b("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eg),ue.init(e,t)}),Xu=b("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zg),ue.init(e,t)}),Sy=b("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Hg(t)),ue.init(e,t)}),Ty=b("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ug),ue.init(e,t)}),$y=b("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Vg(t)),ue.init(e,t)}),Py=b("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ig),ue.init(e,t)}),el=b("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ng),ue.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),tl=b("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jg),ue.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),rl=b("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Mg),ue.init(e,t)}),nl=b("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Dg),ue.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ey(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var ol=b("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Lg),ue.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{Ey(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function C1(e){if(!Lu.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ey(r)}var il=b("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Lu),ue.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{C1(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),sl=b("$ZodE164",(e,t)=>{t.pattern??(t.pattern=qg),ue.init(e,t)});function I1(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var al=b("$ZodJWT",(e,t)=>{ue.init(e,t),e._zod.check=r=>{I1(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var ps=b("$ZodNumber",(e,t)=>{ie.init(e,t),e._zod.pattern=e._zod.bag.pattern??Wg,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),cl=b("$ZodNumber",(e,t)=>{ry.init(e,t),ps.init(e,t)}),ul=b("$ZodBoolean",(e,t)=>{ie.init(e,t),e._zod.pattern=Jg,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}});var ll=b("$ZodNull",(e,t)=>{ie.init(e,t),e._zod.pattern=Yg,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}});var pl=b("$ZodUnknown",(e,t)=>{ie.init(e,t),e._zod.parse=r=>r}),dl=b("$ZodNever",(e,t)=>{ie.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function my(e,t,r){e.issues.length&&t.issues.push(...Zt(r,e.issues)),t.value[r]=e.value}var fl=b("$ZodArray",(e,t)=>{ie.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(u=>my(u,r,s))):my(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function ls(e,t,r){e.issues.length&&t.issues.push(...Zt(r,e.issues)),t.value[r]=e.value}function gy(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...Zt(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}var ds=b("$ZodObject",(e,t)=>{ie.init(e,t);let r=Io(()=>{let l=Object.keys(t.shape);for(let h of l)if(!(t.shape[h]instanceof ie))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let d=Pu(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ce(e._zod,"propValues",()=>{let l=t.shape,d={};for(let h in l){let f=l[h]._zod;if(f.values){d[h]??(d[h]=new Set);for(let m of f.values)d[h].add(m)}}return d});let n=l=>{let d=new us(["shape","payload","ctx"]),h=r.value,f=_=>{let S=rn(_);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),y=0;for(let _ of h.keys)m[_]=`key_${y++}`;d.write("const newResult = {}");for(let _ of h.keys)if(h.optionalKeys.has(_)){let S=m[_];d.write(`const ${S} = ${f(_)};`);let $=rn(_);d.write(`
|
|
35
|
+
if (${S}.issues.length) {
|
|
36
|
+
if (input[${$}] === undefined) {
|
|
37
|
+
if (${$} in input) {
|
|
38
|
+
newResult[${$}] = undefined;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
payload.issues = payload.issues.concat(
|
|
42
|
+
${S}.issues.map((iss) => ({
|
|
43
|
+
...iss,
|
|
44
|
+
path: iss.path ? [${$}, ...iss.path] : [${$}],
|
|
45
|
+
}))
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
} else if (${S}.value === undefined) {
|
|
49
|
+
if (${$} in input) newResult[${$}] = undefined;
|
|
50
|
+
} else {
|
|
51
|
+
newResult[${$}] = ${S}.value;
|
|
52
|
+
}
|
|
53
|
+
`)}else{let S=m[_];d.write(`const ${S} = ${f(_)};`),d.write(`
|
|
54
|
+
if (${S}.issues.length) payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
55
|
+
...iss,
|
|
56
|
+
path: iss.path ? [${rn(_)}, ...iss.path] : [${rn(_)}]
|
|
57
|
+
})));`),d.write(`newResult[${rn(_)}] = ${S}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let v=d.compile();return(_,S)=>v(l,_,S)},o,i=Ln,s=!ns.jitless,c=s&&Tu.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let h=l.value;if(!i(h))return l.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),l;let f=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let S=p.shape;for(let $ of p.keys){let M=S[$],ve=M._zod.run({value:h[$],issues:[]},d),pe=M._zod.optin==="optional"&&M._zod.optout==="optional";ve instanceof Promise?f.push(ve.then(Dr=>pe?gy(Dr,l,$,h):ls(Dr,l,$))):pe?gy(ve,l,$,h):ls(ve,l,$)}}if(!u)return f.length?Promise.all(f).then(()=>l):l;let m=[],y=p.keySet,v=u._zod,_=v.def.type;for(let S of Object.keys(h)){if(y.has(S))continue;if(_==="never"){m.push(S);continue}let $=v.run({value:h[S],issues:[]},d);$ instanceof Promise?f.push($.then(M=>ls(M,l,S))):ls($,l,S)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:h,inst:e}),f.length?Promise.all(f).then(()=>l):l}});function yy(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>$t(i,n,st())))}),t}var fs=b("$ZodUnion",(e,t)=>{ie.init(e,t),ce(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ce(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ce(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ce(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>Oo(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>yy(s,r,e,n)):yy(i,r,e,n)}}),hl=b("$ZodDiscriminatedUnion",(e,t)=>{fs.init(e,t);let r=e._zod.parse;ce(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let u of c)o[a].add(u)}}return o});let n=Io(()=>{let o=t.options,i=new Map;for(let s of o){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!Ln(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),o)}}),ml=b("$ZodIntersection",(e,t)=>{ie.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>_y(r,c,u)):_y(r,i,s)}});function Fu(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Zn(e)&&Zn(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let s=Fu(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=Fu(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function _y(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),nn(e))return e;let n=Fu(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var gl=b("$ZodRecord",(e,t)=>{ie.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Zn(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...Zt(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...Zt(c,u.issues)),r.value[c]=u.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>$t(u,n,st())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...Zt(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...Zt(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}});var yl=b("$ZodEnum",(e,t)=>{ie.init(e,t);let r=Co(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>$u.has(typeof n)).map(n=>typeof n=="string"?_r(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:r,input:i,inst:e}),n}}),_l=b("$ZodLiteral",(e,t)=>{ie.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?_r(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}});var vl=b("$ZodTransform",(e,t)=>{ie.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new er;return r.value=o,r}}),xl=b("$ZodOptional",(e,t)=>{ie.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ce(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Oo(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),bl=b("$ZodNullable",(e,t)=>{ie.init(e,t),ce(e._zod,"optin",()=>t.innerType._zod.optin),ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Oo(r.source)}|null)$`):void 0}),ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),kl=b("$ZodDefault",(e,t)=>{ie.init(e,t),e._zod.optin="optional",ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>vy(i,t)):vy(o,t)}});function vy(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var wl=b("$ZodPrefault",(e,t)=>{ie.init(e,t),e._zod.optin="optional",ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Sl=b("$ZodNonOptional",(e,t)=>{ie.init(e,t),ce(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>xy(i,e)):xy(o,e)}});function xy(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Tl=b("$ZodCatch",(e,t)=>{ie.init(e,t),e._zod.optin="optional",ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>$t(s,n,st()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>$t(i,n,st()))},input:r.value}),r.issues=[]),r)}});var $l=b("$ZodPipe",(e,t)=>{ie.init(e,t),ce(e._zod,"values",()=>t.in._zod.values),ce(e._zod,"optin",()=>t.in._zod.optin),ce(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>by(i,t,n)):by(o,t,n)}});function by(e,t,r){return nn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var Pl=b("$ZodReadonly",(e,t)=>{ie.init(e,t),ce(e._zod,"propValues",()=>t.innerType._zod.propValues),ce(e._zod,"values",()=>t.innerType._zod.values),ce(e._zod,"optin",()=>t.innerType._zod.optin),ce(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ky):ky(o)}});function ky(e){return e.value=Object.freeze(e.value),e}var El=b("$ZodCustom",(e,t)=>{Ie.init(e,t),ie.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>wy(i,r,n,e));wy(o,r,n,e)}});function wy(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(zu(o))}}var R1=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},O1=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",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 ${R1(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${ss(n.values[0])}`:`Invalid option: expected one of ${os(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",i=t(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",i=t(n.origin);return i?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;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]??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":""}: ${os(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"}}};function zy(){return{localeError:O1()}}var A1=Symbol("ZodOutput"),N1=Symbol("ZodInput"),Do=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function Cy(){return new Do}var vr=Cy();function zl(e,t){return new e({type:"string",...Z(t)})}function Cl(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function hs(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function Il(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function Rl(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function Ol(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function Al(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(t)})}function Nl(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}function jl(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function Ml(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function Dl(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function Ll(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function Zl(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function ql(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function Fl(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function Ul(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function Bl(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function Vl(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function Hl(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function Gl(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function Kl(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function Wl(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function Jl(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}function Iy(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function Ry(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function Oy(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function Ay(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function Yl(e,t){return new e({type:"number",checks:[],...Z(t)})}function Ql(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function Xl(e,t){return new e({type:"boolean",...Z(t)})}function ep(e,t){return new e({type:"null",...Z(t)})}function tp(e){return new e({type:"unknown"})}function rp(e,t){return new e({type:"never",...Z(t)})}function ms(e,t){return new Zu({check:"less_than",...Z(t),value:e,inclusive:!1})}function Lo(e,t){return new Zu({check:"less_than",...Z(t),value:e,inclusive:!0})}function gs(e,t){return new qu({check:"greater_than",...Z(t),value:e,inclusive:!1})}function Zo(e,t){return new qu({check:"greater_than",...Z(t),value:e,inclusive:!0})}function ys(e,t){return new ty({check:"multiple_of",...Z(t),value:e})}function _s(e,t){return new ny({check:"max_length",...Z(t),maximum:e})}function qn(e,t){return new oy({check:"min_length",...Z(t),minimum:e})}function vs(e,t){return new iy({check:"length_equals",...Z(t),length:e})}function np(e,t){return new sy({check:"string_format",format:"regex",...Z(t),pattern:e})}function op(e){return new ay({check:"string_format",format:"lowercase",...Z(e)})}function ip(e){return new cy({check:"string_format",format:"uppercase",...Z(e)})}function sp(e,t){return new uy({check:"string_format",format:"includes",...Z(t),includes:e})}function ap(e,t){return new ly({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function cp(e,t){return new py({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function an(e){return new dy({check:"overwrite",tx:e})}function up(e){return an(t=>t.normalize(e))}function lp(){return an(e=>e.trim())}function pp(){return an(e=>e.toLowerCase())}function dp(){return an(e=>e.toUpperCase())}function Ny(e,t,r){return new e({type:"array",element:t,...Z(r)})}function fp(e,t,r){let n=Z(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function hp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Z(r)})}var xs=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vr,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let o=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path},d=t._zod.parent;if(d)a.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let h=a.schema;switch(o.type){case"string":{let f=h;f.type="string";let{minimum:m,maximum:y,format:v,patterns:_,contentEncoding:S}=t._zod.bag;if(typeof m=="number"&&(f.minLength=m),typeof y=="number"&&(f.maxLength=y),v&&(f.format=i[v]??v,f.format===""&&delete f.format),S&&(f.contentEncoding=S),_&&_.size>0){let $=[..._];$.length===1?f.pattern=$[0].source:$.length>1&&(a.schema.allOf=[...$.map(M=>({...this.target==="draft-7"?{type:"string"}:{},pattern:M.source}))])}break}case"number":{let f=h,{minimum:m,maximum:y,format:v,multipleOf:_,exclusiveMaximum:S,exclusiveMinimum:$}=t._zod.bag;typeof v=="string"&&v.includes("int")?f.type="integer":f.type="number",typeof $=="number"&&(f.exclusiveMinimum=$),typeof m=="number"&&(f.minimum=m,typeof $=="number"&&($>=m?delete f.minimum:delete f.exclusiveMinimum)),typeof S=="number"&&(f.exclusiveMaximum=S),typeof y=="number"&&(f.maximum=y,typeof S=="number"&&(S<=y?delete f.maximum:delete f.exclusiveMaximum)),typeof _=="number"&&(f.multipleOf=_);break}case"boolean":{let f=h;f.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{h.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let f=h,{minimum:m,maximum:y}=t._zod.bag;typeof m=="number"&&(f.minItems=m),typeof y=="number"&&(f.maxItems=y),f.type="array",f.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let f=h;f.type="object",f.properties={};let m=o.shape;for(let _ in m)f.properties[_]=this.process(m[_],{...l,path:[...l.path,"properties",_]});let y=new Set(Object.keys(m)),v=new Set([...y].filter(_=>{let S=o.shape[_]._zod;return this.io==="input"?S.optin===void 0:S.optout===void 0}));v.size>0&&(f.required=Array.from(v)),o.catchall?._zod.def.type==="never"?f.additionalProperties=!1:o.catchall?o.catchall&&(f.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{let f=h;f.anyOf=o.options.map((m,y)=>this.process(m,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let f=h,m=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),v=S=>"allOf"in S&&Object.keys(S).length===1,_=[...v(m)?m.allOf:[m],...v(y)?y.allOf:[y]];f.allOf=_;break}case"tuple":{let f=h;f.type="array";let m=o.items.map((_,S)=>this.process(_,{...l,path:[...l.path,"prefixItems",S]}));if(this.target==="draft-2020-12"?f.prefixItems=m:f.items=m,o.rest){let _=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?f.items=_:f.additionalItems=_}o.rest&&(f.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:v}=t._zod.bag;typeof y=="number"&&(f.minItems=y),typeof v=="number"&&(f.maxItems=v);break}case"record":{let f=h;f.type="object",f.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),f.additionalProperties=this.process(o.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let f=h,m=Co(o.entries);m.every(y=>typeof y=="number")&&(f.type="number"),m.every(y=>typeof y=="string")&&(f.type="string"),f.enum=m;break}case"literal":{let f=h,m=[];for(let y of o.values)if(y===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof y=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(y))}else m.push(y);if(m.length!==0)if(m.length===1){let y=m[0];f.type=y===null?"null":typeof y,f.const=y}else m.every(y=>typeof y=="number")&&(f.type="number"),m.every(y=>typeof y=="string")&&(f.type="string"),m.every(y=>typeof y=="boolean")&&(f.type="string"),m.every(y=>y===null)&&(f.type="null"),f.enum=m;break}case"file":{let f=h,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:v,mime:_}=t._zod.bag;y!==void 0&&(m.minLength=y),v!==void 0&&(m.maxLength=v),_?_.length===1?(m.contentMediaType=_[0],Object.assign(f,m)):f.anyOf=_.map(S=>({...m,contentMediaType:S})):Object.assign(f,m);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let f=this.process(o.innerType,l);h.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let f=h;f.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,h.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let f;try{f=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let f=h,m=t._zod.pattern;if(!m)throw new Error("Pattern not found in template literal");f.type="string",f.pattern=m.source;break}case"pipe":{let f=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(f,l),a.ref=f;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,h.readOnly=!0;break}case"promise":{this.process(o.innerType,l),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"lazy":{let f=t._zod.innerType;this.process(f,l),a.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&Pe(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=p=>{let l=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(p[0])?.id,y=n.external.uri??(_=>_);if(m)return{ref:y(m)};let v=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=v,{defId:v,ref:`${y("__shared")}#/${l}/${v}`}}if(p[1]===o)return{ref:"#"};let h=`#/${l}/`,f=p[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:h+f}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:h}=i(p);l.def={...l.schema},h&&(l.defId=h);let f=l.schema;for(let m in f)delete f[m];f.$ref=d};if(n.cycles==="throw")for(let p of this.seen.entries()){let l=p[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
58
|
+
|
|
59
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let l=p[1];if(t===p[0]){s(p);continue}if(n.external){let h=n.external.registry.get(p[0])?.id;if(t!==p[0]&&h){s(p);continue}}if(this.metadataRegistry.get(p[0])?.id){s(p);continue}if(l.cycle){s(p);continue}if(l.count>1&&n.reused==="ref"){s(p);continue}}let a=(p,l)=>{let d=this.seen.get(p),h=d.def??d.schema,f={...h};if(d.ref===null)return;let m=d.ref;if(d.ref=null,m){a(m,l);let y=this.seen.get(m).schema;y.$ref&&l.target==="draft-7"?(h.allOf=h.allOf??[],h.allOf.push(y)):(Object.assign(h,y),Object.assign(h,f))}d.isParent||this.override({zodSchema:p,jsonSchema:h,path:d.path??[]})};for(let p of[...this.seen.entries()].reverse())a(p[0],{target:this.target});let c={};if(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}`),n.external?.uri){let p=n.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(p)}Object.assign(c,o.def);let u=n.external?.defs??{};for(let p of this.seen.entries()){let l=p[1];l.def&&l.defId&&(u[l.defId]=l.def)}n.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function mp(e,t){if(e instanceof Do){let n=new xs(t),o={};for(let a of e._idmap.entries()){let[c,u]=a;n.process(u)}let i={},s={registry:e,uri:t?.uri,defs:o};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=n.emit(u,{...t,external:s})}if(Object.keys(o).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let r=new xs(t);return r.process(e),r.emit(e,t)}function Pe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;switch(o.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 Pe(o.element,r);case"object":{for(let i in o.shape)if(Pe(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Pe(i,r))return!0;return!1}case"intersection":return Pe(o.left,r)||Pe(o.right,r);case"tuple":{for(let i of o.items)if(Pe(i,r))return!0;return!!(o.rest&&Pe(o.rest,r))}case"record":return Pe(o.keyType,r)||Pe(o.valueType,r);case"map":return Pe(o.keyType,r)||Pe(o.valueType,r);case"set":return Pe(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Pe(o.innerType,r);case"lazy":return Pe(o.getter(),r);case"default":return Pe(o.innerType,r);case"prefault":return Pe(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Pe(o.in,r)||Pe(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var gT=b("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ie.init(e,t),e.def=t,e.parse=(r,n)=>Ou(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>on(e,r,n),e.parseAsync=async(r,n)=>Nu(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>sn(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>at(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))});var yT=b("ZodMiniObject",(e,t)=>{ds.init(e,t),gT.init(e,t),Y.defineLazy(e,"shape",()=>t.shape)});function gp(e,t){let r={type:"object",get shape(){return Y.assignProp(this,"shape",{...e}),this.shape},...Y.normalizeParams(t)};return new yT(r)}function mt(e){return!!e._zod}function un(e){let t=Object.values(e);if(t.length===0)return gp({});let r=t.every(mt),n=t.every(o=>!mt(o));if(r)return gp(e);if(n)return vu(e);throw new Error("Mixed Zod versions detected in object shape.")}function xr(e,t){return mt(e)?on(e,t):e.safeParse(t)}async function bs(e,t){return mt(e)?await sn(e,t):await e.safeParseAsync(t)}function br(e){if(!e)return;let t;if(mt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Fn(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let n=Object.values(e);if(n.length>0&&n.every(o=>typeof o=="object"&&o!==null&&(o._def!==void 0||o._zod!==void 0||typeof o.parse=="function")))return un(e)}}if(mt(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function ks(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function My(e){return e.description}function Dy(e){if(mt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function ws(e){if(mt(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=e.value;if(n!==void 0)return n}var qo={};hu(qo,{ZodISODate:()=>Zy,ZodISODateTime:()=>Ly,ZodISODuration:()=>Fy,ZodISOTime:()=>qy,date:()=>_p,datetime:()=>yp,duration:()=>xp,time:()=>vp});var Ly=b("ZodISODateTime",(e,t)=>{Sy.init(e,t),me.init(e,t)});function yp(e){return Iy(Ly,e)}var Zy=b("ZodISODate",(e,t)=>{Ty.init(e,t),me.init(e,t)});function _p(e){return Ry(Zy,e)}var qy=b("ZodISOTime",(e,t)=>{$y.init(e,t),me.init(e,t)});function vp(e){return Oy(qy,e)}var Fy=b("ZodISODuration",(e,t)=>{Py.init(e,t),me.init(e,t)});function xp(e){return Ay(Fy,e)}var Uy=(e,t)=>{as.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Iu(e,r)},flatten:{value:r=>Cu(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},w9=b("ZodError",Uy),Fo=b("ZodError",Uy,{Parent:Error});var By=Ru(Fo),Vy=Au(Fo),Hy=ju(Fo),Gy=Mu(Fo);var be=b("ZodType",(e,t)=>(ie.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>at(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>By(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Hy(e,r,n),e.parseAsync=async(r,n)=>Vy(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Gy(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(h$(r,n)),e.superRefine=r=>e.check(m$(r)),e.overwrite=r=>e.check(an(r)),e.optional=()=>xe(e),e.nullable=()=>Jy(e),e.nullish=()=>xe(Jy(e)),e.nonoptional=r=>a$(e,r),e.array=()=>Q(e),e.or=r=>le([e,r]),e.and=r=>Ts(e,r),e.transform=r=>kp(e,t_(r)),e.default=r=>o$(e,r),e.prefault=r=>s$(e,r),e.catch=r=>u$(e,r),e.pipe=r=>kp(e,r),e.readonly=()=>d$(e),e.describe=r=>{let n=e.clone();return vr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return vr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return vr.get(e);let n=e.clone();return vr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Yy=b("_ZodString",(e,t)=>{Mo.init(e,t),be.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(np(...n)),e.includes=(...n)=>e.check(sp(...n)),e.startsWith=(...n)=>e.check(ap(...n)),e.endsWith=(...n)=>e.check(cp(...n)),e.min=(...n)=>e.check(qn(...n)),e.max=(...n)=>e.check(_s(...n)),e.length=(...n)=>e.check(vs(...n)),e.nonempty=(...n)=>e.check(qn(1,...n)),e.lowercase=n=>e.check(op(n)),e.uppercase=n=>e.check(ip(n)),e.trim=()=>e.check(lp()),e.normalize=(...n)=>e.check(up(...n)),e.toLowerCase=()=>e.check(pp()),e.toUpperCase=()=>e.check(dp())}),$T=b("ZodString",(e,t)=>{Mo.init(e,t),Yy.init(e,t),e.email=r=>e.check(Cl(PT,r)),e.url=r=>e.check(Nl(ET,r)),e.jwt=r=>e.check(Jl(UT,r)),e.emoji=r=>e.check(jl(zT,r)),e.guid=r=>e.check(hs(Ky,r)),e.uuid=r=>e.check(Il(Ss,r)),e.uuidv4=r=>e.check(Rl(Ss,r)),e.uuidv6=r=>e.check(Ol(Ss,r)),e.uuidv7=r=>e.check(Al(Ss,r)),e.nanoid=r=>e.check(Ml(CT,r)),e.guid=r=>e.check(hs(Ky,r)),e.cuid=r=>e.check(Dl(IT,r)),e.cuid2=r=>e.check(Ll(RT,r)),e.ulid=r=>e.check(Zl(OT,r)),e.base64=r=>e.check(Gl(ZT,r)),e.base64url=r=>e.check(Kl(qT,r)),e.xid=r=>e.check(ql(AT,r)),e.ksuid=r=>e.check(Fl(NT,r)),e.ipv4=r=>e.check(Ul(jT,r)),e.ipv6=r=>e.check(Bl(MT,r)),e.cidrv4=r=>e.check(Vl(DT,r)),e.cidrv6=r=>e.check(Hl(LT,r)),e.e164=r=>e.check(Wl(FT,r)),e.datetime=r=>e.check(yp(r)),e.date=r=>e.check(_p(r)),e.time=r=>e.check(vp(r)),e.duration=r=>e.check(xp(r))});function x(e){return zl($T,e)}var me=b("ZodStringFormat",(e,t)=>{ue.init(e,t),Yy.init(e,t)}),PT=b("ZodEmail",(e,t)=>{Vu.init(e,t),me.init(e,t)});var Ky=b("ZodGUID",(e,t)=>{Uu.init(e,t),me.init(e,t)});var Ss=b("ZodUUID",(e,t)=>{Bu.init(e,t),me.init(e,t)});var ET=b("ZodURL",(e,t)=>{Hu.init(e,t),me.init(e,t)});var zT=b("ZodEmoji",(e,t)=>{Gu.init(e,t),me.init(e,t)});var CT=b("ZodNanoID",(e,t)=>{Ku.init(e,t),me.init(e,t)});var IT=b("ZodCUID",(e,t)=>{Wu.init(e,t),me.init(e,t)});var RT=b("ZodCUID2",(e,t)=>{Ju.init(e,t),me.init(e,t)});var OT=b("ZodULID",(e,t)=>{Yu.init(e,t),me.init(e,t)});var AT=b("ZodXID",(e,t)=>{Qu.init(e,t),me.init(e,t)});var NT=b("ZodKSUID",(e,t)=>{Xu.init(e,t),me.init(e,t)});var jT=b("ZodIPv4",(e,t)=>{el.init(e,t),me.init(e,t)});var MT=b("ZodIPv6",(e,t)=>{tl.init(e,t),me.init(e,t)});var DT=b("ZodCIDRv4",(e,t)=>{rl.init(e,t),me.init(e,t)});var LT=b("ZodCIDRv6",(e,t)=>{nl.init(e,t),me.init(e,t)});var ZT=b("ZodBase64",(e,t)=>{ol.init(e,t),me.init(e,t)});var qT=b("ZodBase64URL",(e,t)=>{il.init(e,t),me.init(e,t)});var FT=b("ZodE164",(e,t)=>{sl.init(e,t),me.init(e,t)});var UT=b("ZodJWT",(e,t)=>{al.init(e,t),me.init(e,t)});var Qy=b("ZodNumber",(e,t)=>{ps.init(e,t),be.init(e,t),e.gt=(n,o)=>e.check(gs(n,o)),e.gte=(n,o)=>e.check(Zo(n,o)),e.min=(n,o)=>e.check(Zo(n,o)),e.lt=(n,o)=>e.check(ms(n,o)),e.lte=(n,o)=>e.check(Lo(n,o)),e.max=(n,o)=>e.check(Lo(n,o)),e.int=n=>e.check(Wy(n)),e.safe=n=>e.check(Wy(n)),e.positive=n=>e.check(gs(0,n)),e.nonnegative=n=>e.check(Zo(0,n)),e.negative=n=>e.check(ms(0,n)),e.nonpositive=n=>e.check(Lo(0,n)),e.multipleOf=(n,o)=>e.check(ys(n,o)),e.step=(n,o)=>e.check(ys(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function oe(e){return Yl(Qy,e)}var BT=b("ZodNumberFormat",(e,t)=>{cl.init(e,t),Qy.init(e,t)});function Wy(e){return Ql(BT,e)}var VT=b("ZodBoolean",(e,t)=>{ul.init(e,t),be.init(e,t)});function ze(e){return Xl(VT,e)}var HT=b("ZodNull",(e,t)=>{ll.init(e,t),be.init(e,t)});function wp(e){return ep(HT,e)}var GT=b("ZodUnknown",(e,t)=>{pl.init(e,t),be.init(e,t)});function ge(){return tp(GT)}var KT=b("ZodNever",(e,t)=>{dl.init(e,t),be.init(e,t)});function WT(e){return rp(KT,e)}var JT=b("ZodArray",(e,t)=>{fl.init(e,t),be.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(qn(r,n)),e.nonempty=r=>e.check(qn(1,r)),e.max=(r,n)=>e.check(_s(r,n)),e.length=(r,n)=>e.check(vs(r,n)),e.unwrap=()=>e.element});function Q(e,t){return Ny(JT,e,t)}var Xy=b("ZodObject",(e,t)=>{ds.init(e,t),be.init(e,t),Y.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>et(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ge()}),e.loose=()=>e.clone({...e._zod.def,catchall:ge()}),e.strict=()=>e.clone({...e._zod.def,catchall:WT()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Y.extend(e,r),e.merge=r=>Y.merge(e,r),e.pick=r=>Y.pick(e,r),e.omit=r=>Y.omit(e,r),e.partial=(...r)=>Y.partial(r_,e,r[0]),e.required=(...r)=>Y.required(n_,e,r[0])});function z(e,t){let r={type:"object",get shape(){return Y.assignProp(this,"shape",{...e}),this.shape},...Y.normalizeParams(t)};return new Xy(r)}function Ve(e,t){return new Xy({type:"object",get shape(){return Y.assignProp(this,"shape",{...e}),this.shape},catchall:ge(),...Y.normalizeParams(t)})}var e_=b("ZodUnion",(e,t)=>{fs.init(e,t),be.init(e,t),e.options=t.options});function le(e,t){return new e_({type:"union",options:e,...Y.normalizeParams(t)})}var YT=b("ZodDiscriminatedUnion",(e,t)=>{e_.init(e,t),hl.init(e,t)});function Sp(e,t,r){return new YT({type:"union",options:t,discriminator:e,...Y.normalizeParams(r)})}var QT=b("ZodIntersection",(e,t)=>{ml.init(e,t),be.init(e,t)});function Ts(e,t){return new QT({type:"intersection",left:e,right:t})}var XT=b("ZodRecord",(e,t)=>{gl.init(e,t),be.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function ye(e,t,r){return new XT({type:"record",keyType:e,valueType:t,...Y.normalizeParams(r)})}var bp=b("ZodEnum",(e,t)=>{yl.init(e,t),be.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new bp({...t,checks:[],...Y.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new bp({...t,checks:[],...Y.normalizeParams(o),entries:i})}});function et(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new bp({type:"enum",entries:r,...Y.normalizeParams(t)})}var e$=b("ZodLiteral",(e,t)=>{_l.init(e,t),be.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function O(e,t){return new e$({type:"literal",values:Array.isArray(e)?e:[e],...Y.normalizeParams(t)})}var t$=b("ZodTransform",(e,t)=>{vl.init(e,t),be.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(Y.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(Y.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function t_(e){return new t$({type:"transform",transform:e})}var r_=b("ZodOptional",(e,t)=>{xl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xe(e){return new r_({type:"optional",innerType:e})}var r$=b("ZodNullable",(e,t)=>{bl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jy(e){return new r$({type:"nullable",innerType:e})}var n$=b("ZodDefault",(e,t)=>{kl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function o$(e,t){return new n$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var i$=b("ZodPrefault",(e,t)=>{wl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType});function s$(e,t){return new i$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var n_=b("ZodNonOptional",(e,t)=>{Sl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType});function a$(e,t){return new n_({type:"nonoptional",innerType:e,...Y.normalizeParams(t)})}var c$=b("ZodCatch",(e,t)=>{Tl.init(e,t),be.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function u$(e,t){return new c$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var l$=b("ZodPipe",(e,t)=>{$l.init(e,t),be.init(e,t),e.in=t.in,e.out=t.out});function kp(e,t){return new l$({type:"pipe",in:e,out:t})}var p$=b("ZodReadonly",(e,t)=>{Pl.init(e,t),be.init(e,t)});function d$(e){return new p$({type:"readonly",innerType:e})}var o_=b("ZodCustom",(e,t)=>{El.init(e,t),be.init(e,t)});function f$(e){let t=new Ie({check:"custom"});return t._zod.check=e,t}function i_(e,t){return fp(o_,e??(()=>!0),t)}function h$(e,t={}){return hp(o_,e,t)}function m$(e){let t=f$(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Y.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(Y.issue(o))}},e(r.value,r)));return t}function Tp(e,t){return kp(t_(e),t)}st(zy());var Pp="2025-11-25";var s_=[Pp,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],kr="io.modelcontextprotocol/related-task",Ps="2.0",Re=i_(e=>e!==null&&(typeof e=="object"||typeof e=="function")),a_=le([x(),oe().int()]),c_=x(),M9=Ve({ttl:le([oe(),wp()]).optional(),pollInterval:oe().optional()}),g$=z({ttl:oe().optional()}),y$=z({taskId:x()}),Ep=Ve({progressToken:a_.optional(),[kr]:y$.optional()}),ct=z({_meta:Ep.optional()}),Uo=ct.extend({task:g$.optional()}),u_=e=>Uo.safeParse(e).success,Oe=z({method:x(),params:ct.loose().optional()}),gt=z({_meta:Ep.optional()}),yt=z({method:x(),params:gt.loose().optional()}),Ae=Ve({_meta:Ep.optional()}),Es=le([x(),oe().int()]),l_=z({jsonrpc:O(Ps),id:Es,...Oe.shape}).strict(),zp=e=>l_.safeParse(e).success,p_=z({jsonrpc:O(Ps),...yt.shape}).strict(),d_=e=>p_.safeParse(e).success,Cp=z({jsonrpc:O(Ps),id:Es,result:Ae}).strict(),Bo=e=>Cp.safeParse(e).success;var D;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(D||(D={}));var Ip=z({jsonrpc:O(Ps),id:Es.optional(),error:z({code:oe().int(),message:x(),data:ge().optional()})}).strict();var f_=e=>Ip.safeParse(e).success;var h_=le([l_,p_,Cp,Ip]),D9=le([Cp,Ip]),zs=Ae.strict(),_$=gt.extend({requestId:Es.optional(),reason:x().optional()}),Cs=yt.extend({method:O("notifications/cancelled"),params:_$}),v$=z({src:x(),mimeType:x().optional(),sizes:Q(x()).optional(),theme:et(["light","dark"]).optional()}),Vo=z({icons:Q(v$).optional()}),Un=z({name:x(),title:x().optional()}),m_=Un.extend({...Un.shape,...Vo.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),x$=Ts(z({applyDefaults:ze().optional()}),ye(x(),ge())),b$=Tp(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ts(z({form:x$.optional(),url:Re.optional()}),ye(x(),ge()).optional())),k$=Ve({list:Re.optional(),cancel:Re.optional(),requests:Ve({sampling:Ve({createMessage:Re.optional()}).optional(),elicitation:Ve({create:Re.optional()}).optional()}).optional()}),w$=Ve({list:Re.optional(),cancel:Re.optional(),requests:Ve({tools:Ve({call:Re.optional()}).optional()}).optional()}),S$=z({experimental:ye(x(),Re).optional(),sampling:z({context:Re.optional(),tools:Re.optional()}).optional(),elicitation:b$.optional(),roots:z({listChanged:ze().optional()}).optional(),tasks:k$.optional()}),T$=ct.extend({protocolVersion:x(),capabilities:S$,clientInfo:m_}),Rp=Oe.extend({method:O("initialize"),params:T$});var $$=z({experimental:ye(x(),Re).optional(),logging:Re.optional(),completions:Re.optional(),prompts:z({listChanged:ze().optional()}).optional(),resources:z({subscribe:ze().optional(),listChanged:ze().optional()}).optional(),tools:z({listChanged:ze().optional()}).optional(),tasks:w$.optional()}),P$=Ae.extend({protocolVersion:x(),capabilities:$$,serverInfo:m_,instructions:x().optional()}),Op=yt.extend({method:O("notifications/initialized"),params:gt.optional()});var Is=Oe.extend({method:O("ping"),params:ct.optional()}),E$=z({progress:oe(),total:xe(oe()),message:xe(x())}),z$=z({...gt.shape,...E$.shape,progressToken:a_}),Rs=yt.extend({method:O("notifications/progress"),params:z$}),C$=ct.extend({cursor:c_.optional()}),Ho=Oe.extend({params:C$.optional()}),Go=Ae.extend({nextCursor:c_.optional()}),I$=et(["working","input_required","completed","failed","cancelled"]),Ko=z({taskId:x(),status:I$,ttl:le([oe(),wp()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:xe(oe()),statusMessage:xe(x())}),Bn=Ae.extend({task:Ko}),R$=gt.merge(Ko),Wo=yt.extend({method:O("notifications/tasks/status"),params:R$}),Os=Oe.extend({method:O("tasks/get"),params:ct.extend({taskId:x()})}),As=Ae.merge(Ko),Ns=Oe.extend({method:O("tasks/result"),params:ct.extend({taskId:x()})}),L9=Ae.loose(),js=Ho.extend({method:O("tasks/list")}),Ms=Go.extend({tasks:Q(Ko)}),Ds=Oe.extend({method:O("tasks/cancel"),params:ct.extend({taskId:x()})}),g_=Ae.merge(Ko),y_=z({uri:x(),mimeType:xe(x()),_meta:ye(x(),ge()).optional()}),__=y_.extend({text:x()}),Ap=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),v_=y_.extend({blob:Ap}),Jo=et(["user","assistant"]),Vn=z({audience:Q(Jo).optional(),priority:oe().min(0).max(1).optional(),lastModified:qo.datetime({offset:!0}).optional()}),x_=z({...Un.shape,...Vo.shape,uri:x(),description:xe(x()),mimeType:xe(x()),annotations:Vn.optional(),_meta:xe(Ve({}))}),O$=z({...Un.shape,...Vo.shape,uriTemplate:x(),description:xe(x()),mimeType:xe(x()),annotations:Vn.optional(),_meta:xe(Ve({}))}),Ls=Ho.extend({method:O("resources/list")}),A$=Go.extend({resources:Q(x_)}),Zs=Ho.extend({method:O("resources/templates/list")}),N$=Go.extend({resourceTemplates:Q(O$)}),Np=ct.extend({uri:x()}),j$=Np,qs=Oe.extend({method:O("resources/read"),params:j$}),M$=Ae.extend({contents:Q(le([__,v_]))}),D$=yt.extend({method:O("notifications/resources/list_changed"),params:gt.optional()}),L$=Np,Z$=Oe.extend({method:O("resources/subscribe"),params:L$}),q$=Np,F$=Oe.extend({method:O("resources/unsubscribe"),params:q$}),U$=gt.extend({uri:x()}),B$=yt.extend({method:O("notifications/resources/updated"),params:U$}),V$=z({name:x(),description:xe(x()),required:xe(ze())}),H$=z({...Un.shape,...Vo.shape,description:xe(x()),arguments:xe(Q(V$)),_meta:xe(Ve({}))}),Fs=Ho.extend({method:O("prompts/list")}),G$=Go.extend({prompts:Q(H$)}),K$=ct.extend({name:x(),arguments:ye(x(),x()).optional()}),Us=Oe.extend({method:O("prompts/get"),params:K$}),jp=z({type:O("text"),text:x(),annotations:Vn.optional(),_meta:ye(x(),ge()).optional()}),Mp=z({type:O("image"),data:Ap,mimeType:x(),annotations:Vn.optional(),_meta:ye(x(),ge()).optional()}),Dp=z({type:O("audio"),data:Ap,mimeType:x(),annotations:Vn.optional(),_meta:ye(x(),ge()).optional()}),W$=z({type:O("tool_use"),name:x(),id:x(),input:ye(x(),ge()),_meta:ye(x(),ge()).optional()}),J$=z({type:O("resource"),resource:le([__,v_]),annotations:Vn.optional(),_meta:ye(x(),ge()).optional()}),Y$=x_.extend({type:O("resource_link")}),Lp=le([jp,Mp,Dp,Y$,J$]),Q$=z({role:Jo,content:Lp}),X$=Ae.extend({description:x().optional(),messages:Q(Q$)}),eP=yt.extend({method:O("notifications/prompts/list_changed"),params:gt.optional()}),tP=z({title:x().optional(),readOnlyHint:ze().optional(),destructiveHint:ze().optional(),idempotentHint:ze().optional(),openWorldHint:ze().optional()}),rP=z({taskSupport:et(["required","optional","forbidden"]).optional()}),b_=z({...Un.shape,...Vo.shape,description:x().optional(),inputSchema:z({type:O("object"),properties:ye(x(),Re).optional(),required:Q(x()).optional()}).catchall(ge()),outputSchema:z({type:O("object"),properties:ye(x(),Re).optional(),required:Q(x()).optional()}).catchall(ge()).optional(),annotations:tP.optional(),execution:rP.optional(),_meta:ye(x(),ge()).optional()}),Bs=Ho.extend({method:O("tools/list")}),nP=Go.extend({tools:Q(b_)}),Vs=Ae.extend({content:Q(Lp).default([]),structuredContent:ye(x(),ge()).optional(),isError:ze().optional()}),Z9=Vs.or(Ae.extend({toolResult:ge()})),oP=Uo.extend({name:x(),arguments:ye(x(),ge()).optional()}),Hn=Oe.extend({method:O("tools/call"),params:oP}),iP=yt.extend({method:O("notifications/tools/list_changed"),params:gt.optional()}),q9=z({autoRefresh:ze().default(!0),debounceMs:oe().int().nonnegative().default(300)}),Yo=et(["debug","info","notice","warning","error","critical","alert","emergency"]),sP=ct.extend({level:Yo}),Zp=Oe.extend({method:O("logging/setLevel"),params:sP}),aP=gt.extend({level:Yo,logger:x().optional(),data:ge()}),cP=yt.extend({method:O("notifications/message"),params:aP}),uP=z({name:x().optional()}),lP=z({hints:Q(uP).optional(),costPriority:oe().min(0).max(1).optional(),speedPriority:oe().min(0).max(1).optional(),intelligencePriority:oe().min(0).max(1).optional()}),pP=z({mode:et(["auto","required","none"]).optional()}),dP=z({type:O("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:Q(Lp).default([]),structuredContent:z({}).loose().optional(),isError:ze().optional(),_meta:ye(x(),ge()).optional()}),fP=Sp("type",[jp,Mp,Dp]),$s=Sp("type",[jp,Mp,Dp,W$,dP]),hP=z({role:Jo,content:le([$s,Q($s)]),_meta:ye(x(),ge()).optional()}),mP=Uo.extend({messages:Q(hP),modelPreferences:lP.optional(),systemPrompt:x().optional(),includeContext:et(["none","thisServer","allServers"]).optional(),temperature:oe().optional(),maxTokens:oe().int(),stopSequences:Q(x()).optional(),metadata:Re.optional(),tools:Q(b_).optional(),toolChoice:pP.optional()}),gP=Oe.extend({method:O("sampling/createMessage"),params:mP}),qp=Ae.extend({model:x(),stopReason:xe(et(["endTurn","stopSequence","maxTokens"]).or(x())),role:Jo,content:fP}),Fp=Ae.extend({model:x(),stopReason:xe(et(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Jo,content:le([$s,Q($s)])}),yP=z({type:O("boolean"),title:x().optional(),description:x().optional(),default:ze().optional()}),_P=z({type:O("string"),title:x().optional(),description:x().optional(),minLength:oe().optional(),maxLength:oe().optional(),format:et(["email","uri","date","date-time"]).optional(),default:x().optional()}),vP=z({type:et(["number","integer"]),title:x().optional(),description:x().optional(),minimum:oe().optional(),maximum:oe().optional(),default:oe().optional()}),xP=z({type:O("string"),title:x().optional(),description:x().optional(),enum:Q(x()),default:x().optional()}),bP=z({type:O("string"),title:x().optional(),description:x().optional(),oneOf:Q(z({const:x(),title:x()})),default:x().optional()}),kP=z({type:O("string"),title:x().optional(),description:x().optional(),enum:Q(x()),enumNames:Q(x()).optional(),default:x().optional()}),wP=le([xP,bP]),SP=z({type:O("array"),title:x().optional(),description:x().optional(),minItems:oe().optional(),maxItems:oe().optional(),items:z({type:O("string"),enum:Q(x())}),default:Q(x()).optional()}),TP=z({type:O("array"),title:x().optional(),description:x().optional(),minItems:oe().optional(),maxItems:oe().optional(),items:z({anyOf:Q(z({const:x(),title:x()}))}),default:Q(x()).optional()}),$P=le([SP,TP]),PP=le([kP,wP,$P]),EP=le([PP,yP,_P,vP]),zP=Uo.extend({mode:O("form").optional(),message:x(),requestedSchema:z({type:O("object"),properties:ye(x(),EP),required:Q(x()).optional()})}),CP=Uo.extend({mode:O("url"),message:x(),elicitationId:x(),url:x().url()}),IP=le([zP,CP]),RP=Oe.extend({method:O("elicitation/create"),params:IP}),OP=gt.extend({elicitationId:x()}),AP=yt.extend({method:O("notifications/elicitation/complete"),params:OP}),Hs=Ae.extend({action:et(["accept","decline","cancel"]),content:Tp(e=>e===null?void 0:e,ye(x(),le([x(),oe(),ze(),Q(x())])).optional())}),NP=z({type:O("ref/resource"),uri:x()});var jP=z({type:O("ref/prompt"),name:x()}),MP=ct.extend({ref:le([jP,NP]),argument:z({name:x(),value:x()}),context:z({arguments:ye(x(),x()).optional()}).optional()}),Gs=Oe.extend({method:O("completion/complete"),params:MP});function k_(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function w_(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var DP=Ae.extend({completion:Ve({values:Q(x()).max(100),total:xe(oe().int()),hasMore:xe(ze())})}),LP=z({uri:x().startsWith("file://"),name:x().optional(),_meta:ye(x(),ge()).optional()}),ZP=Oe.extend({method:O("roots/list"),params:ct.optional()}),Up=Ae.extend({roots:Q(LP)}),qP=yt.extend({method:O("notifications/roots/list_changed"),params:gt.optional()}),F9=le([Is,Rp,Gs,Zp,Us,Fs,Ls,Zs,qs,Z$,F$,Hn,Bs,Os,Ns,js,Ds]),U9=le([Cs,Rs,Op,qP,Wo]),B9=le([zs,qp,Fp,Hs,Up,As,Ms,Bn]),V9=le([Is,gP,RP,ZP,Os,Ns,js,Ds]),H9=le([Cs,Rs,cP,B$,D$,iP,eP,Wo,AP]),G9=le([zs,P$,DP,X$,G$,A$,N$,M$,Vs,nP,As,Ms,Bn]),R=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===D.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new $p(o.elicitations,r)}return new e(t,r,n)}},$p=class extends R{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(D.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function wr(e){return e==="completed"||e==="failed"||e==="cancelled"}var T_=Symbol("Let zodToJsonSchema decide on which parser to use");var S_={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"},$_=e=>typeof e=="string"?{...S_,name:e}:{...S_,...e};var P_=e=>{let t=$_(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}};function Bp(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function X(e,t,r,n,o){e[t]=r,Bp(e,t,n,o)}var Ks=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function _e(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Ks(t,e.currentPath):t.join("/")}}function E_(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==T.ZodAny&&(r.items=q(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&X(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&X(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(X(r,"minItems",e.exactLength.value,e.exactLength.message,t),X(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function z_(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?X(r,"minimum",n.value,n.message,t):X(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),X(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?X(r,"maximum",n.value,n.message,t):X(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),X(r,"maximum",n.value,n.message,t));break;case"multipleOf":X(r,"multipleOf",n.value,n.message,t);break}return r}function C_(){return{type:"boolean"}}function Ws(e,t){return q(e.type._def,t)}var I_=(e,t)=>q(e.innerType._def,t);function Vp(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>Vp(e,t,o))};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 FP(e,t)}}var FP=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":X(r,"minimum",n.value,n.message,t);break;case"max":X(r,"maximum",n.value,n.message,t);break}return r};function R_(e,t){return{...q(e.innerType._def,t),default:e.defaultValue()}}function O_(e,t){return t.effectStrategy==="input"?q(e.schema._def,t):_e(t)}function A_(e){return{type:"string",enum:Array.from(e.values)}}var UP=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function N_(e,t){let r=[q(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),q(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return r.forEach(i=>{if(UP(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else n=void 0;o.push(s)}}),o.length?{allOf:o,...n}:void 0}function j_(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Hp,Pt={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:()=>(Hp===void 0&&(Hp=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hp),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-_]*$/};function Js(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":X(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":X(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Et(r,"email",n.message,t);break;case"format:idn-email":Et(r,"idn-email",n.message,t);break;case"pattern:zod":He(r,Pt.email,n.message,t);break}break;case"url":Et(r,"uri",n.message,t);break;case"uuid":Et(r,"uuid",n.message,t);break;case"regex":He(r,n.regex,n.message,t);break;case"cuid":He(r,Pt.cuid,n.message,t);break;case"cuid2":He(r,Pt.cuid2,n.message,t);break;case"startsWith":He(r,RegExp(`^${Gp(n.value,t)}`),n.message,t);break;case"endsWith":He(r,RegExp(`${Gp(n.value,t)}$`),n.message,t);break;case"datetime":Et(r,"date-time",n.message,t);break;case"date":Et(r,"date",n.message,t);break;case"time":Et(r,"time",n.message,t);break;case"duration":Et(r,"duration",n.message,t);break;case"length":X(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),X(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{He(r,RegExp(Gp(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Et(r,"ipv4",n.message,t),n.version!=="v4"&&Et(r,"ipv6",n.message,t);break}case"base64url":He(r,Pt.base64url,n.message,t);break;case"jwt":He(r,Pt.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&He(r,Pt.ipv4Cidr,n.message,t),n.version!=="v4"&&He(r,Pt.ipv6Cidr,n.message,t);break}case"emoji":He(r,Pt.emoji(),n.message,t);break;case"ulid":{He(r,Pt.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Et(r,"binary",n.message,t);break}case"contentEncoding:base64":{X(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{He(r,Pt.base64,n.message,t);break}}break}case"nanoid":He(r,Pt.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Gp(e,t){return t.patternStrategy==="escape"?VP(e):e}var BP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function VP(e){let t="";for(let r=0;r<e.length;r++)BP.has(e[r])||(t+="\\"),t+=e[r];return t}function Et(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):X(e,"format",t,r,n)}function He(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:M_(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):X(e,"pattern",M_(t,n),r,n)}function M_(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,o="",i=!1,s=!1,a=!1;for(let c=0;c<n.length;c++){if(i){o+=n[c],i=!1;continue}if(r.i){if(s){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
|
|
60
|
+
]))`;continue}else if(n[c]==="$"){o+=`($|(?=[\r
|
|
61
|
+
]))`;continue}}if(r.s&&n[c]==="."){o+=s?`${n[c]}\r
|
|
62
|
+
`:`[${n[c]}\r
|
|
63
|
+
]`;continue}o+=n[c],n[c]==="\\"?i=!0:s&&n[c]==="]"?s=!1:!s&&n[c]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}function Ys(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===T.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:q(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??_e(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:q(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===T.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Js(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===T.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===T.ZodBranded&&e.keyType._def.type._def.typeName===T.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=Ws(e.keyType._def,t);return{...r,propertyNames:o}}}return r}function D_(e,t){if(t.mapStrategy==="record")return Ys(e,t);let r=q(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||_e(t),n=q(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||_e(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function L_(e){let t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),o=Array.from(new Set(n.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}function Z_(e){return e.target==="openAi"?void 0:{not:_e({...e,currentPath:[...e.currentPath,"not"]})}}function q_(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Qo={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function U_(e,t){if(t.target==="openApi3")return F_(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in Qo&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=Qo[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(n.length===r.length){let o=n.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(i=>!n.includes(i))],[])};return F_(e,t)}var F_=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>q(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function B_(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Qo[e.innerType._def.typeName],nullable:!0}:{type:[Qo[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=q(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=q(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function V_(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",Bp(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?X(r,"minimum",n.value,n.message,t):X(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),X(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?X(r,"maximum",n.value,n.message,t):X(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),X(r,"maximum",n.value,n.message,t));break;case"multipleOf":X(r,"multipleOf",n.value,n.message,t);break}return r}function H_(e,t){let r=t.target==="openAi",n={type:"object",properties:{}},o=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=GP(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=q(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});p!==void 0&&(n.properties[a]=p,u||o.push(a))}o.length&&(n.required=o);let s=HP(e,t);return s!==void 0&&(n.additionalProperties=s),n}function HP(e,t){if(e.catchall._def.typeName!=="ZodNever")return q(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function GP(e){try{return e.isOptional()}catch{return!0}}var G_=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return q(e.innerType._def,t);let r=q(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:_e(t)},r]}:_e(t)};var K_=(e,t)=>{if(t.pipeStrategy==="input")return q(e.in._def,t);if(t.pipeStrategy==="output")return q(e.out._def,t);let r=q(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=q(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}};function W_(e,t){return q(e.type._def,t)}function J_(e,t){let n={type:"array",uniqueItems:!0,items:q(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&X(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&X(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}function Y_(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>q(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:q(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>q(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function Q_(e){return{not:_e(e)}}function X_(e){return _e(e)}var ev=(e,t)=>q(e.innerType._def,t);var tv=(e,t,r)=>{switch(t){case T.ZodString:return Js(e,r);case T.ZodNumber:return V_(e,r);case T.ZodObject:return H_(e,r);case T.ZodBigInt:return z_(e,r);case T.ZodBoolean:return C_();case T.ZodDate:return Vp(e,r);case T.ZodUndefined:return Q_(r);case T.ZodNull:return q_(r);case T.ZodArray:return E_(e,r);case T.ZodUnion:case T.ZodDiscriminatedUnion:return U_(e,r);case T.ZodIntersection:return N_(e,r);case T.ZodTuple:return Y_(e,r);case T.ZodRecord:return Ys(e,r);case T.ZodLiteral:return j_(e,r);case T.ZodEnum:return A_(e);case T.ZodNativeEnum:return L_(e);case T.ZodNullable:return B_(e,r);case T.ZodOptional:return G_(e,r);case T.ZodMap:return D_(e,r);case T.ZodSet:return J_(e,r);case T.ZodLazy:return()=>e.getter()._def;case T.ZodPromise:return W_(e,r);case T.ZodNaN:case T.ZodNever:return Z_(r);case T.ZodEffects:return O_(e,r);case T.ZodAny:return _e(r);case T.ZodUnknown:return X_(r);case T.ZodDefault:return R_(e,r);case T.ZodBranded:return Ws(e,r);case T.ZodReadonly:return ev(e,r);case T.ZodCatch:return I_(e,r);case T.ZodPipeline:return K_(e,r);case T.ZodFunction:case T.ZodVoid:case T.ZodSymbol:return;default:return(n=>{})(t)}};function q(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==T_)return a}if(n&&!r){let a=KP(n,t);if(a!==void 0)return a}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let i=tv(e,e.typeName,t),s=typeof i=="function"?q(i(),t):i;if(s&&WP(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var KP=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ks(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),_e(t)):t.$refStrategy==="seen"?_e(t):void 0}},WP=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Kp=(e,t)=>{let r=P_(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:q(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??_e(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=q(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??_e(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),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 a=o===void 0?n?{...i,[r.definitionPath]:n}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...n,[o]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function JP(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Wp(e,t){return mt(e)?mp(e,{target:JP(t?.target),io:t?.pipeStrategy??"input"}):Kp(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Jp(e){let r=br(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=ws(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function Yp(e,t){let r=xr(e,t);if(!r.success)throw r.error;return r.data}var YP=6e4,Qs=class{constructor(t){this._options=t,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(Cs,r=>{this._oncancel(r)}),this.setNotificationHandler(Rs,r=>{this._onprogress(r)}),this.setRequestHandler(Is,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Os,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new R(D.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(Ns,async(r,n)=>{let o=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,p=this._requestResolvers.get(u);if(p)if(this._requestResolvers.delete(u),a.type==="response")p(c);else{let l=c,d=new R(l.error.code,l.error.message,l.error.data);p(d)}else{let l=a.type==="response"?"Response":"Error";this._onerror(new Error(`${l} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:n.requestId})}}let s=await this._taskStore.getTask(i,n.sessionId);if(!s)throw new R(D.InvalidParams,`Task not found: ${i}`);if(!wr(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(wr(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[kr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(js,async(r,n)=>{try{let{tasks:o,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new R(D.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(Ds,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new R(D.InvalidParams,`Task not found: ${r.params.taskId}`);if(wr(o.status))throw new R(D.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new R(D.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof R?o:new R(D.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),R.fromError(D.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){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=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let o=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{o?.(i,s),Bo(i)||f_(i)?this._onresponse(i):zp(i)?this._onrequest(i,s):d_(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=R.fromError(D.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[kr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:D.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(l=>this._onerror(new Error(`Failed to enqueue error response: ${l}`))):o?.send(p).catch(l=>this._onerror(new Error(`Failed to send an error response: ${l}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=u_(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,u={signal:s.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async p=>{if(s.signal.aborted)return;let l={relatedRequestId:t.id};i&&(l.relatedTask={taskId:i}),await this.notification(p,l)},sendRequest:async(p,l,d)=>{if(s.signal.aborted)throw new R(D.ConnectionClosed,"Request was cancelled");let h={...d,relatedRequestId:t.id};i&&!h.relatedTask&&(h.relatedTask={taskId:i});let f=h.relatedTask?.taskId??i;return f&&c&&await c.updateTaskStatus(f,"input_required"),await this.request(p,l,h)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,u)).then(async p=>{if(s.signal.aborted)return;let l={result:p,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)},async p=>{if(s.signal.aborted)return;let l={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(p.code)?p.code:D.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Bo(t))n(t);else{let s=new R(t.error.code,t.error.message,t.error.data);n(s)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Bo(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),Bo(t))o(t);else{let s=R.fromError(t.error.code,t.error.message,t.error.data);o(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(t,r,n)}}catch(s){yield{type:"error",error:s instanceof R?s:new R(D.InternalError,String(s))}}return}let i;try{let s=await this.request(t,Bn,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new R(D.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},wr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new R(D.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new R(D.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof R?s:new R(D.InternalError,String(s))}}}request(t,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=n??{};return new Promise((u,p)=>{let l=_=>{p(_)};if(!this._transport){l(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(_){l(_);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,h={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),h.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...h.params?._meta||{},[kr]:c}});let f=_=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(_)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch($=>this._onerror(new Error(`Failed to send cancellation: ${$}`)));let S=_ instanceof R?_:new R(D.RequestTimeout,String(_));p(S)};this._responseHandlers.set(d,_=>{if(!n?.signal?.aborted){if(_ instanceof Error)return p(_);try{let S=xr(r,_.result);S.success?u(S.data):p(S.error)}catch(S){p(S)}}}),n?.signal?.addEventListener("abort",()=>{f(n?.signal?.reason)});let m=n?.timeout??YP,y=()=>f(R.fromError(D.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(d,m,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let v=c?.taskId;if(v){let _=S=>{let $=this._responseHandlers.get(d);$?$(S):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,_),this._enqueueTaskMessage(v,{type:"request",message:h,timestamp:Date.now()}).catch(S=>{this._cleanupTimeout(d),p(S)})}else this._transport.send(h,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(_=>{this._cleanupTimeout(d),p(_)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},As,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Ms,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},g_,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[kr]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[kr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[kr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=Jp(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=Yp(t,o);return Promise.resolve(r(s,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=Jp(t);this._notificationHandlers.set(n,o=>{let i=Yp(t,o);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,n,o)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let o of n)if(o.type==="request"&&zp(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new R(D.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,i)=>{if(r.aborted){i(new R(D.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new R(D.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await n.createTask(o,t.id,{method:t.method,params:t.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new R(D.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await n.storeTaskResult(o,i,s,r);let a=await n.getTask(o,r);if(a){let c=Wo.parse({method:"notifications/tasks/status",params:a});await this.notification(c),wr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,s)=>{let a=await n.getTask(o,r);if(!a)throw new R(D.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(wr(a.status))throw new R(D.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,s,r);let c=await n.getTask(o,r);if(c){let u=Wo.parse({method:"notifications/tasks/status",params:c});await this.notification(u),wr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function rv(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function nv(e,t){let r={...e};for(let n in t){let o=n,i=t[o];if(i===void 0)continue;let s=r[o];rv(s)&&rv(i)?r[o]={...s,...i}:r[o]=i}return r}var Ux=mu(Mf(),1),Bx=mu(Fx(),1);function q4(){let e=new Ux.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Bx.default)(e),e}var Na=class{constructor(t){this._ajv=t??q4()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var ja=class{constructor(t){this._server=t}requestStream(t,r,n){return this._server.requestStream(t,r,n)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._server.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}};function Vx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Hx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Ma=class extends Qs{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Yo.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new Na,this.setRequestHandler(Rp,n=>this._oninitialize(n)),this.setNotificationHandler(Op,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Zp,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Yo.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new ja(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=nv(this._capabilities,t)}setRequestHandler(t,r){let o=br(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(mt(o)){let a=o;i=a._zod?.def?.value??a.value}else{let a=o;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let p=xr(Hn,c);if(!p.success){let f=p.error instanceof Error?p.error.message:String(p.error);throw new R(D.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let f=xr(Bn,d);if(!f.success){let m=f.error instanceof Error?f.error.message:String(f.error);throw new R(D.InvalidParams,`Invalid task creation result: ${m}`)}return f.data}let h=xr(Vs,d);if(!h.success){let f=h.error instanceof Error?h.error.message:String(h.error);throw new R(D.InvalidParams,`Invalid tools/call result: ${f}`)}return h.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Hx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Vx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:s_.includes(r)?r:Pp,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},zs)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],i=o.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(o.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(a.filter(l=>l.type==="tool_use").map(l=>l.id)),p=new Set(o.filter(l=>l.type==="tool_result").map(l=>l.toolUseId));if(u.size!==p.size||![...u].every(l=>p.has(l)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Fp,r):this.request({method:"sampling/createMessage",params:t},qp,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let o=t;return this.request({method:"elicitation/create",params:o},Hs,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let o=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:o},Hs,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new R(D.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof R?s:new R(D.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Up,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Kx=Symbol.for("mcp.completable");function Vf(e){return!!e&&typeof e=="object"&&Kx in e}function Wx(e){return e[Kx]?.complete}var Gx;(function(e){e.Completable="McpCompletable"})(Gx||(Gx={}));var Da=class e{static isTemplate(t){return/\{[^}\s]+\}/.test(t)}static validateLength(t,r,n){if(t.length>r)throw new Error(`${n} exceeds maximum length of ${r} characters (got ${t.length})`)}get variableNames(){return this.parts.flatMap(t=>typeof t=="string"?[]:t.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],n="",o=0,i=0;for(;o<t.length;)if(t[o]==="{"){n&&(r.push(n),n="");let s=t.indexOf("}",o);if(s===-1)throw new Error("Unclosed template expression");if(i++,i>1e4)throw new Error("Template contains too many expressions (max 10000)");let a=t.slice(o+1,s),c=this.getOperator(a),u=a.includes("*"),p=this.getNames(a),l=p[0];for(let d of p)e.validateLength(d,1e6,"Variable name");r.push({name:l,operator:c,names:p,exploded:u}),o=s+1}else n+=t[o],o++;return n&&r.push(n),r}getOperator(t){return["+","#",".","/","?","&"].find(n=>t.startsWith(n))||""}getNames(t){let r=this.getOperator(t);return t.slice(r.length).split(",").map(n=>n.replace("*","").trim()).filter(n=>n.length>0)}encodeValue(t,r){return e.validateLength(t,1e6,"Variable value"),r==="+"||r==="#"?encodeURI(t):encodeURIComponent(t)}expandPart(t,r){if(t.operator==="?"||t.operator==="&"){let s=t.names.map(c=>{let u=r[c];if(u===void 0)return"";let p=Array.isArray(u)?u.map(l=>this.encodeValue(l,t.operator)).join(","):this.encodeValue(u.toString(),t.operator);return`${c}=${p}`}).filter(c=>c.length>0);return s.length===0?"":(t.operator==="?"?"?":"&")+s.join("&")}if(t.names.length>1){let s=t.names.map(a=>r[a]).filter(a=>a!==void 0);return s.length===0?"":s.map(a=>Array.isArray(a)?a[0]:a).join(",")}let n=r[t.name];if(n===void 0)return"";let i=(Array.isArray(n)?n:[n]).map(s=>this.encodeValue(s,t.operator));switch(t.operator){case"":return i.join(",");case"+":return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/");default:return i.join(",")}}expand(t){let r="",n=!1;for(let o of this.parts){if(typeof o=="string"){r+=o;continue}let i=this.expandPart(o,t);i&&((o.operator==="?"||o.operator==="&")&&n?r+=i.replace("?","&"):r+=i,(o.operator==="?"||o.operator==="&")&&(n=!0))}return r}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}partToRegExp(t){let r=[];for(let i of t.names)e.validateLength(i,1e6,"Variable name");if(t.operator==="?"||t.operator==="&"){for(let i=0;i<t.names.length;i++){let s=t.names[i],a=i===0?"\\"+t.operator:"&";r.push({pattern:a+this.escapeRegExp(s)+"=([^&]+)",name:s})}return r}let n,o=t.name;switch(t.operator){case"":n=t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)";break;case"+":case"#":n="(.+)";break;case".":n="\\.([^/,]+)";break;case"/":n="/"+(t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)");break;default:n="([^/]+)"}return r.push({pattern:n,name:o}),r}match(t){e.validateLength(t,1e6,"URI");let r="^",n=[];for(let a of this.parts)if(typeof a=="string")r+=this.escapeRegExp(a);else{let c=this.partToRegExp(a);for(let{pattern:u,name:p}of c)r+=u,n.push({name:p,exploded:a.exploded})}r+="$",e.validateLength(r,1e6,"Generated regex pattern");let o=new RegExp(r),i=t.match(o);if(!i)return null;let s={};for(let a=0;a<n.length;a++){let{name:c,exploded:u}=n[a],p=i[a+1],l=c.replace("*","");u&&p.includes(",")?s[l]=p.split(","):s[l]=p}return s}};var F4=/^[A-Za-z0-9._-]{1,128}$/;function U4(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!F4.test(e)){let r=e.split("").filter(n=>!/[A-Za-z0-9._-]/.test(n)).filter((n,o,i)=>i.indexOf(n)===o);return t.push(`Tool name contains invalid characters: ${r.map(n=>`"${n}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function B4(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Hf(e){let t=U4(e);return B4(e,t.warnings),t.isValid}var La=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,n){let o={taskSupport:"required",...r.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,o,r._meta,n)}};var Za=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Ma(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new La(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Rr(Bs)),this.server.assertCanSetRequestHandler(Rr(Hn)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Bs,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let n={name:t,title:r.title,description:r.description,inputSchema:(()=>{let o=Fn(r.inputSchema);return o?Wp(o,{strictUnions:!0,pipeStrategy:"input"}):V4})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=Fn(r.outputSchema);o&&(n.outputSchema=Wp(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(Hn,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new R(D.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new R(D.InvalidParams,`Tool ${t.params.name} disabled`);let o=!!t.params.task,i=n.execution?.taskSupport,s="createTask"in n.handler;if((i==="required"||i==="optional")&&!s)throw new R(D.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new R(D.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!o&&s)return await this.handleAutomaticTaskPolling(n,t,r);let a=await this.validateToolInput(n,t.params.arguments,t.params.name),c=await this.executeToolHandler(n,a,r);return o||await this.validateToolOutput(n,c,t.params.name),c}catch(n){if(n instanceof R&&n.code===D.UrlElicitationRequired)throw n;return this.createToolError(n instanceof Error?n.message:String(n))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,n){if(!t.inputSchema)return;let i=Fn(t.inputSchema)??t.inputSchema,s=await bs(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ks(a);throw new R(D.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${c}`)}return s.data}async validateToolOutput(t,r,n){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new R(D.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=Fn(t.outputSchema),i=await bs(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ks(s);throw new R(D.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${a}`)}}async executeToolHandler(t,r,n){let o=t.handler;if("createTask"in o){if(!n.taskStore)throw new Error("No task store provided.");let s={...n,taskStore:n.taskStore};if(t.inputSchema){let a=o;return await Promise.resolve(a.createTask(r,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=o;return await Promise.resolve(s(r,n))}else{let s=o;return await Promise.resolve(s(n))}}async handleAutomaticTaskPolling(t,r,n){if(!n.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...n,taskStore:n.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,p=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(d=>setTimeout(d,p));let l=await n.taskStore.getTask(c);if(!l)throw new R(D.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Rr(Gs)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Gs,async t=>{switch(t.params.ref.type){case"ref/prompt":return k_(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return w_(t),this.handleResourceCompletion(t,t.params.ref);default:throw new R(D.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new R(D.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new R(D.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return Ei;let i=br(n.argsSchema)?.[t.params.argument.name];if(!Vf(i))return Ei;let s=Wx(i);if(!s)return Ei;let a=await s(t.params.argument.value,t.params.context);return Yx(a)}async handleResourceCompletion(t,r){let n=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!n){if(this._registeredResources[r.uri])return Ei;throw new R(D.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return Ei;let i=await o(t.params.argument.value,t.params.context);return Yx(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Rr(Ls)),this.server.assertCanSetRequestHandler(Rr(Zs)),this.server.assertCanSetRequestHandler(Rr(qs)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ls,async(t,r)=>{let n=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler(Zs,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(qs,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new R(D.InvalidParams,`Resource ${n} disabled`);return o.readCallback(n,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(n.toString());if(s)return i.readCallback(n,s,r)}throw new R(D.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Rr(Fs)),this.server.assertCanSetRequestHandler(Rr(Us)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Fs,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?G4(r.argsSchema):void 0}))})),this.server.setRequestHandler(Us,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new R(D.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new R(D.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=Fn(n.argsSchema),i=await bs(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=ks(c);throw new R(D.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=n.callback;return await Promise.resolve(a(s,r))}else{let o=n.callback;return await Promise.resolve(o(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...n){let o;typeof n[0]=="object"&&(o=n.shift());let i=n[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,n,o){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,n,o,i){let s={name:t,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=s,s}_createRegisteredResourceTemplate(t,r,n,o,i){let s={resourceTemplate:n,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!n.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,n,o,i){let s={title:r,description:n,argsSchema:o===void 0?void 0:un(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=un(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,o&&Object.values(o).some(c=>{let u=c instanceof Qe?c._def?.innerType:c;return Vf(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){Hf(t);let p={title:r,description:n,inputSchema:Jx(o),outputSchema:Jx(i),annotations:s,execution:a,_meta:c,handler:u,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(typeof l.name=="string"&&Hf(l.name),delete this._registeredTools[t],l.name&&(this._registeredTools[l.name]=p)),typeof l.title<"u"&&(p.title=l.title),typeof l.description<"u"&&(p.description=l.description),typeof l.paramsSchema<"u"&&(p.inputSchema=un(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=un(l.outputSchema)),typeof l.callback<"u"&&(p.handler=l.callback),typeof l.annotations<"u"&&(p.annotations=l.annotations),typeof l._meta<"u"&&(p._meta=l._meta),typeof l.enabled<"u"&&(p.enabled=l.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let n,o,i,s;if(typeof r[0]=="string"&&(n=r.shift()),r.length>1){let c=r[0];Gf(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Gf(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,n,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,o,i,s,a,c,{taskSupport:"forbidden"},u,n)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let n;typeof r[0]=="string"&&(n=r.shift());let o;r.length>1&&(o=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,n,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:o,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,o,i,s,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},zi=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Da(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},V4={type:"object",properties:{}};function Qx(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function H4(e){return"_def"in e||"_zod"in e||Qx(e)}function Gf(e){return typeof e!="object"||e===null||H4(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(Qx)}function Jx(e){if(e)return Gf(e)?un(e):e}function G4(e){let t=br(e);return t?Object.entries(t).map(([r,n])=>{let o=My(n),i=Dy(n);return{name:r,description:o,required:!i}}):[]}function Rr(e){let r=br(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=ws(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function Yx(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Ei={completion:{values:[],hasMore:!1}};import eb from"node:process";var qa=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
64
|
+
`);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),K4(r)}clear(){this._buffer=void 0}};function K4(e){return h_.parse(JSON.parse(e))}function Xx(e){return JSON.stringify(e)+`
|
|
65
|
+
`}var Fa=class{constructor(t=eb.stdin,r=eb.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new qa,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{this.onerror?.(n)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{let n=Xx(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}};import{readFileSync as sk,existsSync as ak}from"node:fs";import{join as Wa}from"node:path";function gb(e){return typeof e>"u"||e===null}function W4(e){return typeof e=="object"&&e!==null}function J4(e){return Array.isArray(e)?e:gb(e)?[]:[e]}function Y4(e,t){var r,n,o,i;if(t)for(i=Object.keys(t),r=0,n=i.length;r<n;r+=1)o=i[r],e[o]=t[o];return e}function Q4(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function X4(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var eO=gb,tO=W4,rO=J4,nO=Q4,oO=X4,iO=Y4,Ee={isNothing:eO,isObject:tO,toArray:rO,repeat:nO,isNegativeZero:oO,extend:iO};function yb(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
66
|
+
|
|
67
|
+
`+e.mark.snippet),n+" "+r):n}function Ii(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=yb(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ii.prototype=Object.create(Error.prototype);Ii.prototype.constructor=Ii;Ii.prototype.toString=function(t){return this.name+": "+yb(this,t)};var We=Ii;function Kf(e,t,r,n,o){var i="",s="",a=Math.floor(o/2)-1;return n-t>a&&(i=" ... ",t=n-a+i.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+i.length}}function Wf(e,t){return Ee.repeat(" ",t-e.length)+e}function sO(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],i,s=-1;i=r.exec(e.buffer);)o.push(i.index),n.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,u,p=Math.min(e.line+t.linesAfter,o.length).toString().length,l=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)u=Kf(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=Ee.repeat(" ",t.indent)+Wf((e.line-c+1).toString(),p)+" | "+u.str+`
|
|
68
|
+
`+a;for(u=Kf(e.buffer,n[s],o[s],e.position,l),a+=Ee.repeat(" ",t.indent)+Wf((e.line+1).toString(),p)+" | "+u.str+`
|
|
69
|
+
`,a+=Ee.repeat("-",t.indent+p+3+u.pos)+`^
|
|
70
|
+
`,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)u=Kf(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),l),a+=Ee.repeat(" ",t.indent)+Wf((e.line+c+1).toString(),p)+" | "+u.str+`
|
|
71
|
+
`;return a.replace(/\n$/,"")}var aO=sO,cO=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],uO=["scalar","sequence","mapping"];function lO(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function pO(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(cO.indexOf(r)===-1)throw new We('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=lO(t.styleAliases||null),uO.indexOf(this.kind)===-1)throw new We('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Me=pO;function tb(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(o=s)}),r[o]=n}),r}function dO(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function Yf(e){return this.extend(e)}Yf.prototype.extend=function(t){var r=[],n=[];if(t instanceof Me)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new We("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Me))throw new We("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new We("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new We("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof Me))throw new We("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(Yf.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=tb(o,"implicit"),o.compiledExplicit=tb(o,"explicit"),o.compiledTypeMap=dO(o.compiledImplicit,o.compiledExplicit),o};var _b=Yf,vb=new Me("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),xb=new Me("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),bb=new Me("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),kb=new _b({explicit:[vb,xb,bb]});function fO(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function hO(){return null}function mO(e){return e===null}var wb=new Me("tag:yaml.org,2002:null",{kind:"scalar",resolve:fO,construct:hO,predicate:mO,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function gO(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function yO(e){return e==="true"||e==="True"||e==="TRUE"}function _O(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Sb=new Me("tag:yaml.org,2002:bool",{kind:"scalar",resolve:gO,construct:yO,predicate:_O,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function vO(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function xO(e){return 48<=e&&e<=55}function bO(e){return 48<=e&&e<=57}function kO(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!vO(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!xO(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!bO(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function wO(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function SO(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ee.isNegativeZero(e)}var Tb=new Me("tag:yaml.org,2002:int",{kind:"scalar",resolve:kO,construct:wO,predicate:SO,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),TO=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function $O(e){return!(e===null||!TO.test(e)||e[e.length-1]==="_")}function PO(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var EO=/^[-+]?[0-9]+e/;function zO(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ee.isNegativeZero(e))return"-0.0";return r=e.toString(10),EO.test(r)?r.replace("e",".e"):r}function CO(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ee.isNegativeZero(e))}var $b=new Me("tag:yaml.org,2002:float",{kind:"scalar",resolve:$O,construct:PO,predicate:CO,represent:zO,defaultStyle:"lowercase"}),Pb=kb.extend({implicit:[wb,Sb,Tb,$b]}),Eb=Pb,zb=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cb=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function IO(e){return e===null?!1:zb.exec(e)!==null||Cb.exec(e)!==null}function RO(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=zb.exec(e),t===null&&(t=Cb.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],l=+(t[11]||0),u=(p*60+l)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,o,i,s,a,c)),u&&d.setTime(d.getTime()-u),d}function OO(e){return e.toISOString()}var Ib=new Me("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:IO,construct:RO,instanceOf:Date,represent:OO});function AO(e){return e==="<<"||e===null}var Rb=new Me("tag:yaml.org,2002:merge",{kind:"scalar",resolve:AO}),rh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
72
|
+
\r`;function NO(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=rh;for(r=0;r<o;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function jO(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=rh,s=0,a=[];for(t=0;t<o;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(n.charAt(t));return r=o%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function MO(e){var t="",r=0,n,o,i=e.length,s=rh;for(n=0;n<i;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return o=i%3,o===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):o===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):o===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function DO(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ob=new Me("tag:yaml.org,2002:binary",{kind:"scalar",resolve:NO,construct:jO,predicate:DO,represent:MO}),LO=Object.prototype.hasOwnProperty,ZO=Object.prototype.toString;function qO(e){if(e===null)return!0;var t=[],r,n,o,i,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(o=a[r],s=!1,ZO.call(o)!=="[object Object]")return!1;for(i in o)if(LO.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function FO(e){return e!==null?e:[]}var Ab=new Me("tag:yaml.org,2002:omap",{kind:"sequence",resolve:qO,construct:FO}),UO=Object.prototype.toString;function BO(e){if(e===null)return!0;var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],UO.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function VO(e){if(e===null)return[];var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}var Nb=new Me("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:BO,construct:VO}),HO=Object.prototype.hasOwnProperty;function GO(e){if(e===null)return!0;var t,r=e;for(t in r)if(HO.call(r,t)&&r[t]!==null)return!1;return!0}function KO(e){return e!==null?e:{}}var jb=new Me("tag:yaml.org,2002:set",{kind:"mapping",resolve:GO,construct:KO}),nh=Eb.extend({implicit:[Ib,Rb],explicit:[Ob,Ab,Nb,jb]}),Ar=Object.prototype.hasOwnProperty,Ua=1,Mb=2,Db=3,Ba=4,Jf=1,WO=2,rb=3,JO=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,YO=/[\x85\u2028\u2029]/,QO=/[,\[\]\{\}]/,Lb=/^(?:!|!!|![a-z\-]+!)$/i,Zb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function nb(e){return Object.prototype.toString.call(e)}function Gt(e){return e===10||e===13}function bn(e){return e===9||e===32}function it(e){return e===9||e===32||e===10||e===13}function lo(e){return e===44||e===91||e===93||e===123||e===125}function XO(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function eA(e){return e===120?2:e===117?4:e===85?8:0}function tA(e){return 48<=e&&e<=57?e-48:-1}function ob(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
73
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function rA(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function qb(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Fb=new Array(256),Ub=new Array(256);for(xn=0;xn<256;xn++)Fb[xn]=ob(xn)?1:0,Ub[xn]=ob(xn);var xn;function nA(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||nh,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Bb(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=aO(r),new We(t,r)}function N(e,t){throw Bb(e,t)}function Va(e,t){e.onWarning&&e.onWarning.call(null,Bb(e,t))}var ib={YAML:function(t,r,n){var o,i,s;t.version!==null&&N(t,"duplication of %YAML directive"),n.length!==1&&N(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&N(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&N(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Va(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&N(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],Lb.test(o)||N(t,"ill-formed tag handle (first argument) of the TAG directive"),Ar.call(t.tagMap,o)&&N(t,'there is a previously declared suffix for "'+o+'" tag handle'),Zb.test(i)||N(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{N(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};function Or(e,t,r,n){var o,i,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||N(e,"expected valid JSON character");else JO.test(a)&&N(e,"the stream contains non-printable characters");e.result+=a}}function sb(e,t,r,n){var o,i,s,a;for(Ee.isObject(r)||N(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),s=0,a=o.length;s<a;s+=1)i=o[s],Ar.call(t,i)||(qb(t,i,r[i]),n[i]=!0)}function po(e,t,r,n,o,i,s,a,c){var u,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),u=0,p=o.length;u<p;u+=1)Array.isArray(o[u])&&N(e,"nested arrays are not supported inside keys"),typeof o=="object"&&nb(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&nb(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(u=0,p=i.length;u<p;u+=1)sb(e,t,i[u],r);else sb(e,t,i,r);else!e.json&&!Ar.call(r,o)&&Ar.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,N(e,"duplicated mapping key")),qb(t,o,i),delete r[o];return t}function oh(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):N(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Te(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;bn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(Gt(o))for(oh(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Va(e,"deficient indentation"),n}function Ka(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||it(r)))}function ih(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ee.repeat(`
|
|
74
|
+
`,t-1))}function oA(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,h;if(h=e.input.charCodeAt(e.position),it(h)||lo(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(o=e.input.charCodeAt(e.position+1),it(o)||r&&lo(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;h!==0;){if(h===58){if(o=e.input.charCodeAt(e.position+1),it(o)||r&&lo(o))break}else if(h===35){if(n=e.input.charCodeAt(e.position-1),it(n))break}else{if(e.position===e.lineStart&&Ka(e)||r&&lo(h))break;if(Gt(h))if(c=e.line,u=e.lineStart,p=e.lineIndent,Te(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(Or(e,i,s,!1),ih(e,e.line-c),i=s=e.position,a=!1),bn(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return Or(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function iA(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Or(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else Gt(r)?(Or(e,n,o,!0),ih(e,Te(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Ka(e)?N(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);N(e,"unexpected end of the stream within a single quoted scalar")}function sA(e,t){var r,n,o,i,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Or(e,r,e.position,!0),e.position++,!0;if(a===92){if(Or(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),Gt(a))Te(e,!1,t);else if(a<256&&Fb[a])e.result+=Ub[a],e.position++;else if((s=eA(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=XO(a))>=0?i=(i<<4)+s:N(e,"expected hexadecimal character");e.result+=rA(i),e.position++}else N(e,"unknown escape sequence");r=n=e.position}else Gt(a)?(Or(e,r,n,!0),ih(e,Te(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Ka(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}function aA(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,h,f=Object.create(null),m,y,v,_;if(_=e.input.charCodeAt(e.position),_===91)p=93,h=!1,a=[];else if(_===123)p=125,h=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),_=e.input.charCodeAt(++e.position);_!==0;){if(Te(e,!0,t),_=e.input.charCodeAt(e.position),_===p)return e.position++,e.tag=s,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=a,!0;r?_===44&&N(e,"expected the node content, but found ','"):N(e,"missed comma between flow collection entries"),y=m=v=null,l=d=!1,_===63&&(u=e.input.charCodeAt(e.position+1),it(u)&&(l=d=!0,e.position++,Te(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,fo(e,t,Ua,!1,!0),y=e.tag,m=e.result,Te(e,!0,t),_=e.input.charCodeAt(e.position),(d||e.line===n)&&_===58&&(l=!0,_=e.input.charCodeAt(++e.position),Te(e,!0,t),fo(e,t,Ua,!1,!0),v=e.result),h?po(e,a,f,y,m,v,n,o,i):l?a.push(po(e,null,f,y,m,v,n,o,i)):a.push(m),Te(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(r=!0,_=e.input.charCodeAt(++e.position)):r=!1}N(e,"unexpected end of the stream within a flow collection")}function cA(e,t){var r,n,o=Jf,i=!1,s=!1,a=t,c=0,u=!1,p,l;if(l=e.input.charCodeAt(e.position),l===124)n=!1;else if(l===62)n=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)Jf===o?o=l===43?rb:WO:N(e,"repeat of a chomping mode identifier");else if((p=tA(l))>=0)p===0?N(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?N(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(bn(l)){do l=e.input.charCodeAt(++e.position);while(bn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!Gt(l)&&l!==0)}for(;l!==0;){for(oh(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),Gt(l)){c++;continue}if(e.lineIndent<a){o===rb?e.result+=Ee.repeat(`
|
|
75
|
+
`,i?1+c:c):o===Jf&&i&&(e.result+=`
|
|
76
|
+
`);break}for(n?bn(l)?(u=!0,e.result+=Ee.repeat(`
|
|
77
|
+
`,i?1+c:c)):u?(u=!1,e.result+=Ee.repeat(`
|
|
78
|
+
`,c+1)):c===0?i&&(e.result+=" "):e.result+=Ee.repeat(`
|
|
79
|
+
`,c):e.result+=Ee.repeat(`
|
|
80
|
+
`,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!Gt(l)&&l!==0;)l=e.input.charCodeAt(++e.position);Or(e,r,e.position,!1)}return!0}function ab(e,t){var r,n=e.tag,o=e.anchor,i=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,N(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!it(s))));){if(a=!0,e.position++,Te(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,fo(e,t,Db,!1,!0),i.push(e.result),Te(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)N(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0):!1}function uA(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),h=null,f=null,m=null,y=!1,v=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),_=e.input.charCodeAt(e.position);_!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,N(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(_===63||_===58)&&it(n))_===63?(y&&(po(e,l,d,h,f,null,s,a,c),h=f=m=null),v=!0,y=!0,o=!0):y?(y=!1,o=!0):N(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=n;else{if(s=e.line,a=e.lineStart,c=e.position,!fo(e,r,Mb,!1,!0))break;if(e.line===i){for(_=e.input.charCodeAt(e.position);bn(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),it(_)||N(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(po(e,l,d,h,f,null,s,a,c),h=f=m=null),v=!0,y=!1,o=!1,h=e.tag,f=e.result;else if(v)N(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(v)N(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(y&&(s=e.line,a=e.lineStart,c=e.position),fo(e,t,Ba,!0,o)&&(y?f=e.result:m=e.result),y||(po(e,l,d,h,f,m,s,a,c),h=f=m=null),Te(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&_!==0)N(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&po(e,l,d,h,f,null,s,a,c),v&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),v}function lA(e){var t,r=!1,n=!1,o,i,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&N(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,o="!!",s=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):N(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!it(s);)s===33&&(n?N(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Lb.test(o)||N(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),QO.test(i)&&N(e,"tag suffix cannot contain flow indicator characters")}i&&!Zb.test(i)&&N(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{N(e,"tag name is malformed: "+i)}return r?e.tag=i:Ar.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:N(e,'undeclared tag handle "'+o+'"'),!0}function pA(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&N(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!it(r)&&!lo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function dA(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!it(n)&&!lo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ar.call(e.anchorMap,r)||N(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Te(e,!0,-1),!0}function fo(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,h,f,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=Ba===r||Db===r,n&&Te(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;lA(e)||pA(e);)Te(e,!0,-1)?(u=!0,a=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||o),(c===1||Ba===r)&&(Ua===r||Mb===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?a&&(ab(e,y)||uA(e,y,m))||aA(e,m)?p=!0:(s&&cA(e,m)||iA(e,m)||sA(e,m)?p=!0:dA(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&N(e,"alias node should not have any properties")):oA(e,m,Ua===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&ab(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&N(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(f=e.implicitTypes[l],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ar.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,h=e.typeMap.multi[e.kind||"fallback"],l=0,d=h.length;l<d;l+=1)if(e.tag.slice(0,h[l].tag.length)===h[l].tag){f=h[l];break}f||N(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&N(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function fA(e){var t=e.position,r,n,o,i=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Te(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(i=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!it(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&N(e,"directive name must not be less than one character in length");s!==0;){for(;bn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Gt(s));break}if(Gt(s))break;for(r=e.position;s!==0&&!it(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&oh(e),Ar.call(ib,n)?ib[n](e,n,o):Va(e,'unknown document directive "'+n+'"')}if(Te(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Te(e,!0,-1)):i&&N(e,"directives end mark is expected"),fo(e,e.lineIndent-1,Ba,!1,!0),Te(e,!0,-1),e.checkLineBreaks&&YO.test(e.input.slice(t,e.position))&&Va(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ka(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Te(e,!0,-1));return}if(e.position<e.length-1)N(e,"end of the stream or a document separator is expected");else return}function Vb(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
81
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new nA(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,N(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)fA(r);return r.documents}function hA(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Vb(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function mA(e,t){var r=Vb(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new We("expected a single document in the stream, but found more")}}var gA=hA,yA=mA,Hb={loadAll:gA,load:yA},Gb=Object.prototype.toString,Kb=Object.prototype.hasOwnProperty,sh=65279,_A=9,Ri=10,vA=13,xA=32,bA=33,kA=34,Qf=35,wA=37,SA=38,TA=39,$A=42,Wb=44,PA=45,Ha=58,EA=61,zA=62,CA=63,IA=64,Jb=91,Yb=93,RA=96,Qb=123,OA=124,Xb=125,Ue={};Ue[0]="\\0";Ue[7]="\\a";Ue[8]="\\b";Ue[9]="\\t";Ue[10]="\\n";Ue[11]="\\v";Ue[12]="\\f";Ue[13]="\\r";Ue[27]="\\e";Ue[34]='\\"';Ue[92]="\\\\";Ue[133]="\\N";Ue[160]="\\_";Ue[8232]="\\L";Ue[8233]="\\P";var AA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],NA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function jA(e,t){var r,n,o,i,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),o=0,i=n.length;o<i;o+=1)s=n[o],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&Kb.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function MA(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new We("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ee.repeat("0",n-t.length)+t}var DA=1,Oi=2;function LA(e){this.schema=e.schema||nh,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ee.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=jA(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Oi:DA,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cb(e,t){for(var r=Ee.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
|
|
82
|
+
`,n),o===-1?(s=e.slice(n),n=a):(s=e.slice(n,o+1),n=o+1),s.length&&s!==`
|
|
83
|
+
`&&(i+=r),i+=s;return i}function Xf(e,t){return`
|
|
84
|
+
`+Ee.repeat(" ",e.indent*t)}function ZA(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Ga(e){return e===xA||e===_A}function Ai(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==sh||65536<=e&&e<=1114111}function ub(e){return Ai(e)&&e!==sh&&e!==vA&&e!==Ri}function lb(e,t,r){var n=ub(e),o=n&&!Ga(e);return(r?n:n&&e!==Wb&&e!==Jb&&e!==Yb&&e!==Qb&&e!==Xb)&&e!==Qf&&!(t===Ha&&!o)||ub(t)&&!Ga(t)&&e===Qf||t===Ha&&o}function qA(e){return Ai(e)&&e!==sh&&!Ga(e)&&e!==PA&&e!==CA&&e!==Ha&&e!==Wb&&e!==Jb&&e!==Yb&&e!==Qb&&e!==Xb&&e!==Qf&&e!==SA&&e!==$A&&e!==bA&&e!==OA&&e!==EA&&e!==zA&&e!==TA&&e!==kA&&e!==wA&&e!==IA&&e!==RA}function FA(e){return!Ga(e)&&e!==Ha}function Ci(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function ek(e){var t=/^\n* /;return t.test(e)}var tk=1,eh=2,rk=3,nk=4,uo=5;function UA(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,h=n!==-1,f=-1,m=qA(Ci(e,0))&&FA(Ci(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Ci(e,c),!Ai(u))return uo;m=m&&lb(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Ci(e,c),u===Ri)l=!0,h&&(d=d||c-f-1>n&&e[f+1]!==" ",f=c);else if(!Ai(u))return uo;m=m&&lb(u,p,a),p=u}d=d||h&&c-f-1>n&&e[f+1]!==" "}return!l&&!d?m&&!s&&!o(e)?tk:i===Oi?uo:eh:r>9&&ek(e)?uo:s?i===Oi?uo:eh:d?nk:rk}function BA(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===Oi?'""':"''";if(!e.noCompatMode&&(AA.indexOf(t)!==-1||NA.test(t)))return e.quotingType===Oi?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return ZA(e,u)}switch(UA(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case tk:return t;case eh:return"'"+t.replace(/'/g,"''")+"'";case rk:return"|"+pb(t,e.indent)+db(cb(t,i));case nk:return">"+pb(t,e.indent)+db(cb(VA(t,s),i));case uo:return'"'+HA(t)+'"';default:throw new We("impossible error: invalid scalar style")}})()}function pb(e,t){var r=ek(e)?String(t):"",n=e[e.length-1]===`
|
|
85
|
+
`,o=n&&(e[e.length-2]===`
|
|
86
|
+
`||e===`
|
|
87
|
+
`),i=o?"+":n?"":"-";return r+i+`
|
|
88
|
+
`}function db(e){return e[e.length-1]===`
|
|
89
|
+
`?e.slice(0,-1):e}function VA(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=e.indexOf(`
|
|
90
|
+
`);return u=u!==-1?u:e.length,r.lastIndex=u,fb(e.slice(0,u),t)})(),o=e[0]===`
|
|
91
|
+
`||e[0]===" ",i,s;s=r.exec(e);){var a=s[1],c=s[2];i=c[0]===" ",n+=a+(!o&&!i&&c!==""?`
|
|
92
|
+
`:"")+fb(c,t),o=i}return n}function fb(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,i,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,c+=`
|
|
93
|
+
`+e.slice(o,i),o=i+1),s=a;return c+=`
|
|
94
|
+
`,e.length-o>t&&s>o?c+=e.slice(o,s)+`
|
|
95
|
+
`+e.slice(s+1):c+=e.slice(o),c.slice(1)}function HA(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=Ci(e,o),n=Ue[r],!n&&Ai(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||MA(r);return t}function GA(e,t,r){var n="",o=e.tag,i,s,a;for(i=0,s=r.length;i<s;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(sr(e,t,a,!1,!1)||typeof a>"u"&&sr(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function hb(e,t,r,n){var o="",i=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(sr(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&sr(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=Xf(e,t)),e.dump&&Ri===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function KA(e,t,r){var n="",o=e.tag,i=Object.keys(r),s,a,c,u,p;for(s=0,a=i.length;s<a;s+=1)p="",n!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[s],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),sr(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),sr(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function WA(e,t,r,n){var o="",i=e.tag,s=Object.keys(r),a,c,u,p,l,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new We("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=Xf(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),sr(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&Ri===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=Xf(e,t)),sr(e,t+1,p,!0,l)&&(e.dump&&Ri===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function mb(e,t,r){var n,o,i,s,a,c;for(o=r?e.explicitTypes:e.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,Gb.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(Kb.call(a.represent,c))n=a.represent[c](t,c);else throw new We("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function sr(e,t,r,n,o,i,s){e.tag=null,e.dump=r,mb(e,r,!1)||mb(e,r,!0);var a=Gb.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var p=a==="[object Object]"||a==="[object Array]",l,d;if(p&&(l=e.duplicates.indexOf(r),d=l!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(o=!1),d&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(p&&d&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(WA(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(KA(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?hb(e,t-1,e.dump,o):hb(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(GA(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&BA(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new We("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function JA(e,t){var r=[],n=[],o,i;for(th(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function th(e,t,r){var n,o,i;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)th(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)th(e[n[o]],t,r)}function YA(e,t){t=t||{};var r=new LA(t);r.noRefs||JA(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),sr(r,0,n,!0,!0)?r.dump+`
|
|
96
|
+
`:""}var QA=YA,XA={dump:QA};function ah(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var eN=Me,tN=_b,rN=kb,nN=Pb,oN=Eb,iN=nh,sN=Hb.load,aN=Hb.loadAll,cN=XA.dump,uN=We,lN={binary:Ob,float:$b,map:bb,null:wb,pairs:Nb,set:jb,timestamp:Ib,bool:Sb,int:Tb,merge:Rb,omap:Ab,seq:xb,str:vb},pN=ah("safeLoad","load"),dN=ah("safeLoadAll","loadAll"),fN=ah("safeDump","dump"),ch={Type:eN,Schema:tN,FAILSAFE_SCHEMA:rN,JSON_SCHEMA:nN,CORE_SCHEMA:oN,DEFAULT_SCHEMA:iN,load:sN,loadAll:aN,dump:cN,YAMLException:uN,types:lN,safeLoad:pN,safeLoadAll:dN,safeDump:fN};var hN=g.object({id:g.string(),label:g.string(),name:g.string(),mindset_template:g.string().optional()}),mN=g.object({name:g.string(),root_dir:g.string().default("frontend"),build_command:g.string(),package_manager:g.string().default("pnpm"),mindset_template:g.string().optional()}),gN=g.object({name:g.string(),root_dir:g.string().default("backend"),architecture:g.string(),dependency_direction:g.string(),package_manager:g.string().default("uv"),mindset_template:g.string().optional()}),yN=g.object({frontend:g.string().optional(),backend:g.string().optional(),preflight_command:g.string().default("pnpm preflight"),summary:g.string().default("format/lint/typecheck/build")}),_N=g.object({name:g.string(),description:g.string(),runtime:g.enum(["python","node","unknown"]).default("unknown"),setup_hint:g.string().optional(),enabled:g.boolean().default(!0)}),vN=g.object({id:g.string(),label:g.string(),category:g.enum(["frontend","backend","testing","infra","devtool","monitoring"]),description:g.string(),url:g.string().optional(),guidance:g.string().optional()}),ok=g.object({name:g.string(),description:g.string().optional(),stacks:g.array(hN),frontend:mN.optional(),backend:gN.optional(),quality_gate:yN.optional(),vendor:g.array(_N).optional(),tools:g.array(vN).optional()}),ik=g.object({license_key:g.string(),stack_profile:g.string().optional(),components:g.array(g.string()).optional(),language:g.string().default("en"),registry_url:g.string().default("https://godd-registry.up.railway.app")}).refine(e=>e.stack_profile!==void 0||e.components!==void 0&&e.components.length>0,{message:"Either 'stack_profile' or 'components' must be provided"});function ck(e){let t=[e,process.env.GODD_CONFIG,Wa(process.cwd(),"config.yaml"),Wa(process.env.HOME??process.env.USERPROFILE??"",".godd","config.yaml")].filter(r=>r!==void 0&&r!=="");for(let r of t)if(ak(r)){let n=sk(r,"utf-8"),o=ch.load(n);return ik.parse(o)}throw new Error("config.yaml \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F\u30AB\u30EC\u30F3\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B config.yaml \u3092\u914D\u7F6E\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}function xN(e){let t=ch.load(e);return ok.parse(t)}function uh(e,t){let r=t??Wa(process.cwd(),"stacks"),n=Wa(r,`${e}.yaml`);if(!ak(n))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${n}`);let o=sk(n,"utf-8");return xN(o)}import{readFileSync as Oc,readdirSync as Ac,existsSync as Nc}from"node:fs";import{join as Mr,basename as jc}from"node:path";import{createDecipheriv as hM}from"node:crypto";var Rc=mu(Xw(),1);Rc.default.registerHelper("eq",function(e,t){return e===t});var tm=new Map,dM=new Map;function Ki(e,t){Rc.default.registerPartial(e,t)}function pr(e,t){dM.set(e,t),tm.set(e,Rc.default.compile(t))}function fM(e,t){return{profile_name:e.name,stacks:e.stacks,frontend:e.frontend?{...e.frontend,mindset:""}:void 0,backend:e.backend?{...e.backend,mindset:""}:void 0,quality_gate:e.quality_gate,tools:e.tools??[],vendor:e.vendor??[],...t}}function eS(e,t){let r=tm.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function tS(e,t,r){let n=tm.get(`prompt:${e}`);if(!n)throw new Error(`Prompt template '${e}' not found`);let o=fM(t,r);if(t.frontend?.mindset_template){let i=eS(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=eS(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}function rm(e){let t=Mr(e,"partials");if(Nc(t)){for(let i of Ac(t))if(i.endsWith(".hbs")){let s=jc(i,".hbs"),a=Oc(Mr(t,i),"utf-8");Ki(s,a)}}let r=Mr(e,"prompts");if(Nc(r)){for(let i of Ac(r))if(i.endsWith(".hbs")){let s=jc(i,".hbs"),a=Oc(Mr(r,i),"utf-8");pr(`prompt:${s}`,a)}}let n=Mr(e,"mindsets");if(Nc(n)){for(let i of Ac(n))if(i.endsWith(".hbs")){let s=jc(i,".hbs"),a=Oc(Mr(n,i),"utf-8");pr(`mindset:${s}`,a)}}let o=Mr(e,"agents");if(Nc(o)){for(let i of Ac(o))if(i.endsWith(".hbs")){let s=jc(i,".hbs"),a=Oc(Mr(o,i),"utf-8");pr(`agent:${s}`,a)}}}async function mM(e,t){let{pbkdf2:r}=await import("node:crypto");return new Promise((n,o)=>{r(e,t,1e5,32,"sha256",(i,s)=>{i?o(i):n(s)})})}async function gM(e,t){let r=JSON.parse(e);if(r.version!==1)throw new Error(`\u672A\u5BFE\u5FDC\u306E\u30D0\u30F3\u30C9\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3: ${r.version}`);let n=Buffer.from(r.salt,"hex"),o=Buffer.from(r.iv,"hex"),i=Buffer.from(r.tag,"hex"),s=Buffer.from(r.data,"base64"),a=await mM(t,n),c=hM("aes-256-gcm",a,o);c.setAuthTag(i);let u=Buffer.concat([c.update(s),c.final()]);for(let[p,l]of Object.entries(r.templates)){let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8");l.type==="partial"?Ki(p,d):pr(`${l.type}:${p}`,d)}}async function rS(e){return!1}import{createHash as yM}from"node:crypto";import{hostname as _M}from"node:os";function vM(){let e=`${_M()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return yM("sha256").update(e).digest("hex").slice(0,32)}async function nS(e){let t=`${e.registry_url}/v1/auth/validate`,r=vM(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r})});if(!n.ok)throw new Error(`Registry API auth failed: ${n.status} ${n.statusText}`);return await n.json()}async function oS(e,t){let r=e.components??[];if(r.length===0)return null;let n=new URLSearchParams({components:r.join(","),language:e.language}),o=`${e.registry_url}/v1/bundle?${n.toString()}`,i={Authorization:`Bearer ${e.license_key}`};t&&(i["If-None-Match"]=`"${t}"`);let s=await fetch(o,{headers:i});if(s.status===304)return null;if(!s.ok){let u=await s.text();throw new Error(`Registry API bundle fetch failed: ${s.status} - ${u}`)}let a=await s.json(),c=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:a,etag:c}}async function iS(e,t){let{pbkdf2:r}=await import("node:crypto"),{createDecipheriv:n}=await import("node:crypto"),o=Buffer.from(e.salt,"hex"),i=Buffer.from(e.iv,"hex"),s=Buffer.from(e.tag,"hex"),a=Buffer.from(e.data,"base64"),c=await new Promise((l,d)=>{r(t,o,1e5,32,"sha256",(h,f)=>{h?d(h):l(f)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);return JSON.parse(p.toString("utf-8"))}import{createHash as xM,createCipheriv as bM,createDecipheriv as kM,randomBytes as sS,pbkdf2 as wM}from"node:crypto";import{existsSync as Mc,mkdirSync as SM,readFileSync as nm,writeFileSync as aS}from"node:fs";import{join as wo}from"node:path";var TM=600*60*1e3;function om(){let e=process.env.HOME??process.env.USERPROFILE??"",t=wo(e,".godd","cache");return Mc(t)||SM(t,{recursive:!0}),t}function im(e,t){let r=`${e.sort().join(",")}_${t}`;return xM("sha256").update(r).digest("hex").slice(0,16)}function cS(e,t){return new Promise((r,n)=>{wM(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function $M(e,t){let r=sS(32),n=await cS(t,r),o=sS(12),i=bM("aes-256-gcm",n,o),s=Buffer.concat([i.update(e),i.final()]),a=i.getAuthTag();return Buffer.concat([r,o,a,s])}async function PM(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await cS(t,r),a=kM("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function uS(e,t,r,n,o){let i=om(),s=im(r,n),a=await $M(Buffer.from(e,"utf-8"),o);aS(wo(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};aS(wo(i,"meta.json"),JSON.stringify(c,null,2))}async function lS(e,t,r){let n=om(),o=wo(n,"meta.json");if(!Mc(o))return null;let i;try{i=JSON.parse(nm(o,"utf-8"))}catch{return null}let s=im(e,t);if(i.profileHash!==s)return null;let a=wo(n,`bundle-${s}.enc`);if(!Mc(a))return null;try{let c=nm(a);return{data:(await PM(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>TM}}catch{return null}}function pS(e,t){let r=om(),n=wo(r,"meta.json");if(Mc(n))try{let o=JSON.parse(nm(n,"utf-8")),i=im(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}function Wi(e){for(let[t,r]of Object.entries(e.partials))Ki(t,r);for(let[t,r]of Object.entries(e.prompts))pr(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))pr(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))pr(`mindset:${t}`,r)}import{existsSync as ke,readFileSync as dS,readdirSync as Ji,statSync as sm}from"node:fs";import{join as K,basename as EM}from"node:path";function So(e){try{return ke(e)?JSON.parse(dS(e,"utf-8")):null}catch{return null}}function dr(e,t=4096){try{return ke(e)?dS(e).subarray(0,t).toString("utf-8"):""}catch{return""}}var zM={"browser-use":{description:"Python AI \u30D6\u30E9\u30A6\u30B6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Web\u30D6\u30E9\u30A6\u30B6\u3092\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"uv sync && uv run browser-use install"},"android-use":{description:"Python Android AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Android\u7AEF\u672B\u3092ADB\u3067\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"python -m venv .venv && pip install -r requirements.txt"},"react-grab":{description:"Node.js React \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B3\u30D4\u30FC\u30C4\u30FC\u30EB \u2014 React\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30C4\u30EA\u30FC\u3092\u62BD\u51FA",runtime:"node",setupHint:"pnpm install && pnpm build"}};function CM(e){let t=K(e,"vendor");if(!ke(t))return[];let r=[];try{for(let n of Ji(t)){let o=K(t,n);if(!sm(o).isDirectory())continue;let i=zM[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=ke(K(o,"pyproject.toml")),a=ke(K(o,"package.json")),c=s?"python":a?"node":"unknown";r.push({name:n,path:o,description:`vendor/${n}`,runtime:c,setupHint:c==="python"?"uv sync":"pnpm install"})}}}catch{}return r}function IM(e){let t=[],r=K(e,"backend","pyproject.toml"),n=K(e,"backend","requirements.txt");if(ke(r)){let y=dr(r);y.includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/pyproject.toml \u306B fastapi \u3092\u691C\u51FA"}),y.includes("django")&&t.push({id:"django",label:"Django",evidence:"backend/pyproject.toml \u306B django \u3092\u691C\u51FA"})}else ke(n)&&dr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=So(K(e,"frontend","package.json")),i=So(K(e,"package.json")),s=So(K(e,"src","package.json"));for(let[y,v]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!v)continue;let _={...v.dependencies,...v.devDependencies};_.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),_.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),_.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),_.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),_.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=K(e,"pubspec.yaml");if(ke(a)){let y=dr(a);t.push({id:"dart",label:"Dart",evidence:"pubspec.yaml \u3092\u691C\u51FA"}),y.includes("flutter")&&t.push({id:"flutter",label:"Flutter",evidence:"pubspec.yaml \u306B flutter \u3092\u691C\u51FA"})}let c=ke(K(e,"Package.swift")),u=K(e,"ios"),p=ke(u)&&(()=>{try{return Ji(u).some(y=>y.endsWith(".xcodeproj")||y.endsWith(".xcworkspace"))}catch{return!1}})();(c||p)&&t.push({id:"swift",label:"Swift",evidence:c?"Package.swift \u3092\u691C\u51FA":"ios/*.xcodeproj \u3092\u691C\u51FA"});let l=ke(K(e,"build.gradle.kts")),d=ke(K(e,"build.gradle")),h=K(e,"android"),f=ke(K(h,"build.gradle.kts"))||ke(K(h,"build.gradle"));(l||d||f)&&t.push({id:"kotlin",label:"Kotlin",evidence:l?"build.gradle.kts \u3092\u691C\u51FA":d?"build.gradle \u3092\u691C\u51FA":"android/build.gradle \u3092\u691C\u51FA"});let m=dr(K(e,"docker-compose.yml"));return m&&m.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),(ke(K(e,"prisma","schema.prisma"))||ke(K(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}var RM=[{id:"orval",label:"Orval",category:"frontend",description:"OpenAPI \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30B3\u30FC\u30C9\u81EA\u52D5\u751F\u6210",url:"https://github.com/orval-labs/orval",npmPackage:"orval",configFiles:["orval.config.ts","orval.config.js","orval.config.cjs"]},{id:"tanstack-query",label:"TanStack Query",category:"frontend",description:"\u975E\u540C\u671F\u30C7\u30FC\u30BF\u30D5\u30A7\u30C3\u30C1\u30F3\u30B0/\u30AD\u30E3\u30C3\u30B7\u30E5\u7BA1\u7406",url:"https://github.com/TanStack/query",npmPackage:"@tanstack/react-query"},{id:"vite",label:"Vite",category:"frontend",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://vitejs.dev/",npmPackage:"vite",configFiles:["vite.config.ts","vite.config.js","vite.config.mts"]},{id:"biome",label:"Biome",category:"devtool",description:"\u9AD8\u901F Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://biomejs.dev/",npmPackage:"@biomejs/biome",configFiles:["biome.json","biome.jsonc"]},{id:"storybook",label:"Storybook",category:"frontend",description:"UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u958B\u767A/\u30AB\u30BF\u30ED\u30B0\u30C4\u30FC\u30EB",url:"https://storybook.js.org/",npmPackage:"storybook",configFiles:[".storybook/main.ts",".storybook/main.js"]},{id:"ruff",label:"Ruff",category:"devtool",description:"\u8D85\u9AD8\u901F Python Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/ruff/",pyPackage:"ruff",configFiles:["ruff.toml",".ruff.toml"]},{id:"uv",label:"uv",category:"devtool",description:"\u9AD8\u901F Python \u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/uv/",configFiles:["uv.lock"]},{id:"sqlmodel",label:"SQLModel",category:"backend",description:"SQLAlchemy + Pydantic \u30D9\u30FC\u30B9\u306E Python ORM",url:"https://sqlmodel.tiangolo.com/",pyPackage:"sqlmodel"},{id:"alembic",label:"Alembic",category:"backend",description:"SQLAlchemy \u30D9\u30FC\u30B9\u306E DB \u30DE\u30A4\u30B0\u30EC\u30FC\u30B7\u30E7\u30F3\u30C4\u30FC\u30EB",url:"https://alembic.sqlalchemy.org/",pyPackage:"alembic",configFiles:["alembic.ini","backend/alembic.ini"]},{id:"fastapi-users",label:"FastAPI Users",category:"backend",description:"FastAPI \u5411\u3051\u8A8D\u8A3C/\u30E6\u30FC\u30B6\u30FC\u7BA1\u7406\u30E9\u30A4\u30D6\u30E9\u30EA",url:"https://fastapi-users.github.io/fastapi-users/",pyPackage:"fastapi-users"},{id:"pytest",label:"Pytest",category:"testing",description:"Python \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://docs.pytest.org/",pyPackage:"pytest",configFiles:["pytest.ini","pyproject.toml"]},{id:"httpx",label:"HTTPX",category:"testing",description:"Python \u975E\u540C\u671F HTTP \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08\u30C6\u30B9\u30C8\u7528\uFF09",url:"https://www.python-httpx.org/",pyPackage:"httpx"},{id:"playwright",label:"Playwright",category:"testing",description:"\u30AF\u30ED\u30B9\u30D6\u30E9\u30A6\u30B6 E2E \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://playwright.dev/",npmPackage:"@playwright/test",pyPackage:"playwright",configFiles:["playwright.config.ts","playwright.config.js"]},{id:"docker-compose",label:"Docker Compose",category:"infra",description:"\u30DE\u30EB\u30C1\u30B3\u30F3\u30C6\u30CA\u30AA\u30FC\u30B1\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",url:"https://docs.docker.com/compose/",configFiles:["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]},{id:"caddy",label:"Caddy",category:"infra",description:"\u81EA\u52D5 HTTPS \u5BFE\u5FDC\u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7",url:"https://caddyserver.com/",configFiles:["Caddyfile"],dockerPattern:"caddy"},{id:"traefik",label:"Traefik",category:"infra",description:"\u30AF\u30E9\u30A6\u30C9\u30CD\u30A4\u30C6\u30A3\u30D6 \u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7 / \u30ED\u30FC\u30C9\u30D0\u30E9\u30F3\u30B5",url:"https://traefik.io/",configFiles:["traefik.yml","traefik.toml"],dockerPattern:"traefik"},{id:"flutter",label:"Flutter",category:"frontend",description:"\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\uFF08Dart\uFF09",url:"https://flutter.dev/",configFiles:["pubspec.yaml"]},{id:"cocoapods",label:"CocoaPods",category:"devtool",description:"iOS / macOS \u4F9D\u5B58\u7BA1\u7406\u30C4\u30FC\u30EB",url:"https://cocoapods.org/",configFiles:["Podfile","ios/Podfile"]},{id:"gradle",label:"Gradle",category:"devtool",description:"Android / JVM \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://gradle.org/",configFiles:["build.gradle.kts","build.gradle","android/build.gradle.kts","android/build.gradle"]},{id:"swiftpm",label:"Swift Package Manager",category:"devtool",description:"Swift \u30D1\u30C3\u30B1\u30FC\u30B8\u7BA1\u7406\u30FB\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://www.swift.org/package-manager/",configFiles:["Package.swift"]},{id:"sentry",label:"Sentry",category:"monitoring",description:"\u30A8\u30E9\u30FC\u8FFD\u8DE1 / \u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u76E3\u8996",url:"https://sentry.io/",npmPackage:"@sentry/react",pyPackage:"sentry-sdk",configFiles:["sentry.properties"]}];function OM(e){let t={},r=new Map,n=[K(e,"package.json"),K(e,"frontend","package.json"),K(e,"src","package.json")];for(let o of n){let i=So(o);if(!i)continue;let s=o.replace(e,"").replace(/^[\\/]/,""),a=i.dependencies,c=i.devDependencies;for(let[u,p]of Object.entries({...a,...c}))t[u]=p,r.set(u,s)}return{deps:t,sources:r}}function AM(e){let t=new Set,r="";for(let n of[K(e,"backend"),e]){let o=K(n,"pyproject.toml");if(ke(o)){let a=dr(o,16384).matchAll(/["']([a-zA-Z][\w.-]*)(?:\[.*?\])?(?:>=|<=|==|~=|!=|<|>)?/g);for(let c of a)t.add(c[1].toLowerCase().replace(/-/g,"-"));r=o.replace(e,"").replace(/^[\\/]/,"");break}let i=K(n,"requirements.txt");if(ke(i)){let s=dr(i,16384);for(let a of s.split(`
|
|
97
|
+
`)){let c=a.trim();if(!c||c.startsWith("#"))continue;let u=c.match(/^([a-zA-Z][\w.-]*)/);u&&t.add(u[1].toLowerCase().replace(/-/g,"-"))}r=i.replace(e,"").replace(/^[\\/]/,"");break}}return{deps:t,source:r}}function NM(e){let t=[],r=new Set,{deps:n,sources:o}=OM(e),{deps:i,source:s}=AM(e),a="";for(let c of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]){let u=dr(K(e,c));if(u){a=u;break}}for(let c of RM)if(!r.has(c.id)){if(c.npmPackage&&c.npmPackage in n){let u=o.get(c.npmPackage)??"package.json";r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u306B ${c.npmPackage} \u3092\u691C\u51FA`,version:n[c.npmPackage],url:c.url});continue}if(c.pyPackage&&i.has(c.pyPackage.toLowerCase().replace(/-/g,"-"))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${s} \u306B ${c.pyPackage} \u3092\u691C\u51FA`,url:c.url});continue}if(c.configFiles){for(let u of c.configFiles)if(ke(K(e,u))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u3092\u691C\u51FA`,url:c.url});break}if(r.has(c.id))continue}c.dockerPattern&&a.includes(c.dockerPattern)&&(r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`docker-compose.yml \u306B ${c.dockerPattern} \u3092\u691C\u51FA`,url:c.url}))}return t}function jM(e){let t=dr(K(e,"docker-compose.yml"));if(!t)return[];let r=[],n=/^\s{2}(\w[\w-]*):\s*$/gm,o;for(;(o=n.exec(t))!==null;)r.push(o[1]);return r}function MM(e){let t=K(e,"docs"),r=ke(K(e,"godd-mcp-server","notes-app","package.json")),n=ke(K(e,"godd-mcp-server","notes-api","pyproject.toml"));if(!ke(t))return{exists:!1,sections:[],files:[],has_notes_app:r,has_notes_api:n};let o=[],i=[];function s(a,c){try{for(let u of Ji(a)){if(u.startsWith("."))continue;let p=K(a,u),l=c?`${c}/${u}`:u;sm(p).isDirectory()?(c||o.push(u),s(p,l)):i.push(l)}}catch{}}return s(t,""),{exists:!0,sections:o,files:i,has_notes_app:r,has_notes_api:n}}function fS(e){let t=So(K(e,"package.json"))?.name||EM(e),r=[];try{for(let u of Ji(e)){if(u.startsWith(".")||u==="node_modules")continue;let p=K(e,u);sm(p).isDirectory()&&r.push(u)}}catch{}let o=["package.json","pyproject.toml","docker-compose.yml","docker-compose.yaml","Dockerfile","tsconfig.json",".env.example","env.example","AGENTS.md","README.md","Makefile",".mise.toml","turbo.json","pnpm-workspace.yaml"].filter(u=>ke(K(e,u))),s=So(K(e,"package.json"))?.scripts??{},a=[];try{for(let u of Ji(e))(u.match(/^env.*\.example$/)||u.match(/^\.env.*\.example$/))&&a.push(u)}catch{}let c=dr(K(e,"README.md"),500);return{root:e,name:t,detected_stacks:IM(e),detected_tools:NM(e),vendor_items:CM(e),key_files:o,directories:r,scripts:s,docker_services:jM(e),env_templates:a,readme_excerpt:c,question_list_path:K(e,"docs","003_requirements","questions.csv"),docs_structure:MM(e)}}function DM(e,t){let r=t??process.env.GODD_PROJECT_ROOT??process.cwd();if(e.projectContext?.root===r)return e.projectContext;let n=fS(r);return e.projectContext=n,n}function j(e,t,r,n,o){let i=DM(e,n),s=e.config.language??"en",a=tS(t,e.profile,{project:i,language:s,...o});return`${s!=="en"?`> **Output Language**: Respond entirely in ${s}.
|
|
98
|
+
|
|
99
|
+
`:""}${a}
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
${r}`}var am="godd_dev",cm="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u652F\u63F4\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u4F9D\u983C\u304B\u3089\u3001Spec\u78BA\u8A8D\u30FB\u5F71\u97FF\u8ABF\u67FB\u30FB\u5B9F\u88C5\u30FB\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBPR\u672C\u6587\u751F\u6210\u307E\u3067\u3092\u4E00\u8CAB\u3057\u3066\u884C\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u4E0A\u3067\u547C\u3073\u51FA\u3055\u308C\u305F\u5834\u5408\u306F feat/<slug>-<YYYYMMDD> \u30D6\u30E9\u30F3\u30C1\u3092\u81EA\u52D5\u4F5C\u6210\u3057\u3001\u5B8C\u4E86\u5F8C\u306F\u5909\u66F4\u3092\u8CAC\u52D9\u5225\u306B\u5206\u5272\u30B3\u30DF\u30C3\u30C8\u3057\u307E\u3059\u3002",Dc=g.object({task:g.string().optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:g.string().optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:g.string().optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:g.string().optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:g.string().optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function hS(e,t){let r=[`## \u4F9D\u983C
|
|
104
|
+
${t.task??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.completion_criteria&&r.push(`## \u5B8C\u4E86\u6761\u4EF6
|
|
105
|
+
${t.completion_criteria}`),t.slug&&r.push(`## Slug
|
|
106
|
+
${t.slug}`),t.constraints&&r.push(`## \u5236\u7D04
|
|
107
|
+
${t.constraints}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
|
108
|
+
${t.context}`),j(e,"dev",r.join(`
|
|
109
|
+
|
|
110
|
+
`),t.project_root)}var um="godd_check",lm="\u54C1\u8CEA\u30C1\u30A7\u30C3\u30AF\u3002\u5BFE\u8C61\u3092\u53D7\u3051\u53D6\u308A\u3001Spec\u6574\u5408\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u30C6\u30B9\u30C8\u8A08\u753B\u30FB\u4E92\u63DB\u6027\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u89B3\u70B9\u304B\u3089\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3044\u307E\u3059\u3002",Lc=g.object({target:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u8AAC\u660E\u3001\u5DEE\u5206\u3001\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\u7B49\uFF09"),check_type:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function mS(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
|
|
111
|
+
${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.check_type&&r.push(`## \u30C1\u30A7\u30C3\u30AF\u7A2E\u5225
|
|
112
|
+
${t.check_type}`),j(e,"check",r.join(`
|
|
113
|
+
|
|
114
|
+
`),t.project_root)}var pm="godd_review",dm="CTO \u30EC\u30D9\u30EB\u306E\u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC\u3002\u30B3\u30FC\u30C9\u306E\u5DEE\u5206\u3092\u53D7\u3051\u53D6\u308A\u3001\u8A2D\u8A08\u30FB\u578B\u5B89\u5168\u30FB\u30C6\u30B9\u30C8\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u904B\u7528\u30FB\u30D3\u30B8\u30CD\u30B9\u30A4\u30F3\u30D1\u30AF\u30C8\u306E\u89B3\u70B9\u304B\u3089\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u91CD\u5927\u5EA6\uFF08Critical/Major/Minor/Suggestion\uFF09\u4ED8\u304D\u306E\u69CB\u9020\u5316\u30EC\u30D3\u30E5\u30FC\u7D50\u679C\u3092\u51FA\u529B\u3057\u307E\u3059\u3002",Zc=g.object({code:g.string().optional().describe("\u30EC\u30D3\u30E5\u30FC\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9\uFF08\u5DEE\u5206\u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u5185\u5BB9\uFF09"),file_path:g.string().optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),review_scope:g.enum(["file","pr","directory"]).optional().describe("\u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2\uFF08file: \u5358\u4E00\u30D5\u30A1\u30A4\u30EB\u3001pr: PR \u5168\u4F53\u5DEE\u5206\u3001directory: \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF09"),severity_threshold:g.enum(["critical","major","minor","suggestion"]).optional().describe("\u51FA\u529B\u3059\u308B\u6700\u4F4E\u91CD\u5927\u5EA6\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: suggestion = \u5168\u4EF6\u51FA\u529B\uFF09"),focus_areas:g.string().optional().describe("\u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A: architecture, security, performance, testing \u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function gS(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
|
|
115
|
+
${t.context}`),t.review_scope&&r.push(`## \u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2
|
|
116
|
+
${t.review_scope}`),t.severity_threshold&&r.push(`## \u6700\u4F4E\u91CD\u5927\u5EA6\u30D5\u30A3\u30EB\u30BF
|
|
117
|
+
${t.severity_threshold} \u4EE5\u4E0A\u306E\u307F\u51FA\u529B`),t.focus_areas&&r.push(`## \u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF
|
|
118
|
+
${t.focus_areas}`),t.file_path&&r.push(`## \u30D5\u30A1\u30A4\u30EB: ${t.file_path}`),t.code&&r.push(`## \u30B3\u30FC\u30C9
|
|
119
|
+
\`\`\`
|
|
120
|
+
${t.code}
|
|
121
|
+
\`\`\``),j(e,"review",r.join(`
|
|
122
|
+
|
|
123
|
+
`),t.project_root)}var fm="godd_commit",hm="\u8CAC\u52D9\u5358\u4F4D\u30B3\u30DF\u30C3\u30C8\u3002\u5909\u66F4\u5185\u5BB9\u3092\u9069\u5207\u306A\u7C92\u5EA6\uFF081\u30B3\u30DF\u30C3\u30C8=1\u8CAC\u52D9\uFF09\u3067\u5206\u5272\u3057\u3001\u30EB\u30FC\u30EB\u306B\u5247\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u5171\u306B\u30B3\u30DF\u30C3\u30C8\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",qc=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u30B3\u30DF\u30C3\u30C8\u8A08\u753B\u306E\u30E6\u30FC\u30B6\u30FC\u627F\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function yS(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
124
|
+
${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.context&&r.push(`## \u80CC\u666F
|
|
125
|
+
${t.context}`),j(e,"commit",r.join(`
|
|
126
|
+
|
|
127
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1})}var mm="godd_spec",gm="\u8981\u6C42\u2192\u4ED5\u69D8\u5909\u63DB\u3002\u8981\u6C42\u3092\u53D7\u3051\u53D6\u308A\u3001\u5B9F\u88C5\u53EF\u80FD\u306A\u7C92\u5EA6\u306ESpec\uFF08API/UI/DB/Feature/Usecase\uFF09\u306B\u5909\u63DB\u3057\u307E\u3059\u3002",Fc=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),spec_types:g.array(g.enum(["api","ui","db","feature","usecase","error_codes"])).optional().describe("\u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E\uFF08\u672A\u6307\u5B9A\u306A\u3089\u81EA\u52D5\u5224\u5B9A\uFF09"),context:g.string().optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function _S(e,t){let r=[`## \u8981\u6C42
|
|
128
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.spec_types?.length&&r.push(`## \u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E
|
|
129
|
+
${t.spec_types.join(", ")}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
|
130
|
+
${t.context}`),j(e,"spec",r.join(`
|
|
131
|
+
|
|
132
|
+
`),t.project_root)}var ym="godd_impact",_m="\u5F71\u97FF\u5206\u6790\u3002\u5909\u66F4\u5185\u5BB9\u306E\u5F71\u97FF\u7BC4\u56F2\u3092\u6D17\u3044\u51FA\u3057\u3001\u629C\u3051\u6F0F\u308C\u3092\u9632\u304E\u307E\u3059\u3002",Uc=g.object({change_summary:g.string().optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:g.string().optional().describe("\u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB"),breaking_changes:g.boolean().optional().describe("\u7834\u58CA\u7684\u5909\u66F4\u306E\u6709\u7121"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function vS(e,t){let r=[`## \u5909\u66F4\u6982\u8981
|
|
133
|
+
${t.change_summary??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB
|
|
134
|
+
${t.target_modules??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.breaking_changes!==void 0&&r.push(`## \u7834\u58CA\u7684\u5909\u66F4
|
|
135
|
+
${t.breaking_changes?"\u3042\u308A":"\u306A\u3057"}`),j(e,"impact-analysis",r.join(`
|
|
136
|
+
|
|
137
|
+
`),t.project_root)}var vm="godd_test_plan",xm="\u30C6\u30B9\u30C8\u8A08\u753B\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u306B\u57FA\u3065\u304D\u3001unit/integration/e2e\u306E\u5FC5\u8981\u6027\u3068\u5177\u4F53\u7684\u306A\u30C6\u30B9\u30C8\u9805\u76EE\u3092\u7B56\u5B9A\u3057\u307E\u3059\u3002",Bc=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:g.string().optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function xS(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
138
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.failure_points&&r.push(`## \u5931\u6557\u30DD\u30A4\u30F3\u30C8
|
|
139
|
+
${t.failure_points}`),j(e,"test-plan",r.join(`
|
|
140
|
+
|
|
141
|
+
`),t.project_root)}var bm="godd_documentation",km="\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\u652F\u63F4\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5FC5\u8981\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\uFF08Spec/README/\u8A2D\u5B9A\u8AAC\u660E/\u6280\u8853\u30B9\u30BF\u30C3\u30AF\uFF09\u3092\u6D17\u3044\u51FA\u3057\u3001\u5DEE\u5206\u6848\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",Vc=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:g.string().optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function bS(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
142
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.doc_type&&r.push(`## \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225
|
|
143
|
+
${t.doc_type}`),j(e,"auto-documentation",r.join(`
|
|
144
|
+
|
|
145
|
+
`),t.project_root)}var wm="godd_pr_analyze",Sm="PR\u5206\u6790\u3002PR\u306E\u5DEE\u5206\u3092\u8AAD\u307F\u3001\u30EC\u30D3\u30E5\u30FC\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u30FB\u8FFD\u52A0\u3067\u5FC5\u8981\u306A\u60C5\u5831\u3092\u6574\u7406\u3057\u307E\u3059\u3002",Hc=g.object({background:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:g.string().optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:g.string().optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function kS(e,t){let r=[`## \u80CC\u666F
|
|
146
|
+
${t.background??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5909\u66F4\u5185\u5BB9
|
|
147
|
+
${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.scope&&r.push(`## \u5F71\u97FF\u7BC4\u56F2
|
|
148
|
+
${t.scope}`),t.breaking_changes&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
|
|
149
|
+
${t.breaking_changes}`),t.verification&&r.push(`## \u52D5\u4F5C\u78BA\u8A8D
|
|
150
|
+
${t.verification}`),j(e,"pr-analyze",r.join(`
|
|
151
|
+
|
|
152
|
+
`),t.project_root)}var Tm="godd_setup",$m="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.yaml / .cursor/mcp.json \u751F\u6210\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E .env \u4F5C\u6210\u3001\u4F9D\u5B58\u5C0E\u5165\u3001Docker \u8D77\u52D5\u307E\u3067\u4E00\u62EC\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002components \u3092\u6307\u5B9A\u3059\u308B\u3068 config.yaml \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",Gc=g.object({mode:g.enum(["full","godd-only","project-only","generate-config"]).optional().default("full").describe("\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u7BC4\u56F2: full=GoDD+\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5168\u4F53, godd-only=GoDD MCP \u8A2D\u5B9A\u306E\u307F, project-only=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u74B0\u5883\u306E\u307F, generate-config=config.yaml \u81EA\u52D5\u751F\u6210"),environment:g.string().optional().describe("\u74B0\u5883\u60C5\u5831\uFF08OS\u3001\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C4\u30FC\u30EB\u7B49\uFF09"),license_key:g.string().optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.yaml \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:g.string().optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:g.array(g.string()).optional().describe('\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306E\u914D\u5217\uFF08\u4F8B: ["fastapi", "react", "postgresql"]\uFF09\u3002generate-config \u30E2\u30FC\u30C9\u3067\u4F7F\u7528\u3002'),language:g.string().optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:g.string().optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),LM=["python, typescript, javascript, go, php, ruby, c, html, css","react, nextjs, vue, angular, svelte, vite, tailwind, sass, electron","fastapi, django, flask, express, fastify, nestjs, gin, echo, fiber, laravel, symfony, wordpress, rails, sinatra, koa","node, agent-stdio","postgresql, mysql, mongodb, redis","sqlalchemy, celery","docker, terraform","ddd-clean-architecture"].join(", ");function wS(e,t){if(t.mode==="generate-config"){let n=["## GoDD MCP Config \u81EA\u52D5\u751F\u6210\u30E2\u30FC\u30C9","","\u4EE5\u4E0B\u306E\u60C5\u5831\u3092\u3082\u3068\u306B `config.yaml` \u3068 `.cursor/mcp.json` \u3092\u751F\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002",""];if(t.components&&t.components.length>0){n.push("### \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8"),n.push("```yaml"),n.push("components:");for(let o of t.components)n.push(` - ${o}`);n.push("```")}else n.push("### \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u672A\u6307\u5B9A"),n.push("\u30E6\u30FC\u30B6\u30FC\u306B\u4F7F\u7528\u3059\u308B\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u3092\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),n.push(`
|
|
153
|
+
**\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8**: ${LM}`);t.license_key?n.push(`
|
|
154
|
+
### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC: \`${t.license_key}\``):n.push(`
|
|
155
|
+
### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u672A\u6307\u5B9A\u3067\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),n.push(`
|
|
156
|
+
### \u8A00\u8A9E: ${t.language??"ja"}`),n.push(`
|
|
157
|
+
### \u751F\u6210\u3059\u308B\u30D5\u30A1\u30A4\u30EB`),n.push("1. **config.yaml** \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u306B\u914D\u7F6E"),n.push("```yaml"),n.push(`license_key: "${t.license_key??"YOUR_LICENSE_KEY"}"`),n.push("components:");for(let o of t.components??["fastapi","react","postgresql"])n.push(` - ${o}`);return n.push(`language: "${t.language??"ja"}"`),n.push("```"),n.push(""),n.push("2. **`.cursor/mcp.json`** \u2014 Cursor IDE \u7528 MCP \u767B\u9332"),n.push("```json"),n.push(JSON.stringify({mcpServers:{godd:{command:"node",args:["path/to/godd-mcp-server/dist/index.js"],env:{GODD_CONFIG:"./config.yaml"}}}},null,2)),n.push("```"),n.join(`
|
|
158
|
+
`)}let r=[`## \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30E2\u30FC\u30C9: ${t.mode??"full"}`];return t.license_key&&r.push(`## \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC
|
|
159
|
+
\`${t.license_key}\``),t.stack_profile&&r.push(`## \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
|
|
160
|
+
${t.stack_profile}`),t.components&&t.components.length>0&&r.push(`## \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
|
|
161
|
+
${t.components.join(", ")}`),t.environment&&r.push(`## \u74B0\u5883\u60C5\u5831
|
|
162
|
+
${t.environment}`),t.issues&&r.push(`## \u554F\u984C
|
|
163
|
+
${t.issues}`),j(e,"setup",r.join(`
|
|
164
|
+
|
|
165
|
+
`),t.project_root)}var Pm="godd_release_notes",Em="\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u4F5C\u6210\u3002\u5909\u66F4\u70B9\u30FB\u4E92\u63DB\u6027\u30FB\u65E2\u77E5\u306E\u554F\u984C\u3092\u307E\u3068\u3081\u305F\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u3092\u751F\u6210\u3057\u307E\u3059\u3002",Kc=g.object({changes:g.string().optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:g.string().optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function SS(e,t){let r=[`## \u5909\u66F4\u70B9
|
|
166
|
+
${t.changes??"(git log \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.compatibility&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
|
|
167
|
+
${t.compatibility}`),t.known_issues&&r.push(`## \u65E2\u77E5\u306E\u554F\u984C
|
|
168
|
+
${t.known_issues}`),j(e,"release-notes",r.join(`
|
|
169
|
+
|
|
170
|
+
`),t.project_root)}var zm="godd_adr",Cm="ADR\uFF08Architecture Decision Record\uFF09\u4F5C\u6210\u3002\u8A2D\u8A08\u5224\u65AD\u3092\u30C8\u30EC\u30FC\u30C9\u30AA\u30D5\u30FB\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u542B\u3081\u3066\u8A18\u9332\u3057\u307E\u3059\u3002",Wc=g.object({decision:g.string().optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:g.string().optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:g.string().optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function TS(e,t){let r=[`## Decision
|
|
171
|
+
${t.decision??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## Context
|
|
172
|
+
${t.context??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.options&&r.push(`## Options
|
|
173
|
+
${t.options}`),j(e,"adr",r.join(`
|
|
174
|
+
|
|
175
|
+
`),t.project_root)}var Im="godd_sync",Rm="\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F\u3002\u73FE\u5728\u306E\u4F5C\u696D\u30D6\u30E9\u30F3\u30C1\u306B main \u306E\u6700\u65B0\u5909\u66F4\u3092\u53D6\u308A\u8FBC\u307F\u3001\u30DE\u30FC\u30B8\u30B3\u30F3\u30D5\u30EA\u30AF\u30C8\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F SSOT \u6E96\u62E0\u5074\u3092\u512A\u5148\u3057\u3066\u89E3\u6D88\u3057\u307E\u3059\u3002",Jc=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function $S(e,t){return j(e,"sync","",t.project_root)}var Om="godd_new_branch",Am="\u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210\u3002\u4F5C\u696D\u4E2D\u306E\u5909\u66F4\u3092\u5B89\u5168\u306B\u9000\u907F\u3057\u3001\u6700\u65B0\u306E main \u304B\u3089\u65B0\u3057\u3044\u30D6\u30E9\u30F3\u30C1\u3092\u4F5C\u6210\u3057\u3066\u9000\u907F\u3057\u305F\u5909\u66F4\u3092\u5FA9\u5143\u3057\u307E\u3059\u3002",Yc=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:g.string().optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function PS(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
|
|
176
|
+
${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.base_branch&&r.push(`## \u8D77\u70B9\u30D6\u30E9\u30F3\u30C1
|
|
177
|
+
${t.base_branch}`),j(e,"new-branch",r.join(`
|
|
178
|
+
|
|
179
|
+
`),t.project_root)}var Nm="godd_git_workflow",jm="Git \u4E00\u9023\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F \u2192 \u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210 \u2192 \u9069\u5207\u306A\u7C92\u5EA6\u3067\u30B3\u30DF\u30C3\u30C8\u3092\u4E00\u62EC\u5B9F\u884C\u3057\u307E\u3059\u3002",Qc=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:g.string().optional().describe("\u30D6\u30E9\u30F3\u30C1\u306E\u76EE\u7684\uFF08\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168 Phase \u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function ES(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
|
|
180
|
+
${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.purpose&&r.push(`## \u76EE\u7684
|
|
181
|
+
${t.purpose}`),j(e,"git-workflow",r.join(`
|
|
182
|
+
|
|
183
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1})}var Mm="godd_push",Dm="\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3002push/PR\u63D0\u51FA\u524D\u306B\u5FC5\u8981\u306A\u78BA\u8A8D\u4E8B\u9805\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\u7B49\uFF09\u3092\u6F0F\u308C\u306A\u304F\u6574\u7406\u3057\u307E\u3059\u3002",Xc=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function zS(e,t){return j(e,"push","",t.project_root)}var Lm="godd_push_execute",Zm="\u30EA\u30E2\u30FC\u30C8\u30D7\u30C3\u30B7\u30E5\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\uFF09\u3092\u884C\u3044\u3001\u901A\u904E\u5F8C\u306B git push \u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",eu=g.object({auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u901A\u904E\u5F8C\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B push \u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function CS(e,t){return j(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var qm="godd_pr_create",Fm="PR\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u3092\u5206\u6790\u3057\u3001PR\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6E96\u62E0\u3057\u305F\u672C\u6587\u3092\u751F\u6210\u3057\u3066GitHub\u4E0A\u306BPR\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",tu=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068PR\u672C\u6587\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u4F5C\u6210\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function IS(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
|
|
184
|
+
${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
|
|
185
|
+
${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
|
|
186
|
+
${t.context}`),j(e,"pr-create",r.join(`
|
|
187
|
+
|
|
188
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var Um="godd_submit",Bm="\u63D0\u51FA\u4E00\u62EC\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF \u2192 git push \u2192 PR\u4F5C\u6210\u3092\u4E00\u9023\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3068\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",ru=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168\u30B9\u30C6\u30C3\u30D7\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function RS(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
|
|
189
|
+
${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
|
|
190
|
+
${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
|
|
191
|
+
${t.context}`),j(e,"submit",r.join(`
|
|
192
|
+
|
|
193
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var Vm="godd_dev_workflow",Hm="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u5168\u4F53\u7BA1\u7406\u3002\u30BF\u30FC\u30DF\u30CA\u30EB\u4E0D\u8981\u3067\u74B0\u5883\u69CB\u7BC9\u2192\u5B9F\u88C5\u2192\u30C6\u30B9\u30C8\u2192\u30B3\u30DF\u30C3\u30C8\u2192push\u2192PR\u4F5C\u6210\u307E\u3067\u4E00\u8CAB\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",nu=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function OS(e,t){return j(e,"agent-dev-workflow","",t.project_root)}var Gm="godd_report",Km="\u5B8C\u4E86\u5831\u544A\u751F\u6210\u3002\u30BF\u30B9\u30AF\u5B8C\u4E86\u6642\u306E\u5909\u66F4\u6982\u8981\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u691C\u8A3C\u7D50\u679C\u30FB\u6B8B\u30EA\u30B9\u30AF\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6CBF\u3063\u3066\u6574\u7406\u3057\u307E\u3059\u3002",ou=g.object({target:g.string().optional().describe("\u5831\u544A\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u6982\u8981\u307E\u305F\u306F\u30BF\u30B9\u30AF\u540D\uFF09"),report_type:g.string().optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function AS(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
|
|
194
|
+
${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.report_type&&r.push(`## \u5831\u544A\u30BF\u30A4\u30D7
|
|
195
|
+
${t.report_type}`),j(e,"analyze-report",r.join(`
|
|
196
|
+
|
|
197
|
+
`),t.project_root)}var Wm="godd_req_to_flow",Jm="\u8981\u6C42\u2192\u30D3\u30B8\u30CD\u30B9\u30D5\u30ED\u30FC\u5909\u63DB\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u8981\u6C42\u304B\u3089As-Is/To-Be\u30D5\u30ED\u30FC\u3068\u30E6\u30FC\u30B9\u30B1\u30FC\u30B9\u3092\u751F\u6210\u3057\u307E\u3059\u3002",iu=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function NS(e,t){return j(e,"requirements-to-business-flow",`## \u8981\u6C42
|
|
198
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Ym="godd_req_to_tickets",Qm="\u8981\u6C42\u2192\u30C1\u30B1\u30C3\u30C8\u5206\u89E3\u3002\u8981\u6C42\u3092\u5B9F\u88C5\u30BF\u30B9\u30AF\uFF08\u30C1\u30B1\u30C3\u30C8\uFF09\u306B\u5206\u89E3\u3057\u3001\u4F9D\u5B58\u95A2\u4FC2\u3068\u691C\u8A3C\u65B9\u6CD5\u3092\u542B\u3081\u3066\u4E00\u89A7\u5316\u3057\u307E\u3059\u3002",su=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function jS(e,t){return j(e,"requirements-to-tickets",`## \u8981\u6C42
|
|
199
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Xm="godd_spec_to_tickets",eg="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/009_spec/\uFF09\u304B\u3089\u5B9F\u88C5\u53EF\u80FD\u306A\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u3001\u5F71\u97FF\u30EC\u30A4\u30E4\u30FC\u30FB\u30C6\u30B9\u30C8\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u3092\u4ED8\u4E0E\u3057\u307E\u3059\u3002",au=g.object({specification:g.string().optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function MS(e,t){return j(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
|
|
200
|
+
${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var tg="godd_install",rg="\u30C4\u30FC\u30EB/MCP\u30B5\u30FC\u30D0\u30FC\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3002\u6307\u5B9A\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u74B0\u5883\u306B\u9069\u3057\u305F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u624B\u9806\u30FB\u8A2D\u5B9A\u30FB\u758E\u901A\u78BA\u8A8D\u3092\u6848\u5185\u3057\u307E\u3059\u3002",cu=g.object({target:g.string().describe("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61\u306E\u30C4\u30FC\u30EB/MCP\u540D\uFF08\u4F8B: context7, chrome-devtools-mcp, markitdown-mcp, mcp-ocr, serena, vibe-odf-read-mcp\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function DS(e,t){return j(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
|
|
201
|
+
${t.target}`,t.project_root)}var ng="godd_docs_init",og="\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B docs/ \u30D5\u30A9\u30EB\u30C0\u69CB\u9020\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304B\u3089\u751F\u6210\u3057\u307E\u3059\u3002ripla Notes \u3067\u95B2\u89A7\u30FB\u7DE8\u96C6\u53EF\u80FD\u306A MD/CSV/drawio \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u521D\u671F\u69CB\u9020\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",uu=g.object({project_name:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:g.array(g.string()).optional().describe("\u30ED\u30FC\u30EB\u540D\u4E00\u89A7\uFF08\u4F8B: \u7BA1\u7406\u8005, \u904B\u55B6\u8005, \u5229\u7528\u8005\uFF09"),screens:g.array(g.string()).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function LS(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
|
|
202
|
+
${t.project_name??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.roles?.length&&r.push(`## \u30ED\u30FC\u30EB
|
|
203
|
+
${t.roles.map(n=>`- ${n}`).join(`
|
|
204
|
+
`)}`),t.screens?.length&&r.push(`## \u753B\u9762ID
|
|
205
|
+
${t.screens.map(n=>`- ${n}`).join(`
|
|
206
|
+
`)}`),j(e,"docs-init",r.join(`
|
|
207
|
+
|
|
208
|
+
`),t.project_root)}var ig="godd_docs_update",sg="\u30B3\u30FC\u30C9\u5909\u66F4\u5F8C\u306B docs/ \u5185\u306E\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\uFF08MD/CSV\uFF09\u3092\u540C\u671F\u30FB\u66F4\u65B0\u3057\u307E\u3059\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5F71\u97FF\u3059\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u7279\u5B9A\u3057\u3001\u66F4\u65B0\u5DEE\u5206\u3092\u63D0\u6848\u3057\u307E\u3059\u3002",lu=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:g.array(g.string()).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function ZS(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
209
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.target_sections?.length&&r.push(`## \u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3
|
|
210
|
+
${t.target_sections.map(n=>`- ${n}`).join(`
|
|
211
|
+
`)}`),j(e,"docs-update",r.join(`
|
|
212
|
+
|
|
213
|
+
`),t.project_root)}var ag="godd_notes_deploy",cg="notes-app (React) / notes-api (FastAPI) \u306E\u30C7\u30D7\u30ED\u30A4\u6848\u5185\u3092\u751F\u6210\u3057\u307E\u3059\u3002Docker Compose\u3001\u30AF\u30E9\u30A6\u30C9\u3001\u307E\u305F\u306F\u624B\u52D5\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",pu=g.object({deploy_target:g.string().optional().describe("\u30C7\u30D7\u30ED\u30A4\u5148\uFF08docker, cloud, manual \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:g.string().optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")});function qS(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
|
|
214
|
+
${t.deploy_target}`),t.github_repo&&r.push(`## \u5BFE\u8C61\u30EA\u30DD\u30B8\u30C8\u30EA
|
|
215
|
+
${t.github_repo}`),j(e,"notes-deploy",r.join(`
|
|
216
|
+
|
|
217
|
+
`)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}import{verify as ZM,createPublicKey as qM}from"node:crypto";var ug="";function US(e){ug=e}function FS(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function FM(e){let t=e.split(".");if(t.length!==2)throw new Nt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[r,n]=t;if(ug){let a=qM(ug),c=FS(n);if(!ZM(null,Buffer.from(r),a,c))throw new Nt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}let o=FS(r).toString("utf-8"),i;try{i=JSON.parse(o)}catch{throw new Nt("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(i.v!==1)throw new Nt(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${i.v}`);let s=new Date(i.exp);if(isNaN(s.getTime()))throw new Nt("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(s<new Date)throw new Nt(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${i.exp}\uFF09`);return i}function BS(e,t){let r=FM(e);if(r.stack&&r.stack!==t)throw new Nt(`\u3053\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u306F\u30B9\u30BF\u30C3\u30AF '${r.stack}' \u5C02\u7528\u3067\u3059\uFF08\u8981\u6C42: '${t}'\uFF09`);return r}var Nt=class extends Error{constructor(t){super(t),this.name="LicenseError"}};import{dirname as VS,join as Yi}from"node:path";import{fileURLToPath as HS}from"node:url";import{readFileSync as UM,existsSync as BM}from"node:fs";var En;try{En=VS(HS(import.meta.url))}catch{En=VS(process.execPath)}async function VM(e){let t=e.components??[];if(t.length===0)return null;let r=await lS(t,e.language,e.license_key);if(r&&!r.isExpired){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F");let n=JSON.parse(r.data);return Wi(n),n}try{let n=pS(t,e.language),o=await oS(e,n);if(o===null&&r){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F\u30AD\u30E3\u30C3\u30B7\u30E5\u3068\u540C\u4E00\u3067\u3059\uFF08304\uFF09");let i=JSON.parse(r.data);return Wi(i),i}if(o){let i=await iS(o.bundle,e.license_key);Wi(i);let s=JSON.stringify(i);return await uS(s,o.etag,t,e.language,e.license_key),console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092 Registry API \u304B\u3089\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3057\u305F"),i}}catch(n){console.error(`[GoDD] Registry API \u3078\u306E\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n instanceof Error?n.message:String(n)}`)}if(r){console.error("[GoDD] \u8B66\u544A: \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\uFF08Registry API \u5230\u9054\u4E0D\u80FD\uFF09");let n=JSON.parse(r.data);return Wi(n),n}return null}async function HM(){let e=ck(),t=e.components&&e.components.length>0,r;if(t){try{let u=await nS(e);u.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${u.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(u){console.error(`[GoDD] Registry \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u5931\u6557\u3002\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${u instanceof Error?u.message:String(u)}`)}let c=await VM(e);if(c)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(u=>({id:u,label:u,name:u})),quality_gate:c.quality_gate?{frontend:c.quality_gate.frontend,backend:c.quality_gate.backend,preflight_command:c.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:c.tools?.map(u=>({id:u.id,label:u.label,category:u.category,description:u.description,guidance:u.guidance}))};else{console.error("[GoDD] Registry/\u30AD\u30E3\u30C3\u30B7\u30E5\u5229\u7528\u4E0D\u53EF\u3002\u30ED\u30FC\u30AB\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF"),rm(Yi(En,"..","templates"));let u=e.stack_profile??"fastapi-react";r=uh(u,Yi(En,"..","stacks"))}}else{let c=Yi(En,"..",".keys","public.pem");BM(c)&&US(UM(c,"utf-8"));try{BS(e.license_key,e.stack_profile??"fastapi-react")}catch(p){p instanceof Nt&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${p.message}`),process.exit(1))}r=uh(e.stack_profile??"fastapi-react",Yi(En,"..","stacks")),await rS(e.license_key)||rm(Yi(En,"..","templates"))}let n={profile:r,config:e},o=new Za({name:"godd-mcp-server",version:"0.1.0"});o.tool(am,cm,Dc.shape,c=>({content:[{type:"text",text:hS(n,Dc.parse(c))}]})),o.tool(um,lm,Lc.shape,c=>({content:[{type:"text",text:mS(n,Lc.parse(c))}]})),o.tool(pm,dm,Zc.shape,c=>({content:[{type:"text",text:gS(n,Zc.parse(c))}]})),o.tool(fm,hm,qc.shape,c=>({content:[{type:"text",text:yS(n,qc.parse(c))}]})),o.tool(mm,gm,Fc.shape,c=>({content:[{type:"text",text:_S(n,Fc.parse(c))}]})),o.tool(ym,_m,Uc.shape,c=>({content:[{type:"text",text:vS(n,Uc.parse(c))}]})),o.tool(vm,xm,Bc.shape,c=>({content:[{type:"text",text:xS(n,Bc.parse(c))}]})),o.tool(bm,km,Vc.shape,c=>({content:[{type:"text",text:bS(n,Vc.parse(c))}]})),o.tool(wm,Sm,Hc.shape,c=>({content:[{type:"text",text:kS(n,Hc.parse(c))}]})),o.tool(Tm,$m,Gc.shape,c=>({content:[{type:"text",text:wS(n,Gc.parse(c))}]})),o.tool(Pm,Em,Kc.shape,c=>({content:[{type:"text",text:SS(n,Kc.parse(c))}]})),o.tool(zm,Cm,Wc.shape,c=>({content:[{type:"text",text:TS(n,Wc.parse(c))}]})),o.tool(Im,Rm,Jc.shape,c=>({content:[{type:"text",text:$S(n,Jc.parse(c))}]})),o.tool(Om,Am,Yc.shape,c=>({content:[{type:"text",text:PS(n,Yc.parse(c))}]})),o.tool(Nm,jm,Qc.shape,c=>({content:[{type:"text",text:ES(n,Qc.parse(c))}]})),o.tool(Mm,Dm,Xc.shape,c=>({content:[{type:"text",text:zS(n,Xc.parse(c))}]})),o.tool(Lm,Zm,eu.shape,c=>({content:[{type:"text",text:CS(n,eu.parse(c))}]})),o.tool(qm,Fm,tu.shape,c=>({content:[{type:"text",text:IS(n,tu.parse(c))}]})),o.tool(Um,Bm,ru.shape,c=>({content:[{type:"text",text:RS(n,ru.parse(c))}]})),o.tool(Vm,Hm,nu.shape,c=>({content:[{type:"text",text:OS(n,nu.parse(c))}]})),o.tool(Gm,Km,ou.shape,c=>({content:[{type:"text",text:AS(n,ou.parse(c))}]})),o.tool(Wm,Jm,iu.shape,c=>({content:[{type:"text",text:NS(n,iu.parse(c))}]})),o.tool(Ym,Qm,su.shape,c=>({content:[{type:"text",text:jS(n,su.parse(c))}]})),o.tool(Xm,eg,au.shape,c=>({content:[{type:"text",text:MS(n,au.parse(c))}]})),o.tool(tg,rg,cu.shape,c=>({content:[{type:"text",text:DS(n,cu.parse(c))}]})),o.tool(ng,og,uu.shape,c=>({content:[{type:"text",text:LS(n,uu.parse(c))}]})),o.tool(ig,sg,lu.shape,c=>({content:[{type:"text",text:ZS(n,lu.parse(c))}]})),o.tool(ag,cg,pu.shape,c=>({content:[{type:"text",text:qS(n,pu.parse(c))}]}));let i=r?.tools??[];i.length>0&&o.resource("ecosystem-tool",new zi("godd://tools/{toolId}",{list:async()=>({resources:i.map(c=>({uri:`godd://tools/${c.id}`,name:c.label,description:c.description,mimeType:"text/plain"}))})}),async(c,{toolId:u})=>{let p=i.find(d=>d.id===String(u));if(!p)return{contents:[{uri:c.href,text:"Tool not found"}]};let l=[`# ${p.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${p.category}`,`- **\u8AAC\u660E**: ${p.description}`];return p.guidance&&l.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",p.guidance),"url"in p&&p.url&&l.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${p.url}`),{contents:[{uri:c.href,text:l.join(`
|
|
218
|
+
`),mimeType:"text/plain"}]}});let s=[{name:am,description:cm,params:Object.keys(Dc.shape)},{name:um,description:lm,params:Object.keys(Lc.shape)},{name:pm,description:dm,params:Object.keys(Zc.shape)},{name:fm,description:hm,params:Object.keys(qc.shape)},{name:mm,description:gm,params:Object.keys(Fc.shape)},{name:ym,description:_m,params:Object.keys(Uc.shape)},{name:vm,description:xm,params:Object.keys(Bc.shape)},{name:bm,description:km,params:Object.keys(Vc.shape)},{name:wm,description:Sm,params:Object.keys(Hc.shape)},{name:Tm,description:$m,params:Object.keys(Gc.shape)},{name:Pm,description:Em,params:Object.keys(Kc.shape)},{name:zm,description:Cm,params:Object.keys(Wc.shape)},{name:Im,description:Rm,params:Object.keys(Jc.shape)},{name:Om,description:Am,params:Object.keys(Yc.shape)},{name:Nm,description:jm,params:Object.keys(Qc.shape)},{name:Mm,description:Dm,params:Object.keys(Xc.shape)},{name:Lm,description:Zm,params:Object.keys(eu.shape)},{name:qm,description:Fm,params:Object.keys(tu.shape)},{name:Um,description:Bm,params:Object.keys(ru.shape)},{name:Vm,description:Hm,params:Object.keys(nu.shape)},{name:Gm,description:Km,params:Object.keys(ou.shape)},{name:Wm,description:Jm,params:Object.keys(iu.shape)},{name:Ym,description:Qm,params:Object.keys(su.shape)},{name:Xm,description:eg,params:Object.keys(au.shape)},{name:tg,description:rg,params:Object.keys(cu.shape)},{name:ng,description:og,params:Object.keys(uu.shape)},{name:ig,description:sg,params:Object.keys(lu.shape)},{name:ag,description:cg,params:Object.keys(pu.shape)}];o.resource("mcp-tool",new zi("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(c=>({uri:`godd://mcp-tools/${c.name}`,name:c.name,description:c.description,mimeType:"text/plain"}))})}),async(c,{toolName:u})=>{let p=s.find(d=>d.name===String(u));if(!p)return{contents:[{uri:c.href,text:"Tool not found"}]};let l=[`# ${p.name}`,"",p.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...p.params.map(d=>`- \`${d}\``)];return{contents:[{uri:c.href,text:l.join(`
|
|
219
|
+
`),mimeType:"text/plain"}]}});let a=new Fa;await o.connect(a)}var GM=(()=>{try{let e=HS(import.meta.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();GM&&HM().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)});export{HM as startServer};
|
|
220
|
+
/*! Bundled license information:
|
|
221
|
+
|
|
222
|
+
js-yaml/dist/js-yaml.mjs:
|
|
223
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
224
|
+
*/
|